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

@ -22,8 +22,8 @@ const SerpapiPlugin = ({
const forms: Form[] = [{
key: 'api_key',
title: t('common.plugin.serpapi.apiKey'),
placeholder: t('common.plugin.serpapi.apiKeyPlaceholder'),
title: t('plugin.serpapi.apiKey', { ns: 'common' }),
placeholder: t('plugin.serpapi.apiKeyPlaceholder', { ns: 'common' }),
value: plugin.credentials?.api_key,
validate: {
before: (v) => {
@ -55,7 +55,7 @@ const SerpapiPlugin = ({
})
if (res.status === 'success') {
notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
notify({ type: 'success', message: t('actionMsg.modifiedSuccessfully', { ns: 'common' }) })
onUpdate()
return true
}
@ -68,7 +68,7 @@ const SerpapiPlugin = ({
status={plugin.credentials?.api_key ? 'success' : 'add'}
forms={forms}
keyFrom={{
text: t('common.plugin.serpapi.keyFrom'),
text: t('plugin.serpapi.keyFrom', { ns: 'common' }),
link: 'https://serpapi.com/manage-api-key',
}}
onSave={handleSave}