Editing Module:AbilityData/heroGive feedback
Jump to navigation
Jump to search
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 1: | Line 1: | ||
local ability_module = require("Module: | local ability_module = require("Module:AbilityData") | ||
local dictionary_module = require("Module:Dictionary") | local dictionary_module = require("Module:Dictionary") | ||
local lang_module = require("Module:Lang") | local lang_module = require("Module:Lang") | ||
local util_module = require("Module:Utilities") | local util_module = require("Module:Utilities") | ||
local heroes_data = mw.loadJsonData("Data:HeroData.json") | local heroes_data = mw.loadJsonData("Data:HeroData.json") | ||
local p = {} | local p = {} | ||
-- | function test(frame) | ||
function | return "hey" | ||
end | |||
-- Write each of the hero's ability cards in a tab of a tabber | |||
function write_hero_abilities(frame) | |||
local hero_key = frame.args[1] | local hero_key = frame.args[1] | ||
| Line 21: | Line 24: | ||
for ability_num, ability_data in pairs(abilities_data) do | for ability_num, ability_data in pairs(abilities_data) do | ||
local ability_key = ability_data["Key"] | local ability_key = ability_data["Key"] | ||
local ability_name_en = ability_data["Name"] | |||
local ability_name_localized = lang_module.get_string(ability_key) | local ability_name_localized = lang_module.get_string(ability_key) | ||
local tab_name = " | local ability_name_localized_encoded = util_module.url_encode(ability_name_localized) | ||
local | local notes_str_localized = dictionary_module.translate('Notes', nil, '') | ||
local tab_name = "|-|(" .. ability_num .. ")" .. ability_name_en .. "=" | |||
local transcluded_notes_from = "<i>" .. dictionary_module.translate_embed( | |||
'TranscludedNotesFrom', | |||
'https://en.wikipedia.org/wiki/Help:Transclusion', | |||
'[[User:Sur/'..ability_name_localized..'/'..notes_str_localized..']]', | |||
'https://deadlocked.wiki/index.php?title=User:Sur/'..ability_name_localized_encoded..'/'..notes_str_localized..'}&action=edit' | |||
) .. "</i>" | |||
local tab_content = transcluded_notes_from | |||
local | |||
ret = ret .. tab_name .. tab_content | |||
ret = ret .. tab_name .. tab_content | |||
end | end | ||
return "<tabber>" .. ret .. "</tabber>" | |||
return | |||
end | end | ||
return p | return p | ||