Content deleted Content added
ClueBot III (talk | contribs) m Archiving 2 discussions from Help talk:Citation Style 1. (BOT) |
ClueBot III (talk | contribs) m Archiving 2 discussions from Help talk:Citation Style 1. (BOT) |
||
Line 3,370:
I think the advice to use {{tl|cite web}} instead of a more specific citation type for a source found on the web rather than through hardcopy is wrongheaded. When we find books online through Google books, we should use {{tl|cite book}}, not {{tl|cite web}}. When we find academic journal articles online at their official publisher's online repository, we should use {{tl|cite journal}}, not {{tl|cite web}}, even for journals that have no print edition and are only online. And for the same reason, if we are viewing a facsimile of a written letter, we should still use {{tl|cite letter}}. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 23:51, 13 August 2015 (UTC)
:Yes, this is why the {{para|url}} parameter is not confined to {{tlx|cite web}} but is included in all the others. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 12:12, 14 August 2015 (UTC)
== error handling for parameters with defined values ==
As the result of a conversation [[User_talk:GoingBatty#Removing_p_from_ref_pages_parameter|elsewhere]], I have added a function <code>is_valid_parameter_value()</code> that checks a parameter's value against a list of accepted values. If the parameter value is not a member of the accepted list, the function emits an invalid parameter error. There is code in the current live module that detects these kinds of errors for {{para|mde}} and {{para|name-list-format}}. This new code extends that functionality to several other parameters.
;{{para|nopp}}
:accepted values are 'yes', 'true', 'y'
:*{{cite book/new |title=Title: nopp=y |page=pp. 45-46 |nopp=y}}
:*{{cite book/new |title=Title: nopp=true |page=pp. 45-46 |nopp=true}}
:*{{cite book/new |title=Title: nopp=yes |page=pp. 45-46 |nopp=yes}}
:*{{cite book/new |title=Title: nopp=1 |page=pp. 45-46 |nopp=1}}
;{{para|name-list-format}}
:accepted value is 'vanc'
:*{{cite book/new |title=Title: name-list-format=vanc |name-list-format=vanc |last=Last |first=Fred George |last2=Laster |first2=A. B. |last3=Lastest |first3=First}}
:*{{cite book/new |title=Title: name-list-format=venc |name-list-format=venc |last=Last |first=Fred George |last2=Laster |first2=A. B. |last3=Lastest |first3=First}}
;{{para|mode}} – accepted values are 'cs1', 'cs2'
:*{{citation/new |title=Title: mode=cs1 |mode=cs1 |last=Last |first=Fred George |last2=Laster |first2=A. B. |last3=Lastest |first3=First}}
:*{{cite book/new |title=Title: mode=cs2 |mode=cs2 |last=Last |first=Fred George |last2=Laster |first2=A. B. |last3=Lastest |first3=First}}
:*{{cite book/new |title=Title: mode=cs3 |mode=cs3 |last=Last |first=Fred George |last2=Laster |first2=A. B. |last3=Lastest |first3=First}}
;{{para|dead-url}}
:accepted values are 'yes', 'true', 'y', 'no'
:*{{cite web/new |url=//example.com |title=Title: dead-url=y |dead-url=y |archive-url=//example.org |archive-date=2015-08-07}}
:*{{cite web/new |url=//example.com |title=Title: dead-url=true |dead-url=true |archive-url=//example.org |archive-date=2015-08-07}}
:*{{cite web/new |url=//example.com |title=Title: dead-url=yes |dead-url=yes |archive-url=//example.org |archive-date=2015-08-07}}
:*{{cite web/new |url=//example.com |title=Title: dead-url=no |dead-url=no |archive-url=//example.org |archive-date=2015-08-07}}
:*{{cite web/new |url=//example.com |title=Title: dead-url=f |dead-url=f |archive-url=//example.org |archive-date=2015-08-07}}
;{{para|subscription}}
:accepted values are 'yes', 'true', 'y'
:*{{cite book/new |title=Title: subscription=y |subscription=y}}
:*{{cite book/new |title=Title: subscription=true |subscription=true}}
:*{{cite book/new |title=Title: subscription=yes |subscription=yes}}
:*{{cite book/new |title=Title: subscription=1 |subscription=1}}
;{{para|registration}}
:accepted values are 'yes', 'true', 'y'
:*{{cite book/new |title=Title: registration=y |registration=y}}
:*{{cite book/new |title=Title: registration=true |registration=true}}
:*{{cite book/new |title=Title: registration=yes |registration=yes}}
:*{{cite book/new |title=Title: registration=1 |registration=1}}
Have I missed any others?
—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:11, 7 August 2015 (UTC)
:I did:
;;{{para|ignore-isbn-error}}
::accepted values are 'yes', 'true', 'y'
::*{{cite book/new |title=Title: ignore-isbn-error=y |ignore-isbn-error=y |isbn=1234567890}}
::*{{cite book/new |title=Title: ignore-isbn-error=true |ignore-isbn-error=true |isbn=1234567890}}
::*{{cite book/new |title=Title: ignore-isbn-error=yes |ignore-isbn-error=yes |isbn=1234567890}}
::*{{cite book/new |title=Title: ignore-isbn-error=1 |ignore-isbn-error=1 |isbn=1234567890}}
;;{{para|no-tracking}}
::accepted values are 'yes', 'true', 'y'
::*{{cite book/new |title=Title: no-tracking=y |no-tracking=y}}
::*{{cite book/new |title=Title: no-tracking=true |no-tracking=true}}
::*{{cite book/new |title=Title: no-tracking=yes |no-tracking=yes}}
::*{{cite book/new |title=Title: no-tracking=1 |no-tracking=1}}
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:43, 7 August 2015 (UTC)
::and another:
;;;{{para|last-author-amp}}
:::accepted values are 'yes', 'true', 'y'
:::*{{cite book/new |title=Title: last-author-amp=y |last-author-amp=y}}
:::*{{cite book/new |title=Title: last-author-amp=true |last-author-amp=true}}
:::*{{cite book/new |title=Title: last-author-amp=yes |last-author-amp=yes}}
:::*{{cite book/new |title=Title: last-author-amp=1 |last-author-amp=1}}
::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 14:46, 10 August 2015 (UTC)
:::I've created a table of keywords in [[Module:Citation/CS1/Configuration/sandbox]] so that the keywords can be defined and the same reused; 'yes, true, y' is used for several parameters – no need to keep separate lists.
:::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:19, 15 August 2015 (UTC)
::::Why [[reinvent the wheel]], when we have {{tlx|yesno}}? --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 17:34, 15 August 2015 (UTC)
:::::template vs module.
:::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:39, 15 August 2015 (UTC)
::::::[[Module:Yesno]] does exist. My concern using it in general would be that in a number of cases we don't have a boolean consideration (e.g. yes v. no) but instead an enumerated comparison. --[[User:Izno|Izno]] ([[User talk:Izno|talk]]) 19:02, 15 August 2015 (UTC)
== |script-chapter= ==
Following up on [[Help talk:Citation Style 1/Archive 8#.7Cscript-chapter.3D .3F|this conversation]], I've added {{para|script-chapter}}. Styling and order of rendered chapter parts follows the same rules as {{para|script-title}}:
:<code><nowiki>{{cite book/new |title=Tōkyō tawā |script-title=ja:東京タワー |trans-title=Tokyo Tower}}</nowiki></code>
::{{cite book/new |title=Tōkyō tawā |script-title=ja:東京タワー |trans-title=Tokyo Tower}}
Here are those same parameter values moved to their chapter equivalents:
:<code><nowiki>{{cite book/new |title=Title |chapter=Tōkyō tawā |script-chapter=ja:東京タワー |trans-chapter=Tokyo Tower}}</nowiki></code>
::{{cite book/new |title=Title |chapter=Tōkyō tawā |script-chapter=ja:東京タワー |trans-chapter=Tokyo Tower}}
and with a link:
:<code><nowiki>{{cite book/new |title=Title |chapter=Tōkyō tawā |script-chapter=ja:東京タワー |trans-chapter=Tokyo Tower |chapter-url=//example.com}}</nowiki></code>
::{{cite book/new |title=Title |chapter=Tōkyō tawā |script-chapter=ja:東京タワー |trans-chapter=Tokyo Tower |chapter-url=//example.com}}
I wonder if the {{para|script-chapter}} value should be quoted when rendered especially in the case where the template also has {{para|script-title}} without {{para|title}}:
:<code><nowiki>{{cite book/new |script-title=ja:東京タワー |script-chapter=ja:東京タワー}}</nowiki></code>
::{{cite book/new |script-title=ja:東京タワー |script-chapter=ja:東京タワー}}
Still to do: include {{para|script-chapter}}value in the metadata; support {{para|script-title}} and {{para|script-chapter}} in {{tlx|cite encyclopedia}} and {{tlx|cite episode}}.
—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 11:37, 15 August 2015 (UTC)
:Metadata support added, {{tlx|cite episode}} code tweaked which resolves [[Help_talk:Citation_Style_1/Archive_8#trans-title_.2F_script-title_mismatch_in_Cite_episode.3F|this issue]], and {{tlx|cite encyclopedia}} code tweaked which resolves [[Help_talk:Citation_Style_1/Archive_6#Strange_interaction_between_.7B.7BCite_encyclopedia.7D.7D_and_.7Cscript-title.3D|this issue]].
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 12:50, 15 August 2015 (UTC)
|