[wp-trac] [WordPress Trac] #52800: Make most default post type labels use "name" and "singular_name" variables instead of defaulting to Post/Page

WordPress Trac noreply at wordpress.org
Fri Mar 12 22:47:08 UTC 2021


#52800: Make most default post type labels use "name" and "singular_name" variables
instead of defaulting to Post/Page
-------------------------------------------+------------------------------
 Reporter:  jaspercreel                    |       Owner:  (none)
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Posts, Post Types              |     Version:  5.7
 Severity:  minor                          |  Resolution:
 Keywords:  dev-feedback needs-unit-tests  |     Focuses:
-------------------------------------------+------------------------------

Comment (by TimothyBlynJacobs):

 Hi @jaspercreel,

 Welcome to trac!

 The reason that separate strings are used is because in many languages you
 can't simply substitute the noun in a sentence without changing other
 parts of the sentence the way you often can in English. So, for instance,
 something like this wouldn't work.

 `sprintf( __( 'Add New %s' ), $label )```

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52800#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list