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
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,26 @@ extension PostSettingsViewController {
}

struct FeaturedImageActionSheet {
static let title = NSLocalizedString("Featured Image Options", comment: "Title for action sheet with featured media options.")
static let dismissActionTitle = NSLocalizedString("Dismiss", comment: "User action to dismiss featured media options.")
static let retryUploadActionTitle = NSLocalizedString("Retry", comment: "User action to retry featured media upload.")
static let removeActionTitle = NSLocalizedString("Remove", comment: "User action to remove featured media.")
static let title = NSLocalizedString(
"postSettings.featuredImageUploadActionSheet.title",
value: "Featured Image Options",
comment: "Title for action sheet with featured media options."
)
static let dismissActionTitle = NSLocalizedString(
"postSettings.featuredImageUploadActionSheet.dismiss",
value: "Dismiss",
comment: "User action to dismiss featured media options."
)
static let retryUploadActionTitle = NSLocalizedString(
"postSettings.featuredImageUploadActionSheet.retryUpload",
value: "Retry",
comment: "User action to retry featured media upload."
)
static let removeActionTitle = NSLocalizedString(
"postSettings.featuredImageUploadActionSheet.remove",
value: "Remove",
comment: "User action to remove featured media."
)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,22 @@ extension QRLoginVerifyAuthorizationViewController {

enum completed {
static let imageName = "domains-success"
static let title = NSLocalizedString("You're logged in!", comment: "Title for the success view when the user has successfully logged in")
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")
static let confirmButton = NSLocalizedString("Dismiss", comment: "Button label that dismisses the qr log in flow and returns the user back to the previous screen")
static let title = NSLocalizedString(
"qrLoginVerifyAuthorization.completedInstructions.title",
value: "You're logged in!",
comment: "Title for the success view when the user has successfully logged in"
)
private static let subtitleFormat = NSLocalizedString(
"qrLoginVerifyAuthorization.completedInstructions.subtitle",
value: "Tap '%@' 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. %@ is a placeholder for the dismiss button name."
)
static let confirmButton = NSLocalizedString(
"qrLoginVerifyAuthorization.completedInstructions.dismiss",
value: "Dismiss",
comment: "Button label that dismisses the qr log in flow and returns the user back to the previous screen"
)
static let subtitle = String(format: subtitleFormat, Self.confirmButton)
Comment on lines +204 to +214
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment in the commit: ea70a12#comments

}

enum noConnection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1101,20 +1101,61 @@ extension ReaderDetailViewController: UIViewControllerRestoration {
// MARK: - Strings
extension ReaderDetailViewController {
private struct Strings {
static let backButtonAccessibilityLabel = NSLocalizedString("Back", comment: "Spoken accessibility label")
static let dismissButtonAccessibilityLabel = NSLocalizedString("Dismiss", comment: "Spoken accessibility label")
static let safariButtonAccessibilityLabel = NSLocalizedString("Open in Safari", comment: "Spoken accessibility label")
static let shareButtonAccessibilityLabel = NSLocalizedString("Share", comment: "Spoken accessibility label")
static let moreButtonAccessibilityLabel = NSLocalizedString("More", comment: "Spoken accessibility label")
static let localPostsSectionTitle = NSLocalizedString("More from %1$@", comment: "Section title for local related posts. %1$@ is a placeholder for the blog display name.")
static let globalPostsSectionTitle = NSLocalizedString("More on WordPress.com", comment: "Section title for global related posts.")
static let tooltipTitle = NSLocalizedString("Follow the conversation", comment: "Title of follow conversations tooltip.")
static let backButtonAccessibilityLabel = NSLocalizedString(
"readerDetail.backButton.accessibilityLabel",
value: "Back",
comment: "Spoken accessibility label"
)
static let dismissButtonAccessibilityLabel = NSLocalizedString(
"readerDetail.dismissButton.accessibilityLabel",
value: "Dismiss",
comment: "Spoken accessibility label"
)
static let safariButtonAccessibilityLabel = NSLocalizedString(
"readerDetail.backButton.accessibilityLabel",
value: "Open in Safari",
comment: "Spoken accessibility label"
)
static let shareButtonAccessibilityLabel = NSLocalizedString(
"readerDetail.shareButton.accessibilityLabel",
value: "Share",
comment: "Spoken accessibility label"
)
static let moreButtonAccessibilityLabel = NSLocalizedString(
"readerDetail.moreButton.accessibilityLabel",
value: "More",
comment: "Spoken accessibility label"
)
static let localPostsSectionTitle = NSLocalizedString(
"readerDetail.localPostsSection.accessibilityLabel",
value: "More from %1$@",
comment: "Section title for local related posts. %1$@ is a placeholder for the blog display name."
)
static let globalPostsSectionTitle = NSLocalizedString(
"readerDetail.globalPostsSection.accessibilityLabel",
value: "More on WordPress.com",
comment: "Section title for global related posts."
)
static let tooltipTitle = NSLocalizedString(
"readerDetail.followConversationTooltipTitle.accessibilityLabel",
value: "Follow the conversation",
comment: "Title of follow conversations tooltip."
)
static let tooltipMessage = NSLocalizedString(
"Get notified when new comments are added to this post.",
"readerDetail.followConversationTooltipMessage.accessibilityLabel",
value: "Get notified when new comments are added to this post.",
comment: "Message for the follow conversations tooltip."
)
static let tooltipButtonTitle = NSLocalizedString("Got it", comment: "Button title for the follow conversations tooltip.")
static let tooltipAnchorTitle = NSLocalizedString("New", comment: "Title for the tooltip anchor.")
static let tooltipButtonTitle = NSLocalizedString(
"readerDetail.followConversationTooltipButton.accessibilityLabel",
value: "Got it",
comment: "Button title for the follow conversations tooltip."
)
static let tooltipAnchorTitle = NSLocalizedString(
"readerDetail.tooltipAnchorTitle.accessibilityLabel",
value: "New",
comment: "Title for the tooltip anchor."
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,36 @@ private extension CustomizeInsightsCell {
// MARK: - Constants

struct Labels {
static let title = NSLocalizedString("Customize your insights", comment: "Customize Insights title")
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")
static let tryIt = NSLocalizedString("Try it now", comment: "Customize Insights button title")
static let dismiss = NSLocalizedString("Dismiss", comment: "Customize Insights button title")
static let dismissHint = NSLocalizedString("Tap to dismiss this card", comment: "Accessibility hint")
static let tryItHint = NSLocalizedString("Tap to customize insights", comment: "Accessibility hint")
static let title = NSLocalizedString(
"customizeInsightsCell.title",
value: "Customize your insights",
comment: "Customize Insights title"
)
static let content = NSLocalizedString(
"customizeInsightsCell.content",
value: "Create your own customized dashboard and choose what reports to see. Focus on the data you care most about.",
comment: "Customize Insights description"
)
static let tryIt = NSLocalizedString(
"customizeInsightsCell.tryItButton.title",
value: "Try it now",
comment: "Customize Insights button title"
)
static let dismiss = NSLocalizedString(
"customizeInsightsCell.dismissButton.title",
value: "Dismiss",
comment: "Customize Insights button title"
)
static let dismissHint = NSLocalizedString(
"customizeInsightsCell.dismissButton.accessibilityHint",
value: "Tap to dismiss this card",
comment: "Accessibility hint"
)
static let tryItHint = NSLocalizedString(
"customizeInsightsCell.tryItButton.accessibilityHint",
value: "Tap to customize insights",
comment: "Accessibility hint"
)
}

}
173 changes: 110 additions & 63 deletions WordPress/Classes/ViewRelated/Stats/Shared Views/GrowAudienceCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,29 @@ class GrowAudienceCell: UITableViewCell, NibLoadable {

private enum Strings {

static let viewsCountDescriptionSingular =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the diff in this this file is too noisy because of the formatting and indentation changes, checkout the isolated commit that adds the reverse-DNS keys 9162d30 (#19635)

NSLocalizedString("View to your site so far", comment: "Description for view count. Singular.")

static let viewsCountDescriptionPlural =
NSLocalizedString("Views to your site so far", comment: "Description for view count. Singular.")

static let tipTitle =
NSLocalizedString("A tip to grow your audience",
comment: "A hint to users about growing the audience for their site, when their site doesn't have many views yet.")

static let dismissButtonTitle =
NSLocalizedString("Dismiss", comment: "Title for button that will dismiss the Grow Your Audience card.")
static let viewsCountDescriptionSingular = NSLocalizedString(
"growAudienceCell.viewsCount.singular",
value: "View to your site so far",
comment: "Description for view count. Singular."
)

static let viewsCountDescriptionPlural = NSLocalizedString(
"growAudienceCell.viewsCount.plural",
value: "Views to your site so far",
comment: "Description for view count. Singular."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR, but it might be worth to explore using .stirngsdict to localize plurals.


static let tipTitle = NSLocalizedString(
"growAudienceCell.tip",
value: "A tip to grow your audience",
comment: "A hint to users about growing the audience for their site, when their site doesn't have many views yet."
)

static let dismissButtonTitle = NSLocalizedString(
"growAudienceCell.dismiss",
value: "Dismiss",
comment: "Title for button that will dismiss the Grow Your Audience card."
)

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

enum Social {
static let detailsTitle =
NSLocalizedString("Automatically share new posts to your social media to start bringing that audience over to your site.",
comment: "A detailed message to users about growing the audience for their site through enabling post sharing.")

static let actionButtonTitle =
NSLocalizedString("Enable post sharing", comment: "Title for button that will open up the social media Sharing screen.")

static let completedTipTitle =
NSLocalizedString("Sharing is set up!",
comment: "A hint to users that they've set up post sharing.")

static let completedDetailsTitle =
NSLocalizedString("When you publish your next post it will be automatically shared to your connected networks.",
comment: "A detailed message to users indicating that they've set up post sharing.")

static let completedActionButtonTitle =
NSLocalizedString("Connect more networks", comment: "Title for button that will open up the social media Sharing screen.")
static let detailsTitle = NSLocalizedString(
"growAudienceCell.social.title",
value: "Automatically share new posts to your social media to start bringing that audience over to your site.",
comment: "A detailed message to users about growing the audience for their site through enabling post sharing."
)

static let actionButtonTitle = NSLocalizedString(
"growAudienceCell.social.actionButton",
value: "Enable post sharing",
comment: "Title for button that will open up the social media Sharing screen."
)

static let completedTipTitle = NSLocalizedString(
"growAudienceCell.social.completed.title",
value: "Sharing is set up!",
comment: "A hint to users that they've set up post sharing."
)

static let completedDetailsTitle = NSLocalizedString(
"growAudienceCell.social.completed.details",
value: "When you publish your next post it will be automatically shared to your connected networks.",
comment: "A detailed message to users indicating that they've set up post sharing."
)

static let completedActionButtonTitle = NSLocalizedString(
"growAudienceCell.social.completed.button",
value: "Connect more networks",
comment: "Title for button that will open up the social media Sharing screen."
)
}

enum BloggingReminders {
static let detailsTitle =
NSLocalizedString("Posting regularly can help build an audience. Reminders help keep you on track.",
comment: "A detailed message to users about growing the audience for their site through blogging reminders.")

static let actionButtonTitle =
NSLocalizedString("Set up blogging reminders", comment: "Title for button that will open up the blogging reminders screen.")

static let completedTipTitle =
NSLocalizedString("You set up blogging reminders",
comment: "A hint to users that they've set up blogging reminders.")

static let completedDetailsTitle =
NSLocalizedString("Keep blogging and check back to see visitors arriving at your site.",
comment: "A detailed message to users indicating that they've set up blogging reminders.")

static let completedActionButtonTitle =
NSLocalizedString("Edit reminders", comment: "Title for button that will open up the blogging reminders screen.")
static let detailsTitle = NSLocalizedString(
"growAudienceCell.bloggingReminders.details",
value: "Posting regularly can help build an audience. Reminders help keep you on track.",
comment: "A detailed message to users about growing the audience for their site through blogging reminders."
)

static let actionButtonTitle = NSLocalizedString(
"growAudienceCell.bloggingReminders.actionButton",
value: "Set up blogging reminders",
comment: "Title for button that will open up the blogging reminders screen."
)

static let completedTipTitle = NSLocalizedString(
"growAudienceCell.bloggingReminders.completed.tip",
value: "You set up blogging reminders",
comment: "A hint to users that they've set up blogging reminders."
)

static let completedDetailsTitle = NSLocalizedString(
"growAudienceCell.bloggingReminders.completed.details",
value: "Keep blogging and check back to see visitors arriving at your site.",
comment: "A detailed message to users indicating that they've set up blogging reminders."
)

static let completedActionButtonTitle = NSLocalizedString(
"growAudienceCell.bloggingReminders.completed.actionButton",
value: "Edit reminders",
comment: "Title for button that will open up the blogging reminders screen."
)
}

enum ReaderDiscover {
static let detailsTitle =
NSLocalizedString("Connect with other bloggers by following, liking and commenting on their posts.",
comment: "A detailed message to users about growing the audience for their site through reader discover.")

static let actionButtonTitle =
NSLocalizedString("Discover blogs to follow", comment: "Title for button that will open up the follow topics screen.")

static let completedTipTitle =
NSLocalizedString("You've connected with other blogs",
comment: "A hint to users that they've set up reader discover.")

static let completedDetailsTitle =
NSLocalizedString("Keep going! Liking and commenting is a good way to build a network. Go to Reader to find more posts.",
comment: "A detailed message to users indicating that they've set up reader discover.")

static let completedActionButtonTitle =
NSLocalizedString("Do it again", comment: "Title for button that will open up the follow topics screen.")
static let detailsTitle = NSLocalizedString(
"growAudienceCell.readerDiscover.details",
value: "Connect with other bloggers by following, liking and commenting on their posts.",
comment: "A detailed message to users about growing the audience for their site through reader discover."
)

static let actionButtonTitle = NSLocalizedString(
"growAudienceCell.readerDiscover.actionButton",
value: "Discover blogs to follow",
comment: "Title for button that will open up the follow topics screen."
)

static let completedTipTitle = NSLocalizedString(
"growAudienceCell.readerDiscover.completed.tip",
value: "You've connected with other blogs",
comment: "A hint to users that they've set up reader discover."
)

static let completedDetailsTitle = NSLocalizedString(
"growAudienceCell.readerDiscover.completed.details",
value: "Keep going! Liking and commenting is a good way to build a network. Go to Reader to find more posts.",
comment: "A detailed message to users indicating that they've set up reader discover."
)

static let completedActionButtonTitle = NSLocalizedString(
"growAudienceCell.readerDiscover.completed.action",
value: "Do it again",
comment: "Title for button that will open up the follow topics screen."
)
}
}

Expand Down
Loading