diff --git a/dashboard/src/components/ClickToCopyField.vue b/dashboard/src/components/ClickToCopyField.vue index cdd8809..c4c12cf 100644 --- a/dashboard/src/components/ClickToCopyField.vue +++ b/dashboard/src/components/ClickToCopyField.vue @@ -19,7 +19,7 @@ variant="outline" @click="copyTextContentToClipboard" > - {{ copied ? '已复制' : '复制' }} + {{ copied ? $t('Copied') : $t('Copy') }} @@ -51,7 +51,7 @@ export default { setTimeout(() => { this.copied = false; }, 4000); - toast.success('已复制到剪贴板!'); + toast.success(this.$t('Copied to clipboard!')); }); } } diff --git a/dashboard/src/components/auth/Configure2FA.vue b/dashboard/src/components/auth/Configure2FA.vue index 31c0d18..121a83c 100644 --- a/dashboard/src/components/auth/Configure2FA.vue +++ b/dashboard/src/components/auth/Configure2FA.vue @@ -11,21 +11,21 @@ class="space-y-4" >
-

禁用双重认证的步骤

+

{{ $t('Steps to Disable Two-Factor Authentication') }}

    -
  1. 打开认证器应用
  2. -
  3. 在下方输入应用中的代码
  4. +
  5. {{ $t('Open the authenticator app') }}
  6. +
  7. {{ $t('Enter the code from the app below') }}
@@ -43,14 +43,14 @@
-

启用双重认证的步骤

+

{{ $t('Steps to Enable Two-Factor Authentication') }}

    -
  1. 在手机上下载认证器应用,例如阿里云APP等。
  2. -
  3. 扫描二维码
  4. -
  5. 在下方输入认证器应用中的代码
  6. +
  7. {{ $t('Download an authenticator app on your phone, such as Alibaba Cloud APP, etc.') }}
  8. +
  9. {{ $t('Scan the QR code') }}
  10. +
  11. {{ $t('Enter the code from the authenticator app below') }}

- 注意: 如果您无法访问认证器应用,您的账户将被锁定。请确保备份您的保险库/密钥。 + {{ $t('Note') }}: {{ $t('If you cannot access the authenticator app, your account will be locked. Please ensure you back up your vault/key.') }}

@@ -58,14 +58,14 @@ v-if="showSetupKey" class="rounded border border-gray-200 bg-gray-50 p-4" > -

设置密钥

+

{{ $t('Setup Key') }}

{{ setupKey }}

@@ -75,7 +75,7 @@ v-if="!is2FAEnabled" class="w-full" variant="solid" - label="启用双重认证" + :label="$t('Enable Two-Factor Authentication')" :disabled="!totpCode" :loading="$resources.enable2FA.loading" @click="enable2FA" @@ -84,7 +84,7 @@ v-else class="w-full" variant="solid" - label="禁用双重认证" + :label="$t('Disable Two-Factor Authentication')" :disabled="!totpCode" :loading="$resources.disable2FA.loading" @click="disable2FA" @@ -118,7 +118,7 @@ qrUrl: '', // not storing as computed property to avoid re-fetching on dialog cl totp_code: this.totpCode }), { - loading: '正在启用双因素认证...', + loading: this.$t('Enabling two-factor authentication...'), success: () => { this.totpCode = ''; @@ -128,17 +128,17 @@ qrUrl: '', // not storing as computed property to avoid re-fetching on dialog cl }, 500); this.$emit('enabled'); - return '双因素认证已成功启用'; + return this.$t('Two-factor authentication enabled successfully'); }, error(err) { if (err.messages) { if (err.messages.includes('Invalid TOTP code')) { - return '无效的TOTP验证码,请重试'; + return this.$t('Invalid TOTP code, please try again'); } else { return err.messages.join('.'); } } else { - return '启用双因素认证失败'; + return this.$t('Failed to enable two-factor authentication'); } } } @@ -150,7 +150,7 @@ qrUrl: '', // not storing as computed property to avoid re-fetching on dialog cl totp_code: this.totpCode }), { - loading: '正在禁用双因素认证...', + loading: this.$t('Disabling two-factor authentication...'), success: () => { this.totpCode = ''; @@ -161,17 +161,17 @@ qrUrl: '', // not storing as computed property to avoid re-fetching on dialog cl this.$emit('disabled'); - return '双因素认证已成功禁用'; + return this.$t('Two-factor authentication disabled successfully'); }, error(err) { if (err.messages) { if (err.messages.includes('Invalid TOTP code')) { - return '无效的TOTP验证码,请重试'; + return this.$t('Invalid TOTP code, please try again'); } else { return err.messages.join('.'); } } else { - return '禁用双因素认证失败'; + return this.$t('Failed to disable two-factor authentication'); } } } diff --git a/dashboard/src/components/settings/AddNewWebhookDialog.vue b/dashboard/src/components/settings/AddNewWebhookDialog.vue index a0b56fb..1719156 100644 --- a/dashboard/src/components/settings/AddNewWebhookDialog.vue +++ b/dashboard/src/components/settings/AddNewWebhookDialog.vue @@ -1,10 +1,10 @@