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

@ -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

View File

@ -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]"
/>
)}

View File

@ -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,
}
}

View File

@ -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>
</>
)}