Skip to content

Commit c4363cf

Browse files
authored
Update various localized strings to use reverse-DNS keys (#19635)
2 parents d0a97b0 + ea70a12 commit c4363cf

File tree

8 files changed

+284
-107
lines changed

8 files changed

+284
-107
lines changed

WordPress/Classes/ViewRelated/Post/PostSettingsViewController+FeaturedImageUpload.swift

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,26 @@ extension PostSettingsViewController {
118118
}
119119

120120
struct FeaturedImageActionSheet {
121-
static let title = NSLocalizedString("Featured Image Options", comment: "Title for action sheet with featured media options.")
122-
static let dismissActionTitle = NSLocalizedString("Dismiss", comment: "User action to dismiss featured media options.")
123-
static let retryUploadActionTitle = NSLocalizedString("Retry", comment: "User action to retry featured media upload.")
124-
static let removeActionTitle = NSLocalizedString("Remove", comment: "User action to remove featured media.")
121+
static let title = NSLocalizedString(
122+
"postSettings.featuredImageUploadActionSheet.title",
123+
value: "Featured Image Options",
124+
comment: "Title for action sheet with featured media options."
125+
)
126+
static let dismissActionTitle = NSLocalizedString(
127+
"postSettings.featuredImageUploadActionSheet.dismiss",
128+
value: "Dismiss",
129+
comment: "User action to dismiss featured media options."
130+
)
131+
static let retryUploadActionTitle = NSLocalizedString(
132+
"postSettings.featuredImageUploadActionSheet.retryUpload",
133+
value: "Retry",
134+
comment: "User action to retry featured media upload."
135+
)
136+
static let removeActionTitle = NSLocalizedString(
137+
"postSettings.featuredImageUploadActionSheet.remove",
138+
value: "Remove",
139+
comment: "User action to remove featured media."
140+
)
125141
}
126142

127143
}

WordPress/Classes/ViewRelated/QR Login/View Controllers/QRLoginVerifyAuthorizationViewController.swift

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,22 @@ extension QRLoginVerifyAuthorizationViewController {
196196

197197
enum completed {
198198
static let imageName = "domains-success"
199-
static let title = NSLocalizedString("You're logged in!", comment: "Title for the success view when the user has successfully logged in")
200-
static let subtitle = NSLocalizedString("Tap dismiss and head back to your web browser to continue.", comment: "Subtitle instructing the user to tap the dismiss button to leave the log in flow")
201-
static let confirmButton = NSLocalizedString("Dismiss", comment: "Button label that dismisses the qr log in flow and returns the user back to the previous screen")
199+
static let title = NSLocalizedString(
200+
"qrLoginVerifyAuthorization.completedInstructions.title",
201+
value: "You're logged in!",
202+
comment: "Title for the success view when the user has successfully logged in"
203+
)
204+
private static let subtitleFormat = NSLocalizedString(
205+
"qrLoginVerifyAuthorization.completedInstructions.subtitle",
206+
value: "Tap '%@' and head back to your web browser to continue.",
207+
comment: "Subtitle instructing the user to tap the dismiss button to leave the log in flow. %@ is a placeholder for the dismiss button name."
208+
)
209+
static let confirmButton = NSLocalizedString(
210+
"qrLoginVerifyAuthorization.completedInstructions.dismiss",
211+
value: "Dismiss",
212+
comment: "Button label that dismisses the qr log in flow and returns the user back to the previous screen"
213+
)
214+
static let subtitle = String(format: subtitleFormat, Self.confirmButton)
202215
}
203216

204217
enum noConnection {

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

WordPress/Classes/ViewRelated/Stats/Insights/Insights Management/CustomizeInsightsCell.swift

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,36 @@ private extension CustomizeInsightsCell {
7575
// MARK: - Constants
7676

7777
struct Labels {
78-
static let title = NSLocalizedString("Customize your insights", comment: "Customize Insights title")
79-
static let content = NSLocalizedString("Create your own customized dashboard and choose what reports to see. Focus on the data you care most about.", comment: "Customize Insights description")
80-
static let tryIt = NSLocalizedString("Try it now", comment: "Customize Insights button title")
81-
static let dismiss = NSLocalizedString("Dismiss", comment: "Customize Insights button title")
82-
static let dismissHint = NSLocalizedString("Tap to dismiss this card", comment: "Accessibility hint")
83-
static let tryItHint = NSLocalizedString("Tap to customize insights", comment: "Accessibility hint")
78+
static let title = NSLocalizedString(
79+
"customizeInsightsCell.title",
80+
value: "Customize your insights",
81+
comment: "Customize Insights title"
82+
)
83+
static let content = NSLocalizedString(
84+
"customizeInsightsCell.content",
85+
value: "Create your own customized dashboard and choose what reports to see. Focus on the data you care most about.",
86+
comment: "Customize Insights description"
87+
)
88+
static let tryIt = NSLocalizedString(
89+
"customizeInsightsCell.tryItButton.title",
90+
value: "Try it now",
91+
comment: "Customize Insights button title"
92+
)
93+
static let dismiss = NSLocalizedString(
94+
"customizeInsightsCell.dismissButton.title",
95+
value: "Dismiss",
96+
comment: "Customize Insights button title"
97+
)
98+
static let dismissHint = NSLocalizedString(
99+
"customizeInsightsCell.dismissButton.accessibilityHint",
100+
value: "Tap to dismiss this card",
101+
comment: "Accessibility hint"
102+
)
103+
static let tryItHint = NSLocalizedString(
104+
"customizeInsightsCell.tryItButton.accessibilityHint",
105+
value: "Tap to customize insights",
106+
comment: "Accessibility hint"
107+
)
84108
}
85109

86110
}

WordPress/Classes/ViewRelated/Stats/Shared Views/GrowAudienceCell.swift

Lines changed: 110 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,29 @@ class GrowAudienceCell: UITableViewCell, NibLoadable {
143143

144144
private enum Strings {
145145

146-
static let viewsCountDescriptionSingular =
147-
NSLocalizedString("View to your site so far", comment: "Description for view count. Singular.")
148-
149-
static let viewsCountDescriptionPlural =
150-
NSLocalizedString("Views to your site so far", comment: "Description for view count. Singular.")
151-
152-
static let tipTitle =
153-
NSLocalizedString("A tip to grow your audience",
154-
comment: "A hint to users about growing the audience for their site, when their site doesn't have many views yet.")
155-
156-
static let dismissButtonTitle =
157-
NSLocalizedString("Dismiss", comment: "Title for button that will dismiss the Grow Your Audience card.")
146+
static let viewsCountDescriptionSingular = NSLocalizedString(
147+
"growAudienceCell.viewsCount.singular",
148+
value: "View to your site so far",
149+
comment: "Description for view count. Singular."
150+
)
151+
152+
static let viewsCountDescriptionPlural = NSLocalizedString(
153+
"growAudienceCell.viewsCount.plural",
154+
value: "Views to your site so far",
155+
comment: "Description for view count. Singular."
156+
)
157+
158+
static let tipTitle = NSLocalizedString(
159+
"growAudienceCell.tip",
160+
value: "A tip to grow your audience",
161+
comment: "A hint to users about growing the audience for their site, when their site doesn't have many views yet."
162+
)
163+
164+
static let dismissButtonTitle = NSLocalizedString(
165+
"growAudienceCell.dismiss",
166+
value: "Dismiss",
167+
comment: "Title for button that will dismiss the Grow Your Audience card."
168+
)
158169

159170
static func getViewsCountDescription(viewsCount: Int) -> String {
160171
return viewsCount == 1 ? viewsCountDescriptionSingular : viewsCountDescriptionPlural
@@ -166,63 +177,99 @@ class GrowAudienceCell: UITableViewCell, NibLoadable {
166177
}
167178

168179
enum Social {
169-
static let detailsTitle =
170-
NSLocalizedString("Automatically share new posts to your social media to start bringing that audience over to your site.",
171-
comment: "A detailed message to users about growing the audience for their site through enabling post sharing.")
172-
173-
static let actionButtonTitle =
174-
NSLocalizedString("Enable post sharing", comment: "Title for button that will open up the social media Sharing screen.")
175-
176-
static let completedTipTitle =
177-
NSLocalizedString("Sharing is set up!",
178-
comment: "A hint to users that they've set up post sharing.")
179-
180-
static let completedDetailsTitle =
181-
NSLocalizedString("When you publish your next post it will be automatically shared to your connected networks.",
182-
comment: "A detailed message to users indicating that they've set up post sharing.")
183-
184-
static let completedActionButtonTitle =
185-
NSLocalizedString("Connect more networks", comment: "Title for button that will open up the social media Sharing screen.")
180+
static let detailsTitle = NSLocalizedString(
181+
"growAudienceCell.social.title",
182+
value: "Automatically share new posts to your social media to start bringing that audience over to your site.",
183+
comment: "A detailed message to users about growing the audience for their site through enabling post sharing."
184+
)
185+
186+
static let actionButtonTitle = NSLocalizedString(
187+
"growAudienceCell.social.actionButton",
188+
value: "Enable post sharing",
189+
comment: "Title for button that will open up the social media Sharing screen."
190+
)
191+
192+
static let completedTipTitle = NSLocalizedString(
193+
"growAudienceCell.social.completed.title",
194+
value: "Sharing is set up!",
195+
comment: "A hint to users that they've set up post sharing."
196+
)
197+
198+
static let completedDetailsTitle = NSLocalizedString(
199+
"growAudienceCell.social.completed.details",
200+
value: "When you publish your next post it will be automatically shared to your connected networks.",
201+
comment: "A detailed message to users indicating that they've set up post sharing."
202+
)
203+
204+
static let completedActionButtonTitle = NSLocalizedString(
205+
"growAudienceCell.social.completed.button",
206+
value: "Connect more networks",
207+
comment: "Title for button that will open up the social media Sharing screen."
208+
)
186209
}
187210

188211
enum BloggingReminders {
189-
static let detailsTitle =
190-
NSLocalizedString("Posting regularly can help build an audience. Reminders help keep you on track.",
191-
comment: "A detailed message to users about growing the audience for their site through blogging reminders.")
192-
193-
static let actionButtonTitle =
194-
NSLocalizedString("Set up blogging reminders", comment: "Title for button that will open up the blogging reminders screen.")
195-
196-
static let completedTipTitle =
197-
NSLocalizedString("You set up blogging reminders",
198-
comment: "A hint to users that they've set up blogging reminders.")
199-
200-
static let completedDetailsTitle =
201-
NSLocalizedString("Keep blogging and check back to see visitors arriving at your site.",
202-
comment: "A detailed message to users indicating that they've set up blogging reminders.")
203-
204-
static let completedActionButtonTitle =
205-
NSLocalizedString("Edit reminders", comment: "Title for button that will open up the blogging reminders screen.")
212+
static let detailsTitle = NSLocalizedString(
213+
"growAudienceCell.bloggingReminders.details",
214+
value: "Posting regularly can help build an audience. Reminders help keep you on track.",
215+
comment: "A detailed message to users about growing the audience for their site through blogging reminders."
216+
)
217+
218+
static let actionButtonTitle = NSLocalizedString(
219+
"growAudienceCell.bloggingReminders.actionButton",
220+
value: "Set up blogging reminders",
221+
comment: "Title for button that will open up the blogging reminders screen."
222+
)
223+
224+
static let completedTipTitle = NSLocalizedString(
225+
"growAudienceCell.bloggingReminders.completed.tip",
226+
value: "You set up blogging reminders",
227+
comment: "A hint to users that they've set up blogging reminders."
228+
)
229+
230+
static let completedDetailsTitle = NSLocalizedString(
231+
"growAudienceCell.bloggingReminders.completed.details",
232+
value: "Keep blogging and check back to see visitors arriving at your site.",
233+
comment: "A detailed message to users indicating that they've set up blogging reminders."
234+
)
235+
236+
static let completedActionButtonTitle = NSLocalizedString(
237+
"growAudienceCell.bloggingReminders.completed.actionButton",
238+
value: "Edit reminders",
239+
comment: "Title for button that will open up the blogging reminders screen."
240+
)
206241
}
207242

208243
enum ReaderDiscover {
209-
static let detailsTitle =
210-
NSLocalizedString("Connect with other bloggers by following, liking and commenting on their posts.",
211-
comment: "A detailed message to users about growing the audience for their site through reader discover.")
212-
213-
static let actionButtonTitle =
214-
NSLocalizedString("Discover blogs to follow", comment: "Title for button that will open up the follow topics screen.")
215-
216-
static let completedTipTitle =
217-
NSLocalizedString("You've connected with other blogs",
218-
comment: "A hint to users that they've set up reader discover.")
219-
220-
static let completedDetailsTitle =
221-
NSLocalizedString("Keep going! Liking and commenting is a good way to build a network. Go to Reader to find more posts.",
222-
comment: "A detailed message to users indicating that they've set up reader discover.")
223-
224-
static let completedActionButtonTitle =
225-
NSLocalizedString("Do it again", comment: "Title for button that will open up the follow topics screen.")
244+
static let detailsTitle = NSLocalizedString(
245+
"growAudienceCell.readerDiscover.details",
246+
value: "Connect with other bloggers by following, liking and commenting on their posts.",
247+
comment: "A detailed message to users about growing the audience for their site through reader discover."
248+
)
249+
250+
static let actionButtonTitle = NSLocalizedString(
251+
"growAudienceCell.readerDiscover.actionButton",
252+
value: "Discover blogs to follow",
253+
comment: "Title for button that will open up the follow topics screen."
254+
)
255+
256+
static let completedTipTitle = NSLocalizedString(
257+
"growAudienceCell.readerDiscover.completed.tip",
258+
value: "You've connected with other blogs",
259+
comment: "A hint to users that they've set up reader discover."
260+
)
261+
262+
static let completedDetailsTitle = NSLocalizedString(
263+
"growAudienceCell.readerDiscover.completed.details",
264+
value: "Keep going! Liking and commenting is a good way to build a network. Go to Reader to find more posts.",
265+
comment: "A detailed message to users indicating that they've set up reader discover."
266+
)
267+
268+
static let completedActionButtonTitle = NSLocalizedString(
269+
"growAudienceCell.readerDiscover.completed.action",
270+
value: "Do it again",
271+
comment: "Title for button that will open up the follow topics screen."
272+
)
226273
}
227274
}
228275

0 commit comments

Comments
 (0)