From 05559eb3f4e66ab5de1e4d2ed8304afa9d32f023 Mon Sep 17 00:00:00 2001 From: ximena Date: Tue, 22 Jul 2025 20:05:41 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E6=9B=B4=E6=94=B9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../avatar/src/locales/designer/en.json | 3 ++ .../avatar/src/locales/designer/zh-CHS.json | 3 ++ .../avatar/src/locales/designer/zh-CHT.json | 3 ++ .../components/avatar/src/locales/ui/en.json | 10 +++++ .../avatar/src/locales/ui/zh-CHS.json | 10 +++++ .../avatar/src/locales/ui/zh-CHT.json | 10 +++++ .../condition/src/locales/designer/en.json | 3 ++ .../src/locales/designer/zh-CHS.json | 3 ++ .../src/locales/designer/zh-CHT.json | 3 ++ .../condition/src/locales/ui/en.json | 31 ++++++++++++++ .../condition/src/locales/ui/zh-CHS.json | 31 ++++++++++++++ .../condition/src/locales/ui/zh-CHT.json | 31 ++++++++++++++ .../drawer/src/locales/designer/en.json | 3 ++ .../drawer/src/locales/designer/zh-CHS.json | 3 ++ .../drawer/src/locales/designer/zh-CHT.json | 3 ++ .../components/drawer/src/locales/ui/en.json | 6 +++ .../drawer/src/locales/ui/zh-CHS.json | 6 +++ .../drawer/src/locales/ui/zh-CHT.json | 6 +++ .../locale/src/lib/locales/en-us/section.ts | 4 +- .../locale/src/lib/locales/en-us/tabs.ts | 7 +++- .../locale/src/lib/locales/zh-CHT/tabs.ts | 6 +-- .../locale/src/lib/locales/zh-cn/tabs.ts | 5 ++- .../src/locales/designer/en.json | 3 ++ .../src/locales/designer/zh-CHS.json | 3 ++ .../src/locales/designer/zh-CHT.json | 3 ++ .../query-solution/src/locales/ui/en.json | 41 +++++++++++++++++++ .../query-solution/src/locales/ui/zh-CHS.json | 41 +++++++++++++++++++ .../query-solution/src/locales/ui/zh-CHT.json | 41 +++++++++++++++++++ .../src/locales/designer/en.json | 3 ++ .../src/locales/designer/zh-CHS.json | 3 ++ .../src/locales/designer/zh-CHT.json | 3 ++ .../response-toolbar/src/locales/ui/en.json | 5 +++ .../src/locales/ui/zh-CHS.json | 5 +++ .../src/locales/ui/zh-CHT.json | 5 +++ .../section/src/locales/designer/en.json | 3 ++ .../section/src/locales/designer/zh-CHS.json | 3 ++ .../section/src/locales/designer/zh-CHT.json | 3 ++ .../components/section/src/locales/ui/en.json | 6 +++ .../section/src/locales/ui/zh-CHS.json | 6 +++ .../section/src/locales/ui/zh-CHT.json | 6 +++ .../tabs/src/locales/designer/en.json | 3 ++ .../tabs/src/locales/designer/zh-CHS.json | 3 ++ .../tabs/src/locales/designer/zh-CHT.json | 3 ++ .../components/tabs/src/locales/ui/en.json | 8 ++++ .../tabs/src/locales/ui/zh-CHS.json | 8 ++++ .../tabs/src/locales/ui/zh-CHT.json | 10 +++++ 46 files changed, 400 insertions(+), 8 deletions(-) create mode 100644 packages/ui-vue/components/avatar/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/avatar/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/avatar/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/avatar/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/avatar/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/avatar/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/condition/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/condition/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/condition/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/condition/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/condition/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/condition/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/drawer/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/drawer/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/drawer/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/drawer/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/drawer/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/drawer/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/section/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/section/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/section/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/section/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/section/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/section/src/locales/ui/zh-CHT.json create mode 100644 packages/ui-vue/components/tabs/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/tabs/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/tabs/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/tabs/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/tabs/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json diff --git a/packages/ui-vue/components/avatar/src/locales/designer/en.json b/packages/ui-vue/components/avatar/src/locales/designer/en.json new file mode 100644 index 00000000000..24fef8206de --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "avatar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/avatar/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..24fef8206de --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "avatar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/avatar/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..24fef8206de --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "avatar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/locales/ui/en.json b/packages/ui-vue/components/avatar/src/locales/ui/en.json new file mode 100644 index 00000000000..721ae0aac6d --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/ui/en.json @@ -0,0 +1,10 @@ +{ + "avatar": { + "imgtitle": "Amend", + "typeError": "Type error", + "sizeError": "Can not be larger than", + "uploadError": "Upload Fail!", + "loadError": "Load error.", + "loading": "Loading" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/avatar/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..bc71b8d1061 --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/ui/zh-CHS.json @@ -0,0 +1,10 @@ +{ + "avatar": { + "imgtitle": "点击修改", + "typeError": "上传图片类型不正确", + "sizeError": "上传图片不能大于", + "uploadError": "图片上传失败,请重试!", + "loadError": "加载错误", + "loading": "加载中" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/avatar/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..43b40e47cb9 --- /dev/null +++ b/packages/ui-vue/components/avatar/src/locales/ui/zh-CHT.json @@ -0,0 +1,10 @@ +{ + "avatar": { + "imgtitle": "點擊修改", + "typeError": "上傳圖片類型不正確", + "sizeError": "上傳圖片不能大於", + "uploadError": "圖片上傳失敗,請重試!", + "loadError": "加載錯誤", + "loading": "加載中" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/designer/en.json b/packages/ui-vue/components/condition/src/locales/designer/en.json new file mode 100644 index 00000000000..dff5ce4ec06 --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "condition": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/condition/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..dff5ce4ec06 --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "condition": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/condition/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..dff5ce4ec06 --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "condition": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/ui/en.json b/packages/ui-vue/components/condition/src/locales/ui/en.json new file mode 100644 index 00000000000..9c3c07c72ce --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/ui/en.json @@ -0,0 +1,31 @@ +{ + "condition": { + "add": "Add condition", + "create": "Create condition group", + "reset": "Reset", + "and": "And", + "or": "Or" + }, + "operators": { + "equal": "Equal", + "notEqual": "Not equal", + "greater": "Greater than", + "greaterOrEqual": "Greater than or equal", + "less": "Less than", + "lessOrEqual": "Less than or equal", + "contains": "Contains", + "notContains": "Does not contain", + "like": "Contains", + "notLike": "Does not contain", + "in": "In", + "notIn": "Not in", + "empty": "Is empty", + "notEmpty": "Is not empty", + "null": "Null", + "notNull": "Not null", + "startWith": "Starts with", + "endWith": "Ends with", + "and": "And", + "or": "Or" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/condition/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..a190333267b --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/ui/zh-CHS.json @@ -0,0 +1,31 @@ +{ + "condition": { + "add": "添加条件", + "create": "生成条件组", + "reset": "重置", + "and": "与", + "or": "或" + }, + "operators": { + "equal": "等于", + "notEqual": "不等于", + "greater": "大于", + "greaterOrEqual": "大于等于", + "less": "小于", + "lessOrEqual": "小于等于", + "contains": "包含", + "notContains": "不包含", + "like": "包含", + "notLike": "不包含", + "in": "属于", + "notIn": "不属于", + "empty": "为空", + "notEmpty": "不为空", + "null": "null", + "notNull": "不为null", + "startWith": "开始是", + "endWith": "结束是", + "and": "与", + "or": "或" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/condition/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/condition/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..eca49485ab4 --- /dev/null +++ b/packages/ui-vue/components/condition/src/locales/ui/zh-CHT.json @@ -0,0 +1,31 @@ +{ + "condition": { + "add": "新增條件", + "create": "建立條件群組", + "reset": "重設", + "and": "且", + "or": "或" + }, + "operators": { + "equal": "等於", + "notEqual": "不等於", + "greater": "大於", + "greaterOrEqual": "大於等於", + "less": "小於", + "lessOrEqual": "小於等於", + "contains": "包含", + "notContains": "不包含", + "like": "包含", + "notLike": "不包含", + "in": "屬於", + "notIn": "不屬於", + "empty": "為空", + "notEmpty": "不為空", + "null": "null", + "notNull": "不為null", + "startWith": "開始於", + "endWith": "結束於", + "and": "且", + "or": "或" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/designer/en.json b/packages/ui-vue/components/drawer/src/locales/designer/en.json new file mode 100644 index 00000000000..843a37826ae --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "drawer": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/drawer/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..843a37826ae --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "drawer": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/drawer/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..843a37826ae --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "drawer": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/ui/en.json b/packages/ui-vue/components/drawer/src/locales/ui/en.json new file mode 100644 index 00000000000..0df615ad2ca --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/ui/en.json @@ -0,0 +1,6 @@ +{ + "drawer": { + "cancel": "Cancel", + "confirm": "Confirm" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/drawer/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..6c05f8d49c5 --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/ui/zh-CHS.json @@ -0,0 +1,6 @@ +{ + "drawer": { + "cancel": "取消", + "confirm": "确定" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/drawer/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/drawer/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..47a14a3d0ab --- /dev/null +++ b/packages/ui-vue/components/drawer/src/locales/ui/zh-CHT.json @@ -0,0 +1,6 @@ +{ + "drawer": { + "cancel": "取消", + "confirm": "確定" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/locale/src/lib/locales/en-us/section.ts b/packages/ui-vue/components/locale/src/lib/locales/en-us/section.ts index 24773e33613..314047e54ae 100644 --- a/packages/ui-vue/components/locale/src/lib/locales/en-us/section.ts +++ b/packages/ui-vue/components/locale/src/lib/locales/en-us/section.ts @@ -1,4 +1,4 @@ export const SECTION_LOCALE = { - expandLabel: 'expand', - collapseLabel: 'collapse' + expandLabel: 'Expand', + collapseLabel: 'Collapse' }; diff --git a/packages/ui-vue/components/locale/src/lib/locales/en-us/tabs.ts b/packages/ui-vue/components/locale/src/lib/locales/en-us/tabs.ts index 738e422a361..4d3de58b2f4 100644 --- a/packages/ui-vue/components/locale/src/lib/locales/en-us/tabs.ts +++ b/packages/ui-vue/components/locale/src/lib/locales/en-us/tabs.ts @@ -1,3 +1,6 @@ -export const TABS_LOCALE = { - more: 'more', +export const TABS_LOCALE ={ + more: 'More', + leftButton: 'Left', + rightButton: 'Left', + noData: 'No data available' }; diff --git a/packages/ui-vue/components/locale/src/lib/locales/zh-CHT/tabs.ts b/packages/ui-vue/components/locale/src/lib/locales/zh-CHT/tabs.ts index 0f52d019a7a..0a11d3a65ac 100644 --- a/packages/ui-vue/components/locale/src/lib/locales/zh-CHT/tabs.ts +++ b/packages/ui-vue/components/locale/src/lib/locales/zh-CHT/tabs.ts @@ -1,6 +1,6 @@ export const TABS_LOCALE_ZHCHT = { more: '更多', - leftButton:'向左', - rightButton:'向左', - noData:'没有相关数据' + leftButton: '向左', + rightButton: '向左', + noData: '沒有相關數據' }; diff --git a/packages/ui-vue/components/locale/src/lib/locales/zh-cn/tabs.ts b/packages/ui-vue/components/locale/src/lib/locales/zh-cn/tabs.ts index 56801fcc259..5337524c41c 100644 --- a/packages/ui-vue/components/locale/src/lib/locales/zh-cn/tabs.ts +++ b/packages/ui-vue/components/locale/src/lib/locales/zh-cn/tabs.ts @@ -1,3 +1,6 @@ -export const TABS_LOCALE_ZHCHS = { +export const TABS_LOCALE_ZHCHS ={ more: '更多', + leftButton:'向左', + rightButton:'向左', + noData:'没有相关数据' }; diff --git a/packages/ui-vue/components/query-solution/src/locales/designer/en.json b/packages/ui-vue/components/query-solution/src/locales/designer/en.json new file mode 100644 index 00000000000..16a4a01cdd5 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "querySolution": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..16a4a01cdd5 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "querySolution": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..16a4a01cdd5 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "querySolution": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locales/ui/en.json b/packages/ui-vue/components/query-solution/src/locales/ui/en.json new file mode 100644 index 00000000000..8219ea8aa3f --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/ui/en.json @@ -0,0 +1,41 @@ +{ + "querySolution": { + "saveAsDialog": { + "queryPlanName": "Solution Name", + "setAsDefault": "Set as Default", + "confirm": "Confirm", + "cancel": "Cancel", + "caption": "Add New Solution", + "personal": "Personal Solution", + "system": "System Public Solution", + "nameNotify": "Please enter solution name", + "authNotify": "You do not have permission to modify public solutions.", + "success": "Query solution saved successfully.", + "maxLength": "Solution name cannot exceed 100 characters, please modify" + }, + "manageDialog": { + "caption": "Solution Management", + "default": "Default", + "system": "System Public", + "saveAs": "Save As", + "save": "Save", + "manage": "Manage", + "isDefault": "Default Solution", + "code": "Name", + "type": "Type", + "private": "Personal Solution", + "public": "System Public Solution", + "org": "Organization Public Solution", + "remove": "Delete" + }, + "configDialog": { + "caption": "Filter Configuration" + }, + "container": { + "filter": "Filter", + "default": "Default Filter Solution", + "clear": "Clear", + "require": "Please fill in {fields} before filtering" + } + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..db33ab54e67 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHS.json @@ -0,0 +1,41 @@ +{ + "querySolution":{ + "saveAsDialog": { + "queryPlanName": "方案名称", + "setAsDefault": "设为默认", + "confirm": "确定", + "cancel": "取消", + "caption": "新增方案", + "personal": "用户个人方案", + "system": "系统公共方案", + "nameNotify": "请填写方案名称", + "authNotify": "您暂无权限修改公共类型方案。", + "success": "查询方案保存成功。", + "maxLength": "方案名称最多100个字符,超出请修改" + }, + "manageDialog": { + "caption": "方案管理", + "default": "默认", + "system": "系统公共", + "saveAs": "另存为", + "save": "保存", + "manage": "管理", + "isDefault": "默认方案", + "code": "名称", + "type": "属性", + "private": "用户个人方案", + "public": "系统公共方案", + "org": "组织公共方案", + "remove": "删除" + }, + "configDialog": { + "caption": "筛选条件配置" + }, + "container": { + "filter": "筛选", + "default": "默认筛选方案", + "clear": "清空", + "require": "请填写{fields}再进行筛选" + } + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..6b1e42ef822 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json @@ -0,0 +1,41 @@ +{ + "querySolution": { + "saveAsDialog": { + "queryPlanName": "方案名稱", + "setAsDefault": "設為預設", + "confirm": "確定", + "cancel": "取消", + "caption": "新增方案", + "personal": "使用者個人方案", + "system": "系統公共方案", + "nameNotify": "請填寫方案名稱", + "authNotify": "您暫無權限修改公共類型方案。", + "success": "查詢方案儲存成功。", + "maxLength": "方案名稱最多100個字元,超出請修改" + }, + "manageDialog": { + "caption": "方案管理", + "default": "預設", + "system": "系統公共", + "saveAs": "另存為", + "save": "儲存", + "manage": "管理", + "isDefault": "預設方案", + "code": "名稱", + "type": "屬性", + "private": "使用者個人方案", + "public": "系統公共方案", + "org": "組織公共方案", + "remove": "刪除" + }, + "configDialog": { + "caption": "篩選條件配置" + }, + "container": { + "filter": "篩選", + "default": "預設篩選方案", + "clear": "清空", + "require": "請填寫{fields}再進行篩選" + } + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/designer/en.json b/packages/ui-vue/components/response-toolbar/src/locales/designer/en.json new file mode 100644 index 00000000000..c6e8f69debd --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "responseToolbar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..c6e8f69debd --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "responseToolbar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..c6e8f69debd --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "responseToolbar": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/ui/en.json b/packages/ui-vue/components/response-toolbar/src/locales/ui/en.json new file mode 100644 index 00000000000..916cfe3b4dc --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/ui/en.json @@ -0,0 +1,5 @@ +{ + "responseToolbar": { + "more": "More" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..e9965c23d7e --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHS.json @@ -0,0 +1,5 @@ +{ + "responseToolbar": { + "more": "更多" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..e9965c23d7e --- /dev/null +++ b/packages/ui-vue/components/response-toolbar/src/locales/ui/zh-CHT.json @@ -0,0 +1,5 @@ +{ + "responseToolbar": { + "more": "更多" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/designer/en.json b/packages/ui-vue/components/section/src/locales/designer/en.json new file mode 100644 index 00000000000..8d5d0a10bef --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "section": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/section/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..8d5d0a10bef --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "section": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/section/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..8d5d0a10bef --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "section": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/ui/en.json b/packages/ui-vue/components/section/src/locales/ui/en.json new file mode 100644 index 00000000000..753884c4711 --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/ui/en.json @@ -0,0 +1,6 @@ +{ + "section": { + "expandLabel": "Expand", + "collapseLabel": "Collapse" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/section/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..26be50434cd --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/ui/zh-CHS.json @@ -0,0 +1,6 @@ +{ + "section": { + "expandLabel": "展开", + "collapseLabel": "收起" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/section/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..90163076e18 --- /dev/null +++ b/packages/ui-vue/components/section/src/locales/ui/zh-CHT.json @@ -0,0 +1,6 @@ +{ + "section": { + "expandLabel": "展開", + "collapseLabel": "收起" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/designer/en.json b/packages/ui-vue/components/tabs/src/locales/designer/en.json new file mode 100644 index 00000000000..c73d16f71ad --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/designer/en.json @@ -0,0 +1,3 @@ +{ + "tabs": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/designer/zh-CHS.json b/packages/ui-vue/components/tabs/src/locales/designer/zh-CHS.json new file mode 100644 index 00000000000..c73d16f71ad --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/designer/zh-CHS.json @@ -0,0 +1,3 @@ +{ + "tabs": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/designer/zh-CHT.json b/packages/ui-vue/components/tabs/src/locales/designer/zh-CHT.json new file mode 100644 index 00000000000..c73d16f71ad --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/designer/zh-CHT.json @@ -0,0 +1,3 @@ +{ + "tabs": {} +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/ui/en.json b/packages/ui-vue/components/tabs/src/locales/ui/en.json new file mode 100644 index 00000000000..7cf1c983c4e --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/ui/en.json @@ -0,0 +1,8 @@ +{ + "tabs": { + "more": "More", + "leftButton": "Left", + "rightButton": "Right", + "noData": "No data available" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/ui/zh-CHS.json b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHS.json new file mode 100644 index 00000000000..b0559f1a4b9 --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHS.json @@ -0,0 +1,8 @@ +{ + "tabs": { + "more": "更多", + "leftButton": "向左", + "rightButton": "向左", + "noData": "没有相关数据" + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json new file mode 100644 index 00000000000..30fd17f4bfd --- /dev/null +++ b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json @@ -0,0 +1,10 @@ +{ + "tabs": { + "more": { + "more": "更多", + "leftButton": "向左", + "rightButton": "向左", + "noData": "沒有相關數據" + } + } +} \ No newline at end of file -- Gitee From 73e6ef486ed37fc02299319b9cd5f0440e48bd5d Mon Sep 17 00:00:00 2001 From: ximena Date: Thu, 24 Jul 2025 14:41:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../avatar/src/avatar.component.tsx | 6 +- .../components/avatar/src/locale/locale.ts | 12 - .../components/condition/src/locale/locale.ts | 31 +- .../locale/src/lib/locale.service.ts | 18 +- .../locale/src/lib/locales/design/zh-CHT.json | 1242 +++++++++++++++++ .../query-solution/src/locale/locale.ts | 157 ++- .../response-toolbar/src/locale/locale.ts | 7 - .../src/response-toolbar.component.tsx | 6 +- .../src/components/header.component.tsx | 8 +- .../components/section/src/locale/locale.ts | 13 - .../tab-header-dropdown-menu.component.tsx | 7 +- .../components/tabs/src/locale/locale.ts | 7 - .../components/tabs/src/tabs.component.tsx | 13 +- .../transfer/src/locales/designer/en.json | 3 + .../transfer/src/locales/designer/zh-CHS.json | 3 + .../transfer/src/locales/designer/zh-CHT.json | 3 + .../transfer/src/locales/ui/en.json | 6 + .../transfer/src/locales/ui/zh-CHS.json | 6 + .../transfer/src/locales/ui/zh-CHT.json | 6 + .../transfer/src/transfer.component.tsx | 13 +- 20 files changed, 1410 insertions(+), 157 deletions(-) delete mode 100644 packages/ui-vue/components/avatar/src/locale/locale.ts create mode 100644 packages/ui-vue/components/locale/src/lib/locales/design/zh-CHT.json delete mode 100644 packages/ui-vue/components/response-toolbar/src/locale/locale.ts delete mode 100644 packages/ui-vue/components/section/src/locale/locale.ts delete mode 100644 packages/ui-vue/components/tabs/src/locale/locale.ts create mode 100644 packages/ui-vue/components/transfer/src/locales/designer/en.json create mode 100644 packages/ui-vue/components/transfer/src/locales/designer/zh-CHS.json create mode 100644 packages/ui-vue/components/transfer/src/locales/designer/zh-CHT.json create mode 100644 packages/ui-vue/components/transfer/src/locales/ui/en.json create mode 100644 packages/ui-vue/components/transfer/src/locales/ui/zh-CHS.json create mode 100644 packages/ui-vue/components/transfer/src/locales/ui/zh-CHT.json diff --git a/packages/ui-vue/components/avatar/src/avatar.component.tsx b/packages/ui-vue/components/avatar/src/avatar.component.tsx index 8108d2ccaa3..e7448aca6db 100644 --- a/packages/ui-vue/components/avatar/src/avatar.component.tsx +++ b/packages/ui-vue/components/avatar/src/avatar.component.tsx @@ -16,14 +16,14 @@ import { defineComponent, computed, ref, SetupContext } from 'vue'; import { avatarProps, AvatarProps } from './avatar.props'; import { useImage } from './composition/use-image'; -import { useAvatarLocale } from './locale/locale'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); export default defineComponent({ name: 'FAvatar', props: avatarProps, emits: ['change', 'update:modelValue'] as (string[] & ThisType) | undefined, setup(props: AvatarProps, context: SetupContext) { - const { avatarLocale } = useAvatarLocale(); const avatarClass = computed(() => ({ 'f-avatar': true, 'f-avatar-readonly': props.readonly, @@ -58,7 +58,7 @@ export default defineComponent({
{showLoading && (
-
{avatarLocale.loading}
+
{t('avatar.loading')}
)} diff --git a/packages/ui-vue/components/avatar/src/locale/locale.ts b/packages/ui-vue/components/avatar/src/locale/locale.ts deleted file mode 100644 index 2f39059f36f..00000000000 --- a/packages/ui-vue/components/avatar/src/locale/locale.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { LocaleService } from '../../../locale'; -/** - * 此处当做静态处理 - * @param props - * @returns - */ -export function useAvatarLocale() { - const avatarLocale = { - loading: LocaleService.getLocaleValue('avatar.loading') - }; - return { avatarLocale }; -} diff --git a/packages/ui-vue/components/condition/src/locale/locale.ts b/packages/ui-vue/components/condition/src/locale/locale.ts index 8bb71565461..90a206df5eb 100644 --- a/packages/ui-vue/components/condition/src/locale/locale.ts +++ b/packages/ui-vue/components/condition/src/locale/locale.ts @@ -1,4 +1,5 @@ -import { LocaleService } from '../../../locale'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); /** * 此处当做静态处理 * @param props @@ -7,27 +8,27 @@ import { LocaleService } from '../../../locale'; export function useConditionListLocale() { const conditionListLocale = { // 添加条件 - add: LocaleService.getLocaleValue('condition.add'), + add: t('condition.add'), // 生成条件组 - create: LocaleService.getLocaleValue('condition.create'), + create: t('condition.create'), // 重置 - reset: LocaleService.getLocaleValue('condition.reset'), - and:LocaleService.getLocaleValue('condition.and'), - or:LocaleService.getLocaleValue('condition.or'), + reset: t('condition.reset'), + and:t('condition.and'), + or:t('condition.or'), }; return { conditionListLocale }; } export function useCompareLocale() { const operatorsLocale = { - equal: LocaleService.getLocaleValue('operators.equal'), - notEqual: LocaleService.getLocaleValue('operators.notEqual'), - greater: LocaleService.getLocaleValue('operators.greater'), - greaterOrEqual: LocaleService.getLocaleValue('operators.greaterOrEqual'), - lessOrEqual: LocaleService.getLocaleValue('operators.lessOrEqual'), - less: LocaleService.getLocaleValue('operators.less'), - contains: LocaleService.getLocaleValue('operators.contains'), - startWith: LocaleService.getLocaleValue('operators.startWith'), - endWith: LocaleService.getLocaleValue('operators.endWith'), + equal: t('operators.equal'), + notEqual: t('operators.notEqual'), + greater: t('operators.greater'), + greaterOrEqual: t('operators.greaterOrEqual'), + lessOrEqual: t('operators.lessOrEqual'), + less: t('operators.less'), + contains: t('operators.contains'), + startWith: t('operators.startWith'), + endWith: t('operators.endWith'), }; return { operatorsLocale }; } diff --git a/packages/ui-vue/components/locale/src/lib/locale.service.ts b/packages/ui-vue/components/locale/src/lib/locale.service.ts index d5e19832e9a..e3c68045ff9 100644 --- a/packages/ui-vue/components/locale/src/lib/locale.service.ts +++ b/packages/ui-vue/components/locale/src/lib/locale.service.ts @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { createI18n, I18n } from 'vue-i18n'; +import { createI18n, I18n,useI18n} from 'vue-i18n'; import { DEFAULT_LOCALE_CONFIG, LocaleConfig, LocaleResources } from './types'; import { App } from 'vue'; import { useResourceLoader } from './composition'; - +const { t } = useI18n(); export class LocaleService { private static i18n: I18n; private static config: LocaleConfig; @@ -42,8 +42,18 @@ export class LocaleService { public static getLocaleValue(key: string) { return LocaleService.i18n &&LocaleService.i18n.global.te(key) || key; } - public static getRealPropertyValue(key: string){ - return LocaleService.i18n &&LocaleService.i18n.global.te(key) || key; + /** + * 属性空值或者有值但等于默认值,返回默认值多语言属性;有值但不相等返回当前属性自有值 + * @param propertyValue + * @param defaultValue + * @param localeKey + * @returns + */ + public static getRealPropertyValue(propertyValue, defaultValue, localeKey) { + if (!propertyValue || propertyValue === defaultValue) { + return t(localeKey); + } + return propertyValue } private static async loadResources(config: Partial = {}): Promise> { const resources: Record = {}; diff --git a/packages/ui-vue/components/locale/src/lib/locales/design/zh-CHT.json b/packages/ui-vue/components/locale/src/lib/locales/design/zh-CHT.json new file mode 100644 index 00000000000..c5335671a31 --- /dev/null +++ b/packages/ui-vue/components/locale/src/lib/locales/design/zh-CHT.json @@ -0,0 +1,1242 @@ +{ + "design-controls": { + "expression": { + "readonlyEditor": "只讀表達式編輯器", + "requireEditor": "必填表達式編輯器", + "visibleEditor": "可見表達式編輯器", + "disableEditor": "禁用表達式編輯器", + "computeEditor": "計算表達式編輯器", + "validateEditor": "校驗表達式編輯器", + "dependencyEditor": "依賴表達式編輯器", + "dataPickingEditor": "幫助前表達式編輯器" + }, + "propertyTrueText": "是", + "propertyFalseText": "否", + "properties": { + "tab": { + "gridFieldEditor": "編輯器", + "tableTdEditor": "編輯器", + "eventEditor": "交互", + "appearance": "樣式", + "commands": "交互", + "expressons": "表達式" + }, + "common": { + "id": { + "name": "標識", + "description": "組件的ID" + }, + "type": { + "name": "控件類型", + "description": "組件的類型" + }, + "bingding": { + "name": "綁定", + "description": "綁定字段的編號。必須以小寫英文字母開頭, 並且只能由英文字母、數字組成!" + }, + "label": { + "name": "標簽", + "description": "標簽名稱" + }, + "showLabelType": { + "name": "標籤顯示", + "description": "標籤顯示方式: 1、顯示:顯示標籤2、占位:保留標籤空間,但不顯示文字3、不顯示:不顯示標籤", + "editor": { + "data": [ + { + "id": "visible", + "name": "顯示" + }, + { + "id": "reserve-space", + "name": "占位" + }, + { + "id": "none", + "name": "不顯示" + } + ] + } + }, + "class": { + "name": "class樣式", + "description": "組件的CSS樣式" + }, + "style": { + "name": "style樣式", + "description": "組件的內聯樣式" + }, + "responseLayout": { + "name": "響應式列寬", + "description": "響應式列寬" + }, + "visible": { + "name": "是否可見", + "description": "運行時組件是否可見", + "editor": { + "data": [ + { + "id": true, + "name": "是" + }, + { + "id": false, + "name": "否" + } + ] + } + }, + "readonly": { + "name": "只讀", + "description": "是否只讀", + "editor": { + "data": [ + { + "id": true, + "name": "是" + }, + { + "id": false, + "name": "否" + } + ] + } + }, + "required": { + "name": "必填", + "description": "是否必填", + "editor": { + "data": [ + { + "id": true, + "name": "是" + }, + { + "id": false, + "name": "否" + } + ] + } + }, + "placeholder": { + "name": "提示文字", + "description": "當控制項沒有值時在輸入框中顯示的文字" + }, + "compute": { + "name": "計算表達式", + "description": "計算表達式" + }, + "dependency": { + "name": "依賴表達式", + "description": "依賴表達式" + }, + "validate": { + "name": "校驗表達式", + "description": "校驗表達式" + }, + "dataPicking": { + "name": "幫助前表達式", + "description": "幫助前表達式" + } + }, + "category": { + "basic": "基本信息", + "appearance": "外觀", + "behavior": "行為", + "inputAppend": "擴展區域", + "gridFieldEditor_editorType": "編輯器類型", + "appearanceClass": "外聯樣式", + "appearanceStyle": "內聯樣式", + "custom": "高級", + "expressionData": "表達式", + "usual": "常規" + }, + "commands": { + "click": { + "name": "點擊事件" + }, + "inputAppendClickEvent": { + "name": "擴展按鈕點擊事件" + }, + "linkedLabelClick": { + "name": "標簽超鏈事件" + }, + "fieldValueChanging": { + "name": "綁定字段值變化前事件" + }, + "fieldValueChanged": { + "name": "綁定字段值變化後事件" + } + } + } + }, + "design-combo-list": { + "placeholder":"" + "properties": { + "editor": { + "editable": { + "name": "允許編輯" + }, + "enableClear": { + "name": "啟用清空" + }, + "dataSourceType": { + "name": "數據源類型" + }, + "data": { + "name": "數據" + }, + "url": { + "name": "服務端API" + }, + "body": { + "name": "服務端API參數" + }, + "textField": { + "name": "數據源顯示字段" + }, + "valueField": { + "name": "數據源值字段" + }, + "multiSelect": { + "name": "啟用多選" + }, + "maxLength": { + "name": "最大輸入長度" + } + } + }, + "commands": {} + }, + "design-lookup": { + "properties": { + "lookup": { + "enableTitle": { + "name": "懸停提示", + "description": "鼠標懸停顯示文本內容" + }, + "editable": { + "name": "允許編輯" + }, + "allowFreeInput": { + "name": "任意輸入" + }, + "enableClear": { + "name": "啟用清除按鈕" + }, + "dataSource": { + "name": "數據源", + "description": "數據源" + }, + "filterConditions": { + "name": "過濾條件" + }, + "displayType": { + "name": "展示類型", + "description": "類型: 樹列表、列表、雙列表、左樹右列表" + }, + "idField": { + "name": "標識字段", + "description": "數據源標識字段" + }, + "textField": { + "name": "文本字段", + "description": "顯示文本字段" + }, + "mappingFields": { + "name": "字段映射", + "description": "字段映射" + }, + "enableToSelect": { + "name": "選中已選值", + "description": "數據加載後是否選中現有值" + }, + "multiSelect": { + "name": "啟用多選", + "description": "啟用多選" + }, + "showSelections": { + "name": "顯示已選記錄", + "description": "顯示已選記錄" + }, + "separator": { + "name": "多選分隔符", + "description": "多選分隔符" + }, + "enableSearchBar": { + "name": "啟用搜索框", + "description": "顯示搜索工具條" + }, + "searchAnyField": { + "name": "允許查詢所有列", + "description": "顯示所有列" + }, + "enableFavorite": { + "name": "啟用收藏夾", + "description": "啟用收藏夾" + }, + "enableUserData": { + "name": "保存界面狀態", + "description": "保存界面狀態" + } + }, + "treeConfig": { + "treeToList": { + "name": "以列表形式展示", + "description": "以列表的形式展示樹結構數據" + }, + "navTreeToList": { + "name": "以列表形式展示", + "description": "以列表的形式展示樹結構數據" + }, + "loadTreeDataType": { + "name": "數據加載方式", + "description": "樹形數據加載方式" + }, + "enableFullTree": { + "name": "構造完整樹", + "description": "啟用構造完整樹" + }, + "onlySelectLeaf": { + "name": "僅選擇葉子節點", + "description": "僅選擇葉子節點" + }, + "enableCascade": { + "name": "啟用級聯選擇", + "description": "啟用級聯選擇" + }, + "showCascadeControl": { + "name": "顯示級聯選擇控件", + "description": "顯示級聯選擇控件" + }, + "cascadeValue": { + "name": "級聯狀態", + "description": "級聯選擇默認狀態" + }, + "expandLevel": { + "name": "默認展開層級", + "description": "默認展開層級: 0: 不展開; -1: 全部展開;>0: 展開到指定級數 " + } + }, + "dialog": { + "openType": { + "name": "打開方式", + "description": "窗口展示方式:彈出窗口、下拉面板" + }, + "title": { + "name": "標題", + "description": "幫助標題" + }, + "width": { + "name": "寬度", + "description": "窗口寬度,最小值:300px" + }, + "height": { + "name": "高度", + "description": "窗口高度,最小值:200px" + }, + "showNavigation": { + "name": "顯示導航欄", + "description": "顯示導航欄" + }, + "navigatorWidth": { + "name": "導航欄寬度", + "description": "導航欄寬度,最小200px, 最大為窗口寬度減去200px" + }, + "resizeable": { + "name": "允許調整窗口尺寸", + "description": "允許鼠標拖拽窗口邊緣調整尺寸" + }, + "rememberSize": { + "name": "記錄窗口尺寸", + "description": "記錄窗口尺寸" + }, + "enableEsc": { + "name": "允許ESC關閉", + "description": "允許ESC關閉" + }, + "showMaxButton": { + "name": "顯示最大化按鈕", + "description": "顯示最大化按鈕" + }, + "showCloseButton": { + "name": "顯示關閉按鈕", + "description": "顯示關閉按鈕" + } + }, + "pager": { + "showLimits": { + "name": "顯示條數選擇器", + "description": "顯示每頁條數選擇器" + }, + "sizeLimits": { + "name": "每頁顯示條數", + "description": "每頁可顯示條數" + }, + "size": { + "name": "默認顯示條數", + "description": "默認顯示條數" + } + } + }, + "commands": { + "clear": { + "name": "清除事件1" + }, + "lookupPicking": { + "name": "幫助前事件1" + }, + "lookupPicked": { + "name": "幫助後事件1" + }, + "beforeSelectData": { + "name": "數據選擇確認前事件1" + }, + "beforeShow": { + "name": "面板顯示前事件1" + }, + "beforeHide": { + "name": "面板隱藏前事件1" + }, + "onShown": { + "name": "面板打開事件1" + }, + "onHidden": { + "name": "面板關閉事件1" + } + } + }, + "design-input-group": { + "properties": { + "editor": { + "maxLength": { + "name": "最大長度", + "description": "文本字數最大長度" + }, + "enableViewPassword": { + "name": "啟用密碼" + } + }, + "formatValidation": { + "type": { + "name": "輸入類型", + "description": "輸入類型" + } + } + }, + "commands": {} + }, + "design-textarea": { + "properties": { + "editor": { + "resizable": { + "name": "拖拽調整大小" + }, + "autoHeight": { + "name": "自動高度" + } + } + }, + "commands": {} + }, + "design-button": { + "properties": { + "basic": { + "text": { + "name": "文本" + } + }, + "appearance": { + "icon": { + "name": "圖標" + }, + "split": { + "name": "下拉按鈕分離", + "description": "啟用下拉按鈕分離,可以單獨點擊按鈕。單獨點擊下拉按鈕展開下拉面板" + }, + "tipsEnable": { + "name": "啟用提示", + "description": "當啟用提示時,鼠標滑過按鈕會有消息提示框" + }, + "tipsText": { + "name": "提示消息內容", + "description": "消息提示框內的展示內容" + } + }, + "behavior": { + "visible": { + "name": "是否可見", + "description": "運行時組件是否可見" + }, + "disabled": { + "name": "禁用", + "description": "按鈕禁用狀態" + } + } + }, + "commands": {} + }, + "design-response-toolbar": { + "properties": { + "layout": { + "layout": { + "name": "", + "description": "配置布局容器內區塊個數及比例。" + } + } + }, + "commands": {} + }, + "design-response-toolbar-item": { + "properties": {}, + "commands": {} + }, + "design-content-container": { + "properties": {}, + "commands": {} + }, + "design-number-spinner": { + "properties": { + "editor": { + "precision": { + "name": "精度" + }, + "step": { + "name": "步長" + }, + "max": { + "name": "最大值" + }, + "min": { + "name": "最小值" + }, + "textAlign": { + "name": "對齊方式" + } + } + }, + "commands": {} + }, + "design-date-picker": { + "properties": { + "editor": { + "showTime": { + "name": "啟用時間選擇" + }, + "displayFormat": { + "name": "展示格式" + }, + "valueFormat": { + "name": "存儲格式" + }, + "minDate": { + "name": "最小日期" + }, + "maxDate": { + "name": "最大日期" + } + } + }, + "commands": {} + }, + "design-switch": { + "properties": { + "editor": { + "onLabel": { + "name": "打開標簽" + }, + "offLabel": { + "name": "關閉標簽" + }, + "onBackground": { + "name": "打開背景色", + "description": "值可以是顏色或者16進制顏色字符串,比如:blue或者#2A87FF" + }, + "offBackground": { + "name": "關閉背景色", + "description": "值可以是顏色或者16進制顏色字符串,比如:gray或者#D9DEE7" + }, + "size": { + "name": "尺寸" + }, + "trueValue": { + "name": "打開的值", + "description": "打開時的值" + }, + "falseValue": { + "name": "關閉的值", + "description": "關閉時的值" + } + } + }, + "commands": {} + }, + "design-radio-group": { + "properties": { + "editor": { + "direction": { + "name": "排列方向" + }, + "dataSourceType": { + "name": "數據源類型" + }, + "data": { + "name": "數據" + }, + "bindDataSource": { + "name": "綁定數據源" + }, + "textField": { + "name": "文本字段" + }, + "valueField": { + "name": "值字段" + } + } + }, + "commands": {} + }, + "design-check-box": { + "properties": { + "editor": { + "label": { + "name": "名稱" + }, + "trueValue": { + "name": "選中的值", + "description": "選中的值" + }, + "falseValue": { + "name": "未選中的值", + "description": "未選中的值" + } + } + }, + "commands": {} + }, + "design-check-group": { + "properties": { + "editor": { + "direction": { + "name": "排列方向" + }, + "dataSourceType": { + "name": "數據源類型" + }, + "data": { + "name": "數據" + }, + "bindDataSource": { + "name": "綁定數據源" + }, + "textField": { + "name": "文本字段" + }, + "valueField": { + "name": "值字段" + } + } + }, + "commands": {} + }, + { + "design-response-form": { + "properties": { + "appearance": { + "labelAutoOverflow": { + "name": "控件標籤換行", + "description": "控件標籤字數超長時,換行顯示。控件標籤與輸入框在一行展示時,此屬性有效。" + }, + "unifiedLayout": { + "name": "統一佈局配置", + "description": "統一配置卡片區域內所有控件的寬度,只支持標準模式" + } + } + }, + "commands": {} + }, + "design-response-layout": { + "properties": {}, + "commands": {} + }, + "design-response-layout-item": { + "properties": {}, + "commands": {} + }, + "design-tree-grid": { + "properties": { + "appearance": { + "columns": { + "name": "列設置", + "description": "列設置" + }, + "fit": { + "name": "適配父組件尺寸", + "description": "是否適配父組件尺寸" + }, + "showStripe": { + "name": "顯示條紋", + "description": "是否顯示條紋" + }, + "showBorder": { + "name": "顯示邊框", + "description": "是否顯示邊框" + } + }, + "pagination": { + "enable": { + "name": "啟用分頁" + }, + "showIndex": { + "name": "顯示頁碼" + }, + "showLimits": { + "name": "顯示每頁記錄數" + } + } + }, + "commands": {} + }, + "design-tree-grid-column": { + "properties": { + "appearance": { + "resizable": { + "name": "拖拽改變列寬", + "description": "允許拖拽改變列寬" + }, + "width": { + "name": "列寬", + "description": "列寬" + }, + "showTips": { + "name": "鼠標懸浮提示", + "description": "啟用鼠標懸浮提示" + }, + "halign": { + "name": "標題對齊方式", + "description": "標題對齊方式" + }, + "align": { + "name": "數據水平對齊方式", + "description": "數據水平對齊方式選擇" + }, + "valign": { + "name": "數據垂直對齊方式", + "description": "數據垂直對齊方式選擇" + }, + "columnTemplate": { + "name": "列模板", + "description": "列模板" + }, + "enableSummary": { + "name": "啟用合計", + "description": "啟用合計" + } + }, + "behavior": { + "formatterEnumData": { + "name": "數據" + } + } + }, + "commands": {} + }, + "design-data-grid": { + "properties": { + "appearance": { + "columns": { + "name": "列設置", + "description": "列設置" + }, + "showStripe": { + "name": "顯示條紋", + "description": "是否顯示條紋" + }, + "showSetting": { + "name": "顯示設置按鈕", + "description": "是否顯示設置按鈕" + } + }, + "selection": { + "multiSelect": { + "name": "啟用多選" + }, + "showCheckbox": { + "name": "顯示複選框" + }, + "showSelectAll": { + "name": "顯示全選" + } + }, + "rowNumber": { + "enable": { + "name": "顯示行號" + }, + "width": { + "name": "寬度" + }, + "heading": { + "name": "標題" + } + }, + "pagination": { + "enable": { + "name": "啟用分頁" + }, + "showIndex": { + "name": "顯示頁碼" + }, + "showLimits": { + "name": "顯示分頁條數" + } + }, + "command": { + "enable": { + "name": "啟用", + "description": "啟用操作列" + } + }, + "column": { + "fitColumns": { + "name": "啟用", + "description": "啟用填充列寬" + } + }, + "summary": { + "enable": { + "name": "啟用", + "description": "啟用合計行" + } + } + }, + "commands": {} + }, + "design-data-grid-column": { + "properties": { + "appearance": { + "resizable": { + "name": "拖拽改變列寬", + "description": "允許拖拽改變列寬" + }, + "width": { + "name": "列寬", + "description": "列寬" + }, + "showTips": { + "name": "鼠標懸浮提示", + "description": "啟用鼠標懸浮提示" + }, + "halign": { + "name": "標題對齊方式", + "description": "標題對齊方式" + }, + "align": { + "name": "數據水平對齊方式", + "description": "數據水平對齊方式選擇" + }, + "valign": { + "name": "數據垂直對齊方式", + "description": "數據垂直對齊方式選擇" + }, + "columnTemplate": { + "name": "列模板", + "description": "列模板" + }, + "enableSummary": { + "name": "啟用合計", + "description": "啟用合計" + } + }, + "behavior": { + "formatterEnumData": { + "name": "數據" + } + }, + "gridFieldEditor_editorType": { + "type": { + "name": "編輯器類型" + } + }, + "gridFieldEditor_editor": { + "maxLength": { + "name": "最大長度", + "description": "文本字數最大長度" + }, + "enableViewPassword": { + "name": "啟用密碼" + } + }, + "formatter": { + "type": { + "name": "類型" + }, + "trueText": { + "name": "布爾為true時文本", + "description": "布爾為true時文本" + }, + "falseText": { + "name": "布爾為false時文本", + "description": "布爾為false時文本" + }, + "prefix": { + "name": "前綴", + "description": "前綴" + }, + "suffix": { + "name": "後綴", + "description": "後綴" + }, + "precision": { + "name": "精度", + "description": "精度" + }, + "decimal": { + "name": "小數分隔符", + "description": "小數分隔符" + }, + "thousand": { + "name": "千分位", + "description": "千分位" + } + } + }, + "commands": {} + }, + "design-module": { + "properties": { + "basic": { + "id": { + "name": "表單元數據標識" + }, + "code": { + "name": "表單元數據編號" + }, + "name": { + "name": "表單元數據名稱" + } + } + }, + "commands": {} + }, + "design-component": { + "properties": { + "appearance": { + "name": { + "name": "組件名稱", + "description": "組件名稱" + } + }, + "behavior": { + "enableValidation": { + "name": "啟用校驗", + "description": "運行時組件是否啟用校驗" + } + } + }, + "commands": {} + }, + "design-tabs": { + "properties": { + "appearance": { + "titleWidth": { + "name": "標題區域寬度(%)", + "description": "標題區域寬度佔標籤頭部區域的橫向比例" + }, + "autoTitleWidth": { + "name": "標題自適應寬度", + "description": "是,則標題顯示全部字符;否,則標題最多顯示20個字符" + }, + "fill": { + "name": "填充", + "description": "flex佈局下,是否填充滿剩餘部分" + } + }, + "behavior": { + "activeId": { + "name": "默認選中標籤頁", + "description": "默認選中標籤頁" + } + } + }, + "commands": {} + }, + "design-tab-page": { + "properties": { + "basic": { + "title": { + "name": "標題", + "description": "標籤頁項的標題" + } + }, + "appearance": { + "customTitleClass": { + "name": "標題樣式", + "description": "為標籤頁的標題指定樣式" + }, + "tabWidth": { + "name": "標籤頁的標題寬度(px)", + "description": "為標籤頁的標題指定寬度" + } + }, + "behavior": { + "show": { + "name": "是否可見", + "description": "是否可見" + }, + "disabled": { + "name": "是否禁用", + "description": "是否禁用" + }, + "removeable": { + "name": "是否可移除", + "description": "是否可移除" + } + }, + "toolbar": { + "toolbarPosition": { + "name": "工具欄位置", + "description": "為工具欄指定位置" + } + } + }, + "commands": {} + }, + "design-tab-toolbar-item": { + "properties": { + "basic": { + "text": { + "name": "文本" + } + }, + "appearance": { + "split": { + "name": "下拉按鈕分離", + "description": "啟用下拉按鈕分離,可以單獨點擊按鈕。單獨點擊下拉按鈕展開下拉面板" + } + } + }, + "commands": {} + }, + "design-html-template": { + "properties": {}, + "commands": {} + }, + "design-time-picker": { + "properties": { + "editor": { + "editable": { + "name": "允許編輯" + }, + "format": { + "name": "格式" + }, + "showHeader": { + "name": "是否顯示時分秒標題" + }, + "use12Hours": { + "name": "是否使用12小時制" + }, + "hourStep": { + "name": "時步長" + }, + "minuteStep": { + "name": "分步長" + }, + "secondStep": { + "name": "秒步長" + } + } + }, + "commands": {} + }, + "design-section": { + "properties": { + "appearance": { + "fill": { + "name": "填充內容區域" + }, + "showHeader": { + "name": "顯示標題區域" + }, + "mainTitle": { + "name": "主標題" + }, + "subTitle": { + "name": "副標題" + }, + "enableAccordion": { + "name": "面板收折", + "description": "是否啟用分組面板的收折特性" + }, + "expandStatus": { + "name": "默認狀態", + "description": "默認面板是展開還是收起" + } + } + }, + "commands": {} + }, + "design-section-toolbar": { + "properties": {}, + "commands": {} + }, + "design-section-toolbar-item": { + "properties": { + "appearance": { + "split": { + "name": "下拉按鈕分離", + "description": "啟用下拉按鈕分離,可以單獨點擊按鈕。單獨點擊下拉按鈕展開下拉面板" + }, + "tipsEnable": { + "name": "啟用提示", + "description": "當啟用提示時,鼠標滑過按鈕會有消息提示框" + }, + "tipsText": { + "name": "提示消息內容", + "description": "消息提示框內的展示內容" + } + } + }, + "commands": {} + }, + "design-splitter": { + "properties": {}, + "commands": {} + }, + "design-splitter-pane": { + "properties": { + "appearance": { + "minWidth": { + "name": "最小寬度(px)", + "description": "面板最小寬度" + }, + "minHeight": { + "name": "最小高度(px)", + "description": "面板最小高度" + } + } + }, + "commands": {} + }, + "design-component-ref": { + "properties": {}, + "commands": {} + }, + "design-uploader": { + "properties": {}, + "commands": {} + }, + "design-page-header": { + "properties": { + "template": { + "titleContentClass": { + "name": "標題模板樣式", + "description": "標題模板外層容器的自定義樣式" + }, + "titleContentHtml": { + "name": "標題模板", + "description": "設置標題HTML模板,替代圖標和標題文字區域" + }, + "contentClass": { + "name": "內容模板樣式", + "description": "內容模板外層容器的自定義樣式" + }, + "contentHtml": { + "name": "內容模板", + "description": "設置頁頭中間區域的模版" + }, + "downContentClass": { + "name": "擴展模板樣式", + "description": "擴展模板外層容器的自定義樣式" + }, + "downContentHtml": { + "name": "擴展模板", + "description": "設置頁頭下方區域的模版" + } + } + }, + "commands": {} + }, + "design-page-footer": { + "properties": {}, + "commands": {} + }, + "design-tab-toolbar": { + "properties": {}, + "commands": {} + }, + "design-fieldset": { + "properties": {}, + "commands": {} + }, + "design-query-solution": { + "properties": { + "apperance": { + "isControlInline": { + "name": "控件標籤同行展示", + "description": "控件標籤同行展示" + }, + "presetQuerySolutionName": { + "name": "系統預置篩選方案名稱", + "description": "系統預置篩選方案名稱" + }, + "filterText": { + "name": "篩選按鈕文本", + "description": "篩選按鈕文本" + }, + "itemClass": { + "name": "篩選項樣式", + "description": "篩選項的公共樣式。如果篩選項定義了單獨的樣式,該項按照單獨的樣式展示" + }, + "expanded": { + "name": "展開", + "description": "展開" + } + }, + "control": { + "fields": { + "name": "篩選方案字段", + "description": "篩選方案字段設置" + }, + "presetFields": { + "name": "系統預置字段", + "description": "系統預置字段" + }, + "initQuery": { + "name": "初始化時查詢數據", + "description": "初始化時方案時查詢數據" + }, + "changeQuery": { + "name": "值變化時查詢數據", + "description": "值變化時查詢數據" + }, + "defaultValues": { + "name": "默認值綁定字段", + "description": "默認值綁定字段" + } + } + }, + "commands": {} + }, + "design-drawer": { + "properties": {}, + "commands": {} + }, + "design-external-container": { + "properties": {}, + "commands": {} + }, + "design-list-nav": { + "properties": {}, + "commands": {} + }, + "design-filter-bar": { + "properties": {}, + "commands": {} + }, + "design-language-textbox": { + "properties": {}, + "commands": {} + } + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/locale/locale.ts b/packages/ui-vue/components/query-solution/src/locale/locale.ts index 176dc34683e..86851fc28bf 100644 --- a/packages/ui-vue/components/query-solution/src/locale/locale.ts +++ b/packages/ui-vue/components/query-solution/src/locale/locale.ts @@ -1,80 +1,83 @@ -import { LocaleService } from '../../../locale'; + +import { LocaleService } from '@farris/ui-vue/components/locale'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); export function useHeaderLocale() { - const saveAsDialogLocale = { - // 您暂无权限修改公共类型方案。 - authNotify: LocaleService.getLocaleValue('querySolution.saveAsDialog.authNotify'), - // 查询方案保存成功。 - success: LocaleService.getLocaleValue('querySolution.saveAsDialog.success'), - // 设为默认 - setAsDefault: LocaleService.getLocaleValue('querySolution.saveAsDialog.setAsDefault'), - // 请填写方案名称 - nameNotify: LocaleService.getLocaleValue('querySolution.saveAsDialog.nameNotify'), - // 方案名称最多100个字符,超出请修改 - maxLength: LocaleService.getLocaleValue('querySolution.saveAsDialog.maxLength'), - // 确定 - confirm: LocaleService.getLocaleValue('querySolution.saveAsDialog.confirm'), - // 取消 - cancel: LocaleService.getLocaleValue('querySolution.saveAsDialog.cancel'), - // 新增方案 - caption: LocaleService.getLocaleValue('querySolution.saveAsDialog.caption'), - // 用户个人方案 - private: LocaleService.getLocaleValue('querySolution.saveAsDialog.private'), - // 系统公共方案 - system: LocaleService.getLocaleValue('querySolution.saveAsDialog.system'), + const saveAsDialogLocale = { + // 您暂无权限修改公共类型方案。 + authNotify: t('querySolution.saveAsDialog.authNotify'), + // 查询方案保存成功。 + success: t('querySolution.saveAsDialog.success'), + // 设为默认 + setAsDefault: t('querySolution.saveAsDialog.setAsDefault'), + // 请填写方案名称 + nameNotify: t('querySolution.saveAsDialog.nameNotify'), + // 方案名称最多100个字符,超出请修改 + maxLength: t('querySolution.saveAsDialog.maxLength'), + // 确定 + confirm: t('querySolution.saveAsDialog.confirm'), + // 取消 + cancel: t('querySolution.saveAsDialog.cancel'), + // 新增方案 + caption: t('querySolution.saveAsDialog.caption'), + // 用户个人方案 + private: t('querySolution.saveAsDialog.private'), + // 系统公共方案 + system: t('querySolution.saveAsDialog.system'), - }; - const manageDialogLocale = { - // 方案管理 - caption: LocaleService.getLocaleValue('querySolution.manageDialog.caption'), - // 默认 - default: LocaleService.getLocaleValue('querySolution.manageDialog.default'), - // 系统公共 - system: LocaleService.getLocaleValue('querySolution.manageDialog.system'), - // 另存为 - saveAs: LocaleService.getLocaleValue('querySolution.manageDialog.saveAs'), - // 保存 - save: LocaleService.getLocaleValue('querySolution.manageDialog.save'), - // 管理 - manage: LocaleService.getLocaleValue('querySolution.manageDialog.manage'), - }; - const configDialogLocale = { - // 筛选条件配置 - caption: LocaleService.getLocaleValue('querySolution.manageDialog.caption') - }; - return { saveAsDialogLocale, manageDialogLocale, configDialogLocale }; -} -export function solutionManagerLocale() { - const manageDialogLocale = { - // 名称 - code: LocaleService.getLocaleValue('querySolution.manageDialog.code'), - // 属性 - type: LocaleService.getLocaleValue('querySolution.manageDialog.type'), - // 用户个人方案 - private: LocaleService.getLocaleValue('querySolution.manageDialog.private'), - // 系统公共方案 - public: LocaleService.getLocaleValue('querySolution.manageDialog.public'), - // 组织公共方案 - org: LocaleService.getLocaleValue('querySolution.manageDialog.org'), - // 删除 - remove: LocaleService.getLocaleValue('querySolution.manageDialog.remove'), - // 默认方案 - isDefault: LocaleService.getLocaleValue('querySolution.manageDialog.isDefault'), - }; - return { manageDialogLocale }; -} -export function useSolutionLocale() { - const containerLocale = { - // 请填写{fields}再进行筛选 - require: LocaleService.getLocaleValue('querySolution.container.require') - }; - return { containerLocale }; -} -/** 筛选文字 */ -export function getLocaleFilterText(filterText) { - return LocaleService.getRealPropertyValue(filterText, '筛选', 'querySolution.container.filter') -} -/** 默认筛选方案 */ -export function getLocalePresetQuerySolutionName(defaultName) { - return LocaleService.getRealPropertyValue(defaultName, '默认筛选方案', 'querySolution.container.filter') -} \ No newline at end of file + }; + const manageDialogLocale = { + // 方案管理 + caption: t('querySolution.manageDialog.caption'), + // 默认 + default: t('querySolution.manageDialog.default'), + // 系统公共 + system: t('querySolution.manageDialog.system'), + // 另存为 + saveAs: t('querySolution.manageDialog.saveAs'), + // 保存 + save: t('querySolution.manageDialog.save'), + // 管理 + manage: t('querySolution.manageDialog.manage'), + }; + const configDialogLocale = { + // 筛选条件配置 + caption: t('querySolution.manageDialog.caption') + }; + return { saveAsDialogLocale, manageDialogLocale, configDialogLocale }; + } + export function solutionManagerLocale() { + const manageDialogLocale = { + // 名称 + code: t('querySolution.manageDialog.code'), + // 属性 + type: t('querySolution.manageDialog.type'), + // 用户个人方案 + private: t('querySolution.manageDialog.private'), + // 系统公共方案 + public: t('querySolution.manageDialog.public'), + // 组织公共方案 + org: t('querySolution.manageDialog.org'), + // 删除 + remove: t('querySolution.manageDialog.remove'), + // 默认方案 + isDefault: t('querySolution.manageDialog.isDefault'), + }; + return { manageDialogLocale }; + } + export function useSolutionLocale() { + const containerLocale = { + // 请填写{fields}再进行筛选 + require: t('querySolution.container.require') + }; + return { containerLocale }; + } + /** 筛选文字 */ + export function getLocaleFilterText(filterText) { + return LocaleService.getRealPropertyValue(filterText, '筛选', 'querySolution.container.filter') + } + /** 默认筛选方案 */ + export function getLocalePresetQuerySolutionName(defaultName) { + return LocaleService.getRealPropertyValue(defaultName, '默认筛选方案', 'querySolution.container.filter') + } \ No newline at end of file diff --git a/packages/ui-vue/components/response-toolbar/src/locale/locale.ts b/packages/ui-vue/components/response-toolbar/src/locale/locale.ts deleted file mode 100644 index 62ee27f63bf..00000000000 --- a/packages/ui-vue/components/response-toolbar/src/locale/locale.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LocaleService } from '../../../locale'; -export function useToolbarLocale() { - const toolbarLocale = { - more: LocaleService.getLocaleValue('responseToolbar.more') - }; - return { toolbarLocale }; -} diff --git a/packages/ui-vue/components/response-toolbar/src/response-toolbar.component.tsx b/packages/ui-vue/components/response-toolbar/src/response-toolbar.component.tsx index 1924f5a56f0..40847db115a 100644 --- a/packages/ui-vue/components/response-toolbar/src/response-toolbar.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/response-toolbar.component.tsx @@ -6,7 +6,8 @@ import { useIcon } from './composition/use-icon'; import { useToolbarItem } from './composition/use-toolbar-item'; import getDropdown from './components/dropdown/toolbar-dropdown.component'; import { getCustomClass } from '@farris/ui-vue/components/common'; -import { useToolbarLocale } from './locale/locale'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const { buildResponseToolbarItems } = useToolbarItem(); export default defineComponent({ @@ -14,12 +15,11 @@ export default defineComponent({ props: responseToolbarProps, emits: ['click'], setup(props: ResponseToolbarProps, context) { - const { toolbarLocale } = useToolbarLocale(); const toolbarItems = ref(buildResponseToolbarItems(props.items)); const responseToolBarContainer = ref(); const resizedContainer = ref(); const resizedContent = ref(); - const defaultDropdownOptions = { id: '__more_buttons__', text: toolbarLocale.more }; + const defaultDropdownOptions = { id: '__more_buttons__', text: t('responseToolbar.more') }; const defaultDropdown = ref(new ResponseToolbarDropDownItem(defaultDropdownOptions)); const moreButtonOptions = { id: defaultDropdownOptions.id + 'width', text: defaultDropdownOptions.text }; // 计算更多按钮的宽度 diff --git a/packages/ui-vue/components/section/src/components/header.component.tsx b/packages/ui-vue/components/section/src/components/header.component.tsx index 95f655b2a5b..0fadc47690e 100644 --- a/packages/ui-vue/components/section/src/components/header.component.tsx +++ b/packages/ui-vue/components/section/src/components/header.component.tsx @@ -2,8 +2,7 @@ import { SetupContext, computed, ref, Ref } from 'vue'; import { useSectionMaxMin } from '../composition/use-max-min'; import { SectionProps } from '../section.props'; import getSectionToolbar from './toolbar.component'; -import { LocaleService } from '../../../locale'; -import { useHeaderLocale } from '../locale/locale'; +import { LocaleService } from '@farris/ui-vue/components/locale'; export default function ( props: SectionProps, @@ -12,7 +11,10 @@ export default function ( sectionRef: Ref, sectionParentElementRef: Ref, maxStatus: Ref) { - const { headerLocale } = useHeaderLocale(props); + const headerLocale = { + collapseLabel: LocaleService.getRealPropertyValue(props.collapseLabel, '收起', 'section.collapseLabel'), + expandLabel: LocaleService.getRealPropertyValue(props.expandLabel, '展开', 'section.expandLabel') + }; const toolbarPosition = computed(() => props.buttonPosition); const renderSectionToolbar = getSectionToolbar(props, context); const { onClickMaxMinIcon } = useSectionMaxMin(sectionRef, sectionParentElementRef, maxStatus); diff --git a/packages/ui-vue/components/section/src/locale/locale.ts b/packages/ui-vue/components/section/src/locale/locale.ts deleted file mode 100644 index aa5a89401fa..00000000000 --- a/packages/ui-vue/components/section/src/locale/locale.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { LocaleService } from '../../../locale'; -/** - * 此处当做静态处理 - * @param props - * @returns - */ -export function useHeaderLocale(props) { - const headerLocale = { - collapseLabel: LocaleService.getRealPropertyValue(props.collapseLabel, '收起', 'section.collapseLabel'), - expandLabel: LocaleService.getRealPropertyValue(props.expandLabel, '展开', 'section.expandLabel') - }; - return { headerLocale }; -} diff --git a/packages/ui-vue/components/tabs/src/components/tab-header-dropdown-menu.component.tsx b/packages/ui-vue/components/tabs/src/components/tab-header-dropdown-menu.component.tsx index abe25430990..b05b20297c2 100644 --- a/packages/ui-vue/components/tabs/src/components/tab-header-dropdown-menu.component.tsx +++ b/packages/ui-vue/components/tabs/src/components/tab-header-dropdown-menu.component.tsx @@ -1,8 +1,8 @@ import { computed, nextTick, ref, watch } from "vue"; import { TabPageContext, UseDropdown, UseNav, UseTabs } from "../composition/types"; import { TabsProps } from "../tabs.props"; -import { LocaleService } from '../../../locale'; -import { useTabHeaderDropdownMenuLocale } from "../locale/locale"; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); export default function ( props: TabsProps, @@ -32,7 +32,6 @@ export default function ( 'show': !hideDropDown.value, 'd-none': hideDropDown.value })); - const { dropdownMenuLocale } = useTabHeaderDropdownMenuLocale(); let tabsRef; function setTabsRef(parentRef) { tabsRef = parentRef; @@ -150,7 +149,7 @@ export default function ( })} ) : ( - + )}
); diff --git a/packages/ui-vue/components/tabs/src/locale/locale.ts b/packages/ui-vue/components/tabs/src/locale/locale.ts deleted file mode 100644 index bb1c6e987c8..00000000000 --- a/packages/ui-vue/components/tabs/src/locale/locale.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LocaleService } from '../../../locale'; -export function useTabHeaderDropdownMenuLocale() { - const dropdownMenuLocale = { - noData: LocaleService.getLocaleValue('tabs.noData') - }; - return { dropdownMenuLocale }; -} diff --git a/packages/ui-vue/components/tabs/src/tabs.component.tsx b/packages/ui-vue/components/tabs/src/tabs.component.tsx index c7be28709a4..99fe40a5fd4 100644 --- a/packages/ui-vue/components/tabs/src/tabs.component.tsx +++ b/packages/ui-vue/components/tabs/src/tabs.component.tsx @@ -25,7 +25,8 @@ import { useDropdown } from './composition/use-dropdown'; import { useOnePage } from './composition/use-one-page'; import FResponseToolbar from '@farris/ui-vue/components/response-toolbar'; import { JSX } from 'vue/jsx-runtime'; -import { LocaleService } from '../../locale'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); export default defineComponent({ name: 'FTabs', @@ -164,8 +165,10 @@ export default defineComponent({ changeTitleStyle(tabNavigationElementRef); }); }); - const leftButtonText=LocaleService.getLocaleValue('tabs.leftButton'); - const rightButtonText=LocaleService.getLocaleValue('tabs.rightButton'); + const tabsLocale={ + leftButton:t('tabs.leftButton'), + rightButton:t('tabs.rightButton') + }; onMounted(() => { if (props.visible) { if (tabPages.value.length) { @@ -183,7 +186,7 @@ export default defineComponent({ function renderPreviousButton() { return (