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

@ -27,7 +27,7 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
return (
<div className="mt-6">
<div className="system-sm-medium text-text-primary">{t('share.generation.csvStructureTitle')}</div>
<div className="system-sm-medium text-text-primary">{t('generation.csvStructureTitle', { ns: 'share' })}</div>
<div className="mt-2 max-h-[500px] overflow-auto">
<table className="w-full table-fixed border-separate border-spacing-0 rounded-lg border border-divider-regular text-xs">
<thead className="text-text-tertiary">
@ -43,7 +43,7 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
<td key={i} className="h-9 pl-4">
{item.name}
{' '}
{t('share.generation.field')}
{t('generation.field', { ns: 'share' })}
</td>
))}
</tr>
@ -64,7 +64,7 @@ const CSVDownload: FC<ICSVDownloadProps> = ({
>
<div className="system-xs-medium flex h-[18px] items-center space-x-1 text-text-accent">
<DownloadIcon className="h-3 w-3" />
<span>{t('share.generation.downloadTemplate')}</span>
<span>{t('generation.downloadTemplate', { ns: 'share' })}</span>
</div>
</CSVDownloader>
</div>

View File

@ -62,8 +62,8 @@ const CSVReader: FC<Props> = ({
<div className="flex w-full items-center justify-center space-x-2">
<CSVIcon className="shrink-0" />
<div className="text-text-tertiary">
{t('share.generation.csvUploadTitle')}
<span className="cursor-pointer text-text-accent">{t('share.generation.browse')}</span>
{t('generation.csvUploadTitle', { ns: 'share' })}
<span className="cursor-pointer text-text-accent">{t('generation.browse', { ns: 'share' })}</span>
</div>
</div>
)

View File

@ -51,7 +51,7 @@ const RunBatch: FC<IRunBatchProps> = ({
disabled={!isParsed || !isAllFinished}
>
<Icon className={cn(!isAllFinished && 'animate-spin', 'mr-1 h-4 w-4 shrink-0')} aria-hidden="true" />
<span className="text-[13px] uppercase">{t('share.generation.run')}</span>
<span className="text-[13px] uppercase">{t('generation.run', { ns: 'share' })}</span>
</Button>
</div>
</div>

View File

@ -41,7 +41,7 @@ const ResDownload: FC<IResDownloadProps> = ({
{!isMobile && (
<Button className={cn('space-x-1')}>
<RiDownloadLine className="h-4 w-4" />
<span>{t('common.operation.download')}</span>
<span>{t('operation.download', { ns: 'common' })}</span>
</Button>
)}
</CSVDownloader>