Skip to content

Commit 8dc60ae

Browse files
committed
fix(framework): fix fetching "id" (indonesian) language
Fixes: #11233
1 parent b3cd03b commit 8dc60ae

File tree

5 files changed

+8
-379
lines changed

5 files changed

+8
-379
lines changed

packages/base/src/locale/nextFallbackLocale.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { DEFAULT_LOCALE } from "../generated/AssetParameters.js";
22

3+
const LOCALE_FALBACK_MAP = {
4+
"zh_HK": "zh_TW",
5+
"in": "id",
6+
};
7+
38
/**
49
* Calculates the next fallback locale for the given locale.
510
*
@@ -11,8 +16,8 @@ const nextFallbackLocale = (locale: string) => {
1116
return DEFAULT_LOCALE;
1217
}
1318

14-
if (locale === "zh_HK") {
15-
return "zh_TW";
19+
if (LOCALE_FALBACK_MAP[locale as keyof typeof LOCALE_FALBACK_MAP]) {
20+
return LOCALE_FALBACK_MAP[locale as keyof typeof LOCALE_FALBACK_MAP];
1621
}
1722

1823
// if there are multiple segments (separated by underscores), remove the last one

packages/fiori/src/i18n/messagebundle_in.properties

Lines changed: 0 additions & 88 deletions
This file was deleted.

packages/icons/src/i18n/messagebundle_in.properties

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)