mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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>
This commit is contained in:
@@ -24,11 +24,11 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
|
|||||||
|
|
||||||
const handleConfirm = async () => {
|
const handleConfirm = async () => {
|
||||||
if (!newName || newName.includes(" ")) {
|
if (!newName || newName.includes(" ")) {
|
||||||
toast.error("Tag name cannot be empty or contain spaces");
|
toast.error(t("tag.rename-error-empty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newName === tag) {
|
if (newName === tag) {
|
||||||
toast.error("New name cannot be the same as the old name");
|
toast.error(t("tag.rename-error-repeat"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ const RenameTagDialog: React.FC<Props> = (props: Props) => {
|
|||||||
oldTag: tag,
|
oldTag: tag,
|
||||||
newTag: newName,
|
newTag: newName,
|
||||||
});
|
});
|
||||||
toast.success("Rename tag successfully");
|
toast.success(t("tag.rename-success"));
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.details);
|
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="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="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">
|
<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} />
|
<Input className="w-full" readOnly disabled type="text" placeholder="A new tag name" value={tag} />
|
||||||
</div>
|
</div>
|
||||||
<div className="relative w-full mb-2 flex flex-row justify-start items-center space-x-2">
|
<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} />
|
<Input className="w-full" type="text" placeholder="A new tag name" value={newName} onChange={handleTagNameInputChange} />
|
||||||
</div>
|
</div>
|
||||||
<List size="sm" marker="disc">
|
<List size="sm" marker="disc">
|
||||||
<ListItem>
|
<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>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -395,7 +395,14 @@
|
|||||||
"create-tags-guide": "You can create tags by inputting `#tag`.",
|
"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-confirm": "Are you sure to delete this tag? All related memos will be archived.",
|
||||||
"delete-tag": "Delete Tag",
|
"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": {
|
"markdown": {
|
||||||
"code-block": "Code block",
|
"code-block": "Code block",
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
"preview": "预览",
|
"preview": "预览",
|
||||||
"profile": "个人资料",
|
"profile": "个人资料",
|
||||||
"remember-me": "保持登录",
|
"remember-me": "保持登录",
|
||||||
"rename": "改名",
|
"rename": "重命名",
|
||||||
"reset": "重置",
|
"reset": "重置",
|
||||||
"resources": "资源库",
|
"resources": "资源库",
|
||||||
"restore": "恢复",
|
"restore": "恢复",
|
||||||
@@ -379,7 +379,14 @@
|
|||||||
"create-tags-guide": "您可以通过输入 “#标签” 创建标签。",
|
"create-tags-guide": "您可以通过输入 “#标签” 创建标签。",
|
||||||
"delete-confirm": "您确定要删除此标签吗?所有相关的备忘录将会被归档。",
|
"delete-confirm": "您确定要删除此标签吗?所有相关的备忘录将会被归档。",
|
||||||
"delete-tag": "删除标签",
|
"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": {
|
"markdown": {
|
||||||
"code-block": "代码块",
|
"code-block": "代码块",
|
||||||
|
Reference in New Issue
Block a user