Skip to content

feat(i18n): add Italian translation - #543

Merged
LeMyst merged 1 commit into
cooklang:mainfrom
LeMyst:feat/italian-translation
Sep 26, 2026
Merged

LeMyst merged 1 commit into
cooklang:mainfrom
LeMyst:feat/italian-translation

Conversation

@LeMyst

@LeMyst LeMyst commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds Italian (it-IT) to the web UI languages.

  • locales/it-IT/*.ftl — every message in en-US translated (same ids in all five files, plurals via [one] / *[other]).
  • src/web/language.rs — IT_IT added to SUPPORTED_LANGUAGES, so Accept-Language: it, the lang cookie, an it_IT.UTF-8 system locale and cook build web --lang it all resolve to Italian. New test for the POSIX locale case.
  • templates/preferences.html — 🇮🇹 Italiano button in the language picker.
  • src/build/mod.rs, docs/build.md, docs/server.md — it-IT listed among the supported languages.

A few wording choices, open to native-speaker review:

  • Actions use the imperative (Aggiungi, Salva, Elimina), as most Italian software does.
  • Aisles are reparti, pantry is dispensa, cookware is utensili.
  • Sort options read Data di modifica / Data di creazione so "Modified" doesn't collide with the Modifica (Edit) action.
  • pref-version-text keeps the "in food we trust" tagline in English, like the other locales.

Note: #540 adds 20 editor-toolbar messages to every locale. Whichever of the two lands second, the Italian toolbar strings will need adding (they fall back to English until then).

Test plan

  • cargo fmt --check, cargo clippy --all-targets (no warnings), cargo test (all green, incl. test_system_locale_italian)
  • Message ids of it-IT match en-US file by file
  • cook build web --base-path ./seed --lang it renders <html lang="it-IT"> with Italian labels
  • Review by a native Italian speaker

🤖 Generated with Claude Code

Adds an it-IT locale covering every message in en-US, registers it in
SUPPORTED_LANGUAGES so Accept-Language, the lang cookie, the system
locale and `cook build web --lang it` all resolve to it, and adds an
Italiano button to the language picker in preferences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@LeMyst
LeMyst marked this pull request as ready for review September 26, 2026 09:02
@LeMyst
LeMyst merged commit 61a3a18 into cooklang:main Sep 26, 2026
6 checks passed
LeMyst added a commit to LeMyst/cookcli that referenced this pull request Sep 27, 2026
Resolve the edit_page conflict with cooklang#550: keep its recipe_file() lookup,
which already rules out a missing file path, and pass the viewer through
to the error page. Add the sign-in strings to the Italian locale that
arrived with cooklang#543.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
LeMyst added a commit that referenced this pull request Sep 28, 2026
- error-title and error-back-home in de-DE, es-ES, eu-ES, fr-FR and
  nl-NL, missing since dec59f1 added the error page.
- shopping-include-in-list in de-DE, es-ES, eu-ES, fr-FR, nl-NL and
  sv-SE, missing since #318.
- The 18 editor-toolbar-* messages #540 added to every locale but it-IT,
  which was merged (#543) while #540 was open.

Fluent falls back to en-US for a missing message, so nothing failed and
the pages came out half in English. tests/locales_test.rs now fails when
a locale lacks a message en-US has, naming the locale, file and ids.

Closes #566.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant