Skip to content
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

[Mobile] Reduced ICU files for HybridGlobalization #349

Merged
merged 6 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions eng/icu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ endef

ifeq ($(TARGET_ARCHITECTURE),wasm)
$(eval $(call TargetBuildTemplate,icudt_wasm,icudt))
$(eval $(call TargetBuildTemplate,icudt_hg_browser,icudt_hybrid))
else
$(eval $(call TargetBuildTemplate,icudt_mobile,icudt))
$(eval $(call TargetBuildTemplate,icudt_hg_mobile,icudt_hybrid))
endif
$(eval $(call TargetBuildTemplate,icudt_CJK,icudt_CJK))
$(eval $(call TargetBuildTemplate,icudt_no_CJK,icudt_no_CJK))
$(eval $(call TargetBuildTemplate,icudt_EFIGS,icudt_EFIGS))
$(eval $(call TargetBuildTemplate,icudt_hg_browser,icudt_hg_browser))

# build source+data for the main "icudt" filter and only data for the other filters
all: lib-icudt data-icudt data-icudt_no_CJK data-icudt_EFIGS data-icudt_CJK data-icudt_hg_browser
all: lib-icudt data-icudt data-icudt_no_CJK data-icudt_EFIGS data-icudt_CJK data-icudt_hybrid
4 changes: 2 additions & 2 deletions eng/nuget/Microsoft.NETCore.Runtime.ICU.Transport.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
bundled in the git repo.
To force a build to package using the in-tree files, pass the parameter. -->
<File Condition="'$(OverrideBundledDatFiles)' != 'true'" Include="$(RepoRoot)\eng\prebuilts\wasm\*.dat;$(RepoRoot)\eng\prebuilts\hybrid\*.dat" TargetPath="runtimes\browser-wasm\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />
<File Condition="'$(OverrideBundledDatFiles)' != 'true'" Include="$(RepoRoot)\eng\prebuilts\wasm\*.dat" TargetPath="runtimes\browser-wasm\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />
<File Condition="'$(OverrideBundledDatFiles)' == 'true'" Include="$(RepoRoot)\artifacts\bin\icu-browser-wasm\*.dat" TargetPath="runtimes\browser-wasm\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />

<!-- Threads build -->
Expand All @@ -65,7 +65,7 @@
bundled in the git repo.
To force a build to package using the in-tree files, pass the parameter. -->
<File Condition="'$(OverrideBundledDatFiles)' != 'true'" Include="$(RepoRoot)\eng\prebuilts\wasm\*.dat;$(RepoRoot)\eng\prebuilts\hybrid\*.dat" TargetPath="runtimes\browser-wasm$(ExtraPackageName)\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />
<File Condition="'$(OverrideBundledDatFiles)' != 'true'" Include="$(RepoRoot)\eng\prebuilts\wasm\*.dat" TargetPath="runtimes\browser-wasm$(ExtraPackageName)\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />
<File Condition="'$(OverrideBundledDatFiles)' == 'true'" Include="$(RepoRoot)\artifacts\bin\icu-browser-wasm\*.dat" TargetPath="runtimes\browser-wasm$(ExtraPackageName)\native\lib\%(Filename).dat" SkipPackageFileCheck="true" />
</ItemGroup>

Expand Down
Binary file added eng/prebuilts/mobile/icudt_hybrid.dat
Binary file not shown.
292 changes: 292 additions & 0 deletions icu-filters/icudt_hg_mobile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
{
"collationUCAData": "implicithan",
"localeFilter": {
"filterType": "locale",
"includeScripts": false,
"includeChildren": false,
"whitelist": [
"ar_SA",
"am_ET",
"bg_BG",
"bn_BD",
"bn_IN",
"ca_AD",
"ca_ES",
"cs_CZ",
"da_DK",
"de_AT",
"de_BE",
"de_CH",
"de_DE",
"de_IT",
"de_LI",
"de_LU",
"el_CY",
"el_GR",
"en_AE",
"en_AG",
"en_AI",
"en_AS",
"en_AT",
"en_AU",
"en_BB",
"en_BE",
"en_BI",
"en_BM",
"en_BS",
"en_BW",
"en_BZ",
"en_CA",
"en_CC",
"en_CH",
"en_CK",
"en_CM",
"en_CX",
"en_CY",
"en_DE",
"en_DK",
"en_DM",
"en_ER",
"en_FI",
"en_FJ",
"en_FK",
"en_FM",
"en_GB",
"en_GD",
"en_GG",
"en_GH",
"en_GI",
"en_GM",
"en_GU",
"en_GY",
"en_HK",
"en_IE",
"en_IL",
"en_IM",
"en_IN",
"en_IO",
"en_JE",
"en_JM",
"en_KE",
"en_KI",
"en_KN",
"en_KY",
"en_LC",
"en_LR",
"en_LS",
"en_MG",
"en_MH",
"en_MO",
"en_MP",
"en_MS",
"en_MT",
"en_MU",
"en_MW",
"en_MY",
"en_NA",
"en_NF",
"en_NG",
"en_NL",
"en_NR",
"en_NU",
"en_NZ",
"en_PG",
"en_PH",
"en_PK",
"en_PN",
"en_PR",
"en_PW",
"en_RW",
"en_SB",
"en_SC",
"en_SD",
"en_SE",
"en_SG",
"en_SH",
"en_SI",
"en_SL",
"en_SS",
"en_SX",
"en_SZ",
"en_TC",
"en_TK",
"en_TO",
"en_TT",
"en_TV",
"en_TZ",
"en_UG",
"en_UM",
"en_US",
"en_VC",
"en_VG",
"en_VI",
"en_VU",
"en_WS",
"en_ZA",
"en_ZM",
"en_ZW",
"en_US",
"es_419",
"es_ES",
"es_MX",
"et_EE",
"fa_IR",
"fi_FI",
"fil_PH",
"fr_BE",
"fr_CA",
"fr_CH",
"fr_FR",
"gu_IN",
"he_IL",
"hi_IN",
"hr_BA",
"hr_HR",
"hu_HU",
"id_ID",
"it_CH",
"it_IT",
"ja_JP",
"kn_IN",
"ko_KR",
"lt_LT",
"lv_LV",
"ml_IN",
"mr_IN",
"ms_BN",
"ms_MY",
"ms_SG",
"nb_NO",
"no",
"no_NO",
"nl_AW",
"nl_BE",
"nl_NL",
"pl_PL",
"pt_BR",
"pt_PT",
"ro_RO",
"ru_RU",
"sk_SK",
"sl_SI",
"sr_Cyrl_RS",
"sr_Latn_RS",
"sv_AX",
"sv_SE",
"sw_CD",
"sw_KE",
"sw_TZ",
"sw_UG",
"ta_IN",
"ta_LK",
"ta_MY",
"ta_SG",
"te_IN",
"th_TH",
"tr_CY",
"tr_TR",
"uk_UA",
"vi_VN",
"zh_CN",
"zh_Hans_HK",
"zh_SG",
"zh_HK",
"zh_TW"
]
},
"featureFilters": {
"conversion_mappings": "exclude",
"confusables": "exclude",
"stringprep": "exclude",
"zone_tree": "exclude",
"zone_supplemental": "exclude",
"translit": "exclude",
"unames": "exclude",
"ulayout": "exclude",
"unit_tree": "exclude",
"rbnf_tree": "exclude",
"cnvalias": "exclude",
"lang_tree": "exclude",
"region_tree": "exclude",
"normalization": {
"blacklist": [
"nfkc_cf",
"nfkc"
]
},
"misc": {
"whitelist": [
"currencyNumericCodes",
"numberingSystems",
"icuver",
"likelySubtags",
"supplementalData",
"keyTypeData"
]
},
"curr_tree": {
"whitelist": ["root"]
},
"brkitr_dictionaries": "exclude",
"brkitr_rules": {
"whitelist": ["char"]
}
},
"resourceFilters": [
{
"categories": ["locales_tree"],
"rules": [
"-/characterLabel",
"-/measurementSystemNames",
"-/listPattern",
"-/fields",
"-/delimiters",
"-/Ellipsis",
"-/NumberElements/latn/miscPatterns",
"-/NumberElements/latn/patternsLong",
"-/NumberElements/latn/patternsShort",
"-/NumberElements/*/patternsLong",
"-/NumberElements/*/patternsShort",
"-/NumberElements/minimalPairs",
"-/NumberElements/*/symbols",
"-/calendar/Gregorian/AmPmMarkers",
"-/calendar/Gregorian/AmPmMarkersAbbr",
"-/calendar/Gregorian/AmPmMarkersNarrow",
ilonatommy marked this conversation as resolved.
Show resolved Hide resolved
"-/parse",
"-/AuxExemplarCharacters",
"-/ExemplarCharacters",
"-/ExemplarCharactersIndex",
"-/ExemplarCharactersNumbers",
"-/ExemplarCharactersPunctuation",
"-/MoreInformation"
]
},
{
"categories": ["coll_tree"],
"rules": [
"-/*/*",
"+/collations/default",
"+/collations/standard",
"+/collations/private-kana",
"-/UCARules"
]
},
{
"categories": ["misc"],
"files": {
"whitelist": ["supplementalData"]
},
"rules": [
"-/*",
"+/calendarData",
"+/calendarPreferenceData",
"+/cldrVersion",
"+/measurementData",
"+/codeMappings",
"+/idValidity",
"+/timeData",
"+/weekData"
]
}
]
}