diff --git a/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReview.swift b/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReview.swift index 1fb3314287..b519aa6097 100644 --- a/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReview.swift +++ b/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReview.swift @@ -38,8 +38,13 @@ public struct WMFYearInReview: View { WMFYearInReviewScrollView(scrollViewContents: scrollViewContent, contents: { AnyView(buttonsFirstSlide) }) .frame(maxWidth: .infinity, maxHeight: .infinity) } else if viewModel.isEdgeSlide { - WMFYearInReviewScrollView(scrollViewContents: scrollViewContent) - .frame(maxWidth: .infinity, maxHeight: .infinity) + if viewModel.hasDonated { + WMFYearInReviewScrollView(scrollViewContents: scrollViewContent) + .frame(maxWidth: .infinity, maxHeight: .infinity) + } else { + WMFYearInReviewScrollView(scrollViewContents: scrollViewContent, contents: { AnyView(buttonsLastSlide) }) + .frame(maxWidth: .infinity, maxHeight: .infinity) + } } else { VStack { TabView(selection: $viewModel.currentSlide) { @@ -131,6 +136,9 @@ public struct WMFYearInReview: View { // Has donated or not if viewModel.hasDonated { VStack(alignment: .leading, spacing: 16) { + Image("globe", bundle: .module) + .frame(maxWidth: .infinity, alignment: .center) + .padding(.top, 48) Text(viewModel.localizedStrings.firstSlideTitle) .font(Font(WMFFont.for(.boldTitle1))) Text(viewModel.localizedStrings.firstSlideSubtitle) @@ -139,6 +147,9 @@ public struct WMFYearInReview: View { .foregroundStyle(Color(uiColor: theme.text)) } else { VStack(alignment: .leading, spacing: 16) { + Image("globe", bundle: .module) + .frame(maxWidth: .infinity, alignment: .center) + .padding(.top, 48) Text(viewModel.localizedStrings.firstSlideTitle) .font(Font(WMFFont.for(.boldTitle1))) Text(viewModel.localizedStrings.firstSlideSubtitle) @@ -164,31 +175,15 @@ public struct WMFYearInReview: View { } private var buttonsLastSlide: some View { - Group { - if viewModel.hasDonated { - VStack { - WMFLargeButton(configuration: .primary, title: viewModel.localizedStrings.firstSlideCTA) { - withAnimation(.easeInOut(duration: 0.75)) { - viewModel.getStarted() - } - } - WMFSmallButton(configuration: configuration, title: viewModel.localizedStrings.firstSlideHide) { - // TODO: Implement hide this feature - } - } - } else { - VStack { - WMFLargeButton(configuration: .primary, title: viewModel.localizedStrings.firstSlideCTA) { - withAnimation(.easeInOut(duration: 0.75)) { - viewModel.getStarted() - } - } - WMFSmallButton(configuration: configuration, title: viewModel.localizedStrings.firstSlideHide) { - // TODO: Implement hide this feature - } + VStack { + WMFLargeButton(configuration: .primary, title: viewModel.localizedStrings.lastSlideCTA) { + withAnimation(.easeInOut(duration: 0.75)) { + // TODO: Implement this feature } } - + WMFSmallButton(configuration: configuration, title: viewModel.localizedStrings.lastSlideDonate) { + // TODO: Implement this feature + } } } } diff --git a/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewViewModel.swift b/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewViewModel.swift index 92507c2d51..f708506127 100644 --- a/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewViewModel.swift +++ b/WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewViewModel.swift @@ -24,7 +24,7 @@ public class WMFYearInReviewViewModel: ObservableObject { self.shareLink = shareLink self.hashtag = hashtag self.coordinatorDelegate = coordinatorDelegate - self.hasDonated = true + self.hasDonated = false } public func getStarted() { @@ -42,10 +42,12 @@ public class WMFYearInReviewViewModel: ObservableObject { let firstSlideSubtitle: String let firstSlideCTA: String let firstSlideHide: String + let lastSlideCTA: String + let lastSlideDonate: String public let shareText: String public let usernameTitle: String - public init(donateButtonTitle: String, doneButtonTitle: String, shareButtonTitle: String, nextButtonTitle: String, finishButtonTitle: String, firstSlideTitle: String, firstSlideSubtitle: String, firstSlideCTA: String, firstSlideHide: String, shareText: String, usernameTitle: String) { + public init(donateButtonTitle: String, doneButtonTitle: String, shareButtonTitle: String, nextButtonTitle: String, finishButtonTitle: String, firstSlideTitle: String, firstSlideSubtitle: String, firstSlideCTA: String, firstSlideHide: String, lastSlideCTA: String, lastSlideDonate: String, shareText: String, usernameTitle: String) { self.donateButtonTitle = donateButtonTitle self.doneButtonTitle = doneButtonTitle self.shareButtonTitle = shareButtonTitle @@ -55,6 +57,8 @@ public class WMFYearInReviewViewModel: ObservableObject { self.firstSlideSubtitle = firstSlideSubtitle self.firstSlideCTA = firstSlideCTA self.firstSlideHide = firstSlideHide + self.lastSlideCTA = lastSlideCTA + self.lastSlideDonate = lastSlideDonate self.shareText = shareText self.usernameTitle = usernameTitle } diff --git a/Wikipedia/Code/YearInReviewCoordinator.swift b/Wikipedia/Code/YearInReviewCoordinator.swift index 95cc294205..6f32b1df2d 100644 --- a/Wikipedia/Code/YearInReviewCoordinator.swift +++ b/Wikipedia/Code/YearInReviewCoordinator.swift @@ -196,6 +196,8 @@ final class YearInReviewCoordinator: NSObject, Coordinator { firstSlideSubtitle: WMFLocalizedString("year-in-review-subtitle", value: "See insights about which articles you read on the Wikipedia app and the edits you made. Share your journey and discover what stood out for you this year. Your reading history is kept protected. Reading insights are calculated using locally stored data on your device.", comment: "Year in review page information"), firstSlideCTA: WMFLocalizedString("year-in-review-get-started", value: "Get Started", comment: "Button to continue to year in review"), firstSlideHide: WMFLocalizedString("year-in-review-hide", value: "Hide this feature", comment: "Button to hide year in review feature"), + lastSlideCTA: WMFLocalizedString("year-in-review-learn-more", value: "Learn more about our work", comment: "Button to navigate to learn more about our work."), + lastSlideDonate: WMFLocalizedString("year-in-review-already-donate", value: "I already contribute", comment: "Button to let the app know that the user has already made a donation"), shareText: WMFLocalizedString("year-in-review-share-text", value: "Here's my Wikipedia year in review. Created with the Wikipedia iOS app", comment: "Text shared the Year In Review slides"), usernameTitle: CommonStrings.userTitle ) diff --git a/Wikipedia/Localizations/en.lproj/Localizable.strings b/Wikipedia/Localizations/en.lproj/Localizable.strings index eb34de43be..08e723546c 100644 --- a/Wikipedia/Localizations/en.lproj/Localizable.strings +++ b/Wikipedia/Localizations/en.lproj/Localizable.strings @@ -1397,6 +1397,7 @@ "year-in-review-2024-Wikipedia-num-edits-per-minute" = "342 edits per minute"; "year-in-review-2024-Wikipedia-num-languages" = "332 active languages"; "year-in-review-2024-Wikipedia-num-views" = "1.4 billion times"; +"year-in-review-already-donate" = "I already contribute"; "year-in-review-base-editors-subtitle" = "Wikipedia's community of volunteer editors made more than $1 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."; "year-in-review-base-editors-title" = "Editors on the iOS app made more than $1"; "year-in-review-base-edits-subtitle" = "This year, Wikipedia was edited at an average rate of $1. Articles are collaboratively created and improved using reliable sources. Each edit plays a crucial role in improving and expanding Wikipedia."; @@ -1410,6 +1411,7 @@ "year-in-review-finish" = "Finish"; "year-in-review-get-started" = "Get Started"; "year-in-review-hide" = "Hide this feature"; +"year-in-review-learn-more" = "Learn more about our work"; "year-in-review-next" = "Next"; "year-in-review-personalized-editing-subtitle-format" = "You edited Wikipedia {{PLURAL:$1|$1 time|$1 times}}. Thank you for being one of the volunteer editors making a difference on Wikimedia projects around the world."; "year-in-review-personalized-editing-subtitle-format-500plus" = "You edited Wikipedia 500+ times. Thank you for being one of the volunteer editors making a difference on Wikimedia projects around the world."; diff --git a/Wikipedia/Localizations/qqq.lproj/Localizable.strings b/Wikipedia/Localizations/qqq.lproj/Localizable.strings index c0d33315a6..0bdb36aec3 100644 --- a/Wikipedia/Localizations/qqq.lproj/Localizable.strings +++ b/Wikipedia/Localizations/qqq.lproj/Localizable.strings @@ -1397,6 +1397,7 @@ "year-in-review-2024-Wikipedia-num-edits-per-minute" = "Number of edits per minute made on Wikipedia. This text will be inserted into paragraph text displayed in Wikipedia Year in Review slides for 2024."; "year-in-review-2024-Wikipedia-num-languages" = "Number of active languages available on Wikipedia. This text will be inserted into paragraph text displayed in Wikipedia Year in Review slides for 2024."; "year-in-review-2024-Wikipedia-num-views" = "Number of article views on Wikipedia. This text will be inserted into paragraph text displayed in Wikipedia Year in Review slides for 2024."; +"year-in-review-already-donate" = "Button to let the app know that the user has already made a donation"; "year-in-review-base-editors-subtitle" = "Year in review, collective edits count slide subtitle, $1 is replaced with the number of edits text, e.g. \"460,300 edits\""; "year-in-review-base-editors-title" = "Year in review, collective edits count slide title, $1 is replaced with the number of edits text, e.g. \"460,300 edits\"."; "year-in-review-base-edits-subtitle" = "Year in review, collective edits per minute slide subtitle, $1 is replaced with the number of edits per minute text, e.g. \"342 times per minute\""; @@ -1410,6 +1411,7 @@ "year-in-review-finish" = "Year in review finish button"; "year-in-review-get-started" = "Button to continue to year in review"; "year-in-review-hide" = "Button to hide year in review feature"; +"year-in-review-learn-more" = "Button to navigate to learn more about our work."; "year-in-review-next" = "Year in review next button"; "year-in-review-personalized-editing-subtitle-format" = "Year in review, personalized editing article count slide subtitle for users that edited articles. $1 is replaced with the number of edits the user made."; "year-in-review-personalized-editing-subtitle-format-500plus" = "Year in review, personalized editing article count slide subtitle for users that edited articles more than 500 times."; diff --git a/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings b/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings index 013f417a26..cd6f23c1b8 100644 Binary files a/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings and b/Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings differ