diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-07-08 11:48:45 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-07-14 14:24:56 +0200 |
| commit | d55ea2539839660e9d9d9c8338615c1329a45c21 (patch) | |
| tree | 37603d58cd0074c8beb2acb94496e4bfe04e83c1 | |
| parent | e450627e750c02162de8992eacca2f0c3ef8083c (diff) | |
| download | mullvadvpn-d55ea2539839660e9d9d9c8338615c1329a45c21.tar.xz mullvadvpn-d55ea2539839660e9d9d9c8338615c1329a45c21.zip | |
Localize ConnectionPanel
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 12 | ||||
| -rw-r--r-- | ios/MullvadVPN/ConnectionPanelView.swift | 42 | ||||
| -rw-r--r-- | ios/MullvadVPN/en.lproj/ConnectionPanel.strings | 20 | ||||
| -rw-r--r-- | ios/MullvadVPN/en.lproj/Localizable.strings | 8 |
4 files changed, 67 insertions, 15 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index ce7f089fc0..107af7f8fe 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -220,6 +220,7 @@ 58F3C0A4249CB069003E76BE /* HeaderBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F3C0A3249CB069003E76BE /* HeaderBarView.swift */; }; 58F3C0A624A50157003E76BE /* relays.json in Resources */ = {isa = PBXBuildFile; fileRef = 58F3C0A524A50155003E76BE /* relays.json */; }; 58F3C0A724A50C02003E76BE /* relays.json in Resources */ = {isa = PBXBuildFile; fileRef = 58F3C0A524A50155003E76BE /* relays.json */; }; + 58F5590F2697002100F630D0 /* ConnectionPanel.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559072697002100F630D0 /* ConnectionPanel.strings */; }; 58F61F4F2692F21C00DCFC2B /* WireguardKeys.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */; }; 58F7CA882692E34000FC59FD /* WireguardKeysContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F7CA872692E34000FC59FD /* WireguardKeysContentView.swift */; }; 58F840AF2464382C0044E708 /* KeychainItemRevision.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F840AE2464382C0044E708 /* KeychainItemRevision.swift */; }; @@ -434,6 +435,7 @@ 58F19E34228C15BA00C7710B /* SpinnerActivityIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpinnerActivityIndicatorView.swift; sourceTree = "<group>"; }; 58F3C0A3249CB069003E76BE /* HeaderBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderBarView.swift; sourceTree = "<group>"; }; 58F3C0A524A50155003E76BE /* relays.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = relays.json; sourceTree = "<group>"; }; + 58F559082697002100F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/ConnectionPanel.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>"; }; 58F840AE2464382C0044E708 /* KeychainItemRevision.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainItemRevision.swift; sourceTree = "<group>"; }; @@ -539,6 +541,7 @@ isa = PBXGroup; children = ( 582CFEE526945FC30072883A /* AppStoreSubscriptions.strings */, + 58F559072697002100F630D0 /* ConnectionPanel.strings */, 587B7543266922BF00DEF7E9 /* Localizable.strings */, 58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */, ); @@ -947,6 +950,7 @@ 58F3C0A624A50157003E76BE /* relays.json in Resources */, 58727283265D173C00F315B2 /* LaunchScreen.storyboard in Resources */, 586ADD4723FC13F400CE9E87 /* countries.geo.json in Resources */, + 58F5590F2697002100F630D0 /* ConnectionPanel.strings in Resources */, 58CE5E6B224146210008646E /* Assets.xcassets in Resources */, 5883A09E266A5AF7003EFFCB /* Localizable.strings in Resources */, 582CFEE726945FC30072883A /* AppStoreSubscriptions.strings in Resources */, @@ -1264,6 +1268,14 @@ name = Localizable.strings; sourceTree = "<group>"; }; + 58F559072697002100F630D0 /* ConnectionPanel.strings */ = { + isa = PBXVariantGroup; + children = ( + 58F559082697002100F630D0 /* en */, + ); + name = ConnectionPanel.strings; + sourceTree = "<group>"; + }; 58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/ios/MullvadVPN/ConnectionPanelView.swift b/ios/MullvadVPN/ConnectionPanelView.swift index e552d6148f..06f4681f06 100644 --- a/ios/MullvadVPN/ConnectionPanelView.swift +++ b/ios/MullvadVPN/ConnectionPanelView.swift @@ -31,7 +31,11 @@ class ConnectionPanelView: UIView { var connectedRelayName: String = "" { didSet { collapseButton.setTitle(connectedRelayName, for: .normal) - collapseButton.accessibilityLabel = NSLocalizedString("CONNECTION_PANEL_RELAY_ACCESSIBILITY_LABEL", comment: "") + collapseButton.accessibilityLabel = NSLocalizedString( + "RELAY_ACCESSIBILITY_LABEL", + tableName: "ConnectionPanel", + comment: "" + ) collapseButton.accessibilityAttributedValue = NSAttributedString( string: connectedRelayName.replacingOccurrences(of: "-wireguard", with: " WireGuard"), attributes: [ .accessibilitySpeechLanguage: "en" ] @@ -71,11 +75,27 @@ class ConnectionPanelView: UIView { // TODO: Unhide it when we have out address outAddressRow.isHidden = true - inAddressRow.textLabel.text = NSLocalizedString("CONNECTION_PANEL_IN_ADDRESS_LABEL", comment: "") - outAddressRow.textLabel.text = NSLocalizedString("CONNECTION_PANEL_OUT_ADDRESS_LABEL", comment: "") + inAddressRow.textLabel.text = NSLocalizedString( + "IN_ADDRESS_LABEL", + tableName: "ConnectionPanel", + comment: "" + ) + outAddressRow.textLabel.text = NSLocalizedString( + "OUT_ADDRESS_LABEL", + tableName: "ConnectionPanel", + comment: "" + ) - inAddressRow.accessibilityLabel = NSLocalizedString("CONNECTION_PANEL_IN_ADDRESS_ACCESSIBILITY_LABEL", comment: "") - outAddressRow.accessibilityLabel = NSLocalizedString("CONNECTION_PANEL_OUT_ADDRESS_ACCESSIBILITY_LABEL", comment: "") + inAddressRow.accessibilityLabel = NSLocalizedString( + "IN_ADDRESS_ACCESSIBILITY_LABEL", + tableName: "ConnectionPanel", + comment: "" + ) + outAddressRow.accessibilityLabel = NSLocalizedString( + "OUT_ADDRESS_ACCESSIBILITY_LABEL", + tableName: "ConnectionPanel", + comment: "" + ) addSubview(collapseButton) addSubview(stackView) @@ -136,9 +156,17 @@ class ConnectionPanelView: UIView { private func updateCollapseButtonAccessibilityHint() { if showsConnectionInfo { - collapseButton.accessibilityHint = NSLocalizedString("CONNECTION_PANEL_COLLAPSE_BUTTON_ACCESSIBILITY_HINT", comment: "") + collapseButton.accessibilityHint = NSLocalizedString( + "COLLAPSE_BUTTON_ACCESSIBILITY_HINT", + tableName: "ConnectionPanel", + comment: "" + ) } else { - collapseButton.accessibilityHint = NSLocalizedString("CONNECTION_PANEL_EXPAND_BUTTON_ACCESSIBILITY_HINT", comment: "") + collapseButton.accessibilityHint = NSLocalizedString( + "EXPAND_BUTTON_ACCESSIBILITY_HINT", + tableName: "ConnectionPanel", + comment: "" + ) } } } diff --git a/ios/MullvadVPN/en.lproj/ConnectionPanel.strings b/ios/MullvadVPN/en.lproj/ConnectionPanel.strings new file mode 100644 index 0000000000..4dad9f2763 --- /dev/null +++ b/ios/MullvadVPN/en.lproj/ConnectionPanel.strings @@ -0,0 +1,20 @@ +/* No comment provided by engineer. */ +"COLLAPSE_BUTTON_ACCESSIBILITY_HINT" = "Double tap to collapse the connection info panel."; + +/* No comment provided by engineer. */ +"EXPAND_BUTTON_ACCESSIBILITY_HINT" = "Double tap to expand the connection info panel."; + +/* No comment provided by engineer. */ +"IN_ADDRESS_ACCESSIBILITY_LABEL" = "Input IP address"; + +/* No comment provided by engineer. */ +"IN_ADDRESS_LABEL" = "In"; + +/* No comment provided by engineer. */ +"OUT_ADDRESS_ACCESSIBILITY_LABEL" = "Output IP address"; + +/* No comment provided by engineer. */ +"OUT_ADDRESS_LABEL" = "Out"; + +/* No comment provided by engineer. */ +"RELAY_ACCESSIBILITY_LABEL" = "Connected relay"; diff --git a/ios/MullvadVPN/en.lproj/Localizable.strings b/ios/MullvadVPN/en.lproj/Localizable.strings index 858888d92a..0e83a02148 100644 --- a/ios/MullvadVPN/en.lproj/Localizable.strings +++ b/ios/MullvadVPN/en.lproj/Localizable.strings @@ -16,11 +16,3 @@ "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."; - -"CONNECTION_PANEL_RELAY_ACCESSIBILITY_LABEL" = "Connected relay"; -"CONNECTION_PANEL_COLLAPSE_BUTTON_ACCESSIBILITY_HINT" = "Double tap to collapse the connection info panel."; -"CONNECTION_PANEL_EXPAND_BUTTON_ACCESSIBILITY_HINT" = "Double tap to expand the connection info panel."; -"CONNECTION_PANEL_IN_ADDRESS_LABEL" = "In"; -"CONNECTION_PANEL_IN_ADDRESS_ACCESSIBILITY_LABEL" = "Input IP address"; -"CONNECTION_PANEL_OUT_ADDRESS_LABEL" = "Out"; -"CONNECTION_PANEL_OUT_ADDRESS_ACCESSIBILITY_LABEL" = "Output IP address"; |
