summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-07-21 12:20:20 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-07-21 12:20:20 +0200
commitebd44f96e9d09fb36a134b4e6baa6a7f21532268 (patch)
treeb355ca9e9ff7adeed178b1c507b8e79dccb2ae92
parentdcacfc47e33073ed2cb7d29cfd47fd45eec818df (diff)
parentaa632267edddd7eb1af0bf401f26ba05055377b7 (diff)
downloadmullvadvpn-ebd44f96e9d09fb36a134b4e6baa6a7f21532268.tar.xz
mullvadvpn-ebd44f96e9d09fb36a134b4e6baa6a7f21532268.zip
Merge branch 'localize-prefs'
-rw-r--r--ios/MullvadVPN.xcodeproj/project.pbxproj12
-rw-r--r--ios/MullvadVPN/PreferencesViewController.swift6
-rw-r--r--ios/MullvadVPN/en.lproj/Preferences.strings8
3 files changed, 23 insertions, 3 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj
index 77637d68fd..2a05e00c70 100644
--- a/ios/MullvadVPN.xcodeproj/project.pbxproj
+++ b/ios/MullvadVPN.xcodeproj/project.pbxproj
@@ -223,6 +223,7 @@
58F3C0A624A50157003E76BE /* relays.json in Resources */ = {isa = PBXBuildFile; fileRef = 58F3C0A524A50155003E76BE /* relays.json */; };
58F3C0A724A50C02003E76BE /* relays.json in Resources */ = {isa = PBXBuildFile; fileRef = 58F3C0A524A50155003E76BE /* relays.json */; };
58F558DD2695B85E00F630D0 /* Consent.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F558DB2695B85E00F630D0 /* Consent.strings */; };
+ 58F558E32695D1D800F630D0 /* Preferences.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F558E12695D1D800F630D0 /* Preferences.strings */; };
58F5590E2697002100F630D0 /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559052697002000F630D0 /* Main.strings */; };
58F5590F2697002100F630D0 /* ConnectionPanel.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F559072697002100F630D0 /* ConnectionPanel.strings */; };
58F61F4F2692F21C00DCFC2B /* WireguardKeys.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */; };
@@ -442,6 +443,7 @@
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>"; };
58F558DC2695B85E00F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Consent.strings; sourceTree = "<group>"; };
+ 58F558E22695D1D800F630D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Preferences.strings; sourceTree = "<group>"; };
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>"; };
58F61F4E2692F21C00DCFC2B /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/WireguardKeys.strings; sourceTree = "<group>"; };
@@ -555,6 +557,7 @@
587B7543266922BF00DEF7E9 /* Localizable.strings */,
58F559052697002000F630D0 /* Main.strings */,
582CFEE8269463B80072883A /* Settings.strings */,
+ 58F558E12695D1D800F630D0 /* Preferences.strings */,
58F61F4D2692F21C00DCFC2B /* WireguardKeys.strings */,
);
name = Localizations;
@@ -967,6 +970,7 @@
58F5590F2697002100F630D0 /* ConnectionPanel.strings in Resources */,
58CE5E6B224146210008646E /* Assets.xcassets in Resources */,
5883A09E266A5AF7003EFFCB /* Localizable.strings in Resources */,
+ 58F558E32695D1D800F630D0 /* Preferences.strings in Resources */,
582CFEE726945FC30072883A /* AppStoreSubscriptions.strings in Resources */,
584789B8264D4A2A000E45FB /* old_le_root_cert.cer in Resources */,
584789BE264D4A2A000E45FB /* new_le_root_cert.cer in Resources */,
@@ -1309,6 +1313,14 @@
name = Consent.strings;
sourceTree = "<group>";
};
+ 58F558E12695D1D800F630D0 /* Preferences.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 58F558E22695D1D800F630D0 /* en */,
+ );
+ name = Preferences.strings;
+ sourceTree = "<group>";
+ };
58F559052697002000F630D0 /* Main.strings */ = {
isa = PBXVariantGroup;
children = (
diff --git a/ios/MullvadVPN/PreferencesViewController.swift b/ios/MullvadVPN/PreferencesViewController.swift
index 756f44f4cc..a1fb0cd2d4 100644
--- a/ios/MullvadVPN/PreferencesViewController.swift
+++ b/ios/MullvadVPN/PreferencesViewController.swift
@@ -44,7 +44,7 @@ class PreferencesViewController: UITableViewController, TunnelObserver {
tableView.register(SettingsSwitchCell.self, forCellReuseIdentifier: CellIdentifier.switchCell.rawValue)
tableView.register(EmptyTableViewHeaderFooterView.self, forHeaderFooterViewReuseIdentifier: EmptyTableViewHeaderFooterView.reuseIdentifier)
- navigationItem.title = NSLocalizedString("Preferences", comment: "Navigation title")
+ navigationItem.title = NSLocalizedString("NAVIGATION_TITLE", tableName: "Preferences", comment: "Navigation title")
navigationItem.largeTitleDisplayMode = .always
TunnelManager.shared.addObserver(self)
@@ -74,7 +74,7 @@ class PreferencesViewController: UITableViewController, TunnelObserver {
let blockAdvertisingRow = StaticTableViewRow(reuseIdentifier: CellIdentifier.switchCell.rawValue) { (indexPath, cell) in
let cell = cell as! SettingsSwitchCell
- cell.titleLabel.text = NSLocalizedString("Block ads", comment: "")
+ cell.titleLabel.text = NSLocalizedString("BLOCK_ADS_CELL_LABEL", tableName: "Preferences", comment: "")
cell.setOn(self.dnsSettings?.blockAdvertising ?? false, animated: false)
cell.action = { [weak self] (isOn) in
self?.dnsSettings?.blockAdvertising = isOn
@@ -86,7 +86,7 @@ class PreferencesViewController: UITableViewController, TunnelObserver {
let blockTrackingRow = StaticTableViewRow(reuseIdentifier: CellIdentifier.switchCell.rawValue) { (indexPath, cell) in
let cell = cell as! SettingsSwitchCell
- cell.titleLabel.text = NSLocalizedString("Block trackers", comment: "")
+ cell.titleLabel.text = NSLocalizedString("BLOCK_TRACKERS_CELL_LABEL", tableName: "Preferences", comment: "")
cell.setOn(self.dnsSettings?.blockTracking ?? false, animated: false)
cell.action = { [weak self] (isOn) in
self?.dnsSettings?.blockTracking = isOn
diff --git a/ios/MullvadVPN/en.lproj/Preferences.strings b/ios/MullvadVPN/en.lproj/Preferences.strings
new file mode 100644
index 0000000000..7f70361f6c
--- /dev/null
+++ b/ios/MullvadVPN/en.lproj/Preferences.strings
@@ -0,0 +1,8 @@
+/* No comment provided by engineer. */
+"BLOCK_ADS_CELL_LABEL" = "Block ads";
+
+/* No comment provided by engineer. */
+"BLOCK_TRACKERS_CELL_LABEL" = "Block trackers";
+
+/* Navigation title */
+"NAVIGATION_TITLE" = "Preferences";