From 369cff010215374ddab70d24ee313a96a18fe5ab Mon Sep 17 00:00:00 2001 From: Melvin Chia Date: Wed, 21 Jan 2026 15:57:26 +0800 Subject: [PATCH] fix(server): move getModulesWithLocales call inside getLocale callback --- server/src/lib/locales/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/lib/locales/index.ts b/server/src/lib/locales/index.ts index 4e0eccbe2..ae9d739bb 100644 --- a/server/src/lib/locales/index.ts +++ b/server/src/lib/locales/index.ts @@ -32,8 +32,6 @@ function getModulesWithLocales(): string[] { .map(dir => path.join(appsDir, dir)) } -const moduleApps = getModulesWithLocales() - const listLanguages = forge .query() .noAuth() @@ -61,6 +59,8 @@ const getLocale = forge }) }) .callback(async ({ query: { lang, namespace, subnamespace } }) => { + const moduleApps = getModulesWithLocales() + subnamespace = normalizeSubnamespace(subnamespace) const finalLang = LocaleService.getAllowedLang().find(e =>