Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: icu52/scripts/trim_data.sh

Issue 247663002: Trim unit* sections in data/locales/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu52/README.chromium ('k') | icu52/source/data/in/icudtl.dat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu52/scripts/trim_data.sh
===================================================================
--- icu52/scripts/trim_data.sh (revision 264857)
+++ icu52/scripts/trim_data.sh (working copy)
@@ -106,6 +106,21 @@
done
}
+# Keep only duration and compound in units* sections.
+function filter_locale_data {
+ for i in "${dataroot}/locales/*.txt"
+ do
+ echo Overwriting $i ...
+ sed -r -i \
+ '/^ units(|Narrow|Short)\{$/, /^ \}$/ {
+ /^ units(|Narrow|Short)\{$/ p
+ /^ (duration|compound)\{$/, /^ \}$/ p
+ /^ \}$/ p
+ d
+ }' ${i}
+ done
+}
+
# big5han and gb2312han collation do not make any sense and nobody uses them.
function remove_legacy_chinese_codepoint_collation {
echo "Removing Big5 / GB2312 collation data from Chinese locale"
@@ -131,11 +146,10 @@
filter_currency_data
filter_region_data
remove_legacy_chinese_codepoint_collation
+filter_locale_data
# Chromium OS needs exemplar cities for timezones, but not Chromium.
# It'll save 400kB (uncompressed), but the size difference in
# 7z compressed installer is <= 100kB.
# TODO(jshin): Make separate data files for CrOS and Chromium.
-#fremove_exemplar_cities
-
-
+#remove_exemplar_cities
« no previous file with comments | « icu52/README.chromium ('k') | icu52/source/data/in/icudtl.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698