Skip to content

Commit 67aa5ed

Browse files
committed
Use reverse-DNS keys in reader detail accessibility labels
1 parent e16a9ba commit 67aa5ed

File tree

1 file changed

+52
-11
lines changed

1 file changed

+52
-11
lines changed

WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailViewController.swift

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,20 +1101,61 @@ extension ReaderDetailViewController: UIViewControllerRestoration {
11011101
// MARK: - Strings
11021102
extension ReaderDetailViewController {
11031103
private struct Strings {
1104-
static let backButtonAccessibilityLabel = NSLocalizedString("Back", comment: "Spoken accessibility label")
1105-
static let dismissButtonAccessibilityLabel = NSLocalizedString("Dismiss", comment: "Spoken accessibility label")
1106-
static let safariButtonAccessibilityLabel = NSLocalizedString("Open in Safari", comment: "Spoken accessibility label")
1107-
static let shareButtonAccessibilityLabel = NSLocalizedString("Share", comment: "Spoken accessibility label")
1108-
static let moreButtonAccessibilityLabel = NSLocalizedString("More", comment: "Spoken accessibility label")
1109-
static let localPostsSectionTitle = NSLocalizedString("More from %1$@", comment: "Section title for local related posts. %1$@ is a placeholder for the blog display name.")
1110-
static let globalPostsSectionTitle = NSLocalizedString("More on WordPress.com", comment: "Section title for global related posts.")
1111-
static let tooltipTitle = NSLocalizedString("Follow the conversation", comment: "Title of follow conversations tooltip.")
1104+
static let backButtonAccessibilityLabel = NSLocalizedString(
1105+
"readerDetail.backButton.accessibilityLabel",
1106+
value: "Back",
1107+
comment: "Spoken accessibility label"
1108+
)
1109+
static let dismissButtonAccessibilityLabel = NSLocalizedString(
1110+
"readerDetail.dismissButton.accessibilityLabel",
1111+
value: "Dismiss",
1112+
comment: "Spoken accessibility label"
1113+
)
1114+
static let safariButtonAccessibilityLabel = NSLocalizedString(
1115+
"readerDetail.backButton.accessibilityLabel",
1116+
value: "Open in Safari",
1117+
comment: "Spoken accessibility label"
1118+
)
1119+
static let shareButtonAccessibilityLabel = NSLocalizedString(
1120+
"readerDetail.shareButton.accessibilityLabel",
1121+
value: "Share",
1122+
comment: "Spoken accessibility label"
1123+
)
1124+
static let moreButtonAccessibilityLabel = NSLocalizedString(
1125+
"readerDetail.moreButton.accessibilityLabel",
1126+
value: "More",
1127+
comment: "Spoken accessibility label"
1128+
)
1129+
static let localPostsSectionTitle = NSLocalizedString(
1130+
"readerDetail.localPostsSection.accessibilityLabel",
1131+
value: "More from %1$@",
1132+
comment: "Section title for local related posts. %1$@ is a placeholder for the blog display name."
1133+
)
1134+
static let globalPostsSectionTitle = NSLocalizedString(
1135+
"readerDetail.globalPostsSection.accessibilityLabel",
1136+
value: "More on WordPress.com",
1137+
comment: "Section title for global related posts."
1138+
)
1139+
static let tooltipTitle = NSLocalizedString(
1140+
"readerDetail.followConversationTooltipTitle.accessibilityLabel",
1141+
value: "Follow the conversation",
1142+
comment: "Title of follow conversations tooltip."
1143+
)
11121144
static let tooltipMessage = NSLocalizedString(
1113-
"Get notified when new comments are added to this post.",
1145+
"readerDetail.followConversationTooltipMessage.accessibilityLabel",
1146+
value: "Get notified when new comments are added to this post.",
11141147
comment: "Message for the follow conversations tooltip."
11151148
)
1116-
static let tooltipButtonTitle = NSLocalizedString("Got it", comment: "Button title for the follow conversations tooltip.")
1117-
static let tooltipAnchorTitle = NSLocalizedString("New", comment: "Title for the tooltip anchor.")
1149+
static let tooltipButtonTitle = NSLocalizedString(
1150+
"readerDetail.followConversationTooltipButton.accessibilityLabel",
1151+
value: "Got it",
1152+
comment: "Button title for the follow conversations tooltip."
1153+
)
1154+
static let tooltipAnchorTitle = NSLocalizedString(
1155+
"readerDetail.tooltipAnchorTitle.accessibilityLabel",
1156+
value: "New",
1157+
comment: "Title for the tooltip anchor."
1158+
)
11181159
}
11191160
}
11201161

0 commit comments

Comments
 (0)