diff --git a/web/app/components/plugins/permission-setting-modal/modal.tsx b/web/app/components/plugins/permission-setting-modal/modal.tsx index a6eb0db852..4c59bdc0ca 100644 --- a/web/app/components/plugins/permission-setting-modal/modal.tsx +++ b/web/app/components/plugins/permission-setting-modal/modal.tsx @@ -8,6 +8,7 @@ import Button from '@/app/components/base/button' import type { Permissions } from '@/app/components/plugins/types' import { PermissionType } from '@/app/components/plugins/types' +const i18nPrefix = 'plugin.privilege' type Props = { payload: Permissions onHide: () => void @@ -44,22 +45,22 @@ const PluginSettingModal: FC = ({ >
- Plugin Preferences + {t(`${i18nPrefix}.title`)}
{[ - { title: 'Who can install and manage plugins?', key: 'canInstall', value: tempPrivilege.canInstall }, - { title: 'Who can debug plugins?', key: 'canDebugger', value: tempPrivilege.canDebugger }, + { title: t(`${i18nPrefix}.whoCanInstall`), key: 'canInstall', value: tempPrivilege.canInstall }, + { title: t(`${i18nPrefix}.whoCanDebug`), key: 'canDebugger', value: tempPrivilege.canDebugger }, ].map(({ title, key, value }) => (
-
+
{title}
{[PermissionType.everyone, PermissionType.admin, PermissionType.noOne].map(option => ( handlePrivilegeChange(key)(option)} selected={value === option} className="flex-1" @@ -74,14 +75,14 @@ const PluginSettingModal: FC = ({ className='min-w-[72px]' onClick={onHide} > - Cancel + {t('common.operation.cancel')}
diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx index 2240db20dd..3aee11c352 100644 --- a/web/app/components/plugins/plugin-page/index.tsx +++ b/web/app/components/plugins/plugin-page/index.tsx @@ -134,12 +134,16 @@ const PluginPage = ({ } { canSetPermissions && ( - + + ) }
diff --git a/web/i18n/en-US/plugin.ts b/web/i18n/en-US/plugin.ts index a82cdf6707..348939de94 100644 --- a/web/i18n/en-US/plugin.ts +++ b/web/i18n/en-US/plugin.ts @@ -21,6 +21,14 @@ const translation = { }, install: '{{num}} installs', installAction: 'Install', + privilege: { + title: 'Plugin Preferences', + whoCanInstall: 'Who can install and manage plugins?', + whoCanDebug: 'Who can debug plugins?', + everyone: 'Everyone', + admin: 'Admins', + noOne: 'No one', + }, } export default translation diff --git a/web/i18n/zh-Hans/plugin.ts b/web/i18n/zh-Hans/plugin.ts index 5166ddedc3..3543e6b526 100644 --- a/web/i18n/zh-Hans/plugin.ts +++ b/web/i18n/zh-Hans/plugin.ts @@ -21,6 +21,14 @@ const translation = { }, install: '{{num}} 次安装', installAction: '安装', + privilege: { + title: '插件偏好', + whoCanInstall: '谁可以安装和管理插件?', + whoCanDebug: '谁可以调试插件?', + everyone: '所有人', + admin: '管理员', + noOne: '无人', + }, } export default translation