chore: update i18n for tag reame (#4493)

* feat: update i18n for zh-hans

* Update zh-Hans.json

---------

Co-authored-by: KissFire <53330905+kiss-fire@users.noreply.github.com>
pull/4496/head
XIN_____ 3 months ago committed by GitHub
parent fc5962f6a4
commit 81e40d9b18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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>

@ -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",

@ -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": "代码块",

Loading…
Cancel
Save