[wp-trac] [WordPress Trac] #37895: Customizer: avoid post type names in generic strings

WordPress Trac noreply at wordpress.org
Wed Aug 31 16:18:45 UTC 2016


#37895: Customizer: avoid post type names in generic strings
--------------------------+-------------------------
 Reporter:  afercia       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.7
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-------------------------
 See #34923.

 The new functionality recently introduced in the Customizer to create new
 pages or posts from the menu items panel uses a string that is not
 translatable, due to structural differences in languages.
 {{{
 printf( __( 'Create New %s' ), $post_type_obj->labels->singular_name );
 }}}

 Languages other than English may need to translate "new" differently
 depending on the genre of the post type name. This should be either
 simplified or use one of the existing labels. Alternatively, if the word
 "Create" is considered essential, then a new post type label should be
 introduced.

 Already existing labels:

 {{{
 'add_new_item' => array( __('Add New Post'), __('Add New Page') ),
 'new_item' => array( __('New Post'), __('New Page') ),
 }}}

 See conversation on Slack:
 https://wordpress.slack.com/archives/core-customize/p1472657230000390



 A general good rule in WordPress is to avoid post type and taxonomy names
 in generic strings, for reference see:
 https://core.trac.wordpress.org/ticket/17609#comment:3
 https://core.trac.wordpress.org/ticket/19099#comment:1

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37895>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list