mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +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:
@ -23,39 +23,39 @@ const Panel = () => {
|
||||
? [{
|
||||
name: 'conversation_id',
|
||||
value_type: 'string' as const,
|
||||
description: t('workflow.globalVar.fieldsDescription.conversationId'),
|
||||
description: t('globalVar.fieldsDescription.conversationId', { ns: 'workflow' }),
|
||||
}, {
|
||||
name: 'dialog_count',
|
||||
value_type: 'number' as const,
|
||||
description: t('workflow.globalVar.fieldsDescription.dialogCount'),
|
||||
description: t('globalVar.fieldsDescription.dialogCount', { ns: 'workflow' }),
|
||||
}]
|
||||
: []),
|
||||
{
|
||||
name: 'user_id',
|
||||
value_type: 'string',
|
||||
description: t('workflow.globalVar.fieldsDescription.userId'),
|
||||
description: t('globalVar.fieldsDescription.userId', { ns: 'workflow' }),
|
||||
},
|
||||
{
|
||||
name: 'app_id',
|
||||
value_type: 'string',
|
||||
description: t('workflow.globalVar.fieldsDescription.appId'),
|
||||
description: t('globalVar.fieldsDescription.appId', { ns: 'workflow' }),
|
||||
},
|
||||
{
|
||||
name: 'workflow_id',
|
||||
value_type: 'string',
|
||||
description: t('workflow.globalVar.fieldsDescription.workflowId'),
|
||||
description: t('globalVar.fieldsDescription.workflowId', { ns: 'workflow' }),
|
||||
},
|
||||
{
|
||||
name: 'workflow_run_id',
|
||||
value_type: 'string',
|
||||
description: t('workflow.globalVar.fieldsDescription.workflowRunId'),
|
||||
description: t('globalVar.fieldsDescription.workflowRunId', { ns: 'workflow' }),
|
||||
},
|
||||
// is workflow
|
||||
...((isWorkflowPage && !isChatMode)
|
||||
? [{
|
||||
name: 'timestamp',
|
||||
value_type: 'number' as const,
|
||||
description: t('workflow.globalVar.fieldsDescription.triggerTimestamp'),
|
||||
description: t('globalVar.fieldsDescription.triggerTimestamp', { ns: 'workflow' }),
|
||||
}]
|
||||
: []),
|
||||
]
|
||||
@ -67,7 +67,7 @@ const Panel = () => {
|
||||
)}
|
||||
>
|
||||
<div className="system-xl-semibold flex shrink-0 items-center justify-between p-4 pb-0 text-text-primary">
|
||||
{t('workflow.globalVar.title')}
|
||||
{t('globalVar.title', { ns: 'workflow' })}
|
||||
<div className="flex items-center">
|
||||
<div
|
||||
className="flex h-6 w-6 cursor-pointer items-center justify-center"
|
||||
@ -77,7 +77,7 @@ const Panel = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="system-sm-regular shrink-0 px-4 py-1 text-text-tertiary">{t('workflow.globalVar.description')}</div>
|
||||
<div className="system-sm-regular shrink-0 px-4 py-1 text-text-tertiary">{t('globalVar.description', { ns: 'workflow' })}</div>
|
||||
|
||||
<div className="mt-4 grow overflow-y-auto rounded-b-2xl px-4">
|
||||
{globalVariableList.map(item => (
|
||||
|
||||
Reference in New Issue
Block a user