jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344183 )

Change subject: i18n: Don't try to spell out all the options that are allowed
......................................................................


i18n: Don't try to spell out all the options that are allowed

Bug: T160628
Change-Id: Ibf728277c5bd4df5d3e8534848ee686239090376
---
M i18n/en.json
M includes/Cite.php
M tests/parser/citeParserTests.txt
3 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index b5c6c1b..fb497a3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -26,7 +26,7 @@
        "cite_error_ref_no_input": "Invalid <code>&lt;ref&gt;</code> tag;\nrefs 
with no name must have content",
        "cite_error_references_duplicate_key": "Invalid 
<code>&lt;ref&gt;</code> tag; name \"$1\" defined multiple times with different 
content",
        "cite_error_references_invalid_parameters": "Invalid 
<code>&lt;references&gt;</code> tag;\nno parameters are allowed.\nUse 
<code>&lt;references /&gt;</code>",
-       "cite_error_references_invalid_parameters_group": "Invalid 
<code>&lt;references&gt;</code> tag;\nparameter \"group\" is allowed only.\nUse 
<code>&lt;references /&gt;</code>, or <code>&lt;references group=\"...\" 
/&gt;</code>",
+       "cite_error_references_invalid_parameters_group": "Invalid parameter in 
<code>&lt;references&gt;</code> tag",
        "cite_error_references_no_backlink_label": "Ran out of custom backlink 
labels.\nDefine more in the <nowiki>[[MediaWiki:Cite references link many 
format backlink labels]]</nowiki> message.",
        "cite_error_no_link_label_group": "Ran out of custom link labels for 
group \"$1\".\nDefine more in the <nowiki>[[MediaWiki:$2]]</nowiki> message.",
        "cite_error_references_no_text": "Invalid <code>&lt;ref&gt;</code> 
tag;\nno text was provided for refs named <code>$1</code>",
diff --git a/includes/Cite.php b/includes/Cite.php
index cb1c81d..eca6a57 100644
--- a/includes/Cite.php
+++ b/includes/Cite.php
@@ -713,11 +713,13 @@
                        $responsive = $wgCiteResponsiveReferences;
                }
 
-               if ( $argv && $wgAllowCiteGroups ) {
-                       return $this->error( 
'cite_error_references_invalid_parameters_group' );
-               }
+               // There are remaining parameters we don't recognise
                if ( $argv ) {
-                       return $this->error( 
'cite_error_references_invalid_parameters' );
+                       if ( $wgAllowCiteGroups ) {
+                               return $this->error( 
'cite_error_references_invalid_parameters_group' );
+                       } else {
+                               return $this->error( 
'cite_error_references_invalid_parameters' );
+                       }
                }
 
                $s = $this->referencesFormat( $group, $responsive );
diff --git a/tests/parser/citeParserTests.txt b/tests/parser/citeParserTests.txt
index 6e7f038..dba772d 100644
--- a/tests/parser/citeParserTests.txt
+++ b/tests/parser/citeParserTests.txt
@@ -288,9 +288,7 @@
 </p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Cite error: 
The opening <code>&lt;ref&gt;</code> tag is malformed or has a bad name</span>
 </p><p><sup id="cite_ref-bar_2-0" class="reference"><a 
href="#cite_note-bar-2">&#91;2&#93;</a></sup>
 </p><p><sup id="cite_ref-blankwithnoreference_3-0" class="reference"><a 
href="#cite_note-blankwithnoreference-3">&#91;3&#93;</a></sup>
-</p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Cite error: 
Invalid <code>&lt;references&gt;</code> tag;
-parameter "group" is allowed only.
-Use <code>&lt;references /&gt;</code>, or <code>&lt;references group="..." 
/&gt;</code></span>
+</p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Cite error: 
Invalid parameter in <code>&lt;references&gt;</code> tag</span>
 </p>
 <div class="mw-references-wrap"><ol class="references">
 <li id="cite_note-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-1">↑</a></span> <span class="reference-text">Also zero, but 
differently! (Normal ref)</span>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf728277c5bd4df5d3e8534848ee686239090376
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Krinkle <[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