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 @@
- 是否允许对端连接本机 + {{title}} - 用于分享图片 + {{titleList}}
diff --git a/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.js b/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.js index 13a4384c54373870c4ca3b1e17d2daf7567c1239..a61e88287346805cd60b73971d517e3abe9cd2fa 100644 --- a/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.js +++ b/common/include/show_confirm_dialog/dialog_ui/js/pages/index/index.js @@ -4,9 +4,18 @@ var timel = null; export default { data: { seconds:60, + title:"", + titleList:"", + titleSeconds:"", + butCancel:"", + butConfirm:"" }, onInit() { - console.info('getParams: ' + router.getParams()); + this.title = this.$t('strings.title'); + this.titleList = this.$t('strings.titleList'); + this.butCancel = this.$t('strings.butCancel'); + this.titleSeconds = this.$t('strings.titleSeconds'); + this.butConfirm = this.$t('strings.butConfirm'); }, onShow() { timel = setInterval(this.run,1000) diff --git a/ext/pin_auth/input_pin_dialog/dialog_ui/js/BUILD.gn b/ext/pin_auth/input_pin_dialog/dialog_ui/js/BUILD.gn index a343c353fcba1a5ffa3fb152c9d265a3b75d32fa..60731e0283d4570df8290f6bdafcd8053c8ed60f 100644 --- a/ext/pin_auth/input_pin_dialog/dialog_ui/js/BUILD.gn +++ b/ext/pin_auth/input_pin_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/ext/pin_auth/input_pin_dialog/dialog_ui/js" + i18n_files = [ + "i18n/en-US.json", + "i18n/zh-CN.json", + ] dialog_name = "input_pin_service" part_name = "device_manager_base" subsystem_name = "distributedhardware" diff --git a/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/en-US.json b/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/en-US.json index 0714fc75f8420ac089a6ee1c24c8f2d8472ff511..7b82c84ce91cbdb3611ee31dc02126ef8e4cf465 100644 --- a/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/en-US.json +++ b/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/en-US.json @@ -1,5 +1,11 @@ { - "message":{ - "hello": "hello world" + "strings": { + "title": "Pin connection", + "titleList": "Please enter the pin code displayed by another device to verify", + "titleError": "Pin code input error, please re-enter", + "butCancel": "cancel", + "butConfirm": "allow", + "titleInfor": "3 times:and", + "titleBefor": "second chance" } } \ No newline at end of file diff --git a/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/zh-CN.json b/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/zh-CN.json index 53afe2047da6ff0423e5eae8d9f9af9f73d85d0b..c63dab09b28af9f0b29454bfcf6a037b3c3a9e00 100644 --- a/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/zh-CN.json +++ b/ext/pin_auth/input_pin_dialog/dialog_ui/js/i18n/zh-CN.json @@ -1,5 +1,11 @@ { - "message": { - "hello": "你好世界" + "strings": { + "title": "PIN码连接", + "titleList": "请输入另一个设备显示的PIN码进行验证", + "titleError": "PIN码输入错误,请重新输入", + "butCancel": "取消", + "butConfirm": "允许", + "titleInfor": "3次:还有", + "titleBefor": "次机会" } } \ No newline at end of file diff --git a/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.hml b/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.hml index 53558da904c5d13768c9a31383aed65dbd133aa8..ac6da6558c50c53f79345b6196eeca7e15309c02 100644 --- a/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.hml +++ b/ext/pin_auth/input_pin_dialog/dialog_ui/js/pages/index/index.hml @@ -1,20 +1,20 @@
- 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');