Module:AbilityData/hero: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m collapsible thats at least not bugging for write_hero_abilities |
m note transclusion message moved to inside the notes |
||
| Line 106: | Line 106: | ||
local ability_name_localized = lang_module.get_string(ability_key) | local ability_name_localized = lang_module.get_string(ability_key) | ||
local notes_str_localized = dictionary_module.translate('Notes', nil, '') | local notes_str_localized = dictionary_module.translate('Notes', nil, '') | ||
local tab_name = " | local tab_name = "<h2>" .. ability_name_localized .. "</h2>\n" | ||
--Determine notes link | --Determine notes link | ||
| Line 116: | Line 116: | ||
notes_source_page = ability_name_en .. '/' .. dictionary_module.translate('Notes', 'en', '') | notes_source_page = ability_name_en .. '/' .. dictionary_module.translate('Notes', 'en', '') | ||
if notes_str_localized=='' then | if notes_str_localized=='' then | ||
notes_untranslated_msg = dictionary_module.translate('NotesNeedsTranslation') .. ' [[Template:Translate]]' .. "<br>" | notes_untranslated_msg = '<br>' .. dictionary_module.translate('NotesNeedsTranslation') .. ' [[Template:Translate]]' .. "<br>" | ||
end | end | ||
else | else | ||
| Line 124: | Line 124: | ||
--Determine tab content | --Determine tab content | ||
local | local notes_transcluded_from = "<i>" .. dictionary_module.translate_embed( | ||
'TranscludedNotesFrom', | 'TranscludedNotesFrom', | ||
'https://en.wikipedia.org/wiki/Help:Transclusion', | 'https://en.wikipedia.org/wiki/Help:Transclusion', | ||
'[['..notes_source_page..']]', | '[['..notes_source_page..']]', | ||
'https://deadlocked.wiki/index.php?title='..util_module.url_encode(notes_source_page)..'&action=edit' | 'https://deadlocked.wiki/index.php?title='..util_module.url_encode(notes_source_page)..'&action=edit' | ||
) .. "</i | ) .. "</i>" .. notes_untranslated_msg | ||
local | local notes_section = '{{' .. notes_source_page .. '}}\n' .. notes_transcluded_from | ||
local tab_content = ability_module.get_ability_card_from_key( | |||
hero_key, | hero_key, | ||
ability_num, | ability_num, | ||
'true', | 'true', | ||
notes_section | |||
) | ) | ||
ret = ret .. tab_name .. tab_content .. '\n' | |||
ret = ret .. | |||
end | end | ||