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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « android/icudtl.dat ('k') | source/data/in/icudtl.dat » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 6
7 # Remove display names for languages that are not listed in the accept-language 7 # Remove display names for languages that are not listed in the accept-language
8 # list of Chromium. 8 # list of Chromium.
9 function filter_display_language_names { 9 function filter_display_language_names {
10 for lang in $(grep -v '^#' accept_lang.list) 10 for lang in $(grep -v '^#' accept_lang.list)
(...skipping 12 matching lines...) Expand all
23 sed -r -i \ 23 sed -r -i \
24 '/^ Keys\{$/,/^ \}$/d 24 '/^ Keys\{$/,/^ \}$/d
25 /^ Languages\{$/, /^ \}$/ { 25 /^ Languages\{$/, /^ \}$/ {
26 /^ Languages\{$/p 26 /^ Languages\{$/p
27 /^ '${ACCEPT_LANG_PATTERN}'/p 27 /^ '${ACCEPT_LANG_PATTERN}'/p
28 /^ \}$/p 28 /^ \}$/p
29 d 29 d
30 } 30 }
31 /^ Types\{$/,/^ \}$/d 31 /^ Types\{$/,/^ \}$/d
32 /^ Variants\{$/,/^ \}$/d' ${target} 32 /^ Variants\{$/,/^ \}$/d' ${target}
33
34 # Delete an empty "Languages" block. Otherwise, getting the display
35 # name for all the language in a given locale (e.g. en_GB) would fail
36 # when the above filtering sed command results in an empty "Languages"
37 # block.
38 sed -r -i \
39 '/^ Languages\{$/ {
40 N
41 /^ Languages\{\n \}/ d
42 }' ${target}
33 done 43 done
34 } 44 }
35 45
36 46
37 # Keep only the minimum locale data for non-UI languages. 47 # Keep only the minimum locale data for non-UI languages.
38 function abridge_locale_data_for_non_ui_languages { 48 function abridge_locale_data_for_non_ui_languages {
39 for lang in $(grep -v '^#' chrome_ui_languages.list) 49 for lang in $(grep -v '^#' chrome_ui_languages.list)
40 do 50 do
41 # Set $OP to '|' only if $UI_LANGUAGES is not empty. 51 # Set $OP to '|' only if $UI_LANGUAGES is not empty.
42 OP=${UI_LANGUAGES:+|} 52 OP=${UI_LANGUAGES:+|}
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 filter_currency_data 191 filter_currency_data
182 filter_region_data 192 filter_region_data
183 remove_legacy_chinese_codepoint_collation 193 remove_legacy_chinese_codepoint_collation
184 filter_unit_data 194 filter_unit_data
185 195
186 # Chromium OS needs exemplar cities for timezones, but not Chromium. 196 # Chromium OS needs exemplar cities for timezones, but not Chromium.
187 # It'll save 400kB (uncompressed), but the size difference in 197 # It'll save 400kB (uncompressed), but the size difference in
188 # 7z compressed installer is <= 100kB. 198 # 7z compressed installer is <= 100kB.
189 # TODO(jshin): Make separate data files for CrOS and Chromium. 199 # TODO(jshin): Make separate data files for CrOS and Chromium.
190 #remove_exemplar_cities 200 #remove_exemplar_cities
OLDNEW
« 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