-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update permalink panel text to be 'View [postType]' instead of 'Preview' #16041
Conversation
{ __( 'Preview' ) } | ||
{ sprintf( | ||
/* translators: %s: post type singular name */ | ||
__( 'View %s' ), postLabel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the proper view_item
label for this post type as generated by get_post_type_labels
in WordPress. Anything else does not translate well.
@@ -148,6 +152,7 @@ export default compose( [ | |||
postTitle: getEditedPostAttribute( 'title' ), | |||
postSlug: getEditedPostAttribute( 'slug' ), | |||
postID: id, | |||
postLabel: get( postType, [ 'labels', 'singular_name' ] ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the view_item
label.
Related Slack discussion concerning translatability (link requires registration): https://wordpress.slack.com/archives/C02QB2JS7/p1558731384027700 |
…_labels instead of 'Preview'
454eba0
to
93ddfc4
Compare
Thank you for the speedy feedback @swissspidy and @aduth! I updated to use "view_item" and added a fallback to __( 'View Post' ) Also, I had missed that slack conversation @mapk , so sorry if I stepped on your toes here |
No toes were stepped on! 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Description
Fixes #14206 by replacing the text "Preview" in the permalink panel of the document settings with "View X" where X is the post type being edited. Preview can cause some confusion as there is also a "Preview" button at the top of the settings that does something different (generates a preview) where this link is just the currently live page.
How has this been tested?
Open a Post, see it now says "View Post"
Open a Page, see it now says "View Page"
Enable Gutenberg's custom post type plugin, add a PublicQueryPublic custom post, see that it says "View PublicQueryPublic"
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: