Editing Module:Sandbox/VergirGive 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 1: | Line 1: | ||
-- TEMPORARY probe: check which localization keys exist for table headers. | |||
-- {{#invoke:Sandbox/Vergir|headers}} | |||
local p = {} | local p = {} | ||
local lang_module = require('Module:Lang') | |||
local dictionary_module = require('Module:Dictionary') | |||
local LANG_KEYS = { | |||
'Hero', 'hero', 'Scaling', 'Stat', 'Stats', | |||
'StatDesc_Hero', 'citadel_hero', 'Citadel_Hero', | |||
'StatCategory_Weapon', 'StatDesc_Scaling', 'SpiritScaling', | |||
'StatDesc_TechPower', 'TechPower_label', | |||
} | |||
local DICT_KEYS = { 'Hero', 'Heroes', 'Stat', 'Stats', 'Scaling', 'Spirit Power' } | |||
function p.headers(frame) | |||
local out = {'Module:Lang lookups:'} | |||
for _, key in ipairs(LANG_KEYS) do | |||
table.insert(out, '* <code>' .. key .. '</code> → "' .. | |||
tostring(lang_module.get_string(key)) .. '"') | |||
end | |||
table.insert(out, '') | |||
table.insert(out, 'Module:Dictionary lookups:') | |||
for _, key in ipairs(DICT_KEYS) do | |||
table.insert(out, '* <code>' .. key .. '</code> → "' .. | |||
tostring(dictionary_module.translate(key)) .. '"') | |||
end | |||
table.insert(out, '') | |||
table.insert(out, 'search_string("Hero") → "' .. | |||
tostring(lang_module._search_string('Hero')) .. '"') | |||
return table.concat(out, '\n') | |||
end | |||
return p | return p | ||