From 46a1e408e683332e82dababb0cafa0637decb8db Mon Sep 17 00:00:00 2001 From: walkerwulei Date: Wed, 5 Jun 2024 17:44:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ans=E6=A8=A1=E5=9D=97=E5=AD=97=E4=B8=B2?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: walkerwulei (cherry picked from commit 5f4279f4a5fd7845465e41331eb808b5cc6db606) --- .../src/main/ets/pages/notificationDialog.ets | 5 +-- .../main/resources/base/element/string.json | 20 ++---------- .../main/resources/bo_CN/element/string.json | 32 +++++++++++++++++++ .../src/main/resources/ug/element/string.json | 32 +++++++++++++++++++ .../main/resources/zh_CN/element/string.json | 18 +---------- .../main/resources/zh_HK/element/string.json | 32 +++++++++++++++++++ .../main/resources/zh_TW/element/string.json | 32 +++++++++++++++++++ 7 files changed, 132 insertions(+), 39 deletions(-) create mode 100644 services/dialog_ui/enable_notification_dialog/entry/src/main/resources/bo_CN/element/string.json create mode 100644 services/dialog_ui/enable_notification_dialog/entry/src/main/resources/ug/element/string.json create mode 100644 services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_HK/element/string.json create mode 100644 services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_TW/element/string.json diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets index f04098877..17728bcd7 100644 --- a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets @@ -92,10 +92,7 @@ struct PermissionDialog { Row() { Flex({ justifyContent: FlexAlign.Start }) { Text() { - Span($r('app.string.whether_to_allow')) - Span(this.appName) - Span($r('app.string.quotes')) - Span(permission.label) + Span(getContext(this).resourceManager.getStringSync(permission.label.id).replace('%s', this.appName)) } .fontSize(Constants.DIALOG_REQ_FONT_SIZE) .fontColor($r('sys.color.ohos_id_color_text_primary')) diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/base/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/base/element/string.json index ff42825db..381553b22 100644 --- a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/base/element/string.json +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/base/element/string.json @@ -12,22 +12,6 @@ "name": "NotificationServiceExtAbility_label", "value": "NotificationDialog" }, - { - "name": "period", - "value": "." - }, - { - "name": "comma", - "value": ", " - }, - { - "name": "whether_to_allow", - "value": "Allow \"" - }, - { - "name": "quotes", - "value": "\"" - }, { "name": "reason", "value": "These may include banner notifications, lock screen notifications, notification sounds, and more. You can change this in Settings." @@ -38,11 +22,11 @@ }, { "name": "BAN", - "value": "BAN" + "value": "DENY" }, { "name": "group_label_notification", - "value": " to send notifications?" + "value": "Allow %s to send you notifications?" } ] } diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/bo_CN/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/bo_CN/element/string.json new file mode 100644 index 000000000..09ab26547 --- /dev/null +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/bo_CN/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "NotificationServiceExtAbility_desc", + "value": "NotificationDialog" + }, + { + "name": "NotificationServiceExtAbility_label", + "value": "NotificationDialog" + }, + { + "name": "reason", + "value": "འཕྲེད་བྱང་དང་སྒོ་ལྕགས་བརྙན་ཡོལ། དྲིལ་སྒྲ་སོགས་ཚུད་ཡོད། ༼སྒྲིག་འགོད་༽>༼བརྡ་ཐོ་དང་རྣམ་པའི་ཚན་བྱང་༽ལ་བསྐྱོད་ནས་གསར་སྒྱུར་བྱ་ཆོག" + }, + { + "name": "ALLOW", + "value": "ཆོག་པ།" + }, + { + "name": "BAN", + "value": "བཀག་འགོག" + }, + { + "name": "group_label_notification", + "value": "༼%s༽ཡིས་བརྡ་ཐོ་གཏོང་ཆོག་གམ།" + } + ] +} diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/ug/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/ug/element/string.json new file mode 100644 index 000000000..09c29733c --- /dev/null +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/ug/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "NotificationServiceExtAbility_desc", + "value": "NotificationDialog" + }, + { + "name": "NotificationServiceExtAbility_label", + "value": "NotificationDialog" + }, + { + "name": "reason", + "value": "بالداق ئۇقتۇرۇش، قۇلۇپ ئېكرانى ئۇقتۇرۇشى ۋە ئۇقتۇرۇش ئاۋازى قاتارلىقلار شۇنىڭ ئىچىدە. تەڭشەك > ئۇقتۇرۇش ۋە ھالەت بالدىقى دېگەن ئورۇندىن ئۆزگەرتەلەيسىز." + }, + { + "name": "ALLOW", + "value": "رۇخسەت" + }, + { + "name": "BAN", + "value": "چەكلەش" + }, + { + "name": "group_label_notification", + "value": "\\u200f«%s» نىڭ ئۇقتۇرۇش يوللىشىغا رۇخسەتمۇ؟" + } + ] +} diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_CN/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_CN/element/string.json index 5ab3cb3ac..a224bed4a 100644 --- a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_CN/element/string.json +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_CN/element/string.json @@ -12,22 +12,6 @@ "name": "NotificationServiceExtAbility_label", "value": "NotificationDialog" }, - { - "name": "period", - "value": "。" - }, - { - "name": "comma", - "value": "," - }, - { - "name": "whether_to_allow", - "value": "是否允许“" - }, - { - "name": "quotes", - "value": "”" - }, { "name": "reason", "value": "包括横幅、锁屏、铃声等。可前往“设置”>“通知和状态栏”更改。" @@ -42,7 +26,7 @@ }, { "name": "group_label_notification", - "value": "发送通知?" + "value": "是否允许“%s”发送通知?" } ] } diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_HK/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_HK/element/string.json new file mode 100644 index 000000000..ee6611b6f --- /dev/null +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_HK/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "NotificationServiceExtAbility_desc", + "value": "NotificationDialog" + }, + { + "name": "NotificationServiceExtAbility_label", + "value": "NotificationDialog" + }, + { + "name": "reason", + "value": "包括橫幅、鎖屏、鈴聲等。可前往「設定」>「通知和狀態欄」更改。" + }, + { + "name": "ALLOW", + "value": "允許" + }, + { + "name": "BAN", + "value": "禁止" + }, + { + "name": "group_label_notification", + "value": "允許「%s」發送通知?" + } + ] +} diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_TW/element/string.json b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_TW/element/string.json new file mode 100644 index 000000000..db58422ef --- /dev/null +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/resources/zh_TW/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "entry_desc", + "value": "description" + }, + { + "name": "NotificationServiceExtAbility_desc", + "value": "NotificationDialog" + }, + { + "name": "NotificationServiceExtAbility_label", + "value": "NotificationDialog" + }, + { + "name": "reason", + "value": "包括橫幅、鎖定螢幕、鈴聲等。可以前往「設定」>「通知和狀態列」中變更。" + }, + { + "name": "ALLOW", + "value": "允許" + }, + { + "name": "BAN", + "value": "禁止" + }, + { + "name": "group_label_notification", + "value": "是否允許「%s」傳送通知?" + } + ] +} -- Gitee From 7f42f5888178520a7cb7be1195474478158fb47e Mon Sep 17 00:00:00 2001 From: walkerwulei Date: Fri, 14 Jun 2024 17:12:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ans=E6=97=A5=E5=BF=97=E4=B8=AD=E6=97=A0?= =?UTF-8?q?=E6=95=88=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: walkerwulei (cherry picked from commit 787ef4ea64483dbf15276f17e3eb981da714b1e0) --- services/ans/src/advanced_notification_publish_service.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/ans/src/advanced_notification_publish_service.cpp b/services/ans/src/advanced_notification_publish_service.cpp index 902d65cf2..d8c3bf186 100644 --- a/services/ans/src/advanced_notification_publish_service.cpp +++ b/services/ans/src/advanced_notification_publish_service.cpp @@ -2038,9 +2038,8 @@ ErrCode AdvancedNotificationService::IsDistributedEnabledByBundle(const sptr bundle = GenerateValidBundleOption(bundleOption); - ANS_LOGE("no permission1222"); if (bundle == nullptr) { return ERR_ANS_INVALID_BUNDLE; } -- Gitee