Module:Template translation: Difference between revisions
m
75 revisions imported: testing
(Add fallback to _getLanguageSubpage for content language. Used by Template:Pagelang) |
m (75 revisions imported: testing) |
||
Line 36:
and subpage ~= "sandbox"
and subpage ~= "testcases"
then
return subpage
Line 45 ⟶ 43:
end
--[[Get the last subpage of
]]
function this.
--[[This code does not work in all namespaces where the Translate tool works.
-- It works in the main namespace on Meta because it allows subpages there
Line 79 ⟶ 58:
-- bug of Meta-Wiki. The work-around is to split the full title and then
-- get the last titlepart.
local subpage = mw.title.getCurrentTitle().subpageText
--]]
end
Line 95 ⟶ 68:
]]
function this.getMainLanguageSubpage()
parts = mw.text.split( this.
return parts[1]
end
Line 103 ⟶ 76:
]]
function this.getFrameLanguageSubpage(frame)
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, '')
end
Line 184 ⟶ 159:
if (subpage == '')
then
subpage = this.
end
if (subpage == '')
|