From 0aed17c6b540f30b0497e5acebe171cb522a79a1 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Fri, 17 Jun 2022 10:58:45 +1000 Subject: [PATCH] feat: localise emoji reacts notification --- Session/Meta/Translations/en.lproj/Localizable.strings | 1 + Session/Notifications/AppNotifications.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index cae2d7c49..affc443b3 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -669,3 +669,4 @@ "EMOJI_CATEGORY_SYMBOLS_NAME" = "Symbols"; /* The name for the emoji category 'Travel & Places' */ "EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places"; +"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@"; diff --git a/Session/Notifications/AppNotifications.swift b/Session/Notifications/AppNotifications.swift index 85ec828ec..0fb20102d 100644 --- a/Session/Notifications/AppNotifications.swift +++ b/Session/Notifications/AppNotifications.swift @@ -313,7 +313,7 @@ public class NotificationPresenter: NSObject, NotificationsProtocol { let senderName = Storage.shared.getContact(with: sender, using: transaction)?.displayName(for: context) ?? sender let notificationTitle = "Session" - var notificationBody = "\(senderName) reacts to a message with \(emoji)" + var notificationBody = String(format: "EMOJI_REACTS_NOTIFICATION".localized(), senderName, emoji) switch previewType { case .namePreview: break default: notificationBody = NotificationStrings.incomingMessageBody