diff --git a/common/include/show_confirm_dialog/dialog_ui/js/BUILD.gn b/common/include/show_confirm_dialog/dialog_ui/js/BUILD.gn
index d360a06102d2ea9e718acbf23dab56678bc89cde..7df26092900a707c9281b1a5cbbe32e7d80d26f3 100644
--- a/common/include/show_confirm_dialog/dialog_ui/js/BUILD.gn
+++ b/common/include/show_confirm_dialog/dialog_ui/js/BUILD.gn
@@ -16,6 +16,10 @@ import("//foundation/distributedhardware/devicemanager/devicemanager.gni")
gen_sa_dialog_js("dialog_js_files_etc") {
project_path = "//foundation/distributedhardware/devicemanager/common/include/show_confirm_dialog/dialog_ui/js"
+ i18n_files = [
+ "i18n/en-US.json",
+ "i18n/zh-CN.json",
+ ]
dialog_name = "config_dialog_service"
part_name = "device_manager_base"
subsystem_name = "distributedhardware"
diff --git a/common/include/show_confirm_dialog/dialog_ui/js/i18n/en-US.json b/common/include/show_confirm_dialog/dialog_ui/js/i18n/en-US.json
index 0714fc75f8420ac089a6ee1c24c8f2d8472ff511..47141ddbcc9df1782b285231d34187cebb5020b8 100644
--- a/common/include/show_confirm_dialog/dialog_ui/js/i18n/en-US.json
+++ b/common/include/show_confirm_dialog/dialog_ui/js/i18n/en-US.json
@@ -1,5 +1,9 @@
{
- "message":{
- "hello": "hello world"
+ "strings":{
+ "title": "Is it allowed to connect the machine to the opposite end",
+ "titleList": "For sharing pictures",
+ "butCancel": "cancel",
+ "butConfirm": "allow",
+ "titleSeconds": "second"
}
}
\ No newline at end of file
diff --git a/common/include/show_confirm_dialog/dialog_ui/js/i18n/zh-CN.json b/common/include/show_confirm_dialog/dialog_ui/js/i18n/zh-CN.json
index 53afe2047da6ff0423e5eae8d9f9af9f73d85d0b..d3a4be50393381b055d4f72a756223fa62a176bf 100644
--- a/common/include/show_confirm_dialog/dialog_ui/js/i18n/zh-CN.json
+++ b/common/include/show_confirm_dialog/dialog_ui/js/i18n/zh-CN.json
@@ -1,5 +1,9 @@
{
- "message": {
- "hello": "你好世界"
+ "strings": {
+ "title": "是否允许对端连接本机",
+ "titleList": "用于分享图片",
+ "butCancel": "取消",
+ "butConfirm": "允许",
+ "titleSeconds": "秒"
}
}
\ No newline at end of file
diff --git a/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.hml b/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.hml
index 8ce5443f5b8ab4d28486a308d8aac8daba098c87..be12b844f678c9cb22c65c4a959fa62d933fc70f 100644
--- a/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.hml
+++ b/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.hml
@@ -1,16 +1,16 @@
- PIN码连接
+ {{title}}
- 请输入另一个设备显示的PIN码进行验证
+ {{titleList}}
- PIN码输入错误,请重新输入(3次:还有{{isTimes}}次机会)
+ {{titleError}}({{titleInfor}}{{isTimes}}{{titleBefor}})
diff --git a/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.js b/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.js
index 488972d500f7250991051ef8511d5c24f22ce86d..275bc5eafbaed81e265417bd0cafdb6444e9d886 100644
--- a/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.js
+++ b/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.js
@@ -8,10 +8,24 @@ export default {
pincode: router.getParams().pinCode,
isShow:false,
isTimes:3,
+ title:"",
+ titleList:"",
+ titleError:"",
+ titleInfor:"",
+ titleBefor:"",
+ butCancel:"",
+ butConfirm:"",
},
onInit() {
code = router.getParams().pinCode;
callNativeHandler("EVENT_CONFIRM", "2");
+ this.title = this.$t('strings.title');
+ this.titleList = this.$t('strings.titleList');
+ this.butCancel = this.$t('strings.butCancel');
+ this.titleError = this.$t('strings.titleError');
+ this.titleInfor = this.$t('strings.titleInfor');
+ this.titleBefor = this.$t('strings.titleBefor');
+ this.butConfirm = this.$t('strings.butConfirm');
},
onChange(e){
inputVal = e.value;
diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn b/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn
index 24e859e1e77e2e26eb383592368fd293de6e2177..90984c32e7f6d7faf4edecc05118adeead079841 100644
--- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn
+++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn
@@ -18,6 +18,10 @@ gen_sa_dialog_js("dialog_js_files_etc") {
if (!device_manager_base_no_interaction_auth) {
project_path = "//foundation/distributedhardware/devicemanager/ext/pin_auth/show_pin_dialog/dialog_ui/js"
}
+ i18n_files = [
+ "i18n/en-US.json",
+ "i18n/zh-CN.json",
+ ]
dialog_name = "show_pin_service"
part_name = "device_manager_base"
subsystem_name = "distributedhardware"
diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/en-US.json b/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/en-US.json
index 0714fc75f8420ac089a6ee1c24c8f2d8472ff511..fa9e3ea145410663102d5e421fe0223fb72aad23 100644
--- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/en-US.json
+++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/en-US.json
@@ -1,5 +1,7 @@
{
- "message":{
- "hello": "hello world"
+ "strings": {
+ "title": "Pin connection",
+ "titleList": "Please enter the link code at the device side for verification",
+ "butCancel": "cancel"
}
}
\ No newline at end of file
diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/zh-CN.json b/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/zh-CN.json
index 53afe2047da6ff0423e5eae8d9f9af9f73d85d0b..0a7421912d4ad3ea6660b25d0d5b91ae07de9bad 100644
--- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/zh-CN.json
+++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/i18n/zh-CN.json
@@ -1,5 +1,7 @@
{
- "message": {
- "hello": "你好世界"
+ "strings": {
+ "title": "PIN码连接",
+ "titleList": "请在设备端输入链接码进行验证",
+ "butCancel": "取消"
}
}
\ No newline at end of file
diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.hml b/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.hml
index 845c99e570c9e56592ea375fa53410773b4c743c..6bf97e73789dbec7ebe987b02e10761ce2a5d905 100644
--- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.hml
+++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.hml
@@ -1,14 +1,14 @@
- PIN码连接
+ {{title}}
- 请在设备端输入链接码进行验证
+ {{titleList}}
{{ pincode }}
\ No newline at end of file
diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.js b/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.js
index 598deca1f5d8075b1e73fbdc3cd4fbdcd5781635..bb2fa85dd1c4776b719179f25d3da0498642e5be 100644
--- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.js
+++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/pages/index/index.js
@@ -3,9 +3,15 @@ import router from '@ohos.router'
export default {
data: {
pincode: router.getParams().pinCode,
+ title:"",
+ titleList:"",
+ butCancel:""
},
onInit() {
callNativeHandler("EVENT_CONFIRM", "0");
+ this.title = this.$t('strings.title');
+ this.titleList = this.$t('strings.titleList');
+ this.butCancel = this.$t('strings.butCancel');
},
onConfirm() {
console.info('click confirm');