Skip to content

Commit

Permalink
feat: add missing workflow i18n keys (langgenius#3309)
Browse files Browse the repository at this point in the history
Co-authored-by: lbm21 <313338264@qq.com>
  • Loading branch information
2 people authored and dengpeng committed Jun 16, 2024
1 parent 90bd34a commit 72e8b69
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions web/app/components/workflow/run/node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions web/app/components/workflow/run/result-panel.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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'>
Expand All @@ -46,15 +48,15 @@ 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
/>
{process_data && (
<CodeEditor
readOnly
title={<div>PROCESS DATA</div>}
title={<div>{t('workflow.common.processData').toLocaleUpperCase()}</div>}
language={CodeLanguage.json}
value={process_data}
isJSONStringifyBeauty
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/en-US/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/fr-FR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/ja-JP/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const translation = {
content: '他のノードで変数が使用されています。それでも削除しますか?',
},
insertVarTip: 'クイック挿入のために\'/\'キーを押します',
processData: 'データ処理',
input: '入力',
output: '出力',
},
errorMsg: {
fieldRequired: '{{field}}は必須です',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/pt-BR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/uk-UA/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const translation = {
content: 'Цю змінну використовується в інших вузлах. Ви все ще хочете її видалити?',
},
insertVarTip: 'Натисніть клавішу "/" для швидкого вставлення',
processData: 'Обробка даних',
input: 'Вхід',
output: 'Вихід',
},
errorMsg: {
fieldRequired: '{{field}} є обов\'язковим',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/vi-VN/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions web/i18n/zh-Hans/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const translation = {
content: '该变量在其他节点中使用。您是否仍要删除它?',
},
insertVarTip: '按 \'/\' 键快速插入',
processData: '数据处理',
input: '输入',
output: '输出',
},
errorMsg: {
fieldRequired: '{{field}} 不能为空',
Expand Down

0 comments on commit 72e8b69

Please sign in to comment.