Skip to content

fix(i18n): JTAC radio messages go through ctld.tr and the guard recognises the alias - #269

Merged
FullGas1 merged 2 commits into
developfrom
fix/i18n-translate-alias
Oct 20, 2026
Merged

FullGas1 merged 2 commits into
developfrom
fix/i18n-translate-alias

Conversation

@FullGas1

Copy link
Copy Markdown
Collaborator

Summary

Lot FIX-I18N-TRANSLATE-ALIAS, closes #265. ctld.i18n_translate is an alias of ctld.tr, but the dictionary generator (hence the i18n-guard job and the pre-push hook, which run it) only scans for the literal ctld.tr(. CTLD_jtac.lua called the alias 16 times: those 16 keys were in no English dictionary (13 of them in none at all), so every JTAC radio call came out in English on a French, Spanish or Korean server, with lasing / standing by on inserted in the middle of a translated sentence.

Decided with the maintainer: replace the alias in src/, check it has no caller left, and keep it supported for scripts outside the repository.

  • the 16 calls of the JTAC module now go through ctld.tr; src/ has no caller of the alias left (checked by search of src/, tools/, tests/, docs/);
  • the alias stays defined in CTLD_i18n.lua (comment updated) and the generator's scan now matches both names, so a key written through the alias still reaches the dictionaries;
  • the 16 keys are added to the four dictionaries by the build (translation_version 1.27 → 1.28) and translated FR / ES / KO — my translations, to review; the radio sentences insert a verb (lasing / standing by on) and a target type, so the word order of a few of them differs from the English one;
  • a new spec checks that every literal key passed to ctld.tr or to the alias in src/ is a key of the English dictionary (it failed on the 16 JTAC keys before the change);
  • i18n developer page (EN + FR) updated.

Test plan

  • new spec i18n_source_keys_spec: failed on the 16 JTAC keys before the change, passes after
  • busted over tests/ci/* — 0 failures; luacheck on src/ — 0 warnings
  • dictionaries regenerated by merge_CTLD.ps1; the translations survive a rebuild
  • CI

🤖 Generated with Claude Code

…nises the alias

Closes #265

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@FullGas1
FullGas1 requested a review from davidp57 as a code owner October 20, 2026 09:39
…ATE-ALIAS entry

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@FullGas1
FullGas1 merged commit 422386e into develop Oct 20, 2026
10 checks passed
@FullGas1
FullGas1 deleted the fix/i18n-translate-alias branch October 20, 2026 09:43
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.

ctld.i18n_translate escapes the i18n guard: 13 of the 16 JTAC radio messages are missing from all four dictionaries

1 participant