Patterns: Rename edit label to Edit Block Pattern to resolve edge case in Chrome #52496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Backport from core: WordPress/wordpress-develop#4826 — rename the Pattern post type's
edit_item
label to beEdit Block Pattern
.Why?
This resolves an issue in Chrome where the browser thinks that the page is in German and displays a translation popup. As mentioned in the linked PR, the reason Chrome does this isn't quite clear, but it's possibly related to there not being very much English text in the server-rendered view of the page (Chrome ignores the document's
lang
attribute and does what it wants). In manual testing, adding another English word to the edit item label resolves it for now.How?
Update
Edit Pattern
toEdit Block Pattern
for the Pattern post type.Testing Instructions
/wp-admin/edit.php?post_type=wp_block
to view the list of patterns.When testing, go from the
wp-admin
page and click the edit link on the pattern to test whether or not the translation popup is displayed.Screenshots or screencast