mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Interim commit wth .based localisations
This commit is contained in:
@@ -17,7 +17,7 @@ final class SmartFeedsController: DisplayNameProvider, ContainerIdentifiable {
|
||||
}
|
||||
|
||||
public static let shared = SmartFeedsController()
|
||||
let nameForDisplay = NSLocalizedString("Smart Feeds", comment: "Smart Feeds group title")
|
||||
let nameForDisplay = NSLocalizedString("smartfeeds.title", comment: "Smart Feeds group title")
|
||||
|
||||
var smartFeeds = [Feed]()
|
||||
let todayFeed = SmartFeed(delegate: TodayFeedDelegate())
|
||||
|
||||
@@ -20,7 +20,7 @@ struct StarredFeedDelegate: SmartFeedDelegate {
|
||||
return FeedIdentifier.smartFeed(String(describing: StarredFeedDelegate.self))
|
||||
}
|
||||
|
||||
let nameForDisplay = NSLocalizedString("Starred", comment: "Starred pseudo-feed title")
|
||||
let nameForDisplay = NSLocalizedString("smartfeed.title.starred", comment: "Starred pseudo-feed title")
|
||||
let fetchType: FetchType = .starred(nil)
|
||||
var smallIcon: IconImage? {
|
||||
return AppAssets.starredFeedImage
|
||||
|
||||
@@ -18,7 +18,7 @@ struct TodayFeedDelegate: SmartFeedDelegate {
|
||||
return FeedIdentifier.smartFeed(String(describing: TodayFeedDelegate.self))
|
||||
}
|
||||
|
||||
let nameForDisplay = NSLocalizedString("Today", comment: "Today pseudo-feed title")
|
||||
let nameForDisplay = NSLocalizedString("smartfeed.title.today", comment: "Today pseudo-feed title")
|
||||
let fetchType = FetchType.today(nil)
|
||||
var smallIcon: IconImage? {
|
||||
return AppAssets.todayFeedImage
|
||||
|
||||
@@ -30,7 +30,7 @@ final class UnreadFeed: PseudoFeed {
|
||||
return FeedIdentifier.smartFeed(String(describing: UnreadFeed.self))
|
||||
}
|
||||
|
||||
let nameForDisplay = NSLocalizedString("All Unread", comment: "All Unread pseudo-feed title")
|
||||
let nameForDisplay = NSLocalizedString("smartfeed.title.allunread", comment: "All Unread pseudo-feed title")
|
||||
let fetchType = FetchType.unread(nil)
|
||||
|
||||
var unreadCount = 0 {
|
||||
|
||||
@@ -18,11 +18,11 @@ enum UserInterfaceColorPalette: Int, CustomStringConvertible, CaseIterable {
|
||||
var description: String {
|
||||
switch self {
|
||||
case .automatic:
|
||||
return NSLocalizedString("Automatic", comment: "Automatic")
|
||||
return NSLocalizedString("appdefaults.colorpalette.automatic", comment: "Automatic")
|
||||
case .light:
|
||||
return NSLocalizedString("Light", comment: "Light")
|
||||
return NSLocalizedString("appdefaults.colorpalette.light", comment: "Light")
|
||||
case .dark:
|
||||
return NSLocalizedString("Dark", comment: "Dark")
|
||||
return NSLocalizedString("appdefaults.colorpalette.dark", comment: "Dark")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
|
||||
#if DEBUG
|
||||
syncTimer!.update()
|
||||
if let documentsPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path {
|
||||
print("Documents Directory: \(documentsPath)")
|
||||
}
|
||||
#endif
|
||||
|
||||
return true
|
||||
@@ -253,15 +256,15 @@ private extension AppDelegate {
|
||||
}
|
||||
|
||||
private func initializeHomeScreenQuickActions() {
|
||||
let unreadTitle = NSLocalizedString("First Unread", comment: "First Unread")
|
||||
let unreadTitle = NSLocalizedString("homescreen.action.firstunread", comment: "First Unread")
|
||||
let unreadIcon = UIApplicationShortcutIcon(systemImageName: "chevron.down.circle")
|
||||
let unreadItem = UIApplicationShortcutItem(type: "com.ranchero.NetNewsWire.FirstUnread", localizedTitle: unreadTitle, localizedSubtitle: nil, icon: unreadIcon, userInfo: nil)
|
||||
|
||||
let searchTitle = NSLocalizedString("Search", comment: "Search")
|
||||
let searchTitle = NSLocalizedString("homescreen.action.search", comment: "Search")
|
||||
let searchIcon = UIApplicationShortcutIcon(systemImageName: "magnifyingglass")
|
||||
let searchItem = UIApplicationShortcutItem(type: "com.ranchero.NetNewsWire.ShowSearch", localizedTitle: searchTitle, localizedSubtitle: nil, icon: searchIcon, userInfo: nil)
|
||||
|
||||
let addTitle = NSLocalizedString("Add Feed", comment: "Add Feed")
|
||||
let addTitle = NSLocalizedString("homescreen.action.addfeed", comment: "Add Feed")
|
||||
let addIcon = UIApplicationShortcutIcon(systemImageName: "plus")
|
||||
let addItem = UIApplicationShortcutItem(type: "com.ranchero.NetNewsWire.ShowAdd", localizedTitle: addTitle, localizedSubtitle: nil, icon: addIcon, userInfo: nil)
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable, Loggi
|
||||
themeActions.append(action)
|
||||
}
|
||||
|
||||
let defaultThemeAction = UIAction(title: NSLocalizedString("Default", comment: "Default"),
|
||||
let defaultThemeAction = UIAction(title: NSLocalizedString("button.title.default", comment: "Button title: Default"),
|
||||
image: nil,
|
||||
identifier: nil,
|
||||
discoverabilityTitle: nil,
|
||||
@@ -313,13 +313,13 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable, Loggi
|
||||
}
|
||||
|
||||
appearanceBarButtonItem.image = AppAssets.articleAppearanceImage
|
||||
appearanceBarButtonItem.menu = UIMenu(title: NSLocalizedString("Article Appearance", comment: "Appearance"), children: appearanceChildren)
|
||||
appearanceBarButtonItem.menu = UIMenu(title: NSLocalizedString("menu.title.articleappearance", comment: "Article Appearance menu title"), children: appearanceChildren)
|
||||
}
|
||||
|
||||
private func configureArticleExtractorMenu() {
|
||||
if let feed = article?.webFeed {
|
||||
let extractorOn = feed.isArticleExtractorAlwaysOn ?? false
|
||||
let readerAction = UIAction(title: NSLocalizedString("Always Use Reader View", comment: "Always Use Reader View"),
|
||||
let readerAction = UIAction(title: NSLocalizedString("button.title.alwaysusreaderview", comment: "Button title: Always Use Reader View"),
|
||||
image: AppAssets.articleExtractorOffSF,
|
||||
identifier: nil,
|
||||
discoverabilityTitle: nil,
|
||||
|
||||
@@ -29,8 +29,8 @@ class ImageViewController: UIViewController {
|
||||
super.viewDidLoad()
|
||||
|
||||
closeButton.imageView?.contentMode = .scaleAspectFit
|
||||
closeButton.accessibilityLabel = NSLocalizedString("Close", comment: "Close")
|
||||
shareButton.accessibilityLabel = NSLocalizedString("Share", comment: "Share")
|
||||
closeButton.accessibilityLabel = NSLocalizedString("button.title.close", comment: "Close")
|
||||
shareButton.accessibilityLabel = NSLocalizedString("button.title.share", comment: "Share")
|
||||
|
||||
imageScrollView.setup()
|
||||
imageScrollView.imageScrollViewDelegate = self
|
||||
|
||||
@@ -13,7 +13,7 @@ class OpenInBrowserActivity: UIActivity {
|
||||
private var activityItems: [Any]?
|
||||
|
||||
override var activityTitle: String? {
|
||||
return NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||
return NSLocalizedString("activity.title.openinbrowser", comment: "Open in Browser")
|
||||
}
|
||||
|
||||
override var activityImage: UIImage? {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h1Q-FS-jlg" customClass="ArticleSearchBar" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<view hidden="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h1Q-FS-jlg" customClass="ArticleSearchBar" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="777" width="414" height="36"/>
|
||||
<color key="backgroundColor" name="barBackgroundColor"/>
|
||||
</view>
|
||||
@@ -270,6 +270,9 @@
|
||||
</navigationItem>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<attributedString key="userComments">
|
||||
<fragment content="Feeds scene."/>
|
||||
</attributedString>
|
||||
<connections>
|
||||
<outlet property="addNewItemButton" destination="YFE-wd-vFC" id="NMJ-uE-zGh"/>
|
||||
<outlet property="filterButton" destination="9ro-XY-5xU" id="PSL-lE-ITK"/>
|
||||
|
||||
@@ -1,30 +1,15 @@
|
||||
"4xjRes" = "You must supply a URL.";
|
||||
|
||||
"8Dh9Yy" = "No feed was found at the specified URL.";
|
||||
|
||||
"BCHr23" = "URL";
|
||||
|
||||
"CSrgUY" = "Account Name";
|
||||
|
||||
"HHiZUh" = "Just to confirm, you wanted ‘${accountName}’?";
|
||||
|
||||
"IbqUVS" = "There are ${count} options matching ‘${accountName}’.";
|
||||
|
||||
"IuAbef" = "Add a feed";
|
||||
|
||||
"JGkCuS" = "An account name is required.";
|
||||
|
||||
"UGGPkp" = "You are already subscribed to this feed in this account.";
|
||||
|
||||
/* (No Comment) */
|
||||
"dkSFD2" = "Add${url}to ${accountName}";
|
||||
|
||||
"drQfaI" = "No feed was found at the specified URL.";
|
||||
/* (No Comment) */
|
||||
"IuAbef" = "Add a feed";
|
||||
|
||||
"fWs3li" = "Which one?";
|
||||
/* (No Comment) */
|
||||
"JGkCuS" = "An account name is required.";
|
||||
|
||||
/* (No Comment) */
|
||||
"jLLidQ" = "What is the ${url}you would like add?";
|
||||
|
||||
/* (No Comment) */
|
||||
"oV681v" = "Add Feed";
|
||||
|
||||
"srME8b" = "You are already subscribed to this feed in this account.";
|
||||
|
||||
|
||||
@@ -129,43 +129,43 @@ private extension KeyboardManager {
|
||||
static func globalAuxilaryKeyCommands() -> [UIKeyCommand] {
|
||||
var keys = [UIKeyCommand]()
|
||||
|
||||
let addNewFeedTitle = NSLocalizedString("New Web Feed", comment: "New Web Feed")
|
||||
let addNewFeedTitle = NSLocalizedString("keyboard.command.newwebfeed", comment: "New Web Feed")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: addNewFeedTitle, action: "addNewFeed:", input: "n", modifiers: [.command]))
|
||||
|
||||
let addNewFolderTitle = NSLocalizedString("New Folder", comment: "New Folder")
|
||||
let addNewFolderTitle = NSLocalizedString("keyboard.command.newfolder", comment: "New Folder")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: addNewFolderTitle, action: "addNewFolder:", input: "n", modifiers: [.command, .shift]))
|
||||
|
||||
let refreshTitle = NSLocalizedString("Refresh", comment: "Refresh")
|
||||
let refreshTitle = NSLocalizedString("keyboard.command.refresh", comment: "Refresh")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: refreshTitle, action: "refresh:", input: "r", modifiers: [.command]))
|
||||
|
||||
let nextUnreadTitle = NSLocalizedString("Next Unread", comment: "Next Unread")
|
||||
let nextUnreadTitle = NSLocalizedString("keyboard.command.nextunread", comment: "Next Unread")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: nextUnreadTitle, action: "nextUnread:", input: "/", modifiers: [.command]))
|
||||
|
||||
let goToTodayTitle = NSLocalizedString("Go To Today", comment: "Go To Today")
|
||||
let goToTodayTitle = NSLocalizedString("keyboard.command.gototoday", comment: "Go To Today")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: goToTodayTitle, action: "goToToday:", input: "1", modifiers: [.command]))
|
||||
|
||||
let goToAllUnreadTitle = NSLocalizedString("Go To All Unread", comment: "Go To All Unread")
|
||||
let goToAllUnreadTitle = NSLocalizedString("keyboard.command.gotoallunread", comment: "Go To All Unread")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: goToAllUnreadTitle, action: "goToAllUnread:", input: "2", modifiers: [.command]))
|
||||
|
||||
let goToStarredTitle = NSLocalizedString("Go To Starred", comment: "Go To Starred")
|
||||
let goToStarredTitle = NSLocalizedString("keyboard.command.gotostarred", comment: "Go To Starred")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: goToStarredTitle, action: "goToStarred:", input: "3", modifiers: [.command]))
|
||||
|
||||
let gotoSettings = NSLocalizedString("Go To Settings", comment: "Go To Settings")
|
||||
let gotoSettings = NSLocalizedString("keyboard.command.gotosettings", comment: "Go To Settings")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: gotoSettings, action: "goToSettings:", input: ",", modifiers: [.command]))
|
||||
|
||||
let articleSearchTitle = NSLocalizedString("Article Search", comment: "Article Search")
|
||||
let articleSearchTitle = NSLocalizedString("keyboard.command.articlesearch", 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("keyboard.command.markallasread", comment: "Mark All as Read")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: markAllAsReadTitle, action: "markAllAsRead:", input: "k", modifiers: [.command]))
|
||||
|
||||
let cleanUp = NSLocalizedString("Clean Up", comment: "Clean Up")
|
||||
let cleanUp = NSLocalizedString("keyboard.command.cleanup", comment: "Clean Up")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: cleanUp, action: "cleanUp:", input: "'", modifiers: [.command]))
|
||||
|
||||
let toggleReadFeedsFilter = NSLocalizedString("Toggle Read Feeds Filter", comment: "Toggle Read Feeds Filter")
|
||||
let toggleReadFeedsFilter = NSLocalizedString("keyboard.command.togglereadfeedsfilter", comment: "Toggle Read Feeds Filter")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: toggleReadFeedsFilter, action: "toggleReadFeedsFilter:", input: "f", modifiers: [.command, .shift]))
|
||||
|
||||
let toggleReadArticlesFilter = NSLocalizedString("Toggle Read Articles Filter", comment: "Toggle Read Articles Filter")
|
||||
let toggleReadArticlesFilter = NSLocalizedString("keyboard.command.togglereadarticlesfilter", comment: "Toggle Read Articles Filter")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: toggleReadArticlesFilter, action: "toggleReadArticlesFilter:", input: "h", modifiers: [.command, .shift]))
|
||||
|
||||
return keys
|
||||
@@ -174,13 +174,13 @@ private extension KeyboardManager {
|
||||
static func hardcodeFeedKeyCommands() -> [UIKeyCommand] {
|
||||
var keys = [UIKeyCommand]()
|
||||
|
||||
let nextUpTitle = NSLocalizedString("Select Next Up", comment: "Select Next Up")
|
||||
let nextUpTitle = NSLocalizedString("keyboard.command.selectnextup", comment: "Select Next Up")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: nextUpTitle, action: "selectNextUp:", input: UIKeyCommand.inputUpArrow, modifiers: []))
|
||||
|
||||
let nextDownTitle = NSLocalizedString("Select Next Down", comment: "Select Next Down")
|
||||
let nextDownTitle = NSLocalizedString("keyboard.command.selectnextdown", comment: "Select Next Down")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: nextDownTitle, action: "selectNextDown:", input: UIKeyCommand.inputDownArrow, modifiers: []))
|
||||
|
||||
let getFeedInfo = NSLocalizedString("Get Feed Info", comment: "Get Feed Info")
|
||||
let getFeedInfo = NSLocalizedString("keyboard.command.getfeedinfo", comment: "Get Feed Info")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: getFeedInfo, action: "showFeedInspector:", input: "i", modifiers: .command))
|
||||
|
||||
return keys
|
||||
@@ -189,31 +189,31 @@ private extension KeyboardManager {
|
||||
static func hardcodeArticleKeyCommands() -> [UIKeyCommand] {
|
||||
var keys = [UIKeyCommand]()
|
||||
|
||||
let openInBrowserTitle = NSLocalizedString("Open In Browser", comment: "Open In Browser")
|
||||
let openInBrowserTitle = NSLocalizedString("keyboard.command.openinbrowser", comment: "Open In Browser")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: openInBrowserTitle, action: "openInBrowser:", input: UIKeyCommand.inputRightArrow, modifiers: [.command]))
|
||||
|
||||
let toggleReadTitle = NSLocalizedString("Toggle Read Status", comment: "Toggle Read Status")
|
||||
let toggleReadTitle = NSLocalizedString("keyboard.command.togglereadstatus", 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("keyboard.command.markaboveasread", comment: "Mark Above as Read")
|
||||
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("keyboard.command.markbelowasread", comment: "Mark Below as Read")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: markBelowAsReadTitle, action: "markBelowAsRead:", input: "k", modifiers: [.command, .shift]))
|
||||
|
||||
let toggleStarredTitle = NSLocalizedString("Toggle Starred Status", comment: "Toggle Starred Status")
|
||||
let toggleStarredTitle = NSLocalizedString("keyboard.command.togglestarredstatus", comment: "Toggle Starred Status")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: toggleStarredTitle, action: "toggleStarred:", input: "l", modifiers: [.command, .shift]))
|
||||
|
||||
let findInArticleTitle = NSLocalizedString("Find in Article", comment: "Find in Article")
|
||||
let findInArticleTitle = NSLocalizedString("keyboard.command.findinarticle", comment: "Find in Article")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: findInArticleTitle, action: "beginFind:", input: "f", modifiers: [.command]))
|
||||
|
||||
let getFeedInfo = NSLocalizedString("Get Feed Info", comment: "Get Feed Info")
|
||||
let getFeedInfo = NSLocalizedString("keyboard.command.getfeedinfo", comment: "Get Feed Info")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: getFeedInfo, action: "showFeedInspector:", input: "i", modifiers: .command))
|
||||
|
||||
let toggleSidebar = NSLocalizedString("Toggle Sidebar", comment: "Toggle Sidebar")
|
||||
let toggleSidebar = NSLocalizedString("keyboard.command.togglesidebar", comment: "Toggle Sidebar")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: toggleSidebar, action: "toggleSidebar:", input: "s", modifiers: [.command, .control]))
|
||||
|
||||
let toggleReaderView = NSLocalizedString("Toggle Reader View", comment: "Toggle Reader View")
|
||||
let toggleReaderView = NSLocalizedString("keyboard.command.togglereaderview", comment: "Toggle Reader View")
|
||||
keys.append(KeyboardManager.createKeyCommand(title: toggleReaderView, action: "toggleReaderView:", input: "r", modifiers: [.command, .shift]))
|
||||
|
||||
return keys
|
||||
|
||||
@@ -257,7 +257,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
var actions = [UIContextualAction]()
|
||||
|
||||
// Set up the delete action
|
||||
let deleteTitle = NSLocalizedString("Delete", comment: "Delete")
|
||||
let deleteTitle = NSLocalizedString("action.title.delete", comment: "Delete")
|
||||
let deleteAction = UIContextualAction(style: .normal, title: deleteTitle) { [weak self] (action, view, completion) in
|
||||
self?.delete(indexPath: indexPath)
|
||||
completion(true)
|
||||
@@ -266,7 +266,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
actions.append(deleteAction)
|
||||
|
||||
// Set up the rename action
|
||||
let renameTitle = NSLocalizedString("Rename", comment: "Rename")
|
||||
let renameTitle = NSLocalizedString("action.title.rename", comment: "Rename")
|
||||
let renameAction = UIContextualAction(style: .normal, title: renameTitle) { [weak self] (action, view, completion) in
|
||||
self?.rename(indexPath: indexPath)
|
||||
completion(true)
|
||||
@@ -275,7 +275,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
actions.append(renameAction)
|
||||
|
||||
if let webFeed = coordinator.nodeFor(indexPath)?.representedObject as? WebFeed {
|
||||
let moreTitle = NSLocalizedString("More", comment: "More")
|
||||
let moreTitle = NSLocalizedString("action.title.more", comment: "More")
|
||||
let moreAction = UIContextualAction(style: .normal, title: moreTitle) { [weak self] (action, view, completion) in
|
||||
|
||||
if let self = self {
|
||||
@@ -306,7 +306,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
alert.addAction(action)
|
||||
}
|
||||
|
||||
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
||||
let cancelTitle = NSLocalizedString("action.title.cancel", comment: "Cancel")
|
||||
alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel) { _ in
|
||||
completion(true)
|
||||
})
|
||||
@@ -507,7 +507,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
return
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read")
|
||||
let title = NSLocalizedString("button.title.markallasread", comment: "Mark All as Read")
|
||||
MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
self?.coordinator.markAllAsReadInTimeline()
|
||||
}
|
||||
@@ -623,7 +623,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
|
||||
var menuItems: [UIAction] = []
|
||||
|
||||
let addWebFeedActionTitle = NSLocalizedString("Add Web Feed", comment: "Add Web Feed")
|
||||
let addWebFeedActionTitle = NSLocalizedString("button.title.addwebfeed", comment: "Add Web Feed")
|
||||
let addWebFeedAction = UIAction(title: addWebFeedActionTitle, image: AppAssets.plus) { _ in
|
||||
self.coordinator.showAddWebFeed()
|
||||
}
|
||||
@@ -631,14 +631,14 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
|
||||
if AccountManager.shared.activeAccounts.contains(where: { $0.type == .onMyMac || $0.type == .cloudKit }) {
|
||||
if ExtensionPointManager.shared.isRedditEnabled {
|
||||
let addRedditFeedActionTitle = NSLocalizedString("Add Reddit Feed", comment: "Add Reddit Feed")
|
||||
let addRedditFeedActionTitle = NSLocalizedString("button.title.addredditfeed", comment: "Add Reddit Feed")
|
||||
let addRedditFeedAction = UIAction(title: addRedditFeedActionTitle, image: AppAssets.contextMenuReddit.tinted(color: .label)) { _ in
|
||||
self.coordinator.showAddRedditFeed()
|
||||
}
|
||||
menuItems.append(addRedditFeedAction)
|
||||
}
|
||||
if ExtensionPointManager.shared.isTwitterEnabled {
|
||||
let addTwitterFeedActionTitle = NSLocalizedString("Add Twitter Feed", comment: "Add Twitter Feed")
|
||||
let addTwitterFeedActionTitle = NSLocalizedString("button.title.addtwitterfeed", comment: "Add Twitter Feed")
|
||||
let addTwitterFeedAction = UIAction(title: addTwitterFeedActionTitle, image: AppAssets.contextMenuTwitter.tinted(color: .label)) { _ in
|
||||
self.coordinator.showAddTwitterFeed()
|
||||
}
|
||||
@@ -646,14 +646,14 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
|
||||
}
|
||||
}
|
||||
|
||||
let addWebFolderActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder")
|
||||
let addWebFolderActionTitle = NSLocalizedString("button.title.addfolder", comment: "Add Folder")
|
||||
let addWebFolderAction = UIAction(title: addWebFolderActionTitle, image: AppAssets.folderOutlinePlus) { _ in
|
||||
self.coordinator.showAddFolder()
|
||||
}
|
||||
|
||||
menuItems.append(addWebFolderAction)
|
||||
|
||||
let contextMenu = UIMenu(title: NSLocalizedString("Add Item", comment: "Add Item"), image: nil, identifier: nil, options: [], children: menuItems.reversed())
|
||||
let contextMenu = UIMenu(title: NSLocalizedString("button.title.additem", comment: "Add Item"), image: nil, identifier: nil, options: [], children: menuItems.reversed())
|
||||
|
||||
self.addNewItemButton.menu = contextMenu
|
||||
}
|
||||
@@ -976,7 +976,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Open Home Page", comment: "Open Home Page")
|
||||
let title = NSLocalizedString("button.title.openhomepage", comment: "Open Home Page")
|
||||
let action = UIAction(title: title, image: AppAssets.safariImage) { [weak self] action in
|
||||
self?.coordinator.showBrowserForFeed(indexPath)
|
||||
}
|
||||
@@ -988,7 +988,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Open Home Page", comment: "Open Home Page")
|
||||
let title = NSLocalizedString("button.title.openhomepage", comment: "Open Home Page")
|
||||
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
|
||||
self?.coordinator.showBrowserForFeed(indexPath)
|
||||
completion(true)
|
||||
@@ -1002,7 +1002,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL")
|
||||
let title = NSLocalizedString("button.title.copyfeedurl", comment: "Copy Feed URL")
|
||||
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
|
||||
UIPasteboard.general.url = url
|
||||
}
|
||||
@@ -1015,7 +1015,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL")
|
||||
let title = NSLocalizedString("button.title.copyfeedurl", comment: "Copy Feed URL")
|
||||
let action = UIAlertAction(title: title, style: .default) { action in
|
||||
UIPasteboard.general.url = url
|
||||
completion(true)
|
||||
@@ -1030,7 +1030,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL")
|
||||
let title = NSLocalizedString("button.title.copyhomepageurl", comment: "Copy Home Page URL")
|
||||
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
|
||||
UIPasteboard.general.url = url
|
||||
}
|
||||
@@ -1044,7 +1044,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL")
|
||||
let title = NSLocalizedString("button.title.copyhomepageurl", comment: "Copy Home Page URL")
|
||||
let action = UIAlertAction(title: title, style: .default) { action in
|
||||
UIPasteboard.general.url = url
|
||||
completion(true)
|
||||
@@ -1059,7 +1059,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let title = NSLocalizedString("button.title.markallasread", comment: "Mark All as Read")
|
||||
let cancel = {
|
||||
completion(true)
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ private extension MasterFeedViewController {
|
||||
}
|
||||
|
||||
func deleteAction(indexPath: IndexPath) -> UIAction {
|
||||
let title = NSLocalizedString("Delete", comment: "Delete")
|
||||
let title = NSLocalizedString("button.title.delete", comment: "Delete Feed")
|
||||
|
||||
let action = UIAction(title: title, image: AppAssets.trashImage, attributes: .destructive) { [weak self] action in
|
||||
self?.delete(indexPath: indexPath)
|
||||
@@ -1084,7 +1084,7 @@ private extension MasterFeedViewController {
|
||||
}
|
||||
|
||||
func renameAction(indexPath: IndexPath) -> UIAction {
|
||||
let title = NSLocalizedString("Rename", comment: "Rename")
|
||||
let title = NSLocalizedString("button.title.rename", comment: "Rename Feed")
|
||||
let action = UIAction(title: title, image: AppAssets.editImage) { [weak self] action in
|
||||
self?.rename(indexPath: indexPath)
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Get Info", comment: "Get Info")
|
||||
let title = NSLocalizedString("button.title.getinfo", comment: "Get Info")
|
||||
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] action in
|
||||
self?.coordinator.showFeedInspector(for: webFeed)
|
||||
}
|
||||
@@ -1104,7 +1104,7 @@ private extension MasterFeedViewController {
|
||||
}
|
||||
|
||||
func getAccountInfoAction(account: Account) -> UIAction {
|
||||
let title = NSLocalizedString("Get Info", comment: "Get Info")
|
||||
let title = NSLocalizedString("button.title.getinfo", comment: "Get Info")
|
||||
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] action in
|
||||
self?.coordinator.showAccountInspector(for: account)
|
||||
}
|
||||
@@ -1112,7 +1112,7 @@ private extension MasterFeedViewController {
|
||||
}
|
||||
|
||||
func deactivateAccountAction(account: Account) -> UIAction {
|
||||
let title = NSLocalizedString("Deactivate", comment: "Deactivate")
|
||||
let title = NSLocalizedString("button.title.deactivate", comment: "Deactivate")
|
||||
let action = UIAction(title: title, image: AppAssets.deactivateImage) { action in
|
||||
account.isActive = false
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Get Info", comment: "Get Info")
|
||||
let title = NSLocalizedString("button.title.getinfo", comment: "Get Info")
|
||||
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
|
||||
self?.coordinator.showFeedInspector(for: webFeed)
|
||||
completion(true)
|
||||
@@ -1139,7 +1139,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let title = NSLocalizedString("button.title.markallasread", comment: "Mark All as Read")
|
||||
let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
if let articles = try? feed.fetchUnreadArticles() {
|
||||
@@ -1156,7 +1156,7 @@ private extension MasterFeedViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
let title = NSLocalizedString("button.title.markallasread", comment: "Mark All as Read")
|
||||
let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
// If you don't have this delay the screen flashes when it executes this code
|
||||
@@ -1175,15 +1175,15 @@ private extension MasterFeedViewController {
|
||||
func rename(indexPath: IndexPath) {
|
||||
guard let feed = coordinator.nodeFor(indexPath)?.representedObject as? Feed else { return }
|
||||
|
||||
let formatString = NSLocalizedString("Rename “%@”", comment: "Rename feed")
|
||||
let formatString = NSLocalizedString("button.title.renamefeed.%@", comment: "Rename feed. The variable provided is the feed name.")
|
||||
let title = NSString.localizedStringWithFormat(formatString as NSString, feed.nameForDisplay) as String
|
||||
|
||||
let alertController = UIAlertController(title: title, message: nil, preferredStyle: .alert)
|
||||
|
||||
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
||||
let cancelTitle = NSLocalizedString("button.title.cancel", comment: "Cancel")
|
||||
alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel))
|
||||
|
||||
let renameTitle = NSLocalizedString("Rename", comment: "Rename")
|
||||
let renameTitle = NSLocalizedString("button.title.rename", comment: "Rename")
|
||||
let renameAction = UIAlertAction(title: renameTitle, style: .default) { [weak self] action in
|
||||
|
||||
guard let name = alertController.textFields?[0].text, !name.isEmpty else {
|
||||
@@ -1217,7 +1217,7 @@ private extension MasterFeedViewController {
|
||||
|
||||
alertController.addTextField() { textField in
|
||||
textField.text = feed.nameForDisplay
|
||||
textField.placeholder = NSLocalizedString("Name", comment: "Name")
|
||||
textField.placeholder = NSLocalizedString("textfield.placeholder.name", comment: "Name")
|
||||
}
|
||||
|
||||
self.present(alertController, animated: true) {
|
||||
@@ -1232,21 +1232,21 @@ private extension MasterFeedViewController {
|
||||
let title: String
|
||||
let message: String
|
||||
if feed is Folder {
|
||||
title = NSLocalizedString("Delete Folder", comment: "Delete folder")
|
||||
let localizedInformativeText = NSLocalizedString("Are you sure you want to delete the “%@” folder?", comment: "Folder delete text")
|
||||
title = NSLocalizedString("button.title.deletefolder", comment: "Delete folder")
|
||||
let localizedInformativeText = NSLocalizedString("alert.message.deletefolder.%@", comment: "Asks the user for confirmation that they wish to delete a folder. The variable provided is the folder name.")
|
||||
message = NSString.localizedStringWithFormat(localizedInformativeText as NSString, feed.nameForDisplay) as String
|
||||
} else {
|
||||
title = NSLocalizedString("Delete Feed", comment: "Delete feed")
|
||||
let localizedInformativeText = NSLocalizedString("Are you sure you want to delete the “%@” feed?", comment: "Feed delete text")
|
||||
title = NSLocalizedString("button.title.deletefeed", comment: "Delete feed")
|
||||
let localizedInformativeText = NSLocalizedString("alert.message.deletefeed.%@", comment: "Asks the user for confirmation that they wish to delete a feed. The variable provided is the feed name.")
|
||||
message = NSString.localizedStringWithFormat(localizedInformativeText as NSString, feed.nameForDisplay) as String
|
||||
}
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
||||
|
||||
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
||||
let cancelTitle = NSLocalizedString("button.title.cancel", comment: "Cancel")
|
||||
alertController.addAction(UIAlertAction(title: cancelTitle, style: .cancel))
|
||||
|
||||
let deleteTitle = NSLocalizedString("Delete", comment: "Delete")
|
||||
let deleteTitle = NSLocalizedString("button.title.delete", comment: "Delete")
|
||||
let deleteAction = UIAlertAction(title: deleteTitle, style: .destructive) { [weak self] action in
|
||||
self?.performDelete(indexPath: indexPath)
|
||||
}
|
||||
|
||||
@@ -141,12 +141,12 @@ private extension RefreshProgressModel {
|
||||
let relativeDateTimeFormatter = RelativeDateTimeFormatter()
|
||||
relativeDateTimeFormatter.dateTimeStyle = .named
|
||||
let refreshed = relativeDateTimeFormatter.localizedString(for: accountLastArticleFetchEndTime, relativeTo: Date())
|
||||
let localizedRefreshText = NSLocalizedString("Updated %@", comment: "Updated")
|
||||
let localizedRefreshText = NSLocalizedString("label.text.updatedat.%@", comment: "Relative time that the account was last refreshed. The variable is a named relative time. Example: Updated 8 minutes ago")
|
||||
let refreshText = NSString.localizedStringWithFormat(localizedRefreshText as NSString, refreshed) as String
|
||||
label = refreshText
|
||||
|
||||
} else {
|
||||
label = NSLocalizedString("Updated Just Now", comment: "Updated Just Now")
|
||||
label = NSLocalizedString("label.text.updatednow", comment: "Text indicating that feeds have just been updated. Example: Updated Just Now")
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -46,11 +46,10 @@ struct MarkAsReadAlertController {
|
||||
completion: @escaping (UIAlertAction) -> Void) -> UIAlertController where T: 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 title = NSLocalizedString("alert.title.markasread", comment: "Mark As Read")
|
||||
let message = NSLocalizedString("alert.message.markasread.turnoffconfirmation", comment: "Message that indicates a user can turn off the Mark As Read confirmation in Settings.")
|
||||
let cancelTitle = NSLocalizedString("button.title.cancel", comment: "Cancel")
|
||||
let settingsTitle = NSLocalizedString("button.title.opensettings", comment: "Open Settings")
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .actionSheet)
|
||||
let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) { _ in
|
||||
|
||||
@@ -75,10 +75,11 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
searchController.searchResultsUpdater = self
|
||||
searchController.obscuresBackgroundDuringPresentation = false
|
||||
searchController.searchBar.delegate = self
|
||||
searchController.searchBar.placeholder = NSLocalizedString("Search Articles", comment: "Search Articles")
|
||||
searchController.searchBar.placeholder = NSLocalizedString("searchbar.placeholder.searcharticles", comment: "Search Articles")
|
||||
|
||||
searchController.searchBar.scopeButtonTitles = [
|
||||
NSLocalizedString("Here", comment: "Here"),
|
||||
NSLocalizedString("All Articles", comment: "All Articles")
|
||||
NSLocalizedString("searchbar.scope.here", comment: "Title used when describing the search when scoped to the current timeline."),
|
||||
NSLocalizedString("searchbar.scope.allarticles", comment: "Title used when desribing the search when scoped to all articles.")
|
||||
]
|
||||
navigationItem.searchController = searchController
|
||||
definesPresentationContext = true
|
||||
@@ -274,8 +275,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
|
||||
// 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("button.title.markasunread", comment: "Mark as Unread. Used to mark an article unread") :
|
||||
NSLocalizedString("button.title.markasread", comment: "Mark as Read. Used to mark an article Read")
|
||||
|
||||
let readAction = UIContextualAction(style: .normal, title: readTitle) { [weak self] (action, view, completion) in
|
||||
self?.coordinator.toggleRead(article)
|
||||
@@ -294,8 +295,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
|
||||
// Set up the star action
|
||||
let starTitle = article.status.starred ?
|
||||
NSLocalizedString("Unstar", comment: "Unstar") :
|
||||
NSLocalizedString("Star", comment: "Star")
|
||||
NSLocalizedString("button.title.unstar", comment: "Unstar. Used when removing the starred status from an article") :
|
||||
NSLocalizedString("button.title.star", comment: "Star. Used when marking an article as starred.")
|
||||
|
||||
let starAction = UIContextualAction(style: .normal, title: starTitle) { [weak self] (action, view, completion) in
|
||||
self?.coordinator.toggleStar(article)
|
||||
@@ -306,7 +307,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
starAction.backgroundColor = AppAssets.starColor
|
||||
|
||||
// Set up the read action
|
||||
let moreTitle = NSLocalizedString("More", comment: "More")
|
||||
let moreTitle = NSLocalizedString("button.title.more", comment: "More")
|
||||
let moreAction = UIContextualAction(style: .normal, title: moreTitle) { [weak self] (action, view, completion) in
|
||||
|
||||
if let self = self {
|
||||
@@ -341,7 +342,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
alert.addAction(action)
|
||||
}
|
||||
|
||||
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
||||
let cancelTitle = NSLocalizedString("button.title.cancel", comment: "Cancel")
|
||||
alert.addAction(UIAlertAction(title: cancelTitle, style: .cancel) { _ in
|
||||
completion(true)
|
||||
})
|
||||
@@ -752,8 +753,8 @@ private extension MasterTimelineViewController {
|
||||
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("button.title.markasunread", comment: "Mark as Unread. Used to mark an article unread") :
|
||||
NSLocalizedString("button.title.markasread", comment: "Mark as Read. Used to mark an article Read")
|
||||
let image = article.status.read ? AppAssets.circleClosedImage : AppAssets.circleOpenImage
|
||||
|
||||
let action = UIAction(title: title, image: image) { [weak self] action in
|
||||
@@ -766,8 +767,8 @@ private extension MasterTimelineViewController {
|
||||
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("button.title.markasunstarred", comment: "Mark as Unstarred. Used to mark an article as unstarred") :
|
||||
NSLocalizedString("button.title.markasstarred", comment: "Mark as Starred. Used to mark an article as starred")
|
||||
let image = article.status.starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
||||
|
||||
let action = UIAction(title: title, image: image) { [weak self] action in
|
||||
@@ -781,8 +782,8 @@ private extension MasterTimelineViewController {
|
||||
guard coordinator.canMarkAboveAsRead(for: article), let contentView = self.tableView.cellForRow(at: indexPath)?.contentView else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark Above as Read", comment: "Mark Above as Read")
|
||||
|
||||
let title = NSLocalizedString("button.title.markaboveasread", comment: "Mark Above as Read. Used to mark articles above the current article as read.")
|
||||
let image = AppAssets.markAboveAsReadImage
|
||||
let action = UIAction(title: title, image: image) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
@@ -797,7 +798,7 @@ private extension MasterTimelineViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark Below as Read", comment: "Mark Below as Read")
|
||||
let title = NSLocalizedString("button.title.markbelowasread", comment: "Mark Below as Read. Used to mark articles below the current article as read.")
|
||||
let image = AppAssets.markBelowAsReadImage
|
||||
let action = UIAction(title: title, image: image) { [weak self] action in
|
||||
MarkAsReadAlertController.confirm(self, coordinator: self?.coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in
|
||||
@@ -812,7 +813,7 @@ private extension MasterTimelineViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark Above as Read", comment: "Mark Above as Read")
|
||||
let title = NSLocalizedString("button.title.markaboveasread", comment: "Mark Above as Read. Used to mark articles above the current article as read.")
|
||||
let cancel = {
|
||||
completion(true)
|
||||
}
|
||||
@@ -831,7 +832,7 @@ private extension MasterTimelineViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Mark Below as Read", comment: "Mark Below as Read")
|
||||
let title = NSLocalizedString("button.title.markbelowasread", comment: "Mark Below as Read. Used to mark articles below the current article as read.")
|
||||
let cancel = {
|
||||
completion(true)
|
||||
}
|
||||
@@ -849,7 +850,7 @@ private extension MasterTimelineViewController {
|
||||
guard let webFeed = article.webFeed,
|
||||
!coordinator.timelineFeedIsEqualTo(webFeed) else { return nil }
|
||||
|
||||
let title = NSLocalizedString("Go to Feed", comment: "Go to Feed")
|
||||
let title = NSLocalizedString("button.title.gotofeed", comment: "Go To Feed. Use to navigate to the user to the article list for a feed.")
|
||||
let action = UIAction(title: title, image: AppAssets.openInSidebarImage) { [weak self] action in
|
||||
self?.coordinator.discloseWebFeed(webFeed, animations: [.scroll, .navigation])
|
||||
}
|
||||
@@ -860,7 +861,7 @@ private extension MasterTimelineViewController {
|
||||
guard let webFeed = article.webFeed,
|
||||
!coordinator.timelineFeedIsEqualTo(webFeed) else { return nil }
|
||||
|
||||
let title = NSLocalizedString("Go to Feed", comment: "Go to Feed")
|
||||
let title = NSLocalizedString("button.title.gotofeed", comment: "Go To Feed. Use to navigate to the user to the article list for a feed.")
|
||||
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
|
||||
self?.coordinator.discloseWebFeed(webFeed, animations: [.scroll, .navigation])
|
||||
completion(true)
|
||||
@@ -880,7 +881,7 @@ private extension MasterTimelineViewController {
|
||||
}
|
||||
|
||||
|
||||
let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Command")
|
||||
let localizedMenuText = NSLocalizedString("button.title.markallasread.%@", comment: "Mark All as Read in ”feed”. The variable name is the feed name.")
|
||||
let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, webFeed.nameForDisplay) as String
|
||||
|
||||
let action = UIAction(title: title, image: AppAssets.markAllAsReadImage) { [weak self] action in
|
||||
@@ -902,7 +903,7 @@ private extension MasterTimelineViewController {
|
||||
return nil
|
||||
}
|
||||
|
||||
let localizedMenuText = NSLocalizedString("Mark All as Read in “%@”", comment: "Mark All as Read in Feed")
|
||||
let localizedMenuText = NSLocalizedString("button.title.markallasread.%@", comment: "Mark All as Read in ”feed”. The variable name is the feed name.")
|
||||
let title = NSString.localizedStringWithFormat(localizedMenuText as NSString, webFeed.nameForDisplay) as String
|
||||
let cancel = {
|
||||
completion(true)
|
||||
@@ -919,7 +920,7 @@ private extension MasterTimelineViewController {
|
||||
|
||||
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("button.title.copyarticleurl", comment: "Copy Article URL")
|
||||
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
|
||||
UIPasteboard.general.url = url
|
||||
}
|
||||
@@ -928,7 +929,7 @@ private extension MasterTimelineViewController {
|
||||
|
||||
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("button.title.copyexternalurl", comment: "Copy External URL")
|
||||
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
|
||||
UIPasteboard.general.url = url
|
||||
}
|
||||
@@ -938,7 +939,7 @@ private extension MasterTimelineViewController {
|
||||
|
||||
func openInBrowserAction(_ article: Article) -> UIAction? {
|
||||
guard let _ = article.preferredURL else { return nil }
|
||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||
let title = NSLocalizedString("button.title.openinbrowser", comment: "Open In Browser")
|
||||
let action = UIAction(title: title, image: AppAssets.safariImage) { [weak self] action in
|
||||
self?.coordinator.showBrowserForArticle(article)
|
||||
}
|
||||
@@ -948,7 +949,7 @@ private extension MasterTimelineViewController {
|
||||
func openInBrowserAlertAction(_ article: Article, completion: @escaping (Bool) -> Void) -> UIAlertAction? {
|
||||
guard let _ = article.preferredURL else { return nil }
|
||||
|
||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||
let title = NSLocalizedString("button.title.openinbrowser", comment: "Open In Browser")
|
||||
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
|
||||
self?.coordinator.showBrowserForArticle(article)
|
||||
completion(true)
|
||||
@@ -969,7 +970,7 @@ private extension MasterTimelineViewController {
|
||||
|
||||
func shareAction(_ article: Article, indexPath: IndexPath) -> UIAction? {
|
||||
guard let url = article.preferredURL else { return nil }
|
||||
let title = NSLocalizedString("Share", comment: "Share")
|
||||
let title = NSLocalizedString("button.title.share", comment: "Share")
|
||||
let action = UIAction(title: title, image: AppAssets.shareImage) { [weak self] action in
|
||||
self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title)
|
||||
}
|
||||
@@ -978,7 +979,7 @@ private extension MasterTimelineViewController {
|
||||
|
||||
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("button.title.share", comment: "Share")
|
||||
let action = UIAlertAction(title: title, style: .default) { [weak self] action in
|
||||
completion(true)
|
||||
self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title)
|
||||
|
||||
@@ -147,7 +147,7 @@ struct SettingsView: View {
|
||||
.alert(Text("Imported Successfully", comment: "Alert title: imported OPML file successfully."),
|
||||
isPresented: $viewModel.showImportSuccess,
|
||||
actions: {},
|
||||
message: { Text("Subscriptions have been imported to your \(viewModel.importAccount?.nameForDisplay ?? "") account.", tableName: "Alert message: imported OPML file successfully.") })
|
||||
message: { Text("Subscriptions have been imported to your \(viewModel.importAccount?.nameForDisplay ?? "") account.", comment: "Alert message: imported OPML file successfully.") })
|
||||
.alert(Text("Exported Successfully", comment: "Alert title: exported OPML file successfully."),
|
||||
isPresented: $viewModel.showExportSuccess,
|
||||
actions: {},
|
||||
|
||||
Reference in New Issue
Block a user