From 5dc9ab93d707ef4f5c4e5847350a744bb8b93ae2 Mon Sep 17 00:00:00 2001 From: pedrofrxncx Date: Fri, 31 Jul 2026 18:28:15 -0300 Subject: [PATCH] fix(sections-editor): translate rich-text toolbar aria-labels 10 toolbar buttons (bold, italic, underline, strikethrough, bullet/ordered list, align left/center/right/justify) used hardcoded English aria-label strings while sibling buttons in the same toolbar (font size, style dropdown) already went through t(). pt-br users get untranslated labels on the toolbar's most-used buttons. --- .../fields/rich-text-field.tsx | 20 +++++++++---------- apps/web/src/i18n/en/sections-editor.ts | 10 ++++++++++ apps/web/src/i18n/pt-br/sections-editor.ts | 10 ++++++++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/sections-editor/fields/rich-text-field.tsx b/apps/web/src/components/sections-editor/fields/rich-text-field.tsx index 540f1e1463..11c8993296 100644 --- a/apps/web/src/components/sections-editor/fields/rich-text-field.tsx +++ b/apps/web/src/components/sections-editor/fields/rich-text-field.tsx @@ -184,28 +184,28 @@ export function RichTextField({
editor.chain().focus().toggleBold().run()} > editor.chain().focus().toggleItalic().run()} > editor.chain().focus().toggleUnderline().run()} > editor.chain().focus().toggleStrike().run()} > @@ -280,14 +280,14 @@ export function RichTextField({ editor.chain().focus().toggleBulletList().run()} > editor.chain().focus().toggleOrderedList().run()} > @@ -312,7 +312,7 @@ export function RichTextField({ editor.chain().focus().setTextAlign("left").run() } @@ -321,7 +321,7 @@ export function RichTextField({ editor.chain().focus().setTextAlign("center").run() } @@ -330,7 +330,7 @@ export function RichTextField({ editor.chain().focus().setTextAlign("right").run() } @@ -339,7 +339,7 @@ export function RichTextField({ editor.chain().focus().setTextAlign("justify").run() } diff --git a/apps/web/src/i18n/en/sections-editor.ts b/apps/web/src/i18n/en/sections-editor.ts index 4f71482ce3..1bdc3576cb 100644 --- a/apps/web/src/i18n/en/sections-editor.ts +++ b/apps/web/src/i18n/en/sections-editor.ts @@ -134,11 +134,21 @@ export const sectionsEditor = { "sectionsEditor.richTextColorControl.colorButtonLabel": "Text color", "sectionsEditor.richTextColorControl.customLabel": "Custom", "sectionsEditor.richTextColorControl.defaultLabel": "Default", + "sectionsEditor.richTextField.alignCenter": "Align center", + "sectionsEditor.richTextField.alignJustify": "Justify", + "sectionsEditor.richTextField.alignLeft": "Align left", + "sectionsEditor.richTextField.alignRight": "Align right", + "sectionsEditor.richTextField.bold": "Bold", + "sectionsEditor.richTextField.bulletList": "Bullet list", "sectionsEditor.richTextField.fontSizeDecrease": "Decrease font size", "sectionsEditor.richTextField.fontSizeIncrease": "Increase font size", + "sectionsEditor.richTextField.italic": "Italic", + "sectionsEditor.richTextField.orderedList": "Ordered list", + "sectionsEditor.richTextField.strikethrough": "Strikethrough", "sectionsEditor.richTextField.styleHeading": "Heading {level}", "sectionsEditor.richTextField.styleLabel": "Text style", "sectionsEditor.richTextField.styleParagraph": "Paragraph", + "sectionsEditor.richTextField.underline": "Underline", "sectionsEditor.richTextLinkControl.applyLinkLabel": "Apply link", "sectionsEditor.richTextLinkControl.linkButtonLabel": "Link", "sectionsEditor.richTextLinkControl.newTabLabel": "New tab", diff --git a/apps/web/src/i18n/pt-br/sections-editor.ts b/apps/web/src/i18n/pt-br/sections-editor.ts index cac1fe1032..c38b36ed84 100644 --- a/apps/web/src/i18n/pt-br/sections-editor.ts +++ b/apps/web/src/i18n/pt-br/sections-editor.ts @@ -139,11 +139,21 @@ export const sectionsEditor = { "sectionsEditor.richTextColorControl.colorButtonLabel": "Cor do texto", "sectionsEditor.richTextColorControl.customLabel": "Personalizada", "sectionsEditor.richTextColorControl.defaultLabel": "Padrão", + "sectionsEditor.richTextField.alignCenter": "Centralizar", + "sectionsEditor.richTextField.alignJustify": "Justificar", + "sectionsEditor.richTextField.alignLeft": "Alinhar à esquerda", + "sectionsEditor.richTextField.alignRight": "Alinhar à direita", + "sectionsEditor.richTextField.bold": "Negrito", + "sectionsEditor.richTextField.bulletList": "Lista com marcadores", "sectionsEditor.richTextField.fontSizeDecrease": "Diminuir tamanho da fonte", "sectionsEditor.richTextField.fontSizeIncrease": "Aumentar tamanho da fonte", + "sectionsEditor.richTextField.italic": "Itálico", + "sectionsEditor.richTextField.orderedList": "Lista numerada", + "sectionsEditor.richTextField.strikethrough": "Tachado", "sectionsEditor.richTextField.styleHeading": "Título {level}", "sectionsEditor.richTextField.styleLabel": "Estilo do texto", "sectionsEditor.richTextField.styleParagraph": "Parágrafo", + "sectionsEditor.richTextField.underline": "Sublinhado", "sectionsEditor.richTextLinkControl.applyLinkLabel": "Aplicar link", "sectionsEditor.richTextLinkControl.linkButtonLabel": "Link", "sectionsEditor.richTextLinkControl.newTabLabel": "Nova aba",