#37895 closed defect (bug) (fixed)
Customizer: avoid post type names in generic strings
Reported by: | afercia | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Description
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
In 38479: