diff options
| author | Bug Magnet <marco.nikic@mullvad.net> | 2025-10-27 10:15:36 +0100 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2025-10-27 10:15:36 +0100 |
| commit | 17cfab7afdd61bcf79fc1b411d63ff52a9a3ec4f (patch) | |
| tree | dd2a90c8fd8840e458bf8cf2dfa9e300346aed1c /ios/MullvadVPN | |
| parent | 7b9537edb6d83f6d19c6b0d407cfd81780b3fef7 (diff) | |
| parent | f4955a2983d0d52dac4001573c7ac09498c0b780 (diff) | |
| download | mullvadvpn-17cfab7afdd61bcf79fc1b411d63ff52a9a3ec4f.tar.xz mullvadvpn-17cfab7afdd61bcf79fc1b411d63ff52a9a3ec4f.zip | |
Merge branch 'update-remaining-string-differences-with-others-ios'
Diffstat (limited to 'ios/MullvadVPN')
32 files changed, 84 insertions, 92 deletions
diff --git a/ios/MullvadVPN/Coordinators/CustomLists/AddCustomListCoordinator.swift b/ios/MullvadVPN/Coordinators/CustomLists/AddCustomListCoordinator.swift index b11bbda73d..6e99df6eb0 100644 --- a/ios/MullvadVPN/Coordinators/CustomLists/AddCustomListCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/CustomLists/AddCustomListCoordinator.swift @@ -43,7 +43,7 @@ class AddCustomListCoordinator: Coordinator, Presentable, Presenting { ) controller.delegate = self - controller.navigationItem.title = NSLocalizedString("New custom list", comment: "") + controller.navigationItem.title = NSLocalizedString("Create new list", comment: "") controller.saveBarButton.title = NSLocalizedString("Create", comment: "") diff --git a/ios/MullvadVPN/Coordinators/CustomLists/AddLocationsCoordinator.swift b/ios/MullvadVPN/Coordinators/CustomLists/AddLocationsCoordinator.swift index 018dc9257b..ae4fd28cbc 100644 --- a/ios/MullvadVPN/Coordinators/CustomLists/AddLocationsCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/CustomLists/AddLocationsCoordinator.swift @@ -40,7 +40,7 @@ class AddLocationsCoordinator: Coordinator, Presentable, Presenting { ) controller.delegate = self - controller.navigationItem.title = NSLocalizedString("Add locations", comment: "") + controller.navigationItem.title = NSLocalizedString("Locations", comment: "") navigationController.pushViewController(controller, animated: true) } diff --git a/ios/MullvadVPN/Coordinators/CustomLists/CustomListItemIdentifier.swift b/ios/MullvadVPN/Coordinators/CustomLists/CustomListItemIdentifier.swift index 37a479681f..978dde21c9 100644 --- a/ios/MullvadVPN/Coordinators/CustomLists/CustomListItemIdentifier.swift +++ b/ios/MullvadVPN/Coordinators/CustomLists/CustomListItemIdentifier.swift @@ -41,10 +41,8 @@ enum CustomListItemIdentifier: Hashable, CaseIterable { switch self { case .name: NSLocalizedString("Name", comment: "") - case .addLocations: - NSLocalizedString("Add locations", comment: "") - case .editLocations: - NSLocalizedString("Edit locations", comment: "") + case .addLocations, .editLocations: + NSLocalizedString("Locations", comment: "") case .deleteList: NSLocalizedString("Delete list", comment: "") } diff --git a/ios/MullvadVPN/Coordinators/CustomLists/EditLocationsCoordinator.swift b/ios/MullvadVPN/Coordinators/CustomLists/EditLocationsCoordinator.swift index 4b426ff377..e36e02645c 100644 --- a/ios/MullvadVPN/Coordinators/CustomLists/EditLocationsCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/CustomLists/EditLocationsCoordinator.swift @@ -41,7 +41,7 @@ class EditLocationsCoordinator: Coordinator, Presentable, Presenting { ) controller.delegate = self - controller.navigationItem.title = NSLocalizedString("Edit locations", comment: "") + controller.navigationItem.title = NSLocalizedString("Locations", comment: "") navigationController.pushViewController(controller, animated: true) } } diff --git a/ios/MullvadVPN/Coordinators/LocationCoordinator.swift b/ios/MullvadVPN/Coordinators/LocationCoordinator.swift index 6a40cd0029..744f7f037f 100644 --- a/ios/MullvadVPN/Coordinators/LocationCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/LocationCoordinator.swift @@ -191,7 +191,7 @@ extension LocationCoordinator: @preconcurrency LocationViewControllerWrapperDele actionSheet.view.tintColor = .AlertController.tintColor let addCustomListAction = UIAlertAction( - title: NSLocalizedString("Add new list", comment: ""), + title: NSLocalizedString("Create new list", comment: ""), style: .default, handler: { [weak self] _ in self?.showAddCustomList(nodes: nodes) @@ -201,7 +201,7 @@ extension LocationCoordinator: @preconcurrency LocationViewControllerWrapperDele actionSheet.addAction(addCustomListAction) let editAction = UIAlertAction( - title: NSLocalizedString("Edit lists", comment: ""), + title: NSLocalizedString("Edit custom lists", comment: ""), style: .default, handler: { [weak self] _ in self?.showEditCustomLists(nodes: nodes) diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodCoordinator.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodCoordinator.swift index 997c3fd44d..d8fc48a887 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodCoordinator.swift @@ -76,7 +76,7 @@ extension EditAccessMethodCoordinator: @preconcurrency EditAccessMethodViewContr controller.navigationItem.prompt = NSLocalizedString("The app will test the method before saving.", comment: "") - controller.navigationItem.title = NSLocalizedString("Method settings", comment: "") + controller.navigationItem.title = NSLocalizedString("Edit method", comment: "") controller.saveBarButton.title = NSLocalizedString("Save", comment: "") diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodItemIdentifier.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodItemIdentifier.swift index f8cd3205c9..74a7332511 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodItemIdentifier.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodItemIdentifier.swift @@ -56,7 +56,7 @@ enum EditAccessMethodItemIdentifier: Hashable { case .enableMethod: NSLocalizedString("Enable method", comment: "") case .methodSettings: - NSLocalizedString("Method settings", comment: "") + NSLocalizedString("Edit method", comment: "") case .testMethod: NSLocalizedString("Test method", comment: "") case .cancelTest: diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift index d4b9e9763e..4f324bfcd3 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Edit/EditAccessMethodViewController.swift @@ -364,10 +364,7 @@ extension EditAccessMethodViewController: UITableViewDelegate { } private func onDelete() { - let methodName = - subject.value.name.isEmpty - ? NSLocalizedString("method", comment: "") - : subject.value.name + let methodName = subject.value.name let presentation = AlertPresentation( id: "api-access-methods-delete-method-alert", diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/List/ListAccessMethodView.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/List/ListAccessMethodView.swift index 6b8c418d31..b6c305e338 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/List/ListAccessMethodView.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/List/ListAccessMethodView.swift @@ -68,7 +68,7 @@ struct ListAccessMethodView<ViewModel>: View where ViewModel: ListAccessViewMode viewModel.itemInUse?.id == item.id ? NSLocalizedString("In use", comment: "") : (!item.isEnabled - ? NSLocalizedString("Disabled", comment: "") + ? NSLocalizedString("Off", comment: "") : nil) MullvadListNavigationItemView( item: MullvadListNavigationItem( diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodValidationError.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodValidationError.swift index 503a6b5de8..ac6627d40d 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodValidationError.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodValidationError.swift @@ -15,11 +15,7 @@ struct AccessMethodValidationError: LocalizedError, Equatable { let fieldErrors: [AccessMethodFieldValidationError] var errorDescription: String? { - if fieldErrors.count > 1 { - NSLocalizedString("Multiple validation errors occurred.", comment: "") - } else { - fieldErrors.first?.localizedDescription - } + fieldErrors.map({ $0.localizedDescription }).joinedParagraphs(lineBreaks: 1) } } @@ -74,7 +70,7 @@ struct AccessMethodFieldValidationError: LocalizedError, Equatable { case .invalidIPAddress: NSLocalizedString("Please enter a valid IPv4 or IPv6 address.", comment: "") case .invalidPort: - NSLocalizedString("Please enter a valid port.", comment: "") + NSLocalizedString("Please enter a valid remote server port.", comment: "") case .nameTooLong: String( format: NSLocalizedString("Name should be no longer than %i characters.", comment: ""), diff --git a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodViewModel.swift b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodViewModel.swift index 14ebb9ab60..0fb242f3dc 100644 --- a/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodViewModel.swift +++ b/ios/MullvadVPN/Coordinators/Settings/APIAccess/Models/AccessMethodViewModel.swift @@ -82,7 +82,7 @@ extension AccessMethodViewModel { case AccessMethodRepository.directId: InfoHeaderConfig( body: NSLocalizedString("The app communicates with a Mullvad API server directly.", comment: ""), - link: NSLocalizedString("About Direct method...", comment: "") + link: String(format: NSLocalizedString("About %@ method...", comment: ""), "Direct") ) case AccessMethodRepository.bridgeId: InfoHeaderConfig( @@ -90,7 +90,7 @@ extension AccessMethodViewModel { "The app communicates with a Mullvad API server via a Mullvad bridge server.", comment: "" ), - link: NSLocalizedString("About Mullvad bridges method...", comment: "") + link: String(format: NSLocalizedString("About %@ method...", comment: ""), "Mullvad bridges") ) case AccessMethodRepository.encryptedDNSId: InfoHeaderConfig( @@ -98,7 +98,7 @@ extension AccessMethodViewModel { "The app communicates with a Mullvad API server via a proxy address.", comment: "" ), - link: NSLocalizedString("About Encrypted DNS proxy method...", comment: "") + link: String(format: NSLocalizedString("About %@ method...", comment: ""), "Encrypted DNS proxy") ) default: nil @@ -155,9 +155,11 @@ extension AccessMethodViewModel { comment: "" ), NSLocalizedString( - "If you are not connected to our VPN, then the Encrypted DNS proxy will use " - + "your own non-VPN IP when connecting. The DoH servers are hosted by one of the " - + "following providers: Quad9 or Cloudflare.", + """ + If you are not connected to our VPN, then the Encrypted DNS proxy will \ + use your own non-VPN IP when connecting. The DoH servers are hosted by \ + one of the following providers: Quad9 or CloudFlare. + """, comment: "" ), ] diff --git a/ios/MullvadVPN/Coordinators/Settings/DAITA/DAITASettingsCoordinator.swift b/ios/MullvadVPN/Coordinators/Settings/DAITA/DAITASettingsCoordinator.swift index bdcae2d1ec..aa3db3e6a9 100644 --- a/ios/MullvadVPN/Coordinators/Settings/DAITA/DAITASettingsCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/Settings/DAITA/DAITASettingsCoordinator.swift @@ -86,7 +86,7 @@ class DAITASettingsCoordinator: Coordinator, SettingsChildCoordinator, Presentab message: item.description, buttons: [ AlertAction( - title: String(format: NSLocalizedString("Enable \"%@\"", comment: ""), item.title), + title: "\(NSLocalizedString("Enable", comment: "")) \"\(item.title)\"", style: .default, accessibilityId: .daitaConfirmAlertEnableButton, handler: { onSave() } diff --git a/ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift b/ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift index 4eea9be2ef..436d6c14fd 100644 --- a/ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift +++ b/ios/MullvadVPN/Coordinators/Settings/DAITA/SettingsDAITAView.swift @@ -106,7 +106,7 @@ extension SettingsDAITAView { extension SettingsDAITAView { private var dataViewModel: SettingsInfoViewModel { - let daitafullTitle = NSLocalizedString("Defense against AI-guided Traffic Analysis", comment: "") + let daitafullTitle = "Defense against AI-guided Traffic Analysis" let daitaTitle = NSLocalizedString("DAITA", comment: "") return SettingsInfoViewModel( pages: [ diff --git a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideInteractor.swift b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideInteractor.swift index f4076787e3..a2e888fa75 100644 --- a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideInteractor.swift +++ b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideInteractor.swift @@ -39,7 +39,7 @@ final class IPOverrideInteractor { func `import`(url: URL) { let data = (try? Data(contentsOf: url)) ?? Data() - handleImport(of: data, context: .file) + handleImport(of: data, context: .file(fileName: url.lastPathComponent)) } func `import`(text: String) { diff --git a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatus.swift b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatus.swift index f6c1b4d0f0..baca524964 100644 --- a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatus.swift +++ b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatus.swift @@ -13,28 +13,19 @@ enum IPOverrideStatus: Equatable, CustomStringConvertible { case importSuccessful(Context) case importFailed(Context) - enum Context { - case file, text - - // Used in "statusDescription" below to form a complete sentence and therefore not localized here. - var description: String { - switch self { - case .file: - NSLocalizedString("file", comment: "") - case .text: - NSLocalizedString("text", comment: "") - } - } + enum Context: Equatable { + case text + case file(fileName: String) } var title: String { switch self { case .active: - NSLocalizedString("Overrides active", comment: "") + NSLocalizedString("OVERRIDES ACTIVE", comment: "") case .noImports, .importFailed: - NSLocalizedString("No overrides imported", comment: "") + NSLocalizedString("NO OVERRIDES IMPORTED", comment: "") case .importSuccessful: - NSLocalizedString("Import successful", comment: "") + NSLocalizedString("IMPORT SUCCESSFUL", comment: "") } } @@ -62,15 +53,25 @@ enum IPOverrideStatus: Equatable, CustomStringConvertible { case .active, .noImports: "" case let .importFailed(context): - String( - format: NSLocalizedString("Import of %@ was unsuccessful, please try again.", comment: ""), - context.description - ) + switch context { + case .file(let fileName): + String( + format: NSLocalizedString("Import of %@ was unsuccessful, please try again.", comment: ""), + fileName + ) + case .text: + NSLocalizedString("Import of text was unsuccessful, please try again.", comment: "") + } case let .importSuccessful(context): - String( - format: NSLocalizedString("Import of %@ was successful, overrides are now active.", comment: ""), - context.description - ) + switch context { + case .file(let fileName): + String( + format: NSLocalizedString("Import of %@ was successful, overrides are now active.", comment: ""), + fileName + ) + case .text: + NSLocalizedString("Import of text was successful, overrides are now active.", comment: "") + } } } } diff --git a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatusView.swift b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatusView.swift index ba61d67066..1259215d50 100644 --- a/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatusView.swift +++ b/ios/MullvadVPN/Coordinators/Settings/IPOverride/IPOverrideStatusView.swift @@ -64,7 +64,7 @@ class IPOverrideStatusView: UIView { } func setStatus(_ status: IPOverrideStatus) { - titleLabel.text = status.title.uppercased() + titleLabel.text = status.title titleLabel.numberOfLines = 0 statusIcon.image = status.icon descriptionLabel.text = status.description diff --git a/ios/MullvadVPN/Extensions/StorePaymentManagerError+Display.swift b/ios/MullvadVPN/Extensions/StorePaymentManagerError+Display.swift index 39f00e8fac..aa2dda62f5 100644 --- a/ios/MullvadVPN/Extensions/StorePaymentManagerError+Display.swift +++ b/ios/MullvadVPN/Extensions/StorePaymentManagerError+Display.swift @@ -20,7 +20,7 @@ extension StorePaymentManagerError: DisplayError { let reason = (error as? DisplayError)?.displayErrorDescription ?? "" return String( - format: NSLocalizedString("Failed to validate account number: %@", comment: ""), reason + format: NSLocalizedString("Invalid account number: %@", comment: ""), reason ) case let .readReceipt(readReceiptError): diff --git a/ios/MullvadVPN/Notifications/Notification Providers/NewDeviceNotificationProvider.swift b/ios/MullvadVPN/Notifications/Notification Providers/NewDeviceNotificationProvider.swift index ec799437a7..dcdc7dc087 100644 --- a/ios/MullvadVPN/Notifications/Notification Providers/NewDeviceNotificationProvider.swift +++ b/ios/MullvadVPN/Notifications/Notification Providers/NewDeviceNotificationProvider.swift @@ -27,7 +27,7 @@ final class NewDeviceNotificationProvider: NotificationProvider, private var attributedBody: NSAttributedString { let formattedString = NSLocalizedString( - "Welcome, this device is now called **%@**. For more details see the info button in Account.", + "This device is now named **%@**. See more under \"Manage devices\" in Account.", comment: "" ) let deviceName = storedDeviceData?.capitalizedName ?? "" diff --git a/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift b/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift index e3a7ba344b..12d626762e 100644 --- a/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift +++ b/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift @@ -206,8 +206,7 @@ final class TunnelStatusNotificationProvider: NotificationProvider, InAppNotific body: .init( string: NSLocalizedString( """ - Your device is offline. The tunnel will automatically connect once \ - your device is back online. + Your device is offline. The tunnel will automatically connect once your device is back online. """, comment: "" ) diff --git a/ios/MullvadVPN/StorePaymentManager/StoreSubscription.swift b/ios/MullvadVPN/StorePaymentManager/StoreSubscription.swift index f09bd8752f..76512558cc 100644 --- a/ios/MullvadVPN/StorePaymentManager/StoreSubscription.swift +++ b/ios/MullvadVPN/StorePaymentManager/StoreSubscription.swift @@ -17,9 +17,9 @@ enum StoreSubscription: String, CaseIterable { var localizedTitle: String { switch self { case .thirtyDays: - return NSLocalizedString("Add 30 days", comment: "") + return NSLocalizedString("Add 30 days time (%@)", comment: "") case .ninetyDays: - return NSLocalizedString("Add 90 days", comment: "") + return NSLocalizedString("Add 90 days time (%@)", comment: "") } } } @@ -31,7 +31,7 @@ extension SKProduct { else { return nil } - return "\(localizedTitle) (\(localizedPrice))" + return String(format: localizedTitle, localizedPrice) } } diff --git a/ios/MullvadVPN/View controllers/CreationAccount/Completed/SetupAccountCompletedContentView.swift b/ios/MullvadVPN/View controllers/CreationAccount/Completed/SetupAccountCompletedContentView.swift index 1267dc58bf..319c4107fd 100644 --- a/ios/MullvadVPN/View controllers/CreationAccount/Completed/SetupAccountCompletedContentView.swift +++ b/ios/MullvadVPN/View controllers/CreationAccount/Completed/SetupAccountCompletedContentView.swift @@ -21,7 +21,7 @@ class SetupAccountCompletedContentView: UIView { label.adjustsFontForContentSizeCategory = true label.lineBreakMode = .byWordWrapping label.numberOfLines = .zero - label.text = NSLocalizedString("You’re all set!!", comment: "") + label.text = NSLocalizedString("You’re all set!", comment: "") return label }() diff --git a/ios/MullvadVPN/View controllers/Login/AccountInputGroupView.swift b/ios/MullvadVPN/View controllers/Login/AccountInputGroupView.swift index 57e33bebf5..a5e79f70e4 100644 --- a/ios/MullvadVPN/View controllers/Login/AccountInputGroupView.swift +++ b/ios/MullvadVPN/View controllers/Login/AccountInputGroupView.swift @@ -25,7 +25,7 @@ final class AccountInputGroupView: UIView { button.setImage(UIImage.Buttons.rightArrow, for: .normal) button.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal) button.setAccessibilityIdentifier(.loginTextFieldButton) - button.accessibilityLabel = NSLocalizedString("Log in", comment: "") + button.accessibilityLabel = NSLocalizedString("Login", comment: "") return button }() diff --git a/ios/MullvadVPN/View controllers/Login/LoginViewController.swift b/ios/MullvadVPN/View controllers/Login/LoginViewController.swift index 13d0038c1e..7189409826 100644 --- a/ios/MullvadVPN/View controllers/Login/LoginViewController.swift +++ b/ios/MullvadVPN/View controllers/Login/LoginViewController.swift @@ -49,7 +49,7 @@ class LoginViewController: UIViewController, RootContainment { private lazy var accountInputAccessoryLoginButton: UIBarButtonItem = { let barButtonItem = UIBarButtonItem( - title: NSLocalizedString("Log in", comment: ""), + title: NSLocalizedString("Login", comment: ""), style: .done, target: self, action: #selector(doLogin) @@ -415,7 +415,7 @@ private extension LoginState { case .useExistingAccount: return NSLocalizedString("Checking account number", comment: "") case .createAccount: - return NSLocalizedString("Creating new account", comment: "") + return NSLocalizedString("Creating account...", comment: "") } case let .failure(_, error): @@ -424,7 +424,7 @@ private extension LoginState { case let .success(method): switch method { case .useExistingAccount: - return NSLocalizedString("Correct account number", comment: "") + return NSLocalizedString("Valid account number", comment: "") case .createAccount: return NSLocalizedString("Account created", comment: "") } diff --git a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift index 89fcc7004b..25586eb0e7 100644 --- a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift +++ b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift @@ -344,7 +344,7 @@ private extension REST.Error { if compareErrorCode(.invalidVoucher) { return NSLocalizedString("Voucher code is invalid.", comment: "") } else if compareErrorCode(.usedVoucher) { - return NSLocalizedString("This voucher code has already been used.", comment: "") + return NSLocalizedString("Voucher code has already been used.", comment: "") } return displayErrorDescription ?? "" } diff --git a/ios/MullvadVPN/View controllers/RelayFilter/FilterDescriptor.swift b/ios/MullvadVPN/View controllers/RelayFilter/FilterDescriptor.swift index 093ca091de..501d754130 100644 --- a/ios/MullvadVPN/View controllers/RelayFilter/FilterDescriptor.swift +++ b/ios/MullvadVPN/View controllers/RelayFilter/FilterDescriptor.swift @@ -39,7 +39,7 @@ struct FilterDescriptor { var title: String { guard isEnabled else { - return NSLocalizedString("No matching servers", comment: "") + return NSLocalizedString("No matching servers found.", comment: "") } return createTitleForAvailableServers() } diff --git a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterDataSourceItem.swift b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterDataSourceItem.swift index 7a9d678473..825b4ba58a 100644 --- a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterDataSourceItem.swift +++ b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterDataSourceItem.swift @@ -25,13 +25,13 @@ struct RelayFilterDataSourceItem: Hashable, Comparable { ) static let ownedOwnershipItem = RelayFilterDataSourceItem( - name: NSLocalizedString("Owned", comment: ""), + name: NSLocalizedString("Mullvad owned only", comment: ""), type: .ownershipOwned, isEnabled: true ) static let rentedOwnershipItem = RelayFilterDataSourceItem( - name: NSLocalizedString("Rented", comment: ""), + name: NSLocalizedString("Rented only", comment: ""), type: .ownershipRented, isEnabled: true ) diff --git a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewModel.swift b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewModel.swift index 82686a300e..7108d465ed 100644 --- a/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewModel.swift +++ b/ios/MullvadVPN/View controllers/RelayFilter/RelayFilterViewModel.swift @@ -109,7 +109,7 @@ final class RelayFilterViewModel { return RelayFilterDataSourceItem( name: providerName, description: isDaitaEnabled && isProviderEnabled - ? NSLocalizedString("DAITA-enabled", comment: "") + ? String(format: NSLocalizedString("%@-enabled", comment: ""), "DAITA") : "", type: .provider, // If the current filter is valid, return true immediately. diff --git a/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPOverTCPObfuscationSettingsView.swift b/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPOverTCPObfuscationSettingsView.swift index 544ca5d24f..cf80d25437 100644 --- a/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPOverTCPObfuscationSettingsView.swift +++ b/ios/MullvadVPN/View controllers/Settings/Obfuscation/UDPOverTCPObfuscationSettingsView.swift @@ -20,10 +20,7 @@ struct UDPOverTCPObfuscationSettingsView<VM>: View where VM: UDPOverTCPObfuscati value: $viewModel.value, tableAccessibilityIdentifier: AccessibilityIdentifier.wireGuardObfuscationUdpOverTcpTable.asString, itemDescription: { item in - String( - format: NSLocalizedString("%@", comment: ""), - "\(item)" - ) + "\(item)" } ).onDisappear { viewModel.commit() diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift index 5c92ba303b..5fd4448157 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift @@ -37,7 +37,7 @@ struct DaitaFeature: ChipFeature { // When multihop is enabled via DAITA without being explicitly enabled // by the user, display combined indicator instead. state.isMultihop && !settings.tunnelMultihopState.isEnabled - ? String(format: NSLocalizedString("%@: Multihop", comment: ""), NSLocalizedString("DAITA", comment: "")) + ? "\(NSLocalizedString("DAITA", comment: "")): \(NSLocalizedString("Multihop", comment: ""))" : NSLocalizedString("DAITA", comment: "") } } diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift index e5b20db704..6bdc2cf69f 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift @@ -102,19 +102,19 @@ extension ConnectionViewViewModel { var localizedTitleForSecureLabel: LocalizedStringKey { switch tunnelStatus.state { case .connecting, .reconnecting, .negotiatingEphemeralPeer: - LocalizedStringKey("Connecting...") + LocalizedStringKey("CONNECTING...") case .connected: - LocalizedStringKey("Connected") + LocalizedStringKey("CONNECTED") case .disconnecting(.nothing): - LocalizedStringKey("Disconnecting...") + LocalizedStringKey("DISCONNECTING...") case .disconnecting(.reconnect), .pendingReconnect: - LocalizedStringKey("Reconnecting") + LocalizedStringKey("RECONNECTING") case .disconnected: - LocalizedStringKey("Disconnected") + LocalizedStringKey("DISCONNECTED") case .waitingForConnectivity(.noConnection), .error: - LocalizedStringKey("Blocked connection") + LocalizedStringKey("BLOCKED CONNECTION") case .waitingForConnectivity(.noNetwork): - LocalizedStringKey("No network") + LocalizedStringKey("NO NETWORK") } } @@ -134,17 +134,21 @@ extension ConnectionViewViewModel { case .disconnected, .waitingForConnectivity, .disconnecting, .pendingReconnect, .error: localizedTitleForSecureLabel case let .connected(tunnelInfo, _, _): - LocalizedStringKey("Connected to \(tunnelInfo.exit.location.city), \(tunnelInfo.exit.location.country)") + LocalizedStringKey( + "Connected to \([tunnelInfo.exit.location.city,tunnelInfo.exit.location.country].joined(separator: ", "))" + ) case let .connecting(tunnelInfo, _, _): if let tunnelInfo { LocalizedStringKey( - "Connecting to \(tunnelInfo.exit.location.city), \(tunnelInfo.exit.location.country)" + "Connecting to \([tunnelInfo.exit.location.city,tunnelInfo.exit.location.country].joined(separator: ", "))" ) } else { localizedTitleForSecureLabel } case let .reconnecting(tunnelInfo, _, _), let .negotiatingEphemeralPeer(tunnelInfo, _, _, _): - LocalizedStringKey("Reconnecting to \(tunnelInfo.exit.location.city), \(tunnelInfo.exit.location.country)") + LocalizedStringKey( + "Reconnecting to \([tunnelInfo.exit.location.city,tunnelInfo.exit.location.country].joined(separator: ", "))" + ) } } @@ -189,7 +193,7 @@ extension ConnectionViewViewModel { return if let entryName { LocalizedStringKey("\(exitName) via \(entryName)") } else { - LocalizedStringKey("\(exitName)") + "\(exitName)" } } diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/HeaderView.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/HeaderView.swift index e985474b4d..41eaeac39d 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/HeaderView.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/HeaderView.swift @@ -22,7 +22,6 @@ extension ConnectionView { VStack(alignment: .leading, spacing: 0) { HStack(alignment: .top) { Text(viewModel.localizedTitleForSecureLabel) - .textCase(.uppercase) .font(.title3.weight(.semibold)) .foregroundStyle(viewModel.textColorForSecureLabel.color) .accessibilityIdentifier(viewModel.accessibilityIdForSecureLabel.asString) diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInfoButtonItem.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInfoButtonItem.swift index badca766d5..3db30cbb19 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInfoButtonItem.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInfoButtonItem.swift @@ -23,8 +23,7 @@ enum VPNSettingsInfoButtonItem: CustomStringConvertible { case .localNetworkSharing: [ NSLocalizedString( - "This feature allows access to other devices on the local network, " - + "such as for sharing, printing, streaming, etc.", + "This feature allows access to other devices on the local network, such as for sharing, printing, streaming, etc.", comment: "" ), NSLocalizedString( @@ -45,7 +44,7 @@ enum VPNSettingsInfoButtonItem: CustomStringConvertible { ), String( format: NSLocalizedString( - "Attention: this setting cannot be used in combination with **“%@“**.", + "Attention: this setting cannot be used in combination with **%@**", comment: "" ), NSLocalizedString("Use custom DNS server", comment: "") |
