Node errors for locale display names to 'unsupported'#319
Node errors for locale display names to 'unsupported'#319sven-oly merged 9 commits intounicode-org:mainfrom
Conversation
|
Fixes #318 |
| if (error instanceof RangeError) { | ||
| // The locale can't be handled for some reason! | ||
| outputLine["error_type"] = 'unsupported'; | ||
| outputLine["unsupported"] = error.toString(); | ||
| outputLine["error_detail"] = 'unsupported locale'; | ||
| } |
There was a problem hiding this comment.
error instanceof RangeError seems a bit broad. I suggest a narrower case for returning unsupported.
There was a problem hiding this comment.
Hmm, there are two types of failures right now. Here's what I see being caught as exceptions:
- Unexpected options in the locale spec, e.g., "label":"0009","language_label":"en-u-nu-deva-t-de","locale_label":"en"
--> "RangeError: invalid_argument"
- "root" locale --> "RangeError: invalid_argument" in the constructor.
Should either of these be "unsupported"?
There was a problem hiding this comment.
I think classifying these as "unsupported" is correct. This will resolve a large number of "errors" --> "unsupported", i.e.,
Report created: 2024-10-07 10:36
1,990 attempted. Pass: 1,460, Fail: 214, Errors: 316, Unsupported: 0
|
Please review again! |
sffc
left a comment
There was a problem hiding this comment.
This is not ready. The problem is that the locale is "root" which is not a valid locale.
|
Root locale was removed in PR #341 |
|
This now checks the requested locale for validity as a locale. It also recognizes problems with getting the result as "unsupported" instead of test failures or errors. |
|
Note that there are still test failures in all platforms for a variety of reasons. |
|
PTAL. It would be good to resolve this issue #318 . |
|
I would like to merge this. It solves a problem that is in Q4 P1 milestones. |
|
PTAL |


This fixes all the "error" cases in NodeJs for locale display names, moving them to "unsupported". This works for unsupported locale options and also the "root" locale.
Fixes #318