Repository navigation
fix(i18n): drop the error page strings defined twice - #579
Merged
Merged
Conversation
cooklang#563 (2c82f28) and cooklang#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: 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 #578.
mainis broken: every page the server renders panics, and the Test workflow fails. This PR is independent of the CI stack (#569…#577) and based directly onmain, so it can merge first.What changes
# Errorsblock (error-title,error-back-home) fromcommon.ftlin de-DE, es-ES, eu-ES, fr-FR and nl-NL. feat(server): reader / shopper / editor / admin roles for signed-in users #563 and fix(i18n): translate the messages that only existed in English #567 each added it; both copies are identical, and the first one is kept.tests/locales_test.rsgainsno_locale_defines_a_message_twice. It looks across all of a locale's files, since they load as one bundle, and names every repeat. Before, the only signal was dozens of unrelated tests panicking on a poisoned loader, with the cause buried in one of them. The existing id reader was split so both tests share it.Testing
main, it fails with:cargo fmt --check,cargo clippy --workspace --all-targets --all-features -- -D warnings, andcargo test --workspace(every suite, 0 failures). That includes theservings_testsandtr_teststhat fail onmain.Preventing a repeat
Both PRs were green on their own, and the break only appeared once both were on
main. Branch protection's "Require branches to be up to date before merging", or a merge queue, would have run CI on the combination first.🤖 Generated with Claude Code