Module:Citation/CS1/Configuration: Difference between revisions
m 1 revision imported: Content from Template:Harvard citation on Wikipedia |
m 1 revision imported: Content from Template:OSM Location map on Wikipedia |
||
| (One intermediate revision by one other user not shown) | |||
| Line 19: | Line 19: | ||
local enable_sort_keys = true; -- when true module adds namespace sort keys to error and maintenance category links | local enable_sort_keys = true; -- when true module adds namespace sort keys to error and maintenance category links | ||
local suppress_archive_today_urls = true; -- when true module suppresses all parameters with an archive.today url and any deprendent parameters | |||
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ | --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ | ||
| Line 69: | Line 70: | ||
['archived-dead'] = 'Archived from $1 on $2', | ['archived-dead'] = 'Archived from $1 on $2', | ||
['archived-live'] = '$1 from the original on $2', | ['archived-live'] = '$1 from the original on $2', | ||
['archived-unfit'] = 'Archived from the original on ', | ['archived-unfit'] = 'Archived from the original on $1', | ||
['archived'] = 'Archived', | ['archived'] = 'Archived', | ||
['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword | ['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword | ||
| Line 79: | Line 80: | ||
['et al'] = 'et al.', | ['et al'] = 'et al.', | ||
['in'] = 'In', -- edited works | ['in'] = 'In', -- edited works | ||
['inactive'] = 'inactive', | ['inactive'] = ' (inactive $1)', -- $1 is date which the doi was found to be broken in | ||
['inset'] = '$1 inset', | ['inset'] = '$1 inset', | ||
['interview'] = 'Interviewed by $1', | ['interview'] = 'Interviewed by $1', | ||
invisible_1 = '$1 $2', -- $1 stripmarker name; $2 is text from <invisible_chars[1]> | |||
invisible_2 = '$1 character', -- $1 character name from <invisible_chars[1]> | |||
['mismatch'] = '<code class="cs1-code">|$1=</code> / <code class="cs1-code">|$2=</code> mismatch', -- $1 is year param name; $2 is date param name | ['mismatch'] = '<code class="cs1-code">|$1=</code> / <code class="cs1-code">|$2=</code> mismatch', -- $1 is year param name; $2 is date param name | ||
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]: $1', | ['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]: $1', | ||
| Line 96: | Line 99: | ||
['translated'] = 'Translated by $1', | ['translated'] = 'Translated by $1', | ||
['type'] = ' ($1)', -- for titletype | ['type'] = ' ($1)', -- for titletype | ||
wikidata = 'Wikidata', -- these used for interwikilinked author/editor/... names | |||
wikipedia = 'Wikipedia', | |||
wikisource = 'Wikisource', | |||
['written'] = 'Written at $1', | ['written'] = 'Written at $1', | ||
| Line 123: | Line 131: | ||
['via'] = " – via $1", | ['via'] = " – via $1", | ||
['event'] = 'Event occurs at', | ['event'] = 'Event occurs at', | ||
['minutes'] = 'minutes in', | ['minutes'] = ' $1 minutes in', -- $1 is the number of minutes | ||
-- Determines the location of the help page | -- Determines the location of the help page | ||
| Line 141: | Line 149: | ||
['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty', | ['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty', | ||
['warning_msg_e'] = '<span style="color:#d33"> | ['warning_msg_e'] = '<span style="color:#d33"><code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code>: this [[#$2|reference]] has errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID | ||
['warning_msg_m'] = '<span style="color:#085"> | ['warning_msg_m'] = '<span style="color:#085"><code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code>: this [[#$2|reference]] has maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link; $2 is anchor ID | ||
} | } | ||
| Line 153: | Line 161: | ||
the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the | the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the | ||
template's documentation when an article is displayed in preview mode. | template's documentation when an article is displayed in preview mode. | ||
]] | ]] | ||
local citation_class_map_t = { -- TODO: | local citation_class_map_t = { -- TODO: in Module:Cite/config write a function to use this table | ||
arxiv = 'cite arXiv', -- as the source for known_templates_t and citation_classes_t | |||
['audio-visual'] = 'AV media', | ['audio-visual'] = 'cite AV media', | ||
['AV-media-notes'] = 'AV media notes', | ['AV-media-notes'] = 'cite AV media notes', | ||
biorxiv = 'cite bioRxiv', | |||
book = 'cite book', | |||
citation = 'citation', | |||
citeseerx = 'cite CiteSeerX', | |||
conference = 'cite conference', | |||
document = 'cite document', | |||
encyclopaedia = 'cite encyclopedia', | |||
episode = 'cite episode', | |||
interview = 'cite interview', | |||
journal = 'cite journal', | |||
magazine = 'cite magazine', | |||
mailinglist = 'cite mailing list', | |||
map = 'cite map', | |||
medrxiv = 'cite medRxiv', | |||
news = 'cite news', | |||
newsgroup = 'cite newsgroup', | |||
podcast = 'cite podcast', | |||
pressrelease = 'cite press release', | |||
report = 'cite report', | |||
serial = 'cite serial', | |||
sign = 'cite sign', | |||
speech = 'cite speech', | |||
ssrn = 'cite SSRN', | |||
techreport = 'cite tech report', | |||
thesis = 'cite thesis', | |||
web = 'cite web', | |||
} | } | ||
| Line 422: | Line 446: | ||
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, | ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, | ||
} | } | ||
--[[--------------------------< D E P E N D E N C I E S _ T >-------------------------------------------------- | |||
a table of url-holding parameters upon which other parameters are dependent. | |||
this table is used by has_archive_today_url() to suppress parameters that are dependant upon a url-holding parameter | |||
that has as a value an archive.today (or alternate tld) url. | |||
archive.today is deprecated at en.wiki; see Wikipedia:Requests_for_comment/Archive.is_RFC_5 | |||
]] | |||
local url_dependency_map_t = { -- table of url-holding parameters and the meta-parameters that are dependent on them | |||
['url'] = {'AccessDate', 'ArchiveURL', 'Format', 'UrlAccess'}, | |||
['archive-url'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, | |||
['archiveurl'] = {'ArchiveDate', 'ArchiveFormat', 'UrlStatus'}, | |||
['article-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, | |||
['chapter-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, | |||
['conference-url'] = {'ConferenceFormat'}, | |||
['contribution-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, | |||
['entry-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, | |||
['map-url'] = {'MapFormat', 'MapUrlAccess'}, | |||
['section-url'] = {'ChapterFormat', 'ChapterUrlAccess'}, | |||
['transcript-url'] = {'TranscriptFormat'}, | |||
}; | |||
local dependencies_t = {}; -- the table of url-holding parameters and their dependent parameters | |||
for url_param, meta_parameters_t in pairs (url_dependency_map_t) do -- sequence of meta-parameters (indexes) into <aliases> table | |||
local dependant_params_t = {}; -- collection of parameters that are dependent on this <url_param> | |||
for _, meta_parameter in ipairs (meta_parameters_t) do -- for each <aliases> meta-parameter (index) | |||
if 'string' == type (aliases[meta_parameter]) then -- for single parameter names (no aliases), <aliases[meta_parameter]> will be a string | |||
table.insert (dependant_params_t, aliases[meta_parameter]); -- add to this <url_param>'s dependency sequence | |||
else | |||
for _, alias in ipairs (aliases[meta_parameter]) do -- for each alias in aliases[meta_parameter] (aliases['AccessDate'] for example) | |||
table.insert (dependant_params_t, alias); -- add to this <url_param>'s dependency sequence | |||
end | |||
end | |||
end | |||
dependencies_t[url_param] = dependant_params_t; -- add the <url_param> and its dependent parameters | |||
end | |||
| Line 433: | Line 499: | ||
'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters | 'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters | ||
'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators | 'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators | ||
'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', | 'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', -- miscellaneous | ||
'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'MapURL', 'TranscriptURL', 'URL', | 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'MapURL', 'TranscriptURL', 'URL', -- URL-holding parameters | ||
} | } | ||
| Line 511: | Line 577: | ||
local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191'; | local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191'; | ||
local special_case_translation = { | local special_case_translation = { | ||
author = 'author', | |||
editor = 'editor', | |||
name_list_params = '$1-name-list parameters', -- $1 is 'author' or 'editor'; used with err_redundant_parameters | |||
['AuthorList'] = 'authors list', -- used to assemble maintenance category names | ['AuthorList'] = 'authors list', -- used to assemble maintenance category names | ||
['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below | ['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below | ||
| Line 548: | Line 618: | ||
{['en'] = {'redirecting...', true}, ['local'] = nil}, | {['en'] = {'redirecting...', true}, ['local'] = nil}, | ||
{['en'] = {'usurped title', true}, ['local'] = nil}, -- added by a GreenC bot | {['en'] = {'usurped title', true}, ['local'] = nil}, -- added by a GreenC bot | ||
{['en'] = {'wayback machine', true}, ['local'] = nil}, | |||
{['en'] = {'webcite query result', true}, ['local'] = nil}, | {['en'] = {'webcite query result', true}, ['local'] = nil}, | ||
{['en'] = {'wikiwix\'s cache', true}, ['local'] = nil}, | {['en'] = {'wikiwix\'s cache', true}, ['local'] = nil}, | ||
{['en'] = {'bot verification', true}, ['local'] = nil}, | |||
} | } | ||
}, | }, | ||
| Line 609: | Line 681: | ||
{['en'] = {'verfasser', true}, ['local'] = nil}, | {['en'] = {'verfasser', true}, ['local'] = nil}, | ||
} | } | ||
} | |||
} | } | ||
| Line 1,194: | Line 1,266: | ||
local script_lang_codes = { | local script_lang_codes = { | ||
'ab', 'am', 'ar', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', 'cu', | 'ab', 'am', 'ar', 'as', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', | ||
'cu', 'dv', 'dz', 'el', 'fa', 'grc', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', | |||
'kaa', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mni', | |||
'mr', 'my', 'ne', 'or', 'ota', 'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', | |||
'ta', 'te', 'tg', 'th', 'ti', 'tkr', 'tt', 'ug', 'uk', 'ur', 'uz', 'yi', | |||
'yue', 'zh', 'zgh' | |||
}; | }; | ||
| Line 1,320: | Line 1,392: | ||
local registrants_t = {}; | local registrants_t = {}; | ||
for _, v in ipairs ({ | for _, v in ipairs ({ | ||
'1045', '1074', '1096', '1100', '1155', '1186', '1194', '1371', '1629', '1989', '1999', '2147', '2196', '3285', '3389', '3390', | '1045', '1074', '1096', '1100', '1155', '1186', '1194', '1371', '1613', '1629', '1989', '1999', '2147', '2196', '3285', '3389', '3390', '3906', | ||
'3748', '3814', '3847', '3897', '4061', '4089', '4103', '4172', '4175', '4230', '4236', '4239', '4240', '4249', '4251', | '3748', '3814', '3847', '3897', '4061', '4089', '4103', '4172', '4175', '4230', '4236', '4239', '4240', '4249', '4251', | ||
'4252', '4253', '4254', '4291', '4292', '4329', '4330', '4331', '5194', '5210', '5306', '5312', '5313', '5314', | '4252', '4253', '4254', '4291', '4292', '4329', '4330', '4331', '5086', '5194', '5210', '5306', '5312', '5313', '5314', | ||
'5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', | '5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', | ||
'5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', | '5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', | ||
'6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '9778', '11131', '11569', '11647', | '6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '9778', '11131', '11569', '11647', | ||
'11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', | '11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', | ||
'17645', '18637', '19080', '19173', '20944', '21037', '21468', '21767', '22261', '22323', '22459', '24105', '24196', '24966', | '17645', '18637', '19080', '19173', '20944', '21037', '21105', '21468', '21767', '21425', '22261', '22323', '22459', '24105', '24196', '24966', | ||
'26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128', | '26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128', | ||
'47622', '47959', '52437', '52975', '53288', '54081', '54947', '55667', '55914', '57009', '58647', '59081', | '47622', '47959', '52437', '52975', '53288', '53347', '54081', '54947', '55667', '55914', '57009', '58647', '59081', | ||
}) do | }) do | ||
registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants | registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants | ||
| Line 1,336: | Line 1,408: | ||
return registrants_t; | return registrants_t; | ||
end | end | ||
-- known free registrants identifiable by the doi suffix incipit | |||
local extended_registrants_t = { -- doi suffix incipits are evaluated as lua patterns | |||
['1002'] = {'aelm', 'leap'}, | ['1002'] = {'aelm', 'leap', 'loe2%.', 'lol2%.'}, -- Advanced Electronic Materials, Learned Publishing, L&O e-Lectures, L&O Letters | ||
['1016'] = {'j.heliyon', 'j.nlp', 'j.patter', 'j.proche' | ['1016'] = {'j%.aace', 'j%.aed', 'j%.aiopen', 'j%.animal', 'j%.apsb', 'j%.addicn', -- AACE Endocrinology and Diabetes, AACE Endocrinology and Diabetes, AI Open, Animal, Acta Pharmaceutica Sinica B, Addiction Neuroscience | ||
['1017'] = {'nlp'}, | 'j%.abrep', 'j%.gpb', 'j%.heliyon', 'j%.nlp', 'j%.patter', 'j%.proche', -- Addictive Behaviors Reports, Genomics, Proteomics & Bioinformatics after 2015, Heliyon, Natural Language Processing, Patterns, Procedia Chemistry | ||
['1046'] = {'j.1365-8711', 'j.1365-246x'}, | 'j%.vgie', 'S1672-0229'}, -- VideoGIE, Genomics, Proteomics & Bioinformatics before 2015 | ||
['1093'] = {'mnras', 'mnrasl', 'gji', 'rasti'}, | ['1017'] = {'apj%.', 'nlp', 'mdh', 'S15574660'}, -- Natural Language Processing Journal, Medical History, Asia Pacific Journal | ||
['1046'] = {'j%.1365-8711', 'j%.1365-246x'}, -- MNRAS, GJI | |||
['1021'] = {'acscentsci', 'acsomega'}, -- ACS Central Science, ACS Omega | |||
['1093'] = {'mnras', 'mnrasl', 'gji', 'pnasnexus', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, PNAS Nexus, RASTI | |||
['1098'] = {'rsbm', 'rsob', 'rsos'}, -- Biographical Memoirs of Fellows of the Royal Society, Open Biology, Royal Society Open Science | |||
['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics | ['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics | ||
['1111'] = {'j.1365-2966', 'j.1745-3933', 'j.1365-246X'}, | ['1107'] = {'S20569890', 'S20522525', 'S16005775', 'S24143146'}, -- Acta Crystallographica E, IUCrJ, Journal of Synchrotron Radiation, IUCrData | ||
['1109'] = {'oa', 'oj'}, -- IEEE Open Access..., IEEE Open Journal... | |||
['1111'] = {'aogs', 'j%.1365-2966', 'j%.1745-3933', 'j%.1365-246X'}, -- Acta Obstetricia et Gynecologica Scandinavica, MNRAS, MNRAS Letters, GJI | |||
['1128'] = {'asmcr', 'jmbe', 'mbio', 'mra', 'spectrum', 'msphere', 'msystems'}, --ASM Case Reports, Journal of Microbiology & Biology Education, mBio, Microbiology Resource Announcements, Microbiology Spectrum, mSphere, mSystems | |||
['1136'] = {'bmjopen'}, -- BMJ Open | |||
['1140'] = {'epjc'}, -- European Physical Journal C | |||
['1192'] = {'bjo'}, -- BJPsych Open | |||
['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports | ['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports | ||
['1215'] = {'21573689', '21573698'}, -- L&O Fluids | |||
['1590'] = {'0102-3306'}, -- Acta Botanica Brasilica | |||
['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine | ['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine | ||
['4319'] = {'lo%.', 'lol%.', 'lom%.'}, -- L&O, L&O e-Lectures, L&O Methods | |||
['5852'] = {'ejt'}, -- European Journal of Taxonomy | |||
['7155'] = {'jgaa'}, -- Journal of Graph Algorithms and Applications | |||
['11158'] = {'saasp'}, -- Systematic and Applied Acarology Special Publications | ['11158'] = {'saasp'}, -- Systematic and Applied Acarology Special Publications | ||
['11646'] = {'megataxa', 'mesozoic'}, -- Megataxa, Mesozoic | ['11646'] = {'megataxa', 'mesozoic'}, -- Megataxa, Mesozoic | ||
['14231'] = {'ag'}, -- Algebraic Geometry | ['14231'] = {'ag'}, -- Algebraic Geometry | ||
['15446'] = {'abc'}, -- Acta Biológica Colombiana | |||
['17239'] = {'jowr'}, -- Journal of Writing Research | |||
['22073'] = {'pja'}, -- Persian Journal of Acarology | ['22073'] = {'pja'}, -- Persian Journal of Acarology | ||
['24310'] = {'abm'}, -- Acta Botanica Malacitana | |||
['24425'] = {'agp'}, -- Acta Geologica Polonica | |||
['35249'] = {'rche'}, -- Revista Chilena de Entomología | ['35249'] = {'rche'}, -- Revista Chilena de Entomología | ||
['37520'] = {'fi'}, -- Fossil Imprint | ['37520'] = {'fi'}, -- Fossil Imprint | ||
| Line 1,360: | Line 1,451: | ||
]] | ]] | ||
--[[----------< E R R O R M E S S A G E S U P P L | --[[----------< E R R O R M E S S A G E S U P P L E M E N T S >------------- | ||
I18N for those messages that are supplemented with additional specific text that | I18N for those messages that are supplemented with additional specific text that | ||
| Line 1,371: | Line 1,462: | ||
['char'] = 'invalid character', -- |isbn=, |sbn= | ['char'] = 'invalid character', -- |isbn=, |sbn= | ||
['check'] = 'checksum', -- |isbn=, |sbn= | ['check'] = 'checksum', -- |isbn=, |sbn= | ||
empty_str = '(empty string)', -- empty unknown parameter check when cite has |= | |||
['flag'] = 'flag', -- |archive-url= | ['flag'] = 'flag', -- |archive-url= | ||
['form'] = 'invalid form', -- |isbn=, |sbn= | ['form'] = 'invalid form', -- |isbn=, |sbn= | ||
| Line 1,932: | Line 2,024: | ||
]] | ]] | ||
maint_archive_origin = { | |||
message = nil, | |||
anchor = 'archive_origin', | |||
category = 'CS1 maint: archive origin', | |||
hidden = true, | |||
}, | |||
maint_archived_copy = { | maint_archived_copy = { | ||
message = nil, | message = nil, | ||
| Line 1,972: | Line 2,070: | ||
anchor = 'date_year', | anchor = 'date_year', | ||
category = 'CS1 maint: date and year', | category = 'CS1 maint: date and year', | ||
hidden = true, | |||
}, | |||
maint_deprecated_archive = { | |||
message = nil, | |||
anchor = 'deprecated_archive', | |||
category = 'CS1 maint: deprecated archival service', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
| Line 2,110: | Line 2,214: | ||
anchor = 'ref_default', | anchor = 'ref_default', | ||
category = 'CS1 maint: ref duplicates default', | category = 'CS1 maint: ref duplicates default', | ||
hidden = true, | |||
}, | |||
maint_shortened_archive_url = { | |||
message = nil, | |||
anchor = 'shortened_archive_url', | |||
category = 'CS1 maint: shortened archive url', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
| Line 2,128: | Line 2,238: | ||
anchor = 'url_status', | anchor = 'url_status', | ||
category = 'CS1 maint: url-status', | category = 'CS1 maint: url-status', | ||
hidden = true, | |||
}, | |||
maint_work_isbn = { | |||
message = nil, | |||
anchor = 'work_isbn', | |||
category = 'CS1 maint: work parameter with ISBN', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
| Line 2,169: | Line 2,285: | ||
local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data | local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data | ||
if mw.ext.data == nil then | |||
id_limits_data_load_fail = true; -- safeguard against Lua errors if mw.ext.data is not available for some reason | |||
id_limits_data_load_fail = true; -- | |||
else | else | ||
for _, limit_t in ipairs (tab_data_t.data) do | local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab'); -- attempt to load the tabular data from commons into <tab_data_t> | ||
if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false | |||
id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category | |||
else | |||
for _, limit_t in ipairs (tab_data_t.data) do -- overwrite default <load_fail_limit> values from the data table in the tabular data | |||
id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier | |||
end | |||
end | end | ||
end | end | ||
| Line 2,541: | Line 2,661: | ||
date_digit_auto_xlate_enable = date_digit_auto_xlate_enable, | date_digit_auto_xlate_enable = date_digit_auto_xlate_enable, | ||
enable_sort_keys = enable_sort_keys, | enable_sort_keys = enable_sort_keys, | ||
suppress_archive_today_urls = suppress_archive_today_urls, | |||
-- tables and variables created when this module is loaded | -- tables and variables created when this module is loaded | ||
dependencies_t = dependencies_t, -- used to suppress parameters dependent on url-holding parameters holding archive.today urls | |||
enum_needs_xlation = '1' ~= date_names.xlate_digits['1'], -- to avoid unnecessary enumerator translation | |||
global_df = get_date_format (), -- this line can be replaced with "global_df = 'dmy-all'," to have all dates auto translated to dmy format. | global_df = get_date_format (), -- this line can be replaced with "global_df = 'dmy-all'," to have all dates auto translated to dmy format. | ||
global_cs1_config_t = global_cs1_config_t, -- global settings from {{cs1 config}} | global_cs1_config_t = global_cs1_config_t, -- global settings from {{cs1 config}} | ||
id_limits_data_load_fail = id_limits_data_load_fail, -- true when commons tabular identifier-limit data fails to load | |||
known_free_doi_registrants_t = build_free_doi_registrants_table(), | |||
punct_skip = build_skip_table (punct_skip, punct_meta_params), | punct_skip = build_skip_table (punct_skip, punct_meta_params), | ||
url_skip = build_skip_table (url_skip, url_meta_params), | url_skip = build_skip_table (url_skip, url_meta_params), | ||
archive_today_tlds_t = {['today'] = true, ['ph'] = true, ['is'] = true, ['md'] = true, ['li'] = true, ['fo'] = true, ['vn'] = true}; -- used by is_archive_today_url() | |||
name_space_sort_keys = name_space_sort_keys, | name_space_sort_keys = name_space_sort_keys, | ||
aliases = aliases, | aliases = aliases, | ||