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:update copywriting & remove dev api #4905

Merged
merged 1 commit into from
Jul 19, 2024
Merged
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
4 changes: 2 additions & 2 deletions frontend/desktop/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"delete_account_caution": "Once a resource is deleted, it cannot be recovered. \nTherefore, before performing the above operations, please be sure to back up your data.",
"delete_account_tips": "Permanently delete this account and all its content.",
"delete_account_title": "Logout prompt",
"delete_account_tips2": "The account you are trying to bind has been used by another user. You can choose to merge the accounts to unify the management of your information and settings. Would you like to merge the accounts now?",
"deleteaccounttitle": "Sealos will permanently delete this account.",
"deletemyaccount": "DeleteMyAccount",
"deploy_an_application": "Let’s deploy an application~",
Expand Down Expand Up @@ -103,7 +102,8 @@
"memory": "Memory",
"merge": "merge",
"merge_account_title": "Account has been bound",
"mergeaccounttips1": "The account you are trying to bind has been used by another user. Due to conflicting binding methods, the accounts cannot be merged.",
"merge_account_tips1": "The account you are trying to bind has been used by another user. Due to conflicting binding methods, the accounts cannot be merged.",
"merge_account_tips2": "The account you are trying to bind has been used by another user. You can choose to merge accounts to manage your information and settings in a unified way. After the merge is completed, your private workspace may be converted into a regular workspace. Do you want to merge accounts now?",
"message_center": "Message Center",
"monitor": "Monitor",
"more_apps": "More Apps",
Expand Down
1 change: 1 addition & 0 deletions frontend/desktop/public/locales/en/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"INTERNAL_SERVER_ERROR": "Internal server error",
"INSUFFICENT_BALANCE": "Insufficient balance",
"ACCOUNT_NOT_FOUND": "Account not found",
"MERGET_USER_INSUFFICENT_BALANCE":"Insufficient balance in the merged account",
"USER_CR_NOT_FOUND": "User CR not found",
"OAUTHPROVIDER_NOT_FOUND": "OAuth provider not found",
"PRIVATE_WORKSPACE_NOT_FOUND": "Private workspace not found",
Expand Down
6 changes: 3 additions & 3 deletions frontend/desktop/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"delete_account_caution": "资源一旦删除,将不可恢复。因此,在执行以上操作前,请务必做好数据备份工作",
"delete_account_tips": "将永久删除此账户及其所有内容",
"delete_account_title": "注销提示",
"delete_account_tips2": "您尝试绑定的账号已被其他用户使用。您可以选择合并账户,以统一管理您的信息和设置。是否现在合并账户?",
"deleteaccounttitle": "Sealos 将永久删除此账户。",
"deleteaccounttitle": "Sealos 将永久删除此账户。",
"deletemyaccount": "删除我的账号",
"deploy_an_application": "来部署一个应用吧~",
"description": "描述",
Expand Down Expand Up @@ -99,7 +98,8 @@
"memory": "内存",
"merge": "合并",
"merge_account_title": "账户已被绑定",
"mergeaccounttips1": "您尝试绑定的账号已被其他用户使用。由于存在冲突的其他绑定方式,无法合并账户。",
"merge_account_tips1": "您尝试绑定的账号已被其他用户使用。由于存在冲突的其他绑定方式,无法合并账户。",
"merge_account_tips2": "您尝试绑定的账号已被其他用户使用。您可以选择合并账户,以统一管理您的信息和设置。 在合并完成后,个人空间有可能转化为普通的工作空间,是否现在合并账户?",
"message_center": "消息中心",
"monitor": "监控",
"more_apps": "更多应用",
Expand Down
1 change: 1 addition & 0 deletions frontend/desktop/public/locales/zh/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"RESULT_SUCCESS": "响应成功",
"INTERNAL_SERVER_ERROR": "内部服务器错误",
"INSUFFICENT_BALANCE": "余额不足",
"MERGET_USER_INSUFFICENT_BALANCE": "被合并的账户余额不足",
"ACCOUNT_NOT_FOUND": "未找到账户",
"USER_CR_NOT_FOUND": "未找到用户CR",
"OAUTHPROVIDER_NOT_FOUND": "未找到OAuth提供程序",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ const smsBindGen = (smsType: SmsType) =>
>
<FormControl isInvalid={!!formState.errors.id}>
<HStack>
<FormLabel w={'120px'}>{smsType === 'phone' ? t('common:phone') : t('common:email')}</FormLabel>
<FormLabel w={'120px'}>
{smsType === 'phone' ? t('common:phone') : t('common:email')}
</FormLabel>
<SettingInputGroup>
<SettingInput
{...register('id', smsIdValid(smsType))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ function NewSms({
if (data.code === 200) {
toast({
status: 'success',
title: smsType === 'phone' ? t('common:phonechangesuccess') : t('common:emailchangesuccess')
title:
smsType === 'phone' ? t('common:phonechangesuccess') : t('common:emailchangesuccess')
});
reset();
onClose?.();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ const smsUnBindGen = (smsType: SmsType) =>
>
<FormControl isInvalid={!!formState.errors.id}>
<HStack>
<FormLabel w={'120px'}>{smsType === 'phone' ? t('common:phone') : t('common:email')}</FormLabel>
<FormLabel w={'120px'}>
{smsType === 'phone' ? t('common:phone') : t('common:email')}
</FormLabel>
<SettingInputGroup>
<SettingInput
{...register('id', smsIdValid(smsType))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export default function Index(props: Omit<IconButtonProps, 'aria-label'>) {
else if (pageState === PageState.PASSWORD) return t('common:changepassword');
else if (Object.values(PhoneState).includes(pageState as PhoneState))
return t('common:changephone'); // bind or unbind
else if (Object.values(EmailState).includes(pageState as EmailState)) return t('common:changeemail');
else if (Object.values(EmailState).includes(pageState as EmailState))
return t('common:changeemail');
else return '';
}, [t, pageState]);
const queryClient = useQueryClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function NeedToMerge({ ...props }: BoxProps & {}) {
queryClient.clear();
},
onError(err: { message: ValueOf<USER_MERGE_STATUS> }) {
const errMessage =
err.message === USER_MERGE_STATUS.INSUFFICENT_BALANCE
? err.message
: 'MERGET_USER_INSUFFICENT_BALANCE';

toast({
status: 'error',
title: t(err.message as I18nErrorKey, { ns: 'error' })
Expand Down Expand Up @@ -83,8 +88,8 @@ function NeedToMerge({ ...props }: BoxProps & {}) {
<VStack alignItems={'stretch'} gap={'0'}>
<Text mb={'12px'}>
{mergeUserStatus === MergeUserStatus.CONFLICT
? t('common:mergeaccounttips1')
: t('common:delete_account_tips2')}
? t('common:merge_account_tips1')
: t('common:merge_account_tips2')}
</Text>
{mergeUserStatus === MergeUserStatus.CONFLICT ? (
<HStack gap={'12px'} justifyContent={'flex-end'} mt={'24px'}>
Expand Down
4 changes: 3 additions & 1 deletion frontend/desktop/src/components/team/RemoveMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export default function RemoveMember({
? t('common:quit')
: t('common:remove');
const removeTips =
selfUserCrUid === targetUserCrUid ? t('common:quit_workspace_tips') : t('common:remove_member_tips');
selfUserCrUid === targetUserCrUid
? t('common:quit_workspace_tips')
: t('common:remove_member_tips');
return (
<>
<Button
Expand Down
8 changes: 7 additions & 1 deletion frontend/desktop/src/components/team/userTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ export default function UserTable({
nsid: string;
}) {
const { t } = useTranslation();
const headList = [t('common:user_name'), t('common:access'), t('common:in_time'), t('common:status'), t('common:operating')];
const headList = [
t('common:user_name'),
t('common:access'),
t('common:in_time'),
t('common:status'),
t('common:operating')
];
const status = [t('common:waiting'), t('common:added')];
const session = useSessionStore((s) => s.session);
const userCrUid = session?.user.userCrUid;
Expand Down
Loading
Loading