From 9e3078e0173b053ee7e7f60699439dc7e89463b9 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Thu, 6 Nov 2025 18:39:30 +0800 Subject: [PATCH] fix(i18n, notice): propagate runtime params and update cleanup script path --- scripts/cleanup-unused-i18n.mjs | 5 +---- src/components/base/NoticeManager.tsx | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/cleanup-unused-i18n.mjs b/scripts/cleanup-unused-i18n.mjs index 19188323..07395508 100644 --- a/scripts/cleanup-unused-i18n.mjs +++ b/scripts/cleanup-unused-i18n.mjs @@ -10,10 +10,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const LOCALES_DIR = path.resolve(__dirname, "../src/locales"); -const TAURI_LOCALES_DIR = path.resolve( - __dirname, - "../src-tauri/resources/locales", -); +const TAURI_LOCALES_DIR = path.resolve(__dirname, "../src-tauri/locales"); const DEFAULT_SOURCE_DIRS = [ path.resolve(__dirname, "../src"), path.resolve(__dirname, "../src-tauri"), diff --git a/src/components/base/NoticeManager.tsx b/src/components/base/NoticeManager.tsx index b70c5886..ef1e2f93 100644 --- a/src/components/base/NoticeManager.tsx +++ b/src/components/base/NoticeManager.tsx @@ -88,6 +88,7 @@ export const NoticeManager: React.FC = () => { typeof prefixKey === "string" ? t(prefixKey as TranslationKey, { defaultValue: prefixKey, + ...restParams, ...(prefixKeyParams ?? {}), }) : typeof prefix === "string"