diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/component-ui.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/component-ui.tsx index efe28b4040..89d6ef4049 100644 --- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/component-ui.tsx +++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/component-ui.tsx @@ -130,7 +130,7 @@ const HITLInputComponentUI: FC = ({ const fileTypes = resolvedFormInput.allowed_file_types.join(', ') if (isFileListFormInput(resolvedFormInput)) - return [fileTypes, resolvedFormInput.max_upload_count ? `${t('feature.fileUpload.numberLimit', { ns: 'appDebug' })}: ${resolvedFormInput.max_upload_count}` : null].filter(Boolean).join(' · ') || inputTypeLabel + return [fileTypes, resolvedFormInput.max_upload_count ? `${t(`${i18nPrefix}.maxUploads`, { ns: 'workflow' })}: ${resolvedFormInput.max_upload_count}` : null].filter(Boolean).join(' · ') || inputTypeLabel return fileTypes || inputTypeLabel }, [inputTypeLabel, paragraphDefault?.value, resolvedFormInput, t]) diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx index 71a966213a..2d13d32384 100644 --- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx +++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx @@ -248,7 +248,7 @@ const InputField: React.FC = ({ {isSelectFormInput(tempPayload) && (
- {t('variableConfig.options', { ns: 'appDebug' })} + {t(`${i18nPrefix}.options`, { ns: 'workflow' })}
{tempPayload.option_source.type === 'variable' ? ( diff --git a/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx b/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx index ed14130c40..acdb54f924 100644 --- a/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx +++ b/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx @@ -1,5 +1,6 @@ import type * as React from 'react' import type { FormInputItem } from '../types' +import { useTranslation } from 'react-i18next' import { isFileFormInput, isFileListFormInput, isSelectFormInput } from '../types' const variableRegex = /\{\{#(.+?)#\}\}/g @@ -134,6 +135,7 @@ export const Variable: React.FC<{ path: string }> = ({ path }) => { } export const Note: React.FC<{ input: FormInputItem, nodeName: (nodeId: string) => string }> = ({ input, nodeName }) => { + const { t } = useTranslation() if (isSelectFormInput(input)) { const isVariable = input.option_source.type === 'variable' const path = `{{#${input.option_source.selector.join('.')}#}}` @@ -156,7 +158,7 @@ export const Note: React.FC<{ input: FormInputItem, nodeName: (nodeId: string) = if (isFileListFormInput(input)) { const summary = [ input.allowed_file_types.join(', '), - input.max_upload_count ? `max ${input.max_upload_count}` : null, + input.max_upload_count ? `${t('nodes.humanInput.insertInputField.maxUploads', { ns: 'workflow' })}: ${input.max_upload_count}` : null, ].filter(Boolean).join(' · ') return ( diff --git a/web/i18n/en-US/workflow.json b/web/i18n/en-US/workflow.json index 160a48f65a..a4963f3592 100644 --- a/web/i18n/en-US/workflow.json +++ b/web/i18n/en-US/workflow.json @@ -622,6 +622,8 @@ "nodes.humanInput.formContent.tooltip": "What users will see after opening the form. Supports Markdown formatting.", "nodes.humanInput.insertInputField.fieldType": "Field Type", "nodes.humanInput.insertInputField.insert": "Insert", + "nodes.humanInput.insertInputField.maxUploads": "Max uploads", + "nodes.humanInput.insertInputField.options": "Options", "nodes.humanInput.insertInputField.prePopulateField": "Pre-populate Field", "nodes.humanInput.insertInputField.prePopulateFieldPlaceholder": "Add or users will see this content initially, or leave empty.", "nodes.humanInput.insertInputField.saveResponseAs": "Save Response As",