Page MenuHomePhabricator

Rename "wikibaselexeme-api-error-*" message keys to "apierror-wikibaselexeme-*
Closed, ResolvedPublic

Description

If I understand correctly, this is a follow up to T185761.

There are many message keys in WikibaseLexeme that begin with "wikibaselexeme-api-error-*". If these are apierror messages, they must begin with "apierror-wikibaselexeme-", according to https://www.mediawiki.org/wiki/API:Localisation .

It looks like there are 18 messages to update:

	"wikibaselexeme-api-error-parameter-required": "Parameter \"$1\" is required",
	"wikibaselexeme-api-error-parameter-invalid-json-object": "Parameter \"$1\" expected to be a valid JSON object, given \"$2\"",
	"wikibaselexeme-api-error-lexeme-not-found": "Field \"$1\" contains an ID of a Lexeme \"$2\" that could not be found.",
	"wikibaselexeme-api-error-form-not-found": "Field \"$1\" contains an ID of a Form \"$2\" that could not be found.",
	"wikibaselexeme-api-error-sense-not-found": "Field \"$1\" contains an ID of a Sense \"$2\" that could not be found.",
	"wikibaselexeme-api-error-json-field-required": "Field \"$3\" at \"$2\" in parameter \"$1\" is required",
	"wikibaselexeme-api-error-json-field-not-item-id": "Field \"$2\" in parameter \"$1\" expected to be na Item Id. Given: \"$3\"",
	"wikibaselexeme-api-error-json-field-has-wrong-type": "Field \"$2\" in parameter \"$1\" expected to be of type \"$3\". Given: \"$4\"",
	"wikibaselexeme-api-error-parameter-not-lexeme-id": "Parameter \"$1\" expected to be a Lexeme ID. Given: \"$2\"",
	"wikibaselexeme-api-error-parameter-not-form-id": "Field \"$2\" in parameter \"$1\" expected to be a Form ID. Given: \"$3\"",
	"wikibaselexeme-api-error-parameter-not-sense-id": "Field \"$2\" in parameter \"$1\" expected to be a Sense ID. Given: \"$3\"",
	"wikibaselexeme-api-error-lexeme-term-text-cannot-be-empty": "Term text cannot be empty",
	"wikibaselexeme-api-error-lexeme-term-language-cannot-be-empty": "Language cannot be empty",
	"wikibaselexeme-api-error-language-inconsistent": "Language in field \"$1\" at \"$2\" was expected to be \"$3\". Given: \"$4\"",
	"wikibaselexeme-api-error-form-must-have-at-least-one-representation": "Form must have at least one representation",
	"wikibaselexeme-api-error-sense-must-have-at-least-one-gloss": "Sense must have at least one gloss",
	"wikibaselexeme-api-error-unknown-language": "Unknown language \"$3\" in field \"$1\" at \"$2\".",
	"wikibaselexeme-api-error-invalid-item-id": "Invalid item id \"$3\" in field \"$1\" at \"$2\".",

Event Timeline

Addshore moved this task from Inbox to Goals on the wdwb-tech board.
Addshore moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.

Is this just search and replace, or is anything more sophisticated needed?

Is this just search and replace, or is anything more sophisticated needed?

This should only need changing in the JSON file and the PHP code for the API modules.

Change 482011 had a related patch set uploaded (by Greta WMDE; owner: Greta Doçi):
[mediawiki/extensions/WikibaseLexeme@master] Rename "wikibaselexeme-api-error" message keys to "apierror-wikibaselexeme"

https://gerrit.wikimedia.org/r/482011

Change 482011 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Rename "wikibaselexeme-api-error" message keys to "apierror-wikibaselexeme"

https://gerrit.wikimedia.org/r/482011