Editing Module:SoulsGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 2: | Line 2: | ||
local Lang = require('Module:Lang') | local Lang = require('Module:Lang') | ||
-- Formats souls amount with an icon and styling | -- Formats souls amount with an icon and styling | ||
function render(amount, args) | |||
local args = args or {} | local args = args or {} | ||
local size = args.size or '14px' | local size = args.size or '14px' | ||
| Line 13: | Line 12: | ||
local style = 'color:#98ffde; font-family:Retail Demo; text-wrap:nowrap; ' .. shadow | local style = 'color:#98ffde; font-family:Retail Demo; text-wrap:nowrap; ' .. shadow | ||
local lang_code = Lang.get_lang_code() | |||
local link = 'Souls' | local link = 'Souls' | ||
if lang_code ~= 'en' then | if lang_code ~= 'en' then | ||
link = 'Souls | link = 'Souls' .. lang_code | ||
end | end | ||
local file = '[[File:Souls iconColored.png|link=' .. link .. '|' .. size .. '|Souls]]' | local file = '[[File:Souls iconColored.png|link=' .. link .. '|' .. size .. '|Souls]]' | ||
| Line 21: | Line 21: | ||
local bold = amount and '<b>' .. amount .. '</b>' or '' | local bold = amount and '<b>' .. amount .. '</b>' or '' | ||
return '<span | return '<span style="' .. style .. '">' .. file .. thin_space .. bold .. '</span>' | ||
end | end | ||