diff --git a/components/form-builder/lexical-editor/Toolbar.tsx b/components/form-builder/lexical-editor/Toolbar.tsx index 419c7ecc8d..91d9349803 100644 --- a/components/form-builder/lexical-editor/Toolbar.tsx +++ b/components/form-builder/lexical-editor/Toolbar.tsx @@ -10,6 +10,7 @@ import { Link } from "@styled-icons/material/Link"; import { FormatListBulleted } from "@styled-icons/material/FormatListBulleted"; import { FormatListNumbered } from "@styled-icons/material/FormatListNumbered"; import { TOGGLE_LINK_COMMAND } from "@lexical/link"; +import { useTranslation } from "next-i18next"; import { $isListNode, @@ -30,7 +31,6 @@ import { import { $wrapNodes } from "@lexical/selection"; import styled from "styled-components"; import { sanitizeUrl } from "./utils/sanitizeUrl"; -import { t } from "i18next"; const blockTypeToBlockName = { bullet: "Bulleted List", @@ -235,12 +235,13 @@ export const Toolbar = ({ editorId }: { editorId: string }) => { ); }, [editor, updateToolbar]); - // @TODO: aria-controls below needs an id for the editor + const { t } = useTranslation("form-builder"); + return ( <> @@ -354,7 +355,6 @@ export const Toolbar = ({ editorId }: { editorId: string }) => { onClick={insertLink} className={"toolbar-item " + (isLink ? "active" : "")} aria-label={t("insertLink")} - title={t("insertLink")} > diff --git a/public/static/locales/en/form-builder.json b/public/static/locales/en/form-builder.json index 0877c88c89..262ddaaf5b 100644 --- a/public/static/locales/en/form-builder.json +++ b/public/static/locales/en/form-builder.json @@ -139,6 +139,7 @@ "switch": "Switch", "testDataDelivery": "Test data delivery", "testYourResponseDelivery": "Test your response delivery", + "textFormatting": "Text formatting", "thereWasAnErrorPublishing": "There was an error publishing the form", "title": "Title", "toTestInstructions": "To test to see how you will gather form responses, please complete the following steps:", diff --git a/public/static/locales/fr/form-builder.json b/public/static/locales/fr/form-builder.json index 04f04e9ebf..c794cd8e2f 100644 --- a/public/static/locales/fr/form-builder.json +++ b/public/static/locales/fr/form-builder.json @@ -139,6 +139,7 @@ "switch": "[FR] Switch", "testDataDelivery": "[FR] Test data delivery", "testYourResponseDelivery": "[FR] Test your response delivery", + "textFormatting": "[FR] Text formatting", "thereWasAnErrorPublishing": "[FR] There was an error publishing the form", "title": "[FR] Title", "toTestInstructions": "[FR] To test to see how you will gather form responses, please complete the following steps:",