Skip to content

Commit a191af9

Browse files
committed
Fix ICU data file for Android
In some locales, currency data turns empty after currency list filtering on Android. This leads v8's currency formatter to fall back to 3-letter currency code instead of currency symbol (e.g. 'GBP' in en-GB). Fix the ICU data trimming script to remove an empty Currency block after filtering and rebuild ICU data files. Bug: 870338 Test: See the bug TBR=gsathya@chromium.org Change-Id: Idf7af0a5f00b05b7f26d2ad42b21abd1aca47d07 Reviewed-on: https://chromium-review.googlesource.com/1184505 Reviewed-by: Jungshik Shin <jshin@chromium.org>
1 parent 6cf2ab2 commit a191af9

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

android/icudtl.dat

-32 Bytes
Binary file not shown.

cast/icudtl.dat

0 Bytes
Binary file not shown.

cast/patch_locale.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,17 @@ do
5050
/^ [cC]urrency(Map|Meta|Spacing|UnitPatterns)\{$/, /^ \}$/ p
5151
/^ Version\{.*\}$/p
5252
/^\}$/p' $i
53+
54+
# Delete empty blocks. Otherwise, locale fallback fails.
55+
# See crbug.com/791318 and crbug.com/870338 .
56+
sed -r -i \
57+
'/^ Currenc(ie.*|yPlurals)\{$/ {
58+
N
59+
/^ Currenc(ie.*|yPlurals)\{\n \}/ d
60+
}' "${i}"
5361
done
5462

63+
5564
# Chrome on Android is not localized to the following languages and we
5665
# have to minimize the locale data for them.
5766
EXTRA_LANGUAGES="bn et gu kn ml mr ms ta te"

common/icudtb.dat

0 Bytes
Binary file not shown.

common/icudtl.dat

0 Bytes
Binary file not shown.

ios/icudtl.dat

-32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)