Module:Citation/CS1/Configuration: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Synch from sandbox;)
No edit summary
Line 1:
 
citation_config = {};
 
Line 5 ⟶ 6:
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
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.
 
]]
 
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',
'Module_talk', 'MediaWiki_talk' };
 
--[[--------------------------< M E S S A G E S >--------------------------------------------------------------
--[[
 
Translation table
 
Line 21 ⟶ 25:
This is separated from the main body to aid in future translations of this
module.
 
]]
 
citation_config.messages = {
['published'] = 'published $1',
Line 56 ⟶ 62:
['minutes'] = 'minutes in',
 
['quoted-title'] = '"$1"',
['italic-title'] = "''$1''",
['trans-quoted-title'] = "&#91;$1&#93;",
['trans-italic-title'] = "&#91;''$1''&#93;",
['quoted-text'] = '"$1"',
 
['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>',
['parameter-separator'] = ', ',
['parameter-final-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
['help page link'] = 'Help:CS1 errors',
Line 85 ⟶ 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..'">&#124;$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'] = "&#91;''$1''&#93;",
['trans-quoted-title'] = "&#91;$1&#93;",
}
 
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
 
Aliases table for commonly passed parameters
 
]]
 
citation_config.aliases = {
['AccessDate'] = {'access-date', 'accessdate'},
Line 99 ⟶ 134:
['AuthorNameSeparator'] = 'author-name-separator',
['BookTitle'] = {'book-title', 'booktitle'},
['Callsign'] = {'call-sign', 'callsign'}, -- cite interview
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section', 'notestitle'}, -- notestitle is deprecated; remove after 1 October 2014; used by old cite AV media notes
['ChapterLinkChapterFormat'] = {'chapter-linkformat', 'chapterlink'},;
['ChapterLink'] = {'chapter-link', 'chapterlink'}, -- deprecated; remove after 1 January 2015
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl'},
['City'] = 'city', -- cite interview
['Coauthors'] = {'coauthors', 'coauthor'}, -- coauthor and coauthors are deprecated; remove after 1 OctoberJanuary 20142015
['Cointerviewers'] = 'cointerviewers', -- cointerviewers is deprecated; remove after 1 October 2014; used by cite interview
['Conference'] = {'conference', 'event'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'},
['Date'] = 'date',
['Day'] = 'day',
['DeadURL'] = {'dead-url', 'deadurl'},
['Degree'] = 'degree',
Line 124 ⟶ 158:
['Embargo'] = {'Embargo', 'embargo'},
['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'},
['Inset'] = 'inset',
['Interviewer'] = 'interviewer', -- cite interview
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'in'},
Line 135 ⟶ 168:
['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'},
['ScriptTitle'] = 'script-title',
['MessageID'] = 'message-id',
['Minutes'] = 'minutes',
['Month'] = 'month', -- deprecated; remove after 1 January 2015
['NameSeparator'] = 'name-separator',
['Network'] = 'network',
Line 142 ⟶ 176:
['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat',
'no-tracking', 'notracking'},
['OrigYear'] = {'orig-year', 'origyear', 'titleyear'}, -- titleyear is deprecated; remove after 1 October 2014; used in old cite DVD notes
['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'},
['Pages'] = {'pp', 'pages'},
Line 151 ⟶ 185:
['PPrefix'] = {'p-prefix', 'PPrefix'},
['PPPrefix'] = {'pp-prefix', 'PPPrefix'},
['Program'] = 'program', -- cite interview
['PostScript'] = 'postscript',
['PublicationDate'] = {'publicationdate', 'publication-date'},
['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'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = {'ref', 'Ref'},
Line 174 ⟶ 206:
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title',
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink', 'albumlink'}, -- albumlink is deprecated; remove after 1 October 2014; used by old cite AV media notes
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
Line 216 ⟶ 248:
}
 
--[[--------------------------< E R R O R _ C O N D I T I O N S >----------------------------------------------
--[[
Error condition table
 
Line 224 ⟶ 256:
 
Anchor changes require identical changes to matching anchor in Help:CS1 errors
 
]]
 
Line 246 ⟶ 279:
anchor = 'bad_arxiv',
category = 'CS1 errors: arXiv',
hidden = false },
bad_asin = {
message = 'Check <code style="'..code_style..'">&#124;asin=</code> value',
anchor = 'bad_asin',
category ='CS1 errors: ASIN',
hidden = false },
bad_authorlink = {
Line 276 ⟶ 314:
anchor = 'bad_lccn',
category = 'CS1 errors: LCCN',
hidden = false },
bad_message_id = {
message = 'Check <code style="'..code_style..'">&#124;message-id=</code> value',
anchor = 'bad_message_id',
category = 'CS1 errors: message-id',
hidden = false },
bad_ol = {
Line 301 ⟶ 344:
anchor = 'bare_url_missing_title',
category = 'Pages with citations having bare URLs',
hidden = false },
chapter_ignored = {
message = '<code style="'..code_style..'">&#124;chapter=</code> ignored',
anchor = 'chapter_ignored',
category = 'CS1 errors: Chapter ignored',
hidden = false },
citation_missing_title = {
Line 307 ⟶ 355:
category = 'Pages with citations lacking titles',
hidden = false },
cite_web_url = { -- this error applies to cite web and to cite podcast
message = 'Missing or empty <code style="'..code_style..'">&#124;url=</code>',
anchor = 'cite_web_url',
Line 338 ⟶ 386:
hidden = false },
format_missing_url = {
message = '<code style="'..code_style..'">&#124;format$1=</code> requires <code style="'..code_style..'">&#124;url$2=</code>',
anchor = 'format_missing_url',
category = 'Pages using citations with format and no URL',
hidden = true },
implict_etal_author = {
message = '<code style="'..code_style..'">&#124;displayauthors=</code> suggested',
anchor = 'displayauthors',
category = 'Pages using citations with old-style implicit et al.',
hidden = true },
implict_etal_editor = {
Line 378 ⟶ 421:
hidden = false },
trans_missing_chapter = {
message = '<code style="'..code_style..'">&#124;trans_chaptertrans-chapter=</code> requires <code style="'..code_style..'">&#124;chapter=</code>',
anchor = 'trans_missing_chapter',
category = 'Pages with citations using translated terms without the original',
hidden = false },
trans_missing_title = {
message = '<code style="'..code_style..'">&#124;trans_titletrans-title=</code> requires <code style="'..code_style..'">&#124;title=</code>',
anchor = 'trans_missing_title',
category = 'Pages with citations using translated terms without the original',
Line 470 ⟶ 513:
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04
COinS = 'rft.jstor',
-- encode = true,
encode = false,
separator = '&nbsp;',
},
Line 563 ⟶ 607:
separator = '&nbsp;',
},
--[[ Hide unfinished cite newsgroup code so that long delayed update can take place
['USENETID'] = {
parameters = {'message-id', 'ID'},
link = 'Usenet',
label = 'Usenet:',
mode = 'externalmanual',
prefix = 'news:',
encode = false,
Line 574 ⟶ 617:
separator = '&nbsp;',
},
]] ['ZBL'] = {
parameters = {'ZBL', 'zbl'},
link = 'Zentralblatt MATH',
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu