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

Unified Diff: scripts/trim_data.sh

Issue 930203004: Fix en_GB's language name failure (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: uncomment function calls in trim_data.sh Created 5 years, 10 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 | « android/icudtl.dat ('k') | source/data/in/icudtl.dat » ('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 8b3abd5406d7407f98cc7f1f55f586eaeeffbef4..4b53c904d38912a80f2aa504e4d2b83b471878d4 100755
--- a/scripts/trim_data.sh
+++ b/scripts/trim_data.sh
@@ -30,6 +30,16 @@ function filter_display_language_names {
}
/^ Types\{$/,/^ \}$/d
/^ Variants\{$/,/^ \}$/d' ${target}
+
+ # Delete an empty "Languages" block. Otherwise, getting the display
+ # name for all the language in a given locale (e.g. en_GB) would fail
+ # when the above filtering sed command results in an empty "Languages"
+ # block.
+ sed -r -i \
+ '/^ Languages\{$/ {
+ N
+ /^ Languages\{\n \}/ d
+ }' ${target}
done
}
« no previous file with comments | « android/icudtl.dat ('k') | source/data/in/icudtl.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698