Grouping references does not support DBCS characters
Closed, ResolvedPublic

Description

Author: public.wiki

Description:
The extension "Cite" offers <ref> & <references /> tags and an attribution "group" for usage. However, the value of the attribution "group" can not be DBCS characters. I think supporting DBCS characters will be more friendly and convenient for those users in CJK.


Version: unspecified
Severity: enhancement

bzimport added a project: Cite.Via ConduitNov 21 2014, 10:09 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz14216.
bzimport created this task.Via LegacyMay 22 2008, 4:45 AM
bzimport added a comment.Via ConduitMay 22 2008, 1:41 PM

fdcn64 wrote:

now ,write code:
<ref group="註">some notes</ref>

it render HTML:
<sup id="_ref-4" class="reference"><a href="#_note-4" title="">[.E8.A8.BB 1]</a></sup>

please change to:
<sup id="_ref-4" class="reference"><a href="#_note-4" title="">[註 1]</a></sup>

bzimport added a comment.Via ConduitMay 22 2008, 1:47 PM

fdcn64 wrote:

when write:
<references group="註" />

it render nothing.

bzimport added a comment.Via ConduitJun 18 2008, 3:24 AM

fdcn64 wrote:

fix group display

please apply this patch

attachment cite_body.patch ignored as obsolete

bzimport added a comment.Via ConduitJun 18 2008, 3:56 AM

fdcn64 wrote:

str_replace( ' ', '_',$argv['group']) don't need. pls patch below:

Index: Cite_body.php

  • Cite_body.php (revision 36127)

+++ Cite_body.php (working copy)
@@ -202,7 +202,7 @@

			if ( isset( $argv['group'] ) ){
				if (! $wgAllowCiteGroups ) return array(false); //remove when groups are fully tested.
				// Group given.
  • $group = $this->validateName( $argv['group'] );

+ $group = $argv['group'];//don't apply validateName for group display

				unset( $argv['group']);
				--$cnt;
			}
bzimport added a comment.Via ConduitJun 18 2008, 5:04 AM

fdcn64 wrote:

update

update

delete str_replace(' ','_',$)

Attached: cite_body.patch

bzimport added a comment.Via ConduitJun 18 2008, 6:43 PM

shinjiman wrote:

Applied on r36431.

brion added a comment.Via ConduitJun 19 2008, 8:42 PM

Could you also add a parser test case for this to citeParserTests.txt?

bzimport added a comment.Via ConduitJun 20 2008, 2:50 AM

fdcn64 wrote:

add parser test case for chinese groupname

!! test
Simple <ref>, with <references/> in group, with groupname in chinese
!! input
AAA<ref group="参">ref a</ref>BBB<ref group="注">note b</ref>CCC<ref group="参">ref c</ref>

;refs
<references group="参" />
;notes
<references group="注" />
!! result
<p>AAA<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[参 1]</a></sup>BBB<sup id="cite_ref-1" class="reference"><a href="#cite_note-1" title="">[注 1]</a></sup>CCC<sup id="cite_ref-2" class="reference"><a href="#cite_note-2" title="">[参 2]</a></sup>

</p>
<dl><dt>refs
</dt></dl>
<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> ref a</li>
<li id="cite_note-2"><a href="#cite_ref-2" title="">↑</a> ref c</li></ol>
<dl><dt>notes
</dt></dl>
<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1" title="">↑</a> note b</li></ol>

!! end

Attached: cite_tester.patch

brion added a comment.Via ConduitJun 20 2008, 6:41 PM

Thanks! Committed as r36513

Add Comment