1 #!/bin/sh 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 6 cd `dirname $0`/../source/data 7 8 # Excludes curr data which is not used on Android. 9 echo Overwriting curr/reslocal.mk... 10 cat >curr/reslocal.mk <<END 11 CURR_CLDR_VERSION = 1.9 12 CURR_SYNTHETIC_ALIAS = 13 CURR_ALIAS_SOURCE = 14 CURR_SOURCE = 15 END 16 17 # Excludes region data. On Android Java API is used to get the data. 18 echo Overwriting region/reslocal.mk... 19 cat >region/reslocal.mk <<END 20 REGION_CLDR_VERSION = 1.9 21 REGION_SYNTHETIC_ALIAS = 22 REGION_ALIAS_SOURCE = 23 REGION_SOURCE = 24 END 25 26 # On Android Java API is used to get lang data, except for the language and 27 # script names for zh_Hans and zh_Hant which are not supported by Java API. 28 # Here remove all lang data except those names. 29 # See the comments in GetDisplayNameForLocale() (in Chromium's 30 # src/ui/base/l10n/l10n_util.cc) about why we need the scripts. 31 for i in lang/*.txt; do 32 echo Overwriting $i... 33 sed '/^ Keys{$/,/^ }$/d 34 /^ Languages{$/,/^ }$/{ 35 /^ Languages{$/p 36 /^ zh{/p 37 /^ }$/p 38 d 39 } 40 /^ LanguagesShort{$/,/^ }$/d 41 /^ Scripts{$/,/^ }$/{ 42 /^ Scripts{$/p 43 /^ Hans{/p 44 /^ Hant{/p 45 /^ }$/p 46 d 47 } 48 /^ Types{$/,/^ }$/d 49 /^ Variants{$/,/^ }$/d 50 /^ calendar{$/,/^ }$/d 51 /^ codePatterns{$/,/^ }$/d 52 /^ localeDisplayPattern{$/,/^ }$/d' -i $i 53 done 54 55 echo DONE. 56