diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-07-08 11:45:49 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-07-22 13:07:43 +0200 |
| commit | 26f54dc5d735ba241ae1f6cd97c44aab766859bb (patch) | |
| tree | 7b371cfca1d71d7d5b78c9f72f06466f2b9a668a | |
| parent | e585d90d848603c0acb28878b5a558abe8087d55 (diff) | |
| download | mullvadvpn-26f54dc5d735ba241ae1f6cd97c44aab766859bb.tar.xz mullvadvpn-26f54dc5d735ba241ae1f6cd97c44aab766859bb.zip | |
Localize AppDelegate
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 12 | ||||
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 23 | ||||
| -rw-r--r-- | ios/MullvadVPN/en.lproj/AppDelegate.strings | 8 |
3 files changed, 40 insertions, 3 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index 75545d34e5..a6ac958069 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -235,6 +235,7 @@ 58F5590E2697002100F630D0 /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559052697002000F630D0 /* Main.strings */; }; 58F5590F2697002100F630D0 /* ConnectionPanel.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559072697002100F630D0 /* ConnectionPanel.strings */; }; 58F558FE2696F09100F630D0 /* KeyboardNavigation.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F558FC2696F09100F630D0 /* KeyboardNavigation.strings */; }; + 58F5590C2697002100F630D0 /* AppDelegate.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559012697002000F630D0 /* AppDelegate.strings */; }; 58F5590D2697002100F630D0 /* AccountInput.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559032697002000F630D0 /* AccountInput.strings */; }; 58F61F4F2692F21C00DCFC2B /* WireguardKeys.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */; }; 58F7CA882692E34000FC59FD /* WireguardKeysContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F7CA872692E34000FC59FD /* WireguardKeysContentView.swift */; }; @@ -465,6 +466,7 @@ 58F559062697002000F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; }; 58F559082697002100F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/ConnectionPanel.strings; sourceTree = "<group>"; }; 58F558FD2696F09100F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/KeyboardNavigation.strings; sourceTree = "<group>"; }; + 58F559022697002000F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AppDelegate.strings; sourceTree = "<group>"; }; 58F559042697002000F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AccountInput.strings; sourceTree = "<group>"; }; 58F61F4E2692F21C00DCFC2B /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/WireguardKeys.strings; sourceTree = "<group>"; }; 58F7CA872692E34000FC59FD /* WireguardKeysContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireguardKeysContentView.swift; sourceTree = "<group>"; }; @@ -572,6 +574,7 @@ children = ( 581FC4F82695ACE100AA97BA /* Account.strings */, 58F559032697002000F630D0 /* AccountInput.strings */, + 58F559012697002000F630D0 /* AppDelegate.strings */, 58F558F72696EB1C00F630D0 /* AppStorePaymentManager.strings */, 582CFEE526945FC30072883A /* AppStoreSubscriptions.strings */, 58F559072697002100F630D0 /* ConnectionPanel.strings */, @@ -1015,6 +1018,7 @@ 58F61F4F2692F21C00DCFC2B /* WireguardKeys.strings in Resources */, 58F5590E2697002100F630D0 /* Main.strings in Resources */, 58F558FE2696F09100F630D0 /* KeyboardNavigation.strings in Resources */, + 58F5590C2697002100F630D0 /* AppDelegate.strings in Resources */, 581FC4FA2695ACE100AA97BA /* Account.strings in Resources */, 58F558EC2695D26A00F630D0 /* MullvadRest.strings in Resources */, 582CFEEA269463B80072883A /* Settings.strings in Resources */, @@ -1449,6 +1453,14 @@ name = KeyboardNavigation.strings; sourceTree = "<group>"; }; + 58F559012697002000F630D0 /* AppDelegate.strings */ = { + isa = PBXVariantGroup; + children = ( + 58F559022697002000F630D0 /* en */, + ); + name = AppDelegate.strings; + sourceTree = "<group>"; + }; 58F559032697002000F630D0 /* AccountInput.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index 4f7990d636..c240b4ddf0 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -544,7 +544,12 @@ extension AppDelegate: ConnectViewControllerDelegate { case .failure(let error): self.logger?.error(chainedError: error, message: "Failed to start the VPN tunnel") - self.presentTunnelError(error, alertTitle: NSLocalizedString("Failed to start the VPN tunnel", comment: "")) + self.presentTunnelError(error, alertTitle: NSLocalizedString( + "START_VPN_TUNNEL_ERROR_ALERT_TITLE", + tableName: "AppDelegate", + value: "Failed to start the VPN tunnel", + comment: "" + )) } } } @@ -558,7 +563,12 @@ extension AppDelegate: ConnectViewControllerDelegate { case .failure(let error): self.logger?.error(chainedError: error, message: "Failed to stop the VPN tunnel") - self.presentTunnelError(error, alertTitle: NSLocalizedString("Failed to stop the VPN tunnel", comment: "")) + self.presentTunnelError(error, alertTitle: NSLocalizedString( + "STOP_VPN_TUNNEL_ERROR_ALERT_TITLE", + tableName: "AppDelegate", + value: "Failed to stop the VPN tunnel", + comment: "" + )) } } } @@ -576,7 +586,14 @@ extension AppDelegate: ConnectViewControllerDelegate { preferredStyle: .alert ) alertController.addAction( - UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .cancel) + UIAlertAction( + title: NSLocalizedString( + "TUNNEL_ERROR_ALERT_OK_BUTTON", + tableName: "AppDelegate", + comment: "Dismiss button in tunnel error alert." + ), + style: .cancel + ) ) self.alertPresenter.enqueue(alertController, presentingController: self.rootContainer!) diff --git a/ios/MullvadVPN/en.lproj/AppDelegate.strings b/ios/MullvadVPN/en.lproj/AppDelegate.strings new file mode 100644 index 0000000000..4b22937c5a --- /dev/null +++ b/ios/MullvadVPN/en.lproj/AppDelegate.strings @@ -0,0 +1,8 @@ +/* No comment provided by engineer. */ +"START_VPN_TUNNEL_ERROR_ALERT_TITLE" = "Failed to start the VPN tunnel"; + +/* No comment provided by engineer. */ +"STOP_VPN_TUNNEL_ERROR_ALERT_TITLE" = "Failed to stop the VPN tunnel"; + +/* Dismiss button in tunnel error alert. */ +"TUNNEL_ERROR_ALERT_OK_BUTTON" = "OK"; |
