Module:Sandbox/Vergir

From The Deadlock Wiki
Revision as of 14:47, 11 August 2026 by Vergir (talk | contribs) (Probe: candidate localization keys for table headers (with help from vergir-bot LLM))
Jump to navigation Jump to search

Documentation for this module may be created at Module:Sandbox/Vergir/doc

-- TEMPORARY probe: check which localization keys exist for table headers.
-- {{#invoke:Sandbox/Vergir|headers}}
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> &rarr; "' ..
			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> &rarr; "' ..
			tostring(dictionary_module.translate(key)) .. '"')
	end
	table.insert(out, '')
	table.insert(out, 'search_string("Hero") &rarr; "' ..
		tostring(lang_module._search_string('Hero')) .. '"')
	return table.concat(out, '\n')
end

return p