Sn1per has uploaded a new change for review.

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

Change subject: Convert API help to use i18n pt.4
......................................................................

Convert API help to use i18n pt.4

 - API help modified to use i18n messages
 - i18n messages edited to add said messages

Bug: T74704
Change-Id: I6502f6219ea23c7edbf5848a4f3ed561c428e492
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/api/SetClaim.php
M repo/includes/api/SetClaimValue.php
M repo/includes/api/SetDescription.php
M repo/includes/api/SetLabel.php
M repo/includes/api/SetQualifier.php
7 files changed, 144 insertions(+), 137 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/84/178084/1

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 48c0093..273fea8 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -560,5 +560,58 @@
        "apihelp-wbsetaliases-example-1": "Set the English aliases for the 
entity with id Q1 to Foo and Bar",
        "apihelp-wbsetaliases-example-2": "Add Foo and Bar to the list of 
English aliases for the entity with id Q1",
        "apihelp-wbsetaliases-example-3": "Remove Foo and Bar from the list of 
English aliases for the entity with id Q1",
-       "apihelp-wbsetaliases-example-4": "Remove Foo from the list of English 
aliases for the entity with id Q1 while adding Bar to it"
+       "apihelp-wbsetaliases-example-4": "Remove Foo from the list of English 
aliases for the entity with id Q1 while adding Bar to it",
+       "apihelp-wbsetclaim-description": "API module for creating or updating 
an entire Claim.",
+       "apihelp-wbsetclaim-param-claim": "Claim serialization",
+       "apihelp-wbsetclaim-param-index": "The index within the entity's list 
of claims\/statements to move the claim\/statement to. Optional. Be aware that 
when setting an index that specifies a position not next to a clam\/statement 
whose main snak does not feature the same property, the whole group of 
claims\/statements whose main snaks feature the same property is moved. When 
not provided, an existing claim\/statement will stay in place while a new 
claim\/statement will be appended to the last claim\/statement whose main snak 
features the same property.",
+       "apihelp-wbsetclaim-param-summary": "Summary for the edit.\nWill be 
prepended by an automatically generated comment. The length limit of 
the\nautocomment together with the summary is 260 characters. Be aware that 
everything above that\nlimit will be cut off.",
+       "apihelp-wbsetclaim-param-token": "A \"edittoken\" token previously 
obtained through the token module (prop=info).",
+       "apihelp-wbsetclaim-param-baserevid": "The numeric identifier for the 
revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbsetclaim-param-bot": "Mark this edit as bot\nThis URL flag 
will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbsetclaim-example-1": "Set the claim with the given id to 
property P1 with a string value of \"City\"",
+       "apihelp-wbsetclaim-example-2": "Set the claim with the given id to 
property P1 with a string value of \"City\" and move the claim to the topmost 
position within the entity's subgroup of claims that feature the main snak 
property P1. In addition, move the whole subgroup to the top of all subgroups 
aggregated by property.",
+       "apihelp-wbsetclaimvalue-description": "API module for setting the 
value of a Wikibase claim.",
+       "apihelp-wbsetclaimvalue-param-claim": "A GUID identifying the claim",
+       "apihelp-wbsetclaimvalue-param-snaktype": "The type of the snak",
+       "apihelp-wbsetclaimvalue-param-value": "The value to set the datavalue 
of the the main snak of the claim to",
+       "apihelp-wbsetclaimvalue-param-summary": "Summary for the edit.\nWill 
be prepended by an automatically generated comment. The length limit of 
the\nautocomment together with the summary is 260 characters. Be aware that 
everything above that\nlimit will be cut off.",
+       "apihelp-wbsetclaimvalue-param-token": "A \"edittoken\" token 
previously obtained through the token module (prop=info).",
+       "apihelp-wbsetclaimvalue-param-baserevid": "The numeric identifier for 
the revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbsetclaimvalue-param-bot": "Mark this edit as bot\nThis URL 
flag will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbsetclaimvalue-example-1": "Sets the claim with the GUID of 
Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F to a value of Q1",
+       "apihelp-wbsetdescription-description": "API module to set a 
description for a single Wikibase entity.",
+       "apihelp-wbsetdescription-param-id": "The identifier for the entity, 
including the prefix.\nUse either 'id' or 'site' and 'title' together.",
+       "apihelp-wbsetdescription-param-site": "An identifier for the site on 
which the page resides.\nUse together with 'title' to make a complete 
sitelink.",
+       "apihelp-wbsetdescription-param-title": "Title of the page to 
associate.\nUse together with 'site' to make a complete sitelink.",
+       "apihelp-wbsetdescription-param-baserevid": "The numeric identifier for 
the revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbsetdescription-param-summary": "Summary for the edit.\nWill 
be prepended by an automatically generated comment. The length limit of 
the\nautocomment together with the summary is 260 characters. Be aware that 
everything above that\nlimit will be cut off.",
+       "apihelp-wbsetdescription-param-token": "A \"edittoken\" token 
previously obtained through the token module (prop=info).",
+       "apihelp-wbsetdescription-param-bot": "Mark this edit as bot\nThis URL 
flag will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbsetdescription-param-language": "Language of the 
description",
+       "apihelp-wbsetdescription-param-value": "The value to set for the 
description",
+       "apihelp-wbsetdescription-example-1": "Set the string \"An encyclopedia 
that everyone can edit\" for page with id \"Q42\" as a description in English 
language",
+       "apihelp-wbsetdescription-example-2": "Set the string \"An encyclopedia 
that everyone can edit\" as a description in English language for page with a 
sitelink to enwiki:Wikipedia",
+       "apihelp-wbsetlabel-description": "API module to set a label for a 
single Wikibase entity.",
+       "apihelp-wbsetlabel-param-id": "The identifier for the entity, 
including the prefix.\nUse either 'id' or 'site' and 'title' together.",
+       "apihelp-wbsetlabel-param-site": "An identifier for the site on which 
the page resides.\nUse together with 'title' to make a complete sitelink.",
+       "apihelp-wbsetlabel-param-title": "Title of the page to associate.\nUse 
together with 'site' to make a complete sitelink.",
+       "apihelp-wbsetlabel-param-baserevid": "The numeric identifier for the 
revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbsetlabel-param-summary": "Summary for the edit.\nWill be 
prepended by an automatically generated comment. The length limit of 
the\nautocomment together with the summary is 260 characters. Be aware that 
everything above that\nlimit will be cut off.",
+       "apihelp-wbsetlabel-param-token": "A \"edittoken\" token previously 
obtained through the token module (prop=info).",
+       "apihelp-wbsetlabel-param-bot": "Mark this edit as bot\nThis URL flag 
will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbsetlabel-param-language": "Language of the label",
+       "apihelp-wbsetlabel-param-value": "The value of the label",
+       "apihelp-wbsetlabel-example-1": "Set the string \"Wikimedia\" for page 
with id \"Q42\" as a label in English language and report it as pretty printed 
json",
+       "apihelp-wbsetlabel-example-2": "Set the English language label to 
\"Earth\" for the item with site link enwiki => \"Earth\".",
+       "apihelp-wbsetqualifier-description": "API module for creating a 
qualifier or setting the value of an existing one.",
+       "apihelp-wbsetqualifier-param-claim": "A GUID identifying the claim for 
which a qualifier is being set",
+       "apihelp-wbsetqualifier-param-property": "Id of the snaks 
property.\nShould only be provided when creating a new qualifier or changing 
the property of an existing one",
+       "apihelp-wbsetqualifier-param-value": "The new value of the 
qualifier.\nShould only be provdied for PropertyValueSnak qualifiers",
+       "apihelp-wbsetqualifier-param-snaktype": "The type of the snak.\nShould 
only be provided when creating a new qualifier or changing the type of an 
existing one",
+       "apihelp-wbsetqualifier-param-snakhash": "The hash of the snak to 
modify.\nShould only be provided for existing qualifiers",
+       "apihelp-wbsetqualifier-param-summary": "Summary for the edit.\nWill be 
prepended by an automatically generated comment. The length limit of 
the\nautocomment together with the summary is 260 characters. Be aware that 
everything above that\nlimit will be cut off.",
+       "apihelp-wbsetqualifier-param-token": "A \"edittoken\" token previously 
obtained through the token module (prop=info).",
+       "apihelp-wbsetqualifier-param-baserevid": "The numeric identifier for 
the revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbsetqualifier-param-bot": "Mark this edit as bot\nThis URL 
flag will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbsetqualifier-example-1": "Set the qualifier for the given 
claim with property P1 to string value GdyjxP8I6XB3"
 }
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index d54ef6b..d58309f 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -584,5 +584,58 @@
        "apihelp-wbsetaliases-example-1": 
"{{doc-apihelp-example|wbsetaliases}}",
        "apihelp-wbsetaliases-example-2": 
"{{doc-apihelp-example|wbsetaliases}}",
        "apihelp-wbsetaliases-example-3": 
"{{doc-apihelp-example|wbsetaliases}}",
-       "apihelp-wbsetaliases-example-4": "{{doc-apihelp-example|wbsetaliases}}"
+       "apihelp-wbsetaliases-example-4": 
"{{doc-apihelp-example|wbsetaliases}}",
+       "apihelp-wbsetclaim-description": 
"{{doc-apihelp-description|wbsetclaim}}",
+       "apihelp-wbsetclaim-param-claim": 
"{{doc-apihelp-param|wbsetclaim|claim}}",
+       "apihelp-wbsetclaim-param-index": 
"{{doc-apihelp-param|wbsetclaim|index}}",
+       "apihelp-wbsetclaim-param-summary": 
"{{doc-apihelp-param|wbsetclaim|summary}}",
+       "apihelp-wbsetclaim-param-token": 
"{{doc-apihelp-param|wbsetclaim|token}}",
+       "apihelp-wbsetclaim-param-baserevid": 
"{{doc-apihelp-param|wbsetclaim|baserevid}}",
+       "apihelp-wbsetclaim-param-bot": "{{doc-apihelp-param|wbsetclaim|bot}}",
+       "apihelp-wbsetclaim-example-1": "{{doc-apihelp-example|wbsetclaim}}",
+       "apihelp-wbsetclaim-example-2": "{{doc-apihelp-example|wbsetclaim}}",
+       "apihelp-wbsetclaimvalue-description": 
"{{doc-apihelp-description|wbsetclaimvalue}}",
+       "apihelp-wbsetclaimvalue-param-claim": 
"{{doc-apihelp-param|wbsetclaimvalue|claim}}",
+       "apihelp-wbsetclaimvalue-param-snaktype": 
"{{doc-apihelp-param|wbsetclaimvalue|snaktype}}",
+       "apihelp-wbsetclaimvalue-param-value": 
"{{doc-apihelp-param|wbsetclaimvalue|value}}",
+       "apihelp-wbsetclaimvalue-param-summary": 
"{{doc-apihelp-param|wbsetclaimvalue|summary}}",
+       "apihelp-wbsetclaimvalue-param-token": 
"{{doc-apihelp-param|wbsetclaimvalue|token}}",
+       "apihelp-wbsetclaimvalue-param-baserevid": 
"{{doc-apihelp-param|wbsetclaimvalue|baserevid}}",
+       "apihelp-wbsetclaimvalue-param-bot": 
"{{doc-apihelp-param|wbsetclaimvalue|bot}}",
+       "apihelp-wbsetclaimvalue-example-1": 
"{{doc-apihelp-example|wbsetclaimvalue}}",
+       "apihelp-wbsetdescription-description": 
"{{doc-apihelp-description|wbsetdescription}}",
+       "apihelp-wbsetdescription-param-id": 
"{{doc-apihelp-param|wbsetdescription|id}}",
+       "apihelp-wbsetdescription-param-site": 
"{{doc-apihelp-param|wbsetdescription|site}}",
+       "apihelp-wbsetdescription-param-title": 
"{{doc-apihelp-param|wbsetdescription|title}}",
+       "apihelp-wbsetdescription-param-baserevid": 
"{{doc-apihelp-param|wbsetdescription|baserevid}}",
+       "apihelp-wbsetdescription-param-summary": 
"{{doc-apihelp-param|wbsetdescription|summary}}",
+       "apihelp-wbsetdescription-param-token": 
"{{doc-apihelp-param|wbsetdescription|token}}",
+       "apihelp-wbsetdescription-param-bot": 
"{{doc-apihelp-param|wbsetdescription|bot}}",
+       "apihelp-wbsetdescription-param-language": 
"{{doc-apihelp-param|wbsetdescription|language}}",
+       "apihelp-wbsetdescription-param-value": 
"{{doc-apihelp-param|wbsetdescription|value}}",
+       "apihelp-wbsetdescription-example-1": 
"{{doc-apihelp-example|wbsetdescription}}",
+       "apihelp-wbsetdescription-example-2": 
"{{doc-apihelp-example|wbsetdescription}}",
+       "apihelp-wbsetlabel-description": 
"{{doc-apihelp-description|wbsetlabel}}",
+       "apihelp-wbsetlabel-param-id": "{{doc-apihelp-param|wbsetlabel|id}}",
+       "apihelp-wbsetlabel-param-site": 
"{{doc-apihelp-param|wbsetlabel|site}}",
+       "apihelp-wbsetlabel-param-title": 
"{{doc-apihelp-param|wbsetlabel|title}}",
+       "apihelp-wbsetlabel-param-baserevid": 
"{{doc-apihelp-param|wbsetlabel|baserevid}}",
+       "apihelp-wbsetlabel-param-summary": 
"{{doc-apihelp-param|wbsetlabel|summary}}",
+       "apihelp-wbsetlabel-param-token": 
"{{doc-apihelp-param|wbsetlabel|token}}",
+       "apihelp-wbsetlabel-param-bot": "{{doc-apihelp-param|wbsetlabel|bot}}",
+       "apihelp-wbsetlabel-param-language": 
"{{doc-apihelp-param|wbsetlabel|language}}",
+       "apihelp-wbsetlabel-param-value": 
"{{doc-apihelp-param|wbsetlabel|value}}",
+       "apihelp-wbsetlabel-example-1": "{{doc-apihelp-example|wbsetlabel}}",
+       "apihelp-wbsetlabel-example-2": "{{doc-apihelp-example|wbsetlabel}}",
+       "apihelp-wbsetqualifier-description": 
"{{doc-apihelp-description|wbsetqualifier}}",
+       "apihelp-wbsetqualifier-param-claim": 
"{{doc-apihelp-param|wbsetqualifier|claim}}",
+       "apihelp-wbsetqualifier-param-property": 
"{{doc-apihelp-param|wbsetqualifier|property}}",
+       "apihelp-wbsetqualifier-param-value": 
"{{doc-apihelp-param|wbsetqualifier|value}}",
+       "apihelp-wbsetqualifier-param-snaktype": 
"{{doc-apihelp-param|wbsetqualifier|snaktype}}",
+       "apihelp-wbsetqualifier-param-snakhash": 
"{{doc-apihelp-param|wbsetqualifier|snakhash}}",
+       "apihelp-wbsetqualifier-param-summary": 
"{{doc-apihelp-param|wbsetqualifier|summary}}",
+       "apihelp-wbsetqualifier-param-token": 
"{{doc-apihelp-param|wbsetqualifier|token}}",
+       "apihelp-wbsetqualifier-param-baserevid": 
"{{doc-apihelp-param|wbsetqualifier|baserevid}}",
+       "apihelp-wbsetqualifier-param-bot": 
"{{doc-apihelp-param|wbsetqualifier|bot}}",
+       "apihelp-wbsetqualifier-example-1": 
"{{doc-apihelp-example|wbsetqualifier}}"
 }
diff --git a/repo/includes/api/SetClaim.php b/repo/includes/api/SetClaim.php
index e25f943..1b45174 100644
--- a/repo/includes/api/SetClaim.php
+++ b/repo/includes/api/SetClaim.php
@@ -168,48 +168,16 @@
        }
 
        /**
-        * @see ApiBase::getParamDescription
-        *
-        * @since 0.4
+        * @see ApiBase:getExamplesMessages()
         *
         * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       array(
-                               'claim' => 'Claim serialization',
-                               'index' => 'The index within the entity\'s list 
of claims/statements to move the claim/statement to. Optional. Be aware that 
when setting an index that specifies a position not next to a clam/statement 
whose main snak does not feature the same property, the whole group of 
claims/statements whose main snaks feature the same property is moved. When not 
provided, an existing claim/statement will stay in place while a new 
claim/statement will be appended to the last claim/statement whose main snak 
features the same property.',
-                       )
-               );
-       }
-
-       /**
-        * @see ApiBase::getDescription
-        *
-        * @since 0.4
-        *
-        * @return string[]
-        */
-       public function getDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'API module for creating or updating an entire Claim.'
-               );
-       }
-
-       /**
-        * @see ApiBase::getExamples
-        *
-        * @since 0.4
-        *
-        * @return string[]
-        */
-       protected function getExamples() {
-               return array(
-                       
'api.php?action=wbsetclaim&claim={"id":"Q2$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}}'
-                       => 'Set the claim with the given id to property P1 with 
a string value of "City"',
-                       
'api.php?action=wbsetclaim&claim={"id":"Q2$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}}&index=0'
-                       => 'Set the claim with the given id to property P1 with 
a string value of "City" and move the claim to the topmost position within the 
entity\'s subgroup of claims that feature the main snak property P1. In 
addition, move the whole subgroup to the top of all subgroups aggregated by 
property.',
+                       
'action=wbsetclaim&claim={"id":"Q2$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}}'
+                       => 'apihelp-wbsetclaim-example-1',
+                       
'action=wbsetclaim&claim={"id":"Q2$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}}&index=0'
+                       => 'apihelp-wbsetclaim-example-2',
                );
        }
 
diff --git a/repo/includes/api/SetClaimValue.php 
b/repo/includes/api/SetClaimValue.php
index a36e88c..69c6b6c 100644
--- a/repo/includes/api/SetClaimValue.php
+++ b/repo/includes/api/SetClaimValue.php
@@ -111,34 +111,13 @@
        }
 
        /**
-        * @see \ApiBase::getParamDescription
+        * @see ApiBase:getExamplesMessages()
+        *
+        * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       array(
-                               'claim' => 'A GUID identifying the claim',
-                               'snaktype' => 'The type of the snak',
-                               'value' => 'The value to set the datavalue of 
the the main snak of the claim to',
-                       )
-               );
-       }
-
-       /**
-        * @see \ApiBase::getDescription
-        */
-       public function getDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'API module for setting the value of a Wikibase claim.'
-               );
-       }
-
-       /**
-        * @see \ApiBase::getExamples
-        */
-       protected function getExamples() {
-               return array(
-                       
'api.php?action=wbsetclaimvalue&claim=Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F&snaktype=value&value={"entity-type":"item","numeric-id":1}&token=foobar&baserevid=7201010'
 => 'Sets the claim with the GUID of Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F 
to a value of Q1',
+                       
'action=wbsetclaimvalue&claim=Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F&snaktype=value&value={"entity-type":"item","numeric-id":1}&token=foobar&baserevid=7201010'
 => 'apihelp-wbsetclaimvalue-example-1',
                );
        }
 }
diff --git a/repo/includes/api/SetDescription.php 
b/repo/includes/api/SetDescription.php
index 612865d..411ec2b 100644
--- a/repo/includes/api/SetDescription.php
+++ b/repo/includes/api/SetDescription.php
@@ -83,36 +83,16 @@
        }
 
        /**
-        * @see \ApiBase::getParamDescription()
+        * @see ApiBase:getExamplesMessages()
+        *
+        * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       array(
-                               'language' => 'Language of the description',
-                               'value' => 'The value to set for the 
description',
-                       )
-               );
-       }
-
-       /**
-        * @see \ApiBase::getDescription()
-        */
-       public function getDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'API module to set a description for a single Wikibase 
entity.'
-               );
-       }
-
-       /**
-        * @see \ApiBase::getExamples()
-        */
-       protected function getExamples() {
-               return array(
-                       
'api.php?action=wbsetdescription&id=Q42&language=en&value=An%20encyclopedia%20that%20everyone%20can%20edit'
-                               => 'Set the string "An encyclopedia that 
everyone can edit" for page with id "Q42" as a description in English language',
-                       
'api.php?action=wbsetdescription&site=enwiki&title=Wikipedia&language=en&value=An%20encyclopedia%20that%20everyone%20can%20edit'
-                               => 'Set the string "An encyclopedia that 
everyone can edit" as a description in English language for page with a 
sitelink to enwiki:Wikipedia',
+                       
'action=wbsetdescription&id=Q42&language=en&value=An%20encyclopedia%20that%20everyone%20can%20edit'
+                               => 'apihelp-wbsetdescription-example-1',
+                       
'action=wbsetdescription&site=enwiki&title=Wikipedia&language=en&value=An%20encyclopedia%20that%20everyone%20can%20edit'
+                               => 'apihelp-wbsetdescription-example-2',
                );
        }
 
diff --git a/repo/includes/api/SetLabel.php b/repo/includes/api/SetLabel.php
index ef0a1e4..7e52afe 100644
--- a/repo/includes/api/SetLabel.php
+++ b/repo/includes/api/SetLabel.php
@@ -83,36 +83,16 @@
        }
 
        /**
-        * @see \ApiBase::getParamDescription()
+        * @see ApiBase:getExamplesMessages()
+        *
+        * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       array(
-                               'language' => 'Language of the label',
-                               'value' => 'The value of the label',
-                       )
-               );
-       }
-
-       /**
-        * @see \ApiBase::getDescription()
-        */
-       public function getDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'API module to set a label for a single Wikibase 
entity.'
-               );
-       }
-
-       /**
-        * @see \ApiBase::getExamples()
-        */
-       protected function getExamples() {
-               return array(
-                       
'api.php?action=wbsetlabel&id=Q42&language=en&value=Wikimedia&format=jsonfm'
-                               => 'Set the string "Wikimedia" for page with id 
"Q42" as a label in English language and report it as pretty printed json',
-                       
'api.php?action=wbsetlabel&site=enwiki&title=Earth&language=en&value=Earth'
-                               => 'Set the English language label to "Earth" 
for the item with site link enwiki => "Earth".',
+                       
'action=wbsetlabel&id=Q42&language=en&value=Wikimedia&format=jsonfm'
+                               => 'apihelp-wbsetlabel-example-1',
+                       
'action=wbsetlabel&site=enwiki&title=Earth&language=en&value=Earth'
+                               => 'apihelp-wbsetlabel-example-2',
                );
        }
 
diff --git a/repo/includes/api/SetQualifier.php 
b/repo/includes/api/SetQualifier.php
index bfe6768..cc3ae09 100644
--- a/repo/includes/api/SetQualifier.php
+++ b/repo/includes/api/SetQualifier.php
@@ -185,22 +185,18 @@
                return array_merge(
                        parent::getParamDescription(),
                        array(
-                               'claim' => 'A GUID identifying the claim for 
which a qualifier is being set',
+                               'claim' => '',
                                'property' => array(
-                                       'Id of the snaks property.',
-                                       'Should only be provided when creating 
a new qualifier or changing the property of an existing one'
+                                       ''
                                ),
                                'snaktype' => array(
-                                       'The type of the snak.',
-                                       'Should only be provided when creating 
a new qualifier or changing the type of an existing one'
+                                       ''
                                ),
                                'value' => array(
-                                       'The new value of the qualifier. ',
-                                       'Should only be provdied for 
PropertyValueSnak qualifiers'
+                                       ''
                                ),
                                'snakhash' => array(
-                                       'The hash of the snak to modify.',
-                                       'Should only be provided for existing 
qualifiers'
+                                       ''
                                ),
                        )
                );
@@ -215,20 +211,18 @@
         */
        public function getDescription() {
                return array(
-                       'API module for creating a qualifier or setting the 
value of an existing one.'
+                       ''
                );
        }
 
        /**
-        * @see ApiBase::getExamples
-        *
-        * @since 0.3
+        * @see ApiBase:getExamplesMessages()
         *
         * @return array
         */
-       protected function getExamples() {
+       protected function getExamplesMessages() {
                return array(
-                       
'api.php?action=wbsetqualifier&claim=Q2$4554c0f4-47b2-1cd9-2db9-aa270064c9f3&property=P1&value=GdyjxP8I6XB3&snaktype=value&token=foobar'
 => 'Set the qualifier for the given claim with property P1 to string value 
GdyjxP8I6XB3',
+                       
'action=wbsetqualifier&claim=Q2$4554c0f4-47b2-1cd9-2db9-aa270064c9f3&property=P1&value=GdyjxP8I6XB3&snaktype=value&token=foobar'
 => 'apihelp-wbsetqualifier-example-1',
                );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/178084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6502f6219ea23c7edbf5848a4f3ed561c428e492
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to