Skip to content

fix(i18n): correct scattered wrong French translations and add 2 missing keys - #454

Merged
h-a-n-a-s-h-i merged 3 commits into
storytold:mainfrom
Dejan-Port:fix-french-header-footer
Oct 13, 2026
Merged

h-a-n-a-s-h-i merged 3 commits into
storytold:mainfrom
Dejan-Port:fix-french-header-footer

Conversation

@Dejan-Port

Copy link
Copy Markdown
Contributor

Summary

While fixing the translations_are_unique_and_preserve_unknown_text failure flagged by CI on #453 (missing French: Different First Page), I found that the missing key was only the visible symptom of something bigger.

The obvious part: fr.rs was genuinely missing two keys entirely — "Different First Page" and "Different Odd & Even Pages".

The part the test doesn't catch: roughly 50 other keys were present (so the completeness test, which only checks "a translation exists and is non-empty", passed for them) but mapped to the wrong value — the French translation of a completely different English string.

Examples (key → previous wrong value → what that value actually means):

Key Was mapped to Which actually means
"Click to add data" "Fermer" Close
"Header" "Informations" Info
"Ruler" "Enregistrer sous" Save As
"Info" "Insérer les cellules copiées…" Insert Copied Cells…
"Animations" "Auteur" Author
"Auto" "Retour" Back
"Previous Comment" "Imprimer tout le classeur" Print Entire Workbook

This isn't a local shuffle (adjacent keys swapped with each other) — "Info"'s wrong value belongs to a key near the start of the 381-entry list, while "Info" itself is near the end, so whatever produced this drew values from unrelated, scattered positions across the whole file. Given the extent, and that it clearly wasn't contained to one contiguous block, I didn't think patching individual lines was safe — I could easily have missed more of them. So this regenerates all 381 entries from the English source text directly (same source list the Serbian PR, #453, used) rather than auditing the existing file line by line.

Test plan

  • translations_are_unique_and_preserve_unknown_text passes end to end now (it fails on a clean main checkout before this change, from the 2 missing keys alone — the ~50 wrong-but-present values were invisible to it).
  • Full cargo test -p gridcraft-ui-egui --lib: 75/75 (74/75 on main).
  • cargo fmt --all -- --check.

🤖 Generated with Claude Code

…ing keys

The completeness test's failure (missing "Different First Page") was
only the visible tip: fr.rs was missing that key and "Different Odd &
Even Pages" outright, but also had roughly 50 *present* keys mapped to
the wrong value — reading as a real, different English string's French
translation instead of its own. The completeness test only checks that
a translation exists and is non-empty, not that it's correct, so none
of this was caught before.

Examples found by inspection (key => previous wrong value => what that
value actually means):
  "Click to add data"  => "Fermer"                        (= Close)
  "Header"              => "Informations"                  (= Info)
  "Ruler"                => "Enregistrer sous"              (= Save As)
  "Info"                 => "Insérer les cellules copiées…" (= Insert Copied Cells…)
  "Animations"          => "Auteur"                        (= Author)
  "Auto"                 => "Retour"                        (= Back)
  "Previous Comment"    => "Imprimer tout le classeur"      (= Print Entire Workbook)

The wrong values aren't a local shuffle (adjacent keys swapped) — "Info"
drew a value that belongs near the start of the key list while "Info"
itself is near the end, so whatever produced this scattered entries
from unrelated parts of the file onto each other. Given the extent and
that it wasn't contained to one block, patching individual lines risked
missing more of them, so this regenerates every one of the 381 entries
from the English source text (same source list i18n-serbian used),
rather than auditing the existing file entry by entry.

Verified: the existing completeness test (translations_are_unique_...)
now passes end to end — it was failing on a clean main checkout before
this change, purely from the 2 missing keys. Full cargo test -p
gridcraft-ui-egui --lib: 75/75 (was 74/75 on main).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pechnikov2026-star

Copy link
Copy Markdown

thank you very much. Claude wrote some rather messy code after updating the main branch and loading new translation cells in the assembler.

This was referenced Oct 12, 2026
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 467b209 into storytold:main Oct 13, 2026
1 check passed
@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Merged — thank you @Dejan-Port for the contribution!

I merged main into the branch and dropped the two header/footer keys main had meanwhile added (they became duplicate match arms).

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.

5 participants