From d5abf4fb8620df6363c4721eacbaaea1d8a35bd4 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 28 Dec 2020 22:06:44 +0100 Subject: [PATCH] Improve poor wording in trusted networks --- Passepartout-iOS/Global/SwiftGen+Strings.swift | 2 +- Passepartout-iOS/Global/Theme.swift | 13 +++++++++++-- Passepartout-iOS/Global/de.lproj/App.strings | 2 +- Passepartout-iOS/Global/el.lproj/App.strings | 2 +- Passepartout-iOS/Global/en.lproj/App.strings | 2 +- Passepartout-iOS/Global/es.lproj/App.strings | 2 +- Passepartout-iOS/Global/fr.lproj/App.strings | 2 +- Passepartout-iOS/Global/it.lproj/App.strings | 2 +- Passepartout-iOS/Global/nl.lproj/App.strings | 2 +- Passepartout-iOS/Global/pl.lproj/App.strings | 2 +- Passepartout-iOS/Global/pt.lproj/App.strings | 2 +- Passepartout-iOS/Global/ru.lproj/App.strings | 2 +- Passepartout-iOS/Global/sv.lproj/App.strings | 2 +- Passepartout-iOS/Global/zh-Hans.lproj/App.strings | 2 +- Passepartout-iOS/Scenes/ServiceViewController.swift | 4 ++-- 15 files changed, 26 insertions(+), 17 deletions(-) diff --git a/Passepartout-iOS/Global/SwiftGen+Strings.swift b/Passepartout-iOS/Global/SwiftGen+Strings.swift index 72f8373b..b048dbac 100644 --- a/Passepartout-iOS/Global/SwiftGen+Strings.swift +++ b/Passepartout-iOS/Global/SwiftGen+Strings.swift @@ -146,7 +146,7 @@ internal enum L10n { } } internal enum TrustedAddWifi { - /// Add current Wi-Fi + /// Add Wi-Fi internal static let caption = L10n.tr("App", "service.cells.trusted_add_wifi.caption") } internal enum VpnService { diff --git a/Passepartout-iOS/Global/Theme.swift b/Passepartout-iOS/Global/Theme.swift index 0c529734..519c1b18 100644 --- a/Passepartout-iOS/Global/Theme.swift +++ b/Passepartout-iOS/Global/Theme.swift @@ -146,14 +146,23 @@ extension UILabel { } extension UITextField { - func applyHostTitle(_ theme: Theme) { - placeholder = L10n.Core.Global.Host.TitleInput.placeholder + func applyAlert(_ theme: Theme) { clearButtonMode = .always keyboardType = .default returnKeyType = .done autocapitalizationType = .none autocorrectionType = .no } + + func applyHostTitle(_ theme: Theme) { + applyAlert(theme) + placeholder = L10n.Core.Global.Host.TitleInput.placeholder + } + + func applyWiFiTitle(_ theme: Theme) { + applyAlert(theme) + placeholder = nil + } } extension UIActivityIndicatorView { diff --git a/Passepartout-iOS/Global/de.lproj/App.strings b/Passepartout-iOS/Global/de.lproj/App.strings index 42af42cc..850d039d 100644 --- a/Passepartout-iOS/Global/de.lproj/App.strings +++ b/Passepartout-iOS/Global/de.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Aktiviert"; "service.cells.provider.refresh.caption" = "Infrastruktur neu laden"; "service.cells.host.parameters.caption" = "Parameter"; -"service.cells.trusted_add_wifi.caption" = "Aktuelles WLAN hinzufügen"; +"service.cells.trusted_add_wifi.caption" = "WLAN hinzufügen"; "service.alerts.location.message.denied" = "Sie müssen den Standortzugriff zulassen, um diesem Wi-Fi-Netzwerk vertrauen zu können. Gehen Sie zu den iOS-Einstellungen und überprüfen Sie Ihre Standortberechtigungen für Passepartout."; "service.alerts.location.button.settings" = "Einstellungen"; diff --git a/Passepartout-iOS/Global/el.lproj/App.strings b/Passepartout-iOS/Global/el.lproj/App.strings index 1cef2bbb..5629c713 100644 --- a/Passepartout-iOS/Global/el.lproj/App.strings +++ b/Passepartout-iOS/Global/el.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Ενεργοποιήθηκε"; "service.cells.provider.refresh.caption" = "Ανανέωση της υποδομής"; "service.cells.host.parameters.caption" = "Παράμετροι"; -"service.cells.trusted_add_wifi.caption" = "Προσθέστε το τρέχον Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Προσθέστε Wi-Fi"; "service.alerts.location.message.denied" = "Πρέπει να επιτρέψετε τη πρόσβαση τοποθεσίας για να εμπιστευτείτε το Wi-Fi δίκτυο. Μεταβείτε στις ρυθμίσεις του iOS και επιθεωρείστε τις ρυθμίσεις για το Passepartout."; "service.alerts.location.button.settings" = "Ρυθμίσεις"; diff --git a/Passepartout-iOS/Global/en.lproj/App.strings b/Passepartout-iOS/Global/en.lproj/App.strings index 49c69a37..d680591b 100644 --- a/Passepartout-iOS/Global/en.lproj/App.strings +++ b/Passepartout-iOS/Global/en.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Enabled"; "service.cells.provider.refresh.caption" = "Refresh infrastructure"; "service.cells.host.parameters.caption" = "Parameters"; -"service.cells.trusted_add_wifi.caption" = "Add current Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Add Wi-Fi"; "service.alerts.location.message.denied" = "You must allow location access to trust this Wi-Fi network. Go to iOS settings and review your location permissions for Passepartout."; "service.alerts.location.button.settings" = "Settings"; diff --git a/Passepartout-iOS/Global/es.lproj/App.strings b/Passepartout-iOS/Global/es.lproj/App.strings index 457b0093..6f9ea0c6 100644 --- a/Passepartout-iOS/Global/es.lproj/App.strings +++ b/Passepartout-iOS/Global/es.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Habilitado"; "service.cells.provider.refresh.caption" = "Refrescar infraestructura"; "service.cells.host.parameters.caption" = "Parámetros"; -"service.cells.trusted_add_wifi.caption" = "Añadir Wi-Fi en uso"; +"service.cells.trusted_add_wifi.caption" = "Añadir Wi-Fi"; "service.alerts.location.message.denied" = "Debes dar acceso a tu posición para añadir esta red Wi-Fi a las redes de confianza. Mira los ajustes iOS y revisa los permisos de posición para Passepartout."; "service.alerts.location.button.settings" = "Ajustes"; diff --git a/Passepartout-iOS/Global/fr.lproj/App.strings b/Passepartout-iOS/Global/fr.lproj/App.strings index 43d68dbd..4c953822 100644 --- a/Passepartout-iOS/Global/fr.lproj/App.strings +++ b/Passepartout-iOS/Global/fr.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Activer"; "service.cells.provider.refresh.caption" = "Rafraîchir l'infrastructure"; "service.cells.host.parameters.caption" = "Paramètres"; -"service.cells.trusted_add_wifi.caption" = "Ajouter le présent Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Ajouter Wi-Fi"; "service.alerts.location.message.denied" = "Vous devez autoriser la localisation pour faire confiance à ce réseau WiFi. Acceptez les permissions de localisation pour Passepartout dans les réglages."; "service.alerts.location.button.settings" = "Réglages"; diff --git a/Passepartout-iOS/Global/it.lproj/App.strings b/Passepartout-iOS/Global/it.lproj/App.strings index bec8407b..3199eef7 100644 --- a/Passepartout-iOS/Global/it.lproj/App.strings +++ b/Passepartout-iOS/Global/it.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Abilitato"; "service.cells.provider.refresh.caption" = "Aggiorna infrastruttura"; "service.cells.host.parameters.caption" = "Parametri"; -"service.cells.trusted_add_wifi.caption" = "Aggiungi Wi-Fi corrente"; +"service.cells.trusted_add_wifi.caption" = "Aggiungi Wi-Fi"; "service.alerts.location.message.denied" = "Devi dare accesso alla tua posizione per aggiungere questa rete Wi-Fi alle reti sicure. Vai alle impostazioni iOS e verifica i permessi sulla posizione per Passepartout."; "service.alerts.location.button.settings" = "Impostazioni"; diff --git a/Passepartout-iOS/Global/nl.lproj/App.strings b/Passepartout-iOS/Global/nl.lproj/App.strings index eb515380..6e17d0b7 100644 --- a/Passepartout-iOS/Global/nl.lproj/App.strings +++ b/Passepartout-iOS/Global/nl.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Ingeschakeld"; "service.cells.provider.refresh.caption" = "Vernieuw de infrastructuur"; "service.cells.host.parameters.caption" = "Parameters"; -"service.cells.trusted_add_wifi.caption" = "Voeg huidige WiFi toe"; +"service.cells.trusted_add_wifi.caption" = "Wi-Fi toevoegen"; "service.alerts.location.message.denied" = "Om dit Wi-Fi netwerk te vertrouwen is toestemming tot locatie gegevens nodig. Ga naar Instellingen -> Privacy -> Locatievoorzieningen en check de locatie bevoegdheden voor Passepartout."; "service.alerts.location.button.settings" = "Instellingen"; diff --git a/Passepartout-iOS/Global/pl.lproj/App.strings b/Passepartout-iOS/Global/pl.lproj/App.strings index 39fade62..24547ef1 100644 --- a/Passepartout-iOS/Global/pl.lproj/App.strings +++ b/Passepartout-iOS/Global/pl.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Włączone"; "service.cells.provider.refresh.caption" = "Odśwież infrastrukturę"; "service.cells.host.parameters.caption" = "Parametry"; -"service.cells.trusted_add_wifi.caption" = "Dodaj obecnie połączoną sieć Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Dodaj Wi-Fi"; "service.alerts.location.message.denied" = "Musisz pozwolić na dostęp do lokalizacji żeby zaufać tej sieci Wi-Fi. Przejdź do ustawień prywatności i pozwól Passepartout na wykorzystywanie usług lokalizacji."; "service.alerts.location.button.settings" = "Ustawienia"; diff --git a/Passepartout-iOS/Global/pt.lproj/App.strings b/Passepartout-iOS/Global/pt.lproj/App.strings index 180d90b7..98853da8 100644 --- a/Passepartout-iOS/Global/pt.lproj/App.strings +++ b/Passepartout-iOS/Global/pt.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Ativado"; "service.cells.provider.refresh.caption" = "Atualizar infraestrutura"; "service.cells.host.parameters.caption" = "Parâmetros"; -"service.cells.trusted_add_wifi.caption" = "Adicionar Wi-Fi atual"; +"service.cells.trusted_add_wifi.caption" = "Adicionar Wi-Fi"; "service.alerts.location.message.denied" = "Você precisa autorizar o compartilhamento de localização. Acesse ajustes do iOS e verifique permissões de localização do Passepartout."; "service.alerts.location.button.settings" = "Ajustes"; diff --git a/Passepartout-iOS/Global/ru.lproj/App.strings b/Passepartout-iOS/Global/ru.lproj/App.strings index 3acef443..a83acac3 100644 --- a/Passepartout-iOS/Global/ru.lproj/App.strings +++ b/Passepartout-iOS/Global/ru.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Включен"; "service.cells.provider.refresh.caption" = "Обновить инфраструктуру"; "service.cells.host.parameters.caption" = "Параметры"; -"service.cells.trusted_add_wifi.caption" = "Добавить текущий Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Добавить Wi-Fi"; "service.alerts.location.message.denied" = "Вам нужно разрешить использование геопозиции для добавления этой Wi-Fi сети в доверенные. Перейдите в настройки iOS, и измените разрешения геолокации для Passepartout."; "service.alerts.location.button.settings" = "Настройки"; diff --git a/Passepartout-iOS/Global/sv.lproj/App.strings b/Passepartout-iOS/Global/sv.lproj/App.strings index 971e0586..5c0d5674 100644 --- a/Passepartout-iOS/Global/sv.lproj/App.strings +++ b/Passepartout-iOS/Global/sv.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "Aktiverad"; "service.cells.provider.refresh.caption" = "Uppdatera infrastruktur"; "service.cells.host.parameters.caption" = "Parametrar"; -"service.cells.trusted_add_wifi.caption" = "Lägg till nuvarande Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "Lägg till Wi-Fi"; "service.alerts.location.message.denied" = "Du måste tillåta lägetillgång för att förlita detta nätverk. Öppna iOS inställningar och se över tillstånd för Passepartout."; "service.alerts.location.button.settings" = "Inställningar"; diff --git a/Passepartout-iOS/Global/zh-Hans.lproj/App.strings b/Passepartout-iOS/Global/zh-Hans.lproj/App.strings index c17f40f1..ad57371e 100644 --- a/Passepartout-iOS/Global/zh-Hans.lproj/App.strings +++ b/Passepartout-iOS/Global/zh-Hans.lproj/App.strings @@ -39,7 +39,7 @@ "service.cells.vpn_service.caption" = "已启用"; "service.cells.provider.refresh.caption" = "刷新基础设置"; "service.cells.host.parameters.caption" = "参数"; -"service.cells.trusted_add_wifi.caption" = "添加当前的Wi-Fi"; +"service.cells.trusted_add_wifi.caption" = "新增Wi-Fi"; "service.alerts.location.message.denied" = "你必须允许位置访问以信任此Wi-Fi。请至iOS设置对Passepartout的位置权限。"; "service.alerts.location.button.settings" = "设置"; diff --git a/Passepartout-iOS/Scenes/ServiceViewController.swift b/Passepartout-iOS/Scenes/ServiceViewController.swift index 9d5f9e6e..c65a38a6 100644 --- a/Passepartout-iOS/Scenes/ServiceViewController.swift +++ b/Passepartout-iOS/Scenes/ServiceViewController.swift @@ -433,11 +433,11 @@ class ServiceViewController: UIViewController, StrongTableHost { let alert = UIAlertController.asAlert(L10n.Core.Service.Sections.Trusted.header, nil) alert.addTextField { (field) in field.text = Utils.currentWifiNetworkName() ?? "" - field.applyHostTitle(.current) + field.applyWiFiTitle(.current) field.delegate = self } alert.addCancelAction(L10n.Core.Global.cancel) - alert.addPreferredAction(L10n.Core.Global.ok) { + alert.addPreferredAction(L10n.App.Service.Cells.TrustedAddWifi.caption) { guard let wifi = alert.textFields?.first?.text else { return }