[wp-meta] [Making WordPress.org] #5455: HelpHub: Correct post type and taxonomy labels

Making WordPress.org noreply at wordpress.org
Wed May 19 21:26:30 UTC 2021


#5455: HelpHub: Correct post type and taxonomy labels
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  (none)
     Type:  defect          |      Status:  new
 Priority:  normal          |   Milestone:
Component:  HelpHub         |  Resolution:
 Keywords:                  |
----------------------------+---------------------
Description changed by SergeyBiryukov:

Old description:

> In the HelpHub plugin, post type and taxonomy labels are structured like
> this:
> * `Add New %s`
> * `Edit %s`
> * `No %s Found`
> * ...
>
> Same for messages hooked to the `post_updated_messages` filter:
> * `%3$s updated. %1$sView %4$s%2$s`
> * `%s updated.`
> * `%1$s draft updated. %3$sPreview %2$s%4$s`
> * ...
>
> Same for taxonomies:
>
> * `Search %s`
> * `All %s`
> * `New %s Name`
> * ...
>
> This is simply not translatable and defends the purpose of having post
> type and taxonomy labels in the first place.
>
> In languages other than English, just inserting a post type name into a
> generic string like `Edit %s` or `%s updated` does not work as expected,
> hence the need for a full array of various labels.
>
> A general best practice in WordPress is to avoid post type and taxonomy
> names in generic strings due to i18n concerns and structural differences
> in languages. See #WP37895 for example.
>
> This should be replaced with an array of proper labels:
> * Add New Article
> * Edit Article
> * No Articles Found
> * ...
> * Add New WordPress Version
> * Edit WordPress Version
> * No WordPress Versions Found
> * ...

New description:

 In the HelpHub plugin, post type and taxonomy labels are structured like
 this:
 * `Add New %s`
 * `Edit %s`
 * `No %s Found`
 * ...

 Same for messages hooked to the `post_updated_messages` filter:
 * `%3$s updated. %1$sView %4$s%2$s`
 * `%s updated.`
 * `%1$s draft updated. %3$sPreview %2$s%4$s`
 * ...

 Same for taxonomies:

 * `Search %s`
 * `All %s`
 * `New %s Name`
 * ...

 This is simply not translatable and defeats the purpose of having post
 type and taxonomy labels in the first place.

 In languages other than English, just inserting a post type name into a
 generic string like `Edit %s` or `%s updated` does not work as expected,
 hence the need for a full array of various labels.

 A general best practice in WordPress is to avoid post type and taxonomy
 names in generic strings due to i18n concerns and structural differences
 in languages. See #WP37895 for example.

 This should be replaced with an array of proper labels:
 * Add New Article
 * Edit Article
 * No Articles Found
 * ...
 * Add New WordPress Version
 * Edit WordPress Version
 * No WordPress Versions Found
 * ...

--

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5455#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list