모듈:인용문/CS1/구성/샌드박스

Module

--[[ History of changes since last sync: 2023-01-14  2023-02-20: maint cat for temp bibcodes; see Help_talk:Citation_Style_1#New_maintenance_category%3A_Category%3ACS1_maint%3A_bibcode 2023-02-21: detect  archive-date= /  archive-url= timestamp mismatch; see Help_talk:Citation_Style_1#Error_or_Maint_message_if_archive_date_doesn't_match_url 2023-03-14: cleanup archive error messaging; see Help_talk:Citation_Style_1#Possible_invalid_edits_to_live_CS1_module 2023-03-16: i18n; autofill datenames['local_digits']; see Help_talk:Citation_Style_1#i18n_date_handling 2023-03-17: add mni script lang tag; 2023-04-22: add support for  subject-first=,  subject-last=, and aliases and enumeration variants; see Help_talk:Citation_Style_1# subject-first=_and_ subject-last= 2023-04-23: remove support for deprecated parameter  transcripturl=; see Help_talk:Citation_Style_1#deprecated_parameters 2023-05-13: ignore periodical title parameters in book and encyclopedia cites; see Help_talk:Citation_Style_1#Periodical_title_parameter_in_cite_book 2023-05-23: remove support for  lay-date=,  lay-format=,  lay-source=,  lay-url=; see Help_talk:Citation_Style_1#deprecated_parameters 2023-06-01: add support for  medrxiv= and {{cite medrxiv}}; see Help_talk:Citation_Style_1#medrxiv? 2023-06-09: override MediaWiki definition for lang tag fkv; see Help_talk:Citation_Style_1#Incorrect_language_display_for_ISO_639_code 2023-06-19: add support for  title-note=; see Help_talk:Citation_Style_1#create_a_%7Cdepartment%3D_alias_%7Ctitle-note%3D%3F 2023-07-25: tech report error/maint link fix; see Help_talk:Citation_Style_1#Cite_tech_report  ]]  local lang_obj = mw.language.getContentLanguage();        -- make a language object for the local language; used here for languages and dates    --[[--------------------------< S E T T I N G S >--------------------------------------------------------------  boolean settings used to control various things.  these setting located here to make them easy to find  ]]                     -- these settings local to this module only local local_digits_from_mediawiki = false;          -- for i18n; when true, module fills date_names['local_digits'] from MediaWiki; manual fill required else; always false at en.wiki local local_date_names_from_mediawiki = false;         -- for i18n; when true, module fills date_names['local']['long'] and date_names['local']['short'] from MediaWiki;                     -- manual translation required else; ; always false at en.wiki                      -- these settings exported to other modules local use_identifier_redirects = true;           -- when true use redirect name for identifier label links; always true at en.wiki local local_lang_cat_enable = false;           -- when true categorizes pages where  language=<local wiki's language>; always false at en.wiki local date_name_auto_xlate_enable = false;          -- when true translates English month-names to the local-wiki's language month names; always false at en.wiki local date_digit_auto_xlate_enable = false;          -- when true translates Western date digit to the local-wiki's language digits (date_names['local_digits']); always false at en.wiki   --[[--------------------------< 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 identifiers for namespaces that will not be included in citation error categories. Same as setting notracking = true by default.  For wikis that have a current version of Module:cs1 documentation support, this #invoke will return an unordered list of namespace names and their associated identifiers:  {{#invoke:cs1 documentation support uncategorized_namespace_lister all=<anything>}}  ]]  uncategorized_namespaces_t = {[2]=true};          -- init with user namespace id for k, _ in pairs (mw.site.talkNamespaces) do         -- add all talk namespace ids  uncategorized_namespaces_t[k] = true; end  local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', '/[Aa]rchive'};  -- list of Lua patterns found in page names of pages we should not categorize   --[[--------------------------< M E S S A G E S >--------------------------------------------------------------  Translation table  The following contains fixed text that may be output as part of a citation. This is separated from the main body to aid in future translations of this module.  ]]  local messages = {  ['agency'] = '$1 $2',              -- $1 is sepc, $2 is agency  ['archived-dead'] = 'Archived from $1 on $2',  ['archived-live'] = '$1 from the original on $2',  ['archived-unfit'] = 'Archived from the original on ',  ['archived'] = 'Archived',  ['by'] = 'By',                -- contributions to authored works: introduction, foreword, afterword  ['cartography'] = 'Cartography by $1',  ['editor'] = 'ed.',  ['editors'] = 'eds.',  ['edition'] = '($1&nbsp;ed.)',  ['episode'] = 'Episode $1',  ['et al'] = 'et&nbsp;al.',  ['in'] = 'In',                -- edited works  ['inactive'] = 'inactive',  ['inset'] = '$1 inset',  ['interview'] = 'Interviewed by $1',            ['mismatch'] = '<code class="cs1-code">&#124;$1=</code> / <code class="cs1-code">&#124;$2=</code> mismatch', -- $1 is year param name; $2 is date param name  ['newsgroup'] = '[[Usenet newsgroup Newsgroup]]:&nbsp;$1',  ['notitle'] = 'No title',             -- for  title=(()) and (in the future)  title=none  ['original'] = 'the original',  ['origdate'] = ' [$1]',  ['published'] = ' (published $1)',  ['retrieved'] = 'Retrieved $1',  ['season'] = 'Season $1',  ['section'] = '§&nbsp;$1',  ['sections'] = '§§&nbsp;$1',  ['series'] = '$1 $2',              -- $1 is sepc, $2 is series  ['seriesnum'] = 'Series $1',  ['translated'] = 'Translated by $1',  ['type'] = ' ($1)',               -- for titletype  ['written'] = 'Written at $1',   ['vol'] = '$1 Vol.&nbsp;$2',            -- $1 is sepc; bold journal style volume is in presentation{}  ['vol-no'] = '$1 Vol.&nbsp;$2, no.&nbsp;$3',        -- sepc, volume, issue (alternatively insert $1 after $2, but then we'd also have to change capitalization)  ['issue'] = '$1 No.&nbsp;$2',            -- $1 is sepc   ['art'] = '$1 Art.&nbsp;$2',            -- $1 is sepc; for {{cite conference}} only  ['vol-art'] = '$1 Vol.&nbsp;$2, art.&nbsp;$3',        -- sepc, volume, article-number; for {{cite conference}} only   ['j-vol'] = '$1 $2',              -- sepc, volume; bold journal volume is in presentation{}  ['j-issue'] = ' ($1)',  ['j-article-num'] = ' $1',             -- TODO: any punctuation here? static text?   ['nopp'] = '$1 $2';               -- page(s) without prefix; $1 is sepc   ['p-prefix'] = "$1 p.&nbsp;$2",            -- $1 is sepc  ['pp-prefix'] = "$1 pp.&nbsp;$2",           -- $1 is sepc  ['j-page(s)'] = ': $1',              -- same for page and pages   ['sheet'] = '$1 Sheet&nbsp;$2',            -- $1 is sepc  ['sheets'] = '$1 Sheets&nbsp;$2',           -- $1 is sepc  ['j-sheet'] = ': Sheet&nbsp;$1',  ['j-sheets'] = ': Sheets&nbsp;$1',    ['language'] = '(in $1)',  ['via'] = " &ndash; via $1",  ['event'] = 'Event occurs at',  ['minutes'] = 'minutes in',    -- Determines the location of the help page  ['help page link'] = 'Help:CS1 errors',  ['help page label'] = 'help',    -- categories  ['cat wikilink'] = '[[Category:$1]]',          -- $1 is the category name  [':cat wikilink'] = '[[:Category:$1 link]]',        -- category name as maintenance message wikilink; $1 is the category name   -- Internal errors (should only occur if configuration is bad)  ['undefined_error'] = 'Called with an undefined error condition',  ['unknown_ID_key'] = 'Unrecognized ID key: ',        -- an ID key in id_handlers not found in ~/Identifiers func_map{}  ['unknown_ID_access'] = 'Unrecognized ID access keyword: ',     -- an ID access keyword in id_handlers not found in keywords_lists['id-access']{}  ['unknown_argument_map'] = 'Argument map not defined for this variable',  ['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty',    ['warning_msg_e'] = '<span style="color:#d33">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code> templates have errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display help]]).'; -- $1 is template link  ['warning_msg_m'] = '<span style="color:#3a3">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">&#123;{$1}}</code> templates have maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display help]]).'; -- $1 is template link  }   --[[--------------------------< C I T A T I O N _ C L A S S _ M A P >------------------------------------------  this table maps the value assigned to  CitationClass= in the cs1 2 templates to the canonical template name when the value assigned to  CitationClass= is different from the canonical template name.   CitationClass= values are used as class attributes in the <cite> tag that encloses the citation so these names may not contain spaces while 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.  Most cs1 2 template  CitationClass= values at en.wiki match their canonical template names so are not listed here.  ]]   local citation_class_map_t = {            -- TODO: if kept, these and all other config.CitationClass 'names' require some sort of i18n   ['arxiv'] = 'arXiv',   ['audio-visual'] = 'AV media',   ['AV-media-notes'] = 'AV media notes',   ['biorxiv'] = 'bioRxiv',   ['citeseerx'] = 'CiteSeerX',   ['encyclopaedia'] = 'encyclopedia',   ['mailinglist'] = 'mailing list',   ['medrxiv'] = 'medRxiv',   ['pressrelease'] = 'press release',   ['ssrn'] = 'SSRN',   ['techreport'] = 'tech report',   }   --[=[-------------------------< E T _ A L _ P A T T E R N S >--------------------------------------------------  This table provides Lua patterns for the phrase "et al" and variants in name text (author, editor, etc.). The main module uses these to identify and emit the 'etal' message.  ]=]  local et_al_patterns = {  "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.;,\"']*$",      -- variations on the 'et al' theme  "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.;,\"']*$",  -- variations on the 'et alia', 'et alii' and 'et aliae' themes (false positive 'et aliie' unlikely to match)  "[;,]? *%f[%a]and [Oo]thers",            -- an alternative to et al.  "%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]",          -- a wikilinked form  "%(%( *[Ee][Tt]%.? *[Aa][Ll]%.? *%)%)",          -- a double-bracketed form (to counter partial removal of ((...)) syntax)  "[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]",         -- a bracketed form  }   --[[--------------------------< 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.  ]]  local presentation =   {  -- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display  ['hidden-error'] = '<span class="cs1-hidden-error citation-comment">$1</span>',  ['visible-error'] = '<span class="cs1-visible-error citation-comment">$1</span>',  ['hidden-maint'] = '<span class="cs1-maint 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   ['cite'] = '<cite class="$1">$2</cite>';         -- for use when citation does not have a namelist and  ref= not set so no id="..." attribute  ['cite-id'] = '<cite id="$1" class="$2">$3</cite>';       -- for use when when  ref= is set or when citation has a namelist   ['format'] = ' <span class="cs1-format">($1)</span>',      -- for  format=,  chapter-format=, etc.  ['interwiki'] = ' <span class="cs1-format">[in $1]</span>',     -- for interwiki-language-linked author, editor, etc  ['interproj'] = ' <span class="cs1-format">[at $1]</span>',     -- for interwiki-project-linked author, editor, etc (:d: and :s: supported; :w: ignored)   -- various access levels, for  access=,  doi-access=,  arxiv=, ...  -- narrow no-break space &#8239; may work better than nowrap CSS. Or not? Browser support?   ['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>',  -- external link with appropriate lock icon   ['free'] = {class='cs1-lock-free', title='Freely accessible'},   -- classes defined in Module:Citation/CS1/styles.css   ['registration'] = {class='cs1-lock-registration', title='Free registration required'},   ['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'},   ['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'},   ['interwiki-icon'] = '<span class="$1" title="$2">$3</span>',   ['class-wikisource'] = 'cs1-ws-icon',   ['italic-title'] = "''$1''",   ['kern-left'] = '<span class="cs1-kern-left"></span>$1',     -- spacing to use when title contains leading single or double quote mark  ['kern-right'] = '$1<span class="cs1-kern-right"></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)   ['ocins'] = '<span title="$1" class="Z3988"></span>',    ['parameter'] = '<code class="cs1-code">&#124;$1=</code>',    ['ps_cs1'] = '.';               -- CS1 style postscript (terminal) character  ['ps_cs2'] = '';               -- CS2 style postscript (terminal) character (empty string)   ['quoted-text'] = '<q>$1</q>',            -- for wrapping  quote= content  ['quoted-title'] = '"$1"',   ['sep_cs1'] = '.',               -- CS1 element separator  ['sep_cs2'] = ',',               -- CS2 separator  ['sep_nl'] = ';',               -- CS1 2 style name-list separator between names is a semicolon  ['sep_nl_and'] = ' and ',             -- used as last nl sep when  name-list-style=and and list has 2 items  ['sep_nl_end'] = '; and ',             -- used as last nl sep when  name-list-style=and and list has 3+ names  ['sep_name'] = ', ',              -- CS1 2 style last/first separator is <comma><space>  ['sep_nl_vanc'] = ',',              -- Vancouver style name-list separator between authors is a comma  ['sep_name_vanc'] = ' ',             -- Vancouver style last/first separator is a space   ['sep_list'] = ', ',              -- used for  language= when list has 3+ items except for last sep which uses sep_list_end  ['sep_list_pair'] = ' and ',            -- used for  language= when list has 2 items  ['sep_list_end'] = ', and ',            -- used as last list sep for  language= when list has 3+ items    ['trans-italic-title'] = "&#91;''$1''&#93;",  ['trans-quoted-title'] = "&#91;$1&#93;",         -- for  trans-title= and  trans-quote=  ['vol-bold'] = '$1 <b>$2</b>',            -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}  }    --[[--------------------------< A L I A S E S >---------------------------------  Aliases table for commonly passed parameters.  Parameter names on the right side in the assignments 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',  ['ArchiveDate'] = {'archive-date', 'archivedate'},       -- Used by InternetArchiveBot  ['ArchiveFormat'] = 'archive-format',  ['ArchiveURL'] = {'archive-url', 'archiveurl'},        -- Used by InternetArchiveBot  ['ArticleNumber'] = 'article-number',  ['ASINTLD'] = 'asin-tld',  ['At'] = 'at',                -- Used by InternetArchiveBot  ['Authors'] = {'authors', 'people', 'credits'},  ['BookTitle'] = {'book-title', 'booktitle'},  ['Cartography'] = 'cartography',  ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},  ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format',   'article-format', 'section-format'};  ['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url', 'chapterurl'}, -- 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 identifier  ['Collaboration'] = 'collaboration',  ['Conference'] = {'conference', 'event'},  ['ConferenceFormat'] = 'conference-format',  ['ConferenceURL'] = 'conference-url',          -- Used by InternetArchiveBot  ['Date'] = {'date', 'air-date', 'airdate'},         -- air-date and airdate for cite episode and cite serial only  ['Degree'] = 'degree',  ['DF'] = 'df',  ['DisplayAuthors'] = {'display-authors', 'display-subjects'},  ['DisplayContributors'] = 'display-contributors',  ['DisplayEditors'] = 'display-editors',  ['DisplayInterviewers'] = 'display-interviewers',  ['DisplayTranslators'] = 'display-translators',  ['Docket'] = 'docket',  ['DoiBroken'] = 'doi-broken-date',  ['Edition'] = 'edition',  ['Embargo'] = 'pmc-embargo-date',  ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'dictionary'},   -- cite encyclopedia only  ['Episode'] = 'episode',             -- cite serial only TODO: make available to cite episode?  ['Format'] = 'format',  ['ID'] = {'id', 'ID'},  ['Inset'] = 'inset',  ['Issue'] = {'issue', 'number'},  ['Language'] = {'language', 'lang'},  ['MailingList'] = {'mailing-list', 'mailinglist'},       -- cite mailing list only  ['Map'] = 'map',               -- cite map only  ['MapFormat'] = 'map-format',            -- cite map only  ['MapURL'] = {'map-url', 'mapurl'},           -- cite map only -- Used by InternetArchiveBot  ['MapUrlAccess'] = 'map-url-access',          -- cite map only -- Used by InternetArchiveBot  ['Minutes'] = 'minutes',  ['Mode'] = 'mode',  ['NameListStyle'] = 'name-list-style',  ['Network'] = 'network',  ['Newsgroup'] = 'newsgroup',            -- cite newsgroup only  ['NoPP'] = {'no-pp', 'nopp'},  ['NoTracking'] = {'no-tracking', 'template-doc-demo'},  ['Number'] = 'number',              -- this case only for cite techreport  ['OrigDate'] = {'orig-date', 'orig-year', 'origyear'},  ['Others'] = 'others',  ['Page'] = {'page', 'p'},             -- Used by InternetArchiveBot  ['Pages'] = {'pages', 'pp'},            -- Used by InternetArchiveBot  ['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'},  ['Place'] = {'place', 'location'},  ['PostScript'] = 'postscript',  ['PublicationDate'] = {'publication-date', 'publicationdate'},  ['PublicationPlace'] = {'publication-place', 'publicationplace'},  ['PublisherName'] = {'publisher', 'institution'},  ['Quote'] = {'quote', 'quotation'},  ['QuotePage'] = 'quote-page',  ['QuotePages'] = 'quote-pages',  ['Ref'] = 'ref',  ['Scale'] = 'scale',  ['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry',   'script-article', 'script-section'},  ['ScriptMap'] = 'script-map',  ['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper',   'script-periodical', 'script-website', 'script-work'},  ['ScriptQuote'] = 'script-quote',  ['ScriptTitle'] = 'script-title',           -- Used by InternetArchiveBot  ['Season'] = 'season',  ['Sections'] = 'sections',             -- cite map only  ['Series'] = {'series', 'version'},  ['SeriesLink'] = {'series-link', 'serieslink'},  ['SeriesNumber'] = {'series-number', 'series-no'},  ['Sheet'] = 'sheet',              -- cite map only  ['Sheets'] = 'sheets',              -- cite map only  ['Station'] = 'station',  ['Time'] = 'time',  ['TimeCaption'] = 'time-caption',  ['Title'] = 'title',              -- Used by InternetArchiveBot  ['TitleLink'] = {'title-link', 'episode-link', 'episodelink'},    -- Used by InternetArchiveBot  ['TitleNote'] = {'title-note', 'department'},  ['TitleType'] = {'type', 'medium'},  ['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution',   'trans-entry', 'trans-section'},  ['Transcript'] = 'transcript',  ['TranscriptFormat'] = 'transcript-format',   ['TranscriptURL'] = 'transcript-url',          -- Used by InternetArchiveBot  ['TransMap'] = 'trans-map',             -- cite map only  ['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper',   'trans-periodical', 'trans-website', 'trans-work'},  ['TransQuote'] = 'trans-quote',  ['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',  ['Via'] = 'via',  ['Volume'] = 'volume',  ['Year'] = 'year',   ['AuthorList-First'] = {"first#", "author-first#", "author#-first", "author-given#", "author#-given",   "subject-first#", "subject#-first", "subject-given#", "subject#-given",   "given#"},  ['AuthorList-Last'] = {"last#", "author-last#", "author#-last", "author-surname#", "author#-surname",   "subject-last#", "subject#-last", "subject-surname#", "subject#-surname",   "author#", 'host#', "subject#", "surname#"},  ['AuthorList-Link'] = {"author-link#", "author#-link", "subject-link#",   "subject#-link", "authorlink#", "author#link"},  ['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask"},   ['ContributorList-First'] = {'contributor-first#', 'contributor#-first',   'contributor-given#', 'contributor#-given'},  ['ContributorList-Last'] = {'contributor-last#', 'contributor#-last',   'contributor-surname#', 'contributor#-surname', 'contributor#'},  ['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-surname#",   "editor#-surname", "editor#"},  ['EditorList-Link'] = {"editor-link#", "editor#-link"},  ['EditorList-Mask'] = {"editor-mask#", "editor#-mask"},    ['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first',   'interviewer-given#', 'interviewer#-given'},  ['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last',   'interviewer-surname#', 'interviewer#-surname', 'interviewer#'},  ['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-surname#', 'translator#-surname', 'translator#'},  ['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},  ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},  }   --[[--------------------------< P U N C T _ S K I P >---------------------------  builds a table of parameter names that the extraneous terminal punctuation check should not check.  ]]  local punct_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  'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators  'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref',           -- miscellaneous  'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'MapURL', 'TranscriptURL', 'URL',      -- URL-holding parameters  }  local url_meta_params = {              -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value  'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'ID', 'MapURL', 'TranscriptURL', 'URL',  -- parameters allowed to hold urls  'Page', 'Pages', 'At', 'QuotePage', 'QuotePages',       -- insource locators allowed to hold urls  }  local function build_skip_table (skip_t, meta_params)  for _, meta_param in ipairs (meta_params) do        -- for each meta parameter key   local params = aliases[meta_param];          -- get the parameter or the table of parameters associated with the meta parameter name   if 'string' == type (params) then    skip_t[params] = 1;             -- just a single parameter   else    for _, param in ipairs (params) do         -- get the parameter name     skip_t[param] = 1;            -- add the parameter name to the skip table     local count;     param, count = param:gsub ('#', '');       -- remove enumerator marker from enumerated parameters     if 0 ~= count then            -- if removed      skip_t[param] = 1;           -- add param name without enumerator marker     end    end   end  end  return skip_t; end  local punct_skip = {}; local url_skip = {};   --[[--------------------------< S I N G L E - L E T T E R   S E C O N D - L E V E L   D O M A I N S >----------  this is a list of tlds that are known to have single-letter second-level domain names.  This list does not include ccTLDs which are accepted in is_domain_name().  ]]  local single_letter_2nd_lvl_domains_t = {'cash', 'company', 'foundation', 'org', 'today'};   --[[-----------< S P E C I A L   C A S E   T R A N S L A T I O N S >------------  This table is primarily here to support internationalization.  Translations in this table are used, for example, when an error message, category name, etc., is extracted from the English alias key.  There may be other cases where this translation table may be useful.  ]] local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143'; local special_case_translation = {  ['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  ['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',                       -- Lua patterns to match pseudo-titles used by InternetArchiveBot and others as placeholder for unknown  title= value  ['archived_copy'] = {              -- used with CS1 maint: Archive[d] copy as title   ['en'] = '^archived?%s+copy
                
, -- for English; translators: keep this because templates imported from en.wiki ['local'] = nil, -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language }, -- Lua patterns to match generic titles; usually created by bots or reference filling tools -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language -- generic titles and patterns in this table should be lowercase only -- leave ['local'] nil except when there is a matching generic title in your language -- boolean 'true' for plain-text searches; 'false' for pattern searches ['generic_titles'] = { ['accept'] = { }, ['reject'] = { {['en'] = {'^wayback%s+machine