From 22f83e7917ba4c3ea420f26a854fc3b687c61d1e Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 26 Jul 2023 12:30:54 +0100 Subject: [PATCH] Use correct translation function for WYSIWYG buttons (#11315) * Use correct translation function for WYSIWYG buttons * Add tests --- .../components/FormattingButtons.tsx | 26 ++--- .../components/FormattingButtons-test.tsx | 9 ++ .../FormattingButtons-test.tsx.snap | 110 ++++++++++++++++++ 3 files changed, 132 insertions(+), 13 deletions(-) create mode 100644 test/components/views/rooms/wysiwyg_composer/components/__snapshots__/FormattingButtons-test.tsx.snap diff --git a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx index 36ca4b6a61e..624cfeb607a 100644 --- a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx +++ b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx @@ -34,7 +34,7 @@ import AccessibleTooltipButton from "../../../elements/AccessibleTooltipButton"; import { Alignment } from "../../../elements/Tooltip"; import { KeyboardShortcut } from "../../../settings/KeyboardShortcut"; import { KeyCombo } from "../../../../../KeyBindingsManager"; -import { _td } from "../../../../../languageHandler"; +import { _t } from "../../../../../languageHandler"; import { ButtonEvent } from "../../../elements/AccessibleButton"; import { openLinkModal } from "./LinkModal"; import { useComposerContext } from "../ComposerContext"; @@ -93,47 +93,47 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP
+ + + + + + + + + +
+ +`;