WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#38822 closed defect (bug) (fixed)

REST API: Clarify parameters when used in error strings

Reported by: ocean90 Owned by: 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 11 months ago.
38822.2.diff (1.6 KB) - added by danielbachhuber 11 months ago.
38822.3.patch (987 bytes) - added by ramiy 11 months ago.

Download all attachments as: .zip

Change History (16)

@ocean90
11 months ago

#1 @ramiy
11 months ago

Related: #38803

#2 @ramiy
11 months ago

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

Related ticket #38808

#3 @Presskopp
11 months ago

Related #38821 wants to get rid of karma

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


11 months ago

#5 @ramiy
11 months ago

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

#6 @ramiy
11 months 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 11 months ago by ramiy (previous) (diff)

#7 @danielbachhuber
11 months 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.


11 months ago

#9 @joehoyle
11 months 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
11 months 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
11 months ago

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


11 months ago

#12 @SergeyBiryukov
11 months 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
11 months 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.