Browse Source

[Fix][UI] Fix data-quality component multi-language support. (#10202)

* [Fix][UI] Fix data-quality component multi-language support.

* [Fix][UI] Fix data-quality component multi-language support.
3.1.0-release
songjianet 3 years ago committed by GitHub
parent
commit
c8a4c694ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-ui/src/locales/modules/en_US.ts
  2. 9
      dolphinscheduler-ui/src/locales/modules/zh_CN.ts
  3. 5
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts

9
dolphinscheduler-ui/src/locales/modules/en_US.ts

@ -1004,7 +1004,14 @@ const project = {
sql_parameter: 'SQL Parameter',
format_tips: 'Please enter format',
udf_function: 'UDF Function',
unlimited: 'unlimited'
unlimited: 'unlimited',
please_select_source_connector_type: 'Please select source connector type',
please_select_source_datasource_id: 'Please select source datasource id',
please_enter_source_table_name: 'Please select source table name',
please_enter_filter_expression: 'Please enter filter expression',
please_enter_column_only_single_column_is_supported: 'Please select column, only single column is supported',
please_enter_threshold_number_is_needed: 'Please enter threshold number is needed',
please_enter_comparison_title: 'please select comparison title'
}
}

9
dolphinscheduler-ui/src/locales/modules/zh_CN.ts

@ -987,7 +987,14 @@ const project = {
sql_parameter: 'sql参数',
format_tips: '请输入格式为',
udf_function: 'UDF函数',
unlimited: '不限制'
unlimited: '不限制',
please_select_source_connector_type: '请选择源数据类型',
please_select_source_datasource_id: '请选择源数据源',
please_enter_source_table_name: '请选择源数据表',
please_enter_filter_expression: '请输入源表过滤条件',
please_enter_column_only_single_column_is_supported: '请选择源表检测列',
please_enter_threshold_number_is_needed: '请输入阈值',
please_enter_comparison_title: '请选择期望值类型'
}
}

5
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts

@ -67,9 +67,7 @@ export function useRules(
if (ruleLoading.value) return
ruleLoading.value = true
const result = await getRuleFormCreateJson(ruleId)
const items = JSON.parse(result).map((item: IResponseJsonItem) =>
formatResponseJson(item)
)
const items = JSON.parse(result).map((item: IResponseJsonItem) => formatResponseJson(item))
updateRules(items, preItemLen)
preItemLen = items.length
ruleLoading.value = false
@ -78,6 +76,7 @@ export function useRules(
const formatResponseJson = (
responseItem: IResponseJsonItem
): IJsonItemParams => {
responseItem.props.placeholder = t('project.node.' + responseItem.props.placeholder.split(' ').join('_').split(',').join('').toLowerCase())
const item: IJsonItemParams = {
field: responseItem.field,
options: responseItem.options,

Loading…
Cancel
Save