jenkins-bot has submitted this change and it was merged.

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


Convert API help to use i18n pt.1

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

Bug: T74704
Change-Id: Ic15389a05531c635ffe59d2d2a9a851c899ced64
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/api/AvailableBadges.php
M repo/includes/api/CreateClaim.php
M repo/includes/api/CreateRedirectModule.php
M repo/includes/api/EditEntity.php
M repo/includes/api/FormatSnakValue.php
7 files changed, 141 insertions(+), 178 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index adf8958..1f10bb7 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -419,5 +419,48 @@
        "right-property-term": "Change property terms (labels, descriptions, 
aliases)",
        "right-property-create": "Create properties",
        "wikibase-entity-not-viewable-title": "Content type mismatch: Can not 
display content",
-       "wikibase-entity-not-viewable": "The given content of type \"$1\" is 
not an Entity and can not be displayed by Wikibase."
+       "wikibase-entity-not-viewable": "The given content of type \"$1\" is 
not an Entity and can not be displayed by Wikibase.",
+       "apihelp-wbavailablebadges-description": "Queries available badge 
items.",
+       "apihelp-wbavailablebadges-example-1": "Queries all available badge 
items",
+       "apihelp-wbcreateclaim-description": "Creates Wikibase claims.",
+       "apihelp-wbcreateclaim-param-entity": "ID of the entity you are adding 
the claim to",
+       "apihelp-wbcreateclaim-param-property": "ID of the snaks property",
+       "apihelp-wbcreateclaim-param-value": "Value of the snak when creating a 
claim with a snak that has a value",
+       "apihelp-wbcreateclaim-param-snaktype": "The type of the snak",
+       "apihelp-wbcreateclaim-example-1": "Creates a claim for item Q42 of 
property P9001 with a novalue snak.",
+       "apihelp-wbcreateclaim-example-2": "Creates a claim for item Q42 of 
property P9002 with string value \"itsastring\"",
+       "apihelp-wbcreateclaim-example-3": "Creates a claim for item Q42 of 
property P9003 with a value of item Q1",
+       "apihelp-wbcreateclaim-example-4": "Creates a claim for item Q42 of 
property P9004 with a coordinate snak value",
+       "apihelp-wbcreateredirect-description": "Creates Entity redirects.",
+       "apihelp-wbcreateredirect-param-from": "Entity ID to make a redirect",
+       "apihelp-wbcreateredirect-param-to": "Entity ID to point the redirect 
to",
+       "apihelp-wbcreateredirect-param-bot": "Mark this edit as bot\nThis URL 
flag will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbcreateredirect-example-1": "Turn Q11 into a redirect to Q12",
+       "apihelp-wbeditentity-description": "Creates a single new Wikibase 
entity and modifies it with serialised information.",
+       "apihelp-wbeditentity-param-id": "The identifier for the entity, 
including the prefix.\nUse either 'id' or 'site' and 'title' together.",
+       "apihelp-wbeditentity-param-site": "An identifier for the site on which 
the page resides.\nUse together with 'title' to make a complete sitelink.",
+       "apihelp-wbeditentity-param-title": "Title of the page to 
associate.\nUse together with 'site' to make a complete sitelink.",
+       "apihelp-wbeditentity-param-baserevid": "The numeric identifier for the 
revision to base the modification on.\nThis is used for detecting conflicts 
during save.",
+       "apihelp-wbeditentity-param-summary": "Summary for the edit.\nWill be 
prepended by an automatically generated comment. The length limit of the 
autocomment together with the summary is 260 characters. Be aware that 
everything above that limit will be cut off.",
+       "apihelp-wbeditentity-param-bot": "Mark this edit as bot\nThis URL flag 
will only be respected if the user belongs to the group \"bot\".",
+       "apihelp-wbeditentity-param-data": "The serialized object that is used 
as the data source.\nA newly created entity will be assigned an 'id'.",
+       "apihelp-wbeditentity-param-clear": "If set, the complete entity is 
emptied before proceeding.\nThe entity will not be saved before it is filled 
with the \"data\", possibly with parts excluded.",
+       "apihelp-wbeditentity-param-new": "If set, a new entity will be 
created.\nSet this to the type of the entity you want to create - currently 
'item'|'property'.\nIt is not allowed to have this set when 'id' is also set.",
+       "apihelp-wbeditentity-example-1": "Create a new empty item, return full 
entity structure",
+       "apihelp-wbeditentity-example-2": "Create a new item and set labels for 
de and en",
+       "apihelp-wbeditentity-example-3": "Create a new property containing the 
json data, returns extended with the item structure",
+       "apihelp-wbeditentity-example-4": "Clear all data from entity with ID 
Q42",
+       "apihelp-wbeditentity-example-5": "Clear all data from entity with ID 
Q42 and set a label for en",
+       "apihelp-wbeditentity-example-6": "Sets sitelink for nowiki, 
overwriting it if it already exists",
+       "apihelp-wbeditentity-example-7": "Sets description for nb, overwriting 
it if it already exists",
+       "apihelp-wbeditentity-example-8": "Creates a new claim on the item for 
the property P56 and a value of \"ExampleString\"",
+       "apihelp-wbeditentity-example-9": "Removes the claims from the item 
with the guids Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F and 
Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X",
+       "apihelp-wbeditentity-example-10": "Sets the claim with the GUID to the 
value of the claim",
+       "apihelp-wbformatvalue-description": "Formats DataValues.",
+       "apihelp-wbformatvalue-param-generate": "The desired output format to 
generate.",
+       "apihelp-wbformatvalue-param-datatype": "The value's data type. This is 
distinct from the value's type",
+       "apihelp-wbformatvalue-param-datavalue": "The data to format. This has 
to be the JSON serialization of a DataValue object.",
+       "apihelp-wbformatvalue-param-options": "The options the formatter 
should use. Provided as a JSON object.",
+       "apihelp-wbformatvalue-example-1": "Format a simple string value.",
+       "apihelp-wbformatvalue-example-2": "Format a string value as a URL in 
HTML."
 }
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 1b88650..7fd8205 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -444,5 +444,50 @@
        "right-property-term": "{{doc-right|property-term}}\nRight to alter the 
[[d:Wikidata:Glossary#Term|terms]] of [[d:Wikidata:Glossary#Item|items]].",
        "right-property-create": "{{doc-right|property-create}}\nRight to 
create new [[d:Wikidata:Glossary#Property|properties]].",
        "wikibase-entity-not-viewable-title": "Page title on the error page 
saying that content can't be displayed.",
-       "wikibase-entity-not-viewable": "Error message saying that some content 
can't be rendered. $1 is the content model of the content that can't be 
displayed (eg. wikitext)."
+       "wikibase-entity-not-viewable": "Error message saying that some content 
can't be rendered. $1 is the content model of the content that can't be 
displayed (eg. wikitext).",
+       "apihelp-wbavailablebadges-description": 
"{{doc-apihelp-description|wbavailablebadges}}",
+       "apihelp-wbavailablebadges-example-1": 
"{{doc-apihelp-example|wbavailablebadges}}",
+       "apihelp-wbcreateclaim-description": 
"{{doc-apihelp-description|wbcreateclaim}}",
+       "apihelp-wbcreateclaim-param-entity": 
"{{doc-apihelp-param|wbcreateclaim|entity}}",
+       "apihelp-wbcreateclaim-param-property": 
"{{doc-apihelp-param|wbcreateclaim|property}}",
+       "apihelp-wbcreateclaim-param-value": 
"{{doc-apihelp-param|wbcreateclaim|value}}",
+       "apihelp-wbcreateclaim-param-snaktype": 
"{{doc-apihelp-param|wbcreateclaim|snaktype}}",
+       "apihelp-wbcreateclaim-example-1": 
"{{doc-apihelp-example|wbcreateclaim}}",
+       "apihelp-wbcreateclaim-example-2": 
"{{doc-apihelp-example|wbcreateclaim}}",
+       "apihelp-wbcreateclaim-example-3": 
"{{doc-apihelp-example|wbcreateclaim}}",
+       "apihelp-wbcreateclaim-example-4": 
"{{doc-apihelp-example|wbcreateclaim}}",
+       "apihelp-wbcreateredirect-description": 
"{{doc-apihelp-description|wbcreateredirect}}",
+       "apihelp-wbcreateredirect-param-from": 
"{{doc-apihelp-param|wbcreateclaim|from}}",
+       "apihelp-wbcreateredirect-param-to": 
"{{doc-apihelp-param|wbcreateclaim|to}}",
+       "apihelp-wbcreateredirect-param-token": 
"{{doc-apihelp-param|wbcreateclaim|token}}",
+       "apihelp-wbcreateredirect-param-bot": 
"{{doc-apihelp-param|wbcreateclaim|bot}}",
+       "apihelp-wbcreateredirect-example-1": 
"{{doc-apihelp-example|wbcreateredirect}}",
+       "apihelp-wbeditentity-description": 
"{{doc-apihelp-description|wbeditentity}}",
+       "apihelp-wbeditentity-param-id": 
"{{doc-apihelp-param|wbeditentity|id}}",
+       "apihelp-wbeditentity-param-site": 
"{{doc-apihelp-param|wbeditentity|site}}",
+       "apihelp-wbeditentity-param-title": 
"{{doc-apihelp-param|wbeditentity|title}}",
+       "apihelp-wbeditentity-param-baserevid": 
"{{doc-apihelp-param|wbeditentity|baserevid}}",
+       "apihelp-wbeditentity-param-summary": 
"{{doc-apihelp-param|wbeditentity|summary}}",
+       "apihelp-wbeditentity-param-token": 
"{{doc-apihelp-param|wbeditentity|token}}",
+       "apihelp-wbeditentity-param-bot": 
"{{doc-apihelp-param|wbeditentity|bot}}",
+       "apihelp-wbeditentity-param-data": 
"{{doc-apihelp-param|wbeditentity|data}}",
+       "apihelp-wbeditentity-param-clear": 
"{{doc-apihelp-param|wbeditentity|clear}}",
+       "apihelp-wbeditentity-param-new": 
"{{doc-apihelp-param|wbeditentity|new}}",
+       "apihelp-wbeditentity-example-1": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-2": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-3": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-4": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-5": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-6": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-7": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-8": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-9": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbeditentity-example-10": 
"{{doc-apihelp-example|wbeditentity}}",
+       "apihelp-wbformatvalue-description": 
"{{doc-apihelp-description|wbformatvalue}}",
+       "apihelp-wbformatvalue-param-generate": 
"{{doc-apihelp-param|wbformatvalue|generate}}",
+       "apihelp-wbformatvalue-param-datatype": 
"{{doc-apihelp-param|wbformatvalue|datatype}}",
+       "apihelp-wbformatvalue-param-datavalue": 
"{{doc-apihelp-param|wbformatvalue|datavalue}}",
+       "apihelp-wbformatvalue-param-options": 
"{{doc-apihelp-param|wbformatvalue|options}}",
+       "apihelp-wbformatvalue-example-1": 
"{{doc-apihelp-example|wbformatvalue}}",
+       "apihelp-wbformatvalue-example-2": 
"{{doc-apihelp-example|wbformatvalue}}"
 }
diff --git a/repo/includes/api/AvailableBadges.php 
b/repo/includes/api/AvailableBadges.php
index 1437c5c..0f4d370 100644
--- a/repo/includes/api/AvailableBadges.php
+++ b/repo/includes/api/AvailableBadges.php
@@ -33,30 +33,15 @@
        }
 
        /**
-        * @see ApiBase::getDescription
-        *
-        * @since 0.5
-        *
-        * @return string
-        */
-       public function getDescription() {
-               return array(
-                       'API module to query available badge items.'
-               );
-       }
-
-       /**
-        * @see ApiBase::getExamples
-        *
-        * @since 0.5
+        * @see ApiBase::getExamplesMessages()
         *
         * @return array
         */
-       protected function getExamples() {
+       protected function getExamplesMessages() {
                return array(
-                       'api.php?action=wbavailablebadges' =>
-                               'Queries all available badge items',
+                       'action=wbavailablebadges' =>
+                               'apihelp-wbavailablebadges-example-1',
                );
        }
 
-}
\ No newline at end of file
+}
diff --git a/repo/includes/api/CreateClaim.php 
b/repo/includes/api/CreateClaim.php
index c5fe556..6bf7c0d 100644
--- a/repo/includes/api/CreateClaim.php
+++ b/repo/includes/api/CreateClaim.php
@@ -137,42 +137,20 @@
        }
 
        /**
-        * @see \ApiBase::getParamDescription
+        * @see ApiBase::getExamplesMessages()
+        *
+        * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       array(
-                               'entity' => 'Id of the entity you are adding 
the claim to',
-                               'property' => 'Id of the snaks property',
-                               'value' => 'Value of the snak when creating a 
claim with a snak that has a value',
-                               'snaktype' => 'The type of the snak',
-                       )
-               );
-       }
-
-       /**
-        * @see \ApiBase::getDescription
-        */
-       public function getDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'API module for creating Wikibase claims.'
-               );
-       }
-
-       /**
-        * @see \ApiBase::getExamples
-        */
-       protected function getExamples() {
-               return array(
-                       
'api.php?action=wbcreateclaim&entity=Q42&property=P9001&snaktype=novalue'
-                               =>'Creates a claim for item Q42 of property 
P9001 with a novalue snak.',
-                       
'api.php?action=wbcreateclaim&entity=Q42&property=P9002&snaktype=value&value="itsastring"'
-                               => ' Creates a claim for item Q42 of property 
P9002 with string value "itsastring"',
-                       
'api.php?action=wbcreateclaim&entity=Q42&property=P9003&snaktype=value&value={"entity-type":"item","numeric-id":1}'
-                               => 'Creates a claim for item Q42 of property 
P9003 with a value of item Q1',
-                       
'api.php?action=wbcreateclaim&entity=Q42&property=P9004&snaktype=value&value={"latitude":40.748433,"longitude":-73.985656,"globe":"http://www.wikidata.org/entity/Q2","precision":0.000001}'
-                               => 'Creates a claim for item Q42 of property 
P9004 with a coordinate snak value',
+                       
'action=wbcreateclaim&entity=Q42&property=P9001&snaktype=novalue'
+                               =>'apihelp-wbcreateclaim-example-1',
+                       
'action=wbcreateclaim&entity=Q42&property=P9002&snaktype=value&value="itsastring"'
+                               => 'apihelp-wbcreateclaim-example-2',
+                       
'action=wbcreateclaim&entity=Q42&property=P9003&snaktype=value&value={"entity-type":"item","numeric-id":1}'
+                               => 'apihelp-wbcreateclaim-example-3',
+                       
'action=wbcreateclaim&entity=Q42&property=P9004&snaktype=value&value={"latitude":40.748433,"longitude":-73.985656,"globe":"http://www.wikidata.org/entity/Q2","precision":0.000001}'
+                               => 'apihelp-wbcreateclaim-example-4',
                );
        }
 }
diff --git a/repo/includes/api/CreateRedirectModule.php 
b/repo/includes/api/CreateRedirectModule.php
index 8dca3e3..92597ee 100644
--- a/repo/includes/api/CreateRedirectModule.php
+++ b/repo/includes/api/CreateRedirectModule.php
@@ -177,40 +177,14 @@
        }
 
        /**
-        * Get final parameter descriptions, after hooks have had a chance to 
tweak it as
-        * needed.
+        * @see ApiBase::getExamplesMessages()
         *
-        * @return array|bool False on no parameter descriptions
+        * @return array
         */
-       public function getParamDescription() {
+       protected function getExamplesMessages() {
                return array(
-                       'from' => array( 'Entity ID to make a redirect' ),
-                       'to' => array( 'Entity ID to point the redirect to' ),
-                       'token' => 'A "edittoken" token previously obtained 
through the token module',
-                       'bot' => array( 'Mark this edit as bot',
-                               'This URL flag will only be respected if the 
user belongs to the group "bot".'
-                       ),
-               );
-       }
-
-       /**
-        * Returns the description string for this module
-        * @return mixed string or array of strings
-        */
-       public function getDescription() {
-               return array(
-                       'API module for creating Entity redirects.'
-               );
-       }
-
-       /**
-        * Returns usage examples for this module. Return false if no examples 
are available.
-        * @return bool|string|array
-        */
-       protected function getExamples() {
-               return array(
-                       'api.php?action=wbcreateredirect&from=Q11&to=Q12'
-                               => 'Turn Q11 into a redirect to Q12',
+                       'action=wbcreateredirect&from=Q11&to=Q12'
+                               => 'apihelp-wbcreateredirect-example-1',
                );
        }
 
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 67e3904..3f14b65 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -733,66 +733,35 @@
        }
 
        /**
-        * @see ApiBase::getParamDescription
+        * @see ApiBase:getExamplesMessages()
+        *
+        * @return array
         */
-       public function getParamDescription() {
-               return array_merge(
-                       parent::getParamDescription(),
-                       parent::getParamDescriptionForId(),
-                       parent::getParamDescriptionForSiteLink(),
-                       parent::getParamDescriptionForEntity(),
-                       array(
-                               'data' => array( 'The serialized object that is 
used as the data source.',
-                                       "A newly created entity will be 
assigned an 'id'."
-                               ),
-                               'clear' => array( 'If set, the complete entity 
is emptied before proceeding.',
-                                       'The entity will not be saved before it 
is filled with the "data", possibly with parts excluded.'
-                               ),
-                               'new' => array( "If set, a new entity will be 
created.",
-                                       "Set this to the type of the entity you 
want to create - currently 'item'|'property'.",
-                                       "It is not allowed to have this set 
when 'id' is also set."
-                               ),
-                       )
-               );
-       }
-
-       /**
-        * @see ApiBase::getDescription
-        */
-       public function getDescription() {
-               return array(
-                       'API module to create a single new Wikibase entity and 
modify it with serialised information.'
-               );
-       }
-
-       /**
-        * @see ApiBase::getExamples
-        */
-       protected function getExamples() {
+       protected function getExamplesMessages() {
                return array(
                        // Creating new entites
-                       'api.php?action=wbeditentity&new=item&data={}'
-                       => 'Create a new empty item, return full entity 
structure',
-                       
'api.php?action=wbeditentity&new=item&data={"labels":{"de":{"language":"de","value":"de-value"},"en":{"language":"en","value":"en-value"}}}'
-                       => 'Create a new item and set labels for de and en',
-                       
'api.php?action=wbeditentity&new=property&data={"labels":{"en-gb":{"language":"en-gb","value":"Propertylabel"}},"descriptions":{"en-gb":{"language":"en-gb","value":"Propertydescription"}},"datatype":"string"}'
-                       => 'Create a new property containing the json data, 
returns extended with the item structure',
+                       'action=wbeditentity&new=item&data={}'
+                       => 'apihelp-wbeditentity-example-1',
+                       
'action=wbeditentity&new=item&data={"labels":{"de":{"language":"de","value":"de-value"},"en":{"language":"en","value":"en-value"}}}'
+                       => 'apihelp-wbeditentity-example-2',
+                       
'action=wbeditentity&new=property&data={"labels":{"en-gb":{"language":"en-gb","value":"Propertylabel"}},"descriptions":{"en-gb":{"language":"en-gb","value":"Propertydescription"}},"datatype":"string"}'
+                       => 'apihelp-wbeditentity-example-3',
                        // Clearing entities
-                       'api.php?action=wbeditentity&clear=true&id=Q42&data={}'
-                       => 'Clear all data from entity with id Q42',
-                       
'api.php?action=wbeditentity&clear=true&id=Q42&data={"labels":{"en":{"language":"en","value":"en-value"}}}'
-                       => 'Clear all data from entity with id Q42 and set a 
label for en',
+                       'action=wbeditentity&clear=true&id=Q42&data={}'
+                       => 'apihelp-wbeditentity-example-4',
+                       
'action=wbeditentity&clear=true&id=Q42&data={"labels":{"en":{"language":"en","value":"en-value"}}}'
+                       => 'apihelp-wbeditentity-example-5',
                        // Setting stuff
-                       
'api.php?action=wbeditentity&id=Q42&data={"sitelinks":{"nowiki":{"site":"nowiki","title":"København"}}}'
-                       => 'Sets sitelink for nowiki, overwriting it if it 
already exists',
-                       
'api.php?action=wbeditentity&id=Q42&data={"descriptions":{"nb":{"language":"nb","value":"nb-Description-Here"}}}'
-                       => 'Sets description for nb, overwriting it if it 
already exists',
-                       
'api.php?action=wbeditentity&id=Q42&data={"claims":[{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}]}'
-                       => 'Creates a new claim on the item for the property 
P56 and a value of "ExampleString"',
-                       
'api.php?action=wbeditentity&id=Q42&data={"claims":[{"id":"Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F","remove":""},{"id":"Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","remove":""}]}'
-                       => 'Removes the claims from the item with the guids 
Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F and 
Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X',
-                       
'api.php?action=wbeditentity&id=Q42&data={"claims":[{"id":"Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ChangedString","type":"string"}},"type":"statement","rank":"normal"}]}'
-                       => 'Sets the claim with the GUID to the value of the 
claim',
+                       
'action=wbeditentity&id=Q42&data={"sitelinks":{"nowiki":{"site":"nowiki","title":"København"}}}'
+                       => 'apihelp-wbeditentity-example-6',
+                       
'action=wbeditentity&id=Q42&data={"descriptions":{"nb":{"language":"nb","value":"nb-Description-Here"}}}'
+                       => 'apihelp-wbeditentity-example-7',
+                       
'action=wbeditentity&id=Q42&data={"claims":[{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}]}'
+                       => 'apihelp-wbeditentity-example-8',
+                       
'action=wbeditentity&id=Q42&data={"claims":[{"id":"Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F","remove":""},{"id":"Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","remove":""}]}'
+                       => 'apihelp-wbeditentity-example-9',
+                       
'action=wbeditentity&id=Q42&data={"claims":[{"id":"Q42$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ChangedString","type":"string"}},"type":"statement","rank":"normal"}]}'
+                       => 'apihelp-wbeditentity-example-10',
                );
        }
 
diff --git a/repo/includes/api/FormatSnakValue.php 
b/repo/includes/api/FormatSnakValue.php
index 3ff0c56..7e533db 100644
--- a/repo/includes/api/FormatSnakValue.php
+++ b/repo/includes/api/FormatSnakValue.php
@@ -198,56 +198,25 @@
        }
 
        /**
-        * @see ApiBase::getParamDescription
-        *
-        * @since 0.1
+        * @see ApiBase::getExamplesMessages()
         *
         * @return array
         */
-       public function getParamDescription() {
-               return array(
-                       'generate' => 'The desired output format to generate.',
-                       'datatype' => 'The value\'s data type. This is distinct 
from the value\'s type',
-                       'datavalue' => 'The data to format. This has to be the 
JSON serialization of a DataValue object.',
-                       'options' => 'The options the formatter should use. 
Provided as a JSON object.',
-               );
-       }
-
-       /**
-        * @see ApiBase::getDescription
-        *
-        * @since 0.1
-        *
-        * @return string
-        */
-       public function getDescription() {
-               return array(
-                       'API module for formatting DataValues.'
-               );
-       }
-
-       /**
-        * @see ApiBase::getExamples
-        *
-        * @since 0.1
-        *
-        * @return array
-        */
-       protected function getExamples() {
-               $query = "api.php?action=" . $this->getModuleName() ;
+       protected function getExamplesMessages() {
+               $query = "action=" . $this->getModuleName() ;
                $hello = new StringValue( 'hello' );
                $acme = new StringValue( 'http://acme.org' );
 
                return array(
                        $query . '&' . wfArrayToCgi( array(
                                'datavalue' => json_encode( $hello->toArray() ),
-                       ) ) => 'Format a simple string value.',
+                       ) ) => 'apihelp-wbformatvalue-example-1',
 
                        $query . '&' . wfArrayToCgi( array(
                                'datavalue' => json_encode( $acme->toArray() ),
                                'datatype' => 'url',
                                'generate' => 'text/html',
-                       ) ) => 'Format a string value as a URL in HTML.',
+                       ) ) => 'apihelp-wbformatvalue-example-2',
 
                        //TODO: example for the options parameter, once we have 
something sensible to show there.
                );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic15389a05531c635ffe59d2d2a9a851c899ced64
Gerrit-PatchSet: 15
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to