Module:Citation/CS1/Configuration: Difference between revisions

Jump to navigation Jump to search
sync to sandbox, mostly translation handles almost uniformity for archiveurl errors.
(enable visibility for parameter errors, isbn error, and wikilink in url error)
(sync to sandbox, mostly translation handles almost uniformity for archiveurl errors.)
Line 1:
datacitation_config = {};
 
--[[
Line 9:
]]
 
datacitation_config.message_list = {
['published'] = 'published $1',
['lay summary'] = 'Lay summary',
['retrieved'] = 'Retrieved $1',
['inactive'] = 'inactive',
['archived-dead'] = 'Archived from $1 on $2',
['archived-not-dead'] = '$1 from the original on $2',
['archived-missing'] = 'Archived from the original$1 on $2',
['archived'] = 'Archived',
['from'] = 'from',
['original'] = 'the original',
['on'] = 'on',
['editor'] = 'ed.',
['editors'] = 'eds.',
['edition'] = '($1 ed.)',
['episode'] = 'episode',
['season'] = 'season',
['series'] = 'series',
['written'] = 'Written at $1',
['et al'] = 'et al.',
['subscription'] = '<span style="font-size:0.95em; font-size:90%; color:#555">(subscription required)</span>',
['inlanguage'] = '(in $1)',
['via'] = '" &mdash; via' $1",
['event'] = 'Event occurs at',
['minutes'] = 'minutes in',
 
['trans-title'] = "&#91;$1&#93;",
['quoted-title'] = '"$1"',
['italic-title'] = "''$1''",
['quoted-text'] = '"$1"',
-- Error output
['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
Line 39 ⟶ 49:
['undefined_error'] = 'Called with an undefined error condition',
['unknown_manual_ID'] = 'Unrecognized manual ID mode',
['unknown_ID_mode'] = 'Unrecognized ID mode' ,
['unknown_argument_map'] = 'Argument map not defined for this variable'
}
 
--[[
Argument map table
]]
citation_config.argument_map = {
['AccessDate'] = 'accessdate',
['Agency'] = 'agency',
['AirDate'] = 'airdate',
['ArchiveDate'] = {'archive-date', 'archivedate' },
['ArchiveURL'] = {'archive-url', 'archiveurl' },
['ASINTLD'] = {'ASIN-TLD', 'asin-tld'},
['At'] = 'at',
['Authors'] = 'authors',
['AuthorFormat'] = {"author-format", "authorformat" },
['AuthorSeparator'] = 'author-separator',
['AuthorNameSeparator'] = 'author-name-separator',
['BookTitle'] = 'booktitle',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article' },
['ChapterLink'] = 'chapterlink',
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl' },
['Coauthors'] = {'coauthors', 'coauthor' },
['Conference'] = 'conference',
['ConferenceURL'] = {'conference-url', 'conferenceurl' },
['Date'] = 'date',
['Day'] = 'day',
['DeadURL'] = 'deadurl',
['DisplayAuthors'] = {"display-authors", "displayauthors"},
['DisplayEditors'] = {"display-editors", "displayeditors"},
['DoiBroken'] = {'doi_inactivedate', 'doi_brokendate', 'DoiBroken'},
['Edition'] = 'edition',
['Editors'] = 'editors',
['EditorFormat'] = {"editor-format", "editorformat" },
['EditorSeparator'] = 'editor-separator',
['EditorNameSeparator'] = 'editor-name-separator',
['Embargo'] = {'Embargo', 'embargo'},
['Format'] = 'format',
['ID'] = {'id', 'ID', 'docket'},
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'},
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'in'},
['LastAuthorAmp'] = 'lastauthoramp',
['LayDate'] = 'laydate',
['LaySource'] = 'laysource',
['LaySummary'] = 'laysummary',
['Minutes'] = 'minutes',
['Month'] = 'month',
['NameSeparator'] = 'name-separator',
['Network'] = 'network',
['NoPP'] = 'nopp',
['NoTracking'] = {"template doc demo", 'nocat',
'notracking', "no-tracking"},
['OrigYear'] = 'origyear',
['Others'] = 'others',
['Page'] = {'p', 'page'},
['Pages'] = {'pp', 'pages'},
['Periodical'] = {'journal', 'newspaper', 'magazine', 'work',
'website', 'periodical', 'encyclopedia', 'encyclopaedia', 'dictionary'},
['Place'] = {'place', 'location'},
['PPrefix'] = 'PPrefix',
['PPPrefix'] = 'PPPrefix',
['PostScript'] = 'postscript',
['PublicationDate'] = {'publicationdate', 'publication-date' },
['PublicationPlace'] = {'publication-place', 'publicationplace' },
['PublisherName'] = 'publisher',
['Quote'] = {'quote', 'quotation'},
['Ref'] = {'ref', 'Ref'},
['Season'] = 'season',
['Separator'] = 'separator',
['Series'] = {'series', 'version'},
['SeriesSeparator'] = 'series-separator',
['SeriesLink'] = 'serieslink',
['SeriesNumber'] = {'seriesnumber', 'seriesno'},
['Station'] = 'station',
['SubscriptionRequired'] = 'subscription',
['Time'] = 'time',
['TimeCaption'] = 'timecaption',
['Title'] = 'title',
['TitleLink'] = {'titlelink', 'episodelink' },
['TitleNote'] = 'department',
['TitleType'] = 'type',
['TransChapter'] = {'trans-chapter', 'trans_chapter' },
['Transcript'] = 'transcript',
['TranscriptURL'] = {'transcript-url', 'transcripturl'},
['TransTitle'] = {'trans-title', 'trans_title' },
['URL'] = {'url', 'URL'},
['Via'] = 'via',
['Volume'] = 'volume',
['Year'] = 'year',
 
['AuthorList-First'] = {"author#-first", "author-first#",
"first#", "given#"},
['AuthorList-Last'] = {"author#-last", "author-last#",
"last#", "surname#", "Author#", "author#", "authors#"},
['AuthorList-Link'] = {"author#-link", "author-link#",
"author#link", "authorlink#"},
['AuthorList-Mask'] = {"author#-mask", "author-mask#",
"author#mask", "authormask#"},
['EditorList-First'] = {"editor#-first",
"editor-first#", "EditorGiven#"},
['EditorList-Last'] = {"editor#-last", "editor-last#",
"EditorSurname#", "Editor#", "editor#", "editors#"},
['EditorList-Link'] = {"editor#-link", "editor-link#",
"editor#link", "editorlink#"},
['EditorList-Mask'] = {"editor#-mask", "editor-mask#",
"editor#mask", "editormask#"},
}
 
--[[
Default parameter values
]]
citation_config.default_values = {
['DeadURL'] = 'yes',
['PostScript'] = '.',
['Separator'] = '.',
['AuthorSeparator'] = ';',
['EditorSeparator'] = ';',
['NameSeparator'] = ',',
['PPrefix'] = "p.&nbsp;",
['PPPrefix'] = "pp.&nbsp;",
}
 
Line 52 ⟶ 185:
]]
 
datacitation_config.error_conditions = {
accessdate_missing_url = {
message = '<code>|accessdate=</code> requires <code>|url=</code>',
Line 66 ⟶ 199:
message = '<code>|archiveurl=</code> requires <code>|url=</code>',
anchor = 'archive_missing_url',
category = 'Pages with archiveurl citation errors‎',
hidden = false },
archive_missing_url_web = {
message = '<code>|archiveurl=</code> requires <code>|url=</code>',
anchor = 'archive_missing_url',
category = 'Pages with archiveurl cite web errors‎',
hidden = true },
archive_missing_url_not_dead = {
message = '<code>|archiveurl=</code> and <code>|deadurl=no</code> requires <code>|url=</code>',
anchor = 'archive_missing_url_not_dead',
category = 'Pages with archiveurl citation errors‎',
hidden = false },
Line 180 ⟶ 303:
}
 
datacitation_config.id_handlers = {
['ASIN'] = {
parameters = { 'asin', 'ASIN' },
Line 361 ⟶ 484:
}
 
return datacitation_config;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu