Skip to content

Commit

Permalink
fix: workflow i18n (#2645)
Browse files Browse the repository at this point in the history
* fix: workflow i18n

* i18n completion
  • Loading branch information
Patrickill authored Sep 9, 2024
1 parent 3ea1853 commit 30057f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export const ClassifyQuestionModule: FlowNodeTemplateType = {
label: '',
value: [
{
value: i18nT('workflow:greeting'),
value: 'Greeting',
key: 'wqre'
},
{
value: i18nT('workflow:about_xxx_question'),
value: 'Question regarding xxx',
key: 'sdfa'
},
{
value: i18nT('workflow:other_questions'),
value: 'Other Questions',
key: 'agex'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function Reference({
return (
<>
<Flex alignItems={'center'} mb={1}>
<FormLabel required={inputChildren.required}>{inputChildren.label}</FormLabel>
<FormLabel required={inputChildren.required}>{t(inputChildren.label as any)}</FormLabel>
{/* value */}
<ValueTypeLabel valueType={inputChildren.valueType} valueDesc={inputChildren.valueDesc} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const JsonEditor = ({ inputs = [], item, nodeId }: RenderInputProps) => {
<JSONEditor
bg={'white'}
borderRadius={'sm'}
placeholder={item.placeholder}
placeholder={t(item.placeholder as any)}
resize
value={value}
onChange={(e) => {
Expand All @@ -65,7 +65,7 @@ const JsonEditor = ({ inputs = [], item, nodeId }: RenderInputProps) => {
variables={variables}
/>
);
}, [item.placeholder, update, value, variables]);
}, [item.placeholder, t, update, value, variables]);

return Render;
};
Expand Down

0 comments on commit 30057f0

Please sign in to comment.