Skip to content

Commit

Permalink
Merge beta 22.0.0.2 (#20425)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Mar 29, 2023
2 parents 955a629 + 7216234 commit 43e088d
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 15 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
22 changes: 14 additions & 8 deletions WordPress/Classes/Services/BlazeService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {
Expand Down
13 changes: 10 additions & 3 deletions WordPress/Classes/Services/Reader Post/ReaderPostService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
56 changes: 55 additions & 1 deletion WordPress/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down
5 changes: 4 additions & 1 deletion WordPress/Resources/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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" = "Статистика за сегодня";

Expand Down
2 changes: 1 addition & 1 deletion config/Version.internal.xcconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion config/Version.public.xcconfig
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions fastlane/metadata/es-ES/release_notes.txt
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions fastlane/metadata/tr/release_notes.txt
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 43e088d

Please sign in to comment.