Module:HeroData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m call_lang removed |
m Infobox_hero > User:Sur; template vars to snake case |
||
| Line 100: | Line 100: | ||
local postfix | local postfix | ||
local | local template_args = {} | ||
-- Iterate attribute categories | -- Iterate attribute categories | ||
| Line 128: | Line 128: | ||
postfix = lang_module.call_lang(postfix) | postfix = lang_module.call_lang(postfix) | ||
end | end | ||
template_args[stat_name] = stat_value .. postfix | |||
end | end | ||
| Line 136: | Line 138: | ||
end | end | ||
-- Use expandTemplate to evaluate the Infobox_hero template | -- Use expandTemplate to evaluate the Infobox_hero template | ||
local | local template_title = mw.title.new("User:Sur") | ||
local | local expanded_template = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args } | ||
return | return expanded_template | ||
end | end | ||