mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
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:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user