From c4de677c866d36d8b6688e4690aad94e7feb8e99 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 20 Jan 2025 18:00:53 +0800 Subject: [PATCH] feat: i18n --- ui/src/api/type/user.ts | 1 + .../component/chat-input-operate/index.vue | 2 +- .../ai-chat/component/control/index.vue | 2 +- ui/src/components/app-table/index.vue | 3 +- .../items/MultiSelectConstructor.vue | 24 +++-- .../items/RadioCardConstructor.vue | 18 ++-- .../constructor/items/RadioRowConstructor.vue | 26 +++--- .../items/SingleSelectConstructor.vue | 18 ++-- .../constructor/items/SliderConstructor.vue | 4 +- ui/src/locales/index.ts | 91 ++++++++++--------- ui/src/locales/lang/en_US/views/document.ts | 4 +- .../lang/zh_CN/components/dynamics-form.ts | 11 +++ ui/src/request/index.ts | 2 + ui/src/stores/modules/application.ts | 5 +- ui/src/stores/modules/user.ts | 9 +- ui/src/views/document/index.vue | 6 +- .../template/component/ParamSettingDialog.vue | 2 +- 17 files changed, 136 insertions(+), 92 deletions(-) diff --git a/ui/src/api/type/user.ts b/ui/src/api/type/user.ts index a91a40e8b..a45267354 100644 --- a/ui/src/api/type/user.ts +++ b/ui/src/api/type/user.ts @@ -25,6 +25,7 @@ interface User { is_edit_password?: boolean IS_XPACK?: boolean XPACK_LICENSE_IS_VALID?: boolean + language: string } interface LoginRequest { diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index fff14e882..a31846427 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -184,10 +184,10 @@ import { useRoute, useRouter } from 'vue-router' import { getImgUrl } from '@/utils/utils' import bus from '@/bus' import 'recorder-core/src/engine/mp3' - import 'recorder-core/src/engine/mp3-engine' import { MsgWarning } from '@/utils/message' import useStore from '@/stores' +import { t } from '@/locales' const router = useRouter() const route = useRoute() const { application } = useStore() diff --git a/ui/src/components/ai-chat/component/control/index.vue b/ui/src/components/ai-chat/component/control/index.vue index 9227d7b3d..9827149f4 100644 --- a/ui/src/components/ai-chat/component/control/index.vue +++ b/ui/src/components/ai-chat/component/control/index.vue @@ -16,7 +16,7 @@ import bus from '@/bus' import { ref, nextTick, onMounted } from 'vue' import { t } from '@/locales' const isOpen = ref(false) -const eventVal = ref({}) +const eventVal = ref() function getSelection() { const selection = window.getSelection() if (selection && selection.anchorNode == null) { diff --git a/ui/src/components/app-table/index.vue b/ui/src/components/app-table/index.vue index f5318e440..db9999480 100644 --- a/ui/src/components/app-table/index.vue +++ b/ui/src/components/app-table/index.vue @@ -45,6 +45,7 @@