5842eb7a2b
Traduction - Identifiants en anglais dans tout le module : addon, ecrans d'accueil, outils Python, banc d'essai et patcheur C#. - Fichiers au nom francais renommes (Gabarits.lua -> Templates.lua, Textes_*.lua -> Texts_*.lua, deployer.py -> deploy.py, tools/patcheur -> tools/patcher, etc.). - Commandes /fui et options de deploy.py en anglais (--check, --server, --remove-dbc). - Cles des variables sauvegardees et de data/dbc/statistics.json traduites, sans reprise des anciennes cles. - API de la micro-barre : ForeverUI.AddMicroButton(def) avec les champs name, atlasSet, after, tooltip, onClick, ready, et ForeverUI.UpdateMicro(name, isOpen). - Commentaires reecrits en anglais, courts, sans dates ni historique ; les fonctions au nom peu parlant et leurs parametres sont expliques. Code mort - Exports, fonctions et variables jamais lus retires. - Retires a la demande des modules : ForeverUI.PvPJauge, les exports FondEntete / TuilerEntete / Polices de TradeSkill, l'art legacy-up-c60, honorfill(half)blue et inv_misc_book_09, leurs entrees d'atlas et les parties d'outils correspondantes. Verifications : liaisons des noms comparees avant et apres, banc vert, chemins de textures inchanges, generateurs reproduisant les fichiers, patcheur identique octet pour octet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Lua
38 lines
1.2 KiB
Lua
-- ForeverUI: texts in the client's language. Texts the 3.3.5 client has (GlobalStrings.lua)
|
|
-- are read from their globals; any other displayed text comes from ForeverUI.L.KEY.
|
|
-- A language is a Texts_<GetLocale code>.lua file calling ForeverUI.AddTexts, listed in the
|
|
-- .toc after Texts_enUS.lua; enUS fills missing keys and languages. Keep %s / %d in number and
|
|
-- order (Lua 5.1 string.format cannot reorder them). Keys unknown to enUS show as is and go to
|
|
-- ForeverUI.missingTexts (the test bench rejects them).
|
|
|
|
ForeverUI = ForeverUI or {}
|
|
|
|
local languages = {}
|
|
local BASE = "enUS"
|
|
|
|
function ForeverUI.AddTexts(language, texts)
|
|
local t = languages[language] or {}
|
|
for key, text in pairs(texts) do t[key] = text end
|
|
languages[language] = t
|
|
end
|
|
|
|
ForeverUI.missingTexts = {}
|
|
|
|
ForeverUI.L = setmetatable({}, {
|
|
__index = function(_, key)
|
|
local t = languages[GetLocale()]
|
|
local text = t and t[key]
|
|
if text == nil and languages[BASE] then text = languages[BASE][key] end
|
|
if text == nil then
|
|
ForeverUI.missingTexts[key] = true
|
|
text = tostring(key)
|
|
end
|
|
return text
|
|
end,
|
|
})
|
|
|
|
-- keys of one language (for the test bench)
|
|
function ForeverUI.TextsFor(language)
|
|
return languages[language]
|
|
end
|