@@ -18,10 +18,10 @@
v-model="newPassword"
type="password"
:fieldtype="'Password'"
- :label="'新密码'"
+ :label="$t('New Password')"
:fieldname="'new_password'"
:reqd="1"
- :placeholder="'请输入新密码'"
+ :placeholder="$t('Please enter new password')"
/>
{{ passwordStrengthMessage }}
@@ -30,10 +30,10 @@
v-model="confirmPassword"
type="password"
:fieldtype="'Password'"
- :label="'确认密码'"
+ :label="$t('Confirm Password')"
:fieldname="'confirm_password'"
:reqd="1"
- :placeholder="'请再次输入新密码'"
+ :placeholder="$t('Please re-enter new password')"
/>
{{ passwordMismatchMessage }}
@@ -49,7 +49,7 @@
class="flex-1"
@click="hide"
>
- 取消
+ {{ $t('Cancel') }}
- 确认
+ {{ $t('Confirm') }}
@@ -152,10 +152,10 @@ export default {
checkPasswordMismatch() {
if (this.oldPassword && this.newPassword && this.oldPassword === this.newPassword) {
- this.passwordMismatchMessage = '新密码不能与当前密码相同';
+ this.passwordMismatchMessage = this.$t('New password cannot be the same as current password');
this.passwordStrengthMessage = '';
} else if (this.confirmPassword && this.newPassword !== this.confirmPassword) {
- this.passwordMismatchMessage = '两次输入的密码不一致';
+ this.passwordMismatchMessage = this.$t('Passwords do not match');
this.passwordStrengthMessage = '';
} else {
this.passwordMismatchMessage = '';
@@ -178,7 +178,7 @@ export default {
logout_all_sessions: 1
});
} catch (error) {
- this.error = error.message || '密码更新失败';
+ this.error = error.message || this.$t('Failed to update password');
} finally {
this.isLoading = false;
}
@@ -186,22 +186,22 @@ export default {
validateForm() {
if (!this.isResetMode && !this.oldPassword) {
- this.error = '请输入当前密码';
+ this.error = this.$t('Please enter current password');
return false;
}
if (!this.newPassword) {
- this.error = '请输入新密码';
+ this.error = this.$t('Please enter new password');
return false;
}
if (this.newPassword !== this.confirmPassword) {
- this.error = '两次输入的密码不一致';
+ this.error = this.$t('Passwords do not match');
return false;
}
if (!this.isResetMode && this.oldPassword === this.newPassword) {
- this.error = '新密码不能与当前密码相同';
+ this.error = this.$t('New password cannot be the same as current password');
return false;
}
@@ -247,7 +247,7 @@ export default {
const feedback = data.message.feedback;
if (feedback.password_policy_validation_passed) {
- this.passwordStrengthMessage = '密码强度良好 👍';
+ this.passwordStrengthMessage = this.$t('Password strength is good 👍');
this.passwordStrengthClass = 'text-green-600';
} else {
let message = [];
@@ -256,7 +256,7 @@ export default {
} else if (feedback.warning) {
message.push(feedback.warning);
}
- message.push('提示:密码应包含符号、数字和大写字母');
+ message.push(this.$t('Tip: Password should contain symbols, numbers and uppercase letters'));
this.passwordStrengthMessage = message.join(' ');
this.passwordStrengthClass = 'text-red-600';
}
@@ -273,9 +273,9 @@ export default {
url: 'jingrow.core.pagetype.user.user.update_password',
onSuccess(data) {
// 显示成功提示,5秒后自动消失
- toast.success('密码更新成功', {
+ toast.success(this.$t('Password updated successfully'), {
duration: 3000,
- description: '您的密码已更新'
+ description: this.$t('Your password has been updated')
});
// 立即关闭对话框
@@ -290,9 +290,9 @@ export default {
},
onError(error) {
if (error.status === 401) {
- this.error = '当前密码不正确';
+ this.error = this.$t('Current password is incorrect');
} else {
- this.error = error.message || '密码更新失败';
+ this.error = error.message || this.$t('Failed to update password');
}
}
};
diff --git a/dashboard/src/components/settings/profile/TFADialog.vue b/dashboard/src/components/settings/profile/TFADialog.vue
index c60ec9b..bb46641 100644
--- a/dashboard/src/components/settings/profile/TFADialog.vue
+++ b/dashboard/src/components/settings/profile/TFADialog.vue
@@ -3,8 +3,8 @@
v-model="show"
:options="{
title: is2FAEnabled
- ? '禁用双因素认证'
- : '启用双因素认证'
+ ? $t('Disable Two-Factor Authentication')
+ : $t('Enable Two-Factor Authentication')
}"
>
diff --git a/dashboard/src/dialogs/ConfirmDialog.vue b/dashboard/src/dialogs/ConfirmDialog.vue
index 89eb442..10d5b17 100644
--- a/dashboard/src/dialogs/ConfirmDialog.vue
+++ b/dashboard/src/dialogs/ConfirmDialog.vue
@@ -81,7 +81,7 @@ export default {
computed: {
primaryActionProps() {
return {
- label: '确认',
+ label: this.$t('Confirm'),
variant: 'solid',
...this.primaryAction,
loading: this.isLoading,
diff --git a/jcloud/translations/zh.csv b/jcloud/translations/zh.csv
index 2f82c0d..2477d0b 100644
--- a/jcloud/translations/zh.csv
+++ b/jcloud/translations/zh.csv
@@ -978,3 +978,55 @@ Default,默认,
Release Group,发布组,
Note,注意,
Submit,提交,
+Copy,复制,
+Copied,已复制,
+Copied to clipboard!,已复制到剪贴板!,
+Confirm,确认,
+Current Password,当前密码,
+Please enter current password,请输入当前密码,
+New Password,新密码,
+Please enter new password,请输入新密码,
+Confirm Password,确认密码,
+Please re-enter new password,请再次输入新密码,
+New password cannot be the same as current password,新密码不能与当前密码相同,
+Passwords do not match,两次输入的密码不一致,
+Failed to update password,密码更新失败,
+Password strength is good 👍,密码强度良好 👍,
+Tip: Password should contain symbols, numbers and uppercase letters,提示:密码应包含符号、数字和大写字母,
+Password updated successfully,密码更新成功,
+Your password has been updated,您的密码已更新,
+Current password is incorrect,当前密码不正确,
+Cancel,取消,
+Add New Webhook,添加新Webhook,
+Secret Key,密钥,
+The secret key is optional. View,密钥是可选的。查看,
+documentation,文档,
+to learn more,了解更多,
+Select Webhook Events,选择Webhook事件,
+Loading...,加载中...,
+Webhook added successfully,Webhook添加成功,
+Site Status Update,站点状态更新,
+Site Plan Change,站点套餐变更,
+Pending, Installing, Updating, Active, Inactive, Abnormal, Archived, Paused,等待中、安装中、更新中、活跃、不活跃、异常、已归档、已暂停,
+Get notifications for site subscription plan changes,获取站点套餐变更的通知,
+Please provide a valid webhook endpoint,请提供有效的Webhook端点,
+Please enable at least one event,请启用至少一个事件,
+If you disable two-factor authentication, your account will become insecure,如果禁用双重认证,您的账户将变得不安全,
+Steps to Disable Two-Factor Authentication,禁用双重认证的步骤,
+Open the authenticator app,打开认证器应用,
+Enter the code from the app below,在下方输入应用中的代码,
+Verify the code in the app to disable two-factor authentication,验证应用中的代码以禁用双重认证,
+Steps to Enable Two-Factor Authentication,启用双重认证的步骤,
+Download an authenticator app on your phone, such as Alibaba Cloud APP, etc.,在手机上下载认证器应用,例如阿里云APP等。,
+Scan the QR code,扫描二维码,
+Enter the code from the authenticator app below,在下方输入认证器应用中的代码,
+If you cannot access the authenticator app, your account will be locked. Please ensure you back up your vault/key.,如果您无法访问认证器应用,您的账户将被锁定。请确保备份您的保险库/密钥。,
+Setup Key,设置密钥,
+Verify the code in the app to enable two-factor authentication,验证应用中的代码以启用双重认证,
+Enabling two-factor authentication...,正在启用双因素认证...,
+Two-factor authentication enabled successfully,双因素认证已成功启用,
+Invalid TOTP code, please try again,无效的TOTP验证码,请重试,
+Failed to enable two-factor authentication,启用双因素认证失败,
+Disabling two-factor authentication...,正在禁用双因素认证...,
+Two-factor authentication disabled successfully,双因素认证已成功禁用,
+Failed to disable two-factor authentication,禁用双因素认证失败,