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

@ -132,7 +132,7 @@ const CheckboxList: FC<CheckboxListProps> = ({
)}
{showCount && selectedCount > 0 && (
<Badge uppercase>
{t('common.operation.selectCount', { count: selectedCount })}
{t('operation.selectCount', { ns: 'common', count: selectedCount })}
</Badge>
)}
</div>
@ -141,8 +141,8 @@ const CheckboxList: FC<CheckboxListProps> = ({
<div className="system-sm-medium-uppercase flex-1 leading-6 text-text-secondary">
{
filteredOptions.length > 0
? t('common.operation.searchCount', { count: filteredOptions.length, content: title })
: t('common.operation.noSearchCount', { content: title })
? t('operation.searchCount', { ns: 'common', count: filteredOptions.length, content: title })
: t('operation.noSearchCount', { ns: 'common', content: title })
}
</div>
)}
@ -150,7 +150,7 @@ const CheckboxList: FC<CheckboxListProps> = ({
<SearchInput
value={searchQuery}
onChange={setSearchQuery}
placeholder={t('common.placeholder.search')}
placeholder={t('placeholder.search', { ns: 'common' })}
className="w-40"
/>
)}
@ -168,11 +168,11 @@ const CheckboxList: FC<CheckboxListProps> = ({
? (
<div className="flex flex-col items-center justify-center gap-2">
<Image alt="search menu" src={SearchMenu} width={32} />
<span className="system-sm-regular text-text-secondary">{t('common.operation.noSearchResults', { content: title })}</span>
<Button variant="secondary-accent" size="small" onClick={() => setSearchQuery('')}>{t('common.operation.resetKeywords')}</Button>
<span className="system-sm-regular text-text-secondary">{t('operation.noSearchResults', { ns: 'common', content: title })}</span>
<Button variant="secondary-accent" size="small" onClick={() => setSearchQuery('')}>{t('operation.resetKeywords', { ns: 'common' })}</Button>
</div>
)
: t('common.noData')}
: t('noData', { ns: 'common' })}
</div>
)
: (