@blinkk/root 1.3.19 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render.js +5 -4
- package/dist/render.js.map +1 -1
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -12681,8 +12681,9 @@ var country_language_default = {
|
|
|
12681
12681
|
|
|
12682
12682
|
// src/render/countrie-language.ts
|
|
12683
12683
|
function getCountryLanguageData(countryCode) {
|
|
12684
|
+
const countryCodeUpper = countryCode.toUpperCase();
|
|
12684
12685
|
for (const country of country_language_default.countries) {
|
|
12685
|
-
if (country.code_2 ===
|
|
12686
|
+
if (country.code_2 === countryCodeUpper) {
|
|
12686
12687
|
const langCodes = country.languages || [];
|
|
12687
12688
|
const languages = [];
|
|
12688
12689
|
langCodes.forEach((langCode) => {
|
|
@@ -12819,13 +12820,13 @@ function getFallbackLanguages(req) {
|
|
|
12819
12820
|
return Array.from(langs);
|
|
12820
12821
|
}
|
|
12821
12822
|
function getCountryLanguages(countryCode) {
|
|
12822
|
-
if (countryCode === "
|
|
12823
|
+
if (countryCode === "cn") {
|
|
12823
12824
|
return ["zh-CN", "zh-Hans", "zh-Hant", "zh"];
|
|
12824
12825
|
}
|
|
12825
|
-
if (countryCode === "
|
|
12826
|
+
if (countryCode === "hk") {
|
|
12826
12827
|
return ["zh-HK", "zh-Hant", "zh"];
|
|
12827
12828
|
}
|
|
12828
|
-
if (countryCode === "
|
|
12829
|
+
if (countryCode === "tw") {
|
|
12829
12830
|
return ["zh-TW", "zh-Hant", "zh"];
|
|
12830
12831
|
}
|
|
12831
12832
|
const country = getCountryLanguageData(countryCode);
|