Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T381334: Translations #5124

Merged
merged 16 commits into from
Jan 8, 2025
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: 1 addition & 1 deletion WMF Framework/CommonStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ public class CommonStrings: NSObject {

public static let logoutAlertMessage = WMFLocalizedString("main-menu-account-logout-are-you-sure-message", value: "Logging out will delete your locally stored account data (notifications and messages), but your account data will still be available on the web and will be re-downloaded if you log back in.", comment: "Message explaining what happens to local data when logging out.")

public static let joinLoginTitle = WMFLocalizedString("profile-page-join-title", value: "Join Wikipedia / Log in", comment: "Link to sign up or sign in")
public static let joinLoginTitle = WMFLocalizedString("profile-page-join-title", value: "Log in / Join Wikipedia", comment: "Link to sign up or sign in")

public static let noThanksTitle = WMFLocalizedString("variants-alert-dismiss-button", value: "No thanks", comment: "Dismiss button on alert used to inform users about variant support.")

Expand Down
56 changes: 19 additions & 37 deletions Wikipedia/Code/YearInReviewCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
var collectiveNumReadingLists: String {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
let number = NSNumber(31600000)
return formatter.string(from: number) ?? "31,600,000"
let number = NSNumber(62200000)
return formatter.string(from: number) ?? "62,200,000"
}

var collectiveNumEditsNumber: String {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
let number = NSNumber(452257)
return formatter.string(from: number) ?? "452,257"
let number = NSNumber(555647)
return formatter.string(from: number) ?? "555,647"
}

var collectiveNumEditsPerMinuteNumber: String {
Expand All @@ -52,8 +52,8 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
var collectiveNumViewsNumber: String {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
let number = NSNumber(1522941831)
return formatter.string(from: number) ?? "1,522,941,831"
let number = NSNumber(1800000000)
return formatter.string(from: number) ?? "1,800,000,000"
}

var languageCode: String? {
Expand Down Expand Up @@ -145,45 +145,45 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
}

var collectiveArticleViewsSlideTitle: String {
let format = WMFLocalizedString("year-in-review-base-viewed-title", value: "We have viewed Wikipedia articles %1$@ Billion times", comment: "Year in review, collective article view count slide title. %1$@ is replaced with the text representing the number of article views across Wikipedia, e.g. \"1.5\".")
let format = WMFLocalizedString("year-in-review-base-viewed-title", value: "We have viewed Wikipedia articles %1$@ Billion times", comment: "Year in review, collective article view count slide title. %1$@ is replaced with the text representing the number of article views across Wikipedia, e.g. \"1.8\".")

let numArticleViewsString = formatNumber(1.5, fractionDigits: 2)
let numArticleViewsString = formatNumber(1.8, fractionDigits: 2)

return String.localizedStringWithFormat(format, numArticleViewsString)
}

var collectiveArticleViewsSlideSubtitle: String {
let format = WMFLocalizedString("year-in-review-base-viewed-subtitle", value: "iOS app users have viewed Wikipedia articles %1$@ Billion times. For people around the world, Wikipedia is the first stop when answering a question, looking up information for school or work, or learning a new fact.", comment: "Year in review, collective article view count subtitle, %1$@ is replaced with the number of article views text, e.g. \"1.5\"")
let format = WMFLocalizedString("year-in-review-base-viewed-subtitle", value: "iOS app users have viewed Wikipedia articles %1$@ Billion times. For people around the world, Wikipedia is the first stop when answering a question, looking up information for school or work, or learning a new fact.", comment: "Year in review, collective article view count subtitle, %1$@ is replaced with the number of article views text, e.g. \"1.8\"")

let numArticleViewsString = formatNumber(1.5, fractionDigits: 2)
let numArticleViewsString = formatNumber(1.8, fractionDigits: 2)

return String.localizedStringWithFormat(format, numArticleViewsString)
}

var collectiveSavedArticlesSlideTitle: String {
let format = WMFLocalizedString("year-in-review-base-saved-title", value: "We had over %1$@ Million reading lists", comment: "Year in review, collective saved articles count slide title, %1$@ is replaced with the number of saved articles text, e.g. \"31.6\".")
let format = WMFLocalizedString("year-in-review-base-saved-title", value: "We had over %1$@ Million reading lists", comment: "Year in review, collective saved articles count slide title, %1$@ is replaced with the number of saved articles text, e.g. \"62.6\".")

let numSavedArticlesString = formatNumber(31.6, fractionDigits: 2)
let numSavedArticlesString = formatNumber(62.2, fractionDigits: 2)
return String.localizedStringWithFormat(format, numSavedArticlesString)
}

var collectiveSavedArticlesSlideSubtitle: String {
let format = WMFLocalizedString("year-in-review-base-saved-subtitle", value: "Active iOS App users had over 31.6 million reading lists this year. Adding articles to reading lists allows you to access articles even while offline. You can also log in to sync reading lists across devices.", comment: "Year in review, collective saved articles count slide subtitle")
let format = WMFLocalizedString("year-in-review-base-saved-subtitle", value: "Active iOS App users had over 62.2 million reading lists this year. Adding articles to reading lists allows you to access articles even while offline. You can also log in to sync reading lists across devices.", comment: "Year in review, collective saved articles count slide subtitle")
return String.localizedStringWithFormat(format)
}

var collectiveAmountEditsSlideTitle: String {
let format = WMFLocalizedString("year-in-review-base-editors-title", value: "Editors on the iOS app made more than %1$@ edits", comment: "Year in review, collective edits count slide title, %1$@ is replaced with the number of edits text, e.g. \"452,257\".")
let format = WMFLocalizedString("year-in-review-base-editors-title", value: "Editors on the iOS app made more than %1$@ edits", comment: "Year in review, collective edits count slide title, %1$@ is replaced with the number of edits text, e.g. \"555,647\".")

let numEditsString = formatNumber(452257, fractionDigits: 0)
let numEditsString = formatNumber(555647, fractionDigits: 0)

return String.localizedStringWithFormat(format, numEditsString)
}

var collectiveAmountEditsSlideSubtitle: String {
let format = WMFLocalizedString("year-in-review-base-editors-subtitle", value: "Volunteers made 81,987,181 changes across over 300 different language editions of Wikipedia. Over 31.2 million changes were made on English Wikipedia. Every hour of every day, volunteers are working to improve Wikipedia.", comment: "Year in review, collective edits count slide subtitle.")
let format = WMFLocalizedString("year-in-review-base-editors-subtitle", value: "Wikipedia's community of volunteer editors made more than 555,647 edits on the iOS app so far this year. The heart and soul of Wikipedia is our global community of volunteer contributors, donors, and billions of readers like yourself – all united to share unlimited access to reliable information.", comment: "Year in review, collective edits count slide subtitle.")

let numEditsString = formatNumber(452257, fractionDigits: 0)
let numEditsString = formatNumber(555647, fractionDigits: 0)

return String.localizedStringWithFormat(format, numEditsString)
}
Expand Down Expand Up @@ -218,24 +218,6 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
}

// MARK: - English Slide Strings
var englishExploreSlideTitle: String {
let format = WMFLocalizedString(
"microsite-yir-english-explore-slide",
value: "Explore Wikipedia in Review",
comment: "Explore slide title for English Year in Review."
)
return String.localizedStringWithFormat(format)
}

var englishExploreSlideSubtitle: String {
let format = WMFLocalizedString(
"microsite-yir-english-explore-slide-subtitle",
value: "Wikipedia is the largest knowledge resource ever assembled in the history of the world, and it’s freely available to everyone everywhere. Look back on 2024 through the lens of Wikipedia.",
comment: "Explore slide subtitle for English Year in Review."
)
return String.localizedStringWithFormat(format)
}

var englishReadingSlideTitle: String {
let format = WMFLocalizedString(
"microsite-yir-english-reading-slide-title",
Expand Down Expand Up @@ -286,7 +268,7 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
var englishSavedReadingSlideTitle: String {
let format = WMFLocalizedString(
"microsite-yir-english-saved-reading-slide-title",
value: "We had over 31.6 million reading lists",
value: "We had over 62.2 million reading lists",
comment: "Saved reading slide title for English Year in Review."
)
return String.localizedStringWithFormat(format)
Expand All @@ -295,7 +277,7 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
var englishSavedReadingSlideSubtitle: String {
let format = WMFLocalizedString(
"microsite-yir-english-saved-reading-slide-subtitle",
value: "Active iOS App users had over 31.6 million reading lists this year. Adding articles to reading lists allows you to access articles even while offline. You can also log in to sync reading lists across devices.",
value: "Active iOS App users had over 62.2 million reading lists this year. Adding articles to reading lists allows you to access articles even while offline. You can also log in to sync reading lists across devices.",
comment: "Saved reading slide subtitle for English Year in Review."
)
return String.localizedStringWithFormat(format)
Expand Down
Loading
Loading