fix: workflow i18n (#2645)

* fix: workflow i18n

* i18n completion
This commit is contained in:
papapatrick
2024-09-09 14:36:35 +08:00
committed by GitHub
parent 3ea185315d
commit 30057f01a6
3 changed files with 6 additions and 6 deletions

View File

@@ -51,15 +51,15 @@ export const ClassifyQuestionModule: FlowNodeTemplateType = {
label: '', label: '',
value: [ value: [
{ {
value: i18nT('workflow:greeting'), value: 'Greeting',
key: 'wqre' key: 'wqre'
}, },
{ {
value: i18nT('workflow:about_xxx_question'), value: 'Question regarding xxx',
key: 'sdfa' key: 'sdfa'
}, },
{ {
value: i18nT('workflow:other_questions'), value: 'Other Questions',
key: 'agex' key: 'agex'
} }
] ]

View File

@@ -183,7 +183,7 @@ function Reference({
return ( return (
<> <>
<Flex alignItems={'center'} mb={1}> <Flex alignItems={'center'} mb={1}>
<FormLabel required={inputChildren.required}>{inputChildren.label}</FormLabel> <FormLabel required={inputChildren.required}>{t(inputChildren.label as any)}</FormLabel>
{/* value */} {/* value */}
<ValueTypeLabel valueType={inputChildren.valueType} valueDesc={inputChildren.valueDesc} /> <ValueTypeLabel valueType={inputChildren.valueType} valueDesc={inputChildren.valueDesc} />

View File

@@ -56,7 +56,7 @@ const JsonEditor = ({ inputs = [], item, nodeId }: RenderInputProps) => {
<JSONEditor <JSONEditor
bg={'white'} bg={'white'}
borderRadius={'sm'} borderRadius={'sm'}
placeholder={item.placeholder} placeholder={t(item.placeholder as any)}
resize resize
value={value} value={value}
onChange={(e) => { onChange={(e) => {
@@ -65,7 +65,7 @@ const JsonEditor = ({ inputs = [], item, nodeId }: RenderInputProps) => {
variables={variables} variables={variables}
/> />
); );
}, [item.placeholder, update, value, variables]); }, [item.placeholder, t, update, value, variables]);
return Render; return Render;
}; };