Skip to content

i18n: add French and German interfaces - #366

Closed
pechnikov2026-star wants to merge 1 commit into
storytold:mainfrom
pechnikov2026-star:i18n-fr-de
Closed

pechnikov2026-star wants to merge 1 commit into
storytold:mainfrom
pechnikov2026-star:i18n-fr-de

Conversation

@pechnikov2026-star

Copy link
Copy Markdown

Summary

Adds two complete interface catalogs for GridCraft: French (fr) and German (de) — 266 entries each covering every JAPANESE key (the coverage reference), generated in the ru.rs module style.

Changes

  • crates/ui-egui/src/i18n/{fr,de}.rs — new translate() modules
  • crates/ui-egui/src/i18n.rs — mod de/fr;, Language::{Fr,De} variants (ALL 7 → 9, names, codes, tag parsing), tr() arms, and the uniqueness/coverage test extended to both
  • i18n.rs test tags_reduce_to_a_supported_language used de-DE as the example of a language without a catalog — now fr-FR/de-DE resolve and Italian stands in as the unsupported example

Translation notes

  • Microsoft Excel terminology per locale: worksheet → Feuille / Arbeitsblatt, freeze panes → Figer les volets / Fixieren, PivotTable → Tableau croisé dynamique / PivotTable, Flash Fill → «Blitzvorschau» (official MS de term)
  • The two Context|Label keys (Page Layout|Orientation, Sheet Options|View) carry plain labels as values, matching how the English fallback renders them
  • Literal \n-escape keys (e.g. the two-line Top\nAlign button) verified to resolve identically to the Japanese reference

Testing

  • cargo test -p gridcraft-ui-egui --lib: 21 passed, 0 failed (coverage loop now asserts fr/de translate every JAPANESE key)

Two new 266-entry catalogs (fr, de) covering every JAPANESE key,
registered in the Language enum (ALL, names, codes, tag parsing) and
the tr() dispatch. Locale-resolution test updated: fr-FR/de-DE now
resolve; Italian, which has no catalog, stands in as the unsupported
example.
@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
Member

Thank you for the French translation! A few things before it can land:

  1. German already landed in Add German (de) interface language #271 (crates/ui-egui/src/i18n/de.rs, now ~370 keys), so please drop the German part of this PR.
  2. Main has moved on: Language/ALL now include Spanish and Czech, so this needs a rebase onto current main.
  3. Main's i18n coverage test requires every interface string in every language; after rebasing, French will be missing ~106 of the newer keys (Backstage, Page Layout, Solver, comment navigation, etc.). The test translations_are_unique_and_preserve_unknown_text lists them.
  4. What is the /out-i18n/ .gitignore line for? If it's tooling-local, please leave it out.

Keeping just fr.rs plus the Fr variant, complete, would be great.

If you haven't already, come join us on the ArtCraft Discord: https://discord.gg/artcraft

@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
Member

Superseded by #413 (French only), which has been merged. Thank you! Join us on Discord: https://discord.gg/artcraft

@echelon echelon closed this Oct 11, 2026
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