Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a248acb2
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a248acb2
编写于
9月 11, 2013
作者:
N
naoto
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8024332: sun/util/resources/en split between rt.jar and localedata.jar
Reviewed-by: alanb, erikj
上级
e02d4f1c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
100 addition
and
133 deletion
+100
-133
make/java/java/genlocales.gmk
make/java/java/genlocales.gmk
+24
-24
make/java/java/localegen.sh
make/java/java/localegen.sh
+15
-15
make/java/text/base/FILES_java.gmk
make/java/text/base/FILES_java.gmk
+12
-0
make/java/util/FILES_java.gmk
make/java/util/FILES_java.gmk
+4
-1
make/java/util/FILES_properties.gmk
make/java/util/FILES_properties.gmk
+17
-1
make/sun/text/FILES_java.gmk
make/sun/text/FILES_java.gmk
+0
-15
make/sun/text/FILES_properties.gmk
make/sun/text/FILES_properties.gmk
+0
-16
makefiles/CreateJars.gmk
makefiles/CreateJars.gmk
+0
-33
makefiles/GensrcLocaleDataMetaInfo.gmk
makefiles/GensrcLocaleDataMetaInfo.gmk
+12
-12
src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
...es/sun/util/locale/provider/JRELocaleProviderAdapter.java
+9
-9
src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
...locale/provider/LocaleDataMetaInfo-XLocales.java.template
+7
-7
未找到文件。
make/java/java/genlocales.gmk
浏览文件 @
a248acb2
...
...
@@ -38,31 +38,31 @@ FILES_compiled_properties_orig := $(FILES_compiled_properties)
# only FILES_java and FILES_compiled_properties variables will be picked up
#
# $(BUILDDIR)/java/util/FILES_java.gmk & $(BUILDDIR)/java/util/FILES_properties.gmk
# contain "sun.util.resources" for
US
language support
# contain "sun.util.resources" for
EN
language support
include $(BUILDDIR)/java/util/FILES_java.gmk
include $(BUILDDIR)/java/util/FILES_properties.gmk
US
_Resources_java := $(FILES_java)
US
_Resources_properties := $(FILES_compiled_properties)
EN
_Resources_java := $(FILES_java)
EN
_Resources_properties := $(FILES_compiled_properties)
# $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for
#
US
language support
#
EN
language support
include $(BUILDDIR)/java/text/base/FILES_java.gmk
US
_Resources_java += $(FILES_java)
EN
_Resources_java += $(FILES_java)
FILES_compiled_properties=
# $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk
# contain both resources for Non-
US
language support
# contain both resources for Non-
EN
language support
include $(BUILDDIR)/sun/text/FILES_java.gmk
include $(BUILDDIR)/sun/text/FILES_properties.gmk
Non
US
_Resources_java := $(FILES_java)
Non
US
_Resources_properties := $(FILES_compiled_properties)
Non
EN
_Resources_java := $(FILES_java)
Non
EN
_Resources_properties := $(FILES_compiled_properties)
# Restore the orignal FILES_java & FILES_compiled_properties variables
FILES_java := $(FILES_java_orig)
...
...
@@ -80,30 +80,30 @@ RESOURCE_NAMES="FormatData CollationData TimeZoneNames LocaleNames CurrencyNames
ifeq ($(PLATFORM), macosx)
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.
us $@.tmp.nonus
;
@$(RM) $@.tmp.
en $@.tmp.nonen
;
@$(prep-target)
@$(ECHO) $(
US_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.us
;
@$(ECHO) $(
US_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.us
;
@$(ECHO) $(Non
US_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonus
;
@$(ECHO) $(Non
US_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonus
;
@$(ECHO) $(
EN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.en
;
@$(ECHO) $(
EN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.en
;
@$(ECHO) $(Non
EN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonen
;
@$(ECHO) $(Non
EN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonen
;
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.
us
\
$@.tmp.non
us
$< $@
@$(RM) $@.tmp.
us $@.tmp.nonus
;
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.
en
\
$@.tmp.non
en
$< $@
@$(RM) $@.tmp.
en $@.tmp.nonen
;
else
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.
us $@.tmp.nonus
;
@$(RM) $@.tmp.
en $@.tmp.nonen
;
@$(prep-target)
@$(ECHO) $(subst .properties,'\n',$(
US_Resources_properties)) > $@.tmp.us
;
@$(ECHO) $(subst .java,'\n',$(
US_Resources_java)) >> $@.tmp.us
;
@$(ECHO) $(subst .properties,'\n',$(Non
US_Resources_properties)) > $@.tmp.nonus
;
@$(ECHO) $(subst .java,'\n',$(Non
US_Resources_java)) >> $@.tmp.nonus
;
@$(ECHO) $(subst .properties,'\n',$(
EN_Resources_properties)) > $@.tmp.en
;
@$(ECHO) $(subst .java,'\n',$(
EN_Resources_java)) >> $@.tmp.en
;
@$(ECHO) $(subst .properties,'\n',$(Non
EN_Resources_properties)) > $@.tmp.nonen
;
@$(ECHO) $(subst .java,'\n',$(Non
EN_Resources_java)) >> $@.tmp.nonen
;
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.
us
\
$@.tmp.non
us
$< $@
@$(RM) $@.tmp.
us $@.tmp.nonus
;
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.
en
\
$@.tmp.non
en
$< $@
@$(RM) $@.tmp.
en $@.tmp.nonen
;
endif
genlocales : $(LocaleDataMetaInfo_Dest)
...
...
make/java/java/localegen.sh
浏览文件 @
a248acb2
...
...
@@ -35,11 +35,11 @@
# A list of resource base name list;
RESOURCE_NAMES
=
$1
# A list of
US
resources;
US
_FILES_LIST
=
$2
# A list of
EN
resources;
EN
_FILES_LIST
=
$2
# A list of non-
US
resources;
NON
US
_FILES_LIST
=
$3
# A list of non-
EN
resources;
NON
EN
_FILES_LIST
=
$3
INPUT_FILE
=
$4
OUTPUT_FILE
=
$5
...
...
@@ -53,23 +53,23 @@ getlocalelist() {
sed_script
=
"
$SED
-e
\"
s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@
\"
"
# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
non
us
all
=
" ja-JP-JP th-TH-TH "
non
en
all
=
" ja-JP-JP th-TH-TH "
for
FILE
in
$RESOURCE_NAMES
do
getlocalelist
$FILE
$
US
_FILES_LIST
sed_script
=
$sed_script
"-e
\"
s@#"
$FILE
"_
US
Locales#@
$localelist
@g
\"
"
usall
=
$us
all
" "
$localelist
getlocalelist
$FILE
$NON
US
_FILES_LIST
sed_script
=
$sed_script
"-e
\"
s@#"
$FILE
"_Non
US
Locales#@
$localelist
@g
\"
"
non
usall
=
$nonus
all
" "
$localelist
getlocalelist
$FILE
$
EN
_FILES_LIST
sed_script
=
$sed_script
"-e
\"
s@#"
$FILE
"_
EN
Locales#@
$localelist
@g
\"
"
enall
=
$en
all
" "
$localelist
getlocalelist
$FILE
$NON
EN
_FILES_LIST
sed_script
=
$sed_script
"-e
\"
s@#"
$FILE
"_Non
EN
Locales#@
$localelist
@g
\"
"
non
enall
=
$nonen
all
" "
$localelist
done
usall
=
`
(
for
LOC
in
$us
all
;
do
echo
$LOC
;
done
)
|
$SORT
-u
`
non
usall
=
`
(
for
LOC
in
$nonus
all
;
do
echo
$LOC
;
done
)
|
$SORT
-u
`
enall
=
`
(
for
LOC
in
$en
all
;
do
echo
$LOC
;
done
)
|
$SORT
-u
`
non
enall
=
`
(
for
LOC
in
$nonen
all
;
do
echo
$LOC
;
done
)
|
$SORT
-u
`
sed_script
=
$sed_script
"-e
\"
s@#AvailableLocales_
USLocales#@
$us
all
@g
\"
"
sed_script
=
$sed_script
"-e
\"
s@#AvailableLocales_Non
USLocales#@
$nonus
all
@g
\"
"
sed_script
=
$sed_script
"-e
\"
s@#AvailableLocales_
ENLocales#@
$en
all
@g
\"
"
sed_script
=
$sed_script
"-e
\"
s@#AvailableLocales_Non
ENLocales#@
$nonen
all
@g
\"
"
sed_script
=
$sed_script
"
$INPUT_FILE
>
$OUTPUT_FILE
"
eval
$sed_script
make/java/text/base/FILES_java.gmk
浏览文件 @
a248acb2
...
...
@@ -107,5 +107,17 @@ FILES_java = \
sun/text/resources/FormatData.java \
sun/text/resources/JavaTimeSupplementary.java \
sun/text/resources/en/FormatData_en.java \
sun/text/resources/en/FormatData_en_AU.java \
sun/text/resources/en/FormatData_en_CA.java \
sun/text/resources/en/FormatData_en_GB.java \
sun/text/resources/en/FormatData_en_IE.java \
sun/text/resources/en/FormatData_en_IN.java \
sun/text/resources/en/FormatData_en_MT.java \
sun/text/resources/en/FormatData_en_NZ.java \
sun/text/resources/en/FormatData_en_PH.java \
sun/text/resources/en/FormatData_en_SG.java \
sun/text/resources/en/FormatData_en_US.java \
sun/text/resources/en/FormatData_en_ZA.java \
sun/text/resources/en/JavaTimeSupplementary_en.java \
sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
sun/text/resources/en/JavaTimeSupplementary_en_SG.java
make/java/util/FILES_java.gmk
浏览文件 @
a248acb2
...
...
@@ -30,4 +30,7 @@ FILES_java = \
sun/util/resources/LocaleNamesBundle.java \
sun/util/resources/TimeZoneNamesBundle.java \
sun/util/resources/TimeZoneNames.java \
sun/util/resources/en/TimeZoneNames_en.java
sun/util/resources/en/TimeZoneNames_en.java \
sun/util/resources/en/TimeZoneNames_en_CA.java \
sun/util/resources/en/TimeZoneNames_en_GB.java \
sun/util/resources/en/TimeZoneNames_en_IE.java
make/java/util/FILES_properties.gmk
浏览文件 @
a248acb2
...
...
@@ -26,9 +26,25 @@
FILES_compiled_properties = \
sun/util/resources/LocaleNames.properties \
sun/util/resources/en/LocaleNames_en.properties \
sun/util/resources/en/LocaleNames_en_MT.properties \
sun/util/resources/en/LocaleNames_en_PH.properties \
sun/util/resources/en/LocaleNames_en_SG.properties \
\
sun/util/resources/CalendarData.properties \
sun/util/resources/en/CalendarData_en.properties \
sun/util/resources/en/CalendarData_en_GB.properties \
sun/util/resources/en/CalendarData_en_IE.properties \
sun/util/resources/en/CalendarData_en_MT.properties \
\
sun/util/resources/CurrencyNames.properties \
sun/util/resources/en/CurrencyNames_en_US.properties
sun/util/resources/en/CurrencyNames_en_AU.properties \
sun/util/resources/en/CurrencyNames_en_CA.properties \
sun/util/resources/en/CurrencyNames_en_GB.properties \
sun/util/resources/en/CurrencyNames_en_IE.properties \
sun/util/resources/en/CurrencyNames_en_IN.properties \
sun/util/resources/en/CurrencyNames_en_MT.properties \
sun/util/resources/en/CurrencyNames_en_NZ.properties \
sun/util/resources/en/CurrencyNames_en_PH.properties \
sun/util/resources/en/CurrencyNames_en_SG.properties \
sun/util/resources/en/CurrencyNames_en_US.properties \
sun/util/resources/en/CurrencyNames_en_ZA.properties
make/sun/text/FILES_java.gmk
浏览文件 @
a248acb2
...
...
@@ -96,16 +96,6 @@ FILES_java = \
sun/text/resources/el/FormatData_el.java \
sun/text/resources/el/FormatData_el_CY.java \
sun/text/resources/el/FormatData_el_GR.java \
sun/text/resources/en/FormatData_en_AU.java \
sun/text/resources/en/FormatData_en_CA.java \
sun/text/resources/en/FormatData_en_GB.java \
sun/text/resources/en/FormatData_en_IE.java \
sun/text/resources/en/FormatData_en_IN.java \
sun/text/resources/en/FormatData_en_MT.java \
sun/text/resources/en/FormatData_en_NZ.java \
sun/text/resources/en/FormatData_en_PH.java \
sun/text/resources/en/FormatData_en_SG.java \
sun/text/resources/en/FormatData_en_ZA.java \
sun/text/resources/es/FormatData_es.java \
sun/text/resources/es/FormatData_es_BO.java \
sun/text/resources/es/FormatData_es_AR.java \
...
...
@@ -214,9 +204,6 @@ FILES_java = \
sun/util/resources/zh/CurrencyNames_zh_SG.java \
sun/util/resources/zh/LocaleNames_zh_HK.java \
sun/util/resources/de/TimeZoneNames_de.java \
sun/util/resources/en/TimeZoneNames_en_CA.java \
sun/util/resources/en/TimeZoneNames_en_GB.java \
sun/util/resources/en/TimeZoneNames_en_IE.java \
sun/util/resources/es/TimeZoneNames_es.java \
sun/util/resources/fr/TimeZoneNames_fr.java \
sun/util/resources/hi/TimeZoneNames_hi.java \
...
...
@@ -237,8 +224,6 @@ FILES_java = \
sun/text/resources/da/JavaTimeSupplementary_da.java \
sun/text/resources/de/JavaTimeSupplementary_de.java \
sun/text/resources/el/JavaTimeSupplementary_el.java \
sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
sun/text/resources/en/JavaTimeSupplementary_en_SG.java \
sun/text/resources/es/JavaTimeSupplementary_es.java \
sun/text/resources/et/JavaTimeSupplementary_et.java \
sun/text/resources/fi/JavaTimeSupplementary_fi.java \
...
...
make/sun/text/FILES_properties.gmk
浏览文件 @
a248acb2
...
...
@@ -33,9 +33,6 @@ FILES_compiled_properties = \
sun/util/resources/de/LocaleNames_de.properties \
sun/util/resources/el/LocaleNames_el.properties \
sun/util/resources/el/LocaleNames_el_CY.properties \
sun/util/resources/en/LocaleNames_en_MT.properties \
sun/util/resources/en/LocaleNames_en_PH.properties \
sun/util/resources/en/LocaleNames_en_SG.properties \
sun/util/resources/es/LocaleNames_es.properties \
sun/util/resources/es/LocaleNames_es_US.properties \
sun/util/resources/et/LocaleNames_et.properties \
...
...
@@ -88,9 +85,6 @@ FILES_compiled_properties = \
sun/util/resources/de/CalendarData_de.properties \
sun/util/resources/el/CalendarData_el.properties \
sun/util/resources/el/CalendarData_el_CY.properties \
sun/util/resources/en/CalendarData_en_GB.properties \
sun/util/resources/en/CalendarData_en_IE.properties \
sun/util/resources/en/CalendarData_en_MT.properties \
sun/util/resources/es/CalendarData_es.properties \
sun/util/resources/es/CalendarData_es_ES.properties \
sun/util/resources/es/CalendarData_es_US.properties \
...
...
@@ -164,16 +158,6 @@ FILES_compiled_properties = \
sun/util/resources/de/CurrencyNames_de_LU.properties \
sun/util/resources/el/CurrencyNames_el_CY.properties \
sun/util/resources/el/CurrencyNames_el_GR.properties \
sun/util/resources/en/CurrencyNames_en_AU.properties \
sun/util/resources/en/CurrencyNames_en_CA.properties \
sun/util/resources/en/CurrencyNames_en_GB.properties \
sun/util/resources/en/CurrencyNames_en_IE.properties \
sun/util/resources/en/CurrencyNames_en_IN.properties \
sun/util/resources/en/CurrencyNames_en_MT.properties \
sun/util/resources/en/CurrencyNames_en_NZ.properties \
sun/util/resources/en/CurrencyNames_en_PH.properties \
sun/util/resources/en/CurrencyNames_en_SG.properties \
sun/util/resources/en/CurrencyNames_en_ZA.properties \
sun/util/resources/es/CurrencyNames_es.properties \
sun/util/resources/es/CurrencyNames_es_AR.properties \
sun/util/resources/es/CurrencyNames_es_BO.properties \
...
...
makefiles/CreateJars.gmk
浏览文件 @
a248acb2
...
...
@@ -80,39 +80,6 @@ LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in
LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
$(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
# For non-US English locale data
LOCALEDATA_INCLUDES += \
sun/text/resources/en/FormatData_en_AU.class \
sun/text/resources/en/FormatData_en_CA.class \
sun/text/resources/en/FormatData_en_GB.class \
sun/text/resources/en/FormatData_en_IE.class \
sun/text/resources/en/FormatData_en_IN.class \
sun/text/resources/en/FormatData_en_MT.class \
sun/text/resources/en/FormatData_en_NZ.class \
sun/text/resources/en/FormatData_en_PH.class \
sun/text/resources/en/FormatData_en_SG.class \
sun/text/resources/en/FormatData_en_ZA.class \
sun/util/resources/en/CalendarData_en_GB.class \
sun/util/resources/en/CalendarData_en_IE.class \
sun/util/resources/en/CalendarData_en_MT.class \
sun/util/resources/en/CurrencyNames_en_AU.class \
sun/util/resources/en/CurrencyNames_en_CA.class \
sun/util/resources/en/CurrencyNames_en_GB.class \
sun/util/resources/en/CurrencyNames_en_IE.class \
sun/util/resources/en/CurrencyNames_en_IN.class \
sun/util/resources/en/CurrencyNames_en_MT.class \
sun/util/resources/en/CurrencyNames_en_NZ.class \
sun/util/resources/en/CurrencyNames_en_PH.class \
sun/util/resources/en/CurrencyNames_en_SG.class \
sun/util/resources/en/CurrencyNames_en_ZA.class \
sun/util/resources/en/LocaleNames_en_MT.class \
sun/util/resources/en/LocaleNames_en_PH.class \
sun/util/resources/en/LocaleNames_en_SG.class \
sun/util/resources/en/TimeZoneNames_en_CA.class \
sun/util/resources/en/TimeZoneNames_en_GB.class \
sun/util/resources/en/TimeZoneNames_en_IE.class
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
SRCS:=$(JDK_OUTPUTDIR)/classes,\
SUFFIXES:=.class _dict _th,\
...
...
makefiles/GensrcLocaleDataMetaInfo.gmk
浏览文件 @
a248acb2
...
...
@@ -50,27 +50,27 @@ ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
$(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
endif
# The
US
locales
US_LOCALES:=en en-US
# The
EN
locales
EN_LOCALES:=en%
# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
ALL_NON_
US
_LOCALES:=ja-JP-JP th-TH-TH
ALL_NON_
EN
_LOCALES:=ja-JP-JP th-TH-TH
SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
# This macro creates a sed expression that substitues for example:
# #FormatData_
USLocales# with: en and/or en_US
.
# #FormatData_
ENLocales# with: en% locales
.
define CaptureLocale
$1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
$1_
US_LOCALES := $$(filter $(US
_LOCALES),$$($1_LOCALES))
$1_NON_
US_LOCALES := $$(filter-out $(US
_LOCALES),$$($1_LOCALES))
$1_
EN_LOCALES := $$(filter $(EN
_LOCALES),$$($1_LOCALES))
$1_NON_
EN_LOCALES := $$(filter-out $(EN
_LOCALES),$$($1_LOCALES))
ALL_
US_LOCALES += $$($1_US
_LOCALES)
ALL_NON_
US_LOCALES += $$($1_NON_US
_LOCALES)
ALL_
EN_LOCALES += $$($1_EN
_LOCALES)
ALL_NON_
EN_LOCALES += $$($1_NON_EN
_LOCALES)
# Don't sed in a space if there are no locales.
SED_ARGS+= -e 's/$$(HASH)$1_
USLocales$$(HASH)/$$(if $$($1_US_LOCALES),$$(SPACE)$$($1_US
_LOCALES),)/g'
SED_ARGS+= -e 's/$$(HASH)$1_Non
USLocales$$(HASH)/$$(if $$($1_NON_US_LOCALES),$$(SPACE)$$($1_NON_US
_LOCALES),)/g'
SED_ARGS+= -e 's/$$(HASH)$1_
ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN
_LOCALES),)/g'
SED_ARGS+= -e 's/$$(HASH)$1_Non
ENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN
_LOCALES),)/g'
endef
#sun.text.resources.FormatData
...
...
@@ -91,8 +91,8 @@ $(eval $(call CaptureLocale,CurrencyNames))
#sun.util.resources.CalendarData
$(eval $(call CaptureLocale,CalendarData))
SED_ARGS+= -e 's/$(HASH)AvailableLocales_
USLocales$(HASH)/$(sort $(ALL_US
_LOCALES))/g'
SED_ARGS+= -e 's/$(HASH)AvailableLocales_Non
USLocales$(HASH)/$(sort $(ALL_NON_US
_LOCALES))/g'
SED_ARGS+= -e 's/$(HASH)AvailableLocales_
ENLocales$(HASH)/$(sort $(ALL_EN
_LOCALES))/g'
SED_ARGS+= -e 's/$(HASH)AvailableLocales_Non
ENLocales$(HASH)/$(sort $(ALL_NON_EN
_LOCALES))/g'
$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
...
...
src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
浏览文件 @
a248acb2
...
...
@@ -361,7 +361,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
while
(
tokens
.
hasMoreTokens
())
{
String
token
=
tokens
.
nextToken
();
if
(
token
.
equals
(
"|"
))
{
if
(
isNon
US
LangSupported
())
{
if
(
isNon
EN
LangSupported
())
{
continue
;
}
break
;
...
...
@@ -398,7 +398,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
*/
int
barIndex
=
supportedLocaleString
.
indexOf
(
'|'
);
StringTokenizer
localeStringTokenizer
;
if
(
isNon
US
LangSupported
())
{
if
(
isNon
EN
LangSupported
())
{
localeStringTokenizer
=
new
StringTokenizer
(
supportedLocaleString
.
substring
(
0
,
barIndex
)
+
supportedLocaleString
.
substring
(
barIndex
+
1
));
}
else
{
...
...
@@ -427,17 +427,17 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
return
locales
;
}
private
static
volatile
Boolean
isNon
US
Supported
=
null
;
private
static
volatile
Boolean
isNon
EN
Supported
=
null
;
/*
* Returns true if the non
US
resources jar file exists in jre
* Returns true if the non
EN
resources jar file exists in jre
* extension directory. @returns true if the jar file is there. Otherwise,
* returns false.
*/
private
static
boolean
isNon
US
LangSupported
()
{
if
(
isNon
US
Supported
==
null
)
{
private
static
boolean
isNon
EN
LangSupported
()
{
if
(
isNon
EN
Supported
==
null
)
{
synchronized
(
JRELocaleProviderAdapter
.
class
)
{
if
(
isNon
US
Supported
==
null
)
{
if
(
isNon
EN
Supported
==
null
)
{
final
String
sep
=
File
.
separator
;
String
localeDataJar
=
java
.
security
.
AccessController
.
doPrivileged
(
...
...
@@ -449,7 +449,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
* localedata.jar is installed or not.
*/
final
File
f
=
new
File
(
localeDataJar
);
isNon
US
Supported
=
isNon
EN
Supported
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Boolean
>()
{
@Override
public
Boolean
run
()
{
...
...
@@ -459,6 +459,6 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
}
}
}
return
isNon
US
Supported
;
return
isNon
EN
Supported
;
}
}
src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
浏览文件 @
a248acb2
...
...
@@ -52,25 +52,25 @@ public class LocaleDataMetaInfo {
look up locale string such as "
en
" could be based on if it contains "
en
".
*/
resourceNameToLocales.put("
FormatData
",
"
#
FormatData_
USLocales
#
|
#
FormatData_NonUS
Locales
#
");
"
#
FormatData_
ENLocales
#
|
#
FormatData_NonEN
Locales
#
");
resourceNameToLocales.put("
CollationData
",
"
#
CollationData_
USLocales
#
|
#
CollationData_NonUS
Locales
#
");
"
#
CollationData_
ENLocales
#
|
#
CollationData_NonEN
Locales
#
");
resourceNameToLocales.put("
TimeZoneNames
",
"
#
TimeZoneNames_
USLocales
#
|
#
TimeZoneNames_NonUS
Locales
#
");
"
#
TimeZoneNames_
ENLocales
#
|
#
TimeZoneNames_NonEN
Locales
#
");
resourceNameToLocales.put("
LocaleNames
",
"
#
LocaleNames_
USLocales
#
|
#
LocaleNames_NonUS
Locales
#
");
"
#
LocaleNames_
ENLocales
#
|
#
LocaleNames_NonEN
Locales
#
");
resourceNameToLocales.put("
CurrencyNames
",
"
#
CurrencyNames_
USLocales
#
|
#
CurrencyNames_NonUS
Locales
#
");
"
#
CurrencyNames_
ENLocales
#
|
#
CurrencyNames_NonEN
Locales
#
");
resourceNameToLocales.put("
CalendarData
",
"
#
CalendarData_
USLocales
#
|
#
CalendarData_NonUS
Locales
#
");
"
#
CalendarData_
ENLocales
#
|
#
CalendarData_NonEN
Locales
#
");
resourceNameToLocales.put("
AvailableLocales
",
"
#
AvailableLocales_
USLocales
#
|
#
AvailableLocales_NonUS
Locales
#
");
"
#
AvailableLocales_
ENLocales
#
|
#
AvailableLocales_NonEN
Locales
#
");
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录