మాడ్యూల్:Citation/CS1/Configuration: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి en:Module:Citation/CS1/Configuration నుండి కూర్పులను దిగుమతి చేసాం
Reverted to revision 2858429 by Chaduvari: reverting to old working version for avoiding telugu date errors. (TW)
ట్యాగు: రద్దుచెయ్యి
పంక్తి 211:
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
 
Aliases table for commonly passed parameters.
 
Parameter names on the right side in the assignements in this table must have been defined in the Whitelist
before they will be recognized as valid parameter names
 
]]
 
local aliases = {
['AccessDate'] = {'access-date', 'accessdate'}, -- (Used by InternetArchiveBot)
['Agency'] = 'agency',
-- ['AirDate'] = {'air-date', 'airdate'},
['ArchiveDate'] = {'archive-date', 'archivedate'}, -- (Used by InternetArchiveBot)
['ArchiveFormat'] = 'archive-format',
['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- (Used by InternetArchiveBot)
['ASINTLD'] = 'asin-tld',
['At'] = 'at', -- (Used by InternetArchiveBot)
['Authors'] = {'authors', 'people', 'credits'},
['BookTitle'] = {'book-title', 'booktitle'},
Line 232 ⟶ 229:
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'entry-url', 'article-url', 'section-url', 'sectionurl'}, -- (Used by InternetArchiveBot)
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- (Used by InternetArchiveBot)
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Collaboration'] = 'collaboration',
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = {'conference-format', 'event-format'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'}, -- (Used by InternetArchiveBot)
['Contribution'] = 'contribution', -- introduction, foreword, afterword, etc; required when |contributor= set; TODO: make internal only see TODO in main module
-- ['Date'] = 'date',
['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only
['Degree'] = 'degree',
['DF'] = 'df',
Line 266 ⟶ 262:
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'layurl'}, -- (Used by InternetArchiveBot)
['MailingList'] = {'mailing-listmailinglist', 'mailinglistmailing-list'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
['MapFormat'] = 'map-format', -- cite map only
['MapURL'] = {'map-urlmapurl', 'mapurlmap-url'}, -- cite map only -- (Used by InternetArchiveBot)
['MapUrlAccess'] = 'map-url-access', -- cite map only -- (Used by InternetArchiveBot)
-- ['MessageID'] = 'message-id',
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['NameListFormat'] = 'name-list-format',
['Network'] = 'network',
['Newsgroup'] = 'newsgroup', -- cite newsgroup only
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'template-doc-demo', 'no-cat', 'nocat',
'no-tracking', 'notracking'},
['Number'] = 'number', -- this case only for cite techreport
['OrigYear'] = {'orig-year', 'origyear'},
['Others'] = 'others',
['Page'] = {'pagep', 'ppage'}, -- (Used by InternetArchiveBot)
['Pages'] = {'pagespp', 'pppages'}, -- (Used by InternetArchiveBot)
['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work',
'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist'}, -- these masquerade as periodicals but aren't TODO: find a better way to handle these?
['Place'] = {'place', 'location'},
['PostScript'] = 'postscript',
['PublicationDate'] = {'publication-datepublicationdate', 'publicationdatepublication-date'},
['PublicationPlace'] = {'publication-place', 'publicationplace'},
-- ['PublisherName'] = {'publisher', 'institution', 'newsgroup'},
['PublisherName'] = {'publisher', 'institution'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = 'ref',
Line 299 ⟶ 294:
['ScriptMap'] = 'script-map',
['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'},
['ScriptTitle'] = 'script-title', -- (Used by InternetArchiveBot)
['Section'] = 'section',
['Season'] = 'season',
Line 312 ⟶ 307:
['Time'] = 'time',
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title', -- (Used by InternetArchiveBot)
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, -- (Used by InternetArchiveBot)
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
Line 319 ⟶ 314:
['Transcript'] = 'transcript',
['TranscriptFormat'] = 'transcript-format',
['TranscriptURL'] = {'transcript-url', 'transcripturl'}, -- (Used by InternetArchiveBot)
['TransMap'] = 'trans-map', -- cite map only
['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'},
['TransTitle'] = 'trans-title', -- (Used by InternetArchiveBot)
['URL'] = {'url', 'URL'}, -- (Used by InternetArchiveBot)
['UrlAccess'] = {'url-access'}, -- (Used by InternetArchiveBot)
['UrlStatus'] = 'url-status', -- (Used by InternetArchiveBot)
['Vauthors'] = 'vauthors',
['Veditors'] = 'veditors',
Line 332 ⟶ 327:
['Year'] = 'year',
 
['AuthorList-First'] = {"first#", "author-firstgiven#", "author#-first#", "givenauthor#-first"},
['AuthorList-Last'] = {"last#", "author-last#", "authorsurname#-last", "author-last#", "surnameauthor#-last", "subject#", 'host#'},
['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "authorlinksubjectlink#", "author#link", "subject-link#", "subject#-link", "subjectlink#", "subject#link"},
['AuthorList-Mask'] = {"author-mask#", "authorauthormask#-mask", "authormaskauthor#mask", "author#-mask"},
['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'},
['ContributorList-Last'] = {'contributor-last#', 'contributor#-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname'},
['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'},
['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'},
 
['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"},
['EditorList-Last'] = {"editor-last#", "editor#-last#", "editor#-last", "editor-surname#", "editor#-surname"},
['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link"},
['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"},
['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first'},
['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last#', 'interviewer#-last'},
['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'},
['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'},
 
['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'},
['TranslatorList-Last'] = {'translator-last#', 'translator#-last#', 'translator#-last', 'translator-surname#', 'translator#-surname'},
['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},
Line 369 ⟶ 364:
local meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value
'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters
'PostScript', 'Quote', 'Ref', -- miscellaneous
'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- url-holding parameters
}
Line 394 ⟶ 389:
 
local special_case_translation = {
['AuthorList'] = 'authors list', -- usedthese tofor assemblemultiple maintenancenames categorymaint namescategories
['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base mainenance category names in maint_cats{} table below
['EditorList'] = 'editors list', -- must match the names of the actual categories
['InterviewerList'] = 'interviewers list', -- this group or translations used by name_has_ed_markup() and name_has_mult_names()
['TranslatorList'] = 'translators list',
['authors'] = 'authors', -- used toin assemble maintenance category namesget_display_names()
['contributors'] = 'contributors', -- translation of these names plus translation of the base mainenance category names in maint_cats{} table below
['editors'] = 'editors', -- must match the names of the actual categories
['interviewers'] = 'interviewers', -- this group of translations used by get_display_names()
['translators'] = 'translators',
 
['archived_copy'] = '^archived?%s+copy$', -- lua patternspattern to match pseudo title used by Internet Archive bot and others as place holder for unknown |title= value
['archived_copy'] = { -- used with CS1 maint: Archived copy as title
['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki
['local'] = '^archived?%s+copy$', -- for the local language; lowercase only
}
}
 
 
--[[--------------------------< D E F A U L T S >--------------------------------------------------------------
 
Default parameter values
 
TODO: keep this? Only one default?
]]
 
local defaults = {
['UrlStatus'] = 'dead', -- (Used by InternetArchiveBot)
}
 
 
Line 516 ⟶ 520:
 
]]
 
--[[--------------------------< M A K E _ K E Y W O R D S _ L I S T >------------------------------------------
 
this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter.
 
keywords_lists{}, is a table of tables from keywords{}
 
]]
 
local function make_keywords_list (keywords_lists)
local out_table = {}; -- output goes here
for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords
for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ...
table.insert (out_table, keyword); -- ... as plain text, to the output list
end
end
return out_table;
end
 
 
--[[--------------------------< K E Y W O R D S T A B L E >--------------------------------------------------
Line 531 ⟶ 555:
 
local keywords = {
['affirmative'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp -- (Used by InternetArchiveBot)
['afterword'] = {'afterword'}, -- contribution
['bot: unknown'] = {'bot: unknown'}, -- url-status -- (Used by InternetArchiveBot)
['cs1'] = {'cs1'}, -- mode
['cs2'] = {'cs2'}, -- mode
['dead'] = {'dead'}, -- url-status -- (Used by InternetArchiveBot)
['dmy'] = {'dmy'}, -- df
['dmy-all'] = {'dmy-all'}, -- df
['foreword'] = {'foreword'}, -- contribution
['free'] = {'free'}, -- url-access -- (Used by InternetArchiveBot)
['introduction'] = {'introduction'}, -- contribution
['limited'] = {'limited'}, -- url-access -- (Used by InternetArchiveBot)
['live'] = {'live'}, -- url-status -- (Used by InternetArchiveBot)
['mdy'] = {'mdy'}, -- df
['mdy-all'] = {'mdy-all'}, -- df
['none'] = {'none'}, -- postscript, ref, title, type -- Used by InternetArchiveBot
['preface'] = {'preface'}, -- contribution
['registration'] = {'registration'}, -- url-access -- (Used by InternetArchiveBot)
['subscription'] = {'subscription'}, -- url-access -- (Used by InternetArchiveBot)
['unfit'] = {'unfit'}, -- url-status -- (Used by InternetArchiveBot)
['usurped'] = {'usurped'}, -- url-status -- (Used by InternetArchiveBot)
['vanc'] = {'vanc'}, -- name-list-format
['ymd'] = {'ymd'}, -- df
Line 587 ⟶ 610:
 
local keywords_xlate = xlate_keywords (); -- the list of translated keywords
 
 
--[[--------------------------< M A K E _ K E Y W O R D S _ L I S T >------------------------------------------
 
this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter.
 
keywords_lists{}, is a table of tables from keywords{}
 
]]
 
local function make_keywords_list (keywords_lists)
local out_table = {}; -- output goes here
for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords
for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ...
table.insert (out_table, keyword); -- ... as plain text, to the output list
end
end
return out_table;
end
 
 
Line 668 ⟶ 671:
{'horizontal tab', '\009'}, -- U+0009 (HT), 09
{'line feed', '\010'}, -- U+000A (LF), 0A
{'no-break space', '\194\160'}, -- U+00A0 (NBSP), C2 A0
{'carriage return', '\013'}, -- U+000D (CR), 0D
{'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type
Line 713 ⟶ 715:
]]
 
local this_wiki_code = mw.getContentLanguage():getCode(); -- get this wiki's language code
if string.match (mw.site.server, 'wikidata') then
this_wiki_code = mw.getCurrentFrame():preprocess('{{int:lang}}'); -- on wikidata so use interface language setting instead
end
 
local local_lang_cat_enable = false; -- set to true to categorize pages where |language=<local wiki's language>
Line 738 ⟶ 737:
 
These tables hold language information that is different (correct) from MediaWiki's definitions
 
For each ['code'] = 'language name' in lang_code_remap{} there must be a matching ['language name'] = {'language name', 'code'} in lang_name_remap{}
 
lang_code_remap{}:
key is always lowercase ISO 639-1, -2, -3 language code or a valid lowercase IETF language tag
value is properly spelled and capitalized language name associated with key
only one language name per key;
key/value pair must have matching entry in lang_name_remap{}
 
lang_name_remap{}:
key is always lowercase language name
value is a table the holds correctly spelled and capitalized language name [1] and associated code [2] (code must match a code key in lang_code_remap{})
may have multiple keys referring to a common preferred name and code; For example:
['kolsch'] and ['kölsch'] both refer to 'Kölsch' and 'ksh'
 
]]
Line 757 ⟶ 742:
local lang_code_remap = { -- used for |language= and |script-title= / |script-chapter=
['als'] = 'Tosk Albanian', -- MediaWiki returns Alemannisch
['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri WikipediawWikipedia: bh.wikipedia.org
['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name
['bn'] = 'Bengali', -- MediaWiki returns Bangla
Line 779 ⟶ 764:
['crimean tatar'] = {'Crimean Tatar', 'crh'}, -- MediaWiki uses 'crh' as a subdomain name for Crimean Tatar Wikipedia: crh.wikipedia.org
['ilocano'] = {'Ilocano', 'ilo'}, -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name
['kolsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name (use non-diacritical o instead of umlaut ö)
['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name
['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639
Line 802 ⟶ 787:
['date_format'] = 'CS1 maint: date format',
['date_year'] = 'CS1 maint: date and year',
['disp_name'] = 'CS1 maint: display-$1', -- $1 is 'authors', 'contributors', 'editors', 'interviewers', 'translators'; gets value from special_case_translation table
['editors'] = 'CS1 maint: uses editors parameter',
['embargo'] = 'CS1 maint: PMC embargo expired',
['extra_punct'] = 'CS1 maint: extra punctuation',
['extra_text'] = 'CS1 maint: extra text',
['extra_text_names'] = 'CS1 maint: extra text: $1', -- $1 is '<name>s list'; gets value from special_case_translation table
['ignore_isbn_err'] = 'CS1 maint: ignored ISBN errors',
['location'] = 'CS1 maint: location',
['mult_names'] = 'CS1 maint: multiple names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table
['numeric_names'] = 'CS1 maint: numeric names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table
['others'] = 'CS1 maint: others',
['pmc_format'] = 'CS1 maint: PMC format',
['ref_harv'] = 'CS1 maint: ref=harv',
['unfit'] = 'CS1 maint: unfit url',
['unknown_lang'] = 'CS1 maint: unrecognized language',
Line 856 ⟶ 839:
['techreport'] = 'Technical report',
['thesis'] = 'Thesis',
}
 
 
--[[=========================<< E R R O R M E S S A G I N G >>===============================================
 
]]
 
 
--[[--------------------------< E R R O R M E S S A G E S U P P L I M E N T S >----------------------------
 
i18n for those messages that are supplimented with additional specific text that describes the reason for
the error
 
TODO: merge this with special_case_translations{}?
]]
 
local err_msg_supl = {
['char'] = 'invalid character', -- isbn, sbn
['check'] = 'checksum', -- isbn, sbn
['flag'] = 'flag', -- archive-url
['form'] = 'invalid form', -- isbn, sbn
['group'] = 'invalid group id', -- isbn
['initials'] = 'initials', -- vancouver
['journal'] = 'journal', -- bibcode
['length'] = 'length', -- isbn, bibcode, sbn
['liveweb'] = 'liveweb', -- archive-url
['missing comma'] = 'missing comma', -- vancouver
['name'] = 'name', -- vancouver
['non-Latin char'] = 'non-Latin character', -- vancouver
['path'] = 'path', -- archive-url
['prefix'] = 'invalid prefix', -- isbn
['punctuation'] = 'punctuation', -- vancouver
['save'] = 'save command', -- archive-url
['suffix'] = 'suffix', -- vancouver
['timestamp'] = 'timestamp', -- archive-url
['value'] = 'value', -- bibcode
['year'] = 'year', -- bibcode
}
 
Line 915 ⟶ 861:
},
apostrophe_markup = {
message = 'Italic or bold markup not allowed in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'apostrophe_markup',
category = 'CS1 errors: markup',
Line 933 ⟶ 879:
},
archive_url = {
message = '<code class="cs1-code">&#124;archive-url=</code> is malformed: $1', -- $1 is error message detail
anchor = 'archive_url',
category = 'Pages with archiveurl citation errors',
Line 963 ⟶ 909:
},
bad_bibcode = {
message = 'Check <code class="cs1-code">&#124;bibcode=</code> $1', -- $1 is error message detail
anchor = 'bad_bibcode',
category = 'CS1 errors: bibcode',
Line 981 ⟶ 927:
},
bad_date = {
message = 'Check date values in: <code class="cs1-code">$1</code>', -- $1 is parameter name
anchor = 'bad_date',
category = 'CS1 errors: dates',
Line 999 ⟶ 945:
},
bad_isbn = {
message = 'Check <code class="cs1-code">&#124;isbn=</code> value: $1', -- $1 is error message detail
anchor = 'bad_isbn',
category = 'CS1 errors: ISBN',
Line 1,011 ⟶ 957:
},
bad_issn = {
message = 'Check <code class="cs1-code">&#124;$1issn=</code> value', -- $1 is 'e' or '' for eissn or issn
anchor = 'bad_issn',
category = 'CS1 errors: ISSN',
Line 1,047 ⟶ 993:
},
bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link=
message = 'Check <code class="cs1-code">&#124;$1=</code> value', -- $1 is parameter name
anchor = 'bad_paramlink',
category = 'CS1 errors: parameter link',
Line 1,068 ⟶ 1,014:
anchor = 'bad_oclc',
category = 'CS1 errors: OCLC',
hidden = false
},
bad_s2cid = {
message = 'Check <code class="cs1-code">&#124;s2cid=</code> value',
anchor = 'bad_s2cid',
category = 'CS1 errors: S2CID',
hidden = false
},
bad_sbn = {
message = 'Check <code class="cs1-code">&#124;sbn=</code> value: $1', -- $1 is error message detail
anchor = 'bad_sbn',
category = 'CS1 errors: SBN',
hidden = false
},
Line 1,089 ⟶ 1,023:
},
bad_url = {
message = 'Check $1 value', -- $1 is parameter name
anchor = 'bad_url',
category = 'Pages with URL errors',
Line 1,101 ⟶ 1,035:
},
bare_url_missing_title = {
message = '$1 missing title', -- $1 is parameter name
anchor = 'bare_url_missing_title',
category = 'Pages with citations having bare URLs',
Line 1,113 ⟶ 1,047:
},
chapter_ignored = {
message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name
anchor = 'chapter_ignored',
category = 'CS1 errors: chapter ignored',
Line 1,119 ⟶ 1,053:
},
citation_missing_title = {
message = 'Missing or empty <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'citation_missing_title',
category = 'Pages with citations lacking titles',
Line 1,149 ⟶ 1,083:
},
contributor_missing_required_param = {
message = '<code class="cs1-code">&#124;contributor=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'contributor_missing_required_param',
category = 'CS1 errors: contributor',
Line 1,155 ⟶ 1,089:
},
deprecated_params = {
message = 'Cite uses deprecated parameter <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'deprecated_params',
category = 'CS1 errors: deprecated parameters',
Line 1,161 ⟶ 1,095:
},
doibroken_missing_doi = {
message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;doi=</code>', -- $1 is parameter name
anchor = 'doibroken_missing_doi',
category = 'CS1 errors: DOI',
Line 1,173 ⟶ 1,107:
},
etal = {
message = 'Explicit use of et al. in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'explicit_et_al',
category = 'CS1 errors: explicit use of et al.',
Line 1,185 ⟶ 1,119:
},
format_missing_url = {
message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;$2=</code>', -- $1 is format parameter $2 is url parameter
anchor = 'format_missing_url',
category = 'Pages using citations with format and no URL',
Line 1,191 ⟶ 1,125:
},
invalid_param_val = {
message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name $2 is paramter value
anchor = 'invalid_param_val',
category = 'CS1 errors: invalid parameter value',
Line 1,197 ⟶ 1,131:
},
invisible_char = {
message = '$1 in $2 at position $3', -- $1 is invisible char $2 is parameter name $3 is position number
anchor = 'invisible_char',
category = 'CS1 errors: invisible characters',
Line 1,215 ⟶ 1,149:
},
missing_pipe = {
message = 'Missing pipe in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'missing_pipe',
category = 'CS1 errors: missing pipe',
Line 1,221 ⟶ 1,155:
},
param_access_requires_param = {
message = '<code class="cs1-code">&#124;$1-access=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name
anchor = 'param_access_requires_param',
category = 'CS1 errors: param-access',
Line 1,227 ⟶ 1,161:
},
param_has_ext_link = {
message = 'External link in <code class="cs1-code">$1</code>', -- $1 is parameter name
anchor = 'param_has_ext_link',
category = 'CS1 errors: external links',
Line 1,233 ⟶ 1,167:
},
parameter_ignored = {
message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name
anchor = 'parameter_ignored',
category = 'Pages with citations using unsupported parameters',
Line 1,239 ⟶ 1,173:
},
parameter_ignored_suggest = {
message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored (<code class="cs1-code">&#124;$2=</code> suggested)', -- $1 is unknown paramter $2 is suggested parameter name
anchor = 'parameter_ignored_suggest',
category = 'Pages with citations using unsupported parameters',
Line 1,245 ⟶ 1,179:
},
redundant_parameters = {
message = 'More than one of $1 specified', -- $1 is error message detail
anchor = 'redundant_parameters',
category = 'Pages with citations having redundant parameters',
Line 1,251 ⟶ 1,185:
},
script_parameter = {
message = 'Invalid <code class="cs1-code">&#124;$1=</code>: $2', -- $1 is parameter name $2 is script language code or error detail
anchor = 'script_parameter',
category = 'CS1 errors: script parameters',
Line 1,263 ⟶ 1,197:
},
text_ignored = {
message = 'Text "$1" ignored', -- $1 is ignored text
anchor = 'text_ignored',
category = 'Pages with citations using unnamed parameters',
Line 1,269 ⟶ 1,203:
},
trans_missing_title = {
message = '<code class="cs1-code">&#124;trans-$1=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is base parameter name
anchor = 'trans_missing_title',
category = 'CS1 errors: translated title',
Line 1,275 ⟶ 1,209:
},
vancouver = {
message = 'Vancouver style error: $1', -- $1 is error detail
anchor = 'vancouver',
category = 'CS1 errors: Vancouver style',
Line 1,286 ⟶ 1,220:
hidden = false
},
}
 
 
--[[--------------------------< I D _ L I M I T S >------------------------------------------------------------
 
certain identifiers have limits set upon their values so that typographic errors may be detected. These (max)
limits are defined here so that those limits may be automatically included in the template documentation and error
message help text.
 
]]
 
local id_limits = {
pmc = 7500000, -- |pmc=
pmid = 33000000, -- |pmid=
ssrn = 4000000, -- |ssrn=
s2cid = 230000000, -- |s2cid=
}
 
Line 1,310 ⟶ 1,228:
variety of information necessary to properly render the identifier in the citation.
 
parameters: a list of parameter aliases for this identifier; first in the list is the canonical form
link: Wikipedia article name
redirect: a local redirect to a local Wikipedia article name; at en.wiki, 'ISBN (identifier)' is a redirect to 'International Standard Book Number'
q: wikidata q number for the identifier
label: the alternate name to apply to link
label: the label preceeding the identifier; label is linked to a wikipedia article (in this order):
redirect from id_handlers['<id>'].redirect when use_identifier_redirects is true
wikidata-supplied article name for the local wiki from id_handlers['<id>'].q
local article name from id_handlers['<id>'].link
mode: 'manual' when there is a specific function in the code to handle the identifier;
'external' for identifiers that link outside of Wikipedia;
Line 1,338 ⟶ 1,252:
parameters = {'arxiv', 'eprint'},
link = 'arXiv',
redirect = 'arXiv (identifier)',
q = 'Q118398',
label = 'arXiv',
Line 1,351 ⟶ 1,264:
parameters = { 'asin', 'ASIN' },
link = 'Amazon Standard Identification Number',
redirect = 'ASIN (identifier)',
q = 'Q1753278',
label = 'ASIN',
Line 1,363 ⟶ 1,275:
parameters = {'bibcode'},
link = 'Bibcode',
redirect = 'Bibcode (identifier)',
q = 'Q25754',
label = 'Bibcode',
Line 1,376 ⟶ 1,287:
parameters = {'biorxiv'},
link = 'bioRxiv',
redirect = 'bioRxiv (identifier)',
q = 'Q19835482',
label = 'bioRxiv',
mode = 'manual',
prefix = '//doi.org/10.1101/',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
Line 1,389 ⟶ 1,299:
parameters = {'citeseerx'},
link = 'CiteSeerX',
redirect = 'CiteSeerX (identifier)',
q = 'Q2715061',
label = 'CiteSeerX',
Line 1,399 ⟶ 1,308:
separator = '&nbsp;',
},
['DOI'] = { -- (Used by InternetArchiveBot)
parameters = { 'doi', 'DOI' },
link = 'Digital object identifier',
redirect = 'doi (identifier)',
q = 'Q25670',
label = 'doi',
Line 1,415 ⟶ 1,323:
parameters = {'eissn', 'EISSN'},
link = 'International_Standard_Serial_Number#Electronic_ISSN',
redirect = 'eISSN (identifier)',
q = 'Q46339674',
label = 'eISSN',
Line 1,427 ⟶ 1,334:
parameters = { 'hdl', 'HDL' },
link = 'Handle System',
redirect = 'hdl (identifier)',
q = 'Q3126718',
label = 'hdl',
Line 1,437 ⟶ 1,343:
custom_access = 'hdl-access',
},
['ISBN'] = { -- (Used by InternetArchiveBot)
parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'},
link = 'International Standard Book Number',
redirect = 'ISBN (identifier)',
q = 'Q33057',
label = 'ISBN',
Line 1,451 ⟶ 1,356:
parameters = {'ismn', 'ISMN'},
link = 'International Standard Music Number',
redirect = 'ISMN (identifier)',
q = 'Q1666938',
label = 'ISMN',
Line 1,462 ⟶ 1,366:
parameters = {'issn', 'ISSN'},
link = 'International Standard Serial Number',
redirect = 'ISSN (identifier)',
q = 'Q131276',
label = 'ISSN',
Line 1,474 ⟶ 1,377:
parameters = {'jfm', 'JFM'},
link = 'Jahrbuch über die Fortschritte der Mathematik',
redirect = 'JFM (identifier)',
q = '',
label = 'JFM',
Line 1,486 ⟶ 1,388:
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
redirect = 'JSTOR (identifier)',
q = 'Q1420342',
label = 'JSTOR',
Line 1,497 ⟶ 1,398:
},
['LCCN'] = {
parameters = {'lccnLCCN', 'LCCNlccn'},
link = 'Library of Congress Control Number',
redirect = 'LCCN (identifier)',
q = 'Q620946',
label = 'LCCN',
Line 1,509 ⟶ 1,409:
},
['MR'] = {
parameters = {'mrMR', 'MRmr'},
link = 'Mathematical Reviews',
redirect = 'MR (identifier)',
q = 'Q211172',
label = 'MR',
Line 1,521 ⟶ 1,420:
},
['OCLC'] = {
parameters = {'oclcOCLC', 'OCLCoclc'},
link = 'OCLC',
redirect = 'OCLC (identifier)',
q = 'Q190593',
label = 'OCLC',
Line 1,535 ⟶ 1,433:
parameters = { 'ol', 'OL' },
link = 'Open Library',
redirect = 'OL (identifier)',
q = 'Q1201876',
label = 'OL',
Line 1,546 ⟶ 1,443:
},
['OSTI'] = {
parameters = {'ostiOSTI', 'OSTIosti'},
link = 'Office of Scientific and Technical Information',
redirect = 'OSTI (identifier)',
q = 'Q2015776',
label = 'OSTI',
Line 1,559 ⟶ 1,455:
},
['PMC'] = {
parameters = {'pmcPMC', 'PMCpmc'},
link = 'PubMed Central',
redirect = 'PMC (identifier)',
q = 'Q229883',
label = 'PMC',
Line 1,573 ⟶ 1,468:
},
['PMID'] = {
parameters = {'pmidPMID', 'PMIDpmid'},
link = 'PubMed Identifier',
redirect = 'PMID (identifier)',
q = '',
label = 'PMID',
mode = 'manual',
-- prefix = '//pubmedwww.ncbi.nlm.nih.gov/pubmed/',
prefix = '//pubmed.ncbi.nlm.nih.gov/', -- new for 2020
COinS = 'info:pmid',
encode = false,
Line 1,585 ⟶ 1,480:
},
['RFC'] = {
parameters = {'rfcRFC', 'RFCrfc'},
link = 'Request for Comments',
redirect = 'RFC (identifier)',
q = 'Q212971',
label = 'RFC',
Line 1,596 ⟶ 1,490:
separator = '&nbsp;',
access = 'free', -- free to read
},
['SBN'] = {
parameters = {'sbn', 'SBN'},
link = 'Standard Book Number', -- redirect to International_Standard_Book_Number#History
redirect = 'SBN (identifier)',
label = 'SBN',
mode = 'manual',
prefix = 'Special:BookSources/0-', -- prefix has leading zero necessary to make 9-digit sbn a 10-digit isbn
COinS = nil, -- nil because we can't use pre or rft or info:
separator = '&nbsp;',
},
['SSRN'] = {
parameters = {'ssrnSSRN', 'SSRNssrn'},
link = 'Social Science Research Network',
redirect = 'SSRN (identifier)',
q = 'Q7550801',
label = 'SSRN',
Line 1,619 ⟶ 1,502:
separator = '&nbsp;',
access = 'free', -- always free to read
},
['S2CID'] = {
parameters = {'s2cid', 'S2CID'},
link = 'Semantic Scholar',
redirect = 'S2CID (identifier)',
q = 'Q22908627',
label = 'S2CID',
mode = 'manual',
prefix = 'https://api.semanticscholar.org/CorpusID:',
COinS = 'pre', -- use prefix value
encode = false,
separator = '&nbsp;',
custom_access = 's2cid-access',
},
['USENETID'] = {
parameters = {'message-id'},
link = 'Usenet',
redirect = 'Usenet (identifier)',
q = 'Q193162',
label = 'Usenet:',
Line 1,646 ⟶ 1,515:
},
['ZBL'] = {
parameters = {'zblZBL', 'ZBLzbl' },
link = 'Zentralblatt MATH',
redirect = 'Zbl (identifier)',
q = 'Q190269',
label = 'Zbl',
Line 1,660 ⟶ 1,528:
 
 
--[[--------------------------< E X P O R T E D T A B L E S >----------------------------------------------------------------
]]
 
return {
use_identifier_redirects = true, -- when true use redirect name for identifier label links
 
aliases = aliases,
special_case_translation = special_case_translation,
defaults = defaults,
date_names = date_names,
err_msg_supl = err_msg_supl,
error_conditions = error_conditions,
editor_markup_patterns = editor_markup_patterns,
Line 1,675 ⟶ 1,541:
global_df = global_df,
id_handlers = id_handlers,
id_limits = id_limits,
keywords_lists = keywords_lists,
keywords_xlate = keywords_xlate,
"https://te.wikipedia.org/wiki/మాడ్యూల్:Citation/CS1/Configuration" నుండి వెలికితీశారు