diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index abb1deb34f..7aa4b1f495 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -230,7 +230,41 @@ export default { data_update_settings: 'Data update settings', connection_method: 'Connection method', hostname: 'hostname', - jdbc_connection: 'JDBC connection' + jdbc_connection: 'JDBC connection', + jdbc_connection_string: ' JDBC connection string', + ssh_settings: 'SSH settings', + enable_ssh: 'Enable SSH', + host: 'Host', + please_enter_hostname: 'Please enter hostname', + port: 'port', + password: 'password', + enter_ssh_key: 'Please enter ssh key', + ssh_key_password: 'ssh key password', + update_now: 'Update now', + update_once: 'Update once', + edit_parameters: 'Edit parameters', + text: 'text', + numerical_value: 'numerical value', + numeric_value_decimal: 'Numeric value (decimal)', + interface_name: 'Interface name', + to_replace_it: + 'Replacement may affect custom datasets, related datasets, dashboards, etc. Do you want to replace it?', + document: 'document', + reupload: 'Reupload', + and_csv_formats: 'Only supports files in xlsx, xls, and csv formats', + please_upload_files: 'Please upload files', + cannot_be_empty_table: 'Data table cannot be empty', + the_previous_step: + 'The filled in information will be cleared. Are you sure you want to return to the previous step?', + add_data_table: 'Need to add data table', + replace_data: 'Replace data', + append_data: 'append data', + copy_data_source: 'Copy data source', + create_data_source: 'Create data source', + want_to_exit: 'The current changes have not been saved. Are you sure you want to exit?', + configuration_information: 'Configuration information', + all: 'all', + api_data: 'API data' }, login: { welcome: 'Welcome', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index ec5a8be557..2df096f6f1 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -210,7 +210,6 @@ export default { the_request_address: '请输入请求地址', name_already_exists: '已经存在同名参数:', name_already_exists_de: '已经存在同名的参数表', - verification_failed: '校验失败', interface_parameters: '接口参数', extract_parameters: '提取参数', view_data_structure: '查看数据结构', @@ -228,26 +227,59 @@ export default { a_folder_name: '请输入文件夹名称', data_source: '数据源', the_destination_folder: '请选择目标文件夹', - source_saved_successfully: '保存数据源成功', relevant_content_found: '没有找到相关内容', - recently_created: '最近创建', cannot_be_empty: 'SSH主机不能为空', cannot_be_empty_de: 'SSH端口不能为空', cannot_be_empty_de_name: 'SSH用户名不能为空', cannot_be_empty_de_pwd: 'SSH密码不能为空', cannot_be_empty_de_key: 'SSH key不能为空', - enter_parameter_name: '请输入参数名称', to_64_characters: '参数名称限制2~64字符', - the_interface_name: '请输入接口名称', to_64_characters_de: '接口名称限制2~64字符', sure_to_delete: '确定删除吗?', - rename: '重命名', delete: '删除', source_configuration_information: '数据源配置信息', data_update_settings: '数据更新设置', connection_method: '连接方式', hostname: '主机名', - jdbc_connection: 'JDBC 连接' + jdbc_connection: 'JDBC 连接', + jdbc_connection_string: ' JDBC 连接字符串', + ssh_settings: 'SSH 设置', + enable_ssh: '启用SSH', + host: '主机', + please_enter_hostname: '请输入主机名', + port: '端口', + password: '密码', + enter_ssh_key: '请输入ssh key', + ssh_key_password: 'ssh key 密码', + update_now: '立即更新', + update_once: '更新一次', + edit_parameters: '编辑参数', + enter_parameter_name: '请输入参数名称', + text: '文本', + numerical_value: '数值', + numeric_value_decimal: '数值(小数)', + rename: '重命名', + interface_name: '接口名称', + the_interface_name: '请输入接口名称', + to_replace_it: '替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?', + document: '文件', + reupload: '重新上传', + and_csv_formats: '仅支持xlsx、xls、csv格式的文件', + please_upload_files: '请上传文件', + cannot_be_empty_table: '数据表不能为空', + the_previous_step: '填写的信息将会清空,确定返回上一步吗?', + add_data_table: '需要添加数据表', + verification_failed: '校验失败', + source_saved_successfully: '保存数据源成功', + replace_data: '替换数据', + append_data: '追加数据', + copy_data_source: '复制数据源', + create_data_source: '创建数据源', + want_to_exit: '当前的更改尚未保存,确定退出吗?', + configuration_information: '配置信息', + recently_created: '最近创建', + all: '全部', + api_data: 'API数据' }, dynamic_time: { set_default: '设置默认值', diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue index 1dc43ff9a2..1abc26fe18 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue @@ -944,13 +944,13 @@ defineExpose({ @@ -1115,7 +1115,7 @@ defineExpose({ v-if="!['es', 'api'].includes(form.type) && form.configuration.urlType !== 'jdbcUrl'" class="de-expand" @click="showSSH = !showSSH" - >SSH 设置 + >{{ t('data_source.ssh_settings') }} - - + + -

仅支持xlsx、xls、csv格式的文件

-
请上传文件
+

{{ t('data_source.and_csv_formats') }}

+
+ {{ t('data_source.please_upload_files') }} +
{ currentDsType.value === 'API' && activeStep.value !== 2 ) { - ElMessage.error('数据表不能为空') + ElMessage.error(t('data_source.cannot_be_empty_table')) return } @@ -283,7 +283,7 @@ emitter.on('showFinishPage', handleShowFinishPage) const prev = () => { if ((currentDsType.value === 'API' && activeApiStep.value === 1) || activeStep.value === 1) { - ElMessageBox.confirm('填写的信息将会清空,确定返回上一步吗?', { + ElMessageBox.confirm(t('data_source.the_previous_step'), { confirmButtonType: 'primary', type: 'warning', autofocus: false, @@ -336,7 +336,7 @@ const validateDS = () => { } if (currentDsType.value === 'API') { if (form.apiConfiguration.length === 0) { - ElMessage.error('需要添加数据表') + ElMessage.error(t('data_source.add_data_table')) return } let apiItems = [] @@ -383,7 +383,7 @@ const doValidateDs = request => { if (error === 0) { ElMessage.success(t('datasource.validate_success')) } else { - ElMessage.error('校验失败') + ElMessage.error(t('data_source.verification_failed')) } } else { ElMessage.success(t('datasource.validate_success')) @@ -505,7 +505,7 @@ const doSaveDs = request => { .then(res => { if (res !== undefined) { handleShowFinishPage({ id: res.id, name: res.name }) - ElMessage.success('保存数据源成功') + ElMessage.success(t('data_source.source_saved_successfully')) } }) .finally(() => { @@ -522,7 +522,7 @@ const doSaveDs = request => { .then(res => { if (res !== undefined) { handleShowFinishPage({ id: res.id, name: res.name }) - ElMessage.success('保存数据源成功') + ElMessage.success(t('data_source.source_saved_successfully')) } }) .finally(() => { @@ -634,9 +634,13 @@ const init = (nodeInfo: Form | Param, id?: string, res?: object) => { const drawTitle = computed(() => { const { id, editType, creator } = form2 if (creator && id && currentDsType.value == 'Excel') { - return editType === 1 ? '追加数据' : '替换数据' + return editType === 1 ? t('data_source.append_data') : t('data_source.replace_data') } - return editDs.value ? (!form.id ? '复制数据源' : t('datasource.modify')) : '创建数据源' + return editDs.value + ? !form.id + ? t('data_source.copy_data_source') + : t('datasource.modify') + : t('data_source.create_data_source') }) const beforeClose = () => { @@ -645,7 +649,7 @@ const beforeClose = () => { wsCache.set('ds-new-success', false) } if (!showFinishPage.value && ((!editDs.value && activeStep.value !== 0) || isUpdate)) { - ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', { + ElMessageBox.confirm(t('data_source.want_to_exit'), { confirmButtonText: t('dataset.confirm'), cancelButtonText: t('common.cancel'), showCancelButton: true, @@ -696,7 +700,7 @@ defineExpose({ {{ activeStep <= 1 ? '2' : '' }} - 配置信息 + {{ t('data_source.configuration_information') }} @@ -730,7 +734,7 @@ defineExpose({ @click="handleNodeClick({ type: 'latestUse', name: 'latestUse', id: 'latestUse' })" class="list-item_primary" > - 最近创建 + {{ t('data_source.recently_created') }}

- 全部 + {{ t('data_source.all') }}