diff --git a/Account/Package.swift b/Account/Package.swift index b1b5a1d4f..aa42d6290 100644 --- a/Account/Package.swift +++ b/Account/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.7 import PackageDescription var dependencies: [Package.Dependency] = [ @@ -27,7 +27,7 @@ dependencies.append(contentsOf: [ let package = Package( name: "Account", defaultLocalization: "en", - platforms: [.macOS(SupportedPlatform.MacOSVersion.v11), .iOS(SupportedPlatform.IOSVersion.v14)], + platforms: [.macOS(SupportedPlatform.MacOSVersion.v13), .iOS(SupportedPlatform.IOSVersion.v16)], products: [ .library( name: "Account", diff --git a/Account/Sources/Account/Account.swift b/Account/Sources/Account/Account.swift index e29d3f70e..a51f401e4 100644 --- a/Account/Sources/Account/Account.swift +++ b/Account/Sources/Account/Account.swift @@ -79,12 +79,12 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, public static let defaultLocalAccountName: String = { let defaultName: String #if os(macOS) - defaultName = NSLocalizedString("account.name.mac", value: "On My Mac", comment: "Account name") + defaultName = String(localized: "account.name.mac", bundle: .module, comment: "On My Mac") #else if UIDevice.current.userInterfaceIdiom == .pad { - defaultName = NSLocalizedString("account.name.ipad", value: "On My iPad", comment: "Account name") + defaultName = String(localized: "account.name.ipad", bundle: .module, comment: "On My iPad") } else { - defaultName = NSLocalizedString("account.name.iphone", value: "On My iPhone", comment: "Account name") + defaultName = String(localized: "account.name.iphone", bundle: .module, comment: "On My iPhone") } #endif @@ -291,21 +291,21 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, case .onMyMac: defaultName = Account.defaultLocalAccountName case .cloudKit: - defaultName = NSLocalizedString("iCloud", comment: "iCloud") + defaultName = String("iCloud") case .feedly: - defaultName = NSLocalizedString("Feedly", comment: "Feedly") + defaultName = String("Feedly") case .feedbin: - defaultName = NSLocalizedString("Feedbin", comment: "Feedbin") + defaultName = String("Feedbin") case .newsBlur: - defaultName = NSLocalizedString("NewsBlur", comment: "NewsBlur") + defaultName = String("NewsBlur") case .freshRSS: - defaultName = NSLocalizedString("FreshRSS", comment: "FreshRSS") + defaultName = String("FreshRSS") case .inoreader: - defaultName = NSLocalizedString("Inoreader", comment: "Inoreader") + defaultName = String("Inoreader") case .bazQux: - defaultName = NSLocalizedString("BazQux", comment: "BazQux") + defaultName = String("BazQux") case .theOldReader: - defaultName = NSLocalizedString("The Old Reader", comment: "The Old Reader") + defaultName = String("The Old Reader") } NotificationCenter.default.addObserver(self, selector: #selector(downloadProgressDidChange(_:)), name: .DownloadProgressDidChange, object: nil) diff --git a/Account/Sources/Account/AccountError.swift b/Account/Sources/Account/AccountError.swift index c66dc68cd..ed63b8786 100644 --- a/Account/Sources/Account/AccountError.swift +++ b/Account/Sources/Account/AccountError.swift @@ -36,29 +36,29 @@ public enum AccountError: LocalizedError { public var errorTitle: String { switch self { case .createErrorNotFound: - return NSLocalizedString("error.title.feed-not-found", bundle: Bundle.module, comment: "Unable to Add Feed") + return String(localized: "error.title.feed-not-found", bundle: .module, comment: "Unable to Add Feed") case .createErrorAlreadySubscribed: - return NSLocalizedString("error.title.already-subscribed", bundle: Bundle.module, comment: "Already Subscribed") + return String(localized: "error.title.already-subscribed", bundle: .module, comment: "Already Subscribed") case .opmlImportInProgress: - return NSLocalizedString("error.title.ompl-import-in-progress", bundle: Bundle.module, comment: "OPML Import in Progress") + return String(localized: "error.title.ompl-import-in-progress", bundle: .module, comment: "OPML Import in Progress") case .wrappedError(_, _): - return NSLocalizedString("error.title.error", bundle: Bundle.module, comment: "Error") + return String(localized: "error.title.error", bundle: .module, comment: "Error") } } public var errorDescription: String? { switch self { case .createErrorNotFound: - return NSLocalizedString("error.message.feed-not-found", bundle: Bundle.module, comment: "Can’t add a feed because no feed was found.") + return String(localized: "error.message.feed-not-found", bundle: .module, comment: "Can’t add a feed because no feed was found.") case .createErrorAlreadySubscribed: - return NSLocalizedString("error.message.feed-already-subscribed", bundle: Bundle.module, comment: "You are already subscribed to this feed and can’t add it again.") + return String(localized: "error.message.feed-already-subscribed", bundle: .module, comment: "You are already subscribed to this feed and can’t add it again.") case .opmlImportInProgress: - return NSLocalizedString("error.message.opml-import-in-progress", bundle: Bundle.module, comment: "An OPML import for this account is already running.") + return String(localized: "error.message.opml-import-in-progress", bundle: Bundle.module, comment: "An OPML import for this account is already running.") case .wrappedError(let error, let account): switch error { case TransportError.httpError(let status): if isCredentialsError(status: status) { - let localizedText = NSLocalizedString("error.message.credentials-expired.%@", bundle: Bundle.module, comment: "Your ”%@” credentials have expired.") + let localizedText = String(localized: "error.message.credentials-expired.%@", bundle: .module, comment: "Your ”%@” credentials have expired.") return String(format: localizedText, account.nameForDisplay) } else { return unknownError(error, account) @@ -79,15 +79,15 @@ public enum AccountError: LocalizedError { switch error { case TransportError.httpError(let status): if isCredentialsError(status: status) { - return NSLocalizedString("Please update your credentials for this account, or ensure that your account with this service is still valid.", comment: "Expired credentials") + return String(localized: "error.message.credentials-expired.%@", bundle: .module, comment: "Expired credentials") } else { - return NSLocalizedString("Please try again later.", comment: "Try later") + return String(localized: "error.message.try-later", bundle: .module, comment: "Try later") } default: - return NSLocalizedString("Please try again later.", comment: "Try later") + return String(localized: "error.message.try-later", bundle: .module, comment: "Try later") } default: - return NSLocalizedString("Please try again later.", comment: "Try later") + return String(localized: "error.message.try-later", bundle: .module, comment: "Try later") } } @@ -98,7 +98,7 @@ public enum AccountError: LocalizedError { private extension AccountError { func unknownError(_ error: Error, _ account: Account) -> String { - let localizedText = NSLocalizedString("An error occurred while processing the “%@” account: %@", comment: "Unknown error") + let localizedText = String(localized: "error.message.\(error.localizedDescription)", bundle: .module, comment: "Unknown error") return NSString.localizedStringWithFormat(localizedText as NSString, account.nameForDisplay, error.localizedDescription) as String } diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift b/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift index 07079b5fe..3895f2d9b 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountDelegate.swift @@ -22,7 +22,7 @@ enum CloudKitAccountDelegateError: LocalizedError { case unknown var errorDescription: String? { - return NSLocalizedString("An unexpected CloudKit error occurred.", comment: "An unexpected CloudKit error occurred.") + return String(localized: "error.cloudkit.localizedDescription", bundle: .module, comment: "An unexpected CloudKit error occurred.") } } diff --git a/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift b/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift index e25f23d8c..90a530cb7 100644 --- a/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift +++ b/Account/Sources/Account/CloudKit/CloudKitAccountZone.swift @@ -16,7 +16,7 @@ import CloudKit enum CloudKitAccountZoneError: LocalizedError { case unknown var errorDescription: String? { - return NSLocalizedString("An unexpected CloudKit error occurred.", comment: "An unexpected CloudKit error occurred.") + return String(localized: "error.cloudkit.localizedDescription", bundle: .module, comment: "An unexpected CloudKit error occurred.") } } final class CloudKitAccountZone: CloudKitZone { diff --git a/Account/Sources/Account/CloudKit/CloudKitWebDocumentation.swift b/Account/Sources/Account/CloudKit/CloudKitWebDocumentation.swift index 1cb3d8e99..d2eb63c3c 100644 --- a/Account/Sources/Account/CloudKit/CloudKitWebDocumentation.swift +++ b/Account/Sources/Account/CloudKit/CloudKitWebDocumentation.swift @@ -8,6 +8,6 @@ import Foundation public struct CloudKitWebDocumentation { - public static let limitationsAndSolutionsText = NSLocalizedString("iCloud Syncing Limitations & Solutions", comment: "iCloud Documentation") + public static let limitationsAndSolutionsText = String(localized: "label.text.icloud-syncing-limitations-title", bundle: .module, comment: "iCloud Documentation") public static let limitationsAndSolutionsURL = URL(string: "https://netnewswire.com/help/iCloud")! } diff --git a/Account/Sources/Account/CombinedRefreshProgress.swift b/Account/Sources/Account/CombinedRefreshProgress.swift index 0020b94a6..b6374ee24 100644 --- a/Account/Sources/Account/CombinedRefreshProgress.swift +++ b/Account/Sources/Account/CombinedRefreshProgress.swift @@ -61,15 +61,15 @@ public struct CombinedRefreshProgress { if isInprecise { if numberOfDownloadsActive == 1 { if let activeName = downloadProgressArray.first(where: { $0.isComplete == false })?.name { - let formatString = NSLocalizedString("Syncing %@", comment: "Status bar progress") + let formatString = String(localized: "message.activeName.syncing-%@", bundle: .module, comment: "Status bar progress") label = NSString(format: formatString as NSString, activeName) as String } } else { - let formatString = NSLocalizedString("Syncing %@ accounts", comment: "Status bar progress") + let formatString = String(localized: "message.syncing-%@-accounts", bundle: .module, comment: "Status bar progress") label = NSString(format: formatString as NSString, NSNumber(value: numberOfDownloadsActive)) as String } } else { - let formatString = NSLocalizedString("%@ of %@", comment: "Status bar progress") + let formatString = String(localized: "%@-of-%@", bundle: .module, comment: "Status bar progress") label = NSString(format: formatString as NSString, NSNumber(value: numberCompleted), NSNumber(value: numberOfTasks)) as String } } diff --git a/Account/Sources/Account/FeedProvider/Reddit/RedditFeedProvider.swift b/Account/Sources/Account/FeedProvider/Reddit/RedditFeedProvider.swift index 5622d6793..432da377b 100644 --- a/Account/Sources/Account/FeedProvider/Reddit/RedditFeedProvider.swift +++ b/Account/Sources/Account/FeedProvider/Reddit/RedditFeedProvider.swift @@ -21,11 +21,11 @@ public enum RedditFeedProviderError: LocalizedError { public var errorDescription: String? { switch self { case .rateLimitExceeded: - return NSLocalizedString("Reddit API rate limit has been exceeded. Please wait a short time and try again.", comment: "Rate Limit") + return String(localized: "error.message.reddit-api-limit-exceeded", bundle: .module, comment: "Rate Limit") case .accessFailure(let error): - return NSLocalizedString("An attempt to access your Reddit feed(s) failed.\n\nIf this problem persists, please deactivate and reactivate the Reddit extension to fix this problem.\n\n\(error.localizedDescription)", comment: "Reddit Access") + return String(localized: "error.message.reddit-access.failure.\n\n\(error.localizedDescription)", bundle: .module, comment: "Reddit Access") case .unknown: - return NSLocalizedString("A Reddit Feed Provider error has occurred.", comment: "Unknown error") + return String(localized: "error.message.unknown-error-contact-support", bundle: .module, comment: "Unknown error") } } } @@ -45,8 +45,8 @@ public final class RedditFeedProvider: FeedProvider, RedditFeedProviderTokenRefr private static let userAgentHeaders = UserAgent.headers() as! [String: String] private static let pseudoSubreddits = [ - "popular": NSLocalizedString("Popular", comment: "Popular"), - "all": NSLocalizedString("All", comment: "All") + "popular": String(localized: "message-popular", bundle: .module, comment: "Popular"), + "all": String(localized:"message-all", bundle: .module, comment: "All") ] private let operationQueue = MainThreadOperationQueue() @@ -126,7 +126,7 @@ public final class RedditFeedProvider: FeedProvider, RedditFeedProviderTokenRefr // Reddit Home let splitPath = path.split(separator: "/") if path == "" || path == "/" || (splitPath.count == 1 && RedditSort(rawValue: String(splitPath[0])) != nil) { - let name = NSLocalizedString("Reddit Home", comment: "Reddit Home") + let name = String(localized: "reddit-home", bundle: .module, comment: "Reddit Home") let metaData = FeedProviderFeedMetaData(name: name, homePageURL: Self.homeURL) completion(.success(metaData)) return @@ -147,7 +147,7 @@ public final class RedditFeedProvider: FeedProvider, RedditFeedProviderTokenRefr // Reddit Popular, Reddit All, etc... if let subredditName = Self.pseudoSubreddits[String(splitPath[1])] { - let localized = NSLocalizedString("Reddit %@", comment: "Reddit") + let localized = String(localized: "reddit-\(subredditName)", bundle: .module, comment: "Reddit") let name = NSString.localizedStringWithFormat(localized as NSString, subredditName) as String let metaData = FeedProviderFeedMetaData(name: name, homePageURL: homePageURL) completion(.success(metaData)) diff --git a/Account/Sources/Account/FeedProvider/Reddit/RedditSort.swift b/Account/Sources/Account/FeedProvider/Reddit/RedditSort.swift index 047fcd253..aeede7554 100644 --- a/Account/Sources/Account/FeedProvider/Reddit/RedditSort.swift +++ b/Account/Sources/Account/FeedProvider/Reddit/RedditSort.swift @@ -18,15 +18,15 @@ public enum RedditSort: String, CaseIterable { var displayName: String { switch self { case .best: - return NSLocalizedString("Best", comment: "Best") + return String(localized: "displayname-best", bundle: .module, comment: "Best") case .rising: - return NSLocalizedString("Rising", comment: "Rising") + return String(localized:"displayname-rising", bundle: .module, comment: "Rising") case .hot: - return NSLocalizedString("Hot", comment: "Hot") + return String(localized:"displayname-hot", bundle: .module, comment: "Hot") case .new: - return NSLocalizedString("New", comment: "New") + return String(localized:"displayname-new", bundle: .module, comment: "New") case .top: - return NSLocalizedString("Top", comment: "Top") + return String(localized:"displayname-top", bundle: .module, comment: "Top") } } } diff --git a/Account/Sources/Account/Feedly/FeedlyAccountDelegateError.swift b/Account/Sources/Account/Feedly/FeedlyAccountDelegateError.swift index 3c7a42ef9..f3e4431b2 100644 --- a/Account/Sources/Account/Feedly/FeedlyAccountDelegateError.swift +++ b/Account/Sources/Account/Feedly/FeedlyAccountDelegateError.swift @@ -23,41 +23,41 @@ enum FeedlyAccountDelegateError: LocalizedError { var errorDescription: String? { switch self { case .notLoggedIn: - return NSLocalizedString("Please add the Feedly account again. If this problem persists, open Keychain Access and delete all feedly.com entries, then try again.", comment: "Feedly – Credentials not found.") + return String(localized: "error.feedly.credentials-not-found", bundle: .module, comment: "Feedly – Credentials not found.") case .unexpectedResourceId(let resourceId): - let template = NSLocalizedString("Could not encode the identifier “%@”.", comment: "Feedly – Could not encode resource id to send to Feedly.") + let template = String(localized: "error.message.could-not-encode-identifier-\(resourceId)", bundle: .module, comment: "Feedly – Could not encode resource id to send to Feedly.") return String(format: template, resourceId) case .unableToAddFolder(let name): - let template = NSLocalizedString("Could not create a folder named “%@”.", comment: "Feedly – Could not create a folder/collection.") + let template = String(localized: "error.message.could-not-create-folder-\(name)", bundle: .module, comment: "Feedly – Could not create a folder/collection.") return String(format: template, name) case .unableToRenameFolder(let from, let to): - let template = NSLocalizedString("Could not rename “%@” to “%@”.", comment: "Feedly – Could not rename a folder/collection.") + let template = String(localized: "error.message.could-not-rename-folder", bundle: .module, comment: "Feedly – Could not rename a folder/collection.") return String(format: template, from, to) case .unableToRemoveFolder(let name): - let template = NSLocalizedString("Could not remove the folder named “%@”.", comment: "Feedly – Could not remove a folder/collection.") + let template = String(localized: "error.message.could-not-remove-folder-\(name)", bundle: .module, comment: "Feedly – Could not remove a folder/collection.") return String(format: template, name) case .unableToMoveFeedBetweenFolders(let feed, _, let to): - let template = NSLocalizedString("Could not move “%@” to “%@”.", comment: "Feedly – Could not move a feed between folders/collections.") + let template = String(localized: "error.message.could-not-move-feed", bundle: .module, comment: "Feedly – Could not move a feed between folders/collections.") return String(format: template, feed.nameForDisplay, to.nameForDisplay) case .addFeedChooseFolder: - return NSLocalizedString("Please choose a folder to contain the feed.", comment: "Feedly – Feed can only be added to folders.") + return String(localized: "error.message.folder-not-chosen", bundle: .module, comment: "Feedly – Feed can only be added to folders.") case .addFeedInvalidFolder(let invalidFolder): - let template = NSLocalizedString("Feeds cannot be added to the “%@” folder.", comment: "Feedly – Feed can only be added to folders.") + let template = String(localized: "error.message.could-not-add-to-folder", bundle: .module, comment: "Feedly – Feed can only be added to folders.") return String(format: template, invalidFolder.nameForDisplay) case .unableToRenameFeed(let from, let to): - let template = NSLocalizedString("Could not rename “%@” to “%@”.", comment: "Feedly – Could not rename a feed.") + let template = String(localized: "error.message.could-not-rename-feed", bundle: .module, comment: "Feedly – Could not rename a feed.") return String(format: template, from, to) case .unableToRemoveFeed(let feed): - let template = NSLocalizedString("Could not remove “%@”.", comment: "Feedly – Could not remove a feed.") + let template = String(localized: "error.message.could-not-remove-feed", bundle: .module, comment: "Feedly – Could not remove a feed.") return String(format: template, feed.nameForDisplay) } } @@ -68,7 +68,7 @@ enum FeedlyAccountDelegateError: LocalizedError { return nil case .unexpectedResourceId: - let template = NSLocalizedString("Please contact NetNewsWire support.", comment: "Feedly – Recovery suggestion for not being able to encode a resource id to send to Feedly..") + let template = String(localized: "error.message.contact-support", bundle: .module, comment: "Feedly – Recovery suggestion for not being able to encode a resource id to send to Feedly..") return String(format: template) case .unableToAddFolder: @@ -81,14 +81,14 @@ enum FeedlyAccountDelegateError: LocalizedError { return nil case .unableToMoveFeedBetweenFolders(let feed, let from, let to): - let template = NSLocalizedString("“%@” may be in both “%@” and “%@”.", comment: "Feedly – Could not move a feed between folders/collections.") + let template = String(localized: "error.message.unable-to-move-feed-between-folders", bundle: .module, comment: "Feedly – Could not move a feed between folders/collections.") return String(format: template, feed.nameForDisplay, from.nameForDisplay, to.nameForDisplay) case .addFeedChooseFolder: return nil case .addFeedInvalidFolder: - return NSLocalizedString("Please choose a different folder to contain the feed.", comment: "Feedly – Feed can only be added to folders recovery suggestion.") + return String(localized: "error.message.add-feed-invalid-folder", bundle: .module, comment: "Feedly – Feed can only be added to folders recovery suggestion.") case .unableToRemoveFeed: return nil diff --git a/Account/Sources/Account/Feedly/OAuthAccountAuthorizationOperation.swift b/Account/Sources/Account/Feedly/OAuthAccountAuthorizationOperation.swift index f16029ce8..7094767be 100644 --- a/Account/Sources/Account/Feedly/OAuthAccountAuthorizationOperation.swift +++ b/Account/Sources/Account/Feedly/OAuthAccountAuthorizationOperation.swift @@ -19,7 +19,7 @@ public enum OAuthAccountAuthorizationOperationError: LocalizedError { case duplicateAccount public var errorDescription: String? { - return NSLocalizedString("There is already a Feedly account with that username created.", comment: "Duplicate Error") + return String(localized: "error.description.duplicate-error", bundle: .module, comment: "Duplicate Error") } } @objc public final class OAuthAccountAuthorizationOperation: NSObject, MainThreadOperation, ASWebAuthenticationPresentationContextProviding { @@ -79,9 +79,9 @@ public enum OAuthAccountAuthorizationOperationError: LocalizedError { /// Documentation does not say on why `ASWebAuthenticationSession.start` or `canStart` might return false. /// Perhaps it has something to do with an inter-process communication failure? No browsers installed? No browsers that support web authentication? struct UnableToStartASWebAuthenticationSessionError: LocalizedError { - let errorDescription: String? = NSLocalizedString("Unable to start a web authentication session with the default web browser.", + let errorDescription: String? = String(localized: "localisederror.message-unable-to-start-as-web-authentication-session-error", bundle: .module, comment: "OAuth - error description - unable to authorize because ASWebAuthenticationSession did not start.") - let recoverySuggestion: String? = NSLocalizedString("Check your default web browser in System Preferences or change it to Safari and try again.", + let recoverySuggestion: String? = String(localized: "oauth.recoverysuggestion.ensure-browser-supports-web-authentication", bundle: .module, comment: "OAuth - recovery suggestion - ensure browser selected supports web authentication.") } diff --git a/Account/Sources/Account/Folder.swift b/Account/Sources/Account/Folder.swift index 553887831..358dc008c 100644 --- a/Account/Sources/Account/Folder.swift +++ b/Account/Sources/Account/Folder.swift @@ -42,7 +42,7 @@ public final class Folder: Feed, Renamable, Container, Hashable { } } - static let untitledName = NSLocalizedString("Untitled ƒ", comment: "Folder name") + static let untitledName = String(localized: "untitled-ƒ", bundle: .module, comment: "Folder name") public let folderID: Int // not saved: per-run only public var isSyncingPaused = false public var externalID: String? = nil diff --git a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift index 813317083..d9730d3e3 100644 --- a/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift +++ b/Account/Sources/Account/ReaderAPI/ReaderAPIAccountDelegate.swift @@ -22,13 +22,13 @@ public enum ReaderAPIAccountDelegateError: LocalizedError { public var errorDescription: String? { switch self { case .unknown: - return NSLocalizedString("An unexpected error occurred.", comment: "An unexpected error occurred.") + return String(localized: "error.message.unknown", bundle: .module, comment: "An unexpected error occurred.") case .invalidParameter: - return NSLocalizedString("An invalid parameter was passed.", comment: "An invalid parameter was passed.") + return String(localized: "error.message.invalid-parameter", bundle: .module, comment: "An invalid parameter was passed.") case .invalidResponse: - return NSLocalizedString("There was an invalid response from the server.", comment: "There was an invalid response from the server.") + return String(localized: "error.message.invalid-response", bundle: .module, comment: "There was an invalid response from the server.") case .urlNotFound: - return NSLocalizedString("The API URL wasn't found.", comment: "The API URL wasn't found.") + return String(localized: "error.message.url-not-found", bundle: .module, comment: "The API URL wasn't found.") } } } diff --git a/Account/Sources/Account/Resources/en-GB.lproj/Localizable.strings b/Account/Sources/Account/Resources/en-GB.lproj/Localizable.strings index 852c08f67..19660b794 100644 --- a/Account/Sources/Account/Resources/en-GB.lproj/Localizable.strings +++ b/Account/Sources/Account/Resources/en-GB.lproj/Localizable.strings @@ -1,16 +1,162 @@ -/* - Localizable.strings - +/* Feedly – Could not move a feed between folders/collections. */ +"“%@” may be in both “%@” and “%@”." = "“%@” may be in both “%@” and “%@”."; + +/* Status bar progress */ +"%@ of %@" = "%@ of %@"; + +/* Unknown error */ +"A Reddit Feed Provider error has occurred." = "A Reddit Feed Provider error has occurred."; + +/* On My Mac */ +"account.name.mac" = "account.name.mac"; + +/* All */ +"All" = "All"; + +/* Reddit Access */ +"An attempt to access your Reddit feed(s) failed.\n\nIf this problem persists, please deactivate and reactivate the Reddit extension to fix this problem.\n\n%@" = "An attempt to access your Reddit feed(s) failed.\n\nIf this problem persists, please deactivate and reactivate the Reddit extension to fix this problem.\n\n%@"; + +/* Unknown error */ +"An error occurred while processing the “%@” account: %@" = "An error occurred while processing the “%@” account: %@"; + +/* An invalid parameter was passed. */ +"An invalid parameter was passed." = "An invalid parameter was passed."; + +/* An unexpected CloudKit error occurred. */ +"An unexpected CloudKit error occurred." = "An unexpected CloudKit error occurred."; + +/* An unexpected error occurred. */ +"An unexpected error occurred." = "An unexpected error occurred."; + +/* Best */ +"Best" = "Best"; + +/* OAuth - recovery suggestion - ensure browser selected supports web authentication. */ +"Check your default web browser in System Preferences or change it to Safari and try again." = "Check your default web browser in System Preferences or change it to Safari and try again."; + +/* Feedly – Could not create a folder/collection. */ +"Could not create a folder named “%@”." = "Could not create a folder named “%@”."; + +/* Feedly – Could not encode resource id to send to Feedly. */ +"Could not encode the identifier “%@”." = "Could not encode the identifier “%@”."; + +/* Feedly – Could not move a feed between folders/collections. */ +"Could not move “%@” to “%@”." = "Could not move “%@” to “%@”."; + +/* Feedly – Could not remove a feed. */ +"Could not remove “%@”." = "Could not remove “%@”."; - Created by Stuart Breckenridge on 11/03/2023. +/* Feedly – Could not remove a folder/collection. */ +"Could not remove the folder named “%@”." = "Could not remove the folder named “%@”."; + +/* Feedly – Could not rename a folder/collection. */ +"Could not rename “%@” to “%@”." = "Could not rename “%@” to “%@”."; + +/* (No Comment) */ +"error.message.already-subscribed" = "You are already subscribed to this feed and can’t add it again."; + +/* Your ”%@” credentials have expired. */ +"error.message.credentials-expired.%@" = "error.message.credentials-expired.%@"; + +/* You are already subscribed to this feed and can’t add it again. */ +"error.message.feed-already-subscribed" = "error.message.feed-already-subscribed"; + +/* Can’t add a feed because no feed was found. */ +"error.message.feed-not-found" = "Can’t add a feed because no feed was found."; + +/* An OPML import for this account is already running. */ +"error.message.opml-import-in-progress" = "An OPML import for this account is already running."; + +/* Already Subscribed */ +"error.title.already-subscribed" = "Already Subscribed"; + +/* Error */ +"error.title.error" = "Error"; + +/* Localizable.strings -*/ + Created by Stuart Breckenridge on 11/03/2023. */ "error.title.feed-not-found" = "Unable to Add Feed"; -"error.title.already-subscribed" = "Already Subscribed"; + +/* OPML Import in Progress */ "error.title.ompl-import-in-progress" = "OPML Import in Progress"; -"error.title.error" = "Error"; -"error.message.feed-not-found" = "Can’t add a feed because no feed was found."; -"error.message.already-subscribed" = "You are already subscribed to this feed and can’t add it again."; -"error.message.opml-import-in-progress" = "An OPML import for this account is already running."; +/* Feedly – Feed can only be added to folders. */ +"Feeds cannot be added to the “%@” folder." = "Feeds cannot be added to the “%@” folder."; + +/* Hot */ +"Hot" = "Hot"; + +/* iCloud Documentation */ +"iCloud Syncing Limitations & Solutions" = "iCloud Syncing Limitations & Solutions"; + +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "label.text.show-notifications-for-new-articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "label.text.show-notifications-for-new-posts"; + +/* New */ +"New" = "New"; + +/* Feedly – Credentials not found. */ +"Please add the Feedly account again. If this problem persists, open Keychain Access and delete all feedly.com entries, then try again." = "Please add the Feedly account again. If this problem persists, open Keychain Access and delete all feedly.com entries, then try again."; + +/* Feedly – Feed can only be added to folders recovery suggestion. */ +"Please choose a different folder to contain the feed." = "Please choose a different folder to contain the feed."; + +/* Feedly – Feed can only be added to folders. */ +"Please choose a folder to contain the feed." = "Please choose a folder to contain the feed."; + +/* Feedly – Recovery suggestion for not being able to encode a resource id to send to Feedly.. */ +"Please contact NetNewsWire support." = "Please contact NetNewsWire support."; + +/* Try later */ +"Please try again later." = "Please try again later."; + +/* Expired credentials */ +"Please update your credentials for this account, or ensure that your account with this service is still valid." = "Please update your credentials for this account, or ensure that your account with this service is still valid"; + +/* Popular */ +"Popular" = "Popular"; + +/* Reddit */ +"Reddit %@" = "Reddit %@"; + +/* Rate Limit */ +"Reddit API rate limit has been exceeded. Please wait a short time and try again." = "Reddit API rate limit has been exceeded. Please wait a short time and try again."; + +/* Reddit Home */ +"Reddit Home" = "Reddit Home"; + +/* Rising */ +"Rising" = "Rising"; + +/* Status bar progress */ +"Syncing %@" = "Syncing %@"; + +/* Status bar progress */ +"Syncing %@ accounts" = "Syncing %@ accounts"; + +/* The API URL wasn't found. */ +"The API URL wasn't found." = "The API URL wasn't found."; + +/* Duplicate Error */ +"There is already a Feedly account with that username created." = "There is already a Feedly account with that username created."; + +/* There was an invalid response from the server. */ +"There was an invalid response from the server." = "There was an invalid response from the server."; + +/* Top */ +"Top" = "Top"; + +/* OAuth - error description - unable to authorize because ASWebAuthenticationSession did not start. */ +"Unable to start a web authentication session with the default web browser." = "Unable to start a web authentication session with the default web browser."; + +/* Feed name */ +"Untitled" = "Untitled"; + +/* Folder name */ +"Untitled ƒ" = "Untitled f"; + diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift index aad148c41..1cfa52a1a 100644 --- a/Account/Sources/Account/WebFeed.swift +++ b/Account/Sources/Account/WebFeed.swift @@ -210,7 +210,7 @@ public final class WebFeed: Feed, Renamable, Hashable, ObservableObject { if let s = name, !s.isEmpty { return s } - return NSLocalizedString("Untitled", comment: "Feed name") + return String(localized: "untitled", bundle: .module, comment: "Feed name") } // MARK: - Renamable @@ -254,15 +254,15 @@ public final class WebFeed: Feed, Renamable, Hashable, ObservableObject { public var notificationDisplayName: String { #if os(macOS) if self.url.contains("www.reddit.com") { - return NSLocalizedString("label.text.show-notifications-for-new-posts", comment: "Show notifications for new posts") + return String(localized: "label.text.show-notifications-for-new-posts", bundle: .module, comment: "Show notifications for new posts") } else { - return NSLocalizedString("label.text.show-notifications-for-new-articles", comment: "Show notifications for new articles") + return String(localized: "label.text.show-notifications-for-new-articles", bundle: .module, comment: "Show notifications for new articles") } #else if self.url.contains("www.reddit.com") { - return NSLocalizedString("label.text.show-notifications-for-new-posts", comment: "Notify about new posts") + return String(localized: "label.text.show-notifications-for-new-posts", bundle: .module, comment: "Notify about new posts") } else { - return NSLocalizedString("label.text.show-notifications-for-new-articles", comment: "Notify about new articles") + return String(localized: "label.text.show-notifications-for-new-articles", bundle: .module, comment: "Notify about new articles") } #endif }