mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-09-24 10:48:58 +00:00
Merge "Update for API error i18n"
This commit is contained in:
commit
4b97528610
|
@ -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><ref></code> tag;\nname cannot be a simple integer. Use a descriptive title",
|
||||
|
|
|
@ -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>",
|
||||
|
|
|
@ -30,7 +30,7 @@ class ApiQueryReferences extends ApiQueryBase {
|
|||
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 @@ class ApiQueryReferences extends ApiQueryBase {
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue