Open compulim opened 4 years ago
(It is okay to pass "en" to language. But not okay to pass "en-US".)
"en"
language
"en-US"
4.8.0
In useLocalizeDate.js, we are passing a language identifier of "en-US", but getLocaleString.js is expecting "en" instead (the one specified in CLDR).
useLocalizeDate.js
getLocaleString.js
If the language identifier is not found in the CLDR database, then, the dateFormatter() function will return undefined.
dateFormatter()
useLocalizeDate
It should return the date in localized format.
Instead, it throw an exception:
Related to https://github.com/microsoft/BotFramework-Emulator/issues/2119.
[Bug]
Nice find!
needs prioritization
Screenshots
(It is okay to pass
"en"
tolanguage
. But not okay to pass"en-US"
.)Version
4.8.0
Describe the bug
In
useLocalizeDate.js
, we are passing a language identifier of"en-US"
, butgetLocaleString.js
is expecting"en"
instead (the one specified in CLDR).If the language identifier is not found in the CLDR database, then, the
dateFormatter()
function will return undefined.Steps to reproduce
useLocalizeDate
Expected behavior
It should return the date in localized format.
Instead, it throw an exception:
Additional context
Related to https://github.com/microsoft/BotFramework-Emulator/issues/2119.
[Bug]