From fdbb41e0fd2d35ed8747ac67e9c37016b6ffd7b8 Mon Sep 17 00:00:00 2001 From: Yannik Bloscheck Date: Wed, 9 Jul 2025 15:15:34 +0200 Subject: [PATCH] [ios] Changed settings to SwiftUI Signed-off-by: Yannik Bloscheck --- iphone/Maps/Bridging/BridgeControllers.swift | 23 +- iphone/Maps/Bridging/SafariView.swift | 9 +- iphone/Maps/Classes/MapViewController.mm | 6 - .../Maps/Core/DeepLink/DeepLinkHandler.swift | 8 +- iphone/Maps/Core/Settings/MWMSettings.h | 15 +- iphone/Maps/Core/Settings/MWMSettings.mm | 82 ++ .../Maps/Core/TextToSpeech/MWMTextToSpeech.h | 5 + .../Maps/Core/TextToSpeech/MWMTextToSpeech.mm | 62 ++ .../Maps/Core/Theme/Core/ThemeManager.swift | 2 +- iphone/Maps/Core/Theme/GlobalStyleSheet.swift | 2 +- .../Core/iCloud/SynchronizaionManager.swift | 20 +- .../Contents.json | 20 + .../af.lproj/Localizable.strings | 8 +- .../ar.lproj/Localizable.strings | 8 +- .../az.lproj/Localizable.strings | 8 +- .../be.lproj/Localizable.strings | 8 +- .../bg.lproj/Localizable.strings | 8 +- .../ca.lproj/Localizable.strings | 8 +- .../cs.lproj/Localizable.strings | 8 +- .../da.lproj/Localizable.strings | 8 +- .../de.lproj/Localizable.strings | 8 +- .../el.lproj/Localizable.strings | 8 +- .../en-GB.lproj/Localizable.strings | 10 +- .../en.lproj/Localizable.strings | 8 +- .../es-MX.lproj/Localizable.strings | 8 +- .../es.lproj/Localizable.strings | 8 +- .../et.lproj/Localizable.strings | 8 +- .../eu.lproj/Localizable.strings | 8 +- .../fa.lproj/Localizable.strings | 8 +- .../fi.lproj/Localizable.strings | 8 +- .../fr.lproj/Localizable.strings | 8 +- .../he.lproj/Localizable.strings | 8 +- .../hi.lproj/Localizable.strings | 8 +- .../hu.lproj/Localizable.strings | 8 +- .../id.lproj/Localizable.strings | 8 +- .../it.lproj/Localizable.strings | 8 +- .../ja.lproj/Localizable.strings | 8 +- .../ko.lproj/Localizable.strings | 8 +- .../lt.lproj/Localizable.strings | 8 +- .../lv.lproj/Localizable.strings | 8 +- .../mr.lproj/Localizable.strings | 8 +- .../mt.lproj/Localizable.strings | 8 +- .../nb.lproj/Localizable.strings | 8 +- .../nl.lproj/Localizable.strings | 8 +- .../pl.lproj/Localizable.strings | 8 +- .../pt-BR.lproj/Localizable.strings | 8 +- .../pt.lproj/Localizable.strings | 8 +- .../ro.lproj/Localizable.strings | 8 +- .../ru.lproj/Localizable.strings | 8 +- .../sk.lproj/Localizable.strings | 8 +- .../sr.lproj/Localizable.strings | 8 +- .../sv.lproj/Localizable.strings | 8 +- .../sw.lproj/Localizable.strings | 8 +- .../th.lproj/Localizable.strings | 8 +- .../tr.lproj/Localizable.strings | 8 +- .../uk.lproj/Localizable.strings | 8 +- .../vi.lproj/Localizable.strings | 8 +- .../zh-Hans.lproj/Localizable.strings | 8 +- .../zh-Hant.lproj/Localizable.strings | 8 +- iphone/Maps/Maps.xcodeproj/project.pbxproj | 126 +-- iphone/Maps/Model/Profile.swift | 1 - ...nnouncingSpeedTrapsWhileVoiceRouting.swift | 30 + .../Model/Settings Types/Appearance.swift | 30 + .../Model/Settings Types/DistanceUnit.swift | 27 + .../Settings Types/MobileDataPolicy.swift | 30 + .../Settings Types/PowerSavingMode.swift | 30 + .../Settings Types/VoiceRoutingLanguage.swift | 31 + iphone/Maps/Model/Settings.swift | 362 +++++++ .../Menu/BottomMenuInteractor.swift | 2 +- .../BottomMenu/Menu/BottomMenuPresenter.swift | 4 +- .../TabBar/BottomTabBarViewController.swift | 2 +- .../AboutController/AboutController.swift | 4 +- .../ElevationProfileFormatter.swift | 2 +- .../SettingsTableViewDetailedSwitchCell.swift | 19 - .../Cells/SettingsTableViewLinkCell.swift | 22 - .../SettingsTableViewSelectableCell.swift | 24 - .../Cells/SettingsTableViewSwitchCell.swift | 68 -- .../SettingsTableViewiCloudSwitchCell.swift | 15 - .../UI/Settings/DrivingOptions.storyboard | 138 --- .../DrivingOptionsViewController.swift | 33 - .../MWMMobileInternetViewController.h | 5 - .../MWMMobileInternetViewController.m | 68 -- .../Maps/UI/Settings/MWMNightModeController.h | 5 - .../Maps/UI/Settings/MWMNightModeController.m | 58 -- .../MWMPowerManagmentViewController.h | 5 - .../MWMPowerManagmentViewController.mm | 66 -- .../UI/Settings/MWMSettingsViewController.h | 5 - .../UI/Settings/MWMSettingsViewController.mm | 394 -------- .../Settings/MWMTTSLanguageViewController.h | 5 - .../Settings/MWMTTSLanguageViewController.mm | 44 - .../Settings/MWMTTSSettingsViewController.h | 13 - .../Settings/MWMTTSSettingsViewController.mm | 391 -------- iphone/Maps/UI/Settings/MWMUnitsController.h | 5 - iphone/Maps/UI/Settings/MWMUnitsController.mm | 49 - .../Profile/ExistingProfileView.swift | 63 +- .../Profile/NoExistingProfileView.swift | 31 +- .../UI/Settings/Profile/ProfileView.swift | 14 +- .../UI/Settings/SettingsNavigationView.swift | 177 ++++ iphone/Maps/UI/Settings/SettingsView.swift | 299 ++++++ iphone/Maps/UI/Storyboard/Main.storyboard | 62 +- iphone/Maps/UI/Storyboard/Settings.storyboard | 940 ------------------ iphone/Maps/UI/Storyboard/Storyboard.swift | 4 - 102 files changed, 1726 insertions(+), 2609 deletions(-) create mode 100644 iphone/Maps/Images.xcassets/Alternative Accent Color.colorset/Contents.json create mode 100644 iphone/Maps/Model/Settings Types/AnnouncingSpeedTrapsWhileVoiceRouting.swift create mode 100644 iphone/Maps/Model/Settings Types/Appearance.swift create mode 100644 iphone/Maps/Model/Settings Types/DistanceUnit.swift create mode 100644 iphone/Maps/Model/Settings Types/MobileDataPolicy.swift create mode 100644 iphone/Maps/Model/Settings Types/PowerSavingMode.swift create mode 100644 iphone/Maps/Model/Settings Types/VoiceRoutingLanguage.swift create mode 100644 iphone/Maps/Model/Settings.swift delete mode 100644 iphone/Maps/UI/Settings/Cells/SettingsTableViewDetailedSwitchCell.swift delete mode 100644 iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift delete mode 100644 iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift delete mode 100644 iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift delete mode 100644 iphone/Maps/UI/Settings/Cells/SettingsTableViewiCloudSwitchCell.swift delete mode 100644 iphone/Maps/UI/Settings/DrivingOptions.storyboard delete mode 100644 iphone/Maps/UI/Settings/DrivingOptionsViewController.swift delete mode 100644 iphone/Maps/UI/Settings/MWMMobileInternetViewController.h delete mode 100644 iphone/Maps/UI/Settings/MWMMobileInternetViewController.m delete mode 100644 iphone/Maps/UI/Settings/MWMNightModeController.h delete mode 100644 iphone/Maps/UI/Settings/MWMNightModeController.m delete mode 100644 iphone/Maps/UI/Settings/MWMPowerManagmentViewController.h delete mode 100644 iphone/Maps/UI/Settings/MWMPowerManagmentViewController.mm delete mode 100644 iphone/Maps/UI/Settings/MWMSettingsViewController.h delete mode 100644 iphone/Maps/UI/Settings/MWMSettingsViewController.mm delete mode 100644 iphone/Maps/UI/Settings/MWMTTSLanguageViewController.h delete mode 100644 iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm delete mode 100644 iphone/Maps/UI/Settings/MWMTTSSettingsViewController.h delete mode 100644 iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm delete mode 100644 iphone/Maps/UI/Settings/MWMUnitsController.h delete mode 100644 iphone/Maps/UI/Settings/MWMUnitsController.mm create mode 100644 iphone/Maps/UI/Settings/SettingsNavigationView.swift create mode 100644 iphone/Maps/UI/Settings/SettingsView.swift delete mode 100644 iphone/Maps/UI/Storyboard/Settings.storyboard diff --git a/iphone/Maps/Bridging/BridgeControllers.swift b/iphone/Maps/Bridging/BridgeControllers.swift index 4c09ae367..95877ab24 100644 --- a/iphone/Maps/Bridging/BridgeControllers.swift +++ b/iphone/Maps/Bridging/BridgeControllers.swift @@ -1,24 +1,31 @@ -import UIKit import SwiftUI - +import UIKit /// Class for accesing SwiftUI views from Objective-C code @objc class BridgeControllers: NSObject { - /// The `ProfileView` - @objc static func profile() -> UIViewController { - return UIHostingController(rootView: ProfileView()) - } - /// The `ProfileView` for presentation in an alert @objc static func profileAsAlert() -> UIViewController { - return UIHostingController(rootView: ProfileView(isPresentedAsAlert: true)) + let profileBridgeController = UIHostingController(rootView: ProfileView(isPresentedAsAlert: true)) + profileBridgeController.view.backgroundColor = .systemGroupedBackground + return profileBridgeController } } + +/// Class for using the SwiftUI `SettingsView` in the interface builder +class SettingsBridgeController: UIHostingController { + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder, rootView: SettingsView()) + } +} + + + /// Class for using the SwiftUI `ProfileView` in the interface builder class ProfileBridgeController: UIHostingController { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder, rootView: ProfileView()) + self.view.tintColor = .alternativeAccent } } diff --git a/iphone/Maps/Bridging/SafariView.swift b/iphone/Maps/Bridging/SafariView.swift index 1b681b0c2..e27d38699 100644 --- a/iphone/Maps/Bridging/SafariView.swift +++ b/iphone/Maps/Bridging/SafariView.swift @@ -1,11 +1,14 @@ -import SwiftUI import SafariServices - +import SwiftUI /// View for Safari via a Safari view controller struct SafariView: UIViewControllerRepresentable { // MARK: Properties + /// The notification name for dismissing this view + static let dismissNotificationName: Notification.Name = Notification.Name(rawValue: "DismissSafariView") + + /// The url let url: URL @@ -24,7 +27,7 @@ struct SafariView: UIViewControllerRepresentable { let safariViewControllerConfiguration = SFSafariViewController.Configuration() safariViewControllerConfiguration.activityButton = nil safariViewControllerConfiguration.barCollapsingEnabled = true - + let safariViewController = SFSafariViewController(url: url, configuration: safariViewControllerConfiguration) safariViewController.preferredBarTintColor = UIColor.accent safariViewController.preferredControlTintColor = UIColor.white diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 9b679c0cb..4ee132cf5 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -605,12 +605,6 @@ NSString *const kSettingsSegue = @"Map2Settings"; [self.navigationController pushViewController:descriptionViewController animated:YES]; } -- (void)openDrivingOptions { - UIStoryboard *sb = [UIStoryboard instance:MWMStoryboardDrivingOptions]; - UIViewController *vc = [sb instantiateInitialViewController]; - [self.navigationController pushViewController:vc animated:YES]; -} - - (void)processMyPositionStateModeEvent:(MWMMyPositionMode)mode { self.currentPositionMode = mode; [MWMLocationManager setMyPositionMode:mode]; diff --git a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift index 6b575edb4..aed08970f 100644 --- a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift +++ b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift @@ -138,9 +138,7 @@ Task(priority: .userInitiated) { await Profile.saveAuthorizationToken(from: code) DispatchQueue.main.sync { - let window = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow - window?.rootViewController?.presentedViewController?.navigationController?.popToRootViewController(animated: true) - window?.rootViewController?.presentedViewController?.dismiss(animated: true) + NotificationCenter.default.post(name: SafariView.dismissNotificationName, object: nil) } } return true @@ -149,9 +147,7 @@ } case .incorrect: if url.absoluteString.starts(with: "cm://oauth2/osm/callback") { - let window = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow - window?.rootViewController?.presentedViewController?.navigationController?.popToRootViewController(animated: true) - window?.rootViewController?.presentedViewController?.dismiss(animated: true) + NotificationCenter.default.post(name: SafariView.dismissNotificationName, object: nil) } // Invalid URL or API parameters. return false; diff --git a/iphone/Maps/Core/Settings/MWMSettings.h b/iphone/Maps/Core/Settings/MWMSettings.h index 2e7751f05..49978d655 100644 --- a/iphone/Maps/Core/Settings/MWMSettings.h +++ b/iphone/Maps/Core/Settings/MWMSettings.h @@ -1,6 +1,15 @@ -NS_SWIFT_NAME(Settings) +NS_SWIFT_NAME(SettingsBridge) @interface MWMSettings : NSObject ++ (BOOL)buildings3dViewEnabled; ++ (void)setBuildings3dViewEnabled:(BOOL)buildings3dViewEnabled; + ++ (BOOL)perspectiveViewEnabled; ++ (void)setPerspectiveViewEnabled:(BOOL)perspectiveViewEnabled; + ++ (BOOL)autoZoomEnabled; ++ (void)setAutoZoomEnabled:(BOOL)autoZoomEnabled; + + (BOOL)autoDownloadEnabled; + (void)setAutoDownloadEnabled:(BOOL)autoDownloadEnabled; @@ -16,6 +25,9 @@ NS_SWIFT_NAME(Settings) + (MWMTheme)theme; + (void)setTheme:(MWMTheme)theme; ++ (NSInteger)powerManagement; ++ (void)setPowerManagement:(NSInteger)powerManagement; + + (BOOL)routingDisclaimerApproved; + (void)setRoutingDisclaimerApproved; @@ -40,5 +52,6 @@ NS_SWIFT_NAME(Settings) + (void)initializeLogging; + (BOOL)isFileLoggingEnabled; + (void)setFileLoggingEnabled:(BOOL)fileLoggingEnabled; ++ (NSInteger)logFileSize; @end diff --git a/iphone/Maps/Core/Settings/MWMSettings.mm b/iphone/Maps/Core/Settings/MWMSettings.mm index 4b9710ae9..297cb7a8a 100644 --- a/iphone/Maps/Core/Settings/MWMSettings.mm +++ b/iphone/Maps/Core/Settings/MWMSettings.mm @@ -6,6 +6,8 @@ #include #include +using namespace power_management; + namespace { char const * kAutoDownloadEnabledKey = "AutoDownloadEnabled"; @@ -24,6 +26,57 @@ NSString * const kUDFileLoggingEnabledKey = @"FileLoggingEnabledKey"; @implementation MWMSettings ++ (BOOL)buildings3dViewEnabled; +{ + bool _ = true, on = true; + GetFramework().Load3dMode(_, on); + if (GetFramework().GetPowerManager().GetScheme() == power_management::Scheme::EconomyMaximum) { + return false; + } else { + return on; + } +} + ++ (void)setBuildings3dViewEnabled:(BOOL)buildings3dViewEnabled; +{ + auto &f = GetFramework(); + bool _ = true, is3dBuildings = true; + f.Load3dMode(_, is3dBuildings); + is3dBuildings = static_cast(buildings3dViewEnabled); + f.Save3dMode(_, is3dBuildings); + f.Allow3dMode(_, is3dBuildings); +} + ++ (BOOL)perspectiveViewEnabled; +{ + bool _ = true, on = true; + auto &f = GetFramework(); + f.Load3dMode(on, _); + return on; +} + ++ (void)setPerspectiveViewEnabled:(BOOL)perspectiveViewEnabled; +{ + auto &f = GetFramework(); + bool is3d = true, _ = true; + f.Load3dMode(is3d, _); + is3d = static_cast(perspectiveViewEnabled); + f.Save3dMode(is3d, _); + f.Allow3dMode(is3d, _); +} + ++ (BOOL)autoZoomEnabled +{ + return GetFramework().LoadAutoZoom(); +} + ++ (void)setAutoZoomEnabled:(BOOL)autoZoomEnabled +{ + auto &f = GetFramework(); + f.AllowAutoZoom(autoZoomEnabled); + f.SaveAutoZoom(autoZoomEnabled); +} + + (BOOL)autoDownloadEnabled { bool autoDownloadEnabled = true; @@ -101,6 +154,29 @@ NSString * const kUDFileLoggingEnabledKey = @"FileLoggingEnabledKey"; [MWMThemeManager invalidate]; } ++ (NSInteger)powerManagement +{ + Scheme scheme = GetFramework().GetPowerManager().GetScheme(); + if (scheme == Scheme::EconomyMaximum) { + return 2; + } else if (scheme == Scheme::Auto) { + return 1; + } + + return 0; +} + ++ (void)setPowerManagement:(NSInteger)powerManagement +{ + Scheme scheme = Scheme::Normal; + if (powerManagement == 2) { + scheme = Scheme::EconomyMaximum; + } else if (powerManagement == 1) { + scheme = Scheme::Auto; + } + GetFramework().GetPowerManager().SetScheme(scheme); +} + + (BOOL)routingDisclaimerApproved { bool enabled = false; @@ -185,4 +261,10 @@ NSString * const kUDFileLoggingEnabledKey = @"FileLoggingEnabledKey"; [Logger setFileLoggingEnabled:fileLoggingEnabled]; } ++ (NSInteger)logFileSize +{ + uint64_t logFileSize = [Logger getLogFileSize]; + return logFileSize; +} + @end diff --git a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.h b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.h index 7e5d030a3..31692b474 100644 --- a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.h +++ b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.h @@ -7,7 +7,12 @@ + (void)setTTSEnabled:(BOOL)enabled; + (BOOL)isStreetNamesTTSEnabled; + (void)setStreetNamesTTSEnabled:(BOOL)enabled; ++ (NSDictionary *)availableLanguages; ++ (NSString *)selectedLanguage; + (NSString *)savedLanguage; ++ (NSInteger)speedCameraMode; ++ (void)setSpeedCameraMode:(NSInteger)speedCameraMode; ++ (void)playTest; + (void)addObserver:(id)observer; + (void)removeObserver:(id)observer; diff --git a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm index efcb8b383..da932040b 100644 --- a/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm +++ b/iphone/Maps/Core/TextToSpeech/MWMTextToSpeech.mm @@ -2,6 +2,7 @@ #import "MWMRouter.h" #import "MWMTextToSpeech+CPP.h" #import "SwiftBridge.h" +#import "TTSTester.h" #include "LocaleTranslator.h" @@ -10,6 +11,7 @@ #include "platform/languages.hpp" using namespace locale_translator; +using namespace routing; namespace { @@ -169,10 +171,63 @@ using Observers = NSHashTable; } - (BOOL)active { return [[self class] isTTSEnabled] && [MWMRouter areTurnNotificationsEnabled]; } + ++ (NSDictionary *)availableLanguages +{ + NSMutableDictionary *availableLanguages = [[NSMutableDictionary alloc] init]; + auto const & v = [[self tts] availableLanguages]; + for (auto i: v) { + [availableLanguages setObject:@(i.second.c_str()) forKey:@(i.first.c_str())]; + } + return availableLanguages; +} + ++ (NSString *)selectedLanguage { + if ([self savedLanguage] != nil) { + return [self savedLanguage]; + } + + NSString * preferedLanguageBcp47 = [AVSpeechSynthesisVoice currentLanguageCode]; + + std::pair const lan = + std::make_pair(preferedLanguageBcp47.UTF8String, tts::translateLocale(preferedLanguageBcp47.UTF8String)); + + std::vector> const availableLanguages = [[self tts] availableLanguages]; + if (find(availableLanguages.begin(), availableLanguages.end(), lan) != + availableLanguages.end()) { + return preferedLanguageBcp47; + } + + return kDefaultLanguage; +} + + (NSString *)savedLanguage { return [NSUserDefaults.standardUserDefaults stringForKey:kUserDefaultsTTSLanguageBcp47]; } ++ (NSInteger)speedCameraMode +{ + SpeedCameraManagerMode mode = GetFramework().GetRoutingManager().GetSpeedCamManager().GetMode(); + if (mode == SpeedCameraManagerMode::Auto) { + return 2; + } else if (mode == SpeedCameraManagerMode::Always) { + return 1; + } + + return 0; +} + ++ (void)setSpeedCameraMode:(NSInteger)speedCameraMode +{ + SpeedCameraManagerMode mode = SpeedCameraManagerMode::Never; + if (speedCameraMode == 2) { + mode = SpeedCameraManagerMode::Auto; + } else if (speedCameraMode == 1) { + mode = SpeedCameraManagerMode::Always; + } + GetFramework().GetRoutingManager().GetSpeedCamManager().SetMode(mode); +} + - (void)createVoice:(NSString *)locale { if (!self.speechSynthesizer) { self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; @@ -207,6 +262,13 @@ using Observers = NSHashTable; } } ++ (void)playTest +{ + TTSTester * ttsTester = [[TTSTester alloc] init]; + [ttsTester playRandomTestString]; +} + + - (void)speakOneString:(NSString *)textToSpeak { AVSpeechUtterance * utterance = [AVSpeechUtterance speechUtteranceWithString:textToSpeak]; utterance.voice = self.speechVoice; diff --git a/iphone/Maps/Core/Theme/Core/ThemeManager.swift b/iphone/Maps/Core/Theme/Core/ThemeManager.swift index 49713432f..cf10fca0c 100644 --- a/iphone/Maps/Core/Theme/Core/ThemeManager.swift +++ b/iphone/Maps/Core/Theme/Core/ThemeManager.swift @@ -66,7 +66,7 @@ final class ThemeManager: NSObject { } @objc static func invalidate() { - instance.update(theme: Settings.theme()) + instance.update(theme: SettingsBridge.theme()) } @available(iOS 13.0, *) diff --git a/iphone/Maps/Core/Theme/GlobalStyleSheet.swift b/iphone/Maps/Core/Theme/GlobalStyleSheet.swift index 321c0f7a5..921b65b87 100644 --- a/iphone/Maps/Core/Theme/GlobalStyleSheet.swift +++ b/iphone/Maps/Core/Theme/GlobalStyleSheet.swift @@ -136,7 +136,7 @@ extension GlobalStyleSheet: IStyleSheet { } case .switch: return .add { s in - s.onTintColor = colors.linkBlue + s.onTintColor = UIColor.accent } case .pageControl: return .add { s in diff --git a/iphone/Maps/Core/iCloud/SynchronizaionManager.swift b/iphone/Maps/Core/iCloud/SynchronizaionManager.swift index 6555f7e7e..0f29c2e1e 100644 --- a/iphone/Maps/Core/iCloud/SynchronizaionManager.swift +++ b/iphone/Maps/Core/iCloud/SynchronizaionManager.swift @@ -1,3 +1,5 @@ +import Combine + enum VoidResult { case success case failure(Error) @@ -37,10 +39,16 @@ final class iCloudSynchronizaionManager: NSObject { var onSynchronizationStateDidChangeHandler: ((SynchronizationManagerState) -> Void)? } + var statePublisher: AnyPublisher { + stateSubject.eraseToAnyPublisher() + } + + private let stateSubject = PassthroughSubject() + let fileManager: FileManager private let localDirectoryMonitor: LocalDirectoryMonitor private let cloudDirectoryMonitor: CloudDirectoryMonitor - private let settings: Settings.Type + private let settings: SettingsBridge.Type private let bookmarksManager: BookmarksManager private var synchronizationStateManager: SynchronizationStateResolver private var fileWriter: SynchronizationFileWriter? @@ -66,7 +74,7 @@ final class iCloudSynchronizaionManager: NSObject { do { let localDirectoryMonitor = try FileSystemDispatchSourceMonitor(fileManager: fileManager, directory: fileManager.bookmarksDirectoryUrl, fileType: fileType) let clodStorageManager = iCloudSynchronizaionManager(fileManager: fileManager, - settings: Settings.self, + settings: SettingsBridge.self, bookmarksManager: BookmarksManager.shared(), cloudDirectoryMonitor: cloudDirectoryMonitor, localDirectoryMonitor: localDirectoryMonitor, @@ -79,7 +87,7 @@ final class iCloudSynchronizaionManager: NSObject { // MARK: - Initialization init(fileManager: FileManager, - settings: Settings.Type, + settings: SettingsBridge.Type, bookmarksManager: BookmarksManager, cloudDirectoryMonitor: CloudDirectoryMonitor, localDirectoryMonitor: LocalDirectoryMonitor, @@ -307,10 +315,16 @@ extension iCloudSynchronizaionManager { observers.removeValue(forKey: id) } + func notifyObservers() { + notifyObserversOnSynchronizationError(synchronizationError) + } + private func notifyObserversOnSynchronizationError(_ error: Error?) { let state = SynchronizationManagerState(isAvailable: cloudDirectoryMonitor.isCloudAvailable(), isOn: settings.iCLoudSynchronizationEnabled(), error: error as? NSError) + stateSubject.send(state) + observers.removeUnreachable().forEach { _, observable in DispatchQueue.main.async { observable.onSynchronizationStateDidChangeHandler?(state) diff --git a/iphone/Maps/Images.xcassets/Alternative Accent Color.colorset/Contents.json b/iphone/Maps/Images.xcassets/Alternative Accent Color.colorset/Contents.json new file mode 100644 index 000000000..a581dab49 --- /dev/null +++ b/iphone/Maps/Images.xcassets/Alternative Accent Color.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.788", + "green" : "0.875", + "red" : "0.784" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iphone/Maps/LocalizedStrings/af.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/af.lproj/Localizable.strings index cf6a1edfc..07506216b 100644 --- a/iphone/Maps/LocalizedStrings/af.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/af.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-geboue is gedeaktiveer in batterybesparingsmodus"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Steminstruksies"; +"pref_tts_title" = "Steminstruksies"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Announce Street Names"; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Wil jy 'n foutverslag aan die ontwikkelaars stuur?\nOns maak staat op ons gebruikers aangesien CoMaps nie outomaties enige foutinligting insamel nie. By voorbaat dankie vir die ondersteuning van CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Aktiveer iCloud-sinchronisasie"; diff --git a/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings index 169d00ba8..17f2a63e4 100644 --- a/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ar.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "يتم إيقاف تشغيل المباني ثلاثية الأبعاد في وضع توفير الطاقة"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "تعليمات صوتية"; +"pref_tts_title" = "تعليمات صوتية"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "أعلن أسماء الشوارع"; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "هل ترغب في إرسال تقرير عن الأخطاء إلى المطورين؟\nنحن نعتمد على مستخدمينا لأن تطبيق CoMaps لا يجمع أي معلومات عن الأخطاء تلقائيًا. شكرًا لك مقدمًا على دعم CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "تمكين مزامنة iCloud"; diff --git a/iphone/Maps/LocalizedStrings/az.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/az.lproj/Localizable.strings index 462875779..566774fb2 100644 --- a/iphone/Maps/LocalizedStrings/az.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/az.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D binalar enerjiyə qənaət rejimində söndürülür"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Səsli təlimatlar"; +"pref_tts_title" = "Səsli təlimatlar"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Küçə adlarını elan edin"; @@ -980,6 +983,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Tərtibatçılara səhv hesabatı göndərmək istərdinizmi?\nCoMaps heç bir səhv məlumatını avtomatik toplamadığından istifadəçilərimizə etibar edirik. CoMaps dəstəklədiyiniz üçün əvvəlcədən təşəkkür edirik!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud Sinxronizasiyasını aktivləşdirin"; diff --git a/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings index 73b236ee1..912a0e89b 100644 --- a/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/be.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "У рэжыме энергазберажэння 3D-будынкі адключаны"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Галасавыя інструкцыі"; +"pref_tts_title" = "Галасавыя інструкцыі"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Абвяшчаць назвы вуліц"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Хочаце адправіць справаздачу пра памылку распрацоўшчыкам?\nМы разлічваем на нашых карыстальнікаў, бо CoMaps не збірае ніякай інфармацыі пра памылкі аўтаматычна. Загадзя дзякуем за падтрымку CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Уключыць сінхранізацыю з iCloud"; diff --git a/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings index 181d534e1..83bb95c42 100644 --- a/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/bg.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D сградите са изключени в режим на пестене на енергия"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Гласови инструкции"; +"pref_tts_title" = "Гласови инструкции"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Обявете имена на улици"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Искате ли да изпратите доклад за грешка на разработчиците?\nРазчитаме на нашите потребители, тъй като CoMaps не събира информация за грешки автоматично. Благодарим ви предварително, че подкрепяте CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Активиране на синхронизацията с iCloud"; diff --git a/iphone/Maps/LocalizedStrings/ca.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ca.lproj/Localizable.strings index 068ac1938..05857f94f 100644 --- a/iphone/Maps/LocalizedStrings/ca.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ca.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Els edificis en 3D es desactiven en mode d'estalvi d'energia"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instruccions de veu"; +"pref_tts_title" = "Instruccions de veu"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anuncia els noms dels carrers"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Voleu enviar un informe d’error als desenvolupadors?\nEns refiem dels nostres usuaris, ja que l’CoMaps no recull cap informació d’errors automàticament. Gràcies per avançat per donar suport a CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Activa la sincronització amb l’iCloud"; diff --git a/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings index 2bbdcf5dc..86f54ac50 100644 --- a/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/cs.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D budovy jsou vypnuty v úsporném režimu"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Hlasové instrukce"; +"pref_tts_title" = "Hlasové instrukce"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Oznamovat názvy ulic"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Chcete poslat vývojářům hlášení o chybě?\nSpoléháme na naše uživatele, protože společnost CoMaps neshromažďuje žádné informace o chybách automaticky. Předem vám děkujeme za podporu CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Povolení synchronizace s iCloudem"; diff --git a/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings index 3ca411477..01b275636 100644 --- a/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/da.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-bygninger er deaktiveret i strømbesparende tilstand"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Stemmeinstruktioner"; +"pref_tts_title" = "Stemmeinstruktioner"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Annoncer gadenavne"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Vil du gerne sende en fejlrapport til udviklerne?\nVi er afhængige af vores brugere, da CoMaps ikke indsamler nogen fejloplysninger automatisk. Tak på forhånd for at støtte CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Aktivér iCloud-synkronisering"; diff --git a/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings index 2632051e1..368f7575b 100644 --- a/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/de.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-Gebäude werden im Energiesparmodus ausgeschaltet"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Sprachführung"; +"pref_tts_title" = "Sprachführung"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Straßennamen ankündigen"; @@ -1006,6 +1009,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Willst du einen Fehlerbericht an die Entwickler schicken?\nWir sind auf unsere Nutzer angewiesen, da CoMaps keine Fehlerinformationen automatisch sammelt. Wir danken dir im Voraus für deine Unterstützung von CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Aktiviere die iCloud-Synchronisierung"; diff --git a/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings index a86ce17c8..ee2d3e29b 100644 --- a/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/el.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Τα τρισδιάστατα κτίρια είναι απενεργοποιημένα σε λειτουργία εξοικονόμησης ενέργειας"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Φωνητικές οδηγίες"; +"pref_tts_title" = "Φωνητικές οδηγίες"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Ανακοινώστε ονόματα οδών"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Θα θέλατε να στείλετε μια αναφορά σφάλματος στους προγραμματιστές;\nΒασιζόμαστε στους χρήστες μας, καθώς οι CoMaps δεν συλλέγουν αυτόματα καμία πληροφορία σφάλματος. Σας ευχαριστούμε εκ των προτέρων για την υποστήριξη των CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Ενεργοποίηση συγχρονισμού iCloud"; diff --git a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings index 03da7efb0..ba2189e80 100644 --- a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings @@ -228,8 +228,11 @@ /* A message in Settings/Preferences explaining why is it not possible to enable 3D buildings when max power saving mode is enabled */ "pref_map_3d_buildings_disabled_summary" = "3D buildings are disabled in power saving mode"; -/* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Voice Instructions"; +/* Settings «Route» category: «Tts» title */ +"pref_tts_title" = "Voice Instructions"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Announce Street Names"; @@ -1006,6 +1009,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Enable iCloud Syncronization"; diff --git a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings index 67973a77b..fece93c33 100644 --- a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings @@ -241,7 +241,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D buildings are disabled in power saving mode"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Voice Instructions"; +"pref_tts_title" = "Voice Instructions"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Announce Street Names"; @@ -1030,6 +1033,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Enable iCloud Syncronization"; diff --git a/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings index 6d074ad38..7d52395aa 100644 --- a/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/es-MX.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Los edificios 3D se apagan en el modo de ahorro de energía"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instrucciones de voz"; +"pref_tts_title" = "Instrucciones de voz"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anunciar nombres de calles"; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "¿Quiere enviar un informe de error a los desarrolladores?\nDependemos de nuestros usuarios, ya que CoMaps no recoge ninguna información sobre errores de forma automática. ¡Gracias de antemano por apoyar a CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Activar la sincronización con iCloud"; diff --git a/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings index 0a8c4f385..86bdccceb 100644 --- a/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/es.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Los edificios 3D se desactivan en el modo de ahorro de energía"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instrucciones de voz"; +"pref_tts_title" = "Instrucciones de voz"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anunciar nombres de calles"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "¿Quiere enviar un informe de error a los desarrolladores?\nDependemos de nuestros usuarios, ya que CoMaps no recoge ninguna información sobre errores de forma automática. ¡Gracias de antemano por apoyar a CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Activar la sincronización con iCloud"; diff --git a/iphone/Maps/LocalizedStrings/et.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/et.lproj/Localizable.strings index 977f32089..438263ea3 100644 --- a/iphone/Maps/LocalizedStrings/et.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/et.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-vaated lülitatakse energiasäästurežiimis välja"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Hääljuhised"; +"pref_tts_title" = "Hääljuhised"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Teata tänavanimesid"; @@ -1005,6 +1008,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Kas soovid saata arendajatele veateate?\nMe toetume oma kasutajatele, kuna CoMaps ei kogu automaatselt mingit veateavet. Täname sind juba ette CoMapsi toetamise eest!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Luba iCloudi sünkroniseerimine"; diff --git a/iphone/Maps/LocalizedStrings/eu.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/eu.lproj/Localizable.strings index cf98d93af..15d9f3610 100644 --- a/iphone/Maps/LocalizedStrings/eu.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/eu.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D eraikinak desgaituta daude energia aurrezteko moduan"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Ahots argibideak"; +"pref_tts_title" = "Ahots argibideak"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Kaleen izenak iragarri"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Akatsen txostena bidali nahi diezu garatzaileei?\nGure erabiltzaileengan oinarritzen gara CoMaps-ek ez baitu automatikoki akatsen informaziorik biltzen. Eskerrik asko aldez aurretik CoMaps laguntzeagatik!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Gaitu iCloud sinkronizazioa"; diff --git a/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings index 7ece126f3..266a3c253 100644 --- a/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fa.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "ساختمان های سه بعدی در حالت صرفه جویی در مصرف برق خاموش می شوند"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "دستور العمل صوتی"; +"pref_tts_title" = "دستور العمل صوتی"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "نام خیابان ها را اعلام کنید"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "آیا می خواهید یک گزارش اشکال برای توسعه دهندگان ارسال کنید؟\nما به کاربران خود تکیه می کنیم زیرا CoMaps هیچ گونه اطلاعات خطا را به طور خودکار جمع آوری نمی کند. پیشاپیش از شما برای حمایت از CoMaps سپاسگزاریم!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "همگام سازی iCloud را فعال کنید"; diff --git a/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings index 3e1f8ddfe..bc2f8d0ff 100644 --- a/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fi.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-rakennukset ovat poissa päältä virransäästötilassa"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Ääniohjeistukset"; +"pref_tts_title" = "Ääniohjeistukset"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Ilmoita kadunnimet"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Haluatko lähettää vikailmoituksen kehittäjille?\nLuotamme käyttäjiin, sillä CoMaps ei kerää virhetietoja automaattisesti. Kiitos etukäteen CoMapsin tukemisesta!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Ota iCloud-synkronointi käyttöön"; diff --git a/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings index 31337ebc0..620fdd57f 100644 --- a/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/fr.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Les bâtiments 3D sont désactivés en mode d'économie d'énergie"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instructions vocales"; +"pref_tts_title" = "Instructions vocales"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Annoncer les noms de rue"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Veux-tu envoyer un rapport de bogue aux développeurs ?\nNous comptons sur nos utilisateurs, car CoMaps ne recueille pas automatiquement d'informations sur les erreurs. Merci d'avance de soutenir CoMaps !"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Activer la synchronisation iCloud"; diff --git a/iphone/Maps/LocalizedStrings/he.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/he.lproj/Localizable.strings index 9043116e9..ef0e1694e 100644 --- a/iphone/Maps/LocalizedStrings/he.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/he.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "הגדרת מבנים בתלת מימד מבוטלת במצב חיסכון בחשמל"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "הנחיות קוליות"; +"pref_tts_title" = "הנחיות קוליות"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "הכריזו על שמות רחובות"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "האם תרצה לשלוח דוח באג למפתחים?\nאנו סומכים על המשתמשים שלנו מכיוון ש-CoMaps לא אוספות כל מידע על שגיאות באופן אוטומטי. תודה מראש על התמיכה ב-CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "הפעל סנכרון iCloud"; diff --git a/iphone/Maps/LocalizedStrings/hi.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/hi.lproj/Localizable.strings index 88643c96c..e25701785 100644 --- a/iphone/Maps/LocalizedStrings/hi.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/hi.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3डी इमारतें बिजली बचत मोड में अक्षम हैं"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "ध्वनि निर्देश"; +"pref_tts_title" = "ध्वनि निर्देश"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "सड़कों के नाम की घोषणा करें"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "क्या आप डेवलपर्स को बग रिपोर्ट भेजना चाहेंगे?\nहम अपने उपयोगकर्ताओं पर भरोसा करते हैं क्योंकि CoMaps स्वचालित रूप से कोई त्रुटि जानकारी एकत्र नहीं करता है। CoMaps का समर्थन करने के लिए अग्रिम धन्यवाद!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud सिंक्रोनाइज़ेशन सक्षम करें"; diff --git a/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings index 7ba720aaa..0e013b3fe 100644 --- a/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/hu.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "A 3D-s épületek energiatakarékos módban ki vannak kapcsolva"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Hangutasítások"; +"pref_tts_title" = "Hangutasítások"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Utcanevek felolvasása"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Szeretne hibajelentést küldeni a fejlesztőknek?\nA felhasználóinkra támaszkodunk, mivel az CoMaps nem gyűjt automatikusan hibainformációkat. Előre is köszönjük, hogy támogatja az CoMaps csapatát!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud-szinkronizálás engedélyezése"; diff --git a/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings index 83a72ba0d..075732cd7 100644 --- a/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/id.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Bangunan 3D dimatikan dalam mode hemat daya"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Petunjuk Suara"; +"pref_tts_title" = "Petunjuk Suara"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Umumkan Nama Jalan"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Apakah Anda ingin mengirim laporan bug ke pengembang?\nKami mengandalkan pengguna kami karena CoMaps tidak mengumpulkan informasi kesalahan secara otomatis. Terima kasih sebelumnya karena telah mendukung CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Mengaktifkan Sinkronisasi iCloud"; diff --git a/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings index faa908dcb..593a20e5d 100644 --- a/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/it.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Gli edifici 3D sono disattivati in modalità risparmio energetico"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Istruzioni vocali"; +"pref_tts_title" = "Istruzioni vocali"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Annunciare i nomi delle strade"; @@ -997,6 +1000,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Vuoi inviare una segnalazione di bug agli sviluppatori?\nCi affidiamo ai nostri utenti perché CoMaps non raccoglie automaticamente informazioni sugli errori. Ti ringraziamo in anticipo per il supporto a CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Abilita la sincronizzazione con iCloud"; diff --git a/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings index b41e11799..07abd329e 100644 --- a/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ja.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "省電力モードで建物の 3D 表示がオフになっている"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "音声指示"; +"pref_tts_title" = "音声指示"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "通りの名前を発表"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "開発者にバグレポートを送りたいか?\nCoMapsはエラー情報を自動収集しないため、我々はユーザーに依存している。CoMapsを応援してくださりありがとう!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud同期を有効にする"; diff --git a/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings index 293c3053f..db1dfbf36 100644 --- a/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ko.lproj/Localizable.strings @@ -228,7 +228,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D 빌딩은 절전 모드에서 꺼집니다"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "음성 지침"; +"pref_tts_title" = "음성 지침"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "\"거리 이름 발표\""; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "개발자에게 버그 리포트를 보내시겠습니까?\nCoMaps은 오류 정보를 자동으로 수집하지 않으므로 사용자의 도움을 받아야 합니다. CoMaps을 이용해 주셔서 미리 감사드립니다!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud 동기화 활성화"; diff --git a/iphone/Maps/LocalizedStrings/lt.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/lt.lproj/Localizable.strings index fd4636d23..77d513a16 100644 --- a/iphone/Maps/LocalizedStrings/lt.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/lt.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Trimačiai pastatai yra išjungti energijos taupymo veiksenoje"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Balso instrukcijos"; +"pref_tts_title" = "Balso instrukcijos"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Sakyti gatvių pavadinimus"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Ar norite išsiųsti pranešimą apie klaidą programos kūrėjams?\nTokių pranešimų mes tikimės iš savo naudotojų, nes „CoMaps“ nerenka jokios informacijos apie klaidas automatiškai. Iš anksto dėkojame, kad prisidedate prie „CoMaps“ tobulinimo!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "„iCloud“ sinchronizavimo įjungimas"; diff --git a/iphone/Maps/LocalizedStrings/lv.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/lv.lproj/Localizable.strings index 3cca45cb6..81986515f 100644 --- a/iphone/Maps/LocalizedStrings/lv.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/lv.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Energotaupības režīmā 3D ēkas ir izslēgtas"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Balss instrukcijas"; +"pref_tts_title" = "Balss instrukcijas"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Izrunāt ielu nosaukumus"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Vai vēlaties izstrādātājiem nosūtīt ziņojumu par kļūdu?\nMēs paļaujamies uz šiem ziņojumiem, jo „CoMaps“ automātiski nevāc nekādus datus par kļūdām. Jau iepriekš pateicamies par „CoMaps“ atbalstīšanu!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Ieslēgta „iCloud“ sinhronizācija"; diff --git a/iphone/Maps/LocalizedStrings/mr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/mr.lproj/Localizable.strings index 6e0364db6..0595f4047 100644 --- a/iphone/Maps/LocalizedStrings/mr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/mr.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D इमारती वीज बचत मोडमध्ये बंद केल्या आहेत"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "ध्वनी सूचना"; +"pref_tts_title" = "ध्वनी सूचना"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "मार्गांची नावे घोषित करा"; @@ -1001,6 +1004,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "तुम्ही विकासकांना बग अहवाल पाठवू इच्छिता?\nआम्ही आमच्या वापरकर्त्यांवर अवलंबून आहोत कारण CoMaps कोणतीही त्रुटी माहिती स्वयंचलितपणे संकलित करत नाही. CoMaps ला समर्थन दिल्याबद्दल आगाऊ धन्यवाद!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud सिंक्रोनाइझेशन सक्षम करा"; diff --git a/iphone/Maps/LocalizedStrings/mt.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/mt.lproj/Localizable.strings index 3dc825e55..b9ca5e1f8 100644 --- a/iphone/Maps/LocalizedStrings/mt.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/mt.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Il-binjiet 3D huma mitfigħin fil-mod tal-iffrankar tal-enerġija"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Istruzzjonijiet tal-vuċi"; +"pref_tts_title" = "Istruzzjonijiet tal-vuċi"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Ħabbar l-ismijiet tat-toroq"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Would you like to send a bug report to the developers?\nWe rely on our users as CoMaps doesn't collect any error information automatically. Thank you in advance for supporting CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Enable iCloud Syncronization"; diff --git a/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings index 57defd0c2..c03423dea 100644 --- a/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/nb.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-bygninger er slått av i strømsparingsmodus"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Taleinstrukser"; +"pref_tts_title" = "Taleinstrukser"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Kunngjør gatenavn"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Vil du sende en feilrapport til utviklerne?\nVi er avhengige av brukerne våre, da CoMaps ikke samler inn noen feilinformasjon automatisk. Takk på forhånd for at du støtter CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Aktiver iCloud-synkronisering"; diff --git a/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings index 83bc12169..b5c785047 100644 --- a/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/nl.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-gebouwen worden uitgeschakeld in de energiebesparende modus"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Gesproken instructies"; +"pref_tts_title" = "Gesproken instructies"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Straatnamen aankondigen"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Wil je een bugrapport naar de ontwikkelaars sturen?\nWe vertrouwen op onze gebruikers, want CoMaps verzamelt geen foutinformatie automatisch. Alvast bedankt voor je steun aan CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Schakel iCloud-synchronisatie in"; diff --git a/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings index b2ae79bab..4e12a6879 100644 --- a/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pl.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Budynki 3D są wyłączone w trybie oszczędzania energii"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Komunikaty głosowe"; +"pref_tts_title" = "Komunikaty głosowe"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Wymawiaj nazwy ulic"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Chcesz wysłać raport o błędzie do deweloperów?\nPolegamy na naszych użytkownikach, ponieważ CoMaps nie zbiera żadnych informacji o błędach automatycznie. Z góry dziękujemy za wspieranie CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Włącz synchronizację iCloud"; diff --git a/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings index 3e96005e0..5e920867c 100644 --- a/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pt-BR.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Os edifícios 3D são desativados no modo de economia de energia"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Orientação por voz"; +"pref_tts_title" = "Orientação por voz"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anunciar nomes de ruas"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Você gostaria de enviar um relatório de bug para os desenvolvedores?\nDependemos de nossos usuários, pois o CoMaps não coleta nenhuma informação de erro automaticamente. Agradecemos antecipadamente por você apoiar o CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Ativar a sincronização do iCloud"; diff --git a/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings index 0668cb0ec..83f572630 100644 --- a/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/pt.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Os edifícios 3D são desativados no modo de poupança de energia"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instruções de voz"; +"pref_tts_title" = "Instruções de voz"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anunciar nomes de ruas"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Gostarias de enviar um relatório de erro para os programadores?\nContamos com os nossos utilizadores, uma vez que o CoMaps não recolhe automaticamente qualquer informação de erro. Agradecemos desde já o teu apoio ao CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Ativar a sincronização do iCloud"; diff --git a/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings index d83ded418..1ed6720f6 100644 --- a/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ro.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Clădirile 3D sunt oprite în modul de economisire a energiei"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Instrucțiuni vocale"; +"pref_tts_title" = "Instrucțiuni vocale"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Anunțați numele străzilor"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Doriți să trimiteți un raport de eroare dezvoltatorilor?\nNe bazăm pe utilizatorii noștri, deoarece CoMaps nu colectează automat nicio informație privind erorile. Vă mulțumim anticipat pentru susținerea CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Activați Sincronizarea iCloud"; diff --git a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings index 2449ada56..6bf7b437e 100644 --- a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-здания отключаются в режиме энергосбережения"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Голосовые инструкции"; +"pref_tts_title" = "Голосовые инструкции"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Проговаривать названия улиц"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Хотите отправить разработчикам сообщение об ошибке?\nМы полагаемся на наших пользователей, так как CoMaps не собирает информацию об ошибках автоматически. Заранее спасибо за поддержку CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Включить синхронизацию с iCloud"; diff --git a/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings index 9d17ee11f..841883db2 100644 --- a/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sk.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D budovy sú vypnuté v režime úspory energie"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Hlasové povely"; +"pref_tts_title" = "Hlasové povely"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Oznámte názvy ulíc"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Chcete poslať vývojárom hlásenie o chybe?\nSpoliehame sa na našich používateľov, pretože spoločnosť CoMaps nezhromažďuje žiadne informácie o chybách automaticky. Vopred vám ďakujeme za podporu CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Povolenie synchronizácie iCloud"; diff --git a/iphone/Maps/LocalizedStrings/sr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sr.lproj/Localizable.strings index cc0942f89..2b0c87e98 100644 --- a/iphone/Maps/LocalizedStrings/sr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sr.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D зграде се не приказују у режиму чувања батерије"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Гласовне инструкције"; +"pref_tts_title" = "Гласовне инструкције"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Најави име улице"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Да ли желите да пошаљете пријаву бага програмерима?\nОслањамо се на кориснике пошто CoMaps не прикупља податке о грешкама аутоматски. Хвала унапред што подржавате CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Омогући iCloud синхронизацију"; diff --git a/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings index c41f5fba8..d2458b14b 100644 --- a/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sv.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D-byggnader är avstängda i energisparläge"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Röstinstruktioner"; +"pref_tts_title" = "Röstinstruktioner"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Läs upp gatunamn"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Vill du skicka en felrapport till utvecklarna?\nVi förlitar oss på våra användare eftersom CoMaps inte samlar in någon felinformation automatiskt. Tack på förhand för att du stöder CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Aktivera iCloud-synkronisering"; diff --git a/iphone/Maps/LocalizedStrings/sw.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/sw.lproj/Localizable.strings index 78f264ab2..842ed4871 100644 --- a/iphone/Maps/LocalizedStrings/sw.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/sw.lproj/Localizable.strings @@ -219,7 +219,10 @@ "pref_map_3d_buildings_disabled_summary" = "Majengo ya 3D yamezimwa katika hali ya kuokoa nishati"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Tangaza Majina ya Mitaa"; +"pref_tts_title" = "Tangaza Majina ya Mitaa"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Tangaza Majina ya Mitaa"; @@ -994,6 +997,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Je, ungependa kutuma ripoti ya hitilafu kwa wasanidi programu?\nTunategemea watumiaji wetu kwani CoMaps hazikusanyi maelezo yoyote ya hitilafu kiotomatiki. Asante mapema kwa kusaidia CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Washa Usawazishaji wa iCloud"; diff --git a/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings index d0282c35b..90db7fd1e 100644 --- a/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/th.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "สิ่งปลูกสร้าง 3 มิติจะปิดในโหมดประหยัดพลังงาน"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "คำแนะนำด้วยเสียง"; +"pref_tts_title" = "คำแนะนำด้วยเสียง"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "ประกาศชื่อถนน"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "คุณต้องการส่งรายงานข้อผิดพลาดไปยังนักพัฒนาหรือไม่?\nเราไว้วางใจผู้ใช้ของเราเนื่องจาก CoMaps จะไม่รวบรวมข้อมูลข้อผิดพลาดใด ๆ โดยอัตโนมัติ ขอขอบคุณล่วงหน้าสำหรับการสนับสนุน CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "เปิดใช้งานการซิงโครไนซ์ iCloud"; diff --git a/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings index 9035c659a..112545f59 100644 --- a/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/tr.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3B yapılar güç tutum kipindeyken kapatılır"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Sesli Yönlendirme"; +"pref_tts_title" = "Sesli Yönlendirme"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Sokak Adlarını Söyle"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Geliştiricilere bir hata raporu göndermek ister misiniz?\nCoMaps otomatik olarak herhangi bir hata bilgisi toplamadığı için bu konuda kullanıcılarımıza güveniyoruz. CoMaps'i desteklediğiniz için şimdiden teşekkür ederiz!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "iCloud Senkronizasyonunu Etkinleştir"; diff --git a/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings index 3ada15778..05d572e17 100644 --- a/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/uk.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D будівлі вимкнені в режимі енергозбереження"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Голосові інструкції"; +"pref_tts_title" = "Голосові інструкції"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Проговорювати назви вулиць"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Бажаєте надіслати розробникам звіт про помилку?\nМи покладаємося на наших користувачів, оскільки CoMaps не збирає інформацію про помилки автоматично. Заздалегідь дякуємо за підтримку CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Увімкнути синхронізацію з iCloud"; diff --git a/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings index b36bb204c..d444b8e73 100644 --- a/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/vi.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "Tòa nhà 3D bị tắt ở chế độ tiết kiệm năng lượng"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "Hướng dẫn bằng Giọng nói"; +"pref_tts_title" = "Hướng dẫn bằng Giọng nói"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "Thông báo tên đường"; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "Bạn có muốn gửi báo cáo lỗi cho nhà phát triển không?\nChúng tôi dựa vào người dùng của mình vì CoMaps không tự động thu thập bất kỳ thông tin lỗi nào. Cảm ơn bạn trước vì đã ủng hộ CoMaps!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "Kích hoạt đồng bộ hóa iCloud"; diff --git a/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings index fcad529dc..a0d217435 100644 --- a/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/zh-Hans.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D 建筑在省电模式下处于关闭状态"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "语音指导"; +"pref_tts_title" = "语音指导"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "播报街道名称"; @@ -1004,6 +1007,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "您想向开发人员发送错误报告吗?\n由于 CoMaps 不会自动收集任何错误信息,因此我们只能依靠我们的用户。感谢您对 CoMaps 的支持!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "启用 iCloud 同步"; diff --git a/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings index 0d4db81fb..51566d060 100644 --- a/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/zh-Hant.lproj/Localizable.strings @@ -229,7 +229,10 @@ "pref_map_3d_buildings_disabled_summary" = "3D 建築在省電模式下將會關閉"; /* Settings «Route» category: «Tts enabled» title */ -"pref_tts_enable_title" = "語音提示"; +"pref_tts_title" = "語音提示"; + +/* Settings «Route» category: «Tts enable» title */ +"pref_tts_enable_title" = "Enable Voice Instructions"; /* Settings «Route» category: «Tts announce street names» title */ "pref_tts_street_names_title" = "播報街道名稱"; @@ -1003,6 +1006,9 @@ /* Message for the bug report alert. */ "bugreport_alert_message" = "您想向開發人員發送錯誤報告嗎?\n由於 CoMaps 不會自動收集任何錯誤資訊,因此我們只能依靠用戶的協助。感謝您對 CoMaps 的支持!"; +/* Title for the iCloud syncronization setting */ +"icloud_sync" = "iCloud Syncronization (Beta)"; + /* Title for the "Enable iCloud Syncronization" alert. */ "enable_icloud_synchronization_title" = "啟用 iCloud 同步"; diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 53304df8e..dae227f99 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -16,6 +16,15 @@ 272F1F3D2E0EE0C800FA52EF /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F3C2E0EE0C400FA52EF /* ProfileView.swift */; }; 272F1F462E0EEF9400FA52EF /* SafariView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 272F1F452E0EEF8B00FA52EF /* SafariView.swift */; }; 2765D1D02E13F9C20005CA2B /* BridgeControllers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2765D1CD2E13F9BC0005CA2B /* BridgeControllers.swift */; }; + 279367562E1BE16300AA5C3D /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279367552E1BE16300AA5C3D /* Settings.swift */; }; + 2793675A2E1BE17300AA5C3D /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279367592E1BE17300AA5C3D /* SettingsView.swift */; }; + 27AF184C2E1D5B2D00CD41E2 /* SettingsNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF184B2E1D5A2700CD41E2 /* SettingsNavigationView.swift */; }; + 27AF18502E1DB61600CD41E2 /* VoiceRoutingLanguage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF184F2E1DB61500CD41E2 /* VoiceRoutingLanguage.swift */; }; + 27AF18522E1DB62000CD41E2 /* DistanceUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18512E1DB61F00CD41E2 /* DistanceUnit.swift */; }; + 27AF18542E1DB62700CD41E2 /* MobileDataPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18532E1DB62600CD41E2 /* MobileDataPolicy.swift */; }; + 27AF18562E1DB63000CD41E2 /* PowerSavingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */; }; + 27AF18582E1DB63A00CD41E2 /* Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18572E1DB63900CD41E2 /* Appearance.swift */; }; + 27AF185A2E1DB64500CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */; }; 3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3304306C21D4EAFB00317CA3 /* SearchCategoryCell.swift */; }; 33046832219C57180041F3A8 /* CategorySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33046831219C57180041F3A8 /* CategorySettingsViewController.swift */; }; 337F98A621D37B7400C8AC27 /* SearchTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F98A521D37B7400C8AC27 /* SearchTabViewController.swift */; }; @@ -49,7 +58,6 @@ 340B33C61F3AEFDB00A8C1B4 /* MWMRouter+RouteManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340B33C41F3AEFDB00A8C1B4 /* MWMRouter+RouteManager.mm */; }; 340E1EEF1E2F614400CE49BF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 340E1EE51E2F614400CE49BF /* LaunchScreen.storyboard */; }; 340E1EF21E2F614400CE49BF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 340E1EE61E2F614400CE49BF /* Main.storyboard */; }; - 340E1EF81E2F614400CE49BF /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 340E1EE81E2F614400CE49BF /* Settings.storyboard */; }; 340E1EFB1E2F614400CE49BF /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340E1EE91E2F614400CE49BF /* Storyboard.swift */; }; 340E1EFE1E2F614400CE49BF /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 340E1EEA1E2F614400CE49BF /* Welcome.storyboard */; }; 343064411E9FDC7300DC7665 /* SearchIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430643F1E9FDC7300DC7665 /* SearchIndex.swift */; }; @@ -179,7 +187,6 @@ 34F742321E0834F400AC1FD6 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F742301E0834F400AC1FD6 /* UIViewController+Navigation.m */; }; 34FE5A6F1F18F30F00BCA729 /* TrafficButtonArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FE5A6D1F18F30F00BCA729 /* TrafficButtonArea.swift */; }; 3D15ACEE2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D15ACED2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm */; }; - 3DEE1AEB21F72CD300054A91 /* MWMPowerManagmentViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3DEE1AEA21F72CD300054A91 /* MWMPowerManagmentViewController.mm */; }; 408645FC21495EB1000A4A1D /* categories_cuisines.txt in Resources */ = {isa = PBXBuildFile; fileRef = 408645FB21495EB1000A4A1D /* categories_cuisines.txt */; }; 44360A0D2A7D34990016F412 /* TransportRuler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44360A0C2A7D34990016F412 /* TransportRuler.swift */; }; 44360A112A7D35440016F412 /* TransportRuler.xib in Resources */ = {isa = PBXBuildFile; fileRef = 44360A102A7D35440016F412 /* TransportRuler.xib */; }; @@ -217,7 +224,6 @@ 4767CDA620AB1F6200BD8166 /* LeftAlignedIconButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CDA520AB1F6200BD8166 /* LeftAlignedIconButton.swift */; }; 4767CDA820AB401000BD8166 /* LinkTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CDA720AB401000BD8166 /* LinkTextView.swift */; }; 47699A0821F08E37009E6585 /* NSDate+TimeDistance.m in Sources */ = {isa = PBXBuildFile; fileRef = 47699A0721F08E37009E6585 /* NSDate+TimeDistance.m */; }; - 477219052243E79500E5B227 /* DrivingOptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 477219042243E79500E5B227 /* DrivingOptionsViewController.swift */; }; 4788739220EE326500F6826B /* VerticallyAlignedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4788739120EE326400F6826B /* VerticallyAlignedButton.swift */; }; 479EE94A2292FB03009DEBA6 /* ActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 479EE9492292FB03009DEBA6 /* ActivityIndicator.swift */; }; 47A13CAD24BE9AA500027D4F /* DatePickerViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13CAC24BE9AA500027D4F /* DatePickerViewRenderer.swift */; }; @@ -240,7 +246,6 @@ 47CF2E6323BA0DD500D11C30 /* CopyLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CF2E6223BA0DD500D11C30 /* CopyLabel.swift */; }; 47D48BF52432A7CA00FEFB1F /* ChartViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47D48BF42432A7C900FEFB1F /* ChartViewRenderer.swift */; }; 47DF72B922520CE20004AB10 /* MWMRoutingOptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 474902D9224A54EC008D71E0 /* MWMRoutingOptions.mm */; }; - 47DF72BB225356BF0004AB10 /* DrivingOptions.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 47DF72BA225356BF0004AB10 /* DrivingOptions.storyboard */; }; 47E3C7252111E41B008B3B27 /* DimmedModalPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47E3C7242111E41B008B3B27 /* DimmedModalPresentationController.swift */; }; 47E3C7272111E5A8008B3B27 /* AlertPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47E3C7262111E5A8008B3B27 /* AlertPresentationController.swift */; }; 47E3C7292111E614008B3B27 /* FadeInAnimatedTransitioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47E3C7282111E614008B3B27 /* FadeInAnimatedTransitioning.swift */; }; @@ -478,7 +483,6 @@ ED46DDE12D098A0C007CACD6 /* CoMapsWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = ED46DDCC2D098A0B007CACD6 /* CoMapsWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; ED5BAF4B2D688F5B0088D7B1 /* SearchOnMapHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED5BAF4A2D688F5A0088D7B1 /* SearchOnMapHeaderView.swift */; }; ED5E02142D8B17B600A5CC7B /* ModalPresentationStepsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED5E02132D8B17B600A5CC7B /* ModalPresentationStepsController.swift */; }; - ED63CEB92BDF8F9D006155C4 /* SettingsTableViewiCloudSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED63CEB62BDF8F9C006155C4 /* SettingsTableViewiCloudSwitchCell.swift */; }; ED70D55C2D5396F300738C1E /* SearchResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED70D55A2D5396F300738C1E /* SearchResult.mm */; }; ED70D5892D539A2500738C1E /* SearchOnMapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED70D5872D539A2500738C1E /* SearchOnMapViewController.swift */; }; ED70D58A2D539A2500738C1E /* SearchOnMapModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED70D5852D539A2500738C1E /* SearchOnMapModels.swift */; }; @@ -499,7 +503,6 @@ ED7CCC4F2C1362E300E2A737 /* FileType.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7CCC4E2C1362E300E2A737 /* FileType.swift */; }; ED808D0F2C38407800D52585 /* CircleImageButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED808D0E2C38407800D52585 /* CircleImageButton.swift */; }; ED810EC52D566E9B00ECDE2C /* SearchOnMapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED810EC42D566E9B00ECDE2C /* SearchOnMapTests.swift */; }; - ED8270F02C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED8270EF2C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift */; }; ED83880F2D54DEB3002A0536 /* UIImage+FilledWithColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED83880E2D54DEA4002A0536 /* UIImage+FilledWithColor.swift */; }; ED8A91E02D759B50009E063B /* LocalizableTypes.strings in Resources */ = {isa = PBXBuildFile; fileRef = ED8A91DE2D759B50009E063B /* LocalizableTypes.strings */; }; ED914AB22D35063A00973C45 /* TextColorStyleSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED914AB12D35063A00973C45 /* TextColorStyleSheet.swift */; }; @@ -621,15 +624,6 @@ F6E2FF331E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD2D1E097BA00083EBEC /* MWMSearchCommonCell.xib */; }; F6E2FF361E097BA00083EBEC /* MWMSearchSuggestionCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD2F1E097BA00083EBEC /* MWMSearchSuggestionCell.mm */; }; F6E2FF391E097BA00083EBEC /* MWMSearchSuggestionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD301E097BA00083EBEC /* MWMSearchSuggestionCell.xib */; }; - F6E2FF451E097BA00083EBEC /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD381E097BA00083EBEC /* SettingsTableViewLinkCell.swift */; }; - F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD391E097BA00083EBEC /* SettingsTableViewSelectableCell.swift */; }; - F6E2FF4B1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD3A1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift */; }; - F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD411E097BA00083EBEC /* MWMMobileInternetViewController.m */; }; - F6E2FF5A1E097BA00083EBEC /* MWMNightModeController.m in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD431E097BA00083EBEC /* MWMNightModeController.m */; }; - F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD471E097BA00083EBEC /* MWMSettingsViewController.mm */; }; - F6E2FF631E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD491E097BA00083EBEC /* MWMTTSLanguageViewController.mm */; }; - F6E2FF661E097BA00083EBEC /* MWMTTSSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD4B1E097BA00083EBEC /* MWMTTSSettingsViewController.mm */; }; - F6E2FF691E097BA00083EBEC /* MWMUnitsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD4D1E097BA00083EBEC /* MWMUnitsController.mm */; }; F6FE3C391CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F6FE3C371CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.m */; }; F6FE3C3C1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6FE3C3A1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib */; }; F6FEA82E1C58F108007223CC /* MWMButton.m in Sources */ = {isa = PBXBuildFile; fileRef = F6FEA82C1C58E89B007223CC /* MWMButton.m */; }; @@ -781,6 +775,15 @@ 272F1F3C2E0EE0C400FA52EF /* ProfileView.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; tabWidth = 4; }; 272F1F452E0EEF8B00FA52EF /* SafariView.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = SafariView.swift; sourceTree = ""; tabWidth = 4; }; 2765D1CD2E13F9BC0005CA2B /* BridgeControllers.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = BridgeControllers.swift; sourceTree = ""; tabWidth = 4; }; + 279367552E1BE16300AA5C3D /* Settings.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = ""; tabWidth = 4; }; + 279367592E1BE17300AA5C3D /* SettingsView.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; name = SettingsView.swift; path = UI/Settings/SettingsView.swift; sourceTree = SOURCE_ROOT; tabWidth = 4; }; + 27AF184B2E1D5A2700CD41E2 /* SettingsNavigationView.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = SettingsNavigationView.swift; sourceTree = ""; tabWidth = 4; }; + 27AF184F2E1DB61500CD41E2 /* VoiceRoutingLanguage.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = VoiceRoutingLanguage.swift; sourceTree = ""; tabWidth = 4; }; + 27AF18512E1DB61F00CD41E2 /* DistanceUnit.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = DistanceUnit.swift; sourceTree = ""; tabWidth = 4; }; + 27AF18532E1DB62600CD41E2 /* MobileDataPolicy.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = MobileDataPolicy.swift; sourceTree = ""; tabWidth = 4; }; + 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = PowerSavingMode.swift; sourceTree = ""; tabWidth = 4; }; + 27AF18572E1DB63900CD41E2 /* Appearance.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = ""; tabWidth = 4; }; + 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = AnnouncingSpeedTrapsWhileVoiceRouting.swift; sourceTree = ""; tabWidth = 4; }; 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Maps_Prefix.pch; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = main.mm; sourceTree = ""; }; 30034C5C2B3F0B74005D961A /* az */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = az; path = az.lproj/Localizable.strings; sourceTree = ""; }; @@ -842,7 +845,6 @@ 340B33C41F3AEFDB00A8C1B4 /* MWMRouter+RouteManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMRouter+RouteManager.mm"; sourceTree = ""; }; 340E1EE51E2F614400CE49BF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 340E1EE61E2F614400CE49BF /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - 340E1EE81E2F614400CE49BF /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = ""; }; 340E1EE91E2F614400CE49BF /* Storyboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = ""; }; 340E1EEA1E2F614400CE49BF /* Welcome.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Welcome.storyboard; sourceTree = ""; }; 3426DEB11F45AE2800D1C43C /* MWMRouterType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMRouterType.h; sourceTree = ""; }; @@ -1102,8 +1104,6 @@ 34FE5A6D1F18F30F00BCA729 /* TrafficButtonArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrafficButtonArea.swift; sourceTree = ""; }; 3D15ACED2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMObjectsCategorySelectorDataSource.mm; sourceTree = ""; }; 3D15ACEF2155118800F725D5 /* MWMObjectsCategorySelectorDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMObjectsCategorySelectorDataSource.h; sourceTree = ""; }; - 3DEE1AE921F72CD300054A91 /* MWMPowerManagmentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPowerManagmentViewController.h; sourceTree = ""; }; - 3DEE1AEA21F72CD300054A91 /* MWMPowerManagmentViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPowerManagmentViewController.mm; sourceTree = ""; }; 408645FB21495EB1000A4A1D /* categories_cuisines.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = categories_cuisines.txt; path = ../../data/categories_cuisines.txt; sourceTree = ""; }; 44360A0C2A7D34990016F412 /* TransportRuler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransportRuler.swift; sourceTree = ""; }; 44360A102A7D35440016F412 /* TransportRuler.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TransportRuler.xib; sourceTree = ""; }; @@ -1152,7 +1152,6 @@ 4767CDA720AB401000BD8166 /* LinkTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkTextView.swift; sourceTree = ""; }; 47699A0621F08E37009E6585 /* NSDate+TimeDistance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDate+TimeDistance.h"; sourceTree = ""; }; 47699A0721F08E37009E6585 /* NSDate+TimeDistance.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDate+TimeDistance.m"; sourceTree = ""; }; - 477219042243E79500E5B227 /* DrivingOptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DrivingOptionsViewController.swift; sourceTree = ""; }; 4788739120EE326400F6826B /* VerticallyAlignedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticallyAlignedButton.swift; sourceTree = ""; }; 479EE9492292FB03009DEBA6 /* ActivityIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ActivityIndicator.swift; path = CustomViews/ActivityIndicator.swift; sourceTree = ""; }; 47A13CAC24BE9AA500027D4F /* DatePickerViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerViewRenderer.swift; sourceTree = ""; }; @@ -1179,7 +1178,6 @@ 47CA68FB250F99E500671019 /* BookmarksListCellStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksListCellStrategy.swift; sourceTree = ""; }; 47CF2E6223BA0DD500D11C30 /* CopyLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyLabel.swift; sourceTree = ""; }; 47D48BF42432A7C900FEFB1F /* ChartViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartViewRenderer.swift; sourceTree = ""; }; - 47DF72BA225356BF0004AB10 /* DrivingOptions.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = DrivingOptions.storyboard; sourceTree = ""; }; 47E3C7242111E41B008B3B27 /* DimmedModalPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimmedModalPresentationController.swift; sourceTree = ""; }; 47E3C7262111E5A8008B3B27 /* AlertPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresentationController.swift; sourceTree = ""; }; 47E3C7282111E614008B3B27 /* FadeInAnimatedTransitioning.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FadeInAnimatedTransitioning.swift; sourceTree = ""; }; @@ -1441,7 +1439,6 @@ ED49D76F2CF0E3A8004AF27E /* TrackRecordingButtonViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackRecordingButtonViewController.swift; sourceTree = ""; }; ED5BAF4A2D688F5A0088D7B1 /* SearchOnMapHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchOnMapHeaderView.swift; sourceTree = ""; }; ED5E02132D8B17B600A5CC7B /* ModalPresentationStepsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalPresentationStepsController.swift; sourceTree = ""; }; - ED63CEB62BDF8F9C006155C4 /* SettingsTableViewiCloudSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewiCloudSwitchCell.swift; sourceTree = ""; }; ED70D5582D5396F300738C1E /* SearchItemType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchItemType.h; sourceTree = ""; }; ED70D5592D5396F300738C1E /* SearchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchResult.h; sourceTree = ""; }; ED70D55A2D5396F300738C1E /* SearchResult.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchResult.mm; sourceTree = ""; }; @@ -1465,7 +1462,6 @@ ED7CCC4E2C1362E300E2A737 /* FileType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileType.swift; sourceTree = ""; }; ED808D0E2C38407800D52585 /* CircleImageButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleImageButton.swift; sourceTree = ""; }; ED810EC42D566E9B00ECDE2C /* SearchOnMapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchOnMapTests.swift; sourceTree = ""; }; - ED8270EF2C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTableViewDetailedSwitchCell.swift; sourceTree = ""; }; ED83880E2D54DEA4002A0536 /* UIImage+FilledWithColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+FilledWithColor.swift"; sourceTree = ""; }; ED8A91DF2D759B50009E063B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LocalizableTypes.strings; sourceTree = ""; }; ED8A91E32D759B59009E063B /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LocalizableTypes.strings; sourceTree = ""; }; @@ -1707,21 +1703,6 @@ F6E2FD2E1E097BA00083EBEC /* MWMSearchSuggestionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchSuggestionCell.h; sourceTree = ""; }; F6E2FD2F1E097BA00083EBEC /* MWMSearchSuggestionCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchSuggestionCell.mm; sourceTree = ""; }; F6E2FD301E097BA00083EBEC /* MWMSearchSuggestionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchSuggestionCell.xib; sourceTree = ""; }; - F6E2FD381E097BA00083EBEC /* SettingsTableViewLinkCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewLinkCell.swift; sourceTree = ""; }; - F6E2FD391E097BA00083EBEC /* SettingsTableViewSelectableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSelectableCell.swift; sourceTree = ""; }; - F6E2FD3A1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSwitchCell.swift; sourceTree = ""; }; - F6E2FD401E097BA00083EBEC /* MWMMobileInternetViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMobileInternetViewController.h; sourceTree = ""; }; - F6E2FD411E097BA00083EBEC /* MWMMobileInternetViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMMobileInternetViewController.m; sourceTree = ""; }; - F6E2FD421E097BA00083EBEC /* MWMNightModeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNightModeController.h; sourceTree = ""; }; - F6E2FD431E097BA00083EBEC /* MWMNightModeController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMNightModeController.m; sourceTree = ""; }; - F6E2FD461E097BA00083EBEC /* MWMSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSettingsViewController.h; sourceTree = ""; }; - F6E2FD471E097BA00083EBEC /* MWMSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSettingsViewController.mm; sourceTree = ""; }; - F6E2FD481E097BA00083EBEC /* MWMTTSLanguageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSLanguageViewController.h; sourceTree = ""; }; - F6E2FD491E097BA00083EBEC /* MWMTTSLanguageViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSLanguageViewController.mm; sourceTree = ""; }; - F6E2FD4A1E097BA00083EBEC /* MWMTTSSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSSettingsViewController.h; sourceTree = ""; }; - F6E2FD4B1E097BA00083EBEC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSSettingsViewController.mm; sourceTree = ""; }; - F6E2FD4C1E097BA00083EBEC /* MWMUnitsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMUnitsController.h; sourceTree = ""; }; - F6E2FD4D1E097BA00083EBEC /* MWMUnitsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMUnitsController.mm; sourceTree = ""; }; F6FE3C361CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlaceDoesntExistAlert.h; sourceTree = ""; }; F6FE3C371CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = MWMPlaceDoesntExistAlert.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6FE3C3A1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlaceDoesntExistAlert.xib; sourceTree = ""; }; @@ -1958,11 +1939,26 @@ 2749E5C32E17F736006E73EC /* Model */ = { isa = PBXGroup; children = ( + 279367552E1BE16300AA5C3D /* Settings.swift */, + 27AF185B2E1DB64B00CD41E2 /* Settings Types */, 270C9C252E16AB6300ABA688 /* Profile.swift */, ); path = Model; sourceTree = ""; }; + 27AF185B2E1DB64B00CD41E2 /* Settings Types */ = { + isa = PBXGroup; + children = ( + 27AF184F2E1DB61500CD41E2 /* VoiceRoutingLanguage.swift */, + 27AF18512E1DB61F00CD41E2 /* DistanceUnit.swift */, + 27AF18532E1DB62600CD41E2 /* MobileDataPolicy.swift */, + 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */, + 27AF18572E1DB63900CD41E2 /* Appearance.swift */, + 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */, + ); + path = "Settings Types"; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* Maps */ = { isa = PBXGroup; children = ( @@ -2232,7 +2228,6 @@ children = ( 340E1EE51E2F614400CE49BF /* LaunchScreen.storyboard */, 340E1EE61E2F614400CE49BF /* Main.storyboard */, - 340E1EE81E2F614400CE49BF /* Settings.storyboard */, 340E1EE91E2F614400CE49BF /* Storyboard.swift */, CDB4D4D6222D248900104869 /* CarPlayStoryboard.storyboard */, 340E1EEA1E2F614400CE49BF /* Welcome.storyboard */, @@ -3940,40 +3935,13 @@ F6E2FD361E097BA00083EBEC /* Settings */ = { isa = PBXGroup; children = ( + 279367592E1BE17300AA5C3D /* SettingsView.swift */, + 27AF184B2E1D5A2700CD41E2 /* SettingsNavigationView.swift */, 272F1F352E0EE00B00FA52EF /* Profile */, - F6E2FD371E097BA00083EBEC /* Cells */, - F6E2FD401E097BA00083EBEC /* MWMMobileInternetViewController.h */, - F6E2FD411E097BA00083EBEC /* MWMMobileInternetViewController.m */, - F6E2FD421E097BA00083EBEC /* MWMNightModeController.h */, - F6E2FD431E097BA00083EBEC /* MWMNightModeController.m */, - F6E2FD461E097BA00083EBEC /* MWMSettingsViewController.h */, - F6E2FD471E097BA00083EBEC /* MWMSettingsViewController.mm */, - F6E2FD481E097BA00083EBEC /* MWMTTSLanguageViewController.h */, - F6E2FD491E097BA00083EBEC /* MWMTTSLanguageViewController.mm */, - F6E2FD4A1E097BA00083EBEC /* MWMTTSSettingsViewController.h */, - F6E2FD4B1E097BA00083EBEC /* MWMTTSSettingsViewController.mm */, - F6E2FD4C1E097BA00083EBEC /* MWMUnitsController.h */, - F6E2FD4D1E097BA00083EBEC /* MWMUnitsController.mm */, - 3DEE1AE921F72CD300054A91 /* MWMPowerManagmentViewController.h */, - 3DEE1AEA21F72CD300054A91 /* MWMPowerManagmentViewController.mm */, - 477219042243E79500E5B227 /* DrivingOptionsViewController.swift */, - 47DF72BA225356BF0004AB10 /* DrivingOptions.storyboard */, ); path = Settings; sourceTree = ""; }; - F6E2FD371E097BA00083EBEC /* Cells */ = { - isa = PBXGroup; - children = ( - ED63CEB62BDF8F9C006155C4 /* SettingsTableViewiCloudSwitchCell.swift */, - F6E2FD381E097BA00083EBEC /* SettingsTableViewLinkCell.swift */, - F6E2FD391E097BA00083EBEC /* SettingsTableViewSelectableCell.swift */, - F6E2FD3A1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift */, - ED8270EF2C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift */, - ); - path = Cells; - sourceTree = ""; - }; F6FE3C351CC50FDF00A73196 /* PlaceDoesntExist */ = { isa = PBXGroup; children = ( @@ -4341,7 +4309,6 @@ 470E1675252AD7F2002D201A /* BookmarksListInfoViewController.xib in Resources */, F6E2FE7F1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.xib in Resources */, 34AB66711FC5AA330078E451 /* TransportTransitTrain.xib in Resources */, - 47DF72BB225356BF0004AB10 /* DrivingOptions.storyboard in Resources */, F6E2FE851E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */, 6741A9601BF340DE002C974C /* MWMRoutingDisclaimerAlert.xib in Resources */, B3E3B4FD20D463B700DA8C13 /* BMCCategoriesHeader.xib in Resources */, @@ -4377,7 +4344,6 @@ 6741A94D1BF340DE002C974C /* resources-xxhdpi_light in Resources */, 3404F49E2028A2430090E401 /* BMCActionsCell.xib in Resources */, 6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */, - 340E1EF81E2F614400CE49BF /* Settings.storyboard in Resources */, 44360A112A7D35440016F412 /* TransportRuler.xib in Resources */, 6741A9421BF340DE002C974C /* sound-strings in Resources */, F69018BD1E9F7CB600B3C10B /* MWMAutoupdateController.xib in Resources */, @@ -4422,7 +4388,6 @@ 34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */, 34AB666E1FC5AA330078E451 /* TransportTransitStepsCollectionView.swift in Sources */, 993DF11E23F6BDB100AC231A /* UITextViewRenderer.swift in Sources */, - F6E2FF5A1E097BA00083EBEC /* MWMNightModeController.m in Sources */, 471A7BB8247FE3C300A0D4C1 /* URL+Query.swift in Sources */, 47F86D0120C93D8D00FEE291 /* TabViewController.swift in Sources */, 99536113235DB86C008B218F /* InsetsLabel.swift in Sources */, @@ -4515,7 +4480,6 @@ 340475621E081A4600C92850 /* MWMNetworkPolicy+UI.m in Sources */, F6E2FEE51E097BA00083EBEC /* MWMSearchNoResults.m in Sources */, ED5E02142D8B17B600A5CC7B /* ModalPresentationStepsController.swift in Sources */, - F6E2FF631E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, 4715273524907F8200E91BBA /* BookmarkColorViewController.swift in Sources */, 47E3C7292111E614008B3B27 /* FadeInAnimatedTransitioning.swift in Sources */, ED79A5D42BDF8D6100952D1F /* MetadataItem.swift in Sources */, @@ -4560,6 +4524,7 @@ B33D21AF20DAF9F000BAD749 /* Toast.swift in Sources */, 6741A9D41BF340DE002C974C /* MWMAlertViewController.mm in Sources */, 34D3B0181E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */, + 27AF18562E1DB63000CD41E2 /* PowerSavingMode.swift in Sources */, 993DF12223F6BDB100AC231A /* UINavigationItemRenderer.swift in Sources */, 993DF12B23F6BDB100AC231A /* StyleManager.swift in Sources */, ED43B8BD2C12063500D07BAA /* DocumentPicker.swift in Sources */, @@ -4567,6 +4532,7 @@ 47B9065521C7FA400079C85E /* NSString+MD5.m in Sources */, ED5BAF4B2D688F5B0088D7B1 /* SearchOnMapHeaderView.swift in Sources */, CDB4D5022231412900104869 /* SettingsTemplateBuilder.swift in Sources */, + 27AF18522E1DB62000CD41E2 /* DistanceUnit.swift in Sources */, 993DF10A23F6BDB100AC231A /* UISwitchRenderer.swift in Sources */, 99C9642C2428C0F700E41723 /* PlacePageHeaderBuilder.swift in Sources */, 99C9642B2428C0F700E41723 /* PlacePageHeaderViewController.swift in Sources */, @@ -4578,10 +4544,7 @@ 49AB95982CB2FE5300468EA2 /* UIButton+ImagePadding.swift in Sources */, 99A906E523F6F7030005872B /* ActionBarViewController.swift in Sources */, 47B9065421C7FA400079C85E /* UIImageView+WebImage.m in Sources */, - F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, - ED63CEB92BDF8F9D006155C4 /* SettingsTableViewiCloudSwitchCell.swift in Sources */, 47CA68D4250043C000671019 /* BookmarksListPresenter.swift in Sources */, - F6E2FF451E097BA00083EBEC /* SettingsTableViewLinkCell.swift in Sources */, 34C9BD0A1C6DBCDA000DC38D /* MWMNavigationController.m in Sources */, ED1080A72B791CFE0023F27E /* SocialMediaCollectionViewHeader.swift in Sources */, F6E2FE311E097BA00083EBEC /* MWMStreetEditorViewController.mm in Sources */, @@ -4640,6 +4603,7 @@ CDCA2745223FCFD200167D87 /* SearchResultInfo.swift in Sources */, 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.m in Sources */, 6741A9EC1BF340DE002C974C /* MWMCircularProgress.m in Sources */, + 27AF184C2E1D5B2D00CD41E2 /* SettingsNavigationView.swift in Sources */, 993DF11923F6BDB100AC231A /* UITextFieldRenderer.swift in Sources */, 272F1F462E0EEF9400FA52EF /* SafariView.swift in Sources */, 340475591E081A4600C92850 /* WebViewController.m in Sources */, @@ -4651,12 +4615,13 @@ 99F3EB1123F418C900C713F8 /* PlacePageBuilder.swift in Sources */, 4735008A23A83CF700661A95 /* DownloadedMapsDataSource.swift in Sources */, CD9AD96F2281DF3600EC174A /* CategoryInfo.swift in Sources */, - 3DEE1AEB21F72CD300054A91 /* MWMPowerManagmentViewController.mm in Sources */, 34AB66771FC5AA330078E451 /* TransportRoutePreviewStatus.swift in Sources */, 34D3AFEA1E378AF1004100F9 /* UINib+Init.swift in Sources */, 34AB663E1FC5AA330078E451 /* RouteManagerTransitioning.swift in Sources */, 993DF0CB23F6BD0600AC231A /* ElevationDetailsRouter.swift in Sources */, EDB71D8C2D8474A0004A6A7F /* CornerRadius.swift in Sources */, + 27AF18502E1DB61600CD41E2 /* VoiceRoutingLanguage.swift in Sources */, + 279367562E1BE16300AA5C3D /* Settings.swift in Sources */, 47CA68FC250F99E500671019 /* BookmarksListCellStrategy.swift in Sources */, 34AB662F1FC5AA330078E451 /* RouteManagerPresentationController.swift in Sources */, 993F5508237C622700545511 /* DeepLinkRouteStrategyAdapter.mm in Sources */, @@ -4691,15 +4656,12 @@ 993DF12D23F6BDB100AC231A /* GlobalStyleSheet.swift in Sources */, F6E2FF361E097BA00083EBEC /* MWMSearchSuggestionCell.mm in Sources */, 3472B5CF200F4A2B00DC6CD5 /* BackgroundFetchTask.swift in Sources */, - 477219052243E79500E5B227 /* DrivingOptionsViewController.swift in Sources */, CDB4D4E4222E8FF600104869 /* CarPlayService.swift in Sources */, - F6E2FF661E097BA00083EBEC /* MWMTTSSettingsViewController.mm in Sources */, 3454D7C21E07F045004AF2AD /* NSString+Categories.m in Sources */, ED2D74662D1435A600660FBF /* LiveActivityManager.swift in Sources */, 34E7761F1F14DB48003040B3 /* PlacePageArea.swift in Sources */, ED79A5D82BDF8D6100952D1F /* LocalDirectoryMonitor.swift in Sources */, EDC4E34B2C5D1BEF009286A2 /* RecentlyDeletedCategoriesViewController.swift in Sources */, - ED8270F02C2071A3005966DA /* SettingsTableViewDetailedSwitchCell.swift in Sources */, 4728F69322CF89A400E00028 /* GradientView.swift in Sources */, F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */, 9917D17F2397B1D600A7E06E /* IPadModalPresentationController.swift in Sources */, @@ -4716,12 +4678,13 @@ F6E2FE821E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.m in Sources */, F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.m in Sources */, CDCA27842245090900167D87 /* ListenerContainer.swift in Sources */, + 27AF18582E1DB63A00CD41E2 /* Appearance.swift in Sources */, 47E3C7252111E41B008B3B27 /* DimmedModalPresentationController.swift in Sources */, 3472B5CB200F43EF00DC6CD5 /* BackgroundFetchScheduler.swift in Sources */, 34FE5A6F1F18F30F00BCA729 /* TrafficButtonArea.swift in Sources */, 993DF10D23F6BDB100AC231A /* UIPageControlRenderer.swift in Sources */, FA8E808925F412E2002A1434 /* FirstSession.mm in Sources */, - F6E2FF691E097BA00083EBEC /* MWMUnitsController.mm in Sources */, + 2793675A2E1BE17300AA5C3D /* SettingsView.swift in Sources */, 6741AA031BF340DE002C974C /* MWMActivityViewController.mm in Sources */, ED808D0F2C38407800D52585 /* CircleImageButton.swift in Sources */, CDCA27382237F1BD00167D87 /* BookmarkInfo.swift in Sources */, @@ -4754,6 +4717,7 @@ ED70D5922D539A2500738C1E /* PlaceholderView.swift in Sources */, ED70D5932D539A2500738C1E /* SearchOnMapManager.swift in Sources */, 3454D7BC1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */, + 27AF185A2E1DB64500CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift in Sources */, 47E3C7272111E5A8008B3B27 /* AlertPresentationController.swift in Sources */, CDCA27812243F59800167D87 /* CarPlayRouter.swift in Sources */, 34F5E0D41E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */, @@ -4764,7 +4728,6 @@ 47CA68D12500435E00671019 /* BookmarksListViewController.swift in Sources */, 34AB66321FC5AA330078E451 /* RouteManagerHeaderView.swift in Sources */, 347040301EA6470700038379 /* BorderedButton.swift in Sources */, - F6E2FF4B1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, 993DF12623F6BDB100AC231A /* SwizzleStyle.m in Sources */, 993DF10E23F6BDB100AC231A /* UIButtonRenderer.swift in Sources */, 99514BBB23E82B450085D3A7 /* ElevationProfileBuilder.swift in Sources */, @@ -4842,7 +4805,6 @@ 47E3C7312111F4C2008B3B27 /* CoverVerticalPresentationAnimator.swift in Sources */, 99E2B0122368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift in Sources */, F6D67CDC2062B9C00032FD38 /* BCCreateCategoryAlert.swift in Sources */, - F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, F6E2FE2B1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.m in Sources */, 34AB66891FC5AA330078E451 /* NavigationControlView.swift in Sources */, 479EE94A2292FB03009DEBA6 /* ActivityIndicator.swift in Sources */, @@ -4861,7 +4823,6 @@ 34AB39C21D2BD8310021857D /* MWMStopButton.m in Sources */, 3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */, 6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */, - F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.m in Sources */, 993DF11323F6BDB100AC231A /* UITableViewRenderer.swift in Sources */, 34AB66261FC5AA330078E451 /* RouteManagerDimView.swift in Sources */, EDFDFB4A2B722A310013A44C /* SocialMediaCollectionViewCell.swift in Sources */, @@ -4872,6 +4833,7 @@ CDCA278622451F5000167D87 /* RouteInfo.swift in Sources */, 3467CEB6202C6FA900D3C670 /* BMCNotificationsCell.swift in Sources */, 337F98B221D3BAE600C8AC27 /* SearchCategoriesViewController.swift in Sources */, + 27AF18542E1DB62700CD41E2 /* MobileDataPolicy.swift in Sources */, F6E2FE0A1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 3454D7DA1E07F045004AF2AD /* UILabel+RuntimeAttributes.m in Sources */, 34AB66531FC5AA330078E451 /* MWMiPadRoutePreview.m in Sources */, diff --git a/iphone/Maps/Model/Profile.swift b/iphone/Maps/Model/Profile.swift index 1e07d6726..0c2a443a5 100644 --- a/iphone/Maps/Model/Profile.swift +++ b/iphone/Maps/Model/Profile.swift @@ -1,7 +1,6 @@ import Network import OSMEditor - /// The OpenStreetMap profile @objc class Profile: NSObject { // MARK: Properties diff --git a/iphone/Maps/Model/Settings Types/AnnouncingSpeedTrapsWhileVoiceRouting.swift b/iphone/Maps/Model/Settings Types/AnnouncingSpeedTrapsWhileVoiceRouting.swift new file mode 100644 index 000000000..40e80f7c9 --- /dev/null +++ b/iphone/Maps/Model/Settings Types/AnnouncingSpeedTrapsWhileVoiceRouting.swift @@ -0,0 +1,30 @@ +extension Settings { + /// The announcing of speed traps for voice guidance during routing + @objc enum AnnouncingSpeedTrapsWhileVoiceRouting: Int, Codable, CaseIterable, Identifiable { + case always = 1 + case onlyWhenTooFast = 2 + case never = 0 + + + + // MARK: Properties + + /// The id + var id: Self { self } + + + /// The description text + var description: String { + switch self { + case .always: + return String(localized: "pref_tts_speedcams_always") + case .onlyWhenTooFast: + return String(localized: "pref_tts_speedcams_auto") + case .never: + return String(localized: "pref_tts_speedcams_never") + default: + return String() + } + } + } +} diff --git a/iphone/Maps/Model/Settings Types/Appearance.swift b/iphone/Maps/Model/Settings Types/Appearance.swift new file mode 100644 index 000000000..a48694d17 --- /dev/null +++ b/iphone/Maps/Model/Settings Types/Appearance.swift @@ -0,0 +1,30 @@ +extension Settings { + /// The visual appeareance + @objc enum Appearance: Int, Codable, CaseIterable, Identifiable { + case auto = 1 + case light = 2 + case dark = 3 + + + + // MARK: Properties + + /// The id + var id: Self { self } + + + /// The description text + var description: String { + switch self { + case .auto: + return String(localized: "auto") + case .light: + return String(localized: "pref_appearance_light") + case .dark: + return String(localized: "pref_appearance_dark") + default: + return String() + } + } + } +} diff --git a/iphone/Maps/Model/Settings Types/DistanceUnit.swift b/iphone/Maps/Model/Settings Types/DistanceUnit.swift new file mode 100644 index 000000000..2e14a90dd --- /dev/null +++ b/iphone/Maps/Model/Settings Types/DistanceUnit.swift @@ -0,0 +1,27 @@ +extension Settings { + /// The unit system used for distances + @objc enum DistanceUnit: Int, Codable, CaseIterable, Identifiable { + case metric = 0 + case imperial = 1 + + + + // MARK: Properties + + /// The id + var id: Self { self } + + + /// The description text + var description: String { + switch self { + case .metric: + return String(localized: "kilometres") + case .imperial: + return String(localized: "miles") + default: + return String() + } + } + } +} diff --git a/iphone/Maps/Model/Settings Types/MobileDataPolicy.swift b/iphone/Maps/Model/Settings Types/MobileDataPolicy.swift new file mode 100644 index 000000000..3c5832b07 --- /dev/null +++ b/iphone/Maps/Model/Settings Types/MobileDataPolicy.swift @@ -0,0 +1,30 @@ +extension Settings { + /// The mobile data policy + @objc enum MobileDataPolicy: Int, Codable, CaseIterable, Identifiable { + case always = 1 + case ask = 2 + case never = 0 + + + + // MARK: Properties + + /// The id + var id: Self { self } + + + /// The description text + var description: String { + switch self { + case .always: + return String(localized: "mobile_data_option_always") + case .ask: + return String(localized: "mobile_data_option_ask") + case .never: + return String(localized: "mobile_data_option_never") + default: + return String() + } + } + } +} diff --git a/iphone/Maps/Model/Settings Types/PowerSavingMode.swift b/iphone/Maps/Model/Settings Types/PowerSavingMode.swift new file mode 100644 index 000000000..0e15d85cc --- /dev/null +++ b/iphone/Maps/Model/Settings Types/PowerSavingMode.swift @@ -0,0 +1,30 @@ +extension Settings { + /// The power saving mode + @objc enum PowerSavingMode: Int, Codable, CaseIterable, Identifiable { + case auto = 1 + case maximum = 2 + case never = 0 + + + + // MARK: Properties + + /// The id + var id: Self { self } + + + /// The description text + var description: String { + switch self { + case .auto: + return String(localized: "power_managment_setting_auto") + case .maximum: + return String(localized: "power_managment_setting_manual_max") + case .never: + return String(localized: "power_managment_setting_never") + default: + return String() + } + } + } +} diff --git a/iphone/Maps/Model/Settings Types/VoiceRoutingLanguage.swift b/iphone/Maps/Model/Settings Types/VoiceRoutingLanguage.swift new file mode 100644 index 000000000..e3e4e354e --- /dev/null +++ b/iphone/Maps/Model/Settings Types/VoiceRoutingLanguage.swift @@ -0,0 +1,31 @@ +extension Settings { + /// A language used for voice guidance during routing + struct VoiceRoutingLanguage: Codable, Identifiable { + // MARK: Properties + + /// The id + var id: String + + + /// The localized name + var localizedName: String + } +} + + + +// MARK: - Comparable +extension Settings.VoiceRoutingLanguage: Equatable { + static func == (lhs: Settings.VoiceRoutingLanguage, rhs: Settings.VoiceRoutingLanguage) -> Bool { + return lhs.id == rhs.id + } +} + + + +// MARK: - Comparable +extension Settings.VoiceRoutingLanguage: Comparable { + static func < (lhs: Settings.VoiceRoutingLanguage, rhs: Settings.VoiceRoutingLanguage) -> Bool { + return lhs.localizedName.localizedCaseInsensitiveCompare(rhs.localizedName) == .orderedAscending + } +} diff --git a/iphone/Maps/Model/Settings.swift b/iphone/Maps/Model/Settings.swift new file mode 100644 index 000000000..51dd28e48 --- /dev/null +++ b/iphone/Maps/Model/Settings.swift @@ -0,0 +1,362 @@ +import Combine + +/// The settings +@objc class Settings: NSObject { + // MARK: Properties + + /// Key for storing if the sync beta alert has been shown in the user defaults + static private let userDefaultsKeyHasShownSyncBetaAlert = "kUDDidShowICloudSynchronizationEnablingAlert" + + + /// The current distance unit + static var distanceUnit: DistanceUnit { + get { + if SettingsBridge.measurementUnits() == .imperial { + return .imperial + } else { + return .metric + } + } + set { + if newValue == .imperial { + SettingsBridge.setMeasurementUnits(.imperial) + } else { + SettingsBridge.setMeasurementUnits(.metric) + } + } + } + + + /// If zoom buttons should be displayed + @objc static var hasZoomButtons: Bool { + get { + return SettingsBridge.zoomButtonsEnabled() + } + set { + SettingsBridge.setZoomButtonsEnabled(newValue) + } + } + + + /// If 3D buildings should be displayed + @objc static var has3dBuildings: Bool { + get { + return SettingsBridge.buildings3dViewEnabled() + } + set { + SettingsBridge.setBuildings3dViewEnabled(newValue) + } + } + + + /// If automatic map downloads should be enabled + @objc static var hasAutomaticDownload: Bool { + get { + return SettingsBridge.autoDownloadEnabled() + } + set { + SettingsBridge.setAutoDownloadEnabled(newValue) + } + } + + + /// The current mobile data policy + @objc static var mobileDataPolicy: MobileDataPolicy { + get { + let networkPolicyPermission = NetworkPolicy.shared().permission + if networkPolicyPermission == .always { + return .always + } else if networkPolicyPermission == .never { + return .never + } else { + return .ask + } + } + set { + if newValue == .always { + NetworkPolicy.shared().permission = .always + } else if newValue == .never { + NetworkPolicy.shared().permission = .never + } else { + NetworkPolicy.shared().permission = .ask + } + } + } + + + /// The current power saving mode + @objc static var powerSavingMode: PowerSavingMode { + get { + return PowerSavingMode(rawValue: SettingsBridge.powerManagement()) ?? .never + } + set { + SettingsBridge.setPowerManagement(newValue.rawValue) + } + } + + + /// If an increased font size should be used for map labels + @objc static var hasIncreasedFontsize: Bool { + get { + return SettingsBridge.largeFontSize() + } + set { + SettingsBridge.setLargeFontSize(newValue) + } + } + + + /// If names should be transliterated to Latin + @objc static var shouldTransliterateToLatin: Bool { + get { + return SettingsBridge.transliteration() + } + set { + SettingsBridge.setTransliteration(newValue) + } + } + + + /// If the compass should be calibrated + @objc static var shouldCalibrateCompass: Bool { + get { + return SettingsBridge.compassCalibrationEnabled() + } + set { + SettingsBridge.setCompassCalibrationEnabled(newValue) + } + } + + + /// The current appearance + @objc static var appearance: Appearance { + get { + let theme = SettingsBridge.theme() + if theme == MWMTheme.day { + return .light + } else if theme == MWMTheme.night { + return .dark + } else { + return .auto + } + } + set { + if newValue == .light { + SettingsBridge.setTheme(MWMTheme.day) + } else if newValue == .dark { + SettingsBridge.setTheme(MWMTheme.night) + } else { + SettingsBridge.setTheme(MWMTheme.auto) + } + } + } + + + /// If the bookmarks should be synced via iCloud + @objc static var shouldSync: Bool { + get { + return SettingsBridge.iCLoudSynchronizationEnabled() + } + set { + SettingsBridge.setICLoudSynchronizationEnabled(newValue) + } + } + + + /// If the sync beta alert has been shown + @objc static var hasShownSyncBetaAlert: Bool { + get { + return UserDefaults.standard.bool(forKey: userDefaultsKeyHasShownSyncBetaAlert) + } + set { + UserDefaults.standard.set(newValue, forKey: userDefaultsKeyHasShownSyncBetaAlert) + } + } + + + /// The publisher for state changes of the iCloud sync + static var syncStatePublisher: AnyPublisher { + iCloudSynchronizaionManager.shared.notifyObservers() + return iCloudSynchronizaionManager.shared.statePublisher + } + + + /// If our custom logging is enabled + @objc static var isLogging: Bool { + get { + return SettingsBridge.isFileLoggingEnabled() + } + set { + SettingsBridge.setFileLoggingEnabled(newValue) + } + } + + + /// The formatter for the size of the log file + @objc static var logSizeFormatter: MeasurementFormatter { + let measurementFormatter = MeasurementFormatter() + measurementFormatter.unitStyle = .medium + measurementFormatter.unitOptions = .naturalScale + return measurementFormatter + } + + + /// The size of the log file in bytes + @objc static var logSize: Measurement { + return Measurement(value: Double(SettingsBridge.logFileSize()), unit: .bytes) + } + + + /// If the perspective view should be used during routing + @objc static var hasPerspectiveViewWhileRouting: Bool { + get { + return SettingsBridge.perspectiveViewEnabled() + } + set { + SettingsBridge.setPerspectiveViewEnabled(newValue) + } + } + + + /// If auto zoom should be used during routing + @objc static var hasAutoZoomWhileRouting: Bool { + get { + return SettingsBridge.autoZoomEnabled() + } + set { + SettingsBridge.setAutoZoomEnabled(newValue) + } + } + + + /// If voice guidance should be provided during routing + @objc static var shouldProvideVoiceRouting: Bool { + get { + return MWMTextToSpeech.isTTSEnabled() + } + set { + MWMTextToSpeech.setTTSEnabled(newValue) + } + } + + + /// The available languages for voice guidance during routing + static var availableLanguagesForVoiceRouting: [VoiceRoutingLanguage] { + return MWMTextToSpeech.availableLanguages().map { language in + return VoiceRoutingLanguage(id: language.key, localizedName: language.value) + }.sorted() + } + + + /// The current language for voice guidance during routing + @objc static var languageForVoiceRouting: VoiceRoutingLanguage.ID { + get { + return MWMTextToSpeech.selectedLanguage() + } + set { + MWMTextToSpeech.tts().setNotificationsLocale(newValue) + } + } + + + /// If street names should be announced in the voice guidance during routing + @objc static var shouldAnnounceStreetnamesWhileVoiceRouting: Bool { + get { + return MWMTextToSpeech.isStreetNamesTTSEnabled() + } + set { + MWMTextToSpeech.setStreetNamesTTSEnabled(newValue) + } + } + + + /// The current announcement of speed traps in the voice guidance during routing + @objc static var announcingSpeedTrapsWhileVoiceRouting: AnnouncingSpeedTrapsWhileVoiceRouting { + get { + return AnnouncingSpeedTrapsWhileVoiceRouting(rawValue: MWMTextToSpeech.speedCameraMode()) ?? .never + } + set { + MWMTextToSpeech.setSpeedCameraMode(newValue.rawValue) + } + } + + + /// If toll roads should be avoided during routing + @objc static var shouldAvoidTollRoadsWhileRouting: Bool { + get { + return RoutingOptions().avoidToll + } + set { + RoutingOptions().avoidToll = newValue + } + } + + + /// If unpaved roads should be avoided during routing + @objc static var shouldAvoidUnpavedRoadsWhileRouting: Bool { + get { + return RoutingOptions().avoidDirty + } + set { + RoutingOptions().avoidDirty = newValue + } + } + + + /// If ferries should be avoided during routing + @objc static var shouldAvoidFerriesWhileRouting: Bool { + get { + return RoutingOptions().avoidFerry + } + set { + RoutingOptions().avoidFerry = newValue + } + } + + + /// If motorways should be avoided during routing + @objc static var shouldAvoidMotorwaysWhileRouting: Bool { + get { + return RoutingOptions().avoidMotorway + } + set { + RoutingOptions().avoidMotorway = newValue + } + } + + + + // MARK: Methods + + /// Create a bookmarks backup before enabling the sync beta + /// - Parameter completionHandler: A compeltion handler, which returns if a backup has been created + static func createBookmarksBackupBecauseOfSyncBeta(completionHandler: ((_ hasCreatedBackup: Bool) -> Void)?) { + BookmarksManager.shared().shareAllCategories { status, url in + switch status { + case .success: + let window = (UIApplication.shared.connectedScenes.filter { $0.activationState == .foregroundActive }.first(where: { $0 is UIWindowScene }) as? UIWindowScene)?.keyWindow + if let viewController = window?.rootViewController?.presentedViewController { + let shareController = ActivityViewController.share(for: url, message: String(localized: "share_bookmarks_email_body")) { _, _, _, _ in + completionHandler?(true) + } + shareController.present(inParentViewController: viewController, anchorView: nil) + } + case .emptyCategory: + Toast.show(withText: String(localized: "bookmarks_error_title_share_empty")) + completionHandler?(false) + case .archiveError: + Toast.show(withText: String(localized: "dialog_routing_system_error")) + completionHandler?(false) + case .fileError: + Toast.show(withText: String(localized: "dialog_routing_system_error")) + completionHandler?(false) + } + } + } + + + /// Play a test audio snippet for voice guidance during routing + @objc static func playVoiceRoutingTest() { + MWMTextToSpeech.playTest() + } +} diff --git a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift index 99a260b37..4b8da1f47 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuInteractor.swift @@ -48,7 +48,7 @@ extension BottomMenuInteractor: BottomMenuInteractorProtocol { func donate() { close() - guard var url = Settings.donateUrl() else { return } + guard var url = SettingsBridge.donateUrl() else { return } if url == "https://www.comaps.app/donate/" { url = L("translated_om_site_url") + "donate/" } diff --git a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift index f6d6c546e..b262b8548 100644 --- a/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift +++ b/iphone/Maps/UI/BottomMenu/Menu/BottomMenuPresenter.swift @@ -32,7 +32,7 @@ class BottomMenuPresenter: NSObject { self.view = view self.interactor = interactor self.sections = sections - let disableDonate = Settings.donateUrl() == nil + let disableDonate = SettingsBridge.donateUrl() == nil self.menuCells = CellType.allCases.filter { disableDonate ? $0 != .donate : true } self.cellToHighlight = Self.getCellToHighlight() super.init() @@ -112,7 +112,7 @@ extension BottomMenuPresenter { title: L("download_maps"), badgeCount: MapsAppDelegate.theApp().badgeNumber()) case .donate: - cell.configure(imageName: Settings.isNY() ? "ic_christmas_tree" : "ic_menu_donate", + cell.configure(imageName: SettingsBridge.isNY() ? "ic_christmas_tree" : "ic_menu_donate", title: L("donate")) case .settings: cell.configure(imageName: "ic_menu_settings", diff --git a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift index 05d3bc8d3..db632f9fc 100644 --- a/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift +++ b/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarViewController.swift @@ -36,7 +36,7 @@ class BottomTabBarViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - if Settings.isNY() { + if SettingsBridge.isNY() { helpButton.setTitle("🎄", for: .normal) helpButton.setImage(nil, for: .normal) } diff --git a/iphone/Maps/UI/Help/AboutController/AboutController.swift b/iphone/Maps/UI/Help/AboutController/AboutController.swift index c5b630194..afad1d987 100644 --- a/iphone/Maps/UI/Help/AboutController/AboutController.swift +++ b/iphone/Maps/UI/Help/AboutController/AboutController.swift @@ -128,7 +128,7 @@ private extension AboutController { func setupDonation() { donationView.donateButtonDidTapHandler = { [weak self] in guard let self else { return } - self.openUrl(self.isDonateEnabled() ? Settings.donateUrl() : L("translated_om_site_url") + "support-us/") + self.openUrl(self.isDonateEnabled() ? SettingsBridge.donateUrl() : L("translated_om_site_url") + "support-us/") } } @@ -266,7 +266,7 @@ private extension AboutController { } func isDonateEnabled() -> Bool { - return Settings.donateUrl() != nil + return SettingsBridge.donateUrl() != nil } func buildInfoTableViewData() -> [AboutInfoTableViewCellModel] { diff --git a/iphone/Maps/UI/PlacePage/Components/ElevationProfile/ElevationProfileFormatter.swift b/iphone/Maps/UI/PlacePage/Components/ElevationProfile/ElevationProfileFormatter.swift index 4a17c5c4c..7b0f3b519 100644 --- a/iphone/Maps/UI/PlacePage/Components/ElevationProfile/ElevationProfileFormatter.swift +++ b/iphone/Maps/UI/PlacePage/Components/ElevationProfile/ElevationProfileFormatter.swift @@ -15,7 +15,7 @@ final class ElevationProfileFormatter { private let altitudeStep: CGFloat private let units: Units - init(units: Units = Settings.measurementUnits()) { + init(units: Units = SettingsBridge.measurementUnits()) { self.units = units self.distanceFormatter = DistanceFormatter.self self.altitudeFormatter = AltitudeFormatter.self diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewDetailedSwitchCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewDetailedSwitchCell.swift deleted file mode 100644 index 93709d8e6..000000000 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewDetailedSwitchCell.swift +++ /dev/null @@ -1,19 +0,0 @@ -class SettingsTableViewDetailedSwitchCell: SettingsTableViewSwitchCell { - - override func awakeFromNib() { - super.awakeFromNib() - styleDetail() - } - - @objc - func setDetail(_ text: String?) { - detailTextLabel?.text = text - setNeedsLayout() - } - - private func styleDetail() { - detailTextLabel?.setFontStyleAndApply(.regular12, color: .blackSecondary) - detailTextLabel?.numberOfLines = 0 - detailTextLabel?.lineBreakMode = .byWordWrapping - } -} diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift deleted file mode 100644 index 5261a7838..000000000 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift +++ /dev/null @@ -1,22 +0,0 @@ -@objc -final class SettingsTableViewLinkCell: MWMTableViewCell { - - override func awakeFromNib() { - super.awakeFromNib() - setupCell() - } - - private func setupCell() { - setStyle(.background) - textLabel?.setFontStyle(.regular17, color: .blackPrimary) - textLabel?.numberOfLines = 0 - textLabel?.lineBreakMode = .byWordWrapping - detailTextLabel?.setFontStyle(.regular17, color: .blackSecondary) - } - - @objc func config(title: String, info: String?) { - textLabel?.text = title - detailTextLabel?.text = info - detailTextLabel?.isHidden = info == nil - } -} diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift deleted file mode 100644 index da2cae388..000000000 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift +++ /dev/null @@ -1,24 +0,0 @@ -@objc -final class SettingsTableViewSelectableCell: MWMTableViewCell { - - override func awakeFromNib() { - super.awakeFromNib() - setupCell() - } - - override func applyTheme() { - super.applyTheme() - textLabel?.applyTheme() - } - - private func setupCell() { - setStyle(.background) - textLabel?.setFontStyle(.regular17, color: .blackPrimary) - textLabel?.numberOfLines = 0 - textLabel?.lineBreakMode = .byWordWrapping - } - - @objc func config(title: String) { - textLabel?.text = title - } -} diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift deleted file mode 100644 index cb91678fd..000000000 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift +++ /dev/null @@ -1,68 +0,0 @@ -@objc -protocol SettingsTableViewSwitchCellDelegate { - func switchCell(_ cell: SettingsTableViewSwitchCell, didChangeValue value: Bool) -} - -@objc -class SettingsTableViewSwitchCell: MWMTableViewCell { - - let switchButton = UISwitch() - - @IBOutlet weak var delegate: SettingsTableViewSwitchCellDelegate? - - @objc - var isEnabled = true { - didSet { - styleTitle() - switchButton.isUserInteractionEnabled = isEnabled - } - } - - @objc - var isOn: Bool { - get { return switchButton.isOn } - set { switchButton.isOn = newValue } - } - - @objc - func setOn(_ isOn: Bool, animated: Bool) { - switchButton.setOn(isOn, animated: animated) - } - - override func awakeFromNib() { - super.awakeFromNib() - setupCell() - } - - @objc - func config(delegate: SettingsTableViewSwitchCellDelegate, title: String, isOn: Bool) { - backgroundColor = UIColor.white() - - self.delegate = delegate - - self.textLabel?.text = title - styleTitle() - - switchButton.isOn = isOn - } - - private func setupCell() { - setStyle(.background) - styleTitle() - textLabel?.numberOfLines = 0 - textLabel?.lineBreakMode = .byWordWrapping - - switchButton.onTintColor = UIColor.linkBlue() - switchButton.addTarget(self, action: #selector(switchChanged), for: .valueChanged) - accessoryView = switchButton - } - - @objc - private func switchChanged() { - delegate?.switchCell(self, didChangeValue: switchButton.isOn) - } - - private func styleTitle() { - textLabel?.setFontStyleAndApply(.regular17, color: isEnabled ? .blackPrimary : .blackSecondary) - } -} diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewiCloudSwitchCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewiCloudSwitchCell.swift deleted file mode 100644 index d429735a1..000000000 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewiCloudSwitchCell.swift +++ /dev/null @@ -1,15 +0,0 @@ -final class SettingsTableViewiCloudSwitchCell: SettingsTableViewDetailedSwitchCell { - - @objc - func updateWithSynchronizationState(_ state: SynchronizationManagerState) { - guard state.isAvailable else { - accessoryView = nil - accessoryType = .detailButton - return - } - accessoryView = switchButton - detailTextLabel?.text = state.error?.localizedDescription - setOn(state.isOn, animated: true) - setNeedsLayout() - } -} diff --git a/iphone/Maps/UI/Settings/DrivingOptions.storyboard b/iphone/Maps/UI/Settings/DrivingOptions.storyboard deleted file mode 100644 index 65430e024..000000000 --- a/iphone/Maps/UI/Settings/DrivingOptions.storyboard +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iphone/Maps/UI/Settings/DrivingOptionsViewController.swift b/iphone/Maps/UI/Settings/DrivingOptionsViewController.swift deleted file mode 100644 index 227eabedc..000000000 --- a/iphone/Maps/UI/Settings/DrivingOptionsViewController.swift +++ /dev/null @@ -1,33 +0,0 @@ - -class DrivingOptionsViewController: MWMTableViewController { - let options = RoutingOptions() - @IBOutlet var tollRoadsCell: SettingsTableViewSwitchCell! - @IBOutlet var unpavedRoadsCell: SettingsTableViewSwitchCell! - @IBOutlet var ferryCrossingsCell: SettingsTableViewSwitchCell! - @IBOutlet var motorwaysCell: SettingsTableViewSwitchCell! - - override func viewDidLoad() { - super.viewDidLoad() - title = L("driving_options_title") - tollRoadsCell.isOn = options.avoidToll - unpavedRoadsCell.isOn = options.avoidDirty - ferryCrossingsCell.isOn = options.avoidFerry - motorwaysCell.isOn = options.avoidMotorway - } -} - -extension DrivingOptionsViewController: SettingsTableViewSwitchCellDelegate { - func switchCell(_ cell: SettingsTableViewSwitchCell, didChangeValue value: Bool) { - if cell == tollRoadsCell { - options.avoidToll = cell.isOn - } else if cell == unpavedRoadsCell { - options.avoidDirty = cell.isOn - } else if cell == ferryCrossingsCell { - options.avoidFerry = cell.isOn - } else if cell == motorwaysCell { - options.avoidMotorway = cell.isOn - } - - options.save() - } -} diff --git a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.h b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.h deleted file mode 100644 index bdd9ce1e5..000000000 --- a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMMobileInternetViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.m b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.m deleted file mode 100644 index f2c6cc12c..000000000 --- a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.m +++ /dev/null @@ -1,68 +0,0 @@ -#import "MWMMobileInternetViewController.h" -#import "SwiftBridge.h" - -@interface MWMMobileInternetViewController () - -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * always; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * ask; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * never; -@property(weak, nonatomic) SettingsTableViewSelectableCell * selected; - -@end - -@implementation MWMMobileInternetViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"mobile_data"); - - SettingsTableViewSelectableCell * selected; - switch ([MWMNetworkPolicy sharedPolicy].permission) { - case MWMNetworkPolicyPermissionAlways: - selected = self.always; - break; - case MWMNetworkPolicyPermissionNever: - selected = self.never; - break; - case MWMNetworkPolicyPermissionToday: - case MWMNetworkPolicyPermissionNotToday: - case MWMNetworkPolicyPermissionAsk: - selected = self.ask; - break; - } - selected.accessoryType = UITableViewCellAccessoryCheckmark; - self.selected = selected; -} - -- (void)setSelected:(SettingsTableViewSelectableCell *)selected -{ - if ([_selected isEqual:selected]) - return; - - _selected = selected; - if ([selected isEqual:self.always]) - [MWMNetworkPolicy sharedPolicy].permission = MWMNetworkPolicyPermissionAlways; - else if ([selected isEqual:self.ask]) - [MWMNetworkPolicy sharedPolicy].permission = MWMNetworkPolicyPermissionAsk; - else if ([selected isEqual:self.never]) - [MWMNetworkPolicy sharedPolicy].permission = MWMNetworkPolicyPermissionNever; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - SettingsTableViewSelectableCell * selected = self.selected; - selected.accessoryType = UITableViewCellAccessoryNone; - selected = [tableView cellForRowAtIndexPath:indexPath]; - selected.accessoryType = UITableViewCellAccessoryCheckmark; - selected.selected = NO; - self.selected = selected; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section -{ - return L(@"mobile_data_description"); -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMNightModeController.h b/iphone/Maps/UI/Settings/MWMNightModeController.h deleted file mode 100644 index 27b77f6f5..000000000 --- a/iphone/Maps/UI/Settings/MWMNightModeController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMNightModeController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMNightModeController.m b/iphone/Maps/UI/Settings/MWMNightModeController.m deleted file mode 100644 index d1a14fbc4..000000000 --- a/iphone/Maps/UI/Settings/MWMNightModeController.m +++ /dev/null @@ -1,58 +0,0 @@ -#import "MWMNightModeController.h" -#import "MWMSettings.h" -#import "SwiftBridge.h" - -@interface MWMNightModeController () - -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * autoSwitch; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * on; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * off; -@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell; - -@end - -@implementation MWMNightModeController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_appearance_title"); - SettingsTableViewSelectableCell * selectedCell = nil; - switch ([MWMSettings theme]) - { - case MWMThemeVehicleDay: NSAssert(false, @"Invalid case"); - case MWMThemeDay: selectedCell = self.off; break; - case MWMThemeVehicleNight: NSAssert(false, @"Invalid case"); - case MWMThemeNight: selectedCell = self.on; break; - case MWMThemeAuto: selectedCell = self.autoSwitch; break; - } - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - self.selectedCell = selectedCell; -} - -- (void)setSelectedCell:(SettingsTableViewSelectableCell *)cell -{ - if ([_selectedCell isEqual:cell]) - return; - - _selectedCell = cell; - if ([cell isEqual:self.on]) - [MWMSettings setTheme:MWMThemeNight]; - else if ([cell isEqual:self.off]) - [MWMSettings setTheme:MWMThemeDay]; - else if ([cell isEqual:self.autoSwitch]) - [MWMSettings setTheme:MWMThemeAuto]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - SettingsTableViewSelectableCell * selectedCell = self.selectedCell; - selectedCell.accessoryType = UITableViewCellAccessoryNone; - selectedCell = [tableView cellForRowAtIndexPath:indexPath]; - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - selectedCell.selected = NO; - self.selectedCell = selectedCell; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.h b/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.h deleted file mode 100644 index 11e7f7e6b..000000000 --- a/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMPowerManagmentViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.mm b/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.mm deleted file mode 100644 index dee929831..000000000 --- a/iphone/Maps/UI/Settings/MWMPowerManagmentViewController.mm +++ /dev/null @@ -1,66 +0,0 @@ -#import "MWMPowerManagmentViewController.h" - -#import "SwiftBridge.h" - -#include - -using namespace power_management; - -@interface MWMPowerManagmentViewController () -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * never; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * manualMax; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * automatic; -@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell; - -@end - -@implementation MWMPowerManagmentViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"power_managment_title"); - - SettingsTableViewSelectableCell * selectedCell; - switch (GetFramework().GetPowerManager().GetScheme()) - { - case Scheme::None: break; - case Scheme::Normal: selectedCell = self.never; break; - case Scheme::EconomyMedium: break; - case Scheme::EconomyMaximum: selectedCell = self.manualMax; break; - case Scheme::Auto: selectedCell = self.automatic; break; - } - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - self.selectedCell = selectedCell; -} - -- (void)setSelectedCell:(SettingsTableViewSelectableCell *)selectedCell -{ - if (self.selectedCell == selectedCell) - return; - - _selectedCell.accessoryType = UITableViewCellAccessoryNone; - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - - _selectedCell = selectedCell; - Scheme scheme = Scheme::Auto; - if ([selectedCell isEqual:self.never]) - scheme = Scheme::Normal; - else if ([selectedCell isEqual:self.manualMax]) - scheme = Scheme::EconomyMaximum; - - GetFramework().GetPowerManager().SetScheme(scheme); -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - self.selectedCell = [tableView cellForRowAtIndexPath:indexPath]; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section -{ - return L(@"power_managment_description"); -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMSettingsViewController.h b/iphone/Maps/UI/Settings/MWMSettingsViewController.h deleted file mode 100644 index 51a56765d..000000000 --- a/iphone/Maps/UI/Settings/MWMSettingsViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMSettingsViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMSettingsViewController.mm b/iphone/Maps/UI/Settings/MWMSettingsViewController.mm deleted file mode 100644 index ada765a8a..000000000 --- a/iphone/Maps/UI/Settings/MWMSettingsViewController.mm +++ /dev/null @@ -1,394 +0,0 @@ -#import "MWMSettingsViewController.h" -#import "MWMTextToSpeech+CPP.h" -#import "SwiftBridge.h" -#import "MWMActivityViewController.h" - -#import - -#include "map/gps_tracker.hpp" - -using namespace power_management; - -static NSString * const kUDDidShowICloudSynchronizationEnablingAlert = @"kUDDidShowICloudSynchronizationEnablingAlert"; - -@interface MWMSettingsViewController () - -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *profileCell; - -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *unitsCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *zoomButtonsCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *is3dCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *autoDownloadCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *mobileInternetCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *powerManagementCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *fontScaleCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *transliterationCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *compassCalibrationCell; - -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *nightModeCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *perspectiveViewCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell *autoZoomCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *voiceInstructionsCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell *drivingOptionsCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewiCloudSwitchCell *iCloudSynchronizationCell; -@property(weak, nonatomic) IBOutlet SettingsTableViewDetailedSwitchCell *enableLoggingCell; - -@end - -@implementation MWMSettingsViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.title = L(@"settings"); -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [self configCells]; -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - [self highlightFeatureIfNeeded]; -} - -- (void)highlightFeatureIfNeeded { - UITableViewCell * cell = nil; - DeepLinkInAppFeatureHighlightData * featureToHighlight = [DeepLinkHandler.shared getInAppFeatureHighlightData]; - if (!featureToHighlight || featureToHighlight.urlType != DeeplinkUrlTypeSettings) - return; - switch (featureToHighlight.feature) { - case InAppFeatureHighlightTypeNone: - case InAppFeatureHighlightTypeTrackRecorder: - // Еhere is no options for the track recorder yet. - break; - case InAppFeatureHighlightTypeICloud: - cell = self.iCloudSynchronizationCell; - break; - } - NSIndexPath * indexPath = [self.tableView indexPathForCell:cell]; - if (!cell || !indexPath) - return; - [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; - [cell highlight]; -} - -- (void)configCells { - [self configProfileSection]; - [self configCommonSection]; - [self configNavigationSection]; -} - -- (void)configProfileSection { - NSString *userName = Profile.name; - if (userName == nil) { - userName = @""; - } - [self.profileCell configWithTitle:L(@"osm_profile") info:userName.length != 0 ? userName : @""]; -} - -- (void)configCommonSection { - NSString * units = nil; - switch ([MWMSettings measurementUnits]) { - case MWMUnitsMetric: - units = L(@"kilometres"); - break; - case MWMUnitsImperial: - units = L(@"miles"); - break; - } - [self.unitsCell configWithTitle:L(@"measurement_units") info:units]; - - [self.zoomButtonsCell configWithDelegate:self title:L(@"pref_zoom_title") isOn:[MWMSettings zoomButtonsEnabled]]; - - bool on = true, _ = true; - GetFramework().Load3dMode(_, on); - if (GetFramework().GetPowerManager().GetScheme() == Scheme::EconomyMaximum) - { - self.is3dCell.isEnabled = false; - [self.is3dCell configWithDelegate:self title:L(@"pref_map_3d_buildings_title") isOn:false]; - UITapGestureRecognizer * tapRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self - action:@selector(show3dBuildingsAlert:)]; - - self.is3dCell.gestureRecognizers = @[tapRecogniser]; - } - else - { - self.is3dCell.isEnabled = true; - [self.is3dCell configWithDelegate:self title:L(@"pref_map_3d_buildings_title") isOn:on]; - self.is3dCell.gestureRecognizers = nil; - } - - [self.autoDownloadCell configWithDelegate:self - title:L(@"autodownload") - isOn:[MWMSettings autoDownloadEnabled]]; - - NSString * mobileInternet = nil; - switch ([MWMNetworkPolicy sharedPolicy].permission) { - case MWMNetworkPolicyPermissionAlways: - mobileInternet = L(@"mobile_data_option_always"); - break; - case MWMNetworkPolicyPermissionNever: - mobileInternet = L(@"mobile_data_option_never"); - break; - case MWMNetworkPolicyPermissionToday: - case MWMNetworkPolicyPermissionNotToday: - case MWMNetworkPolicyPermissionAsk: - mobileInternet = L(@"mobile_data_option_ask"); - break; - } - [self.mobileInternetCell configWithTitle:L(@"mobile_data") info:mobileInternet]; - - NSString * powerManagement = nil; - switch (GetFramework().GetPowerManager().GetScheme()) { - case Scheme::None: - break; - case Scheme::Normal: - powerManagement = L(@"power_managment_setting_never"); - break; - case Scheme::EconomyMedium: - break; - case Scheme::EconomyMaximum: - powerManagement = L(@"power_managment_setting_manual_max"); - break; - case Scheme::Auto: - powerManagement = L(@"power_managment_setting_auto"); - break; - } - [self.powerManagementCell configWithTitle:L(@"power_managment_title") info:powerManagement]; - - [self.fontScaleCell configWithDelegate:self title:L(@"big_font") isOn:[MWMSettings largeFontSize]]; - - [self.transliterationCell configWithDelegate:self - title:L(@"transliteration_title") - isOn:[MWMSettings transliteration]]; - - [self.compassCalibrationCell configWithDelegate:self - title:L(@"pref_calibration_title") - isOn:[MWMSettings compassCalibrationEnabled]]; - - NSString * nightMode = nil; - switch ([MWMSettings theme]) { - case MWMThemeVehicleDay: - NSAssert(false, @"Invalid case"); - case MWMThemeDay: - nightMode = L(@"pref_appearance_light"); - break; - case MWMThemeVehicleNight: - NSAssert(false, @"Invalid case"); - case MWMThemeNight: - nightMode = L(@"pref_appearance_dark"); - break; - case MWMThemeAuto: - nightMode = L(@"auto"); - break; - } - [self.nightModeCell configWithTitle:L(@"pref_appearance_title") info:nightMode]; - - [self.iCloudSynchronizationCell configWithDelegate:self - title:@"iCloud Synchronization (Beta)" - isOn:[MWMSettings iCLoudSynchronizationEnabled]]; - - __weak __typeof(self) weakSelf = self; - [iCloudSynchronizaionManager.shared addObserver:self synchronizationStateDidChangeHandler:^(SynchronizationManagerState * state) { - __strong auto strongSelf = weakSelf; - [strongSelf.iCloudSynchronizationCell updateWithSynchronizationState:state]; - }]; - - [self.enableLoggingCell configWithDelegate:self title:L(@"enable_logging") isOn:MWMSettings.isFileLoggingEnabled]; - [self updateLogFileSize]; -} - -- (void)updateLogFileSize { - uint64_t logFileSize = [Logger getLogFileSize]; - NSString * detailString = logFileSize == 0 ? nil : [NSString stringWithFormat:L(@"log_file_size"), formattedSize(logFileSize)]; - [self.enableLoggingCell setDetail:detailString]; -} - -- (void)show3dBuildingsAlert:(UITapGestureRecognizer *)recognizer { - UIAlertController * alert = - [UIAlertController alertControllerWithTitle:L(@"pref_map_3d_buildings_title") - message:L(@"pref_map_3d_buildings_disabled_summary") - preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction * okButton = [UIAlertAction actionWithTitle:@"OK" - style:UIAlertActionStyleDefault - handler:nil]; - [alert addAction:okButton]; - - [self presentViewController:alert animated:YES completion:nil]; -} - -- (void)configNavigationSection { - bool _ = true, on = true; - auto &f = GetFramework(); - f.Load3dMode(on, _); - [self.perspectiveViewCell configWithDelegate:self title:L(@"pref_map_3d_title") isOn:on]; - - [self.autoZoomCell configWithDelegate:self title:L(@"pref_map_auto_zoom") isOn:GetFramework().LoadAutoZoom()]; - - NSString * ttsEnabledString = [MWMTextToSpeech isTTSEnabled] ? L(@"on") : L(@"off"); - [self.voiceInstructionsCell configWithTitle:L(@"pref_tts_enable_title") info:ttsEnabledString]; - [self.drivingOptionsCell configWithTitle:L(@"driving_options_title") info:@""]; -} - -- (void)showICloudSynchronizationEnablingAlert:(void (^)(BOOL))isEnabled { - UIAlertController * alertController = [UIAlertController alertControllerWithTitle:L(@"enable_icloud_synchronization_title") - message:L(@"enable_icloud_synchronization_message") - preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction * enableButton = [UIAlertAction actionWithTitle:L(@"enable") - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { - [self setICloudSynchronizationEnablingAlertIsShown]; - isEnabled(YES); - }]; - UIAlertAction * backupButton = [UIAlertAction actionWithTitle:L(@"backup") - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { - [MWMBookmarksManager.sharedManager shareAllCategoriesWithCompletion:^(MWMBookmarksShareStatus status, NSURL * _Nonnull url) { - switch (status) { - case MWMBookmarksShareStatusSuccess: { - MWMActivityViewController * shareController = [MWMActivityViewController shareControllerForURL:url message:L(@"share_bookmarks_email_body") completionHandler:^(UIActivityType _Nullable activityType, BOOL completed, NSArray * _Nullable returnedItems, NSError * _Nullable activityError) { - [self setICloudSynchronizationEnablingAlertIsShown]; - isEnabled(completed); - }]; - [shareController presentInParentViewController:self anchorView:self.iCloudSynchronizationCell]; - break; - } - case MWMBookmarksShareStatusEmptyCategory: - [Toast showWithText:L(@"bookmarks_error_title_share_empty")]; - isEnabled(NO); - break; - case MWMBookmarksShareStatusArchiveError: - case MWMBookmarksShareStatusFileError: - [Toast showWithText:L(@"dialog_routing_system_error")]; - isEnabled(NO); - break; - } - }]; - }]; - UIAlertAction * cancelButton = [UIAlertAction actionWithTitle:L(@"cancel") - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { - isEnabled(NO); - }]; - - [alertController addAction:cancelButton]; - if (![MWMBookmarksManager.sharedManager areAllCategoriesEmpty]) - [alertController addAction:backupButton]; - [alertController addAction:enableButton]; - [self presentViewController:alertController animated:YES completion:nil]; -} - -- (void)setICloudSynchronizationEnablingAlertIsShown { - [NSUserDefaults.standardUserDefaults setBool:YES forKey:kUDDidShowICloudSynchronizationEnablingAlert]; -} - -- (void)showICloudIsDisabledAlert { - UIAlertController * alertController = [UIAlertController alertControllerWithTitle:L(@"icloud_disabled_title") - message:L(@"icloud_disabled_message") - preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction * okButton = [UIAlertAction actionWithTitle:L(@"ok") - style:UIAlertActionStyleCancel - handler:nil]; - [alertController addAction:okButton]; - [self presentViewController:alertController animated:YES completion:nil]; -} - -#pragma mark - SettingsTableViewSwitchCellDelegate - -- (void)switchCell:(SettingsTableViewSwitchCell *)cell didChangeValue:(BOOL)value { - if (cell == self.zoomButtonsCell) { - [MWMSettings setZoomButtonsEnabled:value]; - } else if (cell == self.is3dCell) { - auto &f = GetFramework(); - bool _ = true, is3dBuildings = true; - f.Load3dMode(_, is3dBuildings); - is3dBuildings = static_cast(value); - f.Save3dMode(_, is3dBuildings); - f.Allow3dMode(_, is3dBuildings); - } else if (cell == self.autoDownloadCell) { - [MWMSettings setAutoDownloadEnabled:value]; - } else if (cell == self.fontScaleCell) { - [MWMSettings setLargeFontSize:value]; - } else if (cell == self.transliterationCell) { - [MWMSettings setTransliteration:value]; - } else if (cell == self.compassCalibrationCell) { - [MWMSettings setCompassCalibrationEnabled:value]; - } else if (cell == self.perspectiveViewCell) { - auto &f = GetFramework(); - bool _ = true, is3d = true; - f.Load3dMode(is3d, _); - is3d = static_cast(value); - f.Save3dMode(is3d, _); - f.Allow3dMode(is3d, _); - } else if (cell == self.autoZoomCell) { - auto &f = GetFramework(); - f.AllowAutoZoom(value); - f.SaveAutoZoom(value); - } else if (cell == self.iCloudSynchronizationCell) { - if (![NSUserDefaults.standardUserDefaults boolForKey:kUDDidShowICloudSynchronizationEnablingAlert]) { - [self showICloudSynchronizationEnablingAlert:^(BOOL isEnabled) { - [MWMSettings setICLoudSynchronizationEnabled:isEnabled]; - }]; - } else { - [MWMSettings setICLoudSynchronizationEnabled:value]; - } - } else if (cell == self.enableLoggingCell) { - [MWMSettings setFileLoggingEnabled:value]; - [self updateLogFileSize]; - } -} - -#pragma mark - UITableViewDelegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - [tableView deselectRowAtIndexPath:indexPath animated:true]; - auto cell = [tableView cellForRowAtIndexPath:indexPath]; - if (cell == self.unitsCell) { - [self performSegueWithIdentifier:@"SettingsToUnits" sender:nil]; - } else if (cell == self.mobileInternetCell) { - [self performSegueWithIdentifier:@"SettingsToMobileInternetSegue" sender:nil]; - } else if (cell == self.powerManagementCell) { - [self performSegueWithIdentifier:@"SettingsToPowerManagementSegue" sender:nil]; - } else if (cell == self.nightModeCell) { - [self performSegueWithIdentifier:@"SettingsToNightMode" sender:nil]; - } else if (cell == self.voiceInstructionsCell) { - [self performSegueWithIdentifier:@"SettingsToTTSSegue" sender:nil]; - } else if (cell == self.drivingOptionsCell) { - [self performSegueWithIdentifier:@"settingsToDrivingOptionsSegue" sender:nil]; - } -} - -- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { - auto cell = [tableView cellForRowAtIndexPath:indexPath]; - if (cell == self.iCloudSynchronizationCell) { - [self showICloudIsDisabledAlert]; - } -} - -#pragma mark - UITableViewDataSource - -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - switch (section) { - case 1: - return L(@"general_settings"); - case 2: - return L(@"prefs_group_route"); - case 3: - return L(@"info"); - default: - return nil; - } -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { - switch (section) { - case 1: - return L(@"enable_logging_warning_message"); - default: - return nil; - } -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.h b/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.h deleted file mode 100644 index a7b6a64ac..000000000 --- a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMTTSLanguageViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm b/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm deleted file mode 100644 index 3a8e242b7..000000000 --- a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm +++ /dev/null @@ -1,44 +0,0 @@ -#import "MWMTTSLanguageViewController.h" -#import "MWMTTSSettingsViewController.h" -#import "MWMTextToSpeech+CPP.h" -#import "SwiftBridge.h" - -static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings"; - -@implementation MWMTTSLanguageViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_tts_other_section_title"); -} - -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SettingsTableViewSelectableCell *)sender -{ - if (![segue.identifier isEqualToString:kUnwingSegueIdentifier]) - return; - MWMTTSSettingsViewController * dest = segue.destinationViewController; - UITableViewCell * cell = sender; - NSUInteger const row = [self.tableView indexPathForCell:cell].row; - [dest setAdditionalTTSLanguage:[[MWMTextToSpeech tts] availableLanguages][row]]; -} - -#pragma mark - UITableViewDataSource && UITableViewDelegate - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [[MWMTextToSpeech tts] availableLanguages].size(); -} - -- (UITableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - Class cls = [SettingsTableViewSelectableCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - [cell - configWithTitle:@([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str())]; - return cell; -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.h b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.h deleted file mode 100644 index 6a7e40cf3..000000000 --- a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "MWMTableViewController.h" - -#include -#include -#include - -@interface MWMTTSSettingsViewController : MWMTableViewController - -- (void)setAdditionalTTSLanguage:(std::pair const &)l; - -- (std::vector> const &)languages; - -@end diff --git a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm deleted file mode 100644 index cb9a2783c..000000000 --- a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm +++ /dev/null @@ -1,391 +0,0 @@ -#import "MWMTTSSettingsViewController.h" -#import -#import "MWMTextToSpeech+CPP.h" -#import "TTSTester.h" -#import "SwiftBridge.h" - -#include -#include "LocaleTranslator.h" - -using namespace locale_translator; -using namespace routing; -using namespace std; - -namespace -{ -NSString * kSelectTTSLanguageSegueName = @"TTSLanguage"; - -enum class Section -{ - VoiceInstructions, - StreetNames, - Language, - SpeedCameras, - Count -}; - -using SectionType = underlying_type_t
; - -struct BaseCellStategy -{ - virtual UITableViewCell * BuildCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) = 0; - - virtual void SelectCell(UITableView * /* tableView */, NSIndexPath * /* indexPath */, - MWMTTSSettingsViewController * /* controller */) {}; - - virtual NSString * TitleForFooter() const { return nil; } - - virtual NSString * TitleForHeader() const { return nil; } - - virtual size_t NumberOfRows(MWMTTSSettingsViewController * /* controller */) const { return 1; } - - virtual ~BaseCellStategy() {} -}; - -UITableViewCell* voiceInstructionsCell; -UITableViewCell* streetNamesCell; - -struct VoiceInstructionCellStrategy : BaseCellStategy -{ - UITableViewCell * BuildCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) override - { - Class cls = [SettingsTableViewSwitchCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - [cell configWithDelegate:static_cast>(controller) - title:L(@"pref_tts_enable_title") - isOn:[MWMTextToSpeech isTTSEnabled]]; - voiceInstructionsCell = cell; - return cell; - } -}; - -struct LanguageCellStrategy : BaseCellStategy -{ - TTSTester * ttsTester = [[TTSTester alloc] init]; - - UITableViewCell * BuildCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) override - { - NSInteger const row = indexPath.row; - // "Other" cell - if (row == controller.languages.size()) - { - Class cls = [SettingsTableViewLinkCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - [cell configWithTitle:L(@"pref_tts_other_section_title") info:nil]; - return cell; - } - - // "Test TTS" cell - if (row == controller.languages.size() + 1) - { - Class cls = [SettingsTableViewSelectableCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - [cell configWithTitle:L(@"pref_tts_test_voice_title")]; - cell.accessoryType = UITableViewCellAccessoryNone; - return cell; - } - - Class cls = [SettingsTableViewSelectableCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - pair const p = controller.languages[row]; - [cell configWithTitle:@(p.second.c_str())]; - BOOL const isSelected = [@(p.first.c_str()) isEqualToString:[MWMTextToSpeech savedLanguage]]; - if (isSelected) - { - m_selectedCell = cell; - cell.accessoryType = UITableViewCellAccessoryCheckmark; - } - else - { - cell.accessoryType = UITableViewCellAccessoryNone; - } - - return cell; - } - - size_t NumberOfRows(MWMTTSSettingsViewController * controller) const override - { - return controller.languages.size() + 2; // Number of languages + "Other" cell + "TTS Test" cell - } - - NSString * TitleForHeader() const override { return L(@"pref_tts_language_title"); } - - void SelectCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) override - { - NSInteger const row = indexPath.row; - if (row == controller.languages.size()) - { - [controller performSegueWithIdentifier:kSelectTTSLanguageSegueName sender:nil]; - return; - } - - if (row == controller.languages.size() + 1) - { - [ttsTester playRandomTestString]; - return; - } - - auto cell = [tableView cellForRowAtIndexPath:indexPath]; - if (m_selectedCell == cell) - return; - - m_selectedCell.accessoryType = UITableViewCellAccessoryNone; - [[MWMTextToSpeech tts] setNotificationsLocale:@(controller.languages[row].first.c_str())]; - cell.accessoryType = UITableViewCellAccessoryCheckmark; - m_selectedCell = cell; - } - - SettingsTableViewSelectableCell * m_selectedCell = nil; -}; - -struct CamerasCellStrategy : BaseCellStategy -{ - UITableViewCell * BuildCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) override - { - auto const mode = GetFramework().GetRoutingManager().GetSpeedCamManager().GetMode(); - Class cls = [SettingsTableViewSelectableCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - NSString * title = nil; - switch (static_cast(indexPath.row)) - { - case SpeedCameraManagerMode::Auto: title = L(@"pref_tts_speedcams_auto"); break; - case SpeedCameraManagerMode::Always: title = L(@"pref_tts_speedcams_always"); break; - case SpeedCameraManagerMode::Never: title = L(@"pref_tts_speedcams_never"); break; - case SpeedCameraManagerMode::MaxValue: CHECK(false, ()); return nil; - } - - CHECK(title, ()); - [cell configWithTitle:title]; - bool const isSelectedCell = base::Underlying(mode) == indexPath.row; - if (isSelectedCell) - { - m_selectedCell = cell; - cell.accessoryType = UITableViewCellAccessoryCheckmark; - } - else - { - cell.accessoryType = UITableViewCellAccessoryNone; - } - - return cell; - } - - size_t NumberOfRows(MWMTTSSettingsViewController * /* controller */) const override - { - return base::Underlying(SpeedCameraManagerMode::MaxValue); - } - - NSString * TitleForHeader() const override { return L(@"speedcams_alert_title"); } - - NSString * TitleForFooter() const override { return nil; } - - void SelectCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * /* controller */) override - { - auto cell = [tableView cellForRowAtIndexPath:indexPath]; - if (cell == m_selectedCell) - return; - - m_selectedCell.accessoryType = UITableViewCellAccessoryNone; - auto & scm = GetFramework().GetRoutingManager().GetSpeedCamManager(); - auto const mode = static_cast(indexPath.row); - CHECK_NOT_EQUAL(mode, SpeedCameraManagerMode::MaxValue, ()); - scm.SetMode(mode); - cell.accessoryType = UITableViewCellAccessoryCheckmark; - m_selectedCell = cell; - } - - SettingsTableViewSelectableCell * m_selectedCell = nil; -}; - -struct StreetNamesCellStrategy : BaseCellStategy -{ - UITableViewCell * BuildCell(UITableView * tableView, NSIndexPath * indexPath, - MWMTTSSettingsViewController * controller) override - { - Class cls = [SettingsTableViewSwitchCell class]; - auto cell = static_cast( - [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); - [cell configWithDelegate:static_cast>(controller) - title:L(@"pref_tts_street_names_title") - isOn:[MWMTextToSpeech isStreetNamesTTSEnabled]]; - streetNamesCell = cell; - return cell; - } - - NSString * TitleForFooter() const override { return L(@"pref_tts_street_names_description"); } -}; -} // namespace - -@interface MWMTTSSettingsViewController () -{ - pair m_additionalTTSLanguage; - vector> m_languages; - unordered_map> m_strategies; -} - -@property(nonatomic) BOOL isLocaleLanguageAbsent; - -@end - -@implementation MWMTTSSettingsViewController - -- (instancetype)initWithCoder:(NSCoder *)aDecoder -{ - self = [super initWithCoder:aDecoder]; - if (self) - { - using base::Underlying; - m_strategies.emplace(Underlying(Section::VoiceInstructions), make_unique()); - m_strategies.emplace(Underlying(Section::StreetNames), make_unique()); - m_strategies.emplace(Underlying(Section::Language), make_unique()); - m_strategies.emplace(Underlying(Section::SpeedCameras), make_unique()); - } - - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_tts_enable_title"); - MWMTextToSpeech * tts = [MWMTextToSpeech tts]; - - m_languages.reserve(3); - pair const standard = tts.standardLanguage; - m_languages.push_back(standard); - - using namespace tts; - NSString * currentBcp47 = [AVSpeechSynthesisVoice currentLanguageCode]; - string const currentBcp47Str = currentBcp47.UTF8String; - if (currentBcp47Str != standard.first && !currentBcp47Str.empty()) - { - auto const & v = tts.availableLanguages; - NSAssert(!v.empty(), @"Vector can't be empty!"); - std::string const translated = translateLocale(currentBcp47Str); - auto cur = std::make_pair(currentBcp47Str, translated); - if (translated.empty() || find(v.begin(), v.end(), cur) != v.end()) - m_languages.push_back(std::move(cur)); - else - self.isLocaleLanguageAbsent = YES; - } - - NSString * nsSavedLanguage = [MWMTextToSpeech savedLanguage]; - if (nsSavedLanguage.length) - { - std::string const savedLanguage = nsSavedLanguage.UTF8String; - if (savedLanguage != currentBcp47Str && savedLanguage != standard.first && - !savedLanguage.empty()) - m_languages.emplace_back(savedLanguage, translateLocale(savedLanguage)); - } -} - -- (IBAction)unwind:(id)sender -{ - size_t const size = m_languages.size(); - if (find(m_languages.begin(), m_languages.end(), m_additionalTTSLanguage) != m_languages.end()) - { - [self.tableView reloadData]; - return; - } - switch (size) - { - case 1: m_languages.push_back(m_additionalTTSLanguage); break; - case 2: - if (self.isLocaleLanguageAbsent) - m_languages[size - 1] = m_additionalTTSLanguage; - else - m_languages.push_back(m_additionalTTSLanguage); - break; - case 3: m_languages[size - 1] = m_additionalTTSLanguage; break; - default: NSAssert(false, @"Incorrect language's count"); break; - } - [self.tableView reloadData]; -} - -- (void)setAdditionalTTSLanguage:(pair const &)l -{ - [[MWMTextToSpeech tts] setNotificationsLocale:@(l.first.c_str())]; - m_additionalTTSLanguage = l; -} - -- (vector> const &)languages -{ - return m_languages; -} - -#pragma mark - UITableViewDataSource - -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section -{ - auto const & strategy = m_strategies[static_cast(section)]; - CHECK(strategy, ()); - return strategy->TitleForHeader(); -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section -{ - auto const & strategy = m_strategies[static_cast(section)]; - CHECK(strategy, ()); - return strategy->TitleForFooter(); -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return [MWMTextToSpeech isTTSEnabled] ? base::Underlying(Section::Count) : 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - auto const & strategy = m_strategies[static_cast(section)]; - CHECK(strategy, ()); - return strategy->NumberOfRows(self); -} - -- (UITableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - auto const & strategy = m_strategies[static_cast(indexPath.section)]; - CHECK(strategy, ()); - return strategy->BuildCell(tableView, indexPath, self); -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - auto const & strategy = m_strategies[static_cast(indexPath.section)]; - CHECK(strategy, ()); - return strategy->SelectCell(tableView, indexPath, self); -} - -#pragma mark - SettingsTableViewSwitchCellDelegate - -- (void)switchCell:(SettingsTableViewSwitchCell *)cell didChangeValue:(BOOL)value -{ - if (cell == voiceInstructionsCell) - { - [MWMTextToSpeech setTTSEnabled:value]; - auto indexSet = [NSIndexSet indexSetWithIndexesInRange:{base::Underlying(Section::StreetNames), base::Underlying(Section::Count) - 1}]; - auto const animation = UITableViewRowAnimationFade; - if (value) - [self.tableView insertSections:indexSet withRowAnimation:animation]; - else - [self.tableView deleteSections:indexSet withRowAnimation:animation]; - } - else if (cell == streetNamesCell) - { - [MWMTextToSpeech setStreetNamesTTSEnabled:value]; - } -} - -@end diff --git a/iphone/Maps/UI/Settings/MWMUnitsController.h b/iphone/Maps/UI/Settings/MWMUnitsController.h deleted file mode 100644 index 9135e1df1..000000000 --- a/iphone/Maps/UI/Settings/MWMUnitsController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMUnitsController : MWMTableViewController - -@end diff --git a/iphone/Maps/UI/Settings/MWMUnitsController.mm b/iphone/Maps/UI/Settings/MWMUnitsController.mm deleted file mode 100644 index efed7f6fb..000000000 --- a/iphone/Maps/UI/Settings/MWMUnitsController.mm +++ /dev/null @@ -1,49 +0,0 @@ -#import "MWMUnitsController.h" -#import "MWMSettings.h" -#import "SwiftBridge.h" - -@interface MWMUnitsController () - -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * kilometers; -@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * miles; -@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell; - -@end - -@implementation MWMUnitsController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"measurement_units"); - - switch ([MWMSettings measurementUnits]) - { - case MWMUnitsMetric: self.selectedCell = self.kilometers; break; - case MWMUnitsImperial: self.selectedCell = self.miles; break; - } -} - -- (void)setSelectedCell:(SettingsTableViewSelectableCell *)cell -{ - SettingsTableViewSelectableCell * selectedCell = _selectedCell; - if (selectedCell == cell) - return; - - selectedCell.accessoryType = UITableViewCellAccessoryNone; - cell.accessoryType = UITableViewCellAccessoryCheckmark; - cell.selected = NO; - _selectedCell = cell; - if (cell == self.kilometers) - [MWMSettings setMeasurementUnits:MWMUnitsMetric]; - else - [MWMSettings setMeasurementUnits:MWMUnitsImperial]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - self.selectedCell = [tableView cellForRowAtIndexPath:indexPath]; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -@end diff --git a/iphone/Maps/UI/Settings/Profile/ExistingProfileView.swift b/iphone/Maps/UI/Settings/Profile/ExistingProfileView.swift index 6b0a64883..430524cfb 100644 --- a/iphone/Maps/UI/Settings/Profile/ExistingProfileView.swift +++ b/iphone/Maps/UI/Settings/Profile/ExistingProfileView.swift @@ -1,6 +1,5 @@ import SwiftUI - /// View for the OpenStreetMapp profile struct ExistingProfileView: View { // MARK: - Properties @@ -25,6 +24,10 @@ struct ExistingProfileView: View { @State private var showNotes: Bool = false + /// The publisher to know when to stop showing the Safari view for the login form + private let stopShowingLoginPublisher = NotificationCenter.default.publisher(for: SafariView.dismissNotificationName) + + /// If the profile is being presented as an alert var isPresentedAsAlert: Bool = false @@ -33,36 +36,32 @@ struct ExistingProfileView: View { var body: some View { VStack(alignment: .leading) { if Profile.needsReauthorization { - ScrollView { + List { Text("osm_profile_reauthorize_promt") - .font(.headline) - .frame(maxWidth: .infinity, alignment: .leading) - .padding() + .font(.headline) + .frame(maxWidth: .infinity, alignment: .leading) } } else if !isPresentedAsAlert { - ScrollView { - VStack { + List { + Section { VStack { Text(Profile.numberOfEdits ?? 0, format: .number) - .font(.largeTitle) - .bold() - .frame(maxWidth: .infinity) + .font(.largeTitle) + .bold() + .frame(maxWidth: .infinity) Text("osm_profile_verfied_changes") } - .padding() + .padding([.top, .bottom]) .frame(maxWidth: .infinity) - .background { - RoundedRectangle(cornerRadius: 10) - .stroke(Color.secondary.opacity(0.3), lineWidth: 1) - } - + } footer: { if let editHistoryUrl = Profile.editHistoryUrl { Button { showEditHistory = true } label: { Text("osm_profile_view_edit_history") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedProminentButtonStyle()) .controlSize(.large) @@ -70,25 +69,30 @@ struct ExistingProfileView: View { .sheet(isPresented: $showEditHistory) { SafariView(url: editHistoryUrl, dismissButton: .close) } + .padding([.top, .bottom]) + .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0)) } - - if let notesUrl = Profile.notesUrl { + } + + if let notesUrl = Profile.notesUrl { + Section { Button { showNotes = true } label: { Text("osm_profile_view_notes") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedProminentButtonStyle()) + .buttonBorderShape(.roundedRectangle(radius: 0)) .controlSize(.large) .font(.headline) - .padding(.top) .sheet(isPresented: $showNotes) { SafariView(url: notesUrl, dismissButton: .close) } + .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0)) } } - .padding() } .refreshable { await Profile.reload() @@ -106,7 +110,8 @@ struct ExistingProfileView: View { showLogin = true } label: { Text("osm_profile_reauthorize") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedProminentButtonStyle()) .controlSize(.large) @@ -116,7 +121,7 @@ struct ExistingProfileView: View { } Divider() - .padding([.top, .bottom]) + .padding([.top, .bottom]) VStack(alignment: .leading) { Text("osm_profile_remove_promt") @@ -126,7 +131,8 @@ struct ExistingProfileView: View { lastUpdated = Date.now } label: { Text("osm_profile_remove") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedButtonStyle()) .controlSize(.large) @@ -139,7 +145,8 @@ struct ExistingProfileView: View { } } label: { Text("osm_more_about") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedButtonStyle()) .controlSize(.large) @@ -147,6 +154,10 @@ struct ExistingProfileView: View { } } .padding([.bottom, .leading, .trailing]) + .background(Color(uiColor: .systemGroupedBackground)) + } + .onReceive(stopShowingLoginPublisher) { _ in + showLogin = false } } } diff --git a/iphone/Maps/UI/Settings/Profile/NoExistingProfileView.swift b/iphone/Maps/UI/Settings/Profile/NoExistingProfileView.swift index 29ab9508c..7086c48da 100644 --- a/iphone/Maps/UI/Settings/Profile/NoExistingProfileView.swift +++ b/iphone/Maps/UI/Settings/Profile/NoExistingProfileView.swift @@ -1,6 +1,5 @@ import SwiftUI - /// View for the OpenStreetMapp profile struct NoExistingProfileView: View { // MARK: - Properties @@ -13,25 +12,29 @@ struct NoExistingProfileView: View { @State private var showLogin: Bool = false + /// The publisher to know when to stop showing the Safari view for the login form + private let stopShowingLoginPublisher = NotificationCenter.default.publisher(for: SafariView.dismissNotificationName) + + /// The actual view var body: some View { VStack(alignment: .leading) { - ScrollView { + List { VStack(alignment: .leading) { Text("osm_profile_promt") - .font(.headline) + .font(.headline) HStack(alignment: .top) { Image(.osmLogo) - .resizable() - .aspectRatio(1, contentMode: .fit) - .frame(maxWidth: 50) - .padding(.top, 6) + .resizable() + .aspectRatio(1, contentMode: .fit) + .frame(maxWidth: 50) + .padding(.top, 6) Text("osm_profile_explanation") } } - .padding() + .padding(.bottom) } Spacer(minLength: 0) @@ -42,7 +45,8 @@ struct NoExistingProfileView: View { showLogin = true } label: { Text("osm_profile_login") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedProminentButtonStyle()) .controlSize(.large) @@ -53,7 +57,7 @@ struct NoExistingProfileView: View { } Divider() - .padding([.top, .bottom]) + .padding([.top, .bottom]) VStack(alignment: .leading) { Text("osm_profile_register_promt") @@ -62,7 +66,8 @@ struct NoExistingProfileView: View { openUrl(Profile.registrationUrl) } label: { Text("osm_profile_register") - .frame(maxWidth: .infinity) + .lineLimit(1) + .frame(maxWidth: .infinity) } .buttonStyle(BorderedButtonStyle()) .controlSize(.large) @@ -70,6 +75,10 @@ struct NoExistingProfileView: View { } } .padding([.bottom, .leading, .trailing]) + .background(Color(uiColor: .systemGroupedBackground)) + } + .onReceive(stopShowingLoginPublisher) { _ in + showLogin = false } } } diff --git a/iphone/Maps/UI/Settings/Profile/ProfileView.swift b/iphone/Maps/UI/Settings/Profile/ProfileView.swift index d8291f808..158a6b678 100644 --- a/iphone/Maps/UI/Settings/Profile/ProfileView.swift +++ b/iphone/Maps/UI/Settings/Profile/ProfileView.swift @@ -1,6 +1,5 @@ import SwiftUI - /// View for the OpenStreetMap profile struct ProfileView: View { // MARK: - Properties @@ -21,6 +20,10 @@ struct ProfileView: View { var isPresentedAsAlert: Bool = false + /// The publisher to know when to stop showing the Safari view for the login form + private let stopShowingLoginPublisher = NotificationCenter.default.publisher(for: SafariView.dismissNotificationName) + + /// The actual view var body: some View { NavigationView { @@ -33,7 +36,7 @@ struct ProfileView: View { Text("close") } icon: { Image(systemName: "xmark.circle.fill") - .font(.title) + .font(.title) } } .labelStyle(.iconOnly) @@ -41,6 +44,7 @@ struct ProfileView: View { .foregroundStyle(.primary) .padding([.top, .leading, .trailing]) .frame(maxWidth: .infinity, alignment: .trailing) + .background(Color(uiColor: .systemGroupedBackground)) } if Profile.isExisting { @@ -50,6 +54,7 @@ struct ProfileView: View { } } } + .accentColor(.accent) .navigationViewStyle(StackNavigationViewStyle()) .navigationTitle(Profile.name ?? String(localized: "osm_profile")) .toolbar { @@ -71,5 +76,10 @@ struct ProfileView: View { } } .tag(lastUpdated) + .onReceive(stopShowingLoginPublisher) { _ in + if isPresentedAsAlert { + dismiss() + } + } } } diff --git a/iphone/Maps/UI/Settings/SettingsNavigationView.swift b/iphone/Maps/UI/Settings/SettingsNavigationView.swift new file mode 100644 index 000000000..1122d972c --- /dev/null +++ b/iphone/Maps/UI/Settings/SettingsNavigationView.swift @@ -0,0 +1,177 @@ +import SwiftUI + +/// View for thenavigation settings +struct SettingsNavigationView: View { + // MARK: - Properties + + /// If the perspective view should be used during routing + @State var hasPerspectiveViewWhileRouting: Bool = true + + + /// If auto zoom should be used during routing + @State var hasAutoZoomWhileRouting: Bool = true + + + /// If voice guidance should be provided during routing + @State var shouldProvideVoiceRouting: Bool = true + + + /// The selected language for voice guidance during routing + @State var selectedLanguageForVoiceRouting: Settings.VoiceRoutingLanguage.ID? = nil + + + /// If street names should be announced in the voice guidance during routing + @State var shouldAnnounceStreetnamesWhileVoiceRouting: Bool = false + + + /// The selected announcement of speed traps in the voice guidance during routing + @State var selectedAnnouncingSpeedTrapsWhileVoiceRouting: Settings.AnnouncingSpeedTrapsWhileVoiceRouting = .never + + + /// If toll roads should be avoided during routing + @State var shouldAvoidTollRoadsWhileRouting: Bool = false + + + /// If unpaved roads should be avoided during routing + @State var shouldAvoidUnpavedRoadsWhileRouting: Bool = false + + + /// If ferries should be avoided during routing + @State var shouldAvoidFerriesWhileRouting: Bool = false + + + /// If motorways should be avoided during routing + @State var shouldAvoidMotorwaysWhileRouting: Bool = false + + + /// The actual view + var body: some View { + NavigationView { + List { + Section { + Toggle("pref_map_3d_title", isOn: $hasPerspectiveViewWhileRouting) + .tint(.accent) + + Toggle("pref_map_auto_zoom", isOn: $hasAutoZoomWhileRouting) + .tint(.accent) + } + + Section { + Toggle("pref_tts_enable_title", isOn: $shouldProvideVoiceRouting) + .tint(.accent) + + if shouldProvideVoiceRouting { + Picker(selection: $selectedLanguageForVoiceRouting) { + ForEach(Settings.availableLanguagesForVoiceRouting) { languageForVoiceRouting in + Text(languageForVoiceRouting.localizedName) + .tag(languageForVoiceRouting.id) + } + } label: { + Text("pref_tts_language_title") + } + + Toggle(isOn: $shouldAnnounceStreetnamesWhileVoiceRouting) { + VStack(alignment: .leading) { + Text("pref_tts_street_names_title") + + Text("pref_tts_street_names_description") + .font(.footnote) + .foregroundStyle(.secondary) + } + } + .tint(.accent) + + Picker(selection: $selectedAnnouncingSpeedTrapsWhileVoiceRouting) { + ForEach(Settings.AnnouncingSpeedTrapsWhileVoiceRouting.allCases) { announcingSpeedTrapsWhileVoiceRouting in + Text(announcingSpeedTrapsWhileVoiceRouting.description) + } + } label: { + Text("speedcams_alert_title") + } + } + } header: { + Text("pref_tts_title") + } footer: { + Button { + Settings.playVoiceRoutingTest() + } label: { + Text("pref_tts_test_voice_title") + .bold() + .lineLimit(1) + .padding(4) + .frame(maxWidth: .infinity) + } + .buttonStyle(BorderedButtonStyle()) + .padding([.top, .bottom]) + .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0)) + } + + Section { + Toggle("avoid_tolls", isOn: $shouldAvoidTollRoadsWhileRouting) + .tint(.accent) + + Toggle("avoid_unpaved", isOn: $shouldAvoidUnpavedRoadsWhileRouting) + .tint(.accent) + + Toggle("avoid_ferry", isOn: $shouldAvoidFerriesWhileRouting) + .tint(.accent) + + Toggle("avoid_motorways", isOn: $shouldAvoidMotorwaysWhileRouting) + .tint(.accent) + } header: { + Text("driving_options_title") + } + } + } + .accentColor(.accent) + .navigationViewStyle(StackNavigationViewStyle()) + .navigationTitle(String(localized: "prefs_group_route")) + .onAppear { + hasPerspectiveViewWhileRouting = Settings.hasPerspectiveViewWhileRouting + hasAutoZoomWhileRouting = Settings.hasAutoZoomWhileRouting + shouldProvideVoiceRouting = Settings.shouldProvideVoiceRouting + selectedLanguageForVoiceRouting = Settings.languageForVoiceRouting + shouldAnnounceStreetnamesWhileVoiceRouting = Settings.shouldAnnounceStreetnamesWhileVoiceRouting + selectedAnnouncingSpeedTrapsWhileVoiceRouting = Settings.announcingSpeedTrapsWhileVoiceRouting + shouldAvoidTollRoadsWhileRouting = Settings.shouldAvoidTollRoadsWhileRouting + shouldAvoidUnpavedRoadsWhileRouting = Settings.shouldAvoidUnpavedRoadsWhileRouting + shouldAvoidFerriesWhileRouting = Settings.shouldAvoidFerriesWhileRouting + shouldAvoidMotorwaysWhileRouting = Settings.shouldAvoidMotorwaysWhileRouting + } + .onChange(of: hasPerspectiveViewWhileRouting) { changedHasPerspectiveViewWhileRouting in + Settings.hasPerspectiveViewWhileRouting = changedHasPerspectiveViewWhileRouting + } + .onChange(of: hasAutoZoomWhileRouting) { changedHasAutoZoomWhileRouting in + Settings.hasAutoZoomWhileRouting = changedHasAutoZoomWhileRouting + } + .onChange(of: shouldProvideVoiceRouting) { changedShouldProvideVoiceRouting in + Settings.shouldProvideVoiceRouting = changedShouldProvideVoiceRouting + } + .onChange(of: selectedLanguageForVoiceRouting) { changedSelectedLanguageForVoiceRouting in + if let changedSelectedLanguageForVoiceRouting { + Settings.languageForVoiceRouting = changedSelectedLanguageForVoiceRouting + } + } + .onChange(of: shouldAnnounceStreetnamesWhileVoiceRouting) { changedShouldAnnounceStreetnamesWhileVoiceRouting in + Settings.shouldAnnounceStreetnamesWhileVoiceRouting = changedShouldAnnounceStreetnamesWhileVoiceRouting + } + .onChange(of: selectedAnnouncingSpeedTrapsWhileVoiceRouting) { changedSelectedAnnouncingSpeedTrapsWhileVoiceRouting in + Settings.announcingSpeedTrapsWhileVoiceRouting = changedSelectedAnnouncingSpeedTrapsWhileVoiceRouting + } + .onChange(of: shouldAvoidTollRoadsWhileRouting) { changedShouldAvoidTollRoadsWhileRouting in + Settings.shouldAvoidTollRoadsWhileRouting = changedShouldAvoidTollRoadsWhileRouting + } + .onChange(of: shouldAvoidUnpavedRoadsWhileRouting) { changedShouldAvoidUnpavedRoadsWhileRouting in + Settings.shouldAvoidUnpavedRoadsWhileRouting = changedShouldAvoidUnpavedRoadsWhileRouting + } + .onChange(of: shouldAvoidUnpavedRoadsWhileRouting) { changedShouldAvoidUnpavedRoadsWhileRouting in + Settings.shouldAvoidUnpavedRoadsWhileRouting = changedShouldAvoidUnpavedRoadsWhileRouting + } + .onChange(of: shouldAvoidFerriesWhileRouting) { changedShouldAvoidFerriesWhileRouting in + Settings.shouldAvoidFerriesWhileRouting = changedShouldAvoidFerriesWhileRouting + } + .onChange(of: shouldAvoidMotorwaysWhileRouting) { changedShouldAvoidMotorwaysWhileRouting in + Settings.shouldAvoidMotorwaysWhileRouting = changedShouldAvoidMotorwaysWhileRouting + } + } +} diff --git a/iphone/Maps/UI/Settings/SettingsView.swift b/iphone/Maps/UI/Settings/SettingsView.swift new file mode 100644 index 000000000..6a2aa44ce --- /dev/null +++ b/iphone/Maps/UI/Settings/SettingsView.swift @@ -0,0 +1,299 @@ +import SwiftUI + +/// View for the settings +struct SettingsView: View { + // MARK: - Properties + + /// The dismiss action of the environment + @Environment(\.dismiss) private var dismiss + + + /// The selected distance unit + @State private var selectedDistanceUnit: Settings.DistanceUnit = .metric + + + /// If zoom buttons should be displayed + @State private var hasZoomButtons: Bool = true + + + /// If 3D buildings should be displayed + @State private var has3dBuildings: Bool = true + + + /// If automatic map downloads should be enabled + @State private var hasAutomaticDownload: Bool = true + + + /// If an increased font size should be used for map labels + @State private var hasIncreasedFontsize: Bool = false + + + /// If names should be transliterated to Latin + @State private var shouldTransliterateToLatin: Bool = true + + + /// The selected appearance + @State private var selectedAppearance: Settings.Appearance = .auto + + + /// If the bookmarks should be synced via iCloud + @State private var shouldSync: Bool = false + + + /// If the sync beta alert should be shown + @State private var showSyncBetaAlert: Bool = false + + + /// If the sync is possible + @State private var isSyncPossible: Bool = true + + + /// If the compass should be calibrated + @State private var shouldCalibrateCompass: Bool = true + + + /// The selected power saving mode + @State private var selectedPowerSavingMode: Settings.PowerSavingMode = .never + + + /// The selected mobile data policy + @State private var selectedMobileDataPolicy: Settings.MobileDataPolicy = .always + + + /// If our custom logging is enabled + @State private var isLogging: Bool = false + + + /// The actual view + var body: some View { + NavigationView { + List { + Section { + NavigationLink { + ProfileView() + } label: { + HStack { + Text("osm_profile") + .lineLimit(1) + .layoutPriority(2) + + Spacer(minLength: 0) + .layoutPriority(0) + + Text(Profile.name ?? String()) + .lineLimit(1) + .foregroundStyle(.secondary) + .layoutPriority(1) + } + } + } + + Section { + Picker(selection: $selectedDistanceUnit) { + ForEach(Settings.DistanceUnit.allCases) { distanceUnit in + Text(distanceUnit.description) + } + } label: { + Text("measurement_units") + } + + Toggle("pref_zoom_title", isOn: $hasZoomButtons) + .tint(.accent) + + Toggle(isOn: $has3dBuildings) { + VStack(alignment: .leading) { + Text("pref_map_3d_buildings_title") + + if selectedPowerSavingMode == .maximum { + Text("pref_map_3d_buildings_disabled_summary") + .font(.footnote) + .foregroundStyle(.secondary) + } + } + } + .tint(.accent) + .disabled(selectedPowerSavingMode == .maximum) + + Toggle("autodownload", isOn: $hasAutomaticDownload) + .tint(.accent) + + Toggle("big_font", isOn: $hasIncreasedFontsize) + .tint(.accent) + + Toggle("transliteration_title", isOn: $shouldTransliterateToLatin) + .tint(.accent) + + Picker(selection: $selectedAppearance) { + ForEach(Settings.Appearance.allCases) { appearance in + Text(appearance.description) + } + } label: { + Text("pref_appearance_title") + } + } + + NavigationLink("prefs_group_route") { + SettingsNavigationView() + } + + Section { + Toggle(isOn: $shouldSync) { + VStack(alignment: .leading) { + Text("icloud_sync") + + if !isSyncPossible { + Text("icloud_disabled_message") + .font(.footnote) + .foregroundStyle(.secondary) + } + } + } + .tint(.accent) + .disabled(!isSyncPossible) + .alert("enable_icloud_synchronization_title", isPresented: $showSyncBetaAlert) { + Button { + Settings.hasShownSyncBetaAlert = true + Settings.shouldSync = true + shouldSync = true + } label: { + Text("enable") + } + + Button { + Settings.createBookmarksBackupBecauseOfSyncBeta { hasCreatedBackup in + if hasCreatedBackup { + Settings.hasShownSyncBetaAlert = true + Settings.shouldSync = true + shouldSync = true + } else { + Settings.shouldSync = false + shouldSync = false + } + } + } label: { + Text("backup") + } + + Button(role: .cancel) { + // Do nothing + } label: { + Text("cancel") + } + } message: { + Text("enable_icloud_synchronization_message") + } + + } + + Section { + Toggle("pref_calibration_title", isOn: $shouldCalibrateCompass) + .tint(.accent) + + Picker(selection: $selectedPowerSavingMode) { + ForEach(Settings.PowerSavingMode.allCases) { powerSavingMode in + Text(powerSavingMode.description) + } + } label: { + Text("power_managment_title") + } + + Picker(selection: $selectedMobileDataPolicy) { + ForEach(Settings.MobileDataPolicy.allCases) { mobileDataPolicy in + Text(mobileDataPolicy.description) + } + } label: { + Text("mobile_data") + } + } + + Section { + Toggle(isOn: $isLogging) { + VStack(alignment: .leading) { + Text("enable_logging") + + if isLogging { + Text(Settings.logSize, formatter: Settings.logSizeFormatter) + .font(.footnote) + .foregroundStyle(.secondary) + } + } + } + .tint(.accent) + } footer: { + Text("enable_logging_warning_message") + } + } + .navigationTitle(String(localized: "settings")) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button { + dismiss() + } label: { + Text("close") + } + } + } + } + .navigationViewStyle(StackNavigationViewStyle()) + .onAppear { + selectedDistanceUnit = Settings.distanceUnit + hasZoomButtons = Settings.hasZoomButtons + has3dBuildings = Settings.has3dBuildings + hasAutomaticDownload = Settings.hasAutomaticDownload + hasIncreasedFontsize = Settings.hasIncreasedFontsize + shouldTransliterateToLatin = Settings.shouldTransliterateToLatin + selectedAppearance = Settings.appearance + shouldSync = Settings.shouldSync + shouldCalibrateCompass = Settings.shouldCalibrateCompass + selectedPowerSavingMode = Settings.powerSavingMode + selectedMobileDataPolicy = Settings.mobileDataPolicy + isLogging = Settings.isLogging + } + .onChange(of: selectedDistanceUnit) { changedSelectedDistanceUnit in + Settings.distanceUnit = changedSelectedDistanceUnit + } + .onChange(of: hasZoomButtons) { changedHasZoomButtons in + Settings.hasZoomButtons = changedHasZoomButtons + } + .onChange(of: has3dBuildings) { changedHas3dBuildings in + Settings.has3dBuildings = changedHas3dBuildings + } + .onChange(of: hasAutomaticDownload) { changedHasAutomaticDownload in + Settings.hasAutomaticDownload = changedHasAutomaticDownload + } + .onChange(of: hasIncreasedFontsize) { changedHasIncreasedFontsize in + Settings.hasIncreasedFontsize = changedHasIncreasedFontsize + } + .onChange(of: shouldTransliterateToLatin) { changedShouldTransliterateToLatin in + Settings.shouldTransliterateToLatin = changedShouldTransliterateToLatin + } + .onChange(of: selectedAppearance) { changedSelectedAppearance in + Settings.appearance = changedSelectedAppearance + } + .onChange(of: shouldSync) { changedShouldSync in + if changedShouldSync, !Settings.hasShownSyncBetaAlert { + showSyncBetaAlert = true + shouldSync = false + } else { + Settings.shouldSync = changedShouldSync + } + } + .onChange(of: shouldCalibrateCompass) { changedShouldCalibrateCompass in + Settings.shouldCalibrateCompass = changedShouldCalibrateCompass + } + .onChange(of: selectedPowerSavingMode) { changedSelectedPowerSavingMode in + Settings.powerSavingMode = changedSelectedPowerSavingMode + } + .onChange(of: selectedMobileDataPolicy) { changedSelectedMobileDataPolicy in + Settings.mobileDataPolicy = changedSelectedMobileDataPolicy + } + .onChange(of: isLogging) { changedIsLogging in + Settings.isLogging = changedIsLogging + } + .onReceive(Settings.syncStatePublisher) { syncState in + isSyncPossible = syncState.isAvailable + } + .accentColor(.alternativeAccent) + } +} diff --git a/iphone/Maps/UI/Storyboard/Main.storyboard b/iphone/Maps/UI/Storyboard/Main.storyboard index 9daa75b43..7ccc64915 100644 --- a/iphone/Maps/UI/Storyboard/Main.storyboard +++ b/iphone/Maps/UI/Storyboard/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -29,11 +29,11 @@ @@ -99,7 +99,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -320,7 +320,7 @@ - + @@ -358,7 +358,7 @@ - + @@ -488,7 +488,7 @@ - +