feat(editor): add WLAN JSON round-trip (--export/--import-wlan-json)

Dual encoding for both WLAN enums via the readEnumField
template: languageCode (int 0..10 OR token "enUS" /
"enGB" / "deDE" / "esES" / "frFR" / "itIT" / "koKR" /
"ptBR" / "ruRU" / "zhCN" / "zhTW") and namespace (int
0..7 OR token "ui" / "quest" / "item" / "spell" /
"creature" / "tooltip" / "gossip" / "system").

UTF-8 round-trip preserved through JSON: nlohmann::json
escapes multibyte sequences as \uXXXX surrogate pairs
on export and decodes them back to bytes on import,
producing byte-identical binary output. The Korean
"취소" and Chinese "取消" UI translations from the
preset round-trip cleanly through the binary -> JSON ->
binary cycle.

All 3 presets (ui-basics / quest-sample / tooltip-set)
byte-identical roundtrip OK including the multibyte
strings. CLI flag count 1288 -> 1290.
This commit is contained in:
Kelsi 2026-05-10 03:14:52 -07:00
parent 73323f0b9d
commit cef571bb45
3 changed files with 190 additions and 0 deletions

View file

@ -379,6 +379,7 @@ const char* const kArgRequired[] = {
"--export-wprg-json", "--import-wprg-json",
"--gen-lan", "--gen-lan-quest", "--gen-lan-tooltip",
"--info-wlan", "--validate-wlan",
"--export-wlan-json", "--import-wlan-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",