Module talk:Citation/CS1/Feature requests: Difference between revisions

Content deleted Content added
Line 293:
—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 15:12, 6 August 2015 (UTC)
::The more general case: The Suggestion list would be better if it accepted regular expressions or something similar. There are myriad misspelled forms of "access-date" that I catch and fix with a regex in [[User:Jonesey95/AutoEd/unnamed.js]]. It would be great if we could feed something like "ac+e+s-*d+a+t+e" (only one "s") or "ac+e+sss+-*d+at+e" (triple "s") into the Suggestions list and have it suggest "access-date". – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 20:53, 6 August 2015 (UTC)
 
== Suppress spurious warning about zero-width joiner ==
 
<nowiki>{{cite web|title=തിരുവിതാംകൂര്‍|language=Malayalam}}</nowiki> on the [[Travancore]] article displays with a warning:
* {{cite web|title=തിരുവിതാംകൂര്‍|language=Malayalam}}
The zero-width joiner is at the very end and is needed for the title to render correctly.
* &#x0D24;&#x0D3F;&#x0D30;&#x0D41;&#x0D35;&#x0D3F;&#x0D24;&#x0D3E;&#x0D02;&#x0D15;&#x0D42;&#x0D30;&#x0D4D;&#x200D; - title with the zero-width joiner
* &#x0D24;&#x0D3F;&#x0D30;&#x0D41;&#x0D35;&#x0D3F;&#x0D24;&#x0D3E;&#x0D02;&#x0D15;&#x0D42;&#x0D30;&#x0D4D; - title without the zero-width joiner
I see that the citation templates support {{para|ignore-isbn-error|true}} to suppress warnings about the ISBN. Can support for {{para|ignore-title-error|true}} be added to suppress warnings about the title field's content?
 
See [[Zero-width joiner#Examples]] for how the zero-width joiner and also [[Zero-width non-joiner#Use of ZWNJ to display alternate forms]] are used to control the rendering of Indic scripts. http://unicode.org/review/pr-37.pdf goes into technical details.
 
Another option, would be for you to check the language field and if it's set to one of the [[Brahmic scripts]], [[Indo-Aryan languages]], or [[Arabic script]]s to suppress the warnings about ZWJ and ZWNJ. --[[User:Marc Kupper|Marc Kupper]]&#124;[[User talk:Marc Kupper|talk]] 00:47, 6 June 2016 (UTC)
 
: I thought of a work-around that does not involve changing the template. Instead, the title can be entered using [[HTML entities]]. Here's the {{tl|cite web}} used in the previous example but using the entities &amp;#x0D24;...&amp;#x200D; rather than UTF-8 as before.
:* {{cite web|title=&#x0D24;&#x0D3F;&#x0D30;&#x0D41;&#x0D35;&#x0D3F;&#x0D24;&#x0D3E;&#x0D02;&#x0D15;&#x0D42;&#x0D30;&#x0D4D;&#x200D;|language=Malayalam}}
:Or, I can enter the title in UTF-8 except for the zero width joiner which I entered as an HTML entity.
:* {{cite web|title=തിരുവിതാംകൂര്&#x200D;|language=Malayalam}}
:There's no warning about the zero width joiner character though I did use one. The downsides are 1) people are used to copy/pasting UTF-8 strings and would need to convert them to HTML entities. 2) If the entire title is converted then it's no longer human readable when in edit-mode and is confusing to humans should just the zero-width joiners be entered as entities.
 
: Another way to code the template check which is to see if any characters in the string being examined are part language blocks that uses characters such as the zero-width joiner and to then suppress warnings about the zero-width joiners. All 13 characters in the example title prior to the zero-width joiner were in the [[Malayalam (Unicode block)]] which runs from U+0D00 to U+0D7F. --[[User:Marc Kupper|Marc Kupper]]&#124;[[User talk:Marc Kupper|talk]] 01:22, 8 June 2016 (UTC)
 
::Please let us not go back to 2004 with HTML entities.
::These are valid Unicode characters, which are required in these languages, and which can be easily typed using keyboards for these languages.
::The right thing would be to check the language automatically and not show this error if it is one of the languages in which this character is valid, as you suggest initially. --[[User:Amire80|Amir E. Aharoni]] ([[User talk:Amire80|talk]]) 15:28, 20 July 2016 (UTC)
 
== Reporting apparent error in error indication ==
 
I was looking at [[Help:CS1#How the templates work]], and saw what looked like unintended error indications there as follows:
 
{{quote|CS1 templates present a citation generally as:
* With author:
:{{Cite journal |last=Author |date=Date |title=Title |work=Work |publisher=Publisher |id=Identifiers |template doc demo=true}}
* Without author:
:{{Cite journal |date=Date |title=Title |work=Work |publisher=Publisher |id=Identifiers |template doc demo=true}}
}}
:(note: wikitext for above copied from ''Help:CS1#How the templates work'')
 
I'm guessing that this comes from the handling of the <code><nowiki>|template doc demo=true</nowiki></code> parameter which is passed there to {{tl|Cite journal}}. I would be outside my comfort zone to pursue this further myself, so I am reporting it here. [[User:Wtmitchell|Wtmitchell]] [[User talk:Wtmitchell|(talk)]] <small>(earlier ''Boracay Bill'')</small> 22:24, 25 April 2017 (UTC)
:Not a feature request, how did you end up here?
 
:{{para|template doc demo|true}} does not prevent error messages; it only prevents this page from being included in {{cl|CS1 errors: dates‎}}. To get rid of the error message, those citations will require a valid date: {{para|date|Date}} is not a valid date; or, the citations should be handwritten without using the templates.
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 22:37, 25 April 2017 (UTC)