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,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}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user