Module:Citation/CS1/Configuration: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Synch from sandbox;) |
No edit summary |
||
Line 1: | Line 1: | ||
citation_config = {}; |
citation_config = {}; |
||
Line 5: | Line 6: | ||
local code_style="color:inherit; border:inherit; padding:inherit;"; |
local code_style="color:inherit; border:inherit; padding:inherit;"; |
||
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ |
|||
--[[ |
|||
List of namespaces that should not be included in citation |
|||
error categories. Same as setting notracking = true by default |
List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default |
||
Note: Namespace names should use underscores instead of spaces. |
Note: Namespace names should use underscores instead of spaces. |
||
]] |
]] |
||
citation_config.uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', |
citation_config.uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', |
||
'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft', 'Draft_talk', 'Education_Program_talk', |
'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft', 'Draft_talk', 'Education_Program_talk', |
||
'Module_talk', 'MediaWiki_talk' }; |
'Module_talk', 'MediaWiki_talk' }; |
||
--[[--------------------------< M E S S A G E S >-------------------------------------------------------------- |
|||
--[[ |
|||
Translation table |
Translation table |
||
Line 21: | Line 25: | ||
This is separated from the main body to aid in future translations of this |
This is separated from the main body to aid in future translations of this |
||
module. |
module. |
||
]] |
]] |
||
citation_config.messages = { |
citation_config.messages = { |
||
['published'] = 'published $1', |
['published'] = 'published $1', |
||
Line 56: | Line 62: | ||
['minutes'] = 'minutes in', |
['minutes'] = 'minutes in', |
||
['quoted-title'] = '"$1"', |
|||
['italic-title'] = "''$1''", |
|||
['trans-quoted-title'] = "[$1]", |
|||
['trans-italic-title'] = "[''$1'']", |
|||
['quoted-text'] = '"$1"', |
|||
['parameter'] = '<code style="'..code_style..'">|$1=</code>', |
|||
['parameter-separator'] = ', ', |
['parameter-separator'] = ', ', |
||
['parameter-final-separator'] = ', and ', |
['parameter-final-separator'] = ', and ', |
||
['parameter-pair-separator'] = ' and ', |
['parameter-pair-separator'] = ' and ', |
||
-- Error output |
|||
-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538 |
|||
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display |
|||
['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', |
|||
['visible-error'] = '<span style="font-size:100%" class="error citation-comment">$1</span>', |
|||
-- Determines the location of the help page |
-- Determines the location of the help page |
||
['help page link'] = 'Help:CS1 errors', |
['help page link'] = 'Help:CS1 errors', |
||
Line 85: | Line 78: | ||
} |
} |
||
--[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------ |
|||
-- Aliases table for commonly passed parameters |
|||
Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically |
|||
correct place. |
|||
]] |
|||
citation_config.presentation = |
|||
{ |
|||
-- Error output |
|||
-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538 |
|||
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display |
|||
['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', |
|||
['visible-error'] = '<span style="font-size:100%" class="error citation-comment">$1</span>', |
|||
['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal css |
|||
['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like |
|||
['italic-title'] = "''$1''", |
|||
['kern-left'] = '<span style="padding-left:0.2em;">$1</span>$2', -- spacing to use when title contains leading single or double quote mark |
|||
['kern-right'] = '$1<span style="padding-right:0.2em;">$2</span>', -- spacing to use when title contains trailing single or double quote mark |
|||
['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span> |
|||
['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space) |
|||
['parameter'] = '<code style="'..code_style..'">|$1=</code>', |
|||
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content |
|||
['quoted-title'] = '"$1"', |
|||
['smallcaps'] = '<span class="smallcaps" style="font-variant:small-caps">$1</span>', |
|||
['trans-italic-title'] = "[''$1'']", |
|||
['trans-quoted-title'] = "[$1]", |
|||
} |
|||
--[[--------------------------< A L I A S E S >---------------------------------------------------------------- |
|||
Aliases table for commonly passed parameters |
|||
]] |
|||
citation_config.aliases = { |
citation_config.aliases = { |
||
['AccessDate'] = {'access-date', 'accessdate'}, |
['AccessDate'] = {'access-date', 'accessdate'}, |
||
Line 99: | Line 134: | ||
['AuthorNameSeparator'] = 'author-name-separator', |
['AuthorNameSeparator'] = 'author-name-separator', |
||
['BookTitle'] = {'book-title', 'booktitle'}, |
['BookTitle'] = {'book-title', 'booktitle'}, |
||
['Callsign'] = {'call-sign', 'callsign'}, -- cite interview |
['Callsign'] = {'call-sign', 'callsign'}, -- cite interview |
||
['Cartography'] = 'cartography', |
['Cartography'] = 'cartography', |
||
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section |
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'}, |
||
[' |
['ChapterFormat'] = 'chapter-format'; |
||
['ChapterLink'] = {'chapter-link', 'chapterlink'}, -- deprecated; remove after 1 January 2015 |
|||
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl'}, |
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl'}, |
||
['City'] = 'city', -- cite interview |
['City'] = 'city', -- cite interview |
||
['Coauthors'] = {'coauthors', 'coauthor'}, -- coauthor and coauthors are deprecated; remove after 1 |
['Coauthors'] = {'coauthors', 'coauthor'}, -- coauthor and coauthors are deprecated; remove after 1 January 2015 |
||
['Cointerviewers'] = 'cointerviewers', -- cointerviewers is deprecated; remove after 1 October 2014; used by cite interview |
|||
['Conference'] = {'conference', 'event'}, |
['Conference'] = {'conference', 'event'}, |
||
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'}, |
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'}, |
||
['Date'] = 'date', |
['Date'] = 'date', |
||
['Day'] = 'day', |
|||
['DeadURL'] = {'dead-url', 'deadurl'}, |
['DeadURL'] = {'dead-url', 'deadurl'}, |
||
['Degree'] = 'degree', |
['Degree'] = 'degree', |
||
Line 124: | Line 158: | ||
['Embargo'] = {'Embargo', 'embargo'}, |
['Embargo'] = {'Embargo', 'embargo'}, |
||
['Format'] = 'format', |
['Format'] = 'format', |
||
['ID'] = {'id', 'ID'}, |
|||
['ID'] = {'id', 'ID', 'publisherid'}, -- publisherid is deprecated; remove after 1 October 2014; used by old cite AV media notes and old cite DVD notes |
|||
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'}, |
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'}, |
||
['Inset'] = 'inset', |
['Inset'] = 'inset', |
||
['Interviewer'] = 'interviewer', -- cite interview |
|||
['Issue'] = {'issue', 'number'}, |
['Issue'] = {'issue', 'number'}, |
||
['Language'] = {'language', 'in'}, |
['Language'] = {'language', 'in'}, |
||
Line 135: | Line 168: | ||
['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'}, |
['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'}, |
||
['ScriptTitle'] = 'script-title', |
['ScriptTitle'] = 'script-title', |
||
['MessageID'] = 'message-id', |
|||
['Minutes'] = 'minutes', |
['Minutes'] = 'minutes', |
||
['Month'] = 'month', |
['Month'] = 'month', -- deprecated; remove after 1 January 2015 |
||
['NameSeparator'] = 'name-separator', |
['NameSeparator'] = 'name-separator', |
||
['Network'] = 'network', |
['Network'] = 'network', |
||
Line 142: | Line 176: | ||
['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat', |
['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat', |
||
'no-tracking', 'notracking'}, |
'no-tracking', 'notracking'}, |
||
['OrigYear'] = {'orig-year', 'origyear |
['OrigYear'] = {'orig-year', 'origyear'}, |
||
['Others'] = {'others', 'interviewer', 'interviewers'}, |
|||
['Others'] = {'others', 'artist', 'director'}, -- artist and director are deprecated; remove after 1 October 2014; used in old cite AV media notes and old cite DVD notes |
|||
['Page'] = {'p', 'page'}, |
['Page'] = {'p', 'page'}, |
||
['Pages'] = {'pp', 'pages'}, |
['Pages'] = {'pp', 'pages'}, |
||
Line 151: | Line 185: | ||
['PPrefix'] = {'p-prefix', 'PPrefix'}, |
['PPrefix'] = {'p-prefix', 'PPrefix'}, |
||
['PPPrefix'] = {'pp-prefix', 'PPPrefix'}, |
['PPPrefix'] = {'pp-prefix', 'PPPrefix'}, |
||
['Program'] = 'program', -- cite interview |
['Program'] = 'program', -- cite interview |
||
['PostScript'] = 'postscript', |
['PostScript'] = 'postscript', |
||
['PublicationDate'] = {'publicationdate', 'publication-date'}, |
['PublicationDate'] = {'publicationdate', 'publication-date'}, |
||
['PublicationPlace'] = {'publication-place', 'publicationplace'}, |
['PublicationPlace'] = {'publication-place', 'publicationplace'}, |
||
--[[ Hide unfinished cite newsgroup code so that long delayed update can take place |
|||
['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'}, |
['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'}, |
||
]] ['PublisherName'] = {'publisher', 'distributor', 'institution'}, |
|||
['Quote'] = {'quote', 'quotation'}, |
['Quote'] = {'quote', 'quotation'}, |
||
['Ref'] = {'ref', 'Ref'}, |
['Ref'] = {'ref', 'Ref'}, |
||
Line 174: | Line 206: | ||
['TimeCaption'] = {'time-caption', 'timecaption'}, |
['TimeCaption'] = {'time-caption', 'timecaption'}, |
||
['Title'] = 'title', |
['Title'] = 'title', |
||
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink |
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, |
||
['TitleNote'] = 'department', |
['TitleNote'] = 'department', |
||
['TitleType'] = {'type', 'medium'}, |
['TitleType'] = {'type', 'medium'}, |
||
Line 216: | Line 248: | ||
} |
} |
||
--[[--------------------------< E R R O R _ C O N D I T I O N S >---------------------------------------------- |
|||
--[[ |
|||
Error condition table |
Error condition table |
||
Line 224: | Line 256: | ||
Anchor changes require identical changes to matching anchor in Help:CS1 errors |
Anchor changes require identical changes to matching anchor in Help:CS1 errors |
||
]] |
]] |
||
Line 246: | Line 279: | ||
anchor = 'bad_arxiv', |
anchor = 'bad_arxiv', |
||
category = 'CS1 errors: arXiv', |
category = 'CS1 errors: arXiv', |
||
hidden = false }, |
|||
bad_asin = { |
|||
message = 'Check <code style="'..code_style..'">|asin=</code> value', |
|||
anchor = 'bad_asin', |
|||
category ='CS1 errors: ASIN', |
|||
hidden = false }, |
hidden = false }, |
||
bad_authorlink = { |
bad_authorlink = { |
||
Line 276: | Line 314: | ||
anchor = 'bad_lccn', |
anchor = 'bad_lccn', |
||
category = 'CS1 errors: LCCN', |
category = 'CS1 errors: LCCN', |
||
hidden = false }, |
|||
bad_message_id = { |
|||
message = 'Check <code style="'..code_style..'">|message-id=</code> value', |
|||
anchor = 'bad_message_id', |
|||
category = 'CS1 errors: message-id', |
|||
hidden = false }, |
hidden = false }, |
||
bad_ol = { |
bad_ol = { |
||
Line 301: | Line 344: | ||
anchor = 'bare_url_missing_title', |
anchor = 'bare_url_missing_title', |
||
category = 'Pages with citations having bare URLs', |
category = 'Pages with citations having bare URLs', |
||
hidden = false }, |
|||
chapter_ignored = { |
|||
message = '<code style="'..code_style..'">|chapter=</code> ignored', |
|||
anchor = 'chapter_ignored', |
|||
category = 'CS1 errors: Chapter ignored', |
|||
hidden = false }, |
hidden = false }, |
||
citation_missing_title = { |
citation_missing_title = { |
||
Line 307: | Line 355: | ||
category = 'Pages with citations lacking titles', |
category = 'Pages with citations lacking titles', |
||
hidden = false }, |
hidden = false }, |
||
cite_web_url = { -- this error applies to cite web and to cite podcast |
cite_web_url = { -- this error applies to cite web and to cite podcast |
||
message = 'Missing or empty <code style="'..code_style..'">|url=</code>', |
message = 'Missing or empty <code style="'..code_style..'">|url=</code>', |
||
anchor = 'cite_web_url', |
anchor = 'cite_web_url', |
||
Line 338: | Line 386: | ||
hidden = false }, |
hidden = false }, |
||
format_missing_url = { |
format_missing_url = { |
||
message = '<code style="'..code_style..'">| |
message = '<code style="'..code_style..'">|$1=</code> requires <code style="'..code_style..'">|$2=</code>', |
||
anchor = 'format_missing_url', |
anchor = 'format_missing_url', |
||
category = 'Pages using citations with format and no URL', |
category = 'Pages using citations with format and no URL', |
||
hidden = true }, |
|||
implict_etal_author = { |
|||
message = '<code style="'..code_style..'">|displayauthors=</code> suggested', |
|||
anchor = 'displayauthors', |
|||
category = 'Pages using citations with old-style implicit et al.', |
|||
hidden = true }, |
hidden = true }, |
||
implict_etal_editor = { |
implict_etal_editor = { |
||
Line 378: | Line 421: | ||
hidden = false }, |
hidden = false }, |
||
trans_missing_chapter = { |
trans_missing_chapter = { |
||
message = '<code style="'..code_style..'">| |
message = '<code style="'..code_style..'">|trans-chapter=</code> requires <code style="'..code_style..'">|chapter=</code>', |
||
anchor = 'trans_missing_chapter', |
anchor = 'trans_missing_chapter', |
||
category = 'Pages with citations using translated terms without the original', |
category = 'Pages with citations using translated terms without the original', |
||
hidden = false }, |
hidden = false }, |
||
trans_missing_title = { |
trans_missing_title = { |
||
message = '<code style="'..code_style..'">| |
message = '<code style="'..code_style..'">|trans-title=</code> requires <code style="'..code_style..'">|title=</code>', |
||
anchor = 'trans_missing_title', |
anchor = 'trans_missing_title', |
||
category = 'Pages with citations using translated terms without the original', |
category = 'Pages with citations using translated terms without the original', |
||
Line 470: | Line 513: | ||
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04 |
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04 |
||
COinS = 'rft.jstor', |
COinS = 'rft.jstor', |
||
encode = true, |
-- encode = true, |
||
encode = false, |
|||
separator = ' ', |
separator = ' ', |
||
}, |
}, |
||
Line 563: | Line 607: | ||
separator = ' ', |
separator = ' ', |
||
}, |
}, |
||
--[[ Hide unfinished cite newsgroup code so that long delayed update can take place |
|||
['USENETID'] = { |
['USENETID'] = { |
||
parameters = {'id |
parameters = {'message-id'}, |
||
link = 'Usenet', |
link = 'Usenet', |
||
label = 'Usenet:', |
label = 'Usenet:', |
||
mode = ' |
mode = 'manual', |
||
prefix = 'news:', |
prefix = 'news:', |
||
encode = false, |
encode = false, |
||
Line 574: | Line 617: | ||
separator = ' ', |
separator = ' ', |
||
}, |
}, |
||
['ZBL'] = { |
|||
parameters = {'ZBL', 'zbl'}, |
parameters = {'ZBL', 'zbl'}, |
||
link = 'Zentralblatt MATH', |
link = 'Zentralblatt MATH', |