Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct translation string usage and JSX formatting in Popup confirm #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ui/apps/dashboard/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,8 @@
"3b0b5df2e18ef97b7f948c60906a7821": "Cluster access failure",
"01812e386ab69ce4391769918e32d6d1": "Cluster update failed",
"aba41769112ffcc08cb563e29f460770": "Select the kubeconfig file",
"03743b3522b7d69da1cdc44d7418ce4d": "I'm a bit tired, give it a try to refresh"
"03743b3522b7d69da1cdc44d7418ce4d": "I'm a bit tired, give it a try to refresh",
"28f9bfb0c1f349d39a3f0e9c5040fbb8": "Cluster",
"6f57ad46ebf24ff4b5cfe6b919b7f89e": "Deleted successfully",
"3c8b3e5d432a454dbf9e5b737d7e7b62": "Confirm to delete"
}
5 changes: 4 additions & 1 deletion ui/apps/dashboard/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,8 @@
"3b0b5df2e18ef97b7f948c60906a7821": "集群接入失败",
"01812e386ab69ce4391769918e32d6d1": "集群更新失败",
"aba41769112ffcc08cb563e29f460770": "选择kubeconfig文件",
"03743b3522b7d69da1cdc44d7418ce4d": "有点累了,刷新试试"
"03743b3522b7d69da1cdc44d7418ce4d": "有点累了,刷新试试",
"28f9bfb0c1f349d39a3f0e9c5040fbb8": "集群",
"6f57ad46ebf24ff4b5cfe6b919b7f89e": "删除成功",
"3c8b3e5d432a454dbf9e5b737d7e7b62": "确认删除"
}
4 changes: 2 additions & 2 deletions ui/apps/dashboard/src/pages/cluster-manage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ const ClusterManagePage = () => {
</Button>
<Popconfirm
placement="topRight"
title={`确认要删除${r.objectMeta.name}集群么?`}
title={`${i18nInstance.t('28f9bfb0c1f349d39a3f0e9c5040fbb8')} ${r.objectMeta.name} ${i18nInstance.t('3c8b3e5d432a454dbf9e5b737d7e7b62')}?`}
onConfirm={async () => {
const ret = await DeleteCluster(r.objectMeta.name);
if (ret.code === 200) {
await messageApi.success(`集群${r.objectMeta.name}删除成功`);
await messageApi.success(`${i18nInstance.t('3c8b3e5d432a454dbf9e5b737d7e7b62')} ${r.objectMeta.name} ${i18nInstance.t('6f57ad46ebf24ff4b5cfe6b919b7f89e')}`);
await refetch();
} else {
await messageApi.error(
Expand Down