mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user