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
|
|
@ -2475,6 +2475,16 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Export binary .wprg to a human-editable JSON sidecar (defaults to <base>.wprg.json; emits factionFilter as both int AND name string)\n");
|
||||
std::printf(" --import-wprg-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wprg.json sidecar back into binary .wprg (factionFilter int OR \"alliance\"/\"horde\"; titlePrefix as plain string)\n");
|
||||
std::printf(" --gen-lan <wlan-base> [name]\n");
|
||||
std::printf(" Emit .wlan 5 UI-button localizations (the 'Cancel' button translated to deDE/frFR/esES/koKR/zhCN — multibyte UTF-8 round-trip preserved)\n");
|
||||
std::printf(" --gen-lan-quest <wlan-base> [name]\n");
|
||||
std::printf(" Emit .wlan 3 quest-title localizations (one quest title in deDE/frFR/koKR — illustrates dotted-key convention 'QUEST.123.title')\n");
|
||||
std::printf(" --gen-lan-tooltip <wlan-base> [name]\n");
|
||||
std::printf(" Emit .wlan 4 item-tooltip strings (BindOnPickup + Unique in deDE+frFR — high-volume client localization use case)\n");
|
||||
std::printf(" --info-wlan <wlan-base> [--json]\n");
|
||||
std::printf(" Print WLAN entries (id / language / namespace / original key / localized text)\n");
|
||||
std::printf(" --validate-wlan <wlan-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+originalKey required, languageCode 0..10 OR 255 Unknown, namespace 0..7, no duplicate stringIds, no two entries with same (originalKey, languageCode, namespace) triple (locale lookup tie); warns on empty localizedText (override would render blank, possibly worse than fallback)\n");
|
||||
std::printf(" --catalog-pluck <wXXX-file> <id> [--json]\n");
|
||||
std::printf(" Extract one entry by id from any registered catalog format. Auto-detects magic, dispatches to the per-format --info-* handler internally, then prints just the matching entry. Primary-key field is auto-detected (first *Id field, or first numeric)\n");
|
||||
std::printf(" --catalog-find <directory> <id> [--magic <WXXX>] [--json]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue