Module:Template translation: Difference between revisions

rename
m (1 revision imported: import from collabwiki)
(rename)
Line 63:
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, '')
end
 
--[[Get the first part of the language code of the subpage, before the '-'.
]]
function this.getMainLanguageSubpage()
parts = mw.text.split( this.getLanguageSubpage(), '-' )
return parts[1]
end
 
Line 134 ⟶ 141:
]]
local title
local namespace = args['namespacetntns'] or ''
if (namespace ~= '') -- Checks for namespacetntns parameter for custom ns.
then
title = this.title(namespace, pagename) -- Costly
Line 236 ⟶ 243:
end
arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded
arguments['namespacetntns'] = nil -- discard the specified namespace override
arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame
arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame