@internationalized/message
Advanced tools
Comparing version 3.1.4-nightly.4624 to 3.1.4
@@ -28,3 +28,3 @@ | ||
} | ||
constructor(messages, defaultLocale = "en-US"){ | ||
constructor(messages, defaultLocale = 'en-US'){ | ||
// Clone messages so we don't modify the original object. | ||
@@ -36,3 +36,3 @@ // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin. | ||
} | ||
function $9a5a7b8408290694$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") { | ||
function $9a5a7b8408290694$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') { | ||
// If there is an exact match, use it. | ||
@@ -48,3 +48,3 @@ if (strings[locale]) return strings[locale]; | ||
for(let key in strings){ | ||
if (key.startsWith(language + "-")) return strings[key]; | ||
if (key.startsWith(language + '-')) return strings[key]; | ||
} | ||
@@ -58,3 +58,3 @@ // Nothing close, use english. | ||
return new Intl.Locale(locale).language; | ||
return locale.split("-")[0]; | ||
return locale.split('-')[0]; | ||
} | ||
@@ -61,0 +61,0 @@ |
@@ -22,3 +22,3 @@ /* | ||
} | ||
constructor(messages, defaultLocale = "en-US"){ | ||
constructor(messages, defaultLocale = 'en-US'){ | ||
// Clone messages so we don't modify the original object. | ||
@@ -30,3 +30,3 @@ // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin. | ||
} | ||
function $d6fd23bc337660df$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") { | ||
function $d6fd23bc337660df$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') { | ||
// If there is an exact match, use it. | ||
@@ -42,3 +42,3 @@ if (strings[locale]) return strings[locale]; | ||
for(let key in strings){ | ||
if (key.startsWith(language + "-")) return strings[key]; | ||
if (key.startsWith(language + '-')) return strings[key]; | ||
} | ||
@@ -52,3 +52,3 @@ // Nothing close, use english. | ||
return new Intl.Locale(locale).language; | ||
return locale.split("-")[0]; | ||
return locale.split('-')[0]; | ||
} | ||
@@ -55,0 +55,0 @@ |
{ | ||
"name": "@internationalized/message", | ||
"version": "3.1.4-nightly.4624+d80999e89", | ||
"version": "3.1.4", | ||
"description": "Internationalized message formatting and locale negotiation", | ||
@@ -31,3 +31,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882" | ||
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433" | ||
} |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
0
52588