Repository navigation
fix(editor): show the save status in the page's language - #813
Merged
Merged
Conversation
The editor's save status (Modified, Saving..., Saved, Save failed, and since cooklang#809 "Not saved: renamed or deleted elsewhere") and its save notices were written in English in the template, whatever the page's language. Three of them already had messages in every locale, unused. The status and the notices now come from the locales: the existing `editor-unsaved-changes`, `editor-saving`, `editor-saved` and `editor-save-failed`, and new `editor-not-saved-gone`, `editor-save-failed-detail` and `editor-file-gone` in all nine. The refusal of a file renamed or deleted elsewhere is explained in the page's words instead of the server's English message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmrM91dHzvQoaerCcR9wra
LeMyst
marked this pull request as ready for review
November 1, 2026 21:46
LeMyst
pushed a commit
that referenced
this pull request
Nov 4, 2026
Add the three editor save-status messages from #813, which merged right after the Greek locale and left the locale test failing. Re-encode the 8 pantry/shopping lines that were saved double-encoded, and apply the wording suggestions from the #781 review. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 #812
The editor's save status and save pop-ups now follow the site's language.
edit.htmlgathers them in onesaveTextobject filled from the locales, likerenameMessages:editor-unsaved-changes(replacing "Modified"),editor-saving,editor-saved,editor-save-failed;editor-not-saved-gone(the status after fix(editor): never write back a recipe renamed or deleted in another tab #809's refusal),editor-save-failed-detail("Save failed: %s"), andeditor-file-gone, the pop-up for a file renamed or deleted elsewhere. That one replaces the server's English error text.console.errorlines stay in English; they're for developers.Other editor texts (pictures, delete, LSP status) are still English; this PR only covers the save status and its pop-ups.
Tests
editor-rename.spec.tsgets a French case: withcook_lang=fr-FR, the status reads "Enregistré" after a save. After the file is deleted elsewhere it reads "Non enregistré : renommé ou supprimé ailleurs", and the French explanation pops up. It fails against current main ("Saved").tests/locales_test.rspasses: every locale has every message.cargo test --workspace1874 passed. Full chromium Playwright run green, apart from the specs that spawntarget/debug/cook, which doesn't exist in my local setup. The pantry and shopping-list specs were rerun with--workers=1, as on CI.The French, German, Spanish, Italian, Dutch, Swedish, Japanese and Basque texts were written to match the tone already used in each file; a native speaker's look is welcome.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MmrM91dHzvQoaerCcR9wra