From 7b9cb67eb7aa3eadf99a5187d2ea79b83ab57380 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 5 Nov 2021 22:53:07 +0100 Subject: localize notification channel description for tor notifications --- .../java/se/leap/bitmaskclient/tor/TorNotificationManager.java | 9 +++++---- app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java index 45570857..c8bc0e2d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java @@ -75,15 +75,16 @@ public class TorNotificationManager { return null; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createNotificationChannel(notificationManager); + createNotificationChannel(context, notificationManager); } return notificationManager; } @TargetApi(26) - private static void createNotificationChannel(NotificationManager notificationManager) { - CharSequence name = "Bitmask Tor Service"; - String description = "Informs about usage of bridges to configure Bitmask."; + private static void createNotificationChannel(Context context, NotificationManager notificationManager) { + String appName = context.getString(R.string.app_name); + CharSequence name = context.getString(R.string.channel_name_tor_service, appName); + String description = context.getString(R.string.channel_description_tor_service, appName); NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL_NEWSTATUS_ID, name, NotificationManager.IMPORTANCE_LOW); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0b3d1d9b..dbaf0f0b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -174,6 +174,8 @@ Handshake finished with a relay to build circuits Establishing a Tor circuit Running + %s Bridges Service + Informs about usage of bridges while configuring %s. -- cgit v1.2.3