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