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

@ -23,7 +23,7 @@ const AutoDisabledDocument: FC<Props> = ({
const handleEnableDocuments = useCallback(async () => {
await enableDocument({ datasetId, documentIds })
invalidDisabledDocument()
Toast.notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
Toast.notify({ type: 'success', message: t('actionMsg.modifiedSuccessfully', { ns: 'common' }) })
}, [])
if (!hasDisabledDocument || isLoading)
return null
@ -31,8 +31,8 @@ const AutoDisabledDocument: FC<Props> = ({
return (
<StatusWithAction
type="info"
description={t('dataset.documentsDisabled', { num: documentIds?.length })}
actionText={t('dataset.enable')}
description={t('documentsDisabled', { ns: 'dataset', num: documentIds?.length })}
actionText={t('enable', { ns: 'dataset' })}
onAction={handleEnableDocuments}
/>
)

View File

@ -64,8 +64,8 @@ const RetryButton: FC<Props> = ({ datasetId }) => {
return (
<StatusWithAction
type="warning"
description={`${errorDocs?.total} ${t('dataset.docsFailedNotice')}`}
actionText={t('dataset.retry')}
description={`${errorDocs?.total} ${t('docsFailedNotice', { ns: 'dataset' })}`}
actionText={t('retry', { ns: 'dataset' })}
disabled={indexState.value === 'retry'}
onAction={indexState.value === 'error' ? onRetryErrorDocs : noop}
/>