refactor(i18n): use JSON with flattened key and namespace (#30114)

Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Stephen Zhou
2025-12-29 14:52:32 +08:00
committed by GitHub
parent 09be869f58
commit 6d0e36479b
2552 changed files with 111159 additions and 142972 deletions

View File

@ -15,7 +15,7 @@ import VarReferencePicker from '../_base/components/variable/var-reference-picke
import { useNodeHelpLink } from '../_base/hooks/use-node-help-link'
import useConfig from './use-config'
const i18nPrefix = 'workflow.nodes.docExtractor'
const i18nPrefix = 'nodes.docExtractor'
const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
id,
@ -52,7 +52,7 @@ const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
<div className="mt-2">
<div className="space-y-4 px-4 pb-4">
<Field
title={t(`${i18nPrefix}.inputVar`)}
title={t(`${i18nPrefix}.inputVar`, { ns: 'workflow' })}
required
>
<>
@ -66,8 +66,8 @@ const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
typePlaceHolder="File | Array[File]"
/>
<div className="body-xs-regular mt-1 py-0.5 text-text-tertiary">
{t(`${i18nPrefix}.supportFileTypes`, { types: supportTypesShowNames })}
<a className="text-text-accent" href={link} target="_blank">{t(`${i18nPrefix}.learnMore`)}</a>
{t(`${i18nPrefix}.supportFileTypes`, { ns: 'workflow', types: supportTypesShowNames })}
<a className="text-text-accent" href={link} target="_blank">{t(`${i18nPrefix}.learnMore`, { ns: 'workflow' })}</a>
</div>
</>
</Field>
@ -78,7 +78,7 @@ const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
<VarItem
name="text"
type={inputs.is_array_file ? 'array[string]' : 'string'}
description={t(`${i18nPrefix}.outputVars.text`)}
description={t(`${i18nPrefix}.outputVars.text`, { ns: 'workflow' })}
/>
</OutputVars>
</div>