Module:Template translation: Difference between revisions
Content added Content deleted
m (forward the noshift parameter to avoid infinite recursion) |
m (arguments still need to be copied (they are not a proper table)) |
||
Line 177: | Line 177: | ||
-- Then render the pagename. |
-- Then render the pagename. |
||
local pargs = (frame:getParent() or {}).args |
local pargs = (frame:getParent() or {}).args |
||
local arguments |
local arguments = {} |
||
if (args['noshift'] or '') == '' |
if (args['noshift'] or '') == '' |
||
then |
then |
||
⚫ | |||
for k, v in pairs(pargs) do |
for k, v in pairs(pargs) do |
||
-- numbered args >= 1 need to be shifted |
-- numbered args >= 1 need to be shifted |
||
Line 196: | Line 195: | ||
else -- special case where TNT is used as autotranslate |
else -- special case where TNT is used as autotranslate |
||
-- (don't shift again what is shifted in the invokation) |
-- (don't shift again what is shifted in the invokation) |
||
for k, v in pairs(pargs) do |
|||
⚫ | |||
end |
|||
end |
end |
||
arguments['template'] = title.prefixedText -- override the existing parameter of the base template name supplied with the full name of the actual template expanded |
arguments['template'] = title.prefixedText -- override the existing parameter of the base template name supplied with the full name of the actual template expanded |