diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-07-23 12:33:33 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-07-23 12:33:33 +0200 |
| commit | bf8a7deb69aa08dba68300ba9f4bcd1d78575bab (patch) | |
| tree | 1d26b829a289fc4612321882d22a221f92d54793 | |
| parent | f8e47dc57b4821e119104ba1c1223e32085d7174 (diff) | |
| parent | 0773b48bb32e94411607c752ad7fbcfb10f0dec3 (diff) | |
| download | mullvadvpn-bf8a7deb69aa08dba68300ba9f4bcd1d78575bab.tar.xz mullvadvpn-bf8a7deb69aa08dba68300ba9f4bcd1d78575bab.zip | |
Merge branch 'localize-notifications'
| -rw-r--r-- | ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift | 21 | ||||
| -rw-r--r-- | ios/MullvadVPN/en.lproj/Localizable.strings | 23 |
2 files changed, 26 insertions, 18 deletions
diff --git a/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift b/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift index bcf6a0c954..c0e89ce1a1 100644 --- a/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift +++ b/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift @@ -55,6 +55,15 @@ class AccountExpiryNotificationProvider: NotificationProvider, SystemNotificatio var notificationRequest: UNNotificationRequest? { guard let trigger = trigger else { return nil } + _ = NSLocalizedString( + "ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_TITLE", + comment: "Title for system account expiry notification, fired 3 days prior to account expiry." + ) + _ = NSLocalizedString( + "ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_BODY", + comment: "Message for system account expiry notification, fired 3 days prior to account expiry." + ) + let content = UNMutableNotificationContent() content.title = NSString.localizedUserNotificationString(forKey: "ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_TITLE", arguments: nil) content.body = NSString.localizedUserNotificationString(forKey: "ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_BODY", arguments: nil) @@ -100,8 +109,16 @@ class AccountExpiryNotificationProvider: NotificationProvider, SystemNotificatio return InAppNotificationDescriptor( identifier: self.identifier, style: .warning, - title: NSLocalizedString("ACCOUNT_EXPIRY_INAPP_NOTIFICATION_TITLE", comment: ""), - body: String(format: NSLocalizedString("ACCOUNT_EXPIRY_INAPP_NOTIFICATION_BODY", comment: ""), duration) + title: NSLocalizedString( + "ACCOUNT_EXPIRY_INAPP_NOTIFICATION_TITLE", + comment: "Title for in-app notification, displayed within the last 3 days until account expiry." + ), + body: String( + format: NSLocalizedString( + "ACCOUNT_EXPIRY_INAPP_NOTIFICATION_BODY", + comment: "Message for in-app notification, displayed within the last 3 days until account expiry." + ), duration + ) ) } diff --git a/ios/MullvadVPN/en.lproj/Localizable.strings b/ios/MullvadVPN/en.lproj/Localizable.strings index 45681aea70..8e6e69706c 100644 --- a/ios/MullvadVPN/en.lproj/Localizable.strings +++ b/ios/MullvadVPN/en.lproj/Localizable.strings @@ -1,20 +1,11 @@ -/* - Localizable.strings - MullvadVPN - - Created by pronebird on 31/05/2021. - Copyright © 2021 Mullvad VPN AB. All rights reserved. -*/ - -"HEADER_BAR_SETTINGS_BUTTON_ACCESSIBILITY_LABEL" = "Settings"; -"RECONNECT_BUTTON_ACCESSIBILITY_LABEL" = "Reconnect"; +/* Message for in-app notification, displayed within the last 3 days until account expiry. */ +"ACCOUNT_EXPIRY_INAPP_NOTIFICATION_BODY" = "%@ left. Buy more credit."; -"SELECT_LOCATION_COLLAPSE_ACCESSIBILITY_ACTION" = "Collapse location"; -"SELECT_LOCATION_EXPAND_ACCESSIBILITY_ACTION" = "Expand location"; +/* Title for in-app notification, displayed within the last 3 days until account expiry. */ +"ACCOUNT_EXPIRY_INAPP_NOTIFICATION_TITLE" = "ACCOUNT CREDIT EXPIRES SOON"; -"ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_TITLE" = "Account credit expires soon"; +/* Message for system account expiry notification, fired 3 days prior to account expiry. */ "ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_BODY" = "Account credit expires in 3 days. Buy more credit."; -"ACCOUNT_EXPIRY_INAPP_NOTIFICATION_TITLE" = "ACCOUNT CREDIT EXPIRES SOON"; -"ACCOUNT_EXPIRY_INAPP_NOTIFICATION_BODY" = "%@ left. Buy more credit."; -"ACCOUNT_INPUT_LOGIN_BUTTON_ACCESSIBILITY_LABEL" = "Log in"; +/* Title for system account expiry notification, fired 3 days prior to account expiry. */ +"ACCOUNT_EXPIRY_SYSTEM_NOTIFICATION_TITLE" = "Account credit expires soon"; |
