jenkins-bot has submitted this change and it was merged. Change subject: Add missing api error messages ......................................................................
Add missing api error messages This adds missing api error messages to the api modules and the json files. Also fixed a typo in the messages file. Change-Id: I0b15385faf4062ffef2dc1037bc6033401babe20 --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/api/SetAliases.php M repo/includes/api/SetDescription.php M repo/includes/api/SetLabel.php 5 files changed, 7 insertions(+), 5 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/i18n/en.json b/repo/i18n/en.json index db0fb6c..8fb8767 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -309,7 +309,7 @@ "wikibase-api-invalid-list": "Invalid list.", "wikibase-api-invalid-property-id": "Invalid property ID.", "wikibase-api-invalid-entity-id": "Invalid entity ID.", - "wikibase-api-no-common-iten": "There is no common item.", + "wikibase-api-no-common-item": "There is no common item.", "wikibase-api-no-data": "No data to operate on.", "wikibase-api-no-external-page": "The external client site \"$1\" did not provide page information for page \"$2\".", "wikibase-api-nosuchrevid": "Revision with ID not found.", @@ -321,6 +321,7 @@ "wikibase-api-no-such-site": "Could not find such a site.", "wikibase-api-no-such-sitelink": "Could not find a sitelink to \"$1\" when trying to edit badges.", "wikibase-api-no-such-statement": "Could not find such a statement.", + "wikibase-api-not-supported": "The requested feature is not supported by the given entity.", "wikibase-api-not-statement": "Not a statement.", "wikibase-api-not-item": "Not an item.", "wikibase-api-not-recognized-siteid": "The supplied site identifier was not recognized.", diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index d63cde7..b9235af 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -340,7 +340,7 @@ "wikibase-api-invalid-list": "!!DO NOT TRANSLATE!! Invalid list or data has been provided. This can occour when a list conflicts with itself (the list contains something to modify, but also to remove this item)", "wikibase-api-invalid-property-id": "!!DO NOT TRANSLATE!! Invalid propertyid has been supplied", "wikibase-api-invalid-entity-id": "!!DO NOT TRANSLATE!! Invalid entityid has been supplied", - "wikibase-api-no-common-iten": "!!DO NOT TRANSLATE!! There is no common item between to passed parameters when there should be", + "wikibase-api-no-common-item": "!!DO NOT TRANSLATE!! There is no common item between to passed parameters when there should be", "wikibase-api-no-data": "!!DO NOT TRANSLATE!! This is an error message for a situation where the \"data\" argument to the API is lacking content. Usually this should never be shown to the user, unless there are some exceptional error condition. This message should probably not exist in the final version.", "wikibase-api-no-external-page": "This is an error message where the external client did reply, but either because of a faulty reply or because the page title could not be unwound, it was not possible to identify an external page.\n* $1 - the site id\n* $2 - the page id", "wikibase-api-nosuchrevid": "!!DO NOT TRANSLATE!! Page or entity with this revision id could not be found in the database", @@ -352,6 +352,7 @@ "wikibase-api-no-such-site": "!!DO NOT TRANSLATE!! Could not find such a site, this could be to the user entering the wrong data", "wikibase-api-no-such-sitelink": "Could not find such a sitelink, this could be to the user entering the wrong data\n* $1 - the site id", "wikibase-api-no-such-statement": "!!DO NOT TRANSLATE!! Could not find such a statement, this could be to the user entering the wrong data", + "wikibase-api-not-supported": "!!DO NOT TRANSLATE!! The given entity does not support the operation provided by the requested api module.", "wikibase-api-not-statement": "!!DO NOT TRANSLATE!! The passed parameter is Not a statement when a statement is expected", "wikibase-api-not-item": "!!DO NOT TRANSLATE!! The passed parameter is Not an item when an item is expected (the passed parameter may infact be a property)", "wikibase-api-not-recognized-siteid": "!!DO NOT TRANSLATE!! The supplied site identifier was not recognized", diff --git a/repo/includes/api/SetAliases.php b/repo/includes/api/SetAliases.php index 5c29c4d..4cb1e30 100644 --- a/repo/includes/api/SetAliases.php +++ b/repo/includes/api/SetAliases.php @@ -103,7 +103,7 @@ */ protected function modifyEntity( EntityDocument &$entity, array $params, $baseRevId ) { if ( !( $entity instanceof FingerprintProvider ) ) { - $this->errorReporter->dieError( 'The given entity does not contain aliases', 'no-aliases' ); + $this->errorReporter->dieError( 'The given entity cannot contain aliases', 'not-supported' ); } $summary = $this->createSummary( $params ); diff --git a/repo/includes/api/SetDescription.php b/repo/includes/api/SetDescription.php index eb954fb..7cac636 100644 --- a/repo/includes/api/SetDescription.php +++ b/repo/includes/api/SetDescription.php @@ -53,7 +53,7 @@ */ protected function modifyEntity( EntityDocument &$entity, array $params, $baseRevId ) { if ( !( $entity instanceof FingerprintProvider ) ) { - $this->errorReporter->dieError( 'The given entity does not contain descriptions', 'no-descriptions' ); + $this->errorReporter->dieError( 'The given entity cannot contain descriptions', 'not-supported' ); } $summary = $this->createSummary( $params ); diff --git a/repo/includes/api/SetLabel.php b/repo/includes/api/SetLabel.php index 447bf6d..75c0873 100644 --- a/repo/includes/api/SetLabel.php +++ b/repo/includes/api/SetLabel.php @@ -53,7 +53,7 @@ */ protected function modifyEntity( EntityDocument &$entity, array $params, $baseRevId ) { if ( !( $entity instanceof FingerprintProvider ) ) { - $this->errorReporter->dieError( 'The given entity does not contain labels', 'no-labels' ); + $this->errorReporter->dieError( 'The given entity cannot contain labels', 'not-supported' ); } $summary = $this->createSummary( $params ); -- To view, visit https://gerrit.wikimedia.org/r/270289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b15385faf4062ffef2dc1037bc6033401babe20 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene <benestar.wikime...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Bene <benestar.wikime...@gmail.com> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits