feat: add missing workflow i18n keys (#3309)

Co-authored-by: lbm21 <313338264@qq.com>
This commit is contained in:
Lao 2024-04-10 22:20:14 +08:00 committed by GitHub
parent d948b0b49b
commit 0f897bc1f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 29 additions and 6 deletions

View File

@ -96,7 +96,7 @@ const NodePanel: FC<Props> = ({ nodeInfo, hideInfo = false }) => {
<div className={cn('px-[10px] py-1', hideInfo && '!px-2 !py-0.5')}>
<CodeEditor
readOnly
title={<div>INPUT</div>}
title={<div>{t('workflow.common.input').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={nodeInfo.inputs}
isJSONStringifyBeauty
@ -107,7 +107,7 @@ const NodePanel: FC<Props> = ({ nodeInfo, hideInfo = false }) => {
<div className={cn('px-[10px] py-1', hideInfo && '!px-2 !py-0.5')}>
<CodeEditor
readOnly
title={<div>PROCESS DATA</div>}
title={<div>{t('workflow.common.processData').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={nodeInfo.process_data}
isJSONStringifyBeauty
@ -118,7 +118,7 @@ const NodePanel: FC<Props> = ({ nodeInfo, hideInfo = false }) => {
<div className={cn('px-[10px] py-1', hideInfo && '!px-2 !py-0.5')}>
<CodeEditor
readOnly
title={<div>OUTPUT</div>}
title={<div>{t('workflow.common.output').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={nodeInfo.outputs}
isJSONStringifyBeauty

View File

@ -1,5 +1,6 @@
'use client'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import StatusPanel from './status'
import MetaData from './meta'
import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'
@ -33,6 +34,7 @@ const ResultPanel: FC<ResultPanelProps> = ({
steps,
showSteps,
}) => {
const { t } = useTranslation()
return (
<div className='bg-white py-2'>
<div className='px-4 py-2'>
@ -46,7 +48,7 @@ const ResultPanel: FC<ResultPanelProps> = ({
<div className='px-4 py-2 flex flex-col gap-2'>
<CodeEditor
readOnly
title={<div>INPUT</div>}
title={<div>{t('workflow.common.input').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={inputs}
isJSONStringifyBeauty
@ -54,7 +56,7 @@ const ResultPanel: FC<ResultPanelProps> = ({
{process_data && (
<CodeEditor
readOnly
title={<div>PROCESS DATA</div>}
title={<div>{t('workflow.common.processData').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={process_data}
isJSONStringifyBeauty
@ -63,7 +65,7 @@ const ResultPanel: FC<ResultPanelProps> = ({
{(outputs || status === 'running') && (
<CodeEditor
readOnly
title={<div>OUTPUT</div>}
title={<div>{t('workflow.common.output').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={outputs}
isJSONStringifyBeauty

View File

@ -46,6 +46,9 @@ const translation = {
content: 'The variable is used in other nodes. Do you still want to remove it?',
},
insertVarTip: 'Press the \'/\' key to insert quickly',
processData: 'Process Data',
input: 'Input',
output: 'Output',
},
errorMsg: {
fieldRequired: '{{field}} is required',

View File

@ -46,6 +46,9 @@ const translation = {
content: 'La variable est utilisée dans d\'autres nœuds. Voulez-vous toujours la supprimer ?',
},
insertVarTip: 'Appuyez sur la touche \'/\' pour insérer rapidement',
processData: 'Traiter les données',
input: 'Entrée',
output: 'Sortie',
},
errorMsg: {
fieldRequired: '{{field}} est requis',

View File

@ -46,6 +46,9 @@ const translation = {
content: '他のノードで変数が使用されています。それでも削除しますか?',
},
insertVarTip: 'クイック挿入のために\'/\'キーを押します',
processData: 'データ処理',
input: '入力',
output: '出力',
},
errorMsg: {
fieldRequired: '{{field}}は必須です',

View File

@ -46,6 +46,9 @@ const translation = {
content: 'A variável está sendo usada em outros nós. Deseja removê-la mesmo assim?',
},
insertVarTip: 'Pressione a tecla \'/\' para inserir rapidamente',
processData: 'Processar dados',
input: 'Entrada',
output: 'Saída',
},
errorMsg: {
fieldRequired: '{{field}} é obrigatório',

View File

@ -46,6 +46,9 @@ const translation = {
content: 'Цю змінну використовується в інших вузлах. Ви все ще хочете її видалити?',
},
insertVarTip: 'Натисніть клавішу "/" для швидкого вставлення',
processData: 'Обробка даних',
input: 'Вхід',
output: 'Вихід',
},
errorMsg: {
fieldRequired: '{{field}} є обов\'язковим',

View File

@ -46,6 +46,9 @@ const translation = {
content: 'Biến được sử dụng trong các nút khác. Bạn vẫn muốn xóa nó?',
},
insertVarTip: 'Nhấn phím \'/\' để chèn nhanh',
processData: 'Xử lý dữ liệu',
input: 'Nhập',
output: 'Đầu ra',
},
errorMsg: {
fieldRequired: '{{field}} là bắt buộc',

View File

@ -46,6 +46,9 @@ const translation = {
content: '该变量在其他节点中使用。您是否仍要删除它?',
},
insertVarTip: '按 \'/\' 键快速插入',
processData: '数据处理',
input: '输入',
output: '输出',
},
errorMsg: {
fieldRequired: '{{field}} 不能为空',