-
Notifications
You must be signed in to change notification settings - Fork 156
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 unlink
warning message copy
#1006
Conversation
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.
Just one note for now while I figure out what to do with upper case post type labels.
It applies throughout though.
@@ -23,40 +23,40 @@ if ( | |||
message = sprintf( | |||
/* translators: 1) Source of content, 2) Distributor post type singular name. */ | |||
__( | |||
'Distributed from %1$s. This %2$s is linked to the original. Edits to the original will update this version.', | |||
'Distributed from %1$s. This %2$s is linked to the origin post. Edits to the origin post will update this remote version.', |
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.
'Distributed from %1$s. This %2$s is linked to the origin post. Edits to the origin post will update this remote version.', | |
'Distributed from %1$s. This %2$s is linked to the origin %2$s. Edits to the origin %2$s will update this remote version.', |
This is so the correct post type is displayed, eg podcasts will read:
Distributed from Distributor Test Site. This Podcast is linked to the origin Podcast. Edits to the origin Podcast will update this remote version.
There is a catch, the dtGutenberg.postTypeSingular
uses the case for the singular post name label in register_post_type()
, most commonly with an upper case first letter.
We could convert to lowercase before use but I am not sure how this would work with non-english language sites.
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.
I think I'm fine with casing being a spot off on this. Are there other places throughout this PR that should similarly be updated @peterwilsoncc?
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.
@jeffpaul A few more spots, I'll push some commits so I can make sure the string is available in each location.
What I hadn't noticed was that post type strings were cast to lowercase in the PHP but not in the JavaScript so there was an inconsistency already. I've pushed 3fc57c0 to make it consistently lowercase. |
I think this is good to go, the strings are consistent across their various uses, the post type names are consistently cased. Of course, each of the changed lines of code are mine now, so I'll need someone else to review. |
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.
I've tested new messages with the workflow of:
- Creating the original
- Distributing it
- Linking and unlinking
The code is LGTM
I've discovered a new issue #1021 during my tests, was able to reproduce it on the develop
branch, so it's not related to the current PR.
Description of the Change
The editor notice that displays on remote, distributed posts has some odd spacing (line break where a single space should be, no space after a period) and is missing trailing periods in some instances. This PR attempts to clean up that spacing and missing periods as well as further clarify the terms of "origin" and "remote" posts when referring to distributed content.
See the screenshot from a sample how-to post:
While I've attempted various searches through the codebase to try and catch all the instances, its possible I missed some so having someone else run a spot-check on this branch to ensure things are all properly updated would be wonderful.
How to test the Change
Ask ChatGPT, I'm curious if it knows.
Changelog Entry
Credits
Props @jeffpaul, @peterwilsoncc, @cadic.
Checklist: