|
|
| (8 intermediate revisions by 2 users not shown) |
| 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 |