Skip to content

Commit

Permalink
ICU-22707 expectedLong script names
Browse files Browse the repository at this point in the history
  • Loading branch information
markusicu committed Apr 30, 2024
1 parent 560e4bb commit d79c7bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 7 additions & 2 deletions icu4c/source/data/unidata/changes.txt
Expand Up @@ -159,7 +159,10 @@ export UNICODE_TOOLS=~/oss/unicodetools/mine/src

* new constants for new property values
- preparseucd.py error:
ValueError: missing uchar.h enum constants for some property values: [('blk', {'Garay', 'Tulu_Tigalari', 'Todhri', 'Sunuwar', 'Egyptian_Hieroglyphs_Ext_A', 'Kirat_Rai', 'Symbols_For_Legacy_Computing_Sup', 'Myanmar_Ext_C', 'Ol_Onal', 'Gurung_Khema'}), ('sc', {'Gara', 'Onao', 'Todr', 'Krai', 'Tutg', 'Sunu', 'Gukh'}), ('InSC', {'Reordering_Killer'})]
ValueError: missing uchar.h enum constants for some property values:
[('blk', {'Garay', 'Tulu_Tigalari', 'Todhri', 'Sunuwar', 'Egyptian_Hieroglyphs_Ext_A', 'Kirat_Rai', 'Symbols_For_Legacy_Computing_Sup', 'Myanmar_Ext_C', 'Ol_Onal', 'Gurung_Khema'}),
('sc', {'Gara', 'Onao', 'Todr', 'Krai', 'Tutg', 'Sunu', 'Gukh'}),
('InSC', {'Reordering_Killer'})]
= PropertyValueAliases.txt new property values (diff old & new .txt files)
(cd $UNIDATA_ROOT && diff -u uni15.1/final/ucd/PropertyValueAliases.txt uni16/alpha/UCD/ucd/PropertyValueAliases.txt | egrep '^[-+][a-zA-Z]')
+age; 16.0 ; V16_0
Expand Down Expand Up @@ -195,7 +198,7 @@ export UNICODE_TOOLS=~/oss/unicodetools/mine/src
+ Indic_Syllabic_Category: uchar.h & UCharacter.IndicSyllabicCategory
+ after adding new API constants, run preparseucd.py again

TODO
TODO: need to update CLDR script metadata first

* update Script metadata: SCRIPT_PROPS[] in uscript_props.cpp & UScript.ScriptMetadata
(not strictly necessary for NOT_ENCODED scripts)
Expand All @@ -216,6 +219,8 @@ to find out the latest `bazel` version, and
copying that version number into the $ICU_SRC/.bazeliskrc config file.
(Revert if you find incompatibilities, or, better, update our build & config files.)

TODO

* generate data files

- remember to define the environment variables
Expand Down
4 changes: 4 additions & 0 deletions icu4c/source/test/cintltst/cucdapi.c
Expand Up @@ -433,6 +433,8 @@ void TestUScriptCodeAPI(void){
"Kawi", "Nag_Mundari",
// new in ICU 75
"Aran",
// new in ICU 76
"Garay", "Gurung_Khema", "Kirat_Rai", "Ol_Onal", "Sunuwar", "Todhri", "Tulu_Tigalari",
};
static const char* expectedShort[] = {
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
Expand Down Expand Up @@ -475,6 +477,8 @@ void TestUScriptCodeAPI(void){
"Kawi", "Nagm",
// new in ICU 75
"Aran",
// new in ICU 76
"Gara", "Gukh", "Krai", "Onao", "Sunu", "Todr", "Tutg",
};
int32_t j = 0;
if(UPRV_LENGTHOF(expectedLong)!=(USCRIPT_CODE_LIMIT-USCRIPT_BALINESE)) {
Expand Down
Expand Up @@ -339,6 +339,8 @@ public void TestNewCode(){
"Kawi", "Nag_Mundari",
// new in ICU 75
"Aran",
// new in ICU 76
"Garay", "Gurung_Khema", "Kirat_Rai", "Ol_Onal", "Sunuwar", "Todhri", "Tulu_Tigalari",
};
String[] expectedShort = new String[]{
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
Expand Down Expand Up @@ -381,6 +383,8 @@ public void TestNewCode(){
"Kawi", "Nagm",
// new in ICU 75
"Aran",
// new in ICU 76
"Gara", "Gukh", "Krai", "Onao", "Sunu", "Todr", "Tutg",
};
if(expectedLong.length!=(UScript.CODE_LIMIT-UScript.BALINESE)) {
errln("need to add new script codes in lang.TestUScript.java!");
Expand Down

0 comments on commit d79c7bf

Please sign in to comment.