mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +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:
@ -11,7 +11,7 @@ type Props = {
|
||||
content: string
|
||||
}
|
||||
|
||||
const prefixEmbedded = 'appOverview.overview.appInfo.embedded'
|
||||
const prefixEmbedded = 'overview.appInfo.embedded'
|
||||
|
||||
const CopyFeedbackNew = ({ content }: Props) => {
|
||||
const { t } = useTranslation()
|
||||
@ -31,8 +31,8 @@ const CopyFeedbackNew = ({ content }: Props) => {
|
||||
<Tooltip
|
||||
popupContent={
|
||||
(isCopied
|
||||
? t(`${prefixEmbedded}.copied`)
|
||||
: t(`${prefixEmbedded}.copy`)) || ''
|
||||
? t(`${prefixEmbedded}.copied`, { ns: 'appOverview' })
|
||||
: t(`${prefixEmbedded}.copy`, { ns: 'appOverview' })) || ''
|
||||
}
|
||||
>
|
||||
<div
|
||||
|
||||
@ -196,7 +196,7 @@ const InputVarList: FC<Props> = ({
|
||||
nodesOutputVars={availableVars}
|
||||
availableNodes={availableNodesWithParent}
|
||||
onFocusChange={handleInputFocus(variable)}
|
||||
placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
|
||||
placeholder={t('nodes.http.insertVarPlaceholder', { ns: 'workflow' })!}
|
||||
placeholderClassName="!leading-[21px]"
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -56,7 +56,7 @@ const MixedVariableTextInput = ({
|
||||
}
|
||||
if (node.data.type === BlockEnum.Start) {
|
||||
acc.sys = {
|
||||
title: t('workflow.blocks.start'),
|
||||
title: t('blocks.start', { ns: 'workflow' }),
|
||||
type: BlockEnum.Start,
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ const Placeholder = ({ disableVariableInsertion = false }: PlaceholderProps) =>
|
||||
}}
|
||||
>
|
||||
<div className="flex grow items-center">
|
||||
{t('workflow.nodes.tool.insertPlaceholder1')}
|
||||
{t('nodes.tool.insertPlaceholder1', { ns: 'workflow' })}
|
||||
{(!disableVariableInsertion) && (
|
||||
<>
|
||||
<div className="system-kbd mx-0.5 flex h-4 w-4 items-center justify-center rounded bg-components-kbd-bg-gray text-text-placeholder">/</div>
|
||||
@ -42,7 +42,7 @@ const Placeholder = ({ disableVariableInsertion = false }: PlaceholderProps) =>
|
||||
handleInsert('/')
|
||||
})}
|
||||
>
|
||||
{t('workflow.nodes.tool.insertPlaceholder2')}
|
||||
{t('nodes.tool.insertPlaceholder2', { ns: 'workflow' })}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user