diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Activity/RuuviLogo/View/ActivityPresenterView.swift b/Common/RuuviPresenters/Sources/RuuviPresenters/Activity/RuuviLogo/View/ActivityPresenterView.swift index a5430f308..16df14e25 100644 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Activity/RuuviLogo/View/ActivityPresenterView.swift +++ b/Common/RuuviPresenters/Sources/RuuviPresenters/Activity/RuuviLogo/View/ActivityPresenterView.swift @@ -1,11 +1,8 @@ +import RuuviLocalization import SwiftUI import UIKit private enum ActivityPresenterAssets { - static let activityOngoingDefault = "activity_ongoing_generic" - static let activitySuccessDefault = "activity_success_generic" - static let activityFailedDefault = "activity_failed_generic" - static let activityLogoRuuvi = "ruuvi_activity_presenter_logo" } @@ -84,25 +81,22 @@ struct ActivityPresenterContentView: View { if let message { message } else { - ActivityPresenterAssets - .activityOngoingDefault - .localized(for: ActivityPresenterViewProvider.self) + RuuviLocalization + .activityOngoingGeneric } case let .success(message): if let message { message } else { - ActivityPresenterAssets - .activitySuccessDefault - .localized(for: ActivityPresenterViewProvider.self) + RuuviLocalization + .activitySuccessGeneric } case let .failed(message): if let message { message } else { - ActivityPresenterAssets - .activityFailedDefault - .localized(for: ActivityPresenterViewProvider.self) + RuuviLocalization + .activityFailedGeneric } case .dismiss: "" // Placeholder for dismiss state diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Error/Alert/ErrorPresenterAlert.swift b/Common/RuuviPresenters/Sources/RuuviPresenters/Error/Alert/ErrorPresenterAlert.swift index 2c217c1d2..61ef977af 100644 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Error/Alert/ErrorPresenterAlert.swift +++ b/Common/RuuviPresenters/Sources/RuuviPresenters/Error/Alert/ErrorPresenterAlert.swift @@ -1,3 +1,4 @@ +import RuuviLocalization import UIKit public final class ErrorPresenterAlert: ErrorPresenter { @@ -8,13 +9,13 @@ public final class ErrorPresenterAlert: ErrorPresenter { } private func presentAlert(error: Error) { - var title: String? = "ErrorPresenterAlert.Error".localized(for: Self.self) + var title: String? = RuuviLocalization.ErrorPresenterAlert.error if let localizedError = error as? LocalizedError { - title = localizedError.failureReason ?? "ErrorPresenterAlert.Error".localized(for: Self.self) + title = localizedError.failureReason ?? RuuviLocalization.ErrorPresenterAlert.error } let alert = UIAlertController(title: title, message: error.localizedDescription, preferredStyle: .alert) let action = UIAlertAction( - title: "ErrorPresenterAlert.OK".localized(for: Self.self), + title: RuuviLocalization.ErrorPresenterAlert.ok, style: .cancel, handler: nil ) diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Permission/Alert/PermissionPresenterAlert.swift b/Common/RuuviPresenters/Sources/RuuviPresenters/Permission/Alert/PermissionPresenterAlert.swift index 39665620e..15de129b0 100644 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Permission/Alert/PermissionPresenterAlert.swift +++ b/Common/RuuviPresenters/Sources/RuuviPresenters/Permission/Alert/PermissionPresenterAlert.swift @@ -1,33 +1,34 @@ +import RuuviLocalization import UIKit public final class PermissionPresenterAlert: PermissionPresenter { public init() {} public func presentNoPhotoLibraryPermission() { - let message = "PermissionPresenter.NoPhotoLibraryAccess.message".localized(for: Self.self) + let message = RuuviLocalization.PermissionPresenter.NoPhotoLibraryAccess.message presentAlert(with: message) } public func presentNoCameraPermission() { - let message = "PermissionPresenter.NoCameraAccess.message".localized(for: Self.self) + let message = RuuviLocalization.PermissionPresenter.NoCameraAccess.message presentAlert(with: message) } public func presentNoLocationPermission() { - let message = "PermissionPresenter.NoLocationAccess.message".localized(for: Self.self) + let message = RuuviLocalization.PermissionPresenter.NoLocationAccess.message presentAlert(with: message) } public func presentNoPushNotificationsPermission() { - let message = "PermissionPresenter.NoPushNotificationsPermission.message".localized(for: Self.self) + let message = RuuviLocalization.PermissionPresenter.NoPushNotificationsPermission.message presentAlert(with: message) } private func presentAlert(with message: String) { guard let viewController = UIApplication.shared.topViewController() else { return } let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert) - let cancel = UIAlertAction(title: "Cancel".localized(for: Self.self), style: .cancel, handler: nil) - let actionTitle = "PermissionPresenter.settings".localized(for: Self.self) + let cancel = UIAlertAction(title: RuuviLocalization.cancel, style: .cancel, handler: nil) + let actionTitle = RuuviLocalization.PermissionPresenter.settings let settings = UIAlertAction(title: actionTitle, style: .default) { _ in if let settingsUrl = URL(string: UIApplication.openSettingsURLString) { UIApplication.shared.open(settingsUrl, options: [:]) diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/de.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/de.lproj/RuuviPresenters.strings deleted file mode 100644 index 8c6a6e367..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/de.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Fehler"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Ruuvi Station muss auf Ihre Kamera zugreifen, um diese Funktion zu aktivieren."; -"PermissionPresenter.NoCameraAccess.message" = "Ruuvi Station muss auf Ihre Kamera zugreifen, um diese Funktion zu aktivieren."; -"PermissionPresenter.NoLocationAccess.message" = "Ruuvi Station muss auf Ihren Standort zugreifen, um diese Funktion zu aktivieren."; -"PermissionPresenter.settings" = "Einstellungen"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Ruuvi Station benötigt die Berechtigung für Push-Benachrichtigungen, um diese Funktion zu aktivieren"; -"Cancel" = "Abbrechen"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/en.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/en.lproj/RuuviPresenters.strings deleted file mode 100644 index f06d8f267..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/en.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Error"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Ruuvi Station needs to access your camera roll to enable this feature."; -"PermissionPresenter.NoCameraAccess.message" = "Ruuvi Station needs to access your camera to enable this feature."; -"PermissionPresenter.NoLocationAccess.message" = "Ruuvi Station needs to access your location to enable this feature."; -"PermissionPresenter.settings" = "Settings"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Ruuvi Station needs Push Notifications permission to enable this feature"; -"Cancel" = "Cancel"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fi.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fi.lproj/RuuviPresenters.strings deleted file mode 100644 index 97a76334a..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fi.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Virhe"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Tämä ominaisuus vaatii oikeuden gallerian käyttöön."; -"PermissionPresenter.NoCameraAccess.message" = "Tämä ominaisuus vaatii oikeuden kameran käyttöön."; -"PermissionPresenter.NoLocationAccess.message" = "Tämä ominaisuus vaatii oikeuden paikkatiedon käyttöön."; -"PermissionPresenter.settings" = "Asetukset"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Tämä ominaisuus vaatii oikeuden palveluilmoitusten näyttämiseen."; -"Cancel" = "Peruuta"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fr.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fr.lproj/RuuviPresenters.strings deleted file mode 100644 index af478a56a..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/fr.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Erreur"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Veuillez autoriser l'accès aux fichiers multimédias de votre appareil."; -"PermissionPresenter.NoCameraAccess.message" = "Veuillez autoriser l'accès à l'appareil photo."; -"PermissionPresenter.NoLocationAccess.message" = "Veuillez autoriser l'accès aux services de géolocalisation."; -"PermissionPresenter.settings" = "Réglages"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Veuillez autoriser les notifications dans les réglages de l'appareil."; -"Cancel" = "Annuler"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/ru.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/ru.lproj/RuuviPresenters.strings deleted file mode 100644 index f5c97052c..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/ru.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Ошибка"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Ruuvi Station необходим доступ к вашей библиотеке фотографий для того, чтобы использовать эту функцию."; -"PermissionPresenter.NoCameraAccess.message" = "Ruuvi Station нужен доступ к камере для того, чтобы использовать эту функцию."; -"PermissionPresenter.NoLocationAccess.message" = "Ruuvi Station необходим доступ к геолокационным сервисам для того, чтобы использовать эту функцию."; -"PermissionPresenter.settings" = "Настройки"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Ruuvi Station необходим доступ к уведомлениям для того, чтобы использовать эту функцию"; -"Cancel" = "Отмена"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/sv.lproj/RuuviPresenters.strings b/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/sv.lproj/RuuviPresenters.strings deleted file mode 100644 index 1fb12d7d6..000000000 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Resources/sv.lproj/RuuviPresenters.strings +++ /dev/null @@ -1,11 +0,0 @@ -"ErrorPresenterAlert.Error" = "Fel"; -"ErrorPresenterAlert.OK" = "OK"; -"PermissionPresenter.NoPhotoLibraryAccess.message" = "Ruuvi Station behöver tillgång till dina bilder för att använda den här funktionen."; -"PermissionPresenter.NoCameraAccess.message" = "Ruuvi Station behöver tillgång kameran för att använda den här funktionen."; -"PermissionPresenter.NoLocationAccess.message" = "Ruuvi Station behöver tillgång till din plats för att använda den här funktionen."; -"PermissionPresenter.settings" = "Inställningar"; -"PermissionPresenter.NoPushNotificationsPermission.message" = "Ruuvi Station behöver behörighett ill Push-meddelanden för att aktivera den här funktionen."; -"Cancel" = "Avbryt"; -"activity_ongoing_generic" = "Please wait..."; -"activity_success_generic" = "Operation successful."; -"activity_failed_generic" = "Operation failed."; diff --git a/Common/RuuviPresenters/Sources/RuuviPresenters/Util/RuuviBundleUtils.swift b/Common/RuuviPresenters/Sources/RuuviPresenters/Util/RuuviBundleUtils.swift index 19876bf35..d0385bb30 100644 --- a/Common/RuuviPresenters/Sources/RuuviPresenters/Util/RuuviBundleUtils.swift +++ b/Common/RuuviPresenters/Sources/RuuviPresenters/Util/RuuviBundleUtils.swift @@ -35,40 +35,6 @@ public extension UIImage { } } -extension String { - public func localized(for clazz: AnyClass) -> String { - let bundle: Bundle - #if SWIFT_PACKAGE - bundle = Bundle.module - #else - bundle = Bundle.pod(clazz) - #endif - if let module = NSStringFromClass(clazz).components(separatedBy: ".").first { - if let path = bundle.path(forResource: currentLanguage(), ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else if let path = bundle.path(forResource: "Base", ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else { - assertionFailure() - return self - } - } else { - assertionFailure() - return self - } - } - - private func currentLanguage() -> String { - if let preferred = Bundle.main.preferredLocalizations.first { - preferred - } else { - "Base" - } - } -} - public extension UIStoryboard { static func named(_ name: String, for clazz: AnyClass) -> UIStoryboard { let bundle: Bundle diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/de.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/de.lproj/RuuviDiscover.strings deleted file mode 100644 index d98b8cfdb..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/de.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,31 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Neuen Sensor hinzufügen"; -"DiscoverTable.GetMoreSensors.button.title" = "Ruuvi Sensoren kaufen"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth ist nicht aktiviert"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Die Ruuvi Station benötigt Bluetooth, um die Sensoren zu verbinden. Gehen Sie zu Einstellungen und schalten Sie Bluetooth ein."; -"DiscoverTable.WebTagsInfoDialog.message" = "Virtuelle Sensoren zeigen öffentliche Wetterdaten an, die von lokalen Wetterstationen bereitgestellt werden."; -"PermissionPresenter.settings" = "Einstellungen"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(Keine Sensoren in Bluetooth-Reichweite)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth ist deaktiviert)"; -"DiscoverTable.SectionTitle.Devices" = "Ruuvi-Sensoren in der Nähe"; -"dBm" = "dBm"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Virtuelle Sensoren"; -"WebTagLocationSource.current" = "Ihr Standort"; -"WebTagLocationSource.manual" = "Wählen Sie aus der Karte"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/products?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Mit NFC hinzufügen"; -"sensor_details" = "Sensordetails"; -"add_sensor" = "Sensor hinzufügen"; -"copy_mac_address" = "MAC-Adresse kopieren"; -"copy_unique_id" = "Eindeutige ID kopieren"; -"name" = "Name:"; -"mac_address" = "MAC-Adresse:"; -"go_to_sensor" = "Gehen Sie zur Sensorkarte"; -"unique_id" = "Eindeutige ID:"; -"firmware_version" = "Firmware Version:"; -"close" = "Schließen"; -"add_sensor_nfc_df3_error" = "Dieser Sensor kann aufgrund der alten Firmware nicht mit NFC hinzugefügt werden. Bitte fügen Sie den Sensor über Bluetooth hinzu und aktualisieren Sie die Firmware."; -"add_sensor_description" = "Auf dieser Seite werden Ruuvi-Sensoren in der Nähe angezeigt, die der App noch nicht hinzugefügt wurden. Tippen Sie auf einen Sensor, um ihn hinzuzufügen."; -"add_sensor_via_nfc" = "Alternatively, you can add a sensor using NFC by selecting Add with NFC and touching it with your phone."; -"upgrade_firmware" = "Firmware Update"; diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/en.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/en.lproj/RuuviDiscover.strings deleted file mode 100644 index 5e1a9399f..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/en.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,33 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Add a New Sensor"; -"DiscoverTable.GetMoreSensors.button.title" = "Buy Ruuvi Sensors"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth is not enabled"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Ruuvi Station needs bluetooth to be able to listen for sensors. Go to Settings and turn Bluetooth on."; -"DiscoverTable.WebTagsInfoDialog.message" = "Virtual Sensors show public weather data provided by local weather stations."; -"PermissionPresenter.settings" = "Settings"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(No sensors on Bluetooth range)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth is disabled)"; -"DiscoverTable.SectionTitle.Devices" = "Nearby Ruuvi sensors"; -"dBm" = "dBm"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Virtual sensors"; -"WebTagLocationSource.current" = "Your location"; -"WebTagLocationSource.manual" = "Pick from the map"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/products?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Add with NFC"; -"sensor_details" = "Sensor Details"; -"add_sensor" = "Add Sensor"; -"copy_mac_address" = "Copy MAC Address"; -"copy_unique_id" = "Copy Unique ID"; -"name" = "Name:"; -"mac_address" = "Mac Address:"; -"go_to_sensor" = "Go to sensor card"; -"unique_id" = "Unique ID:"; -"firmware_version" = "Firmware Version:"; -"close" = "Close"; -"add_sensor_nfc_df3_error" = "This tag cannot be added with NFC due to old firmware. Please add the tag with Bluetooth and update firmware."; -"add_sensor_description" = "This page shows nearby Ruuvi sensors not yet added to the app. Tap a sensor to add it."; -"add_sensor_via_nfc" = "Alternatively, you can add a sensor using NFC by selecting Add with NFC and touching it with your phone."; -"upgrade_firmware" = "Firmware Update"; - - diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fi.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fi.lproj/RuuviDiscover.strings deleted file mode 100644 index 378a06592..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fi.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,31 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Lisää uusi anturi"; -"DiscoverTable.GetMoreSensors.button.title" = "Osta Ruuvi-antureita"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth ei ole käytössä"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Ruuvi Station tarvitsee Bluetooth-yhteyden toimiakseen. Ota Bluetooth käyttöön laitteen asetuksista."; -"DiscoverTable.WebTagsInfoDialog.message" = "Virtuaalisten antureiden avulla voidaan esittää paikallisilta sääasemilta kerättyjä säätietoja."; -"PermissionPresenter.settings" = "Asetukset"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(Ei havaittuja antureita Bluetooth-verkon alueella)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth ei ole käytössä)"; -"DiscoverTable.SectionTitle.Devices" = "Lähellä olevat Ruuvi-laitteet"; -"dBm" = "dBm"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Paikkaan perustuvat virtuaaliset anturit"; -"WebTagLocationSource.current" = "Nykyinen sijaintisi"; -"WebTagLocationSource.manual" = "Valitse kartalta"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/fi/tuotteet?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Lisää NFC:llä"; -"sensor_details" = "Anturin tiedot"; -"add_sensor" = "Lisää anturi"; -"copy_mac_address" = "Kopioi MAC-osoite"; -"copy_unique_id" = "Kopioi yksilöivä tunniste"; -"name" = "Nimi:"; -"mac_address" = "MAC-osoite:"; -"go_to_sensor" = "Siirry anturikortille"; -"unique_id" = "Yksilöivä tunniste:"; -"firmware_version" = "Laiteohjelmistoversio:"; -"close" = "Sulje"; -"add_sensor_nfc_df3_error" = "Vanha laiteohjelmisto ei salli anturin lisäämistä NFC:llä. Lisää anturi Bluetooth-yhteydellä ja päivitä laiteohjelmisto."; -"add_sensor_description" = "Tällä sivulla näet lähelläsi olevat Ruuvi-anturit, joita ei ole vielä lisätty sovellukseen. Lisää listattu anturi napauttamalla."; -"add_sensor_via_nfc" = "Voit vaihtoehtoisesti lisätä anturin sovellukseen NFC:llä napauttamalla Lisää NFC:llä painiketta ja koskettamalla sitä."; -"upgrade_firmware" = "Laiteohjelmiston päivitys"; diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fr.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fr.lproj/RuuviDiscover.strings deleted file mode 100644 index 0365f333a..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/fr.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,31 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Ajouter un capteur"; -"DiscoverTable.GetMoreSensors.button.title" = "Acheter des capteurs Ruuvi"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth désactivé"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Ruuvi Station a besoin du Bluetooth pour fonctionner. Activez-le dans les paramètres de votre appareil."; -"DiscoverTable.WebTagsInfoDialog.message" = "Les capteurs virtuels permettent d'afficher des données recueillies à partir de stations météorologiques locales."; -"PermissionPresenter.settings" = "Réglages"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(Pas de capteurs à portée du Bluetooth)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth désactivé)"; -"DiscoverTable.SectionTitle.Devices" = "Capteurs Ruuvi à proximité"; -"dBm" = "dBm"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Capteurs virtuels"; -"WebTagLocationSource.current" = "Localisation actuelle"; -"WebTagLocationSource.manual" = "Choisir sur la carte"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/products?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Ajouter avec NFC"; -"sensor_details" = "Détails du capteur"; -"add_sensor" = "Ajouter un capteur"; -"copy_mac_address" = "Copier l'adresse MAC"; -"copy_unique_id" = "Copier l'identifiant unique"; -"name" = "Nom:"; -"mac_address" = "Adresse Mac:"; -"go_to_sensor" = "Aller à la carte du capteur"; -"unique_id" = "Identifiant unique:"; -"firmware_version" = "Version du firmware:"; -"close" = "Fermer"; -"add_sensor_nfc_df3_error" = "Ce capteur ne peut pas être ajouté avec NFC en raison d'un ancien firmware. Veuillez ajouter le capteur avec Bluetooth et mettre à jour le firmware."; -"add_sensor_description" = "Cette page montre les capteurs Ruuvi à proximité qui n'ont pas encore été ajoutés à l'application. Appuyez sur un capteur pour l'ajouter."; -"add_sensor_via_nfc" = "Alternatively, you can add a sensor using NFC by selecting Add with NFC and touching it with your phone."; -"upgrade_firmware" = "Mise à jour du firmware"; diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/ru.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/ru.lproj/RuuviDiscover.strings deleted file mode 100644 index dba31af33..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/ru.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,31 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Добавить Сенсор"; -"DiscoverTable.GetMoreSensors.button.title" = "Купить датчики Ruuvi"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth выключен"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Ruuvi Station необходим bluetooth чтобы слушать сенсоры. Откройте Настройки и включите Bluetooth."; -"DiscoverTable.WebTagsInfoDialog.message" = "Виртуальные сенсоры показывают публичную информацию о погоде, предоставленную локальными станциями."; -"PermissionPresenter.settings" = "Настройки"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(Bluetooth устройства не найдены)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth отключен)"; -"DiscoverTable.SectionTitle.Devices" = "Ближайшие Сенсоры"; -"dBm" = "дБм"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Виртуальные"; -"WebTagLocationSource.current" = "Ваше текущее месторасположение"; -"WebTagLocationSource.manual" = "Месторасположение на карте"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/products?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Add with NFC"; -"sensor_details" = "Sensor Details"; -"add_sensor" = "Add Sensor"; -"copy_mac_address" = "Копировать MAC-адрес"; -"copy_unique_id" = "Скопировать уникальный идентификатор"; -"name" = "Name:"; -"mac_address" = "Mac Address:"; -"go_to_sensor" = "Go to sensor card"; -"unique_id" = "Unique ID:"; -"firmware_version" = "Firmware Version:"; -"close" = "Close"; -"add_sensor_nfc_df3_error" = "This sensor cannot be added with NFC due to old firmware. Please add the sensor with Bluetooth and update firmware."; -"add_sensor_description" = "Здесь показаны датчики Ruuvi, которые еще не были добавлены в приложение. Нажмите на сенсор, чтобы добавить его."; -"add_sensor_via_nfc" = "Alternatively, you can add a sensor using NFC by selecting Add with NFC and touching it with your phone."; -"upgrade_firmware" = "Обновление Прошивки"; diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/sv.lproj/RuuviDiscover.strings b/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/sv.lproj/RuuviDiscover.strings deleted file mode 100644 index 779a30301..000000000 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Resources/sv.lproj/RuuviDiscover.strings +++ /dev/null @@ -1,31 +0,0 @@ -"DiscoverTable.NavigationItem.title" = "Lägg till en ny sensor"; -"DiscoverTable.GetMoreSensors.button.title" = "Köp Ruuvi-sensorer"; -"DiscoverTable.BluetoothDisabledAlert.title" = "Bluetooth är inte aktiverat"; -"DiscoverTable.BluetoothDisabledAlert.message" = "Ruuvi Station behöver bluetooth för att fungera. Gå till Inställningar och aktivera Bluetooth."; -"DiscoverTable.WebTagsInfoDialog.message" = "Virtuella Sensorer visar offentlig väder data som upprätthålls av lokala väderstationer."; -"PermissionPresenter.settings" = "Inställningar"; -"OK" = "OK"; -"DiscoverTable.NoDevicesSection.NotFound.text" = "(Inga sensorer inom Bluetooths räckvidd)"; -"DiscoverTable.NoDevicesSection.BluetoothDisabled.text" = "(Bluetooth är avaktiverat)"; -"DiscoverTable.SectionTitle.Devices" = "Ruuvi sensorer i närheten"; -"dBm" = "dBm"; -"DiscoverTable.RuuviDevice.prefix" = "Ruuvi"; -"DiscoverTable.SectionTitle.WebTags" = "Virtuella sensorer"; -"WebTagLocationSource.current" = "Din plats"; -"WebTagLocationSource.manual" = "Välj från karta"; -"Ruuvi.BuySensors.URL.IOS" = "https://ruuvi.com/products?utm_campaign=app_ua&utm_medium=referral&utm_source=ios"; -"add_with_nfc" = "Lägg till med NFC"; -"sensor_details" = "Sensordetaljer"; -"add_sensor" = "Lägg till sensor"; -"copy_mac_address" = "Kopiera MAC-adress"; -"copy_unique_id" = "Kopiera unikt ID"; -"name" = "Namn:"; -"mac_address" = "MAC-adress:"; -"go_to_sensor" = "Gå till sensorkortet"; -"unique_id" = "Unikt ID:"; -"firmware_version" = "Firmwareversion:"; -"close" = "Stänga"; -"add_sensor_nfc_df3_error" = "Denna sensor kan inte läggas till med NFC på grund av gammal firmware. Lägg till sensorn med Bluetooth och uppdatera firmware."; -"add_sensor_description" = "Den här sidan visar närliggande Ruuvi-sensorer som ännu inte har lagts till i appen. Tryck på en sensor för att lägga till den."; -"add_sensor_via_nfc" = "Alternatively, you can add a sensor using NFC by selecting Add with NFC and touching it with your phone."; -"upgrade_firmware" = "Firmware Uppdatering"; diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/RuuviBundleUtils.swift b/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/RuuviBundleUtils.swift index 19876bf35..d0385bb30 100644 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/RuuviBundleUtils.swift +++ b/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/RuuviBundleUtils.swift @@ -35,40 +35,6 @@ public extension UIImage { } } -extension String { - public func localized(for clazz: AnyClass) -> String { - let bundle: Bundle - #if SWIFT_PACKAGE - bundle = Bundle.module - #else - bundle = Bundle.pod(clazz) - #endif - if let module = NSStringFromClass(clazz).components(separatedBy: ".").first { - if let path = bundle.path(forResource: currentLanguage(), ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else if let path = bundle.path(forResource: "Base", ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else { - assertionFailure() - return self - } - } else { - assertionFailure() - return self - } - } - - private func currentLanguage() -> String { - if let preferred = Bundle.main.preferredLocalizations.first { - preferred - } else { - "Base" - } - } -} - public extension UIStoryboard { static func named(_ name: String, for clazz: AnyClass) -> UIStoryboard { let bundle: Bundle diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/UIViewController+Alert.swift b/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/UIViewController+Alert.swift index ef5362fea..5c3d7b34f 100644 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/UIViewController+Alert.swift +++ b/Modules/RuuviDiscover/Sources/RuuviDiscover/Util/UIViewController+Alert.swift @@ -1,3 +1,4 @@ +import RuuviLocalization import UIKit extension UIViewController { @@ -6,7 +7,7 @@ extension UIViewController { message: String? = nil ) { let alertVC = UIAlertController(title: title, message: message, preferredStyle: .alert) - alertVC.addAction(UIAlertAction(title: "OK".localized(for: Self.self), style: .cancel, handler: nil)) + alertVC.addAction(UIAlertAction(title: RuuviLocalization.ok, style: .cancel, handler: nil)) present(alertVC, animated: true) } } diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/Presenter/DiscoverPresenter.swift b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/Presenter/DiscoverPresenter.swift index bc0989ce2..2b4075b2d 100644 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/Presenter/DiscoverPresenter.swift +++ b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/Presenter/DiscoverPresenter.swift @@ -1,13 +1,14 @@ +// swiftlint:disable file_length import BTKit import CoreBluetooth import CoreNFC -// swiftlint:disable file_length import Foundation import Future import RuuviContext import RuuviCore import RuuviFirmware import RuuviLocal +import RuuviLocalization import RuuviOntology import RuuviPresenters import RuuviReactor @@ -138,7 +139,7 @@ extension DiscoverPresenter: DiscoverViewOutput { } func viewDidTriggerBuySensors() { - guard let url = URL(string: "Ruuvi.BuySensors.URL.IOS".localized(for: Self.self)) + guard let url = URL(string: RuuviLocalization.Ruuvi.BuySensors.Url.ios) else { return } UIApplication.shared.open(url, options: [:], completionHandler: nil) } @@ -425,7 +426,7 @@ extension DiscoverPresenter { else { return nil } - return "DiscoverTable.RuuviDevice.prefix".localized(for: Self.self) + return RuuviLocalization.DiscoverTable.RuuviDevice.prefix + " " + tag.macId.replacingOccurrences(of: ":", with: "").suffix(4) } @@ -436,12 +437,12 @@ extension DiscoverPresenter { return nil } - let nameString = "\("name".localized(for: Self.self))\n\(displayName)" - let macIdString = "\("mac_address".localized(for: Self.self))\n\(tag.macId)" - let uniqueIdString = "\("unique_id".localized(for: Self.self))\n\(tag.id)" - let fwString = "\("firmware_version".localized(for: Self.self))\n\(tag.firmwareVersion)" + let nameString = "\(RuuviLocalization.name)\n\(displayName)" + let macIdString = "\(RuuviLocalization.macAddress)\n\(tag.macId)" + let uniqueIdString = "\(RuuviLocalization.uniqueId)\n\(tag.id)" + let fwString = "\(RuuviLocalization.firmwareVersion)\n\(tag.firmwareVersion)" - return "\n\(nameString)\n\n\(macIdString)\n\n\(uniqueIdString)\n\n\(fwString)\n".localized(for: Self.self) + return "\n\(nameString)\n\n\(macIdString)\n\n\(uniqueIdString)\n\n\(fwString)\n" } private func addRuuviTagOwnership( diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableHeaderView.swift b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableHeaderView.swift index 0c9b0162e..3d4cd7e0a 100644 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableHeaderView.swift +++ b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableHeaderView.swift @@ -19,9 +19,6 @@ class DiscoverTableHeaderView: UIView { CBCentralManager.authorization == .allowedAlways } - private let addSensorDescriptionKey: String = "add_sensor_description" - private let addSensorViaNFCKey: String = "add_sensor_via_nfc" - // UI private lazy var descriptionLabel = createDescriptionLabel() private lazy var nfcButton = createAddWithNFCButton() @@ -70,8 +67,8 @@ class DiscoverTableHeaderView: UIView { descriptionLabel.translatesAutoresizingMaskIntoConstraints = false descriptionLabel.numberOfLines = 0 - let addSensorString: String = addSensorDescriptionKey.localized(for: Self.self) - let addSensorViaNFCString = addSensorViaNFCKey.localized(for: Self.self) + let addSensorString: String = RuuviLocalization.addSensorDescription + let addSensorViaNFCString = RuuviLocalization.addSensorViaNfc let descriptionString = (isBluetoothPermissionGranted && isNFCAvailable) ? (addSensorString + "\n\n" + addSensorViaNFCString) : addSensorString @@ -88,7 +85,7 @@ class DiscoverTableHeaderView: UIView { let button = UIButton(type: .custom) button.translatesAutoresizingMaskIntoConstraints = false button.setImage(UIImage(systemName: "plus.circle.fill"), for: .normal) - button.setTitle("add_with_nfc".localized(for: Self.self), for: .normal) + button.setTitle(RuuviLocalization.addWithNfc, for: .normal) button.setTitleColor(.label, for: .normal) button.setInsets(forContentPadding: .zero, imageTitlePadding: 8) if let font = UIFont(name: "Muli-Regular", size: 16) { @@ -157,8 +154,8 @@ extension DiscoverTableHeaderView { nfcButton.isHidden = !show } descriptionLabelBottomConstraint.isActive = !show - let addSensorString: String = addSensorDescriptionKey.localized(for: Self.self) - let addSensorViaNFCString = addSensorViaNFCKey.localized(for: Self.self) + let addSensorString: String = RuuviLocalization.addSensorDescription + let addSensorViaNFCString = RuuviLocalization.addSensorViaNfc let descriptionString = (show && isBluetoothPermissionGranted && isNFCAvailable) ? (addSensorString + "\n\n" + addSensorViaNFCString) : addSensorString diff --git a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableViewController.swift b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableViewController.swift index 8bf10300e..339a41852 100644 --- a/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableViewController.swift +++ b/Modules/RuuviDiscover/Sources/RuuviDiscover/VMP/View/Table/DiscoverTableViewController.swift @@ -52,21 +52,23 @@ class DiscoverTableViewController: UIViewController { extension DiscoverTableViewController: DiscoverViewInput { func localize() { - navigationItem.title = "DiscoverTable.NavigationItem.title".localized(for: Self.self) + navigationItem.title = RuuviLocalization.DiscoverTable.NavigationItem.title } func showBluetoothDisabled(userDeclined: Bool) { - let title = "DiscoverTable.BluetoothDisabledAlert.title".localized(for: Self.self) - let message = "DiscoverTable.BluetoothDisabledAlert.message".localized(for: Self.self) + let title = RuuviLocalization.DiscoverTable.BluetoothDisabledAlert.title + let message = RuuviLocalization.DiscoverTable.BluetoothDisabledAlert.message let alertVC = UIAlertController(title: title, message: message, preferredStyle: .alert) - alertVC.addAction(UIAlertAction( - title: "PermissionPresenter.settings".localized(for: Self.self), - style: .default, - handler: { [weak self] _ in - self?.takeUserToBTSettings(userDeclined: userDeclined) - } - )) - alertVC.addAction(UIAlertAction(title: "OK".localized(for: Self.self), style: .cancel, handler: nil)) + alertVC.addAction( + UIAlertAction( + title: RuuviLocalization.PermissionPresenter.settings, + style: .default, + handler: { [weak self] _ in + self?.takeUserToBTSettings(userDeclined: userDeclined) + } + ) + ) + alertVC.addAction(UIAlertAction(title: RuuviLocalization.ok, style: .cancel, handler: nil)) present(alertVC, animated: true) } @@ -96,15 +98,13 @@ extension DiscoverTableViewController: DiscoverViewInput { showUpgradeFirmware: Bool, isDF3: Bool ) { - let title = "sensor_details".localized(for: Self.self) + let title = RuuviLocalization.sensorDetails // Message var messageString = message // We show extra message for DF3 sensors since they can't be added with NFC. if isDF3 { - let df3ErrorMessage = "add_sensor_nfc_df3_error".localized( - for: Self.self - ) + let df3ErrorMessage = RuuviLocalization.addSensorNfcDf3Error messageString = "\n\(df3ErrorMessage)\n" + message } @@ -124,7 +124,7 @@ extension DiscoverTableViewController: DiscoverViewInput { if showAddSensor { alertVC.addAction(UIAlertAction( - title: "add_sensor".localized(for: Self.self), + title: RuuviLocalization.addSensor, style: .default, handler: { [weak self] _ in self?.output.viewDidAddDeviceWithNFC(with: tag) @@ -133,7 +133,7 @@ extension DiscoverTableViewController: DiscoverViewInput { } alertVC.addAction(UIAlertAction( - title: "copy_mac_address".localized(for: Self.self), + title: RuuviLocalization.copyMacAddress, style: .default, handler: { [weak self] _ in self?.output.viewDidACopyMacAddress(of: tag) @@ -141,7 +141,7 @@ extension DiscoverTableViewController: DiscoverViewInput { )) alertVC.addAction(UIAlertAction( - title: "copy_unique_id".localized(for: Self.self), + title: RuuviLocalization.copyUniqueId, style: .default, handler: { [weak self] _ in self?.output.viewDidACopySecret(of: tag) @@ -150,7 +150,7 @@ extension DiscoverTableViewController: DiscoverViewInput { if showGoToSensor { alertVC.addAction(UIAlertAction( - title: "go_to_sensor".localized(for: Self.self), + title: RuuviLocalization.goToSensor, style: .default, handler: { [weak self] _ in self?.output.viewDidGoToSensor(with: tag) @@ -160,7 +160,7 @@ extension DiscoverTableViewController: DiscoverViewInput { if showUpgradeFirmware { alertVC.addAction(UIAlertAction( - title: "upgrade_firmware".localized(for: Self.self), + title: RuuviLocalization.DFUUIView.navigationTitle, style: .default, handler: { [weak self] _ in self?.output.viewDidAskToUpgradeFirmware(of: tag) @@ -168,7 +168,7 @@ extension DiscoverTableViewController: DiscoverViewInput { )) } - alertVC.addAction(UIAlertAction(title: "close".localized(for: Self.self), style: .cancel, handler: nil)) + alertVC.addAction(UIAlertAction(title: RuuviLocalization.close, style: .cancel, handler: nil)) present(alertVC, animated: true) } } @@ -260,8 +260,8 @@ extension DiscoverTableViewController: UITableViewDataSource { case .noDevices: let cell = tableView.dequeueReusableCell(with: DiscoverNoDevicesTableViewCell.self, for: indexPath) cell.descriptionLabel.text = isBluetoothEnabled - ? "DiscoverTable.NoDevicesSection.NotFound.text".localized(for: Self.self) - : "DiscoverTable.NoDevicesSection.BluetoothDisabled.text".localized(for: Self.self) + ? RuuviLocalization.DiscoverTable.NoDevicesSection.NotFound.text + : RuuviLocalization.DiscoverTable.NoDevicesSection.BluetoothDisabled.text return cell } } @@ -295,7 +295,7 @@ extension DiscoverTableViewController { // RSSI if let rssi = device.rssi { - cell.rssiLabel.text = "\(rssi)" + " " + "dBm".localized(for: Self.self) + cell.rssiLabel.text = "\(rssi)" + " " + RuuviLocalization.dBm if rssi < -80 { cell.rssiImageView.image = UIImage.named("icon-connection-1", for: Self.self) } else if rssi < -50 { @@ -318,9 +318,7 @@ extension DiscoverTableViewController { navigationController?.navigationBar.titleTextAttributes = [.font: muliBold] } - actionButton.setTitle("DiscoverTable.GetMoreSensors.button.title".localized( - for: Self.self - ).capitalized, for: .normal) + actionButton.setTitle(RuuviLocalization.DiscoverTable.GetMoreSensors.Button.title.capitalized, for: .normal) configureTableView() } @@ -364,10 +362,10 @@ extension DiscoverTableViewController { private func displayName(for device: DiscoverRuuviTagViewModel) -> String { // identifier if let mac = device.mac { - "DiscoverTable.RuuviDevice.prefix".localized(for: Self.self) + RuuviLocalization.DiscoverTable.RuuviDevice.prefix + " " + mac.replacingOccurrences(of: ":", with: "").suffix(4) } else { - "DiscoverTable.RuuviDevice.prefix".localized(for: Self.self) + RuuviLocalization.DiscoverTable.RuuviDevice.prefix + " " + (device.luid?.value.prefix(4) ?? "") } } diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/de.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/de.lproj/RuuviFirmware.strings deleted file mode 100644 index 7c47df8bb..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/de.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Firmware Update"; -"DFUUIView.latestTitle" = "Neueste verfügbare Ruuvi Firmware-Version:"; -"DFUUIView.currentTitle" = "Aktuelle Version:"; -"DFUUIView.notReportingDescription" = "Ihr Sensor meldet seine aktuelle Firmware-Version nicht. Dies bedeutet, dass wahrscheinlich eine alte Firmware-Version ausgeführt wird und eine Aktualisierung empfohlen wird."; -"DFUUIView.alreadyOnLatest" = "Sie verwenden die neueste Firmware-Version, keine Aktualisierung erforderlich"; -"DFUUIView.startUpdateProcess" = "Update-Prozess starten"; -"DFUUIView.downloadingTitle" = "Laden Sie die neueste zu aktualisierende Firmware herunter..."; -"DFUUIView.prepareTitle" = "Bereiten Sie Ihren Sensor vor"; -"DFUUIView.openCoverTitle" = "1. Öffnen Sie den Deckel Ihres Ruuvi-Sensors"; -"DFUUIView.locateBootButtonTitle" = "2. Suchen Sie die kleinen runden schwarzen Knöpfe auf der weißen Platine; ältere Ruuvi-Sensoren haben zwei Knöpfe mit den Bezeichnungen \"R\" und \"B\", während neuere nur einen Knopf ohne Beschriftung haben."; -"DFUUIView.setUpdatingModeTitle" = "3. Stellen Sie den Sensor in den Aktualisierungsmodus:"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. Wenn Ihr Sensor 2 Tasten hat: Halten Sie die Taste \"B\" gedrückt und tippen Sie gleichzeitig kurz auf die Taste \"R\". Lassen Sie die Taste \"B\" los."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. Wenn Ihr Sensor eine einzelne Taste hat: Halten Sie die Taste 10 Sekunden lang gedrückt."; -"DFUUIView.toBootModeSuccessTitle" = "4. Wenn die Einstellung erfolgreich war, leuchtet ein rotes Licht auf der Platine und die Schaltfläche in der App ändert sich in \"Start the update\"."; -"DFUUIView.updatingTitle" = "Aktualisierung..."; -"DFUUIView.searchingTitle" = "Suche nach einem Sensor"; -"DFUUIView.startTitle" = "Starten Sie die Aktualisierung"; -"DFUUIView.doNotCloseTitle" = "Schließen Sie die App nicht und schalten Sie den Sensor während des Updates nicht aus."; -"DFUUIView.successfulTitle" = "Aktualisierung erfolgreich"; -"DfuFlash.Finish.text" = "BEENDEN"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/en.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/en.lproj/RuuviFirmware.strings deleted file mode 100644 index 467ed1605..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/en.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Firmware Update"; -"DFUUIView.latestTitle" = "Latest available Ruuvi Firmware version:"; -"DFUUIView.currentTitle" = "Current version:"; -"DFUUIView.notReportingDescription" = "Your sensor doesn't report its current firmware version. Either you're not in its Bluetooth range, it's connected to another phone, or it's running a very old firmware version."; -"DFUUIView.alreadyOnLatest" = "You are running the latest firmware version, no need to update"; -"DFUUIView.startUpdateProcess" = "Start update process"; -"DFUUIView.downloadingTitle" = "Downloading the latest firmware to be updated..."; -"DFUUIView.prepareTitle" = "Prepare your sensor"; -"DFUUIView.openCoverTitle" = "1. Open the cover of your Ruuvi sensor"; -"DFUUIView.locateBootButtonTitle" = "2. Locate the small round black buttons on the white circuit board; older Ruuvi sensors have 2 buttons labelled “R” and “B” while newer ones have only one button without a label."; -"DFUUIView.setUpdatingModeTitle" = "3. Set the sensor to updating mode:"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. If your sensor has 2 buttons: keep “B” button pressed while tapping button “R” momentarily. Release button “B”."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. If your sensor has a single button: keep the button pressed for 10 seconds."; -"DFUUIView.toBootModeSuccessTitle" = "4. If set successfully, you will see a solid red light lit on the circuit board and the button in the app will change to “Start the update”."; -"DFUUIView.updatingTitle" = "Updating..."; -"DFUUIView.searchingTitle" = "Searching for a sensor"; -"DFUUIView.startTitle" = "Start the update"; -"DFUUIView.doNotCloseTitle" = "Do not close the app or power off the sensor during the update."; -"DFUUIView.successfulTitle" = "Update successful"; -"DfuFlash.Finish.text" = "FINISH"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fi.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fi.lproj/RuuviFirmware.strings deleted file mode 100644 index d43a87b94..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fi.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Laiteohjelmiston päivitys"; -"DFUUIView.latestTitle" = "Uusin saatavilla oleva Ruuvi-laiteohjelmisto:"; -"DFUUIView.currentTitle" = "Nykyinen versio:"; -"DFUUIView.notReportingDescription" = "Laitteessa oleva laiteohjelmisto ei ilmoita nykyistä versiota. Joko et ole sen Bluetooth-kuuluvuusalueella, se on samanaikaisesti yhteydessä toiseen puhelimeen tai kyseessä on hyvin vanha laiteohjelmisto."; -"DFUUIView.alreadyOnLatest" = "Laitteessa on jo viimeisin saatavilla oleva laiteohjelmisto"; -"DFUUIView.startUpdateProcess" = "Siirry päivittämään"; -"DFUUIView.downloadingTitle" = "Ladataan viimeisin laiteohjelmisto päivitystä varten..."; -"DFUUIView.prepareTitle" = "Laitteen asettaminen päivitystilaan"; -"DFUUIView.openCoverTitle" = "1. Avaa Ruuvi-anturin suojakotelo"; -"DFUUIView.locateBootButtonTitle" = "2. Paikanna valkoisella piirilevyllä olevat pienet pyöreät mustat painikkeet; vanhemmissa Ruuvi-antureissa on 2 painiketta “R” ja “B”, kun taas uudemmissa on vain yksi nimeämätön painike."; -"DFUUIView.setUpdatingModeTitle" = "3. Aseta anturi päivitystilaan:"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. Anturissasi on kaksi painiketta: pidä painike “B” alaspainettuna ja napauta samalla painiketta “R”. Vapauta painike “B”."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. Anturissasi on yksi painike: pidä painiketta alaspainettuna 10 sekunnin ajan."; -"DFUUIView.toBootModeSuccessTitle" = "4. Päivitystilaan siirtyminen onnistui, mikäli piirilevyllä oleva punainen LED-valo on nyt aktiivinen ja sovelluksen painikkeen nimeksi on vaihtunut “Aloita päivitys”."; -"DFUUIView.updatingTitle" = "Päivitetään..."; -"DFUUIView.searchingTitle" = "Laitetta etsitään"; -"DFUUIView.startTitle" = "Aloita päivitys"; -"DFUUIView.doNotCloseTitle" = "Älä sulje sovellusta tai poista paristoa laitteesta päivityksen aikana."; -"DFUUIView.successfulTitle" = "Päivitys onnistui"; -"DfuFlash.Finish.text" = "VALMIS"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fr.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fr.lproj/RuuviFirmware.strings deleted file mode 100644 index 5b0c767bf..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/fr.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Mise à jour du firmware"; -"DFUUIView.latestTitle" = "Dernière version du Ruuvi Firmware :"; -"DFUUIView.currentTitle" = "Version actuelle :"; -"DFUUIView.notReportingDescription" = "Impossible d'obtenir la version actuelle de l'appareil. La version est probablement trop ancienne et il est recommandé d'effectuer une mise à jour."; -"DFUUIView.alreadyOnLatest" = "L'appareil est à déjà à jour"; -"DFUUIView.startUpdateProcess" = "Début de la mise à jour"; -"DFUUIView.downloadingTitle" = "Téléchargement de la dernière version pour la mise à jour..."; -"DFUUIView.prepareTitle" = "Préparez votre capteur"; -"DFUUIView.openCoverTitle" = "1. Ouvrez le couvercle de votre capteur Ruuvi"; -"DFUUIView.locateBootButtonTitle" = "2. Localisez les petits boutons ronds noirs sur la carte de circuit imprimé blanche ; les anciens capteurs Ruuvi ont 2 boutons étiquetés \"R\" et \"B\" tandis que les plus récents n'ont qu'un seul bouton sans étiquette."; -"DFUUIView.setUpdatingModeTitle" = "3. Mettez le capteur en mode de mise à jour :"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. Si votre capteur est équipé de 2 boutons : maintenez le bouton \"B\" enfoncé tout en appuyant momentanément sur le bouton \"R\". Relâchez le bouton \"B\"."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. Si votre capteur possède un seul bouton : maintenez le bouton enfoncé pendant 10 secondes."; -"DFUUIView.toBootModeSuccessTitle" = "4. Si le réglage est réussi, vous verrez une lumière rouge fixe s'allumer sur la carte de circuit imprimé et le bouton de l'application passera à \"Démarrer la mise à jour\"."; -"DFUUIView.updatingTitle" = "Mise à jour..."; -"DFUUIView.searchingTitle" = "Recherche d'un capteur"; -"DFUUIView.startTitle" = "Lancer la mise à jour"; -"DFUUIView.doNotCloseTitle" = "Ne pas fermer l'application ou enlever la pile du capteur pendant la mise à jour."; -"DFUUIView.successfulTitle" = "Mise à jour réussie"; -"DfuFlash.Finish.text" = "PRÊT"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/ru.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/ru.lproj/RuuviFirmware.strings deleted file mode 100644 index 7574cdef1..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/ru.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Обновление Прошивки"; -"DFUUIView.latestTitle" = "Доступная версия прошивки Ruuvi:"; -"DFUUIView.currentTitle" = "Текущая версия:"; -"DFUUIView.notReportingDescription" = "Ваш сенсор не возвращает версию прошивки. Вероятно, на нем установлена старая версия прошивки и обновление рекомендовано."; -"DFUUIView.alreadyOnLatest" = "Последняя версия прошивки уже установлена, обновление не требуется"; -"DFUUIView.startUpdateProcess" = "Начать процесс обновления"; -"DFUUIView.downloadingTitle" = "Идет скачивание обновления прошивки..."; -"DFUUIView.prepareTitle" = "Prepare your sensor"; -"DFUUIView.openCoverTitle" = "1. Open the cover of your Ruuvi sensor"; -"DFUUIView.locateBootButtonTitle" = "2. Locate the small round black buttons on the white circuit board; older Ruuvi sensors have 2 buttons labelled “R” and “B” while newer ones have only one button without a label."; -"DFUUIView.setUpdatingModeTitle" = "3. Set the sensor to updating mode:"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. If your sensor has 2 buttons: keep “B” button pressed while tapping button “R” momentarily. Release button “B”."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. If your sensor has a single button: keep the button pressed for 10 seconds."; -"DFUUIView.toBootModeSuccessTitle" = "4. If set successfully, you will see a solid red light lit on the circuit board and the button in the app will change to “Start the update”."; -"DFUUIView.updatingTitle" = "Обновляю..."; -"DFUUIView.searchingTitle" = "Searching for a sensor"; -"DFUUIView.startTitle" = "Start the update"; -"DFUUIView.doNotCloseTitle" = "Не закрывайте приложение и не отключайте сенсор во время обновления."; -"DFUUIView.successfulTitle" = "Обновление успешно завершено"; -"DfuFlash.Finish.text" = "УСПЕХ"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/sv.lproj/RuuviFirmware.strings b/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/sv.lproj/RuuviFirmware.strings deleted file mode 100644 index 4cf842198..000000000 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Resources/sv.lproj/RuuviFirmware.strings +++ /dev/null @@ -1,20 +0,0 @@ -"DFUUIView.navigationTitle" = "Firmware Uppdatering"; -"DFUUIView.latestTitle" = "Senast tillgängliga Ruuvi firmwareversion:"; -"DFUUIView.currentTitle" = "Nuvarande version:"; -"DFUUIView.notReportingDescription" = "Din sensor rapporterar inte sin nuvarande firmwareversion. Det betyder att den förmodligen har en gammal firmwareversion och uppdatering rekommenderas."; -"DFUUIView.alreadyOnLatest" = "Du har redan den senaste firmwareversionen, ingen uppdatering behövs"; -"DFUUIView.startUpdateProcess" = "Starta uppdateringsprocessen"; -"DFUUIView.downloadingTitle" = "Hämtar senaste firmware.."; -"DFUUIView.prepareTitle" = "Förbered din sensor"; -"DFUUIView.openCoverTitle" = "1. Öppna locket på din Ruuvi sensor"; -"DFUUIView.locateBootButtonTitle" = "2. Leta reda på små runda svarta knappar på det vita kretskortet; äldre Ruuvi-sensorer har 2 knappar märkta “R“ och “B“ medan nyare har bara en knapp utan etikett."; -"DFUUIView.setUpdatingModeTitle" = "3. Lägg sensorn i uppdateringsläge"; -"DFUUIView.toBootModeTwoButtonsDescription" = "3.1. Om din sensor har två knappar: håll knappen “B” intryckt medan du trycker en gång på “R”. Släpp knapp “B”."; -"DFUUIView.toBootModeOneButtonDescription" = "3.2. Om din sensor har en knapp, håll knappen intryckt i 10 sekunder."; -"DFUUIView.toBootModeSuccessTitle" = "4. Uppgraderingsläget lyckades om den röda lysdioden på kretskortet lyser och knappens text i appen har bytts till “Starta uppdatering“."; -"DFUUIView.updatingTitle" = "Uppdaterar..."; -"DFUUIView.searchingTitle" = "Söker efter en sensor"; -"DFUUIView.startTitle" = "Starta uppdatering"; -"DFUUIView.doNotCloseTitle" = "Stäng inte appen eller stäng av sensorn under uppdateringen."; -"DFUUIView.successfulTitle" = "Uppdateringen lyckades"; -"DfuFlash.Finish.text" = "KLAR"; diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/SwiftUI/FirmwareView.swift b/Modules/RuuviFirmware/Sources/RuuviFirmware/SwiftUI/FirmwareView.swift index f3784967b..c01d4bd2a 100644 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/SwiftUI/FirmwareView.swift +++ b/Modules/RuuviFirmware/Sources/RuuviFirmware/SwiftUI/FirmwareView.swift @@ -7,32 +7,28 @@ struct FirmwareView: View { @ObservedObject var viewModel: FirmwareViewModel private struct Texts { - let navigationTitle = "DFUUIView.navigationTitle".localized(for: FirmwareViewModel.self) - let latestTitle = "DFUUIView.latestTitle".localized(for: FirmwareViewModel.self) - let currentTitle = "DFUUIView.currentTitle".localized(for: FirmwareViewModel.self) - let lowBatteryWarningMessage = "DFUUIView.lowBattery.warning.message".localized(for: FirmwareViewModel.self) - let okTitle = "ErrorPresenterAlert.OK".localized(for: FirmwareViewModel.self) - let notReportingDescription = "DFUUIView.notReportingDescription".localized(for: FirmwareViewModel.self) - let alreadyOnLatest = "DFUUIView.alreadyOnLatest".localized(for: FirmwareViewModel.self) - let startUpdateProcess = "DFUUIView.startUpdateProcess".localized(for: FirmwareViewModel.self) - let downloadingTitle = "DFUUIView.downloadingTitle".localized(for: FirmwareViewModel.self) - let prepareTitle = "DFUUIView.prepareTitle".localized(for: FirmwareViewModel.self) - let openCoverTitle = "DFUUIView.openCoverTitle".localized(for: FirmwareViewModel.self) - let localBootButtonTitle = "DFUUIView.locateBootButtonTitle".localized(for: FirmwareViewModel.self) - let setUpdatingModeTitle = "DFUUIView.setUpdatingModeTitle".localized(for: FirmwareViewModel.self) - let toBootModeTwoButtonsDescription = "DFUUIView.toBootModeTwoButtonsDescription".localized( - for: FirmwareViewModel.self - ) - let toBootModeOneButtonDescription = "DFUUIView.toBootModeOneButtonDescription".localized( - for: FirmwareViewModel.self - ) - let toBootModeSuccessTitle = "DFUUIView.toBootModeSuccessTitle".localized(for: FirmwareViewModel.self) - let updatingTitle = "DFUUIView.updatingTitle".localized(for: FirmwareViewModel.self) - let searchingTitle = "DFUUIView.searchingTitle".localized(for: FirmwareViewModel.self) - let startTitle = "DFUUIView.startTitle".localized(for: FirmwareViewModel.self) - let doNotCloseTitle = "DFUUIView.doNotCloseTitle".localized(for: FirmwareViewModel.self) - let successfulTitle = "DFUUIView.successfulTitle".localized(for: FirmwareViewModel.self) - let finish = "DfuFlash.Finish.text".localized(for: FirmwareViewModel.self) + let navigationTitle = RuuviLocalization.DFUUIView.navigationTitle + let latestTitle = RuuviLocalization.DFUUIView.latestTitle + let currentTitle = RuuviLocalization.DFUUIView.currentTitle + let lowBatteryWarningMessage = RuuviLocalization.DFUUIView.LowBattery.Warning.message + let okTitle = RuuviLocalization.ErrorPresenterAlert.ok + let notReportingDescription = RuuviLocalization.DFUUIView.notReportingDescription + let alreadyOnLatest = RuuviLocalization.DFUUIView.alreadyOnLatest + let startUpdateProcess = RuuviLocalization.DFUUIView.startUpdateProcess + let downloadingTitle = RuuviLocalization.DFUUIView.downloadingTitle + let prepareTitle = RuuviLocalization.DFUUIView.prepareTitle + let openCoverTitle = RuuviLocalization.DFUUIView.openCoverTitle + let localBootButtonTitle = RuuviLocalization.DFUUIView.locateBootButtonTitle + let setUpdatingModeTitle = RuuviLocalization.DFUUIView.setUpdatingModeTitle + let toBootModeTwoButtonsDescription = RuuviLocalization.DFUUIView.toBootModeTwoButtonsDescription + let toBootModeOneButtonDescription = RuuviLocalization.DFUUIView.toBootModeOneButtonDescription + let toBootModeSuccessTitle = RuuviLocalization.DFUUIView.toBootModeSuccessTitle + let updatingTitle = RuuviLocalization.DFUUIView.updatingTitle + let searchingTitle = RuuviLocalization.DFUUIView.searchingTitle + let startTitle = RuuviLocalization.DFUUIView.startTitle + let doNotCloseTitle = RuuviLocalization.DFUUIView.doNotCloseTitle + let successfulTitle = RuuviLocalization.DFUUIView.successfulTitle + let finish = RuuviLocalization.DfuFlash.Finish.text } private let texts = Texts() diff --git a/Modules/RuuviFirmware/Sources/RuuviFirmware/Util/RuuviBundleUtils.swift b/Modules/RuuviFirmware/Sources/RuuviFirmware/Util/RuuviBundleUtils.swift index 19876bf35..d0385bb30 100644 --- a/Modules/RuuviFirmware/Sources/RuuviFirmware/Util/RuuviBundleUtils.swift +++ b/Modules/RuuviFirmware/Sources/RuuviFirmware/Util/RuuviBundleUtils.swift @@ -35,40 +35,6 @@ public extension UIImage { } } -extension String { - public func localized(for clazz: AnyClass) -> String { - let bundle: Bundle - #if SWIFT_PACKAGE - bundle = Bundle.module - #else - bundle = Bundle.pod(clazz) - #endif - if let module = NSStringFromClass(clazz).components(separatedBy: ".").first { - if let path = bundle.path(forResource: currentLanguage(), ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else if let path = bundle.path(forResource: "Base", ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else { - assertionFailure() - return self - } - } else { - assertionFailure() - return self - } - } - - private func currentLanguage() -> String { - if let preferred = Bundle.main.preferredLocalizations.first { - preferred - } else { - "Base" - } - } -} - public extension UIStoryboard { static func named(_ name: String, for clazz: AnyClass) -> UIStoryboard { let bundle: Bundle diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardGatewayFeaturesCell.swift b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardGatewayFeaturesCell.swift index c8d864bcf..4be61b635 100644 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardGatewayFeaturesCell.swift +++ b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardGatewayFeaturesCell.swift @@ -46,7 +46,7 @@ class RuuviOnboardGatewayFeaturesCell: UICollectionViewCell { label.textColor = .white label.textAlignment = .left label.numberOfLines = 0 - label.text = "onboarding_gateway_required".localized(for: Self.self) + label.text = RuuviLocalization.onboardingGatewayRequired label.font = UIFont.Muli(.semiBoldItalic, size: 16) return label }() diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardSignInCell.swift b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardSignInCell.swift index 8fe141cdc..11dc6eadf 100644 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardSignInCell.swift +++ b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardSignInCell.swift @@ -41,7 +41,7 @@ class RuuviOnboardSignInCell: UICollectionViewCell { private lazy var continueButton: UIButton = { let button = UIButton(color: RuuviColor.tintColor.color, cornerRadius: 22) button.setTitle( - "onboarding_continue".localized(for: Self.self), + RuuviLocalization.onboardingContinue, for: .normal ) button.setTitleColor(.white, for: .normal) diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardViewController.swift b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardViewController.swift index da863fb5e..90ab40f58 100644 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardViewController.swift +++ b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/RuuviOnboardViewController.swift @@ -1,3 +1,4 @@ +import RuuviLocalization import RuuviUser import UIKit @@ -68,7 +69,7 @@ class RuuviOnboardViewController: UIViewController { private lazy var skipButton: UIButton = { let button = UIButton() button.setTitleColor(.white, for: .normal) - button.setTitle("onboarding_skip".localized(for: Self.self), for: .normal) + button.setTitle(RuuviLocalization.onboardingSkip, for: .normal) button.titleLabel?.font = UIFont.Muli(.bold, size: 14) button.addTarget( self, @@ -371,68 +372,68 @@ private extension RuuviOnboardViewController { func constructOnboardingPages() -> [OnboardViewModel] { let meaureItem = OnboardViewModel( pageType: .measure, - title: "onboarding_measure_your_world".localized(for: Self.self), - subtitle: "onboarding_with_ruuvi_sensors".localized(for: Self.self), - sub_subtitle: "onboarding_swipe_to_continue".localized(for: Self.self) + title: RuuviLocalization.onboardingMeasureYourWorld, + subtitle: RuuviLocalization.onboardingWithRuuviSensors, + sub_subtitle: RuuviLocalization.onboardingSwipeToContinue ) let dashboardItem = OnboardViewModel( pageType: .dashboard, - title: "onboarding_dashboard".localized(for: Self.self), - subtitle: "onboarding_follow_measurement".localized(for: Self.self), + title: RuuviLocalization.onboardingDashboard, + subtitle: RuuviLocalization.onboardingFollowMeasurement, image: RuuviAssets.dashboard ) let sensorItem = OnboardViewModel( pageType: .sensors, - title: "onboarding_your_sensors".localized(for: Self.self), - subtitle: "onboarding_personalise".localized(for: Self.self), + title: RuuviLocalization.onboardingYourSensors, + subtitle: RuuviLocalization.onboardingPersonalise, image: RuuviAssets.sensors ) let historyItem = OnboardViewModel( pageType: .history, - title: "onboarding_history".localized(for: Self.self), - subtitle: "onboarding_explore_detailed".localized(for: Self.self), + title: RuuviLocalization.onboardingHistory, + subtitle: RuuviLocalization.onboardingExploreDetailed, image: RuuviAssets.history ) let alertItem = OnboardViewModel( pageType: .alerts, - title: "onboarding_alerts".localized(for: Self.self), - subtitle: "onboarding_set_custom".localized(for: Self.self), + title: RuuviLocalization.onboardingAlerts, + subtitle: RuuviLocalization.onboardingSetCustom, image: RuuviAssets.alerts ) let shareItem = OnboardViewModel( pageType: .share, - title: "onboarding_share_your_sensors".localized(for: Self.self), - subtitle: "onboarding_sharees_can_use".localized(for: Self.self), + title: RuuviLocalization.onboardingShareYourSensors, + subtitle: RuuviLocalization.onboardingShareesCanUse, image: RuuviAssets.share ) let widgetItem = OnboardViewModel( pageType: .widgets, - title: "onboarding_handy_widgets".localized(for: Self.self), - subtitle: "onboarding_access_widgets".localized(for: Self.self), + title: RuuviLocalization.onboardingHandyWidgets, + subtitle: RuuviLocalization.onboardingAccessWidgets, image: RuuviAssets.widgets ) let webItem = OnboardViewModel( pageType: .web, - title: "onboarding_station_web".localized(for: Self.self), - subtitle: "onboarding_web_pros".localized(for: Self.self), + title: RuuviLocalization.onboardingStationWeb, + subtitle: RuuviLocalization.onboardingWebPros, image: RuuviAssets.web ) let signInItem = OnboardViewModel( pageType: .signIn, title: isUserAuthorized() ? - "onboarding_thats_it_already_signed_in".localized(for: Self.self) : - "onboarding_thats_it".localized(for: Self.self), + RuuviLocalization.onboardingThatsItAlreadySignedIn : + RuuviLocalization.onboardingThatsIt, subtitle: isUserAuthorized() ? - "onboarding_go_to_sign_in_already_signed_in".localized(for: Self.self) : - "onboarding_go_to_sign_in".localized(for: Self.self) + RuuviLocalization.onboardingGoToSignInAlreadySignedIn : + RuuviLocalization.onboardingGoToSignIn ) return [ diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/Util/RuuviBundleUtils.swift b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/Util/RuuviBundleUtils.swift index 19876bf35..d0385bb30 100644 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/Util/RuuviBundleUtils.swift +++ b/Modules/RuuviOnboard/Sources/RuuviOnboard/Pages/Util/RuuviBundleUtils.swift @@ -35,40 +35,6 @@ public extension UIImage { } } -extension String { - public func localized(for clazz: AnyClass) -> String { - let bundle: Bundle - #if SWIFT_PACKAGE - bundle = Bundle.module - #else - bundle = Bundle.pod(clazz) - #endif - if let module = NSStringFromClass(clazz).components(separatedBy: ".").first { - if let path = bundle.path(forResource: currentLanguage(), ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else if let path = bundle.path(forResource: "Base", ofType: "lproj"), - let bundle = Bundle(path: path) { - return bundle.localizedString(forKey: self, value: nil, table: module) - } else { - assertionFailure() - return self - } - } else { - assertionFailure() - return self - } - } - - private func currentLanguage() -> String { - if let preferred = Bundle.main.preferredLocalizations.first { - preferred - } else { - "Base" - } - } -} - public extension UIStoryboard { static func named(_ name: String, for clazz: AnyClass) -> UIStoryboard { let bundle: Bundle diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/de.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/de.lproj/RuuviOnboard.strings deleted file mode 100644 index a5b7645e4..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/de.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Wischen Sie, um zu sehen, was Ruuvi Station für Sie tun kann."; -"RuuviOnboard.Measure.title" = "Umweltdaten messen: Temperatur, relative Luftfeuchtigkeit und Luftdruck."; -"RuuviOnboard.Access.title" = "Greifen Sie in Echtzeit auf Daten für jeden verknüpften Sensor zu und erkunden Sie Verlaufsdiagramme."; -"RuuviOnboard.Alerts.title" = "Stellen Sie Benachrichtigungen ein und lassen Sie sich benachrichtigen, wenn Ihre Limits erreicht werden."; -"RuuviOnboard.Start.title" = "Drücken Sie SCAN, um Sensoren in der Nähe zu finden und Ihrer Ruuvi Station hinzuzufügen."; -"RuuviOnboard.Start.button" = "SCANNEN"; -"RuuviOnboard.Cloud.title" = "Melden Sie sich an, um das volle Potenzial der App zu nutzen."; -"RuuviOnboard.Cloud.subtitle" = "Beanspruchen Sie das Eigentum an Ihren Sensoren mit einem kostenlosen Ruuvi Cloud-Konto."; -"RuuviOnboard.Cloud.subtitle.signed" = "Super! Sie haben sich bereits angemeldet!"; -"RuuviOnboard.Cloud.SignIn.title" = "Einloggen"; -"RuuviOnboard.Cloud.Details.title" = "Einzelheiten"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Vorteile:\\n\\n ● Sensornamen, Hintergrundbilder, Offsets und Alarmeinstellungen werden sicher in der Cloud gespeichert\\n\\n ● Fernzugriff auf Sensoren über das Internet (erfordert ein Ruuvi Gateway)\\n\\n ● Teilen Sie Sensoren mit Freunden und Familie (erfordert ein Ruuvi Gateway)\\n\\n ● Sehen Sie bis zu 2 Jahre Geschichtsdaten auf station.ruuvi.com (erfordert ein Ruuvi-Gateway)"; -"RuuviOnboard.Cloud.Close.title" = "Schließen"; -"RuuviOnboard.Cloud.Skip.title" = "Sind Sie sicher, dass Sie die Anmeldung überspringen wollen?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Ja, überspringen"; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Zurückgehen"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Lernen Sie Ihre Ruuvi Station -App kennen."; -"onboarding_swipe_to_continue" = "Wischen Sie zum Fortfahren →"; -"onboarding_read_sensors_data" = "Lesen Sie Ihre Ruuvi-Sensoren"; -"onboarding_via_bluetooth_or_cloud" = "mit Bluetooth oder Ruuvi Cloud"; -"onboarding_follow_measurement" = "Sehen Sie alle Sensoren auf einen Blick auf Ihrem"; -"onboarding_dashboard" = "Dashboard"; -"onboarding_personalise" = "Personalisieren"; -"onboarding_your_sensors" = "Sie Ihre App mit benutzerdefinierten Namen und Hintergründen."; -"onboarding_explore_detailed" = "Erkunden Sie Ihren"; -"onboarding_history" = "Messverlauf"; -"onboarding_set_custom" = "Einstellen und anpassen"; -"onboarding_alerts" = "Alarme"; -"onboarding_share_your_sensors" = "zum Messen mit Ihren Freunden und Ihrer Familie."; -"onboarding_sharees_can_use" = "Teilen Sie Sensoren"; -"onboarding_handy_widgets" = "Widgets hinzu"; -"onboarding_access_widgets" = "Fügen Sie Ihre bevorzugten Sensoren als"; -"onboarding_station_web" = "Ruuvi Web App"; -"onboarding_web_pros" = "Großes Dashboard, mehrjähriger Verlauf, E-Mail-Benachrichtigungen und mehr in der"; -"onboarding_gateway_required" = "Ein Ruuvi Gateway -Router ist erforderlich."; -"onboarding_skip" = "Überspringen"; -"onboarding_thats_it" = "Fast dort!"; -"onboarding_thats_it_already_signed_in" = "Lass uns anfangen!"; -"onboarding_go_to_sign_in" = "Ruuvi ist besser, wenn Sie angemeldet sind. Machen Sie es jetzt oder fahren Sie ohne Cloud-Funktionen fort."; -"onboarding_go_to_sign_in_already_signed_in" = "Fangen wir an zu messen!"; -"onboarding_continue" = "Nächste"; diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/en.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/en.lproj/RuuviOnboard.strings deleted file mode 100644 index 23e521903..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/en.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Swipe to see what Ruuvi Station can do for you."; -"RuuviOnboard.Measure.title" = "Measure environmental data: temperature, relative humidity and air pressure."; -"RuuviOnboard.Access.title" = "Access data for each linked sensor in real time and explore history graphs."; -"RuuviOnboard.Alerts.title" = "Set alerts and get notified whenever your limits are hit."; -"RuuviOnboard.Start.title" = "Press SCAN to find and add nearby sensors to your Ruuvi Station."; -"RuuviOnboard.Start.button" = "SCAN"; -"RuuviOnboard.Cloud.title" = "Sign in to use the full potential of the app."; -"RuuviOnboard.Cloud.subtitle" = "Claim ownership of your sensors with a free Ruuvi Cloud account."; -"RuuviOnboard.Cloud.subtitle.signed" = "Great! You already signed in!"; -"RuuviOnboard.Cloud.SignIn.title" = "Sign in"; -"RuuviOnboard.Cloud.Details.title" = "Details"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Benefits:\\n\\n ● Sensor names, background images, offsets and alert settings will be securely stored in the cloud\\n\\n ● Access sensors remotely over the Internet (requires a Ruuvi Gateway)\\n\\n ● Share sensors with friends and family (requires a Ruuvi Gateway)\\n\\n ● Browse up to 2 years of history on station.ruuvi.com (requires a Ruuvi Gateway)"; -"RuuviOnboard.Cloud.Close.title" = "Close"; -"RuuviOnboard.Cloud.Skip.title" = "Are you sure want to skip sign in?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Yes, skip"; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Go Back"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Let's get to know your Ruuvi Station app."; -"onboarding_swipe_to_continue" = "Swipe to continue →"; -"onboarding_read_sensors_data" = "Read Your Ruuvi Sensors"; -"onboarding_via_bluetooth_or_cloud" = "using Bluetooth or Ruuvi Cloud"; -"onboarding_follow_measurement" = "View all sensors at a glance on your"; -"onboarding_dashboard" = "Dashboard"; -"onboarding_personalise" = "Personalise"; -"onboarding_your_sensors" = "your app with custom names and backgrounds."; -"onboarding_explore_detailed" = "Explore your measurement"; -"onboarding_history" = "History"; -"onboarding_set_custom" = "Set and customise your"; -"onboarding_alerts" = "Alerts"; -"onboarding_share_your_sensors" = "to measure together with your friends and family."; -"onboarding_sharees_can_use" = "Share Sensors"; -"onboarding_handy_widgets" = "Widgets"; -"onboarding_access_widgets" = "Bring your favorite sensors to your Home Screen and Lock Screen as"; -"onboarding_station_web" = "Ruuvi Web App"; -"onboarding_web_pros" = "Large dashboard, multi-year history, email alerts and more on"; -"onboarding_gateway_required" = "A Ruuvi Gateway router is required."; -"onboarding_skip" = "Skip"; -"onboarding_thats_it" = "Almost there!"; -"onboarding_thats_it_already_signed_in" = "Let's get started!"; -"onboarding_go_to_sign_in" = "Ruuvi experience is better when you're signed in. Do it now or continue without cloud features."; -"onboarding_go_to_sign_in_already_signed_in" = "Let's start measuring!"; -"onboarding_continue" = "Next"; diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fi.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fi.lproj/RuuviOnboard.strings deleted file mode 100644 index 29741bc95..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fi.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Tutustu Ruuvi Station -sovellukseen."; -"RuuviOnboard.Measure.title" = "Mittaa ympäristösi olosuhteita: lämpötilaa, ilmankosteutta ja ilmanpainetta."; -"RuuviOnboard.Access.title" = "Tarkastele anturitietoja reaaliaikaisesti tai tutki laitteelle tallennettuja historiatietoja."; -"RuuviOnboard.Alerts.title" = "Aseta hälytyksiä ja ilmoituksia haluamallasi tavalla."; -"RuuviOnboard.Start.title" = "Näytä lähietäisyydellä olevat anturit napauttamalla SKANNAA."; -"RuuviOnboard.Start.button" = "SKANNAA"; -"RuuviOnboard.Cloud.title" = "Kirjaudu sisään käyttääksesi kaikkia sovelluksen ominaisuuksia."; -"RuuviOnboard.Cloud.subtitle" = "Vahvista anturiesi omistajuudet ilmaisen Ruuvi Cloud -tilin avulla."; -"RuuviOnboard.Cloud.subtitle.signed" = "Hienoa, olet jo kirjautunut sisään!"; -"RuuviOnboard.Cloud.SignIn.title" = "Kirjaudu"; -"RuuviOnboard.Cloud.Details.title" = "Tiedot"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Hyödyt:\\n\\n ● Anturien nimet, taustakuvat sekä kalibrointi- ja hälytysasetukset tallentuvat turvallisesti tilillesi pilvipalveluun\\n\\n ● Lue anturitiedot etänä verkossa (vaatii Ruuvi Gateway -reitittimen)\\n\\n ● Jaa antureita ystävien ja perheen kesken (vaatii Ruuvi Gateway -reitittimen)\\n\\n ● Selaa jopa 2 vuoden historiatietoja osoitteessa station.ruuvi.com (vaatii Ruuvi Gateway -reitittimen)"; -"RuuviOnboard.Cloud.Close.title" = "Sulje"; -"RuuviOnboard.Cloud.Skip.title" = "Haluatko varmasti ohittaa sisäänkirjautumisen?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Kyllä, ohita"; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Takaisin"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Tutustu Ruuvi Station -sovellukseesi."; -"onboarding_swipe_to_continue" = "Jatka pyyhkäisemällä →"; -"onboarding_read_sensors_data" = "Lue Ruuvi-antureitasi"; -"onboarding_via_bluetooth_or_cloud" = "Bluetoothilla tai Ruuvi Cloudilla"; -"onboarding_follow_measurement" = "Seuraa kaikkia antureitasi"; -"onboarding_dashboard" = "koontinäytöltä"; -"onboarding_personalise" = "Personoi"; -"onboarding_your_sensors" = "sovelluksesi omilla nimillä ja taustakuvilla."; -"onboarding_explore_detailed" = "Tarkastele anturiesi"; -"onboarding_history" = "mittaushistoriaa"; -"onboarding_set_custom" = "Aseta ja säädä omat"; -"onboarding_alerts" = "hälytyksesi"; -"onboarding_share_your_sensors" = "ja mittaa yhdessä ystävien sekä perheen kesken."; -"onboarding_sharees_can_use" = "Jaa anturisi"; -"onboarding_handy_widgets" = "widgeteillä"; -"onboarding_access_widgets" = "Tuo suosikkianturisi kotinäytölle ja lukitusnäytölle"; -"onboarding_station_web" = "Ruuvin web-sovelluksessa"; -"onboarding_web_pros" = "Koontinäyttö, usean vuoden historia, sähköpostihälytykset ja paljon muuta"; -"onboarding_gateway_required" = "Vaatii Ruuvi Gateway -reitittimen."; -"onboarding_skip" = "Ohita"; -"onboarding_thats_it" = "Melkein valmista!"; -"onboarding_thats_it_already_signed_in" = "Aloitetaan!"; -"onboarding_go_to_sign_in" = "Kirjautumalla sisään saat parhaan Ruuvi-käyttökokemuksen. Tee se nyt tai jatka ilman pilviominaisuuksia."; -"onboarding_go_to_sign_in_already_signed_in" = "Lähdetään mittaamaan!"; -"onboarding_continue" = "Seuraava"; diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fr.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fr.lproj/RuuviOnboard.strings deleted file mode 100644 index a2d500bab..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/fr.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Découvrez l'application Ruuvi Station."; -"RuuviOnboard.Measure.title" = "Mesurer votre environnement : température, humidité, et pression de l'air."; -"RuuviOnboard.Access.title" = "Vérifier les données en temps réels ou consultez les histogrammes."; -"RuuviOnboard.Alerts.title" = "Définir des alarmes et des notifications comme vous le souhaitez."; -"RuuviOnboard.Start.title" = "Afficher les capteurs à proximité en appuyant sur BALAYAGE."; -"RuuviOnboard.Start.button" = "BALAYAGE EN COURS"; -"RuuviOnboard.Cloud.title" = "Connectez-vous pour utiliser tout le potentiel de l'application."; -"RuuviOnboard.Cloud.subtitle" = "Réclamez la propriété de vos capteurs avec un compte Ruuvi Cloud gratuit."; -"RuuviOnboard.Cloud.subtitle.signed" = "Super ! Vous vous êtes déjà connecté !"; -"RuuviOnboard.Cloud.SignIn.title" = "Connexion"; -"RuuviOnboard.Cloud.Details.title" = "Détails"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Avantages :\\n\\n ● Les noms, fonds d'écrans, les réglages de calibration, ainsi que les alertes sont enregistrés de façon sécurisée dans notre cloud\\n\\n ● Consultez les données à distance depuis n'importe quel navigateur (routeur Ruuvi Gateway requis)\\n\\n ● Partager les capteurs avec votre famille ou des amis (routeur Ruuvi Gateway requis)\\n\\n ● consultez jusqu'à deux ans d'historique de vos données sur le site station.ruuvi.com (routeur Ruuvi Gateway requis)"; -"RuuviOnboard.Cloud.Close.title" = "Fermer"; -"RuuviOnboard.Cloud.Skip.title" = "Êtes-vous sûr de vouloir ignorer l'ouverture de session ?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Oui, passez."; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Retourner"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Apprenez à connaître votre application Ruuvi Station."; -"onboarding_swipe_to_continue" = "Balayez pour continuer →"; -"onboarding_read_sensors_data" = "Lisez vos capteurs Ruuvi"; -"onboarding_via_bluetooth_or_cloud" = "en utilisant Bluetooth ou Ruuvi Cloud"; -"onboarding_follow_measurement" = "Visualisez tous les capteurs en un coup d'œil sur votre"; -"onboarding_dashboard" = "tableau de bord"; -"onboarding_personalise" = "Personnalisez"; -"onboarding_your_sensors" = "votre application avec des noms et des arrière-plans personnalisés."; -"onboarding_explore_detailed" = "Explorez votre"; -"onboarding_history" = "historique de mesure"; -"onboarding_set_custom" = "Définissez et personnalisez vos"; -"onboarding_alerts" = "alertes"; -"onboarding_share_your_sensors" = "à mesurer avec vos amis et votre famille."; -"onboarding_sharees_can_use" = "Partagez des capteurs"; -"onboarding_handy_widgets" = "de widgets"; -"onboarding_access_widgets" = "Apportez vos capteurs préférés sur votre écran d'accueil et votre écran de verrouillage sous forme"; -"onboarding_station_web" = "l'application Web Ruuvi"; -"onboarding_web_pros" = "Grand tableau de bord, historique pluriannuel, alertes par e-mail et plus encore sur"; -"onboarding_gateway_required" = "Un routeur Ruuvi Gateway est requis."; -"onboarding_skip" = "Ignorer"; -"onboarding_thats_it" = "Presque là!"; -"onboarding_thats_it_already_signed_in" = "Commençons!"; -"onboarding_go_to_sign_in" = "L'expérience Ruuvi est meilleure lorsque vous êtes connecté. Faites-le maintenant ou continuez sans les fonctionnalités cloud."; -"onboarding_go_to_sign_in_already_signed_in" = "Commençons à mesurer !"; -"onboarding_continue" = "Suivant"; diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/ru.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/ru.lproj/RuuviOnboard.strings deleted file mode 100644 index df53084c8..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/ru.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Проведите пальцем чтобы узнать, чем Ruuvi Station может помочь вам."; -"RuuviOnboard.Measure.title" = "Измеряйте параметры окружающей среды: температуру, влажность и атмосферное давление."; -"RuuviOnboard.Access.title" = "В реальном времени считывайте показатели с датчиков и просматривайте историю на графиках."; -"RuuviOnboard.Alerts.title" = "Устанавливайте лимиты значений, при превышении которых вы получите уведомление."; -"RuuviOnboard.Start.title" = "Нажмите СКАНИРОВАТЬ, чтобы найти и добавить датчики в Ruuvi Station."; -"RuuviOnboard.Start.button" = "СКАНИРОВАТЬ"; -"RuuviOnboard.Cloud.title" = "Sign in to use the full potential of the app."; -"RuuviOnboard.Cloud.subtitle" = "Claim ownership of your sensors with a free Ruuvi Cloud account."; -"RuuviOnboard.Cloud.subtitle.signed" = "Great! You already signed in!"; -"RuuviOnboard.Cloud.SignIn.title" = "Войти"; -"RuuviOnboard.Cloud.Details.title" = "Подробнее"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Преимущества:\\n\\n ● Название датчика, изображение фона, данные калибровки и настройки тревог будут безопасно храниться в облаке\\n\\n ● Получите доступ к датчикам через интернет (требуестся Ruuvi Gateway)\\n\\n ● Поделитесь данными датчиков с друзьями и членами семьи (требуется Ruuvi Gateway)\\n\\n ● Просматривайте до 2-х лет истории на сайте station.ruuvi.com (требуется a Ruuvi Gateway)"; -"RuuviOnboard.Cloud.Close.title" = "Закрыть"; -"RuuviOnboard.Cloud.Skip.title" = "Точно хотите пропустить вход?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Пропустить"; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Назад"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Let's get to know your Ruuvi Station app."; -"onboarding_swipe_to_continue" = "Swipe to continue →"; -"onboarding_read_sensors_data" = "Read Your Ruuvi Sensors"; -"onboarding_via_bluetooth_or_cloud" = "using Bluetooth or Ruuvi Cloud"; -"onboarding_follow_measurement" = "View all sensors at a glance on your"; -"onboarding_dashboard" = "Dashboard"; -"onboarding_personalise" = "Personalise"; -"onboarding_your_sensors" = "your app with custom names and backgrounds."; -"onboarding_explore_detailed" = "Explore your measurement"; -"onboarding_history" = "History"; -"onboarding_set_custom" = "Set and customise your"; -"onboarding_alerts" = "Alerts"; -"onboarding_share_your_sensors" = "to measure together with your friends and family."; -"onboarding_sharees_can_use" = "Share Sensors"; -"onboarding_handy_widgets" = "Widgets"; -"onboarding_access_widgets" = "Bring your favorite sensors to your Home Screen and Lock Screen as"; -"onboarding_station_web" = "Ruuvi Web App"; -"onboarding_web_pros" = "Large dashboard, multi-year history, email alerts and more on"; -"onboarding_gateway_required" = "A Ruuvi Gateway router is required."; -"onboarding_skip" = "Skip"; -"onboarding_thats_it" = "Almost there!"; -"onboarding_thats_it_already_signed_in" = "Let's get started!"; -"onboarding_go_to_sign_in" = "Ruuvi experience is better when you're signed in. Do it now or continue without cloud features."; -"onboarding_go_to_sign_in_already_signed_in" = "Let's start measuring!"; -"onboarding_continue" = "Next"; diff --git a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/sv.lproj/RuuviOnboard.strings b/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/sv.lproj/RuuviOnboard.strings deleted file mode 100644 index d496039b3..000000000 --- a/Modules/RuuviOnboard/Sources/RuuviOnboard/Resources/sv.lproj/RuuviOnboard.strings +++ /dev/null @@ -1,45 +0,0 @@ -"RuuviOnboard.Welcome.title" = "Det här kan Ruuvi Station göra för dig."; -"RuuviOnboard.Measure.title" = "Mät förhållandena i din miljö: temperatur, luftfuktighet och lufttryck."; -"RuuviOnboard.Access.title" = "Visa sensordata i realtid eller granska historisk data som är lagrad på enheten."; -"RuuviOnboard.Alerts.title" = "Ställ in alarm och få notiser om dem."; -"RuuviOnboard.Start.title" = "Tryck på SCAN för att se sensorerna i närheten."; -"RuuviOnboard.Start.button" = "SKANNA"; -"RuuviOnboard.Cloud.title" = "Logga in för att använda appens fulla potential."; -"RuuviOnboard.Cloud.subtitle" = "Gör anspråk på äganderätten till dina sensorer med ett gratis Ruuvi Cloud-konto."; -"RuuviOnboard.Cloud.subtitle.signed" = "Bra! Du har redan loggat in!"; -"RuuviOnboard.Cloud.SignIn.title" = "Logga in"; -"RuuviOnboard.Cloud.Details.title" = "Detaljer"; -"RuuviOnboard.Cloud.Benefits.title" = "Ruuvi Cloud"; -"RuuviOnboard.Cloud.Benefits.message" = "Fördelar:\\n\\n ● Sensornamn, bakgrundsbilder, kalibrering och larminformation från en säker molntjänst\\n\\n ● Läs sensorinformation på distans online ( kräver Ruuvi Gateway-router)\\n\\n ● Dela sensorer med vänner och familj (kräver Ruuvi Gateway)\\n\\n ● Upp till 2 års historik från station.ruuvi.com (kräver Ruuvi Gateway)"; -"RuuviOnboard.Cloud.Close.title" = "Stäng"; -"RuuviOnboard.Cloud.Skip.title" = "Är du säker på att du vill hoppa över inloggningen?"; -"RuuviOnboard.Cloud.Skip.Yes.title" = "Ja, hoppa över"; -"RuuviOnboard.Cloud.Skip.GoBack.title" = "Gå tillbaka"; - -// New Onboarding -"onboarding_measure_your_world" = "Measure Your World"; -"onboarding_with_ruuvi_sensors" = "Lär känna din Ruuvi Station -applikation."; -"onboarding_swipe_to_continue" = "Dra för att fortsätta →"; -"onboarding_read_sensors_data" = "Läs dina Ruuvi-sensorer"; -"onboarding_via_bluetooth_or_cloud" = "med Bluetooth eller Ruuvi Cloud"; -"onboarding_follow_measurement" = "Se alla sensorer med en blick på din"; -"onboarding_dashboard" = "instrumentpanel"; -"onboarding_personalise" = "Anpassa"; -"onboarding_your_sensors" = "din app med anpassade namn och bakgrunder."; -"onboarding_explore_detailed" = "Utforska din"; -"onboarding_history" = "mäthistorik"; -"onboarding_set_custom" = "Ställ in och anpassa dina"; -"onboarding_alerts" = "varningar"; -"onboarding_share_your_sensors" = "för att mäta tillsammans med dina vänner och familj."; -"onboarding_sharees_can_use" = "Dela sensorer"; -"onboarding_handy_widgets" = "widgets"; -"onboarding_access_widgets" = "Ta med dina favoritsensorer till din startskärm och låsskärm som"; -"onboarding_station_web" = "Ruuvi webbappen"; -"onboarding_web_pros" = "Stor instrumentpanel, flerårig historik, e-postvarningar och mer på"; -"onboarding_gateway_required" = "En Ruuvi Gateway -router krävs."; -"onboarding_skip" = "Hoppa över"; -"onboarding_thats_it" = "Nästan där!"; -"onboarding_thats_it_already_signed_in" = "Låt oss börja!"; -"onboarding_go_to_sign_in" = "Ruuvi-upplevelsen är bättre när du är inloggad. Gör det nu eller fortsätt utan molnfunktioner."; -"onboarding_go_to_sign_in_already_signed_in" = "Låt oss börja mäta!"; -"onboarding_continue" = "Nästa";