From f878521a402965df6146c9b3423bc41979a87a7b Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 28 Jan 2026 12:20:58 +0100 Subject: [PATCH] Translate star button and editor buttons --- web/components/editor/sticky-format-menu.tsx | 47 ++++++++++--------- .../messaging/send-message-button.tsx | 41 +++++++++------- web/components/widgets/star-button.tsx | 18 +++---- web/messages/de.json | 5 ++ web/messages/fr.json | 7 ++- 5 files changed, 69 insertions(+), 49 deletions(-) diff --git a/web/components/editor/sticky-format-menu.tsx b/web/components/editor/sticky-format-menu.tsx index 6c181a6a..10c45f5f 100644 --- a/web/components/editor/sticky-format-menu.tsx +++ b/web/components/editor/sticky-format-menu.tsx @@ -1,13 +1,14 @@ -import { EmojiHappyIcon } from '@heroicons/react/outline' -import { CodeIcon, PhotographIcon } from '@heroicons/react/solid' -import { Editor } from '@tiptap/react' -import { MouseEventHandler, useState } from 'react' -import { FileUploadButton } from '../buttons/file-upload-button' -import { LoadingIndicator } from '../widgets/loading-indicator' -import { EmbedModal } from './embed-modal' -import type { UploadMutation } from './upload-extension' -import { Row } from 'web/components/layout/row' -import { Tooltip } from '../widgets/tooltip' +import {EmojiHappyIcon} from '@heroicons/react/outline' +import {CodeIcon, PhotographIcon} from '@heroicons/react/solid' +import {Editor} from '@tiptap/react' +import {MouseEventHandler, useState} from 'react' +import {FileUploadButton} from '../buttons/file-upload-button' +import {LoadingIndicator} from '../widgets/loading-indicator' +import {EmbedModal} from './embed-modal' +import type {UploadMutation} from './upload-extension' +import {Row} from 'web/components/layout/row' +import {Tooltip} from '../widgets/tooltip' +import {useT} from 'web/lib/locale' /* Toolbar, with buttons for images and embeds */ export function StickyFormatMenu(props: { @@ -15,48 +16,50 @@ export function StickyFormatMenu(props: { hideEmbed?: boolean children?: React.ReactNode }) { - const { editor, hideEmbed, children } = props + const {editor, hideEmbed, children} = props const upload = editor?.storage.upload.mutation + const t = useT() const [iframeOpen, setIframeOpen] = useState(false) return ( - + {!hideEmbed && ( { e.stopPropagation() e.preventDefault() setIframeOpen(true) }} > - )} insertEmoji(editor)} > - + - -
+ +
{children} ) } function UploadButton(props: { upload: UploadMutation }) { - const { upload } = props + const {upload} = props + const t = useT() return ( @@ -65,7 +68,7 @@ function UploadButton(props: { upload: UploadMutation }) { className="hover:text-ink-700 disabled:text-ink-300 active:text-ink-800 text-ink-400 relative flex rounded px-3 py-1 pl-4 transition-colors" > -