fix: add mergeWithEnglishFallback for i18n translations (#26016)

* fix

* fix

* fix

* fix

* Improve translation cache handling in i18n.ts

Refactor translation cache retrieval and fallback logic.

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
Benny JooandAnik Dhabal Babu authored and GitHub committed 2025-12-18 16:47:54 +00:00
1 parent 71792bdeaa
commit f291c1c4e7
4 files changed
+104 -17

No files matched your search

@@ -32,11 +32,7 @@ const ServerPage = async ({ params, searchParams }: ServerPageProps) => {
const eventLocale = props.eventData?.interfaceLanguage;
const ns = "common";
let translations;
if (eventLocale) {
const ns = "common";
translations = await loadTranslations(eventLocale, ns);
}
const translations = await loadTranslations(eventLocale ?? "en", ns);
if ((props as TeamTypePageProps)?.teamId) {
return eventLocale ? (
@@ -68,11 +68,7 @@ const ServerPage = async ({ params, searchParams }: PageProps) => {
const eventLocale = props.eventData?.interfaceLanguage;
const ns = "common";
let translations;
if (eventLocale) {
const ns = "common";
translations = await loadTranslations(eventLocale, ns);
}
const translations = await loadTranslations(eventLocale ?? "en", ns);
if ((props as TeamTypePageProps)?.teamId) {
return eventLocale ? (