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

@ -12,7 +12,7 @@ import {
} from '@/app/components/base/portal-to-follow-elem'
import { AUTO_UPDATE_STRATEGY } from './types'
const i18nPrefix = 'plugin.autoUpdate.strategy'
const i18nPrefix = 'autoUpdate.strategy'
type Props = {
value: AUTO_UPDATE_STRATEGY
@ -27,18 +27,18 @@ const StrategyPicker = ({
const options = [
{
value: AUTO_UPDATE_STRATEGY.disabled,
label: t(`${i18nPrefix}.disabled.name`),
description: t(`${i18nPrefix}.disabled.description`),
label: t(`${i18nPrefix}.disabled.name`, { ns: 'plugin' }),
description: t(`${i18nPrefix}.disabled.description`, { ns: 'plugin' }),
},
{
value: AUTO_UPDATE_STRATEGY.fixOnly,
label: t(`${i18nPrefix}.fixOnly.name`),
description: t(`${i18nPrefix}.fixOnly.description`),
label: t(`${i18nPrefix}.fixOnly.name`, { ns: 'plugin' }),
description: t(`${i18nPrefix}.fixOnly.description`, { ns: 'plugin' }),
},
{
value: AUTO_UPDATE_STRATEGY.latest,
label: t(`${i18nPrefix}.latest.name`),
description: t(`${i18nPrefix}.latest.description`),
label: t(`${i18nPrefix}.latest.name`, { ns: 'plugin' }),
description: t(`${i18nPrefix}.latest.description`, { ns: 'plugin' }),
},
]
const selectedOption = options.find(option => option.value === value)