Skip to content

Commit

Permalink
feat: i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
wxg0103 committed Jan 21, 2025
1 parent 8fc326e commit 6b9dd1c
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 92 deletions.
182 changes: 91 additions & 91 deletions ui/src/locales/lang/en-US/dynamics-form.ts
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
export default {
input_type_list: {
TextInput: 'Text Input',
Slider: 'Slider',
SwitchInput: 'Switch',
SingleSelect: 'Single Select',
MultiSelect: 'Multi Select',
DatePicker: 'Date Picker',
JsonInput: 'JSON Text Input',
RadioCard: 'Radio Card',
RadioRow: 'Radio Row'
input_type_list: {
TextInput: 'Text Input',
Slider: 'Slider',
SwitchInput: 'Switch',
SingleSelect: 'Single Select',
MultiSelect: 'Multi Select',
DatePicker: 'Date Picker',
JsonInput: 'JSON Text Input',
RadioCard: 'Radio Card',
RadioRow: 'Radio Row'
},
default: {
label: 'Default Value',
placeholder: 'Please enter a default value',
requiredMessage: ' is a required property',
show: 'Show Default Value'
},
tip: {
requiredMessage: 'Cannot be empty',
jsonMessage: 'Incorrect JSON format'
},
searchBar: {
placeholder: 'Please enter keywords to search'
},
paramForm: {
field: {
label: 'Parameter',
placeholder: 'Please enter a parameter',
requiredMessage: 'Parameter is a required property',
requiredMessage2: 'Only letters, numbers, and underscores are allowed'
},
default: {
label: 'Default Value',
placeholder: 'Please enter a default value',
requiredMessage: ' is a required property',
show: 'Show Default Value'
name: {
label: 'Display Name',
placeholder: 'Please enter a display name',
requiredMessage: 'Display Name is a required property'
},
tip: {
requiredMessage: 'Cannot be empty',
jsonMessage: 'Incorrect JSON format'
tooltip: {
label: 'Parameter Tooltip',
placeholder: 'Please enter a parameter tooltip'
},
searchBar: {
placeholder: 'Please enter keywords to search'
required: {
label: 'Is Required',
requiredMessage: 'Is Required is a required property'
},
paramForm: {
field: {
label: 'Parameter',
placeholder: 'Please enter a parameter',
requiredMessage: 'Parameter is a required property',
requiredMessage2: 'Only letters, numbers, and underscores are allowed'
},
name: {
label: 'Display Name',
placeholder: 'Please enter a display name',
requiredMessage: 'Display Name is a required property'
},
tooltip: {
label: 'Parameter Tooltip',
placeholder: 'Please enter a parameter tooltip'
},
required: {
label: 'Is Required',
requiredMessage: 'Is Required is a required property'
},
input_type: {
label: 'Component Type',
placeholder: 'Please select a component type',
requiredMessage: 'Component Type is a required property'
}
},
DatePicker: {
placeholder: 'Select Date',
year: 'Year',
month: 'Month',
date: 'Date',
datetime: 'Date Time',
dataType: {
label: 'Date Type',
placeholder: 'Please select a date type'
},
format: {
label: 'Format',
placeholder: 'Please select a format'
}
},
Select: {
label: 'Option Value',
placeholder: 'Please enter an option value'
input_type: {
label: 'Component Type',
placeholder: 'Please select a component type',
requiredMessage: 'Component Type is a required property'
}
},
DatePicker: {
placeholder: 'Select Date',
year: 'Year',
month: 'Month',
date: 'Date',
datetime: 'Date Time',
dataType: {
label: 'Date Type',
placeholder: 'Please select a date type'
},
tag: {
label: 'Tag',
placeholder: 'Please enter an option label'
format: {
label: 'Format',
placeholder: 'Please select a format'
}
},
Select: {
label: 'Option Value',
placeholder: 'Please enter an option value'
},
tag: {
label: 'Tag',
placeholder: 'Please enter an option label'
},
Slider: {
showInput: {
label: 'Show Input Box'
},
Slider: {
showInput: {
label: '是否带输入框'
},
valueRange: {
label: '取值范围',
minRequired: '最小值必填',
maxRequired: '最大值必填'
},
step: {
label: '步长值',
requiredMessage1: '步长值必填',
requiredMessage2: '步长不能为0'
}
valueRange: {
label: 'Value Range',
minRequired: 'Minimum value is required',
maxRequired: 'Maximum value is required'
},
TextInput: {
length: {
label: '文本长度',
minRequired: '最小长度必填',
maxRequired: '最大长度必填',
requiredMessage1: '长度在',
requiredMessage2: '到',
requiredMessage3: '个字符',
requiredMessage4: '文本长度为必填参数'
}
step: {
label: 'Step Value',
requiredMessage1: 'Step value is required',
requiredMessage2: 'Step value cannot be 0'
}
},
TextInput: {
length: {
label: 'Text Length',
minRequired: 'Minimum length is required',
maxRequired: 'Maximum length is required',
requiredMessage1: 'Length must be between',
requiredMessage2: 'and',
requiredMessage3: 'characters',
requiredMessage4: 'Text length is a required parameter'
}
}
}
25 changes: 24 additions & 1 deletion ui/src/locales/lang/zh-Hant/dynamics-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,29 @@ export default {
placeholder: '請輸入選項標籤'
},
Slider: {
showInput: ''
showInput: {
label: '是否帶輸入框'
},
valueRange: {
label: '取值範圍',
minRequired: '最小值必填',
maxRequired: '最大值必填'
},
step: {
label: '步長值',
requiredMessage1: '步長值必填',
requiredMessage2: '步長不能為0'
}
},
TextInput: {
length: {
label: '文字長度',
minRequired: '最小長度必填',
maxRequired: '最大長度必填',
requiredMessage1: '長度在',
requiredMessage2: '到',
requiredMessage3: '個字元',
requiredMessage4: '文字長度為必填參數'
}
}
}

0 comments on commit 6b9dd1c

Please sign in to comment.