From 0f897bc1f920b02551b867efe772dc2c0a167def Mon Sep 17 00:00:00 2001 From: Lao Date: Wed, 10 Apr 2024 22:20:14 +0800 Subject: [PATCH] feat: add missing workflow i18n keys (#3309) Co-authored-by: lbm21 <313338264@qq.com> --- web/app/components/workflow/run/node.tsx | 6 +++--- web/app/components/workflow/run/result-panel.tsx | 8 +++++--- web/i18n/en-US/workflow.ts | 3 +++ web/i18n/fr-FR/workflow.ts | 3 +++ web/i18n/ja-JP/workflow.ts | 3 +++ web/i18n/pt-BR/workflow.ts | 3 +++ web/i18n/uk-UA/workflow.ts | 3 +++ web/i18n/vi-VN/workflow.ts | 3 +++ web/i18n/zh-Hans/workflow.ts | 3 +++ 9 files changed, 29 insertions(+), 6 deletions(-) diff --git a/web/app/components/workflow/run/node.tsx b/web/app/components/workflow/run/node.tsx index e9017907c6..237ac1c3de 100644 --- a/web/app/components/workflow/run/node.tsx +++ b/web/app/components/workflow/run/node.tsx @@ -96,7 +96,7 @@ const NodePanel: FC = ({ nodeInfo, hideInfo = false }) => {
INPUT
} + title={
{t('workflow.common.input').toLocaleUpperCase()}
} language={CodeLanguage.json} value={nodeInfo.inputs} isJSONStringifyBeauty @@ -107,7 +107,7 @@ const NodePanel: FC = ({ nodeInfo, hideInfo = false }) => {
PROCESS DATA
} + title={
{t('workflow.common.processData').toLocaleUpperCase()}
} language={CodeLanguage.json} value={nodeInfo.process_data} isJSONStringifyBeauty @@ -118,7 +118,7 @@ const NodePanel: FC = ({ nodeInfo, hideInfo = false }) => {
OUTPUT
} + title={
{t('workflow.common.output').toLocaleUpperCase()}
} language={CodeLanguage.json} value={nodeInfo.outputs} isJSONStringifyBeauty diff --git a/web/app/components/workflow/run/result-panel.tsx b/web/app/components/workflow/run/result-panel.tsx index 09e90de51e..187ee5d55b 100644 --- a/web/app/components/workflow/run/result-panel.tsx +++ b/web/app/components/workflow/run/result-panel.tsx @@ -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 = ({ steps, showSteps, }) => { + const { t } = useTranslation() return (
@@ -46,7 +48,7 @@ const ResultPanel: FC = ({
INPUT
} + title={
{t('workflow.common.input').toLocaleUpperCase()}
} language={CodeLanguage.json} value={inputs} isJSONStringifyBeauty @@ -54,7 +56,7 @@ const ResultPanel: FC = ({ {process_data && ( PROCESS DATA
} + title={
{t('workflow.common.processData').toLocaleUpperCase()}
} language={CodeLanguage.json} value={process_data} isJSONStringifyBeauty @@ -63,7 +65,7 @@ const ResultPanel: FC = ({ {(outputs || status === 'running') && ( OUTPUT
} + title={
{t('workflow.common.output').toLocaleUpperCase()}
} language={CodeLanguage.json} value={outputs} isJSONStringifyBeauty diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 6c4b5f7030..949fcb061a 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -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', diff --git a/web/i18n/fr-FR/workflow.ts b/web/i18n/fr-FR/workflow.ts index 3baaf2ffc3..a25c194254 100644 --- a/web/i18n/fr-FR/workflow.ts +++ b/web/i18n/fr-FR/workflow.ts @@ -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', diff --git a/web/i18n/ja-JP/workflow.ts b/web/i18n/ja-JP/workflow.ts index 21905f7bd3..fe135fec8a 100644 --- a/web/i18n/ja-JP/workflow.ts +++ b/web/i18n/ja-JP/workflow.ts @@ -46,6 +46,9 @@ const translation = { content: '他のノードで変数が使用されています。それでも削除しますか?', }, insertVarTip: 'クイック挿入のために\'/\'キーを押します', + processData: 'データ処理', + input: '入力', + output: '出力', }, errorMsg: { fieldRequired: '{{field}}は必須です', diff --git a/web/i18n/pt-BR/workflow.ts b/web/i18n/pt-BR/workflow.ts index 2e07f45de9..20a1903903 100644 --- a/web/i18n/pt-BR/workflow.ts +++ b/web/i18n/pt-BR/workflow.ts @@ -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', diff --git a/web/i18n/uk-UA/workflow.ts b/web/i18n/uk-UA/workflow.ts index 9816544ad7..c4e1ea7aa4 100644 --- a/web/i18n/uk-UA/workflow.ts +++ b/web/i18n/uk-UA/workflow.ts @@ -46,6 +46,9 @@ const translation = { content: 'Цю змінну використовується в інших вузлах. Ви все ще хочете її видалити?', }, insertVarTip: 'Натисніть клавішу "/" для швидкого вставлення', + processData: 'Обробка даних', + input: 'Вхід', + output: 'Вихід', }, errorMsg: { fieldRequired: '{{field}} є обов\'язковим', diff --git a/web/i18n/vi-VN/workflow.ts b/web/i18n/vi-VN/workflow.ts index 2192d0d649..4bb964db69 100644 --- a/web/i18n/vi-VN/workflow.ts +++ b/web/i18n/vi-VN/workflow.ts @@ -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', diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 22113b1332..2805c59fa4 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -46,6 +46,9 @@ const translation = { content: '该变量在其他节点中使用。您是否仍要删除它?', }, insertVarTip: '按 \'/\' 键快速插入', + processData: '数据处理', + input: '输入', + output: '输出', }, errorMsg: { fieldRequired: '{{field}} 不能为空',