Skip to content

Localization: backfill missing locale keys + parity guard test#283

Open
vanzue wants to merge 2 commits into
mainfrom
dev/vanzue/locale-parity
Open

Localization: backfill missing locale keys + parity guard test#283
vanzue wants to merge 2 commits into
mainfrom
dev/vanzue/locale-parity

Conversation

@vanzue

@vanzue vanzue commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Splits the localization fix out of the test-suite PR (#279) into its own change.

What

A key-parity scan found that commands.fix.summary (the /fix slash-command description) was missing from all 88 non-en-US locale files, and six other commands.*.summary keys lagged in a subset. At runtime rust-i18n falls back to the raw key string, so those locales would show commands.fix.summary to the user.

Changes

  • Backfill every tools/wta/locales/*.yml to full key-parity with en-US.yml (428 entries across 88 files). Real translations for major languages; English placeholders for the long tail (to be refined by the loc pipeline). {Locked} tokens and %{...} placeholders preserved.
  • Guard test locale_parity_tests.rs (every_locale_has_all_en_us_keys): asserts every en-US key exists in every locale, so this regression cannot ship again.

Verification

cargo test --manifest-path tools/wta/Cargo.toml locale_parity → passes (0 of 88 locales missing any key).

vanzue and others added 2 commits June 12, 2026 16:21
commands.fix.summary was missing from all 88 non-en-US locales; the other
slash-command summaries (help/clear/new/restart/stop/sessions) lagged in a
subset. Backfill every locale to full key-parity with en-US.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ales)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 12, 2026 08:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a localization regression in the WTA (tools/wta) rust-i18n catalog by backfilling missing slash-command summary keys across non-en-US locale YAML files, and adds a Rust unit test to prevent locale key drift from shipping again.

Changes:

  • Backfilled commands.fix.summary (and related commands.*.summary parity) across tools/wta/locales/*.yml so locales don’t fall back to showing raw key strings at runtime.
  • Added a locale key-parity unit test that asserts every non-en-US locale contains all keys present in en-US.yml.
  • Wired the new test module into the WTA crate under cfg(test).

Reviewed changes

Copilot reviewed 90 out of 90 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/wta/src/main.rs Includes the locale parity test module under cfg(test).
tools/wta/src/locale_parity_tests.rs Adds dependency-free key-parity unit test comparing all locales against en-US.yml.
tools/wta/locales/zh-TW.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/zh-CN.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/vi-VN.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/uz-Latn-UZ.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/ur-PK.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/uk-UA.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/ug-CN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/tt-RU.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/tr-TR.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/th-TH.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/te-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/ta-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/sv-SE.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/sr-Latn-RS.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/sr-Cyrl-RS.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/sr-Cyrl-BA.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/sq-AL.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/sl-SI.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/sk-SK.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/ru-RU.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/ro-RO.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/quz-PE.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/qps-plocm.yml Adds missing pseudo-loc commands.fix.summary + {Locked} tokens.
tools/wta/locales/qps-ploca.yml Adds missing pseudo-loc commands.fix.summary + {Locked} tokens.
tools/wta/locales/qps-ploc.yml Adds missing pseudo-loc commands.fix.summary + {Locked} tokens.
tools/wta/locales/pt-PT.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/pt-BR.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/pl-PL.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/pa-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/or-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/nn-NO.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/nl-NL.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/ne-NP.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/nb-NO.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/mt-MT.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/ms-MY.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/mr-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/ml-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/mk-MK.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/mi-NZ.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/km-KH.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/kn-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/ko-KR.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/kok-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/lb-LU.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/lo-LA.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/lt-LT.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/lv-LV.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/ja-JP.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/it-IT.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/is-IS.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/id-ID.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/hy-AM.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/hu-HU.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/hr-HR.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/hi-IN.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/he-IL.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/gu-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/gl-ES.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/gd-gb.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/ga-IE.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/fr-FR.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/fr-CA.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/fil-PH.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/fi-FI.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/fa-IR.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/eu-ES.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/et-EE.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/es-MX.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/es-ES.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/en-GB.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/el-GR.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/de-DE.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/da-DK.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/cy-GB.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/cs-CZ.yml Adds missing commands.fix.summary translation + {Locked} tokens.
tools/wta/locales/ca-ES.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/ca-Es-VALENCIA.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/bs-Latn-BA.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/bn-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/bg-BG.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/az-Latn-AZ.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/as-IN.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/ar-SA.yml Adds missing commands.fix.summary (English placeholder) + {Locked} tokens.
tools/wta/locales/am-ET.yml Backfills slash-command summary keys section including commands.fix.summary.
tools/wta/locales/af-ZA.yml Backfills slash-command summary keys section including commands.fix.summary.

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.

3 participants