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

Unified Diff: scripts/trim_data.sh

Issue 2812943003: Update trim_data to deal with locale fallback failure for unit (Closed)
Patch Set: Created 3 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 | « common/icudtl.dat ('k') | source/data/translit/root_subset.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/trim_data.sh
diff --git a/scripts/trim_data.sh b/scripts/trim_data.sh
index 46be26c88ac527ef549d81c4069df15142b92a12..a60bd46bd89faeb57554015cea7a9317da249a3f 100755
--- a/scripts/trim_data.sh
+++ b/scripts/trim_data.sh
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+set -e
# Remove entries currently not used in Chromium/V8.
function filter_locale_data {
@@ -184,6 +185,14 @@ function filter_unit_data {
/^ \}$/ p
d
}' ${i}
+
+ # Delete empty units,units{Narrow|Short} block. Otherwise, locale fallback
+ # fails. See crbug.com/707515.
+ sed -r -i \
+ '/^ units(|Narrow|Short)\{$/ {
+ N
+ /^ units(|Narrow|Short)\{\n \}/ d
Daniel Erat 2017/04/11 21:18:10 sorry, my sed is a bit rusty/nonexistent. i think
jungshik at Google 2017/04/11 21:53:17 unitsNarrow{ } Given an input like the above,
+ }' ${i}
done
}
« no previous file with comments | « common/icudtl.dat ('k') | source/data/translit/root_subset.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698