Module:HeroData: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m get_list_elem() if hero doesnt have that variable, return empty string instead
Sur (talk | contribs)
m fix outdated use of PageRef for write_default_items()
Line 130: Line 130:
template_args = {}
template_args = {}
template_args[1] = lang_module.get_string(item_key, 'en')
template_args[1] = lang_module.get_string(item_key, 'en')
template_args['alt'] = localize(item_key, item_key)
template_args['alt_name'] = localize(item_key, item_key)
local expanded_template = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args }
local expanded_template = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args }
str = str .. "* " .. expanded_template .. "\n"
str = str .. "* " .. expanded_template .. "\n"