-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
LikelySubtags: - minimizeFavorScript --> unsupported. Fixes many errors in ICU4C, ICU4J, and Node #371
Conversation
Note that this now fixes all likely subtags in ICU4X 2.0, and almost all in ICU4X 1.3 - 1.5. Please take a look! |
executors/cpp/likely_subtags.cpp
Outdated
// Check for special case of reserved codes for local use | ||
const char* lang_code = displayLocale.getLanguage(); | ||
const string lang_code_string(lang_code); | ||
if (lang_code_string >= "qaa" && lang_code_string <= "qtz") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: It's not correct for the executor to specifically sniff for qaa. There are many subtags that could cause this type of behavior, not just qaa. The executor should sniff for some other signal of a failure status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll change the test generator to remove this data range.
@@ -1441,7 +1441,7 @@ und-Latn-MQ ; fr-Latn-MQ ; fr-MQ ; | |||
und-Latn-MR ; fr-Latn-MR ; fr-MR ; | |||
und-Latn-MS ; en-Latn-MS ; en-MS ; | |||
und-Latn-MT ; mt-Latn-MT ; mt ; | |||
und-Latn-MU ; en-Latn-MU ; en-MU ; | |||
und-Latn-MU ; mfe-Latn-MU ; mfe ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Why did this data change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data had not been updated correctly to maint/maint-76. This is now the correct test file.
If |
OK, I agree that we could/should removed the non-legal language codes in the test generator. |
Another question about this: should we mark minimize preferring script as "unsupported" for C and J? There's no public API way to support this, although ICU4X does indeed allow preferring the script or the region. |
Note the qaa codes just generate the same data as the input. This is one way to fix this problem. |
output.error_type = "unsupported"; | ||
output.unsupported = e.getMessage(); | ||
output.error_detail = e.getMessage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: don't mark a test as unsupported without constraining the error type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I've updated the catch to be specific.
PTAL |
Reclassifying any with favor script to unsupported. Also setting result for all "qaa" locale items to "FAIL" because these are note valid language tags.
Note that there are still errors reported in #205 that need to be examined.
Also, ICU4X still has issues.