From 2f241d932c81dba2bf680e595de52dc93ee7741e Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 24 Jun 2025 16:29:54 +0800 Subject: [PATCH] chore: temp i18n --- .../auto-update-setting/plugins-picker.tsx | 9 +++++++-- web/i18n/en-US/plugin.ts | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx index ce5104764e..fbddcc1f60 100644 --- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx +++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx @@ -2,10 +2,13 @@ import type { FC } from 'react' import React from 'react' import NoPluginSelected from './no-plugin-selected' -import type { AUTO_UPDATE_MODE } from './types' +import { AUTO_UPDATE_MODE } from './types' import PluginsSelected from './plugins-selected' import Button from '@/app/components/base/button' import { RiAddLine } from '@remixicon/react' +import { useTranslation } from 'react-i18next' + +const i18nPrefix = 'plugin.autoUpdate' type Props = { updateMode: AUTO_UPDATE_MODE @@ -18,12 +21,14 @@ const PluginsPicker: FC = ({ value, onChange, }) => { + const { t } = useTranslation() const hasSelected = value.length > 0 + const isExcludeMode = updateMode === AUTO_UPDATE_MODE.exclude return (
{hasSelected ? (
-
The following 21 plugins will not auto-update
+
{t(`${i18nPrefix}.${isExcludeMode ? 'excludeUpdate' : 'partialUPdate'}`, { num: value.length })}
Clear all
) : ( diff --git a/web/i18n/en-US/plugin.ts b/web/i18n/en-US/plugin.ts index 4befade891..069c00103b 100644 --- a/web/i18n/en-US/plugin.ts +++ b/web/i18n/en-US/plugin.ts @@ -143,6 +143,12 @@ const translation = { exclude: 'Selected plugins will not auto-update', partial: 'Only selected plugins will auto-update. No plugins are currently selected, so no plugins will auto-update.', }, + excludeUpdate: 'The following {{num}} plugins will not auto-update', + partialUPdate: 'Only the following {{num}} plugins will auto-update', + operation: { + clearAll: 'Clear all', + select: 'Select plugins', + }, nextUpdateTime: 'Next auto-update: {{time}}', pluginDowngradeWarning: { title: 'Plugin Downgrade',