fix(i18n, notice): propagate runtime params and update cleanup script path

This commit is contained in:
Slinetrac
2025-11-06 18:39:30 +08:00
Unverified
parent 5ea7838268
commit 9e3078e017
2 changed files with 2 additions and 4 deletions

View File

@@ -10,10 +10,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
const LOCALES_DIR = path.resolve(__dirname, "../src/locales"); const LOCALES_DIR = path.resolve(__dirname, "../src/locales");
const TAURI_LOCALES_DIR = path.resolve( const TAURI_LOCALES_DIR = path.resolve(__dirname, "../src-tauri/locales");
__dirname,
"../src-tauri/resources/locales",
);
const DEFAULT_SOURCE_DIRS = [ const DEFAULT_SOURCE_DIRS = [
path.resolve(__dirname, "../src"), path.resolve(__dirname, "../src"),
path.resolve(__dirname, "../src-tauri"), path.resolve(__dirname, "../src-tauri"),

View File

@@ -88,6 +88,7 @@ export const NoticeManager: React.FC = () => {
typeof prefixKey === "string" typeof prefixKey === "string"
? t(prefixKey as TranslationKey, { ? t(prefixKey as TranslationKey, {
defaultValue: prefixKey, defaultValue: prefixKey,
...restParams,
...(prefixKeyParams ?? {}), ...(prefixKeyParams ?? {}),
}) })
: typeof prefix === "string" : typeof prefix === "string"