Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions WordPress/Classes/Utility/SharedStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ enum SharedStrings {
}

enum Reader {
/// - warning: This is the legacy value. It's not compliant with the new format but has the correct translation for different languages.
static let title = NSLocalizedString("Reader", comment: "The accessibility value of the Reader tab.")
static let unfollow = NSLocalizedString("reader.button.unfollow", value: "Unfollow", comment: "Reader sidebar button title")
static let recent = NSLocalizedString("reader.recent.title", value: "Recent", comment: "Used in multiple contexts, usually as a screen title")
static let discover = NSLocalizedString("reader.discover.title", value: "Discover", comment: "Used in multiple contexts, usually as a screen title")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ import AutomatticTracks
if contentType == .saved {
title = SharedStrings.Reader.saved
} else {
title = NSLocalizedString("Reader", comment: "The default title of the Reader")
title = SharedStrings.Reader.title
}
return
}
Expand Down Expand Up @@ -1543,7 +1543,7 @@ extension ReaderStreamViewController: SearchableActivityConvertable {
}

var activityTitle: String {
return NSLocalizedString("Reader", comment: "Title of the 'Reader' tab - used for spotlight indexing on iOS.")
return SharedStrings.Reader.title
}

var activityKeywords: Set<String>? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private extension View {
}

private struct Strings {
static let reader = NSLocalizedString("reader.sidebar.navigationTitle", value: "Reader", comment: "Reader sidebar title")
static let reader = SharedStrings.Reader.title
static let subscriptions = NSLocalizedString("reader.sidebar.section.subscriptions.title", value: "Subscriptions", comment: "Reader sidebar section title")
static let lists = NSLocalizedString("reader.sidebar.section.lists.title", value: "Lists", comment: "Reader sidebar section title")
static let tags = NSLocalizedString("reader.sidebar.section.tags.title", value: "Tags", comment: "Reader sidebar section title")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private enum Strings {
static let addSite = NSLocalizedString("sidebar.addSite", value: "Add Site", comment: "Sidebar button title on iPad")
static let createSite = NSLocalizedString("sidebar.createSite", value: "Create Site", comment: "Sidebar button title on iPad")
static let notifications = NSLocalizedString("sidebar.notifications", value: "Notifications", comment: "Sidebar item on iPad")
static let reader = NSLocalizedString("sidebar.reader", value: "Reader", comment: "Sidebar item on iPad")
static let reader = SharedStrings.Reader.title
static let domains = NSLocalizedString("sidebar.domains", value: "Domains", comment: "Sidebar item on iPad")
static let help = NSLocalizedString("sidebar.help", value: "Help & Support", comment: "Sidebar item on iPad")
static let me = NSLocalizedString("sidebar.me", value: "Me", comment: "Sidebar item on iPad")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fileprivate extension WPTab {
}

extension WPTabBarController {
@objc class func readerLocalizedTitle() -> String {
SharedStrings.Reader.title
}

func showReader(path: ReaderNavigationPath?) {
showReaderTab()
if let path {
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/ViewRelated/System/WPTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ - (UINavigationController *)readerNavigationController

_readerNavigationController.tabBarItem.image = [UIImage imageNamed:@"tab-bar-reader"];
_readerNavigationController.tabBarItem.accessibilityIdentifier = @"tabbar_reader";
_readerNavigationController.tabBarItem.title = NSLocalizedString(@"Reader", @"The accessibility value of the Reader tab.");
_readerNavigationController.tabBarItem.title = [WPTabBarController readerLocalizedTitle];

UITabBarAppearance *scrollEdgeAppearance = [UITabBarAppearance new];
[scrollEdgeAppearance configureWithOpaqueBackground];
Expand Down Expand Up @@ -424,7 +424,7 @@ - (BOOL)canBecomeFirstResponder
showMySitesTabCommand.discoverabilityTitle = NSLocalizedString(@"My Site", @"The accessibility value of the my site tab.");

UIKeyCommand *showReaderTabCommand = [UIKeyCommand keyCommandWithInput:@"2" modifierFlags:UIKeyModifierCommand action:@selector(showReaderTab)];
showMySitesTabCommand.discoverabilityTitle = NSLocalizedString(@"Reader", @"The accessibility value of the reader tab.");
showMySitesTabCommand.discoverabilityTitle = [WPTabBarController readerLocalizedTitle];

UIKeyCommand *showNotificationsTabCommand = [UIKeyCommand keyCommandWithInput:@"4" modifierFlags:UIKeyModifierCommand action:@selector(showNotificationsTab)];
showMySitesTabCommand.discoverabilityTitle = NSLocalizedString(@"Notifications", @"Notifications tab bar item accessibility label");
Expand Down
Loading