fix(sections-editor): translate the autosave failure toast - #6449
Merged
Conversation
decocms Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
PR: #6449 fix(sections-editor): translate the autosave failure toast Bump type: patch - decocms (apps/api/package.json): 4.260.6 -> 4.260.7 - @decocms/native (apps/native/package.json): 4.260.6 -> 4.260.7 Deploy-Scope: web
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.
useDebouncedSaveBlock(used by every form-driven block editor — section forms, the SEO editor, SEO sheets) showed a hardcoded English "Save failed: {error}" toast on autosave failure, while every other save-failure toast in this same feature (seesections-editor.tsx, 9+ call sites) goes throught("sectionsEditor.sectionsEditor.saveFailed", { error }), which already has both anenandpt-brtranslation. A pt-br user editing a section form and hitting a save error would see this one toast in English while every other error toast in the same screen is localized.Fix: route the same error through the existing
useT()+sectionsEditor.sectionsEditor.saveFailedkey instead of a template literal. No new translation keys needed — this key already exists and is already used for the identical message elsewhere in the same directory.Checks run locally:
bun run fmtcd apps/web && bunx tsc --noEmit— cleanbunx oxlint apps/web/src/components/sections-editor/use-save-block.ts— 0 warnings/errorsNo existing test covers this hook's toast wiring (it's UI copy, not a trust boundary), so no test was added per the repo's no-coverage-PR rule. Full CI validates the rest.
Summary by cubic
Localizes the autosave failure toast in
useDebouncedSaveBlock. Previously it showed a hardcoded English "Save failed: {error}"; now it usest("sectionsEditor.sectionsEditor.saveFailed", { error })so pt-br users see the translated message.useDebouncedSaveBlock(section forms, SEO editor, SEO sheets).Written for commit 1f8e5e4. Summary will update on new commits.