Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Global I18n Standard
提交
9b20f71a
G
Global I18n Standard
项目概览
OpenHarmony
/
Global I18n Standard
大约 1 年 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Global I18n Standard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9b20f71a
编写于
9月 11, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 11, 2021
浏览文件
操作
浏览文件
下载
差异文件
!57 change phone_manager to core_manager
Merge pull request !57 from c大神群里的小喽啰/OpenHarmony-3.0-LTS
上级
e9558ab5
60a8c88a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
24 addition
and
22 deletion
+24
-22
frameworks/intl/BUILD.gn
frameworks/intl/BUILD.gn
+18
-10
frameworks/intl/src/locale_config.cpp
frameworks/intl/src/locale_config.cpp
+6
-12
未找到文件。
frameworks/intl/BUILD.gn
浏览文件 @
9b20f71a
...
@@ -24,7 +24,7 @@ config("intl_config") {
...
@@ -24,7 +24,7 @@ config("intl_config") {
ohos_shared_library("intl_util") {
ohos_shared_library("intl_util") {
configs = [
configs = [
":intl_config",
":intl_config",
"//build/config/compiler:rtti"
"//build/config/compiler:rtti"
,
]
]
include_dirs = [
include_dirs = [
"//third_party/icu/icu4c/source",
"//third_party/icu/icu4c/source",
...
@@ -33,48 +33,56 @@ ohos_shared_library("intl_util") {
...
@@ -33,48 +33,56 @@ ohos_shared_library("intl_util") {
"//third_party/icu/icu4c/source/common/unicode",
"//third_party/icu/icu4c/source/common/unicode",
"//base/global/i18n_standard/frameworks/intl/include",
"//base/global/i18n_standard/frameworks/intl/include",
"//base/telephony/core_service/interfaces/innerkits/common",
"//base/telephony/core_service/interfaces/innerkits/common",
"//base/telephony/core_service/interfaces/innerkits/network_search/include",
"//base/telephony/core_service/interfaces/innerkits/api",
"//base/telephony/core_service/interfaces/innerkits/proxy",
"//base/telephony/core_service/interfaces/innerkits/kits/js/napi/sim/include",
"//base/telephony/ril_adapter/interfaces/innerkits",
"//base/telephony/ril_adapter/interfaces/innerkits",
"//base/telephony/core_service/common/log/include",
"//base/telephony/core_service/common/log/include",
"//base/telephony/core_service/interfaces/kits/include",
"//utils/native/base/include",
"//utils/native/base/include",
"//third_party/libxml2/include",
"//third_party/libxml2/include",
]
]
sources = [
sources = [
"src/date_time_format.cpp",
"src/date_time_format.cpp",
"src/locale_config.cpp",
"src/locale_info.cpp",
"src/locale_info.cpp",
"src/number_format.cpp",
"src/number_format.cpp",
"src/locale_config.cpp",
]
]
cflags_cc = [
cflags_cc = [
"-Wall",
"-Wall",
"-fPIC",
"-fPIC",
]
]
deps = [
deps = [
"
//third_party/icu/icu4c:shared_icui18n
",
"
:config_locales_xml
",
"
//third_party/icu/icu4c:shared_icuuc
",
"
:config_regions_xml
",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
"//base/telephony/core_service:tel_core_service",
"//base/telephony/core_service/interfaces/kits:tel_core_service_api",
"//utils/native/base:utils",
"//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
"//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
"//third_party/icu/icu4c:shared_icui18n",
"//third_party/icu/icu4c:shared_icuuc",
"//third_party/libxml2:xml2",
"//third_party/libxml2:xml2",
":config_locales_xml",
"//utils/native/base:utils",
":config_regions_xml"
]
]
external_deps = [
external_deps = [
"hiviewdfx_hilog_native:libhilog",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
]
]
subsystem_name = "global"
subsystem_name = "global"
part_name = "i18n_standard"
part_name = "i18n_standard"
}
}
ohos_prebuilt_etc("config_locales_xml") {
ohos_prebuilt_etc("config_locales_xml") {
source = "//base/global/i18n_standard/frameworks/intl/src/supported_locales.xml"
source =
"//base/global/i18n_standard/frameworks/intl/src/supported_locales.xml"
module_install_dir = "usr/ohos_locale_config/"
module_install_dir = "usr/ohos_locale_config/"
part_name = "i18n_standard"
part_name = "i18n_standard"
subsystem_name = "global"
subsystem_name = "global"
}
}
ohos_prebuilt_etc("config_regions_xml") {
ohos_prebuilt_etc("config_regions_xml") {
source = "//base/global/i18n_standard/frameworks/intl/src/supported_regions.xml"
source =
"//base/global/i18n_standard/frameworks/intl/src/supported_regions.xml"
module_install_dir = "usr/ohos_locale_config/"
module_install_dir = "usr/ohos_locale_config/"
part_name = "i18n_standard"
part_name = "i18n_standard"
subsystem_name = "global"
subsystem_name = "global"
...
...
frameworks/intl/src/locale_config.cpp
浏览文件 @
9b20f71a
...
@@ -13,15 +13,17 @@
...
@@ -13,15 +13,17 @@
* limitations under the License.
* limitations under the License.
*/
*/
#include <algorithm>
#include <algorithm>
#include <memory.h>
#include <unordered_set>
#include <unordered_set>
#include "locale_config.h"
#include "locale_config.h"
#include "core_manager.h"
#include "libxml/parser.h"
#include "libxml/parser.h"
#include "locale_info.h"
#include "locale_info.h"
#include "localebuilder.h"
#include "localebuilder.h"
#include "locid.h"
#include "locid.h"
#include "ohos/init_data.h"
#include "ohos/init_data.h"
#include "parameter.h"
#include "parameter.h"
#include "
phone
_manager.h"
#include "
sim_card
_manager.h"
#include "string_ex.h"
#include "string_ex.h"
#include "ucase.h"
#include "ucase.h"
#include "unistr.h"
#include "unistr.h"
...
@@ -276,17 +278,9 @@ void LocaleConfig::GetRelatedLocales(unordered_set<string> &relatedLocales)
...
@@ -276,17 +278,9 @@ void LocaleConfig::GetRelatedLocales(unordered_set<string> &relatedLocales)
void
LocaleConfig
::
GetCountriesFromSim
(
vector
<
string
>
&
simCountries
)
void
LocaleConfig
::
GetCountriesFromSim
(
vector
<
string
>
&
simCountries
)
{
{
simCountries
.
push_back
(
GetSystemRegion
());
simCountries
.
push_back
(
GetSystemRegion
());
const
PhoneManager
&
phoneManager
=
PhoneManager
::
GetInstance
();
Telephony
::
SimCardManager
simCardManager
;
for
(
auto
iter
=
phoneManager
.
phone_
.
begin
();
iter
!=
phoneManager
.
phone_
.
end
();
++
iter
)
{
simCardManager
.
ConnectService
();
auto
phone
=
iter
->
second
;
simCountries
.
push_back
(
Str16ToStr8
(
simCardManager
.
GetIsoCountryCodeForSim
(
0
)));
if
(
phone
==
nullptr
)
{
continue
;
}
auto
sim
=
phone
->
simFileManager_
;
if
(
sim
!=
nullptr
)
{
simCountries
.
push_back
(
Str16ToStr8
(
sim
->
GetIsoCountryCode
(
0
)));
}
}
}
}
void
LocaleConfig
::
GetListFromFile
(
const
char
*
path
,
const
char
*
resourceName
,
unordered_set
<
string
>
&
ret
)
void
LocaleConfig
::
GetListFromFile
(
const
char
*
path
,
const
char
*
resourceName
,
unordered_set
<
string
>
&
ret
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录