jenkins-bot has submitted this change and it was merged. Change subject: Add i18n for API module help ......................................................................
Add i18n for API module help MediaWiki core change I04b1a384 added support for i18n of API module help. This takes advantage of that while still maintaining backwards compatibility with earlier versions of MediaWiki. Once support for MediaWiki before 1.25 is dropped, the methods marked deprecated in this patch may be removed. Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17 --- M ApiQueryPageImages.php M i18n/en.json M i18n/qqq.json 3 files changed, 18 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiQueryPageImages.php b/ApiQueryPageImages.php index fd1fa76..d939f77 100644 --- a/ApiQueryPageImages.php +++ b/ApiQueryPageImages.php @@ -121,6 +121,9 @@ $this->getResult()->addValue( array( 'query', 'pages' ), $pageId, $vals ); } + /** + * @deprecated since MediaWiki core 1.25 + */ public function getDescription() { return 'Returns information about images on the page such as thumbnail and presence of photos.'; } @@ -145,10 +148,15 @@ ), 'continue' => array( ApiBase::PARAM_TYPE => 'integer', + /** @todo Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly */ + constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' => 'api-help-param-continue', ), ); } + /** + * @deprecated since MediaWiki core 1.25 + */ public function getParamDescription() { return array( 'prop' => array( 'What information to return', @@ -159,9 +167,5 @@ 'limit' => 'Properties of how many pages to return', 'continue' => 'When more results are available, use this to continue', ); - } - - public function getVersion() { - return ''; } } diff --git a/i18n/en.json b/i18n/en.json index 7106f31..e383969 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,5 +4,9 @@ }, "pageimages-desc": "Collects information about images used on page", "pageimages-blacklist": "", - "pageimages-info-label": "Page image" + "pageimages-info-label": "Page image", + "apihelp-query+pageimages-description": "Returns information about images on the page, such as thumbnail and presence of photos.", + "apihelp-query+pageimages-param-prop": "Which information to return:\n;thumbnail:URL and dimensions of image associated with page, if any.\n;name:Image title.", + "apihelp-query+pageimages-param-thumbsize": "Maximum thumbnail dimension.", + "apihelp-query+pageimages-param-limit": "Properties of how many pages to return." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 0b79da3..1bb5f0a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -6,5 +6,9 @@ }, "pageimages-desc": "{{desc|name=Page Images|url=http://www.mediawiki.org/wiki/Extension:PageImages}}", "pageimages-blacklist": "List of images. They will never be selected as page images", - "pageimages-info-label": "Label for the page image field on the action=info page.\n\nSee [{{canonicalurl:w:Main Page|action=info}} example]." + "pageimages-info-label": "Label for the page image field on the action=info page.\n\nSee [{{canonicalurl:w:Main Page|action=info}} example].", + "apihelp-query+pageimages-description": "{{doc-apihelp-description|query+pageimages}}", + "apihelp-query+pageimages-param-prop": "{{doc-apihelp-param|query+pageimages|prop}}", + "apihelp-query+pageimages-param-thumbsize": "{{doc-apihelp-param|query+pageimages|thumbsize}}", + "apihelp-query+pageimages-param-limit": "{{doc-apihelp-param|query+pageimages|limit}}" } -- To view, visit https://gerrit.wikimedia.org/r/169831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits