From 1330ab8aec3e599f4336e1154ebf74b02ce8dfc0 Mon Sep 17 00:00:00 2001 From: MactavishCui <166927232+MactavishCui@users.noreply.github.com> Date: Tue, 24 Dec 2024 16:54:49 +0800 Subject: [PATCH] [Optimization][Web]Register center document modal display optimization when enable English (#4083) --- dinky-web/src/locales/en-US/pages.ts | 20 +++++++++ dinky-web/src/locales/zh-CN/pages.ts | 20 +++++++++ .../src/pages/RegCenter/Document/constans.ts | 42 ++++++++++--------- 3 files changed, 62 insertions(+), 20 deletions(-) diff --git a/dinky-web/src/locales/en-US/pages.ts b/dinky-web/src/locales/en-US/pages.ts index 199cc2d60c..43a92710c1 100644 --- a/dinky-web/src/locales/en-US/pages.ts +++ b/dinky-web/src/locales/en-US/pages.ts @@ -965,6 +965,26 @@ export default { 'rc.doc.typePlaceholder': 'Please select the function type this Document belongs to!', 'rc.doc.version': 'Version', 'rc.doc.versionPlaceholder': 'Please select the version this Document belongs to!', + 'rc.doc.type.codeSnippetOrTemplate': 'Code Snippet/Template', + 'rc.doc.type.flinkParam': 'Flink Parameter', + 'rc.doc.type.functionOrUDF': 'Function/UDF', + 'rc.doc.type.other': 'Other', + 'rc.doc.function.type.compare': 'Comparison Function', + 'rc.doc.function.type.logical': 'Logical Function', + 'rc.doc.function.type.arithmetic': 'Arithmetic Function', + 'rc.doc.function.type.string': 'String Function', + 'rc.doc.function.type.time': 'Time Function', + 'rc.doc.function.type.conditional': 'Conditional Function', + 'rc.doc.function.type.typeConver': 'Type Conversion Function', + 'rc.doc.function.type.collection': 'Collection Function', + 'rc.doc.function.type.valueConstruction': 'Value Construction Function', + 'rc.doc.function.type.valueAccess': 'Value Access Function', + 'rc.doc.function.type.group': 'Grouping Function', + 'rc.doc.function.type.hash': 'Hash Function', + 'rc.doc.function.type.aggregate': 'Aggregate Function', + 'rc.doc.function.type.column': 'Column Function', + 'rc.doc.function.type.tableAggregate': 'Table-Valued Aggregate Function', + 'rc.doc.function.type.other': 'Other Function', 'rc.ds.application': 'Application', 'rc.ds.autoIncrement': 'Autoincrement', 'rc.ds.backup': 'Backup', diff --git a/dinky-web/src/locales/zh-CN/pages.ts b/dinky-web/src/locales/zh-CN/pages.ts index 4dbfa27767..cdfc6065ce 100644 --- a/dinky-web/src/locales/zh-CN/pages.ts +++ b/dinky-web/src/locales/zh-CN/pages.ts @@ -888,6 +888,26 @@ export default { 'rc.doc.typePlaceholder': '请选择该文档所属函数类型!', 'rc.doc.version': '版本', 'rc.doc.versionPlaceholder': '请选择该文档所属版本!', + 'rc.doc.type.codeSnippetOrTemplate': '代码片段/模板', + 'rc.doc.type.flinkParam': 'Flink参数', + 'rc.doc.type.functionOrUDF': '函数/UDF', + 'rc.doc.type.other': '其他', + 'rc.doc.function.type.compare': '比较函数', + 'rc.doc.function.type.logical': '逻辑函数', + 'rc.doc.function.type.arithmetic': '算术函数', + 'rc.doc.function.type.string': '字符串函数', + 'rc.doc.function.type.time': '时间函数', + 'rc.doc.function.type.conditional': '条件函数', + 'rc.doc.function.type.typeConver': '类型转换函数功能', + 'rc.doc.function.type.collection': 'Collection 函数', + 'rc.doc.function.type.valueConstruction': 'Value Construction函数', + 'rc.doc.function.type.valueAccess': 'Value Access函数', + 'rc.doc.function.type.group': '分组函数', + 'rc.doc.function.type.hash': 'hash函数', + 'rc.doc.function.type.aggregate': '聚合函数', + 'rc.doc.function.type.column': '列函数', + 'rc.doc.function.type.tableAggregate': '表值聚合函数', + 'rc.doc.function.type.other': '其他函数', 'rc.ds.application': '应用', 'rc.ds.autoIncrement': '自增', 'rc.ds.backup': '备份', diff --git a/dinky-web/src/pages/RegCenter/Document/constans.ts b/dinky-web/src/pages/RegCenter/Document/constans.ts index 1820e7708c..bdd66fdc3b 100644 --- a/dinky-web/src/pages/RegCenter/Document/constans.ts +++ b/dinky-web/src/pages/RegCenter/Document/constans.ts @@ -17,6 +17,8 @@ * */ +import { l } from "@/utils/intl"; + export const DOCUMENT_CATEGORY_ENUMS = { Variable: { text: 'Variable', value: 'Variable' }, Module: { text: 'Module', value: 'Module' }, @@ -31,32 +33,32 @@ export const DOCUMENT_CATEGORY_ENUMS = { * document function type enum map */ export const DOCUMENT_TYPE_ENUMS = { - SQL_TEMPLATE: { text: '代码片段/模板', value: 'SQL_TEMPLATE' }, - FLINK_OPTIONS: { text: 'Flink参数', value: 'FLINK_OPTIONS' }, - FUN_UDF: { text: '函数/UDF', value: 'FUN_UDF' }, - OTHER: { text: '其他', value: 'OTHER' } + SQL_TEMPLATE: { text: l('rc.doc.type.codeSnippetOrTemplate'), value: 'SQL_TEMPLATE' }, + FLINK_OPTIONS: { text: l( 'rc.doc.type.flinkParam'), value: 'FLINK_OPTIONS' }, + FUN_UDF: { text: l( 'rc.doc.type.functionOrUDF'), value: 'FUN_UDF' }, + OTHER: { text: l( 'rc.doc.type.other'), value: 'OTHER' } }; export const DOCUMENT_FUNCTION_TYPE_ENUMS = { - COMPARE_FUNCTION: { text: '比较函数', value: 'COMPARE_FUNCTION' }, - LOGICAL_FUNCTION: { text: '逻辑函数', value: 'LOGICAL_FUNCTION' }, - ARITHMETIC_FUNCTIONS: { text: '算术函数', value: 'ARITHMETIC_FUNCTIONS' }, - STRING_FUNCTIONS: { text: '字符串函数', value: 'STRING_FUNCTIONS' }, - TIME_FUNCTION: { text: '时间函数', value: 'TIME_FUNCTION' }, - CONDITIONAL_FUNCTION: { text: '条件函数', value: 'CONDITIONAL_FUNCTION' }, - TYPE_CONVER_FUNCTION: { text: '类型转换函数功能', value: 'TYPE_CONVER_FUNCTION' }, - COLLECTION_FUNCTION: { text: 'Collection 函数', value: 'COLLECTION_FUNCTION' }, + COMPARE_FUNCTION: { text: l( 'rc.doc.function.type.compare'), value: 'COMPARE_FUNCTION' }, + LOGICAL_FUNCTION: { text: l( 'rc.doc.function.type.logical'), value: 'LOGICAL_FUNCTION' }, + ARITHMETIC_FUNCTIONS: { text: l( 'rc.doc.function.type.arithmetic'), value: 'ARITHMETIC_FUNCTIONS' }, + STRING_FUNCTIONS: { text: l( 'rc.doc.function.type.string'), value: 'STRING_FUNCTIONS' }, + TIME_FUNCTION: { text: l( 'rc.doc.function.type.time'), value: 'TIME_FUNCTION' }, + CONDITIONAL_FUNCTION: { text: l( 'rc.doc.function.type.conditional'), value: 'CONDITIONAL_FUNCTION' }, + TYPE_CONVER_FUNCTION: { text: l( 'rc.doc.function.type.typeConver'), value: 'TYPE_CONVER_FUNCTION' }, + COLLECTION_FUNCTION: { text: l( 'rc.doc.function.type.collection'), value: 'COLLECTION_FUNCTION' }, VALUE_CONSTRUCTION_FUNCTION: { - text: 'Value Construction函数', + text: l( 'rc.doc.function.type.valueConstruction'), value: 'VALUE_CONSTRUCTION_FUNCTION Construction函数' }, - VALUE_ACCESS_FUNCTION: { text: 'Value Access函数', value: 'VALUE_ACCESS_FUNCTION' }, - GROUP_FUNCTION: { text: '分组函数', value: 'GROUP_FUNCTION' }, - HASH_FUNCTION: { text: 'hash函数', value: 'HASH_FUNCTION' }, - AGGREGATE_FUNCTION: { text: '聚合函数', value: 'AGGREGATE_FUNCTION' }, - COLUMN_FUNCTION: { text: '列函数', value: 'COLUMN_FUNCTION' }, - TABLE_AGGREGATE_FUNCTION: { text: '表值聚合函数', value: 'TABLE_AGGREGATE_FUNCTION' }, - OTHER_FUNCTION: { text: '其他函数', value: 'OTHER_FUNCTION' } + VALUE_ACCESS_FUNCTION: { text: l( 'rc.doc.function.type.valueAccess'), value: 'VALUE_ACCESS_FUNCTION' }, + GROUP_FUNCTION: { text:l( 'rc.doc.function.type.group'), value: 'GROUP_FUNCTION' }, + HASH_FUNCTION: { text: l( 'rc.doc.function.type.hash'), value: 'HASH_FUNCTION' }, + AGGREGATE_FUNCTION: { text:l( 'rc.doc.function.type.aggregate'), value: 'AGGREGATE_FUNCTION' }, + COLUMN_FUNCTION: { text: l( 'rc.doc.function.type.column'), value: 'COLUMN_FUNCTION' }, + TABLE_AGGREGATE_FUNCTION: { text: l( 'rc.doc.function.type.tableAggregate'), value: 'TABLE_AGGREGATE_FUNCTION' }, + OTHER_FUNCTION: { text: l( 'rc.doc.function.type.other'), value: 'OTHER_FUNCTION' } }; /**