Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a6f7994c
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a6f7994c
编写于
11月 16, 2022
作者:
Y
y00314596
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add by yangqing3@huawei.com
Signed-off-by:
N
y00314596
<
yangqing3@huawei.com
>
上级
b802773f
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
567 addition
and
255 deletion
+567
-255
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
+7
-6
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
.../resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
+424
-214
global/resmgr_standard/resmgrjs/src/main/resources/base/element/boolean.json
...ard/resmgrjs/src/main/resources/base/element/boolean.json
+8
-0
global/resmgr_standard/resmgrjs/src/main/resources/base/element/plural.json
...dard/resmgrjs/src/main/resources/base/element/plural.json
+26
-0
global/resmgr_standard/resmgrjs/src/main/resources/base/element/strarray.json
...rd/resmgrjs/src/main/resources/base/element/strarray.json
+8
-0
global/resmgr_standard/resmgrjs/src/main/resources/base/element/string.json
...dard/resmgrjs/src/main/resources/base/element/string.json
+35
-35
global/resmgr_standard/resmgrjs/src/main/resources/base/element/theme.json
...ndard/resmgrjs/src/main/resources/base/element/theme.json
+59
-0
未找到文件。
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
浏览文件 @
a6f7994c
...
...
@@ -148,14 +148,15 @@ describe('LangTest', function () {
let
list
=
I18n
.
getPreferredLanguageList
();
console
.
log
(
'
i18n_test_preferredlanguage_0120
'
+
list
);
expect
(
list
.
length
).
assertLarger
(
0
);
if
(
list
[
0
]
!=
'
zh-Hans-CN
'
){
if
(
list
[
0
]
!=
'
zh-Hans-CN
'
&&
list
[
0
]
!=
'
zh-Hans
'
){
let
value
=
I18n
.
addPreferredLanguage
(
'
zh-Hans-CN
'
);
console
.
log
(
'
i18n_test_preferredlanguage_0120
'
+
value
);
expect
(
value
).
assertTrue
();
expect
(
list
.
length
>
0
).
assertTrue
();
}
else
{
let
value
=
I18n
.
addPreferredLanguage
(
'
en-Latn-US
'
);
console
.
log
(
'
i18n_test_preferredlanguage_0120
'
+
value
);
expect
(
list
.
length
>
0
).
assertTrue
();
}
console
.
log
(
'
i18n_test_preferredlanguage_0120
'
+
I18n
.
getPreferredLanguageList
());
})
...
...
@@ -281,7 +282,7 @@ describe('LangTest', function () {
let
timezone
=
I18n
.
getTimeZone
();
let
value
=
timezone
.
getDisplayName
();
console
.
log
(
'
timezone_test_0200
'
+
value
);
expect
(
value
==
'
GMT
'
||
value
==
'
中国标准时间
'
||
value
==
'
格林尼治标准时间
'
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
})
/* *
...
...
@@ -294,7 +295,7 @@ describe('LangTest', function () {
let
timezone
=
I18n
.
getTimeZone
();
let
value
=
timezone
.
getDisplayName
(
'
zh-CN
'
);
console
.
log
(
'
timezone_test_0300
'
+
value
);
expect
(
value
==
'
GMT
'
||
value
==
'
中国标准时间
'
||
value
==
'
格林尼治标准时间
'
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
})
/* *
...
...
@@ -307,7 +308,7 @@ describe('LangTest', function () {
let
timezone
=
I18n
.
getTimeZone
();
let
value
=
timezone
.
getDisplayName
(
true
);
console
.
log
(
'
timezone_test_0400
'
+
value
);
expect
(
value
==
'
GMT
'
||
value
==
'
中国标准时间
'
||
value
==
'
格林尼治标准时间
'
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
})
/* *
...
...
@@ -320,7 +321,7 @@ describe('LangTest', function () {
let
timezone
=
I18n
.
getTimeZone
();
let
value
=
timezone
.
getDisplayName
(
false
);
console
.
log
(
'
timezone_test_0500
'
+
value
);
expect
(
value
==
'
GMT
'
||
value
==
'
中国标准时间
'
||
value
==
'
格林尼治标准时间
'
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
})
/* *
...
...
global/resmgr_standard/resmgrjs/src/main/js/test/Resmgr.test.js
浏览文件 @
a6f7994c
此差异已折叠。
点击以展开。
global/resmgr_standard/resmgrjs/src/main/resources/base/element/boolean.json
浏览文件 @
a6f7994c
...
...
@@ -7,6 +7,14 @@
{
"name"
:
"boolean_2"
,
"value"
:
false
},
{
"name"
:
"boolean_3"
,
"value"
:
"$boolean:boolean_4"
},
{
"name"
:
"boolean_4"
,
"value"
:
"$boolean:boolean_3"
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/resources/base/element/plural.json
浏览文件 @
a6f7994c
...
...
@@ -28,6 +28,32 @@
"value"
:
"%d test other"
}
]
},
{
"name"
:
"plural_name2"
,
"value"
:[
{
"quantity"
:
"one"
,
"value"
:
"$string:Test_name1"
},
{
"quantity"
:
"other"
,
"value"
:
"$string:Test_name1"
}
]
},
{
"name"
:
"plural_name3"
,
"value"
:[
{
"quantity"
:
"one"
,
"value"
:
"$theme:app_theme"
},
{
"quantity"
:
"other"
,
"value"
:
"$theme:app_theme"
}
]
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/resources/base/element/strarray.json
浏览文件 @
a6f7994c
...
...
@@ -16,6 +16,14 @@
"value"
:
"extra large"
}
]
},
{
"name"
:
"sizeList2"
,
"value"
:[
{
"value"
:
"$string:Test_name1"
}
]
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/resources/base/element/string.json
浏览文件 @
a6f7994c
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"L2Test"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"Test_name1"
,
"value"
:
"$string:Test_name2"
},
{
"name"
:
"Test_name2"
,
"value"
:
"$string:Test_name1"
}
]
}
\ No newline at end of file
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"L2Test"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"Test_name1"
,
"value"
:
"$string:Test_name2"
},
{
"name"
:
"Test_name2"
,
"value"
:
"$string:Test_name1"
}
]
}
\ No newline at end of file
global/resmgr_standard/resmgrjs/src/main/resources/base/element/theme.json
0 → 100644
浏览文件 @
a6f7994c
{
"theme"
:[
{
"name"
:
"app_theme"
,
"value"
:[
{
"name"
:
"colorbar"
,
"value"
:
"#FF00FF00"
},
{
"name"
:
"noWindow"
,
"value"
:
"true"
},
{
"name"
:
"layout_width"
,
"value"
:
"100dp"
},
{
"name"
:
"background"
,
"value"
:
"#FF00FF00"
},
{
"name"
:
"background111"
,
"value"
:
"#FF00FF00"
},
{
"name"
:
"background222"
,
"value"
:
"#FF00FF00"
},
{
"name"
:
"background333"
,
"value"
:
"$media:icon"
}
]
},
{
"name"
:
"test_theme"
,
"parent"
:
"app_theme"
,
"value"
:[
{
"name"
:
"color"
,
"value"
:
"#FFFFFF00"
},
{
"name"
:
"layout_width"
,
"value"
:
"50dp"
},
{
"name"
:
"colorbar"
,
"value"
:
"#FFFFFF11"
},
{
"name"
:
"hasWindow"
,
"value"
:
"true"
}
]
}
]
}
\ No newline at end of file
鸿蒙社区
@harmonycommunity
mentioned in commit
99dd0849
·
11月 18, 2022
mentioned in commit
99dd0849
mentioned in commit 99dd08492ab42c38ba71b738069531eeb32f6061
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录