mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add WLAN (Localization) — 123rd open format
Novel replacement for the per-language overlay tables vanilla WoW carried as Locale_*.MPQ patches plus the Spell.dbc / Item.dbc trailing 16-locale string columns. Each entry binds one (originalKey, languageCode, namespace) triple to its localized translation, forming a per-language overlay applied AFTER any per-format catalog has resolved its primary text. Eleven languageCode values cover the canonical WoW locales (enUS / enGB / deDE / esES / frFR / itIT / koKR / ptBR / ruRU / zhCN / zhTW) plus Unknown=255 as escape hatch. Eight namespace values segment the lookup space (UI / Quest / Item / Spell / Creature / Tooltip / Gossip / System) so a UI button "Cancel" doesn't collide with an item description containing the word "Cancel". UTF-8 multibyte support is the novel demonstration — the originalKey field is typically ASCII (English canonical key), but localizedText holds Korean (취소), Simplified Chinese (取消), or other non-Latin scripts. The string-length-prefixed binary serialization preserves byte-identical round-trip regardless of encoding. Three preset emitters: makeUIBasics (5 UI translations of the "Cancel" button across deDE/frFR/esES/koKR/zhCN including the Korean and Chinese multibyte UTF-8 strings), makeQuestSample (3 entries — one quest title in deDE/frFR/koKR illustrating the dotted-key convention "QUEST.123.title"), makeTooltipSet (4 item-tooltip strings in deDE+frFR — the high-volume client localization use case). Validator's most novel check is per-(originalKey, languageCode, namespace) triple uniqueness — two entries with all three matching would tie at runtime when the locale-aware text layer looks up an override. Plus the warning on empty localizedText (the override would render blank — possibly worse than fallback to the catalog default). Format count 122 -> 123. CLI flag count 1283 -> 1288.
This commit is contained in:
parent
2f1cb271a8
commit
73323f0b9d
10 changed files with 752 additions and 0 deletions
|
|
@ -125,6 +125,7 @@ constexpr FormatMagicEntry kFormats[] = {
|
|||
{{'W','C','F','G'}, ".wcfg", "server", "--info-wcfg", "Server config catalog"},
|
||||
{{'W','A','N','V'}, ".wanv", "events", "--info-wanv", "Anniversary & recurring event catalog"},
|
||||
{{'W','P','R','G'}, ".wprg", "pvp", "--info-wprg", "PvP ranking grades catalog"},
|
||||
{{'W','L','A','N'}, ".wlan", "i18n", "--info-wlan", "Localization catalog"},
|
||||
{{'W','F','A','C'}, ".wfac", "factions", nullptr, "Faction catalog"},
|
||||
{{'W','L','C','K'}, ".wlck", "locks", nullptr, "Lock catalog"},
|
||||
{{'W','S','K','L'}, ".wskl", "skills", nullptr, "Skill catalog"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue