diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 6d65acc75246..9eef518266f9 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -18,6 +18,7 @@ * [*] [internal] Refactor uploading media assets. [#20294] * [*] Block editor: Allow new block transforms for most blocks. [https://github.com/WordPress/gutenberg/pull/48792] * [*] Visual improvements were made to the in-app survey along with updated text to differentiate between the WordPress and Jetpack apps. [#20276] +* [*] Reader: Resolve an issue that could cause the app to crash when blocking a post author. [#20421] 21.9 ----- diff --git a/WordPress/Classes/Services/BlazeService.swift b/WordPress/Classes/Services/BlazeService.swift index 5360cef45f95..1e90c5477ec8 100644 --- a/WordPress/Classes/Services/BlazeService.swift +++ b/WordPress/Classes/Services/BlazeService.swift @@ -3,12 +3,12 @@ import WordPressKit @objc final class BlazeService: NSObject { - private let contextManager: CoreDataStack + private let contextManager: CoreDataStackSwift private let remote: BlazeServiceRemote // MARK: - Init - required init?(contextManager: CoreDataStack = ContextManager.shared, + required init?(contextManager: CoreDataStackSwift = ContextManager.shared, remote: BlazeServiceRemote? = nil) { guard let account = try? WPAccount.lookupDefaultWordPressComAccount(in: contextManager.mainContext) else { return nil @@ -28,34 +28,40 @@ import WordPressKit /// /// - Parameters: /// - blog: A blog - /// - completion: Closure to be called on success + /// - completion: Closure to be called on completion @objc func getStatus(for blog: Blog, completion: (() -> Void)? = nil) { guard BlazeHelper.isBlazeFlagEnabled() else { - updateBlog(blog, isBlazeApproved: false, completion: completion) + updateBlogWithID(blog.objectID, isBlazeApproved: false, completion: completion) return } guard let siteId = blog.dotComID?.intValue else { DDLogError("Invalid site ID for Blaze") - updateBlog(blog, isBlazeApproved: false, completion: completion) + updateBlogWithID(blog.objectID, isBlazeApproved: false, completion: completion) return } remote.getStatus(forSiteId: siteId) { result in switch result { case .success(let approved): - self.updateBlog(blog, isBlazeApproved: approved, completion: completion) + self.updateBlogWithID(blog.objectID, isBlazeApproved: approved, completion: completion) case .failure(let error): DDLogError("Unable to fetch isBlazeApproved value from remote: \(error.localizedDescription)") - self.updateBlog(blog, isBlazeApproved: false, completion: completion) + self.updateBlogWithID(blog.objectID, isBlazeApproved: false, completion: completion) } } } - private func updateBlog(_ blog: Blog, isBlazeApproved: Bool, completion: (() -> Void)? = nil) { + private func updateBlogWithID(_ objectID: NSManagedObjectID, + isBlazeApproved: Bool, + completion: (() -> Void)? = nil) { contextManager.performAndSave({ context in + guard let blog = try? context.existingObject(with: objectID) as? Blog else { + DDLogError("Unable to fetch blog and update isBlazedApproved value") + return + } blog.isBlazeApproved = isBlazeApproved DDLogInfo("Successfully updated isBlazeApproved value for blog: \(isBlazeApproved)") }, completion: { diff --git a/WordPress/Classes/Services/Reader Post/ReaderPostService.swift b/WordPress/Classes/Services/Reader Post/ReaderPostService.swift index 0233277dcec6..c3a58a6803f3 100644 --- a/WordPress/Classes/Services/Reader Post/ReaderPostService.swift +++ b/WordPress/Classes/Services/Reader Post/ReaderPostService.swift @@ -157,17 +157,24 @@ extension ReaderPostService { /// Takes a list of remote posts and returns a new list without the blocked posts. private func remotePostsByFilteringOutBlockedPosts(_ posts: [RemoteReaderPost], in context: NSManagedObjectContext) -> [RemoteReaderPost] { - guard let account = try? WPAccount.lookupDefaultWordPressComAccount(in: context) else { + guard let account = try? WPAccount.lookupDefaultWordPressComAccount(in: context), + let accountID = account.userID + else { return posts } - let blockedAuthors = Set(BlockedAuthor.find(.accountID(account.userID), context: context).map { $0.authorID }) + let blockedAuthors = Set(BlockedAuthor.find(.accountID(accountID), context: context).map { $0.authorID }) guard !blockedAuthors.isEmpty else { return posts } - return posts.filter { !blockedAuthors.contains($0.authorID) } + return posts.filter { post -> Bool in + guard let authorID = post.authorID else { + return true + } + return !blockedAuthors.contains(authorID) + } } // MARK: - Types diff --git a/WordPress/Resources/id.lproj/Localizable.strings b/WordPress/Resources/id.lproj/Localizable.strings index 73560d0a8835..8d6c9d1ada54 100644 --- a/WordPress/Resources/id.lproj/Localizable.strings +++ b/WordPress/Resources/id.lproj/Localizable.strings @@ -1,4 +1,4 @@ -/* Translation-Revision-Date: 2023-03-09 11:54:28+0000 */ +/* Translation-Revision-Date: 2023-03-24 11:54:08+0000 */ /* Plural-Forms: nplurals=2; plural=n > 1; */ /* Generator: GlotPress/4.0.0-alpha.4 */ /* Language: id */ @@ -9618,6 +9618,12 @@ translators: %s: Select control option value e.g: \"Auto, 25%\". */ /* Age between dates equaling one hour. */ "an hour" = "satu jam"; +/* This is the string we display when prompting the user to review the Jetpack app */ +"appRatings.jetpack.prompt" = "Apa pendapat Anda tentang Jetpack?"; + +/* This is the string we display when prompting the user to review the WordPress app */ +"appRatings.wordpress.prompt" = "Apa pendapat Anda tentang WordPress?"; + /* Label displayed on audio media items. */ "audio" = "audio"; @@ -9848,6 +9854,9 @@ translators: %s: Select control option value e.g: \"Auto, 25%\". */ /* Title of a badge indicating when a feature in singular form will be removed. First argument is the feature name. Second argument is the number of days/weeks it will be removed in. Ex: Reader is moving in 2 weeks */ "jetpack.branding.badge_banner.moving_in.singular" = "%1$@ akan berpindah dalam %2$@"; +/* Title of a badge or banner indicating that this feature will be moved in a few days. */ +"jetpack.branding.badge_banner.moving_in_days.plural" = "Berpindah ke aplikasi Jetpack dalam beberapa hari."; + /* Title of a badge indicating that a feature in plural form will be removed soon. First argument is the feature name. Ex: Notifications are moving soon */ "jetpack.branding.badge_banner.moving_soon.plural" = "%@ segera berpindah"; @@ -10157,12 +10166,57 @@ translators: %s: Select control option value e.g: \"Auto, 25%\". */ /* The title in the migration welcome screen */ "migration.welcome.title" = "Selamat datang di Jetpack!"; +/* Description for the static screen displayed prompting users to switch the Jetpack app. */ +"movedToJetpack.description" = "Statistik, Pembaca, Pemberitahuan, dan beragam fitur lain berbasis Jetpack telah dihapus dari aplikasi WordPress dan hanya dapat ditemukan di aplikasi Jetpack."; + +/* Hint for the static screen displayed prompting users to switch the Jetpack app. */ +"movedToJetpack.hint" = "Beralihlah ke aplikasi—gratis dan prosesnya cepat!"; + +/* Title for a button that prompts users to switch to the Jetpack app. */ +"movedToJetpack.jetpackButtonTitle" = "Ganti ke aplikasi Jetpack"; + +/* Title for a button that displays a blog post in a web view. */ +"movedToJetpack.learnMoreButtonTitle" = "Baca selengkapnya di jetpack.com"; + +/* Title for the static screen displayed in the Stats screen prompting users to switch to the Jetpack app. */ +"movedToJetpack.notifications.title" = "Pemberitahuan berpindah ke aplikasi Jetpack."; + +/* Title for the static screen displayed in the Reader screen prompting users to switch to the Jetpack app. */ +"movedToJetpack.reader.title" = "Pembaca berpindah ke aplikasi Jetpack."; + +/* Title for the static screen displayed in the Stats screen prompting users to switch to the Jetpack app. */ +"movedToJetpack.stats.title" = "Statistik berpindah ke aplikasi Jetpack."; + +/* Title for the card displaying draft posts. */ +"my-sites.drafts.card.title" = "Sempurnakan konsep pos"; + +/* The part in the title that should be highlighted. */ +"my-sites.drafts.card.title.hint" = "buat konsep pos"; + +/* Title for the card displaying today's stats. */ +"my-sites.stats.card.title" = "Statistik Hari Ini"; + +/* The part of the title that needs to be emphasized */ +"my-sites.stats.card.title.hint" = "Statistik"; + /* Dismiss button title. */ "noResultsViewController.dismissButton" = "Tutup"; /* Dismiss the alert with instructions on how to enable push notifications. */ "notificationSettingStreams.pushNotificationAlert.dismissButton" = "Tutup"; +/* This is one of the buttons we display inside of the prompt to review the app */ +"notifications.appRatings.prompt.no.buttonTitle" = "Dapat disempurnakan"; + +/* This is one of the buttons we display inside of the prompt to review the app */ +"notifications.appRatings.prompt.yes.buttonTitle" = "Saya menyukainya"; + +/* This is one of the buttons we display when prompting the user for a review */ +"notifications.appRatings.sendFeedback.no.buttonTitle" = "Tidak, terima kasih"; + +/* This is one of the buttons we display when prompting the user for a review */ +"notifications.appRatings.sendFeedback.yes.buttonTitle" = "Beri masukan"; + /* Word separating the current index from the total amount. I.e.: 7 of 9 */ "of" = "dari"; diff --git a/WordPress/Resources/ru.lproj/Localizable.strings b/WordPress/Resources/ru.lproj/Localizable.strings index 8e8f63ed8914..746035c7da24 100644 --- a/WordPress/Resources/ru.lproj/Localizable.strings +++ b/WordPress/Resources/ru.lproj/Localizable.strings @@ -1,4 +1,4 @@ -/* Translation-Revision-Date: 2023-03-22 18:54:08+0000 */ +/* Translation-Revision-Date: 2023-03-28 11:16:56+0000 */ /* Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2); */ /* Generator: GlotPress/4.0.0-alpha.4 */ /* Language: ru */ @@ -10196,6 +10196,9 @@ translators: %s: Select control option value e.g: \"Auto, 25%\". */ /* Title for the card displaying draft posts. */ "my-sites.drafts.card.title" = "Работа над черновой записью"; +/* The part in the title that should be highlighted. */ +"my-sites.drafts.card.title.hint" = "Черновая запись"; + /* Title for the card displaying today's stats. */ "my-sites.stats.card.title" = "Статистика за сегодня"; diff --git a/config/Version.internal.xcconfig b/config/Version.internal.xcconfig index 52fa89ecb66b..1e7b7d5af25e 100644 --- a/config/Version.internal.xcconfig +++ b/config/Version.internal.xcconfig @@ -1,4 +1,4 @@ VERSION_SHORT=22.0 // Internal long version example: VERSION_LONG=9.9.0.20180423 -VERSION_LONG=22.0.0.20230324 +VERSION_LONG=22.0.0.20230329 diff --git a/config/Version.public.xcconfig b/config/Version.public.xcconfig index a26703b90ad1..ec716a58ec69 100644 --- a/config/Version.public.xcconfig +++ b/config/Version.public.xcconfig @@ -1,4 +1,4 @@ VERSION_SHORT=22.0 // Public long version example: VERSION_LONG=9.9.0.0 -VERSION_LONG=22.0.0.1 +VERSION_LONG=22.0.0.2 diff --git a/fastlane/metadata/es-ES/release_notes.txt b/fastlane/metadata/es-ES/release_notes.txt new file mode 100644 index 000000000000..3924c54c7a79 --- /dev/null +++ b/fastlane/metadata/es-ES/release_notes.txt @@ -0,0 +1,3 @@ +No sabemos si es vuestro caso, pero nos sentimos de 22 años. En honor a la ocasión (y porque lo habéis estado pidiendo), ahora podéis convertir la mayor parte de bloques en otros tipos de bloques, como citas, columnas, y grupos. Hermoso. + +También veréis algunos pequeños cambios visuales en el escritorio de «Mi sitio» y en la encuesta dentro de la app. diff --git a/fastlane/metadata/tr/release_notes.txt b/fastlane/metadata/tr/release_notes.txt new file mode 100644 index 000000000000..b5d150004918 --- /dev/null +++ b/fastlane/metadata/tr/release_notes.txt @@ -0,0 +1,3 @@ +Sizi bilmiyoruz ama biz kendimizi 22 yaşında hissediyoruz. Bu olayın şerefine (ve bunu istediğiniz için), artık çoğu blok türünü tırnak, sütun ve grup gibi diğer blok türlerine dönüştürebilirsiniz. Ne güzel. + +Ayrıca Sitem panosunda ve uygulama içi ankette birkaç küçük görsel değişiklik göreceksiniz.