Print this page
rev 5696 : 6336885: RFE: Locale Data Deployment Enhancements
4609153: Provide locale data for Indic locales
5104387: Support for gl_ES locale (galician language)
6337471: desktop/system locale preferences support
7056139: (cal) SPI support for locale-dependent Calendar parameters
7058206: Provide CalendarData SPI for week params and display field value names
7073852: Support multiple scripts for digits and decimal symbols per locale
7079560: [Fmt-Da] Context dependent month names support in SimpleDateFormat
7171324: getAvailableLocales() of locale sensitive services should return the actual availability of locales
7151414: (cal) Support calendar type identification
7168528: LocaleServiceProvider needs to be aware of Locale extensions
7171372: (cal) locale's default Calendar should be created if unknown calendar is specified
Summary: JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data (part 1 w/o packaging changes. by Naoto Sato and Masayoshi Okutsu)
Split |
Close |
Expand all |
Collapse all |
--- old/make/java/java/localegen.sh
+++ new/make/java/java/localegen.sh
1 1 #!/bin/sh
2 2
3 3 #
4 -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
4 +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
5 5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 6 #
7 7 # This code is free software; you can redistribute it and/or modify it
8 8 # under the terms of the GNU General Public License version 2 only, as
9 9 # published by the Free Software Foundation. Oracle designates this
10 10 # particular file as subject to the "Classpath" exception as provided
11 11 # by Oracle in the LICENSE file that accompanied this code.
12 12 #
13 13 # This code is distributed in the hope that it will be useful, but WITHOUT
14 14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 16 # version 2 for more details (a copy is included in the LICENSE file that
17 17 # accompanied this code).
18 18 #
19 19 # You should have received a copy of the GNU General Public License version
20 20 # 2 along with this work; if not, write to the Free Software Foundation,
21 21 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 22 #
23 23 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
24 24 # or visit www.oracle.com if you need additional information or have any
25 25 # questions.
26 26 #
27 27
28 28 #
29 29 # This script is to generate the supported locale list string and replace the
30 30 # LocaleDataMetaInfo-XLocales.java.template in <ws>/src/share/classes/sun/util
31 31 #
32 32 # SORT, NAWK & SED is passed in as environment variables.
33 33 #
34 34
35 35 # A list of resource base name list;
36 36 RESOURCE_NAMES=$1
37 37
38 38 # A list of European resources;
39 39 EURO_FILES_LIST=$2
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
40 40
41 41 # A list of non-European resources;
42 42 NONEURO_FILES_LIST=$3
43 43
44 44 INPUT_FILE=$4
45 45 OUTPUT_FILE=$5
46 46
47 47 localelist=
48 48 getlocalelist() {
49 49 localelist=""
50 - localelist=`$NAWK -F$1_ '{print $2}' $2 | $SORT`
50 + localelist=`$NAWK -F$1_ '{print $2}' $2 | $SED -e 's/_/-/g'`
51 51 }
52 52
53 -sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" "
53 +sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" "
54 54
55 -for FILE in $RESOURCE_NAMES
55 +# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
56 +noneuroall=" ja-JP-JP th-TH-TH "
57 +
58 +for FILE in $RESOURCE_NAMES
56 59 do
57 60 getlocalelist $FILE $EURO_FILES_LIST
58 61 sed_script=$sed_script"-e \"s@#"$FILE"_EuroLocales#@$localelist@g\" "
62 + euroall=$euroall" "$localelist
59 63 getlocalelist $FILE $NONEURO_FILES_LIST
60 64 sed_script=$sed_script"-e \"s@#"$FILE"_NonEuroLocales#@$localelist@g\" "
65 + noneuroall=$noneuroall" "$localelist
61 66 done
62 67
63 -sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
64 -eval $sed_script
68 +euroall=`(for LOC in $euroall; do echo $LOC;done) |$SORT -u`
69 +noneuroall=`(for LOC in $noneuroall; do echo $LOC;done) |$SORT -u`
65 70
71 +sed_script=$sed_script"-e \"s@#AvailableLocales_EuroLocales#@$euroall@g\" "
72 +sed_script=$sed_script"-e \"s@#AvailableLocales_NonEuroLocales#@$noneuroall@g\" "
66 73
74 +sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
75 +eval $sed_script
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX