Skip to content

i18n: add Serbian (Latin script) interface translations - #453

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Dejan-Port:i18n-serbian
Oct 13, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Dejan-Port:i18n-serbian

Conversation

@Dejan-Port

Copy link
Copy Markdown
Contributor

Summary

Requested in #143. Adds Language::Sr ("sr"), following the existing per-language module pattern: crates/ui-egui/src/i18n/sr.rs with translate(text: &str) -> Option<&'static str>, wired into the Language enum (ALL, name, code, from_tag, tr).

All 381 strings in the JAPANESE master list are covered, verified by the existing translations_are_unique_and_preserve_unknown_text completeness test (now also checks Serbian).

Script: Latin (sr-Latn), ekavian dialect — the common default for digital/software Serbian (what Windows, most Serbian software and most speakers' own typing default to). Cyrillic (sr-Cyrl) could follow as its own variant if wanted; this keeps the PR to one script, matching how every other language here is a single variant rather than per-script.

Test plan

  • translations_are_unique_and_preserve_unknown_text — passes for Serbian (all 381 keys present, uniqueness, context|label disambiguation, Sheet1!A1-style text left untranslated).
  • New spot-check assertions: Language::Sr.tr("Data"), .tr("Page Layout|Orientation") vs plain .tr("Orientation").
  • tags_reduce_to_a_supported_language — sr-Latn-RS, sr-RS, and bare sr all resolve to Language::Sr.
  • cargo fmt --all -- --check, cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings.
  • Full cargo test -p gridcraft-ui-egui --lib: 74/75 pass. The one failure (missing French: Different First Page) is pre-existing on a clean main checkout with none of this branch's changes — confirmed separately, unrelated to Serbian.

🤖 Generated with Claude Code

Adds Language::Sr ("sr"), following the existing per-language module
pattern (crates/ui-egui/src/i18n/<lang>.rs with a translate(text) ->
Option<&'static str>). All 381 strings in the JAPANESE master list are
covered, verified by the existing completeness test.

Latin script (sr-Latn), ekavian dialect — the common default for
digital/software Serbian. Cyrillic (sr-Cyrl) could follow as a
separate variant if wanted; this keeps the PR to one script, matching
how every other language here is a single variant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit ed971d8 into storytold:main Oct 13, 2026
1 check failed
@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

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

vangel76 added a commit to vangel76/gridcraft that referenced this pull request Oct 13, 2026
Keep the audit's corrections and add what main merged meanwhile (storytold#727, storytold#528, storytold#833, storytold#792/storytold#794, storytold#785/storytold#786, storytold#840, storytold#453, storytold#739, storytold#652); landed PRs no longer listed as open; one Last updated line per doc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@devius devius mentioned this pull request Oct 14, 2026
1 of 3 tasks
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.

4 participants