Anonymous user
Module:Citation/CS1/Configuration: Difference between revisions
Jump to navigation
Jump to search
Module:Citation/CS1/Configuration (view source)
Revision as of 06:58, 29 November 2014
, 9 years agono 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 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',
['parameter-separator'] = ', ',
['parameter-final-separator'] = ', and ',
['parameter-pair-separator'] = ' and ',
-- 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 >------------------------------------------------------
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 = {
['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
['
['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
['Conference'] = {'conference', 'event'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'},
['Date'] = 'date',
['DeadURL'] = {'dead-url', 'deadurl'},
['Degree'] = 'degree',
Line 124 ⟶ 158:
['Embargo'] = {'Embargo', 'embargo'},
['Format'] = 'format',
['ID'] = {'id', 'ID'},
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'},
['Inset'] = 'inset',
['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
['Others'] = {'others', 'interviewer', 'interviewers'},
['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'},
['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = {'ref', 'Ref'},
Line 174 ⟶ 206:
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title',
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink
['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..'">|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..'">|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..'">|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..'">|url=</code>',
anchor = 'cite_web_url',
Line 338 ⟶ 386:
hidden = false },
format_missing_url = {
message = '<code style="'..code_style..'">|
anchor = 'format_missing_url',
category = 'Pages using citations with format and no URL',
hidden = true },
implict_etal_editor = {
Line 378 ⟶ 421:
hidden = false },
trans_missing_chapter = {
message = '<code style="'..code_style..'">|
anchor = 'trans_missing_chapter',
category = 'Pages with citations using translated terms without the original',
hidden = false },
trans_missing_title = {
message = '<code style="'..code_style..'">|
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 = ' ',
},
Line 563 ⟶ 607:
separator = ' ',
},
['USENETID'] = {
parameters = {'message-id
link = 'Usenet',
label = 'Usenet:',
mode = '
prefix = 'news:',
encode = false,
Line 574 ⟶ 617:
separator = ' ',
},
parameters = {'ZBL', 'zbl'},
link = 'Zentralblatt MATH',
|