Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38822 closed defect (bug) (fixed)

REST API: Clarify parameters when used in error strings

Reported by: ocean90's profile ocean90 Owned by: joehoyle's profile joehoyle
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: I18N Keywords: has-patch 2nd-opinion
Focuses: rest-api Cc:

Description

Example: In WP_REST_Comments_Controller::create_item_permissions_check() we have 'Sorry, you are not allowed to set karma for comments.' and 'Sorry, you are not allowed to set status for comments.'. karma and status are parameters which shouldn't be translated to something else.

Attachments (3)

38822.patch (2.1 KB) - added by ocean90 8 years ago.
38822.2.diff (1.6 KB) - added by danielbachhuber 8 years ago.
38822.3.patch (987 bytes) - added by ramiy 8 years ago.

Download all attachments as: .zip

Change History (16)

@ocean90
8 years ago

#1 @ramiy
8 years ago

Related: #38803

#2 @ramiy
8 years ago

It's a good change, it also merges the three translation strings into one string.

Related ticket #38808

#3 @Presskopp
8 years ago

Related #38821 wants to get rid of karma

This ticket was mentioned in Slack in #core by helen. View the logs.


8 years ago

#5 @ramiy
8 years ago

@Presskopp This patch will affect the karma removal. It's only a text-change.

#6 @ramiy
8 years ago

@ocean90 I've reviewed the current messages. We don't use "set" in non of the other messages. We do use "edit" or "update".

Two alternatives for your patch:

  • Sorry, you are not allowed to edit comment %s.
  • Sorry, you are not allowed to update comment %s.
Last edited 8 years ago by ramiy (previous) (diff)

#7 @danielbachhuber
8 years ago

  • Owner set to joehoyle
  • Status changed from new to assigned

38822.2.diff updates the patch to remove karma, and use 'edit' instead of 'set'

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


8 years ago

#9 @joehoyle
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39298:

REST API: Clarify parameters when used in error strings.

Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ocean90, ramiy, danielbachhuber.
Fixes #38822.

#10 @ramiy
8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changeset [39302] added the "Sorry, you are not allowed to set author_ip for comments." error message. It needs to be updated too.

@ramiy
8 years ago

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


8 years ago

#12 @SergeyBiryukov
8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 39306:

REST API: After [39302], clarify author_ip parameter in error message.

Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ramiy.
Fixes #38822.

#13 @SergeyBiryukov
8 years ago

In 39310:

REST API: After [39306], move author_ip argument to the correct place.

See #38822.

Note: See TracTickets for help on using tickets.