From fb05b944cf81c3f2a80dcd464a01eabb4518f40f Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 6 Jun 2026 14:43:31 -0700 Subject: [PATCH] Regularize comments for localized strings so the Localizable.xcstrings file doesn't change just because we switched targets. --- Mac/AppDelegate.swift | 8 +- .../CloudKitStatsToolbarView.swift | 4 +- .../CloudKitStatsViewController.swift | 2 +- .../Scan/CloudKitStatsScanContentView.swift | 10 +-- Mac/Dinosaurs/DinosaursWindowController.swift | 8 +- Mac/MainWindow/MainWindowController.swift | 10 +-- .../Sidebar/SidebarDeleteItemsAlert.swift | 6 +- ...idebarViewController+ContextualMenus.swift | 2 +- .../AccountsPreferencesViewController.swift | 8 +- Modules/Account/Sources/Account/Account.swift | 8 +- .../UIKit/UIViewController+RSCore.swift | 2 +- Shared/Commands/DeleteCommand.swift | 6 +- Shared/Localizable.xcstrings | 80 +++++++++---------- Shared/SmartFeeds/StarredFeedDelegate.swift | 2 +- .../UserNotificationManager.swift | 4 +- .../ReaderAPIAccountViewController.swift | 8 +- iOS/Article/OpenInSafariActivity.swift | 2 +- iOS/Article/WebViewController.swift | 6 +- .../AccountInspectorViewController.swift | 2 +- .../FeedInspectorViewController.swift | 2 +- iOS/KeyboardManager.swift | 12 +-- .../MainFeedCollectionViewController.swift | 38 ++++----- .../MainTimelineCollectionViewCell.swift | 4 +- .../MainTimelineModernViewController.swift | 42 +++++----- .../MarkAsReadAlertController.swift | 4 +- iOS/Settings/ArticleThemeImporter.swift | 4 +- .../ArticleThemesTableViewController.swift | 6 +- iOS/Settings/CloudKitStatsView.swift | 22 ++--- iOS/Settings/SettingsViewController.swift | 4 +- .../UIViewController+Extras.swift | 2 +- 30 files changed, 159 insertions(+), 159 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 330e90894..2499f3f16 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -974,7 +974,7 @@ extension AppDelegate { alert.accessoryView = textView alert.addButton(withTitle: NSLocalizedString("Install Theme", comment: "Install Theme")) - alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel Install Theme")) + alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) func importTheme() { do { @@ -996,7 +996,7 @@ extension AppDelegate { alert.messageText = NSString.localizedStringWithFormat(localizedMessageText as NSString, theme.name) as String alert.addButton(withTitle: NSLocalizedString("Overwrite", comment: "Overwrite")) - alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel Install Theme")) + alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) alert.beginSheetModal(for: window) { result in if result == NSApplication.ModalResponse.alertFirstButtonReturn { @@ -1023,7 +1023,7 @@ extension AppDelegate { let localizedInformativeText = NSLocalizedString("The theme “%@” has been installed.", comment: "Theme installed") alert.informativeText = NSString.localizedStringWithFormat(localizedInformativeText as NSString, themeName) as String - alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK")) + alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK button")) alert.beginSheetModal(for: window) } @@ -1068,7 +1068,7 @@ extension AppDelegate { alert.messageText = NSLocalizedString("Theme Error", comment: "Theme download error") alert.informativeText = informativeText alert.addButton(withTitle: NSLocalizedString("Open Theme Folder", comment: "Open Theme Folder")) - alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK")) + alert.addButton(withTitle: NSLocalizedString("OK", comment: "OK button")) let button = alert.buttons.first button?.target = self diff --git a/Mac/CloudKitStats/CloudKitStatsToolbarView.swift b/Mac/CloudKitStats/CloudKitStatsToolbarView.swift index bfa7277b8..9796475e2 100644 --- a/Mac/CloudKitStats/CloudKitStatsToolbarView.swift +++ b/Mac/CloudKitStats/CloudKitStatsToolbarView.swift @@ -24,14 +24,14 @@ final class CloudKitStatsToolbarView: NSView { shareButton = NSButton() shareButton.bezelStyle = .rounded - shareButton.image = NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: NSLocalizedString("Share", comment: "Share button accessibility description")) + shareButton.image = NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: NSLocalizedString("Share", comment: "Share button")) shareButton.translatesAutoresizingMaskIntoConstraints = false shareButton.target = nil shareButton.action = #selector(CloudKitStatsViewController.shareStats(_:)) cleanUpButton = NSButton() cleanUpButton.bezelStyle = .rounded - cleanUpButton.title = NSLocalizedString("Clean Up", comment: "Clean Up button title") + cleanUpButton.title = NSLocalizedString("Clean Up", comment: "Clean Up button") cleanUpButton.translatesAutoresizingMaskIntoConstraints = false cleanUpButton.target = nil cleanUpButton.action = #selector(CloudKitStatsViewController.cleanUp(_:)) diff --git a/Mac/CloudKitStats/CloudKitStatsViewController.swift b/Mac/CloudKitStats/CloudKitStatsViewController.swift index d7cd80458..26643da46 100644 --- a/Mac/CloudKitStats/CloudKitStatsViewController.swift +++ b/Mac/CloudKitStats/CloudKitStatsViewController.swift @@ -103,7 +103,7 @@ extension CloudKitStatsViewController { alert.alertStyle = .warning alert.messageText = NSLocalizedString("Clean Up iCloud Records", comment: "Clean up alert title") alert.informativeText = model.cleanUpPlanIsStale ? staleCleanUpConfirmationText() : cleanUpConfirmationText(plan) - alert.addButton(withTitle: NSLocalizedString("Clean Up", comment: "Clean up alert button")) + alert.addButton(withTitle: NSLocalizedString("Clean Up", comment: "Clean Up button")) alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) guard let window = view.window else { diff --git a/Mac/CloudKitStats/Scan/CloudKitStatsScanContentView.swift b/Mac/CloudKitStats/Scan/CloudKitStatsScanContentView.swift index 9685c239f..4d02977f9 100644 --- a/Mac/CloudKitStats/Scan/CloudKitStatsScanContentView.swift +++ b/Mac/CloudKitStats/Scan/CloudKitStatsScanContentView.swift @@ -38,16 +38,16 @@ final class CloudKitStatsScanContentView: NSView { buildSectionRows(statusSectionView, rows: [ .header(NSLocalizedString("Status Records", comment: "Status records section header")), .data(labelView: NSTextField(labelWithString: NSLocalizedString("Total", comment: "Total row label")), valueLabel: statusRecordCountLabel), - .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Starred", comment: "Starred row label"), symbolName: "star.fill", color: CloudKitStatsLayout.starColor), valueLabel: starredCountLabel), - .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Unread", comment: "Unread row label"), symbolName: "circle.fill", color: .controlAccentColor, iconOffset: 0.5), valueLabel: unreadCountLabel), + .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Starred", comment: "Starred label"), symbolName: "star.fill", color: CloudKitStatsLayout.starColor), valueLabel: starredCountLabel), + .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Unread", comment: "Unread label"), symbolName: "circle.fill", color: .controlAccentColor, iconOffset: 0.5), valueLabel: unreadCountLabel), .data(labelView: NSTextField(labelWithString: NSLocalizedString("Read", comment: "Read row label")), valueLabel: readCountLabel) ]) buildSectionRows(articleSectionView, rows: [ - .header(NSLocalizedString("Article Content Records", comment: "Article content records section header")), + .header(NSLocalizedString("Article Content Records", comment: "Article content records header")), .data(labelView: NSTextField(labelWithString: NSLocalizedString("Total", comment: "Total row label")), valueLabel: totalContentCountLabel), - .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Starred", comment: "Starred row label"), symbolName: "star.fill", color: CloudKitStatsLayout.starColor), valueLabel: starredContentCountLabel), - .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Unread", comment: "Unread row label"), symbolName: "circle.fill", color: .controlAccentColor, iconOffset: 0.5), valueLabel: unreadContentCountLabel), + .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Starred", comment: "Starred label"), symbolName: "star.fill", color: CloudKitStatsLayout.starColor), valueLabel: starredContentCountLabel), + .data(labelView: CloudKitStatsLayout.makeLabelWithIcon(NSLocalizedString("Unread", comment: "Unread label"), symbolName: "circle.fill", color: .controlAccentColor, iconOffset: 0.5), valueLabel: unreadContentCountLabel), .data(labelView: NSTextField(labelWithString: NSLocalizedString("Read", comment: "Read row label")), valueLabel: readContentCountLabel) ]) diff --git a/Mac/Dinosaurs/DinosaursWindowController.swift b/Mac/Dinosaurs/DinosaursWindowController.swift index 9f483a5f1..98076545a 100644 --- a/Mac/Dinosaurs/DinosaursWindowController.swift +++ b/Mac/Dinosaurs/DinosaursWindowController.swift @@ -111,11 +111,11 @@ final class DinosaursWindowController: NSWindowController { let alert = NSAlert() alert.alertStyle = .warning if rows.count == 1, let only = rows.first { - alert.messageText = NSLocalizedString("Delete Feed", comment: "Delete feed alert title") + alert.messageText = NSLocalizedString("Delete Feed", comment: "Delete Feed") let format = NSLocalizedString("Are you sure you want to delete the feed “%@”?", comment: "Delete feed alert message") alert.informativeText = String(format: format, only.feedName) } else { - alert.messageText = NSLocalizedString("Delete Feeds", comment: "Delete feeds alert title") + alert.messageText = NSLocalizedString("Delete Feeds", comment: "Delete Feeds") let format = NSLocalizedString("Are you sure you want to delete %d feeds?", comment: "Delete feeds alert message") alert.informativeText = String(format: format, rows.count) } @@ -299,8 +299,8 @@ private extension DinosaursWindowController { controller.refreshModel() } let actionName = deletions.count == 1 - ? NSLocalizedString("Delete Feed", comment: "Undo action name") - : NSLocalizedString("Delete Feeds", comment: "Undo action name") + ? NSLocalizedString("Delete Feed", comment: "Delete Feed") + : NSLocalizedString("Delete Feeds", comment: "Delete Feeds") undoManager.setActionName(actionName) } diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index b34decfd0..06fed2191 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -821,7 +821,7 @@ extension MainWindowController: NSToolbarDelegate { return toolbarItem case .markAllAsRead: - let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + let title = NSLocalizedString("Mark All as Read", comment: "Command") return buildToolbarButton(.markAllAsRead, title, Assets.Images.markAllAsRead, "markAllAsRead:") case .toggleReadArticlesFilter: @@ -832,7 +832,7 @@ extension MainWindowController: NSToolbarDelegate { return NSTrackingSeparatorToolbarItem(identifier: .timelineTrackingSeparator, splitView: splitViewController!.splitView, dividerIndex: 1) case .markRead: - let title = NSLocalizedString("Mark Read", comment: "Mark Read") + let title = NSLocalizedString("Mark Read", comment: "command") return buildToolbarButton(.markRead, title, Assets.Images.readClosed, "toggleRead:") case .markStar: @@ -855,11 +855,11 @@ extension MainWindowController: NSToolbarDelegate { return toolbarItem case .share: - let title = NSLocalizedString("Share", comment: "Share") + let title = NSLocalizedString("Share", comment: "Share button") return buildToolbarButton(.share, title, Assets.Images.share, "toolbarShowShareMenu:") case .openInBrowser: - let title = NSLocalizedString("Open in Browser", comment: "Open in Browser") + let title = NSLocalizedString("Open in Browser", comment: "Command") return buildToolbarButton(.openInBrowser, title, Assets.Images.openInBrowser, "openArticleInBrowser:") case .articleThemeMenu: @@ -877,7 +877,7 @@ extension MainWindowController: NSToolbarDelegate { return toolbarItem case .cleanUp: - let title = NSLocalizedString("Clean Up", comment: "Clean Up") + let title = NSLocalizedString("Clean Up", comment: "Clean Up button") return buildToolbarButton(.cleanUp, title, Assets.Images.cleanUp, "cleanUp:") default: diff --git a/Mac/MainWindow/Sidebar/SidebarDeleteItemsAlert.swift b/Mac/MainWindow/Sidebar/SidebarDeleteItemsAlert.swift index 106f9337a..1fbf8f62e 100644 --- a/Mac/MainWindow/Sidebar/SidebarDeleteItemsAlert.swift +++ b/Mac/MainWindow/Sidebar/SidebarDeleteItemsAlert.swift @@ -19,7 +19,7 @@ enum SidebarDeleteItemsAlert { if nodes.count == 1 { if let folder = nodes.first?.representedObject as? Folder { - alert.messageText = NSLocalizedString("Delete Folder", comment: "Delete Folder") + alert.messageText = NSLocalizedString("Delete Folder", comment: "Command") let localizedInformativeText = NSLocalizedString("Are you sure you want to delete the “%@” folder?", comment: "Folder delete text") alert.informativeText = NSString.localizedStringWithFormat(localizedInformativeText as NSString, folder.nameForDisplay) as String } else if let sidebarItem = nodes.first?.representedObject as? SidebarItem { @@ -33,8 +33,8 @@ enum SidebarDeleteItemsAlert { alert.informativeText = NSString.localizedStringWithFormat(localizedInformativeText as NSString, nodes.count) as String } - alert.addButton(withTitle: NSLocalizedString("Delete", comment: "Delete Account")) - alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel Delete Account")) + alert.addButton(withTitle: NSLocalizedString("Delete", comment: "Delete button")) + alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) return alert } diff --git a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift index 3706c389a..1fc96befc 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift @@ -295,7 +295,7 @@ private extension SidebarViewController { func deleteMenuItem(_ objects: [Any]) -> NSMenuItem { - return menuItem(NSLocalizedString("Delete", comment: "Command"), #selector(deleteFromContextualMenu(_:)), objects, image: Assets.Images.delete) + return menuItem(NSLocalizedString("Delete", comment: "Delete button"), #selector(deleteFromContextualMenu(_:)), objects, image: Assets.Images.delete) } func renameMenuItem(_ object: Any) -> NSMenuItem { diff --git a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift index eda853717..2baaa8a2e 100644 --- a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift +++ b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift @@ -68,12 +68,12 @@ final class AccountsPreferencesViewController: NSViewController { let alert = NSAlert() alert.alertStyle = .warning - let deletePrompt = NSLocalizedString("Delete", comment: "Delete") + let deletePrompt = NSLocalizedString("Delete", comment: "Delete button") alert.messageText = "\(deletePrompt) “\(accountName)”?" alert.informativeText = NSLocalizedString("Are you sure you want to delete the account “\(accountName)”? This cannot be undone.", comment: "Delete text") - alert.addButton(withTitle: NSLocalizedString("Delete", comment: "Delete Account")) - alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel Delete Account")) + alert.addButton(withTitle: NSLocalizedString("Delete", comment: "Delete button")) + alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) guard let window = view.window else { return @@ -208,7 +208,7 @@ extension AccountsPreferencesViewController: AccountsPreferencesAddAccountDelega alert.informativeText = NSLocalizedString("A web browser will open the Feedly login for you to authorize access.", comment: "Alert informative text when adding a Feedly account and waiting for authorization from the user.") - alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel")) + alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel button")) let attachedWindow = self.view.window! diff --git a/Modules/Account/Sources/Account/Account.swift b/Modules/Account/Sources/Account/Account.swift index 6d1cb0208..1e38902bb 100644 --- a/Modules/Account/Sources/Account/Account.swift +++ b/Modules/Account/Sources/Account/Account.swift @@ -66,13 +66,13 @@ nonisolated public enum AccountType: Int, Codable, Sendable { case .newsBlur: return NSLocalizedString("NewsBlur", comment: "NewsBlur") case .freshRSS: - return NSLocalizedString("FreshRSS", comment: "FreshRSS") + return NSLocalizedString("FreshRSS", comment: "Account name") case .inoreader: - return NSLocalizedString("Inoreader", comment: "Inoreader") + return NSLocalizedString("Inoreader", comment: "Account name") case .bazQux: - return NSLocalizedString("BazQux", comment: "BazQux") + return NSLocalizedString("BazQux", comment: "Account name") case .theOldReader: - return NSLocalizedString("The Old Reader", comment: "The Old Reader") + return NSLocalizedString("The Old Reader", comment: "Account name") } } } diff --git a/Modules/RSCore/Sources/RSCore/UIKit/UIViewController+RSCore.swift b/Modules/RSCore/Sources/RSCore/UIKit/UIViewController+RSCore.swift index 6bb5d8007..f516bec9e 100644 --- a/Modules/RSCore/Sources/RSCore/UIKit/UIViewController+RSCore.swift +++ b/Modules/RSCore/Sources/RSCore/UIKit/UIViewController+RSCore.swift @@ -16,7 +16,7 @@ extension UIViewController { public func presentError(title: String, message: String, dismiss: (() -> Void)? = nil) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let dismissTitle = NSLocalizedString("OK", comment: "OK") + let dismissTitle = NSLocalizedString("OK", comment: "OK button") let dismissAction = UIAlertAction(title: dismissTitle, style: .default) { _ in dismiss?() } diff --git a/Shared/Commands/DeleteCommand.swift b/Shared/Commands/DeleteCommand.swift index 5a9d123ce..7baff9f16 100644 --- a/Shared/Commands/DeleteCommand.swift +++ b/Shared/Commands/DeleteCommand.swift @@ -244,9 +244,9 @@ final class DeleteCommand: UndoableCommand { private struct DeleteActionName { - private static let deleteFeed = NSLocalizedString("Delete Feed", comment: "command") - private static let deleteFeeds = NSLocalizedString("Delete Feeds", comment: "command") - private static let deleteFolder = NSLocalizedString("Delete Folder", comment: "command") + private static let deleteFeed = NSLocalizedString("Delete Feed", comment: "Delete Feed") + private static let deleteFeeds = NSLocalizedString("Delete Feeds", comment: "Delete Feeds") + private static let deleteFolder = NSLocalizedString("Delete Folder", comment: "Command") private static let deleteFolders = NSLocalizedString("Delete Folders", comment: "command") private static let deleteFeedsAndFolders = NSLocalizedString("Delete Feeds and Folders", comment: "command") diff --git a/Shared/Localizable.xcstrings b/Shared/Localizable.xcstrings index ad9d6cdf5..1dd1129e6 100644 --- a/Shared/Localizable.xcstrings +++ b/Shared/Localizable.xcstrings @@ -130,7 +130,7 @@ "comment" : "Automatic" }, "BazQux" : { - "comment" : "Account name\nBazQux" + "comment" : "Account name" }, "Can’t add a feed because no feed was found." : { "comment" : "Feed finder" @@ -145,10 +145,10 @@ "comment" : "Feed finder" }, "Cancel" : { - "comment" : "Cancel\nCancel button" + "comment" : "Cancel button" }, "Canceled." : { - "comment" : "Scan canceled text" + "comment" : "Scan status text when canceled" }, "Choose a location for the exported OPML file." : { "comment" : "Export OPML" @@ -166,7 +166,7 @@ "comment" : "Export Account" }, "Clean Up" : { - "comment" : "Clean Up\nClean up alert button" + "comment" : "Clean Up button" }, "Clean Up iCloud Records" : { "comment" : "Clean up alert title" @@ -202,19 +202,19 @@ }, "Copy Article URL" : { - "comment" : "Copy Article URL" + "comment" : "Command" }, "Copy Contents" : { "comment" : "Copy Contents button" }, "Copy External URL" : { - "comment" : "Copy External URL" + "comment" : "Command" }, "Copy Feed URL" : { - "comment" : "Copy Feed URL" + "comment" : "Command" }, "Copy Home Page URL" : { - "comment" : "Copy Home Page URL" + "comment" : "Command" }, "Couldn’t complete the iCloud scan because of an error:" : { "comment" : "Scan error alert title" @@ -238,19 +238,19 @@ "comment" : "Default" }, "Delete" : { - "comment" : "Delete" + "comment" : "Delete button" }, "Delete Feed" : { - "comment" : "Delete feed\ncommand" + "comment" : "Delete Feed" }, "Delete Feeds" : { - "comment" : "command" + "comment" : "Delete Feeds" }, "Delete Feeds and Folders" : { "comment" : "command" }, "Delete Folder" : { - "comment" : "Delete folder\ncommand" + "comment" : "Command" }, "Delete Folders" : { "comment" : "command" @@ -415,7 +415,7 @@ "comment" : "Folder Inspector window title" }, "FreshRSS" : { - "comment" : "Account name\nFreshRSS" + "comment" : "Account name" }, "General" : { "comment" : "Preferences" @@ -469,7 +469,7 @@ "comment" : "Cleanup phase text when completed" }, "iCloud Storage Stats" : { - "comment" : "Navigation title for iCloud stats view" + "comment" : "iCloud Storage Stats window title" }, "Icon Preview" : { "comment" : "Icon Preview" @@ -484,7 +484,7 @@ "comment" : "Import Theme" }, "Inoreader" : { - "comment" : "Account name\nInoreader" + "comment" : "Account name" }, "Inspector" : { "comment" : "Inspector window title" @@ -543,34 +543,34 @@ "comment" : "Manually" }, "Mark Above as Read" : { - "comment" : "Mark Above as Read" + "comment" : "Command" }, "Mark All as Read" : { - "comment" : "Mark All as Read" + "comment" : "Command" }, "Mark All as Read in “%@”" : { - "comment" : "Command\nMark All as Read in Feed" + "comment" : "Command" }, "Mark Article Unread" : { "comment" : "Mark Article Unread" }, "Mark as Read" : { - "comment" : "Mark as Read" + "comment" : "Command" }, "Mark As Read" : { "comment" : "Mark As Read" }, "Mark as Starred" : { - "comment" : "Mark as Starred" + "comment" : "Command" }, "Mark as Unread" : { - "comment" : "Mark as Unread" + "comment" : "Command" }, "Mark as Unstarred" : { - "comment" : "Mark as Unstarred" + "comment" : "Command" }, "Mark Below as Read" : { - "comment" : "Mark Below as Read" + "comment" : "Command" }, "Mark Read" : { "comment" : "command" @@ -622,13 +622,13 @@ "comment" : "New Article Notifications" }, "New Feed" : { - "comment" : "New Feed" + "comment" : "Command" }, "New Feed…" : { "comment" : "New Feed" }, "New Folder" : { - "comment" : "New Folder" + "comment" : "Command" }, "New Folder…" : { "comment" : "New Folder" @@ -672,16 +672,16 @@ "comment" : "Number of Lines" }, "OK" : { - "comment" : "OK" + "comment" : "OK button" }, "Open" : { "comment" : "Open" }, "Open Home Page" : { - "comment" : "Open Home Page" + "comment" : "Command" }, "Open in Browser" : { - "comment" : "Open in Browser" + "comment" : "Command" }, "Open In Browser" : { "comment" : "Open In Browser" @@ -720,13 +720,13 @@ "comment" : "Processing - Reader View" }, "Read" : { - "comment" : "Read label" + "comment" : "Read row label" }, "Read Articles Filter" : { "comment" : "Read Articles Filter" }, "Read Content Deleted" : { - "comment" : "Read content deleted label" + "comment" : "Cleanup stat row label" }, "read content record" : { "comment" : "Singular label for read content records" @@ -753,7 +753,7 @@ "comment" : "Remove Account" }, "Rename" : { - "comment" : "Rename" + "comment" : "Command" }, "Rename “%@”" : { "comment" : "Rename feed" @@ -762,10 +762,10 @@ "comment" : "Rename sheet" }, "Return to Previous Scan Results" : { - "comment" : "Return to scan results button" + "comment" : "Return to previous scan results button" }, "Scan completed." : { - "comment" : "Scan completed text" + "comment" : "Scan status text when completed" }, "Scan failed." : { "comment" : "Scan failed text" @@ -777,7 +777,7 @@ "comment" : "Spinner accessibility label" }, "Scanning iCloud storage" : { - "comment" : "Scan status text" + "comment" : "Scan status text while fetching" }, "Search" : { "comment" : "Search" @@ -828,7 +828,7 @@ "comment" : "Self hosted Account" }, "Share" : { - "comment" : "Share" + "comment" : "Share button" }, "Share Stats" : { "comment" : "Share stats menu item" @@ -909,10 +909,10 @@ "comment" : "Star Article" }, "Starred" : { - "comment" : "Accessibility announcement\nStarred article for accessibility\nStarred label\nStarred pseudo-feed title" + "comment" : "Starred label" }, "Status Records" : { - "comment" : "Status records header" + "comment" : "Status records section header" }, "Sync content of unread articles" : { @@ -931,7 +931,7 @@ }, "The Old Reader" : { - "comment" : "Account name\nThe Old Reader" + "comment" : "Account name" }, "The theme “%@” already exists. Overwrite it?" : { "comment" : "Overwrite theme" @@ -1036,10 +1036,10 @@ "comment" : "Unread label for accessibility" }, "Unread" : { - "comment" : "Unread\nUnread label" + "comment" : "Unread label" }, "Unread Content Deleted" : { - "comment" : "Unread content deleted label" + "comment" : "Cleanup stat row label" }, "unread content record" : { "comment" : "Singular label for unread content records" diff --git a/Shared/SmartFeeds/StarredFeedDelegate.swift b/Shared/SmartFeeds/StarredFeedDelegate.swift index ec33c33aa..05520de53 100644 --- a/Shared/SmartFeeds/StarredFeedDelegate.swift +++ b/Shared/SmartFeeds/StarredFeedDelegate.swift @@ -19,7 +19,7 @@ import Images return SidebarItemIdentifier.smartFeed(String(describing: StarredFeedDelegate.self)) } - let nameForDisplay = NSLocalizedString("Starred", comment: "Starred pseudo-feed title") + let nameForDisplay = NSLocalizedString("Starred", comment: "Starred label") let fetchType: FetchType = .starred(nil) var smallIcon: IconImage? { Assets.Images.starredFeed diff --git a/Shared/UserNotifications/UserNotificationManager.swift b/Shared/UserNotifications/UserNotificationManager.swift index 579af43c7..79ac7aafe 100644 --- a/Shared/UserNotifications/UserNotificationManager.swift +++ b/Shared/UserNotifications/UserNotificationManager.swift @@ -104,8 +104,8 @@ private extension UserNotificationManager { } func registerCategoriesAndActions() { - let readAction = UNNotificationAction(identifier: ActionIdentifier.markAsRead, title: NSLocalizedString("Mark as Read", comment: "Mark as Read"), options: []) - let starredAction = UNNotificationAction(identifier: ActionIdentifier.markAsStarred, title: NSLocalizedString("Mark as Starred", comment: "Mark as Starred"), options: []) + let readAction = UNNotificationAction(identifier: ActionIdentifier.markAsRead, title: NSLocalizedString("Mark as Read", comment: "Command"), options: []) + let starredAction = UNNotificationAction(identifier: ActionIdentifier.markAsStarred, title: NSLocalizedString("Mark as Starred", comment: "Command"), options: []) let openAction = UNNotificationAction(identifier: ActionIdentifier.openArticle, title: NSLocalizedString("Open", comment: "Open"), options: [.foreground]) let newArticleCategory = UNNotificationCategory(identifier: Self.notificationCategory, diff --git a/iOS/Account/ReaderAPIAccountViewController.swift b/iOS/Account/ReaderAPIAccountViewController.swift index 574fd8ee8..f929abd93 100644 --- a/iOS/Account/ReaderAPIAccountViewController.swift +++ b/iOS/Account/ReaderAPIAccountViewController.swift @@ -49,14 +49,14 @@ final class ReaderAPIAccountViewController: UITableViewController { if let unwrappedAccountType = accountType { switch unwrappedAccountType { case .freshRSS: - title = NSLocalizedString("FreshRSS", comment: "FreshRSS") + title = NSLocalizedString("FreshRSS", comment: "Account name") apiURLTextField.placeholder = NSLocalizedString("API URL: https://fresh.rss.net/api/greader.php", comment: "FreshRSS API Helper") case .inoreader: - title = NSLocalizedString("Inoreader", comment: "Inoreader") + title = NSLocalizedString("Inoreader", comment: "Account name") case .bazQux: - title = NSLocalizedString("BazQux", comment: "BazQux") + title = NSLocalizedString("BazQux", comment: "Account name") case .theOldReader: - title = NSLocalizedString("The Old Reader", comment: "The Old Reader") + title = NSLocalizedString("The Old Reader", comment: "Account name") default: title = "" } diff --git a/iOS/Article/OpenInSafariActivity.swift b/iOS/Article/OpenInSafariActivity.swift index 6e456be8a..1057caca5 100644 --- a/iOS/Article/OpenInSafariActivity.swift +++ b/iOS/Article/OpenInSafariActivity.swift @@ -13,7 +13,7 @@ final class OpenInBrowserActivity: UIActivity { private var activityItems: [Any]? override var activityTitle: String? { - return NSLocalizedString("Open in Browser", comment: "Open in Browser") + return NSLocalizedString("Open in Browser", comment: "Command") } override var activityImage: UIImage? { diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 46dd7552b..1dee7125d 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -826,7 +826,7 @@ private extension WebViewController { func toggleReadAction() -> UIAction? { guard let article = article, !article.status.read || article.isAvailableToMarkUnread else { return nil } - let title = article.status.read ? NSLocalizedString("Mark as Unread", comment: "Mark as Unread") : NSLocalizedString("Mark as Read", comment: "Mark as Read") + let title = article.status.read ? NSLocalizedString("Mark as Unread", comment: "Command") : NSLocalizedString("Mark as Read", comment: "Command") let readImage = article.status.read ? Assets.Images.circleClosed : Assets.Images.circleOpen return UIAction(title: title, image: readImage) { [weak self] _ in self?.coordinator.toggleReadForCurrentArticle() @@ -835,7 +835,7 @@ private extension WebViewController { func toggleStarredAction() -> UIAction { let starred = article?.status.starred ?? false - let title = starred ? NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") : NSLocalizedString("Mark as Starred", comment: "Mark as Starred") + let title = starred ? NSLocalizedString("Mark as Unstarred", comment: "Command") : NSLocalizedString("Mark as Starred", comment: "Command") let starredImage = starred ? Assets.Images.starOpen : Assets.Images.starClosed return UIAction(title: title, image: starredImage) { [weak self] _ in self?.coordinator.toggleStarredForCurrentArticle() @@ -860,7 +860,7 @@ private extension WebViewController { } func shareAction() -> UIAction { - let title = NSLocalizedString("Share", comment: "Share") + let title = NSLocalizedString("Share", comment: "Share button") return UIAction(title: title, image: Assets.Images.share) { [weak self] _ in self?.showActivityDialog() } diff --git a/iOS/Inspector/AccountInspectorViewController.swift b/iOS/Inspector/AccountInspectorViewController.swift index 4e3113d0b..c7d0e5de6 100644 --- a/iOS/Inspector/AccountInspectorViewController.swift +++ b/iOS/Inspector/AccountInspectorViewController.swift @@ -108,7 +108,7 @@ final class AccountInspectorViewController: UITableViewController { } }() let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) alertController.addAction(cancelAction) diff --git a/iOS/Inspector/FeedInspectorViewController.swift b/iOS/Inspector/FeedInspectorViewController.swift index c294861be..9fc31267e 100644 --- a/iOS/Inspector/FeedInspectorViewController.swift +++ b/iOS/Inspector/FeedInspectorViewController.swift @@ -213,7 +213,7 @@ extension FeedInspectorViewController { func notificationUpdateErrorAlert() -> UIAlertController { let alert = UIAlertController(title: NSLocalizedString("Enable Notifications", comment: "Notifications"), message: NSLocalizedString("Notifications need to be enabled in the Settings app.", comment: "Notifications need to be enabled in the Settings app."), preferredStyle: .alert) - let openSettings = UIAlertAction(title: NSLocalizedString("Open Settings", comment: "Open Settings"), style: .default) { _ in + let openSettings = UIAlertAction(title: NSLocalizedString("Open Settings", comment: "Open Settings button"), style: .default) { _ in UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [UIApplication.OpenExternalURLOptionsKey.universalLinksOnly: false], completionHandler: nil) } let dismiss = UIAlertAction(title: NSLocalizedString("Dismiss", comment: "Dismiss"), style: .cancel, handler: nil) diff --git a/iOS/KeyboardManager.swift b/iOS/KeyboardManager.swift index 96bbbdd6a..1e203d029 100644 --- a/iOS/KeyboardManager.swift +++ b/iOS/KeyboardManager.swift @@ -129,10 +129,10 @@ private extension KeyboardManager { static func globalAuxilaryKeyCommands() -> [UIKeyCommand] { var keys = [UIKeyCommand]() - let addNewFeedTitle = NSLocalizedString("New Feed", comment: "New Feed") + let addNewFeedTitle = NSLocalizedString("New Feed", comment: "Command") keys.append(KeyboardManager.createKeyCommand(title: addNewFeedTitle, action: "addNewFeed:", input: "n", modifiers: [.command])) - let addNewFolderTitle = NSLocalizedString("New Folder", comment: "New Folder") + let addNewFolderTitle = NSLocalizedString("New Folder", comment: "Command") keys.append(KeyboardManager.createKeyCommand(title: addNewFolderTitle, action: "addNewFolder:", input: "n", modifiers: [.command, .shift])) let refreshTitle = NSLocalizedString("Refresh", comment: "Refresh") @@ -156,10 +156,10 @@ private extension KeyboardManager { let articleSearchTitle = NSLocalizedString("Article Search", comment: "Article Search") keys.append(KeyboardManager.createKeyCommand(title: articleSearchTitle, action: "articleSearch:", input: "f", modifiers: [.command, .alternate])) - let markAllAsReadTitle = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + let markAllAsReadTitle = NSLocalizedString("Mark All as Read", comment: "Command") keys.append(KeyboardManager.createKeyCommand(title: markAllAsReadTitle, action: "markAllAsRead:", input: "k", modifiers: [.command])) - let cleanUp = NSLocalizedString("Clean Up", comment: "Clean Up") + let cleanUp = NSLocalizedString("Clean Up", comment: "Clean Up button") keys.append(KeyboardManager.createKeyCommand(title: cleanUp, action: "cleanUp:", input: "'", modifiers: [.command])) let toggleReadFeedsFilter = NSLocalizedString("Toggle Read Feeds Filter", comment: "Toggle Read Feeds Filter") @@ -195,10 +195,10 @@ private extension KeyboardManager { let toggleReadTitle = NSLocalizedString("Toggle Read Status", comment: "Toggle Read Status") keys.append(KeyboardManager.createKeyCommand(title: toggleReadTitle, action: "toggleRead:", input: "u", modifiers: [.command, .shift])) - let markAboveAsReadTitle = NSLocalizedString("Mark Above as Read", comment: "Mark Above as Read") + let markAboveAsReadTitle = NSLocalizedString("Mark Above as Read", comment: "Command") keys.append(KeyboardManager.createKeyCommand(title: markAboveAsReadTitle, action: "markAboveAsRead:", input: "k", modifiers: [.command, .control])) - let markBelowAsReadTitle = NSLocalizedString("Mark Below as Read", comment: "Mark Below as Read") + let markBelowAsReadTitle = NSLocalizedString("Mark Below as Read", comment: "Command") keys.append(KeyboardManager.createKeyCommand(title: markBelowAsReadTitle, action: "markBelowAsRead:", input: "k", modifiers: [.command, .shift])) let toggleStarredTitle = NSLocalizedString("Toggle Starred Status", comment: "Toggle Starred Status") diff --git a/iOS/MainFeed/MainFeedCollectionViewController.swift b/iOS/MainFeed/MainFeedCollectionViewController.swift index 1b2082b22..3f804167d 100644 --- a/iOS/MainFeed/MainFeedCollectionViewController.swift +++ b/iOS/MainFeed/MainFeedCollectionViewController.swift @@ -168,7 +168,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab var actions = [UIContextualAction]() // Set up the delete action - let deleteTitle = NSLocalizedString("Delete", comment: "Delete") + let deleteTitle = NSLocalizedString("Delete", comment: "Delete button") let deleteAction = UIContextualAction(style: .destructive, title: nil) { [weak self] _, _, completion in self?.delete(indexPath: indexPath) completion(true) @@ -179,7 +179,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab actions.append(deleteAction) // Set up the rename action - let renameTitle = NSLocalizedString("Rename", comment: "Rename") + let renameTitle = NSLocalizedString("Rename", comment: "Command") let renameAction = UIContextualAction(style: .normal, title: nil) { [weak self] _, _, completion in self?.rename(indexPath: indexPath) completion(true) @@ -221,7 +221,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab alert.addAction(action) } - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel) { _ in completion(true) }) @@ -452,7 +452,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab return } - let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + let title = NSLocalizedString("Mark All as Read", comment: "Command") MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in self?.coordinator.markAllAsReadInTimeline() } @@ -789,7 +789,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab @IBAction func add(_ sender: UIBarButtonItem) { let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) let addFeedActionTitle = NSLocalizedString("Add Feed", comment: "Add Feed") @@ -1013,7 +1013,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Open Home Page", comment: "Open Home Page") + let title = NSLocalizedString("Open Home Page", comment: "Command") let action = UIAction(title: title, image: Assets.Images.safari) { _ in UIApplication.shared.open(url, options: [:]) } @@ -1027,7 +1027,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Open Home Page", comment: "Open Home Page") + let title = NSLocalizedString("Open Home Page", comment: "Command") let action = UIAlertAction(title: title, style: .default) { _ in UIApplication.shared.open(url, options: [:]) completion(true) @@ -1041,7 +1041,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL") + let title = NSLocalizedString("Copy Feed URL", comment: "Command") let action = UIAction(title: title, image: Assets.Images.copy) { _ in UIPasteboard.general.url = url } @@ -1054,7 +1054,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL") + let title = NSLocalizedString("Copy Feed URL", comment: "Command") let action = UIAlertAction(title: title, style: .default) { _ in UIPasteboard.general.url = url completion(true) @@ -1069,7 +1069,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL") + let title = NSLocalizedString("Copy Home Page URL", comment: "Command") let action = UIAction(title: title, image: Assets.Images.copy) { _ in UIPasteboard.general.url = url } @@ -1083,7 +1083,7 @@ extension MainFeedCollectionViewController { return nil } - let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL") + let title = NSLocalizedString("Copy Home Page URL", comment: "Command") let action = UIAlertAction(title: title, style: .default) { _ in UIPasteboard.general.url = url completion(true) @@ -1114,7 +1114,7 @@ extension MainFeedCollectionViewController { } func deleteAction(indexPath: IndexPath) -> UIAction { - let title = NSLocalizedString("Delete", comment: "Delete") + let title = NSLocalizedString("Delete", comment: "Delete button") let action = UIAction(title: title, image: Assets.Images.trash, attributes: .destructive) { [weak self] _ in self?.delete(indexPath: indexPath) @@ -1123,7 +1123,7 @@ extension MainFeedCollectionViewController { } func renameAction(indexPath: IndexPath) -> UIAction { - let title = NSLocalizedString("Rename", comment: "Rename") + let title = NSLocalizedString("Rename", comment: "Command") let action = UIAction(title: title, image: Assets.Images.edit) { [weak self] _ in self?.rename(indexPath: indexPath) } @@ -1230,10 +1230,10 @@ extension MainFeedCollectionViewController { let alertController = UIAlertController(title: title, message: nil, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) - let renameTitle = NSLocalizedString("Rename", comment: "Rename") + let renameTitle = NSLocalizedString("Rename", comment: "Command") let renameAction = UIAlertAction(title: renameTitle, style: .default) { [weak self] _ in guard let name = alertController.textFields?[0].text, !name.isEmpty else { @@ -1285,21 +1285,21 @@ extension MainFeedCollectionViewController { let title: String let message: String if sidebarItem is Folder { - title = NSLocalizedString("Delete Folder", comment: "Delete folder") + title = NSLocalizedString("Delete Folder", comment: "Command") let localizedInformativeText = NSLocalizedString("Are you sure you want to delete the “%@” folder?", comment: "Folder delete text") message = NSString.localizedStringWithFormat(localizedInformativeText as NSString, sidebarItem.nameForDisplay) as String } else { - title = NSLocalizedString("Delete Feed", comment: "Delete feed") + title = NSLocalizedString("Delete Feed", comment: "Delete Feed") let localizedInformativeText = NSLocalizedString("Are you sure you want to delete the “%@” feed?", comment: "Feed delete text") message = NSString.localizedStringWithFormat(localizedInformativeText as NSString, sidebarItem.nameForDisplay) as String } let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) - let deleteTitle = NSLocalizedString("Delete", comment: "Delete") + let deleteTitle = NSLocalizedString("Delete", comment: "Delete button") let deleteAction = UIAlertAction(title: deleteTitle, style: .destructive) { [weak self] _ in self?.performDelete(indexPath: indexPath) } diff --git a/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift b/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift index c3e961a6e..774c6069a 100644 --- a/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift +++ b/iOS/MainTimeline/Cells/MainTimelineCollectionViewCell.swift @@ -119,8 +119,8 @@ class MainTimelineCollectionViewCell: UICollectionViewCell { } private func updateAccessibilityLabel() { - let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Starred article for accessibility")), " : "" - let unreadStatus = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread")), " + let starredStatus = cellData.starred ? "\(NSLocalizedString("Starred", comment: "Starred label")), " : "" + let unreadStatus = cellData.read ? "" : "\(NSLocalizedString("Unread", comment: "Unread label")), " let label = starredStatus + unreadStatus + "\(cellData.feedName), \(cellData.title), \(cellData.summary), \(cellData.dateString)" accessibilityLabel = label } diff --git a/iOS/MainTimeline/MainTimelineModernViewController.swift b/iOS/MainTimeline/MainTimelineModernViewController.swift index 8933b200b..cb5275029 100644 --- a/iOS/MainTimeline/MainTimelineModernViewController.swift +++ b/iOS/MainTimeline/MainTimelineModernViewController.swift @@ -464,7 +464,7 @@ final class MainTimelineModernViewController: UIViewController, UndoableCommandR } @IBAction func markAllAsRead(_ sender: Any?) { - let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + let title = NSLocalizedString("Mark All as Read", comment: "Command") if let source = sender as? UIBarButtonItem { MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: source) { [weak self] in @@ -700,7 +700,7 @@ private extension MainTimelineModernViewController { // doesn't lag behind user actions. let announcement = article.status.starred ? NSLocalizedString("Unstarred", comment: "Accessibility announcement") : - NSLocalizedString("Starred", comment: "Accessibility announcement") + NSLocalizedString("Starred", comment: "Starred label") UIAccessibility.post(notification: .announcement, argument: announcement) /// The call to `toggleStar` is delayed in order to allow @@ -753,7 +753,7 @@ private extension MainTimelineModernViewController { alert.addAction(action) } - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel) { _ in completion(true) }) @@ -785,8 +785,8 @@ private extension MainTimelineModernViewController { // Set up the read action let readTitle = article.status.read ? - NSLocalizedString("Mark as Unread", comment: "Mark as Unread") : - NSLocalizedString("Mark as Read", comment: "Mark as Read") + NSLocalizedString("Mark as Unread", comment: "Command") : + NSLocalizedString("Mark as Read", comment: "Command") let readAction = UIContextualAction(style: .normal, title: readTitle) { [weak self] _, _, completion in @@ -1124,8 +1124,8 @@ extension MainTimelineModernViewController { guard !article.status.read || article.isAvailableToMarkUnread else { return nil } let title = article.status.read ? - NSLocalizedString("Mark as Unread", comment: "Mark as Unread") : - NSLocalizedString("Mark as Read", comment: "Mark as Read") + NSLocalizedString("Mark as Unread", comment: "Command") : + NSLocalizedString("Mark as Read", comment: "Command") let image = article.status.read ? Assets.Images.circleClosed : Assets.Images.circleOpen let action = UIAction(title: title, image: image) { [weak self] _ in @@ -1152,8 +1152,8 @@ extension MainTimelineModernViewController { func toggleArticleStarStatusAction(_ article: Article) -> UIAction { let title = article.status.starred ? - NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") : - NSLocalizedString("Mark as Starred", comment: "Mark as Starred") + NSLocalizedString("Mark as Unstarred", comment: "Command") : + NSLocalizedString("Mark as Starred", comment: "Command") let image = article.status.starred ? Assets.Images.starOpen : Assets.Images.starClosed let action = UIAction(title: title, image: image) { [weak self] _ in @@ -1161,7 +1161,7 @@ extension MainTimelineModernViewController { // doesn't lag behind user actions. let announcement = article.status.starred ? NSLocalizedString("Unstarred", comment: "Accessibility announcement") : - NSLocalizedString("Starred", comment: "Accessibility announcement") + NSLocalizedString("Starred", comment: "Starred label") UIAccessibility.post(notification: .announcement, argument: announcement) DispatchQueue.main.asyncAfter(wallDeadline: .now() + 1.0) { @@ -1187,7 +1187,7 @@ extension MainTimelineModernViewController { return nil } - let title = NSLocalizedString("Mark Above as Read", comment: "Mark Above as Read") + let title = NSLocalizedString("Mark Above as Read", comment: "Command") let image = Assets.Images.markAboveAsRead let action = UIAction(title: title, image: image) { [weak self] _ in MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in @@ -1212,7 +1212,7 @@ extension MainTimelineModernViewController { return nil } - let title = NSLocalizedString("Mark Below as Read", comment: "Mark Below as Read") + let title = NSLocalizedString("Mark Below as Read", comment: "Command") let image = Assets.Images.markBelowAsRead let action = UIAction(title: title, image: image) { [weak self] _ in MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in @@ -1227,7 +1227,7 @@ extension MainTimelineModernViewController { return nil } - let title = NSLocalizedString("Mark Above as Read", comment: "Mark Above as Read") + let title = NSLocalizedString("Mark Above as Read", comment: "Command") let cancel = { completion(true) } @@ -1246,7 +1246,7 @@ extension MainTimelineModernViewController { return nil } - let title = NSLocalizedString("Mark Below as Read", comment: "Mark Below as Read") + let title = NSLocalizedString("Mark Below as Read", comment: "Command") let cancel = { completion(true) } @@ -1331,7 +1331,7 @@ extension MainTimelineModernViewController { return nil } - let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Mark All as Read in Feed") + let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command") let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, feed.nameForDisplay) as String let cancel = { completion(true) @@ -1348,7 +1348,7 @@ extension MainTimelineModernViewController { func copyArticleURLAction(_ article: Article) -> UIAction? { guard let url = article.preferredURL else { return nil } - let title = NSLocalizedString("Copy Article URL", comment: "Copy Article URL") + let title = NSLocalizedString("Copy Article URL", comment: "Command") let action = UIAction(title: title, image: Assets.Images.copy) { _ in UIPasteboard.general.url = url } @@ -1357,7 +1357,7 @@ extension MainTimelineModernViewController { func copyExternalURLAction(_ article: Article) -> UIAction? { guard let externalLink = article.externalLink, externalLink != article.preferredLink, let url = URL(string: externalLink) else { return nil } - let title = NSLocalizedString("Copy External URL", comment: "Copy External URL") + let title = NSLocalizedString("Copy External URL", comment: "Command") let action = UIAction(title: title, image: Assets.Images.copy) { _ in UIPasteboard.general.url = url } @@ -1373,7 +1373,7 @@ extension MainTimelineModernViewController { guard article.preferredURL != nil else { return nil } - let title = NSLocalizedString("Open in Browser", comment: "Open in Browser") + let title = NSLocalizedString("Open in Browser", comment: "Command") let action = UIAction(title: title, image: Assets.Images.safari) { [weak self] _ in self?.showBrowserForArticle(article) } @@ -1385,7 +1385,7 @@ extension MainTimelineModernViewController { return nil } - let title = NSLocalizedString("Open in Browser", comment: "Open in Browser") + let title = NSLocalizedString("Open in Browser", comment: "Command") let action = UIAlertAction(title: title, style: .default) { [weak self] _ in self?.showBrowserForArticle(article) completion(true) @@ -1408,7 +1408,7 @@ extension MainTimelineModernViewController { func shareAction(_ article: Article, indexPath: IndexPath) -> UIAction? { guard let url = article.preferredURL else { return nil } - let title = NSLocalizedString("Share", comment: "Share") + let title = NSLocalizedString("Share", comment: "Share button") let action = UIAction(title: title, image: Assets.Images.share) { [weak self] _ in self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title) } @@ -1417,7 +1417,7 @@ extension MainTimelineModernViewController { func shareAlertAction(_ article: Article, indexPath: IndexPath, completion: @escaping (Bool) -> Void) -> UIAlertAction? { guard let url = article.preferredURL else { return nil } - let title = NSLocalizedString("Share", comment: "Share") + let title = NSLocalizedString("Share", comment: "Share button") let action = UIAlertAction(title: title, style: .default) { [weak self] _ in completion(true) self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title) diff --git a/iOS/MainTimeline/MarkAsReadAlertController.swift b/iOS/MainTimeline/MarkAsReadAlertController.swift index c6107c4da..f2478e15e 100644 --- a/iOS/MainTimeline/MarkAsReadAlertController.swift +++ b/iOS/MainTimeline/MarkAsReadAlertController.swift @@ -47,8 +47,8 @@ extension UIBarButtonItem: MarkAsReadAlertControllerSourceType {} let title = NSLocalizedString("Mark As Read", comment: "Mark As Read") let message = NSLocalizedString("You can turn this confirmation off in Settings.", comment: "You can turn this confirmation off in Settings.") - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") - let settingsTitle = NSLocalizedString("Open Settings", comment: "Open Settings") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") + let settingsTitle = NSLocalizedString("Open Settings", comment: "Open Settings button") let alertController = UIAlertController(title: title, message: message, preferredStyle: .actionSheet) let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) { _ in diff --git a/iOS/Settings/ArticleThemeImporter.swift b/iOS/Settings/ArticleThemeImporter.swift index 1142f8368..38f49efa7 100644 --- a/iOS/Settings/ArticleThemeImporter.swift +++ b/iOS/Settings/ArticleThemeImporter.swift @@ -21,7 +21,7 @@ import UIKit let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) if let websiteURL = URL(string: theme.creatorHomePage) { @@ -58,7 +58,7 @@ import UIKit let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) let overwriteAction = UIAlertAction(title: NSLocalizedString("Overwrite", comment: "Overwrite"), style: .default) { _ in diff --git a/iOS/Settings/ArticleThemesTableViewController.swift b/iOS/Settings/ArticleThemesTableViewController.swift index 0f5fc11e1..9c81b663d 100644 --- a/iOS/Settings/ArticleThemesTableViewController.swift +++ b/iOS/Settings/ArticleThemesTableViewController.swift @@ -79,7 +79,7 @@ final class ArticleThemesTableViewController: UITableViewController { let theme = ArticleThemesManager.shared.articleThemeWithThemeName(themeName), !theme.isAppTheme else { return nil } - let deleteTitle = NSLocalizedString("Delete", comment: "Delete") + let deleteTitle = NSLocalizedString("Delete", comment: "Delete button") let deleteAction = UIContextualAction(style: .normal, title: deleteTitle) { [weak self] (_, _, completion) in let title = NSLocalizedString("Delete Theme?", comment: "Delete Theme") @@ -88,13 +88,13 @@ final class ArticleThemesTableViewController: UITableViewController { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) { _ in completion(true) } alertController.addAction(cancelAction) - let deleteTitle = NSLocalizedString("Delete", comment: "Delete") + let deleteTitle = NSLocalizedString("Delete", comment: "Delete button") let deleteAction = UIAlertAction(title: deleteTitle, style: .destructive) { _ in ArticleThemesManager.shared.deleteTheme(themeName: themeName) completion(true) diff --git a/iOS/Settings/CloudKitStatsView.swift b/iOS/Settings/CloudKitStatsView.swift index e0a527354..ce2239ee4 100644 --- a/iOS/Settings/CloudKitStatsView.swift +++ b/iOS/Settings/CloudKitStatsView.swift @@ -51,7 +51,7 @@ struct CloudKitStatsView: View { } } } - .navigationTitle(NSLocalizedString("iCloud Storage Stats", comment: "Navigation title for iCloud stats view")) + .navigationTitle(NSLocalizedString("iCloud Storage Stats", comment: "iCloud Storage Stats window title")) .toolbar { ToolbarItem(placement: .topBarTrailing) { if model.fetchStatus.isFetching { @@ -78,7 +78,7 @@ struct CloudKitStatsView: View { } } .alert(NSLocalizedString("Clean Up iCloud Records", comment: "Clean up alert title"), isPresented: $showCleanUpConfirmation) { - Button(NSLocalizedString("Clean Up", comment: "Clean up alert button"), role: .destructive) { + Button(NSLocalizedString("Clean Up", comment: "Clean Up button"), role: .destructive) { model.cleanUp() } Button(NSLocalizedString("Cancel", comment: "Cancel button"), role: .cancel) { @@ -115,7 +115,7 @@ struct CloudKitStatsView: View { HStack(spacing: 6) { ProgressView() .controlSize(.small) - Text(NSLocalizedString("Scanning iCloud storage", comment: "Scan status text")) + Text(NSLocalizedString("Scanning iCloud storage", comment: "Scan status text while fetching")) .foregroundStyle(.secondary) } .id("fetching") @@ -123,7 +123,7 @@ struct CloudKitStatsView: View { HStack(spacing: 4) { Image(systemName: "checkmark.circle.fill") .foregroundStyle(.green) - Text(NSLocalizedString("Scan completed.", comment: "Scan completed text")) + Text(NSLocalizedString("Scan completed.", comment: "Scan status text when completed")) .foregroundStyle(.secondary) Spacer() Button(NSLocalizedString("Refresh", comment: "Refresh button")) { @@ -131,7 +131,7 @@ struct CloudKitStatsView: View { } } case .canceled: - statusRow(NSLocalizedString("Canceled.", comment: "Scan canceled text")) + statusRow(NSLocalizedString("Canceled.", comment: "Scan status text when canceled")) case .error: statusRow(NSLocalizedString("Scan failed.", comment: "Scan failed text")) } @@ -140,10 +140,10 @@ struct CloudKitStatsView: View { private var statusRecordsSection: some View { Section { - statsRow(NSLocalizedString("Status Records", comment: "Status records header"), model.stats.statusCount, isHeader: true) + statsRow(NSLocalizedString("Status Records", comment: "Status records section header"), model.stats.statusCount, isHeader: true) iconStatsRow(NSLocalizedString("Starred", comment: "Starred label"), systemImage: "star.fill", iconColor: .yellow, model.stats.starredStatusCount, iconBaselineOffset: 1) iconStatsRow(NSLocalizedString("Unread", comment: "Unread label"), systemImage: "circle.fill", iconColor: .accentColor, model.stats.unreadStatusCount) - statsRow(NSLocalizedString("Read", comment: "Read label"), model.stats.readStatusCount) + statsRow(NSLocalizedString("Read", comment: "Read row label"), model.stats.readStatusCount) } } @@ -161,7 +161,7 @@ struct CloudKitStatsView: View { statsRow(NSLocalizedString("Article Content Records", comment: "Article content records header"), model.stats.articleCount, isHeader: true) iconStatsRow(NSLocalizedString("Starred", comment: "Starred label"), systemImage: "star.fill", iconColor: .yellow, model.stats.starredArticleCount, iconBaselineOffset: 1) iconStatsRow(NSLocalizedString("Unread", comment: "Unread label"), systemImage: "circle.fill", iconColor: .accentColor, model.stats.unreadArticleCount, isWarning: !syncUnreadContent) - statsRow(NSLocalizedString("Read", comment: "Read label"), model.stats.readArticleCount, isWarning: true) + statsRow(NSLocalizedString("Read", comment: "Read row label"), model.stats.readArticleCount, isWarning: true) } } @@ -197,10 +197,10 @@ struct CloudKitStatsView: View { if let progress = model.cleanUpStatus.progress { Section { if progress.readContentDeleted > 0 || progress.phase == .deletingReadContent { - statsRow(NSLocalizedString("Read Content Deleted", comment: "Read content deleted label"), progress.readContentDeleted) + statsRow(NSLocalizedString("Read Content Deleted", comment: "Cleanup stat row label"), progress.readContentDeleted) } if progress.unreadContentDeleted > 0 || progress.phase == .deletingUnreadContent { - statsRow(NSLocalizedString("Unread Content Deleted", comment: "Unread content deleted label"), progress.unreadContentDeleted) + statsRow(NSLocalizedString("Unread Content Deleted", comment: "Cleanup stat row label"), progress.unreadContentDeleted) } } } @@ -209,7 +209,7 @@ struct CloudKitStatsView: View { @ViewBuilder private var cleanUpNavigationSection: some View { if model.cleanUpStatus.isCompleted || model.cleanUpStatus.isCanceled { Section { - Button(NSLocalizedString("Return to Previous Scan Results", comment: "Return to scan results button")) { + Button(NSLocalizedString("Return to Previous Scan Results", comment: "Return to previous scan results button")) { withAnimation(.easeInOut(duration: 0.25)) { model.cleanUpStatus = .idle } diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 5c55d85a8..ea38f6349 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -475,7 +475,7 @@ private extension SettingsViewController { alert.addAction(action) } - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) self.present(alert, animated: true) @@ -531,7 +531,7 @@ private extension SettingsViewController { alert.addAction(action) } - let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel button") alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel)) self.present(alert, animated: true) diff --git a/iOS/UIKit Extensions/UIViewController+Extras.swift b/iOS/UIKit Extensions/UIViewController+Extras.swift index f6a853188..72aec3e0c 100644 --- a/iOS/UIKit Extensions/UIViewController+Extras.swift +++ b/iOS/UIKit Extensions/UIViewController+Extras.swift @@ -85,7 +85,7 @@ private extension UIViewController { } - let dismissTitle = NSLocalizedString("OK", comment: "OK") + let dismissTitle = NSLocalizedString("OK", comment: "OK button") let dismissAction = UIAlertAction(title: dismissTitle, style: .default) { _ in dismiss?() }