Opened 6 years ago
Closed 3 months ago
#50292 closed enhancement (wontfix)
Change 'post updated' notification text to '[post type name] updated'
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | close |
| Focuses: | Cc: |
Description
When working with a custom post type if you update the post you get the notification "Post updated." - would this be better to show the post type name instead of post? It's more descriptive.
I have flagged 'updated' but I suspect there maybe more instances of this with other statuses.
Change History (7)
#2
follow-ups:
↓ 3
↓ 4
@
6 years ago
Okay, I think i've missed this - mostly due to using a post type generator website to get the code for registering a post type which is missing these new values.
I wonder if there is any appetite for a simplised function here to define the post type singular and plural name as opposed to the entire label set and then all these get populated for you - to save instances of this where some new label for a post type maybe added later you'd already have those populated correctly?
#3
in reply to:
↑ 2
;
follow-up:
↓ 5
@
6 years ago
Replying to ninetyninew:
I wonder if there is any appetite for an additional simpler function here which could be used instead of the standard label set to define the post type singular and plural name as opposed to the entire label set and then all these get populated for you - to save instances of this where some new label for a post type maybe added later you'd already have those populated correctly?
This makes a lot of sense to me. Why not just define the singular and plural words for a CPT and use the defaults for the rest of the message? If needed, more specific messages could be defined using the existing labels array.
@SergeyBiryukov The message on [44110] mentions that the new labels were added because of the REST API. Do these new labels get used for the classic editor? They don't seem to be working for me. e.g. I'm still seeing "Post updated." for my CPT even though $labels['item_updated'] is "Event updated." All my other labels are working.
#4
in reply to:
↑ 2
@
6 years ago
Replying to ninetyninew:
I wonder if there is any appetite for an additional simpler function here which could be used instead of the standard label set to define the post type singular and plural name as opposed to the entire label set and then all these get populated for you - to save instances of this where some new label for a post type maybe added later you'd already have those populated correctly?
Unfortunately, just inserting a post type name into a generic string like %s updated is not translatable, hence the need for a full array of various labels.
A general best practice in WordPress is to avoid post type and taxonomy names in generic strings due to i18n concerns and structural differences in languages. For reference, see:
#5
in reply to:
↑ 3
@
6 years ago
Replying to deadpixl:
The message on [44110] mentions that the new labels were added because of the REST API. Do these new labels get used for the classic editor? They don't seem to be working for me. e.g. I'm still seeing "Post updated." for my CPT even though
$labels['item_updated']is "Event updated." All my other labels are working.
As far as I remember, item_updated and the other four labels added in [44110] are indeed only used in the block editor. It might be a good idea to look into using them in the classic editor too.
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
3 months ago
#7
@
3 months ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
It appears that this post has gone stale, and no more interest has been drawn since then. Probably the hindrances commented on by @SergeyBiryukov led to this conclusion. Anyway, if anyone still feels that this should be improved, taking Sergey's considerations in mind, feel free to comment back, and we can discuss this further.
Hi there, welcome to WordPress Trac! Thanks for the ticket.
As of WordPress 5.0, there is already an
item_updatedlabel added in [44110] / #45101 that can be specified when registering a post type.