From 6c9ea31de07f1273c2bdbac5ea5876405a90d64d Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 22 Jan 2026 22:31:19 +0800 Subject: [PATCH] chore: add translation for saving status in EditorToolbar --- web/src/components/MemoEditor/components/EditorToolbar.tsx | 6 ++++-- web/src/locales/en.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/MemoEditor/components/EditorToolbar.tsx b/web/src/components/MemoEditor/components/EditorToolbar.tsx index 15e8db194..ba03378ad 100644 --- a/web/src/components/MemoEditor/components/EditorToolbar.tsx +++ b/web/src/components/MemoEditor/components/EditorToolbar.tsx @@ -1,5 +1,6 @@ import type { FC } from "react"; import { Button } from "@/components/ui/button"; +import { useTranslate } from "@/utils/i18n"; import { validationService } from "../services"; import { useEditorContext } from "../state"; import InsertMenu from "../Toolbar/InsertMenu"; @@ -7,6 +8,7 @@ import VisibilitySelector from "../Toolbar/VisibilitySelector"; import type { EditorToolbarProps } from "../types"; export const EditorToolbar: FC = ({ onSave, onCancel, memoName }) => { + const t = useTranslate(); const { state, actions, dispatch } = useEditorContext(); const { valid } = validationService.canSave(state); @@ -41,12 +43,12 @@ export const EditorToolbar: FC = ({ onSave, onCancel, memoNa {onCancel && ( )} diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 41d897415..d4598eea1 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -121,6 +121,7 @@ "add-your-comment-here": "Add your comment here...", "any-thoughts": "Any thoughts...", "save": "Save", + "saving": "Saving...", "no-changes-detected": "No changes detected", "focus-mode": "Focus Mode", "exit-focus-mode": "Exit Focus Mode",