diff --git a/README.md b/README.md index ddfc97fd5a252e8d8d68c3a9ccd967d2cc6373de..c79d6340567882bd0b7c5315d5d3606fce91f50e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The directory structure for the i18n module is as follows: ``` /base/global/ -├── i18n_standard # Code repository for the i18n framework +├── i18n # Code repository for the i18n framework │ ├── frameworks # Core code of the i18n framework │ ├── interfaces # APIs │ │ ├── js # JavaScript APIs diff --git a/README_zh.md b/README_zh.md index 068325fd564308683154c187635068a471192fa3..f86c4530e83d02624862c152b84ceb4afbbd10e6 100644 --- a/README_zh.md +++ b/README_zh.md @@ -16,7 +16,7 @@ ``` /base/global/ -├── i18n_standard # 国际化框架代码仓 +├── i18n # 国际化框架代码仓 │ ├── frameworks # 国际化框架核心代码 │ ├── interfaces # 国际化框架接口 │ │ ├── js # 国际化框架JavaScript接口 diff --git a/bundle.json b/bundle.json index 06292274043dba4eab8f1248170fed36951e2e11..a956f7d60685aea9606afaee52fefa1762d5f8be 100644 --- a/bundle.json +++ b/bundle.json @@ -1,10 +1,10 @@ { - "name": "@ohos/global_i18n_standard", + "name": "@ohos/global_i18n", "version": "1.0.0", "description": "Provides internationalization APIS for implementing functions such date and time formatting.", "homePage": "https://gitee.com/openharmony/", "license": "Apache V2", - "repository": "https://gitee.com/openharmony/global_i18n_standard", + "repository": "https://gitee.com/openharmony/global_i18n", "domain": "os", "language": "", "publishAs": "code-segment", @@ -32,10 +32,10 @@ } ], "segment": { - "destPath": "base/global/i18n_standard" + "destPath": "base/global/i18n" }, "component": { - "name": "i18n_standard", + "name": "i18n", "subsystem": "global", "syscap": [ "SystemCapability.Global.I18n" @@ -66,43 +66,43 @@ }, "build": { "sub_component": [ - "//base/global/i18n_standard/frameworks/zone:zone_util", - "//base/global/i18n_standard/frameworks/intl:build_module", - "//base/global/i18n_standard/interfaces/js/kits:build_module" + "//base/global/i18n/frameworks/zone:zone_util", + "//base/global/i18n/frameworks/intl:build_module", + "//base/global/i18n/interfaces/js/kits:build_module" ], "inner_kits": [ { - "name": "//base/global/i18n_standard/frameworks/zone:zone_util", + "name": "//base/global/i18n/frameworks/zone:zone_util", "header": { "header_files": [ "zone_util.h" ], - "header_base": "//base/global/i18n_standard/interfaces/native/innerkits/zone/include" + "header_base": "//base/global/i18n/interfaces/native/innerkits/zone/include" } }, { - "name": "//base/global/i18n_standard/frameworks/intl:intl_util", + "name": "//base/global/i18n/frameworks/intl:intl_util", "header": { "header_files": [ "locale_config.h", "locale_info.h" ], - "header_base": "//base/global/i18n_standard/frameworks/intl/include" + "header_base": "//base/global/i18n/frameworks/intl/include" } }, { - "name": "//base/global/i18n_standard/frameworks/intl:preferred_language", + "name": "//base/global/i18n/frameworks/intl:preferred_language", "header": { "header_files": [ "preferred_language.h" ], - "header_base": "//base/global/i18n_standard/interfaces/native/innerkits/preferred_language/include" + "header_base": "//base/global/i18n/interfaces/native/innerkits/preferred_language/include" } } ], "test": [ - "//base/global/i18n_standard/frameworks/intl/test:intl_test", - "//base/global/i18n_standard/frameworks/zone/test:zone_util_test" + "//base/global/i18n/frameworks/intl/test:intl_test", + "//base/global/i18n/frameworks/zone/test:zone_util_test" ] } } diff --git a/frameworks/intl/BUILD.gn b/frameworks/intl/BUILD.gn index e748b0d26a2c6b6ad83eda654129181eda7ef0a5..5ec70e5cdb9db788f80bd26002f5d98d25fc7ba0 100644 --- a/frameworks/intl/BUILD.gn +++ b/frameworks/intl/BUILD.gn @@ -21,7 +21,9 @@ group("build_module") { } config("preferred_language_config") { - include_dirs = [ "//base/global/i18n_standard/interfaces/native/innerkits/preferred_language/include" ] + include_dirs = [ + "//base/global/i18n/interfaces/native/innerkits/preferred_language/include", + ] } ohos_shared_library("preferred_language") { public_configs = [ ":preferred_language_config" ] @@ -31,13 +33,13 @@ ohos_shared_library("preferred_language") { "-Wall", "-fPIC", ] - deps = [ "//base/global/i18n_standard/frameworks/intl:intl_util" ] + deps = [ "//base/global/i18n/frameworks/intl:intl_util" ] external_deps = [ "hiviewdfx_hilog_native:libhilog", "startup_l2:syspara", ] subsystem_name = "global" - part_name = "i18n_standard" + part_name = "i18n" } config("intl_util_config") { @@ -46,8 +48,8 @@ config("intl_util_config") { "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/icu/icu4c/source/common/unicode", - "//base/global/i18n_standard/frameworks/intl/include", - "//base/global/i18n_standard/interfaces/native/innerkits/i18n/include", + "//base/global/i18n/frameworks/intl/include", + "//base/global/i18n/interfaces/native/innerkits/i18n/include", ] } ohos_shared_library("intl_util") { @@ -106,51 +108,46 @@ ohos_shared_library("intl_util") { cflags_cc += [ "-DTEL_CORE_SERVICE_EXISTS" ] } subsystem_name = "global" - part_name = "i18n_standard" + part_name = "i18n" } ohos_prebuilt_etc("language_config.para") { - source = - "//base/global/i18n_standard/frameworks/intl/etc/language_config.para" - part_name = "i18n_standard" + source = "//base/global/i18n/frameworks/intl/etc/language_config.para" + part_name = "i18n" module_install_dir = "etc/param" } ohos_prebuilt_etc("config_locales_xml") { - source = - "//base/global/i18n_standard/frameworks/intl/etc/supported_locales.xml" + source = "//base/global/i18n/frameworks/intl/etc/supported_locales.xml" module_install_dir = "usr/ohos_locale_config/" - part_name = "i18n_standard" + part_name = "i18n" subsystem_name = "global" } ohos_prebuilt_etc("config_regions_xml") { - source = - "//base/global/i18n_standard/frameworks/intl/etc/supported_regions.xml" + source = "//base/global/i18n/frameworks/intl/etc/supported_regions.xml" module_install_dir = "usr/ohos_locale_config/" - part_name = "i18n_standard" + part_name = "i18n" subsystem_name = "global" } ohos_prebuilt_etc("white_languages_xml") { - source = "//base/global/i18n_standard/frameworks/intl/etc/white_languages.xml" + source = "//base/global/i18n/frameworks/intl/etc/white_languages.xml" module_install_dir = "usr/ohos_locale_config/" - part_name = "i18n_standard" + part_name = "i18n" subsystem_name = "global" } ohos_prebuilt_etc("forbidden_languages_xml") { - source = - "//base/global/i18n_standard/frameworks/intl/etc/forbidden_languages.xml" + source = "//base/global/i18n/frameworks/intl/etc/forbidden_languages.xml" module_install_dir = "usr/ohos_locale_config/" - part_name = "i18n_standard" + part_name = "i18n" subsystem_name = "global" } ohos_prebuilt_etc("forbidden_regions_xml") { - source = - "//base/global/i18n_standard/frameworks/intl/etc/forbidden_regions.xml" + source = "//base/global/i18n/frameworks/intl/etc/forbidden_regions.xml" module_install_dir = "usr/ohos_locale_config/" - part_name = "i18n_standard" + part_name = "i18n" subsystem_name = "global" } diff --git a/frameworks/intl/include/character.h b/frameworks/intl/include/character.h index c2e2bfaa8163b1a49b1799496c7828b9d92b6f5c..dddd0465cf7fc0889065bbbf8d3993f1f782f281 100644 --- a/frameworks/intl/include/character.h +++ b/frameworks/intl/include/character.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef GLOBAL_I18N_STANDARD_CHARACTER_H -#define GLOBAL_I18N_STANDARD_CHARACTER_H +#ifndef GLOBAL_I18N_CHARACTER_H +#define GLOBAL_I18N_CHARACTER_H #include #include #include "unicode/uchar.h" diff --git a/frameworks/intl/include/collator.h b/frameworks/intl/include/collator.h index 2b65a957bb11196b02eed5d500bffacbc3278e06..e1a0ecedb2d5b85f42760b529d379c208c63220d 100644 --- a/frameworks/intl/include/collator.h +++ b/frameworks/intl/include/collator.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef GLOBAL_I18N_STANDARD_COLLATOR_H -#define GLOBAL_I18N_STANDARD_COLLATOR_H +#ifndef GLOBAL_i18n_COLLATOR_H +#define GLOBAL_i18n_COLLATOR_H #include #include diff --git a/frameworks/intl/include/index_util.h b/frameworks/intl/include/index_util.h index 41a6cef2299474fcd178a6f33ab875fa6d48b6fc..db2a47637dc66f6700b90453ad6245b8754c0535 100644 --- a/frameworks/intl/include/index_util.h +++ b/frameworks/intl/include/index_util.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef GLOBAL_I18N_STANDARD_INDEX_UTIL_H -#define GLOBAL_I18N_STANDARD_INDEX_UTIL_H +#ifndef GLOBAL_I18N_INDEX_UTIL_H +#define GLOBAL_I18N_INDEX_UTIL_H #include #include diff --git a/frameworks/intl/include/plural_rules.h b/frameworks/intl/include/plural_rules.h index 362164804a043511599d550b209ff1502adc1018..612a60ae2e1d85e93d472e51a6687e9a1e101e9e 100644 --- a/frameworks/intl/include/plural_rules.h +++ b/frameworks/intl/include/plural_rules.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef GLOBAL_I18N_STANDARD_PLURAL_RULES_H -#define GLOBAL_I18N_STANDARD_PLURAL_RULES_H +#ifndef GLOBAL_I18N_PLURAL_RULES_H +#define GLOBAL_I18N_PLURAL_RULES_H #include #include diff --git a/frameworks/intl/test/BUILD.gn b/frameworks/intl/test/BUILD.gn index 9ccd79f2c2d7fefb60fe903c1e78de0c30af7f3b..678fc625a0093485b16f3a8a782161d12e4d3cb2 100644 --- a/frameworks/intl/test/BUILD.gn +++ b/frameworks/intl/test/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "i18n_standard/intl_test" +module_output_path = "i18n/intl_test" ohos_unittest("intl_test") { module_out_path = module_output_path @@ -23,12 +23,12 @@ ohos_unittest("intl_test") { "unittest/locale_config_test.cpp", ] include_dirs = [ - "//base/global/i18n_standard/frameworks/intl/include", + "//base/global/i18n/frameworks/intl/include", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", ] deps = [ - "//base/global/i18n_standard/frameworks/intl:intl_util", + "//base/global/i18n/frameworks/intl:intl_util", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", "//third_party/googletest:gtest_main", "//third_party/icu/icu4c:shared_icui18n", diff --git a/frameworks/zone/BUILD.gn b/frameworks/zone/BUILD.gn index 72e080c00371c1c6031804d721cce87869b7808c..5b679293dcd62938823fe999da1d1b909efe0914 100644 --- a/frameworks/zone/BUILD.gn +++ b/frameworks/zone/BUILD.gn @@ -19,7 +19,7 @@ config("zone_util_public_configs") { "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/common/unicode", "//third_party/icu/icu4c/source/i18n", - "//base/global/i18n_standard/interfaces/native/innerkits/zone/include", + "//base/global/i18n/interfaces/native/innerkits/zone/include", "//third_party/libphonenumber/cpp/src", "//third_party/protobuf/src", "//third_party/protobuf/src/google", @@ -43,5 +43,5 @@ ohos_shared_library("zone_util") { "//third_party/libphonenumber/cpp:phonenumber_standard", ] subsystem_name = "global" - part_name = "i18n_standard" + part_name = "i18n" } diff --git a/frameworks/zone/test/BUILD.gn b/frameworks/zone/test/BUILD.gn index b7a2d7d0edd5e8af4a4b63a49b72035efdc6ec69..ebda0e93789cb9a1b7c0ca0df6a39c37f578a24f 100644 --- a/frameworks/zone/test/BUILD.gn +++ b/frameworks/zone/test/BUILD.gn @@ -13,7 +13,7 @@ import("//build/test.gni") -module_output_path = "i18n_standard/zone_util_test" +module_output_path = "i18n/zone_util_test" ohos_unittest("zone_util_test") { module_out_path = module_output_path @@ -38,7 +38,7 @@ ohos_unittest("zone_util_test") { include_dirs = [ "//third_party/googletest/googletest/include", "//third_party/googletest/googletest", - "//base/global/i18n_standard/interfaces/native/innerkits/zone/include", + "//base/global/i18n/interfaces/native/innerkits/zone/include", "//third_party/icu/icu4c/source/common/unicode", "//third_party/icu/icu4c/source/common", "//third_party/libphonenumber/cpp/src", @@ -47,7 +47,7 @@ ohos_unittest("zone_util_test") { "//third_party/protobuf/src/google/protobuf", ] deps = [ - "//base/global/i18n_standard/frameworks/zone:zone_util", + "//base/global/i18n/frameworks/zone:zone_util", "//third_party/libphonenumber/cpp:phonenumber_standard", "//utils/native/base:utils", ] diff --git a/interfaces/js/kits/BUILD.gn b/interfaces/js/kits/BUILD.gn index 9c10d17bc6fc69eb052e48bb1c07617690f5d8de..94c92563a594ac33fda05c17a2dc005d0290a3e2 100644 --- a/interfaces/js/kits/BUILD.gn +++ b/interfaces/js/kits/BUILD.gn @@ -22,8 +22,8 @@ group("build_module") { ohos_shared_library("intl") { include_dirs = [ - "//base/global/i18n_standard/frameworks/intl/include", - "//base/global/i18n_standard/interfaces/js/kits/include", + "//base/global/i18n/frameworks/intl/include", + "//base/global/i18n/interfaces/js/kits/include", "//base/hiviewdfx/interfaces/native/innerkits/include", "//foundation/ace/napi/native_engine", "//foundation/ace/napi/interfaces/kits", @@ -39,7 +39,7 @@ ohos_shared_library("intl") { sources = [ "src/intl_addon.cpp" ] deps = [ - "//base/global/i18n_standard/frameworks/intl:intl_util", + "//base/global/i18n/frameworks/intl:intl_util", "//foundation/ace/napi:ace_napi", "//third_party/icu/icu4c:shared_icui18n", "//third_party/icu/icu4c:shared_icuuc", @@ -48,13 +48,13 @@ ohos_shared_library("intl") { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] relative_install_dir = "module" subsystem_name = "global" - part_name = "i18n_standard" + part_name = "i18n" } ohos_shared_library("i18n") { include_dirs = [ - "//base/global/i18n_standard/frameworks/intl/include", - "//base/global/i18n_standard/interfaces/js/kits/include", + "//base/global/i18n/frameworks/intl/include", + "//base/global/i18n/interfaces/js/kits/include", "//base/hiviewdfx/interfaces/native/innerkits/include", "//foundation/ace/napi/native_engine", "//foundation/ace/napi/interfaces/kits", @@ -70,8 +70,8 @@ ohos_shared_library("i18n") { sources = [ "src/i18n_addon.cpp" ] deps = [ - "//base/global/i18n_standard/frameworks/intl:intl_util", - "//base/global/i18n_standard/frameworks/intl:preferred_language", + "//base/global/i18n/frameworks/intl:intl_util", + "//base/global/i18n/frameworks/intl:preferred_language", "//third_party/icu/icu4c:shared_icui18n", "//third_party/icu/icu4c:shared_icuuc", "//third_party/libphonenumber/cpp:phonenumber_standard", @@ -82,5 +82,5 @@ ohos_shared_library("i18n") { ] relative_install_dir = "module" subsystem_name = "global" - part_name = "i18n_standard" + part_name = "i18n" }