Sn1per has uploaded a new change for review.

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

Change subject: [WIP] Convert API help to use i18n
......................................................................

[WIP] Convert API help to use i18n

 - 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
3 files changed, 19 insertions(+), 2 deletions(-)


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

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index adf8958..6234a73 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -419,5 +419,7 @@
        "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": "API module to query available 
badge items.",
+       "apihelp-wbavailablebadges-example-1": "Queries all available badge 
items"
 }
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 1b88650..b97e868 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -444,5 +444,7 @@
        "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}}"
 }
diff --git a/repo/includes/api/AvailableBadges.php 
b/repo/includes/api/AvailableBadges.php
index 1437c5c..5e4e921 100644
--- a/repo/includes/api/AvailableBadges.php
+++ b/repo/includes/api/AvailableBadges.php
@@ -33,6 +33,7 @@
        }
 
        /**
+        * @deprecated since MediaWiki core 1.25
         * @see ApiBase::getDescription
         *
         * @since 0.5
@@ -46,6 +47,7 @@
        }
 
        /**
+        * @deprecated since MediaWiki core 1.25
         * @see ApiBase::getExamples
         *
         * @since 0.5
@@ -59,4 +61,15 @@
                );
        }
 
+       /**
+        * @see ApiBase:getExamplesMessages()
+        *
+        * @return array
+        */
+       protected function getExamplesMessages() {
+               return array(
+                      'action=wbavailablebadges' =>
+                               'apihelp-wbavailablebadges-example-1',
+               );
+       }
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic15389a05531c635ffe59d2d2a9a851c899ced64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Sn1per <geof...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to