Skip to content

Translate the messages that bypassed the language files (depends on #2288) - #2291

Draft
zisunny104 wants to merge 11 commits into
CloudburstMC:masterfrom
zisunny104:fix/untranslated-messages
Draft

zisunny104 wants to merge 11 commits into
CloudburstMC:masterfrom
zisunny104:fix/untranslated-messages

Conversation

@zisunny104

Copy link
Copy Markdown

Draft: depends on #2288. Both PRs change lang/cht/lang.ini (and the English file gets the same keys), so this one will be rebased after #2288 is merged. Until then, expect a conflict in lang/cht/lang.ini.

Several messages never went through the language files: they were English literals in the code, or they asked for a key that does not exist, so players saw the raw key or a %s. This PR moves them to lang/eng/lang.ini and lang/cht/lang.ini.

Code changes

  • Missing or wrong keys: /gamerule, /reload, /me, /op, /deop and /playsound asked for a key that did not exist, so the client showed the key. They now use the key that exists, or a new one.
  • English literals moved to the language files: /status, /gc, /version, /help, /tell, /kill, /tp, /gamemode and /convert.
  • Kick, ban and disconnect texts in Player, BanCommand, BanIpCommand and RakNetPlayerSession are translated with the language of the server, and use the official keys for the whitelist and the disconnect screen.
  • Achievement names are translated with the language of the server (Achievement.getTranslatedMessage).
  • gameMode.changed now gets the game mode as a parameter; the client showed %s without it.
  • /clear reports how many items it removed (inventory, armor and offhand). Before, the count was not filled in.
  • /enchant names the player when the item is missing, and /gamerule no longer prints %s for a bad value.
  • commands.effect.success takes the four values the code passes: "Given {%0} * {%1} to {%2} for {%3} seconds". The Traditional Chinese text of the same key was fixed in Update Traditional Chinese (cht) translation #2288.

Language files

  • 86 keys are added to eng and cht, placed in the group they belong to. eng and cht have the same keys after this PR.
  • Other languages are not touched; they fall back to English for the new keys, like for the existing missing ones.
  • Traditional Chinese wording follows Update Traditional Chinese (cht) translation #2288 and Mojang's official strings where they exist. Kick and ban lines end with !, /status uptime is {%0} 天 {%1} 時 {%2} 分 {%3} 秒, the console is 控制台 and the garbage collector result is 記憶體回收結果.

Testing

  • Compiled the server sources: 0 errors.
  • Ran probe checks that load the language files and call translateString for the new keys (also with the onlyPrefix overload) and compared every {%N} placeholder with the English text.
  • Not tested in a running server by a person yet.

Review

The Traditional Chinese (zh_TW) texts were drafted with the help of an AI assistant (Claude Code). They were then reviewed item by item by a human, a native zh_TW speaker from Taiwan (@zisunny104), and compared with Mojang's official zh_TW strings wherever an official string exists.

Sources


草稿:依賴 #2288。 兩個 PR 都會改到 lang/cht/lang.ini,因此 #2288 合併後這個 PR 會重新 rebase;在那之前 lang/cht/lang.ini 會有衝突。

有些訊息沒有走語言檔:它們是程式裡寫死的英文,或是要求了不存在的 key,玩家看到的是原始 key 或 %s。這個 PR 把它們移到 lang/eng/lang.ini 與 lang/cht/lang.ini。

程式修改

  • 缺少或錯誤的 key: /gamerule、/reload、/me、/op、/deop、/playsound 用了不存在的 key,客戶端會顯示 key 本身;現在改用存在的 key 或新增的 key。
  • 寫死的英文移到語言檔: /status、/gc、/version、/help、/tell、/kill、/tp、/gamemode、/convert。
  • 踢出、封鎖、斷線訊息(Player、BanCommand、BanIpCommand、RakNetPlayerSession)依伺服器語言翻譯,白名單與斷線畫面使用官方 key。
  • 成就名稱依伺服器語言翻譯(Achievement.getTranslatedMessage)。
  • gameMode.changed 補上遊戲模式參數,原本客戶端會顯示 %s。
  • /clear 會回報清除的物品數量(物品欄、護甲、副手),原本沒有帶入數量。
  • /enchant 在沒有物品時會帶入玩家名稱;/gamerule 輸入錯誤數值時不再顯示 %s。
  • commands.effect.success 改為程式實際傳入的四個值。同一個 key 的繁中文字已在 Update Traditional Chinese (cht) translation #2288 修正。

語言檔

  • eng 與 cht 各新增 86 個 key,放在所屬的群組中;本 PR 之後兩者 key 完全一致。
  • 其他語言未修改;新 key 會退回英文,與既有缺少的 key 相同。
  • 繁中用詞與 Update Traditional Chinese (cht) translation #2288 一致,有官方字串時採用 Mojang 官方用詞。踢出與封鎖訊息以「!」結尾,/status 運作時間為 {%0} 天 {%1} 時 {%2} 分 {%3} 秒,主控台稱為 控制台,垃圾回收結果稱為 記憶體回收結果。

測試

  • 已編譯伺服器原始碼:0 個錯誤。
  • 以探測程式載入語言檔並呼叫 translateString(含 onlyPrefix 多載),逐一比對新 key 與英文的 {%N} 佔位符。
  • 尚未由真人在實際伺服器上測試。

審閱

繁體中文(zh_TW)由 AI 助理(Claude Code)協助起草,之後由真人逐項核對,核對者是來自台灣的 zh_TW 母語者(@zisunny104),並在有官方字串時與 Mojang 官方繁中對照。

🤖 Generated with Claude Code

zisunny104 and others added 11 commits October 15, 2026 01:31
- Add 16 missing keys (new potion/effect names, summon, invalid game mode)
- Translate 10 entries that were still in English
- Use the official Minecraft zh_TW wording for effects and death messages
- Use full-width punctuation consistently in Chinese text
- Remove two unused keys that do not exist in the English file

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Use full-width punctuation and 「」 quotes, no spaces next to them
- Use …… for ellipses in sentences
- Replace mainland wording (加載/文件/設置/創建/坐標/數據/檢測/許可/運行/用戶端)
  with 載入/檔案/設定/建立/座標/資料/偵測/授權/執行/客戶端
- Fix mistranslations: item lookup is by name not ID, "implementing" is 實作
- Put a space between Chinese and Latin text or numbers (e.g. ID 為)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Say 玩家 for "player" in every usage string, keep 玩家代號 for "name"
- Fix usage strings that did not say what the English says: /particle takes
  a particle name, /tp has a target and a destination, /give takes tags,
  /enchant takes an enchantment level, /me takes an action
- Keep /banlist ips and players as the words the player has to type
- Use 或 for "OR" everywhere and 數值 for "value"
- Say 伺服器管理員 for operator in the op and deop descriptions
- Fix the whitelist description, it said "the admin allows" instead of
  "manages the list"
- Give the /effect message the values the code passes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Add the keys the commands use but the language files did not have, and fix
  the commands that asked for a different key than the one that exists
  (/gamerule, /reload, /me, /op, /deop, /playsound).
- Move the English literals of /status, /gc, /version, /help, /tell, /kill,
  /tp, /gamemode and /convert to the language files.
- Translate the kick, ban and disconnect texts with the language of the
  server, and use the official keys for the whitelist and disconnect texts.
- Translate the achievement names with the language of the server.
- Pass the game mode to gameMode.changed, the client showed "%s" without it.
- /clear reports how many items it removed, /enchant names the player when
  the item is missing, and /gamerule no longer prints "%s" for a bad value.
- Fix the placeholders of commands.effect.success and add the Traditional
  Chinese texts, the Minecraft strings are the official ones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve cht/lang.ini: use the wording of the translation update for keys
that exist in both branches, keep the keys that only this branch adds, and
write the ellipsis in flyPig as three dots like the rest of the file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant