Module:Debugging
Jump to navigation
Jump to search
Module used for module debugging, by showing parameters passed to it. Used by subtemplates of Template:Autotranslate/test.
Code
local p = {}
function p.showTemplateArguments(frame)
-- list all input arguments of the template that calls "{{#invoke:Debugging|showTemplateArguments}}"
local s = {}
for name, value in pairs( mw.getCurrentFrame():getParent().args ) do
table.insert(s, string.format('%s=%s', name, value))
end
return table.concat(s, ', ')
end
return p