Skip to content

Commit

Permalink
Refine i18n
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby committed Oct 29, 2024
1 parent 72f1451 commit 8dda8cd
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ const handleSave = async () => {
(group) => group.spec.displayName === formState.value.spec.displayName
);
if (hasDisplayNameDuplicate) {
Toast.error(t("core.common.toast.group_name_exists"));
Toast.error(
t("core.attachment.group_editing_modal.toast.group_name_exists")
);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ const handleSave = async () => {
);
if (hasDisplayNameDuplicate) {
Toast.error(t("core.common.toast.policy_name_exists"));
Toast.error(
t("core.attachment.policy_editing_modal.toast.policy_name_exists")
);
return;
}
Expand Down
29 changes: 22 additions & 7 deletions ui/src/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ core:
logout:
tooltip: Logout
title: Logout
description: Clicking Confirm will redirect to the logout page. Please ensure that the content you are editing is saved.
description: >-
Clicking Confirm will redirect to the logout page. Please ensure that
the content you are editing is saved.
profile:
tooltip: Profile
visit_homepage:
Expand Down Expand Up @@ -598,6 +600,8 @@ core:
fields:
display_name:
label: Display name
toast:
group_name_exists: Group name already exists
group_list:
internal_groups:
all: All
Expand Down Expand Up @@ -643,6 +647,8 @@ core:
fields:
display_name:
label: Display name
toast:
policy_name_exists: Storage policy name already exists
upload_modal:
title: Upload attachment
filters:
Expand All @@ -666,8 +672,8 @@ core:
empty:
title: There are no attachments.
message: >-
There are no attachments, you can try refreshing or
uploading attachments.
There are no attachments, you can try refreshing or uploading
attachments.
actions:
upload: Upload Attachment
filters:
Expand Down Expand Up @@ -1457,7 +1463,9 @@ core:
first: >-
1. The restore process may last for a long time, please do not refresh
the page during this period.
second: 2. Before performing the restore, all existing data will be cleared. Please ensure that there is no data that needs to be retained.
second: >-
2. Before performing the restore, all existing data will be cleared.
Please ensure that there is no data that needs to be retained.
third: >-
3. After the restore is completed, you need to restart Halo to load
the system resources normally.
Expand Down Expand Up @@ -1673,7 +1681,9 @@ core:
creation_label: Create {text} tag
validation:
trim: Please remove the leading and trailing spaces
password: "The password can only use uppercase and lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: !{'@'}#$%^&*"
password: >-
The password can only use uppercase and lowercase letters (A-Z, a-z),
numbers (0-9), and the following special characters: !{'@'}#$%^&*
verification_form:
no_action_defined: "{label} interface not defined"
verify_success: "{label} successful"
Expand Down Expand Up @@ -1791,7 +1801,10 @@ core:
editor_not_found: >-
No editor found that matches the {raw_type} format. Please check if
the editor plugin has been installed.
login_expired: The current session has expired. Click Confirm to go to the login page. Please ensure that the current content is saved. You can click Cancel to manually copy any unsaved content.
login_expired: >-
The current session has expired. Click Confirm to go to the login
page. Please ensure that the current content is saved. You can click
Cancel to manually copy any unsaved content.
filters:
results:
keyword: "Keyword: {keyword}"
Expand Down Expand Up @@ -1832,7 +1845,9 @@ core:
title: Cancel publish
delete:
title: Delete post
description: This action will move the post to the recycle bin, where it will be managed by the site administrator.
description: >-
This action will move the post to the recycle bin, where it will be
managed by the site administrator.
publish_modal:
title: Publish post
setting_modal:
Expand Down
6 changes: 4 additions & 2 deletions ui/src/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ core:
fields:
display_name:
label: 名称
toast:
group_name_exists: 分组名称已存在
group_list:
internal_groups:
all: 全部
Expand Down Expand Up @@ -607,6 +609,8 @@ core:
fields:
display_name:
label: 名称
toast:
policy_name_exists: 存储策略名称已存在
upload_modal:
title: 上传附件
filters:
Expand Down Expand Up @@ -1671,8 +1675,6 @@ core:
unknown_error: 未知错误
disable_success: 禁用成功
enable_success: 啟用成功
group_name_exists: 该分组名称已存在,请重新创建
policy_name_exists: 该存储策略已存在,请重新创建
dialog:
titles:
tip: 提示
Expand Down
4 changes: 4 additions & 0 deletions ui/src/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ core:
fields:
display_name:
label: 名稱
toast:
group_name_exists: 分組名稱已存在
group_list:
internal_groups:
all: 全部
Expand Down Expand Up @@ -584,6 +586,8 @@ core:
fields:
display_name:
label: 名稱
toast:
policy_name_exists: 儲存策略名稱已存在
upload_modal:
title: 上傳附件
filters:
Expand Down

0 comments on commit 8dda8cd

Please sign in to comment.