fix(sections-editor): translate the SEO form's "Use default" toggle label - #5267
Merged
Merged
Conversation
…abel The per-field inherit-from-site-SEO toggle in GeneralSeoForm hardcoded "Use default" in JSX instead of going through i18n, so pt-br users saw English text there.
pedrofrxncx
enabled auto-merge (squash)
July 27, 2026 14:46
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.
Source: i18n hardening in the sections-editor SEO form (
GeneralSeoForm), spotted while auditing the sections-editor area for polish per the repo's i18n rule ("never hardcode user-facing strings in apps/web/src").Why:
general-seo-form.tsxrenders a per-field "Use default" switch label (lets a page-level SEO field inherit the site-level default) as a raw JSX string instead of going throughuseT(), so pt-br users see English text on an otherwise-translated form — same bug class as the existing i18n-hardening lane (#5048, #5062, #5099, #5110, #5141, #5214, #5218, #5170).Change: added
sectionsEditor.generalSeoForm.useDefaultto bothi18n/en/sections-editor.ts("Use default") andi18n/pt-br/sections-editor.ts("Usar padrão"), and swapped the hardcoded string ingeneral-seo-form.tsxfort("sectionsEditor.generalSeoForm.useDefault"). No behavior change — pure string externalization.Reviewer check: switch the app language to Português (Brasil) in preferences, open a page's SEO editor for a General page with a configured site-default SEO, and confirm the "Use default" toggle label now reads "Usar padrão".
Verified locally:
bun run fmt(clean) andbunx tsc --noEmitinapps/web(clean, no new errors). Both en/pt-br dictionaries satisfy thesatisfies Record<keyof typeof enDomain, string>check so a missing/extra key would have been a compile error. Full CI (lint, tests) will validate the rest.Summary by cubic
Localizes the "Use default" toggle label in the sections editor SEO form by using
useT()instead of a hardcoded string. AddssectionsEditor.generalSeoForm.useDefaulttoi18n/en/sections-editor.tsandi18n/pt-br/sections-editor.tsso pt-br shows "Usar padrão".Written for commit 3cd53d2. Summary will update on new commits.