Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#38822 closed defect (bug) (fixed)

REST API: Clarify parameters when used in error strings

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

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 10 years ago.
38822.2.diff (1.6 KB ) - added by danielbachhuber 10 years ago.
38822.3.patch (987 bytes ) - added by ramiy 10 years ago.

Download all attachments as: .zip

Change History (16)

@ocean90
10 years ago

#1 @ramiy
10 years ago

Related: #38803

#2 @ramiy
10 years ago

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

Related ticket #38808

#3 @Presskopp
10 years ago

Related #38821 wants to get rid of karma

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


10 years ago

#5 @ramiy
10 years ago

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

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

#7 @danielbachhuber
10 years ago

  • Owner set to joehoyle
  • Status newassigned

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.


10 years ago

#9 @joehoyle
10 years ago

  • Resolutionfixed
  • Status assignedclosed

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
10 years ago

  • Resolution fixed
  • Status closedreopened

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

@ramiy
10 years ago

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


10 years ago

#12 @SergeyBiryukov
10 years ago

  • Resolutionfixed
  • Status reopenedclosed

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
10 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.