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

Change subject: Update for API error i18n
......................................................................


Update for API error i18n

See Iae0e2ce3.

Change-Id: I8f214dd95876e1eadc4a0463cba3d5a13d783014
---
M i18n/en.json
M i18n/qqq.json
M includes/ApiQueryReferences.php
3 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index ab99d18..d8559e8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,6 +17,7 @@
        },
        "apihelp-query+references-description": "Return a data representation 
of references associated with the given pages.",
        "apihelp-query+references-example-1": "References associated with 
<kbd>Albert Einstein</kbd>.",
+       "apierror-citestoragedisabled": "Cite extension reference storage is 
not enabled.",
        "cite-desc": "Adds <nowiki><ref[ name=id]></nowiki> and 
<nowiki><references/></nowiki> tags, for citations",
        "cite_error": "Cite error: $1",
        "cite_error_ref_numeric_key": "Invalid <code>&lt;ref&gt;</code> 
tag;\nname cannot be a simple integer. Use a descriptive title",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 06e4ab1..d268099 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,7 @@
        },
        "apihelp-query+references-description": 
"{{doc-apihelp-description|query+references}}",
        "apihelp-query+references-example-1": 
"{{doc-apihelp-example|query+references}}",
+       "apierror-citestoragedisabled": "{{doc-apierror}}",
        "cite-desc": 
"{{desc|name=Cite|url=https://www.mediawiki.org/wiki/Extension:Cite}}";,
        "cite_error": "Cite extension.\n\nUsed when there are errors in ref or 
references tags.\n\nParameters:\n* $1 - an error message",
        "cite_error_ref_numeric_key": "Cite extension. Error message shown if 
the name of a ref tag only contains digits. Examples that cause this error are 
<code><nowiki><ref name=\"123\" /></nowiki></code> or <code><nowiki><ref 
name=\"456\">input</ref></nowiki></code>",
diff --git a/includes/ApiQueryReferences.php b/includes/ApiQueryReferences.php
index f5baa07..2090159 100644
--- a/includes/ApiQueryReferences.php
+++ b/includes/ApiQueryReferences.php
@@ -30,7 +30,7 @@
        public function getAllowedParams() {
                return [
                   'continue' => [
-                      ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+                          ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
                   ],
                ];
        }
@@ -38,7 +38,11 @@
        public function execute() {
                $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'cite' );
                if ( !$config->get( 'CiteStoreReferencesData' ) ) {
-                       $this->dieUsage( 'Cite extension reference storage is 
not enabled', 'citestoragedisabled' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-citestoragedisabled' );
+                       } else {
+                               $this->dieUsage( 'Cite extension reference 
storage is not enabled', 'citestoragedisabled' );
+                       }
                }
                $params = $this->extractRequestParams();
                $titles = $this->getPageSet()->getGoodTitles();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f214dd95876e1eadc4a0463cba3d5a13d783014
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Gergő Tisza <gti...@wikimedia.org>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@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

Reply via email to