-
Notifications
You must be signed in to change notification settings - Fork 419
CLDR-19098 Refactoring; new ExemplarSets.java #5188
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
Conversation
-Move sets and ExemplarType from CheckExemplars into new org.unicode.cldr.util.ExemplarSets -Replace CLDRFile.ExemplarType with ExemplarSets.ExemplarType -Related refactoring; move some code into subroutines; change public to private where possible -Some automated refactoring by IntelliJ, from accepting suggestions linked to compiler warnings
|
Please note: this includes the changes that were in the earlier PR #5185 |
|
@macchiati these changes are based on your suggestions in the first merged PR #5184 |
srl295
left a comment
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.
Great improvements. Comments.
| new UnicodeSet( | ||
| "[[[:Nd:][:script=common:][:script=inherited:]-[:Default_Ignorable_Code_Point:]-[:C:] - [_]] [\u05BE \u05F3 \u066A-\u066C]" | ||
| + "[[؉][་ །༌][ཱ]{য়}য়]" | ||
| + // TODO Fix this Hack |
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.
ticket for the todo?
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.
| static { | ||
| ExemplarSets.Japn.set(UScript.HAN); | ||
| ExemplarSets.Japn.set(UScript.HIRAGANA); | ||
| ExemplarSets.Japn.set(UScript.KATAKANA); | ||
| ExemplarSets.Kore.set(UScript.HAN); | ||
| ExemplarSets.Kore.set(UScript.HANGUL); | ||
| } |
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.
Japnis a typo, should beJpan- all of this should be dynamic, using the script data as below:
<scriptData>
<scriptVariant type="compound" id='Hanb' base='Hani Bopo'/> <!-- Han with Bopomofo (alias for Han + Bopomofo) -->
<scriptVariant type="compound" id='Jpan' base='Hani Hira Kana'/> <!-- Japanese (alias for Han + Hiragana + Katakana) -->
<scriptVariant type="compound" id='Hrkt' base='Hira Kana'/> <!-- Japanese syllabaries (alias for Hiragana + Katakana) -->
<scriptVariant type="compound" id='Kore' base='Hang Hani'/> <!-- Korean (alias for Hangul + Han) -->
<scriptVariant type="compound" id='Hntl' base='Hant Latn'/> <!-- Han (Traditional variant) with Latin (alias for Hant + Latn) -->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.
Thanks, I'll study this -- do you mean that data exists and the Java code should be based on that data?
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.
Need ticket for adding API to SupplementalDataInfo for accessing that date, and replacing hardcoded lists here and elsewhere. See CLDR-18950
-TODO comments referencing tickets
|
The 2nd commit changes Japn to Jpan and adds references in TODO comments. |
-Move sets and ExemplarType from CheckExemplars into new org.unicode.cldr.util.ExemplarSets
-Replace CLDRFile.ExemplarType with ExemplarSets.ExemplarType
-Related refactoring; move some code into subroutines; change public to private where possible
-Some automated refactoring by IntelliJ, from accepting suggestions linked to compiler warnings
-Change Japn to Jpan and add reference tickets for TODO comments
CLDR-19098
ALLOW_MANY_COMMITS=true