[wp-trac] [WordPress Trac] #38857: REST API: Merge similar translation strings

WordPress Trac noreply at wordpress.org
Sat Nov 19 00:52:34 UTC 2016


#38857: REST API: Merge similar translation strings
------------------------------+-----------------------------
 Reporter:  ramiy             |       Owner:  SergeyBiryukov
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  4.7
Component:  I18N              |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  rest-api
------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch commit
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Going to reopen, as there are still some inconsistencies in REST API
 strings.

 Some messages refer to specific resource types, like posts or comments,
 others refer to a generic "resource". Here's a `rest_forbidden_context`
 string from each endpoint:

 * `class-wp-rest-comments-controller.php`:
  * "Sorry, you are not allowed to view comments with edit context."
 * `class-wp-rest-post-types-controller.php`:
  * "Sorry, you are not allowed to edit this resource."
 * `class-wp-rest-posts-controller.php`:
  * "Sorry, you are not allowed to edit posts in this post type."
  * "Sorry, you are not allowed to edit this post."
 * `class-wp-rest-taxonomies-controller.php`:
  * "Sorry, you are not allowed to edit this resource."
 * `class-wp-rest-terms-controller.php`:
  * "Sorry, you are not allowed to view this resource with edit context."
 * `class-wp-rest-users-controller.php`:
  * "Sorry, you are not allowed to view this resource with edit context."

 [attachment:38857.2.patch] brings some consistency. Note: it uses two
 strings that could probably be merged, but I've separated them for
 clarity, as they refer to different capabilities (`edit_terms` and
 `manage_terms`, respectively):

 * "Sorry, you are not allowed to edit terms in this taxonomy."
 * "Sorry, you are not allowed to manage terms in this taxonomy."

 (Not sure what's the difference between those two capabilities though,
 they appear to be used somewhat interchangeably in core.)

 On a related note, some of item schema description strings look weird in
 terms of translation, for example:

 * "First name for the resource."
 * "The nickname for the resource."

 Is there a reason to a use a generic "resource" here (and in other
 classes) instead of "user"?

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


More information about the wp-trac mailing list