From e3522deddd7a6c40e09ed7919537db799d4742da Mon Sep 17 00:00:00 2001 From: golson-wmf Date: Thu, 21 Nov 2024 09:32:52 -0500 Subject: [PATCH 1/3] Update FAQ link --- Wikipedia/Code/YearInReviewCoordinator.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Wikipedia/Code/YearInReviewCoordinator.swift b/Wikipedia/Code/YearInReviewCoordinator.swift index bc12c3376f..044f5057e5 100644 --- a/Wikipedia/Code/YearInReviewCoordinator.swift +++ b/Wikipedia/Code/YearInReviewCoordinator.swift @@ -140,7 +140,12 @@ final class YearInReviewCoordinator: NSObject, Coordinator { let format = WMFLocalizedString("year-in-review-base-edits-subtitle", value: "This year, Wikipedia was edited at an average rate of %1$@ times per minute. Articles are collaboratively created and improved using reliable sources. All of us have knowledge to share, [learn how to participate.](%2$@)", comment: "Year in review, collective edits per minute slide subtitle, %1$@ is replaced with the number of edits per minute text, e.g. \"342\". %2$@ is replaced with a link to the Mediawiki Apps team FAQ about editing.") let numEditsPerMinString = formatNumber(342, fractionDigits: 0) - let editingFAQ = "https://www.mediawiki.org/wiki/Special:MyLanguage/Wikimedia_Apps/iOS_FAQ#Editing" + var editingFAQ: String + if languageCode == "es" { + editingFAQ = "https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ/es#Edici%C3%B3n" + } else { + editingFAQ = "https://www.mediawiki.org/wiki/Special:MyLanguage/Wikimedia_Apps/iOS_FAQ#Editing" + } return String.localizedStringWithFormat(format, numEditsPerMinString, editingFAQ) } From 0f4340a23976f743a7fdf3512562b339dbbc53ef Mon Sep 17 00:00:00 2001 From: golson-wmf Date: Thu, 21 Nov 2024 09:42:44 -0500 Subject: [PATCH 2/3] Update to use 1 --- Wikipedia/Code/YearInReviewCoordinator.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Wikipedia/Code/YearInReviewCoordinator.swift b/Wikipedia/Code/YearInReviewCoordinator.swift index 044f5057e5..4425403829 100644 --- a/Wikipedia/Code/YearInReviewCoordinator.swift +++ b/Wikipedia/Code/YearInReviewCoordinator.swift @@ -140,12 +140,7 @@ final class YearInReviewCoordinator: NSObject, Coordinator { let format = WMFLocalizedString("year-in-review-base-edits-subtitle", value: "This year, Wikipedia was edited at an average rate of %1$@ times per minute. Articles are collaboratively created and improved using reliable sources. All of us have knowledge to share, [learn how to participate.](%2$@)", comment: "Year in review, collective edits per minute slide subtitle, %1$@ is replaced with the number of edits per minute text, e.g. \"342\". %2$@ is replaced with a link to the Mediawiki Apps team FAQ about editing.") let numEditsPerMinString = formatNumber(342, fractionDigits: 0) - var editingFAQ: String - if languageCode == "es" { - editingFAQ = "https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ/es#Edici%C3%B3n" - } else { - editingFAQ = "https://www.mediawiki.org/wiki/Special:MyLanguage/Wikimedia_Apps/iOS_FAQ#Editing" - } + let editingFAQ = "https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ/\(languageCode ?? "")#Editing" return String.localizedStringWithFormat(format, numEditsPerMinString, editingFAQ) } From 490e1c65c7b8ea821d0a50705ed645acc74ecadb Mon Sep 17 00:00:00 2001 From: golson-wmf Date: Thu, 21 Nov 2024 09:51:09 -0500 Subject: [PATCH 3/3] ctrl z --- Wikipedia/Code/YearInReviewCoordinator.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Wikipedia/Code/YearInReviewCoordinator.swift b/Wikipedia/Code/YearInReviewCoordinator.swift index 4425403829..044f5057e5 100644 --- a/Wikipedia/Code/YearInReviewCoordinator.swift +++ b/Wikipedia/Code/YearInReviewCoordinator.swift @@ -140,7 +140,12 @@ final class YearInReviewCoordinator: NSObject, Coordinator { let format = WMFLocalizedString("year-in-review-base-edits-subtitle", value: "This year, Wikipedia was edited at an average rate of %1$@ times per minute. Articles are collaboratively created and improved using reliable sources. All of us have knowledge to share, [learn how to participate.](%2$@)", comment: "Year in review, collective edits per minute slide subtitle, %1$@ is replaced with the number of edits per minute text, e.g. \"342\". %2$@ is replaced with a link to the Mediawiki Apps team FAQ about editing.") let numEditsPerMinString = formatNumber(342, fractionDigits: 0) - let editingFAQ = "https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ/\(languageCode ?? "")#Editing" + var editingFAQ: String + if languageCode == "es" { + editingFAQ = "https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ/es#Edici%C3%B3n" + } else { + editingFAQ = "https://www.mediawiki.org/wiki/Special:MyLanguage/Wikimedia_Apps/iOS_FAQ#Editing" + } return String.localizedStringWithFormat(format, numEditsPerMinString, editingFAQ) }