mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
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.
12 lines
238 B
C++
12 lines
238 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
bool handleLocalizationCatalog(int& i, int argc, char** argv,
|
|
int& outRc);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|