Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Modules/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Modules/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let package = Package(
revision: "b34794c9a3f32312e1593d4a3d120572afa0d010"
),
.package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"),
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.15.0"),
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.17.2"),
.package(
url: "https://github.com/automattic/wordpress-rs",
exact: "0.4.0"
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
27.1
-----
* [*] [internal] Experimental Gutenberg editor: add Lockdown Mode detection [#25776]
* [*] [internal] In-app updates: guard the flexible update notice against double-posting when two update checks race [#25666]
* [*] [build tooling] Add a String Catalog localization pipeline (plurals + build-free catalog generation) with a CI coverage gate [#25688]
* [*] [internal] Stats widgets: migrate the site picker from SiriKit to App Intents [#25753]
Expand Down
116 changes: 103 additions & 13 deletions WordPress/Classes/ViewRelated/NewGutenberg/GBKExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import Pulse
import Support

extension GutenbergKit.EditorViewControllerDelegate {
func editor(_ viewController: GutenbergKit.EditorViewController, didLogNetworkRequest request: GutenbergKit.RecordedNetworkRequest) {
func editor(
_ viewController: GutenbergKit.EditorViewController,
didLogNetworkRequest request: GutenbergKit.RecordedNetworkRequest
) {
guard ExtensiveLogging.enabled, let url = URL(string: request.url) else {
return
}
Expand Down Expand Up @@ -32,18 +35,105 @@ extension GutenbergKit.EditorViewControllerDelegate {

private func getLocalizedString(for value: GutenbergKit.EditorLocalizableString) -> String {
switch value {
case .showMore: NSLocalizedString("editor.blockInserter.showMore", value: "Show More", comment: "Button title to expand and show more blocks")
case .showLess: NSLocalizedString("editor.blockInserter.showLess", value: "Show Less", comment: "Button title to collapse and show fewer blocks")
case .search: NSLocalizedString("editor.blockInserter.search", value: "Search", comment: "Placeholder text for block search field")
case .insertBlock: NSLocalizedString("editor.blockInserter.insertBlock", value: "Insert Block", comment: "Context menu action to insert a block")
case .failedToInsertMedia: NSLocalizedString("editor.media.failedToInsert", value: "Failed to insert media", comment: "Error message when media insertion fails")
case .patterns: NSLocalizedString("editor.patterns.title", value: "Patterns", comment: "Navigation title for patterns view")
case .noPatternsFound: NSLocalizedString("editor.patterns.noPatternsFound", value: "No Patterns Found", comment: "Title shown when no patterns match the search")
case .insertPattern: NSLocalizedString("editor.patterns.insertPattern", value: "Insert Pattern", comment: "Context menu action to insert a pattern")
case .patternsCategoryUncategorized: NSLocalizedString("editor.patterns.uncategorized", value: "Uncategorized", comment: "Category name for patterns without a category")
case .patternsCategoryAll: NSLocalizedString("editor.patterns.all", value: "All", comment: "Category name for section showing all patterns")
case .loadingEditor: NSLocalizedString("editor.loading.title", value: "Loading Editor", comment: "Text shown while the editor is loading")
case .editorError: NSLocalizedString("editor.error.title", value: "Editor Error", comment: "Title shown when the editor encounters an error")
case .showMore:
NSLocalizedString(
"editor.blockInserter.showMore",
value: "Show More",
comment: "Button title to expand and show more blocks"
)
case .showLess:
NSLocalizedString(
"editor.blockInserter.showLess",
value: "Show Less",
comment: "Button title to collapse and show fewer blocks"
)
case .search:
NSLocalizedString(
"editor.blockInserter.search",
value: "Search",
comment: "Placeholder text for block search field"
)
case .insertBlock:
NSLocalizedString(
"editor.blockInserter.insertBlock",
value: "Insert Block",
comment: "Context menu action to insert a block"
)
case .failedToInsertMedia:
NSLocalizedString(
"editor.media.failedToInsert",
value: "Failed to insert media",
comment: "Error message when media insertion fails"
)
case .patterns:
NSLocalizedString("editor.patterns.title", value: "Patterns", comment: "Navigation title for patterns view")
case .noPatternsFound:
NSLocalizedString(
"editor.patterns.noPatternsFound",
value: "No Patterns Found",
comment: "Title shown when no patterns match the search"
)
case .insertPattern:
NSLocalizedString(
"editor.patterns.insertPattern",
value: "Insert Pattern",
comment: "Context menu action to insert a pattern"
)
case .patternsCategoryUncategorized:
NSLocalizedString(
"editor.patterns.uncategorized",
value: "Uncategorized",
comment: "Category name for patterns without a category"
)
case .patternsCategoryAll:
NSLocalizedString(
"editor.patterns.all",
value: "All",
comment: "Category name for section showing all patterns"
)
case .loadingEditor:
NSLocalizedString(
"editor.loading.title",
value: "Loading Editor",
comment: "Text shown while the editor is loading"
)
case .editorError:
NSLocalizedString(
"editor.error.title",
value: "Editor Error",
comment: "Title shown when the editor encounters an error"
)
case .lockdownModeTitle:
NSLocalizedString(
"editor.lockdownMode.title",
value: "Lockdown Mode Detected",
comment: "Title shown when Lockdown Mode may affect the editor"
)
case .lockdownModeWarning:
NSLocalizedString(
"editor.lockdownMode.warning",
value: "Lockdown Mode is enabled. The editor may not work correctly.",
comment: "Warning shown when Lockdown Mode may affect the editor"
)
case .lockdownModeExcludeHint:
NSLocalizedString(
"editor.lockdownMode.excludeHint",
value:
"You can exclude this app from Lockdown Mode in Settings, then re-open the editor to restore full functionality.",
comment: "Instructions for excluding the app from Lockdown Mode"
)
case .lockdownModeLearnMore:
NSLocalizedString(
"editor.lockdownMode.learnMore",
value: "Learn More",
comment: "Button title to learn more about Lockdown Mode"
)
case .lockdownModeDismiss:
NSLocalizedString(
"editor.lockdownMode.dismiss",
value: "Dismiss",
comment: "Button title to dismiss the Lockdown Mode warning"
)
}
}

Expand Down