Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: update i18n for tag reame (#4493)
XIN_____81e40d9b189e
diff --git a/web/src/components/RenameTagDialog.tsx b/web/src/components/RenameTagDialog.tsxindex 86d67ee04..6ca8fa566 100644--- a/web/src/components/RenameTagDialog.tsx+++ b/web/src/components/RenameTagDialog.tsx@@ -24,11 +24,11 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {const handleConfirm = async () => {if (!newName || newName.includes(" ")) {- toast.error("Tag name cannot be empty or contain spaces");+ toast.error(t("tag.rename-error-empty"));return;}if (newName === tag) {- toast.error("New name cannot be the same as the old name");+ toast.error(t("tag.rename-error-repeat"));return;}@@ -38,7 +38,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {oldTag: tag,newTag: newName,});- toast.success("Rename tag successfully");+ toast.success(t("tag.rename-success"));} catch (error: any) {console.error(error);toast.error(error.details);@@ -57,16 +57,16 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {<div className="flex flex-col justify-start items-start max-w-xs"><div className="w-full flex flex-col justify-start items-start mb-3"><div className="relative w-full mb-2 flex flex-row justify-start items-center space-x-2">- <span className="w-20 text-sm whitespace-nowrap shrink-0 text-right">Old Name</span>+ <span className="w-20 text-sm whitespace-nowrap shrink-0 text-right">{t("tag.old-name")}</span><Input className="w-full" readOnly disabled type="text" placeholder="A new tag name" value={tag} /></div><div className="relative w-full mb-2 flex flex-row justify-start items-center space-x-2">- <span className="w-20 text-sm whitespace-nowrap shrink-0 text-right">New Name</span>+ <span className="w-20 text-sm whitespace-nowrap shrink-0 text-right">{t("tag.new-name")}</span><Input className="w-full" type="text" placeholder="A new tag name" value={newName} onChange={handleTagNameInputChange} /></div><List size="sm" marker="disc"><ListItem>- <p className="leading-5">All your memos with this tag will be updated.</p>+ <p className="leading-5">{t("tag.rename-tip")}</p></ListItem></List></div>diff --git a/web/src/locales/en.json b/web/src/locales/en.jsonindex d6e1f69c2..8ee2f0064 100644--- a/web/src/locales/en.json+++ b/web/src/locales/en.json@@ -395,7 +395,14 @@"create-tags-guide": "You can create tags by inputting `#tag`.","delete-confirm": "Are you sure to delete this tag? All related memos will be archived.","delete-tag": "Delete Tag",- "no-tag-found": "No tag found"+ "no-tag-found": "No tag found",+ "rename-tag": "Rename tag",+ "old-name": "Old Name",+ "new-name": "New Name",+ "rename-tip": "All your memos with this tag will be updated.",+ "rename-error-empty": "Tag name cannot be empty or contain spaces",+ "rename-error-repeat": "New name cannot be the same as the old name",+ "rename-success": "Rename tag successfully"},"markdown": {"code-block": "Code block",diff --git a/web/src/locales/zh-Hans.json b/web/src/locales/zh-Hans.jsonindex c031dc46f..f1b86742e 100644--- a/web/src/locales/zh-Hans.json+++ b/web/src/locales/zh-Hans.json@@ -52,7 +52,7 @@"preview": "预览","profile": "个人资料","remember-me": "保持登录",- "rename": "改名",+ "rename": "重命名","reset": "重置","resources": "资源库","restore": "恢复",@@ -379,7 +379,14 @@"create-tags-guide": "您可以通过输入 “#标签” 创建标签。","delete-confirm": "您确定要删除此标签吗?所有相关的备忘录将会被归档。","delete-tag": "删除标签",- "no-tag-found": "没找到此标签"+ "no-tag-found": "没找到此标签",+ "rename-tag": "标签重命名",+ "old-name": "旧名称",+ "new-name": "新名称",+ "rename-tip": "您的所有带有此标签的备忘录将被更新。",+ "rename-error-empty": "新名称不能为空或包含空格",+ "rename-error-repeat": "新名称不能与旧名称相同",+ "rename-success": "重命名成功"},"markdown": {"code-block": "代码块",