Module:AbilitySection: Difference between revisions

Jump to navigation Jump to search
m Reverted edit by Gammaton32 (talk) to last revision by Vergir
Tag: Rollback
Vergir (talk | contribs)
m fix "Icon not found" for non-english pages
Line 84: Line 84:
if ability ~= nil then
if ability ~= nil then
local ability_name = lang.get_string(ability.Key)
local ability_name = lang.get_string(ability.Key)
local icon_html = icon_module._render(ability_name, { size = '30px', ['icon-only'] = 'true', ['no-link'] = 'true' })
-- Use the English ability key for icon render; icon module indexes by English name
local ability_name_en = lang.get_string(ability.Key, 'en', ability.Key)
local icon_html = icon_module._render(ability_name_en, { size = '30px', ['icon-only'] = 'true', ['no-link'] = 'true' })
             heading = '<h3 class="ability-name" style="font-family: \'Valve Occult\' !important;">' .. icon_html .. ' ' .. ability_name .. '</h3>'
             heading = '<h3 class="ability-name" style="font-family: \'Valve Occult\' !important;">' .. icon_html .. ' ' .. ability_name .. '</h3>'
         end
         end