Skip to content

feat(i18n): add Italian (it) UI localization - #352

Open
ktfnz4ynbs-arco wants to merge 2 commits into
storytold:mainfrom
ktfnz4ynbs-arco:i18n-italian
Open

ktfnz4ynbs-arco wants to merge 2 commits into
storytold:mainfrom
ktfnz4ynbs-arco:i18n-italian

Conversation

@ktfnz4ynbs-arco

@ktfnz4ynbs-arco ktfnz4ynbs-arco commented Nov 30, 2026 •

Copy link
Copy Markdown

MaterialCraft can now be used in Italian: Preferences ▸ General ▸ Language lists Italiano, and a first run on an Italian system starts in Italian.

What they saw: the only languages were English and Arabic; an Italian system got English.

What changed:

  • crates/ui-egui/src/i18n/it.rs (new): 800 rows. They cover every key the Arabic table translates (711) plus 89 strings the code passes to tr/trf/n_ that no table had yet (library favorites, expose-parameter dialog, wire menu, function graph warnings, web save, unsaved-changes dialog…). Written from the meaning of the English, informal "tu"; terms: grafo, nodo, pacchetto, output/input, anteprima, miniatura, mesh, cornice, puntina di navigazione.
  • crates/ui-egui/src/i18n.rs: it registered in LANGUAGES, so language_for_locale picks it for it-* locales; the duplicate-key and placeholder tests now run over every table, plus a test that Italian covers every Arabic key.
  • Test builds start in English: os_language returns en under cfg(test) or the new test-support feature, which the crate's own integration tests enable through a self dev-dependency (Cargo.toml, Cargo.lock). Without this, the default Prefs take the system language, and on an Italian machine 61 UI tests that look for English labels ("Open...") failed once Italian existed. EffectCraft does the same for its tests (#3244 there).
  • No open Italian PR or issue for MaterialCraft (searched storytold/materialcraft and storytold/craft-i18n).

Tests: locale_detection gains it-IT and it_CH.UTF-8, which fail without this change (they returned en).

Verification:

  • cargo fmt --all --check: passed.
  • cargo clippy -p materialcraft-ui-egui --all-targets -- -D warnings: passed.
  • cargo xtask layers: passed.
  • cargo test -p materialcraft-ui-egui --release --no-fail-fast: lib 317 passed, 3 failed; tests/it 78 passed; the other test binaries passed. The 3 failures (graph::canvas_tests::clicking_a_node_shows_it_in_the_2d_view, graph::canvas_tests::ctrl_click_that_deselects_a_node_does_not_show_it, native_dialogs::tests::export_dialogs_keep_native_non_utf8_destinations) also fail on unmodified main on this machine (macOS), so they are not caused by this change. Not run on Linux; CI will show.
  • Not run: cargo xtask wasm, the engine panic sweep and every_node_cooks (no engine or node code changed); not checked in the running app or browser.

AI-assisted (Claude Code); not recorded as native-reviewed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Italian as a supported interface language, with translations for labels, messages, descriptions, and prompts.
    • Italian is available in language settings and can be selected when the system locale is Italian.
  • Tests
    • Expanded translation checks across supported languages to verify key coverage and consistent use of variable placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The UI localization registry now includes Italian translations. Translation-table tests check all registered languages. Unit tests and builds with the test-support feature use English for language selection.

Changes: UI localization

Layer / File(s) Summary
Register and validate Italian
crates/ui-egui/src/i18n.rs, crates/ui-egui/src/i18n/it.rs, docs/localization-parity.md
The language registry adds Italian and its translation table. Locale documentation, translation-table tests, and localization status documentation include Italian. Tests also check duplicate keys and placeholder matching across registered languages.
Set test language to English
crates/ui-egui/Cargo.toml, crates/ui-egui/src/i18n.rs
The crate adds the test-support feature and enables it for integration-test builds. Unit tests and builds with the feature use English for language selection.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related issues

  • Issue 92 requests multi-language interface support. This PR adds Italian UI localization, addressing part of the request.
  • Issue 210 requests moving UI translations into craft-i18n catalogs. This PR adds an Italian Rust translation table but does not migrate existing tables or use craft-i18n.

Suggested reviewers: bflatastic

Merge Risk: Minimal · up to 33544 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(i18n): add Italian (it) UI localization" matches the main change. The PR adds an Italian UI translation table, registers Italian in LANGUAGES, and updates the localization docs. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(i18n): add Italian (it) UI localization" matches the main change. The PR adds an Italian UI translation table, registers Italian in LANGUAGES, and updates the localization docs. The title is specific and concise, and it follows a conventional-commit style.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a4f628c and 3354497.

Files selected for processing: 1

  • docs/localization-parity.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@vangel76 vangel76 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I checked Italian language selection, the catalog keys and placeholders, and the published language matrix.

Source review only. I did not build the project, run tests, or check CI.

pub static LANGUAGES: [Language; COUNT] = [
Language { code: "en", name: "English", english: "English", table: &[] },
Language { code: "ar", name: "العربية", english: "Arabic", table: ar::TABLE },
Language { code: "it", name: "Italiano", english: "Italian", table: it::TABLE },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3. List Italian as supported in the localization matrix. This registration now offers Italiano in the picker and at startup, but docs/localization-parity.md still lists it as “Not started.” Give Italian its own supported row and update the overview so users and contributors see the current status.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in 3354497: docs/localization-parity.md now gives Italian its own Complete row, and the overview and revision history say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants