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:
@ -136,11 +136,11 @@ const IterationLogTrigger = ({
|
||||
>
|
||||
<Iteration className="h-4 w-4 shrink-0 text-components-button-tertiary-text" />
|
||||
<div className="system-sm-medium flex-1 text-left text-components-button-tertiary-text">
|
||||
{t('workflow.nodes.iteration.iteration', { count: displayIterationCount })}
|
||||
{t('nodes.iteration.iteration', { ns: 'workflow', count: displayIterationCount })}
|
||||
{errorCount > 0 && (
|
||||
<>
|
||||
{t('workflow.nodes.iteration.comma')}
|
||||
{t('workflow.nodes.iteration.error', { count: errorCount })}
|
||||
{t('nodes.iteration.comma', { ns: 'workflow' })}
|
||||
{t('nodes.iteration.error', { ns: 'workflow', count: errorCount })}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -15,7 +15,7 @@ import TracingPanel from '@/app/components/workflow/run/tracing-panel'
|
||||
import { NodeRunningStatus } from '@/app/components/workflow/types'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
const i18nPrefix = 'workflow.singleRun'
|
||||
const i18nPrefix = 'singleRun'
|
||||
|
||||
type Props = {
|
||||
list: NodeTracing[][]
|
||||
@ -83,7 +83,7 @@ const IterationResultPanel: FC<Props> = ({
|
||||
}}
|
||||
>
|
||||
<RiArrowLeftLine className="mr-1 h-4 w-4" />
|
||||
<div className="system-sm-medium">{t(`${i18nPrefix}.back`)}</div>
|
||||
<div className="system-sm-medium">{t(`${i18nPrefix}.back`, { ns: 'workflow' })}</div>
|
||||
</div>
|
||||
{/* List */}
|
||||
<div className="bg-components-panel-bg p-2">
|
||||
@ -102,7 +102,7 @@ const IterationResultPanel: FC<Props> = ({
|
||||
<Iteration className="h-3 w-3 text-text-primary-on-surface" />
|
||||
</div>
|
||||
<span className="system-sm-semibold-uppercase grow text-text-primary">
|
||||
{t(`${i18nPrefix}.iteration`)}
|
||||
{t(`${i18nPrefix}.iteration`, { ns: 'workflow' })}
|
||||
{' '}
|
||||
{index + 1}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user