mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Add more specific class to cite errors
Problem: * VisualEditor needs to be able to more reliably target Cite errors. Solution: * Add a more specific class to cite errors Grumble: * Ideally all extensions would use mw-ext-{extension name} as a prefix to their CSS classes (or something similar). Bug: 51337 Change-Id: If4f5360cc1c7b765ad896b14901a9b024782cc93
This commit is contained in:
parent
da5a49ba48
commit
4f3f9068b0
|
@ -1172,7 +1172,7 @@ class Cite {
|
|||
# We rely on the fact that PHP is okay with passing unused argu-
|
||||
# ments to functions. If $1 is not used in the message, wfMessage will
|
||||
# just ignore the extra parameter.
|
||||
$ret = '<strong class="error">' .
|
||||
$ret = '<strong class="error mw-ext-cite-error">' .
|
||||
wfMessage( 'cite_error', wfMessage( $key, $param )->plain() )->plain() .
|
||||
'</strong>';
|
||||
if ( $parse == 'parse' ) {
|
||||
|
|
|
@ -10,7 +10,7 @@ Simple <ref>, no <references/>
|
|||
Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>
|
||||
!! result
|
||||
<p>Wikipedia rocks!<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>
|
||||
<br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
<br /><strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
</p>
|
||||
!! end
|
||||
|
||||
|
@ -142,7 +142,7 @@ Templating<ref>Text<!--comment--></ref>
|
|||
{{REVISIONID}}<ref>elite</ref>
|
||||
!! result
|
||||
<p>1337<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>
|
||||
<br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
<br /><strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong>
|
||||
</p>
|
||||
!! end
|
||||
|
||||
|
@ -253,23 +253,23 @@ Erroneous refs
|
|||
|
||||
<references />
|
||||
!! result
|
||||
<p><strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<p><strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||
name cannot be a simple integer. Use a descriptive title</strong>
|
||||
</p><p><sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
</p><p><strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||
refs with no content must have a name</strong>
|
||||
</p><p><sup id="cite_ref-bar_2-0" class="reference"><a href="#cite_note-bar-2">[2]</a></sup>
|
||||
</p><p><sup id="cite_ref-blankwithnoreference_3-0" class="reference"><a href="#cite_note-blankwithnoreference-3">[3]</a></sup>
|
||||
</p><p><strong class="error">Cite error: Invalid <code><references></code> tag;
|
||||
</p><p><strong class="error mw-ext-cite-error">Cite error: Invalid <code><references></code> tag;
|
||||
parameter "group" is allowed only.
|
||||
Use <code><references /></code>, or <code><references group="..." /></code></strong>
|
||||
</p>
|
||||
<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>
|
||||
</li>
|
||||
<li id="cite_note-bar"><span class="mw-cite-backlink"><a href="#cite_ref-bar_0">↑</a></span> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<li id="cite_note-bar"><span class="mw-cite-backlink"><a href="#cite_ref-bar_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||
no text was provided for refs named <code>bar</code></strong></li>
|
||||
<li id="cite_note-blankwithnoreference"><span class="mw-cite-backlink"><a href="#cite_ref-blankwithnoreference_0">↑</a></span> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<li id="cite_note-blankwithnoreference"><span class="mw-cite-backlink"><a href="#cite_ref-blankwithnoreference_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||
no text was provided for refs named <code>blankwithnoreference</code></strong></li>
|
||||
</ol>
|
||||
|
||||
|
@ -379,12 +379,12 @@ AAA<ref group="参">ref a</ref>BBB<ref group="注">note b</ref>CCC<ref group="
|
|||
<p><sup id="cite_ref-foo_1-0" class="reference"><a href="#cite_note-foo-1">[2 1]</a></sup>
|
||||
</p>
|
||||
<ol class="references">
|
||||
<li id="cite_note-foo"><span class="mw-cite-backlink"><a href="#cite_ref-foo_0">↑</a></span> <strong class="error">Cite error: Invalid <code><ref></code> tag;
|
||||
<li id="cite_note-foo"><span class="mw-cite-backlink"><a href="#cite_ref-foo_0">↑</a></span> <strong class="error mw-ext-cite-error">Cite error: Invalid <code><ref></code> tag;
|
||||
no text was provided for refs named <code>foo</code></strong></li>
|
||||
</ol>
|
||||
<p><strong class="error">Cite error: <code><ref></code> tag with name "unused" defined in <code><references></code> is not used in prior text.</strong><br />
|
||||
<strong class="error">Cite error: <code><ref></code> tag in <code><references></code> has conflicting group attribute "1".</strong><br />
|
||||
<strong class="error">Cite error: <code><ref></code> tag defined in <code><references></code> has no name attribute.</strong>
|
||||
<p><strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tag with name "unused" defined in <code><references></code> is not used in prior text.</strong><br />
|
||||
<strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tag in <code><references></code> has conflicting group attribute "1".</strong><br />
|
||||
<strong class="error mw-ext-cite-error">Cite error: <code><ref></code> tag defined in <code><references></code> has no name attribute.</strong>
|
||||
</p>
|
||||
!! end
|
||||
|
||||
|
|
Loading…
Reference in a new issue