Module:HeroData: Difference between revisionsGive feedback
m only call lang if not nil |
mNo edit summary |
||
| Line 107: | Line 107: | ||
-- Add the main parameters | -- Add the main parameters | ||
template_args[" | template_args["name_english"] = hero_name | ||
template_args["name_localized"] = lang_module.search_string(hero_name) | |||
local wep_name = hero_data["WeaponName"] | local wep_name = hero_data["WeaponName"] | ||
if (wep_name ~= nil) then template_args["weapon_name"] = lang_module. | if (wep_name ~= nil) then template_args["weapon_name"] = lang_module._get_string(wep_name) end | ||
local wep_desc = hero_data["WeaponDescription"] | local wep_desc = hero_data["WeaponDescription"] | ||
if (wep_desc ~= nil) then template_args["weapon_description"] = lang_module. | if (wep_desc ~= nil) then template_args["weapon_description"] = lang_module._get_string(wep_desc) end | ||
local role = hero_data["Role"] | local role = hero_data["Role"] | ||
if (role ~= nil) then template_args["role"] = lang_module. | if (role ~= nil) then template_args["role"] = lang_module._get_string(role) end | ||
local playstyle = hero_data["Playstyle"] | local playstyle = hero_data["Playstyle"] | ||
if (playstyle ~= nil) then template_args["playstyle"] = lang_module. | if (playstyle ~= nil) then template_args["playstyle"] = lang_module._get_string(playstyle) end | ||
-- Iterate attribute categories | -- Iterate attribute categories | ||