[wp-trac] [WordPress Trac] #21092: Media uploader insert button doesn't respect the current post type

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 28 08:03:42 UTC 2012


#21092: Media uploader insert button doesn't respect the current post type
-------------------------+------------------------------
 Reporter:  evansolomon  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by johnbillion):

 WordPress defaults to the 'post' label for every other post type label.
 For l10n reasons, the behaviour of this label shouldn't be any different.
 Here's an example why:

 Language X uses [http://en.wikipedia.org/wiki/Grammatical_gender
 grammatical gender] or some other funky language construct, and the entire
 phrase "Insert into post" can differ depending on the noun. If we default
 to the 'post' label for `insert_into_post` then the phrase will always be
 grammatically correct.

 If instead we try to build the phrase using the singular label as the
 noun, there's a chance the resulting string will be grammatically
 incorrect and possibly make no sense at all. It's better to default to the
 correctly localised version of "Insert into post" rather than an
 incorrectly localised version of "Insert into [custom post type]".

 Your patch should include the `insert_into_post` label for WordPress'
 built in Post and Page post types (in `get_post_type_labels()`). It's then
 up to individual post types to include their own `insert_into_post` label.

 I realise this doesn't address what you are trying to achieve with this
 ticket (which is, for this button to always display the correct post type
 name for custom post types) but unfortunately that's how it is.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21092#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list