From 6a9012e5e457f66f1ec4e80818106a48ab826a49 Mon Sep 17 00:00:00 2001 From: programmer Date: Mon, 26 Jan 2026 16:12:09 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=99=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=9A=842=E4=B8=AA=E6=8C=89=E9=92=AE=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=20i18n=20(#7138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 个人中心按钮i18n * fix: eslint format * fix: 调整label宽度让英文显示在一行 * chore: 调整label小点 * fix: import --------- Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com> --- packages/effects/common-ui/src/ui/profile/base-setting.vue | 4 +++- .../effects/common-ui/src/ui/profile/password-setting.vue | 5 ++++- packages/locales/src/langs/en-US/profile.json | 4 ++++ packages/locales/src/langs/zh-CN/profile.json | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/locales/src/langs/en-US/profile.json create mode 100644 packages/locales/src/langs/zh-CN/profile.json diff --git a/packages/effects/common-ui/src/ui/profile/base-setting.vue b/packages/effects/common-ui/src/ui/profile/base-setting.vue index 1ef1c1a04..15fc97bad 100644 --- a/packages/effects/common-ui/src/ui/profile/base-setting.vue +++ b/packages/effects/common-ui/src/ui/profile/base-setting.vue @@ -5,6 +5,8 @@ import type { VbenFormSchema } from '@vben-core/form-ui'; import { computed, reactive } from 'vue'; +import { $t } from '@vben/locales'; + import { useVbenForm } from '@vben-core/form-ui'; import { VbenButton } from '@vben-core/shadcn-ui'; @@ -50,7 +52,7 @@ defineExpose({
- 更新基本信息 + {{ $t('profile.updateBasicProfile') }}
diff --git a/packages/effects/common-ui/src/ui/profile/password-setting.vue b/packages/effects/common-ui/src/ui/profile/password-setting.vue index 1d90e086b..06b9b3d10 100644 --- a/packages/effects/common-ui/src/ui/profile/password-setting.vue +++ b/packages/effects/common-ui/src/ui/profile/password-setting.vue @@ -5,6 +5,8 @@ import type { VbenFormSchema } from '@vben-core/form-ui'; import { computed, reactive } from 'vue'; +import { $t } from '@vben/locales'; + import { useVbenForm } from '@vben-core/form-ui'; import { VbenButton } from '@vben-core/shadcn-ui'; @@ -23,6 +25,7 @@ const emit = defineEmits<{ const [Form, formApi] = useVbenForm( reactive({ commonConfig: { + labelWidth: 130, // 所有表单项 componentProps: { class: 'w-full', @@ -50,7 +53,7 @@ defineExpose({
- 更新密码 + {{ $t('profile.updatePassword') }}
diff --git a/packages/locales/src/langs/en-US/profile.json b/packages/locales/src/langs/en-US/profile.json new file mode 100644 index 000000000..1c17e2ec6 --- /dev/null +++ b/packages/locales/src/langs/en-US/profile.json @@ -0,0 +1,4 @@ +{ + "updatePassword": "Update Password", + "updateBasicProfile": "Update Basic Profile" +} diff --git a/packages/locales/src/langs/zh-CN/profile.json b/packages/locales/src/langs/zh-CN/profile.json new file mode 100644 index 000000000..a38908c58 --- /dev/null +++ b/packages/locales/src/langs/zh-CN/profile.json @@ -0,0 +1,4 @@ +{ + "updatePassword": "更新密码", + "updateBasicProfile": "更新基本信息" +}