Repository navigation
fix(i18n): translate the messages that only existed in English - #567
Merged
Merged
Conversation
- 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 cooklang#318. - The 18 editor-toolbar-* messages cooklang#540 added to every locale but it-IT, which was merged (cooklang#543) while cooklang#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 cooklang#566. Co-Authored-By: Claude Opus 5.5 <[email protected]>
LeMyst
marked this pull request as ready for review
September 28, 2026 18:05
This was referenced Sep 28, 2026
LeMyst
added a commit
that referenced
this pull request
Sep 28, 2026
#563 (2c82f28) and #567 (347e0e2) each added `error-title` and `error-back-home`, under the same `# Errors` block, to the common.ftl of de-DE, es-ES, eu-ES, fr-FR and nl-NL, and merged seconds apart. Fluent refuses a bundle that defines a message twice, so since 347e0e2 every page the server renders panics ("Overriding { kind: Message, id: "error-title" }") and the tests using translations fail with it. The two copies are identical; keep the first. tests/locales_test.rs gains a check that no locale defines a message twice, across all its files, and names each one — rather than leaving dozens of unrelated tests to panic on a poisoned loader. Co-authored-by: myst <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #566.
Adds the messages that existed only in en-US, so these pages no longer fall back to English partway through:
error-titleanderror-back-home(the error page's heading and "Back to recipes" link) in de-DE, es-ES, eu-ES, fr-FR and nl-NL. Missing since dec59f1.shopping-include-in-list(tooltip on the recipe page's include-in-list checkboxes) in de-DE, es-ES, eu-ES, fr-FR, nl-NL and sv-SE. Missing since feat: migrate shopping list to new format with checked state #318.editor-toolbar-*messages that feat(ui): Cooklang toolbar above the recipe editor #540 added everywhere except it-IT, whose locale (feat(i18n): add Italian translation #543) was merged while feat(ui): Cooklang toolbar above the recipe editor #540 was still open.Each translation uses the wording its locale already has: its word for the shopping list, "Retour" / "Zurück" / … like
action-back, and in Italian "Utensili"/"Timer"/"Sezione" as on the recipe and pantry pages.Keeping it that way
tests/locales_test.rscompares each locale with en-US, file by file, and fails with a list oflocale/file: missing ids. Before this PR it fails on upstream main with exactly the gaps above.A new locale, or a branch that adds strings, now has to translate them all. Leaving one in English on purpose means copying the English text, which at least puts the choice on the page.
Overlap with #563
#563 adds the same
error-title/error-back-hometranslations, after its newrole-forbiddenline, because its403page is where the gap showed up. The two PRs touch the same few lines, so whichever merges second will need a rebase that keeps the lines once.Checks
cargo test --test locales_testpasses on this branch. With upstream main'slocales/restored, it fails and lists the de/es/eu/fr/nl error messages, the sixshopping-include-in-listgaps and the 18 Italian toolbar messages.cargo fmt --checkandcargo clippy --all-targetsare clean, with no warnings, and the fullcargo testrun has 0 failures.🤖 Generated with Claude Code