-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date-picker locale attr/prop value should be case insensitive #3925
Comments
More information is required to proceed with this issue:
This issue will be automatically closed in five days if the information is not provided. Thanks for your understanding. |
Is it expected that "zh" or "ZH" doesn't work but "pt" does work? |
Looking at the implementation, it is expected. FWIW, |
Installed and assigned for verification. |
We have a language code pt-BR. So what's the plan for that one? Currently it shows in English. zh-cn, zh-hk, zh-tw work now. zh doesn't, but that seems to be expected. |
I think we should do 2 things:
I'll create issues for these. |
Actually, the base language lookup worked before. We didn't have a test for this case, so this ended up introducing a regression. I'll create an issue for this. cc @y0n4 |
Regression issue created. Would we still need to add the |
Olga says pt and pt-BR are the same for calendar. |
@jcfranco pt is default for pt-PT (Portuguese Portugal) and it is different from pt-BR (Portuguese Brazilian). For Calendar the translations and formats are same but ESRI translation (resource files) are translated for pt-PT and pt-BR (different translations). Did translation services team give you the translations? |
@raje9276 Thanks for the info! We have calendar resource files for Long term, in terms of maintainability would you suggest:
All of the above are from the context of calendar. |
@jcfranco you need 2 files pt-PT.json (pt.json) and pt-BR.json even though they are the same. We need 2 files because there is a possibility that the translations may change as we add more strings or the current translations change as part of language update. |
Got it. I'll submit a PR to add the missing file. Thanks again! |
verified on beta.76 |
Actual Behavior
Stems from #3602 (comment)
When using
locale="zh-CN"
andlocale="zh-cn"
, only the former works as it matches its localization file (the former defaults to English).Note: this also applies to any supported locale with a language and region code
Expected Behavior
Using
locale="zh-CN"
orlocale="zh-cn"
should load thezh-CN.json
localization file.Reproduction Sample
https://codepen.io/jcfranco/pen/RwLqvme?editors=1000
Reproduction Steps
locale
values.Reproduction Version
@esri/calcite-components@1.0.0-beta.74
Relevant Info
Regression? Last working version:
@esri/calcite-components@1.0.0-VERSION
Per https://tools.ietf.org/search/bcp47#section-2.1.1, the value of
locale
should be case-insensitive:Source
The text was updated successfully, but these errors were encountered: