Module:InfoboxHero: Difference between revisionsGive feedback
mNo edit summary |
add tooltips (the fancy template style) |
||
| Line 317: | Line 317: | ||
{ param = 'pronouns', label_dict = 'Pronouns' }, | { param = 'pronouns', label_dict = 'Pronouns' }, | ||
{ param = 'voice_actor', label_dict = 'VoiceActor' }, | { param = 'voice_actor', label_dict = 'VoiceActor' }, | ||
{ param = 'codenames', label_dict = 'Codenames' }, | { param = 'codenames', label_dict = 'Codenames', tooltip = 'Codenames used for this hero in the game files' }, | ||
} | } | ||
| Line 616: | Line 616: | ||
local tr = tbl:tag('tr') | local tr = tbl:tag('tr') | ||
local label = dict_module.translate(row.label_dict) | local label = dict_module.translate(row.label_dict) | ||
if row.tooltip then | |||
label = ctx.frame:expandTemplate{ title = 'Tooltip', args = { label, row.tooltip } } | |||
end | |||
if row.link then | if row.link then | ||
tr:tag('td'):wikitext(string.format('[[%s|<span>%s</span>]]:', | tr:tag('td'):wikitext(string.format('[[%s|<span>%s</span>]]:', | ||