Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35095 closed enhancement (duplicate)

Allow for proper labeling in CPT notices.

Reported by: uamv's profile UaMV Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Posts, Post Types Keywords:
Focuses: ui, accessibility Cc:

Description

While creating CPTs yesterday, I noticed that notices don't, by default, display proper labeling for the CPT. After digging into the code, I realized that there is the post_updated_messages filter which allows modification of these notices, but, as there is a singular label being defined when a CPT is registered, it could be used to serve proper notices by default. This would allow greater consistency of labeling across the CPT UI.

Attachments (2)

publishing-faq-cpt.png (29.4 KB) - added by UaMV 9 years ago.
Current CPT publishing notice.
35095.diff (6.3 KB) - added by UaMV 9 years ago.
A first pass at proper notice labeling for CPTs.

Download all attachments as: .zip

Change History (8)

@UaMV
9 years ago

Current CPT publishing notice.

@UaMV
9 years ago

A first pass at proper notice labeling for CPTs.

#1 follow-up: @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the ticket @UaMV. This is a dupe of #32532.

#2 follow-ups: @johnbillion
9 years ago

  • Focuses accessibility removed

Note that injecting the post type name into labels such as in 35095.diff isn't viable because the resulting strings aren't translatable.

#3 in reply to: ↑ 1 @UaMV
9 years ago

  • Focuses accessibility added

Replying to johnbillion:

Thanks for the ticket @UaMV. This is a dupe of #32532.

Ah, thanks! Searched, but hadn't come across that one.

#4 in reply to: ↑ 2 @UaMV
9 years ago

Replying to johnbillion:

Note that injecting the post type name into labels such as in 35095.diff isn't viable because the resulting strings aren't translatable.

Good to know! Thanks.

#5 in reply to: ↑ 2 ; follow-up: @UaMV
9 years ago

Replying to johnbillion:

Note that injecting the post type name into labels such as in 35095.diff isn't viable because the resulting strings aren't translatable.

Wait. But the post type name is not being inserted. Rather, a registered label from the post type is being inserted. That should be translatable, yes? no?

#6 in reply to: ↑ 5 @SergeyBiryukov
9 years ago

Replying to UaMV:

But the post type name is not being inserted. Rather, a registered label from the post type is being inserted. That should be translatable, yes? no?

Nope, see comment:ticket:17609:3 and comment:ticket:19099:1.

Besides, gettext cannot parse PHP code, only static strings.

Note: See TracTickets for help on using tickets.