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 6cd `dirname $0`/../source/data 7 8# Excludes curr data which is not used on Android. 9echo Overwriting curr/reslocal.mk... 10cat >curr/reslocal.mk <<END 11CURR_CLDR_VERSION = 1.9 12CURR_SYNTHETIC_ALIAS = 13CURR_ALIAS_SOURCE = 14CURR_SOURCE = 15END 16 17# Excludes region data. On Android Java API is used to get the data. 18echo Overwriting region/reslocal.mk... 19cat >region/reslocal.mk <<END 20REGION_CLDR_VERSION = 1.9 21REGION_SYNTHETIC_ALIAS = 22REGION_ALIAS_SOURCE = 23REGION_SOURCE = 24END 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. 31for 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 53done 54 55echo DONE. 56