Skip to content

Commit f604996

Browse files
authored
Merge pull request #5527 from wikimedia/T402696_fix
Fix YIR issues
2 parents 87ff409 + 370216d commit f604996

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

WMFComponents/Sources/WMFComponents/Components/Year in Review/View Models/WMFYearInReviewViewModel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,11 @@ public class WMFYearInReviewViewModel: ObservableObject {
10841084

10851085
let slide = currentSlide
10861086
switch slide {
1087+
case .contribution(let viewModel):
1088+
if viewModel.contributionStatus == .noncontributor {
1089+
return false
1090+
}
1091+
break
10871092
default:
10881093
break
10891094
}

Wikipedia/Code/YearInReviewCoordinator.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
147147
personalizedYourEditsViewedSlideSubtitle: personalizedYourEditsViewedSlideSubtitle(views:),
148148
personalizedThankYouTitle: WMFLocalizedString("year-in-review-personalized-donate-title", value: "Your generosity helped keep Wikipedia thriving", comment: "Year in review, personalized donate slide title for users that donated at least once that year. "),
149149
personalizedThankYouSubtitle: personalizedThankYouSubtitle(languageCode:),
150-
personalizedMostReadCategoriesSlideTitle: "Your most interesting categories", // TODO: Localize when we have final product requirements,
151-
personalizedMostReadCategoriesSlideSubtitle: personalizedListSlideSubtitle(items:),
150+
personalizedMostReadCategoriesSlideTitle: WMFLocalizedString("year-in-review-most-read-categories-title", value: "Your most interesting categories", comment: "Year in review, personalized categories slide title"),
151+
personalizedMostReadCategoriesSlideSubtitle: personalizedMostReadCategoriesSlideSubtitle(items:),
152152
personalizedMostReadArticlesSlideTitle: WMFLocalizedString("year-in-review-personalized-most-read-articles-title", value: "Your top articles", comment: "Year in review, personalized most read articles slide title"),
153-
personalizedMostReadArticlesSlideSubtitle: personalizedListSlideSubtitle(items:),
153+
personalizedMostReadArticlesSlideSubtitle: personalizedMostReadArticlesSlideSubtitle(items:),
154154
personalizedLocationSlideTitle: personalizedLocationSlideTitle(countryOrOcean:),
155155
personalizedLocationSlideSubtitle: personalizedLocationSlideSubtitle(articleNames:),
156156
noncontributorTitle: noncontributorTitle(),
@@ -744,6 +744,16 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
744744
return "\(listItems)"
745745
}
746746

747+
func personalizedMostReadCategoriesSlideSubtitle(items: [String]) -> String {
748+
let format = WMFLocalizedString("year-in-review-categories-slide-subtitle", value: "Categories group articles on similar subjects together. In 2025, you visited articles in these interesting categories multiple times\n%1$@", comment: "Year in review categories slide subtitle, $1 is the list of top categories.")
749+
return String.localizedStringWithFormat(format, personalizedListSlideSubtitle(items: items))
750+
}
751+
752+
func personalizedMostReadArticlesSlideSubtitle(items: [String]) -> String {
753+
let format = WMFLocalizedString("year-in-review-articles-slide-subtitle", value: "Here were the articles you visited the most in 2025:\n%1$@", comment: "Year in review articles slide subtitle, $1 is the list of top articles.")
754+
return String.localizedStringWithFormat(format, personalizedListSlideSubtitle(items: items))
755+
}
756+
747757
func personalizedLocationSlideTitle(countryOrOcean: String) -> String {
748758
let format = WMFLocalizedString("year-in-review-personalized-location-title-format", value: "Articles you read are closest to %1$@", comment: "Year in review, personalized location slide title. %1$@ is replaced with a country or ocean name.")
749759
return String.localizedStringWithFormat(format, countryOrOcean)

Wikipedia/Localizations/en.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@
14641464
"wikitext-upload-save-sign-in" = "Log in";
14651465
"wikitext-upload-save-terms-and-licenses-ccsa4" = "By publishing changes, you agree to the $1Terms of Use$2, and you irrevocably agree to release your contribution under the $3CC BY-SA 4.0$4 License and the $5GFDL$6. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.";
14661466
"wikitext-upload-save-terms-name" = "Terms of Use";
1467+
"year-in-review-articles-slide-subtitle" = "Here were the articles you visited the most in 2025:\n$1";
14671468
"year-in-review-base-editors-subtitle" = "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.";
14681469
"year-in-review-base-editors-title" = "Editors on the official Wikipedia apps made {{PLURAL:$1|$1 edit|$1 edits}}";
14691470
"year-in-review-base-edits-subtitle" = "Articles are collaboratively created and improved using reliable sources. All of us have knowledge to share, [learn how to participate]($1).";
@@ -1475,6 +1476,7 @@
14751476
"year-in-review-base-viewed-subtitle" = "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.";
14761477
"year-in-review-base-viewed-title" = "App users viewed Wikipedia articles {{PLURAL:$1|$1 time|$1 times}}";
14771478
"year-in-review-button-title" = "Year in Review";
1479+
"year-in-review-categories-slide-subtitle" = "Categories group articles on similar subjects together. In 2025, you visited articles in these interesting categories multiple times\n$1";
14781480
"year-in-review-collective-article-views" = "An animated illustration of a computer screen with a web browser open, actively navigating through a Wikipedia article.";
14791481
"year-in-review-collective-edits" = "An illustration of two Wikipedia puzzle pieces, each carrying a piece of information.";
14801482
"year-in-review-collective-edits-per-minute" = "A clock ticking, symbolizing the time spent by people reading Wikipedia.";
@@ -1526,6 +1528,7 @@
15261528
"year-in-review-highlights-title" = "Thank you for spending your year with Wikipedia";
15271529
"year-in-review-intro-exit-toast-title" = "You can access your Year in Review later in Profile.";
15281530
"year-in-review-intro-login-title" = "Log in for personalization";
1531+
"year-in-review-most-read-categories-title" = "Your most interesting categories";
15291532
"year-in-review-non-contributor-slide-title" = "Unlock your contributor reward for next year!";
15301533
"year-in-review-noncontributor-slide-subtitle" = "We’re glad Wikipedia was part of your $1! Unlock a special reward in your $2 Year in Review by becoming a contributor—whether by [editing Wikipedia]($3) or by donating to the [Wikimedia Foundation]($4), the non-profit behind it. If Wikipedia is useful to you, please consider donating to help sustain its future and keep it free, ad-free, trustworthy, and accessible to all.";
15311534
"year-in-review-personalized-date-day-footer-v3" = "Favorite day to read";

Wikipedia/Localizations/qqq.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@
14641464
"wikitext-upload-save-sign-in" = "{{Identical|Log in}}";
14651465
"wikitext-upload-save-terms-and-licenses-ccsa4" = "Text for information about the Terms of Use and edit licenses. Parameters:\n* $1 - app-specific non-text formatting, $2 - app-specific non-text formatting, $3 - app-specific non-text formatting, $4 - app-specific non-text formatting, $5 - app-specific non-text formatting, $6 - app-specific non-text formatting.";
14661466
"wikitext-upload-save-terms-name" = "This message is used in the message [[Wikimedia:Wikipedia-ios-wikitext-upload-save-terms-and-license]].";
1467+
"year-in-review-articles-slide-subtitle" = "Year in review articles slide subtitle, $1 is the list of top articles.";
14671468
"year-in-review-base-editors-subtitle" = "Year in review, collective edits count slide subtitle.";
14681469
"year-in-review-base-editors-title" = "Year in review, collective edits count slide title, $1 is replaced with the number of edits made on apps, shown in numeric form (e.g. 124,356).";
14691470
"year-in-review-base-edits-subtitle" = "Year in review, collective edits per minute slide subtitle, $1 is replaced with a link to the Mediawiki Apps team FAQ about editing.";
@@ -1475,6 +1476,7 @@
14751476
"year-in-review-base-viewed-subtitle" = "Year in review, collective article view count subtitle.";
14761477
"year-in-review-base-viewed-title" = "Year in review, collective article view count slide title. $1 is replaced with the text representing the number of article views across Wikipedia on apps, shown in numeric form (e.g. 1,000,000,000).";
14771478
"year-in-review-button-title" = "Year in review title. Appears on buttons in the profile and settings menu.";
1479+
"year-in-review-categories-slide-subtitle" = "Year in review categories slide subtitle, $1 is the list of top categories.";
14781480
"year-in-review-collective-article-views" = "Accessibility description for the collective article views slide.";
14791481
"year-in-review-collective-edits" = "Accessibility description for the collective edits slide.";
14801482
"year-in-review-collective-edits-per-minute" = "Accessibility description for the collective edits per minute slide.";
@@ -1526,6 +1528,7 @@
15261528
"year-in-review-highlights-title" = "Title for year in review highlights slide";
15271529
"year-in-review-intro-exit-toast-title" = "Toast displayed to user after the exit Year in Review on the intro slide.";
15281530
"year-in-review-intro-login-title" = "Title of alert that asks user to login if they want to view the personalized feature.";
1531+
"year-in-review-most-read-categories-title" = "Year in review, personalized categories slide title";
15291532
"year-in-review-non-contributor-slide-title" = "Year in review, non contributor slide title";
15301533
"year-in-review-noncontributor-slide-subtitle" = "Year in review, noncontributor slide subtitle. $1 is replaced with the Year in Review target year (e.g. 2025). $2 is replaced with the Year in Review target year + 1 (e.g. 2026). $3 is replaced with a MediaWiki url with more information about editing. $4 is replaced with a MediaWiki url with more information about the Wikimedia Foundation. Do not alter markdown when translating.";
15311534
"year-in-review-personalized-date-day-footer-v3" = "Year in review, personalized slide footer text below the day-of-week that users read the most.";
1.16 KB
Binary file not shown.

0 commit comments

Comments
 (0)