fix(messages): repair message file defects and complete zh/nl localization - #83
Open
wangzhizhou wants to merge 3 commits into
Open
fix(messages): repair message file defects and complete zh/nl localization#83wangzhizhou wants to merge 3 commits into
wangzhizhou wants to merge 3 commits into
Conversation
Merge duplicated shop.common blocks in messages_zh.yml and messages_nl.yml (8 keys were silently dropped, falling back to English), remove a stray duplicate player-shops.messages key in messages_es.yml, and relocate the Dutch player-shop message keys from the malformed hooks block to player-shops.messages. Add a strict SnakeYAML regression test that fails on any duplicate key in the bundled messages_*.yml files.
Translate ~130 live keys from English to Chinese across shop UI, stock GUI, daily rotations and commands; add missing live keys (stock-admin, reload messages, food.item-note, valuables.experience-bottle-display-name) and fix two upstream structural bugs in the zh file: - shop.shop.rotations double-nesting -> shop.rotations - see-all.lore defined as a list, but stock-gui.yml references see-all.lore.line1/line2 -> convert to a line1/line2 map zh now covers 327 keys; only inert sections remain untranslated (player-shops chat messages and setup-shops GUI are Java defaults).
messages_nl.yml had the same two structural bugs as messages_zh.yml previously, plus missing live keys referenced by stock-gui.yml translate macros (which would render empty in Dutch): - shop.shop.rotations double-nesting -> shop.rotations - see-all.lore defined as a list, but stock-gui.yml references see-all.lore.line1/line2 -> convert to line1/line2 map - add missing shop.stock.gui keys: localization.item-price-format / item-blocked / item-frozen / no-items, filters.*, pagination.* en/es were already correct; this brings nl to full live-key coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #80 and delivers the Chinese localization tracked in #81 — repairs duplicate keys, structural defects, and missing live keys in
messages_zh.yml/messages_nl.yml, and completes the zh translation for all strings that actually render in-game.Commits
fix(messages): remove duplicate YAML keys across message files— merges the duplicatedshop.commonblocks in zh/nl (SnakeYAML kept only the last block, silently dropping 8 keys and loggingduplicate keys found : common); adds regression testMessageFilesDuplicateKeyTestthat parses all fourmessages_*.ymlfiles in strict mode (allowDuplicateKeys = false).fix(messages): fully localize messages_zh.yml— translates ~130 live keys (those referenced by{translate:...}macros inconfig.yml/stock-gui.yml/shop.yml); adds missing live keys (commands.reload-*,commands.stock-admin.*,shop.categories.food.item-note,valuables.experience-bottle-display-name, stock-GUI localization); fixesshop.shop.rotations→shop.rotationsandsee-all.lorelist →line1/line2map.fix(messages): align messages_nl.yml with en structure— same structural fixes for nl, plus the missingshop.stock.guikeys (filters.*,pagination.*,localization.item-*).Scope note
Only strings that flow through the message system are included. Java-hardcoded strings (e.g.
PlayerShopMessagesdefaults, setup-shop GUI) are intentionally untouched.Testing
MessageFilesDuplicateKeyTest— strict parse of all four message files, passes.Closes #80
Closes #81