Page MenuHomePhabricator

Wikipedia-20201120021235.xml

Authored By
Reedy
Nov 20 2020, 2:19 AM
Size
2 MB
Referenced Files
None
Subscribers
None

Wikipedia-20201120021235.xml

This file is larger than 256 KB, so syntax highlighting was skipped.
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<dbname>enwiki</dbname>
<base>https://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.36.0-wmf.16</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
<namespace key="0" case="first-letter" />
<namespace key="1" case="first-letter">Talk</namespace>
<namespace key="2" case="first-letter">User</namespace>
<namespace key="3" case="first-letter">User talk</namespace>
<namespace key="4" case="first-letter">Wikipedia</namespace>
<namespace key="5" case="first-letter">Wikipedia talk</namespace>
<namespace key="6" case="first-letter">File</namespace>
<namespace key="7" case="first-letter">File talk</namespace>
<namespace key="8" case="first-letter">MediaWiki</namespace>
<namespace key="9" case="first-letter">MediaWiki talk</namespace>
<namespace key="10" case="first-letter">Template</namespace>
<namespace key="11" case="first-letter">Template talk</namespace>
<namespace key="12" case="first-letter">Help</namespace>
<namespace key="13" case="first-letter">Help talk</namespace>
<namespace key="14" case="first-letter">Category</namespace>
<namespace key="15" case="first-letter">Category talk</namespace>
<namespace key="100" case="first-letter">Portal</namespace>
<namespace key="101" case="first-letter">Portal talk</namespace>
<namespace key="108" case="first-letter">Book</namespace>
<namespace key="109" case="first-letter">Book talk</namespace>
<namespace key="118" case="first-letter">Draft</namespace>
<namespace key="119" case="first-letter">Draft talk</namespace>
<namespace key="446" case="first-letter">Education Program</namespace>
<namespace key="447" case="first-letter">Education Program talk</namespace>
<namespace key="710" case="first-letter">TimedText</namespace>
<namespace key="711" case="first-letter">TimedText talk</namespace>
<namespace key="828" case="first-letter">Module</namespace>
<namespace key="829" case="first-letter">Module talk</namespace>
<namespace key="2300" case="first-letter">Gadget</namespace>
<namespace key="2301" case="first-letter">Gadget talk</namespace>
<namespace key="2302" case="case-sensitive">Gadget definition</namespace>
<namespace key="2303" case="case-sensitive">Gadget definition talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>Template:Cite web</title>
<ns>10</ns>
<id>1252907</id>
<revision>
<id>753103437</id>
<parentid>753063659</parentid>
<timestamp>2016-12-05T05:36:52Z</timestamp>
<contributor>
<username>Anthony Appleyard</username>
<id>119438</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Cite web]]": restore old protection ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="122" xml:space="preserve">&lt;includeonly&gt;{{#invoke:citation/CS1|citation
|CitationClass=web
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>rcgmbcxu7hvs583g1f3rzz4c4dkizda</sha1>
</revision>
</page>
<page>
<title>Template:Cite news</title>
<ns>10</ns>
<id>4321630</id>
<revision>
<id>828626614</id>
<parentid>828404709</parentid>
<timestamp>2018-03-03T19:19:37Z</timestamp>
<contributor>
<username>Jo-Jo Eumerus</username>
<id>17449355</id>
</contributor>
<comment>Per edit request on [[Help talk:Citation Style 1]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="123" xml:space="preserve">&lt;includeonly&gt;{{#invoke:citation/CS1|citation
|CitationClass=news
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>pbjnspfej5gxihr9izxrzkow3f1uf3i</sha1>
</revision>
</page>
<page>
<title>Template:Cite journal</title>
<ns>10</ns>
<id>4740319</id>
<revision>
<id>690395473</id>
<parentid>579832342</parentid>
<timestamp>2015-11-13T02:17:24Z</timestamp>
<contributor>
<username>Fuhghettaboutit</username>
<id>665998</id>
</contributor>
<minor/>
<comment>Changed protection level of Template:Cite journal: when I changed this to add template editors, I didn't realize it had cascding protection—so all my change did was make it appear as if it could be edited by them ([Edit=Allow only administrators] (in...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="126" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Citation/CS1|citation
|CitationClass=journal
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>9fcytsszanq7xbwi3p28zsneear9938</sha1>
</revision>
</page>
<page>
<title>Template:Cite book</title>
<ns>10</ns>
<id>4086375</id>
<revision>
<id>810449908</id>
<parentid>810433573</parentid>
<timestamp>2017-11-15T09:11:45Z</timestamp>
<contributor>
<username>Salix alba</username>
<id>212526</id>
</contributor>
<comment>put TD in a collapse top / bottom section</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="200" xml:space="preserve">&lt;includeonly&gt;{{#invoke:citation/CS1|citation
|CitationClass=book
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
{{collapse top|TemplateData}}
{{Cite book/TemplateData}}
{{collapse bottom}}
&lt;/noinclude&gt;</text>
<sha1>my4yy07itdv4e2t5sc1x4l3pzgpmzo7</sha1>
</revision>
</page>
<page>
<title>Template:Cite AV media</title>
<ns>10</ns>
<id>2327169</id>
<revision>
<id>774811519</id>
<parentid>690395471</parentid>
<timestamp>2017-04-10T20:26:44Z</timestamp>
<contributor>
<username>Lectonar</username>
<id>128863</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Cite AV media]]": request at rfpp ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="132" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Citation/CS1 | citation
|CitationClass=audio-visual
}}&lt;/includeonly&gt;&lt;noinclude&gt;{{documentation}} &lt;/noinclude&gt;</text>
<sha1>5uc4e2t6myaznmqj6pk8sugy3rcqv8a</sha1>
</revision>
</page>
<page>
<title>Template:Citation</title>
<ns>10</ns>
<id>3164016</id>
<revision>
<id>895815361</id>
<parentid>895803258</parentid>
<timestamp>2019-05-06T17:38:52Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>per [[Wikipedia:Templates for discussion/Log/2019 April 18#separate patent cites from Template:Citation‎|TfD]];</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="127" xml:space="preserve">&lt;includeonly&gt;{{#invoke:citation/CS1|citation
|CitationClass=citation
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>c5vwsrpqyl5vzwjnrpazsisamya1wve</sha1>
</revision>
</page>
<page>
<title>Template:!xt</title>
<ns>10</ns>
<id>24460381</id>
<revision>
<id>827250508</id>
<parentid>819844031</parentid>
<timestamp>2018-02-23T17:02:10Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:!xt]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="400" xml:space="preserve">{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|&lt;span class="example deprecated-content example-bad" style="font-family: Georgia, 'DejaVu Serif', serif; color: #8B0000;" {{#if:{{{title|}}}|title="{{{title}}}"}}&gt;{{{1|Example text}}}&lt;/span&gt;}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>as9fbbw0jw0vo3kag3jnc5uddujfcl5</sha1>
</revision>
</page>
<page>
<title>Template:=</title>
<ns>10</ns>
<id>5762361</id>
<revision>
<id>690395465</id>
<parentid>579820445</parentid>
<timestamp>2015-11-13T02:17:24Z</timestamp>
<contributor>
<username>Fuhghettaboutit</username>
<id>665998</id>
</contributor>
<minor/>
<comment>Changed protection level of Template:=: when I changed this to add template editors, I didn't realize it had cascding protection—so all my change did was make it appear as if it could be edited by them ([Edit=Allow only administrators] (indefinite) [...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="43" xml:space="preserve">=&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>81y2jvjxw3y0febsqx5xbr4ikdc7nr6</sha1>
</revision>
</page>
<page>
<title>Template:AWB standard installation</title>
<ns>10</ns>
<id>38544087</id>
<revision>
<id>921309772</id>
<parentid>921307448</parentid>
<timestamp>2019-10-15T01:43:39Z</timestamp>
<contributor>
<username>Flyer22 Frozen</username>
<id>4293477</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contributions/121.211.121.137|121.211.121.137]] ([[User talk:121.211.121.137|talk]]) ([[WP:HG|HG]]) (3.4.9)</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="703" xml:space="preserve">{{ mbox
| image = [[File:AWB logo draft.png|44x50px|alt=|link=]]
| text = This template is used by the standard installation of [[Wikipedia:AutoWikiBrowser|AutoWikiBrowser]] (AWB). If you are planning to make changes to this template, how it should be used, or nominate it for deletion, please notify AWB's user base and maintainers beforehand at [[Wikipedia talk:AutoWikiBrowser|Wikipedia talk:AWB]] as a courtesy.{{#if:{{{1|}}}|&lt;p&gt;
{{{1}}}}}}}&lt;includeonly&gt;{{#if:{{{nocat|}}}||{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|[[Category:Templates used by AutoWikiBrowser|{{PAGENAME}}]]}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation}}&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;&lt;/noinclude&gt;</text>
<sha1>eemcljcgp5x7metgbo0ndo0nnpwmnjl</sha1>
</revision>
</page>
<page>
<title>Template:Anchor</title>
<ns>10</ns>
<id>2236346</id>
<revision>
<id>629642299</id>
<parentid>586910254</parentid>
<timestamp>2014-10-14T23:35:24Z</timestamp>
<contributor>
<username>Frietjes</username>
<id>13791031</id>
</contributor>
<comment>add {{{|safesubst:}}} per talk</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="157" xml:space="preserve">{{{{{|safesubst:}}}#invoke:anchor|main}}&lt;noinclude&gt;
{{Documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>cjfgfxc6tpjgpyvzhnbfkngu6u3spzc</sha1>
</revision>
</page>
<page>
<title>Template:Category link</title>
<ns>10</ns>
<id>2348433</id>
<revision>
<id>740512040</id>
<parentid>642633572</parentid>
<timestamp>2016-09-21T14:41:05Z</timestamp>
<contributor>
<username>Anthony Appleyard</username>
<id>119438</id>
</contributor>
<minor/>
<comment>Anthony Appleyard moved page [[Template:Cl]] to [[Template:Category link]] over redirect: [[Special:Permalink/740508935|Requested]] by Nyuszika7H at [[WP:RM/TR]]: The template should be located at the natural, unabbreviated title and &amp;#123;&amp;#123;[[Temp...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="659" xml:space="preserve">{{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Stub types for deletion |[[:Category:{{{1}}}|Cat:{{{1}}}]] | [[:Category:{{{1}}}|{{{2|Category:{{{1}}}}}}]]{{#ifeq:{{Yesno|{{{count|no}}}}}|yes|&lt;small&gt; {{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}&gt;={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|&lt;span style="font-weight: bold; color: #DD0000;"&gt;}}(&amp;thinsp;{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}}}&amp;thinsp;){{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}&gt;={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|&lt;/span&gt;}}&lt;/small&gt;}}}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>npwya2pxpmrb7ss01243bg1cub9s7jq</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style 1</title>
<ns>10</ns>
<id>34197376</id>
<revision>
<id>975833769</id>
<parentid>975825356</parentid>
<timestamp>2020-08-30T17:27:54Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>+citeseerx &amp; ssrn;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1577" xml:space="preserve">{{Navbox
| name = Citation Style 1
| title = [[Help:Citation Style 1|Citation Style 1]]
| below = [[Help talk:Citation Style 1|Citation Style 1 noticeboard]]
| state = {{{state|autocollapse}}}
| listclass = hlist
| selected = {{{1|}}}
| group1 = General &lt;br /&gt;templates
| list1 =
; {{tl|Cite book}}
: books
; {{tl|Cite conference}}
: conference papers
; {{tl|Cite encyclopedia}}
: edited collections
; {{tl|Cite interview}}
: interviews
; {{tl|Cite journal}}
: academic journals and papers
; {{tl|Cite magazine}}
: magazines
; {{tl|Cite mailing list}}
: public mailing lists
; {{tl|Cite map}}
: maps
; {{tl|Cite news}}
: news articles
; {{tl|Cite newsgroup}}
: online newsgroups
; {{tl|Cite press release}}
: press releases
; {{tl|Cite report}}
: unpublished reports
; {{tl|Cite sign}}
: signs, plaques
; {{tl|Cite speech}}
: speeches
; {{tl|Cite techreport}}
: technical reports
; {{tl|Cite thesis}}
: theses
; {{tl|Cite web}}
: web sources
| group2 = Preprint templates
| list2 =
* {{tl|Cite arXiv}}
* {{tl|Cite bioRxiv}}
* {{tl|Cite citeseerx}}
* {{tl|Cite ssrn}}
| group3 = Audiovisual-related
| list3 =
* {{tl|Cite AV media}}
* {{tl|Cite AV media notes}}
* {{tl|Cite episode}}
* {{tl|Cite podcast}}
* {{tl|Cite serial}}
| group4 = Categories
| list4 =
* [[:Category:Citation Style 1 templates|Citation Style 1 templates]]
* [[:Category:Citation Style 1 specific-source templates|Citation Style 1 specific-source templates]]
| group5 = Documentation
| list5 =
* {{tl|Citation Style documentation}}
}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>5uam9qywkzhdf85yrmwu1alhjucieb8</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation</title>
<ns>10</ns>
<id>34148357</id>
<revision>
<id>952522804</id>
<parentid>913850265</parentid>
<timestamp>2020-04-22T17:58:29Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>use [[Module:Template wrapper]] so that we don't have to maintain the intermediate list of parameters used by the various sub-templates;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="174" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Template wrapper|wrap|_template=Citation Style documentation/{{{1|}}}|_include-positional=yes}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>0mwkn46ojtl7cqp14gr4m3fyfcqfpom</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/agency</title>
<ns>10</ns>
<id>34760499</id>
<revision>
<id>961328187</id>
<parentid>909389987</parentid>
<timestamp>2020-06-07T20:52:31Z</timestamp>
<contributor>
<username>Mandruss</username>
<id>19082616</id>
</contributor>
<comment>per discussion at [[Help talk:Citation Style 1#Change to doc for |agency=]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="336" xml:space="preserve">* &lt;b id="csdoc_agency"&gt;agency&lt;/b&gt;: The [[news agency]] (wire service) that provided the content; examples: [[Associated Press]], [[Reuters]], [[Agence France-Presse]]. Do not use for sources published on the agency's own website; e.g. apnews.com or reuters.com; instead, use '''work''' or '''publisher'''. May be wikilinked if relevant.</text>
<sha1>0gr7zvqrgwzolooxbq3sdv8f2xjmdjg</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/author</title>
<ns>10</ns>
<id>34353323</id>
<revision>
<id>985001778</id>
<parentid>985001535</parentid>
<timestamp>2020-10-23T11:03:30Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>+anchor</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="6686" xml:space="preserve">* &lt;b id="csdoc_author"&gt;last&lt;/b&gt;: Surname of a single author. Do not wikilink—use '''author-link''' instead. For corporate authors or authors for whom only one name is listed by the source, use '''last''' or one of its aliases (e.g. {{para|author|Bono}}). Aliases: '''surname''', '''author''', '''last1''', '''surname1''', '''author1'''{{#if:{{{aliases|}}}|, {{{aliases}}}}}.
** '''author''': this parameter is used to hold the complete name of a single author (first and last) or to hold the name of a corporate author. This parameter should never hold the names of more than one author. Do not wikilink—use '''author-link''' instead.
** '''first''': Given or first names of author; for example: ''Firstname Middlename'' or ''Firstname M.'' or ''Firstname M., Sr.'' Do not wikilink—use '''author-link''' instead. Aliases: '''given''', '''first1''', '''given1'''. Requires '''last'''; first name will not display if '''last''' is empty.
** OR: for multiple authors, use '''last1''', '''first1''' through '''last&lt;var&gt;n&lt;/var&gt;''', '''first&lt;var&gt;n&lt;/var&gt;''', where ''n'' is any consecutive number for an unlimited number of authors (each '''first&lt;var&gt;n&lt;/var&gt;''' requires a corresponding '''last&lt;var&gt;n&lt;/var&gt;''', but not the other way around). {{Crossref|See the [[#csdoc_display|'''display''']] parameters to change how many authors are displayed.}} Aliases: '''surname1''', '''given1''' through '''surname&lt;var&gt;n&lt;/var&gt;''', '''given&lt;var&gt;n&lt;/var&gt;''', or '''author1''' through '''author&lt;var&gt;n&lt;/var&gt;'''. For an individual author plus an institutional author, you can use {{para|first1|...}}{{para|last1|...}}{{para|author2|...}}.
** '''author-link''': Title of existing Wikipedia article about the author—not the author's website; do not wikilink. Aliases: '''author-link1''', '''authorlink''', '''authorlink1''', '''author1-link''', '''author1link'''.
**OR: for multiple authors, use '''author-link1''' through '''author-link&lt;var&gt;n&lt;/var&gt;'''. Aliases: '''authorlink1''' through '''authorlink&lt;var&gt;n&lt;/var&gt;''', or '''author1-link''' through '''author&lt;var&gt;n&lt;/var&gt;-link''', or '''author1link''' through '''author&lt;var&gt;n&lt;/var&gt;link'''.
**'''name-list-style''': accepts a limited list of keywords as value; when set to &lt;code&gt;amp&lt;/code&gt;, &lt;code&gt;ampersand&lt;/code&gt;, or &lt;code&gt;&amp;&lt;/code&gt;, inserts an ampersand between the last two names in a name list; when set to &lt;code&gt;and&lt;/code&gt;, inserts the conjunction 'and' between the last two names of a name list; when set to &lt;code&gt;vanc&lt;/code&gt;displays name lists in [[Vancouver style]] when the lists use the &lt;code&gt;last&lt;/code&gt;/&lt;code&gt;first&lt;/code&gt; forms of name parameters. Alias: '''{{xtd|name-list-format}}''' (deprecated)
*{{anchor|para_vauthors}}'''vauthors''': comma-separated list of author names in [[Vancouver style]]; enclose corporate or institutional author names in [[Help:Citation_Style_1#Accept-this-as-written_markup|doubled parentheses]]. End with etal if appropriate:
*:{{para|vauthors|Smythe JB, ((Megabux Corp.)), etal}}
** '''author-link''' and '''author-mask''' may be used for the individual names in {{para|vauthors}} as described above{{#if:{{{limited_param_list|}}}||
*'''authors''': Free-form list of author names; use of this parameter is discouraged because it does not contribute to a citation's metadata; not an alias of '''last'''.}}{{#if: {{{contributor|}}}|
* '''contributor-last''': (book cites only) surname of the author of '''contribution''' (which is required). Aliases: '''contributor-surname''', '''contributor1''', '''contributor1-last''', '''contributor-last1'''.
**'''contributor-first''': Given or first names of contributor. Do not wikilink—use '''contributor-link''' instead. Aliases: '''contributor-given''', '''contributor1-first''', '''contributor-first1'''.
** OR: for multiple contributors, use '''contributor-last1''', '''contributor-first1''' through '''contributor-last&lt;var&gt;n&lt;/var&gt;''', '''contributor-first&lt;var&gt;n&lt;/var&gt;''' where ''n'' is any consecutive number for an unlimited number of contributors (each '''contributor-first&lt;var&gt;n&lt;/var&gt;''' requires a corresponding '''contributor-last&lt;var&gt;n&lt;/var&gt;''', but not the other way around). Aliases: '''contributor1-last''', '''contributor1-first''' through '''contributor&lt;var&gt;n&lt;/var&gt;-last''', '''contributor&lt;var&gt;n&lt;/var&gt;-first''', or '''contributor1''' through '''contributor&lt;var&gt;n&lt;/var&gt;'''.
** '''contributor-link''': Title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink. Aliases: '''contributor-link1''', '''contributor1-link'''.
**OR: for multiple contributors, use '''contributor-link1''' through '''contributor-link&lt;var&gt;n&lt;/var&gt;'''. Aliases: '''contributor1-link''' through '''contributor&lt;var&gt;n&lt;/var&gt;-link'''.}}{{#if:{{{limited_param_list|}}}||
* &lt;b id="csdoc_translator"&gt;translator-last&lt;/b&gt;: Surname of translator. Do not wikilink—use '''translator-link''' instead. Aliases: '''translator-surname''', '''translator1''', '''translator1-last''', '''translator-last1'''.
**'''translator-first''': Given or first names of translator. Do not wikilink—use '''translator-link''' instead. Aliases: '''translator-given''', '''translator1-first''', '''translator-first1'''.
** OR: for multiple translators, use '''translator-last1''', '''translator-first1''' through '''translator-last&lt;var&gt;n&lt;/var&gt;''', '''translator-first&lt;var&gt;n&lt;/var&gt;''', where ''n'' is any consecutive number for an unlimited number of translators (each '''translator-first&lt;var&gt;n&lt;/var&gt;''' requires a corresponding '''translator-last&lt;var&gt;n&lt;/var&gt;''', but not the other way around). Aliases: '''translator1-last''', '''translator1-first''' through '''translator&lt;var&gt;n&lt;/var&gt;-last''', '''translator&lt;var&gt;n&lt;/var&gt;-first''', or '''translator1''' through '''translator&lt;var&gt;n&lt;/var&gt;'''.
** '''translator-link''': Title of existing Wikipedia article about the translator—not the translator's website; do not wikilink. Aliases: '''translator-link1''', '''translator1-link'''.
**OR: for multiple translators, use '''translator-link1''' through '''translator-link&lt;var&gt;n&lt;/var&gt;'''. Aliases: '''translator1-link''' through '''translator&lt;var&gt;n&lt;/var&gt;-link'''.}}
* &lt;b id="csdoc_collaboration"&gt;collaboration&lt;/b&gt;: Name of a group of authors or collaborators; requires '''author''', '''last''', or '''vauthors''' listing one or more primary authors; follows author name-list; appends "et al." to author name-list.{{#if: {{{others|}}}|
* &lt;b id="csdoc_others"&gt;others&lt;/b&gt;: To record other contributors to the work, including illustrators. For the parameter value, write ''Illustrated by John Smith''.}}
*Note: When using {{sfnote|lc=y}} or {{paren|lc=y}} styles with templates, do not use multiple names in one field, or else the anchor will not match the inline link.</text>
<sha1>l2z5la49w6s29cjz6vwkabagxk9rc4n</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/auto-date-format</title>
<ns>10</ns>
<id>62410228</id>
<revision>
<id>983142587</id>
<parentid>927618898</parentid>
<timestamp>2020-10-12T14:02:35Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>mentioned |orig-date= special case</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="509" xml:space="preserve">:&lt;span id="csdoc_auto-date-format"&gt;Automatic date formatting&lt;/span&gt;: [[Help:Citation Style 1|Citation Style 1]] and [[Help:Citation Style 2|2]] templates, including this template, automatically render dates in all date parameters (such as {{para|date}}, {{para|publication-date}}, {{para|access-date}}, {{para|archive-date}}, etc.) except for {{para|orig-date}} in the style specified by the article's {{tlx|use dmy dates}} or {{tlx|use mdy dates}} template. See those templates' documentation for details.</text>
<sha1>qj9xuiwa9mslwzif3yaxbhtnat64yha</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/coins</title>
<ns>10</ns>
<id>34353312</id>
<revision>
<id>983306127</id>
<parentid>983222766</parentid>
<timestamp>2020-10-13T13:52:20Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>/* COinS metadata is created for these parameters */ expanded</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="3282" xml:space="preserve">This template embeds [[COinS]] metadata in the HTML output, allowing [[reference management software]] to retrieve bibliographic metadata. {{crossref|See [[Wikipedia:COinS]].}} As a general rule, only one data item per parameter. Do not include explanatory or alternate text:
* use {{xt|{{para|date|27 September 2007}}}} not {{!xt|{{para|date|27 September 2007 (print version 25 September)}}}}
Use of templates within the citation template is discouraged because many of these templates will add extraneous HTML or CSS that will be included raw in the metadata. Also, HTML entities, for example &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt;, &lt;code&gt;&amp;amp;ndash;&lt;/code&gt;, etc., should not be used in parameters that contribute to the metadata. Do not include Wiki markup &lt;code&gt;&lt;nowiki&gt;''&lt;/nowiki&gt;&lt;/code&gt; (italic font) or &lt;code&gt;&lt;nowiki&gt;'''&lt;/nowiki&gt;&lt;/code&gt; (bold font) because these markup characters will contaminate the metadata.
==== COinS metadata is created for these parameters ====
Note: This table of metadata is displayed for all Citation Style 1 templates. Not all of these parameters are supported by every CS1 template. Some of these parameters are mutually exclusive, some are aliases of another parameter, and some require other parameters to be present. Please refer to each template's documentation for a full list of supported parameters, their aliases, and their dependencies.
* {{para|periodical}}, {{para|journal}}, {{para|newspaper}}, {{para|magazine}}, {{para|work}}, {{para|website}}, {{para|encyclopedia}}, {{para|encyclopaedia}}, {{para|dictionary}}
* {{para|chapter}}, {{para|script-chapter}}, {{para|contribution}}, {{para|script-contribution}}, {{para|entry}}, {{para|script-entry}}, {{para|article}}, {{para|script-article}}, {{para|section}}, {{para|script-section}}
* {{para|title}}, {{para|script-title}}, {{para|book-title}}, {{para|booktitle}}
* {{para|publication-place}}, {{para|place}}, {{para|location}}, {{para|publicationplace}}
* {{para|date}}, {{para|year}}, {{para|publication-date}}, {{para|publicationdate}}
* {{para|series}}, {{para|version}}
* {{para|volume}}, {{para|issue}}, {{para|number}}
* {{para|page}}, {{para|pages}}, {{para|at}}
* {{para|edition}}
* {{para|publisher}}, {{para|institution}}
* {{para|url}}, {{para|chapter-url}}, {{para|contribution-url}}, {{para|section-url}}, {{para|chapterurl}}, {{para|contributionurl}}, {{para|sectionurl}}
* {{para|author-last}}, {{para|author-last#}}, {{para|author#-last}}, {{para|author-surname}}, {{para|author-surname#}}, {{para|author#-surname}}, {{para|last}}, {{para|last#}}, {{para|surname}}, {{para|surname#}}, {{para|author}}, {{para|author#}}, {{para|subject}}, {{para|subject#}}, {{para|host}}, {{para|host#}}
* {{para|author-first}}, {{para|author-first#}}, {{para|author#-first}}, {{para|author-given}}, {{para|author-given#}}, {{para|author#-given}}, {{para|first}}, {{para|first#}}, {{para|given}}, {{para|given#}}
* {{para|degree}}
* {{para|arxiv}}, {{para|bibcode}}, {{para|biorxiv}}, {{para|citeseerx}}, {{para|doi}}, {{para|eissn}}, {{para|eprint}}, {{para|hdl}}, {{para|isbn}}, {{para|issn}}, {{para|jfm}}, {{para|jstor}}, {{para|lccn}}, {{para|message-id}}, {{para|mr}}, {{para|oclc}}, {{para|osti}}, {{para|pmc}}, {{para|pmid}}, {{para|rfc}}, {{para|ssrn}}, {{para|s2cid}}, {{para|zbl}}</text>
<sha1>7od1bms8b3yd2zuoj1mcsm0j0hzpnd8</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/cs1</title>
<ns>10</ns>
<id>39854131</id>
<revision>
<id>963924757</id>
<parentid>963854169</parentid>
<timestamp>2020-06-22T15:46:22Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>Undid revision 963854169 by [[Special:Contributions/MarioBayo|MarioBayo]] ([[User talk:MarioBayo|talk]]). Cite tweet is a wrapper for Cite web</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2063" xml:space="preserve">{{Infobox
|bodystyle =
|name = Citation Style documentation/cs1
|title = {{cs1}} templates
|titlestyle =
|headerstyle =
|labelstyle = width:50%; font-size:85%
|datastyle = font-size:85%
|label1 = {{tl|Cite arXiv}}
|data1 = [[arXiv]] preprints
|label2 = {{tl|Cite AV media}}
|data2 = audio and visual media
|label3 = {{tl|Cite AV media notes}}
|data3 = AV media liner notes
|label4 = {{tl|Cite bioRxiv}}
|data4 = [[bioRxiv]] preprints
|label5 = {{tl|Cite book}}
|data5 = books and chapters
|label6 = {{tl|Cite citeseerx}}
|data6 = [[CiteSeerX]] papers
|label7 = {{tl|Cite conference}}
|data7 = conference papers
|label8 = {{tl|Cite encyclopedia}}
|data8 = edited collections
|label9 = {{tl|Cite episode}}
|data9 = radio or TV episodes
|label10 = {{tl|Cite interview}}
|data10 = interviews
|label11 = {{tl|Cite journal}}
|data11 = academic journals
|label12 = {{tl|Cite magazine}}
|data12 = magazines, periodicals
|label13 = {{tl|Cite mailing list}}
|data13 = public mailing lists
|label14 = {{tl|Cite map}}
|data14 = maps
|label15 = {{tl|Cite news}}
|data15 = news articles
|label16 = {{tl|Cite newsgroup}}
|data16 = online newsgroups
|label17 = {{tl|Cite podcast}}
|data17 = podcasts
|label18 = {{tl|Cite press release}}
|data18 = press releases
|label19 = {{tl|Cite report}}
|data19 = reports
|label20 = {{tl|Cite serial}}
|data20 = audio or video serials
|label21 = {{tl|Cite sign}}
|data21 = signs, plaques
|label22 = {{tl|Cite speech}}
|data22 = speeches
|label23 = {{tl|Cite ssrn}}
|data23 = [[SSRN]] papers
|label24 = {{tl|Cite techreport}}
|data24 = technical reports
|label25 = {{tl|Cite thesis}}
|data25 = theses
|label26 = {{tl|Cite web}}
|data26 = web sources not covered by the above
|label27 = See also
|data27 =
{{nowrap|''[[:Category:Citation Style 1 specific-source templates|Specific-source templates]]''}}&lt;br/&gt;
''[[:Category:Citation templates that wrap CS1 templates|Wrapper templates]]''
}}&lt;noinclude&gt;{{documentation|content=
==See also==
*{{tl|Citation Style 1}}
}}&lt;/noinclude&gt;</text>
<sha1>freg8gzsn1x9ldflr6k5m25hrw5o7mo</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/date</title>
<ns>10</ns>
<id>34353537</id>
<revision>
<id>989428770</id>
<parentid>986560287</parentid>
<timestamp>2020-11-18T22:53:41Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2996" xml:space="preserve">* &lt;b id="csdoc_date"&gt;date&lt;/b&gt;: Date of referenced source. Can be full date (day, month, and year) or partial date (month and year, season and year, or year). Use same format as other publication dates in the citations.{{r|date|group=date}} Required when '''year''' is used to disambiguate {{tlx|sfn}} links to multiple-work citations by the same author in the same year.{{sup|[[Template:Sfn#More_than_one_work_in_a_year|[more]]]}} Do not wikilink. Displays after the authors and is enclosed in parentheses. If there is no author, then displays after publisher.{{#if:{{{aliases|}}}|&amp;#32;Aliases: {{{aliases}}}}}. {{crossref|For acceptable date formats, see {{section link|Help:Citation Style 1|Dates}}.}}
:For approximate year, precede with "&lt;code&gt;c. &lt;/code&gt;", like this: {{para|date|c. 1900}}.
{{anchor|Undated}}
:For no date, or "undated", use {{para|date|n.d.}}
{{Citation Style documentation/auto-date-format}}
* &lt;b id="csdoc_year"&gt;year&lt;/b&gt;: Year of source being referenced. The usage of this parameter is ''discouraged''; use the more flexible {{para|date}} parameter instead unless {{em|both}} of the following conditions are met:
*# The {{para|date}} format is YYYY-MM-DD.
*# The citation requires a &lt;code&gt;[[Wikipedia:Citation templates and reference anchors|CITEREF]]&lt;/code&gt; [[Template:Sfn#More than one work in a year|disambiguator]].
* &lt;!-- TBD: legacy csdoc_origyear anchor to be removed at a later stage --&gt;{{anchor|csdoc_origyear}}&lt;b id="csdoc_origdate"&gt;orig-date&lt;/b&gt;: Original publication date or year; displays in square brackets after the '''date''' (or '''year'''). For clarity, please supply specifics. For example: {{para|orig-date|First published 1859}} or {{para|orig-date|Composed 1904}}. As {{para|orig-date}} does not support automatic date formatting, use the same date format as defined by {{para|df}} (or, if it exists in the article, by {{para|cs1-dates}} of a {{tlx|use dmy dates}} or {{tlx|use mdy dates}} template), or as used in the {{para|date}} parameter. Alias: '''orig-year''', '''origyear'''
* &lt;b id="csdoc_df"&gt;df&lt;/b&gt;: date format; sets rendered dates to the specified format; does not support date ranges or seasonal dates; overrides the automatic date formatting described above. Accepts one value which may be one of these:
*:&lt;code&gt;dmy&lt;/code&gt; – set publication dates to day month year format; access- and archive-dates are not modified;
*:&lt;code&gt;mdy&lt;/code&gt; – as above for month day, year format
*:&lt;code&gt;ymd&lt;/code&gt; – as above for year initial numeric format YYYY-MM-DD
*:&lt;code&gt;dmy-all&lt;/code&gt; – set publication, access-, and archive-dates to day month year format;
*:&lt;code&gt;mdy-all&lt;/code&gt; – as above for month day, year format
*:&lt;code&gt;ymd-all&lt;/code&gt; – as above for year initial numeric format YYYY-MM-DD
{{reflist|group=date|refs=&lt;ref name=date&gt;Publication dates in references within an article should all have the same format. This may be a different format from that used for archive and access dates. {{crossref|See [[MOS:DATEUNIFY]].}}&lt;/ref&gt;}}</text>
<sha1>n19wj6934udmd4zkwotrzm9c0r7pphr</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/deprecated</title>
<ns>10</ns>
<id>36907242</id>
<revision>
<id>988138120</id>
<parentid>983317507</parentid>
<timestamp>2020-11-11T09:31:08Z</timestamp>
<contributor>
<username>Neils51</username>
<id>16416757</id>
</contributor>
<minor/>
<comment>minor ce</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="712" xml:space="preserve">{{#lst:Help:CS1 errors|deprecated_params_table}}
In addition to the above list(s) of deprecated and removed parameters, all ''non-hyphenated aliases'' of parameters with hyphens are ''discouraged'' to be used in citation templates and are kept only for legacy support. They are subject to becoming deprecated and unsupported in the future as well. To streamline the appearance and improve consistency across the project, these variants should no longer be used when adding parameters to citation templates. Instead, select the hyphenated parameter variants and also consider switching other non-hyphenated parameters, which may be present in a citation already, to their hyphenated equivalents at the same time.</text>
<sha1>nmlb4k2xkcsf6g2pzf9ex1ucge1x91k</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/display</title>
<ns>10</ns>
<id>34353646</id>
<revision>
<id>983197923</id>
<parentid>982791400</parentid>
<timestamp>2020-10-12T20:37:11Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>updated</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="4126" xml:space="preserve">* &lt;span id="csdoc_display"&gt;&lt;/span&gt;&lt;b id="csdoc_mode"&gt;mode&lt;/b&gt;: Sets element separator, default terminal punctuation, and certain capitalization according to the value provided. For {{para|mode|cs1}}, element separator and terminal punctuation is a period (&lt;code&gt;.&lt;/code&gt;); where appropriate, initial letters of certain words are capitalized ('Retrieved...'). For {{para|mode|cs2}}, element separator is a comma (&lt;code&gt;,&lt;/code&gt;); terminal punctuation is omitted; where appropriate, initial letters of certain words are not capitalized ('retrieved...'). To override default terminal punctuation use '''postscript'''.
* &lt;b id="csdoc_author-mask"&gt;author-mask&lt;/b&gt;:
* &lt;b id="csdoc_contributor-mask"&gt;contributor-mask&lt;/b&gt;:
* &lt;b id="csdoc_editor-mask"&gt;editor-mask&lt;/b&gt;:
* &lt;b id="csdoc_interviewer-mask"&gt;interviewer-mask&lt;/b&gt;:
* &lt;b id="csdoc_subject-mask"&gt;subject-mask&lt;/b&gt;:
* &lt;b id="csdoc_translator-mask"&gt;translator-mask&lt;/b&gt;:
*: Replaces the name of the (first) author with [[dash#Em dash|em dashes]] or text. Set '''&amp;lt;{{var|name}}&gt;-mask''' to a numeric value ''n'' to set the dash ''n'' em spaces wide; set '''&amp;lt;{{var|name}}&gt;-mask''' to a text value to display the text without a trailing author separator; for example, "with". The numeric value 0 is a special case to be used in conjunction with '''&amp;lt;{{var|name}}&gt;-link'''&amp;mdash;in this case, the value of '''&amp;lt;{{var|name}}&gt;-link''' will be used as (linked) text. In either case, you must still include the values for all names for metadata purposes. Primarily intended for use with bibliographies or bibliography styles where multiple works by a single author are listed sequentially such as {{sfnote|lc=y}}. Do not use in a list generated by {{tlx|reflist}}, {{tag|references|s}} or similar as there is no control of the order in which references are displayed. Mask parameters can take an enumerator in the name of the parameter (e.g. {{para|author{{var|n}}-mask}}) to apply the mask to a specific {{var|name}}.
* &lt;b id="csdoc_display-authors"&gt;&lt;span id="csdoc_displayauthors"&gt;&lt;/span&gt;display-authors&lt;/b&gt;:
* &lt;b id="csdoc_display-contributors"&gt;&lt;span id="csdoc_displaycontributors"&gt;&lt;/span&gt;display-contributors&lt;/b&gt;:
* &lt;b id="csdoc_display-editors"&gt;&lt;span id="csdoc_displayeditors"&gt;&lt;/span&gt;display-editors&lt;/b&gt;:
* &lt;b id="csdoc_display-interviewers"&gt;&lt;span id="csdoc_displayinterviewers"&gt;&lt;/span&gt;display-interviewers&lt;/b&gt;:
* &lt;b id="csdoc_display-subjects"&gt;&lt;span id="csdoc_displaysubjects"&gt;&lt;/span&gt;display-subjects&lt;/b&gt;:
* &lt;b id="csdoc_display-translators"&gt;&lt;span id="csdoc_displaytranslators"&gt;&lt;/span&gt;display-translators&lt;/b&gt;:
*: Controls the number of author or editor names that are displayed when a citation is published. To change the displayed number of names, set '''display-authors''' and/or '''display-editors''' to the desired number. For example, {{para|display-authors|2}} will display only the first two authors in a citation (and not affect the display of editors). Likewise, {{para|display-editors|2}} will display only the first two editors (and all authors). {{para|display-authors|0}} and {{para|display-editors|0}} are special cases suppressing the display of all authors or editors including the et al. By default, all authors and editors are displayed. {{para|display-authors|etal}} displays all authors in the list followed by et al. Aliases: '''{{xtd|displayauthors}}''' (deprecated).
* &lt;b id="csdoc_lastauthoramp"&gt;{{xtd|last-author-amp}}&lt;/b&gt; (deprecated; use '''name-list-style'''): &lt;s&gt;Switches the separator between the last two names of the author list to space ampersand space (&lt;code&gt; &amp; &lt;/code&gt;) when set to &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;yes&lt;/code&gt;, or &lt;code&gt;true&lt;/code&gt;. Example: {{para|last-author-amp|yes}}&lt;/s&gt;
* &lt;b id="csdoc_postscript"&gt;postscript&lt;/b&gt;: Controls the closing punctuation for a citation; defaults to {{#if: {{{cs2|}}}|none|a period (&lt;code&gt;.&lt;/code&gt;); for no terminating punctuation, specify {{para|postscript|none}} – leaving {{para|postscript}} empty is the same as omitting it, but is ambiguous}}. Additional text or templates beyond the terminating punctuation may generate an error message. {{para|postscript}} is ignored if '''quote''' is defined.</text>
<sha1>1afx28k5i9ca644fep1paspacs9ll1d</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/editor</title>
<ns>10</ns>
<id>34353451</id>
<revision>
<id>985001825</id>
<parentid>985001652</parentid>
<timestamp>2020-10-23T11:04:04Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>+anchor</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="3228" xml:space="preserve">* &lt;b id="csdoc_editors"&gt;editor-last&lt;/b&gt;: surname of editor. Do not wikilink—use '''editor-link''' instead. Where the surname is usually written first—as in Chinese—or for corporate authors, simply use '''editor-last''' to include the same format as the source. Aliases: '''editor-last1''', '''editor1-last''', '''editor-surname''', '''editor-surname1''', '''editor1-surname''', '''editor''', '''editor1'''.
** '''editor''': This parameter is used to hold the complete name of a single editor (first and last), or the name of an editorial committee. This parameter should never hold the names of more than one editor.
** '''editor-first''': given or first names of editor, including title(s); example: ''Firstname Middlename'' or ''Firstname M.'' or ''Dr. Firstname M., Sr.'' Do not wikilink—use '''editor-link''' instead. Aliases: '''editor-first1''', '''editor1-first''', '''editor-given''', '''editor-given1''', '''editor1-given'''.
**OR: for multiple editors, use '''editor-last1''', '''editor-first1''' through '''editor-last&lt;var&gt;n&lt;/var&gt;''', '''editor-first&lt;var&gt;n&lt;/var&gt;''' (Aliases: '''editor&lt;var&gt;n&lt;/var&gt;-last''', '''editor-surname&lt;var&gt;n&lt;/var&gt;''' or '''editor&lt;var&gt;n&lt;/var&gt;-surname'''; '''editor&lt;var&gt;n&lt;/var&gt;-first''', '''editor-given&lt;var&gt;n&lt;/var&gt;''' or '''editor&lt;var&gt;n&lt;/var&gt;-given'''; '''editor&lt;var&gt;n&lt;/var&gt;'''). For an individual editor plus an institutional editor, you can use {{para|editor-first1|...}}{{para|editor-last1|...}} {{para|editor2|...}}.
** '''editor-link''': title of existing Wikipedia article about the editor—not the editor's website; do not wikilink. Aliases: '''editor-link1'''.
**OR: for multiple editors, use '''editor-link1''' through '''editor-link&lt;var&gt;n&lt;/var&gt;''' (alias '''editor&lt;var&gt;n&lt;/var&gt;-link''').
**'''name-list-style''': accepts a limited list of keywords as value; when set to &lt;code&gt;amp&lt;/code&gt;, &lt;code&gt;ampersand&lt;/code&gt;, or &lt;code&gt;&amp;&lt;/code&gt;, inserts an ampersand between the last two names in a name list; when set to &lt;code&gt;and&lt;/code&gt;, inserts the conjunction 'and' between the last two names of a name list; when set to &lt;code&gt;vanc&lt;/code&gt;displays name lists in [[Vancouver style]] when the lists use the &lt;code&gt;last&lt;/code&gt;/&lt;code&gt;first&lt;/code&gt; forms of name parameters. Alias: '''{{xtd|name-list-format}}''' (deprecated)
*{{anchor|para_veditors}}'''veditors''': comma separated list of editor names in [[Vancouver style]]; enclose corporate or institutional names in [[Help:Citation_Style_1#Accept-this-as-written_markup|doubled parentheses]]. End with etal if appropriate:
*:{{para|veditors|Smythe JB, ((Megabux Corp.)), etal}}
** '''editor-link''n''''' and '''editor-mask''n''''' may be used for the individual names in {{para|veditors}}, as described above
*'''{{xtd|editors}}''' (deprecated): &lt;s&gt;free-form list of editor names; use of this parameter is discouraged; not an alias of '''editor-last'''&lt;/s&gt;
*Display:
*:Use '''display-editors''' to control the length of the displayed editor name list and to specify when "et al." is included.
*:If authors: Authors are first, followed by the included work, then "In" and the editors, then the main work.
*:If no authors: Editors appear before the included work; a single editor is followed by "ed."; multiple editors are followed by "eds."</text>
<sha1>izuv5418v9ooc0d79mw4qnucuqazg6c</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/id1</title>
<ns>10</ns>
<id>34353609</id>
<revision>
<id>740881520</id>
<parentid>740881285</parentid>
<timestamp>2016-09-23T22:57:00Z</timestamp>
<contributor>
<username>Headbomb</username>
<id>1461430</id>
</contributor>
<comment>example</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="353" xml:space="preserve">* &lt;b id="csdoc_id"&gt;id&lt;/b&gt;: A [[unique identifier]], used where none of the specialized identifiers are applicable; wikilink or use a template as applicable. For example, {{para|id|NCJ 122967}} will append "NCJ 122967" at the end of the citation. You can use templates such as {{para|id|&lt;nowiki&gt;{{NCJ|122967}}&lt;/nowiki&gt;}} to append {{NCJ|122967}} instead.</text>
<sha1>ei6iyemquu1jx7dirqal70ub1uml8n9</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/id2</title>
<ns>10</ns>
<id>34353614</id>
<revision>
<id>989536367</id>
<parentid>984608180</parentid>
<timestamp>2020-11-19T15:31:50Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="12766" xml:space="preserve">The following identifiers create links and are designed to accept a single value. Using multiple values or other text will break the link and/or invalidate the identifier. In general, the parameters should include only the variable part of the identifier, e.g. &lt;code&gt;|rfc=822&lt;/code&gt; or &lt;code&gt;|pmc=345678&lt;/code&gt;.
* {{#invoke:cs1 documentation support|canonical_name_get|ARXIV|id=csdoc_arxiv}}: [[arXiv]] [https://arxiv.org/help/arxiv_identifier identifier]; for example: &lt;code&gt;|arxiv=hep-th/9205027&lt;/code&gt; (before April 2007) or &lt;code&gt;|arxiv=0706.0001&lt;/code&gt; (April 2007 – December 2014) or &lt;code&gt;|arxiv=1501.00001&lt;/code&gt; (since January 2015). Do not include extraneous file extensions like ".pdf" or ".html". Aliases: {{#invoke:cs1 documentation support|alias_names_get|ARXIV}}.
* {{#invoke:cs1 documentation support|canonical_name_get|ASIN|id=csdoc_asin}}: [[Amazon Standard Identification Number]]; if first character of {{#invoke:cs1 documentation support|canonical_name_get|ASIN}} value is a digit, use {{#invoke:cs1 documentation support|canonical_name_get|ISBN}}. Because this link favours one specific distributor, include it only if standard identifiers are not available. Example &lt;code&gt;|asin=B00005N5PF&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ASIN}}.
** {{#invoke:cs1 documentation support|canonical_name_get|ASINTLD|id=csdoc_asin-tld}}: ASIN top-level domain for Amazon sites other than the US; valid values: &lt;code&gt;au&lt;/code&gt;, &lt;code&gt;br&lt;/code&gt;, &lt;code&gt;ca&lt;/code&gt;, &lt;code&gt;cn&lt;/code&gt;, &lt;code&gt;co.jp&lt;/code&gt;, &lt;code&gt;co.uk&lt;/code&gt;, &lt;code&gt;de&lt;/code&gt;, &lt;code&gt;es&lt;/code&gt;, &lt;code&gt;fr&lt;/code&gt;, &lt;code&gt;it&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ASINTLD}}.
* {{#invoke:cs1 documentation support|canonical_name_get|BIBCODE|id=csdoc_bibcode}}: [[bibcode]]; used by a number of astronomical data systems; for example: &lt;code&gt;1974AJ.....79..819H&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|BIBCODE}}.
* {{#invoke:cs1 documentation support|canonical_name_get|BIORXIV|id=csdoc_biorxiv}}: [[bioRxiv]] id, a 6-digit number at the end of the biorXiv URL (e.g. &lt;code&gt;078733&lt;/code&gt; for http://biorxiv.org/content/early/2016/10/01/078733 or https://dx.doi.org/10.1101/078733). Aliases: {{#invoke:cs1 documentation support|alias_names_get|BIORXIV}}.
* {{#invoke:cs1 documentation support|canonical_name_get|CITESEERX|id=csdoc_citeseerx}}: [[CiteSeerX]] id, a string of digits and dots found in a CiteSeerX URL (e.g. &lt;code&gt;10.1.1.176.341&lt;/code&gt; for http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.176.341). Aliases: {{#invoke:cs1 documentation support|alias_names_get|CITESEERX}}.
* {{#invoke:cs1 documentation support|canonical_name_get|DOI|id=csdoc_doi}}: [[Digital object identifier]]; for example: &lt;code&gt;10.1038/news070508-7&lt;/code&gt;. It is checked to ensure it begins with ({{code|10.}}). Aliases: {{#invoke:cs1 documentation support|alias_names_get|DOI}}.
** Supports accept-this-as-written markup to indicate ''valid'' DOIs using a non-standard format, see [[#ATAWM|below]].
** {{#invoke:cs1 documentation support|canonical_name_get|DoiBroken|id=csdoc_doi_brokendate}}: Date a valid DOI was found to be non-working/inactive at https://dx.doi.org. Use the same format as other dates in the article. Aliases: {{#invoke:cs1 documentation support|alias_names_get|DoiBroken}}.
* {{#invoke:cs1 documentation support|canonical_name_get|EISSN|id=csdoc_eissn}}: [[International Standard Serial Number]] for the electronic media of a serial publication; eight characters may be split into two groups of four using a [[hyphen]], but not an [[dash#En dash|en dash]] or a space; example &lt;code&gt;|eissn=1557-2986&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|EISSN}}.
** Supports accept-this-as-written markup to indicate ''valid'' eISSNs using a non-standard format, see [[#ATAWM|below]].
* {{#invoke:cs1 documentation support|canonical_name_get|HDL|id=csdoc_hdl}}: [[Handle System]] identifier for digital objects and other resources on the Internet; example &lt;code&gt;|hdl=20.1000/100&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|HDL}}.
* {{#invoke:cs1 documentation support|canonical_name_get|ISBN|id=csdoc_isbn}}: [[International Standard Book Number]]; for example: &lt;code&gt;978-0-8126-9593-9&lt;/code&gt;. {{crossref|(See [[Wikipedia:ISBN]] and {{section link|ISBN|Overview}}.)}} Hyphens in the ISBN are optional, but preferred. Use the ISBN actually printed on or in the book. Use the 13-digit ISBN – beginning with 978 or 979 – when it is available. If only a 10-digit ISBN is printed on or in the book, use it. ISBNs can be found on the page with the publisher's information – usually the back of the title page – or beneath the barcode as a number beginning with 978 or 979 (barcodes beginning with any other numbers are not ISBNs). For sources with the older 9-digit SBN system, use {{#invoke:cs1 documentation support|canonical_name_get|SBN}}. Do not convert a 10-digit ISBN to 13-digit by just adding the 978 prefix; the last digit is a calculated check digit and just making changes to the numbers will make the ISBN invalid. This parameter should hold only the ISBN without {{em|any}} additional characters. It is checked for length, invalid characters – anything other than numbers, spaces, and hyphens, with "X" permitted as the last character in a 10-digit ISBN – and the proper check digit. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ISBN}}.
** Supports accept-this-as-written markup to indicate ''valid'' ISBNs using a non-standard format, see [[#ATAWM|below]].
* {{#invoke:cs1 documentation support|canonical_name_get|ISMN|id=csdoc_ismn}}: [[International Standard Music Number]]; for example: &lt;code&gt;979-0-9016791-7-7&lt;/code&gt;. [[Hyphens]] or spaces in the ISMN are optional. Use the ISMN actually printed on or in the work. This parameter should hold only the ISMN without ''any'' additional characters. It is checked for length, invalid characters – anything other than numbers, spaces, and hyphens – and the proper check digit. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ISMN}}.
* {{#invoke:cs1 documentation support|canonical_name_get|ISSN|id=csdoc_issn}}: [[International Standard Serial Number]]; eight characters may be split into two groups of four using a [[hyphen]], but not an [[dash#En dash|en dash]] or a space; example &lt;code&gt;|issn=2049-3630&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ISSN}}.
** Supports accept-this-as-written markup to indicate ''valid'' ISSNs using a non-standard format, see [[#ATAWM|below]].
* {{#invoke:cs1 documentation support|canonical_name_get|JFM|id=csdoc_jfm}}: {{lang|de|[[Jahrbuch über die Fortschritte der Mathematik]]}}; do not include "JFM" in the value; example &lt;code&gt;|jfm=53.0144.01&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|JFM}}.
* {{#invoke:cs1 documentation support|canonical_name_get|JSTOR|id=csdoc_jstor}}: [[JSTOR]] reference number; for example: &lt;code&gt;|jstor=3793107&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|JSTOR}}.
* {{#invoke:cs1 documentation support|canonical_name_get|LCCN|id=csdoc_lccn}}: [[Library of Congress Control Number]]. When present, alphabetic prefix characters are to be lower case and without a space; example &lt;code&gt;|lccn=79-57364&lt;/code&gt; or &lt;code&gt;|lccn=2004042477&lt;/code&gt; or &lt;code&gt;|lccn=e09001178&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|LCCN}}.
* {{#invoke:cs1 documentation support|canonical_name_get|MR|id=csdoc_mr}}: [[Mathematical Reviews]]; example &lt;code&gt;|mr=630583&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|MR}}.
* {{#invoke:cs1 documentation support|canonical_name_get|OCLC|id=csdoc_oclc}}: [[OCLC Number]] for looking up publications in the [[WorldCat]] [[union catalog]]; example &lt;code&gt;|oclc=9355469&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|OCLC}}.
* {{#invoke:cs1 documentation support|canonical_name_get|OL|id=csdoc_ol}}: [[Open Library]] identifier; do not include "OL" in the value; example &lt;code&gt;|ol=7030731M&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|OL}}.
* {{#invoke:cs1 documentation support|canonical_name_get|OSTI|id=csdoc_osti}}: [[Office of Scientific and Technical Information]]; example &lt;code&gt;|osti=4367507&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|OSTI}}.
* {{#invoke:cs1 documentation support|canonical_name_get|PMC|id=csdoc_pmc}}: [[PubMed Central]]; use article number for [[open repository]] full-text of a journal article, e.g. &lt;code&gt;|pmc=345678&lt;/code&gt;. Do not include "PMC" in the value. {{crossref|See also the {{#invoke:cs1 documentation support|canonical_name_get|PMID}} parameter, below; these are two different identifiers.}}. Aliases: {{#invoke:cs1 documentation support|alias_names_get|PMC}}.
** {{#invoke:cs1 documentation support|canonical_name_get|Embargo|id=csdoc_Embargo}}: Date that {{#invoke:cs1 documentation support|canonical_name_get|PMC}} goes live; if this date is in the future, then {{#invoke:cs1 documentation support|canonical_name_get|PMC}} is not linked until that date. Aliases: {{#invoke:cs1 documentation support|alias_names_get|Embargo}}.
* {{#invoke:cs1 documentation support|canonical_name_get|PMID|id=csdoc_pmid}}: [[PubMed]]; use unique identifier; example &lt;code&gt;|pmid=17322060&lt;/code&gt; {{crossref|See also the {{#invoke:cs1 documentation support|canonical_name_get|PMC}} parameter, above; these are two different identifiers.}} Aliases: {{#invoke:cs1 documentation support|alias_names_get|PMID}}.
* {{#invoke:cs1 documentation support|canonical_name_get|RFC|id=csdoc_rfc}}: [[Request for Comments]]; example &lt;code&gt;|rfc=3143&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|RFC}}.
* {{#invoke:cs1 documentation support|canonical_name_get|SBN|id=csdoc_sbn}}: [[Standard Book Number]]; example &lt;code&gt;|sbn=356-02201-3&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|SBN}}.
** Supports accept-this-as-written markup to indicate ''valid'' SBNs using a non-standard format, see [[#ATAWM|below]].
* {{#invoke:cs1 documentation support|canonical_name_get|SSRN|id=csdoc_ssrn}}: [[Social Science Research Network]]; example &lt;code&gt;|ssrn=1900856&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|SSRN}}.
* {{#invoke:cs1 documentation support|canonical_name_get|S2CID|id=csdoc_s2cid}}: [[Semantic Scholar]] corpus ID; example &lt;code&gt;|s2cid=37220927&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|S2CID}}.
* {{#invoke:cs1 documentation support|canonical_name_get|ZBL|id=csdoc_zbl}}: {{lang|de|[[Zentralblatt MATH]]|italic=no}}; example &lt;code&gt;|zbl=0472.53010&lt;/code&gt; For zbMATH search results like &lt;code&gt;JFM 35.0387.02&lt;/code&gt; use &lt;code&gt;|jfm=35.0387.02&lt;/code&gt;. Aliases: {{#invoke:cs1 documentation support|alias_names_get|ZBL}}.
{{anchor|ATAWM}}In very rare cases, ''valid'' identifiers (f.e., as actually printed on publications) do not follow their defined standard format or use non-conforming checksums, which would typically cause an error message to be shown. Do not alter them to match a different checksum. In order to suppress the error message, some identifiers ({{para|doi}}, {{para|eissn}}, {{para|isbn}}, {{para|issn}}, and {{para|sbn}}) support a special [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] which can be applied to disable the error-checking (as {{para|&amp;lt;{{var|param}}&gt;|((&amp;lt;{{var|value}}&gt;))}}). If the problem is down to a mere typographical error in a third-party source, correct the identifier value instead of overriding the error message.
For some identifiers, it is possible to specify the [[Help:Citation_Style_1#Registration_or_subscription_required|access status]] using the corresponding {{para|&amp;lt;{{var|param}}&gt;-access}} parameter.
For {{tl|cite journal}}, some identifiers (specifying free resources) will automatically be linked to the title when {{para|url}} and {{para|title-link}} are not used to specify a different link target. This behaviour can be overridden by one out of a number of special keywords for {{para|title-link}} to manually select a specific source ({{para|title-link|pmc}} or {{para|title-link|doi}}) for auto-linking or to disable the feature ({{para|title-link|none}}).
It is not necessary to specify a URL to a link ''identical'' to a link also produced by an identifier. The {{para|url}} parameter (or {{para|title-link}}) can then be used for providing a direct deep link to the corresponding document or a [[Wikipedia:Citing_sources#Convenience_links|convenience link]] to a resource that would not otherwise be obviously accessible.</text>
<sha1>9g28exqmspnfceiwazlupvyl5w4hiez</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/journal</title>
<ns>10</ns>
<id>34353514</id>
<revision>
<id>982632805</id>
<parentid>915422437</parentid>
<timestamp>2020-10-09T10:40:15Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>ce;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2396" xml:space="preserve">* &lt;b id="csdoc_work"&gt;work&lt;/b&gt; (required by {{tlx|cite journal}} and {{tlx|cite magazine}}): Name of the work containing the source; may be wikilinked if relevant. Displays in italics. Aliases: '''journal''', '''newspaper''', '''magazine''', '''periodical''', '''website'''. Use [[Latin script]]. For languages written in non-Latin based scripts (Arabic, Chinese, Cyrillic, Greek, Hebrew, Indic, Japanese, Korean, etc.) use a standard [[WP:ROMAN|Romanization]] in this field.
**&lt;b id="csdoc_script-work"&gt;script-work&lt;/b&gt;: Work title in its original, non-Latin script; not italicized, follows italicized Romanization defined in '''work'''. Must be prefixed with one of the [[Help:Citation_Style_1#{{pipe}}script-&amp;lt;param&gt;{{=}} language codes|supported language codes]] to help browsers properly display the script. Leave empty for Latin-based scripts (Czech, French, Turkish, Vietnamese, etc.). Aliases: '''script-journal''', '''script-newspaper''', '''script-magazine''', '''script-periodical''', '''script-website'''.
** '''trans-work''': English translation of the work title if the source cited is in a foreign language. Displays in square brackets after '''work''' or '''script-work'''. Aliases: '''trans-journal''', '''trans-newspaper''', '''trans-magazine''', '''trans-periodical''', '''trans-website'''.{{#ifeq:{{{issue|}}}|no||
**:&lt;code&gt;&lt;nowiki&gt;... |work=Zhōngguó piàofáng |script-work=zh:中国票房 |trans-work=China Box Office ...&lt;/nowiki&gt;&lt;/code&gt;
** &lt;b id="csdoc_issue"&gt;issue&lt;/b&gt;: When the publication is one of a series that is published periodically. Alias: '''number'''. When the issue has a special title of its own, this may be given, in italics, along with the issue number, e.g. {{para|issue|2, &lt;nowiki&gt;''Modern Canadian Literature''&lt;/nowiki&gt;}}. {{#if:{{{magazine|}}}|Prefixed with 'No. '|Displayed in parentheses}} following '''volume'''.}}{{#if:{{{department|}}}|
** &lt;b id="csdoc_department"&gt;department&lt;/b&gt;: Title of a regular department, [[column (periodical)|column]], or section within the periodical or journal. Examples include "Communication", "Editorial", "Letter to the Editor", and "Review". Displays after '''title''' and is in plain text.}}
:When set, '''work''' changes the formatting of other parameters in the same citation:
:: '''title''' is not italicized and is enclosed in quotes.
:: '''chapter''' does not display (and will produce an error message).</text>
<sha1>6oqtz7igxm8w4ewjx1pdv9rw52iy5xs</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/language</title>
<ns>10</ns>
<id>34353546</id>
<revision>
<id>973870839</id>
<parentid>951102501</parentid>
<timestamp>2020-08-19T18:31:05Z</timestamp>
<contributor>
<username>SMcCandlish</username>
<id>378390</id>
</contributor>
<comment>clarify</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1128" xml:space="preserve">* {{#invoke:cs1 documentation support|canonical_name_get|Language|id=csdoc_language}}: The language (or a comma-separated list of the languages) in which the source is written, as either the [[ISO 639]] language code (preferred) or the full language name. Examples: {{para|language|ru}};, {{para|lang|fr, pt-br}}; {{Para|lang|Russian}}; {{para|language|French, Portuguese}}. [[Template:Citation Style documentation/language/doc|See the list of supported codes and names]]. Do not use templates or wikilinks. Displays in parentheses with "in" before the language name or names. When the only source language is English, no language is displayed in the citation. The use of languages recognized by the citation module adds the page to the appropriate subcategory of {{cl|CS1 foreign language sources}}. Because cs1|2 templates are often copied from en.wiki to other wikis, use of language codes is preferred so that language names render in the correct language and form: {{#language:es|fr}} at a French-language wiki instead of the English word "Spanish". Aliases: {{#invoke:cs1 documentation support|alias_names_get|Language}}</text>
<sha1>2xtlb5x9jzw3dmpffl2ym94x3tbxdyk</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/lay</title>
<ns>10</ns>
<id>34353638</id>
<revision>
<id>950052501</id>
<parentid>900089866</parentid>
<timestamp>2020-04-10T00:05:27Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>+lay-format; -deprecated aliases; ce;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1021" xml:space="preserve">* &lt;b id="csdoc_lay"&gt;lay-url&lt;/b&gt;: URL link to a non-technical summary or review of the source; the URL title is set to "Lay summary". Alias: '''layurl'''.
** &lt;b id="csdoc_lay_source"&gt;lay-source&lt;/b&gt;: Name of the source of the lay summary. Displays in italics and preceded by a spaced endash. Alias: '''laysource'''.
** &lt;b id="csdoc_lay_date"&gt;lay-date&lt;/b&gt;: Date of the lay summary. Displays in parentheses. Alias: '''laydate'''.
** &lt;b id="csdoc_lay_format"&gt;lay-format&lt;/b&gt;: File format of the work referred to by '''lay-url'''; for example: PDF, DOC, or XLS; displayed in parentheses after lay summary. HTML is implied and should not be specified. File format annotation is automatically rendered when a PDF icon is displayed. Does not change the [[Help:External link icons|external link icon]]. Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add file format information for the visually impaired. {{crossref|See [[Help:Citation_Style_1#Using_{{pipe}}format=|Using {{pipe}}format=]]}}</text>
<sha1>p6nd8safnecdpjyis6e4dhz4v380enb</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/lead</title>
<ns>10</ns>
<id>37758573</id>
<revision>
<id>938003026</id>
<parentid>937988837</parentid>
<timestamp>2020-01-28T15:18:00Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>Undid revision 937988837 by [[Special:Contributions/140.213.59.186|140.213.59.186]] ([[User talk:140.213.59.186|talk]]). vandalism</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="75" xml:space="preserve">This {{cs1}} template is used to create [[WP:CITE|citations]] for {{{2|}}}.</text>
<sha1>rb2qz7f7zsv9heko47icoioecass1w8</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/lua</title>
<ns>10</ns>
<id>38990352</id>
<revision>
<id>675608448</id>
<parentid>675607173</parentid>
<timestamp>2015-08-11T16:35:02Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Mr. Stradivarius</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="61" xml:space="preserve">{{lua|Module:Citation/CS1&lt;noinclude&gt;|nocat=true&lt;/noinclude&gt;}}</text>
<sha1>e2uks1yk196ovcrlzjmlrr3sl7xejwx</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/pages</title>
<ns>10</ns>
<id>34353591</id>
<revision>
<id>984141114</id>
<parentid>983628735</parentid>
<timestamp>2020-10-18T12:45:49Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2578" xml:space="preserve">* &lt;b id="csdoc_page"&gt;page&lt;/b&gt;: The number of a single page in the source that supports the content. Use either {{para|page}} or {{para|pages}}, but not both. Displays preceded by {{#if:{{{journal|}}}|colon ({{code|:}})|{{code|p.}} unless {{para|no-pp|yes}}{{#if: {{{work|}}}|&amp;#32;or '''work''' (or an [[#csdoc_work|alias]]) is defined}}}}. If hyphenated, use {{tl|hyphen}} to indicate this is intentional (e.g. {{para|page|&lt;nowiki&gt;3{{hyphen}}12&lt;/nowiki&gt;}}), otherwise several editors and semi-automated tools will assume this was a misuse of the parameter to indicate a page range and will convert {{para|page|&lt;nowiki&gt;3-12&lt;/nowiki&gt;}} to {{para|pages|&lt;nowiki&gt;3{{ndash}}12&lt;/nowiki&gt;}}. Alias: '''p'''.
*OR: &lt;b id="csdoc_pages"&gt;pages&lt;/b&gt;: A range of pages in the source that supports the content. Use either {{para|page}} or {{para|pages}}, but not both. Separate using an en dash (–); separate non-sequential pages with a comma (,); do not use to indicate the total number of pages in the source. Displays preceded by {{#if:{{{journal|}}}|colon ({{code|:}})|{{code|pp.}} unless {{para|no-pp|yes}}{{#if: {{{work|}}}|&amp;#32;or '''work''' (or an [[#csdoc_work|alias]]) is defined}}}}. &lt;br/&gt;Hyphens are automatically converted to en dashes; if hyphens are appropriate because individual page numbers contain hyphens, for example: pp. 3-1–3-15, use [[Help:Citation_Style_1#Accept-this-as-written_markup|double parentheses]] to tell the template to display the value of {{para|pages}} without processing it, and use {{tl|hyphen}} to indicate to editors that a hyphen is really intended: {{para|pages|&lt;nowiki&gt;((3{{hyphen}}1{{ndash}}3{{hyphen}}15))&lt;/nowiki&gt;}}. Alternatively, use {{para|at}}, like this: {{para|at|pp. 3-1&amp;amp;ndash;3-15}}. Alias: '''pp'''.{{#if:{{{journal|}}}||
**&lt;b id="csdoc_nopp"&gt;no-pp&lt;/b&gt;: Set to &lt;var&gt;yes&lt;/var&gt;, &lt;var&gt;y&lt;/var&gt;, or &lt;var&gt;true&lt;/var&gt; to suppress the {{code|p.}} or {{code|pp.}} notations where this is inappropriate; for example, where {{para|page|Front cover}} or {{para|pages|[[passim]]}}.}}
*OR: &lt;b id="csdoc_at"&gt;at&lt;/b&gt;: For sources where a page number is inappropriate or insufficient. Overridden by {{para|page}} or {{para|pages}}. Use only one of {{para|page}}, {{para|pages}}, or {{para|at}}.&lt;br /&gt;Examples: page (p.) or pages (pp.); section (sec.), column (col.), paragraph (para.); track; hours, minutes and seconds; act, scene, canto, book, part, folio, stanza, back cover, liner notes, indicia, colophon, dust jacket, verse.
* For {{para|quote-page}} and {{para|quote-pages}} used in conjunction with {{para|quote}}, see [[#csdoc_quote|here]].</text>
<sha1>0x6nuyg9gh346uk059oplq71n9njg3t</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/publisher</title>
<ns>10</ns>
<id>34353539</id>
<revision>
<id>929101458</id>
<parentid>890647560</parentid>
<timestamp>2019-12-03T17:49:00Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>fix byline -&gt; dateline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2745" xml:space="preserve">* &lt;b id="csdoc_publisher"&gt;publisher&lt;/b&gt;: Name of publisher; may be wikilinked if relevant. The [[publisher]] is the {{em|company}} that publishes the work being cited. Do {{em|not}} use the '''publisher''' parameter for the name of a work (e.g. a website, book, encyclopedia, newspaper, magazine, journal, etc.). Corporate designations such as "Ltd", "Inc.", or "GmbH" are not usually included. Not normally used for periodicals. Omit where the publisher's name is substantially the same as the name of the work (for example, The New York Times Co. publishes ''The New York Times'' newspaper, so there is no reason to name the publisher). Displays after '''title'''.
* &lt;span id="csdoc_location"&gt;&lt;/span&gt;&lt;b id="csdoc_place"&gt;place&lt;/b&gt;: For news stories with a [[dateline]], that is, the location where the story was written. In earlier versions of the template this was the publication place, and for compatibility, will be treated as the publication place if the publication-place parameter is absent; see that parameter for further information. Alias: '''location'''
* &lt;b id="csdoc_publication-place"&gt;publication-place&lt;/b&gt;: Geographical place of publication; generally not wikilinked; omit when the name of the work includes the publication place; examples: ''The Boston Globe'', ''The Times of India''. Displays after the title. If only one of '''publication-place''', '''place''', or '''location''' is defined, it will be treated as the publication place and will show after the title; if '''publication-place''' and '''place''' or '''location''' are defined, then '''place''' or '''location''' is shown before the title prefixed with "written at" and '''publication-place''' is shown after the title.
* &lt;b id="csdoc_publication-date"&gt;publication-date&lt;/b&gt;: Date of publication when different from the date the work was written. Displays only if '''year''' or '''date''' are defined and only if different, else '''publication-date''' is used and displayed as '''date'''. Use the same format as other dates in the article; do not wikilink. Follows '''publisher'''; if '''work''' is not defined, then '''publication-date''' is preceded by "published" and enclosed in parenthesis.
* &lt;b id="csdoc_via"&gt;via&lt;/b&gt;: Name of the content deliverer (if ''different'' from '''publisher'''). '''via''' is not a replacement for '''publisher''', but provides additional detail. It may be used when the content deliverer presents the source in a format other than the original (e.g. [[NewsBank]]), when the URL provided does not make clear the identity of the deliverer, where no URL or DOI is available (EBSCO), or if the deliverer requests attribution. {{crossref|See the [[#csdoc_access_level|'''access level''']] parameters to display access restrictions.}}</text>
<sha1>9qkr13aamr0bwsv04g4rpu350zpdrhw</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/quote</title>
<ns>10</ns>
<id>34353635</id>
<revision>
<id>985002958</id>
<parentid>984141193</parentid>
<timestamp>2020-10-23T11:17:14Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2263" xml:space="preserve">*&lt;b id="csdoc_quote"&gt;quote&lt;/b&gt;: Relevant text quoted from the source. Displays enclosed in quotes.{{#if: {{{cs2|}}}||&amp;#32;When supplied, the citation terminator (a period by default) is suppressed, so the quote must include terminating punctuation.}}
:* '''script-quote''': Original quotation for languages that do not use a Latin-based script (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, etc.); not italicized, follows italicized Romanization defined in '''quote'''. Alias: none. Must be prefixed with one of the [[Help:Citation_Style_1#{{pipe}}script-&amp;lt;param&gt;{{=}} language codes|supported language codes]] to help browsers properly display the script:
:::&lt;code&gt;&lt;nowiki&gt;... |quote=Tōkyō tawā |script-quote=ja:東京タワー |trans-quote=Tokyo Tower ...&lt;/nowiki&gt;&lt;/code&gt;
:* '''trans-quote''': English translation of the quotation if the source quoted is in a foreign language. Displays in square brackets. Alias: none.
* &lt;b&gt;quote-page&lt;/b&gt;: The number of a single page quoted in {{para|quote}}. Use either {{para|quote-page}} or {{para|quote-pages}}, but not both. Should be a subset of the page(s) specified in {{para|page}} or {{para|pages}}. Displays preceded by {{code|p.}} unless {{para|no-pp|yes}}. If hyphenated, use {{tl|hyphen}} to indicate this is intentional (e.g. {{para|quote-page|&lt;nowiki&gt;3{{hyphen}}12&lt;/nowiki&gt;}}). Alias: none.
* OR: &lt;b&gt;quote-pages&lt;/b&gt;: A list or range of pages quoted in {{para|quote}}. Use either {{para|quote-page}} or {{para|quote-pages}}, but not both. Should be a subset of the pages specified in {{para|pages}}. Separate using an en dash (–); separate non-sequential pages with a comma (,). Displays preceded by colon {{code|pp.}} unless {{para|no-pp|yes}} is defined. Hyphens are automatically converted to en dashes&lt;!-- To be added at a later stage: ; if hyphens are appropriate because individual page numbers contain hyphens, for example: pp. 3-1–3-15, use [[Help:Citation_Style_1#Accept-this-as-written_markup|double parentheses]] to tell the template to display the value of {{para|quote-pages}} without processing it, and use {{tl|hyphen}} to indicate to editors that a hyphen is really intended: {{para|quote-pages|&lt;nowiki&gt;((3{{hyphen}}1{{ndash}}3{{hyphen}}15))&lt;/nowiki&gt;}} --&gt;. Alias: none.</text>
<sha1>68s2jv9kftm19wjdxun9n9768vv4guh</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/ref</title>
<ns>10</ns>
<id>34353641</id>
<revision>
<id>988667012</id>
<parentid>952315699</parentid>
<timestamp>2020-11-14T15:18:28Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>+anchor;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1177" xml:space="preserve">* {{#invoke:cs1 documentation support|canonical_name_get|Ref|id=csdoc_ref}}: the citation's HTML anchor identifier, when different from its default. When set, {{para|ref|{{var|ID}}}} generates an anchor with the given &lt;code&gt;{{var|ID}}&lt;/code&gt; (the &lt;code&gt;id=&lt;/code&gt; attribute in the citation's {{tag|cite|params=id="{{var|ID}}"|o}} HTML tag). Setting {{para|ref|{{var|ID}}}} identifies the template as a target and allows [[Wikipedia:Citing sources/Further considerations#Wikilinks to full references|wikilinking to full references]], especially useful with short-form citations like [[Wikipedia:Citing sources#Shortened footnotes|shortened notes]] and [[Wikipedia:Parenthetical referencing|parenthetical referencing]]. The default anchor ID is suitable for use with {{tl|sfn}} and {{tl|harv}} templates. Since April 2020, the parameter / keyword pair {{para|ref|harv}} has no special meaning; {{para|ref|harv}} may be removed from existing cs1|2 templates. To inhibit anchor ID creation, set {{para|ref|none}}. Aliases: {{#invoke:cs1 documentation support|alias_names_get|Ref}}. {{crossref|See {{section link|Template:Citation/doc|Anchors for Harvard referencing templates}}.}}</text>
<sha1>aegwozt8zcypbd2bnzi441zs8hs7om7</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/registration</title>
<ns>10</ns>
<id>40705162</id>
<revision>
<id>988064285</id>
<parentid>983676819</parentid>
<timestamp>2020-11-10T20:51:15Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>fixed!</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="7371" xml:space="preserve">&lt;span id="csdoc_access_level"&gt;&lt;/span&gt;
Citations of online sources that require registration or a subscription are acceptable in Wikipedia as documented in [[WP:PAYWALL|Verifiability § Access to sources]]&lt;!-- {{Section link|Wikipedia:Verifiability|Access to sources}} --&gt;. As a courtesy to readers and other editors, editors should&lt;!-- can --&gt; signal the access restrictions of the external links included in a citation.
&lt;!-- There are four access levels split between the url-holding parameters and the identifier parameters. --&gt;Four access levels can be used:
*[[#Access indicator for named identifiers|access indicator for named identifiers]]:
** [[File:Lock-green.svg|9px|link=|alt=Freely accessible|Freely accessible]] &lt;code&gt;free&lt;/code&gt;: the source is free to read for anyone
*[[#Access indicators for url-holding parameters|access indicators for url-holding parameters]]:
** [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free registration required|Free registration required]] &lt;code&gt;registration&lt;/code&gt;: a free registration is required to access the source
** [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free access subject to limited trial, subscription normally required|Free access subject to limited trial, subscription normally required]] &lt;code&gt;limited&lt;/code&gt;: there are other constraints (such as a cap on daily views) to freely access this source
** [[File:Lock-red-alt-2.svg|9px|link=|alt=Paid subscription required|Paid subscription required]] &lt;code&gt;subscription&lt;/code&gt;: the source is only accessible via a paid subscription ("[[paywall]]")
As there are often multiple external links with different access levels in the same citation, these values are attributed to a particular external link.
=====Access indicators for url-holding parameters=====
&lt;!-- ====Access level of url-holding parameters==== --&gt;
&lt;!--
There are several url-holding parameters. Each may be marked with an access icon. Links inserted with any of the url-holding parameters are expected to be free-to-read by default, so {{para|url-access|free}} is not valid. For a URL that is not free-to-read, editors may use the matching access-icon parameter with the appropriate keyword.
{| class=wikitable
|+url-holding parameter access icons
! url parameter !! access icon parameter !! supported keywords
|-
| {{para|url}} || {{para|url-access}} ||rowspan=7|{{plainlist|
* &lt;code&gt;subscription&lt;/code&gt; – [[File:Lock-red-alt-2.svg|9px|link=|alt=Paid subscription required|Paid subscription required]] – the source is only accessible via a paid subscription
* &lt;code&gt;registration&lt;/code&gt; – [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free registration required|Free registration required]] – a free registration is required to access the source
* &lt;code&gt;limited&lt;/code&gt; – [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free access subject to limited trial, subscription normally required|Free access subject to limited trial, subscription normally required]] – there are other constraints (such as a cap on daily views) to freely access this source}}
|-
| {{para|article-url}} || {{para|article-url-access}}
|-
| {{para|chapter-url}} || {{para|section-url-access}}
|-
| {{para|contribution-url}} || {{para|section-url-access}}
|-
| {{para|entry-url}} || {{para|section-url-access}}
|-
| {{para|map-url}} || {{para|section-url-access}}
|-
| {{para|section-url}} || {{para|section-url-access}}
|}
--&gt;
Sources linked by {{para|url}}, {{para|article-url}}, {{para|chapter-url}}, {{para|contribution-url}}, {{para|entry-url}}, {{para|map-url}}, and {{para|section-url}} are presumed to be free-to-read.&lt;ref name=NotRef&gt;{{NotRef}}&lt;/ref&gt; When they are not free-to-read, editors should mark those sources with the matching access-indicator parameter so that an appropriate icon is included in the rendered citation. Because the sources linked by these url-holding parameters are presumed to be free-to-read, they may not be marked as &lt;code&gt;free&lt;/code&gt;.
{| class="wikitable"
|+ URL-holding and access-indicator parameters
|-
! URL !! Access !! Allowed keywords
|-
| {{para|url}} || {{para|url-access}} || rowspan="7" | &lt;code&gt;registration&lt;/code&gt; [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free registration required|Free registration required]]&lt;br /&gt;&lt;code&gt;limited&lt;/code&gt; [[File:Lock-gray-alt-2.svg|9px|link=|alt=Free access subject to limited trial, subscription normally required|Free access subject to limited trial, subscription normally required]]&lt;br /&gt;&lt;code&gt;subscription&lt;/code&gt; [[File:Lock-red-alt-2.svg|9px|link=|alt=Paid subscription required|Paid subscription required]]
|-
| {{para|article-url}} || {{para|article-url-access}}
|-
| {{para|chapter-url}} || {{para|chapter-url-access}}
|-
| {{para|contribution-url}} || {{para|contribution-url-access}}
|-
| {{para|entry-url}} || {{para|entry-url-access}}
|-
| {{para|map-url}} || {{para|map-url-access}}
|-
| {{para|section-url}} || {{para|section-url-access}}
|}
=====Access indicator for named identifiers=====
&lt;!-- ====Access level of identifiers==== --&gt;
&lt;!--
Links inserted by identifiers such as {{para|doi}} are not expected to offer a free full text by default. If they do, editors can use {{para|doi-access|free}} (in the case of {{para|doi}}) to indicate the relevant access level.
Some identifiers always link to free full texts. In this case, the access level is automatically indicated by the template. This is the case for {{para|arxiv}}, {{para|biorxiv}}, {{para|citeseerx}}, {{para|pmc}}, {{para|rfc}} and {{para|ssrn}}.
{| class=wikitable
|+identifier parameter access icons
! url parameter !! access icon parameter !! supported keywords
|-
| {{para|bibcode}} || {{para|bibcode-access}} ||rowspan=6|&lt;code&gt;free&lt;/code&gt; – [[File:Lock-green.svg|9px|link=|alt=Freely accessible|Freely accessible]] – the source is free to read for anyone (not supported by {{para|url-access}})
|-
| {{para|doi}} || {{para|doi-access}}
|-
| {{para|hdl}} || {{para|hdl-access}}
|-
| {{para|jstor}} || {{para|jstor-access}}
|-
| {{para|ol}} || {{para|ol-access}}
|-
| {{para|osti}} || {{para|osti-access}}
|}
--&gt;
Links inserted by named identifiers are presumed to lie behind a paywall or registration barrier – exceptions listed below. When they are free-to-read, editors should mark those sources with the matching access-indicator parameter so that an appropriate icon is included in the rendered citation. Because the sources linked by these named-identifier parameters are not presumed to be free-to-read, they may not be marked as &lt;code&gt;limited&lt;/code&gt;, &lt;code&gt;registration&lt;/code&gt;, or &lt;code&gt;subscription&lt;/code&gt;.
{| class="wikitable"
|+ Named-identifier and access-indicator parameters
|-
! Identifier!! Access !! Allowed keywords
|-
| {{para|bibcode}} || {{para|bibcode-access}} || rowspan="7" | &lt;code&gt;free&lt;/code&gt; [[File:Lock-green.svg|9px|link=|alt=Freely accessible|Freely accessible]]
|-
| {{para|doi}} || {{para|doi-access}}
|-
| {{para|hdl}} || {{para|hdl-access}}
|-
| {{para|jstor}} || {{para|jstor-access}}
|-
| {{para|ol}} || {{para|ol-access}}
|-
| {{para|osti}} || {{para|osti-access}}
|-
| {{para|s2cid}} || {{para|s2cid-access}}
|}
Some named-identifiers are always free-to-read. For those named-identifiers there are no access-indicator parameters, the access level is automatically indicated by the template. These named identifiers are:
*{{para|arxiv}}
*{{para|biorxiv}}
*{{para|citeseerx}}
*{{para|pmc}}
*{{para|rfc}}
*{{para|ssrn}}</text>
<sha1>ekqsocddzihz3ubbgls6izhhdseguj9</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/required</title>
<ns>10</ns>
<id>34903095</id>
<revision>
<id>983198459</id>
<parentid>927176215</parentid>
<timestamp>2020-10-12T20:40:58Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>updated</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="302" xml:space="preserve">:This parameter is required and will generate an error if not defined. On errors, main, help and template pages are placed into [[:Category:Articles with incorrect citation syntax]]. Set {{para|no-tracking|true}} to disable categorization; mainly used for documentation where the error is demonstrated.</text>
<sha1>cr36z1f7cpcicrx103dakg0re493r01</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/sep period</title>
<ns>10</ns>
<id>34353315</id>
<revision>
<id>675608353</id>
<parentid>675607303</parentid>
<timestamp>2015-08-11T16:34:32Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Jonesey95</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="60" xml:space="preserve">By default, sets of fields are terminated with a period (.).</text>
<sha1>3cwdbwgja9vozlyigmj5ov41j5smhso</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/series</title>
<ns>10</ns>
<id>34353523</id>
<revision>
<id>675608351</id>
<parentid>675607327</parentid>
<timestamp>2015-08-11T16:34:31Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Gadget850</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="145" xml:space="preserve">* '''series''' or '''version''': When the source is part of a series, such as a book series or a journal where the issue numbering has restarted.</text>
<sha1>bpzj3co2ltc6g5e3ifqbyo1s786br7m</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/syntax</title>
<ns>10</ns>
<id>34353306</id>
<revision>
<id>987497548</id>
<parentid>983136662</parentid>
<timestamp>2020-11-07T12:46:53Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>ce;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="859" xml:space="preserve">Nested parameters rely on their parent parameters:
* ''parent''
* OR: ''parent2''—may be used instead of ''parent''
** ''child''—may be used with ''parent'' (and is ignored if ''parent'' is not used)
** OR: ''child2''—may be used instead of ''child'' (and is ignored if ''parent2'' is not used)
: Where aliases are listed, only one of the parameters may be defined; if multiple aliased parameters are defined, then only one will show.
If non-hyphenated aliases of parameters with hyphens are defined, they exist only for legacy support (and are subject to become unsupported in the future); therefore, to streamline the appearance and improve consistency, select the hyphenated variant when adding parameters to a citation template and also consider switching already present non-hyphenated parameters to their hyphenated equivalents at the same time.</text>
<sha1>3fwpyi18m03i64sr1qkflqc848o2xpb</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/type</title>
<ns>10</ns>
<id>34353502</id>
<revision>
<id>989428979</id>
<parentid>859532106</parentid>
<timestamp>2020-11-18T22:55:02Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>mentioned keyword "none"</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="716" xml:space="preserve">* '''type''': Provides additional information about the media type of the source. May alternatively be used to identify the type of manuscript linked to in the title, if this is not the final version of a manuscript (e.g. if a preprint of a manuscript is freely available, but the version of record is behind a paywall). Format in sentence case. Displays in parentheses following the title. The reserved keyword &lt;code&gt;none&lt;/code&gt; can be used to disable the display of a type. {{#if:{{{type_default|}}}|Defaults to {{{type_default}}}.|Examples: {{xt|Thesis}}, {{xt|Booklet}}, {{xt|Accepted manuscript}}, {{xt|CD liner}}, {{xt|Press release}}.}} Alias: '''medium'''{{#ifeq:{{{type_default|}}}|Thesis|, '''degree'''}}.</text>
<sha1>6ypnmmsa34o7zraeughv0f4pwx3ri08</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/url</title>
<ns>10</ns>
<id>34353621</id>
<revision>
<id>983199701</id>
<parentid>965025259</parentid>
<timestamp>2020-10-12T20:49:22Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>removed no-tracking which does not apply here</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="5187" xml:space="preserve">* &lt;b id="csdoc_url"&gt;url&lt;/b&gt;: URL of an online location where the {{#if:{{{media|}}}|media|text of the publication}} named by '''title''' can be found. Cannot be used if '''title''' is wikilinked. If applicable, the link may point to the specific page(s) referenced. Remove tracking parameters from URLs, e.g. &lt;code&gt;#ixzz2rBr3aO94&lt;/code&gt; or {{nowrap|&lt;code&gt;&lt;nowiki&gt;?utm_source=google&amp;utm_medium=...&amp;utm_term=...&amp;utm_campaign=...&lt;/nowiki&gt;&lt;/code&gt;}}. {{crossref|For linking to pages in PDF files or in Google Books, see [[WP:PAGELINKS]].}} Do not link to any commercial booksellers, such as [[Amazon (company)|Amazon]]; use {{para|isbn}} or {{para|oclc}} to provide neutral search links for books. Invalid URLs, including those containing spaces, will result in an error message.
** &lt;b id="csdoc_accessdate"&gt;access-date&lt;/b&gt;: Full date when the content pointed to by '''url''' was last verified to support the text in the article; do not wikilink; requires '''url'''; use the same format as other access and archive dates in the citations.{{r|date|group=date}} ''Not required for linked documents that do not change.'' For example, '''access-date''' is required for online sources, such as personal websites, that do not have a publication date; see [[WP:CITEWEB]]. Access dates are not required for links to published research papers, published books, or news articles with publication dates. Note that '''access-date''' is the date that the URL was found to be working and to support the text being cited. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Can be [[Help:Citation Style 1/accessdate|hidden or styled]] by registered editors. Alias: '''accessdate'''.
** &lt;b id="csdoc_archiveurl"&gt;archive-url&lt;/b&gt;: The URL of an [[Web archiving|archived]] snapshot of a web page. Typically used to refer to services such as [[Internet Archive]] {{crossref|(see [[Wikipedia:Using the Wayback Machine]])}}, [[WebCite]] {{crossref|(see [[Wikipedia:Using WebCite]])}} and [[archive.is]] {{crossref|(see [[Wikipedia:Using archive.is]])}}; requires '''archive-date''' and '''url'''. By default (overridden by {{para|url-status|live}}) the archived link is displayed first, with the original link at the end. Alias: '''archiveurl'''.
*** &lt;b id="csdoc_archivedate"&gt;archive-date&lt;/b&gt;: Archive-service snapshot-date; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.{{r|date|group=date}} Do not wikilink; templated dates are discouraged. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Alias: '''archivedate'''.
*** &lt;b id="csdoc_urlstatus"&gt;url-status&lt;/b&gt;: this optional parameter is ignored if '''archive-url''' is not set. If omitted, or with null value, the default value is {{para|url-status|dead}}. When the URL is still live, but pre-emptively archived, then set {{para|url-status|live}}; this changes the display order, with the title retaining the original link and the archive linked at the end. When the original URL has been usurped for the purposes of spam, advertising, or is otherwise unsuitable, setting {{para|url-status|unfit}} or {{para|url-status|usurped}} suppresses display of the original URL (but {{para|url}} and {{para|archive-url}} are still required).
*** &lt;b id="csdoc_archive_format"&gt;archive-format&lt;/b&gt;: File format of the work referred to by '''archive-url'''; for example: PDF, DOC, or XLS; displayed in parentheses after the archive link. HTML is implied and should not be specified. File format annotation is automatically rendered when a PDF icon is displayed. Does not change the [[Help:External link icons|external link icon]]. Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add file format information for the visually impaired. {{crossref|See [[Help:Citation_Style_1#Using_{{pipe}}format=|Using {{pipe}}format=]]}}
** &lt;b id="csdoc_url_access"&gt;url-access&lt;/b&gt;: {{crossref|See [[#Access indicators for url-holding parameters|Access indicators for url-holding parameters]]}}
* &lt;b id="csdoc_format"&gt;format&lt;/b&gt;: File format of the work referred to by '''url'''; for example: PDF, DOC, or XLS; displayed in parentheses after '''title'''. (For media format, use '''type'''.) HTML is implied and should not be specified. File format annotation is automatically rendered when a PDF icon is displayed. Does not change the [[Help:External link icons|external link icon]]. Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add file format information for the visually impaired. {{crossref|See [[Help:Citation_Style_1#Using_{{pipe}}format=|Using {{pipe}}format=]]}}
{{MediaWiki URL rules}}
{{reflist|group=date|refs=&lt;ref name=date&gt;Access-date and archive-date in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. {{crossref|See [[MOS:DATEUNIFY]].}}&lt;/ref&gt;}}</text>
<sha1>g4y1uomwko770g7qc0iwcfy5hs7c4vj</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage</title>
<ns>10</ns>
<id>37748773</id>
<revision>
<id>950176526</id>
<parentid>675608329</parentid>
<timestamp>2020-04-10T16:39:24Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>Update this overly prescriptive language. We have not operated in this prescriptive way for many years, if ever.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="456" xml:space="preserve">Copy a blank version to use. Almost all parameter names are supported only in lower case (some initialisms, such as {{para|isbn}} have upper case aliases like {{para|ISBN}}, which are acceptable for use). Use the "|" (pipe) character between each parameter. Unused parameters may be deleted to avoid clutter in the edit window. Some samples on this documentation page may include the current date. If the date is not current, then {{purge|purge}} the page.</text>
<sha1>9fvjrz8wj9l1qa2i19k5lmo7g3h27a6</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage common</title>
<ns>10</ns>
<id>37768101</id>
<revision>
<id>675608326</id>
<parentid>675607487</parentid>
<timestamp>2015-08-11T16:34:26Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Gadget850</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="127" xml:space="preserve">{| class="wikitable" style="width: 100%"
|+ Most commonly used parameters in horizontal format
|- style="vertical-align:top;"
|</text>
<sha1>g59aluhs3riv40zrn04wrzig2rndz5x</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage full</title>
<ns>10</ns>
<id>37768090</id>
<revision>
<id>675608323</id>
<parentid>675607511</parentid>
<timestamp>2015-08-11T16:34:25Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Gadget850</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="116" xml:space="preserve">{| class="wikitable" style="width: 100%"
|+ Full parameter set in horizontal format
|- style="vertical-align:top;"
|</text>
<sha1>ibig78ze0cv5pm1gtveggipwk9so1ba</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage vertical</title>
<ns>10</ns>
<id>37768122</id>
<revision>
<id>675608319</id>
<parentid>675607537</parentid>
<timestamp>2015-08-11T16:34:25Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Gadget850</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="157" xml:space="preserve">{| class="wikitable"
|+ Full parameter set in vertical format
! Vertical list !! Prerequisites !! Brief instructions / notes
|- style="vertical-align:top;"
|</text>
<sha1>7ya57kwky8ltmh98iar22xeljvztwew</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage vertical common</title>
<ns>10</ns>
<id>37792221</id>
<revision>
<id>736859411</id>
<parentid>675608315</parentid>
<timestamp>2016-08-30T09:09:36Z</timestamp>
<contributor>
<username>Cabayi</username>
<id>6561336</id>
</contributor>
<comment>/* top */[Wikipedia:Templates for discussion/Log/2016 August 18#Template:No documentation]], replaced: {{NODOC → {{Improve documentation using [[Project:AWB|AWB]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="195" xml:space="preserve">{| class="wikitable" style="width: 30em"
|+ Most commonly used parameters in vertical format
|- style="vertical-align:top;"
|&lt;noinclude&gt;
|}
{{doc|content={{Improve documentation}}}}
&lt;/noinclude&gt;</text>
<sha1>ejwktkxohds52qb98qyeawvg453d0ek</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage vertical end</title>
<ns>10</ns>
<id>37770922</id>
<revision>
<id>675608312</id>
<parentid>675607590</parentid>
<timestamp>2015-08-11T16:34:23Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Jonesey95</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="113" xml:space="preserve">|}
* If a field name is listed in the '''Prerequisites''' column, it is a prerequisite for the field to the left.</text>
<sha1>iba42liqck57p33wcbds1eq8kf39tbj</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/usage vertical mid</title>
<ns>10</ns>
<id>37768146</id>
<revision>
<id>675608303</id>
<parentid>675607611</parentid>
<timestamp>2015-08-11T16:34:21Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Gadget850</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="31" xml:space="preserve">| style="vertical-align:top;" |</text>
<sha1>dngspsil9irpijhjhntztbj8cw6cmxw</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/web</title>
<ns>10</ns>
<id>34753477</id>
<revision>
<id>982632662</id>
<parentid>982630151</parentid>
<timestamp>2020-10-09T10:38:41Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>ce;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1822" xml:space="preserve">{{Crossreference|(See also [[Help:Citation Style 1#Titles and chapters|Help:Citation Style 1 § Titles and chapters]].)}}
*&lt;b id="csdoc_title"&gt;title&lt;/b&gt;: Title of source page on website. Displays in quotes. If '''script-title''' is defined, '''title''' holds a [[WP:ROMAN|Romanization]] of title in '''script-title'''.
** '''script-title''': Original title for languages that do not use a Latin-based script (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, etc); follows Romanization defined in '''title'''. Must be prefixed with one of the [[Help:Citation_Style_1#{{pipe}}script-&amp;lt;param&gt;{{=}} language codes|supported language codes]] to help browsers properly display the script:
**:&lt;code&gt;&lt;nowiki&gt;... |title=Tōkyō tawā |script-title=ja:東京タワー |trans-title=Tokyo Tower ...&lt;/nowiki&gt;&lt;/code&gt;
**&lt;b id="csdoc_trans_title"&gt;trans-title&lt;/b&gt;: English translation of the title if the source cited is in a foreign language. Displays in square brackets after '''title'''; '''trans-title''' is included in the link. Use of the '''language''' parameter is recommended.
:Titles containing certain characters will display and link incorrectly unless those characters are encoded.
{| class="wikitable" style="margin-left: 5em"
! newline !! [ !! ] !! &amp;#124;
|-
| space || style="text-align: center;" | &amp;amp;#91; || style="text-align: center;" | &amp;amp;#93; || style="text-align: center;" | &amp;amp;#124;
|-
|
| colspan="2" style="text-align: center;" | [[Template:Bracket|&lt;nowiki&gt;{{bracket|text}}&lt;/nowiki&gt;]] || [[Template:Pipe|&lt;nowiki&gt;{{pipe}}&lt;/nowiki&gt;]] – {{crossref|see also {{section link|Help:Table|Rendering pipe itself}}}}
|}
{{Citation Style documentation/required}}
*&lt;span id="csdoc_work"&gt;&lt;/span&gt;&lt;b id="csdoc_website"&gt;website&lt;/b&gt;: Title of website; may be wikilinked. Displays in italics. Aliases: '''work'''</text>
<sha1>6wxcwhi6hs8hydersc9rlziivwyf0sz</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/whats new</title>
<ns>10</ns>
<id>61727825</id>
<revision>
<id>987593291</id>
<parentid>983309805</parentid>
<timestamp>2020-11-08T01:42:45Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="2277" xml:space="preserve">{|class="wikitable"
|+ What's new or changed recently
! Parameter !! Description !! Date
|-
| {{para|author-given}}
| added aliases (including enumerated forms) for {{para|author-first}}
| October 2020
|-
| {{para|author-surname}}
| added aliases (including enumerated forms) for {{para|author-last}}
| October 2020
|-
| {{para|display-subjects}}
| added alias for {{para|display-authors}} for usage with {{para|subject}}
| October 2020
|-
| {{para|interviewer-given}}
| added aliases (including enumerated forms) for {{para|interviewer-first}}
| October 2020
|-
| {{para|interviewer-surname}}
| added aliases (including enumerated forms) for {{para|interviewer-last}}
| October 2020
|-
| {{para|orig-date}}
| added canonical form for alias {{para|orig-year}}
| October 2020
|-
| {{para|quote-page}}
| added single page specifier for {{para|quote}}
| October 2020
|-
| {{para|quote-pages}}
| added multiple pages specifier for {{para|quote}}
| October 2020
|-
| {{para|sbn}}
| added identifier parameter for [[Standard Book Number]]s
| April 2020
|-
| {{para|script-quote}}
| added non-Latin script text facility for {{para|quote}}
| October 2020
|-
| {{para|subject-mask}}
| added aliases (including enumerated forms) to {{para|author-mask}} for usage with {{para|subject}}
| October 2020
|-
| {{para|s2cid}}
| added identifier parameter for [[Semantic Scholar]] corpus ID
| April 2020
|-
| {{para|s2cid-access}}
| added access-icon parameter for {{para|s2cid}}
| April 2020
&lt;!-- Note: LEFT TITLE TOKEN CHANGES UNDOCUMENTED HERE FOR NOW TO AVOID UNNECESSARY CHANGES OF CITATIONS TO TRANSITIONAL VALUES AS THERE WILL LIKELY BE ADDITIONAL CHANGES IN THE NEXT ROUND OF CITE UPDATES:
|-
| {{para|title}}
| added special token/changed semantics of &lt;code&gt;none/off&lt;/code&gt; to control descriptive titles ({{tl|cite journal}} only)
| October 2020
--&gt;
|-
| {{para|title-link}}
| added special tokens &lt;code&gt;none/doi/pmc&lt;/code&gt; to override/disable auto-linking ({{tl|cite journal}} only)
| October 2020
|-
| {{para|trans-quote}}
| added translated text facility for {{para|quote}}
| October 2020
|-
| [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written-markup]]
| added for {{para|doi}}, {{para|eissn}}, {{para|isbn}}, {{para|issn}}, {{para|sbn}}
| October 2020
|}</text>
<sha1>gq9h0l953o091njxnlrbq3snzl9k2sf</sha1>
</revision>
</page>
<page>
<title>Template:Cite web/doc</title>
<ns>10</ns>
<id>6781571</id>
<revision>
<id>989259572</id>
<parentid>989223340</parentid>
<timestamp>2020-11-17T23:34:49Z</timestamp>
<contributor>
<username>Tom.Reding</username>
<id>9784415</id>
</contributor>
<minor/>
<comment>/* TemplateData */ author-link</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="48277" xml:space="preserve">{{Documentation subpage}}
{{High-use|all-pages=yes}}
{{AWB standard installation}}
{{csdoc|lua}}
{{csdoc|cs1}}
{{csdoc|lead|web sources that are not characterized by another CS1 template}} Do not use this template in the "[[WP:ELCITE|External links]]" section of articles.
==Usage==
{{csdoc|usage}}
{{csdoc|usage common}}
For references with author credit
:&lt;code&gt;&lt;nowiki&gt;{{cite web |url= |title= |last= |first= |date= |website= |publisher= |access-date= |quote=}}&lt;/nowiki&gt;&lt;/code&gt;
For references without author credit
:&lt;code&gt;&lt;nowiki&gt;{{cite web |url= |title= |author=&lt;!--Not stated--&gt; |date= |website= |publisher= |access-date= |quote=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage vertical common}}
&lt;!-- Please synchronize this list with the corresponding one at the overview page [[Wikipedia:Citation templates#Examples]] --&gt;
&lt;pre style="margin:0px; border:none; white-space:pre;"&gt;
{{cite web
|url=
|title=
|last=
|first=
|date=
|website=
|publisher=
|access-date=
|quote=}}
&lt;/pre&gt;
{{end}}
{{csdoc|usage full}}
:&lt;code&gt;&lt;nowiki&gt;{{cite web |url= |url-access= |title= |last= |first= |author= |author-link= |last2= |first2= |author2= |author-link2= |date= |year= |orig-year= |editor-last= |editor-first= |editor= |editor-link= |editor2-last= |editor2-first= |editor2-link= |editors= |department= |website= |series= |publisher= |agency= |location= |page= |pages= |at= |language= |script-title= |trans-title= |type= |format= |arxiv= |asin= |bibcode= |doi= |doi-broken-date= |isbn= |issn= |jfm= |jstor= |lccn= |mr= |oclc= |ol= |osti= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |access-date= |url-status= |archive-url= |archive-date= |via= |quote= |ref= |postscript=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage vertical}}
&lt;pre style="margin:0px; border:none; white-space:pre;"&gt;
{{cite web
|url=
|url-access=
|title=
|last=
|first=
|author-link=
|last2=
|first2=
|author-link2=
|date=
|year=
|orig-year=
|editor-last=
|editor-first=
|editor-link=
|editor2-last=
|editor2-first=
|editor2-link=
|department=
|website=
|series=
|publisher=
|agency=
|location=
|page=
|pages=
|at=
|language=
|script-title=
|trans-title=
|type=
|format=
|arxiv=
|asin=
|bibcode=
|doi=
|doi-broken-date=
|isbn=
|issn=
|jfm=
|jstor=
|lccn=
|mr=
|oclc=
|ol=
|osti=
|pmc=
|pmid=
|rfc=
|ssrn=
|zbl=
|id=
|access-date=
|url-status=
|archive-url=
|archive-date=
|via=
|quote=
|ref=
|postscript=}}
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none; white-space:pre;"&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
last
&amp;nbsp;
last
last2
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
editor-last
&amp;nbsp;
editor-last
editor2-last
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
url&amp;nbsp;
url&amp;nbsp;
url, archive-date
archive-url
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none; white-space:pre;"&gt;
&amp;nbsp;
required
&amp;nbsp;
required
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical end}}
===Choosing between [[Template:cite web]] and [[Template:cite news]]===
{{anchor|Consistency}}
Before 2014, editors had to decide whether to use {{tl|cite web}} or {{tl|cite news}} based on their features. In 2014, {{em|most of}} the differences between the two templates were eliminated.
As of {{diff|Module:Citation/CS1|732205428|723907342|29 July 2016}}, {{tlf|cite web}} and {{tlf|cite news}} have the following differences:
* {{tlf|cite news}} can be used for [[WP:OFFLINE|offline]] (paper) sources whereas {{tlf|cite web}} generates a missing URL error when no URL is provided
* {{tlf|cite news}} accepts {{para|issue}} and {{para|volume}} parameters while {{tlf|cite web}} does not (See {{slink|Help:Citation Style 1#Pages}}; see also {{tl|cite magazine}}).
But given the same set of valid parameters, their output is exactly the same:
&lt;!-- ATTENTION!
The following example only serves to demonstrate parameter rending results.
Whether you must include all these parameters in actual articles is not a concern here.
--&gt;
{|
| '''cite web''': || {{cite web |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015}}
|-
| '''cite news''': || {{cite news |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015}}
|}
==Examples==
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date=&lt;/nowiki&gt;{{date|{{date}}|mdy}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date={{date|{{date}}|mdy}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=30 April 2005
|website=Encyclopedia of Things
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=30 April 2005
|website=Encyclopedia of Things
|access-date={{date}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=2005-04-30
|access-date=&lt;/nowiki&gt;{{date|{{date}}|iso}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=2005-04-30
|access-date={{date|{{date}}|iso}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|access-date={{date}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|access-date=&lt;/nowiki&gt;{{date|{{date}}|iso}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|access-date={{date|{{date}}|iso}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=https://operations.nfl.com/the-rules/nfl-rules-digest/
|title=NFL Rules Digest
|website=NFL Football Operations
|publisher=[[National Football League]]
|access-date=&lt;/nowiki&gt;{{date|{{date}}|mdy}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=https://operations.nfl.com/the-rules/nfl-rules-digest/
|title=NFL Rules Digest
|website=NFL Football Operations
|publisher=[[National Football League]]
|access-date={{date|{{date}}|mdy}}}}
}}
===Using "format="===
When this template detects a link whose URL includes an [[filename extension|extension]] of ".pdf" or ".PDF", typical of [[PDF]] files, it automatically displays a PDF icon after the link (regardless of whether the link goes to a PDF file or to an HTML landing page, typical of paysites). It also internally acts as if {{para|format|PDF}} had been specified, which displays " (PDF)" after the icon. (In this case, an explicit {{para|format|PDF}} parameter would be redundant, so it ''is not'' recommended to add it. Users may remove it. Citation bot, when invoked, will remove it. ([[User talk:Citation bot/Archive 13#Remove format=pdf and variants when URLs end in .pdf|ref]]))
&lt;div style="width:auto; overflow:scroll"&gt;
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.indiapost.gov.in/Pdf/Customs/List_of_Psychotropic_Substances.pdf
|title=List of psychotropic substances under international control
|publisher=International Narcotics Control Board
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.indiapost.gov.in/Pdf/Customs/List_of_Psychotropic_Substances.pdf
|title=List of psychotropic substances under international control
|publisher=International Narcotics Control Board
|access-date={{date}}}}
}}
&lt;/div&gt;
If the link is to a PDF file that ''is not'' automatically recognizable by its extension, this template does not display the PDF icon. You may add the parameter {{para|format|PDF}}, which displays " (PDF)" after the link.
&lt;div style="width:auto; overflow:scroll"&gt;
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.sample.com/somePDFdocument.000
|title=Some PDF Document
|publisher=Sample Int'l
|format=PDF
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.sample.com/somePDFdocument.000
|title=Some PDF Document
|publisher=Sample Int'l
|format=PDF
|access-date={{date}}}}
}}
&lt;/div&gt;
For links to files in other formats, no icon is displayed. For example, for an [[.odt]] file, you may add the parameter {{para|format|ODT}}, which displays " (ODT)" after the link.
&lt;div style="width:auto; overflow:scroll"&gt;
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.sample.com/someODTdocument.odt
|title=Some ODT Document
|publisher=Sample Int'l
|format=ODT
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.sample.com/someODTdocument.odt
|title=Some ODT Document
|publisher=Sample Int'l
|format=ODT
|access-date={{date}}}}
}}
&lt;/div&gt;
===Foreign language and translated title===
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=Honi soit qui mal y pense
|last=Joliet
|first=François
|date=30 April 2005
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;
|language=French
|trans-title=Shame on those who think evil of it}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=Honi soit qui mal y pense
|last=Joliet
|first=François
|date=30 April 2005
|access-date={{date}}
|language=French
|trans-title=Shame on those who think evil of it}}
}}
===Using author-link===
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|author-link=John Doe
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date=&lt;/nowiki&gt;{{date|{{date}}|mdy}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|author-link=John Doe
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date={{date|{{date}}|mdy}}}}
}}
===Multiple authors===
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=Our Favourite Things
|last1=Doe
|first1=John
|last2=Smith
|first2=Peter
|last3=Smythe
|first3=Jim
|publisher=Open Publishing
|date=30 April 2005
|website=Encyclopaedia of Things
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=Our Favourite Things
|last1=Doe
|first1=John
|last2=Smith
|first2=Peter
|last3=Smythe
|first3=Jim
|publisher=Open Publishing
|date=30 April 2005
|website=Encyclopaedia of Things
|access-date={{date}}}}
}}
===No author===
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|publisher=Open Publishing
|date=2005-04-30
|website=Encyclopedia of Things
|access-date=&lt;/nowiki&gt;{{date|{{date}}|iso}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|publisher=Open Publishing
|date=2005-04-30
|website=Encyclopedia of Things
|access-date={{date|{{date}}|iso}}}}
}}
===No author, no publisher===
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|date=30 April 2005
|website=Encyclopedia of Things
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|date=30 April 2005
|website=Encyclopedia of Things
|access-date={{date}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|date=April 30, 2005
|access-date=&lt;/nowiki&gt;{{date|{{date}}|mdy}}&lt;nowiki&gt;}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.example.org/
|title=Index of Sharp Things
|date=April 30, 2005
|access-date={{date|{{date}}|mdy}}}}
}}
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|access-date=&lt;/nowiki&gt;{{date|{{date}}|iso}}&lt;nowiki&gt;
|language=Greek}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|access-date={{date|{{date}}|iso}}
|language=Greek}}
}}
===Using "archive-url" and "archive-date" (and optionally "url-status") for webpages that have been archived {{anchor|archive-url}}===
&lt;div style="width:auto; overflow:scroll"&gt;By default, if "archive-url" is used, {{para|url-status|dead}} and the main link is to the archive:
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|access-date=&lt;/nowiki&gt;{{date|{{date}}|iso}}&lt;nowiki&gt;
|archive-url=https://web.archive.org/web/20050907150136/http://www.incb.org/pdf/e/list/green.pdf
|archive-date=2005-09-07}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|access-date={{date|{{date}}|iso}}
|archive-url=https://web.archive.org/web/20050907150136/http://www.incb.org/pdf/e/list/green.pdf
|archive-date=2005-09-07}}
}}
&lt;/div&gt;
&lt;div style="width:auto; overflow:scroll"&gt;With {{para|url-status|live}}, the main link is to the original:
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://joanjettbadrep.com/cgi-bin/fullStory.cgi?archive=currnews&amp;story=20060405-01shore.htm
|title=Interview with Maggie Downs
|date=March 31, 2006
|publisher=The Desert Sun
|url-status=live
|archive-url=http://72.14.207.104/search?q=cache:JAxf4v-pQmgJ:joanjettbadrep.com/cgi-bin/fullStory.cgi%3Farchive%3Dcurrnews%26story%3D20060405-01shore.htm
|archive-date=April 26, 2006}}&lt;/nowiki&gt;
|r={{cite web
|url=http://joanjettbadrep.com/cgi-bin/fullStory.cgi?archive=currnews&amp;story=20060405-01shore.htm
|title=Interview with Maggie Downs
|date=March 31, 2006
|publisher=The Desert Sun
|url-status=live
|archive-url=http://72.14.207.104/search?q=cache:JAxf4v-pQmgJ:joanjettbadrep.com/cgi-bin/fullStory.cgi%3Farchive%3Dcurrnews%26story%3D20060405-01shore.htm
|archive-date=April 26, 2006}}
}}
&lt;/div&gt;
&lt;div style="width:auto; overflow:scroll"&gt;With {{para|url-status|unfit}} or {{code|usurped}}, the original is not linked at all:
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.wunderground.com/global/stations/03772.html
|title=London, United Kingdom Forecast: Weather Underground (weather and elevation at Heathrow Airport)
|publisher=The Weather Underground
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;
|url-status=unfit |archive-url=https://www.webcitation.org/5yo0HaAk7 |archive-date=19 May 2011}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.wunderground.com/global/stations/03772.html
|title=London, United Kingdom Forecast: Weather Underground (weather and elevation at Heathrow Airport)
|publisher=The Weather Underground
|access-date={{date}}
|url-status=unfit |archive-url=https://www.webcitation.org/5yo0HaAk7 |archive-date=19 May 2011}}
}}
&lt;/div&gt;
===Using quote===
&lt;div style="width:auto; overflow:scroll"&gt;
{{markup2|
|m=&lt;nowiki&gt;{{cite web
|url=http://www.webexhibits.org/daylightsaving/c.html
|title=Daylight saving time: rationale and original idea
|website=WebExhibits
|date=2008
|access-date=&lt;/nowiki&gt;{{date}}&lt;nowiki&gt;
|quote=...&amp;amp;nbsp;Lord Balfour came forward with a unique concern: 'Supposing some unfortunate lady was confined with twins&amp;amp;nbsp;...'}}&lt;/nowiki&gt;
|r={{cite web
|url=http://www.webexhibits.org/daylightsaving/c.html
|title=Daylight saving time: rationale and original idea
|website=WebExhibits
|date=2008
|access-date={{date}}
|quote=...&amp;nbsp;Lord Balfour came forward with a unique concern: 'Supposing some unfortunate lady was confined with twins&amp;nbsp;...'}}
}}
&lt;/div&gt;
==Parameters==
===Syntax===
{{csdoc|syntax}}
{{csdoc|sep_period}}
===COinS===
{{csdoc|coins}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated}}
===Description===
====Authors====
{{csdoc|author|others=yes}}
====Title====
{{csdoc|web}}
{{csdoc|type}}
{{csdoc|language}}
====Date====
{{csdoc|date}}
====Website====
{{csdoc|journal|issue=no}}
====Publisher====
{{csdoc|publisher|work=no|web=yes}}
{{csdoc|agency}}
====Series====
{{csdoc|series}}
====In-source locations====
{{csdoc|pages}}
===={{Anchor|url}}URL====
{{csdoc|url}}
====Anchor====
{{csdoc|ref}}
====Identifiers====
{{csdoc|id1}}
{{csdoc|id2}}
====Quote====
{{csdoc|quote}}
====Editors====
{{csdoc|editor}}
====Laysummary====
{{csdoc|lay}}
====Display options====
{{csdoc|display}}
====Subscription or registration required====
{{csdoc|registration}}
==TemplateData==
{{Warning |image=Stop hand nuvola.svg |This section contains configuration data used by editing tools and automated bots. Changes to this data can result in widespread and unintended effects. For more information see [[Help:Citation Style 1#TemplateData]]}}
{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "Formats a citation to a website using the provided information such as URL and title. Used only for sources that are not correctly described by the specific citation templates for books, journals, news sources, etc.",
"params": {
"url": {
"label": "URL",
"description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the protocol relative scheme \"//...\"",
"type": "string",
"aliases": [
"URL"
],
"required": true,
"example": "https://www.metacritic.com//..."
},
"title": {
"label": "Title",
"description": "The title of the source page on the website; will display with quotation marks added. Usually found at the top of your web browser. Not the name of the website.",
"type": "string",
"required": true
},
"date": {
"label": "Source date",
"description": "Full date when the source was published; if unknown, use access-date instead; do not wikilink",
"type": "date",
"suggested": true
},
"access-date": {
"label": "URL access date",
"description": "The full date when the original URL was accessed; do not wikilink",
"type": "date",
"aliases": [
"accessdate"
],
"suggested": true
},
"website": {
"label": "Name of the website",
"description": "Title (name) of the website (or its short URL if no plain-language title is discernible); may be wikilinked; will display in italics. Having both 'publisher' and 'website' is redundant in many cases.",
"type": "string",
"aliases": [
"work"
],
"suggested": true,
"example": "[[Rotten Tomatoes]]"
},
"publisher": {
"label": "Publisher",
"description": "Name of the publisher; may be wikilinked. Having both 'publisher' and 'website' (a.k.a. 'work') is redundant in many cases.",
"type": "string",
"example": "[[CBS Interactive]] (which owns \"Metacritic.com\")"
},
"last": {
"label": "Last name",
"description": "The surname of the author; don't wikilink, use 'author-link'; can suffix with a numeral to add additional authors",
"aliases": [
"last1",
"author",
"author1",
"author1-last",
"author-last",
"surname1",
"author-last1",
"subject1",
"surname",
"author-last",
"subject"
],
"type": "line",
"suggested": true
},
"first": {
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'author-link'; can suffix with a numeral to add additional authors",
"aliases": [
"given",
"author-first",
"first1",
"given1",
"author-first1",
"author1-first"
],
"type": "line",
"suggested": true
},
"author-link": {
"label": "Author link",
"description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink",
"subjectlink",
"subject-link",
"authorlink1",
"author-link1",
"author1-link",
"author1link",
"subjectlink1",
"subject-link1",
"subject1-link",
"subject1link"
]
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'author-link2'.",
"type": "line",
"aliases": [
"author2"
]
},
"first2": {
"label": "First name 2",
"type": "line",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink."
},
"author-link2": {
"label": "Author link 2",
"description": "Title of existing Wikipedia article about the second author.",
"type": "wiki-page-name",
"aliases": [
"authorlink2",
"author2-link",
"author2link"
]
},
"others": {
"label": "Others",
"description": "Used to record other (non-author) contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'. Only one ''others'' parameter is allowed: e.g., 'Illustrated by Jane Doe; Translated by John Smith'",
"type": "string"
},
"year": {
"label": "Year of publication",
"description": "Year of the source being referenced; deprecated in favor of 'date', except for the special case of ISO dates with disambiguating letter",
"type": "string"
},
"orig-year": {
"label": "Original year",
"description": "Original year of publication; provide specifics",
"type": "string",
"aliases": [
"origyear"
]
},
"editor-last": {
"label": "Editor last name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors.",
"type": "line",
"aliases": [
"editor1-last",
"editor",
"editors"
]
},
"editor-first": {
"label": "Editor first name",
"description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-first'",
"type": "line",
"aliases": [
"editor1-first"
]
},
"editor-link": {
"label": "Editor link",
"description": "Title of existing Wikipedia article about the editor; can suffix with a numeral to add additional editors",
"aliases": [
"editor1-link"
],
"type": "wiki-page-name"
},
"series": {
"label": "Series identifier",
"description": "Series identifier when the source is part of a series, such as a book series or a journal",
"type": "string"
},
"location": {
"label": "Location of publication",
"description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place; alias of 'place'",
"type": "string"
},
"publication-place": {
"label": "Place of publication",
"description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'",
"type": "string"
},
"publication-date": {
"label": "Publication date",
"description": "Date of publication when different from the date the work was written; do not wikilink",
"type": "string"
},
"page": {
"label": "Page",
"description": "Page in the source that supports the content; displays after 'p.'",
"type": "string"
},
"pages": {
"label": "Pages",
"description": "Pages in the source that support the content (not an indication of the number of pages in the source); displays after 'pp.'",
"type": "string"
},
"nopp": {
"label": "No pp",
"description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')",
"type": "string"
},
"at": {
"label": "At",
"description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient",
"type": "string"
},
"language": {
"label": "Language",
"description": "The language in which the source is written, if not English; use the full language name or one of the standard MediaWiki language codes; do not use icons or templates; separate multiple languages with commas (with no 'and' before the last one)",
"type": "string",
"aliases": [
"lang"
],
"example": "de, fr, es"
},
"script-title": {
"label": "Script title",
"description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...",
"type": "string"
},
"trans-title": {
"label": "Translated title",
"description": "An English language title, if the source cited is in a foreign language; 'language' is recommended",
"type": "string"
},
"type": {
"label": "Type",
"description": "Additional information about the media type of the source; format in sentence case",
"type": "string"
},
"format": {
"label": "Format",
"description": "Format of the work referred to by 'url'; examples: PDF, DOC, XLS; do not specify HTML",
"type": "string"
},
"arxiv": {
"label": "arXiv identifier",
"description": "An identifier for arXive electronic preprints of scientific papers",
"type": "string"
},
"asin": {
"label": "ASIN",
"description": "Amazon Standard Identification Number; 10 characters",
"type": "string"
},
"asin-tld": {
"label": "ASIN TLD",
"description": "ASIN top-level domain for Amazon sites other than the US",
"type": "string"
},
"bibcode": {
"label": "Bibcode",
"description": "Bibliographic Reference Code (REFCODE); 19 characters",
"type": "string"
},
"biorxiv": {
"label": "biorXiv",
"description": "biorXiv identifier; 6 digits",
"type": "line"
},
"citeseerx": {
"label": "CiteSeerX",
"description": "CiteSeerX identifier; found after the 'doi=' query parameter",
"type": "line"
},
"doi": {
"label": "DOI",
"description": "Digital Object Identifier; begins with '10.'",
"type": "string"
},
"doi-broken-date": {
"label": "DOI broken date",
"description": "The date that the DOI was determined to be broken",
"type": "string"
},
"isbn": {
"label": "ISBN",
"description": "International Standard Book Number; use the 13-digit ISBN where possible",
"type": "string"
},
"issn": {
"label": "ISSN",
"description": "International Standard Serial Number; 8 characters; may be split into two groups of four using a hyphen",
"type": "string"
},
"jfm": {
"label": "jfm code",
"description": "Jahrbuch über die Fortschritte der Mathematik classification code",
"type": "string"
},
"jstor": {
"label": "JSTOR",
"description": "JSTOR identifier",
"type": "string"
},
"lccn": {
"label": "LCCN",
"description": "Library of Congress Control Number",
"type": "string"
},
"mr": {
"label": "MR",
"description": "Mathematical Reviews identifier",
"type": "string"
},
"oclc": {
"label": "OCLC",
"description": "Online Computer Library Center number",
"type": "string"
},
"ol": {
"label": "OL",
"description": "Open Library identifier",
"type": "string"
},
"osti": {
"label": "OSTI",
"description": "Office of Scientific and Technical Information identifier",
"type": "string"
},
"pmc": {
"label": "PMC",
"description": "PubMed Center article number",
"type": "string"
},
"pmid": {
"label": "PMID",
"description": "PubMed Unique Identifier",
"type": "string"
},
"rfc": {
"label": "RFC",
"description": "Request for Comments number",
"type": "string"
},
"ssrn": {
"label": "SSRN",
"description": "Social Science Research Network",
"type": "string"
},
"zbl": {
"label": "Zbl",
"description": "Zentralblatt MATH journal identifier",
"type": "string"
},
"id": {
"label": "id",
"description": "A unique identifier used where none of the specialized ones are applicable",
"type": "string"
},
"archive-url": {
"label": "Archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string",
"suggested": true
},
"archive-date": {
"label": "Archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date",
"suggested": true
},
"archive-format": {
"label": "Archive format",
"description": "Format of the archived copy; examples: PDF, DOC, XLS; do not specify HTML",
"type": "string"
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source; displays last, enclosed in quotes; must include terminating punctuation",
"type": "string"
},
"ref": {
"label": "Ref",
"description": "An anchor identifier; can be made the target of wikilinks to full references",
"type": "string"
},
"separator": {
"label": "Separator",
"description": "The punctuation used to separate lists of authors, editors, etc.; a space must be encoded as &amp;#32; do not use an asterisk, colon, or hash mark",
"type": "string",
"default": "."
},
"postscript": {
"label": "Postscript",
"description": "The closing punctuation for the citation; ignored if 'quote' is defined",
"type": "string",
"default": "."
},
"author-mask": {
"label": "Author mask",
"description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string"
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'author-link3'.",
"type": "line",
"aliases": [
"author3"
]
},
"first3": {
"label": "First name 3",
"type": "line",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink."
},
"author-link3": {
"label": "Author link 3",
"description": "Title of existing Wikipedia article about the third author.",
"type": "wiki-page-name",
"aliases": [
"authorlink3",
"author3-link",
"author3link"
]
},
"last4": {
"label": "Last name 4",
"description": "The surname of the fourth author; don't wikilink, use 'author-link4'.",
"type": "line",
"aliases": [
"author4"
]
},
"first4": {
"label": "First name 4",
"type": "line",
"description": "Given or first name, middle names, or initials of the fourth author; don't wikilink."
},
"author-link4": {
"label": "Author link 4",
"description": "Title of existing Wikipedia article about the fourth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink4",
"author4-link",
"author4link"
]
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'author-link5'.",
"type": "line",
"aliases": [
"author5"
]
},
"first5": {
"label": "First name 5",
"type": "line",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink."
},
"author-link5": {
"label": "Author link 5",
"description": "Title of existing Wikipedia article about the fifth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink5",
"author5-link",
"author5link"
]
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'author-link6'.",
"type": "line",
"aliases": [
"author6"
]
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.",
"type": "line"
},
"author-link6": {
"label": "Author link 6",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink6",
"author6-link",
"author6link"
]
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'author-link7'.",
"type": "line",
"aliases": [
"author7"
]
},
"first7": {
"label": "First name 7",
"type": "line",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink."
},
"author-link7": {
"label": "Author link 7",
"description": "Title of existing Wikipedia article about the seventh author.",
"type": "wiki-page-name",
"aliases": [
"authorlink7",
"author7-link",
"author7link"
]
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'author-link8'.",
"type": "line",
"aliases": [
"author8"
]
},
"first8": {
"label": "First name 8",
"type": "line",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink."
},
"author-link8": {
"label": "Author link 8",
"description": "Title of existing Wikipedia article about the eighth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink8",
"author8-link",
"author8link"
]
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'author-link9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"type": "line",
"aliases": [
"author9"
]
},
"first9": {
"label": "First name 9",
"type": "line",
"description": "Given or first name, middle names, or initials of the ninth author; don't wikilink."
},
"author-link9": {
"label": "Author link 9",
"description": "Title of existing Wikipedia article about the ninth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink9",
"author9-link",
"author9link"
]
},
"author-name-separator": {
"label": "Author name separator",
"description": "Changes the separator between last and first names; defaults to a comma and space; a space must be encoded as &amp;#32; do not use an asterisk, colon, or hash mark",
"type": "string",
"default": ", "
},
"author-separator": {
"label": "Author separator",
"description": "Changes the separator between authors; defaults to a semicolon and space; a space must be encoded as &amp;#32; do not use an asterisk, colon, or hash mark",
"type": "string",
"default": "; "
},
"display-authors": {
"label": "Display authors",
"description": "Number of authors to display before 'et al.' is used. By default, all authors are displayed. Examples: |display-authors=2 will display only the first two authors in a citation followed by et al. |display-authors=etal displays all authors in the list followed by et al.",
"type": "string",
"aliases": [
"displayauthors"
]
},
"last-author-amp": {
"label": "Last author ampersand",
"description": "When set to any value, changes the separator between the last two names of the author list to 'space ampersand space'",
"type": "string",
"aliases": [
"lastauthoramp"
]
},
"editor2-last": {
"label": "Editor last name 2",
"description": "The surname of the second editor; don't wikilink, use 'editor2-link'.",
"aliases": [
"editor2"
],
"type": "line"
},
"editor2-first": {
"label": "Editor first name 2",
"description": "Given or first name, middle names, or initials of the second editor; don't wikilink.",
"type": "line"
},
"editor3-last": {
"label": "Editor last name 3",
"description": "The surname of the third editor; don't wikilink, use 'editor3-link'.",
"aliases": [
"editor3"
],
"type": "line"
},
"editor3-first": {
"label": "Editor first name 3",
"description": "Given or first name, middle names, or initials of the third editor; don't wikilink.",
"type": "line"
},
"editor4-last": {
"label": "Editor last name 4",
"description": "The surname of the fourth editor; don't wikilink, use 'editor4-link'.",
"aliases": [
"editor4"
],
"type": "line"
},
"editor4-first": {
"label": "Editor first name 4",
"description": "Given or first name, middle names, or initials of the fourth editor; don't wikilink.",
"type": "line"
},
"editor5-last": {
"label": "Editor last name 5",
"description": "The surname of the fifth editor; don't wikilink, use 'editor5-link'.",
"aliases": [
"editor5"
],
"type": "line"
},
"editor5-first": {
"label": "Editor first name 5",
"description": "Given or first name, middle names, or initials of the fifth editor; don't wikilink.",
"type": "line"
},
"editor6-last": {
"label": "Editor last name 6",
"description": "The surname of the sixth editor; don't wikilink, use 'editor6-link'.",
"aliases": [
"editor6"
],
"type": "line"
},
"editor6-first": {
"label": "Editor first name 6",
"description": "Given or first name, middle names, or initials of the sixth editor; don't wikilink.",
"type": "line"
},
"editor7-last": {
"label": "Editor last name 7",
"description": "The surname of the seventh editor; don't wikilink, use 'editor7-link'.",
"aliases": [
"editor7"
],
"type": "line"
},
"editor7-first": {
"label": "Editor first name 7",
"description": "Given or first name, middle names, or initials of the seventh editor; don't wikilink.",
"type": "line"
},
"editor8-last": {
"label": "Editor last name 8",
"description": "The surname of the eighth editor; don't wikilink, use 'editor8-link'.",
"aliases": [
"editor8"
],
"type": "line"
},
"editor8-first": {
"label": "Editor first name 8",
"description": "Given or first name, middle names, or initials of the eighth editor; don't wikilink.",
"type": "line"
},
"editor9-last": {
"label": "Editor last name 9",
"description": "The surname of the ninth editor; don't wikilink, use 'editor9-link'.",
"aliases": [
"editor9"
],
"type": "line"
},
"editor9-first": {
"label": "Editor first name 9",
"description": "Given or first name, middle names, or initials of the ninth editor; don't wikilink.",
"type": "line"
},
"editor2-link": {
"label": "Editor link 2",
"description": "Title of existing Wikipedia article about the second editor.",
"type": "wiki-page-name",
"aliases": [
"editor2link",
"editorlink2"
]
},
"editor3-link": {
"label": "Editor link 3",
"description": "Title of existing Wikipedia article about the third editor.",
"type": "wiki-page-name",
"aliases": [
"editor3link",
"editorlink3"
]
},
"editor4-link": {
"label": "Editor link 4",
"description": "Title of existing Wikipedia article about the fourth editor.",
"type": "wiki-page-name",
"aliases": [
"editor4link",
"editorlink4"
]
},
"editor5-link": {
"label": "Editor link 5",
"description": "Title of existing Wikipedia article about the fifth editor.",
"type": "wiki-page-name",
"aliases": [
"editor5link",
"editorlink5"
]
},
"editor6-link": {
"label": "Editor link 6",
"description": "Title of existing Wikipedia article about the sixth editor.",
"type": "wiki-page-name",
"aliases": [
"editor6link",
"editorlink6"
]
},
"editor7-link": {
"label": "Editor link 7",
"description": "Title of existing Wikipedia article about the seventh editor.",
"type": "wiki-page-name",
"aliases": [
"editor7link",
"editorlink7"
]
},
"editor8-link": {
"label": "Editor link 8",
"description": "Title of existing Wikipedia article about the eighth editor.",
"type": "wiki-page-name",
"aliases": [
"editor8link",
"editorlink8"
]
},
"editor9-link": {
"label": "Editor link 9",
"description": "Title of existing Wikipedia article about the ninth editor.",
"type": "wiki-page-name",
"aliases": [
"editor9link",
"editorlink9"
]
},
"subscription": {
"label": "Subscription required",
"description": "Use 'url-access' instead",
"type": "string",
"deprecated": true
},
"registration": {
"label": "Registration required",
"description": "Use 'url-access' instead",
"type": "string",
"deprecated": true
},
"edition": {
"label": "Edition",
"type": "string",
"description": "Specify the edition or revision of the source, when applicable. For example: '2nd' or '5.1'. What you supply here is suffixed by ' ed.'"
},
"url-access": {
"label": "URL access level",
"description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')",
"type": "string"
},
"bibcode-access": {
"label": "Bibcode access level",
"description": "If the full text is available from ADS via this Bibcode, type 'free'.",
"type": "string"
},
"doi-access": {
"label": "DOI access level",
"description": "If the full text is free to read via the DOI, type 'free'.",
"type": "string"
},
"hdl-access": {
"label": "HDL access level",
"description": "If the full text is free to read via the HDL, type 'free'.",
"type": "string"
},
"jstor-access": {
"label": "Jstor access level",
"description": "If the full text is free to read on Jstor, type 'free'.",
"type": "string"
},
"ol-access": {
"label": "OpenLibrary access level",
"description": "If the full text is free to read on OpenLibrary, type 'free'.",
"type": "string"
},
"osti-access": {
"label": "OSTI access level",
"description": "If the full text is free to read on OSTI, type 'free'.",
"type": "string"
},
"authors": {
"label": "Authors list",
"description": "List of authors as a free form list. Use of this parameter is discouraged, \"lastn\" to \"firstn\" are preferable. Warning: do not use if last or any of its aliases are used.",
"type": "string",
"aliases": [
"people",
"host",
"credits"
]
},
"via": {
"label": "Published via",
"description": "Name of the entity hosting the original copy of the work, if different from the publisher. This entity is committed not to alter the work. GitHub, SourceForge, CodePlex, YouTube, Vimeo, Dailymotion and Netflix are examples of service dedicated to acting on behalf of the publisher, but Archive.org, Wikimedia Commons and grc.com have done this on certain occasions.",
"example": "\"GitHub\", which hosts \"Visual Studio Code\" on behalf of \"Microsoft\"",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title display is adjusted; useful for when the URL is archived preemptively but still live. Set to \"dead\" or 'usurped' for broken links. Entering 'unfit' or 'usurped' makes the original link not appear at all.",
"example": "'dead' or 'live'",
"type": "string",
"default": "'dead' if an Archive URL is entered",
"autovalue": "live",
"suggested": true
},
"lay-source": {
"aliases": [
"laysource"
],
"label": "Lay source",
"description": "Name of the source of the laysummary; displays in italics, preceded by an en dash",
"type": "string"
},
"lay-date": {
"aliases": [
"laydate"
],
"label": "Lay date",
"description": "Date of the summary; displays in parentheses",
"type": "string"
},
"lay-url": {
"aliases": [
"layurl"
],
"label": "Lay URL",
"description": "URL link to a non-technical summary or review of the source; alias of 'laysummary'",
"type": "string"
}
},
"maps": {
"citoid": {
"title": "title",
"url": "url",
"subject": "title",
"publicationTitle": "website",
"blogTitle": "website",
"forumTitle": "website",
"seriesTitle": "website",
"websiteTitle": "website",
"publisher": "publisher",
"date": "date",
"PMCID": "pmc",
"PMID": "pmid",
"oclc": "oclc",
"pages": "pages",
"series": "series",
"accessDate": "access-date",
"DOI": "doi",
"language": "language",
"contributor": "others",
"author": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"editor": [
[
"editor-first",
"editor-last"
],
[
"editor2-first",
"editor2-last"
],
[
"editor3-first",
"editor3-last"
],
[
"editor4-first",
"editor4-last"
],
[
"editor5-first",
"editor5-last"
],
[
"editor6-first",
"editor6-last"
],
[
"editor7-first",
"editor7-last"
],
[
"editor8-first",
"editor8-last"
],
[
"editor9-first",
"editor9-last"
]
]
}
},
"paramOrder": [
"last",
"first",
"author-link",
"last2",
"first2",
"author-link2",
"last3",
"first3",
"author-link3",
"last4",
"first4",
"author-link4",
"last5",
"first5",
"author-link5",
"last6",
"first6",
"author-link6",
"last7",
"first7",
"author-link7",
"last8",
"first8",
"author-link8",
"last9",
"first9",
"author-link9",
"authors",
"author-mask",
"author-name-separator",
"author-separator",
"display-authors",
"last-author-amp",
"date",
"year",
"orig-year",
"editor-last",
"editor-first",
"editor-link",
"editor2-last",
"editor2-first",
"editor2-link",
"editor3-last",
"editor3-first",
"editor3-link",
"editor4-last",
"editor4-first",
"editor4-link",
"editor5-last",
"editor5-first",
"editor5-link",
"editor6-last",
"editor6-first",
"editor6-link",
"editor7-last",
"editor7-first",
"editor7-link",
"editor8-last",
"editor8-first",
"editor8-link",
"editor9-last",
"editor9-first",
"editor9-link",
"others",
"title",
"script-title",
"trans-title",
"url",
"url-access",
"url-status",
"archive-url",
"archive-date",
"archive-format",
"access-date",
"website",
"series",
"publisher",
"location",
"page",
"pages",
"at",
"language",
"type",
"format",
"publication-place",
"publication-date",
"via",
"nopp",
"arxiv",
"asin",
"asin-tld",
"bibcode",
"biorxiv",
"citeseerx",
"doi",
"doi-broken-date",
"isbn",
"issn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"id",
"quote",
"ref",
"postscript",
"subscription",
"registration",
"separator",
"lay-url",
"lay-source",
"lay-date",
"edition",
"bibcode-access",
"doi-access",
"hdl-access",
"jstor-access",
"ol-access",
"osti-access"
],
"format": "inline"
}
&lt;/templatedata&gt;
==Notes==
&lt;references/&gt;
{{Citation Style 1}}
{{Wikipedia referencing}}
{{UF-COinS}}
&lt;includeonly&gt;{{Sandbox other||
[[Category:Citation Style 1 templates|W]]
}}&lt;/includeonly&gt;</text>
<sha1>dmiky03szkm28yaqfqjndnj1lrbnrkx</sha1>
</revision>
</page>
<page>
<title>Template:Cl</title>
<ns>10</ns>
<id>51693276</id>
<redirect title="Template:Category link" />
<revision>
<id>893875615</id>
<parentid>756288266</parentid>
<timestamp>2019-04-24T04:30:48Z</timestamp>
<contributor>
<username>JJMC89</username>
<id>24812038</id>
</contributor>
<comment>actual template is in the category</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="52" xml:space="preserve">#REDIRECT [[Template:Category link]]
{{R from move}}</text>
<sha1>sxb6uqb5pxx7i9ck11lxcop05gxni7w</sha1>
</revision>
</page>
<page>
<title>Template:Code</title>
<ns>10</ns>
<id>878369</id>
<revision>
<id>972053841</id>
<parentid>714246016</parentid>
<timestamp>2020-08-09T22:30:02Z</timestamp>
<contributor>
<username>Bsherr</username>
<id>4386431</id>
</contributor>
<minor/>
<comment>adding comment</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="252" xml:space="preserve">{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|id={{{id|}}}|style={{{style|}}}|inline=1}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --&gt;
&lt;/noinclude&gt;</text>
<sha1>axmqgx8vb802btxgbw39a95fmariuis</sha1>
</revision>
</page>
<page>
<title>Template:Crossref</title>
<ns>10</ns>
<id>42793362</id>
<redirect title="Template:Crossreference" />
<revision>
<id>804500384</id>
<parentid>770818753</parentid>
<timestamp>2017-10-09T12:24:30Z</timestamp>
<contributor>
<username>Xezbeth</username>
<id>86247</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Crossref]]": [[Wikipedia:High-risk templates|Highly visible]] template redirect ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="84" xml:space="preserve">#REDIRECT [[Template:Crossreference]]
{{Rcat shell|
{{R from template shortcut}}
}}</text>
<sha1>pq7z0nmw7a74xqvemqbunajs03rcg15</sha1>
</revision>
</page>
<page>
<title>Template:Crossreference</title>
<ns>10</ns>
<id>44147271</id>
<revision>
<id>804500343</id>
<parentid>796607345</parentid>
<timestamp>2017-10-09T12:23:56Z</timestamp>
<contributor>
<username>Xezbeth</username>
<id>86247</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Crossreference]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="327" xml:space="preserve">{{Hatnote inline|1={{{1|{{{text|{{{content|&lt;noinclude&gt;sample content&lt;/noinclude&gt;}}}}}}}}}|extraclasses={{{class|{{{extraclasses|}}}}}}|selfref={{#if:{{{selfref|{{{printworthy|{{{unprintworthy|}}}}}}}}}||yes}}}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>i6gx3jctinkehrzyjydrmmdpauf5j4h</sha1>
</revision>
</page>
<page>
<title>Template:Cs1</title>
<ns>10</ns>
<id>34325704</id>
<revision>
<id>804500247</id>
<parentid>744974365</parentid>
<timestamp>2017-10-09T12:22:45Z</timestamp>
<contributor>
<username>Xezbeth</username>
<id>86247</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Cs1]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="114" xml:space="preserve">[[Help:Citation Style 1|Citation Style 1]]&lt;noinclude&gt;
[[Category:Documentation assistance templates]]
&lt;/noinclude&gt;</text>
<sha1>3gpz7ptxi5prfsj5lb0kawozsw3dsyw</sha1>
</revision>
</page>
<page>
<title>Template:Csdoc</title>
<ns>10</ns>
<id>34198828</id>
<redirect title="Template:Citation Style documentation" />
<revision>
<id>623878625</id>
<parentid>623870691</parentid>
<timestamp>2014-09-02T16:23:24Z</timestamp>
<contributor>
<username>Gadget850</username>
<id>339034</id>
</contributor>
<minor/>
<comment>Protected Template:Csdoc ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="79" xml:space="preserve">#REDIRECT [[Template:Citation Style documentation]]{{R from template shortcut}}</text>
<sha1>1wt7ij6rzt3vfufgon1tw1ycigvclx0</sha1>
</revision>
</page>
<page>
<title>Template:Date</title>
<ns>10</ns>
<id>4561148</id>
<revision>
<id>680696824</id>
<parentid>680684124</parentid>
<timestamp>2015-09-12T16:05:30Z</timestamp>
<contributor>
<username>SiBr4</username>
<id>16981284</id>
</contributor>
<comment>Moved sandbox live to fix wrong output when substituted</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="3913" xml:space="preserve">{{{{{|safesubst:}}}#switch:none
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#time:Y_M_d|{{{1|}}} }} | none }} &lt;noinclude&gt;&lt;!-- #time: can't handle --&gt;&lt;/noinclude&gt;
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#expr: {{{1|}}}+0 }}
|&lt;noinclude&gt;&lt;!--not a pure number--&gt;&lt;/noinclude&gt;
|{{{{{|safesubst:}}}#ifexpr: {{{1|}}}+0 &gt; 10000000000000
|&lt;noinclude&gt;&lt;!-- a yyyymmddhhmmss timestamp --&gt;&lt;/noinclude&gt;
|{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}#expr:{{{1|}}}+0}} | {{{1|}}}
| none &lt;noinclude&gt;&lt;!-- pure number eg 123.456 --&gt;&lt;/noinclude&gt;
| &lt;noinclude&gt;&lt;!-- assume yy-mm-dd --&gt;&lt;/noinclude&gt;
}}
}}
}}
|{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc:{{{2|}}}}} | none | asis | link | lnone =none }}
|{{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#time:Y|{{{1|}}} }} &lt; 1000 | none }}
|{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
|= {{{{{|safesubst:}}}#if:{{{1|}}}
|{{{{{|safesubst:}}}#switch:{{{2}}}
|link|lnone|l=[[{{{1}}}]]
|{{{1}}}
}}
}}&lt;noinclude&gt;&lt;!-- error or "none", so no formatting --&gt;&lt;/noinclude&gt;
|&lt;noinclude&gt;&lt;!-- continue with formatting --&gt;&lt;/noinclude&gt;
{{{{{|safesubst:}}}#ifeq:&lt;noinclude&gt;&lt;!--
--&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:Y|{{{1}}} 2008}}&lt;noinclude&gt;&lt;!--
--&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#ifexpr: {{{1}}}&gt;10000000000000 | no }} | }}&lt;noinclude&gt;&lt;!--
--&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:Y|{{{1}}} 2004}}
|20082004
|&lt;noinclude&gt;&lt;!-- no year --&gt;&lt;/noinclude&gt;
{{{{{|safesubst:}}}#ifeq:{{{{{|safesubst:}}}#time:d|{{{1}}} 2036}}|{{{{{|safesubst:}}}#time:d|{{{1}}} }}
|&lt;noinclude&gt;&lt;!-- month+day --&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:
{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
| lmdy | liso | lymd = [[:F j]]
| mdy | iso | ymd = F j
| ldmy | l = [[:j F]]
| #default = j F
}}|{{{1}}} 2000 }}&lt;noinclude&gt;&lt;!-- default='dmy' or null or "" or unsupported option --&gt;&lt;/noinclude&gt;
|&lt;noinclude&gt;&lt;!-- month only --&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:
{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
| lmdy | liso | lymd
| ldmy | l = [[F]]
| #default = F
}}|{{{1}}} 2000 }}&lt;noinclude&gt;&lt;!-- default='dmy'/'mdy'/'ymd'/'iso'/null/""/unsupported opt --&gt;&lt;/noinclude&gt;
}}
|&lt;noinclude&gt;&lt;!-- with year--&gt;&lt;/noinclude&gt;
{{{{{|safesubst:}}}#if: {{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2 {{{1|}}}}}|*D*|{{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2000 {{{1|}}}}}|*D*| }}}}
|&lt;noinclude&gt;&lt;!-- day+month+year --&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:
{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
| lmdy = [[:F j]], [[Y]]
| mdy = F j, Y
| liso = [[Y|Y-]][[F j|m-d]]&lt;noinclude&gt;&lt;!-- i.e. [[Y-m-d]] --&gt;&lt;/noinclude&gt;
| iso = Y-m-d
| lymd = [[Y]] [[:F j]]
| ymd = Y F j
| ldmy | l = [[:j F]] [[Y]]
| #default = j F Y
}}|{{{1|}}} }}&lt;noinclude&gt;&lt;!-- #default='dmy' or null or "" or unsupported option --&gt;&lt;/noinclude&gt;
|&lt;noinclude&gt;&lt;!-- month+year --&gt;&lt;/noinclude&gt;{{{{{|safesubst:}}}#time:
{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
| lmdy | liso | lymd | ldmy | l = [[:F Y]]
| #default = F Y
}}|{{{1|}}} }}&lt;noinclude&gt;&lt;!-- default='dmy'/'iso'/'mdy'/null/""/unsupported option --&gt;&lt;/noinclude&gt;
}}
}}
}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>jxm2144lpkh9elnaxf686scqnmicx1z</sha1>
</revision>
</page>
<page>
<title>Template:Diff</title>
<ns>10</ns>
<id>10317200</id>
<revision>
<id>714526695</id>
<parentid>666508071</parentid>
<timestamp>2016-04-10T08:58:51Z</timestamp>
<contributor>
<username>Edokter</username>
<id>1624037</id>
</contributor>
<comment>Add title= to easy copy/paste of diff links</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="471" xml:space="preserve">&lt;span class="plainlinks"&gt;[{{#if:{{{title|{{{page|{{{1|}}}}}}}}}
|{{fullurl:{{{title|{{{page|{{{1}}}}}}}}}|{{#if:{{{diff|{{{2|}}}}}}
|diff={{trim|{{{diff|{{{2}}}}}}}}&amp;
}}oldid={{trim|{{{oldid|{{{3|}}}}}}}}}}
|{{SERVER}}{{SCRIPTPATH}}/index.php?title={{#if:{{{diff|{{{2|}}}}}}
|&amp;diff={{trim|{{{diff|{{{2}}}}}}}}
}}&amp;oldid={{trim|{{{oldid|{{{3|}}}}}}}}
}}{{#ifeq:{{{diffonly|}}}|yes|&amp;diffonly=1}} {{{label|{{{4|}}}}}}]&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>5wzn64ljt4oe5kygi2ud9mgme7as3lq</sha1>
</revision>
</page>
<page>
<title>Template:Documentation</title>
<ns>10</ns>
<id>13529042</id>
<revision>
<id>948472457</id>
<parentid>948472454</parentid>
<timestamp>2020-04-01T06:12:34Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="182" xml:space="preserve">{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}&lt;noinclude&gt;
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>o4ddn701tao1ufdnkxe1wdgz5b5ga84</sha1>
</revision>
</page>
<page>
<title>Template:Documentation subpage</title>
<ns>10</ns>
<id>7890381</id>
<revision>
<id>948474229</id>
<parentid>948472460</parentid>
<timestamp>2020-04-01T06:32:45Z</timestamp>
<contributor>
<username>DannyS712</username>
<id>34581532</id>
</contributor>
<comment>Reverted to revision 617432645 by [[Special:Contributions/Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]): Restoring ([[WP:TW|TW]])</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1667" xml:space="preserve">&lt;includeonly&gt;&lt;!--
--&gt;{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| &lt;!--(this template has been transcluded on a /doc or /{{{override}}} page)--&gt;
&lt;/includeonly&gt;&lt;!--
--&gt;{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.&lt;br /&gt;It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}.
}}
}}&lt;!--
--&gt;{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}&lt;!--
--&gt;{{#if:{{{inhibit|}}} |&lt;!--(don't categorize)--&gt;
| &lt;includeonly&gt;&lt;!--
--&gt;{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}&lt;!--
--&gt;&lt;/includeonly&gt;
}}&lt;!--
(completing initial #ifeq: at start of template:)
--&gt;&lt;includeonly&gt;
| &lt;!--(this template has not been transcluded on a /doc or /{{{override}}} page)--&gt;
}}&lt;!--
--&gt;&lt;/includeonly&gt;&lt;noinclude&gt;{{Documentation}}&lt;/noinclude&gt;</text>
<sha1>iwoex9r4jjje2jlwm8eygcyef0s6hzx</sha1>
</revision>
</page>
<page>
<title>Template:Em</title>
<ns>10</ns>
<id>28990025</id>
<revision>
<id>972058812</id>
<parentid>800858570</parentid>
<timestamp>2020-08-09T23:17:35Z</timestamp>
<contributor>
<username>Bsherr</username>
<id>4386431</id>
</contributor>
<minor/>
<comment>/* top */as found, replacing [[Template:Tld]] with [[Template:Tlc]] or adding/updating category placement comments, plus general and typo fixes</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="329" xml:space="preserve">&lt;em {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}&gt;{{{1}}}&lt;/em&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --&gt;
&lt;/noinclude&gt;</text>
<sha1>qihth5vbfna026aqh87kteifb1nb5ot</sha1>
</revision>
</page>
<page>
<title>Template:End</title>
<ns>10</ns>
<id>1098678</id>
<revision>
<id>971350488</id>
<parentid>971350149</parentid>
<timestamp>2020-08-05T15:49:50Z</timestamp>
<contributor>
<username>Alex 21</username>
<id>22194871</id>
</contributor>
<comment>sp</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="104" xml:space="preserve">&lt;includeonly&gt;
{{#if:{{{html|}}}|&lt;/table&gt;|{{!}}} }}&lt;/includeonly&gt;&lt;noinclude&gt;{{Documentation}}&lt;/noinclude&gt;</text>
<sha1>e72a44sr7wjge1scasd6vol1oavpqmy</sha1>
</revision>
</page>
<page>
<title>Template:Hatnote inline</title>
<ns>10</ns>
<id>42792474</id>
<revision>
<id>886308616</id>
<parentid>819682260</parentid>
<timestamp>2019-03-05T13:44:25Z</timestamp>
<contributor>
<username>Fish and karate</username>
<id>224548</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Hatnote inline]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="313" xml:space="preserve">{{Hatnote inline/invoke|1={{{1|{{{text|{{{content}}}}}}}}}|extraclasses={{{class|{{{extraclasses|}}}}}}|selfref={{#if:{{{printworthy|{{{selfref|}}}}}}||yes}}|category={{{category|}}}|inline=true}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>d1mkan8k04vxp11qm5ojh1p847rwvwf</sha1>
</revision>
</page>
<page>
<title>Template:Hatnote inline/invoke</title>
<ns>10</ns>
<id>42799349</id>
<revision>
<id>819682238</id>
<parentid>725826535</parentid>
<timestamp>2018-01-10T18:59:05Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Hatnote inline/invoke]]": [[WP:SEMI|semi-protecting]] highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="170" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Hatnote inline|hatnote}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation|content=This is an includeonly part of [[Template:Hatnote inline]].}}&lt;/noinclude&gt;</text>
<sha1>m1z1xbnw86i1o2sdaq1aetcb7vbbg8j</sha1>
</revision>
</page>
<page>
<title>Template:High-use</title>
<ns>10</ns>
<id>17406187</id>
<revision>
<id>928975377</id>
<parentid>896247865</parentid>
<timestamp>2019-12-02T21:41:25Z</timestamp>
<contributor>
<username>Ahecht</username>
<id>2016996</id>
</contributor>
<comment>Use [[Module:High-use]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="276" xml:space="preserve">{{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|all-pages={{{all-pages|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}}}&lt;noinclude&gt;
{{Documentation}}
&lt;!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --&gt;
&lt;/noinclude&gt;</text>
<sha1>irrlemrylj34lyo95ruko5p2ows0l5r</sha1>
</revision>
</page>
<page>
<title>Template:Infobox</title>
<ns>10</ns>
<id>891845</id>
<revision>
<id>855069164</id>
<parentid>855063393</parentid>
<timestamp>2018-08-15T18:33:36Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<comment>Undid revision 855063393 by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) rather problematic change mentioned [[Template_talk:Infobox#Using_template_styles_to_reduce_technical_debt_inside_mobile_skin|on talk page]], reverting until it can be sorted</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="340" xml:space="preserve">{{#invoke:Infobox|infobox}}&lt;includeonly&gt;{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>f4hgwrnr11ahhwyo266vcd10dpi92pe</sha1>
</revision>
</page>
<page>
<title>Template:Lang</title>
<ns>10</ns>
<id>1430094</id>
<revision>
<id>984354947</id>
<parentid>975823474</parentid>
<timestamp>2020-10-19T17:49:42Z</timestamp>
<contributor>
<username>Gonnym</username>
<id>14984434</id>
</contributor>
<minor/>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="99" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Lang|{{{fn|lang}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>rpiilobim1eh22a50sfaaeqssz4iwxu</sha1>
</revision>
</page>
<page>
<title>Template:Lua</title>
<ns>10</ns>
<id>38752725</id>
<revision>
<id>888711835</id>
<parentid>886057621</parentid>
<timestamp>2019-03-20T22:04:45Z</timestamp>
<contributor>
<username>RMCD bot</username>
<id>17216044</id>
</contributor>
<comment>Removing notice of move discussion</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="196" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Lua banner|main}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Lua|Module:Lua banner}}
{{documentation}}
&lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>pnmjp3f3fl321yf2jpg5syebi412n7b</sha1>
</revision>
</page>
<page>
<title>Template:Main other</title>
<ns>10</ns>
<id>17220251</id>
<revision>
<id>388689011</id>
<parentid>334818505</parentid>
<timestamp>2010-10-04T14:46:48Z</timestamp>
<contributor>
<username>WOSlinker</username>
<id>3138265</id>
</contributor>
<comment>remove {{pp-template}}</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="409" xml:space="preserve">{{#switch:
&lt;!--If no or empty "demospace" parameter then detect namespace--&gt;
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} &lt;!--Use lower case "demospace"--&gt;
| {{#ifeq:{{NAMESPACE}}|{{ns:0}}
| main
| other
}}
}}
| main = {{{1|}}}
| other
| #default = {{{2|}}}
}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>ngt28vb1n5t4bh1su57btnqyofkd1d5</sha1>
</revision>
</page>
<page>
<title>Template:Markup2</title>
<ns>10</ns>
<id>41949964</id>
<revision>
<id>718989345</id>
<parentid>631059056</parentid>
<timestamp>2016-05-06T21:37:41Z</timestamp>
<contributor>
<username>Wugapodes</username>
<id>24484530</id>
</contributor>
<comment>fixing problem where first bullet renders as * when title is given</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="356" xml:space="preserve">{{#if: {{{t|}}}|'''{{{t|}}}'''
*&lt;code&gt;{{{m|}}}&lt;/code&gt;
:{{{r|}}}|*&lt;code&gt;{{{m|}}}&lt;/code&gt;
:{{{r|}}}}}{{#if: {{{m2|}}}|
*&lt;code&gt;{{{m2|}}}&lt;/code&gt;
:{{{r2|}}}}}{{#if: {{{m3|}}}|
*&lt;code&gt;{{{m3|}}}&lt;/code&gt;
:{{{r3|}}}}}{{#if: {{{m4|}}}|
*&lt;code&gt;{{{m4|}}}&lt;/code&gt;
:{{{r4|}}}}}{{#if: {{{m5|}}}|
*&lt;code&gt;{{{m5|}}}&lt;/code&gt;
:{{{r5|}}}}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>7xlv46sy254fi18c80dzycem7st84j6</sha1>
</revision>
</page>
<page>
<title>Template:Mbox</title>
<ns>10</ns>
<id>13319244</id>
<revision>
<id>874063565</id>
<parentid>772147376</parentid>
<timestamp>2018-12-16T22:16:17Z</timestamp>
<contributor>
<username>Amorymeltzer</username>
<id>141948</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Mbox]]": [[WP:High-risk templates|Highly visible template]]: 1M transclusions, used in the interface, cascade protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="145" xml:space="preserve">{{#invoke:Message box|mbox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>mpflpb6s8l8gaoxaeypyuqyu2w7vc7i</sha1>
</revision>
</page>
<page>
<title>Template:MediaWiki URL rules</title>
<ns>10</ns>
<id>35595705</id>
<revision>
<id>986941041</id>
<parentid>983558289</parentid>
<timestamp>2020-11-03T21:50:06Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>uppercase stands out better</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1214" xml:space="preserve">URLs must begin with a supported [[URI scheme]]. &lt;code&gt;http://&lt;/code&gt; and &lt;code&gt;https://&lt;/code&gt; will be supported by all browsers; however, &lt;code&gt;ftp://&lt;/code&gt;, &lt;code&gt;gopher://&lt;/code&gt;, &lt;code&gt;irc://&lt;/code&gt;, &lt;code&gt;ircs://&lt;/code&gt;, &lt;code&gt;mailto:&lt;/code&gt; and &lt;code&gt;news:&lt;/code&gt; may require a plug-in or an external application and should normally be avoided. [[IPv6]] host-names are currently not supported.
If URLs in [[Wikipedia:Citation_templates#Examples|citation template parameters]] contain certain characters, then they will not display and link correctly. Those characters need to be [[percent-encoded]]. For example, a space must be replaced by &lt;code&gt;%20&lt;/code&gt;. To encode the URL, replace the following characters with:
{| class="wikitable"
! space !! " !! ' !! &lt; !! &gt; !! [ !! ] !! { !! &lt;nowiki&gt;|&lt;/nowiki&gt; !! }
|-
|| %20 || %22 || %27 || %3C || %3E || %5B || %5D || %7B || %7C || %7D
|}
Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>dej52ym2c2zcigklaiupo0eauis4844</sha1>
</revision>
</page>
<page>
<title>Template:NCJ</title>
<ns>10</ns>
<id>8000544</id>
<revision>
<id>954627886</id>
<parentid>953279552</parentid>
<timestamp>2020-05-03T13:00:45Z</timestamp>
<contributor>
<username>Francis Schonken</username>
<id>85402</id>
</contributor>
<comment>Undid revision 953279552 by [[Special:Contributions/Matthiaspaul|Matthiaspaul]] ([[User talk:Matthiaspaul|talk]]) undoing unhelpful edit for reasons explained at [[Help talk:Citation Style 1#Link to ISMN not going through identifier redirect]] for another similar case</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="159" xml:space="preserve">[[National Criminal Justice Reference Service|NCJ]] [//www.ncjrs.gov/App/Publications/abstract.aspx?ID={{{1}}} {{{1}}}]&lt;noinclude&gt;{{documentation}}&lt;/noinclude&gt;</text>
<sha1>8pls5wi0ax8g6ia84h99uivkf1w7rxt</sha1>
</revision>
</page>
<page>
<title>Template:Navbox</title>
<ns>10</ns>
<id>995954</id>
<revision>
<id>948472467</id>
<parentid>630098073</parentid>
<timestamp>2020-04-01T06:12:36Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="94" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Navbox|navbox}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>tqodcaa2vvhehqaod229udlla0wimek</sha1>
</revision>
</page>
<page>
<title>Template:NotRef</title>
<ns>10</ns>
<id>63874303</id>
<revision>
<id>986382964</id>
<parentid>986380840</parentid>
<timestamp>2020-10-31T14:21:59Z</timestamp>
<contributor>
<username>Daask</username>
<id>24247980</id>
</contributor>
<comment>Categorize</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="623" xml:space="preserve">This {{#ifeq: {{FULLPAGENAME}} | Wikipedia:External links |guideline|guidance}} does not restrict linking to websites that are being used as [[Wikipedia:Citing sources|sources]] to provide content in articles.&lt;noinclude&gt;{{documentation|content=
:Text of the caveat, which applies to guidance preferring free content as target for external links above web resources with a more restricted access (including subscription, registration, or otherwise limited access).
:This caveat is used multiple times in the [[WP:EL]] guidance.
}}
[[Category:Shared content templates]]
[[Category:Wikipedia namespace templates]]
&lt;/noinclude&gt;</text>
<sha1>hi3c09muq830ptn2p9wdaimhb5id9zs</sha1>
</revision>
</page>
<page>
<title>Template:Nowrap</title>
<ns>10</ns>
<id>1627975</id>
<revision>
<id>692794261</id>
<parentid>462345338</parentid>
<timestamp>2015-11-28T10:13:53Z</timestamp>
<contributor>
<username>Edokter</username>
<id>1624037</id>
</contributor>
<comment>Adapt comment; edits inside noinclude blocks should not affect job queue, but won't kill parser either way.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="145" xml:space="preserve">&lt;span class="nowrap"&gt;{{{1}}}&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc page; interwikis go to Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>avb5tcymgupik1ikutqclidkj9tnitx</sha1>
</revision>
</page>
<page>
<title>Template:Ombox</title>
<ns>10</ns>
<id>17522403</id>
<revision>
<id>948472472</id>
<parentid>948472468</parentid>
<timestamp>2020-04-01T06:12:36Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="146" xml:space="preserve">{{#invoke:Message box|ombox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>1o93yrjvq6v2ylug2k0uaaltljurje2</sha1>
</revision>
</page>
<page>
<title>Template:Para</title>
<ns>10</ns>
<id>16639086</id>
<revision>
<id>948472476</id>
<parentid>936054140</parentid>
<timestamp>2020-04-01T06:12:37Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="584" xml:space="preserve">&lt;code class="nowrap" style="{{SAFESUBST:&lt;noinclude /&gt;#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:&lt;noinclude /&gt;#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:&lt;noinclude /&gt;#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:&lt;noinclude /&gt;#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:&lt;noinclude /&gt;#if:{{{style|}}}|{{{style}}}}}"&gt;&amp;#124;{{SAFESUBST:&lt;noinclude /&gt;#if:{{{1|}}}|{{{1}}}&amp;#61;}}{{{2|}}}&lt;/code&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;!--Categories and interwikis go near the bottom of the /doc subpage.--&gt;
&lt;/noinclude&gt;</text>
<sha1>hmpn0o2dcw0l4w04g6qz1zzyrrqvv3i</sha1>
</revision>
</page>
<page>
<title>Template:Paren</title>
<ns>10</ns>
<id>34625646</id>
<revision>
<id>575048223</id>
<parentid>475492581</parentid>
<timestamp>2013-09-29T20:51:45Z</timestamp>
<contributor>
<username>Funandtrvl</username>
<id>2966869</id>
</contributor>
<comment>fx fmt</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="316" xml:space="preserve">[[Wikipedia:Parenthetical referencing|{{#ifeq:{{{lc}}}|{{{lc|}}}|parenthetical referencing|Parenthetical referencing}}]]&lt;noinclude&gt;{{documentation|content=
==Usage==
===Optional===
For the first letter to be in lower case, use:
{{para|lc|&lt;var&gt;y&lt;/var&gt;}}
}}
[[Category:Documentation assistance templates]]
&lt;/noinclude&gt;</text>
<sha1>lbo8pmvijutb03hj6ovwnswic8o5249</sha1>
</revision>
</page>
<page>
<title>Template:Pipe</title>
<ns>10</ns>
<id>1777405</id>
<revision>
<id>755400761</id>
<parentid>755376313</parentid>
<timestamp>2016-12-17T20:27:39Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>restore noinclude opening tag;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="118" xml:space="preserve">&amp;#124;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>kmi2ihjyu3iil3vg34b15lfs08flqjm</sha1>
</revision>
</page>
<page>
<title>Template:Purge</title>
<ns>10</ns>
<id>1188537</id>
<revision>
<id>772120883</id>
<parentid>662264785</parentid>
<timestamp>2017-03-25T12:38:46Z</timestamp>
<contributor>
<username>Jo-Jo Eumerus</username>
<id>17449355</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Purge]]": Allowing template editors on some templates with full protection dating back to pre-[[WP:TPROT|TPROT]] times which aren't too often or too sensitively used. ([Edit=Require template editor access] (inde...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="64" xml:space="preserve">{{#invoke:Purge|main}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>jp4ln3hv505tbr6kcpy61x7wo9joahj</sha1>
</revision>
</page>
<page>
<title>Template:R</title>
<ns>10</ns>
<id>24429562</id>
<revision>
<id>827245572</id>
<parentid>810555122</parentid>
<timestamp>2018-02-23T16:30:18Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:R]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1544" xml:space="preserve">&lt;includeonly&gt;{{r/ref|{{{1}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p|{{{p1|{{{page|{{{page1|{{{pp|{{{pp1|{{{pages|{{{pages1|}}}}}}}}}}}}}}}}}}}}}}}}|{{{q|{{{q1|{{{quote|{{{quote1|}}}}}}}}}}}}}}&lt;!--
--&gt;{{#if:{{{2|}}}|{{r/ref|{{{2}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p2|{{{page2|{{{pp2|{{{pages2|}}}}}}}}}}}}|{{{q2|{{{quote2|}}}}}}}}&lt;!--
--&gt;{{#if:{{{3|}}}|{{r/ref|{{{3}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p3|{{{page3|{{{pp3|{{{pages3|}}}}}}}}}}}}|{{{q3|{{{quote3|}}}}}}}}&lt;!--
--&gt;{{#if:{{{4|}}}|{{r/ref|{{{4}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p4|{{{page4|{{{pp4|{{{pages4|}}}}}}}}}}}}|{{{q4|{{{quote4|}}}}}}}}&lt;!--
--&gt;{{#if:{{{5|}}}|{{r/ref|{{{5}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p5|{{{page5|{{{pp5|{{{pages5|}}}}}}}}}}}}|{{{q5|{{{quote5|}}}}}}}}&lt;!--
--&gt;{{#if:{{{6|}}}|{{r/ref|{{{6}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p6|{{{page6|{{{pp6|{{{pages6|}}}}}}}}}}}}|{{{q6|{{{quote6|}}}}}}}}&lt;!--
--&gt;{{#if:{{{7|}}}|{{r/ref|{{{7}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p7|{{{page7|{{{pp7|{{{pages7|}}}}}}}}}}}}|{{{q7|{{{quote7|}}}}}}}}&lt;!--
--&gt;{{#if:{{{8|}}}|{{r/ref|{{{8}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p8|{{{page8|{{{pp8|{{{pages8|}}}}}}}}}}}}|{{{q8|{{{quote8|}}}}}}}}&lt;!--
--&gt;{{#if:{{{9|}}}|{{r/ref|{{{9}}}|{{{group|{{{grp|{{{g|}}}}}}}}}|{{{p9|{{{page9|{{{pp9|{{{pages9|}}}}}}}}}}}}|{{{q9|{{{quote9|}}}}}}}}&lt;!--
--&gt;{{#if:{{{10|}}}|&lt;sup class="error" style="font-size:0.9em; line-height:0;"&gt;The template only supports up to 9 references ([[Template:R|edit it]]!).&lt;/sup&gt; &lt;!--
--&gt;}}}}}}}}}}}}}}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;{{documentation}}&lt;/noinclude&gt;</text>
<sha1>ow3nzadiiajc7r5h53otz5a7c9m2zby</sha1>
</revision>
</page>
<page>
<title>Template:R/ref</title>
<ns>10</ns>
<id>24472967</id>
<revision>
<id>891472252</id>
<parentid>827245576</parentid>
<timestamp>2019-04-08T04:53:44Z</timestamp>
<contributor>
<username>JJMC89</username>
<id>24812038</id>
</contributor>
<comment>moved to /doc</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="339" xml:space="preserve">&lt;includeonly&gt;{{#tag:ref||name={{{1}}}|group={{{2}}}}}{{#if:{{{3}}}|&lt;sup class="reference nowrap"&gt;&lt;nowiki&gt;:&lt;/nowiki&gt;&lt;span {{#if:{{{4|}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{4}}}}}|"|&amp;quot;}}}}"'}}&gt;{{{3}}}&lt;/span&gt;&lt;/sup&gt;}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>scr0fgblbhninwhssxfzty1wgn8iyyx</sha1>
</revision>
</page>
<page>
<title>Template:Reflist</title>
<ns>10</ns>
<id>7585648</id>
<revision>
<id>794499661</id>
<parentid>794499298</parentid>
<timestamp>2017-08-08T12:05:27Z</timestamp>
<contributor>
<username>Anomie</username>
<id>301903</id>
</contributor>
<comment>Please stop, you apparently don't know what you're doing here and shouldn't fool around with heavily-used live templates. I'll post an explanation to the talk page momentarily.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1008" xml:space="preserve">&lt;div class="reflist &lt;!--
--&gt;{{#if: {{{1|}}} {{{colwidth|}}}
| columns references-column-width
}}" style="&lt;!--
--&gt;{{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1|1}}} &gt; 1 }}
| {{column-width|1={{{1}}}}}
| {{#switch:{{{1|}}}|1=|2={{column-width|1=30em}}|#default={{column-width|1=25em}}}} }}
| {{#if: {{{colwidth|}}}
| {{column-width|1={{{colwidth}}}}} }} }} list-style-type: &lt;!--
--&gt;{{{liststyle|{{#switch: {{{group|}}}
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = {{{group}}}
| #default = decimal}}}}};"&gt;
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}&lt;/div&gt;{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>2k096ppl7lxbcjqmfluu9x2sc91rmzl</sha1>
</revision>
</page>
<page>
<title>Template:Sandbox other</title>
<ns>10</ns>
<id>48540583</id>
<revision>
<id>948779760</id>
<parentid>929909975</parentid>
<timestamp>2020-04-03T00:08:09Z</timestamp>
<contributor>
<username>Evad37</username>
<id>16958448</id>
</contributor>
<comment>Also match subpage names beginning with "sandbox", per [[Template_talk:Sandbox_other#Template-protected_edit_request_on_28_March_2020|edit request]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="260" xml:space="preserve">{{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}&lt;!--
--&gt;&lt;noinclude&gt;{{documentation}}&lt;/noinclude&gt;</text>
<sha1>h1idujwaw20aducxsd1gc4ovgnjikqa</sha1>
</revision>
</page>
<page>
<title>Template:Section link</title>
<ns>10</ns>
<id>33237980</id>
<revision>
<id>760447925</id>
<parentid>760441175</parentid>
<timestamp>2017-01-17T01:29:39Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<comment>done</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="146" xml:space="preserve">{{#invoke:Section link|main}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>gh09dld5dhux6n50izjp2r31i71ye17</sha1>
</revision>
</page>
<page>
<title>Template:Sfnote</title>
<ns>10</ns>
<id>34625418</id>
<revision>
<id>821204088</id>
<parentid>587083872</parentid>
<timestamp>2018-01-19T00:33:22Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Sfnote]]": [[WP:SEMIPROT|semi-protection]] of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="137" xml:space="preserve">[[Help:Shortened footnotes|{{#ifeq:{{{lc}}}|{{{lc|}}}|shortened footnotes|Shortened footnotes}}]]&lt;noinclude&gt;{{documentation}}&lt;/noinclude&gt;</text>
<sha1>8hi4n62s2wu8csuwiwtqpnjpb36dofn</sha1>
</revision>
</page>
<page>
<title>Template:Slink</title>
<ns>10</ns>
<id>46738904</id>
<redirect title="Template:Section link" />
<revision>
<id>819682735</id>
<parentid>800219769</parentid>
<timestamp>2018-01-10T18:59:44Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Slink]]": [[WP:SEMI|semi-protecting]] highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefin...</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="101" xml:space="preserve">#REDIRECT [[Template:Section link]]
{{Rcat shell|{{R from template shortcut}}{{R from short name}}}}</text>
<sha1>rxsqtl2bid5ld047zo0nwjyyagc5wz1</sha1>
</revision>
</page>
<page>
<title>Template:Str left</title>
<ns>10</ns>
<id>21696393</id>
<revision>
<id>741880261</id>
<parentid>605122708</parentid>
<timestamp>2016-09-30T07:01:19Z</timestamp>
<contributor>
<username>Ymblanter</username>
<id>14596827</id>
</contributor>
<minor/>
<comment>Changed protection level of Template:Str left: [[WP:High-risk templates|Highly visible template]]: RFPP request ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="184" xml:space="preserve">&lt;includeonly&gt;{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>3rrdme1fpv80h1kdk9b7zwlkqd34dfk</sha1>
</revision>
</page>
<page>
<title>Template:Sup</title>
<ns>10</ns>
<id>825724</id>
<revision>
<id>979862250</id>
<parentid>973308872</parentid>
<timestamp>2020-09-23T06:24:01Z</timestamp>
<contributor>
<username>RMCD bot</username>
<id>17216044</id>
</contributor>
<comment>Removing notice of move discussion</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="151" xml:space="preserve">&lt;includeonly&gt;&lt;sup&gt;{{{1}}}&lt;/sup&gt;&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add cats and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>p7jtnmtnj3q8sxqqsv78o732eq15smw</sha1>
</revision>
</page>
<page>
<title>Template:Tag</title>
<ns>10</ns>
<id>7252577</id>
<revision>
<id>852104887</id>
<parentid>848709005</parentid>
<timestamp>2018-07-26T17:17:13Z</timestamp>
<contributor>
<username>SMcCandlish</username>
<id>378390</id>
</contributor>
<comment>These are called attributes; no one who does HTML calls them "parameters".</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="835" xml:space="preserve">&lt;code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"&gt;&lt;!--
Opening tag
--&gt;{{#switch:{{{2|pair}}}
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = &amp;lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&amp;#32;{{{params|{{{attribs}}}}}}}}
}}&lt;!--
Content between tags
--&gt;{{#switch:{{{2|pair}}}
|c|close = {{{content|}}}
|e|empty|s|single|v|void = &amp;#32;&amp;#47;&amp;gt;
|o|open = &amp;gt;{{{content|}}}
|p|pair = {{#ifeq:{{{1|tag}}}|!--||&amp;gt;}}{{{content|...}}}
}}&lt;!--
Closing tag
--&gt;{{#switch:{{{2|pair}}}
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:{{{1|tag}}}|!--|--&amp;gt;|&amp;lt;&amp;#47;{{{1|tag}}}&amp;gt;}}
}}&lt;!--
--&gt;&lt;/code&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>rfqa950ndrmgt6ozaa81dwgyr2n28ea</sha1>
</revision>
</page>
<page>
<title>Template:TemplateData header</title>
<ns>10</ns>
<id>40047498</id>
<revision>
<id>948980340</id>
<parentid>947647257</parentid>
<timestamp>2020-04-04T01:28:43Z</timestamp>
<contributor>
<username>Evad37</username>
<id>16958448</id>
</contributor>
<comment>Replace {{Template error report}} with {{Template parameter usage}} – per [[Template_talk:TemplateData_header#Template-protected_edit_request_on_2_April_2020|edit request]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1071" xml:space="preserve">&lt;div class="templatedata-header"&gt;{{#if:{{{noheader|}}}|&lt;!--
noheader:
--&gt;{{Template parameter usage}}|&lt;!--
+header:
--&gt;This is the {{#if:{{{nolink|}}}|&lt;!--
+header, nolink TD
--&gt;TemplateData|&lt;!--
+header, +link [[TD]]; DEFAULT:
--&gt;[[Wikipedia:TemplateData|TemplateData]]}}&lt;!--
e.o. #if:nolink; DEFAULT:
--&gt; documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools; {{Template parameter usage|lc=yes}}&lt;!--
e.o. #if:noheader
--&gt;}}
'''TemplateData for {{{1|{{BASEPAGENAME}}}}}'''
&lt;/div&gt;&lt;includeonly&gt;&lt;!--
check parameters
--&gt;{{#invoke:Check for unknown parameters|check
|unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}}
|template=Template:TemplateData header
|1 |nolink |noheader
|preview=&lt;div class="error" style="font-weight:normal"&gt;Unknown parameter '_VALUE_' in [[Template:TemplateData header]].&lt;/div&gt;
}}&lt;!--
--&gt;{{template other|{{sandbox other||
[[Category:Templates using TemplateData]]
}}}}&lt;/includeonly&gt;&lt;!--
--&gt;&lt;noinclude&gt;{{Documentation}}&lt;/noinclude&gt;</text>
<sha1>1nfml12ojtxh0l65pjhlb0pfq55ejy3</sha1>
</revision>
</page>
<page>
<title>Template:Template link with link off</title>
<ns>10</ns>
<id>16451586</id>
<revision>
<id>950726702</id>
<parentid>950726194</parentid>
<timestamp>2020-04-13T14:42:57Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<minor/>
<comment>Primefac moved page [[Template:Tlf]] to [[Template:Template link with link off]]: full name to indicate what it does</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="710" xml:space="preserve">{{Tlg|nowrap=yes|nolink=yes|subst={{{subst|}}}|{{{1|}}}&lt;!--
--&gt;|2{{#ifeq:{{{2}}}|{{{2|x}}}||x}}={{{2}}}&lt;!--
--&gt;|3{{#ifeq:{{{3}}}|{{{3|x}}}||x}}={{{3}}}&lt;!--
--&gt;|4{{#ifeq:{{{4}}}|{{{4|x}}}||x}}={{{4}}}&lt;!--
--&gt;|5{{#ifeq:{{{5}}}|{{{5|x}}}||x}}={{{5}}}&lt;!--
--&gt;|6{{#ifeq:{{{6}}}|{{{6|x}}}||x}}={{{6}}}&lt;!--
--&gt;|7{{#ifeq:{{{7}}}|{{{7|x}}}||x}}={{{7}}}&lt;!--
--&gt;|8{{#ifeq:{{{8}}}|{{{8|x}}}||x}}={{{8}}}&lt;!--
--&gt;|9{{#ifeq:{{{9}}}|{{{9|x}}}||x}}={{{9}}}&lt;!--
--&gt;|10{{#ifeq:{{{10}}}|{{{10|x}}}||x}}={{{10}}}&lt;!--
--&gt;|11{{#ifeq:{{{11}}}|{{{11|x}}}||x}}={{{11}}}&lt;!--
--&gt;|12{{#ifeq:{{{12}}}|{{{12|x}}}||x}}={{{12}}}}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc sub-page, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>fkwut59rh3dw297vmoghk9vvheiut49</sha1>
</revision>
</page>
<page>
<title>Template:Template other</title>
<ns>10</ns>
<id>21418395</id>
<revision>
<id>874062289</id>
<parentid>774731050</parentid>
<timestamp>2018-12-16T22:06:25Z</timestamp>
<contributor>
<username>Amorymeltzer</username>
<id>141948</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Template other]]": [[WP:High-risk templates|Highly visible template]]: Transclusion count has increased dramatically ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="435" xml:space="preserve">{{#switch:
&lt;!--If no or empty "demospace" parameter then detect namespace--&gt;
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} &lt;!--Use lower case "demospace"--&gt;
| {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
| template
| other
}}
}}
| template = {{{1|}}}
| other
| #default = {{{2|}}}
}}&lt;!--End switch--&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>0tcssjmltwl7y5v3f5wj2kqciaabqly</sha1>
</revision>
</page>
<page>
<title>Template:Template parameter usage</title>
<ns>10</ns>
<id>51792646</id>
<revision>
<id>948719083</id>
<parentid>948673131</parentid>
<timestamp>2020-04-02T17:20:07Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>no need for upper case; "monthly" should not have been removed, since the reports are generated monthly.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="988" xml:space="preserve">{{#switch:{{{label|}}}
|={{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee the monthly [https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&amp;template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&amp;template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} Parameter usage report]
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&amp;template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} Parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}.
|#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&amp;template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]
}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>nys7rq3f7mo5i0jg8le26o25eif0tt9</sha1>
</revision>
</page>
<page>
<title>Template:Tl</title>
<ns>10</ns>
<id>1487430</id>
<revision>
<id>948474337</id>
<parentid>948472478</parentid>
<timestamp>2020-04-01T06:33:49Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<comment>Undid revision 948472477 by [[Special:Contributions/w&gt;Billinghurst|w&gt;Billinghurst]] ([[User talk:w&gt;Billinghurst|talk]])</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="168" xml:space="preserve">&amp;#123;&amp;#123;[[Template:{{{1}}}|{{{1}}}]]&amp;#125;&amp;#125;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>h0vr3yvr9jdyd17x82vnav21ngwmxuk</sha1>
</revision>
</page>
<page>
<title>Template:Tlf</title>
<ns>10</ns>
<id>63645417</id>
<redirect title="Template:Template link with link off" />
<revision>
<id>950726704</id>
<timestamp>2020-04-13T14:42:57Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<comment>Primefac moved page [[Template:Tlf]] to [[Template:Template link with link off]]: full name to indicate what it does</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="97" xml:space="preserve">#REDIRECT [[Template:Template link with link off]]
{{Redirect category shell|
{{R from move}}
}}</text>
<sha1>9mrb4gzoa8i94zzxq5i6opzke6v5ntr</sha1>
</revision>
</page>
<page>
<title>Template:Tlg</title>
<ns>10</ns>
<id>31734151</id>
<revision>
<id>952298401</id>
<parentid>942277201</parentid>
<timestamp>2020-04-21T14:55:14Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>update from sandbox, per talk page</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="62" xml:space="preserve">{{#Invoke:Tlg|main}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>lzp4kn7ui0gm80auun61tr0zlefr1zx</sha1>
</revision>
</page>
<page>
<title>Template:Tlx</title>
<ns>10</ns>
<id>4497810</id>
<revision>
<id>977680720</id>
<parentid>948472481</parentid>
<timestamp>2020-09-10T09:05:33Z</timestamp>
<contributor>
<username>MSGJ</username>
<id>42630</id>
</contributor>
<comment>accept lowercase parameters, track usage of uppercase variants, remove excessive whitespace</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1166" xml:space="preserve">&lt;code&gt;&lt;nowiki&gt;{{&lt;/nowiki&gt;{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}&lt;!--
--&gt;[[{{{lang|{{{LANG|}}}}}}{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]&lt;!--
--&gt;{{#if:{{{2|}}} |&amp;#124;{{{2}}}}}&lt;!--
--&gt;{{#if:{{{3|}}} |&amp;#124;{{{3}}}}}&lt;!--
--&gt;{{#if:{{{4|}}} |&amp;#124;{{{4}}}}}&lt;!--
--&gt;{{#if:{{{5|}}} |&amp;#124;{{{5}}}}}&lt;!--
--&gt;{{#if:{{{6|}}} |&amp;#124;{{{6}}}}}&lt;!--
--&gt;{{#if:{{{7|}}} |&amp;#124;{{{7}}}}}&lt;!--
--&gt;{{#if:{{{8|}}} |&amp;#124;{{{8}}}}}&lt;!--
--&gt;{{#if:{{{9|}}} |&amp;#124;{{{9}}}}}&lt;!--
--&gt;{{#if:{{{10|}}} |&amp;#124;{{{10}}}}}&lt;!--
--&gt;{{#if:{{{11|}}} |&amp;#124;{{{11}}}}}&lt;!--
--&gt;{{#if:{{{12|}}} |&amp;#124;{{{12}}}}}&lt;!--
--&gt;{{#if:{{{13|}}} |&amp;#124;{{{13}}}}}&lt;!--
--&gt;{{#if:{{{14|}}} |&amp;#124;{{{14}}}}}&lt;!--
--&gt;{{#if:{{{15|}}} |&amp;#124;{{{15}}}}}&lt;!--
--&gt;{{#if:{{{16|}}} |&amp;#124;{{{16}}}}}&lt;!--
--&gt;{{#if:{{{17|}}} |&amp;#124;{{{17}}}}}&lt;!--
--&gt;{{#if:{{{18|}}} |&amp;#124;{{{18}}}}}&lt;!--
--&gt;{{#if:{{{19|}}} |&amp;#124;{{{19}}}}}&lt;!--
--&gt;{{#if:{{{20|}}} |&amp;#124;{{{20}}}}}&lt;!--
--&gt;{{#if:{{{21|}}} |&amp;#124;''...''}}&lt;!--
--&gt;&lt;nowiki&gt;}}&lt;/nowiki&gt;&lt;/code&gt;{{#if: {{{LANG|}}} | {{Z181}} | {{#if: {{{SISTER|}}} | {{Z181}} }} }}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>1zx1keyq77wroc6nnxhxbv49on9i1og</sha1>
</revision>
</page>
<page>
<title>Template:Trim</title>
<ns>10</ns>
<id>21815705</id>
<revision>
<id>668935791</id>
<parentid>412919929</parentid>
<timestamp>2015-06-27T18:27:45Z</timestamp>
<contributor>
<username>Plastikspork</username>
<id>5075409</id>
</contributor>
<comment>Merging [[Template:Strip whitespace]] per TfD</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="114" xml:space="preserve">&lt;includeonly&gt;{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>h9devvk8f6nt34tp7zb17s39ge5wquh</sha1>
</revision>
</page>
<page>
<title>Template:UF-COinS</title>
<ns>10</ns>
<id>12514523</id>
<revision>
<id>581340912</id>
<parentid>547588552</parentid>
<timestamp>2013-11-12T15:14:21Z</timestamp>
<contributor>
<username>Salton Finneger</username>
<id>20093492</id>
</contributor>
<comment>Add documentation link</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="309" xml:space="preserve">''This template produces [[w:COinS|COinS]] metadata; see [[Wikipedia:COinS|COinS in Wikipedia]] for background information.''&lt;includeonly&gt;[[Category:Templates generating COinS|{{PAGENAME}}]]&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!--Categories--&gt;
[[Category:Templates generating COinS| ]]
&lt;/noinclude&gt;</text>
<sha1>1n3rm9n7cdau9vmi62cqpw4slpm8k1c</sha1>
</revision>
</page>
<page>
<title>Template:Var</title>
<ns>10</ns>
<id>19311880</id>
<revision>
<id>816459039</id>
<parentid>684205355</parentid>
<timestamp>2017-12-21T13:31:52Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>nix xml lang invocation</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="322" xml:space="preserve">&lt;var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}&gt;{{{1}}}&lt;/var&gt;&lt;noinclude&gt;
&lt;!--Categories and interwikis go near the bottom of the /doc page.--&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>1ph0r212s7cz1dvg2q4quotqwsozpa8</sha1>
</revision>
</page>
<page>
<title>Template:Warning</title>
<ns>10</ns>
<id>3567077</id>
<revision>
<id>945359519</id>
<parentid>885089471</parentid>
<timestamp>2020-03-13T13:19:12Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>per tper</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1102" xml:space="preserve">{{Mbox
| name = Warning
| demospace = {{{demospace|}}}
| style = {{#if:{{{style|}}} |{{#if:{{{small|}}}||width:80%;}} {{{style}}} }}
| subst = &lt;includeonly&gt;{{subst:substcheck}}&lt;/includeonly&gt;
| type = content
| image = {{#if:{{{image|}}}| [[File:{{{image}}}|{{{imagesize|40px}}}|Warning]] }}
| small = {{{small|}}}
| smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Warning]]}}
| imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }}
| textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}}
| text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |&lt;div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}"&gt;'''{{{header|{{{heading|{{{title|}}}}}}}}}'''&lt;/div&gt;}}&lt;!--
--&gt;{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}}
}}&lt;noinclude&gt;
&lt;!-- Add categories to the /doc subpage; interwikis go to Wikidata. --&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>ccd5wh93blf8ugbbitkytz4k94h0llk</sha1>
</revision>
</page>
<page>
<title>Template:Wikipedia referencing</title>
<ns>10</ns>
<id>33126075</id>
<revision>
<id>977907521</id>
<parentid>977533053</parentid>
<timestamp>2020-09-11T18:13:45Z</timestamp>
<contributor>
<username>Biogeographist</username>
<id>18201938</id>
</contributor>
<comment>removed link from "Deprecated" group name since the target of the link was a discussion only about [[Wikipedia:Parenthetical referencing]], and other items may be added to this group in the future; the removed link can also be found in [[Wikipedia:Parenthetical referencing]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="3067" xml:space="preserve">{{navbox
| name = Wikipedia referencing
| state = {{{state&lt;includeonly&gt;|{{{1|autocollapse}}}&lt;/includeonly&gt;}}}
| bodyclass = hlist
| title = [[Wikipedia:Verifiability|Wikipedia referencing]]
| group1 = Policies and guidelines
| list1 =
* [[Wikipedia:Verifiability|Verifiability]]
* [[Wikipedia:No original research|No original research]]
* [[Wikipedia:Biographies of living persons|Biographies of living persons]]
* [[Wikipedia:Reliable sources|Reliable sources]]
** [[Wikipedia:Identifying reliable sources (medicine)|Medicine]]
* [[Wikipedia:Citing sources|Citing sources]]
* [[Wikipedia:Scientific citation guidelines|Scientific citations]]
| group2 = General advice
| list2 =
* [[Wikipedia:Citation needed|Citation needed]]
* [[Help:Find sources|Find sources]]
* [[Wikipedia:Combining sources|Combining sources]]
* [[Wikipedia:Offline sources|Offline sources]]
* [[Help:Overview of referencing styles|Referencing styles]]
| group3 = [[Wikipedia:Citing sources|Citing sources]]
| list3 =
* [[Help:Citation Style 1|Citation Style 1]]
* [[Help:Citation Style 2|Citation Style 2]]
* [[Help:Citation Style Vancouver|Citation Style Vancouver]]
* [[:Category:LSA style citation templates|LSA]]
* [[:Category:Comics citation templates|Comics]]
* [[Wikipedia:Citation templates|Citation templates]]
* [[Template:Reflist|Reflist template]]
| group4 = [[Wikipedia:Inline citation|Inline citations]]
| list4 =
* [[Help:Footnotes|Footnotes]]
* [[Wikipedia:Manual of Style#Punctuation and footnotes|Punctuation and footnotes]]
* [[Help:Shortened footnotes|Shortened footnotes]]
* [[Wikipedia:Nesting footnotes|Nesting footnotes]]
| group5 = [[Help:Referencing for beginners|Help for beginners]]
| list5 =
* [[Help:Reftags|Reference-tags]]
* [[Help:Citations quick reference|Citations quick reference]]
* [[Help:Introduction to referencing with Wiki Markup/1|Introduction to referencing]]
* [[Help:Referencing for beginners with citation templates|Referencing with citation templates]]
* [[Help:Referencing for beginners without using templates|Referencing without using templates]]
* [[Wikipedia:References dos and don'ts|Referencing dos and don'ts]]
* [[Wikipedia:Citing Wikipedia|Citing Wikipedia]]
| group6 = Advanced help
| list6 =
* [[Help:Cite link labels|Cite link labels]]
* [[Help:Citation tools|Citation tools]]
* [[Help:Cite errors|Cite errors]]
* [[Help:Cite messages|Cite messages]]
* [[Help:Converting between references formats|Converting between references formats]]
* [[Help:Reference display customization|Reference display customization]]
* [[Help:References and page numbers|References and page numbers]]
* [[Wikipedia:Guidance on source reviewing at FAC|Guidance on source reviewing at FAC]]
| group7 = Template documentation
| list7 =
* {{tl|Edit refs}}
* {{tl|Refref}}
* {{tl|Refref2}}
* {{tl|Refstart}}
| group8 = Tools
| list8 =
* [[Wikipedia:The Wikipedia Library|Wikipedia Library]]
| group9 = [[Deprecation|Deprecated]]
| list9 =
* [[Wikipedia:Parenthetical referencing|Parenthetical referencing]]
}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>syqnzijus0e281qi9q60lp21ovcjcsa</sha1>
</revision>
</page>
<page>
<title>Template:Xt</title>
<ns>10</ns>
<id>20695285</id>
<revision>
<id>818866480</id>
<parentid>729134851</parentid>
<timestamp>2018-01-06T02:04:04Z</timestamp>
<contributor>
<username>SMcCandlish</username>
<id>378390</id>
</contributor>
<comment>rm. redundant class</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="369" xml:space="preserve">{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|&lt;span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: #006400;" {{#if:{{{title|}}}|title="{{{title}}}"}}&gt;{{{1|Example text}}}&lt;/span&gt;}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>r6unov68wl8p1cmmfuakzxmr2lcia6g</sha1>
</revision>
</page>
<page>
<title>Template:Xtd</title>
<ns>10</ns>
<id>34603096</id>
<revision>
<id>914869288</id>
<parentid>914869200</parentid>
<timestamp>2019-09-09T20:48:58Z</timestamp>
<contributor>
<username>ComplexRational</username>
<id>34997143</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/27.55.86.140|27.55.86.140]] ([[User talk:27.55.86.140|talk]]) to last version by Shellwood</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="423" xml:space="preserve">{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|&lt;span class="example deprecated-content example-deprecated" style="font-family: Georgia, 'DejaVu Serif', serif; color: #696969;" {{#if:{{{title|}}}|title="{{{title}}}"}}&gt;{{{1|Example text}}}&lt;/span&gt;}}&lt;noinclude&gt;
{{Documentation|Template:Xt/doc}}
&lt;/noinclude&gt;</text>
<sha1>8k20udqbbm83ktj281lv0008hv2x7cm</sha1>
</revision>
</page>
<page>
<title>Template:Yesno</title>
<ns>10</ns>
<id>22255088</id>
<revision>
<id>975364754</id>
<parentid>821904792</parentid>
<timestamp>2020-08-28T03:15:17Z</timestamp>
<contributor>
<username>Xaosflux</username>
<id>502540</id>
</contributor>
<comment>add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="374" xml:space="preserve">{{&lt;includeonly&gt;safesubst:&lt;/includeonly&gt;#switch: {{&lt;includeonly&gt;safesubst:&lt;/includeonly&gt;lc: {{{1|¬}}} }}
|no
|n
|f
|false
|off
|0 = {{{no|&lt;!-- null --&gt;}}}
| = {{{blank|{{{no|&lt;!-- null --&gt;}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|t
|true
|on
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>bioaq6x8oitfnx7oqmfhviol4hbp1nd</sha1>
</revision>
</page>
<page>
<title>Template:Yesno-no</title>
<ns>10</ns>
<id>48375573</id>
<revision>
<id>825510157</id>
<parentid>804450734</parentid>
<timestamp>2018-02-13T20:27:17Z</timestamp>
<contributor>
<username>WOSlinker</username>
<id>3138265</id>
</contributor>
<comment>separate pp-template not needed</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="269" xml:space="preserve">{{safesubst:&lt;noinclude /&gt;yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}&lt;noinclude&gt;
{{Documentation|Template:Yesno/doc}}
&lt;!--Categories go in the doc page referenced above; interwikis go in Wikidata.--&gt;
&lt;/noinclude&gt;</text>
<sha1>34vmtxa9ubuh1vz2ulp78m5ela68riu</sha1>
</revision>
</page>
<page>
<title>Help:CS1 errors</title>
<ns>12</ns>
<id>39053980</id>
<revision>
<id>989397387</id>
<parentid>989397128</parentid>
<timestamp>2020-11-18T19:11:11Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>/* Vancouver style error */</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="118147" xml:space="preserve">{{pp-semi-indef}}
{{Wikipedia how to}}
{{Skip to top and bottom}}
&lt;!-- IMPORTANT: do not remove or change section header span ids without also changing links in Module:Citation/CS1 --&gt;
This page describes the error messages reported by the {{cs1}} and {{cs2}} citations, what they mean, and how editors might resolve the errors. [[:Category:CS1 errors]] is the general errors category and [[:Category:CS1 maintenance]] is the general maintenance category.
Errors issued by Wikipedia's &lt;code&gt;&amp;lt;ref&gt;&lt;/code&gt; system, in which citation templates are typically embedded, can be found at [[Help:Cite errors]].
==Controlling error message display==
&lt;section begin="show_error_messages_help_text" /&gt;&lt;section begin="show_all_messages_help_text" /&gt;By default, {{cs1}} and {{cs2}} error messages are visible to all readers and maintenance category messages are hidden from all readers.
To display maintenance messages, include the following text in your common [[Cascading Stylesheets|CSS]] page or your specific skin's CSS page ([[Special:MyPage/common.css|common.css]] and [[Special:MyPage/skin.css|skin.css]] respectively):
&lt;syntaxhighlight lang="css"&gt;.mw-parser-output span.cs1-maint {display: inline;} /* display Citation Style 1 maintenance messages */&lt;/syntaxhighlight&gt;
To display hidden-by-default error messages:
&lt;syntaxhighlight lang="css"&gt;.mw-parser-output span.cs1-hidden-error {display: inline;} /* display hidden Citation Style 1 error messages */&lt;/syntaxhighlight&gt;
Even with this CSS installed, older pages in Wikipedia's cache may not have been updated to show these error messages even though the page is listed in one of the tracking categories. A [[WP:NULLEDIT|null edit]] will resolve that issue.
To hide normally-displayed error messages:
&lt;syntaxhighlight lang="css"&gt;.mw-parser-output span.cs1-visible-error {display: none;} /* hide Citation Style 1 error messages */&lt;/syntaxhighlight&gt;
You can personalize the display of these messages (such as changing the color), but you will need to ask someone who knows CSS or at [[WP:VPT|the technical village pump]] if you do not understand how.&lt;section end="show_all_messages_help_text" /&gt;&lt;section end="show_error_messages_help_text" /&gt;
==Most common errors==
&lt;!-- Items listed here with ~10k or more --&gt;
* [[#Cite &amp;lt;template&gt; requires %7C&amp;lt;param&gt;=]], ~56k pages
* [[#Cite has empty unknown parameter: &amp;lt;param&gt;]], ~44k pages
* [[#Citation without a title of any form]], ~37k pages
* [[#Bare URL without a title]], ~26k pages
* [[#Check date values in: %7C&amp;lt;param1&gt;=, %7C&amp;lt;param2&gt;=, ...]], ~15k pages
* [[#External link in %7C&amp;lt;param&gt;=]], ~13k pages
* [[#Missing or empty %7Curl=]], ~9k pages
{{SeeAlso|Category:CS1 errors|Category:CS1 maintenance}}
==&lt;span id="accessdate_missing_url"&gt;|access-date= requires |url= &lt;/span&gt;==
&lt;section begin="accessdate_missing_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_accessdate_missing_url}}
The {{para|access-date}} (or its alias, {{para|accessdate}}) is the date that the online resource addressed by {{para|url}} was added to the article. If {{para|access-date}} has been included in the citation without {{para|url}} then this message appears. If the citation does not use a web link, then {{para|access-date}} is redundant and should be removed.
When the online resource has a publication or other fixed date associated with it, {{para|access-date}} is of limited value though may be useful in identifying an appropriate archived version of the resource. Without {{para|url}}, {{para|access-date}} is not considered useful.
To resolve this error, provide a value for {{para|url}} or remove {{para|access-date}}. Editors should try to determine why the citation has {{para|access-date}} without {{para|url}}. For example, the citation may never have had a {{para|url}}, or {{para|url}} may have been removed because it links to a site that violates the creator's copyright (see [[WP:COPYLINK]]), or because {{para|url}} was deemed to be dead. If the citation never had {{para|url}} or it was removed for copyright violations, remove {{para|access-date}}. When a dead {{para|url}} has been removed, restore the {{para|url}} and if possible repair it (see [[WP:LINKROT]]).
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_accessdate_missing_url|pages=yes}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="accessdate_missing_url_help_text" /&gt;
==&lt;span id="archive_url"&gt;|archive-url= is malformed &lt;/span&gt;==
&lt;section begin="archive_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_url|$1=&amp;lt;reason&gt;}}
Archive.org allows a variety of URLs to access snapshots of an archived page. Some of these are:
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org/web/YYYYMMDD&lt;/nowiki&gt;&lt;wbr /&gt;&lt;nowiki&gt;hhmmss/http://www.example.com&lt;/nowiki&gt;&lt;/code&gt; – a single snapshot; this is the preferred form for use with {{para|archive-url}}
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org/web/*/http://&lt;/nowiki&gt;&lt;wbr /&gt;www.example.com&lt;/code&gt; – a wildcard search results page; useful for locating an appropriate snapshot but not appropriate in a citation
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org/web/&lt;/nowiki&gt;&lt;wbr /&gt;201603/&lt;nowiki&gt;http://www.example.com&lt;/nowiki&gt;&lt;/code&gt; – incomplete timestamp; archive.org returns the most recent snapshot
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org/save/http://&lt;/nowiki&gt;&lt;wbr /&gt;www.example.com&lt;/code&gt; – saves a new snapshot of the current target; do not use this form
There are two forms of the basic URL:
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org/&lt;/nowiki&gt;&lt;''timestamp''&gt;/...&lt;/code&gt; – the old form
: &lt;code&gt;&lt;nowiki&gt;https://web.archive.org&lt;/nowiki&gt;/'''web/'''&lt;''timestamp''&gt;&lt;''flags''&gt;/...&lt;/code&gt; – the new form
The error message identifies the reason for the message. The reasons are:
: {{error-small|save command}} – the archive.org URL is the save command
: {{error-small|path}} – '''web/''' was expected but something else was found
: {{error-small|timestamp}} – the timestamp portion of the URL path is not 14 digits
: {{error-small|flag}} – the flag portion of the URL path (if present; new form URLs only) is not 2 lowercase letters followed by an underscore: 'id_'
: {{error-small|liveweb}} – &lt;code&gt;liveweb.archive.org&lt;/code&gt; is a deprecated form of the domain name
When the archive.org URL has any of these errors, Module:Citation/CS1 does not link to archive.org and emits an appropriate error message.
To resolve this error, choose the URL of an appropriate snapshot from those held at archive.org. [https://archive.org/web/ Search for the target URL].
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_url}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="archive_url_help_text" /&gt;
==&lt;span id="archive_missing_date"&gt;|archive-url= requires |archive-date= &lt;/span&gt;==
&lt;section begin="archive_missing_date_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_date}}
{{para|archive-date}} (or its alias, {{para|archivedate}}), identifies the date that the web resource was archived.
To resolve this error, provide a value for {{para|archive-date}}. For web resources archived at archive.org,&lt;ref name="archive.org" /&gt; the archival date can be found in the {{para|archive-url}}; for resources archived at webcitation.org,&lt;ref name="webcitation.org" /&gt; the cache date is included in the archive header.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_date}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="archive_missing_date_help_text" /&gt;
==&lt;span id="archive_missing_url"&gt;|archive-url= requires |url= &lt;/span&gt;==
&lt;section begin="archive_missing_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_archive_missing_url}}
A properly formatted citation that includes {{para|archive-url}} and {{para|archive-date}} requires {{para|url}}. When the citation includes {{para|url-status|live}}, the ordering of elements in the rendered citation is changed to put the original URL first.
To resolve this error, provide a value for {{para|url}}. For web resources archived at archive.org,&lt;ref name="archive.org" /&gt; the original URL can be found in the {{para|archive-url}} value; for resources archived at webcitation.org,&lt;ref name="webcitation.org" /&gt; the original URL is included in the archive header.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_archive_missing_url}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="archive_missing_url_help_text" /&gt;
==&lt;span id="arxiv_missing"&gt;|arxiv= required&lt;/span&gt;==
&lt;section begin="arxiv_missing_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_arxiv_missing}}
{{tlx|cite arXiv}} requires one, but not both, of the identifier parameters {{para|arxiv}} or {{para|eprint}} to specify an [[arXiv]] identifier.
To resolve this error, ensure that the template has {{para|arxiv}} or {{para|eprint}} with a properly constructed value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_arxiv_missing}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="arxiv_missing_help_text" /&gt;
==&lt;span id="biorxiv_missing"&gt;|biorxiv= required&lt;/span&gt;==
&lt;section begin="biorxiv_missing_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_biorxiv_missing}}
{{tlx|cite bioRxiv}} requires the identifier parameter {{para|biorxiv}}.
To resolve this error, ensure that the template has {{para|biorxiv}} with a properly constructed value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_biorxiv_missing}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="biorxiv_missing_help_text" /&gt;
==&lt;span id="chapter_ignored"&gt;|chapter= ignored&lt;/span&gt;==
&lt;section begin="chapter_ignored_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_chapter_ignored|$1=chapter}}
{{cs1}} templates {{tlx|cite web}}, {{tlx|cite news}}, {{tlx|cite journal}}, {{tlx|cite press release}}, {{tlx|cite podcast}}, {{tlx|cite newsgroup}}, as well as template {{tlx|citation}} when it uses {{para|work}} or any of its aliases, do not support {{para|chapter}} or the aliases {{para|contribution}}, {{para|entry}}, {{para|article}}, or {{para|section}}.
To resolve this error:
* use a more appropriate citation template, or
* place the content of the {{para|chapter}} parameter in {{para|title}}, or
* for {{tl|cite news}}, {{para|department}} can be used to give the name of the newspaper's section, such as "Obituaries", or
* for {{tl|citation}}, remove {{para|work}} or its aliases such as {{para|website}} and place their content in {{para|title}} if appropriate
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_chapter_ignored}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="chapter_ignored_help_text" /&gt;
==&lt;span id="invisible_char"&gt;&amp;lt;char&gt; character in |&amp;lt;param&gt;= at position ''n''&lt;/span&gt;==
&lt;section begin="invisible_char_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&amp;lt;char&gt; character|$2=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param&gt;=&lt;/code&gt;|$3={{var|n}}}}
This error is reported for citations with parameter values that contain invisible or non-printable characters known as [[control character]]s; the error includes the position at which the character can be found. [[Module:Citation/CS1]] detects parameter values that contain any of these characters:
* [[non-breaking space]], U+00A0
* [[soft hyphen]], U+00AD
* [[replacement character]], U+FFFD
* [[hair space]], U+200A
* [[zero width space]], U+200B
* [[zero width joiner]], U+200D
* [[horizontal tab]], U+0009 (HT)
* [[line feed]], U+0010 (LF)
* [[carriage return]], U+0013 (CR)
* [[delete character]], U+007F (DEL)
* [[C0 and C1 control codes|C0 control]], U+0000–U+001F (NULL–US)
* [[C0 and C1 control codes|C1 control]], U+0080–U+009F (XXX–APC)
To resolve invisible-character errors, remove or replace the identified character. Because these characters are mostly invisible, the error message identifies the character's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted. If you move through the citation with the arrow keys then the cursor may stand still once at an invisible character which can be removed with {{keypress|Delete}} or {{keypress|Backspace}}. If you copy-paste a string to the "Characters" field at https://r12a.github.io/app-conversion/ and click "View in UniView" then the position and name of all characters is shown.
{{#invoke:Cs1 documentation support|help_text_error_messages|err_invisible_char|$1=&amp;lt;name&gt; stripmarker|$2=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param&gt;=&lt;/code&gt;|$3={{var|n}}}}
[[Help:Strip markers|Strip markers]] are special sequences of characters that [[MediaWiki]] inserts as a place-holder for certain [[xml]]-like tags. These tags include {{tag|gallery}}, {{tag|math}}, {{tag|nowiki}}, {{tag|pre}}, and {{tag|ref}}. The strip markers are replaced with content before the final page rendering. The module ignores math and nowiki strip markers.
To resolve strip marker errors, remove or replace the identified tag. The error message identifies the strip marker's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted.
Strip marker errors can also be caused by unsupported additional text or templates in parameter values{{mdash}}for example, {{tl|ISBN}} in {{para|title}}. Resolve the problem by moving the extraneous text outside of the citation template or by removing the extraneous text or template markup, as appropriate.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invisible_char}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="invisible_char_help_text" /&gt;
==&lt;span id="bad_arxiv"&gt;Check |arxiv= value&lt;/span&gt;==
&lt;section begin="bad_arxiv_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_arxiv}}
When {{cs1}} and {{cs2}} templates contain {{para|arxiv}}, a test is done to see if the [[arXiv]] identifier conforms with the arXiv identifier scheme.&lt;ref&gt;{{cite web |url=https://arxiv.org/help/arxiv_identifier |title=Understanding the arXiv identifier |website=[[Cornell University Library]] |access-date=2014-08-20}}&lt;/ref&gt; The identifier is checked for a valid number of digits in the article id; valid year and month values; and properly-placed hyphens, slashes, and dots.
To resolve this error, ensure that the {{para|arxiv}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_arxiv}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_arxiv_help_text" /&gt;
==&lt;span id="bad_asin"&gt;Check |asin= value&lt;/span&gt;==
&lt;section begin="bad_asin_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_asin}}
When {{cs1}} and {{cs2}} templates contain {{para|asin}}, a test is done to see if the [[ASIN]] identifier contains ten upper-case alphanumeric characters without punctuation or spaces and that if the first character is numeric, that the ASIN conforms to the rules for a ten-digit [[ISBN]].
To resolve this error, ensure that the {{para|asin}} value is correct.
If the {{para|asin}} value is correct and all-numeric, use {{para|isbn}} instead and delete any {{para|asin-tld}} parameters. Articles with CS1 citations that use {{para|asin}} with all numeric values are categorized in {{cl|CS1 maint: ASIN uses ISBN}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_asin}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_asin_help_text" /&gt;
==&lt;span id="bad_bibcode"&gt;Check |bibcode= &amp;lt;message&gt;&lt;/span&gt;==
&lt;section begin="bad_bibcode_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_bibcode|$1=&amp;lt;message&gt;}}
When {{cs1}} and {{cs2}} templates contain {{para|bibcode}}, a test is done to see if the [[bibcode]] identifier has the proper format.&lt;ref&gt;{{cite web |url=http://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes |title=1.2.3 - Bibliographic Identifiers |website=The SAO/NASA Astrophysics Data System}}&lt;/ref&gt; Bibcodes are expected to match these requirements:
: length must be 19 characters (&amp;lt;message&gt; = '&lt;span class="error" style="font-size:100%"&gt;length&lt;/span&gt;')
: characters in position(s): (except as specified otherwise, violations produce '&lt;span class="error" style="font-size:100%"&gt;value&lt;/span&gt;' in the &amp;lt;message&gt; portion of the error message):
:: 1–4 must be digits and must represent a year in the range of 1000 – next year (&amp;lt;message&gt; = '&lt;span class="error" style="font-size:100%"&gt;year&lt;/span&gt;')
:: 5 must be a letter
:: 6–8 must be a letter, ampersand, or dot (ampersand cannot directly precede a dot; &amp;. (&amp;lt;message&gt; = '&lt;span class="error" style="font-size:100%"&gt;journal&lt;/span&gt;'))
:: 9 must be a letter or dot
:: 10–18 must be a letter, digit, or dot
:: 19 must be a letter or dot
To resolve this error, ensure that the {{para|bibcode}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_bibcode}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_bibcode_help_text" /&gt;
==&lt;span id="bad_biorxiv"&gt;Check |biorxiv= value&lt;/span&gt;==
&lt;section begin="bad_biorxiv_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}}
When {{cs1}} and {{cs2}} templates contain {{para|biorxiv}}, a test is done to see if the [[bioRxiv]] identifier has the proper form. There are two valid forms:
: six numeric characters without punctuation or spaces.
: ymd format date prefix followed by six numeric characters without punctuation or spaces followed by optional version:
:: {{para|biorxiv|yyyy.mm.dd.######v#}} where:
::: &lt;code&gt;yyyy.mm.dd.&lt;/code&gt; – represents a date no earlier than 11 December 2019 (&lt;code&gt;2019.12.11.&lt;/code&gt;) and no later than tomorrow's date; date must be a valid date
::: &lt;code&gt;######&lt;/code&gt; – 6-digit bioRxiv identifier
::: &lt;code&gt;v#&lt;/code&gt; – optional version indicator
A common error is to include the bioRxiv ''URL'' (&lt;code&gt;&lt;nowiki&gt;https://dx.doi.org/10.1101/&lt;/nowiki&gt;{{red|&amp;lt;{{var|BIORXIV&gt;}}}}&lt;/code&gt;), or the biorxiv ''DOI'' (&lt;code&gt;10.1101/{{red|&amp;lt;{{var|BIORXIV&gt;}}}}&lt;/code&gt;).
To resolve this error, ensure that the {{para|biorxiv}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_biorxiv}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_biorxiv_help_text" /&gt;
==&lt;span id="bad_citeseerx"&gt;Check |citeseerx= value&lt;/span&gt;==
&lt;section begin="bad_citeseerx_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_citeseerx}}
When {{cs1}} and {{cs2}} templates contain {{para|citeseerx}}, a test is done to see if the [[CiteSeerX]] identifier has the proper format.
The expected identifier is the value assigned to the &lt;code&gt;?doi=&lt;/code&gt; query key in the URL of a CiteSeerX document. (This query key should not be confused with a [[Digital Object Identifier]]: it should not be input as {{para|doi}}.)
For instance, if you want to link to &lt;code&gt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.220.7880&lt;/code&gt;, use {{para|citeseerx|10.1.1.220.7880}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_citeseerx}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_citeseerx_help_text" /&gt;
==&lt;span id="bad_date"&gt;Check date values in: |&amp;lt;param1&gt;=, |&amp;lt;param2&gt;=, ...&lt;/span&gt;==
&lt;section begin="bad_date_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_date|$1=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param1&gt;=&lt;/code&gt;, &lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param2&gt;=&lt;/code&gt;, ...}}
When {{cs1}} and {{cs2}} templates contain date-holding parameters, an automated test is done to see if the dates are real dates that comply with a [[Help:Citation_Style_1#Date_compliance_with_Wikipedia's_Manual_of_Style|subset of the date rules]] in Wikipedia's Manual of Style, specifically checking for violations of [[Wikipedia:Manual of Style/Dates and numbers#Dates and years|MOS:DATEFORMAT]].
To resolve this error, ensure that the date is an actual date and that the date format follows the [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]] in the named parameter. See [[Help:CS1 errors#ExamplesOfUnacceptableDates|examples of unacceptable dates and how to fix them]], below. Or, some conceptual issues to look for:
* impossible dates, such as 29 February 2011 (2011 was not a leap year)
* {{para|access-date}} must specify a day, not just a month or year.
* misplaced, incorrect, or extraneous punctuation
* extraneous text
* hyphens or slashes instead of en dashes in date ranges (en dashes are required)
* misspelling or improper capitalization (see [[MOS:ALLCAPS]] for more detail that is not in [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]])
* other unacceptable date formats listed in [[MOS:BADDATEFORMAT]]
* more than one date in a date-holding parameter
* years before 100 AD, including BCE/BC dates. Try using parameter {{para|orig-date}} instead.
See [[Help:Citation_Style_1#CS1_compliance_with_Wikipedia.27s_Manual_of_Style|Help: Citation Style 1]] for information about limitations in the CS1 citation templates' handling of date formats. [[WP:DATERANGE|The MOS section on date ranges]] describes how to separate dates in a date range. Do not use &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt;, &lt;code&gt;&amp;amp;ndash;&lt;/code&gt;, or {{tlx|spaced ndash}} as these corrupt the metadata. To add an en dash, use the [[Help:CharInsert#Insert|CharInsert]] edit tool or see [[Wikipedia:How to make dashes]]. You may also use this one: &amp;ndash;. A bot is often able to correct the separator, provided the overall format is unambiguous.
Future dates in {{para|date}} in CS1|2 citations are limited to current year + 1; that is, for {{#time:Y}}, citation dates in {{#time:Y|now +1 year}} are acceptable but citation dates in {{#time:Y|now +2 year}} and beyond are not.
Dates prior to 1582 are treated as [[Julian calendar]] dates. Dates from 1582 onward are treated as [[Gregorian calendar]] dates. The Julian calendar was used in some places until approximately 1923. Three Julian calendar dates in the overlap period, 29 February in the years 1700, 1800, and 1900, will cause this error message because those years are not leap years in the Gregorian calendar.
The access date (in {{para|access-date}}) is checked to ensure that it contains a full date (day, month, and year) and is between 15 January 2001 (the founding date of Wikipedia) and today's date plus one day, because it represents the date that an editor viewed a web-based source to verify a statement on Wikipedia. Because editors may be in time zones that are one day ahead of the UTC date, one extra day is accepted.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_date}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_date_help_text" /&gt;
{{anchor|Date Fix Table|Dates|DateFixTable}}
{{anchor|ExamplesOfUnacceptableDates}}
{| class="wikitable"
|+ Examples of unacceptable dates and how to fix them
|-
! Issue !! Unacceptable !! Acceptable
|-
| Hyphen in date range (use en dash) || {{para|plain=y|date|2002{{red|-}}2003}} || {{para|plain=y|date|2002{{green|–}}2003}}
|-
| Slash in date range (use en dash) || {{para|plain=y|date|2002{{red|/}}2003}} or {{para|plain=y|date|July{{red|/}}August 2003}}||{{para|plain=y|date|2002{{green|–}}2003}} or {{para|plain=y|date|July{{green|–}}August 2003}}
|-
| Hyphen in date range (use en dash) || {{para|plain=y|date|April{{red|-}}May 2004}} || {{para|plain=y|date|April{{green|–}}May 2004}}
|-
| Missing space around en dash for range of full dates || {{para|plain=y|date|April 2003{{red|–}}May 2004}} || {{para|plain=y|date|April 2003 {{green|–}} May 2004}}
|-
| Month capitalization || {{para|plain=y|date|28 {{red|f}}ebruary 1900}} || {{para|plain=y|date|28 {{green|F}}ebruary 1900}}
|-
| Month capitalization || {{para|plain=y|date|28 F{{red|EBRUARY}} 1900}} || {{para|plain=y|date|28 F{{green|ebruary}} 1900}}
|-
| Season capitalization || {{para|plain=y|date|{{red|s}}pring 2011}} || {{para|plain=y|date|{{green|S}}pring 2011}}
|-
| Future date (typo) || {{para|plain=y|date|2{{red|10}}2}} || {{para|plain=y|date|2{{green|01}}2}}
|-
| Access date in future (see note above) || {{para|plain=y|access-date|{{red|{{day+1|{{day+1}}}}, {{CURRENTYEAR}}}}}} || {{para|plain=y|access-date|{{Currentmonthday}}, {{CURRENTYEAR}}}}
|-
| Access date impossibly far in the past (typo) || {{para|plain=y|access-date|1 January 20{{red|01}}}} || {{para|plain=y|access-date|1 January 20{{green|10}}}}
|-
| Access date only specifies month || {{para|plain=y|access-date|{{red|January}} 2015}} || {{para|plain=y|access-date|{{green|12 January}} 2015}}
|-
| Ambiguous date range or year and month || {{para|plain=y|date|2002-{{red|03}}}} || {{plainlist|
* {{para|plain=y|date|2002–{{green|20}}03}}
* {{para|plain=y|date|{{green|March}} 2002}}}}
|-
| Bad abbreviation || {{para|plain=y|date|{{red|Febr.}} 28, 1900}} || {{plainlist|
* {{para|plain=y|date|{{green|Feb}} 28, 1900}}
* {{para|plain=y|date|{{green|February}} 28, 1900}}}}
|-
| Nonexistent date || {{para|plain=y|date|{{red|February 29, 1900}}}} ||
|-
| Undated || {{para|plain=y|date|{{red|Undated}}}} || {{para|plain=y|date|{{green|n.d.}}}}
|-
| Comma in month and year || {{para|plain=y|date|February{{red|,}} 1900}} || {{para|plain=y|date|February 1900}}
|-
| Comma in season || {{para|plain=y|date|Winter{{red|,}} 1900–1901}} || {{para|plain=y|date|Winter 1900–1901}}
|-
| Missing comma in format which requires it || {{para|plain=y|date|{{red|February 28 1900}}}} || {{para|plain=y|date|February 28{{green|,}} 1900}} or {{para|plain=y|date|28 February 1900}}
|-
| Non-date text || {{para|plain=y|date|2008{{red|, originally 2000}}}} || {{para|plain=y|date|2008}} {{green|{{para|plain=y|orig-date|2000}}}}
|-
| Zero-padding || {{para|plain=y|date|January {{red|04}}, 1987}} || {{para|plain=y|date|January {{green|4}}, 1987}}
|-
| Date with slashes || {{para|plain=y|date|12{{red|/}}6{{red|/}}87}} || {{plainlist|
* {{para|plain=y|date|{{green|December 6, 19}}87}}
* {{para|plain=y|date|{{green|12 June 19}}87}}}}
|-
| Two-digit year || {{para|plain=y|date|{{red|87}}-12-06}} || {{para|plain=y|date|{{green|19}}87-12-06}}
|-
| One-digit month or day || {{para|plain=y|date|2007-{{red|3}}-{{red|6}}}} || {{para|plain=y|date|2007-{{green|03}}-{{green|06}}}}
|-
| Wikified date || {{para|plain=y|date|{{red|&lt;nowiki&gt;[[&lt;/nowiki&gt;}}April 1{{red|&lt;nowiki&gt;]]&lt;/nowiki&gt;}}, {{red|&lt;nowiki&gt;[[&lt;/nowiki&gt;}}1999{{red|&lt;nowiki&gt;]]&lt;/nowiki&gt;}} }} || {{para|plain=y|date|{{green|April 1, 1999}}}}
|-
| "mm-dd-yyyy" or "dd-mm-yyyy" date format || {{para|plain=y|date|{{red|07-12-}}2009}} || {{para|plain=y|date|{{green|7 December}} 2009}} or {{para|plain=y|date|{{green|12 July}} 2009}}&lt;br /&gt;or&lt;br /&gt;{{para|plain=y|date|{{green|July 12,}} 2009}} or {{para|plain=y|date|{{green|December 7,}} 2009}}
|-
| Approximate or uncertain dates || {{para|plain=y|date|{{red|circa}} 1970}} or {{para|plain=y|date|{{red|&lt;nowiki&gt;{{circa}}&lt;/nowiki&gt;}} 1970}} ||{{para|plain=y|date|{{green|c.}} 1970}}
|-
|}
==&lt;span id="bad_doi"&gt;Check |doi= value&lt;/span&gt;==
&lt;section begin="bad_doi_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_doi}}
When {{cs1}} and {{cs2}} templates contain {{para|doi}}, a test is done to see if the prefix portion of the [[Digital object identifier|DOI]] value is correctly formatted and has what appears to be a valid registrant code. A proper DOI prefix begins with the &lt;code&gt;10.&lt;/code&gt; directory indicator. The remaining portion of the prefix is a string of digits and the dot character which form the registrant code. When the directory indicator is &lt;code&gt;10.&lt;/code&gt;, the CS1|2 templates test for a valid registrant code. Valid registrant codes:
* must be composed of digits
* must be in the range:
** 1000–9999
** 10000–49999
* may have one or more subcodes that begin with a dot followed by digits (1000.10)
* must not be 5555 (invalid/temporary/test)
Additionally, the {{para|doi}} value is checked to make sure that it does not contain spaces, en dashes, does not end with punctuation. Further validation of the DOI is not performed.
Do not include the &lt;code&gt;&lt;nowiki&gt;https://doi.org/&lt;/nowiki&gt;&lt;/code&gt; scheme and domain name from a URL. A proper {{para|doi}} value looks like {{para|doi|10.1103/PhysRevLett.80.904}}.
To resolve this error, ensure that the {{para|doi}} value is correct.
In very rare cases, publishers have released works with a DOI deviating from the standard form. If you are certain that such a non-conforming DOI truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. (Do not use this markup for DOIs, which are ''inactive'' rather than ''non-conforming''. Instead, use {{para|doi-broken-date}} for them.)
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_doi}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_doi_help_text" /&gt;
==&lt;span id="bad_hdl"&gt;Check |hdl= value&lt;/span&gt;==
&lt;section begin="bad_hdl_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_hdl}}
When {{cs1}} and {{cs2}} templates contain {{para|hdl}}, a test is done to see if the [[Handle System|hdl]] value looks like a properly defined value. The {{para|hdl}} value is checked to make sure that it does not contain spaces or en dashes and does not end with punctuation. Further validation of the hdl is not performed.
To resolve this error, ensure that the {{para|hdl}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_hdl}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_hdl_help_text" /&gt;
==&lt;span id="bad_isbn"&gt;Check |isbn= value&lt;/span&gt;==
&lt;section begin="bad_isbn_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_isbn|$1=&amp;lt;type&gt;}}
{{cs1}} and {{cs2}} templates that contain {{para|isbn}} are checked to ensure that the [[ISBN]] is the proper length (ten or thirteen digits), that the ISBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISBN specification. Only one ISBN is allowed in this field because the whole {{para|isbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISBN, or characters that are not part of the ISBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]]. (If relevant, they can be specified using {{para|id|{{tlp|ISBN|...}}}} instead.)
The error message &amp;lt;type&gt; indicator can be:
: {{error-small|length}} – ISBN is not 10 or 13 digits
: {{error-small|checksum}} – ISBN has one or more incorrect digits; look for typos and transposition
: {{error-small|invalid character}} – ISBN has one or more 'digits' that is not in the allowed set appropriate to ISBN length
: {{error-small|invalid prefix}} – 13-digit ISBNs must begin with '978' or '979'
: {{error-small|invalid form}} – 10-digit ISBNs with the mis-positioned 'X' character
: {{error-small|invalid group id}} – 13-digit ISBN begins with '9790'; this prefix / group ID combination is reserved to [[ISMN]]
To resolve this error, ensure that the {{para|isbn}} value is correct, that only one ISBN is used, that the proper optional separators are used, and that no other text is included. Use the ISBN printed on the work rather than one retrieved from third-party sources. If ''both are available'', use the 13-digit ISBN.. When a 10-digit ISBN is used, if the check digit is a lowercase 'x', change it to an uppercase 'X'.
* '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the ISBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere).
* If you only have a 10-digit ISBN, '''do''' use the number as-is, do not try to convert it to the 13-digit form.
* If the ISBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for ISBNs. It is not uncommon for the ISBN to be misprinted in the front matter but correct on the cover.
* '''Do''' preview your edit and check that the new ISBN does now link to the correct source.
In very rare cases, publishers have released books with malformed ISBNs. If you are certain that a non-conforming ISBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected ISBN. Use a corrected ISBN when possible.
Sometimes there are numbers assigned to {{para|isbn}} that appear to be legitimate – length is right, check digit is correct – but that aren't true ISBN numbers. This [http://isbn.org/ISBN_converter tool] may be helpful.
See also [[Wikipedia:ISBN]].
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_isbn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISBN, and #ifeq: --&gt;&lt;section end="bad_isbn_help_text" /&gt;
==&lt;span id="bad_ismn"&gt;Check |ismn= value&lt;/span&gt;==
&lt;section begin="bad_ismn_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ismn}}
{{cs1}} and {{cs2}} templates that contain {{para|ismn}} are checked to ensure that the [[ISMN]] is the proper length (thirteen digits), that the ISMN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the ISMN specification. Only one ISMN is allowed in this field because the whole {{para|ismn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one ISMN, or characters that are not part of the ISMN, corrupt the COinS metadata. (If relevant, they can be specified using {{para|id|{{tlp|ISMN|...}}}} instead.)
To resolve this error, ensure that the {{para|ismn}} value is correct, that only one ISMN is used, that the proper optional separators are used, and that no other text is included. Make sure that the ISMN contains exactly 13 digits.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ismn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_ismn_help_text" /&gt;
==&lt;span id="bad_issn"&gt;Check |issn= value&lt;/span&gt;==
&lt;section begin="bad_issn_help_text" /&gt;{{help desk}}
&lt;div class="plainlist"&gt;
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}}
&lt;/div&gt;
{{cs1}} and {{cs2}} templates that contain {{para|issn}} and/or {{para|eissn}} are checked to ensure that the [[ISSN]] is the proper length (eight digits) and that the final [[check digit]] validates according to the ISSN specification. Only one each of ISSN and eISSN is allowed in this field because the whole {{para|issn}} and {{para|eissn}} values are included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. (If relevant, they can be specified using {{para|id|{{tlp|ISSN|...}} {{tlp|EISSN|...}}}} instead.)
The ISSN and eISSN are always rendered as two four-digit numbers separated with a hyphen.
To resolve this error, ensure that the {{para|issn}} and {{para|eissn}} values are correct, that only one value per parameter is used, and that no other text is included (allowable characters are 0–9, X, and -). If the check-digit is a lowercase 'x', change it to an uppercase 'X'.
In very rare cases, publishers have released works with a malformed identifier. If you are certain that a non-conforming identifier truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In some cases, works may have been reissued with a corrected identifier. Use the corrected one when possible.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_issn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;!-- See [[bugzilla:47049]] about {{FULLPAGENAME}}, category pagenames containing ISSN, and #ifeq: --&gt;&lt;section end="bad_issn_help_text" /&gt;
==&lt;span id="bad_jfm"&gt;Check |jfm= value&lt;/span&gt;==
&lt;section begin="bad_jfm_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_jfm}}
When {{cs1}} and {{cs2}} templates contain {{para|jfm}}, a test is done to see if the [[Jahrbuch über die Fortschritte der Mathematik|JFM]] identifier value looks like a properly defined value. The {{para|jfm}} identifier is checked to make sure that it has the form: &lt;code&gt;nn.nnnn.nn&lt;/code&gt; where &lt;code&gt;n&lt;/code&gt; is any digit 0–9. Further validation of the JFM identifier is not performed.
To resolve this error, ensure that the {{para|jfm}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_jfm}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_jfm_help_text" /&gt;
==&lt;span id="bad_lccn"&gt;Check |lccn= value&lt;/span&gt;==
&lt;section begin="bad_lccn_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_lccn}}
The {{para|lccn}} parameter is for the [[Library of Congress Control Number]] identifier. It is checked to ensure that the identifier is the proper length and has the correct initial digits.
LCCN is a character string 8–12 characters long. The length of the LCCN dictates the character type of the initial 1–3 characters; the rightmost eight are always digits.&lt;ref&gt;{{cite web |url=https://www.loc.gov/marc/lccn-namespace.html#syntax |title=The LCCN Namespace |website=Network Development and MARC Standards Office |publisher=[[Library of Congress]] |date=November 2003}}&lt;/ref&gt;
{|class="wikitable"
|+ LCCN format description
! Length !! Description
|-
| 8 || all characters are digits
|-
| 9 || first character is a lower case letter
|-
| 10|| first two characters are either both lower case letters or both digits
|-
| 11|| first character is a lower case letter, second and third characters are either both lower case letters or both digits
|-
| 12|| first two characters are both lower case letters
|-
|}
Further validation is not performed.
To resolve this error, ensure that the {{para|lccn}} value is correct and that there are no other letters, punctuation, or other characters.
When receiving this error, be on the lookout for publishers who omitted leading zeros in the LCCN following the two or four digit year. For example, an LCCN that is [https://catalog.loc.gov/vwebv/search?searchCode=LCCN&amp;searchArg=92035247&amp;searchType=1&amp;permalink=y properly 92-035427] could be shortened in the printed work to [https://books.google.com/books?id=3ocPU-S9gloC&amp;q=35247 92-35247]. When experimenting with inserting omitted zeroes, cross-check the finished number against the LCCN permalinks online.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_lccn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_lccn_help_text" /&gt;
==&lt;span id="bad_message_id"&gt;Check |message-id= value&lt;/span&gt;==
&lt;section begin="bad_message_id_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_usenet_id}}
The {{para|message-id}} parameter holds the unique identifier associated with a netnews message.&lt;ref&gt;{{cite web |url=//tools.ietf.org/html/rfc5536 |title=Netnews Article Format |website=[[Internet Engineering Task Force]] |at=[//tools.ietf.org/html/rfc5536#section-3.1.3 3.1.3] |rfc=5536 |date=November 2009}}&lt;/ref&gt; The value in {{para|message-id}} is checked to make sure that it contains &lt;code&gt;@&lt;/code&gt; between left and right identifiers. {{para|message-id}} is also checked to make sure that the first character is not &lt;code&gt;&amp;lt;&lt;/code&gt; and the last character is not &lt;code&gt;&gt;&lt;/code&gt;. [[Module:Citation/CS1]] adds the [[URI scheme]] &lt;code&gt;news:&lt;/code&gt; to the value in {{para|message-id}}. If the value in {{para|message-id}} is wrapped in &lt;code&gt;&lt;...&gt;&lt;/code&gt; characters, the link created fails.
Further validation is not performed.
To resolve this error, ensure that the {{para|message-id}} value is correct, that it contains &lt;code&gt;@&lt;/code&gt; and is not wrapped in &lt;code&gt;&lt;...&gt;&lt;/code&gt; characters.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_usenet_id}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_message_id_help_text" /&gt;
==&lt;span id="bad_mr"&gt;Check |mr= value&lt;/span&gt;==
&lt;section begin="bad_mr_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_mr}}
When {{cs1}} and {{cs2}} templates contain {{para|mr}}, a test is done to see if the [[Mathematical Reviews|MR]] identifier value looks like a properly defined value. The {{para|mr}} identifier is checked to make sure that it contains only digits and that it is no more than seven digits in length. Further validation of the MR identifier is not performed.
To resolve this error, ensure that the {{para|mr}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_mr}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_mr_help_text" /&gt;
==&lt;span id="bad_oclc"&gt;Check |oclc= value&lt;/span&gt;==
&lt;section begin="bad_oclc_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_oclc}}
The {{para|oclc}} parameter is for the [[OCLC]] identifier. Only a single OCLC identifier is allowed. (If relevant, multiple OCLCs can be specified using {{para|id|{{tlp|OCLC|...}}}} instead.)
The identifier must be in one of these forms:
# prefix &lt;code&gt;ocm&lt;/code&gt; followed by 8 digits
# prefix &lt;code&gt;ocn&lt;/code&gt; followed by 9 digits
# prefix &lt;code&gt;on&lt;/code&gt; followed by 10 (or more) digits
# prefix &lt;code&gt;(OCoLC)&lt;/code&gt; followed by a variable number of digits without leading zeros
# 1 to 10 (or more) digits without prefix
Further validation is not performed.
To resolve this error, ensure that the {{para|oclc}} value is correct.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|oclc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
A tip for fixing this error: Editors sometimes place valid [[ISBN]], [[LCCN]], [[ASIN]], or other identifiers in {{para|oclc}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_oclc}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_oclc_help_text" /&gt;
==&lt;span id="bad_ol"&gt;Check |ol= value&lt;/span&gt;==
&lt;section begin="bad_ol_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ol}}
The {{para|ol}} parameter is for the [[Open Library]] identifier. The identifier is one or more digits followed by a last character that is either &lt;code&gt;A&lt;/code&gt; (authors), &lt;code&gt;M&lt;/code&gt; (books), or &lt;code&gt;W&lt;/code&gt; (works). Further validation is not performed.
To resolve this error, ensure that the {{para|ol}} value is correct. Do not include "OL" in the value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ol}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_ol_help_text" /&gt;
==&lt;span id="bad_osti"&gt;Check |osti= value&lt;/span&gt;==
&lt;section begin="bad_osti_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_osti}}
The {{para|osti}} parameter is for the [[Office of Scientific and Technical Information]] (OSTI) identifier. OSTIs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|osti}}&lt;!-- value will show after the next update --&gt;. Further validation is not performed.
A common error is to include the OSTI ''URL'' (&lt;code&gt;&lt;nowiki&gt;https://dx.doi.org/10.2172/&lt;/nowiki&gt;{{red|&amp;lt;{{var|OSTI&gt;}}}}&lt;/code&gt;), or the OSTI ''DOI'' (&lt;code&gt;10.2172/{{red|&amp;lt;{{var|OSTI&gt;}}}}&lt;/code&gt;).
To resolve this error, ensure that the {{para|osti}} value is correct.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|osti}}&lt;!-- value will show after the next update --&gt;, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_osti}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_osti_help_text" /&gt;
==&lt;span id="bad_paramlink"&gt;Check |&amp;lt;param&gt;-link= value&lt;/span&gt;==
&lt;section begin="bad_paramlink_help_text" /&gt;{{help desk}}
&lt;div class="plainlist"&gt;
* {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=&lt;code class="cs1-code"&gt;&amp;lt;param&gt;-link&lt;/code&gt;}}
* {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_paramlink|$1=&lt;code class="cs1-code"&gt;&amp;lt;param&gt;&lt;/code&gt;}}
&lt;/div&gt;
These link-holding parameters and their matching title-holding parameters are combined to create a working [[wikilink]] to a related article.
{{div col|colwidth=20em}}
* {{para|author-link}}
* {{para|contributor-link}}
* {{para|editor-link}}
* {{para|episode-link}}
* {{para|interviewer-link}}
* {{para|series-link}}
* {{para|subject-link}}
* {{para|title-link}}
* {{para|translator-link}}
* {{para|author}}
* {{para|contributor}}
* {{para|editor}}
* {{para|episode}}
* {{para|interviewer}}
* {{para|series}}
* {{para|subject}}
* {{para|title}}
* {{para|translator}}
{{div col end}}
(Parameters checked for this error may also be of the form {{para|author-link{{var|n}}}} or {{para|author{{var|n}}-link}}.)
This error occurs when any of these {{para|&amp;lt;param&gt;-link}} parameters contain a wikilink or a URL, or they contain any of the characters not permitted in Wikipedia article titles per [[WP:TITLESPECIALCHARACTERS]] (except &lt;code&gt;_&lt;/code&gt; (underscore), used as a replacement for spaces, and &lt;code&gt;#&lt;/code&gt;, used as a [[fragment identifier]] when linking to article sections). The prohibited characters are: &lt;code&gt;&amp;lt; &gt; [ ] | { }&lt;/code&gt;.
The {{para|&amp;lt;param&gt;-link}} parameter value should contain only the title of a Wikipedia article or a link to a section of a Wikipedia article. [[Module:Citation/CS1]] checks the {{para|&amp;lt;param&gt;-link}} parameter values for wikimarkup and for a [[URI scheme]] (&lt;code&gt;http://&lt;/code&gt;, &lt;code&gt;https://&lt;/code&gt;, the protocol relative scheme &lt;code&gt;//&lt;/code&gt;, etc.). Interlanguage links in any of the {{para|&amp;lt;param&gt;-link}} parameters require a leading colon:
: &lt;code&gt;&lt;nowiki&gt;:fr:Période d'exil de Caravage&lt;/nowiki&gt;&lt;/code&gt;
While primarily intended to catch the errors mentioned above, Module:Citation/CS1 will also catch malformed interlanguage wikilinks wherever they occur. Interlanguage wikilinks that have the form:
: &lt;code&gt;&lt;nowiki&gt;[[fr:Période d'exil de Caravage]]&lt;/nowiki&gt;&lt;/code&gt;
do not create visible clickable links in the article text. Instead, these links appear in the left pane in the languages list. Module:Citation/CS1 disables interlanguage links in this form and emits an error message. The correct form is:
: &lt;code&gt;&lt;nowiki&gt;[[:fr:Période d'exil de Caravage]]&lt;/nowiki&gt;&lt;/code&gt;
This error can also be caused when there is a {{para|&amp;lt;param&gt;-link}} value and the matching {{para|&amp;lt;param&gt;}} parameter contains a wikilink.&lt;!--formatting template such as {{tl|smallcaps}} or {{tl|IAST}}, which should not be used in CS1 or CS2 templates.--&gt;
To resolve this error, do one of the following:
* Ensure that the {{para|&amp;lt;param&gt;-link}} value is the full name of a Wikipedia article (without brackets) or a section of an article, and not a link to an external web site.
* Make sure that there are no wikilinks in the matching {{para|&amp;lt;param&gt;}} parameters.
* If you want to link to a URL outside of Wikipedia, move the link to {{para|url}} or a similar parameter, if one is available in the template you are using.
&lt;!--* Make sure that there are no illegal characters in the paired parameters. These templates or HTML entities can be used to replace illegal characters in the title-holding parameter:
{| class="wikitable" style="margin-left: 6.4em"
|+ Replacements for prohibited wikilink title characters
! &lt; !! &gt; !! [ !! ] !! {{pipe}} !! { !! }
|-
| &amp;amp;lt; || &amp;amp;gt; || &amp;amp;#91; || &amp;amp;#93; || &amp;amp;#124; || &amp;amp;#123; || &amp;amp;#125;
|-
| colspan="2"|&amp;nbsp;||colspan="2" style="text-align: center;" | [[Template:Bracket|&lt;nowiki&gt;{{bracket|text}}&lt;/nowiki&gt;]] || [[Template:Pipe|&lt;nowiki&gt;{{pipe}}&lt;/nowiki&gt;]] ||colspan="2" | &amp;nbsp;
|}--&gt;
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_paramlink}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_paramlink_help_text" /&gt;
==&lt;span id="bad_pmc"&gt;Check |pmc= value&lt;/span&gt;==
&lt;section begin="bad_pmc_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmc}}
The {{para|pmc}} parameter is for the [[PubMed Central]] identifier. PMCs are sequential numbers beginning at 1 and counting up. [[Module:Citation/CS1]] checks the PMC identifier to make sure that the value is a number greater than zero and less than {{#invoke:Cs1 documentation support|id_limits_get|pmc}} and that the identifier contains only digits. Further validation is not performed.
To resolve this error, ensure that the {{para|pmc}} value is correct, and that there are no letters, punctuation, or other characters. Do not include "PMC" in the value.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmc}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmc}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_pmc_help_text" /&gt;
==&lt;span id="bad_pmid"&gt;Check |pmid= value&lt;/span&gt;==
&lt;section begin="bad_pmid_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_pmid}}
The {{para|pmid}} parameter is for the [[PubMed#PubMed identifier|PubMed identifier]]. PMIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|pmid}}. Further validation is not performed.
To resolve this error, ensure that the {{para|pmid}} value is correct. If you find something that looks like a PMID and begins with "PMC", use {{para|pmc}} instead of {{para|pmid}}.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|pmid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_pmid}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_pmid_help_text" /&gt;
==&lt;span id="bad_rfc"&gt;Check |rfc= value&lt;/span&gt;==
&lt;section begin="bad_rfc_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_rfc}}
The {{para|rfc}} parameter is for the Internet Engineering Task Force (IETF) [[IETF RFC|RFC]] identifier (unrelated to Wikipedia's internal RfCs). IETF RFCs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|rfc}}&lt;!-- value will show after the next update --&gt;. Further validation is not performed.
A common error is to include the RFC ''URL'' (&lt;code&gt;&lt;nowiki&gt;https://dx.doi.org/10.17487/&lt;/nowiki&gt;{{red|&amp;lt;{{var|RFC&gt;}}}}&lt;/code&gt;), or the RFC ''DOI'' (&lt;code&gt;10.17487/{{red|&amp;lt;{{var|RFC&gt;}}}}&lt;/code&gt;).
To resolve this error, ensure that the {{para|rfc}} value is correct.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|rfc}}&lt;!-- value will show after the next update --&gt;, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_rfc}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_rfc_help_text" /&gt;
==&lt;span id="bad_sbn"&gt;Check |sbn= value&lt;/span&gt;==
&lt;section begin="bad_sbn_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_sbn|$1=&amp;lt;type&gt;}}
{{cs1}} and {{cs2}} templates that contain {{para|sbn}} are checked to ensure that the [[Standard Book Number|SBN]] is the proper length (nine digits), that the SBN uses the correct optional separators (simple space or hyphen), and that the final [[check digit]] is correct according to the SBN specification. Only one SBN is allowed in this field because the whole {{para|sbn}} value is included in the citation's [[COinS]] [[metadata]]. See also [[Wikipedia:COinS]]. More than one SBN, or characters that are not part of the SBN, corrupt the COinS metadata and may also corrupt the link to [[Special:BookSources]].
The error message &amp;lt;type&gt; indicator can be:
: &lt;span class="error" style="font-size:100%"&gt;length&lt;/span&gt; – SBN is not 9 digits
: &lt;span class="error" style="font-size:100%"&gt;checksum&lt;/span&gt; – SBN has one or more incorrect digits; look for typos and transposition
: &lt;span class="error" style="font-size:100%"&gt;invalid character&lt;/span&gt; – SBN has one or more 'digits' that is not in the allowed set
: &lt;span class="error" style="font-size:100%"&gt;invalid form&lt;/span&gt; – mis-positioned 'X' check digit
To resolve this error, ensure that the {{para|sbn}} value is correct, that only one SBN is used, that the proper optional separators are used, and that no other text is included. If the check digit is a lowercase 'x', change it to an uppercase 'X'.
* '''Do not''' try to resolve the error by simply recalculating the check digit. The check digit is there to check whether the main part of the number is correct. If the SBN is failing to validate, it is likely that there is a typo in the main part of the number. In this case, recalculating the check digit results in an apparently valid ISBN that leads to the wrong source (or to nowhere).
* If the SBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for SBNs. It is not uncommon for the SBN to be misprinted in the front matter but correct on the cover.
* '''Do''' preview your edit and check that the new SBN does now link to the correct source.
In very rare cases, publishers have released books with malformed SBNs. If you are certain that a non-conforming SBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected SBN. Use a corrected SBN when possible.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_sbn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_sbn_help_text" /&gt;
==&lt;span id="bad_ssrn"&gt;Check |ssrn= value&lt;/span&gt;==
&lt;section begin="bad_ssrn_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_ssrn}}
The {{para|ssrn}} parameter is for the [[Social Science Research Network|Social Science Research Network identifier]]. SSRNs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 100 and {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}. Further validation is not performed.
To resolve this error, ensure that the {{para|ssrn}} value is correct.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|ssrn}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_ssrn}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_ssrn_help_text" /&gt;
==&lt;span id="bad_s2cid"&gt;Check |s2cid= value&lt;/span&gt;==
&lt;section begin="bad_s2cid_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|bad_s2cid_err}}&lt;!-- should be err_bad_s2cid --&gt;
The {{para|s2cid}} parameter is for the [[Semantic Scholar]] corpus identifier. S2CIDs are checked to ensure that the identifier is a simple number without punctuation or spaces with a value between 1 and {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}. Further validation is not performed.
To resolve this error, ensure that the {{para|s2cid}} value is correct.
If the value is correct and larger than the currently configured limit of {{#invoke:Cs1 documentation support|id_limits_get|s2cid}}, please report this at [[Help talk:Citation Style 1]], so that the limit can be updated.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|bad_s2cid_err}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_s2cid_help_text" /&gt;
==&lt;span id="bad_url"&gt;Check |url= value&lt;/span&gt;==
&lt;section begin="bad_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_url|$1=&lt;code class="cs1-code"&gt;{{pipe}}url=&lt;/code&gt;}}
External links in {{cs1}} and {{cs2}} templates are made from two parts: the ''title'' ({{para|title}}, {{para|chapter}}, etc.) and the ''URL'' ({{para|url}}, {{para|archive-url}}, {{para|chapter-url}}, {{para|lay-url}}, etc.). The {{para|url}} parameter and other URL parameters must begin with a supported [[URI scheme]]. The URI schemes &lt;code&gt;http://&lt;/code&gt;, &lt;code&gt;https://&lt;/code&gt; and the protocol relative scheme &lt;code&gt;//&lt;/code&gt; are most commonly used; &lt;code&gt;irc://&lt;/code&gt;, &lt;code&gt;ircs://&lt;/code&gt;, &lt;code&gt;ftp://&lt;/code&gt;, &lt;code&gt;news:&lt;/code&gt;, &lt;code&gt;mailto:&lt;/code&gt; and &lt;code&gt;gopher://&lt;/code&gt; are also supported.
The URL field is checked to ensure that it contains only Latin characters and does not contain spaces. The URL may be protocol relative (begins with &lt;code&gt;//&lt;/code&gt;). If there are no spaces and the URL is not protocol relative, then the scheme must comply with &lt;nowiki&gt;RFC 3986&lt;/nowiki&gt;.&lt;ref&gt;{{citation |mode=cs1 |contribution-url=http://tools.ietf.org/html/std66#section-3.1 |contribution=Scheme |title=Uniform Resource Identifier (URI): Generic Syntax |publisher=[[Internet Engineering Task Force]] |date=January 2005 |rfc=3986}}&lt;/ref&gt;
Top- and second-level domain names are checked for proper form. Generally, top-level domain names must be two or more letters; second-level domain names must be two or more letters, digits, or hyphens (first and last character must be a letter or digit). [[Single-letter second-level domain]]s are supported for:
* all [[Country code top-level domain|cc TLD]]s (the country code is not validated)
* the [[.org]] [[TLD]]
* certain letters of the [[.com]] TLD (q, x, z)
* certain letters of the [[.net]] TLD (i, q)
Third- and subsequent-level domain names are not checked. The path portion of the URL is not checked.
To resolve this error, ensure that {{para|url}} and other URL parameters contain valid URLs. Online tools are available to [[Internationalized domain name|internationalize]] URLs that are written in non-Latin scripts:
* {{cite web |url=https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml?loc=en_US |title=IDN Conversion Tool |website=Verisign }}
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_url}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_url_help_text" /&gt;
==&lt;span id="bad_zbl"&gt;Check |zbl= value&lt;/span&gt;==
&lt;section begin="bad_zbl_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_zbl}}
When {{cs1}} and {{cs2}} templates contain {{para|zbl}}, a test is done to see if the [[Zentralblatt MATH|Zbl]] identifier value looks like a properly defined value. The {{para|zbl}} identifier is checked to make sure that it has the form: &lt;code&gt;nnnn.nnnnn&lt;/code&gt; where &lt;code&gt;n&lt;/code&gt; is any digit 0–9. Up to three leading zeros in the first quartet may be omitted. Further validation of the Zbl identifier is not performed.
To resolve this error, ensure that the {{para|zbl}} value is correct.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bad_zbl}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bad_zbl_help_text" /&gt;
==&lt;span id="param_unknown_empty"&gt;Cite has empty unknown parameter: &amp;lt;param&gt;&lt;/span&gt;==
&lt;section begin="param_unknown_empty_help_text" /&gt;{{help desk}}{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=_|$2=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param&gt;=&lt;/code&gt;}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_unknown_empty|$1=s|$2=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param1&gt;=&lt;/code&gt;, &lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param2&gt;=&lt;/code&gt;, ...}}}}
This error message is hidden. To show this error message see [[Help:CS1 errors#Controlling error message display|Controlling error message display]].
This error message highlights CS1|2 templates that hold empty parameters with names that are not known to CS1|2. This error message is a companion to [[Help:CS1 errors#parameter_ignored|Unknown parameter {{pipe}}xxxx= ignored]].
Empty positional parameters, which typically look like two adjacent pipes in a template, &lt;code&gt;&lt;nowiki&gt;| |&lt;/nowiki&gt;&lt;/code&gt;, or a pipe and then the end of the template, &lt;code&gt;&lt;nowiki&gt;|}}&lt;/nowiki&gt;&lt;/code&gt;, are identified as numbered parameters: {{error-small|{{para|1|plain=yes}}}}. Similarly, a pipe followed by an HTML comment that encloses everything before the next pipe or closing brace, &lt;code&gt;| &amp;lt;!--&amp;lt;{{var|param name/value pair}}&gt;--&gt; |&lt;/code&gt; will be identified as an empty numbered parameter. Parameters that have both a pipe and an equal sign but do not have a name are identified as empty-string parameters: &lt;code&gt;|=&lt;/code&gt; or &lt;code&gt;| =&lt;/code&gt; → {{error-small|{{para|(empty string)|plain=yes}}}}. Various templates that wrap CS1|2 templates may cause this error when they use constructs like this: &lt;code&gt;&lt;nowiki&gt;|{{#if:{{{2|}}}|title}}={{{2|}}}&lt;/nowiki&gt;&lt;/code&gt;. When &lt;code&gt;&lt;nowiki&gt;{{{2|}}}&lt;/nowiki&gt;&lt;/code&gt; does not have a value, the template creates &lt;code&gt;|=&lt;/code&gt;.
To resolve this error, remove the extra pipe, correct the parameter name, or remove the parameter from the CS1|2 template.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_unknown_empty}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="param_unknown_empty_help_text" /&gt;
==&lt;span id="missing_periodical"&gt;&lt;/span&gt;Cite &amp;lt;template&gt; requires |&amp;lt;param&gt;===
&lt;section begin="missing_periodical_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_periodical|$1=&amp;lt;template&gt;|$2=&amp;lt;param&gt;&lt;/code&gt;}}
This error message is hidden. To show this error message see [[Help:CS1 errors#Controlling error message display|Controlling error message display]].
These CS1 periodical templates require a periodical parameter. The periodical templates are:
: {{tlx|cite journal}}
&lt;!-- : {{tlx|cite news}}
--&gt;:{{tlx|cite magazine}}
&lt;!-- : {{tlx|cite web}}
--&gt;The error message suggests a periodical parameter that matches the template, but there is no requirement to use the suggested parameter; any one of these periodical parameters may be used:
* {{para|journal}}
* {{para|magazine}}
* {{para|newspaper}}
* {{para|periodical}}
* {{para|website}}
* {{para|work}}
In some cases, an incorrect template has been used (e.g. {{tlx|cite journal}} for a web page, book, or standalone document). The appropriate resolution in these cases is to change the incorrect template to {{tlx|cite web}}, {{tlx|cite book}}, or a different, more appropriate template.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_periodical}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="missing_periodical_help_text" /&gt;
==&lt;span id="deprecated_params"&gt;&lt;/span&gt;Cite uses deprecated parameter |&amp;lt;param&gt;= ==
&lt;section begin="deprecated_params_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_deprecated_params|$1=&amp;lt;param&gt;&lt;/code&gt;}}
Over time, some parameters have become obsolete or unnecessary. When this happens, the parameters are identified as deprecated. Editors are encouraged to use other parameters that accomplish the same purpose as those that have been deprecated. The CS1|2 deprecated parameters are listed in the following table, along with recommended replacement parameters. Parameter names are case-sensitive. Editors should expect that support for deprecated parameters will be withdrawn.
To resolve this error, use a supported parameter.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_deprecated_params}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section begin="deprecated_params_table" /&gt;
{|class="wikitable"
|+ Deprecated CS1/CS2 parameters
! Deprecated parameter
! Replace with
! style="width: 110px;" | Date
&lt;!-- |-
| none deprecated at present
| --&gt;
|-
| {{para|authormask}}
| {{para|author-mask}}
| October 2020
|-
| {{para|authormask{{var|n}}}}
| {{para|author-mask{{var|n}}}}
| October 2020
|-
| {{para|author{{var|n}}mask}}
| {{para|author{{var|n}}-mask}}
| October 2020
|-
| {{para|displayauthors}}
| {{para|display-authors}}
| October 2020
|-
| {{para|editorlink}}
| {{para|editor-link}}
| October 2020
|-
| {{para|editorlink{{var|n}}}}
| {{para|editor-link{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}link}}
| {{para|editor{{var|n}}-link}}
| October 2020
|-
| {{para|editors}}
| {{para|editor}} (1 editor) or {{para|editor{{var|n}}}} (more than 1 editor) or {{para|veditors}} (for Vancouver style editors). Consider {{para|editor-mask{{var|n}}}} if annotation is required.
| October 2020
|-
| {{para|ignore-isbn-error}}
| {{para|isbn|((&amp;lt;{{var|isbn}}&gt;))}}
| October 2020
|-
| {{para|last-author-amp}}
| {{para|name-list-style|amp}}
| October 2020
|-
| {{para|lastauthoramp}}
| {{para|name-list-style|amp}}
| October 2020
|-
| {{para|subjectlink}}
| {{para|subject-link}}
| October 2020
|-
| {{para|subjectlink{{var|n}}}}
| {{para|subject-link{{var|n}}}}
| October 2020
|-
| {{para|subject{{var|n}}link}}
| {{para|subject{{var|n}}-link}}
| October 2020
|}
&lt;!-- Support for the following parameter aliases was recently removed. Usage in mainspace should be about zero, and hints for them added to the suggestion list. However, as they may occasionally pop up again through copy&amp;paste or usage of old scripts for some while, list them here as well for users coming here searching for help. --&gt;{|class="wikitable"
|+ Recently removed CS1/CS2 parameters
! Removed parameter !! Replace with !! Date
&lt;!-- |-
| none removed at present
| --&gt;
|-
| {{para|authorfirst}}
| {{para|author-first}}
| October 2020
|-
| {{para|authorfirst{{var|n}}}}
| {{para|author-first{{var|n}}}}
| October 2020
|-
| {{para|author{{var|n}}first}}
| {{para|author{{var|n}}-first}}
| October 2020
|-
| {{para|authorlast}}
| {{para|author-last}}
| October 2020
|-
| {{para|authorlast{{var|n}}}}
| {{para|author-last{{var|n}}}}
| October 2020
|-
| {{para|author{{var|n}}last}}
| {{para|author{{var|n}}-last}}
| October 2020
|-
| {{para|authorgiven}}
| {{para|author-given}}
| October 2020
|-
| {{para|authorgiven{{var|n}}}}
| {{para|author-given{{var|n}}}}
| October 2020
|-
| {{para|author{{var|n}}given}}
| {{para|author{{var|n}}-given}}
| October 2020
|-
| {{para|authorsurname}}
| {{para|author-surname}}
| October 2020
|-
| {{para|authorsurname{{var|n}}}}
| {{para|author-surname{{var|n}}}}
| October 2020
|-
| {{para|author{{var|n}}surname}}
| {{para|author{{var|n}}-surname}}
| October 2020
|-
| {{para|deadurl|yes}} &lt;!-- deprecation already some while ago, but gets reinserted into mainspace by old scripts, so continue to list until resolved --&gt;
| {{para|url-status|dead}}
| September 2019
|-
| {{para|dead-url|yes}} &lt;!-- deprecation already some while ago, but gets reinserted into mainspace by old scripts, so continue to list until resolved --&gt;
| {{para|url-status|dead}}
| September 2019
|-
| {{para|displayeditors}}
| {{para|display-editors}}
| October 2020
|-
| {{para|doi-broken}}
| {{para|doi-broken-date}}
| October 2020
|-
| {{para|doi-inactive-date}}
| {{para|doi-broken-date}}
| October 2020
|-
| {{para|editorfirst}}
| {{para|editor-first}}
| October 2020
|-
| {{para|editorfirst{{var|n}}}}
| {{para|editor-first{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}first}}
| {{para|editor{{var|n}}-first}}
| October 2020
|-
| {{para|editorlast}}
| {{para|editor-last}}
| October 2020
|-
| {{para|editorlast{{var|n}}}}
| {{para|editor-last{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}last}}
| {{para|editor{{var|n}}-last}}
| October 2020
|-
| {{para|editorgiven}}
| {{para|editor-given}}
| October 2020
|-
| {{para|editorgiven{{var|n}}}}
| {{para|editor-given{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}given}}
| {{para|editor{{var|n}}-given}}
| October 2020
|-
| {{para|editorsurname}}
| {{para|editor-surname}}
| October 2020
|-
| {{para|editorsurname{{var|n}}}}
| {{para|editor-surname{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}surname}}
| {{para|editor{{var|n}}-surname}}
| October 2020
|-
| {{para|editormask}}
| {{para|editor-mask}}
| October 2020
|-
| {{para|editormask{{var|n}}}}
| {{para|editor-mask{{var|n}}}}
| October 2020
|-
| {{para|editor{{var|n}}mask}}
| {{para|editor{{var|n}}-mask}}
| October 2020
|-
| {{para|embargo}}
| {{para|pmc-embargo-date}}
| October 2020
|-
| {{para|ignoreisbnerror}}
| {{para|isbn|((&amp;lt;{{var|isbn}}&gt;))}}
| October 2020
|-
| {{para|interviewerlink}}
| {{para|interviewer-link}}
| October 2020
|-
| {{para|interviewerlink{{var|n}}}}&lt;!-- for completeness only --&gt;
| {{para|interviewer-link{{var|n}}}}
| October 2020
|-
| {{para|interviewer{{var|n}}link}}&lt;!-- for completeness only --&gt;
| {{para|interviewer{{var|n}}-link}}
| October 2020
|-
| {{para|interviewermask}}
| {{para|interviewer-mask}}
| October 2020
|-
| {{para|interviewermask{{var|n}}}}&lt;!-- for completeness only --&gt;
| {{para|interviewer-mask{{var|n}}}}
| October 2020
|-
| {{para|interviewer{{var|n}}mask}}&lt;!-- for completeness only --&gt;
| {{para|interviewer{{var|n}}-mask}}
| October 2020
|-
| {{para|no-cat}}
| {{para|no-tracking}}
| October 2020
|-
| {{para|notracking}}
| {{para|no-tracking}}
| October 2020
|-
| {{para|registration}} &lt;!-- deprecation already some while ago, but gets reinserted into mainspace by old scripts, so continue to list until resolved --&gt;
| {{para|url-access|registration}}
| January 2020
|-
| {{para|series-separator}}
| (delete)
| October 2020
|-
| {{para|subscription}} &lt;!-- deprecation already some while ago, but gets reinserted into mainspace by old scripts, so continue to list until resolved --&gt;
| {{para|url-access|subscription}}
| January 2020
|}&lt;section end="deprecated_params_table" /&gt;
&lt;section end="deprecated_params_help_text" /&gt;
==&lt;span id="generic_title"&gt;Cite uses generic title&lt;/span&gt;==
&lt;section begin="generic_title_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_generic_title}}
Articles are listed in this category when [[Module:Citation/CS1]] identifies template {{para|title}} parameters that use place-holder titles. Such titles may have been provided by bots or other tools that are unable to identify the source's correct title. Pages in this category should only be added by Module:Citation/CS1.
CS1|2 maintains a short list of 'titles' that are typically not the title of the cited source. Some examples are:
* Wayback machine
* This website is for sale
* Are you a robot?
To resolve this error, replace the place-holder title with the source's actual title.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_generic_title}}.&lt;ref group="lower-alpha" name="categories" /&gt;
See also the maintenance category [[:Category:CS1 maint: archived copy as title]].&lt;section end="generic_title_help_text" /&gt;
==&lt;span id="citeseerx_missing"&gt;|citeseerx= required&lt;/span&gt;==
&lt;section begin="citeseerx_missing_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_citeseerx_missing}}
{{tlx|cite citeseerx}} requires the identifier parameter {{para|citeseerx}}.
To resolve this error, ensure that the template has {{para|citeseerx}} with a properly constructed value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citeseerx_missing}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="citeseerx_missing_help_text" /&gt;
==&lt;span id="class_ignored"&gt;|class= ignored&lt;/span&gt;==
&lt;section begin="class_ignored_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_class_ignored}}
Only used in {{tlx|cite arXiv}} templates, {{para|class}} is only appropriate when the template uses {{para|arxiv|YYMM.NNNN}} or {{para|arxiv|YYMM.NNNNN}} identifier formats; see [[Template:Cite arXiv#Usage|Cite arXiv §Usage]].
To resolve this error, remove {{para|class}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_class_ignored}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="class_ignored_help_text" /&gt;
==&lt;span id="contributor_ignored"&gt;|contributor= ignored&lt;/span&gt;==
&lt;section begin="contributor_ignored_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_ignored}}
Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. This error occurs when {{para|contributor}} is used in a template that is not {{tlx|cite book}} or {{tlx|citation}} or is one of these two templates and one of the {{para|work}} parameter aliases is set.
To resolve this error, choose a more appropriate CS1 or CS2 template or remove {{para|contributor}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_ignored}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="contributor_ignored_help_text" /&gt;
==&lt;span id="contributor_missing_required_param"&gt;|contributor= requires |&amp;lt;param&gt;= &lt;/span&gt;==
&lt;section begin="contributor_missing_required_param_help_text" /&gt;{{help desk}}{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=author}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_contributor_missing_required_param|$1=contribution}}}}
Only used in book citations, {{para|contributor}} identifies the author of a contribution, typically an afterword, foreword, introduction, preface, etc., to another (primary) author's work. As such, the primary author is required ({{para|author}} or appropriate alias) as is the title of the contribution ({{para|contribution}}).
To resolve this error, include the book's primary author in {{para|author1}}, or {{para|last1}}, {{para|first1}}, or {{para|vauthors}} and include the contribution title in {{para|contribution}}; or remove {{para|contributor}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_contributor_missing_required_param}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="contributor_missing_required_param_help_text" /&gt;
==&lt;span id="empty_citation"&gt;Empty citation&lt;/span&gt;==
&lt;section begin="empty_citation_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_empty_citation}}
A {{cs1}} or {{cs2}} template marked as "Empty" contains no recognizable parameter identifiers. For example, this citation is marked as "empty" even though it contains usable information:
:&lt;code&gt;&lt;nowiki&gt;{{cite web |http://www.foobar.com |The Foobar News}}&lt;/nowiki&gt;&lt;/code&gt;
The citation is "empty" because it does not contain the necessary parameter identifiers (in this case {{para|url}} and {{para|title}}) that tell {{tlx|cite web}} how to use the information that the citation does contain.
A citation is also marked as "empty" when it contains only parameters that it doesn't recognize:
: &lt;code&gt;&lt;nowiki&gt;{{cite book |titolo=The Bazquux Uprising |anno=2015}}&lt;/nowiki&gt;&lt;/code&gt;
This citation is "empty" because the Italian-language parameters {{para|titolo}} and {{para|anno}} are not recognized as valid parameter names on the English Wikipedia.
"Empty citation" may also mean that an editor meant to use another template entirely. Perhaps the editor used {{tlx|citation}} when the intent was to use {{tlx|citation needed}} or {{tlx|quote}}.
To resolve this error, add appropriate parameter identifiers, translate foreign language parameter names to their English equivalents, or replace the CS1/CS2 template with a more appropriate template.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_empty_citation}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="empty_citation_help_text" /&gt;
== &lt;span id="explicit_et_al"&gt;Explicit use of et al.&lt;/span&gt; ==
&lt;section begin="explicit_etal_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_etal|$1=&amp;lt;param&gt;}}
This error occurs where a {{cs1}} or {{cs2}} template detects that one of the names parameters contains some form of "et al." either as a separate name parameter ({{para|author6|et al.}}) or as a suffix added to a name list ({{para|author|Smith, A.B. et al.}}) or first name ({{para|first|John, et al.}}).
This error can occur in any of the author, editor, interviewer, translator, or contributor parameters.
Use the {{para|display-authors}} parameter instead (or other applicable {{para|display-''&lt;names&gt;''}} parameter), as documented at [[Help:Citation Style 1#Display options]].
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_etal}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="explicit_etal_help_text" /&gt;
==&lt;span id="param_has_ext_link"&gt;External link in |&amp;lt;param&gt;=&lt;/span&gt;==
&lt;section begin="param_has_ext_link_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_ext_link|$1={{pipe}}&amp;lt;param&gt;=}}
This error occurs when any of the [[Help:Citation Style 1|CS1]] or [[Help:Citation Style 2|CS2 citation]] title-holding parameters – {{para|title}}, {{para|chapter}}, {{para|publisher}}, {{para|work}} or any of its aliases: {{para|journal}}, {{para|magazine}}, {{para|newspaper}}, {{para|periodical}} and {{para|website}} – hold an external link (URL). External links in these parameters corrupt the citation's metadata and can be the source of a variety of other error messages.
To resolve this error, remove the external link from the identified parameter. Consider placing the external link in a more appropriate parameter:
* for {{para|chapter}}, the URL may belong in {{para|chapter-url}}.
* for other parameters, it may belong in {{para|url}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_ext_link}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="param_has_ext_link_help_text" /&gt;
==&lt;span id="first_missing_last"&gt;|&amp;lt;first&gt;''n''= missing |&amp;lt;last&gt;''n''=&lt;/span&gt;==
&lt;section begin="first_missing_last_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_first_missing_last|$1=&amp;lt;first&gt;{{var|n}}|$2=&amp;lt;last&gt;{{var|n}}}}
{{cs1}} and {{cs2}} templates requires a {{para|&amp;lt;last&gt;''n''}} parameter for each {{para|&amp;lt;first&gt;''n''}} parameter in a citation. Author, contributor, editor, interviewer, and translator lists are checked for proper last/first pairing. CS1|2 will emit this error message for the first mismatch it detects. If there are more last/first mismatches in a citation, subsequent mismatches are not detected.
There is no requirement that each {{para|&amp;lt;last&gt;''n''}} have a matching {{para|&amp;lt;first&gt;''n''}}.
To resolve this error, ensure that each {{para|&amp;lt;first&gt;''n''}} has a corresponding {{para|&amp;lt;last&gt;''n''}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_first_missing_last}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="first_missing_last_help_text" /&gt;
==&lt;span id="format_missing_url"&gt;|format= requires |url= &lt;/span&gt;==
&lt;section begin="format_missing_url_help_text" /&gt;{{help desk}}{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=format|$2=url}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_format_missing_url|$1=...-format|$2=...-url}}}}
These errors occur when {{cs1}} and {{cs2}} templates use {{para|format}} or {{para|...-format}} without also providing a corresponding URL for {{para|url}} or {{para|...-url}}, respectively. The {{para|format}} and {{para|...-format}} parameters are used to specify the file format of a web resource, such as [[PDF]], [[Doc (computing)|DOC]], or [[Microsoft Excel file format|XLS]]. In some cases an editor may have intended to use {{para|type}} to specify a kind of document, such as hard cover, paperback, or pamphlet. The {{para|format}} and {{para|...-format}} value is always displayed.
The list of {{para|...-format}} parameters is:
: {{para|archive-format}}, {{para|article-format}}, {{para|chapter-format}}, {{para|conference-format}}, {{para|contribution-format}}, {{para|entry-format}}, {{para|event-format}}, {{para|lay-format}}, {{para|map-format}}, {{para|section-format}}, {{para|transcript-format}}
(&lt;!-- TBD: Ia this still necessary to be mentioned? --&gt;Citations that relied on the pre-2014&lt;!-- 2014-11-29 --&gt;, somewhat odd use of {{para|url}} and {{para|format}} may need adjustment in regard to {{para|chapter-format}}.)
To resolve this error, remove {{para|format}} or {{para|chapter-format}}; define {{para|url}} or {{para|chapter-url}}; or change {{para|format}} to {{para|type}} (or to {{para|chapter-format}} if {{para|chapter-url}} is used without {{para|url}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_format_missing_url}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="format_missing_url_help_text" /&gt;
==&lt;span id="disp_name"&gt;Invalid |display-&amp;lt;names&gt;=&amp;lt;value&gt;&lt;/span&gt;==
&lt;section begin="disp_name_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_disp_name|$1=&amp;lt;names&gt;|$2=&amp;lt;value&gt;}}
These error messages are emitted when [[Module:Citation/CS1]] identifies citations that use one or more of the {{para|display-&amp;lt;names&gt;}} parameters with an invalid assigned &lt;code&gt;&amp;lt;value&gt;&lt;/code&gt;. An invalid assigned &lt;code&gt;&amp;lt;value&gt;&lt;/code&gt; is a number that is greater than or equal to the number of &lt;code&gt;&amp;lt;names&gt;&lt;/code&gt; in the associated name-list or it is non-numeric text that Module:Citation/CS1 cannot recognize as a form of the keyword &lt;code&gt;etal&lt;/code&gt;.
To resolve this error, do one of the following:
* Remove the {{para|display-&amp;lt;names&gt;}} parameter from the citation (because "et al." is not appropriate in the citation)
* Change the &lt;code&gt;&amp;lt;value&gt;&lt;/code&gt; of the {{para|display-&amp;lt;names&gt;}} parameter such that it is less than the number of &lt;code&gt;&amp;lt;names&gt;&lt;/code&gt; in the name-list (thereby truncating the displayed list to the number)
* Change the &lt;code&gt;&amp;lt;value&gt;&lt;/code&gt; of the {{para|display-&amp;lt;names&gt;}} parameter to &lt;code&gt;etal&lt;/code&gt;, which will cause "et al" to display after the last &lt;code&gt;&amp;lt;name&gt;&lt;/code&gt;.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_disp_name}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="disp_name_help_text" /&gt;
==&lt;span id="invalid_param_val"&gt;Invalid &amp;lt;param&gt;=&amp;lt;value&gt;&lt;/span&gt;==
&lt;section begin="invalid_param_val_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_param_val|$1=&amp;lt;param&gt;|$2=&amp;lt;value&gt;}}
To function properly, some parameters are limited to a certain set of acceptable values. This error message indicates that a parameter has been assigned a value that is not a member of the parameter's defined set of acceptable values.
Letters in values must all be in lower case, as shown below.
{|class="wikitable"
|+ Parameters with limited acceptable values
|-
! Parameter !! Acceptable values
|-
| {{para|df}} ||&lt;code&gt;dmy&lt;/code&gt;, &lt;code&gt;dmy-all&lt;/code&gt;, &lt;code&gt;mdy&lt;/code&gt;, &lt;code&gt;mdy-all&lt;/code&gt;, &lt;code&gt;ymd&lt;/code&gt;, &lt;code&gt;ymd-all&lt;/code&gt;
|-
| {{para|ignore-isbn-error}}&lt;br /&gt;(deprecated)||rowspan=2|&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;yes&lt;/code&gt;
|-
| {{para|last-author-amp}}&lt;br /&gt;(deprecated)
|-
| {{para|mode}}||&lt;code&gt;cs1&lt;/code&gt;, &lt;code&gt;cs2&lt;/code&gt;
|-
| {{para|name-list-format}}&lt;br /&gt;(deprecated)||&lt;code&gt;vanc&lt;/code&gt;
|-
| {{para||name-list-style}} || &lt;code&gt;amp&lt;/code&gt;, &lt;code&gt;ampersand&lt;/code&gt;, &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;&amp;&lt;/code&gt;, &lt;code&gt;serial&lt;/code&gt;, &lt;code&gt;vanc&lt;/code&gt;
|-
| {{para|no-pp}}||rowspan=2|&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;yes&lt;/code&gt;
|-
| {{para|no-tracking}}
|-
| {{para|bibcode-access}}||rowspan=7|&lt;code&gt;free&lt;/code&gt;
|-
| {{para|doi-access}}
|-
| {{para|hdl-access}}
|-
| {{para|jstor-access}}
|-
| {{para|ol-access}}
|-
| {{para|osti-access}}
|-
| {{para|s2cid-access}}
|-
| {{para|url-access}}||rowspan=7|&lt;code&gt;subscription&lt;/code&gt;, &lt;code&gt;registration&lt;/code&gt;, &lt;code&gt;limited&lt;/code&gt;
|-
| {{para|article-url-access}}
|-
| {{para|chapter-url-access}}
|-
| {{para|contribution-url-access}}
|-
| {{para|entry-url-access}}
|-
| {{para|map-url-access}}
|-
| {{para|section-url-access}}
|-
| {{para|url-status}}||&lt;code&gt;dead&lt;/code&gt;, &lt;code&gt;live&lt;/code&gt;, &lt;code&gt;unfit&lt;/code&gt;, &lt;code&gt;usurped&lt;/code&gt;
|}
To resolve this error, use an appropriate value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_param_val}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="invalid_param_val_help_text" /&gt;
==&lt;span id="script_parameter"&gt;Invalid |script-&amp;lt;param&gt;=: &amp;lt;type&gt;&lt;/span&gt;==
&lt;section begin="script_parameter_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_script_parameter|$1=script-&amp;lt;param&gt;|$2=&amp;lt;type&gt;}}
The various {{para|script-&amp;lt;{{var|param}}&gt;}} parameters are checked for proper form. When an error is detected, the error message briefly identifies the type of the error:
: &lt;span class="error" style="font-size:100%"&gt;missing title part&lt;/span&gt; – the {{para|script-&amp;lt;{{var|param}}&gt;}} parameter has a language-code prefix but is otherwise empty
: &lt;span class="error" style="font-size:100%"&gt;missing prefix&lt;/span&gt; – the {{para|script-&amp;lt;{{var|param}}&gt;}} parameter has text but is missing the required language-code prefix; the prefix has the form &lt;code&gt;xx:&lt;/code&gt; or &lt;code&gt;xxx:&lt;/code&gt; where &lt;code&gt;xx&lt;/code&gt; or &lt;code&gt;xxx&lt;/code&gt; is a valid [[ISO 639-1]] or [[ISO 639-3]] language code known to CS1|2 as a language that uses a non-Latin script; the colon (&lt;code&gt;:&lt;/code&gt;) is required
: &lt;span class="error" style="font-size:100%"&gt;unknown language code&lt;/span&gt; – the {{para|script-&amp;lt;{{var|param}}&gt;}} parameter has a (possibly valid) language code that CS1|2 does not recognize as a language using a non-Latin script
Language codes known to CS1|2 for languages that do not use a Latin script are:
{{#invoke:Cs1 documentation support|script_lang_lister}}&lt;!-- makes a language code: name list from the master list in [[Module:Citation/CS1/Configuration]] --&gt;
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_script_parameter}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="script_parameter_help_text" /&gt;
==&lt;span id="apostrophe_markup"&gt;Italic or bold markup not allowed in: |&amp;lt;param&gt;=&lt;/span&gt;==
&lt;section begin="apostrophe_markup_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_apostrophe_markup|$1=&amp;lt;param&gt;{{var|n}}}}
Italic (&lt;code&gt;&lt;nowiki&gt;''&lt;/nowiki&gt;&lt;/code&gt;) or bold (&lt;code&gt;&lt;nowiki&gt;'''&lt;/nowiki&gt;&lt;/code&gt;) wikimarkup is not allowed in publisher and periodical parameters. These parameters include:
* {{para|publisher}}
* {{para|journal}}
* {{para|magazine}}
* {{para|newspaper}}
* {{para|periodical}}
* {{para|website}}
* {{para|work}}
To resolve this error, remove wiki markup from the named parameter's value and ensure that the template is using the correct parameters; when citing a newspaper, use {{para|newspaper}} for the newspaper's name, not {{para|publisher}}, etc.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_apostrophe_markup}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="apostrophe_markup_help_text" /&gt;
==&lt;span id="missing_name"&gt;Missing |&amp;lt;name&gt;''n''=&lt;/span&gt;==
&lt;section begin="missing_name_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_name|$1=&amp;lt;name&gt;|$2={{var|n}}}}
So that all names are listed in a rendered citation, {{cs1}} and {{cs2}} templates require ''n'' in {{para|&amp;lt;last&gt;{{var|n}}}} (and its aliases) to increment by 1 for each name in the list (author, contributor, editor, interviewer, translator). This error message is emitted when there is a 'hole' in the numbering (an author list made up of {{para|author1}} and {{para|author3}} but without {{para|author2}} for example).
The test will not detect a 'hole' that is larger than 1. It is presumed that when {{para|author{{var|n}}}} and {{para|author{{var|n+1}}}} are both not present, then the test has reached the end of the list.
To resolve this error, ensure that the numbering of the {{para|&amp;lt;last&gt;{{var|n}}}} parameters increments properly.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_name}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="missing_name_help_text" /&gt;
==&lt;span id="missing_title"&gt;Missing or empty |title= &lt;/span&gt;==
There are two slightly different error conditions that can arise when [[Help:Citation Style 1|CS1 citations]] lack appropriate titles. In each case, CS1 reports this error message. The necessary resolution may vary depending on the cause of the error. The error message links to the appropriate description below.
===&lt;span id="bare_url_missing_title"&gt;Bare URL without a title&lt;/span&gt;===
&lt;section begin="bare_url_missing_title_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_bare_url_missing_title|$1=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param&gt;=&lt;/code&gt;}}
All {{cs1}} and {{cs2}} templates report this error when one of the [[URL]]-containing parameters cannot be paired with an associated title. This error may also occur when {{para|title}} cannot be linked with {{para|url}} because the citation also contains a conflicting {{para|title-link}} parameter.
{|class="wikitable"
|+ URL-containing parameters and associated title parameters
|-
! URL parameters
! Title parameters
|-
| {{para|archive-url}}
| {{para|title}}
|-
| {{para|article-url}}
| {{para|article}}, {{para|chapter}}, {{para|contribution}}, {{para|entry}}, {{para|section}}
|-
| {{para|chapter-url}}
| {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}}, {{para|section}}
|-
| {{para|conference-url}}
| {{para|conference}}, {{para|event}}
|-
| {{para|contribution-url}}
| {{para|contribution}}, {{para|chapter}}, {{para|article}}, {{para|entry}}, {{para|section}}
|-
| {{para|entry-url}}
| {{para|entry}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|section}}
|-
| {{para|event-url}}
| {{para|event}}, {{para|conference}}
&lt;!-- |-
| {{para|lay-url}}
| &amp;nbsp;&amp;nbsp;({{para|lay-source}}) --&gt;
|-
| {{para|map-url}}
| {{para|map}}
|-
| {{para|section-url}}
| {{para|section}}, {{para|chapter}}, {{para|article}}, {{para|contribution}}, {{para|entry}}
|-
| {{para|transcript-url}}
| {{para|transcript}}
|-
| {{para|url}}
| {{para|title}}
|}
A unique case exists: if {{para|pmc}} has a value and {{para|url}} is omitted or empty, then {{para|title}} is linked with the same URL as the PMC.
Because URLs are ugly and generally uninformative, it is expected that editors should provide a meaningful title for each URL. In most cases this can be accomplished by using the {{para|title}} parameter.
To resolve this error, provide an appropriate title for the URL-containing parameter. In the case where {{para|url}} and {{para|title-link}} are contending for {{para|title}} you must choose which one to keep. Consider moving {{para|url}} or {{para|title-link}} to a more suitable parameter.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_bare_url_missing_title|pages=yes}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="bare_url_missing_title_help_text" /&gt;
===&lt;span id="citation_missing_title"&gt;Citation without a title of any form&lt;/span&gt;===
&lt;section begin="citation_missing_title_help_text" /&gt;{{help desk}}{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=title}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_citation_missing_title|$1=series}}}}
This error occurs for {{cs1}} and {{cs2}} templates when all of {{para|title}}, {{para|trans-title}}, and {{para|script-title}} are omitted or left blank. At least one of these title parameters must be provided for each citation.
{{tlx|cite episode}} will show this error if {{para|series}} is omitted or left blank (even if a {{para|title}} is provided).
Sometimes this error occurs because an editor has used a CS1|2 citation as a [[Help:Shortened footnotes|shortened footnote]] when {{tlx|sfn}} or one of the {{tlx|harv}} family of templates would have been more appropriate. This error also occurs when an editor used {{tlx|citation}} but intended to use {{tlx|citation needed}}.
To resolve this error, provide a value for {{para|title}}, {{para|trans-title}}, and/or {{para|script-title}} or replace the CS1|2 template with a more appropriate template. If you are listing a periodical or an issue of a periodical in a bibliography rather than within {{tag|ref}} tags, {{tlx|List journal}} may be more appropriate.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_citation_missing_title|pages=yes}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="citation_missing_title_help_text" /&gt;
==&lt;span id="cite_web_url"&gt;Missing or empty |url= &lt;/span&gt;==
&lt;section begin="cite_web_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_cite_web_url}}
This error message is reported by {{tlx|cite web}}, {{tlx|cite podcast}}, and {{tlx|cite mailing list}} when the template parameters {{para|url}} and {{para|archive-url}} are both missing, blank or not properly entered. Note that {{para|website}} or {{para|work}} is the name of the site, not the URL.
To resolve this error, provide a value for {{para|url}} or use a more appropriate template such as {{tl|cite book}}, {{tl|cite journal}} or other {{cs1}} or {{cs2}} template.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_cite_web_url|pages=yes}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="cite_web_url_help_text" /&gt;
==&lt;span id="missing_pipe"&gt;Missing pipe&lt;/span&gt;==
&lt;section begin="missing_pipe_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_missing_pipe|$1=&amp;lt;param&gt;}}
{{cs1}} and {{cs2}} templates report this error when one parameter has text that looks like it is a parameter missing a pipe (&lt;code&gt;|&lt;/code&gt;). This error occurs when a template parameter value contains characters and digits followed by an equal sign. If the alphanumeric text immediately preceding the equal sign is a valid CS1|2 parameter name, the module assumes that the template is missing a pipe and emits this error message.
Some legitimate titles will contain a CS1|2 parameter name followed by an equal sign. In that case, enclose the equal sign in nowiki tags, like this: {{tag|nowiki|content={{=}}}}. For most other cases, simply add the missing pipe.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_missing_pipe}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="missing_pipe_help_text" /&gt;
==&lt;span id="redundant_parameters"&gt;More than one of |&amp;lt;param1&gt;=, |&amp;lt;param2&gt;=, and |&amp;lt;param3&gt;= specified&lt;/span&gt;==
&lt;section begin="redundant_parameters_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=&lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param1&gt;=&lt;/code&gt;, &lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param2&gt;=&lt;/code&gt;, and &lt;code class="cs1-code"&gt;{{pipe}}&amp;lt;param3&gt;=&lt;/code&gt;}}
This error occurs when a {{cs1}} or {{cs2}} template includes more than one parameter that maps to the same meaning. For example, {{para|author}}, {{para|last}}, and {{para|last1}} are all synonyms of each other, so no more than one of these parameters should ever be used in a single template.
To resolve this error, remove or modify the redundant parameter(s).
{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=author-name-list parameters}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_redundant_parameters|$1=editor-name-list parameters}}}}
This error occurs when a CS1 or CS2 template uses more than one type of author or editor name-list style. There are three kinds of incompatible author-name-list styles:
: {{para|author''n''}} and {{para|last''n''}} / {{para|first''n''}} (and their various aliases), {{para|vauthors}}, and {{para|authors}}
and similarly, three editor-name-list styles:
: {{para|editor''n''}} and {{para|editor-last''n''}} / {{para|editor-first''n''}} (and their various aliases), {{para|veditors}}, and {{para|editors}}
To resolve this error, choose one name-list-style. Use the chosen style for both of the author and editor name-lists.
Pages with these errors are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_redundant_parameters}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="redundant_parameters_help_text" /&gt;
==&lt;span id="param_access_requires_param"&gt;&amp;#124;&amp;lt;param&gt;-access= requires &amp;#124;&amp;lt;param&gt;=&lt;/span&gt;==
&lt;section begin="param_access_requires_param_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_access_requires_param|$1=&amp;lt;param&gt;|$2=&amp;lt;param&gt;}}
This error is reported when an access level has been specified for some external link, but the corresponding required parameter is missing or empty.
The parameter can be one of
{| class="wikitable"
|+ Access-level specifier required parameter
|-
! Specifier !! Required parameter
|-
| {{para|article-url-access}} || {{para|article-url}}
|-
| {{para|bibcode-access}} || {{para|bibcode}}
|-
| {{para|chapter-url-access}} || {{para|chapter-url}}
|-
| {{para|contribution-url-access}} || {{para|contribution-url}}
|-
| {{para|doi-access}} || {{para|doi}}
|-
| {{para|entry-url-access}} || {{para|entry-url}}
|-
| {{para|hdl-access}} || {{para|hdl}}
|-
| {{para|jstor-access}} || {{para|jstor}}
|-
| {{para|map-url-access}} || {{para|map-url}}
|-
| {{para|ol-access}} || {{para|ol}}
|-
| {{para|osti-access}} || {{para|osti}}
|-
| {{para|section-url-access}} || {{para|section-url}}
|-
| {{para|s2cid-access}} || {{para|s2cid}}
|-
| {{para|url-access}} || {{para|url}}
|}
To resolve this error, either provide a value for the parameter, or remove the access level specification.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_access_requires_param}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="param_access_requires_param_help_text" /&gt;
==&lt;span id="doibroken_missing_doi"&gt;&amp;#124;&amp;lt;param&gt;= requires &amp;#124;doi=&lt;/span&gt;==
&lt;section begin="doibroken_missing_doi_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_doibroken_missing_doi|$1=&amp;lt;param&gt;}}
When {{para|doi-broken-date}} is used in a CS1|2 template, {{para|doi}} or {{para|DOI}} (with value) must also be present.
To resolve this error, either add the missing DOI or remove the 'broken' parameter.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_doibroken_missing_doi}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="doibroken_missing_doi_help_text" /&gt;
==&lt;span id="ssrn_missing"&gt;|ssrn= required&lt;/span&gt;==
&lt;section begin="ssrn_missing_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_ssrn_missing}}
{{tlx|cite ssrn}} requires the identifier parameter {{para|ssrn}}.
To resolve this error, ensure that the template has {{para|ssrn}} with a properly constructed value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_ssrn_missing}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="ssrn_missing_help_text" /&gt;
==&lt;span id="text_ignored"&gt;Text "????" ignored&lt;/span&gt;==
&lt;section begin="text_ignored_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_text_ignored|$1=????}}
Unlike many Wikipedia templates, the {{cs1}} and {{cs2}} templates do not use unnamed or positional parameters. When a citation contains text between [[vertical bar]]s and that text does not contain an equal sign (=), CS1|2 ignores the text and reports the error. This is true even when the text is the name of a valid parameter.
This error can also be caused by vertical bars (pipe characters) that are part of URLs or titles. When vertical bars occur in URLs, replace each vertical bar with &lt;code&gt;%7C&lt;/code&gt;. When vertical bars occur in parameter values that are not URLs, replace each vertical bar with &lt;code&gt;&amp;amp;#124;&lt;/code&gt; or &lt;code&gt;{{tl|!}}&lt;/code&gt;.
To resolve this error, remove the extraneous text, add '=', add an appropriate parameter name from the template you're using to complete the parameter, or properly encode vertical bars in URLs and titles.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_text_ignored}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="text_ignored_help_text" /&gt;
==&lt;span id="trans_missing_title"&gt;|trans-&amp;lt;param&gt;= requires |&amp;lt;param&gt;= or |script-&amp;lt;param&gt;&lt;/span&gt;==
&lt;section begin="trans_missing_title_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_trans_missing_title|$1=&amp;lt;param&gt;|$2=&amp;lt;param&gt;|$3=&amp;lt;param&gt;}}
{{cs1}} and {{cs2}} templates report this error when the citation has an English translation of the title in {{para|trans-title}} or chapter title in {{para|trans-chapter}} but does not have the original-language title in {{para|title}} or original-language chapter title in {{para|chapter}}.
To resolve this error, provide the original language title for {{para|title}} or chapter title for {{para|chapter}}. Consider adding {{para|language}} if not already part of the citation.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_trans_missing_title}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="trans_missing_title_help_text" /&gt;
==&lt;span id="parameter_ignored"&gt;Unknown parameter |=&amp;lt;param&gt;= ignored&lt;span id="parameter_ignored_suggest"&gt; &lt;/span&gt;&lt;/span&gt;==
&lt;section begin="parameter_ignored_help_text" /&gt;{{help desk}}{{plainlist|
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored|$1=&amp;lt;param&gt;}}
*{{#invoke:Cs1 documentation support|help_text_error_messages|err_parameter_ignored_suggest|$1=&amp;lt;param&gt;|$2=&amp;lt;sparam&gt;}}}}
{{cs1}} and {{cs2}} templates report this error when the name portion of a parameter's {{para|name|value}} pair is not recognized as a valid name. Typically, this is caused by spelling or capitalization errors or when a page is reverted to a version where the citation template did support the parameter.
The CS1|2 engine does not ignore unrecognized parameters. The purpose of the citation is to properly identify the source, not to act as a repository of notes and ancillary information.
CS1|2 template parameters are lower case. CS1|2 will report this error when the parameter's name contains uppercase letters ({{!xt|Xxxx, xxXx, XXXX}}) but the parameter's name is defined as lowercase ({{xt|xxxx}}). Some identifier parameters, like {{para|isbn}}, {{para|pmc}}, {{para|doi}}, etc., can be either lower case or upper case, but not of mixed case ({{para|isbn|mxt=y}} or {{para|ISBN|mxt=y}} but not {{para|Isbn|!mxt=y}}). For [[Module:Citation/CS1/Suggestions|common parameter misspellings]], like {{para|pubisher}} instead of {{para|publisher}} and some former template parameters, CS1|2 will suggest a valid parameter name. The [[Help:CS1_errors#deprecated_params|list of deprecated and recently removed parameters]] may contain additional information as well.
Reported unknown parameters following a {{para|DUPLICATE_&amp;lt;param&gt;}} scheme are created by [[User:Citation bot|Citation Bot]] when it finds duplicate parameters {{para|&amp;lt;param&gt;}} in a template.
To resolve this error, replace the erroneous parameter name with a correct one, possibly using the suggested name. Ensure that the parameter's name is correctly spelled and that there are no characters except spaces between the parameter's name and the leading vertical bar (|) or trailing equals sign (=). A list of valid parameters can be found by consulting [[Help:Citation Style 1]] or visiting the description page of the specific template being used, such as {{tlx|cite web}}, {{tlx|cite book}}, {{tlx|cite journal}}, etc. Consider moving information associated with the unknown parameter into an appropriate parameter or to a section of the article's talk page for preservation.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_parameter_ignored}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="parameter_ignored_help_text" /&gt;
==&lt;span id="wikilink_in_url"&gt;URL–wikilink conflict&lt;/span&gt;==
&lt;section begin="wikilink_in_url_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_wikilink_in_url}}
External links in a rendered citation are a combination of url-holding parameters, {{para|url}}, {{para|chapter-url}}, etc., with title-holding parameters, {{para|title}}, {{para|chapter}}, etc. Title-holding parameters may be [[wikilink]]ed to another Wikipedia article but not when there is a matching url-holding parameter in the citation. When this condition occurs, the wikilink is suppressed, the wiki markup ignored, and the rendered citation links to the external site.
Some [[Help:Template|templates]] will also cause this error if they are part of a title-holding parameter. The error occurs when the template produces wikilinked content. For example, {{tlx|lang}} templates output a wikilinked category. Templates in url-holding parameters may also corrupt the citation's [[WP:COinS|COinS]] metadata. As a general rule, avoid using templates in title-holding parameters unless you know that the template's effects are entirely visual ({{tlx|!}} and the like).
This type of error may also occur in identifier-based templates ({{tlx|cite doi}}, etc.). When this happens, the error message is shown in the article but the error is actually located in the identifier-based citation template.
To resolve this error, remove wikilinks from title-holding parameters that are intended to be externally linked or remove the external URL, which will allow the internal wikilinks to work as expected. If wikilink-producing templates are important to the citation, move them out of the CS1 template but leave them inside the citation's {{tag|ref}} tags. Some of the functionality provided by templates may also be available through CS1 parameters.
To resolve errors in identifier-based citation templates, the template must be edited to correct the error. Exercise caution when editing these templates because identifier-based citation templates are often used in multiple articles.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_wikilink_in_url}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="wikilink_in_url_help_text" /&gt;
==&lt;span id="vancouver"&gt;Vancouver style error&lt;/span&gt;==
&lt;section begin="vancouver_help_text" /&gt;{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_vancouver|$1=&amp;lt;type&gt;}}
This error is reported for citations that use {{para|vauthors}}, {{para|veditors}}, {{para|name-list-style|vanc}}.
[[Vancouver style]] restricts author or editor names to the Latin alphabet. For the purposes of this test, [[Module:Citation/CS1]] defines the Latin alphabet as the letters defined in the [[Unicode]] Latin character sets:
: C0 Controls and Basic Latin&lt;ref&gt;{{cite web |url=https://www.unicode.org/charts/PDF/U0000.pdf |title=C0 Controls and Basic Latin |website=[[Unicode]] |access-date=2015-04-19}}&lt;/ref&gt; (0041–005A, 0061–007A)
: C1 Controls and Latin-1 Supplement&lt;ref&gt;{{cite web |url=https://www.unicode.org/charts/PDF/U0080.pdf |title=C1 Controls and Latin-1 Supplement |website=Unicode |access-date=2015-04-19}}&lt;/ref&gt; (00C0–00D6, 00D8–00F6, 00F8–00FF)
: Latin Extended-A&lt;ref&gt;{{cite web |url=https://www.unicode.org/charts/PDF/U0100.pdf |title=Latin Extended-A |website=Unicode |access-date=2015-04-19}}&lt;/ref&gt; (0100–017F)
: Latin Extended-B&lt;ref&gt;{{cite web |url=https://www.unicode.org/charts/PDF/U0180.pdf |title=Latin Extended-B |website=Unicode |access-date=2015-04-19}}&lt;/ref&gt; (0180–01BF, 01C4–024F)
This error is also reported when more than two initials are used: in case of more than two initials, list only the first two.
This error is also reported when a corporate or institutional author is listed in {{para|vauthors}} without proper delimiters. Corporate authors should be listed this way:
: {{para|vauthors|First Surname FM, Surname AB, {{green|((}}Corporate or institutional Author{{green|))}}, Last Surname XY}}
While normally correct, sometimes the names listed on a PMID page contain errors when the author surname has a lowercase [[nobiliary particle]]. For example, {{PMID|17726700}} lists Magnus von Knebel Doeberitz as Doeberitz Mv which is not correct. This author's name should be listed as {{para|vauthors|von Knebel Doeberitz M}}.&lt;ref&gt;{{cite web |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/ |title=Other surname rules |website=National Center for Biotechnology Information |date=2018-05-18}}&lt;/ref&gt;
Certain punctuation will be flagged as an error. For example, Unicode U+2019, right single quotation mark, causes an error because it is not a member of the Latin character sets identified above: {{para|vauthors|Van{{red|’}}t Veer M}}. Replace this character with the straight (or typewriter) apostrophe: {{para|vauthors|Van{{green|'}}t Veer M}}.
To resolve this error, Romanize author and editor names.&lt;ref&gt;{{cite book |author-last=Patrias |author-first=K. |editor-last=Wendling |editor-first=D. |location=Bethesda, MD, USA |publisher=National Library of Medicine |date=2007 |chapter=Names in non-roman alphabets or character-based languages |chapter-url=https://www.ncbi.nlm.nih.gov/books/NBK7258/box/A48818/ |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers [Internet]. |edition=2nd}}&lt;/ref&gt; Romanizing can result in two-letter initials, for example, the Greek letter 'Θ' Romanizes to 'Th'.&lt;ref&gt;{{cite web |url=https://www.loc.gov/catdir/cpso/romanization/greek.pdf |title=Greek |website=Library of Congress}}&lt;/ref&gt; When author names have this kind of initial, Module:Citation/CS1 can't know if this kind of initial is a typo or a legitimate Romanized character so it will emit the Vancouver error. To suppress the error after determining that the two-character initial is correct and not a typo, treat the name as if it were a corporate name by wrapping it in [[Help:Citation_Style_1#Accept-this-as-written_markup|doubled parentheses]]: {{para|vauthors|..., Tatarinov IuS, ...}} → {{para|vauthors|..., ((Tatarinov IuS)), ...}}
Similarly, Chinese hyphenated given names may appear in PubMed listings. For example: 'Wang Hsien-yu' may be listed on PubMed as 'Wang Hy' which will result in a Vancouver error. When this occurs, and upon verification that such names are correct, wrap them in doubled parentheses.
Specific Rules for Names:&lt;ref&gt;{{cite book |url=https://www.ncbi.nlm.nih.gov/books/NBK7282/ |title=Citing Medicine: The NLM Style Guide for Authors, Editors, and Publishers [Internet] |edition=2nd |author-first=K. |author-last=Patrias |editor-first=D. |editor-last=Wendling |location=Bethesda, MD, USA |publisher=National Library of Medicine (US) |date=2007 |access-date=2019-03-31}}&lt;/ref&gt;
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33071/?report=objectonly Surnames with hyphens and other punctuation in them]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33081/?report=objectonly Other surname rules]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33104/?report=objectonly Given names containing punctuation, a prefix, a preposition, or particle]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33118/?report=objectonly Degrees, titles, and honors before or after a personal name]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33127/?report=objectonly Designations of rank within a family, such as Jr and III]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33134/?report=objectonly Names appearing in non-roman alphabets (Cyrillic, Greek, Arabic, Hebrew, Korean) or character-based languages (Chinese, Japanese)]
* [https://www.ncbi.nlm.nih.gov/books/NBK7282/box/A33152/?report=objectonly Organizations as author]
** CS1|2 does not obey the semicolon-as-separator rule. Separate corporate and organizational names from each other and from individual names with a comma; wrap corporate and organizational names in doubled parentheses as described above.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_vancouver}}.&lt;ref group="lower-alpha" name="categories" /&gt;&lt;section end="vancouver_help_text" /&gt;&lt;!--
When moving this section keep the following attached to the Notes section below --&gt;&lt;section begin="notes_help_text" /&gt;
==Notes==
&lt;!-- When moving this section keep &lt;section begin="notes_help_text"&gt; (located above this section header) attacted --&gt;
{{reflist |group=lower-alpha |refs=
&lt;ref group="lower-alpha" name="categories"&gt;Pages in the Book talk, Category talk, Draft talk, Education Program talk, File talk, Help talk, MediaWiki talk, Module talk, Portal talk, Talk, Template talk, User, User talk, and Wikipedia talk namespaces are not included in the error tracking categories.&lt;/ref&gt;
}}&lt;section end="notes_help_text" /&gt;&lt;!--
When moving this section keep the following attached to the References section below --&gt;&lt;section begin="references_help_text" /&gt;
==References==
&lt;!-- When moving this section keep &lt;section begin="references_help_text"&gt; (located above this section header) attacted --&gt;
{{reflist |refs=
&lt;ref name="archive.org"&gt;{{cite web |url=https://archive.org |title=archive.org website |website=Internet Archive}}&lt;/ref&gt;
&lt;ref name="webcitation.org"&gt;{{cite web |url=https://www.webcitation.org |title=webcitation.org website |website=WebCite}}&lt;/ref&gt;
}}&lt;section end="references_help_text" /&gt;
{{Wikipedia referencing}}
{{Help navigation}}</text>
<sha1>cdu37ilqbfprnjbbvdzhy2nvtn1vrgq</sha1>
</revision>
</page>
<page>
<title>Module:Anchor</title>
<ns>828</ns>
<id>41372338</id>
<revision>
<id>980153746</id>
<parentid>586910342</parentid>
<timestamp>2020-09-24T22:32:51Z</timestamp>
<contributor>
<username>Pppery</username>
<id>28032115</id>
</contributor>
<comment>Add class per edit request</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="647" xml:space="preserve">-- This module implements {{anchor}}.
local getArgs = require('Module:Arguments').getArgs
local tableTools = require('Module:TableTools')
local p = {}
function p.main(frame)
-- Get the positional arguments from #invoke, remove any nil values,
-- and pass them to p._main.
local args = getArgs(frame)
local argArray = tableTools.compressSparseArray(args)
return p._main(unpack(argArray))
end
function p._main(...)
-- Generate the list of anchors.
local anchors = {...}
local ret = {}
for _, anchor in ipairs(anchors) do
ret[#ret + 1] = '&lt;span class="anchor" id="' .. anchor .. '"&gt;&lt;/span&gt;'
end
return table.concat(ret)
end
return p</text>
<sha1>qn9l8z10vmc8ghld7804a9aaffg6g8o</sha1>
</revision>
</page>
<page>
<title>Module:Arguments</title>
<ns>828</ns>
<id>41298065</id>
<revision>
<id>948472485</id>
<parentid>948472482</parentid>
<timestamp>2020-04-01T06:12:40Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="10054" xml:space="preserve">-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments</text>
<sha1>5qx9tzlul9ser30uxj9nbasjt92cevn</sha1>
</revision>
</page>
<page>
<title>Module:Check for unknown parameters</title>
<ns>828</ns>
<id>42286729</id>
<revision>
<id>934641291</id>
<parentid>881505995</parentid>
<timestamp>2020-01-07T17:25:33Z</timestamp>
<contributor>
<username>Gonnym</username>
<id>14984434</id>
</contributor>
<comment>Added entry point for modules per talk page discussion. Report any errors on talk page.</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3153" xml:space="preserve">-- This module may be used to compare the arguments passed to the parent
-- with a list of arguments, returning a specified result if an argument is
-- not on the list
local p = {}
local function trim(s)
return s:match('^%s*(.-)%s*$')
end
local function isnotempty(s)
return s and s:match('%S')
end
local function clean(text)
-- Return text cleaned for display and truncated if too long.
-- Strip markers are replaced with dummy text representing the original wikitext.
local pos, truncated
local function truncate(text)
if truncated then
return ''
end
if mw.ustring.len(text) &gt; 25 then
truncated = true
text = mw.ustring.sub(text, 1, 25) .. '...'
end
return mw.text.nowiki(text)
end
local parts = {}
for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do
pos = remainder
table.insert(parts, truncate(before) .. '&amp;lt;' .. tag .. '&amp;gt;...&amp;lt;/' .. tag .. '&amp;gt;')
end
table.insert(parts, truncate(text:sub(pos or 1)))
return table.concat(parts)
end
function p._check(args, pargs)
if type(args) ~= "table" or type(pargs) ~= "table" then
-- TODO: error handling
return
end
local ignoreblank = isnotempty(args['ignoreblank'])
local showblankpos = isnotempty(args['showblankpositional'])
local knownargs = {}
local unknown = args['unknown'] or 'Found _VALUE_, '
local preview = args['preview']
local values = {}
local res = {}
local regexps = {}
-- create the list of known args, regular expressions, and the return string
for k, v in pairs(args) do
if type(k) == 'number' then
v = trim(v)
knownargs[v] = 1
elseif k:find('^regexp[1-9][0-9]*$') then
table.insert(regexps, '^' .. v .. '$')
end
end
if isnotempty(preview) then
preview = '&lt;div class="hatnote" style="color:red"&gt;&lt;strong&gt;Warning:&lt;/strong&gt; ' .. preview .. ' (this message is shown only in preview).&lt;/div&gt;'
elseif preview == nil then
preview = unknown
end
-- loop over the parent args, and make sure they are on the list
for k, v in pairs(pargs) do
if type(k) == 'string' and knownargs[k] == nil then
local knownflag = false
for _, regexp in ipairs(regexps) do
if mw.ustring.match(k, regexp) then
knownflag = true
break
end
end
if not knownflag and ( not ignoreblank or isnotempty(v) ) then
table.insert(values, clean(k))
end
elseif type(k) == 'number' and
knownargs[tostring(k)] == nil and
( showblankpos or isnotempty(v) )
then
table.insert(values, k .. ' = ' .. clean(v))
end
end
-- add results to the output tables
if #values &gt; 0 then
if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then
unknown = preview
end
for _, v in pairs(values) do
if v == '' then
-- Fix odd bug for | = which gets stripped to the empty string and
-- breaks category links
v = ' '
end
-- avoid error with v = 'example%2' ("invalid capture index")
local r = unknown:gsub('_VALUE_', {_VALUE_ = v})
table.insert(res, r)
end
end
return table.concat(res)
end
function p.check(frame)
local args = frame.args
local pargs = frame:getParent().args
return p._check(args, pargs)
end
return p</text>
<sha1>fai6f8jbbmvoyopkl9xbkhi5th8yqh4</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1</title>
<ns>828</ns>
<id>38573037</id>
<revision>
<id>983013703</id>
<parentid>982835766</parentid>
<timestamp>2020-10-11T18:47:08Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>deprecated enumerated parameter error message fix;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="204553" xml:space="preserve">
require('Module:No globals');
--[[--------------------------&lt; F O R W A R D D E C L A R A T I O N S &gt;--------------------------------------
each of these counts against the Lua upvalue limit
]]
local validation; -- functions in Module:Citation/CS1/Date_validation
local utilities; -- functions in Module:Citation/CS1/Utilities
local z ={}; -- table of tables in Module:Citation/CS1/Utilities
local identifiers; -- functions and tables in Module:Citation/CS1/Identifiers
local metadata; -- functions in Module:Citation/CS1/COinS
local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist
--[[--------------------------&lt; P A G E S C O P E V A R I A B L E S &gt;--------------------------------------
declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here
]]
local added_deprecated_cat; -- Boolean flag so that the category is added only once
local added_vanc_errs; -- Boolean flag so we only emit one Vancouver error / category
local Frame; -- holds the module's frame table
--[[--------------------------&lt; F I R S T _ S E T &gt;------------------------------------------------------------
Locates and returns the first set value in a table of values where the order established in the table,
left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set.
This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs
version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate
the for-loop before it reached the actual end of the list.
]]
local function first_set (list, count)
local i = 1;
while i &lt;= count do -- loop through all items in list
if utilities.is_set( list[i] ) then
return list[i]; -- return the first set list member
end
i = i + 1; -- point to next
end
end
--[[--------------------------&lt; A D D _ V A N C _ E R R O R &gt;----------------------------------------------------
Adds a single Vancouver system error message to the template's output regardless of how many error actually exist.
To prevent duplication, added_vanc_errs is nil until an error message is emitted.
added_vanc_errs is a Boolean declared in page scope variables above
]]
local function add_vanc_error (source)
if not added_vanc_errs then
added_vanc_errs = true; -- note that we've added this category
table.insert( z.message_tail, { utilities.set_message ( 'err_vancouver', {source}, true ) } );
end
end
--[[--------------------------&lt; I S _ S C H E M E &gt;------------------------------------------------------------
does this thing that purports to be a URI scheme seem to be a valid scheme? The scheme is checked to see if it
is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says:
Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus
("+"), period ("."), or hyphen ("-").
returns true if it does, else false
]]
local function is_scheme (scheme)
return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern
end
--[=[-------------------------&lt; I S _ D O M A I N _ N A M E &gt;--------------------------------------------------
Does this thing that purports to be a domain name seem to be a valid domain name?
Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5
BNF defined here: https://tools.ietf.org/html/rfc4234
Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15;
see also [[Single-letter second-level domain]]
list of TLDs: https://www.iana.org/domains/root/db
RFC 952 (modified by RFC 1123) requires the first and last character of a hostname to be a letter or a digit. Between
the first and last characters the name may use letters, digits, and the hyphen.
Also allowed are IPv4 addresses. IPv6 not supported
domain is expected to be stripped of any path so that the last character in the last character of the TLD. tld
is two or more alpha characters. Any preceding '//' (from splitting a URL with a scheme) will be stripped
here. Perhaps not necessary but retained in case it is necessary for IPv4 dot decimal.
There are several tests:
the first character of the whole domain name including subdomains must be a letter or a digit
internationalized domain name (ASCII characters with .xn-- ASCII Compatible Encoding (ACE) prefix xn-- in the TLD) see https://tools.ietf.org/html/rfc3490
single-letter/digit second-level domains in the .org, .cash, and .today TLDs
q, x, and z SL domains in the .com TLD
i and q SL domains in the .net TLD
single-letter SL domains in the ccTLDs (where the ccTLD is two letters)
two-character SL domains in gTLDs (where the gTLD is two or more letters)
three-plus-character SL domains in gTLDs (where the gTLD is two or more letters)
IPv4 dot-decimal address format; TLD not allowed
returns true if domain appears to be a proper name and TLD or IPv4 address, else false
]=]
local function is_domain_name (domain)
if not domain then
return false; -- if not set, abandon
end
domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once
if not domain:match ('^[%w]') then -- first character must be letter or digit
return false;
end
if domain:match ('^%a+:') then -- hack to detect things that look like s:Page:Title where Page: is namespace at Wikisource
return false;
end
local patterns = { -- patterns that look like URLs
'%f[%w][%w][%w%-]+[%w]%.%a%a+$', -- three or more character hostname.hostname or hostname.tld
'%f[%w][%w][%w%-]+[%w]%.xn%-%-[%w]+$', -- internationalized domain name with ACE prefix
'%f[%a][qxz]%.com$', -- assigned one character .com hostname (x.com times out 2015-12-10)
'%f[%a][iq]%.net$', -- assigned one character .net hostname (q.net registered but not active 2015-12-10)
'%f[%w][%w]%.%a%a$', -- one character hostname and ccTLD (2 chars)
'%f[%w][%w][%w]%.%a%a+$', -- two character hostname and TLD
'^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?', -- IPv4 address
}
for _, pattern in ipairs (patterns) do -- loop through the patterns list
if domain:match (pattern) then
return true; -- if a match then we think that this thing that purports to be a URL is a URL
end
end
for _, d in ipairs ({'cash', 'company', 'today', 'org'}) do -- look for single letter second level domain names for these top level domains
if domain:match ('%f[%w][%w]%.' .. d) then
return true
end
end
return false; -- no matches, we don't know what this thing is
end
--[[--------------------------&lt; I S _ U R L &gt;------------------------------------------------------------------
returns true if the scheme and domain parts of a URL appear to be a valid URL; else false.
This function is the last step in the validation process. This function is separate because there are cases that
are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external
wikilinks.
]]
local function is_url (scheme, domain)
if utilities.is_set (scheme) then -- if scheme is set check it and domain
return is_scheme (scheme) and is_domain_name (domain);
else
return is_domain_name (domain); -- scheme not set when URL is protocol-relative
end
end
--[[--------------------------&lt; S P L I T _ U R L &gt;------------------------------------------------------------
Split a URL into a scheme, authority indicator, and domain.
First remove Fully Qualified Domain Name terminator (a dot following TLD) (if any) and any path(/), query(?) or fragment(#).
If protocol-relative URL, return nil scheme and domain else return nil for both scheme and domain.
When not protocol-relative, get scheme, authority indicator, and domain. If there is an authority indicator (one
or more '/' characters immediately following the scheme's colon), make sure that there are only 2.
Any URL that does not have news: scheme must have authority indicator (//). TODO: are there other common schemes
like news: that don't use authority indicator?
Strip off any port and path;
]]
local function split_url (url_str)
local scheme, authority, domain;
url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//')
if url_str:match ('^//%S*') then -- if there is what appears to be a protocol-relative URL
domain = url_str:match ('^//(%S*)')
elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name
scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions
if utilities.is_set (authority) then
authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing;
if utilities.is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then
return scheme; -- return scheme only making domain nil which will cause an error message
end
else
if not scheme:match ('^news:') then -- except for news:..., MediaWiki won't link URLs that do not have authority indicator; TODO: a better way to do this test?
return scheme; -- return scheme only making domain nil which will cause an error message
end
end
domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present
end
return scheme, domain;
end
--[[--------------------------&lt; L I N K _ P A R A M _ O K &gt;---------------------------------------------------
checks the content of |title-link=, |series-link=, |author-link=, etc. for properly formatted content: no wikilinks, no URLs
Link parameters are to hold the title of a Wikipedia article, so none of the WP:TITLESPECIALCHARACTERS are allowed:
# &lt; &gt; [ ] | { } _
except the underscore which is used as a space in wiki URLs and # which is used for section links
returns false when the value contains any of these characters.
When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid URL (the
|&lt;param&gt;-link= parameter is ok); else false when value appears to be a valid URL (the |&lt;param&gt;-link= parameter is NOT ok).
]]
local function link_param_ok (value)
local scheme, domain;
if value:find ('[&lt;&gt;%[%]|{}]') then -- if any prohibited characters
return false;
end
scheme, domain = split_url (value); -- get scheme or nil and domain or nil from URL;
return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid URL
end
--[[--------------------------&lt; L I N K _ T I T L E _ O K &gt;---------------------------------------------------
Use link_param_ok() to validate |&lt;param&gt;-link= value and its matching |&lt;title&gt;= value.
|&lt;title&gt;= may be wiki-linked but not when |&lt;param&gt;-link= has a value. This function emits an error message when
that condition exists
check &lt;link&gt; for inter-language interwiki-link prefix. prefix must be a MediaWiki-recognized language
code and must begin with a colon.
]]
local function link_title_ok (link, lorig, title, torig)
local orig;
if utilities.is_set (link) then -- don't bother if &lt;param&gt;-link doesn't have a value
if not link_param_ok (link) then -- check |&lt;param&gt;-link= markup
orig = lorig; -- identify the failing link parameter
elseif title:find ('%[%[') then -- check |title= for wikilink markup
orig = torig; -- identify the failing |title= parameter
elseif link:match ('^%a+:') then -- if the link is what looks like an interwiki
local prefix = link:match ('^(%a+):'):lower(); -- get the interwiki prefix
if cfg.inter_wiki_map[prefix] then -- if prefix is in the map, must have preceding colon
orig = lorig; -- flag as error
end
end
end
if utilities.is_set (orig) then
link = ''; -- unset
table.insert( z.message_tail, { utilities.set_message ( 'err_bad_paramlink', orig)}); -- URL or wikilink in |title= with |title-link=;
end
return link; -- link if ok, empty string else
end
--[[--------------------------&lt; C H E C K _ U R L &gt;------------------------------------------------------------
Determines whether a URL string appears to be valid.
First we test for space characters. If any are found, return false. Then split the URL into scheme and domain
portions, or for protocol-relative (//example.com) URLs, just the domain. Use is_url() to validate the two
portions of the URL. If both are valid, or for protocol-relative if domain is valid, return true, else false.
Because it is different from a standard URL, and because this module used external_link() to make external links
that work for standard and news: links, we validate newsgroup names here. The specification for a newsgroup name
is at https://tools.ietf.org/html/rfc5536#section-3.1.4
]]
local function check_url( url_str )
if nil == url_str:match ("^%S+$") then -- if there are any spaces in |url=value it can't be a proper URL
return false;
end
local scheme, domain;
scheme, domain = split_url (url_str); -- get scheme or nil and domain or nil from URL;
if 'news:' == scheme then -- special case for newsgroups
return domain:match('^[%a%d%+%-_]+%.[%a%d%+%-_%.]*[%a%d%+%-_]$');
end
return is_url (scheme, domain); -- return true if value appears to be a valid URL
end
--[=[-------------------------&lt; I S _ P A R A M E T E R _ E X T _ W I K I L I N K &gt;----------------------------
Return true if a parameter value has a string that begins and ends with square brackets [ and ] and the first
non-space characters following the opening bracket appear to be a URL. The test will also find external wikilinks
that use protocol-relative URLs. Also finds bare URLs.
The frontier pattern prevents a match on interwiki-links which are similar to scheme:path URLs. The tests that
find bracketed URLs are required because the parameters that call this test (currently |title=, |chapter=, |work=,
and |publisher=) may have wikilinks and there are articles or redirects like '//Hus' so, while uncommon, |title=[[//Hus]]
is possible as might be [[en://Hus]].
]=]
local function is_parameter_ext_wikilink (value)
local scheme, domain;
if value:match ('%f[%[]%[%a%S*:%S+.*%]') then -- if ext. wikilink with scheme and domain: [xxxx://yyyyy.zzz]
scheme, domain = split_url (value:match ('%f[%[]%[(%a%S*:%S+).*%]'));
elseif value:match ('%f[%[]%[//%S+.*%]') then -- if protocol-relative ext. wikilink: [//yyyyy.zzz]
scheme, domain = split_url (value:match ('%f[%[]%[(//%S+).*%]'));
elseif value:match ('%a%S*:%S+') then -- if bare URL with scheme; may have leading or trailing plain text
scheme, domain = split_url (value:match ('(%a%S*:%S+)'));
elseif value:match ('//%S+') then -- if protocol-relative bare URL: //yyyyy.zzz; may have leading or trailing plain text
scheme, domain = split_url (value:match ('(//%S+)')); -- what is left should be the domain
else
return false; -- didn't find anything that is obviously a URL
end
return is_url (scheme, domain); -- return true if value appears to be a valid URL
end
--[[-------------------------&lt; C H E C K _ F O R _ U R L &gt;-----------------------------------------------------
loop through a list of parameters and their values. Look at the value and if it has an external link, emit an error message.
]]
local function check_for_url (parameter_list)
local error_message = '';
for k, v in pairs (parameter_list) do -- for each parameter in the list
if is_parameter_ext_wikilink (v) then -- look at the value; if there is a URL add an error message
if utilities.is_set(error_message) then -- once we've added the first portion of the error message ...
error_message = error_message .. ", "; -- ... add a comma space separator
end
error_message = error_message .. "&amp;#124;" .. k .. "="; -- add the failed parameter
end
end
if utilities.is_set (error_message) then -- done looping, if there is an error message, display it
table.insert( z.message_tail, { utilities.set_message ( 'err_param_has_ext_link', {error_message}, true ) } );
end
end
--[[--------------------------&lt; S A F E _ F O R _ U R L &gt;------------------------------------------------------
Escape sequences for content that will be used for URL descriptions
]]
local function safe_for_url( str )
if str:match( "%[%[.-%]%]" ) ~= nil then
table.insert( z.message_tail, { utilities.set_message ( 'err_wikilink_in_url', {}, true ) } );
end
return str:gsub( '[%[%]\n]', {
['['] = '&amp;#91;',
[']'] = '&amp;#93;',
['\n'] = ' ' } );
end
--[[--------------------------&lt; E X T E R N A L _ L I N K &gt;----------------------------------------------------
Format an external link with error checking
]]
local function external_link( URL, label, source, access)
local error_str = "";
local domain;
local path;
local base_url;
if not utilities.is_set ( label ) then
label = URL;
if utilities.is_set ( source ) then
error_str = utilities.set_message ( 'err_bare_url_missing_title', { utilities.wrap_style ('parameter', source) }, false, " " );
else
error( cfg.messages["bare_url_no_origin"] );
end
end
if not check_url( URL ) then
error_str = utilities.set_message ( 'err_bad_url', {utilities.wrap_style ('parameter', source)}, false, " " ) .. error_str;
end
domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the URL into scheme plus domain and path
if path then -- if there is a path portion
path = path:gsub ('[%[%]]', {['['] = '%5b', [']'] = '%5d'}); -- replace '[' and ']' with their percent-encoded values
URL = table.concat ({domain, path}); -- and reassemble
end
base_url = table.concat({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wiki-markup URL
if utilities.is_set (access) then -- access level (subscription, registration, limited)
base_url = utilities.substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon
end
return table.concat ({base_url, error_str});
end
--[[--------------------------&lt; D E P R E C A T E D _ P A R A M E T E R &gt;--------------------------------------
Categorize and emit an error message when the citation contains one or more deprecated parameters. The function includes the
offending parameter name to the error message. Only one error message is emitted regardless of the number of deprecated
parameters in the citation.
added_deprecated_cat is a Boolean declared in page scope variables above
]]
local function deprecated_parameter(name)
if not added_deprecated_cat then
added_deprecated_cat = true; -- note that we've added this category
table.insert( z.message_tail, { utilities.set_message ( 'err_deprecated_params', {name}, true ) } ); -- add error message
end
end
--[=[-------------------------&lt; K E R N _ Q U O T E S &gt;--------------------------------------------------------
Apply kerning to open the space between the quote mark provided by the module and a leading or trailing quote
mark contained in a |title= or |chapter= parameter's value.
This function will positive kern either single or double quotes:
"'Unkerned title with leading and trailing single quote marks'"
" 'Kerned title with leading and trailing single quote marks' " (in real life the kerning isn't as wide as this example)
Double single quotes (italic or bold wiki-markup) are not kerned.
Replaces Unicode quote marks in plain text or in the label portion of a [[L|D]] style wikilink with typewriter
quote marks regardless of the need for kerning. Unicode quote marks are not replaced in simple [[D]] wikilinks.
Call this function for chapter titles, for website titles, etc.; not for book titles.
]=]
local function kern_quotes (str)
local cap = '';
local cap2 = '';
local wl_type, label, link;
wl_type, label, link = utilities.is_wikilink (str); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]]
if 1 == wl_type then -- [[D]] simple wikilink with or without quote marks
if mw.ustring.match (str, '%[%[[\"“”\'‘’].+[\"“”\'‘’]%]%]') then -- leading and trailing quote marks
str = utilities.substitute (cfg.presentation['kern-wl-both'], str);
elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks
str = utilities.substitute (cfg.presentation['kern-wl-left'], str);
elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks
str = utilities.substitute (cfg.presentation['kern-wl-right'], str);
end
else -- plain text or [[L|D]]; text in label variable
label = mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C &amp; U+201D) with " (typewriter double quote mark)
label = mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 &amp; U+2019) with ' (typewriter single quote mark)
cap, cap2 = mw.ustring.match (label, "^([\"\'])([^\'].+)"); -- match leading double or single quote but not doubled single quotes (italic markup)
if utilities.is_set (cap) then
label = utilities.substitute (cfg.presentation['kern-left'], {cap, cap2});
end
cap, cap2 = mw.ustring.match (label, "^(.+[^\'])([\"\'])$") -- match trailing double or single quote but not doubled single quotes (italic markup)
if utilities.is_set (cap) then
label = utilities.substitute (cfg.presentation['kern-right'], {cap, cap2});
end
if 2 == wl_type then
str = utilities.make_wikilink (link, label); -- reassemble the wikilink
else
str = label;
end
end
return str;
end
--[[--------------------------&lt; F O R M A T _ S C R I P T _ V A L U E &gt;----------------------------------------
|script-title= holds title parameters that are not written in Latin-based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should
not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped
in italic markup.
Regardless of language, all values provided by |script-title= are wrapped in &lt;bdi&gt;...&lt;/bdi&gt; tags to isolate RTL languages from the English left to right.
|script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO 639-1 language code and a colon:
|script-title=ja:*** *** (where * represents a Japanese character)
Spaces between the two-character code and the colon and the colon and the first script character are allowed:
|script-title=ja : *** ***
|script-title=ja: *** ***
|script-title=ja :*** ***
Spaces preceding the prefix are allowed: |script-title = ja:*** ***
The prefix is checked for validity. If it is a valid ISO 639-1 language code, the lang attribute (lang="ja") is added to the &lt;bdi&gt; tag so that browsers can
know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute
is not added. At this time there is no error message for this condition.
Supports |script-title=, |script-chapter=, |script-&lt;periodical&gt;=
]]
local function format_script_value (script_value, script_param)
local lang=''; -- initialize to empty string
local name;
if script_value:match('^%l%l%l?%s*:') then -- if first 3 or 4 non-space characters are script language prefix
lang = script_value:match('^(%l%l%l?)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script
if not utilities.is_set (lang) then
table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'missing title part'}, true ) } ); -- prefix without 'title'; add error message
return ''; -- script_value was just the prefix so return empty string
end
-- if we get this far we have prefix and script
name = cfg.lang_code_remap[lang] or mw.language.fetchLanguageName( lang, cfg.this_wiki_code ); -- get language name so that we can use it to categorize
if utilities.is_set (name) then -- is prefix a proper ISO 639-1 language code?
script_value = script_value:gsub ('^%l+%s*:%s*', ''); -- strip prefix from script
-- is prefix one of these language codes?
if utilities.in_array (lang, cfg.script_lang_codes) then
utilities.add_prop_cat ('script_with_name', {name, lang})
else
table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'unknown language code'}, true ) } ); -- unknown script-language; add error message
end
lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute
else
table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'invalid language code'}, true ) } ); -- invalid language code; add error message
lang = ''; -- invalid so set lang to empty string
end
else
table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'missing prefix'}, true ) } ); -- no language code prefix; add error message
end
script_value = utilities.substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is RTL
return script_value;
end
--[[--------------------------&lt; S C R I P T _ C O N C A T E N A T E &gt;------------------------------------------
Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been
wrapped in &lt;bdi&gt; tags.
]]
local function script_concatenate (title, script, script_param)
if utilities.is_set (script) then
script = format_script_value (script, script_param); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; returns empty string on error
if utilities.is_set (script) then
title = title .. ' ' .. script; -- concatenate title and script title
end
end
return title;
end
--[[--------------------------&lt; W R A P _ M S G &gt;--------------------------------------------------------------
Applies additional message text to various parameter values. Supplied string is wrapped using a message_list
configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken
from citation_config.messages - the reason this function is similar to but separate from wrap_style().
]]
local function wrap_msg (key, str, lower)
if not utilities.is_set ( str ) then
return "";
end
if true == lower then
local msg;
msg = cfg.messages[key]:lower(); -- set the message to lower case before
return utilities.substitute ( msg, str ); -- including template text
else
return utilities.substitute ( cfg.messages[key], str );
end
end
--[[--------------------------&lt; W I K I S O U R C E _ U R L _ M A K E &gt;----------------------------------------
Makes a Wikisource URL from Wikisource interwiki-link. Returns the URL and appropriate label; nil else.
str is the value assigned to |chapter= (or aliases) or |title= or |title-link=
]]
local function wikisource_url_make (str)
local wl_type, D, L;
local ws_url, ws_label;
local wikisource_prefix = table.concat ({'https://', cfg.this_wiki_code, '.wikisource.org/wiki/'});
wl_type, D, L = utilities.is_wikilink (str); -- wl_type is 0 (not a wikilink), 1 (simple wikilink), 2 (complex wikilink)
if 0 == wl_type then -- not a wikilink; might be from |title-link=
str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if utilities.is_set (str) then
ws_url = table.concat ({ -- build a Wikisource URL
wikisource_prefix, -- prefix
str, -- article title
});
ws_label = str; -- label for the URL
end
elseif 1 == wl_type then -- simple wikilink: [[Wikisource:ws article]]
str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if utilities.is_set (str) then
ws_url = table.concat ({ -- build a Wikisource URL
wikisource_prefix, -- prefix
str, -- article title
});
ws_label = str; -- label for the URL
end
elseif 2 == wl_type then -- non-so-simple wikilink: [[Wikisource:ws article|displayed text]] ([[L|D]])
str = L:match ('^[Ww]ikisource:(.+)') or L:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if utilities.is_set (str) then
ws_label = D; -- get ws article name from display portion of interwiki link
ws_url = table.concat ({ -- build a Wikisource URL
wikisource_prefix, -- prefix
str, -- article title without namespace from link portion of wikilink
});
end
end
if ws_url then
ws_url = mw.uri.encode (ws_url, 'WIKI'); -- make a usable URL
ws_url = ws_url:gsub ('%%23', '#'); -- undo percent encoding of fragment marker
end
return ws_url, ws_label, L or D; -- return proper URL or nil and a label or nil
end
--[[--------------------------&lt; F O R M A T _ P E R I O D I C A L &gt;--------------------------------------------
Format the three periodical parameters: |script-&lt;periodical&gt;=, |&lt;periodical&gt;=, and |trans-&lt;periodical&gt;= into a single Periodical meta-
parameter.
]]
local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical)
local periodical_error = '';
if not utilities.is_set (periodical) then
periodical = ''; -- to be safe for concatenation
else
periodical = utilities.wrap_style ('italic-title', periodical); -- style
end
periodical = script_concatenate (periodical, script_periodical, script_periodical_source); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after title is wrapped
if utilities.is_set (trans_periodical) then
trans_periodical = utilities.wrap_style ('trans-italic-title', trans_periodical);
if utilities.is_set (periodical) then
periodical = periodical .. ' ' .. trans_periodical;
else -- here when trans-periodical without periodical or script-periodical
periodical = trans_periodical;
periodical_error = ' ' .. utilities.set_message ('err_trans_missing_title', {'periodical'});
end
end
return periodical .. periodical_error;
end
--[[--------------------------&lt; F O R M A T _ C H A P T E R _ T I T L E &gt;--------------------------------------
Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single chapter meta-
parameter (chapter_url_source used for error messages).
]]
local function format_chapter_title (script_chapter, script_chapter_source, chapter, chapter_source, trans_chapter, trans_chapter_source, chapter_url, chapter_url_source, no_quotes, access)
local chapter_error = '';
local ws_url, ws_label, L = wikisource_url_make (chapter); -- make a wikisource URL and label from a wikisource interwiki link
if ws_url then
ws_label = ws_label:gsub ('_', ''); -- replace underscore separaters with space characters
chapter = ws_label;
end
if not utilities.is_set (chapter) then
chapter = ''; -- to be safe for concatenation
else
if false == no_quotes then
chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from module provided quote marks
chapter = utilities.wrap_style ('quoted-title', chapter);
end
end
chapter = script_concatenate (chapter, script_chapter, script_chapter_source); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after title is wrapped
if utilities.is_set (chapter_url) then
chapter = external_link (chapter_url, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate
elseif ws_url then
chapter = external_link (ws_url, chapter .. '&amp;nbsp;', 'ws link in chapter'); -- adds bare_url_missing_title error if appropriate; space char to move icon away from chap text; TODO: better way to do this?
chapter = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, chapter});
end
if utilities.is_set (trans_chapter) then
trans_chapter = utilities.wrap_style ('trans-quoted-title', trans_chapter);
if utilities.is_set (chapter) then
chapter = chapter .. ' ' .. trans_chapter;
else -- here when trans_chapter without chapter or script-chapter
chapter = trans_chapter;
chapter_source = trans_chapter_source:match ('trans%-?(.+)'); -- when no chapter, get matching name from trans-&lt;param&gt;
chapter_error = ' ' .. utilities.set_message ('err_trans_missing_title', {chapter_source});
end
end
return chapter .. chapter_error;
end
--[[--------------------------&lt; H A S _ I N V I S I B L E _ C H A R S &gt;----------------------------------------
This function searches a parameter's value for non-printable or invisible characters. The search stops at the
first match.
This function will detect the visible replacement character when it is part of the Wikisource.
Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref)
and identifies them with a slightly different error message. See also coins_cleanup().
Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker
that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the
parameter value.
]]
local function has_invisible_chars (param, v)
local position = ''; -- position of invisible char or starting position of stripmarker
local dummy; -- end of matching string; not used but required to hold end position when a capture is returned
local capture; -- used by stripmarker detection to hold name of the stripmarker
local i = 1;
local stripmarker, apostrophe;
capture = string.match (v, '[%w%p ]*'); -- test for values that are simple ASCII text and bypass other tests if true
if capture == v then -- if same there are no Unicode characters
return;
end
while cfg.invisible_chars[i] do
local char = cfg.invisible_chars[i][1] -- the character or group name
local pattern = cfg.invisible_chars[i][2] -- the pattern used to find it
position, dummy, capture = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern
if position and (char == 'zero width joiner') then -- if we found a zero-width joiner character
if mw.ustring.find (v, cfg.indic_script) then -- it's ok if one of the Indic scripts
position = nil; -- unset position
end
end
if position then
if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition)
('templatestyles' == capture and utilities.in_array (param, {'id', 'quote'})) then -- templatestyles stripmarker allowed in these parameters
stripmarker = true; -- set a flag
elseif true == stripmarker and 'delete' == char then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker
position = nil; -- unset
else
local err_msg;
if capture then
err_msg = capture .. ' ' .. char;
else
err_msg = char .. ' ' .. 'character';
end
table.insert( z.message_tail, { utilities.set_message ( 'err_invisible_char', {err_msg, utilities.wrap_style ('parameter', param), position}, true ) } ); -- add error message
return; -- and done with this parameter
end
end
i = i+1; -- bump our index
end
end
--[[--------------------------&lt; A R G U M E N T _ W R A P P E R &gt;----------------------------------------------
Argument wrapper. This function provides support for argument mapping defined in the configuration file so that
multiple names can be transparently aliased to single internal variable.
]]
local function argument_wrapper ( args )
local origin = {};
return setmetatable({
ORIGIN = function ( self, k )
local dummy = self[k]; --force the variable to be loaded.
return origin[k];
end
},
{
__index = function ( tbl, k )
if origin[k] ~= nil then
return nil;
end
local args, list, v = args, cfg.aliases[k];
if type( list ) == 'table' then
v, origin[k] = utilities.select_one ( args, list, 'err_redundant_parameters' );
if origin[k] == nil then
origin[k] = ''; -- Empty string, not nil
end
elseif list ~= nil then
v, origin[k] = args[list], list;
else
-- maybe let through instead of raising an error?
-- v, origin[k] = args[k], k;
error( cfg.messages['unknown_argument_map'] .. ': ' .. k);
end
-- Empty strings, not nil;
if v == nil then
v = '';
origin[k] = '';
end
tbl = rawset( tbl, k, v );
return v;
end,
});
end
--[[--------------------------&lt; N O W R A P _ D A T E &gt;--------------------------------------------------------
When date is YYYY-MM-DD format wrap in nowrap span: &lt;span ...&gt;YYYY-MM-DD&lt;/span&gt;. When date is DD MMMM YYYY or is
MMMM DD, YYYY then wrap in nowrap span: &lt;span ...&gt;DD MMMM&lt;/span&gt; YYYY or &lt;span ...&gt;MMMM DD,&lt;/span&gt; YYYY
DOES NOT yet support MMMM YYYY or any of the date ranges.
]]
local function nowrap_date (date)
local cap = '';
local cap2 = '';
if date:match("^%d%d%d%d%-%d%d%-%d%d$") then
date = utilities.substitute (cfg.presentation['nowrap1'], date);
elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then
cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$");
date = utilities.substitute (cfg.presentation['nowrap2'], {cap, cap2});
end
return date;
end
--[[--------------------------&lt; S E T _ T I T L E T Y P E &gt;----------------------------------------------------
This function sets default title types (equivalent to the citation including |type=&lt;default value&gt;) for those templates that have defaults.
Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none).
]]
local function set_titletype (cite_class, title_type)
if utilities.is_set (title_type) then
if 'none' == cfg.keywords_xlate[title_type] then
title_type = ''; -- if |type=none then type parameter not displayed
end
return title_type; -- if |type= has been set to any other value use that value
end
return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation
end
--[[--------------------------&lt; H Y P H E N _ T O _ D A S H &gt;--------------------------------------------------
Converts a hyphen to a dash under certain conditions. The hyphen must separate like items; unlike items are
returned unmodified. These forms are modified:
letter - letter (A - B)
digit - digit (4-5)
digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5)
letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5)
digitletter - digitletter (5a - 5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d)
any other forms are returned unmodified.
str may be a comma- or semicolon-separated list
]]
local function hyphen_to_dash( str )
if not utilities.is_set (str) then
return str;
end
local accept; -- Boolean
str, accept = utilities.has_accept_as_written (str); -- remove accept-this-as-written markup when it wraps all of str
if accept then
return str; -- when markup removed, nothing to do, we're done
end
str = str:gsub ('&amp;[nm]dash;', {['&amp;ndash;'] = '–', ['&amp;mdash;'] = '—'}); -- replace &amp;mdash; and &amp;ndash; entities with their characters; semicolon mucks up the text.split
str = str:gsub ('&amp;#45;', '-'); -- replace HTML numeric entity with hyphen character
str = str:gsub ('&amp;nbsp;', ' '); -- replace &amp;nbsp; entity with generic keyboard space character
local out = {};
local list = mw.text.split (str, '%s*[,;]%s*'); -- split str at comma or semicolon separators if there are any
for _, item in ipairs (list) do -- for each item in the list
if mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators
if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit)
item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter)
item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit
item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit
item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter
item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2'); -- replace hyphen, remove extraneous space characters
else
item = mw.ustring.gsub (item, '%s*[–—]%s*', '–'); -- for endash or emdash separated ranges, replace em with en, remove extraneous whitespace
end
end
item = utilities.has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of str
table.insert (out, item); -- add the (possibly modified) item to the output table
end
return table.concat (out, ', '); -- concatenate the output table into a comma separated string
end
--[[--------------------------&lt; S A F E _ J O I N &gt;------------------------------------------------------------
Joins a sequence of strings together while checking for duplicate separation characters.
]]
local function safe_join( tbl, duplicate_char )
local f = {}; -- create a function table appropriate to type of 'duplicate character'
if 1 == #duplicate_char then -- for single byte ASCII characters use the string library functions
f.gsub = string.gsub
f.match = string.match
f.sub = string.sub
else -- for multi-byte characters use the ustring library functions
f.gsub = mw.ustring.gsub
f.match = mw.ustring.match
f.sub = mw.ustring.sub
end
local str = ''; -- the output string
local comp = ''; -- what does 'comp' mean?
local end_chr = '';
local trim;
for _, value in ipairs( tbl ) do
if value == nil then value = ''; end
if str == '' then -- if output string is empty
str = value; -- assign value to it (first time through the loop)
elseif value ~= '' then
if value:sub(1, 1) == '&lt;' then -- special case of values enclosed in spans and other markup.
comp = value:gsub( "%b&lt;&gt;", "" ); -- remove HTML markup (&lt;span&gt;string&lt;/span&gt; -&gt; string)
else
comp = value;
end
-- typically duplicate_char is sepc
if f.sub(comp, 1, 1) == duplicate_char then -- is first character same as duplicate_char? why test first character?
-- Because individual string segments often (always?) begin with terminal punct for the
-- preceding segment: 'First element' .. 'sepc next element' .. etc.?
trim = false;
end_chr = f.sub(str, -1, -1); -- get the last character of the output string
-- str = str .. "&lt;HERE(enchr=" .. end_chr .. ")" -- debug stuff?
if end_chr == duplicate_char then -- if same as separator
str = f.sub(str, 1, -2); -- remove it
elseif end_chr == "'" then -- if it might be wiki-markup
if f.sub(str, -3, -1) == duplicate_char .. "''" then -- if last three chars of str are sepc''
str = f.sub(str, 1, -4) .. "''"; -- remove them and add back ''
elseif f.sub(str, -5, -1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]''
trim = true; -- why? why do this and next differently from previous?
elseif f.sub(str, -4, -1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]''
trim = true; -- same question
end
elseif end_chr == "]" then -- if it might be wiki-markup
if f.sub(str, -3, -1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink
trim = true;
elseif f.sub(str, -3, -1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link
trim = true;
elseif f.sub(str, -2, -1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link
trim = true;
elseif f.sub(str, -4, -1) == duplicate_char .. "'']" then -- normal case when |url=something &amp; |title=Title.
trim = true;
end
elseif end_chr == " " then -- if last char of output string is a space
if f.sub(str, -2, -1) == duplicate_char .. " " then -- if last two chars of str are &lt;sepc&gt;&lt;space&gt;
str = f.sub(str, 1, -3); -- remove them both
end
end
if trim then
if value ~= comp then -- value does not equal comp when value contains HTML markup
local dup2 = duplicate_char;
if f.match(dup2, "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it
value = f.gsub(value, "(%b&lt;&gt;)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows HTML markup
else
value = f.sub(value, 2, -1 ); -- remove duplicate_char when it is first character
end
end
end
str = str .. value; --add it to the output string
end
end
return str;
end
--[[--------------------------&lt; I S _ S U F F I X &gt;------------------------------------------------------------
returns true is suffix is properly formed Jr, Sr, or ordinal in the range 1–9. Puncutation not allowed.
]]
local function is_suffix (suffix)
if utilities.in_array (suffix, {'Jr', 'Sr', 'Jnr', 'Snr', '1st', '2nd', '3rd'}) or suffix:match ('^%dth$') then
return true;
end
return false;
end
--[[--------------------------&lt; I S _ G O O D _ V A N C _ N A M E &gt;--------------------------------------------
For Vancouver style, author/editor names are supposed to be rendered in Latin (read ASCII) characters. When a name
uses characters that contain diacritical marks, those characters are to converted to the corresponding Latin character.
When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters.
These things are not currently possible in this module so are left to the editor to do.
This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets
[http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A
[http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF
[http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F
[http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F
|lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/)
|firstn= also allowed to contain hyphens, spaces, apostrophes, and periods
This original test:
if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then
was written outside of the code editor and pasted here because the code editor gets confused between character insertion point and cursor position.
The test has been rewritten to use decimal character escape sequence for the individual bytes of the Unicode characters so that it is not necessary
to use an external editor to maintain this code.
\195\128-\195\150 – À-Ö (U+00C0–U+00D6 – C0 controls)
\195\152-\195\182 – Ø-ö (U+00D8-U+00F6 – C0 controls)
\195\184-\198\191 – ø-ƿ (U+00F8-U+01BF – C0 controls, Latin extended A &amp; B)
\199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B)
]]
local function is_good_vanc_name (last, first, suffix)
if not suffix then
if first:find ('[,%s]') then -- when there is a space or comma, might be first name/initials + generational suffix
first = first:match ('(.-)[,%s]+'); -- get name/initials
suffix = first:match ('[,%s]+(.+)$'); -- get generational suffix
end
end
if utilities.is_set (suffix) then
if not is_suffix (suffix) then
add_vanc_error (cfg.err_msg_supl.suffix);
return false; -- not a name with an appropriate suffix
end
end
if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%']*$") or
nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%'%.]*$") then
add_vanc_error (cfg.err_msg_supl['non-Latin char']);
return false; -- not a string of Latin characters; Vancouver requires Romanization
end;
return true;
end
--[[--------------------------&lt; R E D U C E _ T O _ I N I T I A L S &gt;------------------------------------------
Attempts to convert names to initials in support of |name-list-style=vanc.
Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/.
Vancouver style requires family rank designations (Jr, II, III, etc.) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/.
This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials.
This function uses ustring functions because firstname initials may be any of the Unicode Latin characters accepted by is_good_vanc_name ().
]]
local function reduce_to_initials(first)
local name, suffix = mw.ustring.match(first, "^(%u+) ([%dJS][%drndth]+)$");
if not name then -- if not initials and a suffix
name = mw.ustring.match(first, "^(%u+)$"); -- is it just initials?
end
if name then -- if first is initials with or without suffix
if 3 &gt; mw.ustring.len (name) then -- if one or two initials
if suffix then -- if there is a suffix
if is_suffix (suffix) then -- is it legitimate?
return first; -- one or two initials and a valid suffix so nothing to do
else
add_vanc_error (cfg.err_msg_supl.suffix); -- one or two initials with invalid suffix so error message
return first; -- and return first unmolested
end
else
return first; -- one or two initials without suffix; nothing to do
end
end
end -- if here then name has 3 or more uppercase letters so treat them as a word
local initials, names = {}, {}; -- tables to hold name parts and initials
local i = 1; -- counter for number of initials
names = mw.text.split (first, '[%s,]+'); -- split into a table of names and possible suffix
while names[i] do -- loop through the table
if 1 &lt; i and names[i]:match ('[%dJS][%drndth]+%.?$') then -- if not the first name, and looks like a suffix (may have trailing dot)
names[i] = names[i]:gsub ('%.', ''); -- remove terminal dot if present
if is_suffix (names[i]) then -- if a legitimate suffix
table.insert (initials, ' ' .. names[i]); -- add a separator space, insert at end of initials table
break; -- and done because suffix must fall at the end of a name
end -- no error message if not a suffix; possibly because of Romanization
end
if 3 &gt; i then
table.insert (initials, mw.ustring.sub(names[i], 1, 1)); -- insert the initial at end of initials table
end
i = i+1; -- bump the counter
end
return table.concat(initials) -- Vancouver format does not include spaces.
end
--[[--------------------------&lt; L I S T _ P E O P L E &gt;-------------------------------------------------------
Formats a list of people (e.g. authors, contributors, editors, interviewers, translators)
names in the list will be linked when
|&lt;name&gt;-link= has a value
|&lt;name&gt;-mask- does NOT have a value; masked names are presumed to have been rendered previously so should have been linked there
when |&lt;name&gt;-mask=0, the associated name is not rendered
]]
local function list_people (control, people, etal)
local sep;
local namesep;
local format = control.format;
local maximum = control.maximum;
local lastauthoramp = control.lastauthoramp; -- TODO: delete after deprecation
local name_list = {};
if 'vanc' == format then -- Vancouver-like name styling?
sep = cfg.presentation['sep_nl_vanc']; -- name-list separator between names is a comma
namesep = cfg.presentation['sep_name_vanc']; -- last/first separator is a space
lastauthoramp = nil; -- TODO: delete after deprecation -- unset because isn't used by Vancouver style
else
sep = cfg.presentation['sep_nl']; -- name-list separator between names is a semicolon
namesep = cfg.presentation['sep_name']; -- last/first separator is &lt;comma&gt;&lt;space&gt;
end
if sep:sub (-1, -1) ~= " " then sep = sep .. " " end
if utilities.is_set (maximum) and maximum &lt; 1 then return "", 0; end -- returned 0 is for EditorCount; not used for other names
for i, person in ipairs (people) do
if utilities.is_set (person.last) then
local mask = person.mask;
local one;
local sep_one = sep;
if utilities.is_set (maximum) and i &gt; maximum then
etal = true;
break;
end
if mask then
local n = tonumber (mask); -- convert to a number if it can be converted; nil else
if n then
one = 0 ~= n and string.rep("&amp;mdash;",n) or nil; -- make a string of (n &gt; 0) mdashes, nil else, to replace name
person.link = nil; -- don't create link to name if name is replaces with mdash string or has been set nil
else
one = mask; -- replace name with mask text (must include name-list separator)
sep_one = " "; -- modify name-list separator
end
else
one = person.last; -- get surname
local first = person.first -- get given name
if utilities.is_set (first) then
if ("vanc" == format) then -- if Vancouver format
one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/)
if not person.corporate and is_good_vanc_name (one, first) then -- and name is all Latin characters; corporate authors not tested
first = reduce_to_initials (first); -- attempt to convert first name(s) to initials
end
end
one = one .. namesep .. first;
end
end
if utilities.is_set (person.link) then
one = utilities.make_wikilink (person.link, one); -- link author/editor
end
if one then -- if &lt;one&gt; has a value (name, mdash replacement, or mask text replacement)
table.insert (name_list, one); -- add it to the list of names
table.insert (name_list, sep_one); -- add the proper name-list separator
end
end
end
local count = #name_list / 2; -- (number of names + number of separators) divided by 2
if 0 &lt; count then
if 1 &lt; count and not etal then
if 'amp' == format or utilities.is_set (lastauthoramp) then -- TODO: delete lastauthoramp after deprecation
name_list[#name_list-2] = " &amp; "; -- replace last separator with ampersand text
elseif 'and' == format then
if 2 == count then
name_list[#name_list-2] = cfg.presentation.sep_nl_and; -- replace last separator with 'and' text
else
name_list[#name_list-2] = cfg.presentation.sep_nl_end; -- replace last separator with '(sep) and' text
end
end
end
name_list[#name_list] = nil; -- erase the last separator
end
local result = table.concat (name_list); -- construct list
if etal and utilities.is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list
result = result .. sep .. ' ' .. cfg.messages['et al']; -- we've got a last-first list and etal so add et al.
end
return result, count; -- return name-list string and count of number of names (count used for editor names only)
end
--[[--------------------------&lt; A N C H O R _ I D &gt;------------------------------------------------------------
Generates a CITEREF anchor ID if we have at least one name or a date. Otherwise returns an empty string.
namelist is one of the contributor-, author-, or editor-name lists chosen in that order. year is Year or anchor_year.
]]
local function anchor_id (namelist, year)
local names={}; -- a table for the one to four names and year
for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names
names[i] = v.last
if i == 4 then break end -- if four then done
end
table.insert (names, year); -- add the year at the end
local id = table.concat(names); -- concatenate names and year for CITEREF id
if utilities.is_set (id) then -- if concatenation is not an empty string
return "CITEREF" .. id; -- add the CITEREF portion
else
return ''; -- return an empty string; no reason to include CITEREF id in this citation
end
end
--[[--------------------------&lt; N A M E _ H A S _ E T A L &gt;----------------------------------------------------
Evaluates the content of name parameters (author, editor, etc.) for variations on the theme of et al. If found,
the et al. is removed, a flag is set to true and the function returns the modified name and the flag.
This function never sets the flag to false but returns it's previous state because it may have been set by
previous passes through this function or by the associated |display-&lt;names&gt;=etal parameter
]]
local function name_has_etal (name, etal, nocat, param)
if utilities.is_set (name) then -- name can be nil in which case just return
local patterns = cfg.et_al_patterns; --get patterns from configuration
for _, pattern in ipairs (patterns) do -- loop through all of the patterns
if name:match (pattern) then -- if this 'et al' pattern is found in name
name = name:gsub (pattern, ''); -- remove the offending text
etal = true; -- set flag (may have been set previously here or by |display-&lt;names&gt;=etal)
if not nocat then -- no categorization for |vauthors=
table.insert( z.message_tail, {utilities.set_message ('err_etal', {param})}); -- and set an error if not added
end
end
end
end
return name, etal;
end
--[[--------------------------&lt; N A M E _ I S _ N U M E R I C &gt;------------------------------------------------
Add maint cat when name parameter value does not contain letters. Does not catch mixed alphanumeric names so
|last=A. Green (1922-1987) does not get caught in the current version of this test but |first=(1888) is caught.
returns nothing
]]
local function name_is_numeric (name, list_name)
if utilities.is_set (name) then
if mw.ustring.match (name, '^[%A]+$') then -- when name does not contain any letters
utilities.set_message ('maint_numeric_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template
end
end
end
--[[--------------------------&lt; N A M E _ H A S _ E D _ M A R K U P &gt;------------------------------------------
Evaluates the content of author and editor parameters for extraneous editor annotations: ed, ed., eds, (Ed.), etc.
These annotation do not belong in author parameters and are redundant in editor parameters. If found, the function
adds the editor markup maintenance category.
returns nothing
]]
local function name_has_ed_markup (name, list_name)
local patterns = cfg.editor_markup_patterns; -- get patterns from configuration
if utilities.is_set (name) then
for _, pattern in ipairs (patterns) do -- spin through patterns table and
if name:match (pattern) then
utilities.set_message ('maint_extra_text_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template
break;
end
end
end
end
--[[--------------------------&lt; N A M E _ H A S _ M U L T _ N A M E S &gt;----------------------------------------
Evaluates the content of last/surname (authors etc.) parameters for multiple names. Multiple names are indicated
if there is more than one comma or any semicolons. If found, the function adds the multiple name maintenance category.
returns nothing
]]
local function name_has_mult_names (name, list_name)
local _, commas, semicolons;
if utilities.is_set (name) then
_, commas = name:gsub (',', ''); -- count the number of commas
_, semicolons = name:gsub (';', ''); -- count the number of semicolons
if 1 &lt; commas or 0 &lt; semicolons then
utilities.set_message ('maint_mult_names', cfg.special_case_translation [list_name]); -- add a maint message
end
end
end
--[[--------------------------&lt; N A M E _ C H E C K S &gt;--------------------------------------------------------
This function calls various name checking functions used to validate the content of the various name-holding
parameters.
]]
local function name_checks (last, first, list_name)
local accept_name;
if utilities.is_set (last) then
last, accept_name = utilities.has_accept_as_written (last); -- remove accept-this-as-written markup when it wraps all of &lt;last&gt;
if not accept_name then -- &lt;last&gt; not wrapped in accept-as-written markup
name_has_mult_names (last, list_name); -- check for multiple names in the parameter (last only)
name_has_ed_markup (last, list_name); -- check for extraneous 'editor' annotation
name_is_numeric (last, list_name); -- check for names that are compsed of digits and punctuation
end
end
if utilities.is_set (first) then
first, accept_name = utilities.has_accept_as_written (first); -- remove accept-this-as-written markup when it wraps all of &lt;first&gt;
if not accept_name then -- &lt;first&gt; not wrapped in accept-as-written markup
name_has_ed_markup (first, list_name); -- check for extraneous 'editor' annotation
name_is_numeric (first, list_name); -- check for names that are compsed of digits and punctuation
end
end
return last, first; -- done
end
--[[--------------------------&lt; E X T R A C T _ N A M E S &gt;----------------------------------------------------
Gets name list from the input arguments
Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters.
Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't
find |last4= and |last5= then the search is done.
This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3=
are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=.
When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned
that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the
template's metadata. When this occurs, the page is added to a maintenance category.
]]
local function extract_names(args, list_name)
local names = {}; -- table of names
local last; -- individual name components
local first;
local link;
local mask;
local i = 1; -- loop counter/indexer
local n = 1; -- output table indexer
local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors)
local etal = false; -- return value set to true when we find some form of et al. in an author parameter
local last_alias, first_alias, link_alias; -- selected parameter aliases used in error messaging
while true do
last, last_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'err_redundant_parameters', i ); -- search through args for name components beginning at 1
first, first_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'err_redundant_parameters', i );
link, link_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i );
mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i );
last, etal = name_has_etal (last, etal, false, last_alias); -- find and remove variations on et al.
first, etal = name_has_etal (first, etal, false, first_alias); -- find and remove variations on et al.
last, first = name_checks (last, first, list_name); -- multiple names, extraneous annotation, etc. checks
if first and not last then -- if there is a firstn without a matching lastn
local alias = first_alias:find ('given', 1, true) and 'given' or 'first'; -- get first or given form of the alias
table.insert (z.message_tail, { utilities.set_message ( 'err_first_missing_last', {
first_alias, -- param name of alias missing its mate
first_alias:gsub (alias, {['first'] = 'last', ['given'] = 'surname'}), -- make param name appropriate to the alias form
}, true ) } ); -- add this error message
elseif not first and not last then -- if both firstn and lastn aren't found, are we done?
count = count + 1; -- number of times we haven't found last and first
if 2 &lt;= count then -- two missing names and we give up
break; -- normal exit or there is a two-name hole in the list; can't tell which
end
else -- we have last with or without a first
local result;
link = link_title_ok (link, link_alias, last, last_alias); -- check for improper wiki-markup
if first then
link = link_title_ok (link, link_alias, first, first_alias); -- check for improper wiki-markup
end
names[n] = {last = last, first = first, link = link, mask = mask, corporate = false}; -- add this name to our names list (corporate for |vauthors= only)
n = n + 1; -- point to next location in the names table
if 1 == count then -- if the previous name was missing
table.insert( z.message_tail, { utilities.set_message ( 'err_missing_name', {list_name:match ("(%w+)List"):lower(), i - 1}, true ) } ); -- add this error message
end
count = 0; -- reset the counter, we're looking for two consecutive missing names
end
i = i + 1; -- point to next args location
end
return names, etal; -- all done, return our list of names and the etal flag
end
--[[--------------------------&lt; G E T _ I S O 6 3 9 _ C O D E &gt;------------------------------------------------
Validates language names provided in |language= parameter if not an ISO639-1 or 639-2 code.
Returns the language name and associated two- or three-character code. Because case of the source may be incorrect
or different from the case that WikiMedia uses, the name comparisons are done in lower case and when a match is
found, the Wikimedia version (assumed to be correct) is returned along with the code. When there is no match, we
return the original language name string.
mw.language.fetchLanguageNames(&lt;local wiki language&gt;, 'all') returns a list of languages that in some cases may include
extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support
code 'cbk' or name 'Chavacano'. Most (all?) of these languages are not used a 'language' codes per se, rather they
are used as sub-domain names: cbk-zam.wikipedia.org. A list of language names and codes supported by fetchLanguageNames()
can be found at Template:Citation Style documentation/language/doc
Names that are included in the list will be found if that name is provided in the |language= parameter. For example,
if |language=Chavacano de Zamboanga, that name will be found with the associated code 'cbk-zam'. When names are found
and the associated code is not two or three characters, this function returns only the WikiMedia language name.
Some language names have multiple entries under different codes:
Aromanian has code rup and code roa-rup
When this occurs, this function returns the language name and the 2- or 3-character code
Adapted from code taken from Module:Check ISO 639-1.
]]
local function get_iso639_code (lang, this_wiki_code)
if cfg.lang_name_remap[lang:lower()] then -- if there is a remapped name (because MediaWiki uses something that we don't think is correct)
return cfg.lang_name_remap[lang:lower()][1], cfg.lang_name_remap[lang:lower()][2]; -- for this language 'name', return a possibly new name and appropriate code
end
local ietf_code; -- because some languages have both IETF-like codes and ISO 639-like codes
local ietf_name;
local langlc = mw.ustring.lower (lang); -- lower-case version for comparisons
for code, name in pairs (cfg.languages) do -- scan the list to see if we can find our language
if langlc == mw.ustring.lower (name) then
if 2 == #code or 3 == #code then -- two- or three-character codes only; IETF extensions not supported
return name, code; -- so return the name and the code
end
ietf_code = code; -- remember that we found an IETF-like code and save its name
ietf_name = name; -- but keep looking for a 2- or 3-char code
end
end
-- didn't find name with 2- or 3-char code; if IETF-like code found return
return ietf_code and ietf_name or lang; -- associated name; return original language text else
end
--[[--------------------------&lt; L A N G U A G E _ P A R A M E T E R &gt;------------------------------------------
Gets language name from a provided two- or three-character ISO 639 code. If a code is recognized by MediaWiki,
use the returned name; if not, then use the value that was provided with the language parameter.
When |language= contains a recognized language (either code or name), the page is assigned to the category for
that code: Category:Norwegian-language sources (no). For valid three-character code languages, the page is assigned
to the single category for '639-2' codes: Category:CS1 ISO 639-2 language sources.
Languages that are the same as the local wiki are not categorized. MediaWiki does not recognize three-character
equivalents of two-character codes: code 'ar' is recognized but code 'ara' is not.
This function supports multiple languages in the form |language=nb, French, th where the language names or codes are
separated from each other by commas with optional space characters.
]]
local function language_parameter (lang)
local code; -- the two- or three-character language code
local name; -- the language name
local language_list = {}; -- table of language names to be rendered
local names_table = {}; -- table made from the value assigned to |language=
local this_wiki_name = mw.language.fetchLanguageName (cfg.this_wiki_code, cfg.this_wiki_code); -- get this wiki's language name
names_table = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list
for _, lang in ipairs (names_table) do -- reuse lang
name = cfg.lang_code_remap[lang:lower()]; -- first see if this is a code that is not supported by MediaWiki but is in remap
if name then -- there was a remapped code so
if not lang:match ('^%a%a%a?%-x%-%a+$') then -- if not a private IETF tag
lang = lang:gsub ('^(%a%a%a?)%-.*', '%1'); -- strip IETF tags from code
end
else
lang = lang:gsub ('^(%a%a%a?)%-.*', '%1'); -- strip any IETF-like tags from code
if 2 == lang:len() or 3 == lang:len() then -- if two-or three-character code
name = mw.language.fetchLanguageName (lang:lower(), cfg.this_wiki_code); -- get language name if |language= is a proper code
end
end
if utilities.is_set (name) then -- if |language= specified a valid code
code = lang:lower(); -- save it
else
name, code = get_iso639_code (lang, cfg.this_wiki_code); -- attempt to get code from name (assign name here so that we are sure of proper capitalization)
end
if utilities.is_set (code) then -- only 2- or 3-character codes
name = cfg.lang_code_remap[code] or name; -- override wikimedia when they misuse language codes/names
if cfg.this_wiki_code ~= code then -- when the language is not the same as this wiki's language
if 2 == code:len() then -- and is a two-character code
utilities.add_prop_cat ('foreign_lang_source' .. code, {name, code}); -- categorize it; code appended to allow for multiple language categorization
else -- or is a recognized language (but has a three-character code)
utilities.add_prop_cat ('foreign_lang_source_2' .. code, {code}); -- categorize it differently TODO: support multiple three-character code categories per cs1|2 template
end
elseif cfg.local_lang_cat_enable then -- when the language and this wiki's language are the same and categorization is enabled
utilities.add_prop_cat ('local_lang_source', {name, code}); -- categorize it
end
else
utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added
end
table.insert (language_list, name);
name = ''; -- so we can reuse it
end
name = utilities.make_sep_list (#language_list, language_list);
if this_wiki_name == name then
return ''; -- if one language and that language is this wiki's return an empty string (no annotation)
end
return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)'
--[[ TODO: should only return blank or name rather than full list
so we can clean up the bunched parenthetical elements Language, Type, Format
]]
end
--[[--------------------------&lt; S E T _ C S 1 _ S T Y L E &gt;----------------------------------------------------
Set style settings for CS1 citation templates. Returns separator and postscript settings
At en.wiki, for cs1:
ps gets: '.'
sep gets: '.'
]]
local function set_cs1_style (ps)
if not utilities.is_set (ps) then -- unless explicitly set to something
ps = cfg.presentation['ps_cs1']; -- terminate the rendered citation
end
return cfg.presentation['sep_cs1'], ps; -- element separator
end
--[[--------------------------&lt; S E T _ C S 2 _ S T Y L E &gt;----------------------------------------------------
Set style settings for CS2 citation templates. Returns separator, postscript, ref settings
At en.wiki, for cs2:
ps gets: '' (empty string - no terminal punctuation)
sep gets: ','
]]
local function set_cs2_style (ps, ref)
if not utilities.is_set (ps) then -- if |postscript= has not been set, set cs2 default
ps = cfg.presentation['ps_cs2']; -- terminate the rendered citation
end
if not utilities.is_set (ref) then -- if |ref= is not set
ref = "harv"; -- set default |ref=harv
end
return cfg.presentation['sep_cs2'], ps, ref; -- element separator
end
--[[--------------------------&lt; G E T _ S E T T I N G S _ F R O M _ C I T E _ C L A S S &gt;----------------------
When |mode= is not set or when its value is invalid, use config.CitationClass and parameter values to establish
rendered style.
]]
local function get_settings_from_cite_class (ps, ref, cite_class)
local sep;
if (cite_class == "citation") then -- for citation templates (CS2)
sep, ps, ref = set_cs2_style (ps, ref);
else -- not a citation template so CS1
sep, ps = set_cs1_style (ps);
end
return sep, ps, ref -- return them all
end
--[[--------------------------&lt; S E T _ S T Y L E &gt;------------------------------------------------------------
Establish basic style settings to be used when rendering the citation. Uses |mode= if set and valid or uses
config.CitationClass from the template's #invoke: to establish style.
]]
local function set_style (mode, ps, ref, cite_class)
local sep;
if 'cs2' == mode then -- if this template is to be rendered in CS2 (citation) style
sep, ps, ref = set_cs2_style (ps, ref);
elseif 'cs1' == mode then -- if this template is to be rendered in CS1 (cite xxx) style
sep, ps = set_cs1_style (ps);
else -- anything but cs1 or cs2
sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass
end
if cfg.keywords_xlate[ps:lower()] == 'none' then -- if assigned value is 'none' then
ps = ''; -- set to empty string
end
return sep, ps, ref
end
--[=[-------------------------&lt; I S _ P D F &gt;------------------------------------------------------------------
Determines if a URL has the file extension that is one of the PDF file extensions used by [[MediaWiki:Common.css]] when
applying the PDF icon to external links.
returns true if file extension is one of the recognized extensions, else false
]=]
local function is_pdf (url)
return url:match ('%.pdf$') or url:match ('%.PDF$') or
url:match ('%.pdf[%?#]') or url:match ('%.PDF[%?#]') or
url:match ('%.PDF&amp;#035') or url:match ('%.pdf&amp;#035');
end
--[[--------------------------&lt; S T Y L E _ F O R M A T &gt;------------------------------------------------------
Applies CSS style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does
not have a matching URL parameter. If the format parameter is not set and the URL contains a file extension that
is recognized as a PDF document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with
the appropriate styling.
]]
local function style_format (format, url, fmt_param, url_param)
if utilities.is_set (format) then
format = utilities.wrap_style ('format', format); -- add leading space, parentheses, resize
if not utilities.is_set (url) then
format = format .. ' ' .. utilities.set_message ( 'err_format_missing_url', {fmt_param, url_param} ); -- add an error message
end
elseif is_pdf (url) then -- format is not set so if URL is a PDF file then
format = utilities.wrap_style ('format', 'PDF'); -- set format to PDF
else
format = ''; -- empty string for concatenation
end
return format;
end
--[[--------------------------&lt; G E T _ D I S P L A Y _ N A M E S &gt;--------------------------------------------
Returns a number that defines the number of names displayed for author and editor name lists and a Boolean flag
to indicate when et al. should be appended to the name list.
When the value assigned to |display-xxxxors= is a number greater than or equal to zero, return the number and
the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains
some variant of the text 'et al.').
When the value assigned to |display-xxxxors= is the keyword 'etal', return a number that is one greater than the
number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of
the names in the name list followed by 'et al.'
In all other cases, returns nil and the previous state of the 'etal' flag.
inputs:
max: A['DisplayAuthors'] or A['DisplayEditors']; a number or some flavor of etal
count: #a or #e
list_name: 'authors' or 'editors'
etal: author_etal or editor_etal
]]
local function get_display_names (max, count, list_name, etal)
if utilities.is_set (max) then
if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
max = count + 1; -- number of authors + 1 so display all author name plus et al.
etal = true; -- overrides value set by extract_names()
elseif max:match ('^%d+$') then -- if is a string of numbers
max = tonumber (max); -- make it a number
if max &gt;= count then -- if |display-xxxxors= value greater than or equal to number of authors/editors
table.insert( z.message_tail, {utilities.set_message ('err_disp_name', {cfg.special_case_translation [list_name], max}, true)}); -- add error message
max = nil;
end
else -- not a valid keyword or number
table.insert( z.message_tail, {utilities.set_message ('err_disp_name', {cfg.special_case_translation [list_name], max}, true)}); -- add error message
max = nil; -- unset; as if |display-xxxxors= had not been set
end
end
return max, etal;
end
--[[--------------------------&lt; E X T R A _ T E X T _ I N _ P A G E _ C H E C K &gt;------------------------------
Adds page to Category:CS1 maint: extra text if |page= or |pages= has what appears to be some form of p. or pp.
abbreviation in the first characters of the parameter content.
check Page and Pages for extraneous p, p., pp, and pp. at start of parameter value:
good pattern: '^P[^%.P%l]' matches when |page(s)= begins PX or P# but not Px where x and X are letters and # is a dgiit
bad pattern: '^[Pp][Pp]' matches matches when |page(s)= begins pp or pP or Pp or PP
]]
local function extra_text_in_page_check (page)
local good_pattern = '^P[^%.Pp]'; -- ok to begin with uppercase P: P7 (pg 7 of section P) but not p123 (page 123) TODO: add Gg for PG or Pg?
local bad_pattern = '^[Pp]?[Pp]%.?[ %d]';
if not page:match (good_pattern) and (page:match (bad_pattern) or page:match ('^[Pp]ages?')) then
utilities.set_message ('maint_extra_text'); -- add maint cat;
end
end
--[=[-------------------------&lt; G E T _ V _ N A M E _ T A B L E &gt;----------------------------------------------
split apart a |vauthors= or |veditors= parameter. This function allows for corporate names, wrapped in doubled
parentheses to also have commas; in the old version of the code, the doubled parentheses were included in the
rendered citation and in the metadata. Individual author names may be wikilinked
|vauthors=Jones AB, [[E. B. White|White EB]], ((Black, Brown, and Co.))
]=]
local function get_v_name_table (vparam, output_table, output_link_table)
local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas
local wl_type, label, link; -- wl_type not used here; just a place holder
local i = 1;
while name_table[i] do
if name_table[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of corporate with one or more commas; this segment has the opening doubled parentheses
local name = name_table[i];
i = i + 1; -- bump indexer to next segment
while name_table[i] do
name = name .. ', ' .. name_table[i]; -- concatenate with previous segments
if name_table[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parentheses
break; -- and done reassembling so
end
i = i + 1; -- bump indexer
end
table.insert (output_table, name); -- and add corporate name to the output table
table.insert (output_link_table, ''); -- no wikilink
else
wl_type, label, link = utilities.is_wikilink (name_table[i]); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]]
table.insert (output_table, label); -- add this name
if 1 == wl_type then
table.insert (output_link_table, label); -- simple wikilink [[D]]
else
table.insert (output_link_table, link); -- no wikilink or [[L|D]]; add this link if there is one, else empty string
end
end
i = i + 1;
end
return output_table;
end
--[[--------------------------&lt; P A R S E _ V A U T H O R S _ V E D I T O R S &gt;--------------------------------
This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and
|xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does.
Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names
may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance
tests, are wrapped in doubled parentheses ((corporate name)) to suppress the format tests.
Supports generational suffixes Jr, 2nd, 3rd, 4th–6th.
This function sets the Vancouver error when a required comma is missing and when there is a space between an author's initials.
]]
local function parse_vauthors_veditors (args, vparam, list_name)
local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn=
local v_name_table = {};
local v_link_table = {}; -- when name is wikilinked, targets go in this table
local etal = false; -- return value set to true when we find some form of et al. vauthors parameter
local last, first, link, mask, suffix;
local corporate = false;
vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period)
v_name_table = get_v_name_table (vparam, v_name_table, v_link_table); -- names are separated by commas
for i, v_name in ipairs(v_name_table) do
first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor
local accept_name;
v_name, accept_name = utilities.has_accept_as_written (v_name); -- remove accept-this-as-written markup when it wraps all of &lt;v_name&gt;
-- if v_name:match ('^%(%(.+%)%)$') then -- corporate authors are wrapped in doubled parentheses to suppress vanc formatting and error detection
-- last = v_name:match ('^%(%((.+)%)%)$') -- remove doubled parentheses
if accept_name then
last = v_name;
corporate = true; -- flag used in list_people()
elseif string.find(v_name, "%s") then
if v_name:find('[;%.]') then -- look for commonly occurring punctuation characters;
add_vanc_error (cfg.err_msg_supl.punctuation);
end
local lastfirstTable = {}
lastfirstTable = mw.text.split(v_name, "%s+")
first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be initials or generational suffix
if not mw.ustring.match (first, '^%u+$') then -- mw.ustring here so that later we will catch non-Latin characters
suffix = first; -- not initials so assume that whatever we got is a generational suffix
first = table.remove(lastfirstTable); -- get what should be the initials from the table
end
last = table.concat(lastfirstTable, ' ') -- returns a string that is the concatenation of all other names that are not initials and generational suffix
if not utilities.is_set (last) then
first = ''; -- unset
last = v_name; -- last empty because something wrong with first
add_vanc_error (cfg.err_msg_supl.name);
end
if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then
add_vanc_error (cfg.err_msg_supl['missing comma']); -- matches last II last; the case when a comma is missing
end
if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test
add_vanc_error (cfg.err_msg_supl.name); -- matches a space between two initials
end
else
last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this?
end
if utilities.is_set (first) then
if not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else
add_vanc_error (cfg.err_msg_supl.initials); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials
end
is_good_vanc_name (last, first, suffix); -- check first and last before restoring the suffix which may have a non-Latin digit
if utilities.is_set (suffix) then
first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials
suffix = ''; -- unset so we don't add this suffix to all subsequent names
end
else
if not corporate then
is_good_vanc_name (last, '');
end
end
link = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ) or v_link_table[i];
mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i );
names[i] = {last = last, first = first, link = link, mask = mask, corporate = corporate}; -- add this assembled name to our names list
end
return names, etal; -- all done, return our list of names
end
--[[--------------------------&lt; S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E &gt;------------------------
Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or
select one of |editors=, |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list.
Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest and
similarly, |editorn= (and aliases) highest and |editors= lowest
When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second
test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better
way to do this, I just haven't discovered what that way is.
Emits an error message when more than one xxxxor name source is provided.
In this function, vxxxxors = vauthors or veditors; xxxxors = authors or editors as appropriate.
]]
local function select_author_editor_source (vxxxxors, xxxxors, args, list_name)
local lastfirst = false;
if utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice in case we have a |first1= without a |last1=; this ...
utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors=
utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or
utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then
lastfirst = true;
end
if (utilities.is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions
(utilities.is_set (vxxxxors) and utilities.is_set (xxxxors)) or
(true == lastfirst and utilities.is_set (xxxxors)) then
local err_name;
if 'AuthorList' == list_name then -- figure out which name should be used in error message
err_name = 'author';
else
err_name = 'editor';
end
table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters',
{err_name .. '-name-list parameters'}, true ) } ); -- add error message
end
if true == lastfirst then return 1 end; -- return a number indicating which author name source to use
if utilities.is_set (vxxxxors) then return 2 end;
if utilities.is_set (xxxxors) then return 3 end;
return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last
end
--[[--------------------------&lt; I S _ V A L I D _ P A R A M E T E R _ V A L U E &gt;------------------------------
This function is used to validate a parameter's assigned value for those parameters that have only a limited number
of allowable values (yes, y, true, live, dead, etc.). When the parameter value has not been assigned a value (missing
or empty in the source template) the function returns the value specified by ret_val. If the parameter value is one
of the list of allowed values returns the translated value; else, emits an error message and returns the value
specified by ret_val.
]]
local function is_valid_parameter_value (value, name, possible, ret_val)
if not utilities.is_set (value) then
return ret_val; -- an empty parameter is ok
elseif utilities.in_array (value, possible) then
return cfg.keywords_xlate[value]; -- return translation of parameter keyword
else
table.insert( z.message_tail, { utilities.set_message ( 'err_invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message
return ret_val;
end
end
--[[--------------------------&lt; T E R M I N A T E _ N A M E _ L I S T &gt;----------------------------------------
This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space
when the last character is not a sepc character or when the last three characters are not sepc followed by two
closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a
single space character.
]]
local function terminate_name_list (name_list, sepc)
if (string.sub (name_list, -3, -1) == sepc .. '. ') then -- if already properly terminated
return name_list; -- just return the name list
elseif (string.sub (name_list, -1, -1) == sepc) or (string.sub (name_list, -3, -1) == sepc .. ']]') then -- if last name in list ends with sepc char
return name_list .. " "; -- don't add another
else
return name_list .. sepc .. ' '; -- otherwise terminate the name list
end
end
--[[-------------------------&lt; F O R M A T _ V O L U M E _ I S S U E &gt;----------------------------------------
returns the concatenation of the formatted volume and issue parameters as a single string; or formatted volume
or formatted issue, or an empty string if neither are set.
]]
local function format_volume_issue (volume, issue, cite_class, origin, sepc, lower)
if not utilities.is_set (volume) and not utilities.is_set (issue) then
return '';
end
if 'magazine' == cite_class or (utilities.in_array (cite_class, {'citation', 'map'}) and 'magazine' == origin) then
if utilities.is_set (volume) and utilities.is_set (issue) then
return wrap_msg ('vol-no', {sepc, volume, issue}, lower);
elseif utilities.is_set (volume) then
return wrap_msg ('vol', {sepc, volume}, lower);
else
return wrap_msg ('issue', {sepc, issue}, lower);
end
end
if 'podcast' == cite_class and utilities.is_set (issue) then
return wrap_msg ('issue', {sepc, issue}, lower);
end
local vol = ''; -- here for all cites except magazine
if utilities.is_set (volume) then
if volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$') then -- volume value is all digits or all uppercase Roman numerals
vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- render in bold face
elseif (4 &lt; mw.ustring.len(volume)) then -- not all digits or Roman numerals and longer than 4 characters
vol = utilities.substitute (cfg.messages['j-vol'], {sepc, volume}); -- not bold
utilities.add_prop_cat ('long_vol');
else -- four or less characters
vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- bold
end
end
if utilities.is_set (issue) then
return vol .. utilities.substitute (cfg.messages['j-issue'], issue);
end
return vol;
end
--[[-------------------------&lt; F O R M A T _ P A G E S _ S H E E T S &gt;-----------------------------------------
adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings.
The return order is:
page, pages, sheet, sheets
Singular has priority over plural when both are provided.
]]
local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower)
if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators
if utilities.is_set (sheet) then
if 'journal' == origin then
return '', '', wrap_msg ('j-sheet', sheet, lower), '';
else
return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), '';
end
elseif utilities.is_set (sheets) then
if 'journal' == origin then
return '', '', '', wrap_msg ('j-sheets', sheets, lower);
else
return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower);
end
end
end
local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin);
if utilities.is_set (page) then
if is_journal then
return utilities.substitute (cfg.messages['j-page(s)'], page), '', '', '';
elseif not nopp then
return utilities.substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', '';
else
return utilities.substitute (cfg.messages['nopp'], {sepc, page}), '', '', '';
end
elseif utilities.is_set (pages) then
if is_journal then
return utilities.substitute (cfg.messages['j-page(s)'], pages), '', '', '';
elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number
return '', utilities.substitute (cfg.messages['p-prefix'], {sepc, pages}), '', '';
elseif not nopp then
return '', utilities.substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', '';
else
return '', utilities.substitute (cfg.messages['nopp'], {sepc, pages}), '', '';
end
end
return '', '', '', ''; -- return empty strings
end
--[[--------------------------&lt; I N S O U R C E _ L O C _ G E T &gt;----------------------------------------------
returns one of the in-source locators: page, pages, or at.
If any of these are interwiki links to Wikisource, returns the label portion of the interwiki-link as plain text
for use in COinS. This COinS thing is done because here we convert an interwiki-link to and external link and
add an icon span around that; get_coins_pages() doesn't know about the span. TODO: should it?
TODO: add support for sheet and sheets?; streamline;
TODO: make it so that this function returns only one of the three as the single in-source (the return value assigned
to a new name)?
]]
local function insource_loc_get (page, pages, at)
local ws_url, ws_label, coins_pages, L; -- for Wikisource interwiki-links; TODO: this corrupts page metadata (span remains in place after cleanup; fix there?)
if utilities.is_set (page) then
if utilities.is_set (pages) or utilities.is_set (at) then
pages = ''; -- unset the others
at = '';
end
extra_text_in_page_check (page); -- add this page to maint cat if |page= value begins with what looks like p. or pp.
ws_url, ws_label, L = wikisource_url_make (page); -- make ws URL from |page= interwiki link; link portion L becomes tooltip label
if ws_url then
page = external_link (ws_url, ws_label .. '&amp;nbsp;', 'ws link in page'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
page = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, page});
coins_pages = ws_label;
end
elseif utilities.is_set (pages) then
if utilities.is_set (at) then
at = ''; -- unset
end
extra_text_in_page_check (pages); -- add this page to maint cat if |pages= value begins with what looks like p. or pp.
ws_url, ws_label, L = wikisource_url_make (pages); -- make ws URL from |pages= interwiki link; link portion L becomes tooltip label
if ws_url then
pages = external_link (ws_url, ws_label .. '&amp;nbsp;', 'ws link in pages'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
pages = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, pages});
coins_pages = ws_label;
end
elseif utilities.is_set (at) then
ws_url, ws_label, L = wikisource_url_make (at); -- make ws URL from |at= interwiki link; link portion L becomes tooltip label
if ws_url then
at = external_link (ws_url, ws_label .. '&amp;nbsp;', 'ws link in at'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
at = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, at});
coins_pages = ws_label;
end
end
return page, pages, at, coins_pages;
end
--[=[-------------------------&lt; A R C H I V E _ U R L _ C H E C K &gt;--------------------------------------------
Check archive.org URLs to make sure they at least look like they are pointing at valid archives and not to the
save snapshot URL or to calendar pages. When the archive URL is 'https://web.archive.org/save/' (or http://...)
archive.org saves a snapshot of the target page in the URL. That is something that Wikipedia should not allow
unwitting readers to do.
When the archive.org URL does not have a complete timestamp, archive.org chooses a snapshot according to its own
algorithm or provides a calendar 'search' result. [[WP:ELNO]] discourages links to search results.
This function looks at the value assigned to |archive-url= and returns empty strings for |archive-url= and
|archive-date= and an error message when:
|archive-url= holds an archive.org save command URL
|archive-url= is an archive.org URL that does not have a complete timestamp (YYYYMMDDhhmmss 14 digits) in the
correct place
otherwise returns |archive-url= and |archive-date=
There are two mostly compatible archive.org URLs:
//web.archive.org/&lt;timestamp&gt;... -- the old form
//web.archive.org/web/&lt;timestamp&gt;... -- the new form
The old form does not support or map to the new form when it contains a display flag. There are four identified flags
('id_', 'js_', 'cs_', 'im_') but since archive.org ignores others following the same form (two letters and an underscore)
we don't check for these specific flags but we do check the form.
This function supports a preview mode. When the article is rendered in preview mode, this function may return a modified
archive URL:
for save command errors, return undated wildcard (/*/)
for timestamp errors when the timestamp has a wildcard, return the URL unmodified
for timestamp errors when the timestamp does not have a wildcard, return with timestamp limited to six digits plus wildcard (/yyyymm*/)
]=]
local function archive_url_check (url, date)
local err_msg = ''; -- start with the error message empty
local path, timestamp, flag; -- portions of the archive.org URL
if (not url:match('//web%.archive%.org/')) and (not url:match('//liveweb%.archive%.org/')) then -- also deprecated liveweb Wayback machine URL
return url, date; -- not an archive.org archive, return ArchiveURL and ArchiveDate
end
if url:match('//web%.archive%.org/save/') then -- if a save command URL, we don't want to allow saving of the target page
err_msg = cfg.err_msg_supl.save;
url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL
elseif url:match('//liveweb%.archive%.org/') then
err_msg = cfg.err_msg_supl.liveweb;
else
path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the URL parts for evaluation
if not utilities.is_set (timestamp) or 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here
err_msg = cfg.err_msg_supl.timestamp;
if '*' ~= flag then
url=url:gsub ('(//web%.archive%.org/[^%d]*%d?%d?%d?%d?%d?%d?)[^/]*', '%1*', 1) -- for preview, modify ts to be yearmo* max (0-6 digits plus splat)
end
elseif utilities.is_set (path) and 'web/' ~= path then -- older archive URLs do not have the extra 'web/' path element
err_msg = cfg.err_msg_supl.path;
elseif utilities.is_set (flag) and not utilities.is_set (path) then -- flag not allowed with the old form URL (without the 'web/' path element)
err_msg = cfg.err_msg_supl.flag;
elseif utilities.is_set (flag) and not flag:match ('%a%a_') then -- flag if present must be two alpha characters and underscore (requires 'web/' path element)
err_msg = cfg.err_msg_supl.flag;
else
return url, date; -- return ArchiveURL and ArchiveDate
end
end
-- if here, something not right so
table.insert( z.message_tail, { utilities.set_message ( 'err_archive_url', {err_msg}, true ) } ); -- add error message and
if utilities.is_set (Frame:preprocess('{{REVISIONID}}')) then
return '', ''; -- return empty strings for ArchiveURL and ArchiveDate
else
return url, date; -- preview mode so return ArchiveURL and ArchiveDate
end
end
--[[--------------------------&lt; P L A C E _ C H E C K &gt;--------------------------------------------------------
check |place=, |publication-place=, |location= to see if these params include digits. This function added because
many editors misuse location to specify the in-source location (|page(s)= and |at= are supposed to do that)
returns the original parameter value without modification; added maint cat when parameter value contains digits
]]
local function place_check (param_val)
if not utilities.is_set (param_val) then -- parameter empty or omitted
return param_val; -- return that empty state
end
if mw.ustring.find (param_val, '%d') then -- not empty, are there digits in the parameter value
utilities.set_message ('maint_location'); -- yep, add maint cat
end
return param_val; -- and done
end
--[[--------------------------&lt; I S _ G E N E R I C _ T I T L E &gt;----------------------------------------------
compares |title= value against list of known generic title patterns. Returns true when pattern matches; nil else
the k/v pairs in 'generic_titles' each contain two tables, one for English and one for another 'local' language
Each of those tables contain another table that holds the string or pattern (whole title or title fragment) in
index [1]. index [2] is a Boolean that tells string.find() or mw.ustring.find() to do plain-text search (true)
or a pattern search (false). The intent of all this complexity is to make these searches as fast as possible so
that we don't run out of processing time on very large articles.
]]
local function is_generic_title (title)
title = mw.ustring.lower(title); -- switch title to lower case
for _, generic_title in ipairs (cfg.special_case_translation['generic_titles']) do --spin through the list of known generic title fragments
if title:find (generic_title['en'][1], 1, generic_title['en'][2]) then
return true; -- found English generic title so done
elseif generic_title['local'] then -- to keep work load down, generic_title['local'] should be nil except when there is a local version of the generic title
if mw.ustring.find (title, generic_title['local'][1], 1, generic_title['local'][2]) then -- mw.ustring() because might not be Latin script
return true; -- found local generic title so done
end
end
end
end
--[[--------------------------&lt; I S _ A R C H I V E D _ C O P Y &gt;----------------------------------------------
compares |title= to 'Archived copy' (place holder added by bots that can't find proper title); if matches, return true; nil else
]]
local function is_archived_copy (title)
title = mw.ustring.lower(title); -- switch title to lower case
if title:find (cfg.special_case_translation.archived_copy.en) then -- if title is 'Archived copy'
return true;
elseif cfg.special_case_translation.archived_copy['local'] then
if mw.ustring.find (title, cfg.special_case_translation.archived_copy['local']) then -- mw.ustring() because might not be Latin script
return true;
end
end
end
--[[--------------------------&lt; C I T A T I O N 0 &gt;------------------------------------------------------------
This is the main function doing the majority of the citation formatting.
]]
local function citation0( config, args)
--[[
Load Input Parameters
The argument_wrapper facilitates the mapping of multiple aliases to single internal variable.
]]
local A = argument_wrapper ( args );
local i
-- Pick out the relevant fields from the arguments. Different citation templates
-- define different field names for the same underlying things.
local Mode = is_valid_parameter_value (A['Mode'], A:ORIGIN('Mode'), cfg.keywords_lists['mode'], '');
local author_etal;
local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors=
local Authors;
local NameListStyle = is_valid_parameter_value (A['NameListStyle'], A:ORIGIN('NameListStyle'), cfg.keywords_lists['name-list-style'], '');
local Collaboration = A['Collaboration'];
do -- to limit scope of selected
local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList');
if 1 == selected then
a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn=
elseif 2 == selected then
NameListStyle = 'vanc'; -- override whatever |name-list-style= might be
a, author_etal = parse_vauthors_veditors (args, args.vauthors, 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn=
elseif 3 == selected then
Authors = A['Authors']; -- use content of |authors=
if 'authors' == A:ORIGIN('Authors') then -- but add a maint cat if the parameter is |authors=
utilities.set_message ('maint_authors'); -- because use of this parameter is discouraged; what to do about the aliases is a TODO:
end
end
if utilities.is_set (Collaboration) then
author_etal = true; -- so that |display-authors=etal not required
end
end
local Others = A['Others'];
local editor_etal;
local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors=
local Editors;
do -- to limit scope of selected
local selected = select_author_editor_source (A['Veditors'], A['Editors'], args, 'EditorList');
if 1 == selected then
e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn=
elseif 2 == selected then
NameListStyle = 'vanc'; -- override whatever |name-list-style= might be
e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn=
elseif 3 == selected then
Editors = A['Editors']; -- use content of |editors=
end
end
local translator_etal;
local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs
local Translators; -- assembled translators name list
t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn=
local interviewer_etal;
local interviewers_list = {};
local Interviewers; -- used later
interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters
local contributor_etal;
local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs
local Contributors; -- assembled contributors name list
local Chapter = A['Chapter']; -- done here so that we have access to |contribution= from |chapter= aliases
local Chapter_origin = A:ORIGIN ('Chapter');
local Contribution; -- because contribution is required for contributor(s)
if 'contribution' == A:ORIGIN ('Chapter') then
Contribution = A['Chapter']; -- get the name of the contribution
end
if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (A['Periodical']) then -- |contributor= and |contribution= only supported in book cites
c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn=
if 0 &lt; #c then
if not utilities.is_set (Contribution) then -- |contributor= requires |contribution=
table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_missing_required_param', 'contribution')}); -- add missing contribution error message
c = {}; -- blank the contributors' table; it is used as a flag later
end
if 0 == #a then -- |contributor= requires |author=
table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_missing_required_param', 'author')}); -- add missing author error message
c = {}; -- blank the contributors' table; it is used as a flag later
end
end
else -- if not a book cite
if utilities.select_one (args, cfg.aliases['ContributorList-Last'], 'err_redundant_parameters', 1 ) then -- are there contributor name list parameters?
table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_ignored')}); -- add contributor ignored error message
end
Contribution = nil; -- unset
end
if utilities.is_set (Others) then
if 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor=
utilities.set_message ('maint_others');
end
end
local Year = A['Year'];
local PublicationDate = A['PublicationDate'];
local OrigDate = A['OrigDate'];
local Date = A['Date'];
local LayDate = A['LayDate'];
------------------------------------------------- Get title data
local Title = A['Title'];
local ScriptTitle = A['ScriptTitle'];
local BookTitle = A['BookTitle'];
local Conference = A['Conference'];
local TransTitle = A['TransTitle'];
local TransTitle_origin = A:ORIGIN ('TransTitle');
local TitleNote = A['TitleNote'];
local TitleLink = A['TitleLink'];
local auto_select = ''; -- default is auto
local accept_link;
TitleLink, accept_link = utilities.has_accept_as_written(TitleLink, true); -- test for accept-this-as-written markup
if (not accept_link) and utilities.in_array (TitleLink, {'none', 'pmc', 'doi'}) then -- check for special keywords
auto_select = TitleLink; -- remember selection for later
TitleLink = ''; -- treat as if |title-link= would have been empty
end
TitleLink = link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wiki-markup in |title-link= or wiki-markup in |title= when |title-link= is set
local Section = ''; -- {{cite map}} only; preset to empty string for concatenation if not used
if 'map' == config.CitationClass and 'section' == A:ORIGIN ('Chapter') then
Section = A['Chapter']; -- get |section= from |chapter= alias list; |chapter= and the other aliases not supported in {{cite map}}
Chapter = ''; -- unset for now; will be reset later from |map= if present
end
local ScriptChapter = A['ScriptChapter'];
local ScriptChapter_origin = A:ORIGIN ('ScriptChapter');
local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode
local TransChapter = A['TransChapter'];
local TransChapter_origin = A:ORIGIN ('TransChapter');
local TitleType = A['TitleType'];
local Degree = A['Degree'];
local Docket = A['Docket'];
local ArchiveFormat = A['ArchiveFormat'];
local ArchiveDate;
local ArchiveURL;
ArchiveURL, ArchiveDate = archive_url_check (A['ArchiveURL'], A['ArchiveDate'])
local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], '');
local URL = A['URL']
local URL_origin = A:ORIGIN('URL'); -- get name of parameter that holds URL
local ChapterURL = A['ChapterURL'];
local ChapterURL_origin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL
local ConferenceFormat = A['ConferenceFormat'];
local ConferenceURL = A['ConferenceURL'];
local ConferenceURL_origin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL
local Periodical = A['Periodical'];
local Periodical_origin = '';
if utilities.is_set (Periodical) then
Periodical_origin = A:ORIGIN('Periodical'); -- get the name of the periodical parameter
local i;
Periodical, i = utilities.strip_apostrophe_markup (Periodical); -- strip apostrophe markup so that metadata isn't contaminated
if i then -- non-zero when markup was stripped so emit an error message
table.insert( z.message_tail, {utilities.set_message ('err_apostrophe_markup', {Periodical_origin}, true)});
end
end
if 'mailinglist' == config.CitationClass then -- special case for {{cite mailing list}}
if utilities.is_set (Periodical) and utilities.is_set (A ['MailingList']) then -- both set emit an error
table.insert( z.message_tail, {utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', Periodical_origin) .. ' and ' .. utilities.wrap_style ('parameter', 'mailinglist')}, true )});
end
Periodical = A ['MailingList']; -- error or no, set Periodical to |mailinglist= value because this template is {{cite mailing list}}
Periodical_origin = A:ORIGIN('MailingList');
end
local ScriptPeriodical = A['ScriptPeriodical'];
local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical');
-- web and news not tested for now because of
-- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors?
if not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter
-- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message
local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message
if p[config.CitationClass] then
table.insert( z.message_tail, {utilities.set_message ('err_missing_periodical', {config.CitationClass, p[config.CitationClass]}, true)});
end
end
local TransPeriodical = A['TransPeriodical'];
local TransPeriodical_origin = A:ORIGIN ('TransPeriodical');
local Series = A['Series'];
local Volume;
local Issue;
local Page;
local Pages;
local At;
if 'citation' == config.CitationClass then
if utilities.is_set (Periodical) then
if not utilities.in_array (Periodical_origin, {'website', 'mailinglist'}) then -- {{citation}} does not render volume for these 'periodicals'
Volume = A['Volume']; -- but does for all other 'periodicals'
end
elseif utilities.is_set (ScriptPeriodical) then
if 'script-website' ~= ScriptPeriodical_origin then -- {{citation}} does not render volume for |script-website=
Volume = A['Volume']; -- but does for all other 'periodicals'
end
else
Volume = A['Volume']; -- and does for non-'periodical' cites
end
elseif utilities.in_array (config.CitationClass, cfg.templates_using_volume) then -- render |volume= for cs1 according to the configuration settings
Volume = A['Volume'];
end
if 'citation' == config.CitationClass then
if utilities.is_set (Periodical) and utilities.in_array (Periodical_origin, {'journal', 'magazine', 'newspaper', 'periodical', 'work'}) or -- {{citation}} renders issue for these 'periodicals'
utilities.is_set (ScriptPeriodical) and utilities.in_array (ScriptPeriodical_origin, {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work'}) then -- and these 'script-periodicals'
Issue = hyphen_to_dash (A['Issue']);
end
elseif utilities.in_array (config.CitationClass, cfg.templates_using_issue) then -- conference &amp; map books do not support issue; {{citation}} listed here because included in settings table
if not (utilities.in_array (config.CitationClass, {'conference', 'map', 'citation'}) and not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical))) then
Issue = hyphen_to_dash (A['Issue']);
end
end
local Position = '';
if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) then
Page = A['Page'];
Pages = hyphen_to_dash (A['Pages']);
At = A['At'];
end
local Edition = A['Edition'];
local PublicationPlace = place_check (A['PublicationPlace'], A:ORIGIN('PublicationPlace'));
local Place = place_check (A['Place'], A:ORIGIN('Place'));
local PublisherName = A['PublisherName'];
local PublisherName_origin = A:ORIGIN('PublisherName');
if utilities.is_set (PublisherName) then
local i = 0;
PublisherName, i = utilities.strip_apostrophe_markup (PublisherName); -- strip apostrophe markup so that metadata isn't contaminated; publisher is never italicized
if i then -- non-zero when markup was stripped so emit an error message
table.insert( z.message_tail, {utilities.set_message ('err_apostrophe_markup', {PublisherName_origin}, true)});
end
end
local Newsgroup = A['Newsgroup']; -- TODO: strip apostrophe markup?
local Newsgroup_origin = A:ORIGIN('Newsgroup');
if 'newsgroup' == config.CitationClass then
if utilities.is_set (PublisherName) then -- general use parameter |publisher= not allowed in cite newsgroup
local error_text, error_state = utilities.set_message ('err_parameter_ignored', {PublisherName_origin}, true);
if utilities.is_set (error_text) then
table.insert( z.message_tail, {error_text, error_state} );
end
end
PublisherName = nil; -- ensure that this parameter is unset for the time being; will be used again after COinS
end
local UrlAccess = is_valid_parameter_value (A['UrlAccess'], A:ORIGIN('UrlAccess'), cfg.keywords_lists['url-access'], nil);
if not utilities.is_set (URL) and utilities.is_set (UrlAccess) then
UrlAccess = nil;
table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {'url'}, true ) } );
end
local ChapterUrlAccess = is_valid_parameter_value (A['ChapterUrlAccess'], A:ORIGIN('ChapterUrlAccess'), cfg.keywords_lists['url-access'], nil);
if not utilities.is_set (ChapterURL) and utilities.is_set (ChapterUrlAccess) then
ChapterUrlAccess = nil;
table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')}, true ) } );
end
local MapUrlAccess = is_valid_parameter_value (A['MapUrlAccess'], A:ORIGIN('MapUrlAccess'), cfg.keywords_lists['url-access'], nil);
if not utilities.is_set (A['MapURL']) and utilities.is_set (MapUrlAccess) then
MapUrlAccess = nil;
table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {'map-url'}, true ) } );
end
local Via = A['Via'];
local AccessDate = A['AccessDate'];
local Agency = A['Agency'];
local Language = A['Language'];
local Format = A['Format'];
local ChapterFormat = A['ChapterFormat'];
local DoiBroken = A['DoiBroken'];
local ID = A['ID'];
local ASINTLD = A['ASINTLD'];
local IgnoreISBN = is_valid_parameter_value (A['IgnoreISBN'], A:ORIGIN('IgnoreISBN'), cfg.keywords_lists['yes_true_y'], nil);
local Embargo = A['Embargo'];
local Class = A['Class']; -- arxiv class identifier
local Quote = A['Quote'];
local QuotePage = A['QuotePage'];
local QuotePages = A['QuotePages'];
local ScriptQuote = A['ScriptQuote'];
local TransQuote = A['TransQuote'];
local LayFormat = A['LayFormat'];
local LayURL = A['LayURL'];
local LaySource = A['LaySource'];
local Transcript = A['Transcript'];
local TranscriptFormat = A['TranscriptFormat'];
local TranscriptURL = A['TranscriptURL']
local TranscriptURL_origin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL
local LastAuthorAmp = is_valid_parameter_value (A['LastAuthorAmp'], A:ORIGIN('LastAuthorAmp'), cfg.keywords_lists['yes_true_y'], nil);
local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil);
if 'nocat' == A:ORIGIN('NoTracking') then
utilities.set_message ('maint_nocat'); -- this one so that we get the message; see main categorization at end of citation0()
end
--local variables that are not cs1 parameters
local use_lowercase; -- controls capitalization of certain static text
local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language
local anchor_year; -- used in the CITEREF identifier
local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification
local DF = is_valid_parameter_value (A['DF'], A:ORIGIN('DF'), cfg.keywords_lists['df'], '');
if not utilities.is_set (DF) then
DF = cfg.global_df; -- local |df= if present overrides global df set by {{use xxx date}} template
end
local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma
local PostScript;
local Ref = A['Ref'];
if 'harv' == Ref then
utilities.set_message ('maint_ref_harv'); -- add maint cat to identify templates that have this now-extraneous param value
elseif not utilities.is_set (Ref) then
Ref = 'harv'; -- set as default when not set externally
end
sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], Ref, config.CitationClass);
use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text
-- check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories
if not utilities.is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page
if utilities.in_array (this_page.nsText, cfg.uncategorized_namespaces) then
no_tracking_cats = "true"; -- set no_tracking_cats
end
for _, v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns
if this_page.text:match (v) then -- test page name against each pattern
no_tracking_cats = "true"; -- set no_tracking_cats
break; -- bail out if one is found
end
end
end
-- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it)
utilities.select_one (args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'err_redundant_parameters'); -- this is a dummy call simply to get the error message and category
local coins_pages;
Page, Pages, At, coins_pages = insource_loc_get (Page, Pages, At);
local NoPP = is_valid_parameter_value (A['NoPP'], A:ORIGIN('NoPP'), cfg.keywords_lists['yes_true_y'], nil);
if utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- both |publication-place= and |place= (|location=) allowed if different
utilities.add_prop_cat ('location test'); -- add property cat to evaluate how often PublicationPlace and Place are used together
if PublicationPlace == Place then
Place = ''; -- unset; don't need both if they are the same
end
elseif not utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- when only |place= (|location=) is set ...
PublicationPlace = Place; -- promote |place= (|location=) to |publication-place
end
if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same
--[[
Parameter remapping for cite encyclopedia:
When the citation has these parameters:
|encyclopedia= and |title= then map |title= to |article= and |encyclopedia= to |title=
|encyclopedia= and |article= then map |encyclopedia= to |title=
|trans-title= maps to |trans-chapter= when |title= is re-mapped
|url= maps to |chapter-url= when |title= is remapped
All other combinations of |encyclopedia=, |title=, and |article= are not modified
]]
local Encyclopedia = A['Encyclopedia']; -- used as a flag by this module and by ~/COinS
if utilities.is_set (Encyclopedia) then -- emit error message when Encyclopedia set but template is other than {{cite encyclopedia}} or {{citation}}
if 'encyclopaedia' ~= config.CitationClass and 'citation' ~= config.CitationClass then
table.insert (z.message_tail, {utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('Encyclopedia')}, true)});
Encyclopedia = nil; -- unset because not supported by this template
end
end
if ('encyclopaedia' == config.CitationClass) or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then
if utilities.is_set (Periodical) and utilities.is_set (Encyclopedia) then -- when both set emit an error
table.insert (z.message_tail, {utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', A:ORIGIN ('Encyclopedia')) .. ' and ' .. utilities.wrap_style ('parameter', Periodical_origin)}, true )});
end
if utilities.is_set (Encyclopedia) then
Periodical = Encyclopedia; -- error or no, set Periodical to Encyclopedia; allow periodical without encyclopedia
Periodical_origin = A:ORIGIN ('Encyclopedia');
end
if utilities.is_set (Periodical) then -- Periodical is set when |encyclopedia= is set
if utilities.is_set (Title) or utilities.is_set (ScriptTitle) then
if not utilities.is_set (Chapter) then
Chapter = Title; -- |encyclopedia= and |title= are set so map |title= to |article= and |encyclopedia= to |title=
ScriptChapter = ScriptTitle;
ScriptChapter_origin = A:ORIGIN('ScriptTitle')
TransChapter = TransTitle;
ChapterURL = URL;
ChapterURL_origin = A:ORIGIN('URL')
ChapterUrlAccess = UrlAccess;
if not utilities.is_set (ChapterURL) and utilities.is_set (TitleLink) then
Chapter = utilities.make_wikilink (TitleLink, Chapter);
end
Title = Periodical;
ChapterFormat = Format;
Periodical = ''; -- redundant so unset
TransTitle = '';
URL = '';
Format = '';
TitleLink = '';
ScriptTitle = '';
end
elseif utilities.is_set (Chapter) then -- |title= not set
Title = Periodical; -- |encyclopedia= set and |article= set so map |encyclopedia= to |title=
Periodical = ''; -- redundant so unset
end
end
end
-- special case for cite techreport.
if (config.CitationClass == "techreport") then -- special case for cite techreport
if utilities.is_set (A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue'
if not utilities.is_set (ID) then -- can we use ID for the "number"?
ID = A['Number']; -- yes, use it
else -- ID has a value so emit error message
table.insert( z.message_tail, { utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'id') .. ' and ' .. utilities.wrap_style ('parameter', 'number')}, true )});
end
end
end
-- Account for the oddity that is {{cite conference}}, before generation of COinS data.
if 'conference' == config.CitationClass then
if utilities.is_set (BookTitle) then
Chapter = Title;
Chapter_origin = 'title';
-- ChapterLink = TitleLink; -- |chapter-link= is deprecated
ChapterURL = URL;
ChapterUrlAccess = UrlAccess;
ChapterURL_origin = URL_origin;
URL_origin = '';
ChapterFormat = Format;
TransChapter = TransTitle;
TransChapter_origin = TransTitle_origin;
Title = BookTitle;
Format = '';
-- TitleLink = '';
TransTitle = '';
URL = '';
end
elseif 'speech' ~= config.CitationClass then
Conference = ''; -- not cite conference or cite speech so make sure this is empty string
end
-- cite map oddities
local Cartography = "";
local Scale = "";
local Sheet = A['Sheet'] or '';
local Sheets = A['Sheets'] or '';
if config.CitationClass == "map" then
if utilities.is_set (Chapter) then
table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'map') .. ' and ' .. utilities.wrap_style ('parameter', Chapter_origin)}, true ) } ); -- add error message
end
Chapter = A['Map'];
Chapter_origin = A:ORIGIN('Map');
ChapterURL = A['MapURL'];
ChapterURL_origin = A:ORIGIN('MapURL');
TransChapter = A['TransMap'];
ScriptChapter = A['ScriptMap']
ScriptChapter_origin = A:ORIGIN('ScriptMap')
ChapterUrlAccess = MapUrlAccess;
ChapterFormat = A['MapFormat'];
Cartography = A['Cartography'];
if utilities.is_set ( Cartography ) then
Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase);
end
Scale = A['Scale'];
if utilities.is_set ( Scale ) then
Scale = sepc .. " " .. Scale;
end
end
-- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data.
if 'episode' == config.CitationClass or 'serial' == config.CitationClass then
local SeriesLink = A['SeriesLink'];
SeriesLink = link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wiki-markup in |series-link= or wiki-markup in |series= when |series-link= is set
local Network = A['Network'];
local Station = A['Station'];
local s, n = {}, {};
-- do common parameters first
if utilities.is_set (Network) then table.insert(n, Network); end
if utilities.is_set (Station) then table.insert(n, Station); end
ID = table.concat(n, sepc .. ' ');
if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}}
local Season = A['Season'];
local SeriesNumber = A['SeriesNumber'];
if utilities.is_set (Season) and utilities.is_set (SeriesNumber) then -- these are mutually exclusive so if both are set
table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'season') .. ' and ' .. utilities.wrap_style ('parameter', 'seriesno')}, true ) } ); -- add error message
SeriesNumber = ''; -- unset; prefer |season= over |seriesno=
end
-- assemble a table of parts concatenated later into Series
if utilities.is_set (Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end
if utilities.is_set (SeriesNumber) then table.insert(s, wrap_msg ('seriesnum', SeriesNumber, use_lowercase)); end
if utilities.is_set (Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end
Issue = ''; -- unset because this is not a unique parameter
Chapter = Title; -- promote title parameters to chapter
ScriptChapter = ScriptTitle;
ScriptChapter_origin = A:ORIGIN('ScriptTitle');
ChapterLink = TitleLink; -- alias |episode-link=
TransChapter = TransTitle;
ChapterURL = URL;
ChapterUrlAccess = UrlAccess;
ChapterURL_origin = A:ORIGIN('URL');
Title = Series; -- promote series to title
TitleLink = SeriesLink;
Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number
if utilities.is_set (ChapterLink) and not utilities.is_set (ChapterURL) then -- link but not URL
Chapter = utilities.make_wikilink (ChapterLink, Chapter);
elseif utilities.is_set (ChapterLink) and utilities.is_set (ChapterURL) then -- if both are set, URL links episode;
Series = utilities.make_wikilink (ChapterLink, Series);
end
URL = ''; -- unset
TransTitle = '';
ScriptTitle = '';
else -- now oddities that are cite serial
Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial
Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday?
if utilities.is_set (Series) and utilities.is_set (SeriesLink) then
Series = utilities.make_wikilink (SeriesLink, Series);
end
Series = utilities.wrap_style ('italic-title', Series); -- series is italicized
end
end
-- end of {{cite episode}} stuff
-- handle type parameter for those CS1 citations that have default values
if utilities.in_array (config.CitationClass, {"AV-media-notes", "interview", "mailinglist", "map", "podcast", "pressrelease", "report", "techreport", "thesis"}) then
TitleType = set_titletype (config.CitationClass, TitleType);
if utilities.is_set (Degree) and "Thesis" == TitleType then -- special case for cite thesis
TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower();
end
end
if utilities.is_set (TitleType) then -- if type parameter is specified
TitleType = utilities.substitute ( cfg.messages['type'], TitleType); -- display it in parentheses
-- TODO: Hack on TitleType to fix bunched parentheses problem
end
-- legacy: promote PublicationDate to Date if neither Date nor Year are set.
local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging
if not utilities.is_set (Date) then
Date = Year; -- promote Year to Date
Year = nil; -- make nil so Year as empty string isn't used for CITEREF
if not utilities.is_set (Date) and utilities.is_set (PublicationDate) then -- use PublicationDate when |date= and |year= are not set
Date = PublicationDate; -- promote PublicationDate to Date
PublicationDate = ''; -- unset, no longer needed
Date_origin = A:ORIGIN('PublicationDate'); -- save the name of the promoted parameter
else
Date_origin = A:ORIGIN('Year'); -- save the name of the promoted parameter
end
else
Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging
end
if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation
--[[
Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where
we get the date used in the metadata.
Date validation supporting code is in Module:Citation/CS1/Date_validation
]]
do -- create defined block to contain local variables error_message, date_parameters_list, mismatch
local error_message = '';
-- AirDate has been promoted to Date so not necessary to check it
local date_parameters_list = {
['access-date'] = {val = AccessDate, name = A:ORIGIN ('AccessDate')},
['archive-date'] = {val = ArchiveDate, name = A:ORIGIN ('ArchiveDate')},
['date'] = {val = Date, name = Date_origin},
['doi-broken-date'] = {val = DoiBroken, name = A:ORIGIN ('DoiBroken')},
['pmc-embargo-date'] = {val = Embargo, name = A:ORIGIN ('Embargo')},
['lay-date'] = {val = LayDate, name = A:ORIGIN ('LayDate')},
['publication-date'] = {val = PublicationDate, name = A:ORIGIN ('PublicationDate')},
['year'] = {val = Year, name = A:ORIGIN ('Year')},
};
local error_list = {};
anchor_year, Embargo = validation.dates(date_parameters_list, COinS_date, error_list);
-- start temporary Julian / Gregorian calendar uncertainty categorization
if COinS_date.inter_cal_cat then
utilities.add_prop_cat ('jul_greg_uncertainty');
end
-- end temporary Julian / Gregorian calendar uncertainty categorization
if utilities.is_set (Year) and utilities.is_set (Date) then -- both |date= and |year= not normally needed;
local mismatch = validation.year_date_check (Year, Date);
if 0 == mismatch then -- |year= does not match a year-value in |date=
table.insert (error_list, '&lt;code class="cs1-code"&gt;&amp;#124;year= / &amp;#124;date= mismatch&lt;/code&gt;');
elseif 1 == mismatch then -- |year= matches year-value in |date=
utilities.set_message ('maint_date_year'); -- add a maint cat
end
end
if 0 == #error_list then -- error free dates only; 0 when error_list is empty
local modified = false; -- flag
if utilities.is_set (DF) then -- if we need to reformat dates
modified = validation.reformat_dates (date_parameters_list, DF); -- reformat to DF format, use long month names if appropriate
end
if true == validation.date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate
modified = true;
utilities.set_message ('maint_date_format'); -- hyphens were converted so add maint category
end
-- for those wikis that can and want to have English date names translated to the local language,
-- uncomment the next three lines. Not supported by en.wiki (for obvious reasons)
-- set validation.date_name_xlate() second argument to true to translate English digits to local digits (will translate ymd dates)
-- if validation.date_name_xlate (date_parameters_list, false) then
-- modified = true;
-- end
if modified then -- if the date_parameters_list values were modified
AccessDate = date_parameters_list['access-date'].val; -- overwrite date holding parameters with modified values
ArchiveDate = date_parameters_list['archive-date'].val;
Date = date_parameters_list['date'].val;
DoiBroken = date_parameters_list['doi-broken-date'].val;
LayDate = date_parameters_list['lay-date'].val;
PublicationDate = date_parameters_list['publication-date'].val;
end
else
table.insert (z.message_tail, {utilities.set_message ('err_bad_date', {utilities.make_sep_list (#error_list, error_list)}, true)}); -- add this error message
end
end -- end of do
local ID_list_coins = identifiers.extract_ids (args); -- gets identifiers and their values from args; this list used for COinS and source for build_id_list()
if utilities.is_set (DoiBroken) and not ID_list_coins['DOI'] then
table.insert (z.message_tail, {utilities.set_message ('err_doibroken_missing_doi', A:ORIGIN('DoiBroken'))});
end
local ID_access_levels = identifiers.extract_id_access_levels (args, ID_list_coins);
local ID_list = identifiers.build_id_list (ID_list_coins, {IdAccessLevels = ID_access_levels, DoiBroken = DoiBroken, ASINTLD = ASINTLD, IgnoreISBN = IgnoreISBN, Embargo = Embargo, Class = Class}); -- render identifiers
-- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite ssrn}}, before generation of COinS data.
if utilities.in_array (config.CitationClass, whitelist.preprint_template_list) then
if not utilities.is_set (ID_list_coins[config.CitationClass:upper()]) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv= &amp; |citeseerx= required for their templates
table.insert (z.message_tail, {utilities.set_message ('err_' .. config.CitationClass .. '_missing', {}, true)}); -- add error message
end
Periodical = ({['arxiv'] = 'arXiv', ['biorxiv'] = 'bioRxiv', ['citeseerx'] = 'CiteSeerX', ['ssrn'] = 'Social Science Research Network'})[config.CitationClass];
end
-- Link the title of the work if no |url= was provided, but we have a |pmc= or a |doi= with |doi-access=free
if config.CitationClass == "journal" and not utilities.is_set (URL) and not utilities.is_set (TitleLink) and not utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) then -- TODO: remove 'none' once existing citations have been switched to 'off', so 'none' can be used as token for "no title" instead
if 'none' ~= cfg.keywords_xlate[auto_select] then -- if auto-linking not disabled
if identifiers.auto_link_urls[auto_select] then -- manual selection
URL = identifiers.auto_link_urls[auto_select]; -- set URL to be the same as identifier's external link
URL_origin = cfg.id_handlers[auto_select:upper()].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title=
elseif identifiers.auto_link_urls['pmc'] then -- auto-select PMC
URL = identifiers.auto_link_urls['pmc']; -- set URL to be the same as the PMC external link if not embargoed
URL_origin = cfg.id_handlers['PMC'].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title=
elseif identifiers.auto_link_urls['doi'] then -- auto-select DOI
URL = identifiers.auto_link_urls['doi'];
URL_origin = cfg.id_handlers['DOI'].parameters[1];
end
end
if utilities.is_set (URL) and utilities.is_set (AccessDate) then -- access date requires |url=; identifier-created URL is not |url=
table.insert( z.message_tail, { utilities.set_message ( 'err_accessdate_missing_url', {}, true ) } ); -- add an error message
AccessDate = ''; -- unset
end
end
-- At this point fields may be nil if they weren't specified in the template use. We can use that fact.
-- Test if citation has no title
if not utilities.is_set (Title) and not utilities.is_set (TransTitle) and not utilities.is_set (ScriptTitle) then -- has special case for cite episode
table.insert( z.message_tail, { utilities.set_message ( 'err_citation_missing_title', {'episode' == config.CitationClass and 'series' or 'title'}, true ) } );
end
if utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) and
utilities.in_array (config.CitationClass, {'journal', 'citation'}) and
(utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and
('journal' == Periodical_origin or 'script-journal' == ScriptPeriodical_origin) then -- special case for journal cites
Title = ''; -- set title to empty string
utilities.set_message ('maint_untitled'); -- add maint cat
end
check_for_url ({ -- add error message when any of these parameters hold a URL
['title']=Title,
[A:ORIGIN('Chapter')]=Chapter,
[Periodical_origin] = Periodical,
[PublisherName_origin] = PublisherName
});
-- COinS metadata (see &lt;http://ocoins.info/&gt;) for automated parsing of citation information.
-- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that
-- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title
-- is the article title, and Chapter is a section within the article. So, we remap
local coins_chapter = Chapter; -- default assuming that remapping not required
local coins_title = Title; -- et tu
if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then
if utilities.is_set (Chapter) and utilities.is_set (Title) and utilities.is_set (Periodical) then -- if all are used then
coins_chapter = Title; -- remap
coins_title = Periodical;
end
end
local coins_author = a; -- default for coins rft.au
if 0 &lt; #c then -- but if contributor list
coins_author = c; -- use that instead
end
-- this is the function call to COinS()
local OCinSoutput = metadata.COinS({
['Periodical'] = utilities.strip_apostrophe_markup (Periodical), -- no markup in the metadata
['Encyclopedia'] = Encyclopedia, -- just a flag; content ignored by ~/COinS
['Chapter'] = metadata.make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic wiki-markup
['Degree'] = Degree; -- cite thesis only
['Title'] = metadata.make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic wiki-markup
['PublicationPlace'] = PublicationPlace,
['Date'] = COinS_date.rftdate, -- COinS_date has correctly formatted date if Date is valid;
['Season'] = COinS_date.rftssn,
['Quarter'] = COinS_date.rftquarter,
['Chron'] = COinS_date.rftchron or (not COinS_date.rftdate and Date) or '', -- chron but if not set and invalid date format use Date; keep this last bit?
['Series'] = Series,
['Volume'] = Volume,
['Issue'] = Issue,
['Pages'] = coins_pages or metadata.get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At}, 5)), -- pages stripped of external links
['Edition'] = Edition,
['PublisherName'] = PublisherName or Newsgroup, -- any apostrophe markup already removed from PublisherName
['URL'] = first_set ({ChapterURL, URL}, 2),
['Authors'] = coins_author,
['ID_list'] = ID_list_coins,
['RawPage'] = this_page.prefixedText,
}, config.CitationClass);
-- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, and {{cite ssrn}} AFTER generation of COinS data.
if utilities.in_array (config.CitationClass, whitelist.preprint_template_list) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, CiteSeerX, or ssrn now unset so it isn't displayed
Periodical = ''; -- periodical not allowed in these templates; if article has been published, use cite journal
end
-- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text
if 'newsgroup' == config.CitationClass and utilities.is_set (Newsgroup) then
PublisherName = utilities.substitute (cfg.messages['newsgroup'], external_link( 'news:' .. Newsgroup, Newsgroup, Newsgroup_origin, nil ));
end
-- Now perform various field substitutions.
-- We also add leading spaces and surrounding markup and punctuation to the
-- various parts of the citation, but only when they are non-nil.
local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list
do
local last_first_list;
local control = {
format = NameListStyle, -- empty string or 'vanc'
maximum = nil, -- as if display-authors or display-editors not set
lastauthoramp = LastAuthorAmp,
mode = Mode
};
do -- do editor name list first because the now unsupported coauthors used to modify control table
control.maximum , editor_etal = get_display_names (A['DisplayEditors'], #e, 'editors', editor_etal);
last_first_list, EditorCount = list_people(control, e, editor_etal);
if utilities.is_set (Editors) then
Editors, editor_etal = name_has_etal (Editors, editor_etal, false, 'editors'); -- find and remove variations on et al.
if editor_etal then
Editors = Editors .. ' ' .. cfg.messages['et al']; -- add et al. to editors parameter beause |display-editors=etal
end
EditorCount = 2; -- we don't know but assume |editors= is multiple names; spoof to display (eds.) annotation
else
Editors = last_first_list; -- either an author name list or an empty string
end
if 1 == EditorCount and (true == editor_etal or 1 &lt; #e) then -- only one editor displayed but includes etal then
EditorCount = 2; -- spoof to display (eds.) annotation
end
end
do -- now do interviewers
control.maximum , interviewer_etal = get_display_names (A['DisplayInterviewers'], #interviewers_list, 'interviewers', interviewer_etal);
Interviewers = list_people (control, interviewers_list, interviewer_etal);
end
do -- now do translators
control.maximum , translator_etal = get_display_names (A['DisplayTranslators'], #t, 'translators', translator_etal);
Translators = list_people (control, t, translator_etal);
end
do -- now do contributors
control.maximum , contributor_etal = get_display_names (A['DisplayContributors'], #c, 'contributors', contributor_etal);
Contributors = list_people (control, c, contributor_etal);
end
do -- now do authors
control.maximum , author_etal = get_display_names (A['DisplayAuthors'], #a, 'authors', author_etal);
last_first_list = list_people(control, a, author_etal);
if utilities.is_set (Authors) then
Authors, author_etal = name_has_etal (Authors, author_etal, false, 'authors'); -- find and remove variations on et al.
if author_etal then
Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter
end
else
Authors = last_first_list; -- either an author name list or an empty string
end
end -- end of do
if utilities.is_set (Authors) and utilities.is_set (Collaboration) then
Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al.
end
end
-- apply |[xx-]format= styling; at the end, these parameters hold correctly styled format annotation,
-- an error message if the associated URL is not set, or an empty string for concatenation
ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url');
ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url');
Format = style_format (Format, URL, 'format', 'url');
LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url');
TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl');
-- special case for chapter format so no error message or cat when chapter not supported
if not (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or
('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia))) then
ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url');
end
if not utilities.is_set (URL) then
if utilities.in_array (config.CitationClass, {"web", "podcast", "mailinglist"}) or -- |url= required for cite web, cite podcast, and cite mailinglist
('citation' == config.CitationClass and ('website' == Periodical_origin or 'script-website' == ScriptPeriodical_origin)) then -- and required for {{citation}} with |website= or |script-website=
table.insert( z.message_tail, { utilities.set_message ( 'err_cite_web_url', {}, true ) } );
end
-- do we have |accessdate= without either |url= or |chapter-url=?
if utilities.is_set (AccessDate) and not utilities.is_set (ChapterURL) then -- ChapterURL may be set when URL is not set;
table.insert( z.message_tail, { utilities.set_message ( 'err_accessdate_missing_url', {}, true ) } );
AccessDate = '';
end
end
local OriginalURL, OriginalURL_origin, OriginalFormat, OriginalAccess;
UrlStatus = UrlStatus:lower(); -- used later when assembling archived text
if utilities.is_set ( ArchiveURL ) then
if utilities.is_set (ChapterURL) then -- if chapter-url= is set apply archive url to it
OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text
OriginalURL_origin = ChapterURL_origin; -- name of |chapter-url= parameter for error messages
OriginalFormat = ChapterFormat; -- and original |chapter-format=
if 'live' ~= UrlStatus then
ChapterURL = ArchiveURL -- swap-in the archive's URL
ChapterURL_origin = A:ORIGIN('ArchiveURL') -- name of |archive-url= parameter for error messages
ChapterFormat = ArchiveFormat or ''; -- swap in archive's format
ChapterUrlAccess = nil; -- restricted access levels do not make sense for archived URLs
end
elseif utilities.is_set (URL) then
OriginalURL = URL; -- save copy of original source URL
OriginalURL_origin = URL_origin; -- name of URL parameter for error messages
OriginalFormat = Format; -- and original |format=
OriginalAccess = UrlAccess;
if 'live' ~= UrlStatus then -- if URL set then |archive-url= applies to it
URL = ArchiveURL -- swap-in the archive's URL
URL_origin = A:ORIGIN('ArchiveURL') -- name of archive URL parameter for error messages
Format = ArchiveFormat or ''; -- swap in archive's format
UrlAccess = nil; -- restricted access levels do not make sense for archived URLs
end
end
end
if utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or -- if any of the 'periodical' cites except encyclopedia
('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) then
local chap_param;
if utilities.is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters
chap_param = A:ORIGIN ('Chapter')
elseif utilities.is_set (TransChapter) then
chap_param = A:ORIGIN ('TransChapter')
elseif utilities.is_set (ChapterURL) then
chap_param = A:ORIGIN ('ChapterURL')
elseif utilities.is_set (ScriptChapter) then
chap_param = ScriptChapter_origin;
else utilities.is_set (ChapterFormat)
chap_param = A:ORIGIN ('ChapterFormat')
end
if utilities.is_set (chap_param) then -- if we found one
table.insert( z.message_tail, { utilities.set_message ( 'err_chapter_ignored', {chap_param}, true ) } ); -- add error message
Chapter = ''; -- and set them to empty string to be safe with concatenation
TransChapter = '';
ChapterURL = '';
ScriptChapter = '';
ChapterFormat = '';
end
else -- otherwise, format chapter / article title
local no_quotes = false; -- default assume that we will be quoting the chapter parameter value
if utilities.is_set (Contribution) and 0 &lt; #c then -- if this is a contribution with contributor(s)
if utilities.in_array (Contribution:lower(), cfg.keywords_lists.contribution) then -- and a generic contribution title
no_quotes = true; -- then render it unquoted
end
end
Chapter = format_chapter_title (ScriptChapter, ScriptChapter_origin, Chapter, Chapter_origin, TransChapter, TransChapter_origin, ChapterURL, ChapterURL_origin, no_quotes, ChapterUrlAccess); -- Contribution is also in Chapter
if utilities.is_set (Chapter) then
Chapter = Chapter .. ChapterFormat ;
if 'map' == config.CitationClass and utilities.is_set (TitleType) then
Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title
end
Chapter = Chapter .. sepc .. ' ';
elseif utilities.is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ...
Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it
end
end
-- Format main title
local plain_title = false;
local accept_title;
Title, accept_title = utilities.has_accept_as_written (Title, true); -- remove accept-this-as-written markup when it wraps all of &lt;Title&gt;
if accept_title and ('' == Title) then -- only support forced empty for now "(())"
Title = cfg.messages['notitle']; -- replace by predefined "No title" message
-- TODO: utilities.set_message ( 'err_redundant_parameters', ...); -- issue proper error message instead of muting
ScriptTitle = ''; -- just mute for now
TransTitle = ''; -- just mute for now
plain_title = true; -- suppress text decoration for descriptive title
utilities.set_message ('maint_untitled'); -- add maint cat
end
if not accept_title then -- &lt;Title&gt; not wrapped in accept-as-written markup
if '...' == Title:sub (-3) then -- if ellipsis is the last three characters of |title=
Title = Title:gsub ('(%.%.%.)%.+$', '%1'); -- limit the number of dots to three
elseif not mw.ustring.find (Title, '%.%s*%a%.$') and -- end of title is not a 'dot-(optional space-)letter-dot' initialism ...
not mw.ustring.find (Title, '%s+%a%.$') then -- ...and not a 'space-letter-dot' initial (''Allium canadense'' L.)
Title = mw.ustring.gsub(Title, '%' .. sepc .. '$', ''); -- remove any trailing separator character; sepc and ms.ustring() here for languages that use multibyte separator characters
end
if utilities.is_set (ArchiveURL) and is_archived_copy (Title) then
utilities.set_message ('maint_archived_copy'); -- add maintenance category before we modify the content of Title
end
if is_generic_title (Title) then
table.insert (z.message_tail, {utilities.set_message ( 'err_generic_title', {}, true ) } ); -- set an error message
end
end
if (not plain_title) and (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or
('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) or
('map' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)))) then -- special case for cite map when the map is in a periodical treat as an article
Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from module provided quote marks
Title = utilities.wrap_style ('quoted-title', Title);
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after title is wrapped
TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle );
elseif plain_title or ('report' == config.CitationClass) then -- no styling for cite report and descriptive titles (otherwise same as above)
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after title is wrapped
TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title
else
Title = utilities.wrap_style ('italic-title', Title);
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after title is wrapped
TransTitle = utilities.wrap_style ('trans-italic-title', TransTitle);
end
local TransError = "";
if utilities.is_set (TransTitle) then
if utilities.is_set (Title) then
TransTitle = " " .. TransTitle;
else
TransError = " " .. utilities.set_message ( 'err_trans_missing_title', {'title'} );
end
end
if utilities.is_set (Title) then -- TODO: is this the right place to be making Wikisource URLs?
if utilities.is_set (TitleLink) and utilities.is_set (URL) then
table.insert( z.message_tail, { utilities.set_message ( 'err_wikilink_in_url', {}, true ) } ); -- set an error message because we can't have both
TitleLink = ''; -- unset
end
if not utilities.is_set (TitleLink) and utilities.is_set (URL) then
Title = external_link (URL, Title, URL_origin, UrlAccess) .. TransTitle .. TransError .. Format;
URL = ''; -- unset these because no longer needed
Format = "";
elseif utilities.is_set (TitleLink) and not utilities.is_set (URL) then
local ws_url;
ws_url = wikisource_url_make (TitleLink); -- ignore ws_label return; not used here
if ws_url then
Title = external_link (ws_url, Title .. '&amp;nbsp;', 'ws link in title-link'); -- space char after Title to move icon away from italic text; TODO: a better way to do this?
Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], TitleLink, Title});
Title = Title .. TransTitle .. TransError;
else
Title = utilities.make_wikilink (TitleLink, Title) .. TransTitle .. TransError;
end
else
local ws_url, ws_label, L; -- Title has italic or quote markup by the time we get here which causes is_wikilink() to return 0 (not a wikilink)
ws_url, ws_label, L = wikisource_url_make (Title:gsub('[\'"](.-)[\'"]', '%1')); -- make ws URL from |title= interwiki link (strip italic or quote markup); link portion L becomes tooltip label
if ws_url then
Title = Title:gsub ('%b[]', ws_label); -- replace interwiki link with ws_label to retain markup
Title = external_link (ws_url, Title .. '&amp;nbsp;', 'ws link in title'); -- space char after Title to move icon away from italic text; TODO: a better way to do this?
Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, Title});
Title = Title .. TransTitle .. TransError;
else
Title = Title .. TransTitle .. TransError;
end
end
else
Title = TransTitle .. TransError;
end
if utilities.is_set (Place) then
Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " ";
end
if utilities.is_set (Conference) then
if utilities.is_set (ConferenceURL) then
Conference = external_link( ConferenceURL, Conference, ConferenceURL_origin, nil );
end
Conference = sepc .. " " .. Conference .. ConferenceFormat;
elseif utilities.is_set (ConferenceURL) then
Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURL_origin, nil );
end
if not utilities.is_set (Position) then
local Minutes = A['Minutes'];
local Time = A['Time'];
if utilities.is_set (Minutes) then
if utilities.is_set (Time) then
table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'minutes') .. ' and ' .. utilities.wrap_style ('parameter', 'time')}, true ) } );
end
Position = " " .. Minutes .. " " .. cfg.messages['minutes'];
else
if utilities.is_set (Time) then
local TimeCaption = A['TimeCaption']
if not utilities.is_set (TimeCaption) then
TimeCaption = cfg.messages['event'];
if sepc ~= '.' then
TimeCaption = TimeCaption:lower();
end
end
Position = " " .. TimeCaption .. " " .. Time;
end
end
else
Position = " " .. Position;
At = '';
end
Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase);
At = utilities.is_set (At) and (sepc .. " " .. At) or "";
Position = utilities.is_set (Position) and (sepc .. " " .. Position) or "";
if config.CitationClass == 'map' then
local Sections = A['Sections']; -- Section (singular) is an alias of Chapter so set earlier
local Inset = A['Inset'];
if utilities.is_set ( Inset ) then
Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase);
end
if utilities.is_set ( Sections ) then
Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase);
elseif utilities.is_set ( Section ) then
Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase);
end
At = At .. Inset .. Section;
end
if utilities.is_set (Language) then
Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc.
else
Language=""; -- language not specified so make sure this is an empty string;
--[[ TODO: need to extract the wrap_msg from language_parameter
so that we can solve parentheses bunching problem with Format/Language/TitleType
]]
end
Others = utilities.is_set (Others) and (sepc .. " " .. Others) or "";
if utilities.is_set (Translators) then
Others = safe_join ({sepc .. ' ', wrap_msg ('translated', Translators, use_lowercase), Others}, sepc);
end
if utilities.is_set (Interviewers) then
Others = safe_join ({sepc .. ' ', wrap_msg ('interview', Interviewers, use_lowercase), Others}, sepc);
end
TitleNote = utilities.is_set (TitleNote) and (sepc .. " " .. TitleNote) or "";
if utilities.is_set (Edition) then
if Edition:match ('%f[%a][Ee]d%.?$') or Edition:match ('%f[%a][Ee]dition$') then
utilities.set_message ('maint_extra_text', 'edition'); -- add maint cat
end
Edition = " " .. wrap_msg ('edition', Edition);
else
Edition = '';
end
Series = utilities.is_set (Series) and wrap_msg ('series', {sepc, Series}) or ""; -- not the same as SeriesNum
OrigDate = utilities.is_set (OrigDate) and wrap_msg ('origdate', OrigDate) or '';
Agency = utilities.is_set (Agency) and wrap_msg ('agency', {sepc, Agency}) or "";
Volume = format_volume_issue (Volume, Issue, config.CitationClass, Periodical_origin, sepc, use_lowercase);
------------------------------------ totally unrelated data
Via = utilities.is_set (Via) and wrap_msg ('via', Via) or '';
if utilities.is_set (AccessDate) then
local retrv_text = " " .. cfg.messages['retrieved']
AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format
if (sepc ~= ".") then retrv_text = retrv_text:lower() end -- if mode is cs2, lower case
AccessDate = utilities.substitute (retrv_text, AccessDate); -- add retrieved text
AccessDate = utilities.substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates
end
if utilities.is_set (ID) then ID = sepc .. " " .. ID; end
if "thesis" == config.CitationClass and utilities.is_set (Docket) then
ID = sepc .. " Docket " .. Docket .. ID;
end
if "report" == config.CitationClass and utilities.is_set (Docket) then -- for cite report when |docket= is set
ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set
end
if utilities.is_set (URL) then
URL = " " .. external_link( URL, nil, URL_origin, UrlAccess );
end
if utilities.is_set (Quote) or utilities.is_set (TransQuote) or utilities.is_set (ScriptQuote) then
if utilities.is_set (Quote) then
if Quote:sub(1, 1) == '"' and Quote:sub(-1, -1) == '"' then -- if first and last characters of quote are quote marks
Quote = Quote:sub(2, -2); -- strip them off
end
end
Quote = utilities.wrap_style ('quoted-text', Quote ); -- wrap in &lt;q&gt;...&lt;/q&gt; tags
if utilities.is_set (ScriptQuote) then
Quote = script_concatenate (Quote, ScriptQuote, 'script-quote'); -- &lt;bdi&gt; tags, lang attribute, categorization, etc.; must be done after quote is wrapped
end
if utilities.is_set (TransQuote) then
if TransQuote:sub(1, 1) == '"' and TransQuote:sub(-1, -1) == '"' then -- if first and last characters of |trans-quote are quote marks
TransQuote = TransQuote:sub(2, -2); -- strip them off
end
Quote = Quote .. " " .. utilities.wrap_style ('trans-quoted-title', TransQuote );
end
if utilities.is_set (QuotePage) or utilities.is_set (QuotePages) then -- add page prefix
local quote_prefix = '';
if utilities.is_set (QuotePage) then
if not NoPP then
quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, QuotePage}), '', '', '';
else
quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, QuotePage}), '', '', '';
end
elseif utilities.is_set (QuotePages) then
if tonumber(QuotePages) ~= nil and not NoPP then -- if only digits, assume single page
quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, QuotePages}), '', '';
elseif not NoPP then
quote_prefix = utilities.substitute (cfg.messages['pp-prefix'], {sepc, QuotePages}), '', '';
else
quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, QuotePages}), '', '';
end
end
Quote = quote_prefix .. ": " .. Quote;
else
Quote = sepc .. " " .. Quote;
end
PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set
end
local Archived
if utilities.is_set (ArchiveURL) then
local arch_text;
if not utilities.is_set (ArchiveDate) then
ArchiveDate = utilities.set_message ('err_archive_missing_date');
end
if "live" == UrlStatus then
arch_text = cfg.messages['archived'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. utilities.substitute ( cfg.messages['archived-live'],
{ external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL'), nil ) .. ArchiveFormat, ArchiveDate } );
if not utilities.is_set (OriginalURL) then
Archived = Archived .. " " .. utilities.set_message ('err_archive_missing_url');
end
elseif utilities.is_set (OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown'
if utilities.in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then
arch_text = cfg.messages['archived-unfit'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. arch_text .. ArchiveDate; -- format already styled
if 'bot: unknown' == UrlStatus then
utilities.set_message ('maint_bot_unknown'); -- and add a category if not already added
else
utilities.set_message ('maint_unfit'); -- and add a category if not already added
end
else -- UrlStatus is empty, 'dead'
arch_text = cfg.messages['archived-dead'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. utilities.substitute ( arch_text,
{ external_link( OriginalURL, cfg.messages['original'], OriginalURL_origin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); -- format already styled
end
else -- OriginalUrl not set
arch_text = cfg.messages['archived-missing'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. utilities.substitute ( arch_text,
{ utilities.set_message ('err_archive_missing_url'), ArchiveDate } );
end
elseif utilities.is_set (ArchiveFormat) then
Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message
else
Archived = ""
end
local Lay = '';
if utilities.is_set (LayURL) then
if utilities.is_set (LayDate) then LayDate = " (" .. LayDate .. ")" end
if utilities.is_set (LaySource) then
LaySource = " &amp;ndash; ''" .. utilities.safe_for_italics (LaySource) .. "''";
else
LaySource = "";
end
if sepc == '.' then
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary'], A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate
else
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary']:lower(), A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate
end
elseif utilities.is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url=
Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message
end
if utilities.is_set (Transcript) then
if utilities.is_set (TranscriptURL) then
Transcript = external_link( TranscriptURL, Transcript, TranscriptURL_origin, nil );
end
Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat;
elseif utilities.is_set (TranscriptURL) then
Transcript = external_link( TranscriptURL, nil, TranscriptURL_origin, nil );
end
local Publisher;
if utilities.is_set (PublicationDate) then
PublicationDate = wrap_msg ('published', PublicationDate);
end
if utilities.is_set (PublisherName) then
if utilities.is_set (PublicationPlace) then
Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate;
else
Publisher = sepc .. " " .. PublisherName .. PublicationDate;
end
elseif utilities.is_set (PublicationPlace) then
Publisher= sepc .. " " .. PublicationPlace .. PublicationDate;
else
Publisher = PublicationDate;
end
-- Several of the above rely upon detecting this as nil, so do it last.
if (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical)) then
if utilities.is_set (Title) or utilities.is_set (TitleNote) then
Periodical = sepc .. " " .. format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin);
else
Periodical = format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin);
end
end
--[[
Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that
the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided).
]]
if "speech" == config.CitationClass then -- cite speech only
TitleNote = " (Speech)"; -- annotate the citation
if utilities.is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter
if utilities.is_set (Conference) then -- and if |event= is set
Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering
end
end
end
-- Piece all bits together at last. Here, all should be non-nil.
-- We build things this way because it is more efficient in LUA
-- not to keep reassigning to the same string variable over and over.
local tcommon;
local tcommon2; -- used for book cite when |contributor= is set
if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then
if utilities.is_set (Others) then Others = safe_join ({Others, sepc .. " "}, sepc) end -- add terminal punctuation &amp; space; check for dup sepc; TODO why do we need to do this here?
tcommon = safe_join( {Others, Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency, Volume}, sepc );
elseif utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (Periodical) then -- special cases for book cites
if utilities.is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc.
tcommon = safe_join( {Title, TitleNote}, sepc ); -- author and other stuff will come after this and before tcommon2
tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc );
else
tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc );
end
elseif 'map' == config.CitationClass then -- special cases for cite map
if utilities.is_set (Chapter) then -- map in a book; TitleType is part of Chapter
tcommon = safe_join( {Title, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc );
elseif utilities.is_set (Periodical) then -- map in a periodical
tcommon = safe_join( {Title, TitleType, Format, Periodical, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc );
else -- a sheet or stand-alone map
tcommon = safe_join( {Title, TitleType, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher}, sepc );
end
elseif 'episode' == config.CitationClass then -- special case for cite episode
tcommon = safe_join( {Title, TitleNote, TitleType, Series, Language, Edition, Publisher}, sepc );
else -- all other CS1 templates
tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language,
Volume, Others, Edition, Publisher, Agency}, sepc );
end
if #ID_list &gt; 0 then
ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc );
else
ID_list = ID;
end
local idcommon;
if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media &amp; cite episode position transcript
idcommon = safe_join( { ID_list, URL, Archived, Transcript, AccessDate, Via, Lay, Quote }, sepc );
else
idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, Lay, Quote }, sepc );
end
local text;
local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At;
if utilities.is_set (Date) then
if utilities.is_set (Authors) or utilities.is_set (Editors) then -- date follows authors or editors when authors not set
Date = " (" .. Date .. ")" .. OrigDate .. sepc .. " "; -- in parentheses
else -- neither of authors and editors set
if (string.sub(tcommon, -1, -1) == sepc) then -- if the last character of tcommon is sepc
Date = " " .. Date .. OrigDate; -- Date does not begin with sepc
else
Date = sepc .. " " .. Date .. OrigDate; -- Date begins with sepc
end
end
end
if utilities.is_set (Authors) then
if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Authors termination
Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space
end
if utilities.is_set (Editors) then
local in_text = " ";
local post_text = "";
if utilities.is_set (Chapter) and 0 == #c then
in_text = in_text .. cfg.messages['in'] .. " "
if (sepc ~= '.') then
in_text = in_text:lower() -- lowercase for cs2
end
end
if EditorCount &lt;= 1 then
post_text = " (" .. cfg.messages['editor'] .. ")"; -- be consistent with no-author, no-date case
else
post_text = " (" .. cfg.messages['editors'] .. ")";
end
Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space
end
if utilities.is_set (Contributors) then -- book cite and we're citing the intro, preface, etc.
local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' ';
if (sepc ~= '.') then by_text = by_text:lower() end -- lowercase for cs2
Authors = by_text .. Authors; -- author follows title so tweak it here
if utilities.is_set (Editors) and utilities.is_set (Date) then -- when Editors make sure that Authors gets terminated
Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space
end
if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Contributors termination
Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space
end
text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc );
else
text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc );
end
elseif utilities.is_set (Editors) then
if utilities.is_set (Date) then
if EditorCount &lt;= 1 then
Editors = Editors .. ", " .. cfg.messages['editor'];
else
Editors = Editors .. ", " .. cfg.messages['editors'];
end
else
if EditorCount &lt;= 1 then
Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " "
else
Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " "
end
end
text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc );
else
if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then
text = safe_join( {Chapter, Place, tcommon, pgtext, Date, idcommon}, sepc );
else
text = safe_join( {Chapter, Place, tcommon, Date, pgtext, idcommon}, sepc );
end
end
if utilities.is_set (PostScript) and PostScript ~= sepc then
text = safe_join( {text, sepc}, sepc ); --Deals with italics, spaces, etc.
text = text:sub(1, -sepc:len() - 1);
end
text = safe_join( {text, PostScript}, sepc );
-- Now enclose the whole thing in a &lt;cite/&gt; element
local options = {};
if utilities.is_set (config.CitationClass) and config.CitationClass ~= "citation" then
options.class = string.format ('%s %s %s', 'citation', config.CitationClass, utilities.is_set (Mode) and Mode or 'cs1'); -- class=citation required for blue highlight when used with |ref=
else
options.class = string.format ('%s %s', 'citation', utilities.is_set (Mode) and Mode or 'cs2');
end
if utilities.is_set (Ref) and 'none' ~= cfg.keywords_xlate[Ref:lower()] then
local id = Ref
if ('harv' == Ref ) then
local namelist = {}; -- holds selected contributor, author, editor name list
local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation
if #c &gt; 0 then -- if there is a contributor list
namelist = c; -- select it
elseif #a &gt; 0 then -- or an author list
namelist = a;
elseif #e &gt; 0 then -- or an editor list
namelist = e;
end
if #namelist &gt; 0 then -- if there are names in namelist
id = anchor_id (namelist, year); -- go make the CITEREF anchor
else
id = ''; -- unset
end
end
options.id = id;
end
if string.len(text:gsub("&lt;span[^&gt;/]*&gt;(.-)&lt;/span&gt;", "%1"):gsub("%b&lt;&gt;", "")) &lt;= 2 then -- remove &lt;span&gt; tags and other HTML-like markup; then get length of what remains
z.error_categories = {};
text = utilities.set_message ('err_empty_citation');
z.message_tail = {};
end
local render = {}; -- here we collect the final bits for concatenation into the rendered citation
if utilities.is_set (options.id) then -- here we wrap the rendered citation in &lt;cite ...&gt;...&lt;/cite&gt; tags
table.insert (render, utilities.substitute (cfg.presentation['cite-id'], {mw.uri.anchorEncode(options.id), mw.text.nowiki(options.class), text})); -- when |ref= is set
else
table.insert (render, utilities.substitute (cfg.presentation['cite'], {mw.text.nowiki(options.class), text})); -- all other cases
end
table.insert (render, utilities.substitute (cfg.presentation['ocins'], {OCinSoutput})); -- append metadata to the citation
if 0 ~= #z.message_tail then
table.insert (render, ' ');
for i,v in ipairs( z.message_tail ) do
if utilities.is_set (v[1]) then
if i == #z.message_tail then
table.insert (render, utilities.error_comment ( v[1], v[2] ));
else
table.insert (render, utilities.error_comment ( v[1] .. "; ", v[2] ));
end
end
end
end
if 0 ~= #z.maintenance_cats then
local maint_msgs = {}; -- here we collect all of the maint messages
for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories
local maint = {}; -- here we assemble a maintenence message
table.insert (maint, v); -- maint msg is the category name
table.insert (maint, ' ('); -- open the link text
table.insert (maint, utilities.make_wikilink (':Category:' .. v, 'link')); -- add the link
table.insert (maint, ')'); -- and close it
table.insert (maint_msgs, table.concat (maint)); -- assemble new maint message and add it to the maint_msgs table
end
table.insert (render, utilities.substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs, ' '))); -- wrap the group of maint message with proper presentation and save
end
if not no_tracking_cats then
for _, v in ipairs( z.error_categories ) do
table.insert (render, utilities.make_wikilink ('Category:' .. v));
end
for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories
table.insert (render, utilities.make_wikilink ('Category:' .. v));
end
for _, v in ipairs( z.properties_cats ) do -- append properties categories
table.insert (render, utilities.make_wikilink ('Category:' .. v));
end
elseif 'nocat' == A:ORIGIN('NoTracking') then -- peculiar special case; can't track nocat without tracking nocat
table.insert (render, utilities.make_wikilink ('Category:CS1 maint: nocat')); -- hand-set this category because it is supposed to be temporary
end
return table.concat (render);
end
--[[--------------------------&lt; V A L I D A T E &gt;--------------------------------------------------------------
Looks for a parameter's name in one of several whitelists.
Parameters in the whitelist can have three values:
true - active, supported parameters
false - deprecated, supported parameters
nil - unsupported parameters
]]
local function validate (name, cite_class, empty)
local name = tostring (name);
local enum_name; -- for enumerated parameters, is name with enumerator replaced with '#'
local state;
local function state_test (state, name) -- local function to do testing of state values
if true == state then return true; end -- valid actively supported parameter
if false == state then
if empty then return nil; end -- deprecated empty parameters are treated as unknowns
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
return nil;
end
if name:find ('#') then -- # is a cs1|2 reserved character so parameters with # not permitted
return nil;
end
if utilities.in_array (cite_class, whitelist.preprint_template_list ) then -- limited parameter sets allowed for these templates
state = whitelist.limited_basic_arguments[name];
if true == state_test (state, name) then return true; end
state = whitelist.preprint_arguments[cite_class][name]; -- look in the parameter-list for the template identified by cite_class
if true == state_test (state, name) then return true; end
-- limited enumerated parameters list
enum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.limited_numbered_arguments[enum_name];
if true == state_test (state, name) then return true; end
return false; -- not supported because not found or name is set to nil
end -- end limited parameter-set templates
if utilities.in_array (cite_class, whitelist.unique_param_template_list) then -- experiment for template-specific parameters for templates that accept parameters from the basic argument list
state = whitelist.unique_arguments[cite_class][name]; -- look in the template-specific parameter-lists for the template identified by cite_class
if true == state_test (state, name) then return true; end
end -- if here, fall into general validation
state = whitelist.basic_arguments[name]; -- all other templates; all normal parameters allowed
if true == state_test (state, name) then return true; end
-- all enumerated parameters allowed
enum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.numbered_arguments[enum_name];
if true == state_test (state, name) then return true; end
return false; -- not supported because not found or name is set to nil
end
--[=[-------------------------&lt; I N T E R _ W I K I _ C H E C K &gt;----------------------------------------------
check &lt;value&gt; for inter-language interwiki-link markup. &lt;prefix&gt; must be a MediaWiki-recognized language
code. when these values have the form (without leading colon):
[[&lt;prefix&gt;:link|label]] return label as plain-text
[[&lt;prefix&gt;:link]] return &lt;prefix&gt;:link as plain-text
return value as is else
]=]
local function inter_wiki_check (parameter, value)
local prefix = value:match ('%[%[(%a+):'); -- get an interwiki prefix if one exists
local _;
if prefix and cfg.inter_wiki_map[prefix:lower()] then -- if prefix is in the map, needs preceding colon so
table.insert( z.message_tail, {utilities.set_message ('err_bad_paramlink', parameter)}); -- emit an error message
_, value, _ = utilities.is_wikilink (value); -- extract label portion from wikilink
end
return value;
end
--[[--------------------------&lt; M I S S I N G _ P I P E _ C H E C K &gt;------------------------------------------
Look at the contents of a parameter. If the content has a string of characters and digits followed by an equal
sign, compare the alphanumeric string to the list of cs1|2 parameters. If found, then the string is possibly a
parameter that is missing its pipe. There are two tests made:
{{cite ... |title=Title access-date=2016-03-17}} -- the first parameter has a value and whitespace separates that value from the missing pipe parameter name
{{cite ... |title=access-date=2016-03-17}} -- the first parameter has no value (whitespace after the first = is trimmed by MediaWiki)
cs1|2 shares some parameter names with XML/HTML attributes: class=, title=, etc. To prevent false positives XML/HTML
tags are removed before the search.
If a missing pipe is detected, this function adds the missing pipe maintenance category.
]]
local function missing_pipe_check (parameter, value)
local capture;
value = value:gsub ('%b&lt;&gt;', ''); -- remove XML/HTML tags because attributes: class=, title=, etc.
capture = value:match ('%s+(%a[%w%-]+)%s*=') or value:match ('^(%a[%w%-]+)%s*='); -- find and categorize parameters with possible missing pipes
if capture and validate (capture) then -- if the capture is a valid parameter name
table.insert( z.message_tail, {utilities.set_message ('err_missing_pipe', parameter)});
end
end
--[[--------------------------&lt; H A S _ E X T R A N E O U S _ P U N C T &gt;--------------------------------------
look for extraneous terminal punctuation in most parameter values; parameters listed in skip table are not checked
]]
local function has_extraneous_punc (param, value)
if 'number' == type (param) then
return;
end
param = param:gsub ('%d+', '#'); -- enumerated name-list mask params allow terminal punct; normalize
if cfg.punct_skip[param] then
return; -- parameter name found in the skip table so done
end
if value:match ('[,;:]$') then
utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat
end
end
--[[--------------------------&lt; C I T A T I O N &gt;--------------------------------------------------------------
This is used by templates such as {{cite book}} to create the actual citation text.
]]
local function citation(frame)
Frame = frame; -- save a copy in case we need to display an error message in preview mode
local pframe = frame:getParent()
local styles;
if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version?
cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); -- load sandbox versions of support modules
whitelist = mw.loadData ('Module:Citation/CS1/Whitelist/sandbox');
utilities = require ('Module:Citation/CS1/Utilities/sandbox');
validation = require ('Module:Citation/CS1/Date_validation/sandbox');
identifiers = require ('Module:Citation/CS1/Identifiers/sandbox');
metadata = require ('Module:Citation/CS1/COinS/sandbox');
styles = 'Module:Citation/CS1/sandbox/styles.css';
else -- otherwise
cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load live versions of support modules
whitelist = mw.loadData ('Module:Citation/CS1/Whitelist');
utilities = require ('Module:Citation/CS1/Utilities');
validation = require ('Module:Citation/CS1/Date_validation');
identifiers = require ('Module:Citation/CS1/Identifiers');
metadata = require ('Module:Citation/CS1/COinS');
styles = 'Module:Citation/CS1/styles.css';
end
utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the selected cfg tables
identifiers.set_selected_modules (cfg, utilities); -- so that functions in Identifiers can see the selected cfg tables and selected Utilities module
validation.set_selected_modules (cfg, utilities); -- so that functions in Date validataion can see selected cfg tables and the selected Utilities module
metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module
z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities
local args = {}; -- table where we store all of the template's arguments
local suggestions = {}; -- table where we store suggestions if we need to loadData them
local error_text, error_state;
local config = {}; -- table to store parameters from the module {{#invoke:}}
for k, v in pairs( frame.args ) do -- get parameters from the {{#invoke}} frame
config[k] = v;
-- args[k] = v; -- crude debug support that allows us to render a citation from module {{#invoke:}}; skips parameter validation; TODO: keep?
end
local capture; -- the single supported capture when matching unknown parameters using patterns
local empty_unknowns = {}; -- sequence table to hold empty unknown params for error message listing
for k, v in pairs( pframe.args ) do -- get parameters from the parent (template) frame
v = mw.ustring.gsub (v, '^%s*(.-)%s*$', '%1'); -- trim leading/trailing whitespace; when v is only whitespace, becomes empty string
if v ~= '' then
if ('string' == type (k)) then
k = mw.ustring.gsub (k, '%d', cfg.date_names.local_digits); -- for enumerated parameters, translate 'local' digits to Western 0-9
end
if not validate( k, config.CitationClass ) then
error_text = "";
if type( k ) ~= 'string' then
-- exclude empty numbered parameters
if v:match("%S+") ~= nil then
error_text, error_state = utilities.set_message ( 'err_text_ignored', {v}, true );
end
elseif validate( k:lower(), config.CitationClass ) then
error_text, error_state = utilities.set_message ( 'err_parameter_ignored_suggest', {k, k:lower()}, true ); -- suggest the lowercase version of the parameter
else
if nil == suggestions.suggestions then -- if this table is nil then we need to load it
if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version?
suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions/sandbox' ); -- use the sandbox version
else
suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions' ); -- use the live version
end
end
for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter
capture = k:match (pattern); -- the whole match if no capture in pattern else the capture if a match
if capture then -- if the pattern matches
param = utilities.substitute (param, capture); -- add the capture to the suggested parameter (typically the enumerator)
if validate (param, config.CitationClass) then -- validate the suggestion to make sure that the suggestion is supported by this template (necessary for limited parameter lists)
error_text, error_state = utilities.set_message ('err_parameter_ignored_suggest', {k, param}, true); -- set the suggestion error message
else
error_text, error_state = utilities.set_message ( 'err_parameter_ignored', {param}, true ); -- suggested param not supported by this template
v = ''; -- unset
end
end
end
if not utilities.is_set (error_text) then -- couldn't match with a pattern, is there an expicit suggestion?
if suggestions.suggestions[ k:lower() ] ~= nil then
error_text, error_state = utilities.set_message ( 'err_parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}, true );
else
error_text, error_state = utilities.set_message ( 'err_parameter_ignored', {k}, true );
v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists)
end
end
end
if error_text ~= '' then
table.insert( z.message_tail, {error_text, error_state} );
end
end
args[k] = v; -- save this parameter and its value
elseif not utilities.is_set (v) then -- for empty parameters
if not validate (k, config.CitationClass, true) then -- is this empty parameter a valid parameter
k = ('' == k) and '(empty string)' or k; -- when k is empty string (or was space(s) trimmed to empty string), replace with descriptive text
table.insert (empty_unknowns, utilities.wrap_style ('parameter', k)); -- format for error message and add to the list
end
-- crude debug support that allows us to render a citation from module {{#invoke:}} TODO: keep?
-- elseif args[k] ~= nil or (k == 'postscript') then -- when args[k] has a value from {{#invoke}} frame (we don't normally do that)
-- args[k] = v; -- overwrite args[k] with empty string from pframe.args[k] (template frame); v is empty string here
end -- not sure about the postscript bit; that gets handled in parameter validation; historical artifact?
end
if 0 ~= #empty_unknowns then -- create empty unknown error message
table.insert (z.message_tail, {utilities.set_message ('err_param_unknown_empty', {
1 == #empty_unknowns and '' or 's',
utilities.make_sep_list (#empty_unknowns, empty_unknowns)
}, true )});
end
for k, v in pairs( args ) do
if 'string' == type (k) then -- don't evaluate positional parameters
has_invisible_chars (k, v); -- look for invisible characters
end
has_extraneous_punc (k, v); -- look for extraneous terminal punctuation in parameter values
missing_pipe_check (k, v); -- do we think that there is a parameter that is missing a pipe?
args[k] = inter_wiki_check (k, v); -- when language interwiki-linked parameter missing leading colon replace with wiki-link label
end
return table.concat ({citation0( config, args), frame:extensionTag ('templatestyles', '', {src=styles})});
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {citation = citation};</text>
<sha1>m4thujyhbbwao63118b0ar80pgg4dwy</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/COinS</title>
<ns>828</ns>
<id>48828620</id>
<revision>
<id>913814839</id>
<parentid>893307448</parentid>
<timestamp>2019-09-03T11:05:48Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="15310" xml:space="preserve">
--[[--------------------------&lt; F O R W A R D D E C L A R A T I O N S &gt;--------------------------------------
]]
local is_set, in_array, remove_wiki_link, strip_apostrophe_markup; -- functions in Module:Citation/CS1/Utilities
local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
--[[--------------------------&lt; M A K E _ C O I N S _ T I T L E &gt;----------------------------------------------
Makes a title for COinS from Title and / or ScriptTitle (or any other name-script pairs)
Apostrophe markup (bold, italics) is stripped from each value so that the COinS metadata isn't corrupted with strings
of %27%27...
]]
local function make_coins_title (title, script)
if is_set (title) then
title = strip_apostrophe_markup (title); -- strip any apostrophe markup
else
title=''; -- if not set, make sure title is an empty string
end
if is_set (script) then
script = script:gsub ('^%l%l%s*:%s*', ''); -- remove language prefix if present (script value may now be empty string)
script = strip_apostrophe_markup (script); -- strip any apostrophe markup
else
script=''; -- if not set, make sure script is an empty string
end
if is_set (title) and is_set (script) then
script = ' ' .. script; -- add a space before we concatenate
end
return title .. script; -- return the concatenation
end
--[[--------------------------&lt; E S C A P E _ L U A _ M A G I C _ C H A R S &gt;----------------------------------
Returns a string where all of lua's magic characters have been escaped. This is important because functions like
string.gsub() treat their pattern and replace strings as patterns, not literal strings.
]]
local function escape_lua_magic_chars (argument)
argument = argument:gsub("%%", "%%%%"); -- replace % with %%
argument = argument:gsub("([%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"); -- replace all other lua magic pattern characters
return argument;
end
--[[--------------------------&lt; G E T _ C O I N S _ P A G E S &gt;------------------------------------------------
Extract page numbers from external wikilinks in any of the |page=, |pages=, or |at= parameters for use in COinS.
]]
local function get_coins_pages (pages)
local pattern;
if not is_set (pages) then return pages; end -- if no page numbers then we're done
while true do
pattern = pages:match("%[(%w*:?//[^ ]+%s+)[%w%d].*%]"); -- pattern is the opening bracket, the url and following space(s): "[url "
if nil == pattern then break; end -- no more urls
pattern = escape_lua_magic_chars (pattern); -- pattern is not a literal string; escape lua's magic pattern characters
pages = pages:gsub(pattern, ""); -- remove as many instances of pattern as possible
end
pages = pages:gsub("[%[%]]", ""); -- remove the brackets
pages = pages:gsub("–", "-" ); -- replace endashes with hyphens
pages = pages:gsub("&amp;%w+;", "-" ); -- and replace html entities (&amp;ndash; etc.) with hyphens; do we need to replace numerical entities like &amp;#32; and the like?
return pages;
end
--[=[-------------------------&lt; C O I N S _ R E P L A C E _ M A T H _ S T R I P M A R K E R &gt;------------------
There are three options for math markup rendering that depend on the editor's math preference settings. These
settings are at [[Special:Preferences#mw-prefsection-rendering]] and are
PNG images
TeX source
MathML with SVG or PNG fallback
All three are heavy with html and css which doesn't belong in the metadata.
Without this function, the metadata saved in the raw wikitext contained the rendering determined by the settings
of the last editor to save the page.
This function gets the rendered form of an equation according to the editor's preference before the page is saved. It
then searches the rendering for the text equivalent of the rendered equation and replaces the rendering with that so
that the page is saved without extraneous html/css markup and with a reasonably readable text form of the equation.
When a replacement is made, this function returns true and the value with replacement; otherwise false and the intital
value. To replace multipe equations it is necesary to call this function from within a loop.
]=]
local function coins_replace_math_stripmarker (value)
local stripmarker = cfg.stripmarkers['math'];
local rendering = value:match (stripmarker); -- is there a math stripmarker
if not rendering then -- when value doesn't have a math stripmarker, abandon this test
return false, value;
end
rendering = mw.text.unstripNoWiki (rendering); -- convert stripmarker into rendered value (or nil? ''? when math render error)
if rendering:match ('alt="[^"]+"') then -- if PNG math option
rendering = rendering:match ('alt="([^"]+)"'); -- extract just the math text
elseif rendering:match ('$%s+.+%s+%$') then -- if TeX math option; $ is legit character that is escapes as \$
rendering = rendering:match ('$%s+(.+)%s+%$') -- extract just the math text
elseif rendering:match ('&lt;annotation[^&gt;]+&gt;.+&lt;/annotation&gt;') then -- if MathML math option
rendering = rendering:match ('&lt;annotation[^&gt;]+&gt;(.+)&lt;/annotation&gt;') -- extract just the math text
else
return false, value; -- had math stripmarker but not one of the three defined forms
end
return true, value:gsub (stripmarker, rendering, 1);
end
--[[--------------------------&lt; C O I N S _ C L E A N U P &gt;----------------------------------------------------
Cleanup parameter values for the metadata by removing or replacing invisible characters and certain html entities.
2015-12-10: there is a bug in mw.text.unstripNoWiki (). It replaces math stripmarkers with the appropriate content
when it shouldn't. See https://phabricator.wikimedia.org/T121085 and Wikipedia_talk:Lua#stripmarkers_and_mw.text.unstripNoWiki.28.29
TODO: move the replacement patterns and replacement values into a table in /Configuration similar to the invisible
characters table?
]]
local function coins_cleanup (value)
local replaced = true; -- default state to get the do loop running
while replaced do -- loop until all math stripmarkers replaced
replaced, value = coins_replace_math_stripmarker (value); -- replace math stripmarker with text representation of the equation
end
value = value:gsub (cfg.stripmarkers['math'], "MATH RENDER ERROR"); -- one or more couldn't be replaced; insert vague error message
value = mw.text.unstripNoWiki (value); -- replace nowiki stripmarkers with their content
value = value:gsub ('&lt;span class="nowrap" style="padding%-left:0%.1em;"&gt;&amp;#39;(s?)&lt;/span&gt;', "'%1"); -- replace {{'}} or {{'s}} with simple apostrophe or apostrophe-s
value = value:gsub ('&amp;nbsp;', ' '); -- replace &amp;nbsp; entity with plain space
value = value:gsub ('\226\128\138', ' '); -- replace hair space with plain space
if not mw.ustring.find (value, cfg.indic_script) then -- don't remove zero width joiner characters from indic script
value = value:gsub ('&amp;zwj;', ''); -- remove &amp;zwj; entities
value = mw.ustring.gsub (value, '[\226\128\141\226\128\139\194\173]', ''); -- remove zero-width joiner, zero-width space, soft hyphen
end
value = value:gsub ('[\009\010\013]', ' '); -- replace horizontal tab, line feed, carriage return with plain space
return value;
end
--[[--------------------------&lt; C O I N S &gt;--------------------------------------------------------------------
COinS metadata (see &lt;http://ocoins.info/&gt;) allows automated tools to parse the citation information.
]]
local function COinS(data, class)
if 'table' ~= type(data) or nil == next(data) then
return '';
end
for k, v in pairs (data) do -- spin through all of the metadata parameter values
if 'ID_list' ~= k and 'Authors' ~= k then -- except the ID_list and Author tables (author nowiki stripmarker done when Author table processed)
data[k] = coins_cleanup (v);
end
end
local ctx_ver = "Z39.88-2004";
-- treat table strictly as an array with only set values.
local OCinSoutput = setmetatable( {}, {
__newindex = function(self, key, value)
if is_set(value) then
rawset( self, #self+1, table.concat{ key, '=', mw.uri.encode( remove_wiki_link( value ) ) } );
end
end
});
if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn', 'journal', 'news', 'magazine'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or
('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier
if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then -- set genre according to the type of citation template we are rendering
OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv, cite biorxiv, cite citeseerx, cite ssrn
elseif 'conference' == class then
OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set)
elseif 'web' == class then
OCinSoutput["rft.genre"] = "unknown"; -- cite web (when Periodical set)
else
OCinSoutput["rft.genre"] = "article"; -- journal and other 'periodical' articles
end
OCinSoutput["rft.jtitle"] = data.Periodical; -- journal only
OCinSoutput["rft.atitle"] = data.Title; -- 'periodical' article titles
-- these used only for periodicals
OCinSoutput["rft.ssn"] = data.Season; -- keywords: winter, spring, summer, fall
OCinSoutput["rft.chron"] = data.Chron; -- free-form date components
OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books
OCinSoutput["rft.issue"] = data.Issue;
OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata
elseif 'thesis' ~= class then -- all others except cite thesis are treated as 'book' metadata; genre distinguishes
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:book"; -- book metadata identifier
if 'report' == class or 'techreport' == class then -- cite report and cite techreport
OCinSoutput["rft.genre"] = "report";
elseif 'conference' == class then -- cite conference when Periodical not set
OCinSoutput["rft.genre"] = "conference";
OCinSoutput["rft.atitle"] = data.Chapter; -- conference paper as chapter in proceedings (book)
elseif in_array (class, {'book', 'citation', 'encyclopaedia', 'interview', 'map'}) then
if is_set (data.Chapter) then
OCinSoutput["rft.genre"] = "bookitem";
OCinSoutput["rft.atitle"] = data.Chapter; -- book chapter, encyclopedia article, interview in a book, or map title
else
if 'map' == class or 'interview' == class then
OCinSoutput["rft.genre"] = 'unknown'; -- standalone map or interview
else
OCinSoutput["rft.genre"] = 'book'; -- book and encyclopedia
end
end
else --{'audio-visual', 'AV-media-notes', 'DVD-notes', 'episode', 'interview', 'mailinglist', 'map', 'newsgroup', 'podcast', 'press release', 'serial', 'sign', 'speech', 'web'}
OCinSoutput["rft.genre"] = "unknown";
end
OCinSoutput["rft.btitle"] = data.Title; -- book only
OCinSoutput["rft.place"] = data.PublicationPlace; -- book only
OCinSoutput["rft.series"] = data.Series; -- book only
OCinSoutput["rft.pages"] = data.Pages; -- book, journal
OCinSoutput["rft.edition"] = data.Edition; -- book only
OCinSoutput["rft.pub"] = data.PublisherName; -- book and dissertation
else -- cite thesis
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:dissertation"; -- dissertation metadata identifier
OCinSoutput["rft.title"] = data.Title; -- dissertation (also patent but that is not yet supported)
OCinSoutput["rft.degree"] = data.Degree; -- dissertation only
OCinSoutput['rft.inst'] = data.PublisherName; -- book and dissertation
end
-- and now common parameters (as much as possible)
OCinSoutput["rft.date"] = data.Date; -- book, journal, dissertation
for k, v in pairs( data.ID_list ) do -- what to do about these? For now assume that they are common to all?
if k == 'ISBN' then v = v:gsub( "[^-0-9X]", "" ); end
local id = cfg.id_handlers[k].COinS;
if string.sub( id or "", 1, 4 ) == 'info' then -- for ids that are in the info:registry
OCinSoutput["rft_id"] = table.concat{ id, "/", v };
elseif string.sub (id or "", 1, 3 ) == 'rft' then -- for isbn, issn, eissn, etc that have defined COinS keywords
OCinSoutput[ id ] = v;
elseif id then -- when cfg.id_handlers[k].COinS is not nil
OCinSoutput["rft_id"] = table.concat{ cfg.id_handlers[k].prefix, v }; -- others; provide a url
end
end
local last, first;
for k, v in ipairs( data.Authors ) do
last, first = coins_cleanup (v.last), coins_cleanup (v.first or ''); -- replace any nowiki strip markers, non-printing or invisible characers
if k == 1 then -- for the first author name only
if is_set(last) and is_set(first) then -- set these COinS values if |first= and |last= specify the first author name
OCinSoutput["rft.aulast"] = last; -- book, journal, dissertation
OCinSoutput["rft.aufirst"] = first; -- book, journal, dissertation
elseif is_set(last) then
OCinSoutput["rft.au"] = last; -- book, journal, dissertation -- otherwise use this form for the first name
end
else -- for all other authors
if is_set(last) and is_set(first) then
OCinSoutput["rft.au"] = table.concat{ last, ", ", first }; -- book, journal, dissertation
elseif is_set(last) then
OCinSoutput["rft.au"] = last; -- book, journal, dissertation
end
end
end
OCinSoutput.rft_id = data.URL;
OCinSoutput.rfr_id = table.concat{ "info:sid/", mw.site.server:match( "[^/]*$" ), ":", data.RawPage };
OCinSoutput = setmetatable( OCinSoutput, nil );
-- sort with version string always first, and combine.
--table.sort( OCinSoutput );
table.insert( OCinSoutput, 1, "ctx_ver=" .. ctx_ver ); -- such as "Z39.88-2004"
return table.concat(OCinSoutput, "&amp;");
end
--[[--------------------------&lt; S E T _ S E L E C T E D _ M O D U L E S &gt;--------------------------------------
Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
cfg = cfg_table_ptr;
is_set = utilities_page_ptr.is_set; -- import functions from selected Module:Citation/CS1/Utilities module
in_array = utilities_page_ptr.in_array;
remove_wiki_link = utilities_page_ptr.remove_wiki_link;
strip_apostrophe_markup = utilities_page_ptr.strip_apostrophe_markup;
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
make_coins_title = make_coins_title,
get_coins_pages = get_coins_pages,
COinS = COinS,
set_selected_modules = set_selected_modules,
}</text>
<sha1>l8s94fpb0lbhviey5aqaamradc5q20u</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/Configuration</title>
<ns>828</ns>
<id>39043527</id>
<revision>
<id>986098789</id>
<parentid>982942478</parentid>
<timestamp>2020-10-29T19:49:50Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>bump pmid;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="82689" xml:space="preserve">
--[[--------------------------&lt; U N C A T E G O R I Z E D _ N A M E S P A C E S &gt;------------------------------
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.
]]
local uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', 'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft_talk', 'Education_Program_talk', 'Module_talk', 'MediaWiki_talk' };
local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'}; -- list of Lua patterns found in page names of pages we should not categorize
--[[--------------------------&lt; M E S S A G E S &gt;--------------------------------------------------------------
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-missing'] = 'Archived from the original$1 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 ed.)',
['episode'] = 'Episode $1',
['et al'] = 'et al.',
['in'] = 'In', -- edited works
['inactive'] = 'inactive',
['inset'] = '$1 inset',
['interview'] = 'Interviewed by $1',
['lay summary'] = 'Lay summary',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&amp;nbsp;$1',
-- ['nodate'] = 'n.d.', -- in the future for |date=none|n.d.|nd
['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'] = '§ $1',
['sections'] = '§§ $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.&amp;nbsp;$2', -- $1 is sepc; bold journal style volume is in presentation{}
['vol-no'] = '$1 Vol.&amp;nbsp;$2 no.&amp;nbsp;$3', -- sepc, volume, issue
['issue'] = '$1 No.&amp;nbsp;$2', -- $1 is sepc
['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{}
['j-issue'] = ' ($1)',
['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc
['p-prefix'] = "$1 p.&amp;nbsp;$2", -- $1 is sepc
['pp-prefix'] = "$1 pp.&amp;nbsp;$2", -- $1 is sepc
['j-page(s)'] = ': $1', -- same for page and pages
['sheet'] = '$1 Sheet&amp;nbsp;$2', -- $1 is sepc
['sheets'] = '$1 Sheets&amp;nbsp;$2', -- $1 is sepc
['j-sheet'] = ': Sheet&amp;nbsp;$1',
['j-sheets'] = ': Sheets&amp;nbsp;$1',
['language'] = '(in $1)',
['via'] = " &amp;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',
-- Internal errors (should only occur if configuration is bad)
['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',
['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty',
}
--[=[-------------------------&lt; E T _ A L _ P A T T E R N S &gt;--------------------------------------------------
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][Aa][%.\"']*$", -- variations on the 'et alia' theme
"[;,]? *%f[%a]and [Oo]thers", -- and alternate to et al.
"%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form
"[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form
}
--[[--------------------------&lt; E D I T O R _ M A R K U P _ P A T T E R N S &gt;----------------------------------
This table provides Lua patterns for the phrase "ed" and variants in name text
(author, editor, etc.). The main module uses these to identify and emit the
'extra_text_names' message. (It is not the only series of patterns for this message.)
]]
local editor_markup_patterns = { -- these patterns match annotations at end of name
'%f[%(%[][%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]?$', -- (ed) or (eds): leading '(', case insensitive 'ed', optional 's', '.' and/or ')'
'[,%.%s]%f[e]eds?%.?$', -- ed or eds: without '('or ')'; case sensitive (ED could be initials Ed could be name)
'%f[%(%[][%(%[]%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?%s*[%)%]]?$', -- (editor) or (editors): leading '(', case insensitive, optional '.' and/or ')'
'[,%.%s]%f[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors: without '('or ')'; case insensitive
-- these patterns match annotations at beginning of name
'^eds?[%.,;]', -- ed. or eds.: lower case only, optional 's', requires '.'
'^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', -- (ed) or (eds): also sqare brackets, case insensitive, optional 's', '.'
'^[%(%[]?%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%A', -- (editor or (editors: also square brackets, case insensitive, optional brackets, 's'
'^[%(%[]?%s*[Ee][Dd][Ii][Tt][Ee][Dd]%A', -- (edited: also square brackets, case insensitive, optional brackets
-- these patterns match annotations that are the 'name'
'^[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors; case insensitive
}
--[[--------------------------&lt; P R E S E N T A T I O N &gt;------------------------------------------------------
Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically
correct place.
]]
local 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'] = '&lt;span class="cs1-hidden-error error citation-comment"&gt;$1&lt;/span&gt;',
['visible-error'] = '&lt;span class="cs1-visible-error error citation-comment"&gt;$1&lt;/span&gt;',
['hidden-maint'] = '&lt;span class="cs1-maint citation-comment"&gt;$1&lt;/span&gt;',
['accessdate'] = '&lt;span class="reference-accessdate"&gt;$1$2&lt;/span&gt;', -- to allow editors to hide accessdate using personal CSS
['bdi'] = '&lt;bdi$1&gt;$2&lt;/bdi&gt;', -- bidirectional isolation used with |script-title= and the like
['cite'] = '&lt;cite class="$1"&gt;$2&lt;/cite&gt;'; -- |ref= not set so no id="..." attribute
['cite-id'] = '&lt;cite id="$1" class="$2"&gt;$3&lt;/cite&gt;'; -- for use when |ref= is set
['format'] = ' &lt;span class="cs1-format"&gt;($1)&lt;/span&gt;', -- for |format=, |chapter-format=, etc.
-- various access levels, for |access=, |doi-access=, |arxiv=, ...
-- narrow no-break space &amp;#8239; may work better than nowrap CSS. Or not? Browser support?
['ext-link-access-signal'] = '&lt;span class="$1" title="$2"&gt;$3&lt;/span&gt;', -- 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'] = '&lt;span class="$1" title="$2"&gt;$3&lt;/span&gt;',
['class-wikisource'] = 'cs1-ws-icon',
['italic-title'] = "''$1''",
['kern-left'] = '&lt;span class="cs1-kern-left"&gt;$1&lt;/span&gt;$2', -- spacing to use when title contains leading single or double quote mark
['kern-right'] = '$1&lt;span class="cs1-kern-right"&gt;$2&lt;/span&gt;', -- spacing to use when title contains trailing single or double quote mark
-- these for simple wikilinked titles [["text]], [[text"]] and [["text"]]
-- span wraps entire wikilink
['kern-wl-left'] = '&lt;span class="cs1-kern-wl-left"&gt;$1&lt;/span&gt;', -- when title contains leading single or double quote mark
['kern-wl-right'] = '&lt;span class="cs1-kern-wl-left"&gt;$1&lt;/span&gt;', -- when title contains trailing single or double quote mark
['kern-wl-both'] = '&lt;span class="cs1-kern-wl-left cs1-kern-wl-right"&gt;$1&lt;/span&gt;', -- when title contains leading and trailing single or double quote marks
['nowrap1'] = '&lt;span class="nowrap"&gt;$1&lt;/span&gt;', -- for nowrapping an item: &lt;span ...&gt;yyyy-mm-dd&lt;/span&gt;
['nowrap2'] = '&lt;span class="nowrap"&gt;$1&lt;/span&gt; $2', -- for nowrapping portions of an item: &lt;span ...&gt;dd mmmm&lt;/span&gt; yyyy (note white space)
['ocins'] = '&lt;span title="$1" class="Z3988"&gt;&lt;/span&gt;',
['parameter'] = '&lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;',
['ps_cs1'] = '.'; -- CS1 style postscript (terminal) character
['ps_cs2'] = ''; -- CS2 style postscript (terminal) character (empty string)
['quoted-text'] = '&lt;q&gt;$1&lt;/q&gt;', -- 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 &lt;comma&gt;&lt;space&gt;
['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'] = "&amp;#91;''$1''&amp;#93;",
['trans-quoted-title'] = "&amp;#91;$1&amp;#93;", -- for |trans-title= and |trans-quote=
['vol-bold'] = '$1 &lt;b&gt;$2&lt;/b&gt;', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}
}
--[[--------------------------&lt; A L I A S E S &gt;----------------------------------------------------------------
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',
['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'},
['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', 'contributionurl', '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', 'event-url', 'conferenceurl', 'eventurl'}, -- 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', 'displayauthors'},
['DisplayContributors'] = 'display-contributors',
['DisplayEditors'] = 'display-editors',
['DisplayInterviewers'] = 'display-interviewers',
['DisplayTranslators'] = 'display-translators',
['Docket'] = 'docket',
['DoiBroken'] = 'doi-broken-date',
['Edition'] = 'edition',
['Editors'] = 'editors',
['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'},
['IgnoreISBN'] = 'ignore-isbn-error',
['Inset'] = 'inset',
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'lang'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LayDate'] = {'lay-date', 'laydate'},
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'layurl'}, -- Used by InternetArchiveBot
['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', 'name-list-format'},
['Network'] = 'network',
['Newsgroup'] = 'newsgroup', -- cite newsgroup only
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'no-tracking', 'template-doc-demo', 'nocat'},
['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', 'seriesnumber', 'seriesno'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['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'},
['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'},
['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'},
['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", "given#", "author-given#", "author#-given"},
['AuthorList-Last'] = {"last#", "author-last#", "author#-last", "surname#", "author-surname#", "author#-surname", "author#", "subject#", 'host#'},
['AuthorList-Link'] = {"author-link#", "author#-link", "subject-link#", "subject#-link", "authorlink#", "author#link", "subjectlink#", "subject#link"},
['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask", "authormask#", "author#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", "editorlink#", "editor#link"}, -- unhyphenated forms to be deprecated
['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'},
}
--[[--------------------------&lt; P U N C T _ S K I P &gt;----------------------------------------------------------
builds a table of parameter names that the extraneous terminal punctuation check should not check.
]]
local punct_skip = {};
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
'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', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- url-holding parameters
}
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
punct_skip[params] = 1; -- just a single parameter
else
for _, param in ipairs (params) do -- get the parameter name
punct_skip[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
punct_skip[param] = 1; -- add param name without enumerator marker
end
end
end
end
--[[--------------------------&lt; S P E C I A L C A S E T R A N S L A T I O N S &gt;----------------------------
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 special_case_translation = {
['AuthorList'] = 'authors list', -- used to assemble maintenance category names
['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 to assemble maintenance category names
['contributors'] = 'contributors', -- translation of these names plus translation of the base maintenance 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',
-- Lua patterns to match pseudo-titles used by Internet Archive bot and others as place holder 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 of reference filling tools
-- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language
['generic_titles'] = {
{
['en'] = {'^wayback%s+machine$', false}, -- patterns in this table to be lowercase only
['local'] = nil, -- leave this nil except when there is a matching generic title in your language
},
{['en'] = {'are you a robot', true}, ['local'] = nil},
{['en'] = {'hugedomains.com', true}, ['local'] = nil},
{['en'] = {'^[%(%[{&lt;]?no +title[&gt;}%]%)]?$', false}, ['local'] = nil},
{['en'] = {'page not found', true}, ['local'] = nil},
{['en'] = {'^[%(%[{&lt;]?unknown[&gt;}%]%)]?$', false}, ['local'] = nil},
{['en'] = {'website is for sale', true}, ['local'] = nil},
{['en'] = {'^404', true}, ['local'] = nil},
}
}
--[[--------------------------&lt; D A T E _ N A M E S &gt;----------------------------------------------------------
This table of tables lists local language date names and fallback English date names. The code in Date_validation
will look first in the local table for valid date names. If date names are not found in the local table, the code
will look in the English table.
Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation
function date_name_xlate() is used.
In these tables, season numbering is defined by Extended Date/Time Format (EDTF) Specification (https://www.loc.gov/standards/datetime/)
which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using
numbers 21-41. CS1|2 only supports generic seasons. EDTF does support the distinction between north and south
hemispere seasons but CS1|2 has no way to make that distinction.
33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each)
The standard does not address 'named' dates so, for the purposes of CS1|2, Easter and Christmas are defined here as 98 and 99, which
should be out of the ISO 8601 (EDTF) range of uses for a while.
]]
local date_names = {
['en'] = { -- English
['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12},
['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12},
['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36},
['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23},
['named'] = {['Easter'] = 98, ['Christmas'] = 99},
},
['local'] = { -- replace these English date names with the local language equivalents
['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12},
['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12},
['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36},
['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23},
['named'] = {['Easter'] = 98, ['Christmas'] = 99},
},
['inv_local_l'] = {}, -- used in date reformatting; copy of date_names['local'].long where k/v are inverted: [1]='&lt;local name&gt;' etc.
['inv_local_s'] = {}, -- used in date reformatting; copy of date_names['local'].short where k/v are inverted: [1]='&lt;local name&gt;' etc.
['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}, -- used to convert local language digits to Western 0-9
['xlate_digits'] = {},
}
for name, i in pairs (date_names['local'].long) do -- this table is ['name'] = i
date_names['inv_local_l'][i] = name; -- invert to get [i] = 'name' for conversions from ymd
end
for name, i in pairs (date_names['local'].short) do -- this table is ['name'] = i
date_names['inv_local_s'][i] = name; -- invert to get [i] = 'name' for conversions from ymd
end
for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table
date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value
end
local df_template_patterns = { -- table of redirects to {{Use dmy dates}} and {{Use mdy dates}}
'{{ *[Uu]se +(dmy) +dates *[|}]', -- 1159k -- sorted by approximate transclusion count
'{{ *[Uu]se +(mdy) +dates *[|}]', -- 212k
'{{ *[Uu]se +(MDY) +dates *[|}]', -- 788
'{{ *[Uu]se +(DMY) +dates *[|}]', -- 343
'{{ *([Mm]dy) *[|}]', -- 176
'{{ *[Uu]se *(dmy) *[|}]', -- 156 + 18
'{{ *[Uu]se *(mdy) *[|}]', -- 149 + 11
'{{ *([Dd]my) *[|}]', -- 56
'{{ *[Uu]se +(MDY) *[|}]', -- 5
'{{ *([Dd]MY) *[|}]', -- 3
'{{ *[Uu]se(mdy)dates *[|}]', -- 1
'{{ *[Uu]se +(DMY) *[|}]', -- 0
'{{ *([Mm]DY) *[|}]', -- 0
}
local function get_date_format ()
local content = mw.title.getCurrentTitle():getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625
for _, pattern in ipairs (df_template_patterns) do -- loop through the patterns looking for {{Use dmy dates}} or {{Use mdy dates}} or any of their redirects
local start, _, match = content:find(pattern); -- match is the three letters indicating desired date format
if match then
content = content:match ('%b{}', start); -- get the whole template
if content:match ('| *cs1%-dates *= *[lsy][sy]?') then -- look for |cs1-dates=publication date length access-/archive-date length
return match:lower() .. '-' .. content:match ('| *cs1%-dates *= *([lsy][sy]?)');
else
return match:lower() .. '-all'; -- no |cs1-dates= k/v pair; return value appropriate for use in |df=
end
end
end
end
local global_df = get_date_format ();
--[[--------------------------&lt; V O L U M E , I S S U E , P A G E S &gt;----------------------------------------
These tables hold cite class values (from the template invocation) and identify those templates that support
|volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which
is handled in the main module.
]]
local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'}
local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news', 'podcast'}
local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'}
--[[--------------------------&lt; K E Y W O R D S &gt;--------------------------------------------------------------
These tables hold keywords for those parameters that have defined sets of acceptable keywords.
]]
--[[--------------------------&lt; K E Y W O R D S T A B L E &gt;--------------------------------------------------
this is a list of keywords; each key in the list is associated with a table of synonymous keywords possibly from
different languages.
for I18N: add local-language keywords to value table; do not change the key. For example, adding the German keyword 'ja':
['affirmative'] = {'yes', 'true', 'y', 'ja'},
Because CS1|2 templates from en.wiki articles are often copied to other local wikis, it is recommended that the English
keywords remain in these tables.
]]
local keywords = {
['amp'] = {'&amp;', 'amp', 'ampersand'}, -- |name-list-style=
['and'] = {'and', 'serial'}, -- |name-list-style=
['affirmative'] = {'yes', 'true', 'y'}, -- |ignore-isbn-error=, |last-author-amp=, |no-tracking=, |no-pp= -- 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
['off'] = {'off'}, -- |title= (potentially also: |title-link=, |postscript=, |ref=, |type=)
['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-style=
['ymd'] = {'ymd'}, -- |df=
['ymd-all'] = {'ymd-all'}, -- |df=
-- ['yMd'] = {'yMd'}, -- |df=; not supported at en.wiki
-- ['yMd-all'] = {'yMd-all'}, -- |df=; not supported at en.wiki
}
--[[--------------------------&lt; X L A T E _ K E Y W O R D S &gt;--------------------------------------------------
this function builds a list, keywords_xlate{}, of the keywords found in keywords{} where the values from keywords{}
become the keys in keywords_xlate{} and the keys from keywords{} become the values in keywords_xlate{}:
['affirmative'] = {'yes', 'true', 'y'}, -- in keywords{}
becomes
['yes'] = 'affirmative', -- in keywords_xlate{}
['true'] = 'affirmative',
['y'] = 'affirmative',
the purpose of this function is to act as a translator between a non-English keyword and its English equivalent
that may be used in other modules of this suite
]]
local function xlate_keywords ()
local out_table = {}; -- output goes here
for k, keywords_t in pairs (keywords) do -- spin through the keywords table
for _, keyword in ipairs (keywords_t) do -- for each keyword
out_table[keyword] = k; -- create an entry in the output table where keyword is the key
end
end
return out_table;
end
local keywords_xlate = xlate_keywords (); -- the list of translated keywords
--[[--------------------------&lt; M A K E _ K E Y W O R D S _ L I S T &gt;------------------------------------------
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
--[[--------------------------&lt; K E Y W O R D S _ L I S T S &gt;--------------------------------------------------
this is a list of lists of valid keywords for the various parameters in [key]. Generally the keys in this table
are the canonical en.wiki parameter names though some are contrived because of use in multiple differently named
parameters: ['yes_true_y'], ['id-access'].
The function make_keywords_list() extracts the individual keywords from the appropriate list in keywords{}.
The lists in this table are used to validate the keyword assignment for the parameters named in this table's keys.
]]
local keywords_lists = {
['yes_true_y'] = make_keywords_list ({keywords.affirmative}),
['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}),
['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}),
-- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki
['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}),
['name-list-style'] = make_keywords_list ({keywords.amp, keywords['and'], keywords.vanc}),
['url-access'] = make_keywords_list ({keywords.subscription, keywords.limited, keywords.registration}),
['url-status'] = make_keywords_list ({keywords.dead, keywords.live, keywords.unfit, keywords.usurped, keywords['bot: unknown']}),
['id-access'] = make_keywords_list ({keywords.free}),
}
--[[--------------------------&lt; S T R I P M A R K E R S &gt;------------------------------------------------------
Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when)
MediaWiki changes their form.
]]
local stripmarkers = {
['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker
['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker()
}
--[[--------------------------&lt; I N V I S I B L E _ C H A R A C T E R S &gt;--------------------------------------
This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal
representations of UTF-8 codes. The table is organized as a table of tables because the Lua pairs keyword returns
table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at
the top of the table are also found in the ranges specified by the entries at the bottom of the table.
Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki
stripmarker is not an error but some others are because the parameter values that include them become part of the
template's metadata before stripmarker replacement.
]]
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'hair space', '\226\128\138'}, -- U+200A, E2 80 8A
{'soft hyphen', '\194\173'}, -- U+00AD, C2 AD
{'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
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D))
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
-- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
-- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF
-- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD
-- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD
}
--[[
Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This
pattern covers all of the unicode characters for these languages:
Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf
Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf
Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf
Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf
Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf
Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf
Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf
Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf
Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf
Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf
plus the not-necessarily Indic scripts for Sinhala and Burmese:
Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf
Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf
Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf
Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf
the pattern is used by has_invisible_chars() and coins_cleanup()
TODO: find a better place for this?
]]
local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]';
--[[--------------------------&lt; L A N G U A G E S U P P O R T &gt;----------------------------------------------
These tables and constants support various language-specific functionality.
]]
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 languages = mw.language.fetchLanguageNames (this_wiki_code, 'all'); -- get a list of language names known to Wikimedia; used for |language= and interwiki tests
local inter_wiki_map = {}; -- map of inter-wiki prefixes that are language-code prefixes
for k, v in pairs (mw.site.interwikiMap ('local')) do -- spin through the base inter-wiki map (limited to local)
if languages[v["prefix"]] then -- if the prefix matches a known language code
inter_wiki_map[v["prefix"]] = true; -- add it to our local map
end
end
local local_lang_cat_enable = false; -- set to true to categorize pages where |language=&lt;local wiki's language&gt;
--[[--------------------------&lt; S C R I P T _ L A N G _ C O D E S &gt;--------------------------------------------
This table is used to hold ISO 639-1 two-character and ISO 639-3 three-character language codes that apply only
to |script-title= and |script-chapter=
]]
local script_lang_codes = {
'am', 'ar', 'be', 'bg', 'bn', 'bo', 'bs', 'dv', 'dz', 'el', 'fa',
'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku',
'lo', 'mk', 'ml', 'mn', 'mr', 'my', 'ne', 'or', 'ota', 'ps', 'ru',
'sd', 'si', 'sr', 'ta', 'tg', 'th', 'ug', 'uk', 'ur', 'uz', 'yi', 'zh'
};
--[[--------------------------&lt; L A N G U A G E R E M A P P I N G &gt;------------------------------------------
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'
]]
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 Wikipedia: bh.wikipedia.org
['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name
['bn'] = 'Bengali', -- MediaWiki returns Bangla
['ca-valencia'] = 'Valencian', -- IETF variant of Catalan
['crh'] = 'Crimean Tatar', -- synonymous with Crimean Turkish (return value from {{#language:crh|en}})
['ilo'] = 'Ilocano', -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name
['ksh'] = 'Kölsch', -- MediaWiki: Colognian; use IANA/ISO 639 preferred name
['ksh-x-colog'] = 'Colognian', -- override MediaWiki ksh; no IANA/ISO 639 code for Colognian; IETF private code created at Module:Lang/data
['mis-x-ripuar'] = 'Ripuarian', -- override MediaWiki ksh; no IANA/ISO 639 code for Ripuarian; IETF private code created at Module:Lang/data
['nan-tw'] = 'Taiwanese Hokkien', -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese and support en.wiki preferred name
}
local lang_name_remap = { -- used for |language=
['alemannisch'] = {'Swiss German', 'gsw'}, -- not an ISO or IANA language name; MediaWiki uses 'als' as a subdomain name for Alemannic Wikipedia: als.wikipedia.org
['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap
['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code
['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org
['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found
['blackfoot'] = {'Blackfoot', 'bla'}, -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name
['colognian'] = {'Colognian', 'ksh-x-colog'}, -- MediaWiki preferred name for ksh
['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
-- ['siksika'] = {'Siksika', 'bla'}, -- MediaWiki/IANA/ISO 639 preferred name: Siksika
['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-TW'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese
['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found
['valencian'] = {'Valencian', 'ca'}, -- variant of Catalan; categorizes as Catalan
}
--[[--------------------------&lt; P R O P E R T I E S _ C A T E G O R I E S &gt;------------------------------------
Here we name properties categories
]]
local prop_cats = {
['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is foreign-language name, $2 is ISO639-1 code
['foreign_lang_source_2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code used as a sort key
['local_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is local-language name, $2 is ISO639-1 code; not emitted when local_lang_cat_enable is false
['location test'] = 'CS1 location test',
['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category
['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code
['jul_greg_uncertainty'] = 'CS1: Julian–Gregorian uncertainty', -- probably temporary cat to identify scope of template with dates 1 October 1582 – 1 January 1926
['long_vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 charachters
['year_range_abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form
}
--[[--------------------------&lt; T I T L E _ T Y P E S &gt;--------------------------------------------------------
Here we map a template's CitationClass to TitleType (default values for |type= parameter)
]]
local title_types = {
['AV-media-notes'] = 'Media notes',
['interview'] = 'Interview',
['mailinglist'] = 'Mailing list',
['map'] = 'Map',
['podcast'] = 'Podcast',
['pressrelease'] = 'Press release',
['report'] = 'Report',
['techreport'] = 'Technical report',
['thesis'] = 'Thesis',
}
--[[=========================&lt;&lt; E R R O R M E S S A G I N G &gt;&gt;===============================================
]]
--[[--------------------------&lt; E R R O R M E S S A G E S U P P L I M E N T S &gt;----------------------------
I18N for those messages that are supplemented 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=
}
--[[--------------------------&lt; E R R O R _ C O N D I T I O N S &gt;----------------------------------------------
Error condition table. This table has two sections: errors at the top, maintenance at the bottom. Maint 'messaging'
does not have a 'message' (message=nil)
The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a
text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment.
Anchor changes require identical changes to matching anchor in Help:CS1 errors
TODO: rename error_conditions{} to something more generic; create separate error and maint tables inside that?
]]
local error_conditions = {
err_accessdate_missing_url = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;access-date=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;url=&lt;/code&gt;',
anchor = 'accessdate_missing_url',
category = 'Pages using citations with accessdate and no URL',
hidden = false
},
err_apostrophe_markup = {
message = 'Italic or bold markup not allowed in: &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'apostrophe_markup',
category = 'CS1 errors: markup',
hidden = false
},
err_archive_missing_date = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;archive-url=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;archive-date=&lt;/code&gt;',
anchor = 'archive_missing_date',
category = 'Pages with archiveurl citation errors',
hidden = false
},
err_archive_missing_url = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;archive-url=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;url=&lt;/code&gt;',
anchor = 'archive_missing_url',
category = 'Pages with archiveurl citation errors',
hidden = false
},
err_archive_url = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;archive-url=&lt;/code&gt; is malformed: $1', -- $1 is error message detail
anchor = 'archive_url',
category = 'Pages with archiveurl citation errors',
hidden = false
},
err_arxiv_missing = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;arxiv=&lt;/code&gt; required',
anchor = 'arxiv_missing',
category = 'CS1 errors: arXiv', -- same as bad arxiv
hidden = false
},
err_bad_arxiv = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;arxiv=&lt;/code&gt; value',
anchor = 'bad_arxiv',
category = 'CS1 errors: arXiv',
hidden = false
},
err_bad_asin = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;asin=&lt;/code&gt; value',
anchor = 'bad_asin',
category ='CS1 errors: ASIN',
hidden = false
},
err_bad_bibcode = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;bibcode=&lt;/code&gt; $1', -- $1 is error message detail
anchor = 'bad_bibcode',
category = 'CS1 errors: bibcode',
hidden = false
},
err_bad_biorxiv = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;biorxiv=&lt;/code&gt; value',
anchor = 'bad_biorxiv',
category = 'CS1 errors: bioRxiv',
hidden = false
},
err_bad_citeseerx = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;citeseerx=&lt;/code&gt; value',
anchor = 'bad_citeseerx',
category = 'CS1 errors: citeseerx',
hidden = false
},
err_bad_date = {
-- message = 'Check date values in: &lt;code class="cs1-code"&gt;$1&lt;/code&gt;', -- $1 is parameter name
message = 'Check date values in: $1', -- $1 is parameter name
anchor = 'bad_date',
category = 'CS1 errors: dates',
hidden = false
},
err_bad_doi = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;doi=&lt;/code&gt; value',
anchor = 'bad_doi',
category = 'CS1 errors: DOI',
hidden = false
},
err_bad_hdl = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;hdl=&lt;/code&gt; value',
anchor = 'bad_hdl',
category = 'CS1 errors: HDL',
hidden = false
},
err_bad_isbn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;isbn=&lt;/code&gt; value: $1', -- $1 is error message detail
anchor = 'bad_isbn',
category = 'CS1 errors: ISBN',
hidden = false
},
err_bad_ismn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;ismn=&lt;/code&gt; value',
anchor = 'bad_ismn',
category = 'CS1 errors: ISMN',
hidden = false
},
err_bad_issn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;$1issn=&lt;/code&gt; value', -- $1 is 'e' or '' for eissn or issn
anchor = 'bad_issn',
category = 'CS1 errors: ISSN',
hidden = false
},
err_bad_jfm = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;jfm=&lt;/code&gt; value',
anchor = 'bad_jfm',
category = 'CS1 errors: JFM',
hidden = false
},
err_bad_lccn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;lccn=&lt;/code&gt; value',
anchor = 'bad_lccn',
category = 'CS1 errors: LCCN',
hidden = false
},
err_bad_mr = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;mr=&lt;/code&gt; value',
anchor = 'bad_mr',
category = 'CS1 errors: MR',
hidden = false
},
err_bad_ol = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;ol=&lt;/code&gt; value',
anchor = 'bad_ol',
category = 'CS1 errors: OL',
hidden = false
},
err_bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link=
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; value', -- $1 is parameter name
anchor = 'bad_paramlink',
category = 'CS1 errors: parameter link',
hidden = false
},
err_bad_pmc = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;pmc=&lt;/code&gt; value',
anchor = 'bad_pmc',
category = 'CS1 errors: PMC',
hidden = false
},
err_bad_pmid = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;pmid=&lt;/code&gt; value',
anchor = 'bad_pmid',
category = 'CS1 errors: PMID',
hidden = false
},
err_bad_oclc = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;oclc=&lt;/code&gt; value',
anchor = 'bad_oclc',
category = 'CS1 errors: OCLC',
hidden = false
},
bad_s2cid_err = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;s2cid=&lt;/code&gt; value',
anchor = 'bad_s2cid',
category = 'CS1 errors: S2CID',
hidden = false
},
err_bad_sbn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;sbn=&lt;/code&gt; value: $1', -- $1 is error message detail
anchor = 'bad_sbn',
category = 'CS1 errors: SBN',
hidden = false
},
err_bad_ssrn = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;ssrn=&lt;/code&gt; value',
anchor = 'bad_ssrn',
category = 'CS1 errors: SSRN',
hidden = false
},
err_bad_url = {
message = 'Check $1 value', -- $1 is parameter name
anchor = 'bad_url',
category = 'Pages with URL errors',
hidden = false
},
err_bad_usenet_id = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;message-id=&lt;/code&gt; value',
anchor = 'bad_message_id',
category = 'CS1 errors: message-id',
hidden = false
},
err_bad_zbl = {
message = 'Check &lt;code class="cs1-code"&gt;&amp;#124;zbl=&lt;/code&gt; value',
anchor = 'bad_zbl',
category = 'CS1 errors: ZBL',
hidden = false
},
err_bare_url_missing_title = {
message = '$1 missing title', -- $1 is parameter name
anchor = 'bare_url_missing_title',
category = 'Pages with citations having bare URLs',
hidden = false
},
err_biorxiv_missing = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;biorxiv=&lt;/code&gt; required',
anchor = 'biorxiv_missing',
category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv
hidden = false
},
err_chapter_ignored = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; ignored', -- $1 is parameter name
anchor = 'chapter_ignored',
category = 'CS1 errors: chapter ignored',
hidden = false
},
err_citation_missing_title = {
message = 'Missing or empty &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'citation_missing_title',
category = 'Pages with citations lacking titles',
hidden = false
},
err_citeseerx_missing = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;citeseerx=&lt;/code&gt; required',
anchor = 'citeseerx_missing',
category = 'CS1 errors: citeseerx', -- same as bad citeseerx
hidden = false
},
err_cite_web_url = { -- this error applies to cite web and to cite podcast
message = 'Missing or empty &lt;code class="cs1-code"&gt;&amp;#124;url=&lt;/code&gt;',
anchor = 'cite_web_url',
category = 'Pages using web citations with no URL',
hidden = false
},
err_class_ignored = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;class=&lt;/code&gt; ignored',
anchor = 'class_ignored',
category = 'CS1 errors: class',
hidden = false
},
err_contributor_ignored = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;contributor=&lt;/code&gt; ignored',
anchor = 'contributor_ignored',
category = 'CS1 errors: contributor',
hidden = false
},
err_contributor_missing_required_param = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;contributor=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'contributor_missing_required_param',
category = 'CS1 errors: contributor',
hidden = false
},
err_deprecated_params = {
message = 'Cite uses deprecated parameter &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'deprecated_params',
category = 'CS1 errors: deprecated parameters',
hidden = false
},
err_disp_name = {
message = 'Invalid &lt;code class="cs1-code"&gt;&amp;#124;display-$1=$2&lt;/code&gt;', -- $1 is 'authors', 'contributors', 'editors', 'interviewers', 'translators'; gets value from special_case_translation table
anchor = 'disp_name',
category = 'CS1 errors: display-names',
hidden = false,
},
err_doibroken_missing_doi = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;doi=&lt;/code&gt;', -- $1 is parameter name
anchor = 'doibroken_missing_doi',
category = 'CS1 errors: DOI',
hidden = false
},
err_empty_citation = {
message = 'Empty citation',
anchor = 'empty_citation',
category = 'Pages with empty citations',
hidden = false
},
err_etal = {
message = 'Explicit use of et al. in: &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'explicit_et_al',
category = 'CS1 errors: explicit use of et al.',
hidden = false
},
err_first_missing_last = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; missing &lt;code class="cs1-code"&gt;&amp;#124;$2=&lt;/code&gt;', -- $1 is first alias, $2 is matching last alias
anchor = 'first_missing_last',
category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator
hidden = false
},
err_format_missing_url = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;$2=&lt;/code&gt;', -- $1 is format parameter $2 is url parameter
anchor = 'format_missing_url',
category = 'Pages using citations with format and no URL',
hidden = false
},
err_generic_title = {
message = 'Cite uses generic title',
anchor = 'generic_title',
category = 'CS1 errors: generic title',
hidden = false,
},
err_invalid_param_val = {
message = 'Invalid &lt;code class="cs1-code"&gt;&amp;#124;$1=$2&lt;/code&gt;', -- $1 is parameter name $2 is parameter value
anchor = 'invalid_param_val',
category = 'CS1 errors: invalid parameter value',
hidden = false
},
err_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',
hidden = false
},
err_missing_name = {
message = 'Missing &lt;code class="cs1-code"&gt;&amp;#124;$1$2=&lt;/code&gt;', -- $1 is modified NameList; $2 is enumerator
anchor = 'missing_name',
category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator
hidden = false
},
err_missing_periodical = {
message = 'Cite $1 requires &lt;code class="cs1-code"&gt;&amp;#124;$2=&lt;/code&gt;', -- $1 is cs1 template name; $2 is canonical periodical parameter name for cite $1
anchor = 'missing_periodical',
category = 'CS1 errors: missing periodical',
hidden = true
},
err_missing_pipe = {
message = 'Missing pipe in: &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'missing_pipe',
category = 'CS1 errors: missing pipe',
hidden = false
},
err_param_access_requires_param = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;$1-access=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;', -- $1 is parameter name
anchor = 'param_access_requires_param',
category = 'CS1 errors: param-access',
hidden = false
},
err_param_has_ext_link = {
message = 'External link in &lt;code class="cs1-code"&gt;$1&lt;/code&gt;', -- $1 is parameter name
anchor = 'param_has_ext_link',
category = 'CS1 errors: external links',
hidden = false
},
err_parameter_ignored = {
message = 'Unknown parameter &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; ignored', -- $1 is parameter name
anchor = 'parameter_ignored',
category = 'Pages with citations using unsupported parameters',
hidden = false
},
err_parameter_ignored_suggest = {
message = 'Unknown parameter &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; ignored (&lt;code class="cs1-code"&gt;&amp;#124;$2=&lt;/code&gt; suggested)', -- $1 is unknown parameter $2 is suggested parameter name
anchor = 'parameter_ignored_suggest',
category = 'Pages with citations using unsupported parameters',
hidden = false
},
err_redundant_parameters = {
message = 'More than one of $1 specified', -- $1 is error message detail
anchor = 'redundant_parameters',
category = 'Pages with citations having redundant parameters',
hidden = false
},
err_script_parameter = {
message = 'Invalid &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt;: $2', -- $1 is parameter name $2 is script language code or error detail
anchor = 'script_parameter',
category = 'CS1 errors: script parameters',
hidden = false
},
err_ssrn_missing = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;ssrn=&lt;/code&gt; required',
anchor = 'ssrn_missing',
category = 'CS1 errors: ssrn', -- same as bad arxiv
hidden = false
},
err_text_ignored = {
message = 'Text "$1" ignored', -- $1 is ignored text
anchor = 'text_ignored',
category = 'Pages with citations using unnamed parameters',
hidden = false
},
err_trans_missing_title = {
message = '&lt;code class="cs1-code"&gt;&amp;#124;trans-$1=&lt;/code&gt; requires &lt;code class="cs1-code"&gt;&amp;#124;$1=&lt;/code&gt; or &lt;code class="cs1-code"&gt;&amp;#124;script-$1=&lt;/code&gt;', -- $1 is base parameter name
anchor = 'trans_missing_title',
category = 'CS1 errors: translated title',
hidden = false
},
err_param_unknown_empty = {
message = 'Cite has empty unknown parameter$1: $2', -- $1 is 's' or empty space; $2 is emty unknown param list
anchor = 'param_unknown_empty',
category = 'CS1 errors: empty unknown parameters',
hidden = true
},
err_vancouver = {
message = 'Vancouver style error: $1', -- $1 is error detail
anchor = 'vancouver',
category = 'CS1 errors: Vancouver style',
hidden = false
},
err_wikilink_in_url = {
message = 'URL–wikilink conflict', -- uses ndash
anchor = 'wikilink_in_url',
category = 'CS1 errors: URL–wikilink conflict', -- uses ndash
hidden = false
},
--[[--------------------------&lt; M A I N T &gt;--------------------------------------------------------------------
maint messages do not have a message (message = nil); otherwise the structure is the same as error messages
]]
maint_asin = {
message = nil,
anchor = 'ASIN',
category = 'CS1 maint: ASIN uses ISBN',
hidden = true,
},
maint_archived_copy = {
message = nil,
anchor = 'archived_copy',
category = 'CS1 maint: archived copy as title',
hidden = true,
},
maint_authors = {
message = nil,
anchor = 'authors',
category = 'CS1 maint: uses authors parameter',
hidden = true,
},
maint_bot_unknown = {
message = nil,
anchor = 'bot:_unknown',
category = 'CS1 maint: BOT: original-url status unknown',
hidden = true,
},
maint_date_format = {
message = nil,
anchor = 'date_format',
category = 'CS1 maint: date format',
hidden = true,
},
maint_date_year = {
message = nil,
anchor = 'date_year',
category = 'CS1 maint: date and year',
hidden = true,
},
maint_doi_ignore = {
message = nil,
anchor = 'doi_ignore',
category = 'CS1 maint: ignored DOI errors',
hidden = true,
},
maint_doi_inactive = {
message = nil,
anchor = 'doi_inactive',
category = 'CS1 maint: DOI inactive',
hidden = true,
},
maint_doi_inactive_dated = {
message = nil,
anchor = 'doi_inactive_dated',
category = 'CS1 maint: DOI inactive as of $2$3$1', -- $1 is year, $2 is month-name or empty string, $3 is space or empty string
hidden = true,
},
maint_extra_punct = {
message = nil,
anchor = 'extra_punct',
category = 'CS1 maint: extra punctuation',
hidden = true,
},
maint_extra_text = {
message = nil,
anchor = 'extra_text',
category = 'CS1 maint: extra text',
hidden = true,
},
maint_extra_text_names = {
message = nil,
anchor = 'extra_text_names',
category = 'CS1 maint: extra text: $1', -- $1 is '&lt;name&gt;s list'; gets value from special_case_translation table
hidden = true,
},
maint_isbn_ignore = {
message = nil,
anchor = 'ignore_isbn_err',
category = 'CS1 maint: ignored ISBN errors',
hidden = true,
},
maint_issn_ignore = {
message = nil,
anchor = 'ignore_issn',
category = 'CS1 maint: ignored ISSN errors',
hidden = true,
},
maint_jfm_format = {
message = nil,
anchor = 'jfm_format',
category = 'CS1 maint: JFM format',
hidden = true,
},
maint_location = {
message = nil,
anchor = 'location',
category = 'CS1 maint: location',
hidden = true,
},
maint_mr_format = {
message = nil,
anchor = 'mr_format',
category = 'CS1 maint: MR format',
hidden = true,
},
maint_mult_names = {
message = nil,
anchor = 'mult_names',
category = 'CS1 maint: multiple names: $1', -- $1 is '&lt;name&gt;s list'; gets value from special_case_translation table
hidden = true,
},
maint_nocat = {
message = nil,
anchor = 'maint_nocat',
category = 'CS1 maint: nocat',
hidden = true,
},
maint_numeric_names = {
message = nil,
anchor = 'numeric_names',
category = 'CS1 maint: numeric names: $1', -- $1 is '&lt;name&gt;s list'; gets value from special_case_translation table
hidden = true,
},
maint_others = {
message = nil,
anchor = 'others',
category = 'CS1 maint: others',
hidden = true,
},
maint_pmc_embargo = {
message = nil,
anchor = 'embargo',
category = 'CS1 maint: PMC embargo expired',
hidden = true,
},
maint_pmc_format = {
message = nil,
anchor = 'pmc_format',
category = 'CS1 maint: PMC format',
hidden = true,
},
maint_ref_harv = {
message = nil,
anchor = 'ref_harv',
category = 'CS1 maint: ref=harv',
hidden = true,
},
maint_unfit = {
message = nil,
anchor = 'unfit',
category = 'CS1 maint: unfit url',
hidden = true,
},
maint_unknown_lang = {
message = nil,
anchor = 'unknown_lang',
category = 'CS1 maint: unrecognized language',
hidden = true,
},
maint_untitled = {
message = nil,
anchor = 'untitled',
category = 'CS1 maint: untitled periodical',
hidden = true,
},
maint_zbl = {
message = nil,
anchor = 'zbl',
category = 'CS1 maint: ZBL',
hidden = true,
},
}
--[[--------------------------&lt; I D _ H A N D L E R S &gt;--------------------------------------------------------
The following contains a list of values for various defined identifiers. For each identifier we specify a
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 label preceeding the identifier; label is linked to a wikipedia article (in this order):
redirect from id_handlers['&lt;id&gt;'].redirect when use_identifier_redirects is true
wikidata-supplied article name for the local wiki from id_handlers['&lt;id&gt;'].q
local article name from id_handlers['&lt;id&gt;'].link
mode: 'manual' when there is a specific function in the code to handle the identifier;
'external' for identifiers that link outside of Wikipedia;
prefix: the first part of a url that will be concatenated with a second part which usually contains the identifier
suffix: optional third part to be added after the identifier
encode: true if uri should be percent encoded; otherwise false
COinS: identifier link or keyword for use in COinS:
for identifiers registered at info-uri.info use: info:....
for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn
for others make a url using the value in prefix, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here)
set to nil to leave the identifier out of the COinS
separator: character or text between label and the identifier in the rendered citation
id_limit: for those identifiers with established limits, this property holds the upper limit
access: use this parameter to set the access level for all instances of this identifier.
the value must be a valid access level for an identifier (see ['id-access'] in this file).
custom_access: to enable custom access level for an identifier, set this parameter
to the parameter that should control it (normally 'id-access')
]]
local id_handlers = {
['ARXIV'] = {
parameters = {'arxiv', 'eprint'},
link = 'arXiv',
redirect = 'arXiv (identifier)',
q = 'Q118398',
label = 'arXiv',
mode = 'manual',
prefix = '//arxiv.org/abs/', -- protocol relative tested 2013-09-04
encode = false,
COinS = 'info:arxiv',
separator = ':',
access = 'free', -- free to read
},
['ASIN'] = {
parameters = { 'asin', 'ASIN' },
link = 'Amazon Standard Identification Number',
redirect = 'ASIN (identifier)',
q = 'Q1753278',
label = 'ASIN',
mode = 'manual',
prefix = '//www.amazon.',
COinS = nil, -- no COinS for this id (needs thinking on implementation because |asin-tld=)
separator = '&amp;nbsp;',
encode = false;
},
['BIBCODE'] = {
parameters = {'bibcode'},
link = 'Bibcode',
redirect = 'Bibcode (identifier)',
q = 'Q25754',
label = 'Bibcode',
mode = 'manual',
prefix = 'https://ui.adsabs.harvard.edu/abs/',
encode = false,
COinS = 'info:bibcode',
separator = ':',
custom_access = 'bibcode-access',
},
['BIORXIV'] = {
parameters = {'biorxiv'},
link = 'bioRxiv',
redirect = 'bioRxiv (identifier)',
q = 'Q19835482',
label = 'bioRxiv',
mode = 'manual',
prefix = '//doi.org/',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = '&amp;nbsp;',
},
['CITESEERX'] = {
parameters = {'citeseerx'},
link = 'CiteSeerX',
redirect = 'CiteSeerX (identifier)',
q = 'Q2715061',
label = 'CiteSeerX',
mode = 'manual', -- manual for custom validation of the "doi"
prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = '&amp;nbsp;',
},
['DOI'] = { -- Used by InternetArchiveBot
parameters = { 'doi', 'DOI'},
link = 'Digital object identifier',
redirect = 'doi (identifier)',
q = 'Q25670',
label = 'doi',
mode = 'manual',
prefix = '//doi.org/',
COinS = 'info:doi',
separator = ':',
encode = true,
custom_access = 'doi-access',
},
['EISSN'] = {
parameters = {'eissn', 'EISSN'},
link = 'International_Standard_Serial_Number#Electronic_ISSN',
redirect = 'eISSN (identifier)',
q = 'Q46339674',
label = 'eISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.eissn',
encode = false,
separator = '&amp;nbsp;',
},
['HDL'] = {
parameters = { 'hdl', 'HDL' },
link = 'Handle System',
redirect = 'hdl (identifier)',
q = 'Q3126718',
label = 'hdl',
mode = 'manual',
prefix = '//hdl.handle.net/',
COinS = 'info:hdl',
separator = ':',
encode = true,
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',
mode = 'manual',
prefix = 'Special:BookSources/',
COinS = 'rft.isbn',
separator = '&amp;nbsp;',
},
['ISMN'] = {
parameters = {'ismn', 'ISMN'},
link = 'International Standard Music Number',
redirect = 'ISMN (identifier)',
q = 'Q1666938',
label = 'ISMN',
mode = 'manual',
prefix = '', -- not currently used;
COinS = 'nil', -- nil because we can't use pre or rft or info:
separator = '&amp;nbsp;',
},
['ISSN'] = {
parameters = {'issn', 'ISSN'},
link = 'International Standard Serial Number',
redirect = 'ISSN (identifier)',
q = 'Q131276',
label = 'ISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.issn',
encode = false,
separator = '&amp;nbsp;',
},
['JFM'] = {
parameters = {'jfm', 'JFM'},
link = 'Jahrbuch über die Fortschritte der Mathematik',
redirect = 'JFM (identifier)',
q = '',
label = 'JFM',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&amp;q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
},
['JSTOR'] = {
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
redirect = 'JSTOR (identifier)',
q = 'Q1420342',
label = 'JSTOR',
mode = 'external',
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = false,
separator = '&amp;nbsp;',
custom_access = 'jstor-access',
},
['LCCN'] = {
parameters = {'lccn', 'LCCN'},
link = 'Library of Congress Control Number',
redirect = 'LCCN (identifier)',
q = 'Q620946',
label = 'LCCN',
mode = 'manual',
prefix = '//lccn.loc.gov/', -- protocol relative tested 2015-12-28
COinS = 'info:lccn',
encode = false,
separator = '&amp;nbsp;',
},
['MR'] = {
parameters = {'mr', 'MR'},
link = 'Mathematical Reviews',
redirect = 'MR (identifier)',
q = 'Q211172',
label = 'MR',
mode = 'manual',
prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
},
['OCLC'] = {
parameters = {'oclc', 'OCLC'},
link = 'OCLC',
redirect = 'OCLC (identifier)',
q = 'Q190593',
label = 'OCLC',
mode = 'manual',
prefix = '//www.worldcat.org/oclc/',
COinS = 'info:oclcnum',
encode = true,
separator = '&amp;nbsp;',
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = 'Open Library',
redirect = 'OL (identifier)',
q = 'Q1201876',
label = 'OL',
mode = 'manual',
prefix = '//openlibrary.org/',
COinS = nil, -- no COinS for this id (needs thinking on implementation because /authors/books/works/OL)
separator = '&amp;nbsp;',
encode = true,
custom_access = 'ol-access',
},
['OSTI'] = {
parameters = {'osti', 'OSTI'},
link = 'Office of Scientific and Technical Information',
redirect = 'OSTI (identifier)',
q = 'Q2015776',
label = 'OSTI',
mode = 'external',
prefix = '//www.osti.gov/biblio/', -- protocol relative tested 2018-09-12
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
custom_access = 'osti-access',
},
['PMC'] = {
parameters = {'pmc', 'PMC'},
link = 'PubMed Central',
redirect = 'PMC (identifier)',
q = 'Q229883',
label = 'PMC',
mode = 'manual',
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
suffix = " ",
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
id_limit = 8000000,
access = 'free', -- free to read
},
['PMID'] = {
parameters = {'pmid', 'PMID'},
link = 'PubMed Identifier',
redirect = 'PMID (identifier)',
q = '',
label = 'PMID',
mode = 'manual',
prefix = '//pubmed.ncbi.nlm.nih.gov/',
COinS = 'info:pmid',
encode = false,
separator = '&amp;nbsp;',
id_limit = 33200000,
},
['RFC'] = {
parameters = {'rfc', 'RFC'},
link = 'Request for Comments',
redirect = 'RFC (identifier)',
q = 'Q212971',
label = 'RFC',
mode = 'external',
prefix = '//tools.ietf.org/html/rfc',
COinS = 'pre', -- use prefix value
encode = false,
separator = '&amp;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 = '&amp;nbsp;',
},
['SSRN'] = {
parameters = {'ssrn', 'SSRN'},
link = 'Social Science Research Network',
redirect = 'SSRN (identifier)',
q = 'Q7550801',
label = 'SSRN',
mode = 'manual',
prefix = '//ssrn.com/abstract=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
id_limit = 4000000,
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 = '&amp;nbsp;',
id_limit = 230000000,
custom_access = 's2cid-access',
},
['USENETID'] = {
parameters = {'message-id'},
link = 'Usenet',
redirect = 'Usenet (identifier)',
q = 'Q193162',
label = 'Usenet:',
mode = 'manual',
prefix = 'news:',
encode = false,
COinS = 'pre', -- use prefix value
separator = '&amp;nbsp;',
},
['ZBL'] = {
parameters = {'zbl', 'ZBL' },
link = 'Zentralblatt MATH',
redirect = 'Zbl (identifier)',
q = 'Q190269',
label = 'Zbl',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&amp;q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = '&amp;nbsp;',
},
}
--[[--------------------------&lt; E X P O R T S &gt;----------------------------------------------------------------
]]
return {
use_identifier_redirects = true, -- when true use redirect name for identifier label links
aliases = aliases,
special_case_translation = special_case_translation,
date_names = date_names,
err_msg_supl = err_msg_supl,
error_conditions = error_conditions,
editor_markup_patterns = editor_markup_patterns,
et_al_patterns = et_al_patterns,
global_df = global_df,
id_handlers = id_handlers,
keywords_lists = keywords_lists,
keywords_xlate = keywords_xlate,
stripmarkers=stripmarkers,
invisible_chars = invisible_chars,
indic_script = indic_script,
local_lang_cat_enable = local_lang_cat_enable,
maint_cats = maint_cats,
messages = messages,
presentation = presentation,
prop_cats = prop_cats,
punct_skip = punct_skip,
script_lang_codes = script_lang_codes,
lang_code_remap = lang_code_remap,
lang_name_remap = lang_name_remap,
this_wiki_code = this_wiki_code,
title_types = title_types,
uncategorized_namespaces = uncategorized_namespaces,
uncategorized_subpages = uncategorized_subpages,
templates_using_volume = templates_using_volume,
templates_using_issue = templates_using_issue,
templates_not_using_page = templates_not_using_page,
inter_wiki_map = inter_wiki_map,
languages = languages,
}</text>
<sha1>gjexfahrqgzewtsoprniju9xkq1rnod</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/Date validation</title>
<ns>828</ns>
<id>42164542</id>
<revision>
<id>982806405</id>
<parentid>967295434</parentid>
<timestamp>2020-10-10T13:22:58Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="60957" xml:space="preserve">
--[[--------------------------&lt; F O R W A R D D E C L A R A T I O N S &gt;--------------------------------------
]]
local add_prop_cat, is_set, in_array, wrap_style; -- imported functions from selected Module:Citation/CS1/Utilities
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------&lt; F I L E - S C O P E D E C L A R A T I O N S &gt;--------------------------------
File-scope variables are declared here
]]
local lang_object = mw.getContentLanguage(); -- used by is_valid_accessdate(), is_valid_year(), date_name_xlate(); TODO: move to ~/Configuration?
local year_limit; -- used by is_valid_year()
--[=[-------------------------&lt; I S _ V A L I D _ A C C E S S D A T E &gt;----------------------------------------
returns true if:
Wikipedia start date &lt;= accessdate &lt; today + 2 days
Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time)
accessdate is the date provided in |access-date= at time 00:00:00 UTC
today is the current date at time 00:00:00 UTC plus 48 hours
if today is 2015-01-01T00:00:00 then
adding 24 hours gives 2015-01-02T00:00:00 – one second more than today
adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow
This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser
apparently doesn't understand non-English date month names. This function will always return false when the date
contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that
call this function with YYYY-MM-DD format dates.
]=]
local function is_valid_accessdate (accessdate)
local good1, good2;
local access_ts, tomorrow_ts; -- to hold Unix time stamps representing the dates
good1, access_ts = pcall (lang_object.formatDate, lang_object, 'U', accessdate ); -- convert accessdate value to Unix timestamp
good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow
if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which which tonumber() may not understand
access_ts = tonumber (access_ts) or lang_object:parseFormattedNumber (access_ts); -- convert to numbers for the comparison;
tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts);
else
return false; -- one or both failed to convert to Unix time stamp
end
if 979516800 &lt;= access_ts and access_ts &lt; tomorrow_ts then -- Wikipedia start date &lt;= accessdate &lt; tomorrow's date
return true;
else
return false; -- accessdate out of range
end
end
--[[--------------------------&lt; I S _ V A L I D _ E M B A R G O _ D A T E &gt;------------------------------------
returns true and date value if that value has proper dmy, mdy, ymd format.
returns false and 9999 (embargoed forever) when date value is not proper format; assumes that when |pmc-embargo-date= is
set, the editor intended to embargo a PMC but |pmc-embargo-date= does not hold a single date.
]]
local function is_valid_embargo_date (v)
if v:match ('^%d%d%d%d%-%d%d%-%d%d$') or -- ymd
v:match ('^%d%d?%s+%a+%s+%d%d%d%d$') or -- dmy
v:match ('^%a+%s+%d%d?%s*,%s*%d%d%d%d$') then -- mdy
return true, v;
end
return false, '9999'; -- if here not good date so return false and set embargo date to long time in future
end
--[[--------------------------&lt; G E T _ M O N T H _ N U M B E R &gt;----------------------------------------------
returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct.
If not a valid month, returns 0
]]
local function get_month_number (month)
return cfg.date_names['local'].long[month] or cfg.date_names['local'].short[month] or -- look for local names first
cfg.date_names['en'].long[month] or cfg.date_names['en'].short[month] or -- failing that, look for English names
0; -- not a recognized month name
end
--[[--------------------------&lt; G E T _ S E A S O N _ N U M B E R &gt;--------------------------------------------
returns a number according to the sequence of seasons in a year: 21 for Spring, etc. Capitalization and spelling
must be correct. If not a valid season, returns 0.
21-24 = Spring, Summer, Autumn, Winter, independent of “Hemisphere”
returns 0 when &lt;param&gt; is not |date=
Season numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/)
which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using
numbers 21-41. cs1|2 only supports generic seasons. EDTF does support the distinction between north and south
hemispere seasons but cs1|2 has no way to make that distinction.
These additional divisions not currently supported:
25-28 = Spring - Northern Hemisphere, Summer- Northern Hemisphere, Autumn - Northern Hemisphere, Winter - Northern Hemisphere
29-32 = Spring – Southern Hemisphere, Summer– Southern Hemisphere, Autumn – Southern Hemisphere, Winter - Southern Hemisphere
33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each)
37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each)
40-41 = Semestral 1, Semestral-2 (6 months each)
]]
local function get_season_number (season, param)
if 'date' ~= param then
return 0; -- season dates only supported by |date=
end
return cfg.date_names['local'].season[season] or -- look for local names first
cfg.date_names['en'].season[season] or -- failing that, look for English names
0; -- not a recognized season name
end
--[[--------------------------&lt; G E T _ Q U A R T E R _ N U M B E R &gt;------------------------------------------
returns a number according to the sequence of quarters in a year: 33 for first quarter, etc. Capitalization and spelling
must be correct. If not a valid quarter, returns 0.
33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each)
returns 0 when &lt;param&gt; is not |date=
Quarter numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/)
which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using
numbers 21-41. cs1|2 only supports generic seasons and quarters.
These additional divisions not currently supported:
37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each)
40-41 = Semestral 1, Semestral-2 (6 months each)
]]
local function get_quarter_number (quarter, param)
if 'date' ~= param then
return 0; -- quarter dates only supported by |date=
end
quarter = mw.ustring.gsub (quarter, ' +', ' '); -- special case replace multiple space chars with a single space char
return cfg.date_names['local'].quarter[quarter] or -- look for local names first
cfg.date_names['en'].quarter[quarter] or -- failing that, look for English names
0; -- not a recognized quarter name
end
--[[--------------------------&lt; G E T _ P R O P E R _ N A M E _ N U M B E R &gt;----------------------------------
returns a non-zero number if date contains a recognized proper-name. Capitalization and spelling must be correct.
returns 0 when &lt;param&gt; is not |date=
]]
local function get_proper_name_number (name, param)
if 'date' ~= param then
return 0; -- proper-name dates only supported by |date=
end
return cfg.date_names['local'].named[name] or -- look for local names dates first
cfg.date_names['en'].named[name] or -- failing that, look for English names
0; -- not a recognized named date
end
--[[--------------------------&lt; G E T _ E L E M E N T _ N U M B E R &lt;------------------------------------------
returns true if month or season or quarter or proper name is valid (properly spelled, capitalized, abbreviated)
]]
local function get_element_number (element, param)
local num;
local funcs = {get_month_number, get_season_number, get_quarter_number, get_proper_name_number}; -- list of functions to execute in order
for _, func in ipairs (funcs) do -- spin through the function list
num = func (element, param); -- call the function and get the returned number
if 0 ~= num then -- non-zero when valid month season quarter
return num; -- return that number
end
end
return nil; -- not valid
end
--[[--------------------------&lt; I S _ V A L I D _ Y E A R &gt;----------------------------------------------------
Function gets current year from the server and compares it to year from a citation parameter. Years more than one
year in the future are not acceptable.
]]
local function is_valid_year (year)
if not is_set(year_limit) then
year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once
end
year = tonumber (year) or lang_object:parseFormattedNumber (year); -- convert to numbers for the comparison;
return year and (year &lt;= year_limit) or false;
end
--[[--------------------------&lt; I S _ V A L I D _ D A T E &gt;----------------------------------------------------
Returns true if day is less than or equal to the number of days in month and year is no farther into the future
than next year; else returns false.
Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap
years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately
1923) dates are assumed to be Gregorian.
]]
local function is_valid_date (year, month, day)
local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
local month_length;
if not is_valid_year(year) then -- no farther into the future than next year
return false;
end
month = tonumber(month); -- required for YYYY-MM-DD dates
if (2 == month) then -- if February
month_length = 28; -- then 28 days unless
if 1582 &gt; tonumber(year) then -- Julian calendar
if 0 == (year%4) then -- is a leap year?
month_length = 29; -- if leap year then 29 days in February
end
else -- Gregorian calendar
if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400))) then -- is a leap year?
month_length = 29; -- if leap year then 29 days in February
end
end
else
month_length = days_in_month[month];
end
if tonumber (day) &gt; month_length then
return false;
end
return true;
end
--[[--------------------------&lt; I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E &gt;--------------------------
Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August.
There is a special test for May because it can be either short or long form.
Returns true when style for both months is the same
]]
local function is_valid_month_range_style (month1, month2)
local len1 = month1:len();
local len2 = month2:len();
if len1 == len2 then
return true; -- both months are short form so return true
elseif 'May' == month1 or 'May'== month2 then -- ToDo: I18N
return true; -- both months are long form so return true
elseif 3 == len1 or 3 == len2 then
return false; -- months are mixed form so return false
else
return true; -- both months are long form so return true
end
end
--[[--------------------------&lt; I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E &gt;------------------------
Check a pair of months or seasons to see if both are valid members of a month or season pair.
Month pairs are expected to be left to right, earliest to latest in time.
All season ranges are accepted as valid because there are publishers out there who have published a Summer–Spring YYYY issue, hence treat as ok
]]
local function is_valid_month_season_range(range_start, range_end, param)
local range_start_number = get_month_number (range_start);
local range_end_number;
if 0 == range_start_number then -- is this a month range?
range_start_number = get_season_number (range_start, param); -- not a month; is it a season? get start season number
range_end_number = get_season_number (range_end, param); -- get end season number
if (0 ~= range_start_number) and (0 ~= range_end_number) and (range_start_number ~= range_end_number) then
return true; -- any season pairing is accepted except when both are the same
end
return false; -- range_start and/or range_end is not a season
end
-- here when range_start is a month
range_end_number = get_month_number (range_end); -- get end month number
if range_start_number &lt; range_end_number then -- range_start is a month; does range_start precede range_end?
if is_valid_month_range_style (range_start, range_end) then -- do months have the same style?
return true; -- proper order and same style
end
end
return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month
end
--[[--------------------------&lt; M A K E _ C O I N S _ D A T E &gt;------------------------------------------------
This function receives a table of date parts for one or two dates and an empty table reference declared in
Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=&lt;value&gt; is
determined to be a valid date format. The question of what to do with invalid date formats is not answered here.
The date parts in the input table are converted to an ISO 8601 conforming date string:
single whole dates: yyyy-mm-dd
month and year dates: yyyy-mm
year dates: yyyy
ranges: yyyy-mm-dd/yyyy-mm-dd
yyyy-mm/yyyy-mm
yyyy/yyyy
Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from
Julian to Proleptic Gregorian.
The input table has:
year, year2 – always present; if before 1582, ignore months and days if present
month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 99 Christmas
day, day2 – 0 if not provided, 1-31 for days
the output table receives:
rftdate: an ISO 8601 formatted date
rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and proper-name dates)
rftssn: one of four season keywords: winter, spring, summer, fall (lowercase)
rftquarter: one of four values: 1, 2, 3, 4
]]
local function make_COinS_date (input, tCOinS_date)
local date; -- one date or first date in a range
local date2 = ''; -- end of range date
-- start temporary Julian / Gregorian calendar uncertainty detection
local year = tonumber(input.year); -- this temporary code to determine the extent of sources dated to the Julian/Gregorian
local month = tonumber(input.month); -- interstice 1 October 1582 – 1 January 1926
local day = tonumber (input.day);
if (0 ~= day) and -- day must have a value for this to be a whole date
(((1582 == year) and (10 &lt;= month) and (12 &gt;= month)) or -- any whole 1582 date from 1 October to 31 December or
((1926 == year) and (1 == month) and (1 == input.day)) or -- 1 January 1926 or
((1582 &lt; year) and (1925 &gt;= year))) then -- any date 1 January 1583 – 31 December 1925
tCOinS_date.inter_cal_cat = true; -- set category flag true
end
-- end temporary Julian / Gregorian calendar uncertainty detection
if 1582 &gt; tonumber(input.year) or 20 &lt; tonumber(input.month) then -- Julian calendar or season so &amp;rft.date gets year only
date = input.year;
if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year
date = string.format ('%.4d/%.4d', tonumber(input.year), tonumber(input.year2)) -- assemble the date range
end
if 20 &lt; tonumber(input.month) then -- if season or proper-name date
local season = {[24] = 'winter', [21] = 'spring', [22] = 'summer', [23] = 'fall', [33] = '1', [34] = '2', [35] = '3', [36] = '4', [98] = 'Easter', [99] = 'Christmas'}; -- seasons lowercase, no autumn; proper-names use title case
if 0 == input.month2 then -- single season date
if 40 &lt; tonumber(input.month) then
tCOinS_date.rftchron = season[input.month]; -- proper-name dates
elseif 30 &lt; tonumber(input.month) then
tCOinS_date.rftquarter = season[input.month]; -- quarters
else
tCOinS_date.rftssn = season[input.month]; -- seasons
end
else -- season range with a second season specified
if input.year ~= input.year2 then -- season year – season year range or season year–year
tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this?
if 0~= input.month2 then
tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2);
end
else -- season–season year range
tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this?
tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range
end
end
end
tCOinS_date.rftdate = date;
return; -- done
end
if 0 ~= input.day then
date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date
elseif 0 ~= input.month then
date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month
else
date = string.format ('%s', input.year); -- just year
end
if 0 ~= input.year2 then
if 0 ~= input.day2 then
date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date
elseif 0 ~= input.month2 then
date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month
else
date2 = string.format ('/%s', input.year2); -- just year
end
end
tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator
return;
end
--[[--------------------------&lt; P A T T E R N S &gt;--------------------------------------------------------------
this is the list of patterns for date formats that this module recognizes. Approximately the first half of these
patterns represent formats that might be reformatted into another format. Those that might be reformatted have
'indicator' letters that identify the content of the matching capture: 'd' (day), 'm' (month), 'a' (anchor year),
'y' (year); second day, month, year have a '2' suffix.
These patterns are used for both date validation and for reformatting. This table should not be moved to ~/Configuration
because changes to this table require changes to check_date() and to reformatter() and reformat_date()
]]
local patterns = {
-- year-initial numerical year-month-day
['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'},
-- month-initial: month day, year
['Mdy'] = {'^(%D-) +([1-9]%d?), +((%d%d%d%d?)%a?)$', 'm', 'd', 'a', 'y'},
-- month-initial day range: month day–day, year; days are separated by endash
['Md-dy'] = {'^(%D-) +([1-9]%d?)[%-–]([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'd2', 'a', 'y'},
-- day-initial: day month year
['dMy'] = {'^([1-9]%d?) +(%D-) +((%d%d%d%d?)%a?)$', 'd', 'm', 'a', 'y'},
-- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed; not supported at en.wiki
-- ['yMd'] = {'^((%d%d%d%d?)%a?) +(%D-) +(%d%d?)$', 'a', 'y', 'm', 'd'},
-- day-range-initial: day–day month year; days are separated by endash
['d-dMy'] = {'^([1-9]%d?)[%-–]([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'd2', 'm', 'a', 'y'},
-- day initial month-day-range: day month - day month year; uses spaced endash
['dM-dMy'] = {'^([1-9]%d?) +(%D-) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'd2', 'm2', 'a', 'y'},
-- month initial month-day-range: month day – month day, year; uses spaced endash
['Md-Mdy'] = {'^(%D-) +([1-9]%d?) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$','m', 'd', 'm2', 'd2', 'a', 'y'},
-- day initial month-day-year-range: day month year - day month year; uses spaced endash
['dMy-dMy'] = {'^([1-9]%d?) +(%D-) +(%d%d%d%d) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'y', 'd2', 'm2', 'a', 'y2'},
-- month initial month-day-year-range: month day, year – month day, year; uses spaced endash
['Mdy-Mdy'] = {'^(%D-) +([1-9]%d?), +(%d%d%d%d) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'y', 'm2', 'd2', 'a', 'y2'},
-- these date formats cannot be converted, per se, but month name can be rendered short or long
-- month/season year - month/season year; separated by spaced endash
['My-My'] = {'^(%D-) +(%d%d%d%d) +[%-–] +(%D-) +((%d%d%d%d)%a?)$', 'm', 'y', 'm2', 'a', 'y2'},
-- month/season range year; months separated by endash
['M-My'] = {'^(%D-)[%-–](%D-) +((%d%d%d%d)%a?)$', 'm', 'm2', 'a', 'y'},
-- month/season year or proper-name year; quarter year when First Quarter YYYY etc.
['My'] = {'^([^%d–]-) +((%d%d%d%d)%a?)$', 'm', 'a', 'y'}, -- this way because endash is a member of %D; %D- will match January–March 2019 when it shouldn't
-- these date formats cannot be converted
['Sy4-y2'] = {'^(%D-) +((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash
['Sy-y'] = {'^(%D-) +(%d%d%d%d)[%-–]((%d%d%d%d)%a?)$'}, -- special case Winter/Summer year-year; year separated with unspaced endash
['y-y'] = {'^(%d%d%d%d?)[%-–]((%d%d%d%d?)%a?)$'}, -- year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999
['y4-y2'] = {'^((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- year range: YYYY–YY; separated by unspaced endash
['y'] = {'^((%d%d%d%d?)%a?)$'}, -- year; here accept either YYY or YYYY
}
--[[--------------------------&lt; C H E C K _ D A T E &gt;----------------------------------------------------------
Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only
allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day
months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons
must be spelled correctly. Future years beyond next year are not allowed.
If the date fails the format tests, this function returns false and does not return values for anchor_year and
COinS_date. When this happens, the date parameter is (DEBUG: not?) used in the COinS metadata and the CITEREF identifier gets
its year from the year parameter if present otherwise CITEREF does not get a date value.
Inputs:
date_string - date string from date-holding parameters (date, year, publication-date, access-date, pmc-embargo-date, archive-date, lay-date)
Returns:
false if date string is not a real date; else
true, anchor_year, COinS_date
anchor_year can be used in CITEREF anchors
COinS_date is ISO 8601 format date; see make_COInS_date()
]]
local function check_date (date_string, param, tCOinS_date)
local year; -- assume that year2, months, and days are not used;
local year2 = 0; -- second year in a year range
local month = 0;
local month2 = 0; -- second month in a month range
local day = 0;
local day2 = 0; -- second day in a day range
local anchor_year;
local coins_date;
if date_string:match (patterns['ymd'][1]) then -- year-initial numerical year month day format
year, month, day = date_string:match (patterns['ymd'][1]);
if 12 &lt; tonumber(month) or 1 &gt; tonumber(month) or 1582 &gt; tonumber(year) or 0 == tonumber(day) then return false; end -- month or day number not valid or not Gregorian calendar
anchor_year = year;
elseif mw.ustring.match(date_string, patterns['Mdy'][1]) then -- month-initial: month day, year
month, day, anchor_year, year = mw.ustring.match(date_string, patterns['Mdy'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
elseif mw.ustring.match(date_string, patterns['Md-dy'][1]) then -- month-initial day range: month day–day, year; days are separated by endash
month, day, day2, anchor_year, year = mw.ustring.match(date_string, patterns['Md-dy'][1]);
if tonumber(day) &gt;= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same;
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
month2=month; -- for metadata
year2 = year;
elseif mw.ustring.match(date_string, patterns['dMy'][1]) then -- day-initial: day month year
day, month, anchor_year, year = mw.ustring.match(date_string, patterns['dMy'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
--[[ NOT supported at en.wiki
elseif mw.ustring.match(date_string, patterns['yMd'][1]) then -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed
anchor_year, year, month, day = mw.ustring.match(date_string, patterns['yMd'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
-- end NOT supported at en.wiki ]]
elseif mw.ustring.match(date_string, patterns['d-dMy'][1]) then -- day-range-initial: day–day month year; days are separated by endash
day, day2, month, anchor_year, year = mw.ustring.match(date_string, patterns['d-dMy'][1]);
if tonumber(day) &gt;= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same;
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
month2 = month; -- for metadata
year2 = year;
elseif mw.ustring.match(date_string, patterns['dM-dMy'][1]) then -- day initial month-day-range: day month - day month year; uses spaced endash
day, month, day2, month2, anchor_year, year = mw.ustring.match(date_string, patterns['dM-dMy'][1]);
if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later;
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
year2 = year;
elseif mw.ustring.match(date_string, patterns['Md-Mdy'][1]) then -- month initial month-day-range: month day – month day, year; uses spaced endash
month, day, month2, day2, anchor_year, year = mw.ustring.match(date_string, patterns['Md-Mdy'][1]);
if (not is_valid_month_season_range(month, month2, param)) or not is_valid_year(year) then return false; end
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
year2 = year;
elseif mw.ustring.match(date_string, patterns['dMy-dMy'][1]) then -- day initial month-day-year-range: day month year - day month year; uses spaced endash
day, month, year, day2, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns['dMy-dMy'][1]);
if tonumber(year2) &lt;= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
if 0 == month or 0 == month2 then return false; end -- both must be valid
elseif mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]) then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash
month, day, year, month2, day2, anchor_year, year2 = mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]);
if tonumber(year2) &lt;= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style
month = get_month_number (month); -- for metadata
month2 = get_month_number(month2);
if 0 == month or 0 == month2 then return false; end -- both must be valid
elseif mw.ustring.match(date_string, patterns['Sy4-y2'][1]) then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash
local century;
month, year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns['Sy4-y2'][1]);
if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer
anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years
year2 = century..year2; -- add the century to year2 for comparisons
if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
month = get_season_number(month, param);
elseif mw.ustring.match(date_string, patterns['Sy-y'][1]) then -- special case Winter/Summer year-year; year separated with unspaced endash
month, year, anchor_year, year2 = mw.ustring.match(date_string, patterns['Sy-y'][1]);
if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer
anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years
if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
month = get_season_number (month, param); -- for metadata
elseif mw.ustring.match(date_string, patterns['My-My'][1]) then -- month/season year - month/season year; separated by spaced endash
month, year, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns['My-My'][1]);
anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years
if tonumber(year) &gt;= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style
month = get_month_number(month);
month2 = get_month_number(month2);
elseif 0 ~= get_season_number(month, param) and 0 ~= get_season_number(month2, param) then -- both must be season year, not mixed
month = get_season_number(month, param);
month2 = get_season_number(month2, param);
else
return false;
end
elseif mw.ustring.match(date_string, patterns['M-My'][1]) then -- month/season range year; months separated by endash
month, month2, anchor_year, year = mw.ustring.match(date_string, patterns['M-My'][1]);
if (not is_valid_month_season_range(month, month2, param)) or (not is_valid_year(year)) then return false; end
if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season
month = get_month_number(month);
month2 = get_month_number(month2);
if 0 == month or 0 == month2 then return false; end
else
month = get_season_number(month, param);
month2 = get_season_number(month2, param);
end
year2 = year;
elseif mw.ustring.match(date_string, patterns['My'][1]) then -- month/season/quarter/proper-name year
month, anchor_year, year = mw.ustring.match(date_string, patterns['My'][1]);
if not is_valid_year(year) then return false; end
month = get_element_number(month, param); -- get month season quarter proper-name number or nil
if not month then return false; end -- not valid whatever it is
elseif mw.ustring.match(date_string, patterns['y-y'][1]) then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999
year, anchor_year, year2 = mw.ustring.match(date_string, patterns['y-y'][1]);
anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years
if tonumber(year) &gt;= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
elseif mw.ustring.match(date_string, patterns['y4-y2'][1]) then -- Year range: YYYY–YY; separated by unspaced endash
local century;
year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns['y4-y2'][1]);
anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years
if in_array (param, {'date', 'publication-date', 'year'}) then
add_prop_cat ('year_range_abbreviated');
end
if 13 &gt; tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003
year2 = century .. year2; -- add the century to year2 for comparisons
if tonumber(year) &gt;= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
elseif mw.ustring.match(date_string, patterns['y'][1]) then -- year; here accept either YYY or YYYY
anchor_year, year = mw.ustring.match(date_string, patterns['y'][1]);
if false == is_valid_year(year) then
return false;
end
else
return false; -- date format not one of the MOS:DATE approved formats
end
if 'access-date' == param then -- test accessdate here because we have numerical date parts
if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required
0 == year2 and 0 == month2 and 0 == day2 then -- none of these; accessdate must not be a range
if not is_valid_accessdate(year .. '-' .. month .. '-' .. day) then
return false; -- return false when accessdate out of bounds
end
else
return false; -- return false when accessdate is a range of two dates
end
end
local result=true; -- check whole dates for validity; assume true because not all dates will go through this test
if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date)
result = is_valid_date(year, month, day);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range)
result = is_valid_date(year, month, day);
result = result and is_valid_date(year, month, day2);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range)
result = is_valid_date(year, month, day);
result = result and is_valid_date(year, month2, day2);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range)
result = is_valid_date(year, month, day);
result = result and is_valid_date(year2, month2, day2);
end
if false == result then return false; end
if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values
make_COinS_date ({year = year, month = month, day = day, year2 = year2, month2 = month2, day2 = day2}, tCOinS_date); -- make an ISO 8601 date string for COinS
end
return true, anchor_year; -- format is good and date string represents a real date
end
--[[--------------------------&lt; D A T E S &gt;--------------------------------------------------------------------
Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns
true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in
the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes).
Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially,
parameters with errors are added to the &lt;error_list&gt; sequence table as the dates are tested.
]]
local function dates(date_parameters_list, tCOinS_date, error_list)
local anchor_year; -- will return as nil if the date being tested is not |date=
local COinS_date; -- will return as nil if the date being tested is not |date=
local embargo_date; -- if embargo date is a good dmy, mdy, ymd date then holds original value else reset to 9999
local good_date = false;
for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set(v.val) then -- if the parameter has a value
v.val = mw.ustring.gsub(v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9
if v.val:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year=
local year = v.val:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested
if 'date' == k then
anchor_year, COinS_date = v.val:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter
good_date = is_valid_year(year);
elseif 'year' == k then
good_date = is_valid_year(year);
end
elseif 'date' == k then -- if the parameter is |date=
if v.val:match("^n%.d%.%a?$") then -- ToDo: I18N -- if |date=n.d. with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((n%.d%.)%a?)"); -- ToDo: I18N -- "n.d."; no error when date parameter is set to no date
elseif v.val:match("^nd%a?$") then -- ToDo: I18N -- if |date=nd with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((nd)%a?)"); -- ToDo: I18N -- "nd"; no error when date parameter is set to no date
else
good_date, anchor_year, COinS_date = check_date (v.val, k, tCOinS_date); -- go test the date
end
elseif 'year' == k then -- if the parameter is |year= it should hold only a year value
if v.val:match("^[1-9]%d%d%d?%a?$") then -- if |year = 3 or 4 digits only with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((%d+)%a?)");
end
elseif 'pmc-embargo-date' == k then -- if the parameter is |pmc-embargo-date=
good_date = check_date (v.val, k); -- go test the date
if true == good_date then -- if the date is a valid date
good_date, embargo_date = is_valid_embargo_date (v.val); -- is |pmc-embargo-date= date a single dmy, mdy, or ymd formatted date? yes: returns embargo; no: returns 9999
end
else -- any other date-holding parameter
good_date = check_date (v.val, k); -- go test the date
end
if false == good_date then -- assemble one error message so we don't add the tracking category multiple times
table.insert (error_list, wrap_style ('parameter', v.name)); -- make parameter name suitable for error message list
end
end
end
return anchor_year, embargo_date; -- and done
end
--[[--------------------------&lt; Y E A R _ D A T E _ C H E C K &gt;------------------------------------------------
Compare the value provided in |year= with the year value(s) provided in |date=. This function returns a numeric value:
0 - year value does not match the year value in date
1 - (default) year value matches the year value in date or one of the year values when date contains two years
2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx)
]]
local function year_date_check (year_string, date_string)
local year;
local date1;
local date2;
local result = 1; -- result of the test; assume that the test passes
year = year_string:match ('(%d%d%d%d?)');
if date_string:match ('%d%d%d%d%-%d%d%-%d%d') and year_string:match ('%d%d%d%d%a') then --special case where both date and year are required YYYY-MM-DD and YYYYx
date1 = date_string:match ('(%d%d%d%d)');
year = year_string:match ('(%d%d%d%d)');
if year ~= date1 then
result = 0; -- years don't match
else
result = 2; -- years match; but because disambiguated, don't add to maint cat
end
elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard range formats of date with two three- or four-digit years
date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)");
if year ~= date1 and year ~= date2 then
result = 0;
end
elseif mw.ustring.match(date_string, "%d%d%d%d[%-–]%d%d") then -- YYYY-YY date ranges
local century;
date1, century, date2 = mw.ustring.match(date_string, "((%d%d)%d%d)[%-–]+(%d%d)");
date2 = century..date2; -- convert YY to YYYY
if year ~= date1 and year ~= date2 then
result = 0;
end
elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year
date1 = date_string:match ("(%d%d%d%d?)");
if year ~= date1 then
result = 0;
end
else
result = 0; -- no recognizable year in date
end
return result;
end
--[[--------------------------&lt; R E F O R M A T T E R &gt;--------------------------------------------------------
reformat 'date' into new format specified by format_param if pattern_idx (the current format of 'date') can be
reformatted. Does the grunt work for reformat_dates().
The table re_formats maps pattern_idx (current format) and format_param (desired format) to a table that holds:
format string used by string.format()
identifier letters ('d', 'm', 'y', 'd2', 'm2', 'y2') that serve as indexes into a table t{} that holds captures
from mw.ustring.match() for the various date parts specified by patterns[pattern_idx][1]
Items in patterns{} have the general form:
['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, where:
['ymd'] is pattern_idx
patterns['ymd'][1] is the match pattern with captures for mw.ustring.match()
patterns['ymd'][2] is an indicator letter identifying the content of the first capture
patterns['ymd'][3] ... the second capture etc.
when a pattern matches a date, the captures are loaded into table t{} in capture order using the idemtifier
characters as indexes into t{} For the above, a ymd date is in t{} as:
t.y = first capture (year), t.m = second capture (month), t.d = third capture (day)
To reformat, this function is called with the pattern_idx that matches the current format of the date and with
format_param set to the desired format. This function loads table t{} as described and then calls string.format()
with the format string specified by re_format[pattern_idx][format_param][1] using values taken from t{} according
to the capture identifier letters specified by patterns[pattern_idx][format_param][n] where n is 2..
]]
local re_formats = {
['ymd'] = { -- date format is ymd; reformat to:
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['Mdy'] = { -- date format is Mdy; reformat to:
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- for long/short reformatting
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['dMy'] = { -- date format is dMy; reformat to:
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['Md-dy'] = { -- date format is Md-dy; reformat to:
['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- for long/short reformatting
['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- |df=dmy -&gt; d-dMy
},
['d-dMy'] = { -- date format is d-d&gt;y; reformat to:
['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- |df=mdy -&gt; Md-dy
},
['dM-dMy'] = { -- date format is dM-dMy; reformat to:
['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- |df=mdy -&gt; Md-Mdy
},
['Md-Mdy'] = { -- date format is Md-Mdy; reformat to:
['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- for long/short reformatting
['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- |df=dmy -&gt; dM-dMy
},
['dMy-dMy'] = { -- date format is dMy-dMy; reformat to:
['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- for long/short reformatting
['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- |df=mdy -&gt; Mdy-Mdy
},
['Mdy-Mdy'] = { -- date format is Mdy-Mdy; reformat to:
['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- for long/short reformatting
['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- |df=dmy -&gt; dMy-dMy
},
['My-My'] = { -- these for long/short reformatting
['any'] = {'%s %s – %s %s', 'm', 'y', 'm2', 'y2'}, -- dmy/mdy agnostic
},
['M-My'] = { -- these for long/short reformatting
['any'] = {'%s–%s %s', 'm', 'm2', 'y'}, -- dmy/mdy agnostic
},
['My'] = { -- these for long/short reformatting
['any'] = {'%s %s', 'm', 'y'}, -- dmy/mdy agnostic
},
-- ['yMd'] = { -- not supported at en.wiki
-- ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
-- ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
-- ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- },
}
local function reformatter (date, pattern_idx, format_param, mon_len)
if not in_array (pattern_idx, {'ymd', 'Mdy', 'Md-dy', 'dMy', 'yMd', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then
return; -- not in this set of date format patterns then not a reformattable date
end
if 'ymd' == format_param and in_array (pattern_idx, {'ymd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then
return; -- ymd date ranges not supported at en.wiki; no point in reformatting ymd to ymd
end
if in_array (pattern_idx, {'My', 'M-My', 'My-My'}) then -- these are not dmy/mdy so can't be 'reformatted' into either
format_param = 'any'; -- so format-agnostic
end
-- yMd is not supported at en.wiki
-- if yMd is supported at your wiki, uncomment the next line
-- if 'yMd' == format_param and in_array (pattern_idx, {'yMd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy'}) then -- these formats not convertable; yMd not supported at en.wiki
-- if yMd is supported at your wiki, remove or comment-out the next line
if 'yMd' == format_param then -- yMd not supported at en.wiki
return; -- not a reformattable date
end
local c1, c2, c3, c4, c5, c6, c7; -- these hold the captures specified in patterns[pattern_idx][1]
c1, c2, c3, c4, c5, c6, c7 = mw.ustring.match (date, patterns[pattern_idx][1]); -- get the captures
local t = { -- table that holds k/v pairs of date parts from the captures and patterns[pattern_idx][2..]
[patterns[pattern_idx][2]] = c1; -- at minimum there is always one capture with a matching indicator letter
[patterns[pattern_idx][3] or 'x'] = c2; -- patterns can have a variable number of captures; each capture requires an indicator letter;
[patterns[pattern_idx][4] or 'x'] = c3; -- where there is no capture, there is no indicator letter so n in patterns[pattern_idx][n] will be nil;
[patterns[pattern_idx][5] or 'x'] = c4; -- the 'x' here spoofs an indicator letter to prevent 'table index is nil' error
[patterns[pattern_idx][6] or 'x'] = c5;
[patterns[pattern_idx][7] or 'x'] = c6;
[patterns[pattern_idx][8] or 'x'] = c7;
};
if t.a then -- if this date has an anchor year capture
t.y = t.a; -- use the anchor year capture when reassembling the date
end
if tonumber(t.m) then -- if raw month is a number (converting from ymd)
if 's' == mon_len then -- if we are to use abbreviated month names
t.m = cfg.date_names['inv_local_s'][tonumber(t.m)]; -- convert it to a month name
else
t.m = cfg.date_names['inv_local_l'][tonumber(t.m)]; -- convert it to a month name
end
t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present
elseif 'ymd' == format_param then -- when converting to ymd
if 1582 &gt; tonumber(t.y) then -- ymd format dates not allowed before 1582
return;
end
t.m = string.format ('%02d', get_month_number (t.m)); -- make sure that month and day are two digits
t.d = string.format ('%02d', t.d);
elseif mon_len then -- if mon_len is set to either 'short' or 'long'
for _, mon in ipairs ({'m', 'm2'}) do -- because there can be two month names, check both
if t[mon] then
t[mon] = get_month_number (t[mon]); -- get the month number for this month (is length agnostic)
if 0 == t[mon] then return; end -- seasons and named dates can't be converted
t[mon] = (('s' == mon_len) and cfg.date_names['inv_local_s'][t[mon]]) or cfg.date_names['inv_local_l'][t[mon]]; -- fetch month name according to length
end
end
end
local new_date = string.format (re_formats[pattern_idx][format_param][1], -- format string
t[re_formats[pattern_idx][format_param][2]], -- named captures from t{}
t[re_formats[pattern_idx][format_param][3]],
t[re_formats[pattern_idx][format_param][4]],
t[re_formats[pattern_idx][format_param][5]],
t[re_formats[pattern_idx][format_param][6]],
t[re_formats[pattern_idx][format_param][7]],
t[re_formats[pattern_idx][format_param][8]]
);
return new_date;
end
--[[-------------------------&lt; R E F O R M A T _ D A T E S &gt;--------------------------------------------------
Reformats existing dates into the format specified by format.
format is one of several manual keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The -all version includes
access- and archive-dates; otherwise these dates are not reformatted.
This function allows automatic date formatting. In ~/Configuration, the article source is searched for one of
the {{use xxx dates}} templates. If found, xxx becomes the global date format as xxx-all. If |cs1-dates= in
{{use xxx dates}} has legitimate value then that value determines how cs1|2 dates will be rendered. Legitimate
values for |cs1-dates= are:
l - all dates are rendered with long month names
ls - publication dates use long month names; access-/archive-dates use abbreviated month names
ly - publication dates use long month names; access-/archive-dates rendered in ymd format
s - all dates are rendered with abbreviated (short) month names
sy - publication dates use abbreviated month names; access-/archive-dates rendered in ymd format
y - all dates are rendered in ymd format
the format argument for automatic date formatting will be the format specified by {{use xxx dates}} with the
value supplied by |cs1-dates so one of: xxx-l, xxx-ls, xxx-ly, xxx-s, xxx-sy, xxx-y, or simply xxx (|cs1-dates=
empty, omitted, or invalid) where xxx shall be either of dmy or mdy.
dates are extracted from date_parameters_list, reformatted (if appropriate), and then written back into the
list in the new format. Dates in date_parameters_list are presumed here to be valid (no errors). This function
returns true when a date has been reformatted, false else. Actual reformatting is done by reformatter().
]]
local function reformat_dates (date_parameters_list, format)
local all = false; -- set to false to skip access- and archive-dates
local len_p = 'l'; -- default publication date length shall be long
local len_a = 'l'; -- default access-/archive-date length shall be long
local result = false;
local new_date;
if format:match('%a+%-all') then -- manual df keyword; auto df keyword when length not specified in {{use xxx dates}};
format = format:match('(%a+)%-all'); -- extract the format
all = true; -- all dates are long format dates because this keyword doesn't specify length
elseif format:match('%a+%-[lsy][sy]?') then -- auto df keywords; internal only
all = true; -- auto df applies to all dates; use length specified by capture len_p for all dates
format, len_p, len_a = format:match('(%a+)%-([lsy])([sy]?)'); -- extract the format and length keywords
if 'y' == len_p then -- because allowed by MOS:DATEUNIFY (sort of) range dates and My dates not reformatted
format = 'ymd'; -- override {{use xxx dates}}
elseif (not is_set(len_a)) or (len_p == len_a) then -- no access-/archive-date length specified or same length as publication dates then
len_a = len_p; -- in case len_a not set
end
end -- else only publication dates and they are long
for param_name, param_val in pairs (date_parameters_list) do -- for each date-holding parameter in the list
if is_set (param_val.val) then -- if the parameter has a value
if not (not all and in_array (param_name, {'access-date', 'archive-date'})) then -- skip access- or archive-date unless format is xxx-all; yeah, ugly; TODO: find a better way
for pattern_idx, pattern in pairs (patterns) do
if mw.ustring.match (param_val.val, pattern[1]) then
if all and in_array (param_name, {'access-date', 'archive-date'}) then -- if this date is an access- or archive-date
new_date = reformatter (param_val.val, pattern_idx, (('y' == len_a) and 'ymd') or format, len_a); -- choose ymd or dmy/mdy according to len_a setting
else -- all other dates
new_date = reformatter (param_val.val, pattern_idx, format, len_p);
end
if new_date then -- set when date was reformatted
date_parameters_list[param_name].val = new_date; -- update date in date list
result = true; -- and announce that changes have been made
end
end -- if
end -- for
end -- if
end -- if
end -- for
return result; -- declare boolean result and done
end
--[[--------------------------&lt; D A T E _ H Y P H E N _ T O _ D A S H &gt;----------------------------------------
Loops through the list of date-holding parameters and converts any hyphen to an ndash. Not called if the cs1|2
template has any date errors.
Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false.
]]
local function date_hyphen_to_dash (date_parameters_list)
local result = false;
local n;
for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set (param_val.val) then
if not mw.ustring.match (param_val.val, '%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates (ustring because here digits may not be Western)
param_val.val, n = param_val.val:gsub ('%-', '–'); -- replace any hyphen with ndash
if 0 ~= n then
date_parameters_list[param_name].val = param_val.val; -- update the list
result = true;
end
end
end
end
return result; -- so we know if any hyphens were replaced
end
--[[-------------------------&lt; D A T E _ N A M E _ X L A T E &gt;------------------------------------------------
Attempts to translate English month names to local-language month names using names supplied by MediaWiki's
date parser function. This is simple name-for-name replacement and may not work for all languages.
if xlat_dig is true, this function will also translate Western (English) digits to the local language's digits.
This will also translate ymd dates.
]]
local function date_name_xlate (date_parameters_list, xlt_dig)
local xlate;
local mode; -- long or short month names
local modified = false;
local date;
for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set(param_val.val) then -- if the parameter has a value
date = param_val.val;
for month in mw.ustring.gmatch (date, '%a+') do -- iterate through all dates in the date (single date or date range)
if cfg.date_names.en.long[month] then
mode = 'F'; -- English name is long so use long local name
elseif cfg.date_names.en.short[month] then
mode = 'M'; -- English name is short so use short local name
else
mode = nil; -- not an English month name; could be local language month name or an English season name
end
if mode then -- might be a season
xlate = lang_object:formatDate(mode, '1' .. month); -- translate the month name to this local language
date = mw.ustring.gsub (date, month, xlate); -- replace the English with the translation
date_parameters_list[param_name].val = date; -- save the translated date
modified = true;
end
end
if xlt_dig then -- shall we also translate digits?
date = date:gsub ('%d', cfg.date_names.xlate_digits); -- translate digits from Western to 'local digits'
date_parameters_list[param_name].val = date; -- save the translated date
modified = true;
end
end
end
return modified;
end
--[[--------------------------&lt; S E T _ S E L E C T E D _ M O D U L E S &gt;--------------------------------------
Sets local imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
add_prop_cat = utilities_page_ptr.add_prop_cat ; -- import functions from selected Module:Citation/CS1/Utilities module
is_set = utilities_page_ptr.is_set;
in_array = utilities_page_ptr.in_array;
-- set_message = utilities_page_ptr.set_message;
wrap_style = utilities_page_ptr.wrap_style;
cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return { -- return exported functions
dates = dates,
year_date_check = year_date_check,
reformat_dates = reformat_dates,
date_hyphen_to_dash = date_hyphen_to_dash,
date_name_xlate = date_name_xlate,
set_selected_modules = set_selected_modules
}</text>
<sha1>ds0l4tghd9b1ze47i4ysqzmmocnzkhm</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/Identifiers</title>
<ns>828</ns>
<id>48812124</id>
<revision>
<id>983287904</id>
<parentid>982806399</parentid>
<timestamp>2020-10-13T11:15:27Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="63553" xml:space="preserve">
--[[--------------------------&lt; F O R W A R D D E C L A R A T I O N S &gt;--------------------------------------
]]
local has_accept_as_written, is_set, in_array, set_message, select_one, -- functions in Module:Citation/CS1/Utilities
substitute, make_wikilink;
local z; -- table of tables defined in Module:Citation/CS1/Utilities
local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
--[[--------------------------&lt; P A G E S C O P E V A R I A B L E S &gt;--------------------------------------
declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here
]]
local auto_link_urls = {}; -- holds identifier URLs for those identifiers that can auto-link |title=
--============================&lt;&lt; H E L P E R F U N C T I O N S &gt;&gt;============================================
--[[--------------------------&lt; W I K I D A T A _ A R T I C L E _ N A M E _ G E T &gt;----------------------------
as an aid to internationalizing identifier-label wikilinks, gets identifier article names from Wikidata.
returns :&lt;lang code&gt;:&lt;article title&gt; when &lt;q&gt; has an &lt;article title&gt; for &lt;lang code&gt;; nil else
for identifiers that do not have q, returns nil
for wikis that do not have mw.wikibase installed, returns nil
]]
local function wikidata_article_name_get (q)
if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki
return nil; -- abandon
end
local wd_article;
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org
wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki
if wd_article then
wd_article = table.concat ({':', this_wiki_code, ':', wd_article}); -- interwiki-style link without brackets if taken from WD; leading colon required
end
return wd_article; -- article title from WD; nil else
end
--[[--------------------------&lt; L I N K _ L A B E L _ M A K E &gt;------------------------------------------------
common function to create identifier link label from handler table or from Wikidata
returns the first available of
1. redirect from local wiki's handler table (if enabled)
2. Wikidata (if there is a Wikidata entry for this identifier in the local wiki's language)
3. label specified in the local wiki's handler table
]]
local function link_label_make (handler)
local wd_article;
if not (cfg.use_identifier_redirects and is_set (handler.redirect)) then -- redirect has priority so if enabled and available don't fetch from Wikidata because expensive
wd_article = wikidata_article_name_get (handler.q); -- if Wikidata has an article title for this wiki, get it;
end
return (cfg.use_identifier_redirects and is_set (handler.redirect) and handler.redirect) or wd_article or handler.link;
end
--[[--------------------------&lt; E X T E R N A L _ L I N K _ I D &gt;----------------------------------------------
Formats a wiki-style external link
NB. Wikidata P1630 has a formatter URL with $1 placeholder for the ID which could be worked into our prefix/id/suffix
string, either overriding local definitions (auto-update) or as fallback for identifiers without local definitions.
But is expensive and could be risky if WD gets vandalized.
See Template_talk:Authority_control/Archive_8#Use_Wikidata_as_the_source_for_the_external_link
]]
local function external_link_id (options)
local url_string = options.id;
local ext_link;
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org
local wd_article; -- article title from Wikidata
if options.encode == true or options.encode == nil then
url_string = mw.uri.encode( url_string );
end
if options.auto_link and is_set (options.access) then
auto_link_urls[options.auto_link] = table.concat ({options.prefix, url_string, options.suffix});
end
ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki(options.id));
if is_set(options.access) then
ext_link = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[options.access].class, cfg.presentation[options.access].title, ext_link}); -- add the free-to-read / paywall lock
end
return table.concat ({
make_wikilink (link_label_make (options), options.label), -- redirect, Wikidata link, or locally specified link (in that order)
options.separator or '&amp;nbsp;',
ext_link
});
end
--[[--------------------------&lt; I N T E R N A L _ L I N K _ I D &gt;----------------------------------------------
Formats a wiki-style internal link
]]
local function internal_link_id(options)
local id = mw.ustring.gsub (options.id, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9
return table.concat (
{
make_wikilink (link_label_make (options), options.label), -- wiki-link the identifier label
options.separator or '&amp;nbsp;', -- add the separator
make_wikilink (
table.concat (
{
options.prefix,
id, -- translated to Western digits
options.suffix or ''
}),
substitute (cfg.presentation['bdi'], {'', mw.text.nowiki (options.id)}) -- bdi tags to prevent Latin script identifiers from being reversed at RTL language wikis
); -- nowiki because MediaWiki still has magic links for ISBN and the like; TODO: is it really required?
});
end
--[[--------------------------&lt; I S _ E M B A R G O E D &gt;------------------------------------------------------
Determines if a PMC identifier's online version is embargoed. Compares the date in |pmc-embargo-date= against today's date. If embargo date is
in the future, returns the content of |pmc-embargo-date=; otherwise, returns an empty string because the embargo has expired or because
|pmc-embargo-date= was not set in this cite.
]]
local function is_embargoed (embargo)
if is_set (embargo) then
local lang = mw.getContentLanguage();
local good1, embargo_date, todays_date;
good1, embargo_date = pcall (lang.formatDate, lang, 'U', embargo);
todays_date = lang:formatDate ('U');
if good1 then -- if embargo date is a good date
if tonumber (embargo_date) &gt;= tonumber (todays_date) then -- is embargo date is in the future?
return embargo; -- still embargoed
else
set_message ('maint_pmc_embargo'); -- embargo has expired; add main cat
return ''; -- unset because embargo has expired
end
end
end
return ''; -- |pmc-embargo-date= not set return empty string
end
--[=[-------------------------&lt; I S _ V A L I D _ B I O R X I V _ D A T E &gt;------------------------------------
returns true if:
2019-12-11T00:00Z &lt;= biorxiv_date &lt; today + 2 days
The dated form of biorxiv identifier has a start date of 2019-12-11. The Unix timestamp for that date is {{#time:U|2019-12-11}} = 1576022400
biorxiv_date is the date provided in those |biorxiv= parameter values that are dated at time 00:00:00 UTC
today is the current date at time 00:00:00 UTC plus 48 hours
if today is 2015-01-01T00:00:00 then
adding 24 hours gives 2015-01-02T00:00:00 – one second more than today
adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow
This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser
apparently doesn't understand non-English date month names. This function will always return false when the date
contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that
call this function with YYYY-MM-DD format dates.
]=]
local function is_valid_biorxiv_date (biorxiv_date)
local good1, good2;
local biorxiv_ts, tomorrow_ts; -- to hold Unix timestamps representing the dates
local lang_object = mw.getContentLanguage();
good1, biorxiv_ts = pcall (lang_object.formatDate, lang_object, 'U', biorxiv_date ); -- convert biorxiv_date value to Unix timestamp
good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow
if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which tonumber() may not understand
biorxiv_ts = tonumber (biorxiv_ts) or lang_object:parseFormattedNumber (biorxiv_ts); -- convert to numbers for the comparison;
tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts);
else
return false; -- one or both failed to convert to Unix timestamp
end
return ((1576022400 &lt;= biorxiv_ts) and (biorxiv_ts &lt; tomorrow_ts)) -- 2012-12-11T00:00Z &lt;= biorxiv_date &lt; tomorrow's date
end
--[[--------------------------&lt; IS _ V A L I D _ I S X N &gt;-----------------------------------------------------
ISBN-10 and ISSN validator code calculates checksum across all ISBN/ISSN digits including the check digit.
ISBN-13 is checked in isbn().
If the number is valid the result will be 0. Before calling this function, ISBN/ISSN must be checked for length
and stripped of dashes, spaces and other non-ISxN characters.
]]
local function is_valid_isxn (isxn_str, len)
local temp = 0;
isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58
len = len + 1; -- adjust to be a loop counter
for i, v in ipairs( isxn_str ) do -- loop through all of the bytes and calculate the checksum
if v == string.byte( "X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58)
temp = temp + 10*( len - i ); -- it represents 10 decimal
else
temp = temp + tonumber( string.char(v) )*(len-i);
end
end
return temp % 11 == 0; -- returns true if calculation result is zero
end
--[[--------------------------&lt; IS _ V A L I D _ I S X N _ 1 3 &gt;-----------------------------------------------
ISBN-13 and ISMN validator code calculates checksum across all 13 ISBN/ISMN digits including the check digit.
If the number is valid, the result will be 0. Before calling this function, ISBN-13/ISMN must be checked for length
and stripped of dashes, spaces and other non-ISxN-13 characters.
]]
local function is_valid_isxn_13 (isxn_str)
local temp=0;
isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39
for i, v in ipairs( isxn_str ) do
temp = temp + (3 - 2*(i % 2)) * tonumber( string.char(v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit
end
return temp % 10 == 0; -- sum modulo 10 is zero when ISBN-13/ISMN is correct
end
--[[--------------------------&lt; N O R M A L I Z E _ L C C N &gt;--------------------------------------------------
LCCN normalization (http://www.loc.gov/marc/lccn-namespace.html#normalization)
1. Remove all blanks.
2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash.
3. If there is a hyphen in the string:
a. Remove it.
b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out):
1. All these characters should be digits, and there should be six or less. (not done in this function)
2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six.
Returns a normalized LCCN for lccn() to validate. There is no error checking (step 3.b.1) performed in this function.
]]
local function normalize_lccn (lccn)
lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace
if nil ~= string.find (lccn, '/') then
lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it
end
local prefix
local suffix
prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix
if nil ~= suffix then -- if there was a hyphen
suffix = string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6
lccn = prefix..suffix; -- reassemble the LCCN
end
return lccn;
end
--============================&lt;&lt; I D E N T I F I E R F U N C T I O N S &gt;&gt;====================================
--[[--------------------------&lt; A R X I V &gt;--------------------------------------------------------------------
See: http://arxiv.org/help/arxiv_identifier
format and error check arXiv identifier. There are three valid forms of the identifier:
the first form, valid only between date codes 9107 and 0703, is:
arXiv:&lt;archive&gt;.&lt;class&gt;/&lt;date code&gt;&lt;number&gt;&lt;version&gt;
where:
&lt;archive&gt; is a string of alpha characters - may be hyphenated; no other punctuation
&lt;class&gt; is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form
&lt;date code&gt; is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01
first digit of YY for this form can only 9 and 0
&lt;number&gt; is a three-digit number
&lt;version&gt; is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented)
the second form, valid from April 2007 through December 2014 is:
arXiv:&lt;date code&gt;.&lt;number&gt;&lt;version&gt;
where:
&lt;date code&gt; is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01
&lt;number&gt; is a four-digit number
&lt;version&gt; is a 1 or more digit number preceded with a lowercase v; no spaces
the third form, valid from January 2015 is:
arXiv:&lt;date code&gt;.&lt;number&gt;&lt;version&gt;
where:
&lt;date code&gt; and &lt;version&gt; are as defined for 0704-1412
&lt;number&gt; is a five-digit number
]]
local function arxiv (id, class)
local handler = cfg.id_handlers['ARXIV'];
local year, month, version;
local err_cat = false; -- assume no error message
local text; -- output text
if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9107-0703 format with or without version
year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((not (90 &lt; year or 8 &gt; year)) or (1 &gt; month or 12 &lt; month)) or -- if invalid year or invalid month
((91 == year and 7 &gt; month) or (7 == year and 3 &lt; month)) then -- if years ok, are starting and ending months ok?
err_cat = true; -- flag for error message
end
elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 with or without version
year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((7 &gt; year) or (14 &lt; year) or (1 &gt; month or 12 &lt; month)) or -- is year invalid or is month invalid? (doesn't test for future years)
((7 == year) and (4 &gt; month)) then -- when year is 07, is month invalid (before April)?
err_cat = true; -- flag for error message
end
elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format with or without version
year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((15 &gt; year) or (1 &gt; month or 12 &lt; month)) then -- is year invalid or is month invalid? (doesn't test for future years)
err_cat = true; -- flag for error message
end
else
err_cat = true; -- not a recognized format; flag for error message
end
err_cat = err_cat and table.concat ({' ', set_message ('err_bad_arxiv')}) or ''; -- set error message if flag is true
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat;
if is_set (class) then
if id:match ('^%d+') then
text = table.concat ({text, ' [[//arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink
else
text = table.concat ({text, ' ', set_message ('err_class_ignored')});
end
end
return text;
end
--[[--------------------------&lt; B I B C O D E &gt;--------------------------------------------------------------------
Validates (sort of) and formats a bibcode ID.
Format for bibcodes is specified here: http://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes
But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters
and first four digits must be a year. This function makes these tests:
length must be 19 characters
characters in position
1–4 must be digits and must represent a year in the range of 1000 – next year
5 must be a letter
6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &amp;. )
9–18 must be letter, digit, or dot
19 must be a letter or dot
]]
local function bibcode (id, access)
local handler = cfg.id_handlers['BIBCODE'];
local err_type;
local year;
local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode,
access = access});
if 19 ~= id:len() then
err_type = cfg.err_msg_supl.length;
else
year = id:match ("^(%d%d%d%d)[%a][%w&amp;%.][%w&amp;%.][%w&amp;%.][%w.]+[%a%.]$");
if not year then -- if nil then no pattern match
err_type = cfg.err_msg_supl.value; -- so value error
else
local next_year = tonumber(os.date ('%Y')) + 1; -- get the current year as a number and add one for next year
year = tonumber (year); -- convert year portion of bibcode to a number
if (1000 &gt; year) or (year &gt; next_year) then
err_type = cfg.err_msg_supl.year; -- year out of bounds
end
if id:find('&amp;%.') then
err_type = cfg.err_msg_supl.journal; -- journal abbreviation must not have '&amp;.' (if it does it's missing a letter)
end
end
end
if is_set (err_type) then -- if there was an error detected
text = text .. ' ' .. set_message( 'err_bad_bibcode', {err_type});
end
return text;
end
--[[--------------------------&lt; B I O R X I V &gt;-----------------------------------------------------------------
Format bioRxiv ID and do simple error checking. Before 2019-12-11, biorXiv IDs were 10.1101/ followed by exactly
6 digits. After 2019-12-11, biorXiv IDs retained the six-digit identifier but prefixed that with a yyyy.mm.dd.
date and suffixed with an optional version identifier.
The bioRxiv ID is the string of characters:
https://doi.org/10.1101/078733 -&gt; 10.1101/078733
or a date followed by a six-digit number followed by an optional version indicator 'v' and one or more digits:
https://www.biorxiv.org/content/10.1101/2019.12.11.123456v2 -&gt; 10.1101/2019.12.11.123456v2
see https://www.biorxiv.org/about-biorxiv
]]
local function biorxiv(id)
local handler = cfg.id_handlers['BIORXIV'];
local err_cat = true; -- flag; assume that there will be an error
local patterns = {
'^10.1101/%d%d%d%d%d%d$', -- simple 6-digit identifier (before 2019-12-11)
'^10.1101/(20[1-9]%d)%.([01]%d)%.([0-3]%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (after 2019-12-11)
'^10.1101/(20[1-9]%d)%.([01]%d)%.([0-3]%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (after 2019-12-11)
}
for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match
if id:match (pattern) then
local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier
if m then -- m is nil when id is the six-digit form
if not is_valid_biorxiv_date (y .. '-' .. m .. '-' .. d) then -- validate the encoded date; TODO: don't ignore leap-year and actual month lengths ({{#time:}} is a poor date validator)
break; -- date fail; break out early so we don't unset the error message
end
end
err_cat = nil; -- we found a match so unset the error message
break; -- and done
end
end -- err_cat remains set here when no match
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator,
encode = handler.encode, access = handler.access}) .. (err_cat and (' ' .. set_message( 'err_bad_biorxiv')) or '');
end
--[[--------------------------&lt; C I T E S E E R X &gt;------------------------------------------------------------
CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org).
The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure
]]
local function citeseerx (id)
local handler = cfg.id_handlers['CITESEERX'];
local matched;
local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode,
access = handler.access});
matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$");
if not matched then
text = text .. ' ' .. set_message( 'err_bad_citeseerx' );
end
return text;
end
--[[--------------------------&lt; D O I &gt;------------------------------------------------------------------------
Formats a DOI and checks for DOI errors.
DOI names contain two parts: prefix and suffix separated by a forward slash.
Prefix: directory indicator '10.' followed by a registrant code
Suffix: character string of any length chosen by the registrant
This function checks a DOI name for: prefix/suffix. If the DOI name contains spaces or endashes, or, if it ends
with a period or a comma, this function will emit a bad_doi error message.
DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash,
and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely
if ever used in DOI names.
]]
local function doi (id, inactive, access, ignore_invalid)
local err_cat;
local handler = cfg.id_handlers['DOI'];
local text;
if is_set (inactive) then
local inactive_year = inactive:match("%d%d%d%d") or ''; -- try to get the year portion from the inactive date
local inactive_month, good;
if is_set (inactive_year) then
if 4 &lt; inactive:len() then -- inactive date has more than just a year (could be anything)
local lang_obj = mw.getContentLanguage(); -- get a language object for this wiki
good, inactive_month = pcall (lang_obj.formatDate, lang_obj, 'F', inactive); -- try to get the month name from the inactive date
if not good then
inactive_month = nil; -- something went wrong so make sure this is unset
end
end
else
inactive_year = nil; -- |doi-broken-date= has something but it isn't a date
end
if is_set(inactive_year) and is_set (inactive_month) then
set_message ('maint_doi_inactive_dated', {inactive_year, inactive_month, ' '});
elseif is_set(inactive_year) then
set_message ('maint_doi_inactive_dated', {inactive_year, '', ''});
else
set_message ('maint_doi_inactive');
end
inactive = " (" .. cfg.messages['inactive'] .. ' ' .. inactive .. ')';
end
local registrant = id:match ('^10%.([^/]+)/[^%s–]-[^%.,]$'); -- registrant set when DOI has the proper basic form
local registrant_err_patterns = { -- these patterns are for code ranges that are not supported
'^[^1-3]%d%d%d%d%.%d%d*$', -- 5 digits with subcode (0xxxx, 40000+); accepts: 10000–39999
'^[^1-4]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 40000+); accepts: 10000–49999
'^[^1-9]%d%d%d%.%d%d*$', -- 4 digits with subcode (0xxx); accepts: 1000–9999
'^[^1-9]%d%d%d$', -- 4 digits without subcode (0xxx); accepts: 1000–9999
'^%d%d%d%d%d%d+', -- 6 or more digits
'^%d%d?%d?$', -- less than 4 digits without subcode (with subcode is legitimate)
'^5555$', -- test registrant will never resolve
'%s', -- any space character in registrant
}
if not ignore_invalid then
if registrant then -- when DOI has proper form
for i, pattern in ipairs (registrant_err_patterns) do -- spin through error patterns
if registrant:match (pattern) then -- to validate registrant codes
err_cat = ' ' .. set_message ('err_bad_doi'); -- when found, mark this DOI as bad
break; -- and done
end
end
else
err_cat = ' ' .. set_message ('err_bad_doi'); -- invalid directory or malformed
end
else
set_message ('maint_doi_ignore');
end
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access,
auto_link = not (err_cat or is_set (inactive) or ignore_invalid) and 'doi' or nil -- do not auto-link when |doi-broken-date= has a value or when there is a DOI error or (to play it safe, after all, auto-linking is not essential) when invalid DOIs are ignored
}) .. (inactive or '');
return text .. (err_cat and err_cat or ''); -- parentheses required
end
--[[--------------------------&lt; H D L &gt;------------------------------------------------------------------------
Formats an HDL with minor error checking.
HDL names contain two parts: prefix and suffix separated by a forward slash.
Prefix: character string using any character in the UCS-2 character set except '/'
Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant
This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends
with a period or a comma, this function will emit a bad_hdl error message.
HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and
terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely
if ever used in HDLs.
Query string parameters are named here: http://www.handle.net/proxy_servlet.html. query strings are not displayed
but since '?' is an allowed character in an HDL, '?' followed by one of the query parameters is the only way we
have to detect the query string so that it isn't URL-encoded with the rest of the identifier.
]]
local function hdl(id, access)
local handler = cfg.id_handlers['HDL'];
local query_params = { -- list of known query parameters from http://www.handle.net/proxy_servlet.html
'noredirect',
'ignore_aliases',
'auth',
'cert',
'index',
'type',
'urlappend',
'locatt',
'action',
}
local hdl, suffix, param = id:match ('(.-)(%?(%a+).+)$'); -- look for query string
local found;
if hdl then -- when there are query strings, this is the handle identifier portion
for _, q in ipairs (query_params) do -- spin through the list of query parameters
if param:match ('^' .. q) then -- if the query string begins with one of the parameters
found = true; -- announce a find
break; -- and stop looking
end
end
end
if found then
id = hdl; -- found so replace id with the handle portion; this will be URL-encoded, suffix will not
else
suffix = ''; -- make sure suffix is empty string for concatenation else
end
local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, suffix = suffix, separator = handler.separator, encode = handler.encode, access = access})
if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- HDL must contain a forward slash, must not contain spaces, endashes, and must not end with period or comma
text = text .. ' ' .. set_message( 'err_bad_hdl' );
end
return text;
end
--[[--------------------------&lt; I S B N &gt;----------------------------------------------------------------------
Determines whether an ISBN string is valid
]]
local function isbn (isbn_str, ignore_invalid)
local handler = cfg.id_handlers['ISBN'];
local function return_result (check, err_type) -- local function to handle the various returns
local ISBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect,
prefix = handler.prefix, id = isbn_str, separator = handler.separator});
if ignore_invalid then -- if ignoring ISBN errors
set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error
else -- here when not ignoring
if not check then -- and there is an error
return ISBN .. set_message ('err_bad_isbn', {err_type}, false, ' '); -- display an error message
end
end
return ISBN;
end
if nil ~= isbn_str:match ('[^%s-0-9X]') then
return return_result (false, cfg.err_msg_supl.char); -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X
end
local id = isbn_str:gsub ('[%s-]', ''); -- remove hyphens and whitespace
local len = id:len();
if len ~= 10 and len ~= 13 then
return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length
end
if len == 10 then
if id:match ('^%d*X?$') == nil then -- fail if isbn_str has 'X' anywhere but last position
return return_result (false, cfg.err_msg_supl.form);
end
return return_result (is_valid_isxn(id, 10), cfg.err_msg_supl.check);
else
if id:match ('^%d+$') == nil then
return return_result (false, cfg.err_msg_supl.char); -- fail if ISBN-13 is not all digits
end
if id:match ('^97[89]%d*$') == nil then
return return_result (false, cfg.err_msg_supl.prefix); -- fail when ISBN-13 does not begin with 978 or 979
end
if id:match ('^9790') then
return return_result (false, cfg.err_msg_supl.group); -- group identifier '0' is reserved to ISMN
end
return return_result (is_valid_isxn_13 (id), cfg.err_msg_supl.check);
end
end
--[[--------------------------&lt; A S I N &gt;----------------------------------------------------------------------
Formats a link to Amazon. Do simple error checking: ASIN must be mix of 10 numeric or uppercase alpha
characters. If a mix, first character must be uppercase alpha; if all numeric, ASINs must be 10-digit
ISBN. If 10-digit ISBN, add a maintenance category so a bot or AWB script can replace |asin= with |isbn=.
Error message if not 10 characters, if not ISBN-10, if mixed and first character is a digit.
|asin=630....... is (apparently) not a legitimate ISBN though it checksums as one; these do not cause this
function to emit the maint_asin message
This function is positioned here because it calls isbn()
]]
local function asin (id, domain)
local err_cat = ""
if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then
err_cat = ' ' .. set_message ('err_bad_asin'); -- ASIN is not a mix of 10 uppercase alpha and numeric characters
else
if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X)
if isbn (id) then -- see if ASIN value is or validates as ISBN-10
if not id:find ('^630') then -- 630xxxxxxx is (apparently) not a valid isbn prefix but is used by amazon as a numeric identifier
set_message ('maint_asin'); -- begins with something other than 630 so possibly an isbn
end
elseif not is_set (err_cat) then
err_cat = ' ' .. set_message ('err_bad_asin'); -- ASIN is not ISBN-10
end
elseif not id:match("^%u[%d%u]+$") then
err_cat = ' ' .. set_message ('err_bad_asin'); -- asin doesn't begin with uppercase alpha
end
end
if not is_set(domain) then
domain = "com";
elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom
domain = "co." .. domain;
elseif in_array (domain, {'au', 'br', 'mx'}) then -- Australia, Brazil, Mexico
domain = "com." .. domain;
end
local handler = cfg.id_handlers['ASIN'];
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix .. domain .. "/dp/",
id = id, encode = handler.encode, separator = handler.separator}) .. err_cat;
end
--[[--------------------------&lt; I S M N &gt;----------------------------------------------------------------------
Determines whether an ISMN string is valid. Similar to ISBN-13, ISMN is 13 digits beginning 979-0-... and uses the
same check digit calculations. See http://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf
section 2, pages 9–12.
]]
local function ismn (id)
local handler = cfg.id_handlers['ISMN'];
local text;
local valid_ismn = true;
local id_copy;
id_copy = id; -- save a copy because this testing is destructive
id = id:gsub ('[%s-]', ''); -- remove hyphens and white space
if 13 ~= id:len() or id:match( "^9790%d*$" ) == nil then -- ISMN must be 13 digits and begin with 9790
valid_ismn = false;
else
valid_ismn=is_valid_isxn_13 (id); -- validate ISMN
end
-- text = internal_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- use this (or external version) when there is some place to link to
-- prefix = handler.prefix, id = id_copy, separator = handler.separator, encode = handler.encode})
text = table.concat ( -- because no place to link to yet
{
make_wikilink (link_label_make (handler), handler.label),
handler.separator,
id_copy
});
if false == valid_ismn then
text = text .. ' ' .. set_message( 'err_bad_ismn' ) -- add an error message if the ISMN is invalid
end
return text;
end
--[[--------------------------&lt; I S S N &gt;----------------------------------------------------------------------
Validate and format an ISSN. This code fixes the case where an editor has included an ISSN in the citation but
has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked
like this:
|issn=0819 4327 gives: [http://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link
This code now prevents that by inserting a hyphen at the ISSN midpoint. It also validates the ISSN for length
and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters
other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check ISSN error message. The
ISSN is always displayed with a hyphen, even if the ISSN was given as a single group of 8 digits.
]]
local function issn (id, e, ignore_invalid)
local issn_copy = id; -- save a copy of unadulterated ISSN; use this version for display if ISSN does not validate
local handler;
local text;
local valid_issn = true;
handler = cfg.id_handlers[e and 'EISSN' or 'ISSN'];
id = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace
if 8 ~= id:len() or nil == id:match( "^%d*X?$" ) then -- validate the ISSN: 8 digits long, containing only 0-9 or X in the last position
valid_issn = false; -- wrong length or improper character
else
valid_issn = is_valid_isxn(id, 8); -- validate ISSN
end
if true == valid_issn then
id = string.sub( id, 1, 4 ) .. "-" .. string.sub( id, 5 ); -- if valid, display correctly formatted version
else
id = issn_copy; -- if not valid, show the invalid ISSN with error message
end
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode})
if ignore_invalid then
set_message ('maint_issn_ignore');
else
if false == valid_issn then
text = text .. ' ' .. set_message ('err_bad_issn', e and 'e' or ''); -- add an error message if the ISSN is invalid
end
end
return text
end
--[[--------------------------&lt; J F M &gt;-----------------------------------------------------------------------
A numerical identifier in the form nn.nnnn.nn
]]
local function jfm (id)
local handler = cfg.id_handlers['JFM'];
local id_num;
local err_cat = '';
id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier
if is_set (id_num) then
set_message ('maint_jfm_format');
else -- plain number without mr prefix
id_num = id; -- if here id does not have prefix
end
if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then
id = id_num; -- jfm matches pattern
else
err_cat = ' ' .. set_message( 'err_bad_jfm' ); -- set an error message
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat;
end
--[[--------------------------&lt; L C C N &gt;----------------------------------------------------------------------
Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of
the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits.
http://info-uri.info/registry/OAIHandler?verb=GetRecord&amp;metadataPrefix=reg&amp;identifier=info:lccn/
length = 8 then all digits
length = 9 then lccn[1] is lowercase alpha
length = 10 then lccn[1] and lccn[2] are both lowercase alpha or both digits
length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lowercase alpha or both digits
length = 12 then lccn[1] and lccn[2] are both lowercase alpha
]]
local function lccn(lccn)
local handler = cfg.id_handlers['LCCN'];
local err_cat = ''; -- presume that LCCN is valid
local id = lccn; -- local copy of the LCCN
id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes)
local len = id:len(); -- get the length of the LCCN
if 8 == len then
if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits)
err_cat = ' ' .. set_message ('err_bad_lccn'); -- set an error message
end
elseif 9 == len then -- LCCN should be adddddddd
if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern?
err_cat = ' ' .. set_message ('err_bad_lccn'); -- set an error message
end
elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd
if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ...
if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern
err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message
end
end
elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd
if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns
err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message
end
elseif 12 == len then -- LCCN should be aadddddddddd
if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern
err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message
end
else
err_cat = ' ' .. set_message ('err_bad_lccn'); -- wrong length, set an error message
end
if not is_set (err_cat) and nil ~= lccn:find ('%s') then
err_cat = ' ' .. set_message ('err_bad_lccn'); -- lccn contains a space, set an error message
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = lccn, separator = handler.separator, encode = handler.encode}) .. err_cat;
end
--[[--------------------------&lt; M R &gt;--------------------------------------------------------------------------
A seven digit number; if not seven digits, zero-fill leading digits to make seven digits.
]]
local function mr (id)
local handler = cfg.id_handlers['MR'];
local id_num;
local id_len;
local err_cat = '';
id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix
if is_set (id_num) then
set_message ('maint_mr_format'); -- add maint cat
else -- plain number without mr prefix
id_num = id:match ('^%d+$'); -- if here id is all digits
end
id_len = id_num and id_num:len() or 0;
if (7 &gt;= id_len) and (0 ~= id_len) then
id = string.rep ('0', 7-id_len ) .. id_num; -- zero-fill leading digits
else
err_cat = ' ' .. set_message ('err_bad_mr'); -- set an error message
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat;
end
--[[--------------------------&lt; O C L C &gt;----------------------------------------------------------------------
Validate and format an OCLC ID. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}}
archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html
]]
local function oclc (id)
local handler = cfg.id_handlers['OCLC'];
local number;
local err_msg = ''; -- empty string for concatenation
if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters)
number = id:match('ocm(%d+)'); -- get the number
elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters)
number = id:match('ocn(%d+)'); -- get the number
elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters)
number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number
elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field
number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number
if 9 &lt; number:len() then
number = nil; -- constrain to 1 to 9 digits; change this when OCLC issues 10-digit numbers
end
elseif id:match('^%d+$') then -- no prefix
number = id; -- get the number
if 10 &lt; number:len() then
number = nil; -- constrain to 1 to 10 digits; change this when OCLC issues 11-digit numbers
end
end
if number then -- proper format
id = number; -- exclude prefix, if any, from external link
else
err_msg = ' ' .. set_message ('err_bad_oclc') -- add an error message if the id is malformed
end
local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_msg;
return text;
end
--[[--------------------------&lt; O P E N L I B R A R Y &gt;--------------------------------------------------------
Formats an OpenLibrary link, and checks for associated errors.
]]
local function openlibrary(id, access)
local handler = cfg.id_handlers['OL'];
local ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- strip optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W';
local error_msg = '';
local prefix = { -- these are appended to the handler.prefix according to code
['A']='authors/OL',
['M']='books/OL',
['W']='works/OL',
['X']='OL' -- not a code; spoof when 'code' in id is invalid
};
if not ident then
code = 'X'; -- no code or id completely invalid
ident = id; -- copy id to ident so that we display the flawed identifier
error_msg = ' ' .. set_message ('err_bad_ol');
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix .. prefix[code],
id = ident, separator = handler.separator, encode = handler.encode,
access = access}) .. error_msg;
end
--[[--------------------------&lt; P M C &gt;------------------------------------------------------------------------
Format a PMC, do simple error checking, and check for embargoed articles.
The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not
be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the
PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix.
PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation
has |pmc=&lt;value&gt; but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed ()
returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string.
PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less
than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued.
]]
local function pmc (id, embargo)
local handler = cfg.id_handlers['PMC'];
local err_cat;
local id_num;
local text;
id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with PMC prefix
if is_set (id_num) then
set_message ('maint_pmc_format');
else -- plain number without PMC prefix
id_num = id:match ('^%d+$'); -- if here id is all digits
end
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 1 &gt; id_num or handler.id_limit &lt; id_num then -- if PMC is outside test limit boundaries
err_cat = ' ' .. set_message ('err_bad_pmc'); -- set an error message
else
id = tostring (id_num); -- make sure id is a string
end
else -- when id format incorrect
err_cat = ' ' .. set_message ('err_bad_pmc'); -- set an error message
end
if is_set (embargo) and is_set (is_embargoed (embargo)) then -- is PMC is still embargoed?
text = table.concat ( -- still embargoed so no external link
{
make_wikilink (link_label_make (handler), handler.label),
handler.separator,
id,
(err_cat and err_cat or '') -- parens required
});
else
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- no embargo date or embargo has expired, ok to link to article
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access,
auto_link = not err_cat and 'pmc' or nil -- do not auto-link when PMC has error
}) .. (err_cat and err_cat or ''); -- parentheses required
end
return text;
end
--[[--------------------------&lt; P M I D &gt;----------------------------------------------------------------------
Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This
code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable
test_limit will need to be updated periodically as more PMIDs are issued.
]]
local function pmid(id)
local handler = cfg.id_handlers['PMID'];
local err_cat = ''; -- presume that PMID is valid
if id:match("[^%d]") then -- if PMID has anything but digits
err_cat = ' ' .. set_message ('err_bad_pmid'); -- set an error message
else -- PMID is only digits
local id_num = tonumber(id); -- convert id to a number for range testing
if 1 &gt; id_num or handler.id_limit &lt; id_num then -- if PMID is outside test limit boundaries
err_cat = ' ' .. set_message ('err_bad_pmid'); -- set an error message
end
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat;
end
--[[--------------------------&lt; S 2 C I D &gt;--------------------------------------------------------------------
Format an S2CID, do simple error checking
S2CIDs are sequential numbers beginning at 1 and counting up. This code checks the S2CID to see that it is only
digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically
as more S2CIDs are issued.
]]
local function s2cid (id, access)
local handler = cfg.id_handlers['S2CID'];
local err_cat = ''; -- presume that S2CID is valid
local id_num;
local text;
id_num = id:match ('^[1-9]%d*$'); -- id must be all digits; must not begin with 0; no open access flag
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if handler.id_limit &lt; id_num then -- if S2CID is outside test limit boundaries
err_cat = ' ' .. set_message ('bad_s2cid_err'); -- set an error message
end
else -- when id format incorrect
err_cat = ' ' .. set_message ('bad_s2cid_err'); -- set an error message
end
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id:gsub ('%.%a%a', ''), separator = handler.separator, encode = handler.encode, access = access}) .. err_cat;
return text;
end
--[[--------------------------&lt; S B N &gt;------------------------------------------------------------------------
9-digit form of ISBN-10; uses same check-digit validation when SBN is prefixed with an additional '0' to make 10 digits
]]
local function sbn (id, ignore_invalid)
local handler = cfg.id_handlers['SBN'];
local function return_result (check, err_type) -- local function to handle the various returns
local SBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator});
if not ignore_invalid then -- if not ignoring SBN errors
if not check then
return SBN .. set_message ('err_bad_sbn', {err_type}, false, ' '); -- display an error message
end
else
set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error (ToDo: Possibly switch to separate message for SBNs only)
end
return SBN;
end
if id:match ('[^%s-0-9X]') then
return return_result (false, cfg.err_msg_supl.char); -- fail if SBN contains anything but digits, hyphens, or the uppercase X
end
local ident = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace; they interfere with the rest of the tests
if 9 ~= ident:len() then
return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length
end
if ident:match ('^%d*X?$') == nil then
return return_result (false, cfg.err_msg_supl.form); -- fail if SBN has 'X' anywhere but last position
end
return return_result (is_valid_isxn ('0' .. ident, 10), cfg.err_msg_supl.check);
end
--[[--------------------------&lt; S S R N &gt;----------------------------------------------------------------------
Format an SSRN, do simple error checking
SSRNs are sequential numbers beginning at 100? and counting up. This code checks the SSRN to see that it is
only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need
to be updated periodically as more SSRNs are issued.
]]
local function ssrn (id)
local handler = cfg.id_handlers['SSRN'];
local err_cat = ''; -- presume that SSRN is valid
local id_num;
local text;
id_num = id:match ('^%d+$'); -- id must be all digits
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 100 &gt; id_num or handler.id_limit &lt; id_num then -- if SSRN is outside test limit boundaries
err_cat = ' ' .. set_message ('err_bad_ssrn'); -- set an error message
end
else -- when id format incorrect
err_cat = ' ' .. set_message ('err_bad_ssrn'); -- set an error message
end
text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat;
return text;
end
--[[--------------------------&lt; U S E N E T _ I D &gt;------------------------------------------------------------
Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in
'&lt;' and/or '&gt;' angle brackets.
]]
local function usenet_id (id)
local handler = cfg.id_handlers['USENETID'];
local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode})
if not id:match('^.+@.+$') or not id:match('^[^&lt;].*[^&gt;]$') then -- doesn't have '@' or has one or first or last character is '&lt; or '&gt;'
text = text .. ' ' .. set_message ('err_bad_usenet_id') -- add an error message if the message id is invalid
end
return text
end
--[[--------------------------&lt; Z B L &gt;-----------------------------------------------------------------------
A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional
format described here: http://emis.mi.sanu.ac.rs/ZMATH/zmath/en/help/search/
temporary format is apparently eight digits. Anything else is an error
]]
local function zbl (id)
local handler = cfg.id_handlers['ZBL'];
local err_cat = '';
if id:match('^%d%d%d%d%d%d%d%d$') then -- is this identifier using temporary format?
set_message ('maint_zbl'); -- yes, add maint cat
elseif not id:match('^%d?%d?%d?%d%.%d%d%d%d%d$') then -- not temporary, is it normal format?
err_cat = ' ' .. set_message ('err_bad_zbl'); -- no, set an error message
end
return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect,
prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat;
end
--============================&lt;&lt; I N T E R F A C E F U N C T I O N S &gt;&gt;==========================================
--[[--------------------------&lt; B U I L D _ I D _ L I S T &gt;--------------------------------------------------------
Takes a table of IDs created by extract_ids() and turns it into a table of formatted ID outputs.
inputs:
id_list – table of identifiers built by extract_ids()
options – table of various template parameter values used to modify some manually handled identifiers
]]
local function build_id_list( id_list, options )
local new_list, handler = {};
local accept;
local function fallback(k) return { __index = function(t,i) return cfg.id_handlers[k][i] end } end;
for k, v in pairs( id_list ) do
v, accept = has_accept_as_written (v); -- remove and note accept-as-written markup if present
-- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
-- fallback to read-only cfg
handler = setmetatable( { ['id'] = v, ['access'] = options.IdAccessLevels[k] }, fallback(k) );
if handler.mode == 'external' then
table.insert( new_list, {handler.label, external_link_id( handler ) } );
elseif handler.mode == 'internal' then
table.insert( new_list, {handler.label, internal_link_id( handler ) } );
elseif handler.mode ~= 'manual' then
error( cfg.messages['unknown_ID_mode'] );
elseif k == 'ARXIV' then
table.insert( new_list, {handler.label, arxiv( v, options.Class ) } );
elseif k == 'ASIN' then
table.insert( new_list, {handler.label, asin( v, options.ASINTLD ) } );
elseif k == 'BIBCODE' then
table.insert( new_list, {handler.label, bibcode( v, handler.access ) } );
elseif k == 'BIORXIV' then
table.insert( new_list, {handler.label, biorxiv( v ) } );
elseif k == 'CITESEERX' then
table.insert( new_list, {handler.label, citeseerx( v ) } );
elseif k == 'DOI' then
table.insert( new_list, {handler.label, doi( v, options.DoiBroken, handler.access, accept) } );
elseif k == 'EISSN' then
table.insert( new_list, {handler.label, issn( v, true, accept) } ); -- true distinguishes EISSN from ISSN
elseif k == 'HDL' then
table.insert( new_list, {handler.label, hdl( v, handler.access ) } );
elseif k == 'ISBN' then
table.insert( new_list, {handler.label, isbn (v, (accept or options.IgnoreISBN)) } );
elseif k == 'ISMN' then
table.insert( new_list, {handler.label, ismn( v ) } );
elseif k == 'ISSN' then
table.insert( new_list, {handler.label, issn( v, false, accept) } );
elseif k == 'JFM' then
table.insert( new_list, {handler.label, jfm( v ) } );
elseif k == 'LCCN' then
table.insert( new_list, {handler.label, lccn( v ) } );
elseif k == 'MR' then
table.insert( new_list, {handler.label, mr( v ) } );
elseif k == 'OCLC' then
table.insert( new_list, {handler.label, oclc( v ) } );
elseif k == 'OL' or k == 'OLA' then
table.insert( new_list, {handler.label, openlibrary( v, handler.access ) } );
elseif k == 'PMC' then
table.insert( new_list, {handler.label, pmc( v, options.Embargo ) } );
elseif k == 'PMID' then
table.insert( new_list, {handler.label, pmid( v ) } );
elseif k == 'S2CID' then
table.insert( new_list, {handler.label, s2cid( v, handler.access ) } );
elseif k == 'SBN' then
table.insert( new_list, {handler.label, sbn (v, accept) } );
elseif k == 'SSRN' then
table.insert( new_list, {handler.label, ssrn( v ) } );
elseif k == 'USENETID' then
table.insert( new_list, {handler.label, usenet_id( v ) } );
elseif k == 'ZBL' then
table.insert( new_list, {handler.label, zbl( v ) } );
else
error( cfg.messages['unknown_manual_ID'] );
end
end
local function comp( a, b ) -- used in following table.sort()
return a[1]:lower() &lt; b[1]:lower();
end
table.sort( new_list, comp );
for k, v in ipairs( new_list ) do
new_list[k] = v[2];
end
return new_list;
end
--[[--------------------------&lt; E X T R A C T _ I D S &gt;------------------------------------------------------------
Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for
any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to
the identifier list. Emits redundant error message if more than one alias exists in args
]]
local function extract_ids( args )
local id_list = {}; -- list of identifiers found in args
for k, v in pairs( cfg.id_handlers ) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
v = select_one( args, v.parameters, 'err_redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present
if is_set(v) then id_list[k] = v; end -- if found in args, add identifier to our list
end
return id_list;
end
--[[--------------------------&lt; E X T R A C T _ I D _ A C C E S S _ L E V E L S &gt;--------------------------------------
Fetches custom id access levels from arguments using configuration settings.
Parameters which have a predefined access level (e.g. arxiv) do not use this
function as they are directly rendered as free without using an additional parameter.
access-level values must match the case used in cfg.keywords_lists['id-access'] (lowercase unless there is some special reason for something else)
]]
local function extract_id_access_levels( args, id_list )
local id_accesses_list = {};
for k, v in pairs( cfg.id_handlers ) do
local access_param = v.custom_access; -- name of identifier's access-level parameter
if is_set(access_param) then
local access_level = args[access_param]; -- get the assigned value if there is one
if is_set (access_level) then
if not in_array (access_level, cfg.keywords_lists['id-access']) then -- exact match required
table.insert( z.message_tail, { set_message( 'invalid_param_val', {access_param, access_level}, true ) } );
access_level = nil; -- invalid so unset
end
if not is_set(id_list[k]) then -- identifier access-level must have a matching identifier
table.insert( z.message_tail, { set_message( 'err_param_access_requires_param', {k:lower()}, true ) } ); -- parameter name is uppercase in cfg.id_handlers (k); lowercase for error message
end
id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword
end
end
end
return id_accesses_list;
end
--[[--------------------------&lt; S E T _ S E L E C T E D _ M O D U L E S &gt;--------------------------------------
Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
cfg = cfg_table_ptr;
has_accept_as_written = utilities_page_ptr.has_accept_as_written; -- import functions from select Module:Citation/CS1/Utilities module
is_set = utilities_page_ptr.is_set;
in_array = utilities_page_ptr.in_array;
set_message = utilities_page_ptr.set_message;
select_one = utilities_page_ptr.select_one;
substitute = utilities_page_ptr.substitute;
make_wikilink = utilities_page_ptr.make_wikilink;
z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
auto_link_urls = auto_link_urls, -- table of identifier URLs to be used when auto-linking |title=
build_id_list = build_id_list,
extract_ids = extract_ids,
extract_id_access_levels = extract_id_access_levels,
is_embargoed = is_embargoed;
set_selected_modules = set_selected_modules;
}</text>
<sha1>eg0zw6ttx0ztqphkrm52zj5q2aqmp0n</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/Utilities</title>
<ns>828</ns>
<id>48808487</id>
<revision>
<id>982806394</id>
<parentid>935243617</parentid>
<timestamp>2020-10-10T13:22:53Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="19220" xml:space="preserve">
local z = {
error_categories = {}; -- for categorizing citations that contain errors
error_ids = {};
message_tail = {};
maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance
};
--[[--------------------------&lt; F O R W A R D D E C L A R A T I O N S &gt;--------------------------------------
]]
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------&lt; H A S _ A C C E P T _ A S _ W R I T T E N &gt;------------------------------------
when &lt;str&gt; is wholly wrapped in accept-as-written markup, return &lt;str&gt; without markup and true; return &lt;str&gt; and false else
with allow_empty = false, &lt;str&gt; must have at least one character inside the markup
with allow_empty = true, &lt;str&gt; the markup frame can be empty like (()) to distinguish an empty template parameter from the specific condition "has no applicable value" in citation-context.
After futher evaluation the two cases might be merged at a later stage, but should be kept separated for now.
]]
local function has_accept_as_written (str, allow_empty)
local count;
if true == allow_empty then
str, count = str:gsub ('^%(%((.*)%)%)$', '%1'); -- allows (()) to be an empty set
else
str, count = str:gsub ('^%(%((.+)%)%)$', '%1');
end
return str, 0 ~= count;
end
--[[--------------------------&lt; I S _ S E T &gt;------------------------------------------------------------------
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------&lt; I N _ A R R A Y &gt;--------------------------------------------------------------
Whether needle is in haystack
]]
local function in_array( needle, haystack )
if needle == nil then
return false;
end
for n,v in ipairs( haystack ) do
if v == needle then
return n;
end
end
return false;
end
--[[--------------------------&lt; S U B S T I T U T E &gt;----------------------------------------------------------
Populates numbered arguments in a message string using an argument table.
]]
local function substitute( msg, args )
return args and mw.message.newRawMessage( msg, args ):plain() or msg;
end
--[[--------------------------&lt; E R R O R _ C O M M E N T &gt;----------------------------------------------------
Wraps error messages with CSS markup according to the state of hidden.
]]
local function error_comment( content, hidden )
return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content );
end
--[=[-------------------------&lt; M A K E _ W I K I L I N K &gt;----------------------------------------------------
Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only
link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an
empty string.
]=]
local function make_wikilink (link, display)
if is_set (link) then
if is_set (display) then
return table.concat ({'[[', link, '|', display, ']]'});
else
return table.concat ({'[[', link, ']]'});
end
else
return '';
end
end
--[[--------------------------&lt; S E T _ M E S S A G E &gt;----------------------------------------------------------
Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is
the responsibility of the calling function.
TODO: change z.error_categories and z.maintenance_cats to have the form cat_name = true; to avoid dups without having to have an extra cat
]]
local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats; TODO: figure out how to delete this table
local function set_message (error_id, arguments, raw, prefix, suffix)
local error_state = cfg.error_conditions[error_id];
prefix = prefix or "";
suffix = suffix or "";
if error_state == nil then
error( cfg.messages['undefined_error'] .. ': ' .. error_id ); -- because missing error handler in Module:Citation/CS1/Configuration
elseif is_set (error_state.category) then
if error_state.message then -- when error_state.message defined, this is an error message
table.insert( z.error_categories, error_state.category );
else
if not added_maint_cats[error_id] then
added_maint_cats[error_id] = true; -- note that we've added this category
table.insert (z.maintenance_cats, substitute (error_state.category, arguments)); -- make cat name then add to table
end
return; -- because no message, nothing more to do
end
end
local message = substitute( error_state.message, arguments );
message = table.concat (
{
message,
' (',
make_wikilink (
table.concat (
{
cfg.messages['help page link'],
'#',
error_state.anchor
}),
cfg.messages['help page label']),
')'
});
z.error_ids[error_id] = true;
if z.error_ids['err_citation_missing_title'] and -- if missing-title error already noted
in_array (error_id, {'err_bare_url_missing_title', 'err_trans_missing_title'}) then -- and this error is one of these
return '', false; -- don't bother because one flavor of missing title is sufficient
end
message = table.concat ({ prefix, message, suffix });
if raw == true then
return message, error_state.hidden;
end
return error_comment (message, error_state.hidden);
end
--[[-------------------------&lt; I S _ A L I A S _ U S E D &gt;-----------------------------------------------------
This function is used by select_one() to determine if one of a list of alias parameters is in the argument list
provided by the template.
Input:
args – pointer to the arguments table from calling template
alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration
index – for enumerated parameters, identifies which one
enumerated – true/false flag used to choose how enumerated aliases are examined
value – value associated with an alias that has previously been selected; nil if not yet selected
selected – the alias that has previously been selected; nil if not yet selected
error_list – list of aliases that are duplicates of the alias already selected
Returns:
value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected
selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected
]]
local function is_alias_used (args, alias, index, enumerated, value, selected, error_list)
if enumerated then -- is this a test for an enumerated parameters?
alias = alias:gsub ('#', index); -- replace '#' with the value in index
else
alias = alias:gsub ('#', ''); -- remove '#' if it exists
end
if is_set(args[alias]) then -- alias is in the template's argument list
if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases
local skip;
for _, v in ipairs(error_list) do -- spin through the error list to see if we've added this alias
if v == alias then
skip = true;
break; -- has been added so stop looking
end
end
if not skip then -- has not been added so
table.insert( error_list, alias ); -- add error alias to the error list
end
else
value = args[alias]; -- not yet selected an alias, so select this one
selected = alias;
end
end
return value, selected; -- return newly selected alias, or previously selected alias
end
--[[--------------------------&lt; A D D _ M A I N T _ C A T &gt;------------------------------------------------------
Adds a category to z.maintenance_cats using names from the configuration file with additional text if any.
To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats.
]]
local function add_maint_cat (key, arguments)
if not added_maint_cats [key] then
added_maint_cats [key] = true; -- note that we've added this category
table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table
end
end
--[[--------------------------&lt; A D D _ P R O P _ C A T &gt;--------------------------------------------------------
Adds a category to z.properties_cats using names from the configuration file with additional text if any.
foreign_lang_source and foreign_lang_source_2 keys have a language code appended to them so that multiple languages
may be categorized but multiples of the same language are not categorized.
added_prop_cats is a table declared in page scope variables above
]]
local added_prop_cats = {}; -- list of property categories that have been added to z.properties_cats
local function add_prop_cat (key, arguments)
if not added_prop_cats [key] then
added_prop_cats [key] = true; -- note that we've added this category
key = key:gsub ('(foreign_lang_source_?2?)%a%a%a?[%a%-]*', '%1'); -- strip lang code from keyname
table.insert( z.properties_cats, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table
end
end
--[[--------------------------&lt; S A F E _ F O R _ I T A L I C S &gt;----------------------------------------------
Protects a string that will be wrapped in wiki italic markup '' ... ''
Note: We cannot use &lt;i&gt; for italics, as the expected behavior for italics specified by ''...'' in the title is that
they will be inverted (i.e. unitalicized) in the resulting references. In addition, &lt;i&gt; and '' tend to interact
poorly under Mediawiki's HTML tidy.
]]
local function safe_for_italics( str )
if not is_set(str) then
return str;
else
if str:sub(1,1) == "'" then str = "&lt;span&gt;&lt;/span&gt;" .. str; end
if str:sub(-1,-1) == "'" then str = str .. "&lt;span&gt;&lt;/span&gt;"; end
-- Remove newlines as they break italics.
return str:gsub( '\n', ' ' );
end
end
--[[--------------------------&lt; W R A P _ S T Y L E &gt;----------------------------------------------------------
Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one
argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason
this function is similar to but separate from wrap_msg().
]]
local function wrap_style (key, str)
if not is_set( str ) then
return "";
elseif in_array( key, { 'italic-title', 'trans-italic-title' } ) then
str = safe_for_italics( str );
end
return substitute( cfg.presentation[key], {str} );
end
--[[--------------------------&lt; M A K E _ S E P _ L I S T &gt;------------------------------------------------------------
make a separated list of items using provided separators.
&lt;sep_list&gt; - typically '&lt;comma&gt;&lt;space&gt;'
&lt;sep_list_pair&gt; - typically '&lt;space&gt;and&lt;space&gt;'
&lt;sep_list_end&gt; - typically '&lt;comma&gt;&lt;space&gt;and&lt;space&gt;' or '&lt;comma&gt;&lt;space&gt;&amp;&lt;space&gt;'
defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end']
if &lt;sep_list_end&gt; is specified, &lt;sep_list&gt; and &lt;sep_list_pair&gt; must also be supplied
]]
local function make_sep_list (count, list_seq, sep_list, sep_list_pair, sep_list_end)
local list = '';
if not sep_list then -- set the defaults
sep_list = cfg.presentation['sep_list'];
sep_list_pair = cfg.presentation['sep_list_pair'];
sep_list_end = cfg.presentation['sep_list_end'];
end
if 2 &gt;= count then
list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item
elseif 2 &lt; count then
list = table.concat (list_seq, sep_list, 1, count-1); -- concatenate all but last item with plain list separator
list = table.concat ({list, list_seq[count]}, sep_list_end); -- concatenate last item onto end of &lt;list&gt; with final separator
end
return list;
end
--[[--------------------------&lt; S E L E C T _ O N E &gt;----------------------------------------------------------
Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just
names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified
by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'.
Because enumerated parameter |&lt;param&gt;1= is an alias of |&lt;param&gt;= we must test for both possibilities.
Generates an error if more than one match is present.
]]
local function select_one (args, aliases_list, error_condition, index)
local value = nil; -- the value assigned to the selected parameter
local selected = ''; -- the name of the parameter we have chosen
local error_list = {};
if index ~= nil then index = tostring(index); end
for _, alias in ipairs( aliases_list ) do -- for each alias in the aliases list
if alias:match ('#') then -- if this alias can be enumerated
if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases
value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias
end
value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias
else
value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); --test for non-enumerated alias
end
end
if #error_list &gt; 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names()
for i, v in ipairs (error_list) do
error_list[i] = wrap_style ('parameter', v);
end
table.insert (error_list, wrap_style ('parameter', selected));
table.insert (z.message_tail, {set_message (error_condition, {make_sep_list (#error_list, error_list)}, true)});
end
return value, selected;
end
--[=[-------------------------&lt; R E M O V E _ W I K I _ L I N K &gt;----------------------------------------------
Gets the display text from a wikilink like [[A|B]] or [[B]] gives B
The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup).
In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims whitespace from the label
if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match
in the initial gsub, the replacement function l() doesn't get called.
]=]
local function remove_wiki_link (str)
return (str:gsub( "%[%[([^%[%]]*)%]%]", function(l)
return l:gsub( "^[^|]*|(.*)$", "%1" ):gsub("^%s*(.-)%s*$", "%1");
end));
end
--[=[-------------------------&lt; I S _ W I K I L I N K &gt;--------------------------------------------------------
Determines if str is a wikilink, extracts, and returns the wikilink type, link text, and display text parts.
If str is a complex wikilink ([[L|D]]):
returns wl_type 2 and D and L from [[L|D]];
if str is a simple wikilink ([[D]])
returns wl_type 1 and D from [[D]] and L as empty string;
if not a wikilink:
returns wl_type 0, str as D, and L as empty string.
trims leading and trailing whitespace and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and
treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes).
]=]
local function is_wikilink (str)
local D, L
local wl_type = 2; -- assume that str is a complex wikilink [[L|D]]
if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content)
return 0, str, ''; -- not a wikilink; return wl_type as 0, str as D, and empty string as L
end
L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]]
if not is_set (D) then -- if no separate display
D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]]
wl_type = 1;
end
D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters
return wl_type, D, L or '';
end
--[[--------------------------&lt; S T R I P _ A P O S T R O P H E _ M A R K U P &gt;--------------------------------
Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata.
This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to
markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind.
Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag
to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was
removed; returns the argument and nil when no markup removed
]]
local function strip_apostrophe_markup (argument)
if not is_set (argument) then
return argument, nil; -- no argument, nothing to do
end
if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit.
return argument, nil;
end
local flag;
while true do
if argument:find ( "'''''", 1, true ) then -- bold italic (5)
argument, flag=argument:gsub("%'%'%'%'%'", ""); -- remove all instances of it
elseif argument:find ( "''''", 1, true ) then -- italic start and end without content (4)
argument, flag=argument:gsub("%'%'%'%'", "");
elseif argument:find ( "'''", 1, true ) then -- bold (3)
argument, flag=argument:gsub("%'%'%'", "");
elseif argument:find ( "''", 1, true ) then -- italic (2)
argument, flag=argument:gsub("%'%'", "");
else
break;
end
end
return argument, flag; -- done
end
--[[--------------------------&lt; S E T _ S E L E C T E D _ M O D U L E S &gt;--------------------------------------
Sets local cfg table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr)
cfg = cfg_table_ptr;
end
--[[--------------------------&lt; E X P O R T S &gt;----------------------------------------------------------------
]]
return {
add_maint_cat = add_maint_cat, -- exported functions
add_prop_cat = add_prop_cat,
error_comment = error_comment,
has_accept_as_written = has_accept_as_written,
in_array = in_array,
is_set = is_set,
is_wikilink = is_wikilink,
make_sep_list = make_sep_list,
make_wikilink = make_wikilink,
remove_wiki_link = remove_wiki_link,
safe_for_italics = safe_for_italics,
select_one = select_one,
set_message = set_message,
set_selected_modules = set_selected_modules,
strip_apostrophe_markup = strip_apostrophe_markup,
substitute = substitute,
wrap_style = wrap_style,
z = z, -- exported table
}</text>
<sha1>rnxgdpjx6jrhyzx5bolqb5kyqlzkqoq</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/Whitelist</title>
<ns>828</ns>
<id>39013723</id>
<revision>
<id>982806412</id>
<parentid>967154988</parentid>
<timestamp>2020-10-10T13:23:00Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="15875" xml:space="preserve">
--[[--------------------------&lt; S U P P O R T E D P A R A M E T E R S &gt;--------------------------------------
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported. remove entirely
]]
local basic_arguments = {
['accessdate'] = true,
['access-date'] = true,
['agency'] = true,
['archivedate'] = true,
['archive-date'] = true,
['archive-format'] = true,
['archiveurl'] = true,
['archive-url'] = true,
['article'] = true,
['article-format'] = true,
['article-url'] = true,
['article-url-access'] = true,
['arxiv'] = true, -- cite arxiv; here because allowed in cite ... as identifier
['asin'] = true,
['ASIN'] = true,
['asin-tld'] = true,
['at'] = true,
['author'] = true,
['author-first'] = true,
['author-given'] = true,
['author-last'] = true,
['author-surname'] = true,
['authorlink'] = true,
['author-link'] = true,
['authormask'] = false, -- deprecated
['author-mask'] = true,
['authors'] = true,
['bibcode'] = true,
['bibcode-access'] = true,
['biorxiv'] = true, -- cite biorxiv; here because allowed in cite ... as identifier
['booktitle'] = true,
['book-title'] = true,
['cartography'] = true,
['chapter'] = true,
['chapter-format'] = true,
['chapterurl'] = true,
['chapter-url'] = true,
['chapter-url-access'] = true,
['citeseerx'] = true, -- cite citeseerx; here because allowed in cite ... as identifier
['collaboration'] = true,
['conference'] = true,
['conference-format'] = true,
['conferenceurl'] = true,
['conference-url'] = true,
['contribution'] = true,
['contribution-format'] = true,
['contributionurl'] = true,
['contribution-url'] = true,
['contribution-url-access'] = true,
['contributor'] = true,
['contributor-first'] = true,
['contributor-given'] = true,
['contributor-last'] = true,
['contributor-surname'] = true,
['contributor-link'] = true,
['contributor-mask'] = true,
['date'] = true,
['degree'] = true,
['department'] = true,
['df'] = true,
['dictionary'] = true,
['displayauthors'] = false, -- deprecated
['display-authors'] = true,
['display-contributors'] = true,
['display-editors'] = true,
['display-interviewers'] = true,
['display-subjects'] = true,
['display-translators'] = true,
['docket'] = true,
['doi'] = true,
['DOI'] = true,
['doi-access'] = true,
['doi-broken-date'] = true,
['edition'] = true,
['editor'] = true,
['editor-first'] = true,
['editor-given'] = true,
['editor-last'] = true,
['editor-surname'] = true,
['editorlink'] = false, -- deprecated
['editor-link'] = true,
['editor-mask'] = true,
['editors'] = false, -- deprecated
['eissn'] = true,
['EISSN'] = true,
['encyclopaedia'] = true,
['encyclopedia'] = true,
['entry'] = true,
['entry-format'] = true,
['entry-url'] = true,
['entry-url-access'] = true,
['eprint'] = true, -- cite arxiv; here because allowed in cite ... as identifier
['event'] = true,
['event-format'] = true,
['eventurl'] = true,
['event-url'] = true,
['first'] = true,
['format'] = true,
['given'] = true,
['hdl'] = true,
['HDL'] = true,
['hdl-access'] = true,
['host'] = true,
['id'] = true,
['ID'] = true,
['ignore-isbn-error'] = false, -- deprecated
['institution'] = true,
['interviewer'] = true,
['interviewer-first'] = true,
['interviewer-given'] = true,
['interviewer-last'] = true,
['interviewer-surname'] = true,
['interviewer-link'] = true,
['interviewer-mask'] = true,
['isbn'] = true,
['ISBN'] = true,
['isbn13'] = true,
['ISBN13'] = true,
['ismn'] = true,
['ISMN'] = true,
['issn'] = true,
['ISSN'] = true,
['issue'] = true,
['jfm'] = true,
['JFM'] = true,
['journal'] = true,
['jstor'] = true,
['JSTOR'] = true,
['jstor-access'] = true,
['lang'] = true,
['language'] = true,
['last'] = true,
['lastauthoramp'] = false, -- deprecated
['last-author-amp'] = false, -- deprecated
['laydate'] = true,
['lay-date'] = true,
['laysource'] = true,
['lay-source'] = true,
['lay-format'] = true,
['layurl'] = true,
['lay-url'] = true,
['lccn'] = true,
['LCCN'] = true,
['location'] = true,
['magazine'] = true,
['medium'] = true,
['minutes'] = true,
['mode'] = true,
['mr'] = true,
['MR'] = true,
['name-list-format'] = true,
['name-list-style'] = true,
['newspaper'] = true,
['nocat'] = true,
['nopp'] = true,
['no-pp'] = true,
['no-tracking'] = true,
['number'] = true,
['oclc'] = true,
['OCLC'] = true,
['ol'] = true,
['OL'] = true,
['ol-access'] = true,
['orig-date'] = true,
['origyear'] = true,
['orig-year'] = true,
['osti'] = true,
['OSTI'] = true,
['osti-access'] = true,
['others'] = true,
['p'] = true,
['page'] = true,
['pages'] = true,
['people'] = true,
['periodical'] = true,
['place'] = true,
['pmc'] = true,
['PMC'] = true,
['pmc-embargo-date'] = true,
['pmid'] = true,
['PMID'] = true,
['postscript'] = true,
['pp'] = true,
['publicationdate'] = true,
['publication-date'] = true,
['publicationplace'] = true,
['publication-place'] = true,
['publisher'] = true,
['quotation'] = true,
['quote'] = true,
['quote-page'] = true,
['quote-pages'] = true,
['ref'] = true,
['rfc'] = true,
['RFC'] = true,
['sbn'] = true,
['SBN'] = true,
['scale'] = true,
['script-article'] = true,
['script-chapter'] = true,
['script-contribution'] = true,
['script-entry'] = true,
['script-journal'] = true,
['script-magazine'] = true,
['script-newspaper'] = true,
['script-periodical'] = true,
['script-quote'] = true,
['script-section'] = true,
['script-title'] = true,
['script-website'] = true,
['script-work'] = true,
['season'] = true,
['section'] = true,
['section-format'] = true,
['sectionurl'] = true,
['section-url'] = true,
['section-url-access'] = true,
['series'] = true,
['serieslink'] = true,
['series-link'] = true,
['seriesno'] = true,
['series-no'] = true,
['seriesnumber'] = true,
['series-number'] = true,
['ssrn'] = true, -- cite ssrn; these two here because allowed in cite ... as identifier
['SSRN'] = true,
['subject'] = true,
['subjectlink'] = false, -- deprecated
['subject-link'] = true,
['subject-mask'] = true,
['surname'] = true,
['s2cid'] = true,
['S2CID'] = true,
['s2cid-access'] = true,
['template-doc-demo'] = true,
['time'] = true,
['timecaption'] = true,
['time-caption'] = true,
['title'] = true,
['titlelink'] = true,
['title-link'] = true,
['translator'] = true,
['translator-first'] = true,
['translator-given'] = true,
['translator-last'] = true,
['translator-surname'] = true,
['translator-link'] = true,
['translator-mask'] = true,
['trans-article'] = true,
['trans-chapter'] = true,
['trans-contribution'] = true,
['trans-entry'] = true,
['trans-journal'] = true,
['trans-magazine'] = true,
['trans-newspaper'] = true,
['trans-periodical'] = true,
['trans-quote'] = true,
['trans-section'] = true,
['trans-title'] = true,
['trans-website'] = true,
['trans-work'] = true,
['type'] = true,
['url'] = true,
['URL'] = true,
['url-access'] = true,
['url-status'] = true,
['vauthors'] = true,
['veditors'] = true,
['version'] = true,
['via'] = true,
['volume'] = true,
['website'] = true,
['work'] = true,
['year'] = true,
['zbl'] = true,
['ZBL'] = true,
}
local numbered_arguments = {
['author#'] = true,
['author-first#'] = true,
['author#-first'] = true,
['author-given#'] = true,
['author#-given'] = true,
['author-last#'] = true,
['author#-last'] = true,
['author-surname#'] = true,
['author#-surname'] = true,
['author-link#'] = true,
['author#-link'] = true,
['authorlink#'] = true,
['author#link'] = true,
['author-mask#'] = true,
['author#-mask'] = true,
['authormask#'] = false, -- deprecated
['author#mask'] = false, -- deprecated
['contributor#'] = true,
['contributor-first#'] = true,
['contributor#-first'] = true,
['contributor-given#'] = true,
['contributor#-given'] = true,
['contributor-last#'] = true,
['contributor#-last'] = true,
['contributor-surname#'] = true,
['contributor#-surname'] = true,
['contributor-link#'] = true,
['contributor#-link'] = true,
['contributor-mask#'] = true,
['contributor#-mask'] = true,
['editor#'] = true,
['editor-first#'] = true,
['editor#-first'] = true,
['editor-given#'] = true,
['editor#-given'] = true,
['editor-last#'] = true,
['editor#-last'] = true,
['editor-surname#'] = true,
['editor#-surname'] = true,
['editor-link#'] = true,
['editor#-link'] = true,
['editorlink#'] = false, -- deprecated
['editor#link'] = false, -- deprecated
['editor-mask#'] = true,
['editor#-mask'] = true,
['first#'] = true,
['given#'] = true,
['host#'] = true,
['interviewer#'] = true,
['interviewer-first#'] = true,
['interviewer#-first'] = true,
['interviewer-given#'] = true,
['interviewer#-given'] = true,
['interviewer-last#'] = true,
['interviewer#-last'] = true,
['interviewer-surname#'] = true,
['interviewer#-surname'] = true,
['interviewer-link#'] = true,
['interviewer#-link'] = true,
['interviewer-mask#'] = true,
['interviewer#-mask'] = true,
['last#'] = true,
['subject#'] = true,
['subject-link#'] = true,
['subject#-link'] = true,
['subjectlink#'] = false, -- deprecated
['subject#link'] = false, -- deprecated
['subject-mask#'] = true,
['subject#-mask'] = true,
['surname#'] = true,
['translator#'] = true,
['translator-first#'] = true,
['translator#-first'] = true,
['translator-given#'] = true,
['translator#-given'] = true,
['translator-last#'] = true,
['translator#-last'] = true,
['translator-surname#'] = true,
['translator#-surname'] = true,
['translator-link#'] = true,
['translator#-link'] = true,
['translator-mask#'] = true,
['translator#-mask'] = true,
}
--[[--------------------------&lt; P R E P R I N T S U P P O R T E D P A R A M E T E R S &gt;--------------------
Cite arXiv, cite biorxiv, cite citeseerx, and cite ssrn are preprint templates that use the limited set of parameters
defined in the limited_basic_arguments and limited_numbered_arguments tables. Those lists are supplemented with a
template-specific list of parameters that are required by the particular template and may be exclusive to one of the
preprint templates. Some of these parameters may also be available to the general cs1|2 templates.
Same conventions for true/false/nil as above.
]]
local preprint_arguments = {
arxiv = {
['arxiv'] = true, -- cite arxiv and arxiv identifiers
['class'] = true,
['eprint'] = true, -- cite arxiv and arxiv identifiers
},
biorxiv = {
['biorxiv'] = true,
},
citeseerx = {
['citeseerx'] = true,
},
ssrn = {
['ssrn'] = true,
['SSRN'] = true,
},
}
--[[--------------------------&lt; L I M I T E D S U P P O R T E D P A R A M E T E R S &gt;----------------------
This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the
parameters provided in a cite arxiv, cite biorxiv, or cite citeseerx templates. These parameters are common to
all three templates
Same conventions for true/false/nil as above.
]]
local limited_basic_arguments = {
['at'] = true,
['author'] = true,
['author-first'] = true,
['author-given'] = true,
['author-last'] = true,
['author-surname'] = true,
['author-link'] = true,
['authorlink'] = true,
['author-mask'] = true,
['authormask'] = false, -- deprecated
['authors'] = true,
['collaboration'] = true,
['date'] = true,
['df'] = true,
['display-authors'] = true,
['displayauthors'] = false, -- deprecated
['first'] = true,
['given'] = true,
['language'] = true,
['last'] = true,
['last-author-amp'] = false, -- deprecated
['lastauthoramp'] = false, -- deprecated
['mode'] = true,
['name-list-format'] = true,
['name-list-style'] = true,
['nocat'] = true,
['no-tracking'] = true,
['p'] = true,
['page'] = true,
['pages'] = true,
['postscript'] = true,
['pp'] = true,
['quotation'] = true,
['quote'] = true,
['ref'] = true,
['surname'] = true,
['template-doc-demo'] = true,
['title'] = true,
['trans-title'] = true,
['url'] = true,
['URL'] = true,
['vauthors'] = true,
['year'] = true,
}
local limited_numbered_arguments = {
['author#'] = true,
['author-first#'] = true,
['author#-first'] = true,
['author-given#'] = true,
['author#-given'] = true,
['author-last#'] = true,
['author#-last'] = true,
['author-surname#'] = true,
['author#-surname'] = true,
['author-link#'] = true,
['author#-link'] = true,
['authorlink#'] = true,
['author#link'] = true,
['author-mask#'] = true,
['author#-mask'] = true,
['authormask#'] = false, -- deprecated
['author#mask'] = false, -- deprecated
['first#'] = true,
['given#'] = true,
['last#'] = true,
['surname#'] = true,
}
--[[--------------------------&lt; U N I Q U E _ A R G U M E N T S &gt;----------------------------------------------
Some templates have unique parameters. Those templates and their unique parameters are listed here. Keys in this
table are the template's CitationClass parameter value
Same conventions for true/false/nil as above.
]]
local unique_arguments = {
['audio-visual'] = {
['transcript'] = true,
['transcript-format'] = true,
['transcripturl'] = true,
['transcript-url'] = true,
},
episode = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episodelink'] = true, -- alias of |title-link=
['episode-link'] = true, -- alias of |title-link=
['network'] = true,
['station'] = true,
['transcript'] = true,
['transcript-format'] = true,
['transcripturl'] = true,
['transcript-url'] = true,
},
mailinglist = {
['mailinglist'] = true,
['mailing-list'] = true,
},
map = {
['inset'] = true,
['map'] = true,
['map-format'] = true,
['mapurl'] = true,
['map-url'] = true,
['map-url-access'] = true,
['script-map'] = true,
['sections'] = true,
['sheet'] = true,
['sheets'] = true,
['trans-map'] = true,
},
newsgroup = {
['message-id'] = true,
['newsgroup'] = true,
},
serial = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episode'] = true, -- cite serial only TODO: make available to cite episode?
['episodelink'] = true, -- aliases of |title-link=
['episode-link'] = true,
['network'] = true,
['station'] = true,
},
}
--[[--------------------------&lt; T E M P L A T E _ L I S T _ G E T &gt;--------------------------------------------
gets a list of the templates from table t
]]
local function template_list_get (t)
local out = {}; -- a table for output
for k, _ in pairs (t) do -- spin through the table and collect the keys
table.insert (out, k) -- add each key to the output table
end
return out; -- and done
end
--[[--------------------------&lt; E X P O R T E D T A B L E S &gt;------------------------------------------------
]]
return {
basic_arguments = basic_arguments,
numbered_arguments = numbered_arguments,
limited_basic_arguments = limited_basic_arguments,
limited_numbered_arguments = limited_numbered_arguments,
preprint_arguments = preprint_arguments,
preprint_template_list = template_list_get (preprint_arguments), -- make a template list from preprint_arguments{} table
unique_arguments = unique_arguments,
unique_param_template_list = template_list_get (unique_arguments), -- make a template list from unique_arguments{} table
};</text>
<sha1>4jbcp11pa4k7hsy69nzp2juitha3wp5</sha1>
</revision>
</page>
<page>
<title>Module:Citation/CS1/styles.css</title>
<ns>828</ns>
<id>57940169</id>
<revision>
<id>982806391</id>
<parentid>951705291</parentid>
<timestamp>2020-10-10T13:22:51Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>sanitized-css</model>
<format>text/css</format>
<text bytes="3290" xml:space="preserve">/* Protection icon
the following line controls the page-protection icon in the upper right corner
it must remain within this comment
{{sandbox other||{{pp-template}}}}
*/
/* Overrides
Some wikis do not override user agent default styles for HTML &lt;cite&gt; and &lt;q&gt;,
unlike en.wp. On en.wp, keep these the same as [[MediaWiki:Common.css]]
*/
cite.citation {
font-style: inherit; /* Remove italics for &lt;cite&gt; */
}
.citation q {
quotes: '"' '"' "'" "'"; /* Straight quote marks for &lt;q&gt; */
}
/* ID and URL access
Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external
for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need
to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon.
the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}}
*/
.id-lock-free a,
.citation .cs1-lock-free a {
background: linear-gradient(transparent, transparent),
url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg)
right 0.1em center/9px no-repeat;
}
.id-lock-limited a,
.id-lock-registration a,
.citation .cs1-lock-limited a,
.citation .cs1-lock-registration a {
background: linear-gradient(transparent, transparent),
url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg)
right 0.1em center/9px no-repeat;
}
.id-lock-subscription a,
.citation .cs1-lock-subscription a {
background: linear-gradient(transparent, transparent),
url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg)
right 0.1em center/9px no-repeat;
}
.cs1-subscription,
.cs1-registration {
color: #555;
}
.cs1-subscription span,
.cs1-registration span {
border-bottom: 1px dotted;
cursor: help;
}
/* Wikisource
Wikisource icon when |chapter= or |title= is wikilinked to Wikisource
as in cite wikisource
*/
.cs1-ws-icon a {
background: linear-gradient(transparent, transparent),
url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg)
right 0.1em center/12px no-repeat;
}
/* Errors and maintenance */
code.cs1-code {
/* &lt;code&gt;...&lt;/code&gt; style override: mediawiki's css definition is specified here:
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/
69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
*/
color: inherit;
background: inherit;
border: none; /* this maybe can be inherit. MDN says yes, code editor says no */
padding: inherit;
}
.cs1-hidden-error {
display: none;
font-size: 100%;
}
.cs1-visible-error {
font-size: 100%;
}
.cs1-maint {
display: none;
color: #33aa33;
margin-left: 0.3em;
}
/* Small text size
Set small text size in one place. 0.95 (here) * 0.9 (from references list) is
~0.85, which is the lower bound for size for accessibility. Old styling for this
was just 0.85. We could write the rule so that when this template is inside
references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */
.cs1-subscription,
.cs1-registration,
.cs1-format {
font-size: 95%;
}
/* kerning */
.cs1-kern-left,
.cs1-kern-wl-left {
padding-left: 0.2em;
}
.cs1-kern-right,
.cs1-kern-wl-right {
padding-right: 0.2em;
}
/* selflinks – avoid bold font style when cs1|2 template links to the current page */
.citation .mw-selflink {
font-weight: inherit;
}</text>
<sha1>1m7rwqy4j4owuxl77ctkjt24he3uj8v</sha1>
</revision>
</page>
<page>
<title>Module:Color contrast</title>
<ns>828</ns>
<id>43027253</id>
<revision>
<id>877152614</id>
<parentid>877110807</parentid>
<timestamp>2019-01-06T22:38:25Z</timestamp>
<contributor>
<username>Johnuniq</username>
<id>6036800</id>
</contributor>
<comment>fix unintended color2lum global error which is causing errors; clean whitespace</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="6971" xml:space="preserve">--
-- This module implements
-- {{Color contrast ratio}}
-- {{Greater color contrast ratio}}
-- {{ColorToLum}}
-- {{RGBColorToLum}}
--
local p = {}
local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' )
local function sRGB (v)
if (v &lt;= 0.03928) then
v = v / 12.92
else
v = math.pow((v+0.055)/1.055, 2.4)
end
return v
end
local function rgbdec2lum(R, G, B)
if ( 0 &lt;= R and R &lt; 256 and 0 &lt;= G and G &lt; 256 and 0 &lt;= B and B &lt; 256 ) then
return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255)
else
return ''
end
end
local function hsl2lum(h, s, l)
if ( 0 &lt;= h and h &lt; 360 and 0 &lt;= s and s &lt;= 1 and 0 &lt;= l and l &lt;= 1 ) then
local c = (1 - math.abs(2*l - 1))*s
local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) )
local m = l - c/2
local r, g, b = m, m, m
if( 0 &lt;= h and h &lt; 60 ) then
r = r + c
g = g + x
elseif( 60 &lt;= h and h &lt; 120 ) then
r = r + x
g = g + c
elseif( 120 &lt;= h and h &lt; 180 ) then
g = g + c
b = b + x
elseif( 180 &lt;= h and h &lt; 240 ) then
g = g + x
b = b + c
elseif( 240 &lt;= h and h &lt; 300 ) then
r = r + x
b = b + c
elseif( 300 &lt;= h and h &lt; 360 ) then
r = r + c
b = b + x
end
return rgbdec2lum(255*r, 255*g, 255*b)
else
return ''
end
end
local function color2lum(c)
if (c == nil) then
return ''
end
-- html '#' entity
c = c:gsub("&amp;#35;", "#")
-- whitespace
c = c:match( '^%s*(.-)[%s;]*$' )
-- unstrip nowiki strip markers
c = mw.text.unstripNoWiki(c)
-- lowercase
c = c:lower()
-- first try to look it up
local L = HTMLcolor[c]
if (L ~= nil) then
return L
end
-- convert from hsl
if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100)
end
-- convert from rgb
if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then
local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$')
return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B))
end
-- convert from rgb percent
if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100)
end
-- remove leading # (if there is one) and whitespace
c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$')
-- split into rgb
local cs = mw.text.split(c or '', '')
if( #cs == 6 ) then
local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2])
local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4])
local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6])
return rgbdec2lum(R, G, B)
elseif ( #cs == 3 ) then
local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1])
local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2])
local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3])
return rgbdec2lum(R, G, B)
end
-- failure, return blank
return ''
end
-- This exports the function for use in other modules.
-- The colour is passed as a string.
function p._lum(color)
return color2lum(color)
end
function p._greatercontrast(args)
local bias = tonumber(args['bias'] or '0') or 0
local css = (args['css'] and args['css'] ~= '') and true or false
local v1 = color2lum(args[1] or '')
local c2 = args[2] or '#FFFFFF'
local v2 = color2lum(c2)
local c3 = args[3] or '#000000'
local v3 = color2lum(c3)
local ratio1 = -1;
local ratio2 = -1;
if (type(v1) == 'number' and type(v2) == 'number') then
ratio1 = (v2 + 0.05)/(v1 + 0.05)
ratio1 = (ratio1 &lt; 1) and 1/ratio1 or ratio1
end
if (type(v1) == 'number' and type(v3) == 'number') then
ratio2 = (v3 + 0.05)/(v1 + 0.05)
ratio2 = (ratio2 &lt; 1) and 1/ratio2 or ratio2
end
if css then
local c1 = args[1] or ''
if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c1 = '#' .. c1
end
if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c2 = '#' .. c2
end
if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c3 = '#' .. c3
end
return 'background-color:' .. c1 .. '; color:' .. ((ratio1 &gt; 0) and (ratio2 &gt; 0) and ((ratio1 + bias &gt; ratio2) and c2 or c3) or '') .. ';'
end
return (ratio1 &gt; 0) and (ratio2 &gt; 0) and ((ratio1 + bias &gt; ratio2) and c2 or c3) or ''
end
function p._ratio(args)
local v1 = color2lum(args[1])
local v2 = color2lum(args[2])
if (type(v1) == 'number' and type(v2) == 'number') then
-- v1 should be the brighter of the two.
if v2 &gt; v1 then
v1, v2 = v2, v1
end
return (v1 + 0.05)/(v2 + 0.05)
else
return args['error'] or '?'
end
end
function p._styleratio(args)
local style = (args[1] or ''):lower()
local bg, fg = 'white', 'black'
local lum_bg, lum_fg = 1, 0
if args[2] then
local lum = color2lum(args[2])
if lum ~= '' then bg, lum_bg = args[2], lum end
end
if args[3] then
local lum = color2lum(args[3])
if lum ~= '' then fg, lum_fg = args[3], lum end
end
local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&amp;#[Xx]23;', '#'), '&amp;#35;', '#'), ';')
for k = 1,#slist do
local s = slist[k]
local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
k = k or ''
v = v or ''
if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then
local lum = color2lum(v)
if( lum ~= '' ) then bg, lum_bg = v, lum end
elseif (k:match('^[%s]*(color)[%s]*$')) then
local lum = color2lum(v)
if( lum ~= '' ) then bg, lum_fg = v, lum end
end
end
if lum_bg &gt; lum_fg then
return (lum_bg + 0.05)/(lum_fg + 0.05)
else
return (lum_fg + 0.05)/(lum_bg + 0.05)
end
end
--[[
Use {{#invoke:Color contrast|somecolor}} directly or
{{#invoke:Color contrast}} from a wrapper template.
Parameters:
-- |1= — required; A color to check.
--]]
function p.lum(frame)
local color = frame.args[1] or frame:getParent().args[1]
return p._lum(color)
end
function p.ratio(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._ratio(args)
end
function p.styleratio(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._styleratio(args)
end
function p.greatercontrast(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._greatercontrast(args)
end
return p</text>
<sha1>3j3oaih63ygo9p806h5yxpscaqh3xu9</sha1>
</revision>
</page>
<page>
<title>Module:Color contrast/colors</title>
<ns>828</ns>
<id>47337125</id>
<revision>
<id>879950256</id>
<parentid>673825843</parentid>
<timestamp>2019-01-24T12:30:11Z</timestamp>
<contributor>
<username>Galobtter</username>
<id>19502780</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="6119" xml:space="preserve">return {
aliceblue = 0.92880068253475,
antiquewhite = 0.84646951707754,
aqua = 0.7874,
aquamarine = 0.8078549208338,
azure = 0.97265264954166,
beige = 0.8988459998705,
bisque = 0.80732327372979,
black = 0,
blanchedalmond = 0.85084439608156,
blue = 0.0722,
blueviolet = 0.12622014321946,
brown = 0.098224287876511,
burlywood = 0.51559844533893,
cadetblue = 0.29424681085422,
chartreuse = 0.76032025902623,
chocolate = 0.23898526114557,
coral = 0.37017930872924,
cornflowerblue = 0.30318641994179,
cornsilk = 0.93562110372965,
crimson = 0.16042199953026,
cyan = 0.7874,
darkblue = 0.018640801980939,
darkcyan = 0.20329317839046,
darkgoldenrod = 0.27264703559993,
darkgray = 0.39675523072563,
darkgreen = 0.091143429047575,
darkgrey = 0.39675523072563,
darkkhaki = 0.45747326349994,
darkmagenta = 0.07353047651207,
darkolivegreen = 0.12651920884889,
darkorange = 0.40016167026524,
darkorchid = 0.13413142174857,
darkred = 0.054889674531132,
darksalmon = 0.40541471563381,
darkseagreen = 0.43789249325969,
darkslateblue = 0.065792846227988,
darkslategray = 0.067608151928044,
darkslategrey = 0.067608151928044,
darkturquoise = 0.4874606277449,
darkviolet = 0.10999048339343,
deeppink = 0.23866895828276,
deepskyblue = 0.44481603395575,
dimgray = 0.14126329114027,
dimgrey = 0.14126329114027,
dodgerblue = 0.27442536991456,
firebrick = 0.10724525535015,
floralwhite = 0.95922484825004,
forestgreen = 0.18920812076002,
fuchsia = 0.2848,
gainsboro = 0.71569350050648,
ghostwhite = 0.94311261886323,
gold = 0.69860877428159,
goldenrod = 0.41919977809569,
gray = 0.2158605001139,
green = 0.15438342968146,
greenyellow = 0.80609472611453,
grey = 0.2158605001139,
honeydew = 0.96336535554782,
hotpink = 0.34658438169715,
indianred = 0.21406134963884,
indigo = 0.03107561486337,
ivory = 0.99071270600615,
khaki = 0.77012343394121,
lavender = 0.80318750514521,
lavenderblush = 0.90172748631046,
lawngreen = 0.73905893124963,
lemonchiffon = 0.94038992245622,
lightblue = 0.63709141280807,
lightcoral = 0.35522120733135,
lightcyan = 0.94587293494829,
lightgoldenrodyellow = 0.93348351018297,
lightgray = 0.65140563741982,
lightgreen = 0.69091979956865,
lightgrey = 0.65140563741982,
lightpink = 0.58566152734898,
lightsalmon = 0.4780675225206,
lightseagreen = 0.35050145117042,
lightskyblue = 0.56195637618331,
lightslategray = 0.23830165007287,
lightslategrey = 0.23830165007287,
lightsteelblue = 0.53983888284666,
lightyellow = 0.98161818392882,
lime = 0.7152,
limegreen = 0.44571042246098,
linen = 0.88357340984379,
magenta = 0.2848,
maroon = 0.045891942324215,
mediumaquamarine = 0.49389703310801,
mediumblue = 0.044077780212328,
mediumorchid = 0.21639251153773,
mediumpurple = 0.22905858091648,
mediumseagreen = 0.34393112338131,
mediumslateblue = 0.20284629471622,
mediumspringgreen = 0.70704308194184,
mediumturquoise = 0.5133827926448,
mediumvioletred = 0.14371899849357,
midnightblue = 0.02071786635086,
mintcream = 0.97834604947588,
mistyrose = 0.82183047859185,
moccasin = 0.80083000991567,
navajowhite = 0.76519682342785,
navy = 0.015585128108224,
oldlace = 0.91900633405549,
olive = 0.20027537200568,
olivedrab = 0.22593150951929,
orange = 0.4817026703631,
orangered = 0.25516243753416,
orchid = 0.31348806761439,
palegoldenrod = 0.78792647887614,
palegreen = 0.77936759006353,
paleturquoise = 0.76436077921714,
palevioletred = 0.28754994117889,
papayawhip = 0.87797100199835,
peachpuff = 0.74905589878251,
peru = 0.30113074877936,
pink = 0.63271070702466,
plum = 0.45734221587969,
powderblue = 0.68254586500605,
purple = 0.061477070432439,
rebeccapurple = 0.07492341159447,
red = 0.2126,
rosybrown = 0.32319457649407,
royalblue = 0.16663210743188,
saddlebrown = 0.097922285020521,
salmon = 0.36977241527596,
sandybrown = 0.46628543696283,
seagreen = 0.19734199706275,
seashell = 0.92737862206922,
sienna = 0.13697631337098,
silver = 0.52711512570581,
skyblue = 0.55291668518184,
slateblue = 0.14784278062136,
slategray = 0.20896704076536,
slategrey = 0.20896704076536,
snow = 0.96533341834849,
springgreen = 0.73052306068529,
steelblue = 0.20562642207625,
tan = 0.48237604163921,
teal = 0.16996855778968,
thistle = 0.56818401093733,
tomato = 0.30638612719415,
turquoise = 0.5895536427578,
violet = 0.40315452986676,
wheat = 0.74909702820482,
white = 1,
whitesmoke = 0.91309865179342,
yellow = 0.9278,
yellowgreen = 0.50762957208707,
}</text>
<sha1>chi69ar1btd4wp6xbk3uez6sfu0vipn</sha1>
</revision>
</page>
<page>
<title>Module:Cs1 documentation support</title>
<ns>828</ns>
<id>59302137</id>
<revision>
<id>989360478</id>
<parentid>989343895</parentid>
<timestamp>2020-11-18T15:18:09Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="36595" xml:space="preserve">require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;
local cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load the configuration module
local exclusion_lists = { -- TODO: move these tables into a separate ~/data module and mw.loadData() it
['cite book'] = {
['agency'] = true,
['air-date'] = true,
['arxiv'] = true,
['biorxiv'] = true,
['citeseerx'] = true,
['class'] = true,
['conference'] = true,
['conference-format'] = true,
['conference-url'] = true,
['degree'] = true,
['department'] = true,
['display-interviewers'] = true,
['docket'] = true,
['episode'] = true,
['interviewer#'] = true,
['interviewer-first#'] = true,
['interviewer-link#'] = true,
['interviewer-mask#'] = true,
['ismn'] = true,
['issn'] = true,
['issue'] = true,
['jfm'] = true,
['journal'] = true,
['jstor'] = true,
['mailinglist'] = true,
['message-id'] = true,
['minutes'] = true,
['MR'] = true,
['network'] = true,
['number'] = true,
['RFC'] = true,
['script-journal'] = true,
['season'] = true,
['section'] = true,
['sections'] = true,
['series-link'] = true,
['series-number'] = true,
['series-separator'] = true,
['sheet'] = true,
['sheets'] = true,
['SSRN'] = true,
['station'] = true,
['time'] = true,
['time-caption'] = true,
['trans-article'] = true,
['trans-journal'] = true,
['transcript'] = true,
['transcript-format'] = true,
['transcript-url'] = true,
['ZBL'] = true,
},
['cite journal'] = {
['agency'] = true,
['air-date'] = true,
['book-title'] = true,
['chapter'] = true,
['chapter-format'] = true,
['chapter-url'] = true,
['chapter-url-access'] = true,
['class'] = true,
['conference'] = true,
['conference-format'] = true,
['conference-url'] = true,
['contribution'] = true,
['contributor#'] = true,
['contributor-first#'] = true,
['contributor-link#'] = true,
['contributor-mask#'] = true,
['degree'] = true,
['department'] = true,
['display-interviewers'] = true,
['docket'] = true,
['edition'] = true,
['editor#'] = true,
['editor-first#'] = true,
['editor-link#'] = true,
['editor-mask#'] = true,
['editors'] = true,
['encyclopedia'] = true,
['episode'] = true,
['ignore-isbn-error'] = true,
['interviewer#'] = true,
['interviewer-first#'] = true,
['interviewer-link#'] = true,
['interviewer-mask#'] = true,
['isbn'] = true,
['ismn'] = true,
['LCCN'] = true,
['mailinglist'] = true,
['message-id'] = true,
['minutes'] = true,
['network'] = true,
['script-chapter'] = true,
['season'] = true,
['section'] = true,
['sections'] = true,
['series-link'] = true,
['series-number'] = true,
['series-separator'] = true,
['sheet'] = true,
['sheets'] = true,
['station'] = true,
['time'] = true,
['time-caption'] = true,
['trans-article'] = true,
['transcript'] = true,
['transcript-format'] = true,
['transcript-url'] = true,
},
}
--[[-------------------------&lt; A D D _ T O _ L I S T &gt;---------------------------------------------------------
adds code/name pair to code_list and name/code pair to name_list; code/name pairs in override_list replace those
taken from the MediaWiki list; these are marked with a superscripted dagger.
|script-&lt;param&gt;= lang codes always use override names so dagger is omitted
]]
local function add_to_list (code_list, name_list, override_list, code, name, dagger)
if false == dagger then
dagger = ''; -- no dagger for |script-&lt;param&gt;= codes and names
else
dagger = '&lt;sup&gt;†&lt;/sup&gt;'; -- dagger for all other lists using override
end
if override_list[code] then -- look in the override table for this code
code_list[code] = override_list[code] .. dagger; -- use the name from the override table; mark with dagger
name_list[override_list[code]] = code .. dagger;
else
code_list[code] = name; -- use the MediaWiki name and code
name_list[name] = code;
end
end
--[[-------------------------&lt; L I S T _ F O R M A T &gt;---------------------------------------------------------
formats key/value pair into a string for rendering
['k'] = 'v' → k: v
]]
local function list_format (result, list)
for k, v in pairs (list) do
table.insert (result, k .. ': ' .. v);
end
end
--[[-------------------------&lt; L A N G _ L I S T E R &gt;---------------------------------------------------------
Module entry point
Crude documentation tool that returns one of several lists of language codes and names.
Used in Template:Citation Style documentation/language/doc
{{#invoke:cs1 documentation support|lang_lister|list=&lt;selector&gt;|lang=&lt;code&gt;}}
where &lt;selector&gt; is one of the values:
2char – list of ISO 639-1 codes and names sorted by code
3char – list of ISO 639-2, -3 codes and names sorted by code
ietf – list of IETF language tags and names sorted by tag -- partial support for these by cs1|2 |language= parameter
name – list of language names and codes sorted by name -- IETF tags omitted because not supported by cs1|2 |language= parameter
all - list all language codes/tags and names sorted by code/tag
where &lt;code&gt; is a MediaWiki supported 2, 3, or ietf-like language code; because of fall-back, language names may
be the English-language names.
]]
local function lang_lister (frame)
local lang = (frame.args.lang and '' ~= frame.args.lang) and frame.args.lang or mw.getContentLanguage():getCode()
local source_list = mw.language.fetchLanguageNames(lang, 'all');
local override = cfg.lang_code_remap;
local code_1_list={};
local code_2_list={};
local ietf_list={};
local name_list={};
if not ({['2char']=true, ['3char']=true, ['ietf']=true, ['name']=true, ['all']=true})[frame.args.list] then
return '&lt;span style="font-size:100%" class="error"&gt;unknown list selector: ' .. frame.args.list .. '&lt;/span&gt;';
end
for code, name in pairs (source_list) do
if 'all' == frame.args.list then
add_to_list (code_1_list, name_list, override, code, name); -- use the code_1_list because why not?
elseif 2 == code:len() then
add_to_list (code_1_list, name_list, override, code, name);
elseif 3 == code:len() then
add_to_list (code_2_list, name_list, override, code, name);
else -- ietf codes only partically supported by cs1|2 |language= parameter
add_to_list (ietf_list, name_list, override, code, name);
end
end
local result = {};
local out = {};
if '2char' == frame.args.list or 'all' == frame.args.list then
list_format (result, code_1_list);
elseif '3char' == frame.args.list then
list_format (result, code_2_list);
elseif 'ietf' == frame.args.list then
list_format (result, ietf_list);
else --must be 'name'
list_format (result, name_list);
end
table.sort (result);
table.insert (result, 1, '&lt;div class="div-col columns column-width" style="column-width:20em"&gt;');
table.insert (out, table.concat (result, '\n*'));
table.insert (out, '&lt;/div&gt;');
return table.concat (out, '\n');
end
--[[--------------------------&lt; S C R I P T _ L A N G _ L I S T E R &gt;------------------------------------------
Module entry point
Crude documentation tool that returns list of language codes and names supported by the various |script-&lt;param&gt;= parameters.
used in Help:CS1 errors
{{#invoke:cs1 documentation support|script_lang_lister}}
]]
local function script_lang_lister ()
local lang_code_src = cfg.script_lang_codes ; -- get list of allowed script language codes
local override = cfg.lang_code_remap;
local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language
local code_list = {}; -- interim list of aliases
local name_list={}; -- not used; defined here so that we can reuse add_to_list()
local out = {}; -- final output (for now an unordered list)
for _, code in ipairs (lang_code_src) do -- loop through the list of codes
local name = mw.language.fetchLanguageName (code, this_wiki_lang); -- get the language name associated with this code
add_to_list (code_list, name_list, override, code, name, false); -- name_list{} not used but provided so that we can reuse add_to_list(); don't add superscript dagger
end
local result = {};
local out = {};
list_format (result, code_list);
table.sort (result);
table.insert (result, 1, '&lt;div class="div-col columns column-width" style="column-width:20em"&gt;');
table.insert (out, table.concat (result, '\n*'));
table.insert (out, '&lt;/div&gt;');
return table.concat (out, '\n');
end
--[[--------------------------&lt; A L I A S _ L I S T E R &gt;------------------------------------------------------
experimental code that lists parameters and their aliases. Perhaps basis for some sort of documentation?
{{#invoke:cs1 documentation support|alias_lister}}
]]
local function alias_lister ()
local alias_src = cfg.aliases; -- get master list of aliases
local key; -- key for k/v in a new table
local list = {}; -- interim list of aliases
local out = {}; -- final output (for now an unordered list)
for _, aliases in pairs (alias_src) do -- loop throu the master list of aliases
if 'table' == type (aliases) then -- table only when there are aliases
for i, alias in ipairs (aliases) do -- loop through all of the aliases
if 1 == i then -- first 'alias' is the canonical parameter name
key = alias; -- so it becomes the key in list
else
list[key] = list[key] and (list[key] .. ', ' .. alias) or alias; -- make comma-separated list of aliases
list[alias] = 'see ' .. key; -- make a back reference from this alias to the canonical parameter
end
end
end
end
for k, v in pairs (list) do -- loop through the list to make a simple unordered list
table.insert (out, table.concat ({'*', k, ': ', v}));
end
table.sort (out); -- sort it
return table.concat (out, '\010'); -- concatenate with \n
-- return (mw.dumpObject (list))
end
--[[--------------------------&lt; C A N O N I C A L _ P A R A M _ L I S T E R &gt;----------------------------------
experimental code that lists canonical parameter names. Perhaps basis for some sort of documentation?
returns a comma separated, alpha sorted, list of the canonical parameters. If given a template name, excludes
parameters listed in that template's exclusion_list[&lt;template&gt;]{} table (if a table has been defined).
{{#invoke:cs1 documentation support|canonical_param_lister|&lt;template&gt;}}
]]
local function canonical_param_lister (frame)
local template = frame.args[1];
if '' == template then
template = nil;
end
if template then
template = mw.text.trim (template:lower());
end
local alias_src = cfg.aliases; -- get master list of aliases
local id_src = cfg.id_handlers; -- get master list of identifiers
local list = {}; -- interim list of aliases
local out = {}; -- final output (for now an unordered list)
for _, aliases in pairs (alias_src) do -- loop through the master list of aliases
local name;
if 'table' == type (aliases) then -- table only when there are aliases
name = aliases[1]; -- first member of an aliases table is declared canonical
else
name = aliases; -- for those parameters that do not have any aliases, the parameter is declared canonical
end
if not template then -- no template name, add this parameter
table.insert (list, name);
elseif not exclusion_lists[template] then -- template name but no exclusion list
table.insert (list, name);
elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list
table.insert (list, name);
end
end
for k, ids in pairs (id_src) do -- spin through the list of identifiers
local name = id_src[k].parameters[1]; -- get the first (left-most) parameter name
local access = id_src[k].custom_access; -- get the access-icon parameter if it exists for this identifier
if not template then -- no template name
table.insert (list, name); -- add this parameter
if access then
table.insert (list, access); -- add this access-icon parameter
end
elseif not exclusion_lists[template] then -- template name but no exclusion list
table.insert (list, name);
if access then
table.insert (list, access);
end
elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list
table.insert (list, name);
if access then
table.insert (list, access);
end
end
end
for _, param in ipairs (list) do -- loop through the list to make a simple unordered list
table.insert (out, table.concat ({'*', param}));
end
local function comp( a, b ) -- used in following table.sort()
return a:lower() &lt; b:lower();
end
table.sort (out, comp); -- sort the list
return table.concat (out, '\010'); -- concatenate with \n
-- return (mw.dumpObject (list))
end
--[[--------------------------&lt; C A N O N I C A L _ N A M E _ G E T &gt;------------------------------------------
returns first (canonical) name when metaparameter is assigned a table of names
returns name when metaparameter is assigned a single name
returns empty string when metaparameter name not found in alias_src{}, id_src{}, or id_src[meta].custom_access
metaparameter &lt;metaparam&gt; is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Because access-icon
don't have &lt;metaparam&gt; keys, per se, we create pseudo &lt;metaparam&gt; keys by appending 'access' to the identifier &lt;metaparam&gt;:
the &lt;metaparam&gt; for |doi-access= is, for the purposes of this function, DOIaccess, etc
Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a
particular use case. If, for example, &lt;metaparam&gt; Perodical lists:
'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'
that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}},
or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the
parameter best suited for that template so we can specify magazine in the override (frame.args[2])
While for this function, it would be just as simple to not use the function, this mechanism is implemented here
to match similar functionality in alias_names_get() (there are slight differences)
&lt;override&gt; must exist in the alias list
does not apply to the access icon parameters (ignored - these have no aliases)
(and which would be best for {{cite news}}? |newspaper= or |work=? can't solve all of the worlds problems at once).
output format is controlled by |format=
plain - renders in plain text in a &lt;span&gt; tag; may have id attribute
para - renders as it would in {{para|&lt;param&gt;}}
{{#invoke:cs1 documentation support|canonical_name_get|&lt;metaparam&gt;|&lt;override&gt;|id=&lt;attribute&gt;|format=[plain|para]}}
]]
local function canonical_name_get (frame)
local alias_src = cfg.aliases; -- get master list of aliases
local id_src = cfg.id_handlers; -- get master list of identifiers
local args = getArgs (frame);
local name;
local meta = args[1]
local override = args[2];
local access; -- for id-access parameters
if meta:match ('^(%u+)access') then -- the metaparameter (which is not used in ~/Configuration) is id_handlers key concatenated with access: BIBCODEaccess
meta, access = meta:gsub ('^(%u+)access', '%1'); -- strip 'access' text from meta and use returned count value as a flag
end
if alias_src[meta] then
name = alias_src[meta]; -- name is a string or a table
if 'table' == type (name) then -- table only when there are aliases
if not override then
name = name[1]; -- first member of an aliases table is declared canonical
else
for _, v in ipairs (name) do -- here when override is set; spin throu the aliases to make sure override matches alias in table
if v == override then
name = v; -- declare override to be the canonical param for this use case
break;
end
end
end
end
elseif id_src[meta]then -- if there is an id handler
if access then -- and if this is a request for the handler's custom access parameter
if id_src[meta].custom_access then -- if there is a custom access parameter
name = id_src[meta].custom_access; -- use it
else
return ''; -- nope, return empty string
end
else
if not override then
name = id_src[meta].parameters[1]; -- get canonical id handler parameter
else
for _, v in ipairs (id_src[meta].parameters) do -- here when override is set; spin throu the aliases to make sure override matches alias in table
if v == override then
name = v; -- declare override to be the canonical param for this use case
break;
end
end
end
end
else
return ''; -- metaparameter not specified, or no such metaparameter
end
if 'plain' == args.format then -- format and return the output
if args.id then
return string.format ('&lt;span id="%s"&gt;%s&lt;/span&gt;', args.id, name); -- plain text with id attribute
else
return name; -- plain text
end
elseif 'para' == args.format then
return string.format ('&lt;code class="nowrap"&gt;|%s=&lt;/code&gt;', name); -- same as {{para|&lt;param&gt;}}
end
return string.format ('&lt;b id="%s"&gt;%s&lt;/b&gt;', args.id or '', name); -- because {{csdoc}} bolds param names
end
--[[--------------------------&lt; A L I A S _ N A M E S _ G E T &gt;------------------------------------------------
returns list of aliases for metaparameter &lt;metaparam&gt;
returns empty string when there are no aliases
returns empty string when &lt;metaparam&gt; name not found in alias_src{} or id_src{}; access icon parameters have no aliases so ignored
metaparameter &lt;metaparam&gt; is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table.
Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a
particular use case. If, for example, &lt;metaparam&gt; Perodical lists:
'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'
that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}},
or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the
aliases that are not best suited for that template so we can specify magazine in the override (frame.args[2])
to be the canonical parameter so it won't be listed with the rest of the aliases (normal canonical journal will be)
&lt;override&gt; must exist in the alias list except:
when &lt;override&gt; value is 'all', returns the canonical parameter plus all of the aliases
output format is controlled by |format=
plain - renders in plain text in a &lt;span&gt; tag; may have id attribute
para - renders as it would in {{para|&lt;param&gt;}}
when not specified, refurns the default bold format used for {{csdoc}}
{{#invoke:cs1 documentation support|alias_name_get|&lt;metaparam&gt;|&lt;override&gt;|format=[plain|para]}}
]]
local function alias_names_get (frame)
local alias_src = cfg.aliases; -- get master list of aliases
local id_src = cfg.id_handlers; -- get master list of identifiers
local args = getArgs (frame);
local meta = args[1];
local override = args[2];
local out = {};
local source; -- selected parameter or id aliases list
local aliases;
source = alias_src[meta] or (id_src[meta] and id_src[meta].parameters);
if not source then
if meta:match ('%u+access') then
return 'no' == args.none and '' or 'none'; -- custom access parameters don't have aliases
else
return ''; -- no such meta
end
elseif not source[2] then -- id_source[meta] is always a table; if no second member, no aliases
return 'no' == args.none and '' or 'none';
end
if not override then
aliases = source; -- normal skip-canonical param case
else
local flag = 'all' == override and true or nil; -- so that we know that &lt;override&gt; parameter is a valid alias; spoof when override == 'all'
aliases = {[1] = ''}; -- spoof to push alias_src[meta][1] and id_src[meta][1] into aliases[2]
for _, v in ipairs (source) do -- here when override is set; spin through the aliases to make sure override matches alias in table
if v ~= override then
table.insert (aliases, v); -- add all but overridden param to the the aliases list for this use case
else
flag = true; -- set the flag so we know that &lt;override&gt; is a valid alias
end
end
if not flag then
aliases = {} -- unset the table as error indicator
end
end
if 'table' == type (aliases) then -- table only when there are aliases
for i, alias in ipairs (aliases) do
if 1 ~= i then -- aliases[1] is the canonical name; don't include it
if 'plain' == args.format then -- format and return the output
table.insert (out, alias); -- plain text
elseif 'para' == args.format then
table.insert (out, string.format ('&lt;code class="nowrap"&gt;|%s=&lt;/code&gt;', alias)); -- same as {{para|&lt;param&gt;}}
else
table.insert (out, string.format ("'''%s'''", alias)); -- because csdoc bolds param names
end
end
end
return table.concat (out, ', '); -- make pretty list and quit
end
return 'no' == args.none and '' or 'none'; -- no metaparameter with that name or no aliases
end
--[[--------------------------&lt; I S _ B O O K _ C I T E _ T E M P L A T E &gt;------------------------------------
fetch the title of the current page; if it is a preprint template, return true; empty string else
]]
local book_cite_templates = {
['citation'] = true,
['cite book'] = true,
}
local function is_book_cite_template ()
local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -&gt; Cite book
title = title and title:lower() or '';
return book_cite_templates[title] or '';
end
--[[--------------------------&lt; I S _ L I M I T E D _ P A R A M _ T E M P L A T E &gt;----------------------------
fetch the title of the current page; if it is a preprint template, return true; empty string else
]]
local limited_param_templates = { -- if ever there is a need to fetch info from ~/Whitelist then
['cite arxiv'] = true, -- this list could also be fetched from there
['cite biorxiv'] = true,
['citeseerx'] = true,
['ssrn'] = true,
}
local function is_limited_param_template ()
local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -&gt; Cite book
title = title and title:lower() or '';
return limited_param_templates[title] or '';
end
--[[--------------------------&lt; H E A D E R _ M A K E &gt;--------------------------------------------------------
makes a section header from &lt;header_text&gt; and &lt;level&gt;; &lt;level&gt; defaults to 2; cannot be less than 2
]]
local function _header_make (args)
if not args[1] then
return ''; -- no header text
end
local level = args[2] and tonumber (args[2]) or 2;
level = string.rep ('=', level);
return level .. args[1] .. level;
end
--[[--------------------------&lt; H E A D E R _ M A K E &gt;--------------------------------------------------------
Entry from an {{#invoke:}}
makes a section header from &lt;header_text&gt; and &lt;level&gt;; &lt;level&gt; defaults to 2; cannot be less than 2
]]
local function header_make (frame)
local args = getArgs (frame);
return _header_make (args);
end
--[[--------------------------&lt; I D _ L I M I T S _ G E T &gt;----------------------------------------------------
return the limit values for named identifier parameters that have &lt;id&gt; limits (pmc, pmid, ssrn, s2cid, oclc, osti, rfc); the return
value used in template documentation and error message help-text
{{#invoke:Cs1 documentation support|id_limits_get|&lt;id&gt;}}
]]
local function id_limits_get (frame)
local args = getArgs (frame);
local handlers = cfg.id_handlers; -- get id_handlers {} table from ~/Configuration
return args[1] and handlers[args[1]:upper()].id_limit or ('&lt;span style="font-size:100%" class="error"&gt;No limit defined for identifier: ' .. (args[1] or '&lt;unknown name&gt;') .. '&lt;/span&gt;');
end
--[[--------------------------&lt; C A T _ L I N K _ M A K E &gt;----------------------------------------------------
]]
local function cat_link_make (cat)
return table.concat ({'[[:Category:', cat, ']]'});
end
--[[--------------------------&lt; C S 1 _ C A T _ L I S T E R &gt;--------------------------------------------------
This is a crude tool that reads the category names from Module:Citation/CS1/Configuration, makes links of them,
and then lists them in sorted lists. A couple of parameters control the rendering of the output:
|select= -- (required) takes one of three values: error, maint, prop
|sandbox= -- takes one value: no
|hdr-lvl= -- base header level (number of == that make a header); default:2 min:2
This tool will automatically attempt to load a sandbox version of ~/Configuration if one exists.
Setting |sandbox=no will defeat this.
{{#invoke:cs1 documentation support|cat_lister|select=&lt;error|maint|prop&gt;|sandbox=&lt;no&gt;}}
]]
local function cat_lister (frame)
local args = getArgs (frame);
local list_live_cats = {}; -- list of live categories
local list_sbox_cats = {}; -- list of sandbox categories
local live_sbox_out = {} -- list of categories that are common to live and sandbox modules
local live_not_in_sbox_out = {} -- list of categories in live but not sandbox
local sbox_not_in_live_out = {} -- list of categories in sandbox but not live
local out = {}; -- final output assembled here
local sandbox; -- boolean; true: evaluate the sandbox module
local hdr_lvl; --
local sb_cfg;
local sandbox, sb_cfg = pcall (mw.loadData, 'Module:Citation/CS1/Configuration/sandbox'); -- get sandbox configuration
local cat;
local select = args.select;
if 'no' == args.sandbox then -- list sandbox?
sandbox = false; -- no, live only
end
if hdr_lvl then -- if set and
if tonumber (hdr_lvl) then -- can be converted to number
if 2 &gt; tonumber (hdr_lvl) then -- min is 2
hdr_lvl = 2; -- so set to min
end
else -- can't be converted
hdr_lvl = 2; -- so default to min
end
else
hdr_lvl = 2; -- not set so default to min
end
if 'error' == select or 'maint' == select then -- error and main categorys handling different from poperties cats
for _, t in pairs (cfg.error_conditions) do -- get the live module's categories
if ('error' == select and t.message) or ('maint' == select and not t.message) then
cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any
list_live_cats[cat] = 1; -- add to the list
end
end
if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no'
for _, t in pairs (sb_cfg.error_conditions) do -- get the sandbox module's categories
if ('error' == select and t.message) or ('maint' == select and not t.message) then
cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any
list_sbox_cats[cat] = 1; -- add to the list
end
end
end
elseif 'prop' == select then -- prop cats
for _, cat in pairs (cfg.prop_cats) do -- get the live module's categories
cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any
list_live_cats[cat] = 1; -- add to the list
end
if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no'
for _, cat in pairs (sb_cfg.prop_cats) do -- get the live module's categories
cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any
list_sbox_cats[cat] = 1; -- add to the list
end
end
else
return '&lt;span style=\"font-size:100%; font-style:normal;\" class=\"error\"&gt;error: unknown selector: ' .. select .. '&lt;/span&gt;'
end
for k, _ in pairs (list_live_cats) do -- separate live/sbox common cats from cats not in sbox
if not list_sbox_cats[k] and sandbox then
table.insert (live_not_in_sbox_out, cat_link_make (k)); -- in live but not in sbox
else
table.insert (live_sbox_out, cat_link_make (k)); -- in both live and sbox
end
end
for k, _ in pairs (list_sbox_cats) do -- separate sbox/live common cats from cats not in live
if not list_live_cats[k] then
table.insert (sbox_not_in_live_out, cat_link_make (k)); -- in sbox but not in live
end
end
local function comp (a, b) -- local function for case-agnostic category name sorting
return a:lower() &lt; b:lower();
end
local header; -- initialize section header with name of selected category list
if 'error' == select then
header = 'error';
elseif 'maint' == select then
header = 'maintenance';
else
header = 'properties';
end
header = table.concat ({ -- build the main header
'Live ', -- always include this
((sandbox and 'and sandbox ') or ''), -- if sandbox evaluated, mention that
header, -- add the list name
' categories (', -- finish the name and add
#live_sbox_out, -- count of categories listed
')' -- close
})
header = table.concat ({ -- make a useable header
_header_make ({header, hdr_lvl}),
'\n&lt;div class="div-col columns column-width" style="column-width:30em"&gt;' -- opening &lt;div&gt; for columns
});
table.sort (live_sbox_out, comp); -- sort case agnostic acsending
table.insert (live_sbox_out, 1, header); -- insert the header at the top
table.insert (out, table.concat (live_sbox_out, '\n*')); -- make a big string of unordered list markup
table.insert (out, '&lt;/div&gt;\n'); -- close the &lt;/div&gt; and add new line so the next header works
if 0 ~= #live_not_in_sbox_out then -- when there is something in the table
header = table.concat ({ -- build header for subsection
'In live but not in sandbox (',
#live_not_in_sbox_out,
')'
});
header = table.concat ({ -- make a useable header
_header_make ({header, hdr_lvl+1}),
'\n&lt;div class="div-col columns column-width" style="column-width:30em"&gt;'
});
table.sort (live_not_in_sbox_out, comp);
table.insert (live_not_in_sbox_out, 1, header);
table.insert (out, table.concat (live_not_in_sbox_out, '\n*'));
table.insert (out, '&lt;/div&gt;\n');
end
if 0 ~= #sbox_not_in_live_out then -- when there is something in the table
header = table.concat ({ -- build header for subsection
'In sandbox but not in live (',
#sbox_not_in_live_out,
')'
});
header = table.concat ({ -- make a useable header
_header_make ({header, hdr_lvl+1}),
'\n&lt;div class="div-col columns column-width" style="column-width:30em"&gt;'
});
table.sort (sbox_not_in_live_out, comp);
table.insert (sbox_not_in_live_out, 1, header);
table.insert (out, table.concat (sbox_not_in_live_out, '\n*'));
table.insert (out, '&lt;/div&gt;\n');
end
return table.concat (out); -- concat into a huge string and done
end
--[=[--------------------------&lt; H E L P _ T E X T _ C A T S &gt;--------------------------------------------------
To create category links at the bottom of each error help text section and on the individual error category pages;
fetches category names from ~/Configuration; replaces this:
{{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: bioRxiv|Category:CS1 errors: bioRxiv|[[:Category:CS1 errors: bioRxiv]]}}
with this:
{{#invoke:Cs1 documentation support|help_text_cats|err_bad_biorxiv}}
add |pages=yes to append the number of pages in the category
]=]
local function help_text_cats (frame)
local args = getArgs (frame);
local error_conditions = mw.loadData ('Module:Citation/CS1/Configuration').error_conditions;
local out = {}; -- output goes here
if args[1] and error_conditions[args[1]] then -- must have error_condition key and it must exist
table.insert (out, '{{#ifeq:{{FULLPAGENAME}}|Category:'); -- the beginning with category prefix
table.insert (out, error_conditions[args[1]].category); -- fetch the error category name (the reference that {{FULLPAGENAME}} must equate to)
table.insert (out, '|Category:'); -- this category plain text when this invoke is on the category page
table.insert (out, error_conditions[args[1]].category); -- fetch the error category name
table.insert (out, '|'); -- the necessary pipe
table.insert (out, cat_link_make (error_conditions[args[1]].category)); -- one the help page or elsewhere so link to the category
table.insert (out, '}}'); -- and close the #ifeq
if 'yes' == args.pages then
table.insert (out, ' ({{PAGESINCATEGORY:');
table.insert (out, error_conditions[args[1]].category); -- fetch the error category name
table.insert (out, '}} pages)');
end
else
return '&lt;span style="font-size:100%" class="error"&gt;unknown error_conditions key: ' .. (args[1] or 'key missing') .. '&lt;/span&gt;';
end
return frame:preprocess (table.concat (out)); -- make a big string, preprocess, and done
end
--[[--------------------------&lt; H E L P _ T E X T _ E R R O R _ M E S S A G E &gt;--------------------------------
to render help text example error messages
{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}}
assign a single underscore to any of the |$n= parameters to insert an empty string in the error message:
{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} -&gt; Check |issn= value
{{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} -&gt; Check |eissn= value
]]
local function help_text_error_messages (frame)
local args = getArgs (frame);
local error_conditions = mw.loadData ('Module:Citation/CS1/Configuration').error_conditions;
local span_o = '&lt;span class="cs1-visible-error error citation-comment"&gt;';
local span_c = '&lt;/span&gt;';
local message;
local out = {}; -- output goes here
if args[1] and error_conditions[args[1]] then -- must have error_condition key and it must exist
message = error_conditions[args[1]].message;
local i=1;
local count;
local rep;
repeat
rep = '$'..i
args[rep] = args[rep] and args[rep]:gsub ('^%s*_%s*$', '') or nil; -- replace empty string marker with actual empty string
message, count = message:gsub (rep, args[rep] or rep)
i = i + 1;
until (0 == count);
table.insert (out, span_o);
table.insert (out, message);
table.insert (out, span_c);
else
return '&lt;span style="font-size:100%" class="error"&gt;unknown error_conditions key: ' .. (args[1] or 'key missing') .. '&lt;/span&gt;';
end
local out_str = table.concat (out);
out_str = frame:expandTemplate ({title='resize', args = {'120%', out_str} })
return table.concat ({out_str, frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
alias_lister = alias_lister,
alias_names_get = alias_names_get,
canonical_param_lister = canonical_param_lister,
canonical_name_get = canonical_name_get,
cat_lister = cat_lister,
header_make = header_make,
help_text_cats = help_text_cats,
help_text_error_messages = help_text_error_messages,
id_limits_get = id_limits_get,
is_book_cite_template = is_book_cite_template,
is_limited_param_template = is_limited_param_template,
lang_lister = lang_lister,
script_lang_lister = script_lang_lister,
};</text>
<sha1>gzuuxubordfebuhh3c6k61c0kqtcint</sha1>
</revision>
</page>
<page>
<title>Module:Documentation</title>
<ns>828</ns>
<id>40256557</id>
<revision>
<id>989567461</id>
<parentid>989555888</parentid>
<timestamp>2020-11-19T19:09:18Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>nix bad comments</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="36510" xml:space="preserve">-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim &lt; 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '&lt;span class="' .. message('toolbar-class') .. '"&gt;('
.. table.concat(ret, ' &amp;#124; ') .. ')&lt;/span&gt;'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --&gt; 'sandbox'
-- 'testcases-subpage' --&gt; 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --&gt; 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --&gt; 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --&gt; 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --&gt; 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --&gt; '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --&gt; 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --&gt; 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --&gt; '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --&gt; '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --&gt; 'sandbox page'
-- 'sandbox-notice-compare-link-display' --&gt; 'diff'
-- 'sandbox-notice-testcases-blurb' --&gt; 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --&gt; 'test cases'
-- 'sandbox-category' --&gt; 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle
and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '&lt;br /&gt;' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '&lt;br /&gt;' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
-- 'documentation-clear'
return '&lt;div class="' .. message('clear') .. '"&gt;&lt;/div&gt;'
.. require('Module:Message box').main('ombox', omargs)
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --&gt; 'pp-template'
-- 'protection-template-args' --&gt; {docusage = 'yes'}
local protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
return require('Module:Protection banner')._main{
message('protection-reason-edit'), small = true
}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
return require('Module:Protection banner')._main{
action = 'move', small = true
}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --&gt; 'view'
-- 'edit-link-display' --&gt; 'edit'
-- 'history-link-display' --&gt; 'history'
-- 'purge-link-display' --&gt; 'purge'
-- 'file-docpage-preload' --&gt; 'Template:Documentation/preload-filespace'
-- 'module-preload' --&gt; 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --&gt; 'Template:Documentation/preload'
-- 'create-link-display' --&gt; 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '&amp;#91;') -- Replace square brackets with HTML entities.
s = s:gsub('%]', '&amp;#93;')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --&gt; '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --&gt; 'Template documentation'
-- 'module-namespace-heading' --&gt; 'Module documentation'
-- 'file-namespace-heading' --&gt; 'Summary'
-- 'other-namespaces-heading' --&gt; 'Documentation'
-- 'testcases-create-link-display' --&gt; 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '&lt;br /&gt;'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '&lt;br /&gt;' .. printBlurb
end
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --&gt; 'edit'
-- 'history-link-display' --&gt; 'history'
-- 'transcluded-from-blurb' --&gt;
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --&gt; 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --&gt; 'create'
-- 'create-module-doc-blurb' --&gt;
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '&lt;br /&gt;'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '&lt;br /&gt;'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --&gt; 'sandbox'
-- 'sandbox-edit-link-display' --&gt; 'edit'
-- 'compare-link-display' --&gt; 'diff'
-- 'module-sandbox-preload' --&gt; 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --&gt; 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --&gt; 'create'
-- 'mirror-edit-summary' --&gt; 'Create sandbox version of $1'
-- 'mirror-link-display' --&gt; 'mirror'
-- 'mirror-link-preload' --&gt; 'Template:Documentation/mirror'
-- 'sandbox-link-display' --&gt; 'sandbox'
-- 'testcases-link-display' --&gt; 'testcases'
-- 'testcases-edit-link-display'--&gt; 'edit'
-- 'template-sandbox-preload' --&gt; 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --&gt; 'create'
-- 'testcases-link-display' --&gt; 'testcases'
-- 'testcases-edit-link-display' --&gt; 'edit'
-- 'module-testcases-preload' --&gt; 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --&gt; 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --&gt; 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --&gt; 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --&gt; '/doc'
-- 'add-categories-blurb' --&gt; 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --&gt; 'template'
-- 'module-pagetype' --&gt; 'module'
-- 'default-pagetype' --&gt; 'page'
-- 'subpages-link-display' --&gt; 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --&gt; '/Print'
-- 'print-blurb' --&gt; 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --&gt; true
-- 'print-category' --&gt; 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --&gt; true
-- 'doc-subpage' --&gt; 'doc'
-- 'testcases-subpage' --&gt; 'testcases'
-- 'strange-usage-category' --&gt; 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p</text>
<sha1>k5rrvx2n0zn2fil7slkqthmc610xqhp</sha1>
</revision>
</page>
<page>
<title>Module:Documentation/config</title>
<ns>828</ns>
<id>41520829</id>
<revision>
<id>989555893</id>
<parentid>948473959</parentid>
<timestamp>2020-11-19T17:49:12Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>merge templatestyles</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="18848" xml:space="preserve">----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Sandbox.svg|50px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
cfg['sandbox-notice-pagetype-other'] = 'sandbox page'
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'
cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'
cfg['sandbox-notice-compare-link-display'] = 'diff'
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.'
cfg['sandbox-notice-testcases-link-display'] = 'test cases'
cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).'
cfg['sandbox-notice-testcases-run-link-display'] = 'run'
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with
-- a display value of cfg['print-link-display'].
cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.'
.. ' If you make a change to this template, please update the print version as well.'
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg</text>
<sha1>mdqvnnq30fn49kjfe3xgbhnk8zlxmbs</sha1>
</revision>
</page>
<page>
<title>Module:Documentation/styles.css</title>
<ns>828</ns>
<id>61440006</id>
<revision>
<id>989579069</id>
<parentid>989578481</parentid>
<timestamp>2020-11-19T20:21:58Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Module:Documentation/styles.css]]": actually match module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>sanitized-css</model>
<format>text/css</format>
<text bytes="716" xml:space="preserve">/* {{pp|small=yes}} */
.documentation,
.documentation-metadata {
border: 1px solid #a2a9b1;
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid #aaa;
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}</text>
<sha1>o2ia525en7wbq32mq4fpdevtl5d6pcb</sha1>
</revision>
</page>
<page>
<title>Module:Effective protection expiry</title>
<ns>828</ns>
<id>48785459</id>
<revision>
<id>948472505</id>
<parentid>948472504</parentid>
<timestamp>2020-04-01T06:12:42Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1494" xml:space="preserve">local p = {}
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)
return stabilitySettings and stabilitySettings.expiry or 'unknown'
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)
if rawExpiry == 'infinity' then
return 'infinity'
elseif rawExpiry == '' then
return 'unknown'
else
local year, month, day, hour, minute, second = rawExpiry:match(
'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$'
)
if year then
return string.format(
'%s-%s-%sT%s:%s:%s',
year, month, day, hour, minute, second
)
else
error('internal error in Module:Effective protection expiry; malformed expiry timestamp')
end
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p</text>
<sha1>i1wms02y1w048cq6uttka18a5pjzp63</sha1>
</revision>
</page>
<page>
<title>Module:Effective protection level</title>
<ns>828</ns>
<id>41617327</id>
<revision>
<id>980896975</id>
<parentid>948472507</parentid>
<timestamp>2020-09-29T03:38:47Z</timestamp>
<contributor>
<username>Jackmcbarn</username>
<id>19285809</id>
</contributor>
<comment>bring in changes from sandbox</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3438" xml:space="preserve">local p = {}
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local level = mw.ext.FlaggedRevs.getStabilitySettings(title)
level = level and level.autoreview
if level == 'review' then
return 'reviewer'
elseif level ~= '' then
return level
else
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
end
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then
error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 )
end
if title.namespace == 8 then -- MediaWiki namespace
if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
return 'sysop'
end
elseif title.namespace == 2 and title.isSubpage then
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page
return 'interfaceadmin'
elseif title.contentModel == 'json' then -- user JSON page
return 'sysop'
end
end
if action == 'undelete' then
return 'sysop'
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
elseif level == 'templateeditor' then
return 'templateeditor'
elseif action == 'move' then
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif title.namespace == 6 then
return 'filemover'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
elseif level then
return level
elseif action == 'upload' then
return 'autoconfirmed'
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts
return 'user'
else
return '*'
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p</text>
<sha1>d3lhy0comfcfe9lnnj8klmrfqm1oxw7</sha1>
</revision>
</page>
<page>
<title>Module:Exponential search</title>
<ns>828</ns>
<id>45500622</id>
<revision>
<id>920258706</id>
<parentid>918679418</parentid>
<timestamp>2019-10-08T16:14:11Z</timestamp>
<contributor>
<username>Mr. Stradivarius</username>
<id>4708675</id>
</contributor>
<minor/>
<comment>Protected "[[Module:Exponential search]]": [[WP:High-risk templates|High-risk Lua module]]: used in [[Module:Highest archive number]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1074" xml:space="preserve">-- This module provides a generic exponential search algorithm.
local checkType = require('libraryUtil').checkType
local floor = math.floor
local function midPoint(lower, upper)
return floor(lower + (upper - lower) / 2)
end
local function search(testFunc, i, lower, upper)
if testFunc(i) then
if i + 1 == upper then
return i
end
lower = i
if upper then
i = midPoint(lower, upper)
else
i = i * 2
end
return search(testFunc, i, lower, upper)
else
upper = i
i = midPoint(lower, upper)
return search(testFunc, i, lower, upper)
end
end
return function (testFunc, init)
checkType('Exponential search', 1, testFunc, 'function')
checkType('Exponential search', 2, init, 'number', true)
if init and (init &lt; 1 or init ~= floor(init) or init == math.huge) then
error(string.format(
"invalid init value '%s' detected in argument #2 to " ..
"'Exponential search' (init value must be a positive integer)",
tostring(init)
), 2)
end
init = init or 2
if not testFunc(1) then
return nil
end
return search(testFunc, init, 1, nil)
end</text>
<sha1>ndcjiubm1yvxboo7en7zf00no0kec02</sha1>
</revision>
</page>
<page>
<title>Module:File link</title>
<ns>828</ns>
<id>42903140</id>
<revision>
<id>948474149</id>
<parentid>948472509</parentid>
<timestamp>2020-04-01T06:31:54Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<comment>Undid revision 948472508 by [[Special:Contributions/w&gt;IPad365|w&gt;IPad365]] ([[User talk:w&gt;IPad365|talk]])</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="2544" xml:space="preserve">-- This module provides a library for formatting file wikilinks.
local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType
local p = {}
function p._main(args)
checkType('_main', 1, args, 'table')
-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our
-- own function to get the right error level.
local function checkArg(key, val, level)
if type(val) ~= 'string' then
error(string.format(
"type error in '%s' parameter of '_main' (expected string, got %s)",
key, type(val)
), level)
end
end
local ret = {}
-- Adds a positional parameter to the buffer.
local function addPositional(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = val
end
-- Adds a named parameter to the buffer. We assume that the parameter name
-- is the same as the argument key.
local function addNamed(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = key .. '=' .. val
end
-- Filename
checkArg('file', args.file, 3)
ret[#ret + 1] = 'File:' .. args.file
-- Format
if args.format then
checkArg('format', args.format)
if args.formatfile then
checkArg('formatfile', args.formatfile)
ret[#ret + 1] = args.format .. '=' .. args.formatfile
else
ret[#ret + 1] = args.format
end
end
-- Border
if yesno(args.border) then
ret[#ret + 1] = 'border'
end
addPositional('location')
addPositional('alignment')
addPositional('size')
addNamed('upright')
addNamed('link')
addNamed('alt')
addNamed('page')
addNamed('class')
addNamed('lang')
addNamed('start')
addNamed('end')
addNamed('thumbtime')
addPositional('caption')
return string.format('[[%s]]', table.concat(ret, '|'))
end
function p.main(frame)
local origArgs = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:File link'
})
if not origArgs.file then
error("'file' parameter missing from [[Template:File link]]", 0)
end
-- Copy the arguments that were passed to a new table to avoid looking up
-- every possible parameter in the frame object.
local args = {}
for k, v in pairs(origArgs) do
-- Make _BLANK a special argument to add a blank parameter. For use in
-- conditional templates etc. it is useful for blank arguments to be
-- ignored, but we still need a way to specify them so that we can do
-- things like [[File:Example.png|link=]].
if v == '_BLANK' then
v = ''
end
args[k] = v
end
return p._main(args)
end
return p</text>
<sha1>bzc22v133v9z5yc4aisazripn6l94p8</sha1>
</revision>
</page>
<page>
<title>Module:Hatnote</title>
<ns>828</ns>
<id>42498502</id>
<revision>
<id>970298780</id>
<parentid>970061360</parentid>
<timestamp>2020-07-30T13:46:32Z</timestamp>
<contributor>
<username>Mr. Stradivarius</username>
<id>4708675</id>
</contributor>
<comment>parse pages for section-only links as nil - this prevents section-only links that have an italicized page parameter from having empty &lt;i&gt;&lt;/i&gt; tags</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="8838" xml:space="preserve">--------------------------------------------------------------------------------
-- Module:Hatnote --
-- --
-- This module produces hatnote links and links to related articles. It --
-- implements the {{hatnote}} and {{format link}} meta-templates and includes --
-- helper functions for other Lua hatnote modules. --
--------------------------------------------------------------------------------
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg
local mArguments -- lazily initialise [[Module:Arguments]]
local yesno -- lazily initialise [[Module:Yesno]]
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getArgs(frame)
-- Fetches the arguments from the parent frame. Whitespace is trimmed and
-- blanks are removed.
mArguments = require('Module:Arguments')
return mArguments.getArgs(frame, {parentOnly = true})
end
local function removeInitialColon(s)
-- Removes the initial colon from a string, if present.
return s:match('^:?(.*)')
end
function p.findNamespaceId(link, removeColon)
-- Finds the namespace id (namespace number) of a link or a pagename. This
-- function will not work if the link is enclosed in double brackets. Colons
-- are trimmed from the start of the link by default. To skip colon
-- trimming, set the removeColon parameter to false.
checkType('findNamespaceId', 1, link, 'string')
checkType('findNamespaceId', 2, removeColon, 'boolean', true)
if removeColon ~= false then
link = removeInitialColon(link)
end
local namespace = link:match('^(.-):')
if namespace then
local nsTable = mw.site.namespaces[namespace]
if nsTable then
return nsTable.id
end
end
return 0
end
function p.formatPages(...)
-- Formats a list of pages using formatLink and returns it as an array. Nil
-- values are not allowed.
local pages = {...}
local ret = {}
for i, page in ipairs(pages) do
ret[i] = p._formatLink{link = page}
end
return ret
end
function p.formatPageTables(...)
-- Takes a list of page/display tables and returns it as a list of
-- formatted links. Nil values are not allowed.
local pages = {...}
local links = {}
for i, t in ipairs(pages) do
checkType('formatPageTables', i, t, 'table')
local link = t[1]
local display = t[2]
links[i] = p._formatLink{link = link, display = display}
end
return links
end
function p.makeWikitextError(msg, helpLink, addTrackingCategory, title)
-- Formats an error message to be returned to wikitext. If
-- addTrackingCategory is not false after being returned from
-- [[Module:Yesno]], and if we are not on a talk page, a tracking category
-- is added.
checkType('makeWikitextError', 1, msg, 'string')
checkType('makeWikitextError', 2, helpLink, 'string', true)
yesno = require('Module:Yesno')
title = title or mw.title.getCurrentTitle()
-- Make the help link text.
local helpText
if helpLink then
helpText = ' ([[' .. helpLink .. '|help]])'
else
helpText = ''
end
-- Make the category text.
local category
if not title.isTalkPage -- Don't categorise talk pages
and title.namespace ~= 2 -- Don't categorise userspace
and yesno(addTrackingCategory) ~= false -- Allow opting out
then
category = 'Hatnote templates with errors'
category = string.format(
'[[%s:%s]]',
mw.site.namespaces[14].name,
category
)
else
category = ''
end
return string.format(
'&lt;strong class="error"&gt;Error: %s%s.&lt;/strong&gt;%s',
msg,
helpText,
category
)
end
function p.disambiguate(page, disambiguator)
-- Formats a page title with a disambiguation parenthetical,
-- i.e. "Example" → "Example (disambiguation)".
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 2, disambiguator, 'string', true)
disambiguator = disambiguator or 'disambiguation'
return string.format('%s (%s)', page, disambiguator)
end
--------------------------------------------------------------------------------
-- Format link
--
-- Makes a wikilink from the given link and display values. Links are escaped
-- with colons if necessary, and links to sections are detected and displayed
-- with " § " as a separator rather than the standard MediaWiki "#". Used in
-- the {{format link}} template.
--------------------------------------------------------------------------------
function p.formatLink(frame)
-- The formatLink export function, for use in templates.
yesno = require('Module:Yesno')
local args = getArgs(frame)
local link = args[1]
if not link then
return p.makeWikitextError(
'no link specified',
'Template:Format link#Errors',
args.category
)
end
return p._formatLink{
link = link,
display = args[2],
italicizePage = yesno(args.italicizepage),
italicizeSection = yesno(args.italicizesection),
}
end
local function italicize(s)
-- Italicize a string.
return '&lt;i&gt;' .. s .. '&lt;/i&gt;'
end
local function maybeItalicize(s, shouldItalicize)
-- italicize s if s is a string and the shouldItalicize parameter is true.
if s and shouldItalicize then
return italicize(s)
else
return s
end
end
local function parseLink(link)
-- Parse a link and return a table with the link's components.
-- These components are:
-- - link: the link, stripped of any initial colon (always present)
-- - page: the page name (always present)
-- - section: the page name (may be nil)
-- - display: the display text, if manually entered after a pipe (may be nil)
link = removeInitialColon(link)
-- Find whether a faux display value has been added with the {{!}} magic
-- word.
local prePipe, display = link:match('^(.-)|(.*)$')
link = prePipe or link
-- Find the page, if it exists.
-- For links like [[#Bar]], the page will be nil.
local preHash, postHash = link:match('^(.-)#(.*)$')
local page
if not preHash then
-- We have a link like [[Foo]].
page = link
elseif preHash ~= '' then
-- We have a link like [[Foo#Bar]].
page = preHash
end
-- Find the section, if it exists.
local section
if postHash and postHash ~= '' then
section = postHash
end
return {
link = link,
page = page,
section = section,
display = display,
}
end
function p._formatLink(options)
-- The formatLink export function, for use in modules.
checkType('_formatLink', 1, options, 'table')
checkTypeForNamedArg('_formatLink', 'link', options.link, 'string', false)
checkTypeForNamedArg(
'_formatLink',
'display',
options.display,
'string',
true
)
checkTypeForNamedArg(
'_formatLink',
'italicizePage',
options.italicizePage,
'boolean',
true
)
checkTypeForNamedArg(
'_formatLink',
'italicizeSection',
options.italicizeSection,
'boolean',
true
)
local parsed = parseLink(options.link)
local display = options.display or parsed.display
-- Deal with the case where we don't have to pipe the link
if not display and not parsed.section and not options.italicizePage then
return string.format('[[:%s]]', parsed.link)
end
-- Find the display text for piped links
if not display then
local page = maybeItalicize(parsed.page, options.italicizePage)
local section = maybeItalicize(parsed.section, options.italicizeSection)
if not page then
display = string.format('§&amp;nbsp;%s', section)
elseif section then
display = string.format('%s §&amp;nbsp;%s', page, section)
else
display = page
end
end
return string.format('[[:%s|%s]]', parsed.link, display)
end
--------------------------------------------------------------------------------
-- Hatnote
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
--------------------------------------------------------------------------------
function p.hatnote(frame)
local args = getArgs(frame)
local s = args[1]
local options = {}
if not s then
return p.makeWikitextError(
'no text specified',
'Template:Hatnote#Errors',
args.category
)
end
options.extraclasses = args.extraclasses
options.selfref = args.selfref
return p._hatnote(s, options)
end
function p._hatnote(s, options)
checkType('_hatnote', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote', 'navigation-not-searchable'}
local extraclasses = options.extraclasses
local selfref = options.selfref
if type(extraclasses) == 'string' then
classes[#classes + 1] = extraclasses
end
if selfref then
classes[#classes + 1] = 'selfref'
end
return string.format(
'&lt;div role="note" class="%s"&gt;%s&lt;/div&gt;',
table.concat(classes, ' '),
s
)
end
return p</text>
<sha1>i11f8q2u8pomoj3ukbihsqdql9a3juh</sha1>
</revision>
</page>
<page>
<title>Module:Hatnote inline</title>
<ns>828</ns>
<id>42792326</id>
<revision>
<id>885761802</id>
<parentid>880025585</parentid>
<timestamp>2019-03-02T04:20:35Z</timestamp>
<contributor>
<username>JJMC89</username>
<id>24812038</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Module:Hatnote inline]]": [[WP:High-risk templates|Highly visible module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1093" xml:space="preserve">--------------------------------------------------------------------------------
-- Module:Hatnote-inline --
-- --
-- This module produces hatnote-style links and links to related articles, --
-- but inside a &lt;span&gt;, instead of the &lt;div&gt; used by Module:Hatnote. It --
-- implements the {{hatnote-inline}} meta-template. --
--------------------------------------------------------------------------------
local mHatnote = require('Module:Hatnote')
local mArguments = require('Module:Arguments')
local yesno = require('Module:Yesno')
local p = {}
function p.hatnoteInline (frame)
local args = mArguments.getArgs(frame)
local hatnote = mHatnote.hatnote(frame)
if args.inline == nil or yesno(args.inline, true) then
local subs = {
['^&lt;div'] = '&lt;span',
['&lt;/div&gt;$'] = '&lt;/span&gt;'
}
for k, v in pairs(subs) do hatnote = string.gsub(hatnote, k, v) end
end
return hatnote
end
p.hatnote = p.hatnoteInline --alias
return p</text>
<sha1>jb6gsg1d59p7ypwzurylxxtvacyh17t</sha1>
</revision>
</page>
<page>
<title>Module:High-use</title>
<ns>828</ns>
<id>62062952</id>
<revision>
<id>980970292</id>
<parentid>980970256</parentid>
<timestamp>2020-09-29T14:51:19Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/Izno|Izno]] ([[User talk:Izno|talk]]) to last version by Trialpears</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="4774" xml:space="preserve">local p = {}
local _fetch = require('Module:Transclusion_count').fetch
function p.num(frame, count)
if count == nil then count = _fetch(frame) end
-- Build output string
local return_value = ""
if count == nil then
if frame.args[1] == "risk" then
return_value = "a very large number of"
else
return_value = "many"
end
else
-- Use 2 significant figures for smaller numbers and 3 for larger ones
local sigfig = 2
if count &gt;= 100000 then
sigfig = 3
end
-- Prepare to round to appropriate number of sigfigs
local f = math.floor(math.log10(count)) - sigfig + 1
-- Round and insert "approximately" or "+" when appropriate
if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then
-- Round down
return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) )
else
-- Round to nearest
return_value = string.format("approximately&amp;#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) )
end
-- Insert percent of pages
if frame.args["all-pages"] and frame.args["all-pages"] ~= "" then
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5)
return_value = string.format("%s&amp;#x20;pages, or roughly %s%% of all", return_value, percent)
end
end
return return_value
end
-- Actions if there is a large (greater than or equal to 100,000) transclusion count
function p.risk(frame)
local return_value = ""
if frame.args[1] == "risk" then
return_value = "risk"
else
local count = _fetch(frame)
if count and count &gt;= 100000 then return_value = "risk" end
end
return return_value
end
function p.text(frame, count)
local bot_text = "\n\n----\nTransclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])."
if frame.args["nobot"] == true then
bot_text = ""
end
if count == nil then count = _fetch(frame) end
local return_value = {}
local title = mw.title.getCurrentTitle()
if title.subpageText == "doc" or title.subpageText == "sandbox" then
title = title.basePageTitle
end
local templatecount = string.format("https://templatecount.toolforge.org/index.php?lang=en&amp;namespace=%s&amp;name=%s",mw.title.getCurrentTitle().namespace,mw.uri.encode(title.text))
local used_on_text = string.format("'''This %s is used on [%s %s pages]'''",
(mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template"),
templatecount,
p.num(frame, count)
)
local sandbox_text = string.format("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages%s ",
(mw.title.getCurrentTitle().namespace == 828 and "module" or "template"),
title.fullText, title.fullText,
(mw.title.getCurrentTitle().namespace == 828 and "." or ", or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].")
)
if (frame.args[1] == "risk" or (count and count &gt;= 100000) ) then
local info = ""
if frame.args["info"] and frame.args["info"] ~= "" then
info = "&lt;br /&gt;" .. frame.args["info"]
end
sandbox_text = string.format(".%s&lt;br /&gt; To avoid major disruption and server load, any changes should be tested in the %sThe tested changes can be added to this page in a single edit.&amp;#x20;",
info, sandbox_text
)
else
sandbox_text = string.format(" and changes may be widely noticed. Test changes in the %s",
sandbox_text
)
end
local discussion_text = "Consider discussing changes "
if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then
discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"])
else
discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText )
end
return table.concat({used_on_text, sandbox_text, discussion_text, " before implementing them.", bot_text})
end
function p.main(frame)
local count = _fetch(frame)
local return_value = ""
local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]"
local type_param = "style"
if (frame.args[1] == "risk" or (count and count &gt;= 100000) ) then
image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]"
type_param = "content"
end
if frame.args["form"] == "editnotice" then
return_value = frame:expandTemplate{
title = 'editnotice',
args = {
["image"] = image,
["text"] = p.text(frame, count),
["expiry"] = (frame.args["expiry"] or "")
}
}
else
return_value = frame:expandTemplate{
title = 'ombox',
args = {
["type"] = type_param,
["image"] = image,
["text"] = p.text(frame, count),
["expiry"] = (frame.args["expiry"] or "")
}
}
end
return return_value
end
return p</text>
<sha1>tbiv1nf83p49sw94e38but34b8fp53e</sha1>
</revision>
</page>
<page>
<title>Module:Infobox</title>
<ns>828</ns>
<id>38808424</id>
<revision>
<id>964480912</id>
<parentid>957087627</parentid>
<timestamp>2020-06-25T19:04:15Z</timestamp>
<contributor>
<username>Frietjes</username>
<id>13791031</id>
</contributor>
<comment>per discussion on the talkpage, now supports |autoheaders=y</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="15030" xml:space="preserve">--
-- This module implements {{Infobox}}
--
local p = {}
local navbar = require('Module:Navbar')._navbar
local args = {}
local origArgs = {}
local root
local function notempty( s ) return s and s:match( '%S' ) end
local function fixChildBoxes(sval, tt)
if notempty(sval) then
local marker = '&lt;span class=special_infobox_marker&gt;'
local s = sval
s = mw.ustring.gsub(s, '(&lt;%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(&lt;/[Tt][Rr]%s*&gt;)', '%1' .. marker)
if s:match(marker) then
s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '')
s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1')
s = mw.ustring.gsub(s, '(&lt;/[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*&gt;%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(&lt;%s*[Tt][Aa][Bb][Ll][Ee][^&lt;&gt;]*&gt;%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, marker .. '(%s*&lt;/[Tt][Aa][Bb][Ll][Ee]%s*&gt;)', '%1')
s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1')
end
if s:match(marker) then
local subcells = mw.text.split(s, marker)
s = ''
for k = 1, #subcells do
if k == 1 then
s = s .. subcells[k] .. '&lt;/' .. tt .. '&gt;&lt;/tr&gt;'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '&lt;tr' .. rowstyle ..'&gt;&lt;' .. tt .. ' colspan=2&gt;\n' .. subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '&lt;tr&gt;&lt;' .. tt .. ' colspan=2&gt;\n' .. subcells[k] .. '&lt;/' .. tt .. '&gt;&lt;/tr&gt;'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&amp;oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
return sval
end
end
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
local vals = {}
for k, v in pairs(t1) do
vals[v] = true
end
for k, v in pairs(t2) do
vals[v] = true
end
local ret = {}
for k, v in pairs(vals) do
table.insert(ret, k)
end
return ret
end
local function getArgNums(prefix)
-- Returns a table containing the numbers of the arguments that exist
-- for the specified prefix. For example, if the prefix was 'data', and
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
local nums = {}
for k, v in pairs(args) do
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
if num then table.insert(nums, tonumber(num)) end
end
table.sort(nums)
return nums
end
local function addRow(rowArgs)
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:attr('id', rowArgs.rowid)
:tag('th')
:attr('colspan', 2)
:attr('id', rowArgs.headerid)
:addClass(rowArgs.class)
:addClass(args.headerclass)
:css('text-align', 'center')
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
if rowArgs.data then
root:wikitext('[[Category:Pages which use infobox templates with ignored data cells]]')
end
elseif rowArgs.data then
if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
rowArgs.rowstyle = 'display:none'
end
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
row:attr('id', rowArgs.rowid)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:attr('id', rowArgs.labelid)
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
if not rowArgs.label then
dataCell
:attr('colspan', 2)
:css('text-align', 'center')
end
dataCell
:attr('id', rowArgs.dataid)
:addClass(rowArgs.class)
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
end
local function renderTitle()
if not args.title then return end
root
:tag('caption')
:addClass(args.titleclass)
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
root
:tag('tr')
:tag('th')
:attr('colspan', 2)
:addClass(args.aboveclass)
:css('text-align', 'center')
:css('font-size', '125%')
:css('font-weight', 'bold')
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass(args.belowclass)
:css('text-align', 'center')
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderSubheaders()
if args.subheader then
args.subheader1 = args.subheader
end
if args.subheaderrowclass then
args.subheaderrowclass1 = args.subheaderrowclass
end
local subheadernums = getArgNums('subheader')
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function renderImages()
if args.image then
args.image1 = args.image
end
if args.caption then
args.caption1 = args.caption
end
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = mw.html.create():wikitext(args['image' .. tostring(num)])
if caption then
data
:tag('div')
:cssText(args.captionstyle)
:wikitext(caption)
end
addRow({
data = tostring(data),
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
local function preprocessRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
local lastheader
for k, num in ipairs(rownums) do
if args['header' .. tostring(num)] then
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
lastheader = num
elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
local function renderRows()
-- Gets the union of the header and data argument numbers,
-- and renders them all in order using addRow.
local rownums = union(getArgNums('header'), getArgNums('data'))
table.sort(rownums)
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)],
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)],
dataid = args['dataid' .. tostring(num)],
labelid = args['labelid' .. tostring(num)],
headerid = args['headerid' .. tostring(num)],
rowid = args['rowid' .. tostring(num)]
})
end
end
local function renderNavBar()
if not args.name then return end
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:css('text-align', 'right')
:wikitext(navbar{
args.name,
mini = 1,
})
end
local function renderItalicTitle()
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
local function renderTrackingCategories()
if args.decat ~= 'yes' then
if args.child == 'yes' then
if args.title then
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')
end
elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')
end
end
end
local function _infobox()
-- Specify the overall layout of the infobox, with special settings
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass((args.subbox ~= 'yes') and 'infobox' or nil)
:addClass(args.bodyclass)
if args.subbox == 'yes' then
root
:css('padding', '0')
:css('border', 'none')
:css('margin', '-3px')
:css('width', 'auto')
:css('min-width', '100%')
:css('font-size', '100%')
:css('clear', 'none')
:css('float', 'none')
:css('background-color', 'transparent')
else
root
:css('width', '22em')
end
root
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
renderSubheaders()
renderImages()
if args.autoheaders then
preprocessRows()
end
renderRows()
renderBelowRow()
renderNavBar()
renderItalicTitle()
renderTrackingCategories()
return tostring(root)
end
local function preprocessSingleArg(argName)
-- If the argument exists and isn't blank, add it to the argument table.
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
local function preprocessArgs(prefixTable, step)
-- Assign the parameters with the given prefixes to the args table, in order, in batches
-- of the step size specified. This is to prevent references etc. from appearing in the
-- wrong order. The prefixTable should be an array containing tables, each of which has
-- two possible fields, a "prefix" string and a "depend" table. The function always parses
-- parameters containing the "prefix" string, but only parses parameters in the "depend"
-- table if the prefix parameter is present and non-blank.
if type(prefixTable) ~= 'table' then
error("Non-table value detected for the prefix table", 2)
end
if type(step) ~= 'number' then
error("Invalid step value detected", 2)
end
-- Get arguments without a number suffix, and check for bad input.
for i,v in ipairs(prefixTable) do
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
error('Invalid input detected to preprocessArgs prefix table', 2)
end
preprocessSingleArg(v.prefix)
-- Only parse the depend parameter if the prefix parameter is present and not blank.
if args[v.prefix] and v.depend then
for j, dependValue in ipairs(v.depend) do
if type(dependValue) ~= 'string' then
error('Invalid "depend" parameter value detected in preprocessArgs')
end
preprocessSingleArg(dependValue)
end
end
end
-- Get arguments with number suffixes.
local a = 1 -- Counter variable.
local moreArgumentsExist = true
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a + step - 1 do
for j,v in ipairs(prefixTable) do
local prefixArgName = v.prefix .. tostring(i)
if origArgs[prefixArgName] then
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
preprocessSingleArg(prefixArgName)
end
-- Process the depend table if the prefix argument is present and not blank, or
-- we are processing "prefix1" and "prefix" is present and not blank, and
-- if the depend table is present.
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
for j,dependValue in ipairs(v.depend) do
local dependArgName = dependValue .. tostring(i)
preprocessSingleArg(dependArgName)
end
end
end
end
a = a + step
end
end
local function parseDataParameters()
-- Parse the data parameters in the same order that the old {{infobox}} did, so that
-- references etc. will display in the expected places. Parameters that depend on
-- another parameter are only processed if that parameter is present, to avoid
-- phantom references appearing in article reference lists.
preprocessSingleArg('autoheaders')
preprocessSingleArg('child')
preprocessSingleArg('bodyclass')
preprocessSingleArg('subbox')
preprocessSingleArg('bodystyle')
preprocessSingleArg('title')
preprocessSingleArg('titleclass')
preprocessSingleArg('titlestyle')
preprocessSingleArg('above')
preprocessSingleArg('aboveclass')
preprocessSingleArg('abovestyle')
preprocessArgs({
{prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
}, 10)
preprocessSingleArg('subheaderstyle')
preprocessSingleArg('subheaderclass')
preprocessArgs({
{prefix = 'image', depend = {'caption', 'imagerowclass'}}
}, 10)
preprocessSingleArg('captionstyle')
preprocessSingleArg('imagestyle')
preprocessSingleArg('imageclass')
preprocessArgs({
{prefix = 'header'},
{prefix = 'data', depend = {'label'}},
{prefix = 'rowclass'},
{prefix = 'rowstyle'},
{prefix = 'rowcellstyle'},
{prefix = 'class'},
{prefix = 'dataid'},
{prefix = 'labelid'},
{prefix = 'headerid'},
{prefix = 'rowid'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
preprocessSingleArg('decat')
end
function p.infobox(frame)
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
function p.infoboxTemplate(frame)
-- For calling via #invoke within a template
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p</text>
<sha1>icv7hicbyi1nka7zvdkn0xjgl2xiiia</sha1>
</revision>
</page>
<page>
<title>Module:Lang</title>
<ns>828</ns>
<id>55674518</id>
<revision>
<id>987833998</id>
<parentid>987830693</parentid>
<timestamp>2020-11-09T14:39:01Z</timestamp>
<contributor>
<username>Gonnym</username>
<id>14984434</id>
</contributor>
<comment>Undid revision 987830693 by [[Special:Contributions/Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) bug found, temp revert</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="70803" xml:space="preserve">--[=[
Lua support for the {{lang}}, {{lang-xx}}, and {{transl}} templates and replacement of various supporting templates.
]=]
require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;
local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl()
local yesno = require ('Module:Yesno');
local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables
local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts
local lang_table = lang_data.lang_name_table.lang;
local lang_dep_table = lang_data.lang_name_table.lang_dep;
local script_table = lang_data.lang_name_table.script;
local region_table = lang_data.lang_name_table.region;
local variant_table = lang_data.lang_name_table.variant;
local suppressed_table = lang_data.lang_name_table.suppressed;
local override_table = lang_data.override;
local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code
local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization
local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language
local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic()
local maint_cats = {}; -- maintenance categories go here
local maint_msgs = {}; -- and their messages go here
--[[--------------------------&lt; I S _ S E T &gt;------------------------------------------------------------------
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------&lt; I N V E R T _ I T A L I C S &gt;-------------------------------------------------
This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup
in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing
apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become
bold markup inadvertently.
Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal,
replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements.
In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns.
This function expects that markup in args.text is complete and correct; if it is not, oddness may result.
]]
local function invert_italics (source)
local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns
[""]="\'\'", -- empty string becomes italic markup
["\'\'"]="", -- italic markup becomes empty string
["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic
["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold
};
local seg = {};
source = source:gsub ("%f[\']\'%f[^\']", '&amp;#39;'); -- protect single quote marks from being interpreted as bold markup
seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote
seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote
if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text'
seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup
elseif '' ~= seg[1] then
seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup
elseif '' ~= seg[3] then
seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup
else
seg[2] = source -- when there is no markup
end
seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table
seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table
return table.concat (seg); -- put it all back together and done
end
--[[--------------------------&lt; V A L I D A T E _ I T A L I C &gt;------------------------------------------------
validates |italic= or |italics= assigned values.
When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or,
for the special case 'default', return nil.
When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message.
When both |italic= and |italics= are set, returns nil and a 'conflicting' error message.
The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's
defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on
the individual template's requirements, 'italic' for {{transl}}) or to the value appropriate to |script=, if set ({{lang}}
and {{lang-xx}} only).
Accepted values and the values that this function returns are are:
nil - when |italic= absent or not set; returns nil
default - for completeness, should rarely if ever be used; returns nil
yes - force args.text to be rendered in italic font; returns 'italic'
no - force args.text to be rendered in normal font; returns 'normal'
unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit'
invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert'
]]
local function validate_italic (args)
local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil};
local count = 0
for _, arg in pairs {'italic', 'italics', 'i'} do
if args[arg] then
count = count + 1
end
end
if count &gt; 1 then -- return nil and an error message if more than one is set
return nil, 'only one of |italic=, |italics=, or |i= can be specified';
end
return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message
end
--[=[--------------------------&lt; V A L I D A T E _ C A T _ A R G S &gt;----------------------------------------------------------
Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace.
This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters
to control categorization.
Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative
values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the
parameter is treated as if it were not set in the template.
Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply.
Accepted values for |nocat= are the text strings:
'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else
for |cat=
'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else
]=]
local function validate_cat_args (args)
if not (args.nocat or args.cat) then -- both are nil, so categorize
return;
end
if false == yesno (args.cat) or true == yesno (args.nocat) then
args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template)
else -- args.nocat is the parameter actually used.
args.nocat = nil;
end
end
--[[--------------------------&lt; I N _ A R R A Y &gt;--------------------------------------------------------------
Whether needle is in haystack
]]
local function in_array ( needle, haystack )
if needle == nil then
return false;
end
for n,v in ipairs( haystack ) do
if v == needle then
return n;
end
end
return false;
end
--[[--------------------------&lt; F O R M A T _ I E T F _ T A G &gt;------------------------------------------------
prettify ietf tags to use recommended subtag formats:
code: lower case
script: sentence case
region: upper case
variant: lower case
private: lower case prefixed with -x-
]]
local function format_ietf_tag (code, script, region, variant, private)
local out = {};
if is_set (private) then
return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored
end
table.insert (out, code:lower());
if is_set (script) then
script = script:lower():gsub ('^%a', string.upper);
table.insert (out, script);
end
if is_set (region) then
table.insert (out, region:upper());
end
if is_set (variant) then
table.insert (out, variant:lower());
end
return table.concat (out, '-');
end
--[[--------------------------&lt; G E T _ I E T F _ P A R T S &gt;--------------------------------------------------
extracts and returns IETF language tag parts:
primary language subtag (required) - 2 or 3 character IANA language code
script subtag - four character IANA script code
region subtag - two-letter or three digit IANA region code
variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported
private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag
in any one of these forms
lang lang-variant
lang-script lang-script-variant
lang-region lang-region-variant
lang-script-region lang-script-region-variant
lang-x-private
each of lang, script, region, variant, and private, when used, must be valid
Languages with both two- and three-character code synonyms are promoted to the two-character synonym because
the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding
the synonymous three-character codes in the lang= attribute.
For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}}
because those parameters are superfluous to the IETF subtags in |code=)
returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid
parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil.
see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1
]]
local function get_ietf_parts (source, args_script, args_region, args_variant)
local code, script, region, variant, private; -- ietf tag parts
if not is_set (source) then
return nil, nil, nil, nil, nil, 'missing language tag';
end
local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern
{'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits)
{'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits)
{'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits)
{'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters)
{'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR
{'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits)
{'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss
{'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR
{'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits)
{'^(%a%a%a?)$'}, -- 18 - ll
{'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters)
}
local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables
for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match
local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here
c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i])
if c1 then -- c1 always set on match
code = c1; -- first capture is always code
t = {
[pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures
[pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures
[pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table
};
script = t.s or ''; -- translate table contents to named variables;
region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation
variant= t.v or '';
private = t.p or '';
break; -- and done
end
end
if not code then
return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed
end
code = code:lower(); -- ensure that we use and return lower case version of this
if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then
return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?)
end
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym
table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code}));
table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]}));
code = synonym_table[code]; -- use the synonym
end
if is_set (script) then
if is_set (args_script) then
return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed
end
else
script = args_script or ''; -- use args.script if provided
end
if is_set (script) then
script = script:lower(); -- ensure that we use and return lower case version of this
if not script_table[script] then
return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?)
end
end
if suppressed_table[script] then -- ensure that code-script does not use a suppressed script
if in_array (code, suppressed_table[script]) then
return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code
end
end
if is_set (region) then
if is_set (args_region) then
return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed
end
else
region = args_region or ''; -- use args.region if provided
end
if is_set (region) then
region = region:lower(); -- ensure that we use and return lower case version of this
if not region_table[region] then
return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code});
end
end
if is_set (variant) then
if is_set (args_variant) then
return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed
end
else
variant = args_variant or ''; -- use args.variant if provided
end
if is_set (variant) then
variant = variant:lower(); -- ensure that we use and return lower case version of this
if not variant_table[variant] then -- make sure variant is valid
return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant});
end -- does this duplicate/replace tests in lang() and lang_xx()?
if is_set (script) then -- if script set it must be part of the 'prefix'
if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then
return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script});
end
elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound)
if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred)
if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound)
return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region});
end
end
else
if not in_array (code, variant_table[variant]['prefixes']) then
return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code});
end
end
end
if is_set (private) then
private = private:lower(); -- ensure that we use and return lower case version of this
if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index
return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private});
end
end
return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil
end
--[[--------------------------&lt; M A K E _ E R R O R _ M S G &gt;--------------------------------------------------
assembles an error message from template name, message text, help link, and error category.
]]
local function make_error_msg (msg, args, template)
local out = {};
local category;
if 'Transl' == template then
category = 'Transl';
else
category = 'Lang and lang-xx'
end
table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available
table.insert (out, table.concat ({'&lt;span style=\"font-size: 100%; font-style: normal;\" class=\"error\"&gt;Error: {{', template, '}}: '}));
table.insert (out, msg);
table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'}));
table.insert (out, '&lt;/span&gt;');
if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages)
table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'}));
end
return table.concat (out);
end
--[=[-------------------------&lt; M A K E _ W I K I L I N K &gt;----------------------------------------------------
Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only
link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an
empty string.
]=]
local function make_wikilink (link, display)
if is_set (link) then
if is_set (display) then
return table.concat ({'[[', link, '|', display, ']]'});
else
return table.concat ({'[[', link, ']]'});
end
else
return '';
end
end
--[[--------------------------&lt; D I V _ M A R K U P _ A D D &gt;--------------------------------------------------
adds &lt;i&gt; and &lt;/i&gt; tags to list-item text or to implied &lt;p&gt;..&lt;/p&gt; text. mixed not supported
]]
local function div_markup_add (text, style)
local implied_p = {};
if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text
if 'italic' == style then
return mw.ustring.gsub (text, '(\n[%*:;#]+)([^\n]+)', '%1&lt;i&gt;%2&lt;/i&gt;'); -- insert italic markup at each list item
else
return text;
end
end
if text:find ('\n+') then -- look for any number of \n characters in text
text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki
if 'italic' == style then
text = text:gsub('[^\n]+', '&lt;p&gt;&lt;i&gt;%1&lt;/i&gt;&lt;/p&gt;'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences)
else
text = text:gsub ('[^\n]+', '&lt;p&gt;%1&lt;/p&gt;'); -- insert p markup at each impled p
text = text:gsub ('\n', ''); -- strip newline characters
end
end
return text;
end
--[[--------------------------&lt; M A K E _ T E X T _ H T M L &gt;--------------------------------------------------
Add the html markup to text according to the type of content that it is: &lt;span&gt; or &lt;i&gt; tags for inline content or
&lt;div&gt; tags for block content
]]
local function make_text_html (code, text, tag, rtl, style, size, language)
local html = {};
local style_added = '';
if text:match ('^%*') then
table.insert (html, '&amp;#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki
text = text:gsub ('^%*', ''); -- remove the splat from the text
end
if 'span' == tag then -- default html tag for inline content
if 'italic' == style then -- but if italic
tag = 'i'; -- change to &lt;i&gt; tags
end
else -- must be div so go
text = div_markup_add (text, style); -- handle implied &lt;p&gt;, implied &lt;p&gt; with &lt;i&gt;, and list markup (*;:#) with &lt;i&gt;
end
table.insert (html, table.concat ({'&lt;', tag})); -- open the &lt;i&gt;, &lt;span&gt;, or &lt;div&gt; html tag
table.insert (html, table.concat ({' lang="', code, '\"'})); -- add language attribute
if rtl or unicode.is_rtl(text) then
table.insert (html, ' dir="rtl"'); -- add direction attribute for right to left languages
end
if 'normal' == style then -- when |italic=no
table.insert (html, ' style=\"font-style: normal;'); -- override external markup, if any
style_added = '\"'; -- remember that style attribute added and is not yet closed
end
if is_set (size) then -- when |size=&lt;something&gt;
if is_set (style_added) then
table.insert (html, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted
else
table.insert (html, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute
style_added = '\"'; -- remember that style attribute added and is not yet closed
end
end
if is_set (language) then
table.insert (html, table.concat ({style_added, ' title=\"', language})); --start the title text
if language:find ('languages') then
table.insert (html, ' collective text'); -- for collective languages
else
table.insert (html, ' language text'); -- for individual languages
end
table.insert (html, '\"&gt;'); -- close the opening html tag
else
table.insert (html, table.concat ({style_added, '&gt;'})); -- close the style attribute and close opening html tag
end
table.insert (html, text); -- insert the text
table.insert (html, table.concat ({'&lt;/', tag, '&gt;'})); -- close the &lt;i&gt;, &lt;span&gt;, or &lt;div&gt; html tag
if rtl then -- legacy; shouldn't be necessary because all of the rtl text is wrapped inside an html tag with dir="rtl" attribute
table.insert (html, '&amp;lrm;'); -- make sure the browser knows that we're at the end of the rtl
end
return table.concat (html); -- put it all together and done
end
--[=[-------------------------&lt; M A K E _ C A T E G O R Y &gt;----------------------------------------------------
For individual language, &lt;language&gt;, returns:
[[Category:Articles containing &lt;language&gt;-language text]]
for English:
[[Category:Articles containing explicitly cited English-language text]]
for ISO 639-2 collective languages (and for 639-1 bh):
[[Category:Articles with text in &lt;language&gt; languages]]
]=]
local function make_category (code, language_name, nocat, name_get)
local cat = {};
local retval;
if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space
return ''; -- return empty string for concatenation
end
if language_name:find ('languages') then
return table.concat ({'[[Category:Articles with text in ', language_name, ']]'});
end
table.insert (cat, '[[Category:Articles containing ');
if 'en' == code then
table.insert (cat, 'explicitly cited ' .. language_name); -- falls back to English if regional name not available
else
table.insert (cat, language_name);
end
table.insert (cat, '-language text]]');
return table.concat (cat);
end
--[[--------------------------&lt; M A K E _ T R A N S L I T &gt;----------------------------------------------------
return translit &lt;i lang=xx-Latn&gt;...&lt;/i&gt; where xx is the language code; else return empty string
The value |script= is not used in {{transl}} for this purpose; instead it uses |code. Because language scripts
are listed in the {{transl}} switches they are included in the data tables. The script parameter is introduced
at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code.
To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed
to be |translit-script= (in this function, tscript)
This function is used by both lang_xx() and transl()
lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style
transl() always provides language_name, translit, and one of code or tscript, never both; always provides style
For {{transl}}, style only applies when a language code is provided
]]
local function make_translit (code, language_name, translit, std, tscript, style)
local title;
local tout = {};
local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards
if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}})
if not style then -- nil for the default italic style
table.insert (tout, "&lt;i lang=\""); -- so use &lt;i&gt; tag
else
table.insert (tout, table.concat ({'&lt;span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it
end
table.insert (tout, code);
table.insert (tout, "-Latn\" title=\""); -- transliterations are always Latin script
else
table.insert (tout, "&lt;span title=\""); -- when no language code: no lang= attribute, not italic ({{transl}} only)
end
std = std and std:lower(); -- lower case for table indexing
if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified
table.insert (tout, language_name); -- write a generic tool tip
if not language_name:find ('languages') then -- collective language names (plural 'languages' is part of the name)
table.insert (tout, '-language') -- skip this text (individual and macro languages only)
end
table.insert (tout, ' romanization'); -- finish the tool tip; use romanization when neither script nor standard supplied
elseif is_set (std) and is_set (tscript) then -- when both are specified
if title_table[std] then -- and if standard is legitimate
if title_table[std][tscript] then -- and if script for that standard is legitimate
table.insert (tout, table.concat ({title_table[std][tscript:lower()], ' (', script_table[tscript][1], ' script) transliteration'})); -- add the appropriate text to the tool tip
else
table.insert (tout, title_table[std]['default']); -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard?
end
else
return ''; -- invalid standard, setup for error message
end
elseif is_set (std) then -- translit-script not set, use language code
if not title_table[std] then return ''; end -- invalid standard, setup for error message
if title_table[std][code] then -- if language code is in the table (transl may not provide a language code)
-- table.insert (tout, table.concat ({title_table[std][code:lower()], ' (', lang_table[code][1], ' language) transliteration'})); -- add the appropriate text to the tool tip
table.insert (tout, table.concat ({title_table[std][code:lower()], ' (', language_name, ' language) transliteration'})); -- add the appropriate text to the tool tip
else -- code doesn't match
table.insert (tout, title_table[std]['default']); -- so use the standard's default
end
else -- here if translit-script set but translit-std not set
if title_table['no_std'][tscript] then
table.insert (tout, title_table['no_std'][tscript]); -- use translit-script if set
elseif title_table['no_std'][code] then
table.insert (tout, title_table['no_std'][code]); -- use language code
else
if is_set (tscript) then
table.insert (tout, table.concat ({language_name, '-script transliteration'})); -- write a script tool tip
elseif is_set (code) then
if not language_name:find ('languages') then -- collective language names (plural 'languages' is part of the name)
table.insert (tout, '-language') -- skip this text (individual and macro languages only)
end
table.insert (tout, ' transliteration'); -- finish the tool tip
else
table.insert (tout, ' transliteration'); -- generic tool tip (can we ever get here?)
end
end
end
table.insert (tout, '"&gt;');
table.insert (tout, translit);
if is_set (code) and not style then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}})
table.insert (tout, "&lt;/i&gt;"); -- close the italic tag
else
table.insert (tout, "&lt;/span&gt;"); -- no language code so close the span tag
end
return table.concat (tout);
end
--[[--------------------------&lt; V A L I D A T E _ T E X T &gt;----------------------------------------------------
This function checks the content of args.text and returns empty string if nothing is amiss else it returns an
error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup.
Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text
either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert.
]]
local function validate_text (template, args)
if not is_set (args.text) then
return make_error_msg ('no text', args, template);
end
if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes
return make_error_msg ('text has malformed markup', args, template);
end
local style = args.italic;
if ('unset' ~= style) and ('invert' ~=style) then
if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic
return make_error_msg ('text has italic markup', args, template);
end
end
end
--[[--------------------------&lt; R E N D E R _ M A I N T &gt;------------------------------------------------------
render mainenance messages and categories
]]
local function render_maint(nocat)
local maint = {};
if 0 &lt; #maint_msgs then -- when there are maintenance messages
table.insert (maint, table.concat ({'&lt;span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;"&gt;'})); -- opening &lt;span&gt; tag
for _, msg in ipairs (maint_msgs) do
table.insert (maint, table.concat ({msg, ' '})); -- add message strings
end
table.insert (maint, '&lt;/span&gt;'); -- close the span
end
if (0 &lt; #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only
for _, cat in ipairs (maint_cats) do
table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories
end
end
return table.concat (maint);
end
--[[--------------------------&lt; P R O T O _ P R E F I X &gt;------------------------------------------------------
for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat
will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we
do nothing
proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits
regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac
]]
local function proto_prefix (text, language_name, proto_param)
if false == proto_param then -- when forced by |proto=no
return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text
elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes
return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats
end
return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat
end
--[[--------------------------&lt; H A S _ P O E M _ T A G &gt;------------------------------------------------------
looks for a poem strip marker in text; returns true when found; false else
auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know
the content that will replace the stripmarker.
]]
local function has_poem_tag (text)
return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false;
end
--[[--------------------------&lt; H T M L _ T A G _ S E L E C T &gt;------------------------------------------------
Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text.
If text contains:
\n\n text has implied &lt;p&gt;..&lt;/p&gt; tags - trim leading and trailing whitespace and return
If text begins with list markup:
\n* unordered
\n; definition
\n: definition
\n# ordered
trim all leading whitespace except \n and trim all trailing whitespace
If text contains &lt;poem&gt;...&lt;/poem&gt; stripmarker, return text unmodified and choose &lt;div&gt;..&lt;/div&gt; tags because
the stripmarker is replaced with text wrapped in &lt;div&gt;..&lt;/div&gt; tags.
]]
local function html_tag_select (text)
local tag;
if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that)
tag = 'div'; -- poem replacement is in div tags so lang must use div tags
elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags
text = mw.text.trim (text); -- trim leading and trailing whitespace characters
tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags
elseif text:find ('\n[%*:;%#]') then -- if text has list markup
text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n'
tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki)
else
text = mw.text.trim (text); -- plain text
tag = 'span'; -- so span is fine
end
return text, tag;
end
--[[--------------------------&lt; V A L I D A T E _ P R O T O &gt;--------------------------------------------------
validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false,
empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of
true indicating that some other value has been assigned to |proto=
]]
local function validate_proto (proto_param)
if 'yes' == proto_param then
return true;
elseif 'no' == proto_param then
return false;
elseif is_set (proto_param) then
return nil, true; -- |proto= something other than 'yes' or 'no'
else
return nil; -- missing or empty
end
end
--[[--------------------------&lt; L A N G U A G E _ N A M E _ G E T &gt;--------------------------------------------
common function to return language name from the data set according to IETF tag
returns language name if found in data tables; nil else
]]
local function language_name_get (ietf, code, cat)
ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case
local name; -- remains nil if not found
if override_table[ietf] then -- look for whole IETF tag in override table
name = override_table[ietf][1];
elseif override_table[code] then -- not there so try basic language code
name = override_table[code][1];
elseif lang_table[code] then -- shift to iana code/name table
name = lang_table[code][1]; -- table entries sometimes have multiple names, always take the first one
elseif lang_dep_table[code] then
-- if cat then
-- table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code}));
-- table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'}));
-- end
name = lang_dep_table[code][1]; -- table entries sometimes have multiple names, always take the first one
end
if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name
table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code}));
table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'}));
end
return name; -- name from data tables or nil
end
--[[--------------------------&lt; _ L A N G &gt;--------------------------------------------------------------------
entry point for {{lang}}
there should be no reason to set parameters in the {{lang}} {{#invoke:}}
&lt;includeonly&gt;{{#invoke:lang|lang}}&lt;/includeonly&gt;
parameters are received from the template's frame (parent frame)
]]
local function _lang (args)
local out = {};
local language_name; -- used to make category names
local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set
local subtags = {}; -- IETF subtags script, region, variant, and private
local code; -- the language code
local msg; -- for error messages
local tag = 'span'; -- initial value for make_text_html()
local template = args.template or 'Lang';
validate_cat_args (args); -- determine if categorization should be suppressed
if args[1] and args.code then
return make_error_msg ('conflicting: {{{1}}} and |code=', args, template);
else
args.code = args[1] or args.code; -- prefer args.code
end
if args[2] and args.text then
return make_error_msg ('conflicting: {{{2}}} and |text=', args, template);
else
args.text = args[2] or args.text; -- prefer args.text
end
msg = validate_text (template, args); -- ensure that |text= is set
if is_set (msg) then -- msg is an already-formatted error message
return msg;
end
args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly
args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -&gt; true, other values -&gt; false
args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag
if msg then
return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template);
end
code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}})
if msg then
return make_error_msg ( msg, args, template);
end
args.italic, msg = validate_italic (args);
if msg then
return make_error_msg (msg, args, template);
end
if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls
if ('latn' == subtags.script) or -- script is latn
(this_wiki_lang ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics)
args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic
else
args.italic = 'inherit'; -- italic not set; script not latn; inherit current style
end
end
if is_set (subtags.script) then -- if script set, override rtl setting
if in_array (subtags.script, lang_data.rtl_scripts) then
args.rtl = true; -- script is an rtl script
else
args.rtl = false; -- script is not an rtl script
end
end
args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles
language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant
if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content
args.text = invert_italics (args.text)
end
args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat
table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name));
table.insert (out, make_category (code, language_name, args.nocat));
table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories
return table.concat (out); -- put it all together and done
end
--[[--------------------------&lt; L A N G &gt;----------------------------------------------------------------------
entry point for {{lang}}
there should be no reason to set parameters in the {{lang}} {{#invoke:}}
&lt;includeonly&gt;{{#invoke:lang|lang}}&lt;/includeonly&gt;
parameters are received from the template's frame (parent frame)
]]
local function lang (frame)
local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text
valueFunc = function (key, value)
if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space
return value; -- return untrimmed 'text'
elseif value then -- all other values: if the value is not nil
value = mw.text.trim (value); -- trim whitespace
if '' ~= value then -- empty string when value was only whitespace
return value;
end
end
return nil; -- value was empty or contained only whitespace
end -- end of valueFunc
});
return _lang (args);
end
--[[--------------------------&lt; L A N G _ X X &gt;----------------------------------------------------------------
For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All
other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages
that can have multiple writing systems, it may be appropriate to set |script= as well.
For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default
styling that should be applied to text.
For normal, upright style:
&lt;includeonly&gt;{{#invoke:lang|lang_xx_inherit|code=xx}}&lt;/includeonly&gt;
For italic style:
&lt;includeonly&gt;{{#invoke:lang|lang_xx_italic|code=xx}}&lt;/includeonly&gt;
All other parameters should be received from the template's frame (parent frame)
Supported parameters are:
|code = (required) the IANA language code
|script = IANA script code; especially for use with languages that use multiple writing systems
|region = IANA region code
|variant = IANA variant code
|text = (required) the displayed text in language specified by code
|link = boolean false ('no') does not link code-spcified language name to associated language article
|rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language
|nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected
|cat = boolian false ('no') opposite form of |nocat=
|italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state
|lit = text that is a literal translation of text
|label = 'none' to suppress all labeling (language name, 'translit.', 'lit.')
any other text replaces language-name label - automatic wikilinking disabled
for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script):
|translit = text that is a transliteration of text
|translit-std = the standard that applies to the transliteration
|translit-script = ISO 15924 script name; falls back to code
For {{lang-xx}}, the positional parameters are:
{{{1}}} text
{{{2}}} transliterated text
{{{3}}} literal translation text
no other positional parameters are allowed
]]
local function _lang_xx (args)
local out = {};
local language_name; -- used to make display text, article links
local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set
local subtags = {}; -- IETF subtags script, region, and variant
local code; -- the language code
local translit_script_name; -- name associated with IANA (ISO 15924) script code
local translit;
local translit_title;
local msg; -- for error messages
local tag = 'span'; -- initial value for make_text_html()
local template = args.template or 'Lang-xx';
if args[1] and args.text then
return make_error_msg ('conflicting: {{{1}}} and |text=', args, template);
else
args.text = args[1] or args.text; -- prefer args.text
end
msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding
if is_set (msg) then
return msg;
end
args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly
if args[2] and args.translit then
return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template);
else
args.translit = args[2] or args.translit -- prefer args.translit
end
if args[3] and (args.translation or args.lit) then
return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template);
elseif args.translation and args.lit then
return make_error_msg ('conflicting: |lit= and |translation=', args, template);
else
args.translation = args[3] or args.translation or args.lit; -- prefer args.translation
end
if args.links and args.link then
return make_error_msg ('conflicting: |links= and |link=', args, template);
else
args.link = args.link or args.links; -- prefer args.link
end
validate_cat_args (args); -- determine if categorization should be suppressed
args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -&gt; true, other values -&gt; false
code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private
if msg then -- if an error detected then there is an error message
return make_error_msg (msg, args, template);
end
args.italic, msg = validate_italic (args);
if msg then
return make_error_msg (msg, args, template);
end
if nil == args.italic then -- args.italic controls
if is_set (subtags.script) then
if 'latn' == subtags.script then
args.italic = 'italic'; -- |script=Latn; set for font-style:italic
else
args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:&lt;initial_style_state&gt;
end
else
args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:&lt;initial_style_state&gt;
end
end
if is_set (subtags.script) then -- if script set override rtl setting
if in_array (subtags.script, lang_data.rtl_scripts) then
args.rtl = true; -- script is an rtl script
else
args.rtl = false; -- script is not an rtl script
end
end
args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag
if msg then
return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template);
end
args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles
language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant
category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any)
language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them
if args.label then
if 'none' ~= args.label then
table.insert (out, table.concat ({args.label, ': '})); -- custom label
end
else
if 'no' == args.link then
table.insert (out, language_name); -- language name without wikilink
else
if language_name:find ('languages') then
table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink
elseif lang_data.article_name[code] then
table.insert (out, make_wikilink (lang_data.article_name[code][1], language_name)); -- language name with wikilink from override data
else
table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink
end
end
table.insert (out, ': '); -- separator
end
if 'invert' == args.italic then
args.text = invert_italics (args.text)
end
args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat
table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, nil))
if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test)
table.insert (out, ', '); -- comma to separate text from translit
if 'none' ~= args.label then
table.insert (out, '&lt;small&gt;');
if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name
translit_script_name = script_table[args['translit-script'][1]];
else
translit_script_name = language_name; -- fall back on language name
end
translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object
if translit_title.exists and ('no' ~= args.link) then
table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to
else
table.insert (out, 'romanized:'); -- else plain text
end
table.insert (out, '&amp;nbsp;&lt;/small&gt;'); -- close the small tag
end
translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script'])
if is_set (translit) then
table.insert (out, translit);
else
return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template);
end
end
if is_set (args.translation) then -- translation (not supported in {{lang}})
table.insert (out, ', ');
if 'none' ~= args.label then
table.insert (out, '&lt;small&gt;');
if 'no' == args.link then
table.insert (out, '&lt;abbr title="literal translation"&gt;lit.&lt;/abbr&gt;');
else
table.insert (out, make_wikilink ('Literal translation', 'lit.'));
end
table.insert (out, "&amp;nbsp;&lt;/small&gt;");
end
table.insert (out, table.concat ({'&amp;#39;', args.translation, '&amp;#39;'})); -- use html entities to avoid wiki markup confusion
end
table.insert (out, make_category (code, category_name, args.nocat));
table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories
return table.concat (out); -- put it all together and done
end
--[[--------------------------&lt; L A N G _ X X _ A R G S _ G E T &gt;----------------------------------------------
common function to get args table from {{lang-??}} templates
returns table of args
]]
local function lang_xx_args_get (frame)
local args = getArgs(frame,
{
parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}}
valueFunc = function (key, value)
if 1 == key then -- the 'text' parameter; do not trim wite space
return value; -- return untrimmed 'text'
elseif value then -- all other values: if the value is not nil
value = mw.text.trim (value); -- trim whitespace
if '' ~= value then -- empty string when value was only whitespace
return value;
end
end
return nil; -- value was empty or contained only whitespace
end -- end of valueFunc
});
return args;
end
--[[--------------------------&lt; L A N G _ X X _ I T A L I C &gt;--------------------------------------------------
Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic.
]]
local function lang_xx_italic (frame)
local args = lang_xx_args_get (frame);
initial_style_state = 'italic';
return _lang_xx (args);
end
--[[--------------------------&lt; _ L A N G _ X X _ I T A L I C &gt;------------------------------------------------
Entry point ffrom another module. Sets the initial style state to italic.
]]
local function _lang_xx_italic (args)
initial_style_state = 'italic';
return _lang_xx (args);
end
--[[--------------------------&lt; L A N G _ X X _ I N H E R I T &gt;------------------------------------------------
Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit.
]]
local function lang_xx_inherit (frame)
local args = lang_xx_args_get (frame);
initial_style_state = 'inherit';
return _lang_xx (args);
end
--[[--------------------------&lt; _ L A N G _ X X _ I N H E R I T &gt;----------------------------------------------
Entry point from another module. Sets the initial style state to inherit.
]]
local function _lang_xx_inherit (args)
initial_style_state = 'inherit';
return _lang_xx (args);
end
--[[--------------------------&lt; _ I S _ I E T F _ T A G &gt;------------------------------------------------------
Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid.
All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function.
Module entry point from another module
]]
local function _is_ietf_tag (tag) -- entry point when this module is require()d into another
local c, s, r, v, p, err; -- code, script, region, variant, private, error message
c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate
return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else
end
--[[--------------------------&lt; I S _ I E T F _ T A G &gt;--------------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function is_ietf_tag (frame)
return _is_ietf_tag (getArgs(frame)[1]); -- args[1] is the ietf language tag to be tested; getArgs() so we also get parent frame
end
--[[--------------------------&lt; _ N A M E _ F R O M _ T A G &gt;--------------------------------------------------
Returns language name associated with IETF language tag if valid; error message else.
All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function.
Set invoke's |link= parameter to yes to get wikilinked version of the language name.
Module entry point from another module
]]
local function _name_from_tag (args)
local subtags = {}; -- IETF subtags script, region, variant, and private
local raw_code = args[1]; -- save a copy of the input IETF subtag
local link = 'yes' == args['link']; -- make a boolean
local label = args.label;
local code; -- the language code
local msg; -- gets an error message if IETF language tag is malformed or invalid
local language_name = '';
code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code);
if msg then
local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template)
return table.concat ({'&lt;span style=\"font-size: 100%; font-style: normal;\" class=\"error\"&gt;Error: ', template, msg, '&lt;/span&gt;'});
end
raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private
language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant
language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them
if link then -- when |link=yes, wikilink the language name
if language_name:find ('languages') then
language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink
elseif lang_data.article_name[code] then
language_name = make_wikilink (lang_data.article_name[code][1], label or language_name); -- language name with wikilink from override data
else
language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink
end
end
return language_name;
end
--[[--------------------------&lt; N A M E _ F R O M _ T A G &gt;----------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|&lt;ietf tag&gt;|link=&lt;yes&gt;|template=&lt;template name&gt;}}
return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame
end
--[[--------------------------&lt; _ T A G _ F R O M _ N A M E &gt;--------------------------------------------------
Returns the ietf language tag associated with the language name. Spelling of language name must be correct
according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator,
that disambiguator must be omitted (they are not present in the data name-to-tag tables).
Module entry point from another module
]]
local function _tag_from_name (args) -- entry point from another module
local msg;
if args[1] and '' ~= args[1] then
local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live
local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct)
local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard
if tag then
return tag, true; -- language name found so return tag and done; second return used by is_lang_name()
else
msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message
end
else
msg = 'missing language name' -- language name not provided, error message
end
local template = '';
if args.template and '' ~= args.template then
template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template)
end
return table.concat ({'&lt;span style=\"font-size: 100%; font-style: normal;\" class=\"error\"&gt;Error: ', template, msg, '&lt;/span&gt;'});
end
--[[--------------------------&lt; T A G _ F R O M _ N A M E &gt;----------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|&lt;language name&gt;|link=&lt;yes&gt;|template=&lt;template name&gt;}}
local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name()
return result;
end
--[[--------------------------&lt; I S _ L A N G _ N A M E &gt;------------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function is_lang_name (frame)
local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name()
return result and true or nil;
end
--[[--------------------------&lt; _ T R A N S L &gt;----------------------------------------------------------------
Module entry point from another module
]]
local function _transl (args)
local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards
local language_name; -- language name that matches language code; used for tool tip
local translit; -- translitterated text to display
local script; -- IANA script
local msg; -- for when called functions return an error message
if is_set (args[3]) then -- [3] set when {{transl|code|standard|text}}
args.text = args[3]; -- get the transliterated text
args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing
if not title_table[args.translit_std] then
return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transl');
end
else
if is_set (args[2]) then -- [2] set when {{transl|code|text}}
args.text = args[2]; -- get the transliterated text
else
if args[1] and args[1]:match ('^%a%a%a?%a?$') then -- args[2] missing; is args[1] a code or its it the transliterated text?
return make_error_msg ('no text', args, 'Transl'); -- args[1] is a code so we're missing text
else
args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message
return make_error_msg ('missing language / script code', args, 'Transl');
end
end
end
if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code
if args[1]:match ('^%a%a%a?%a?$') then -- args[1] has correct form?
args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters); lower case because table indexes are lower case
else
return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transl'); -- invalid language / script code
end
else
return make_error_msg ('missing language / script code', args, 'Transl'); -- missing language / script code so quit
end
args.italic, msg = validate_italic (args);
if msg then
return make_error_msg (msg, args, 'Transl');
end
if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default
args.italic = nil; -- set to nil;
end
if override_table[args.code] then -- is code a language code defined in the override table?
language_name = override_table[args.code][1];
elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables?
language_name = lang_table[args.code][1];
elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables?
language_name = lang_dep_table[args.code][1];
elseif script_table[args.code] then -- if here, code is not a language code; is it a script code?
language_name = script_table[args.code][1];
script = args.code; -- code was an ISO 15924 script so use that instead
args.code = ''; -- unset because not a language code
else
return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transl'); -- invalid language / script code
end
-- here only when all parameters passed to make_translit() are valid
return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic);
end
--[[--------------------------&lt; T R A N S L &gt;------------------------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function transl (frame)
return _transl (getArgs(frame));
end
--[[--------------------------&lt; C A T E G O R Y _ F R O M _ T A G &gt;--------------------------------------------
Returns category name associated with IETF language tag if valid; error message else
All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function.
Module entry point from another module
]]
local function _category_from_tag (args)
local subtags = {}; -- IETF subtags script, region, variant, and private
local raw_code = args[1]; -- save a copy of the input IETF subtag
local link = 'yes' == args['link']; -- make a boolean
local label = args.label;
local code; -- the language code
local msg; -- gets an error message if IETF language tag is malformed or invalid
local category_name = '';
code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code);
if msg then
local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template)
return table.concat ({'&lt;span style=\"font-size: 100%; font-style: normal;\" class=\"error\"&gt;Error: ', template, msg, '&lt;/span&gt;'});
end
raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private
category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant
category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', '');
return category_name;
end
--[[--------------------------&lt; C A T E G O R Y _ F R O M _ T A G &gt;--------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|&lt;ietf tag&gt;|template=&lt;template name&gt;}}
return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
category_from_tag = category_from_tag,
lang = lang, -- entry point for {{lang}}
lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}}
lang_xx_italic = lang_xx_italic,
is_ietf_tag = is_ietf_tag,
is_lang_name = is_lang_name,
tag_from_name = tag_from_name, -- returns ietf tag associated with language name
name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates
transl = transl, -- entry point for {{transl}}
_category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules
_lang = _lang,
_lang_xx_inherit = _lang_xx_inherit,
_lang_xx_italic = _lang_xx_italic,
_is_ietf_tag = _is_ietf_tag,
get_ietf_parts = get_ietf_parts,
_tag_from_name = _tag_from_name,
_name_from_tag = _name_from_tag,
_transl = _transl,
};</text>
<sha1>ezxq0frq3q2l7x2rixjnkmrngbvcglr</sha1>
</revision>
</page>
<page>
<title>Module:Lang/ISO 639 synonyms</title>
<ns>828</ns>
<id>56040973</id>
<revision>
<id>815286590</id>
<parentid>815266850</parentid>
<timestamp>2017-12-13T23:10:47Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3163" xml:space="preserve">-- File-Date: 2013-01-11
return {
["aar"] = "aa",
["abk"] = "ab",
["afr"] = "af",
["aka"] = "ak",
["amh"] = "am",
["ara"] = "ar",
["arg"] = "an",
["asm"] = "as",
["ava"] = "av",
["ave"] = "ae",
["aym"] = "ay",
["aze"] = "az",
["bak"] = "ba",
["bam"] = "bm",
["bel"] = "be",
["ben"] = "bn",
["bih"] = "bh",
["bis"] = "bi",
["bod"] = "bo",
["bos"] = "bs",
["bre"] = "br",
["bul"] = "bg",
["cat"] = "ca",
["ces"] = "cs",
["cha"] = "ch",
["che"] = "ce",
["chu"] = "cu",
["chv"] = "cv",
["cor"] = "kw",
["cos"] = "co",
["cre"] = "cr",
["cym"] = "cy",
["dan"] = "da",
["deu"] = "de",
["div"] = "dv",
["dzo"] = "dz",
["ell"] = "el",
["eng"] = "en",
["epo"] = "eo",
["est"] = "et",
["eus"] = "eu",
["ewe"] = "ee",
["fao"] = "fo",
["fas"] = "fa",
["fij"] = "fj",
["fin"] = "fi",
["fra"] = "fr",
["fry"] = "fy",
["ful"] = "ff",
["gla"] = "gd",
["gle"] = "ga",
["glg"] = "gl",
["glv"] = "gv",
["grn"] = "gn",
["guj"] = "gu",
["hat"] = "ht",
["hau"] = "ha",
["heb"] = "he",
["her"] = "hz",
["hin"] = "hi",
["hmo"] = "ho",
["hrv"] = "hr",
["hun"] = "hu",
["hye"] = "hy",
["ibo"] = "ig",
["ido"] = "io",
["iii"] = "ii",
["iku"] = "iu",
["ile"] = "ie",
["ina"] = "ia",
["ind"] = "id",
["ipk"] = "ik",
["isl"] = "is",
["ita"] = "it",
["jav"] = "jv",
["jpn"] = "ja",
["kal"] = "kl",
["kan"] = "kn",
["kas"] = "ks",
["kat"] = "ka",
["kau"] = "kr",
["kaz"] = "kk",
["khm"] = "km",
["kik"] = "ki",
["kin"] = "rw",
["kir"] = "ky",
["kom"] = "kv",
["kon"] = "kg",
["kor"] = "ko",
["kua"] = "kj",
["kur"] = "ku",
["lao"] = "lo",
["lat"] = "la",
["lav"] = "lv",
["lim"] = "li",
["lin"] = "ln",
["lit"] = "lt",
["ltz"] = "lb",
["lub"] = "lu",
["lug"] = "lg",
["mah"] = "mh",
["mal"] = "ml",
["mar"] = "mr",
["mkd"] = "mk",
["mlg"] = "mg",
["mlt"] = "mt",
["mon"] = "mn",
["mri"] = "mi",
["msa"] = "ms",
["mya"] = "my",
["nau"] = "na",
["nav"] = "nv",
["nbl"] = "nr",
["nde"] = "nd",
["ndo"] = "ng",
["nep"] = "ne",
["nld"] = "nl",
["nno"] = "nn",
["nob"] = "nb",
["nor"] = "no",
["nya"] = "ny",
["oci"] = "oc",
["oji"] = "oj",
["ori"] = "or",
["orm"] = "om",
["oss"] = "os",
["pan"] = "pa",
["pli"] = "pi",
["pol"] = "pl",
["por"] = "pt",
["pus"] = "ps",
["que"] = "qu",
["roh"] = "rm",
["ron"] = "ro",
["run"] = "rn",
["rus"] = "ru",
["sag"] = "sg",
["san"] = "sa",
["sin"] = "si",
["slk"] = "sk",
["slv"] = "sl",
["sme"] = "se",
["smo"] = "sm",
["sna"] = "sn",
["snd"] = "sd",
["som"] = "so",
["sot"] = "st",
["spa"] = "es",
["sqi"] = "sq",
["srd"] = "sc",
["srp"] = "sr",
["ssw"] = "ss",
["sun"] = "su",
["swa"] = "sw",
["swe"] = "sv",
["tah"] = "ty",
["tam"] = "ta",
["tat"] = "tt",
["tel"] = "te",
["tgk"] = "tg",
["tgl"] = "tl",
["tha"] = "th",
["tir"] = "ti",
["ton"] = "to",
["tsn"] = "tn",
["tso"] = "ts",
["tuk"] = "tk",
["tur"] = "tr",
["twi"] = "tw",
["uig"] = "ug",
["ukr"] = "uk",
["urd"] = "ur",
["uzb"] = "uz",
["ven"] = "ve",
["vie"] = "vi",
["vol"] = "vo",
["wln"] = "wa",
["wol"] = "wo",
["xho"] = "xh",
["yid"] = "yi",
["yor"] = "yo",
["zha"] = "za",
["zho"] = "zh",
["zul"] = "zu"
}</text>
<sha1>shzq5qyzo42nqfska6amwdq4g8lois9</sha1>
</revision>
</page>
<page>
<title>Module:Lang/data</title>
<ns>828</ns>
<id>55691537</id>
<revision>
<id>985742951</id>
<parentid>981775191</parentid>
<timestamp>2020-10-27T18:09:00Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="20855" xml:space="preserve">--[[--------------------------&lt; L A N G _ N A M E _ T A B L E &gt;------------------------------------------------
primary table of tables that decode:
lang -&gt; language tags and names
script -&gt; ISO 15924 script tags
region -&gt; ISO 3166 region tags
variant -&gt; iana registered variant tags
suppressed -&gt; map of scripts tags and their associated language tags
all of these data come from separate modules that are derived from the IANA language-subtag-registry file
key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes
have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches
the first name.
TODO: instead of returning:
["key"] = {"name"}
where each table has only one name, return
["key"] = "name"
requires changes in Module:Lang.
]]
local function key_to_lower (module, src_type)
local out = {};
local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data
if 'var_sup' == src_type then
for k, v in pairs (source) do
out[k:lower()] = v; -- for variant, everything is needed
end
elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active)
for k, v in pairs (source.active) do
out[k:lower()] = {v[1]}; -- ignore multiple names; take first name only
end
elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated)
for k, v in pairs (source.deprecated) do
out[k:lower()] = {v[1]}; -- ignore multiple names; take first name only
end
else -- here for all other sources
for k, v in pairs (source) do
out[k:lower()] = {v[1]}; -- ignore multiple names; take first name only
end
end
return out;
end
local lang_name_table = {
lang = key_to_lower ('Module:Language/data/iana languages', 'lang'),
lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'),
script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower
region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower
variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'),
suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower
}
--[[--------------------------&lt; O V E R R I D E &gt;--------------------------------------------------------------
Language codes and names in this table override the BCP47 names in lang_name_table.
indexes in this table shall always be lower case
]]
local override = {
------------------------------&lt; I S O 6 3 9 - 1 &gt;------------------------------------------------------------
["ca-valencia"] = {"Valencian"},
["cu"] = {"Church Slavonic"}, -- 2nd IANA name;
["de-at"] = {"Austrian German"}, -- these code-region and code-variant tags to match en.wiki article names
["de-ch"] = {"Swiss Standard German"},
["en-au"] = {"Australian English"},
["en-ca"] = {"Canadian English"},
["en-emodeng"] = {"Early Modern English"},
["en-gb"] = {"British English"},
["en-ie"] = {"Irish English"},
["en-in"] = {"Indian English"},
["en-nz"] = {"New Zealand English"},
["en-us"] = {"American English"},
["en-za"] = {"South African English"},
["fy"] = {"West Frisian"}, -- Western Frisian
["mo"] = {"Moldovan"}, -- Moldavian (deprecated code); to match en.wiki article title
["oc-provenc"] = {"Provençal"},
["ps"] = {"Pashto"}, -- Pushto
["tw-asante"] = {"Asante Twi"},
-- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages
--&lt;begin do-not-edit except to comment out&gt;--
["av"] = {"Avar"}, -- Avaric
["bo"] = {"Standard Tibetan"}, -- Tibetan
["el"] = {"Greek"}, -- Modern Greek
-- ["en-SA"] = {"South African English"}, -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa
["ff"] = {"Fula"}, -- Fulah
["ht"] = {"Haitian Creole"}, -- Haitian
["hz"] = {"Otjiherero"}, -- Herero
["ii"] = {"Yi"}, -- Sichuan Yi
["ki"] = {"Gikuyu"}, -- Kikuyu
["kl"] = {"Greenlandic"}, -- Kalaallisut
["ky"] = {"Kyrgyz"}, -- Kirghiz
["lg"] = {"Luganda"}, -- Ganda
["li"] = {"Limburgish"}, -- Limburgan
["mi"] = {"Māori"}, -- Maori
["na"] = {"Nauruan"}, -- Nauru
["nb"] = {"Bokmål"}, -- Norwegian Bokmål
["nd"] = {"Northern Ndebele"}, -- North Ndebele
["nn"] = {"Nynorsk"}, -- Norwegian Nynorsk
["nr"] = {"Southern Ndebele"}, -- South Ndebele
["ny"] = {"Chichewa"}, -- Nyanja
["oj"] = {"Ojibwe"}, -- Ojibwa
["or"] = {"Odia"}, -- Oriya
["pa"] = {"Punjabi"}, -- Panjabi
["rn"] = {"Kirundi"}, -- Rundi
["sl"] = {"Slovene"}, -- Slovenian
["ss"] = {"Swazi"}, -- Swati
["st"] = {"Sotho"}, -- Southern Sotho
["to"] = {"Tongan"}, -- Tonga
--&lt;end do-not-edit except to comment out&gt;--
------------------------------&lt; I S O 6 3 9 - 2, - 3, - 5 &gt;----------------------------------------------
["arc"] = {"Aramaic"}, -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE);
["art"] = {"constructed"}, -- to match en.wiki article; lowercase for category name
["bhd"] = {"Bhadarwahi"}, -- Bhadrawahi; to match en.wiki article title
["bla"] = {"Blackfoot"}, -- Siksika; to match en.wiki article title
["bua"] = {"Buryat"}, -- Buriat; this is a macro language; these four use wp preferred transliteration;
["bxm"] = {"Mongolian Buryat"}, -- Mongolia Buriat; these three all redirect to Buryat
["bxr"] = {"Russian Buryat"}, -- Russia Buriat;
["bxu"] = {"Chinese Buryat"}, -- China Buriat;
["byr"] = {"Yipma"}, -- Baruya, Yipma
["egy"] = {"Ancient Egyptian"}, -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic
["frr"] = {"North Frisian"}, -- Northern Frisian
["frs"] = {"East Frisian Low Saxon"}, -- Eastern Frisian
["ilo"] = {"Ilocano"}, -- Iloko; to match en.wiki article title
["jam"] = {"Jamaican Patois"}, -- Jamaican Creole English
["mhr"] = {"Meadow Mari"}, -- Eastern Mari
["mid"] = {"Modern Mandaic"}, -- Mandaic
["mla"] = {"Tamambo"}, -- Malo
['mte'] = {"Mono-Alu"}, -- Mono (Solomon Islands)
["nan-tw"] = {"Taiwanese Hokkien"}, -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title
["nrf"] = {"Norman"}, -- not quite a collective - IANA name: Jèrriais; categorizes to Norman-language text
["nzi"] = {"Nzema"}, -- Nzima; to match en.wiki article title
["orv"] = {"Old East Slavic"}, -- Old Russian
["pfl"] = {"Palatine German"}, -- Pfaelzisch; to match en.wiki article
["pms"] = {"Piedmontese"}, -- Piemontese; to match en.wiki article title
["pnb"] = {"Punjabi (Western)"}, -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name()
["stq"] = {"Saterland Frisian"}, -- Saterfriesisch
["und"] = {"undetermined"}, -- capitalization to match existing category
["wrg"] = {"Warrongo"}, -- Warungu
["xal-ru"] = {"Kalmyk"}, -- to match en.wiki article title
["xgf"] = {"Tongva"}, -- ISO 639-3 is Gabrielino-Fernandeño
-- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages
--&lt;begin do-not-edit except to comment out&gt;--
["ace"] = {"Acehnese"}, -- Achinese
["aec"] = {"Sa'idi Arabic"}, -- Saidi Arabic
["akl"] = {"Aklan"}, -- Aklanon
["alt"] = {"Altay"}, -- Southern Altai
["apm"] = {"Mescalero-Chiricahua"}, -- Mescalero-Chiricahua Apache
["bal"] = {"Balochi"}, -- Baluchi
["bcl"] = {"Central Bicolano"}, -- Central Bikol
["bin"] = {"Edo"}, -- Bini
["bpy"] = {"Bishnupriya Manipuri"}, -- Bishnupriya
["chg"] = {"Chagatay"}, -- Chagatai
["ckb"] = {"Sorani Kurdish"}, -- Central Kurdish
["cnu"] = {"Shenwa"}, -- Chenoua
["coc"] = {"Cocopah"}, -- Cocopa
["diq"] = {"Zazaki"}, -- Dimli
["fit"] = {"Meänkieli"}, -- Tornedalen Finnish
["fkv"] = {"Kven"}, -- Kven Finnish
["frk"] = {"Old Frankish"}, -- Frankish
["gez"] = {"Ge'ez"}, -- Geez
["gju"] = {"Gujari"}, -- Gujari
["gsw"] = {"Alemannic German"}, -- Swiss German
["gul"] = {"Gullah"}, -- Sea Island Creole English
["hak"] = {"Hakka"}, -- Hakka Chinese
["hbo"] = {"Biblical Hebrew"}, -- Ancient Hebrew
["hnd"] = {"Hindko"}, -- Southern Hindko
-- ["ikt"] = {"Inuvialuk"}, -- Inuinnaqtun
["kaa"] = {"Karakalpak"}, -- Kara-Kalpak
["khb"] = {"Tai Lü"}, -- Lü
["kmr"] = {"Kurmanji Kurdish"}, -- Northern Kurdish
["kpo"] = {"Kposo"}, -- Ikposo
["krj"] = {"Kinaray-a"}, -- Kinaray-A
["ktz"] = {"Juǀ'hoan"}, -- Juǀʼhoan
["lez"] = {"Lezgian"}, -- Lezghian
["liv"] = {"Livonian"}, -- Liv
["lng"] = {"Lombardic"}, -- Langobardic
["mia"] = {"Miami-Illinois"}, -- Miami
["miq"] = {"Miskito"}, -- Mískito
["mix"] = {"Mixtec"}, -- Mixtepec Mixtec
["mni"] = {"Meitei"}, -- Manipuri
["mrj"] = {"Hill Mari"}, -- Western Mari
["mww"] = {"White Hmong"}, -- Hmong Daw
["nds-nl"] = {"Dutch Low Saxon"}, -- Low German
["new"] = {"Nepal Bhasa"}, -- Newari
["nso"] = {"Northern Sotho"}, -- Pedi
["nwc"] = {"Classical Nepal Bhasa"}, -- Classical Newari
["ood"] = {"O'odham"}, -- Tohono O'odham
["otk"] = {"Old Turkic"}, -- Old Turkish
["pal"] = {"Middle Persian"}, -- Pahlavi
["pam"] = {"Kapampangan"}, -- Pampanga
["phr"] = {"Potwari"}, -- Pahari-Potwari
["pka"] = {"Jain Prakrit"}, -- Ardhamāgadhī Prākrit
-- ["pnb"] = {"Punjabi"}, -- Western Panjabi
["psu"] = {"Shauraseni"}, -- Sauraseni Prākrit
["rap"] = {"Rapa Nui"}, -- Rapanui
["rar"] = {"Cook Islands Māori"}, -- Rarotongan
["rmu"] = {"Scandoromani"}, -- Tavringer Romani
["rom"] = {"Romani"}, -- Romany
["rup"] = {"Aromanian"}, -- Macedo-Romanian
["ryu"] = {"Okinawan"}, -- Central Okinawan
["sdc"] = {"Sassarese"}, -- Sassarese Sardinian
["sdn"] = {"Gallurese"}, -- Gallurese Sardinian
["shp"] = {"Shipibo"}, -- Shipibo-Conibo
["src"] = {"Logudorese"}, -- Logudorese Sardinian
["sro"] = {"Campidanese"}, -- Campidanese Sardinian
["tkl"] = {"Tokelauan"}, -- Tokelau
["tvl"] = {"Tuvaluan"}, -- Tuvalu
["tyv"] = {"Tuvan"}, -- Tuvinian
["vls"] = {"West Flemish"}, -- Vlaams
["wep"] = {"Westphalian"}, -- Westphalien
["xal"] = {"Oirat"}, -- Kalmyk
["xcl"] = {"Old Armenian"}, -- Classical Armenian
["yua"] = {"Yucatec Maya"}, -- Yucateco
--&lt;end do-not-edit except to comment out&gt;--
------------------------------&lt; P R I V A T E - U S E T A G S &gt;----------------------------------------------
["cel-x-proto"] = {"Proto-Celtic"}, -- cel in IANA is Celtic languages
["gem-x-proto"] = {"Proto-Germanic"}, -- gem in IANA is Germanic languages
["grc-x-aeolic"] = {"Aeolic Greek"}, -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre
["grc-x-attic"] = {"Attic Greek"},
["grc-x-biblical"] = {"Biblical Greek"},
["grc-x-byzant"] = {"Byzantine Greek"},
["grc-x-classic"] = {"Classical Greek"},
["grc-x-doric"] = {"Doric Greek"},
["grc-x-hellen"] = {"Hellenistic Greek"},
["grc-x-ionic"] = {"Ionic Greek"},
["grc-x-koine"] = {"Koinē Greek"},
["grc-x-medieval"] = {"Medieval Greek"},
["grc-x-patris"] = {"Patristic Greek"},
["grk-x-proto"] = {"Proto-Greek"}, -- grk in IANA is Greek languages
["iir-x-proto"] = {"Proto-Indo-Iranian"}, -- iir in IANA is Indo-Iranian Languages
["ira-x-proto"] = {"Proto-Iranian"}, -- ira in IANA is Iranian languages
["itc-x-proto"] = {"Proto-Italic"}, -- itc in IANA is Italic languages
["ksh-x-colog"] = {"Colognian"}, -- en.wiki article is Colognian; ksh (Kölsch) redirects there
["mis-x-ripuar"] = {"Ripuarian"}, -- replaces improper use of ksh in wp_languages
["sla-x-proto"] = {"Proto-Slavic"}, -- sla in IANA is Slavic languages
["yuf-x-hav"] = {"Havasupai"}, -- IANA name for these three is Havasupai-Walapai-Yavapai
["yuf-x-wal"] = {"Walapai"},
["yuf-x-yav"] = {"Yavapai"},
}
--[[--------------------------&lt; A R T I C L E _ L I N K &gt;------------------------------------------------------
for those rare occasions when article titles don't fit with the normal '&lt;language name&gt;-language', this table
maps language code to article title. Use of this table should be avoided and the use of redirects preferred as
that is the long-standing method of handling article names that don't fit with the normal pattern
]]
local article_name = {
["lij"] = {"Ligurian (Romance language)"}, -- Ligurian; see Template_talk:Lang#Ligurian_dab
['mnh'] = {"Mono language (Congo)"}, -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages
['mnr'] = {"Mono language (California)"}, -- Mono (USA)
['mru'] = {"Mono language (Cameroon)"}, -- Mono (Cameroon)
["xlg"] = {"Ligurian (ancient language)"}, -- see Template_talk:Lang#Ligurian_dab
}
--[=[-------------------------&lt; R T L _ S C R I P T S &gt;--------------------------------------------------------
ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]]
last update to this list: 2017-12-24
]=]
local rtl_scripts = {
'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr',
'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb',
'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg',
'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole',
};
--[[--------------------------&lt; T R A N S L I T T I T L E S &gt;------------------------------------------------
This is a table of tables of transliteration standards and the language codes or language scripts that apply to
those standards. This table is used to create the tool-tip text associated with the transliterated text displayed
by some of the {{lang-??}} templates.
These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for
the cases when no |std= parameter value is provided.
]]
local translit_title_table = {
['ahl'] = {
['default'] = 'Academy of the Hebrew Language transliteration',
},
['ala'] = {
['default'] = 'American Library Association – Library of Congress transliteration',
},
['ala-lc'] = {
['default'] = 'American Library Association – Library of Congress transliteration',
},
['batr'] = {
['default'] = 'Bikdash Arabic Transliteration Rules',
},
['bgn/pcgn'] = {
['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration',
},
['din'] = {
['ar'] = 'DIN 31635 Arabic',
['fa'] = 'DIN 31635 Arabic',
['ku'] = 'DIN 31635 Arabic',
['ps'] = 'DIN 31635 Arabic',
['tg'] = 'DIN 31635 Arabic',
['ug'] = 'DIN 31635 Arabic',
['ur'] = 'DIN 31635 Arabic',
['arab'] = 'DIN 31635 Arabic',
['default'] = 'DIN transliteration',
},
['eae'] = {
['default'] = 'Encyclopaedia Aethiopica transliteration',
},
['hepburn'] = {
['default'] = 'Hepburn transliteration',
},
['hunterian'] = {
['default'] = 'Hunterian transliteration',
},
['iast'] = {
['default'] = 'International Alphabet of Sanskrit transliteration',
},
['iso'] = { -- when a transliteration standard is supplied
['ab'] = 'ISO 9 Cyrillic',
['ba'] = 'ISO 9 Cyrillic',
['be'] = 'ISO 9 Cyrillic',
['bg'] = 'ISO 9 Cyrillic',
['kk'] = 'ISO 9 Cyrillic',
['ky'] = 'ISO 9 Cyrillic',
['mn'] = 'ISO 9 Cyrillic',
['ru'] = 'ISO 9 Cyrillic',
['tg'] = 'ISO 9 Cyrillic',
['uk'] = 'ISO 9 Cyrillic',
['bua'] = 'ISO 9 Cyrillic',
['sah'] = 'ISO 9 Cyrillic',
['tut'] = 'ISO 9 Cyrillic',
['xal'] = 'ISO 9 Cyrillic',
['cyrl'] = 'ISO 9 Cyrillic',
['ar'] = 'ISO 233 Arabic',
['ku'] = 'ISO 233 Arabic',
['ps'] = 'ISO 233 Arabic',
['ug'] = 'ISO 233 Arabic',
['ur'] = 'ISO 233 Arabic',
['arab'] = 'ISO 233 Arabic',
['he'] = 'ISO 259 Hebrew',
['yi'] = 'ISO 259 Hebrew',
['hebr'] = 'ISO 259 Hebrew',
['el'] = 'ISO 843 Greek',
['grc'] = 'ISO 843 Greek',
['ja'] = 'ISO 3602 Japanese',
['hira'] = 'ISO 3602 Japanese',
['hrkt'] = 'ISO 3602 Japanese',
['jpan'] = 'ISO 3602 Japanese',
['kana'] = 'ISO 3602 Japanese',
['zh'] = 'ISO 7098 Chinese',
['chi'] = 'ISO 7098 Chinese',
['pny'] = 'ISO 7098 Chinese',
['zho'] = 'ISO 7098 Chinese',
-- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani?
['hans'] = 'ISO 7098 Chinese',
['hant'] = 'ISO 7098 Chinese',
['ka'] = 'ISO 9984 Georgian',
['kat'] = 'ISO 9984 Georgian',
['arm'] = 'ISO 9985 Armenian',
['hy'] = 'ISO 9985 Armenian',
['th'] = 'ISO 11940 Thai',
['tha'] = 'ISO 11940 Thai',
['ko'] = 'ISO 11941 Korean',
['kor'] = 'ISO 11941 Korean',
['awa'] = 'ISO 15919 Indic',
['bho'] = 'ISO 15919 Indic',
['bn'] = 'ISO 15919 Indic',
['bra'] = 'ISO 15919 Indic',
['doi'] = 'ISO 15919 Indic',
['dra'] = 'ISO 15919 Indic',
['gon'] = 'ISO 15919 Indic',
['gu'] = 'ISO 15919 Indic',
['hi'] = 'ISO 15919 Indic',
['inc'] = 'ISO 15919 Indic',
['kn'] = 'ISO 15919 Indic',
['kok'] = 'ISO 15919 Indic',
['ks'] = 'ISO 15919 Indic',
['mag'] = 'ISO 15919 Indic',
['mai'] = 'ISO 15919 Indic',
['ml'] = 'ISO 15919 Indic',
['mr'] = 'ISO 15919 Indic',
['ne'] = 'ISO 15919 Indic',
['new'] = 'ISO 15919 Indic',
['or'] = 'ISO 15919 Indic',
['pa'] = 'ISO 15919 Indic',
['raj'] = 'ISO 15919 Indic',
['sa'] = 'ISO 15919 Indic',
['sat'] = 'ISO 15919 Indic',
['sd'] = 'ISO 15919 Indic',
['si'] = 'ISO 15919 Indic',
['ta'] = 'ISO 15919 Indic',
['tcy'] = 'ISO 15919 Indic',
['te'] = 'ISO 15919 Indic',
['beng'] = 'ISO 15919 Indic',
['brah'] = 'ISO 15919 Indic',
['deva'] = 'ISO 15919 Indic',
['gujr'] = 'ISO 15919 Indic',
['guru'] = 'ISO 15919 Indic',
['knda'] = 'ISO 15919 Indic',
['mlym'] = 'ISO 15919 Indic',
['orya'] = 'ISO 15919 Indic',
['sinh'] = 'ISO 15919 Indic',
['taml'] = 'ISO 15919 Indic',
['telu'] = 'ISO 15919 Indic',
['default'] = 'ISO transliteration',
},
['jyutping'] = {
['default'] = 'Jyutping transliteration',
},
['mr'] = {
['default'] = 'McCune–Reischauer transliteration',
},
['nihon-shiki'] = {
['default'] = 'Nihon-shiki transliteration',
},
['no_std'] = { -- when no transliteration standard is supplied
['akk'] = 'Semitic transliteration',
['sem'] = 'Semitic transliteration',
['phnx'] = 'Semitic transliteration',
['xsux'] = 'Cuneiform transliteration',
},
['pinyin'] = {
['default'] = 'Pinyin transliteration',
},
['rr'] = {
['default'] = 'Revised Romanization of Korean transliteration',
},
['rtgs'] = {
['default'] = 'Royal Thai General System of Transcription',
},
['satts'] = {
['default'] = 'Standard Arabic Technical Transliteration System transliteration',
},
['ungegn'] = {
['default'] = 'United Nations Group of Experts on Geographical Names transliteration',
},
['wadegile'] = {
['default'] = 'Wade–Giles transliteration',
},
['wehr'] = {
['default'] = 'Hans Wehr transliteration',
},
};
return
{
article_name = article_name,
lang_name_table = lang_name_table,
override = override,
rtl_scripts = rtl_scripts,
translit_title_table = translit_title_table,
};</text>
<sha1>qcgklxa1xe40lxhdc092fgrn8mtsmqt</sha1>
</revision>
</page>
<page>
<title>Module:Language/data/iana languages</title>
<ns>828</ns>
<id>42493523</id>
<revision>
<id>981629512</id>
<parentid>981046247</parentid>
<timestamp>2020-10-03T14:12:37Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="219605" xml:space="preserve">-- File-Date: 2020-09-29
local active = {
["aa"] = {"Afar"},
["ab"] = {"Abkhazian"},
["ae"] = {"Avestan"},
["af"] = {"Afrikaans"},
["ak"] = {"Akan"},
["am"] = {"Amharic"},
["an"] = {"Aragonese"},
["ar"] = {"Arabic"},
["as"] = {"Assamese"},
["av"] = {"Avaric"},
["ay"] = {"Aymara"},
["az"] = {"Azerbaijani"},
["ba"] = {"Bashkir"},
["be"] = {"Belarusian"},
["bg"] = {"Bulgarian"},
["bh"] = {"Bihari languages"},
["bi"] = {"Bislama"},
["bm"] = {"Bambara"},
["bn"] = {"Bengali", "Bangla"},
["bo"] = {"Tibetan"},
["br"] = {"Breton"},
["bs"] = {"Bosnian"},
["ca"] = {"Catalan", "Valencian"},
["ce"] = {"Chechen"},
["ch"] = {"Chamorro"},
["co"] = {"Corsican"},
["cr"] = {"Cree"},
["cs"] = {"Czech"},
["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"},
["cv"] = {"Chuvash"},
["cy"] = {"Welsh"},
["da"] = {"Danish"},
["de"] = {"German"},
["dv"] = {"Dhivehi", "Divehi", "Maldivian"},
["dz"] = {"Dzongkha"},
["ee"] = {"Ewe"},
["el"] = {"Modern Greek (1453-)"},
["en"] = {"English"},
["eo"] = {"Esperanto"},
["es"] = {"Spanish", "Castilian"},
["et"] = {"Estonian"},
["eu"] = {"Basque"},
["fa"] = {"Persian"},
["ff"] = {"Fulah"},
["fi"] = {"Finnish"},
["fj"] = {"Fijian"},
["fo"] = {"Faroese"},
["fr"] = {"French"},
["fy"] = {"Western Frisian"},
["ga"] = {"Irish"},
["gd"] = {"Scottish Gaelic", "Gaelic"},
["gl"] = {"Galician"},
["gn"] = {"Guarani"},
["gu"] = {"Gujarati"},
["gv"] = {"Manx"},
["ha"] = {"Hausa"},
["he"] = {"Hebrew"},
["hi"] = {"Hindi"},
["ho"] = {"Hiri Motu"},
["hr"] = {"Croatian"},
["ht"] = {"Haitian", "Haitian Creole"},
["hu"] = {"Hungarian"},
["hy"] = {"Armenian"},
["hz"] = {"Herero"},
["ia"] = {"Interlingua (International Auxiliary Language Association)"},
["id"] = {"Indonesian"},
["ie"] = {"Interlingue", "Occidental"},
["ig"] = {"Igbo"},
["ii"] = {"Sichuan Yi", "Nuosu"},
["ik"] = {"Inupiaq"},
["io"] = {"Ido"},
["is"] = {"Icelandic"},
["it"] = {"Italian"},
["iu"] = {"Inuktitut"},
["ja"] = {"Japanese"},
["jv"] = {"Javanese"},
["ka"] = {"Georgian"},
["kg"] = {"Kongo"},
["ki"] = {"Kikuyu", "Gikuyu"},
["kj"] = {"Kuanyama", "Kwanyama"},
["kk"] = {"Kazakh"},
["kl"] = {"Kalaallisut", "Greenlandic"},
["km"] = {"Khmer", "Central Khmer"},
["kn"] = {"Kannada"},
["ko"] = {"Korean"},
["kr"] = {"Kanuri"},
["ks"] = {"Kashmiri"},
["ku"] = {"Kurdish"},
["kv"] = {"Komi"},
["kw"] = {"Cornish"},
["ky"] = {"Kirghiz", "Kyrgyz"},
["la"] = {"Latin"},
["lb"] = {"Luxembourgish", "Letzeburgesch"},
["lg"] = {"Ganda", "Luganda"},
["li"] = {"Limburgan", "Limburger", "Limburgish"},
["ln"] = {"Lingala"},
["lo"] = {"Lao"},
["lt"] = {"Lithuanian"},
["lu"] = {"Luba-Katanga"},
["lv"] = {"Latvian"},
["mg"] = {"Malagasy"},
["mh"] = {"Marshallese"},
["mi"] = {"Maori"},
["mk"] = {"Macedonian"},
["ml"] = {"Malayalam"},
["mn"] = {"Mongolian"},
["mr"] = {"Marathi"},
["ms"] = {"Malay (macrolanguage)"},
["mt"] = {"Maltese"},
["my"] = {"Burmese"},
["na"] = {"Nauru"},
["nb"] = {"Norwegian Bokmål"},
["nd"] = {"North Ndebele"},
["ne"] = {"Nepali (macrolanguage)"},
["ng"] = {"Ndonga"},
["nl"] = {"Dutch", "Flemish"},
["nn"] = {"Norwegian Nynorsk"},
["no"] = {"Norwegian"},
["nr"] = {"South Ndebele"},
["nv"] = {"Navajo", "Navaho"},
["ny"] = {"Nyanja", "Chewa", "Chichewa"},
["oc"] = {"Occitan (post 1500)"},
["oj"] = {"Ojibwa"},
["om"] = {"Oromo"},
["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"},
["os"] = {"Ossetian", "Ossetic"},
["pa"] = {"Panjabi", "Punjabi"},
["pi"] = {"Pali"},
["pl"] = {"Polish"},
["ps"] = {"Pushto", "Pashto"},
["pt"] = {"Portuguese"},
["qu"] = {"Quechua"},
["rm"] = {"Romansh"},
["rn"] = {"Rundi"},
["ro"] = {"Romanian", "Moldavian", "Moldovan"},
["ru"] = {"Russian"},
["rw"] = {"Kinyarwanda"},
["sa"] = {"Sanskrit"},
["sc"] = {"Sardinian"},
["sd"] = {"Sindhi"},
["se"] = {"Northern Sami"},
["sg"] = {"Sango"},
["sh"] = {"Serbo-Croatian"},
["si"] = {"Sinhala", "Sinhalese"},
["sk"] = {"Slovak"},
["sl"] = {"Slovenian"},
["sm"] = {"Samoan"},
["sn"] = {"Shona"},
["so"] = {"Somali"},
["sq"] = {"Albanian"},
["sr"] = {"Serbian"},
["ss"] = {"Swati"},
["st"] = {"Southern Sotho"},
["su"] = {"Sundanese"},
["sv"] = {"Swedish"},
["sw"] = {"Swahili (macrolanguage)"},
["ta"] = {"Tamil"},
["te"] = {"Telugu"},
["tg"] = {"Tajik"},
["th"] = {"Thai"},
["ti"] = {"Tigrinya"},
["tk"] = {"Turkmen"},
["tl"] = {"Tagalog"},
["tn"] = {"Tswana"},
["to"] = {"Tonga (Tonga Islands)"},
["tr"] = {"Turkish"},
["ts"] = {"Tsonga"},
["tt"] = {"Tatar"},
["tw"] = {"Twi"},
["ty"] = {"Tahitian"},
["ug"] = {"Uighur", "Uyghur"},
["uk"] = {"Ukrainian"},
["ur"] = {"Urdu"},
["uz"] = {"Uzbek"},
["ve"] = {"Venda"},
["vi"] = {"Vietnamese"},
["vo"] = {"Volapük"},
["wa"] = {"Walloon"},
["wo"] = {"Wolof"},
["xh"] = {"Xhosa"},
["yi"] = {"Yiddish"},
["yo"] = {"Yoruba"},
["za"] = {"Zhuang", "Chuang"},
["zh"] = {"Chinese"},
["zu"] = {"Zulu"},
["aaa"] = {"Ghotuo"},
["aab"] = {"Alumu-Tesu"},
["aac"] = {"Ari"},
["aad"] = {"Amal"},
["aae"] = {"Arbëreshë Albanian"},
["aaf"] = {"Aranadan"},
["aag"] = {"Ambrak"},
["aah"] = {"Abu' Arapesh"},
["aai"] = {"Arifama-Miniafia"},
["aak"] = {"Ankave"},
["aal"] = {"Afade"},
["aan"] = {"Anambé"},
["aao"] = {"Algerian Saharan Arabic"},
["aap"] = {"Pará Arára"},
["aaq"] = {"Eastern Abnaki"},
["aas"] = {"Aasáx"},
["aat"] = {"Arvanitika Albanian"},
["aau"] = {"Abau"},
["aav"] = {"Austro-Asiatic languages"},
["aaw"] = {"Solong"},
["aax"] = {"Mandobo Atas"},
["aaz"] = {"Amarasi"},
["aba"] = {"Abé"},
["abb"] = {"Bankon"},
["abc"] = {"Ambala Ayta"},
["abd"] = {"Manide"},
["abe"] = {"Western Abnaki"},
["abf"] = {"Abai Sungai"},
["abg"] = {"Abaga"},
["abh"] = {"Tajiki Arabic"},
["abi"] = {"Abidji"},
["abj"] = {"Aka-Bea"},
["abl"] = {"Lampung Nyo"},
["abm"] = {"Abanyom"},
["abn"] = {"Abua"},
["abo"] = {"Abon"},
["abp"] = {"Abellen Ayta"},
["abq"] = {"Abaza"},
["abr"] = {"Abron"},
["abs"] = {"Ambonese Malay"},
["abt"] = {"Ambulas"},
["abu"] = {"Abure"},
["abv"] = {"Baharna Arabic"},
["abw"] = {"Pal"},
["abx"] = {"Inabaknon"},
["aby"] = {"Aneme Wake"},
["abz"] = {"Abui"},
["aca"] = {"Achagua"},
["acb"] = {"Áncá"},
["acd"] = {"Gikyode"},
["ace"] = {"Achinese"},
["acf"] = {"Saint Lucian Creole French"},
["ach"] = {"Acoli"},
["aci"] = {"Aka-Cari"},
["ack"] = {"Aka-Kora"},
["acl"] = {"Akar-Bale"},
["acm"] = {"Mesopotamian Arabic"},
["acn"] = {"Achang"},
["acp"] = {"Eastern Acipa"},
["acq"] = {"Ta'izzi-Adeni Arabic"},
["acr"] = {"Achi"},
["acs"] = {"Acroá"},
["act"] = {"Achterhoeks"},
["acu"] = {"Achuar-Shiwiar"},
["acv"] = {"Achumawi"},
["acw"] = {"Hijazi Arabic"},
["acx"] = {"Omani Arabic"},
["acy"] = {"Cypriot Arabic"},
["acz"] = {"Acheron"},
["ada"] = {"Adangme"},
["adb"] = {"Atauran"},
["add"] = {"Lidzonka", "Dzodinka"},
["ade"] = {"Adele"},
["adf"] = {"Dhofari Arabic"},
["adg"] = {"Andegerebinha"},
["adh"] = {"Adhola"},
["adi"] = {"Adi"},
["adj"] = {"Adioukrou"},
["adl"] = {"Galo"},
["adn"] = {"Adang"},
["ado"] = {"Abu"},
["adq"] = {"Adangbe"},
["adr"] = {"Adonara"},
["ads"] = {"Adamorobe Sign Language"},
["adt"] = {"Adnyamathanha"},
["adu"] = {"Aduge"},
["adw"] = {"Amundava"},
["adx"] = {"Amdo Tibetan"},
["ady"] = {"Adyghe", "Adygei"},
["adz"] = {"Adzera"},
["aea"] = {"Areba"},
["aeb"] = {"Tunisian Arabic"},
["aec"] = {"Saidi Arabic"},
["aed"] = {"Argentine Sign Language"},
["aee"] = {"Northeast Pashai", "Northeast Pashayi"},
["aek"] = {"Haeke"},
["ael"] = {"Ambele"},
["aem"] = {"Arem"},
["aen"] = {"Armenian Sign Language"},
["aeq"] = {"Aer"},
["aer"] = {"Eastern Arrernte"},
["aes"] = {"Alsea"},
["aeu"] = {"Akeu"},
["aew"] = {"Ambakich"},
["aey"] = {"Amele"},
["aez"] = {"Aeka"},
["afa"] = {"Afro-Asiatic languages"},
["afb"] = {"Gulf Arabic"},
["afd"] = {"Andai"},
["afe"] = {"Putukwam"},
["afg"] = {"Afghan Sign Language"},
["afh"] = {"Afrihili"},
["afi"] = {"Akrukay", "Chini"},
["afk"] = {"Nanubae"},
["afn"] = {"Defaka"},
["afo"] = {"Eloyi"},
["afp"] = {"Tapei"},
["afs"] = {"Afro-Seminole Creole"},
["aft"] = {"Afitti"},
["afu"] = {"Awutu"},
["afz"] = {"Obokuitai"},
["aga"] = {"Aguano"},
["agb"] = {"Legbo"},
["agc"] = {"Agatu"},
["agd"] = {"Agarabi"},
["age"] = {"Angal"},
["agf"] = {"Arguni"},
["agg"] = {"Angor"},
["agh"] = {"Ngelima"},
["agi"] = {"Agariya"},
["agj"] = {"Argobba"},
["agk"] = {"Isarog Agta"},
["agl"] = {"Fembe"},
["agm"] = {"Angaataha"},
["agn"] = {"Agutaynen"},
["ago"] = {"Tainae"},
["agq"] = {"Aghem"},
["agr"] = {"Aguaruna"},
["ags"] = {"Esimbi"},
["agt"] = {"Central Cagayan Agta"},
["agu"] = {"Aguacateco"},
["agv"] = {"Remontado Dumagat"},
["agw"] = {"Kahua"},
["agx"] = {"Aghul"},
["agy"] = {"Southern Alta"},
["agz"] = {"Mt. Iriga Agta"},
["aha"] = {"Ahanta"},
["ahb"] = {"Axamb"},
["ahg"] = {"Qimant"},
["ahh"] = {"Aghu"},
["ahi"] = {"Tiagbamrin Aizi"},
["ahk"] = {"Akha"},
["ahl"] = {"Igo"},
["ahm"] = {"Mobumrin Aizi"},
["ahn"] = {"Àhàn"},
["aho"] = {"Ahom"},
["ahp"] = {"Aproumu Aizi"},
["ahr"] = {"Ahirani"},
["ahs"] = {"Ashe"},
["aht"] = {"Ahtena"},
["aia"] = {"Arosi"},
["aib"] = {"Ainu (China)"},
["aic"] = {"Ainbai"},
["aid"] = {"Alngith"},
["aie"] = {"Amara"},
["aif"] = {"Agi"},
["aig"] = {"Antigua and Barbuda Creole English"},
["aih"] = {"Ai-Cham"},
["aii"] = {"Assyrian Neo-Aramaic"},
["aij"] = {"Lishanid Noshan"},
["aik"] = {"Ake"},
["ail"] = {"Aimele"},
["aim"] = {"Aimol"},
["ain"] = {"Ainu (Japan)"},
["aio"] = {"Aiton"},
["aip"] = {"Burumakok"},
["aiq"] = {"Aimaq"},
["air"] = {"Airoran"},
["ait"] = {"Arikem"},
["aiw"] = {"Aari"},
["aix"] = {"Aighon"},
["aiy"] = {"Ali"},
["aja"] = {"Aja (South Sudan)"},
["ajg"] = {"Aja (Benin)"},
["aji"] = {"Ajië"},
["ajn"] = {"Andajin"},
["ajp"] = {"South Levantine Arabic"},
["ajt"] = {"Judeo-Tunisian Arabic"},
["aju"] = {"Judeo-Moroccan Arabic"},
["ajw"] = {"Ajawa"},
["ajz"] = {"Amri Karbi"},
["akb"] = {"Batak Angkola"},
["akc"] = {"Mpur"},
["akd"] = {"Ukpet-Ehom"},
["ake"] = {"Akawaio"},
["akf"] = {"Akpa"},
["akg"] = {"Anakalangu"},
["akh"] = {"Angal Heneng"},
["aki"] = {"Aiome"},
["akj"] = {"Aka-Jeru"},
["akk"] = {"Akkadian"},
["akl"] = {"Aklanon"},
["akm"] = {"Aka-Bo"},
["ako"] = {"Akurio"},
["akp"] = {"Siwu"},
["akq"] = {"Ak"},
["akr"] = {"Araki"},
["aks"] = {"Akaselem"},
["akt"] = {"Akolet"},
["aku"] = {"Akum"},
["akv"] = {"Akhvakh"},
["akw"] = {"Akwa"},
["akx"] = {"Aka-Kede"},
["aky"] = {"Aka-Kol"},
["akz"] = {"Alabama"},
["ala"] = {"Alago"},
["alc"] = {"Qawasqar"},
["ald"] = {"Alladian"},
["ale"] = {"Aleut"},
["alf"] = {"Alege"},
["alg"] = {"Algonquian languages"},
["alh"] = {"Alawa"},
["ali"] = {"Amaimon"},
["alj"] = {"Alangan"},
["alk"] = {"Alak"},
["all"] = {"Allar"},
["alm"] = {"Amblong"},
["aln"] = {"Gheg Albanian"},
["alo"] = {"Larike-Wakasihu"},
["alp"] = {"Alune"},
["alq"] = {"Algonquin"},
["alr"] = {"Alutor"},
["als"] = {"Tosk Albanian"},
["alt"] = {"Southern Altai"},
["alu"] = {"'Are'are"},
["alv"] = {"Atlantic-Congo languages"},
["alw"] = {"Alaba-K’abeena", "Wanbasana"},
["alx"] = {"Amol"},
["aly"] = {"Alyawarr"},
["alz"] = {"Alur"},
["ama"] = {"Amanayé"},
["amb"] = {"Ambo"},
["amc"] = {"Amahuaca"},
["ame"] = {"Yanesha'"},
["amf"] = {"Hamer-Banna"},
["amg"] = {"Amurdak"},
["ami"] = {"Amis"},
["amj"] = {"Amdang"},
["amk"] = {"Ambai"},
["aml"] = {"War-Jaintia"},
["amm"] = {"Ama (Papua New Guinea)"},
["amn"] = {"Amanab"},
["amo"] = {"Amo"},
["amp"] = {"Alamblak"},
["amq"] = {"Amahai"},
["amr"] = {"Amarakaeri"},
["ams"] = {"Southern Amami-Oshima"},
["amt"] = {"Amto"},
["amu"] = {"Guerrero Amuzgo"},
["amv"] = {"Ambelau"},
["amw"] = {"Western Neo-Aramaic"},
["amx"] = {"Anmatyerre"},
["amy"] = {"Ami"},
["amz"] = {"Atampaya"},
["ana"] = {"Andaqui"},
["anb"] = {"Andoa"},
["anc"] = {"Ngas"},
["and"] = {"Ansus"},
["ane"] = {"Xârâcùù"},
["anf"] = {"Animere"},
["ang"] = {"Old English (ca. 450-1100)"},
["anh"] = {"Nend"},
["ani"] = {"Andi"},
["anj"] = {"Anor"},
["ank"] = {"Goemai"},
["anl"] = {"Anu-Hkongso Chin"},
["anm"] = {"Anal"},
["ann"] = {"Obolo"},
["ano"] = {"Andoque"},
["anp"] = {"Angika"},
["anq"] = {"Jarawa (India)"},
["anr"] = {"Andh"},
["ans"] = {"Anserma"},
["ant"] = {"Antakarinya", "Antikarinya"},
["anu"] = {"Anuak"},
["anv"] = {"Denya"},
["anw"] = {"Anaang"},
["anx"] = {"Andra-Hus"},
["any"] = {"Anyin"},
["anz"] = {"Anem"},
["aoa"] = {"Angolar"},
["aob"] = {"Abom"},
["aoc"] = {"Pemon"},
["aod"] = {"Andarum"},
["aoe"] = {"Angal Enen"},
["aof"] = {"Bragat"},
["aog"] = {"Angoram"},
["aoi"] = {"Anindilyakwa"},
["aoj"] = {"Mufian"},
["aok"] = {"Arhö"},
["aol"] = {"Alor"},
["aom"] = {"Ömie"},
["aon"] = {"Bumbita Arapesh"},
["aor"] = {"Aore"},
["aos"] = {"Taikat"},
["aot"] = {"Atong (India)", "A'tong"},
["aou"] = {"A'ou"},
["aox"] = {"Atorada"},
["aoz"] = {"Uab Meto"},
["apa"] = {"Apache languages"},
["apb"] = {"Sa'a"},
["apc"] = {"North Levantine Arabic"},
["apd"] = {"Sudanese Arabic"},
["ape"] = {"Bukiyip"},
["apf"] = {"Pahanan Agta"},
["apg"] = {"Ampanang"},
["aph"] = {"Athpariya"},
["api"] = {"Apiaká"},
["apj"] = {"Jicarilla Apache"},
["apk"] = {"Kiowa Apache"},
["apl"] = {"Lipan Apache"},
["apm"] = {"Mescalero-Chiricahua Apache"},
["apn"] = {"Apinayé"},
["apo"] = {"Ambul"},
["app"] = {"Apma"},
["apq"] = {"A-Pucikwar"},
["apr"] = {"Arop-Lokep"},
["aps"] = {"Arop-Sissano"},
["apt"] = {"Apatani"},
["apu"] = {"Apurinã"},
["apv"] = {"Alapmunte"},
["apw"] = {"Western Apache"},
["apx"] = {"Aputai"},
["apy"] = {"Apalaí"},
["apz"] = {"Safeyoka"},
["aqa"] = {"Alacalufan languages"},
["aqc"] = {"Archi"},
["aqd"] = {"Ampari Dogon"},
["aqg"] = {"Arigidi"},
["aql"] = {"Algic languages"},
["aqm"] = {"Atohwaim"},
["aqn"] = {"Northern Alta"},
["aqp"] = {"Atakapa"},
["aqr"] = {"Arhâ"},
["aqt"] = {"Angaité"},
["aqz"] = {"Akuntsu"},
["arb"] = {"Standard Arabic"},
["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"},
["ard"] = {"Arabana"},
["are"] = {"Western Arrarnta"},
["arh"] = {"Arhuaco"},
["ari"] = {"Arikara"},
["arj"] = {"Arapaso"},
["ark"] = {"Arikapú"},
["arl"] = {"Arabela"},
["arn"] = {"Mapudungun", "Mapuche"},
["aro"] = {"Araona"},
["arp"] = {"Arapaho"},
["arq"] = {"Algerian Arabic"},
["arr"] = {"Karo (Brazil)"},
["ars"] = {"Najdi Arabic"},
["art"] = {"Artificial languages"},
["aru"] = {"Aruá (Amazonas State)", "Arawá"},
["arv"] = {"Arbore"},
["arw"] = {"Arawak"},
["arx"] = {"Aruá (Rodonia State)"},
["ary"] = {"Moroccan Arabic"},
["arz"] = {"Egyptian Arabic"},
["asa"] = {"Asu (Tanzania)"},
["asb"] = {"Assiniboine"},
["asc"] = {"Casuarina Coast Asmat"},
["ase"] = {"American Sign Language"},
["asf"] = {"Auslan", "Australian Sign Language"},
["asg"] = {"Cishingini"},
["ash"] = {"Abishira"},
["asi"] = {"Buruwai"},
["asj"] = {"Sari"},
["ask"] = {"Ashkun"},
["asl"] = {"Asilulu"},
["asn"] = {"Xingú Asuriní"},
["aso"] = {"Dano"},
["asp"] = {"Algerian Sign Language"},
["asq"] = {"Austrian Sign Language"},
["asr"] = {"Asuri"},
["ass"] = {"Ipulo"},
["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"},
["asu"] = {"Tocantins Asurini"},
["asv"] = {"Asoa"},
["asw"] = {"Australian Aborigines Sign Language"},
["asx"] = {"Muratayak"},
["asy"] = {"Yaosakor Asmat"},
["asz"] = {"As"},
["ata"] = {"Pele-Ata"},
["atb"] = {"Zaiwa"},
["atc"] = {"Atsahuaca"},
["atd"] = {"Ata Manobo"},
["ate"] = {"Atemble"},
["atg"] = {"Ivbie North-Okpela-Arhe"},
["ath"] = {"Athapascan languages"},
["ati"] = {"Attié"},
["atj"] = {"Atikamekw"},
["atk"] = {"Ati"},
["atl"] = {"Mt. Iraya Agta"},
["atm"] = {"Ata"},
["atn"] = {"Ashtiani"},
["ato"] = {"Atong (Cameroon)"},
["atp"] = {"Pudtol Atta"},
["atq"] = {"Aralle-Tabulahan"},
["atr"] = {"Waimiri-Atroari"},
["ats"] = {"Gros Ventre"},
["att"] = {"Pamplona Atta"},
["atu"] = {"Reel"},
["atv"] = {"Northern Altai"},
["atw"] = {"Atsugewi"},
["atx"] = {"Arutani"},
["aty"] = {"Aneityum"},
["atz"] = {"Arta"},
["aua"] = {"Asumboa"},
["aub"] = {"Alugu"},
["auc"] = {"Waorani"},
["aud"] = {"Anuta"},
["auf"] = {"Arauan languages"},
["aug"] = {"Aguna"},
["auh"] = {"Aushi"},
["aui"] = {"Anuki"},
["auj"] = {"Awjilah"},
["auk"] = {"Heyo"},
["aul"] = {"Aulua"},
["aum"] = {"Asu (Nigeria)"},
["aun"] = {"Molmo One"},
["auo"] = {"Auyokawa"},
["aup"] = {"Makayam"},
["auq"] = {"Anus", "Korur"},
["aur"] = {"Aruek"},
["aus"] = {"Australian languages"},
["aut"] = {"Austral"},
["auu"] = {"Auye"},
["auw"] = {"Awyi"},
["aux"] = {"Aurá"},
["auy"] = {"Awiyaana"},
["auz"] = {"Uzbeki Arabic"},
["avb"] = {"Avau"},
["avd"] = {"Alviri-Vidari"},
["avi"] = {"Avikam"},
["avk"] = {"Kotava"},
["avl"] = {"Eastern Egyptian Bedawi Arabic"},
["avm"] = {"Angkamuthi"},
["avn"] = {"Avatime"},
["avo"] = {"Agavotaguerra"},
["avs"] = {"Aushiri"},
["avt"] = {"Au"},
["avu"] = {"Avokaya"},
["avv"] = {"Avá-Canoeiro"},
["awa"] = {"Awadhi"},
["awb"] = {"Awa (Papua New Guinea)"},
["awc"] = {"Cicipu"},
["awd"] = {"Arawakan languages"},
["awe"] = {"Awetí"},
["awg"] = {"Anguthimri"},
["awh"] = {"Awbono"},
["awi"] = {"Aekyom"},
["awk"] = {"Awabakal"},
["awm"] = {"Arawum"},
["awn"] = {"Awngi"},
["awo"] = {"Awak"},
["awr"] = {"Awera"},
["aws"] = {"South Awyu"},
["awt"] = {"Araweté"},
["awu"] = {"Central Awyu"},
["awv"] = {"Jair Awyu"},
["aww"] = {"Awun"},
["awx"] = {"Awara"},
["awy"] = {"Edera Awyu"},
["axb"] = {"Abipon"},
["axe"] = {"Ayerrerenge"},
["axg"] = {"Mato Grosso Arára"},
["axk"] = {"Yaka (Central African Republic)"},
["axl"] = {"Lower Southern Aranda"},
["axm"] = {"Middle Armenian"},
["axx"] = {"Xârâgurè"},
["aya"] = {"Awar"},
["ayb"] = {"Ayizo Gbe"},
["ayc"] = {"Southern Aymara"},
["ayd"] = {"Ayabadhu"},
["aye"] = {"Ayere"},
["ayg"] = {"Ginyanga"},
["ayh"] = {"Hadrami Arabic"},
["ayi"] = {"Leyigha"},
["ayk"] = {"Akuku"},
["ayl"] = {"Libyan Arabic"},
["ayn"] = {"Sanaani Arabic"},
["ayo"] = {"Ayoreo"},
["ayp"] = {"North Mesopotamian Arabic"},
["ayq"] = {"Ayi (Papua New Guinea)"},
["ayr"] = {"Central Aymara"},
["ays"] = {"Sorsogon Ayta"},
["ayt"] = {"Magbukun Ayta"},
["ayu"] = {"Ayu"},
["ayz"] = {"Mai Brat"},
["aza"] = {"Azha"},
["azb"] = {"South Azerbaijani"},
["azc"] = {"Uto-Aztecan languages"},
["azd"] = {"Eastern Durango Nahuatl"},
["azg"] = {"San Pedro Amuzgos Amuzgo"},
["azj"] = {"North Azerbaijani"},
["azm"] = {"Ipalapa Amuzgo"},
["azn"] = {"Western Durango Nahuatl"},
["azo"] = {"Awing"},
["azt"] = {"Faire Atta"},
["azz"] = {"Highland Puebla Nahuatl"},
["baa"] = {"Babatana"},
["bab"] = {"Bainouk-Gunyuño"},
["bac"] = {"Badui"},
["bad"] = {"Banda languages"},
["bae"] = {"Baré"},
["baf"] = {"Nubaca"},
["bag"] = {"Tuki"},
["bah"] = {"Bahamas Creole English"},
["bai"] = {"Bamileke languages"},
["baj"] = {"Barakai"},
["bal"] = {"Baluchi"},
["ban"] = {"Balinese"},
["bao"] = {"Waimaha"},
["bap"] = {"Bantawa"},
["bar"] = {"Bavarian"},
["bas"] = {"Basa (Cameroon)"},
["bat"] = {"Baltic languages"},
["bau"] = {"Bada (Nigeria)"},
["bav"] = {"Vengo"},
["baw"] = {"Bambili-Bambui"},
["bax"] = {"Bamun"},
["bay"] = {"Batuley"},
["bba"] = {"Baatonum"},
["bbb"] = {"Barai"},
["bbc"] = {"Batak Toba"},
["bbd"] = {"Bau"},
["bbe"] = {"Bangba"},
["bbf"] = {"Baibai"},
["bbg"] = {"Barama"},
["bbh"] = {"Bugan"},
["bbi"] = {"Barombi"},
["bbj"] = {"Ghomálá'"},
["bbk"] = {"Babanki"},
["bbl"] = {"Bats"},
["bbm"] = {"Babango"},
["bbn"] = {"Uneapa"},
["bbo"] = {"Northern Bobo Madaré", "Konabéré"},
["bbp"] = {"West Central Banda"},
["bbq"] = {"Bamali"},
["bbr"] = {"Girawa"},
["bbs"] = {"Bakpinka"},
["bbt"] = {"Mburku"},
["bbu"] = {"Kulung (Nigeria)"},
["bbv"] = {"Karnai"},
["bbw"] = {"Baba"},
["bbx"] = {"Bubia"},
["bby"] = {"Befang"},
["bca"] = {"Central Bai"},
["bcb"] = {"Bainouk-Samik"},
["bcc"] = {"Southern Balochi"},
["bcd"] = {"North Babar"},
["bce"] = {"Bamenyam"},
["bcf"] = {"Bamu"},
["bcg"] = {"Baga Pokur"},
["bch"] = {"Bariai"},
["bci"] = {"Baoulé"},
["bcj"] = {"Bardi"},
["bck"] = {"Bunuba"},
["bcl"] = {"Central Bikol"},
["bcm"] = {"Bannoni"},
["bcn"] = {"Bali (Nigeria)"},
["bco"] = {"Kaluli"},
["bcp"] = {"Bali (Democratic Republic of Congo)"},
["bcq"] = {"Bench"},
["bcr"] = {"Babine"},
["bcs"] = {"Kohumono"},
["bct"] = {"Bendi"},
["bcu"] = {"Awad Bing"},
["bcv"] = {"Shoo-Minda-Nye"},
["bcw"] = {"Bana"},
["bcy"] = {"Bacama"},
["bcz"] = {"Bainouk-Gunyaamolo"},
["bda"] = {"Bayot"},
["bdb"] = {"Basap"},
["bdc"] = {"Emberá-Baudó"},
["bdd"] = {"Bunama"},
["bde"] = {"Bade"},
["bdf"] = {"Biage"},
["bdg"] = {"Bonggi"},
["bdh"] = {"Baka (South Sudan)"},
["bdi"] = {"Burun"},
["bdj"] = {"Bai (South Sudan)", "Bai"},
["bdk"] = {"Budukh"},
["bdl"] = {"Indonesian Bajau"},
["bdm"] = {"Buduma"},
["bdn"] = {"Baldemu"},
["bdo"] = {"Morom"},
["bdp"] = {"Bende"},
["bdq"] = {"Bahnar"},
["bdr"] = {"West Coast Bajau"},
["bds"] = {"Burunge"},
["bdt"] = {"Bokoto"},
["bdu"] = {"Oroko"},
["bdv"] = {"Bodo Parja"},
["bdw"] = {"Baham"},
["bdx"] = {"Budong-Budong"},
["bdy"] = {"Bandjalang"},
["bdz"] = {"Badeshi"},
["bea"] = {"Beaver"},
["beb"] = {"Bebele"},
["bec"] = {"Iceve-Maci"},
["bed"] = {"Bedoanas"},
["bee"] = {"Byangsi"},
["bef"] = {"Benabena"},
["beg"] = {"Belait"},
["beh"] = {"Biali"},
["bei"] = {"Bekati'"},
["bej"] = {"Beja", "Bedawiyet"},
["bek"] = {"Bebeli"},
["bem"] = {"Bemba (Zambia)"},
["beo"] = {"Beami"},
["bep"] = {"Besoa"},
["beq"] = {"Beembe"},
["ber"] = {"Berber languages"},
["bes"] = {"Besme"},
["bet"] = {"Guiberoua Béte"},
["beu"] = {"Blagar"},
["bev"] = {"Daloa Bété"},
["bew"] = {"Betawi"},
["bex"] = {"Jur Modo"},
["bey"] = {"Beli (Papua New Guinea)"},
["bez"] = {"Bena (Tanzania)"},
["bfa"] = {"Bari"},
["bfb"] = {"Pauri Bareli"},
["bfc"] = {"Panyi Bai", "Northern Bai"},
["bfd"] = {"Bafut"},
["bfe"] = {"Betaf", "Tena"},
["bff"] = {"Bofi"},
["bfg"] = {"Busang Kayan"},
["bfh"] = {"Blafe"},
["bfi"] = {"British Sign Language"},
["bfj"] = {"Bafanji"},
["bfk"] = {"Ban Khor Sign Language"},
["bfl"] = {"Banda-Ndélé"},
["bfm"] = {"Mmen"},
["bfn"] = {"Bunak"},
["bfo"] = {"Malba Birifor"},
["bfp"] = {"Beba"},
["bfq"] = {"Badaga"},
["bfr"] = {"Bazigar"},
["bfs"] = {"Southern Bai"},
["bft"] = {"Balti"},
["bfu"] = {"Gahri"},
["bfw"] = {"Bondo"},
["bfx"] = {"Bantayanon"},
["bfy"] = {"Bagheli"},
["bfz"] = {"Mahasu Pahari"},
["bga"] = {"Gwamhi-Wuri"},
["bgb"] = {"Bobongko"},
["bgc"] = {"Haryanvi"},
["bgd"] = {"Rathwi Bareli"},
["bge"] = {"Bauria"},
["bgf"] = {"Bangandu"},
["bgg"] = {"Bugun"},
["bgi"] = {"Giangan"},
["bgj"] = {"Bangolan"},
["bgk"] = {"Bit", "Buxinhua"},
["bgl"] = {"Bo (Laos)"},
["bgn"] = {"Western Balochi"},
["bgo"] = {"Baga Koga"},
["bgp"] = {"Eastern Balochi"},
["bgq"] = {"Bagri"},
["bgr"] = {"Bawm Chin"},
["bgs"] = {"Tagabawa"},
["bgt"] = {"Bughotu"},
["bgu"] = {"Mbongno"},
["bgv"] = {"Warkay-Bipim"},
["bgw"] = {"Bhatri"},
["bgx"] = {"Balkan Gagauz Turkish"},
["bgy"] = {"Benggoi"},
["bgz"] = {"Banggai"},
["bha"] = {"Bharia"},
["bhb"] = {"Bhili"},
["bhc"] = {"Biga"},
["bhd"] = {"Bhadrawahi"},
["bhe"] = {"Bhaya"},
["bhf"] = {"Odiai"},
["bhg"] = {"Binandere"},
["bhh"] = {"Bukharic"},
["bhi"] = {"Bhilali"},
["bhj"] = {"Bahing"},
["bhl"] = {"Bimin"},
["bhm"] = {"Bathari"},
["bhn"] = {"Bohtan Neo-Aramaic"},
["bho"] = {"Bhojpuri"},
["bhp"] = {"Bima"},
["bhq"] = {"Tukang Besi South"},
["bhr"] = {"Bara Malagasy"},
["bhs"] = {"Buwal"},
["bht"] = {"Bhattiyali"},
["bhu"] = {"Bhunjia"},
["bhv"] = {"Bahau"},
["bhw"] = {"Biak"},
["bhx"] = {"Bhalay"},
["bhy"] = {"Bhele"},
["bhz"] = {"Bada (Indonesia)"},
["bia"] = {"Badimaya"},
["bib"] = {"Bissa", "Bisa"},
["bic"] = {"Bikaru"},
["bid"] = {"Bidiyo"},
["bie"] = {"Bepour"},
["bif"] = {"Biafada"},
["big"] = {"Biangai"},
["bij"] = {"Vaghat-Ya-Bijim-Legeri"},
["bik"] = {"Bikol"},
["bil"] = {"Bile"},
["bim"] = {"Bimoba"},
["bin"] = {"Bini", "Edo"},
["bio"] = {"Nai"},
["bip"] = {"Bila"},
["biq"] = {"Bipi"},
["bir"] = {"Bisorio"},
["bit"] = {"Berinomo"},
["biu"] = {"Biete"},
["biv"] = {"Southern Birifor"},
["biw"] = {"Kol (Cameroon)"},
["bix"] = {"Bijori"},
["biy"] = {"Birhor"},
["biz"] = {"Baloi"},
["bja"] = {"Budza"},
["bjb"] = {"Banggarla"},
["bjc"] = {"Bariji"},
["bje"] = {"Biao-Jiao Mien"},
["bjf"] = {"Barzani Jewish Neo-Aramaic"},
["bjg"] = {"Bidyogo"},
["bjh"] = {"Bahinemo"},
["bji"] = {"Burji"},
["bjj"] = {"Kanauji"},
["bjk"] = {"Barok"},
["bjl"] = {"Bulu (Papua New Guinea)"},
["bjm"] = {"Bajelani"},
["bjn"] = {"Banjar"},
["bjo"] = {"Mid-Southern Banda"},
["bjp"] = {"Fanamaket"},
["bjr"] = {"Binumarien"},
["bjs"] = {"Bajan"},
["bjt"] = {"Balanta-Ganja"},
["bju"] = {"Busuu"},
["bjv"] = {"Bedjond"},
["bjw"] = {"Bakwé"},
["bjx"] = {"Banao Itneg"},
["bjy"] = {"Bayali"},
["bjz"] = {"Baruga"},
["bka"] = {"Kyak"},
["bkc"] = {"Baka (Cameroon)"},
["bkd"] = {"Binukid", "Talaandig"},
["bkf"] = {"Beeke"},
["bkg"] = {"Buraka"},
["bkh"] = {"Bakoko"},
["bki"] = {"Baki"},
["bkj"] = {"Pande"},
["bkk"] = {"Brokskat"},
["bkl"] = {"Berik"},
["bkm"] = {"Kom (Cameroon)"},
["bkn"] = {"Bukitan"},
["bko"] = {"Kwa'"},
["bkp"] = {"Boko (Democratic Republic of Congo)"},
["bkq"] = {"Bakairí"},
["bkr"] = {"Bakumpai"},
["bks"] = {"Northern Sorsoganon"},
["bkt"] = {"Boloki"},
["bku"] = {"Buhid"},
["bkv"] = {"Bekwarra"},
["bkw"] = {"Bekwel"},
["bkx"] = {"Baikeno"},
["bky"] = {"Bokyi"},
["bkz"] = {"Bungku"},
["bla"] = {"Siksika"},
["blb"] = {"Bilua"},
["blc"] = {"Bella Coola"},
["bld"] = {"Bolango"},
["ble"] = {"Balanta-Kentohe"},
["blf"] = {"Buol"},
["blg"] = {"Balau"},
["blh"] = {"Kuwaa"},
["bli"] = {"Bolia"},
["blj"] = {"Bolongan"},
["blk"] = {"Pa'o Karen", "Pa'O"},
["bll"] = {"Biloxi"},
["blm"] = {"Beli (South Sudan)"},
["bln"] = {"Southern Catanduanes Bikol"},
["blo"] = {"Anii"},
["blp"] = {"Blablanga"},
["blq"] = {"Baluan-Pam"},
["blr"] = {"Blang"},
["bls"] = {"Balaesang"},
["blt"] = {"Tai Dam"},
["blv"] = {"Kibala", "Bolo"},
["blw"] = {"Balangao"},
["blx"] = {"Mag-Indi Ayta"},
["bly"] = {"Notre"},
["blz"] = {"Balantak"},
["bma"] = {"Lame"},
["bmb"] = {"Bembe"},
["bmc"] = {"Biem"},
["bmd"] = {"Baga Manduri"},
["bme"] = {"Limassa"},
["bmf"] = {"Bom-Kim"},
["bmg"] = {"Bamwe"},
["bmh"] = {"Kein"},
["bmi"] = {"Bagirmi"},
["bmj"] = {"Bote-Majhi"},
["bmk"] = {"Ghayavi"},
["bml"] = {"Bomboli"},
["bmm"] = {"Northern Betsimisaraka Malagasy"},
["bmn"] = {"Bina (Papua New Guinea)"},
["bmo"] = {"Bambalang"},
["bmp"] = {"Bulgebi"},
["bmq"] = {"Bomu"},
["bmr"] = {"Muinane"},
["bms"] = {"Bilma Kanuri"},
["bmt"] = {"Biao Mon"},
["bmu"] = {"Somba-Siawari"},
["bmv"] = {"Bum"},
["bmw"] = {"Bomwali"},
["bmx"] = {"Baimak"},
["bmz"] = {"Baramu"},
["bna"] = {"Bonerate"},
["bnb"] = {"Bookan"},
["bnc"] = {"Bontok"},
["bnd"] = {"Banda (Indonesia)"},
["bne"] = {"Bintauna"},
["bnf"] = {"Masiwang"},
["bng"] = {"Benga"},
["bni"] = {"Bangi"},
["bnj"] = {"Eastern Tawbuid"},
["bnk"] = {"Bierebo"},
["bnl"] = {"Boon"},
["bnm"] = {"Batanga"},
["bnn"] = {"Bunun"},
["bno"] = {"Bantoanon"},
["bnp"] = {"Bola"},
["bnq"] = {"Bantik"},
["bnr"] = {"Butmas-Tur"},
["bns"] = {"Bundeli"},
["bnt"] = {"Bantu languages"},
["bnu"] = {"Bentong"},
["bnv"] = {"Bonerif", "Beneraf", "Edwas"},
["bnw"] = {"Bisis"},
["bnx"] = {"Bangubangu"},
["bny"] = {"Bintulu"},
["bnz"] = {"Beezen"},
["boa"] = {"Bora"},
["bob"] = {"Aweer"},
["boe"] = {"Mundabli"},
["bof"] = {"Bolon"},
["bog"] = {"Bamako Sign Language"},
["boh"] = {"Boma"},
["boi"] = {"Barbareño"},
["boj"] = {"Anjam"},
["bok"] = {"Bonjo"},
["bol"] = {"Bole"},
["bom"] = {"Berom"},
["bon"] = {"Bine"},
["boo"] = {"Tiemacèwè Bozo"},
["bop"] = {"Bonkiman"},
["boq"] = {"Bogaya"},
["bor"] = {"Borôro"},
["bot"] = {"Bongo"},
["bou"] = {"Bondei"},
["bov"] = {"Tuwuli"},
["bow"] = {"Rema"},
["box"] = {"Buamu"},
["boy"] = {"Bodo (Central African Republic)"},
["boz"] = {"Tiéyaxo Bozo"},
["bpa"] = {"Daakaka"},
["bpd"] = {"Banda-Banda"},
["bpg"] = {"Bonggo"},
["bph"] = {"Botlikh"},
["bpi"] = {"Bagupi"},
["bpj"] = {"Binji"},
["bpk"] = {"Orowe", "'Ôrôê"},
["bpl"] = {"Broome Pearling Lugger Pidgin"},
["bpm"] = {"Biyom"},
["bpn"] = {"Dzao Min"},
["bpo"] = {"Anasi"},
["bpp"] = {"Kaure"},
["bpq"] = {"Banda Malay"},
["bpr"] = {"Koronadal Blaan"},
["bps"] = {"Sarangani Blaan"},
["bpt"] = {"Barrow Point"},
["bpu"] = {"Bongu"},
["bpv"] = {"Bian Marind"},
["bpw"] = {"Bo (Papua New Guinea)"},
["bpx"] = {"Palya Bareli"},
["bpy"] = {"Bishnupriya"},
["bpz"] = {"Bilba"},
["bqa"] = {"Tchumbuli"},
["bqb"] = {"Bagusa"},
["bqc"] = {"Boko (Benin)", "Boo"},
["bqd"] = {"Bung"},
["bqf"] = {"Baga Kaloum"},
["bqg"] = {"Bago-Kusuntu"},
["bqh"] = {"Baima"},
["bqi"] = {"Bakhtiari"},
["bqj"] = {"Bandial"},
["bqk"] = {"Banda-Mbrès"},
["bql"] = {"Bilakura"},
["bqm"] = {"Wumboko"},
["bqn"] = {"Bulgarian Sign Language"},
["bqo"] = {"Balo"},
["bqp"] = {"Busa"},
["bqq"] = {"Biritai"},
["bqr"] = {"Burusu"},
["bqs"] = {"Bosngun"},
["bqt"] = {"Bamukumbit"},
["bqu"] = {"Boguru"},
["bqv"] = {"Koro Wachi", "Begbere-Ejar"},
["bqw"] = {"Buru (Nigeria)"},
["bqx"] = {"Baangi"},
["bqy"] = {"Bengkala Sign Language"},
["bqz"] = {"Bakaka"},
["bra"] = {"Braj"},
["brb"] = {"Lave"},
["brc"] = {"Berbice Creole Dutch"},
["brd"] = {"Baraamu"},
["brf"] = {"Bira"},
["brg"] = {"Baure"},
["brh"] = {"Brahui"},
["bri"] = {"Mokpwe"},
["brj"] = {"Bieria"},
["brk"] = {"Birked"},
["brl"] = {"Birwa"},
["brm"] = {"Barambu"},
["brn"] = {"Boruca"},
["bro"] = {"Brokkat"},
["brp"] = {"Barapasi"},
["brq"] = {"Breri"},
["brr"] = {"Birao"},
["brs"] = {"Baras"},
["brt"] = {"Bitare"},
["bru"] = {"Eastern Bru"},
["brv"] = {"Western Bru"},
["brw"] = {"Bellari"},
["brx"] = {"Bodo (India)"},
["bry"] = {"Burui"},
["brz"] = {"Bilbil"},
["bsa"] = {"Abinomn"},
["bsb"] = {"Brunei Bisaya"},
["bsc"] = {"Bassari", "Oniyan"},
["bse"] = {"Wushi"},
["bsf"] = {"Bauchi"},
["bsg"] = {"Bashkardi"},
["bsh"] = {"Kati"},
["bsi"] = {"Bassossi"},
["bsj"] = {"Bangwinji"},
["bsk"] = {"Burushaski"},
["bsl"] = {"Basa-Gumna"},
["bsm"] = {"Busami"},
["bsn"] = {"Barasana-Eduria"},
["bso"] = {"Buso"},
["bsp"] = {"Baga Sitemu"},
["bsq"] = {"Bassa"},
["bsr"] = {"Bassa-Kontagora"},
["bss"] = {"Akoose"},
["bst"] = {"Basketo"},
["bsu"] = {"Bahonsuai"},
["bsv"] = {"Baga Sobané"},
["bsw"] = {"Baiso"},
["bsx"] = {"Yangkam"},
["bsy"] = {"Sabah Bisaya"},
["bta"] = {"Bata"},
["btc"] = {"Bati (Cameroon)"},
["btd"] = {"Batak Dairi"},
["bte"] = {"Gamo-Ningi"},
["btf"] = {"Birgit"},
["btg"] = {"Gagnoa Bété"},
["bth"] = {"Biatah Bidayuh"},
["bti"] = {"Burate"},
["btj"] = {"Bacanese Malay"},
["btk"] = {"Batak languages"},
["btm"] = {"Batak Mandailing"},
["btn"] = {"Ratagnon"},
["bto"] = {"Rinconada Bikol"},
["btp"] = {"Budibud"},
["btq"] = {"Batek"},
["btr"] = {"Baetora"},
["bts"] = {"Batak Simalungun"},
["btt"] = {"Bete-Bendi"},
["btu"] = {"Batu"},
["btv"] = {"Bateri"},
["btw"] = {"Butuanon"},
["btx"] = {"Batak Karo"},
["bty"] = {"Bobot"},
["btz"] = {"Batak Alas-Kluet"},
["bua"] = {"Buriat"},
["bub"] = {"Bua"},
["buc"] = {"Bushi"},
["bud"] = {"Ntcham"},
["bue"] = {"Beothuk"},
["buf"] = {"Bushoong"},
["bug"] = {"Buginese"},
["buh"] = {"Younuo Bunu"},
["bui"] = {"Bongili"},
["buj"] = {"Basa-Gurmana"},
["buk"] = {"Bugawac"},
["bum"] = {"Bulu (Cameroon)"},
["bun"] = {"Sherbro"},
["buo"] = {"Terei"},
["bup"] = {"Busoa"},
["buq"] = {"Brem"},
["bus"] = {"Bokobaru"},
["but"] = {"Bungain"},
["buu"] = {"Budu"},
["buv"] = {"Bun"},
["buw"] = {"Bubi"},
["bux"] = {"Boghom"},
["buy"] = {"Bullom So"},
["buz"] = {"Bukwen"},
["bva"] = {"Barein"},
["bvb"] = {"Bube"},
["bvc"] = {"Baelelea"},
["bvd"] = {"Baeggu"},
["bve"] = {"Berau Malay"},
["bvf"] = {"Boor"},
["bvg"] = {"Bonkeng"},
["bvh"] = {"Bure"},
["bvi"] = {"Belanda Viri"},
["bvj"] = {"Baan"},
["bvk"] = {"Bukat"},
["bvl"] = {"Bolivian Sign Language"},
["bvm"] = {"Bamunka"},
["bvn"] = {"Buna"},
["bvo"] = {"Bolgo"},
["bvp"] = {"Bumang"},
["bvq"] = {"Birri"},
["bvr"] = {"Burarra"},
["bvt"] = {"Bati (Indonesia)"},
["bvu"] = {"Bukit Malay"},
["bvv"] = {"Baniva"},
["bvw"] = {"Boga"},
["bvx"] = {"Dibole"},
["bvy"] = {"Baybayanon"},
["bvz"] = {"Bauzi"},
["bwa"] = {"Bwatoo"},
["bwb"] = {"Namosi-Naitasiri-Serua"},
["bwc"] = {"Bwile"},
["bwd"] = {"Bwaidoka"},
["bwe"] = {"Bwe Karen"},
["bwf"] = {"Boselewa"},
["bwg"] = {"Barwe"},
["bwh"] = {"Bishuo"},
["bwi"] = {"Baniwa"},
["bwj"] = {"Láá Láá Bwamu"},
["bwk"] = {"Bauwaki"},
["bwl"] = {"Bwela"},
["bwm"] = {"Biwat"},
["bwn"] = {"Wunai Bunu"},
["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"},
["bwp"] = {"Mandobo Bawah"},
["bwq"] = {"Southern Bobo Madaré"},
["bwr"] = {"Bura-Pabir"},
["bws"] = {"Bomboma"},
["bwt"] = {"Bafaw-Balong"},
["bwu"] = {"Buli (Ghana)"},
["bww"] = {"Bwa"},
["bwx"] = {"Bu-Nao Bunu"},
["bwy"] = {"Cwi Bwamu"},
["bwz"] = {"Bwisi"},
["bxa"] = {"Tairaha"},
["bxb"] = {"Belanda Bor"},
["bxc"] = {"Molengue"},
["bxd"] = {"Pela"},
["bxe"] = {"Birale"},
["bxf"] = {"Bilur", "Minigir"},
["bxg"] = {"Bangala"},
["bxh"] = {"Buhutu"},
["bxi"] = {"Pirlatapa"},
["bxj"] = {"Bayungu"},
["bxk"] = {"Bukusu", "Lubukusu"},
["bxl"] = {"Jalkunan"},
["bxm"] = {"Mongolia Buriat"},
["bxn"] = {"Burduna"},
["bxo"] = {"Barikanchi"},
["bxp"] = {"Bebil"},
["bxq"] = {"Beele"},
["bxr"] = {"Russia Buriat"},
["bxs"] = {"Busam"},
["bxu"] = {"China Buriat"},
["bxv"] = {"Berakou"},
["bxw"] = {"Bankagooma"},
["bxz"] = {"Binahari"},
["bya"] = {"Batak"},
["byb"] = {"Bikya"},
["byc"] = {"Ubaghara"},
["byd"] = {"Benyadu'"},
["bye"] = {"Pouye"},
["byf"] = {"Bete"},
["byg"] = {"Baygo"},
["byh"] = {"Bhujel"},
["byi"] = {"Buyu"},
["byj"] = {"Bina (Nigeria)"},
["byk"] = {"Biao"},
["byl"] = {"Bayono"},
["bym"] = {"Bidjara"},
["byn"] = {"Bilin", "Blin"},
["byo"] = {"Biyo"},
["byp"] = {"Bumaji"},
["byq"] = {"Basay"},
["byr"] = {"Baruya", "Yipma"},
["bys"] = {"Burak"},
["byt"] = {"Berti"},
["byv"] = {"Medumba"},
["byw"] = {"Belhariya"},
["byx"] = {"Qaqet"},
["byz"] = {"Banaro"},
["bza"] = {"Bandi"},
["bzb"] = {"Andio"},
["bzc"] = {"Southern Betsimisaraka Malagasy"},
["bzd"] = {"Bribri"},
["bze"] = {"Jenaama Bozo"},
["bzf"] = {"Boikin"},
["bzg"] = {"Babuza"},
["bzh"] = {"Mapos Buang"},
["bzi"] = {"Bisu"},
["bzj"] = {"Belize Kriol English"},
["bzk"] = {"Nicaragua Creole English"},
["bzl"] = {"Boano (Sulawesi)"},
["bzm"] = {"Bolondo"},
["bzn"] = {"Boano (Maluku)"},
["bzo"] = {"Bozaba"},
["bzp"] = {"Kemberano"},
["bzq"] = {"Buli (Indonesia)"},
["bzr"] = {"Biri"},
["bzs"] = {"Brazilian Sign Language"},
["bzt"] = {"Brithenig"},
["bzu"] = {"Burmeso"},
["bzv"] = {"Naami"},
["bzw"] = {"Basa (Nigeria)"},
["bzx"] = {"Kɛlɛngaxo Bozo"},
["bzy"] = {"Obanliku"},
["bzz"] = {"Evant"},
["caa"] = {"Chortí"},
["cab"] = {"Garifuna"},
["cac"] = {"Chuj"},
["cad"] = {"Caddo"},
["cae"] = {"Lehar", "Laalaa"},
["caf"] = {"Southern Carrier"},
["cag"] = {"Nivaclé"},
["cah"] = {"Cahuarano"},
["cai"] = {"Central American Indian languages"},
["caj"] = {"Chané"},
["cak"] = {"Kaqchikel", "Cakchiquel"},
["cal"] = {"Carolinian"},
["cam"] = {"Cemuhî"},
["can"] = {"Chambri"},
["cao"] = {"Chácobo"},
["cap"] = {"Chipaya"},
["caq"] = {"Car Nicobarese"},
["car"] = {"Galibi Carib"},
["cas"] = {"Tsimané"},
["cau"] = {"Caucasian languages"},
["cav"] = {"Cavineña"},
["caw"] = {"Callawalla"},
["cax"] = {"Chiquitano"},
["cay"] = {"Cayuga"},
["caz"] = {"Canichana"},
["cba"] = {"Chibchan languages"},
["cbb"] = {"Cabiyarí"},
["cbc"] = {"Carapana"},
["cbd"] = {"Carijona"},
["cbg"] = {"Chimila"},
["cbi"] = {"Chachi"},
["cbj"] = {"Ede Cabe"},
["cbk"] = {"Chavacano"},
["cbl"] = {"Bualkhaw Chin"},
["cbn"] = {"Nyahkur"},
["cbo"] = {"Izora"},
["cbq"] = {"Tsucuba", "Cuba"},
["cbr"] = {"Cashibo-Cacataibo"},
["cbs"] = {"Cashinahua"},
["cbt"] = {"Chayahuita"},
["cbu"] = {"Candoshi-Shapra"},
["cbv"] = {"Cacua"},
["cbw"] = {"Kinabalian"},
["cby"] = {"Carabayo"},
["ccc"] = {"Chamicuro"},
["ccd"] = {"Cafundo Creole"},
["cce"] = {"Chopi"},
["ccg"] = {"Samba Daka"},
["cch"] = {"Atsam"},
["ccj"] = {"Kasanga"},
["ccl"] = {"Cutchi-Swahili"},
["ccm"] = {"Malaccan Creole Malay"},
["ccn"] = {"North Caucasian languages"},
["cco"] = {"Comaltepec Chinantec"},
["ccp"] = {"Chakma"},
["ccr"] = {"Cacaopera"},
["ccs"] = {"South Caucasian languages"},
["cda"] = {"Choni"},
["cdc"] = {"Chadic languages"},
["cdd"] = {"Caddoan languages"},
["cde"] = {"Chenchu"},
["cdf"] = {"Chiru"},
["cdh"] = {"Chambeali"},
["cdi"] = {"Chodri"},
["cdj"] = {"Churahi"},
["cdm"] = {"Chepang"},
["cdn"] = {"Chaudangsi"},
["cdo"] = {"Min Dong Chinese"},
["cdr"] = {"Cinda-Regi-Tiyal"},
["cds"] = {"Chadian Sign Language"},
["cdy"] = {"Chadong"},
["cdz"] = {"Koda"},
["cea"] = {"Lower Chehalis"},
["ceb"] = {"Cebuano"},
["ceg"] = {"Chamacoco"},
["cek"] = {"Eastern Khumi Chin"},
["cel"] = {"Celtic languages"},
["cen"] = {"Cen"},
["cet"] = {"Centúúm"},
["cey"] = {"Ekai Chin"},
["cfa"] = {"Dijim-Bwilim"},
["cfd"] = {"Cara"},
["cfg"] = {"Como Karim"},
["cfm"] = {"Falam Chin"},
["cga"] = {"Changriwa"},
["cgc"] = {"Kagayanen"},
["cgg"] = {"Chiga"},
["cgk"] = {"Chocangacakha"},
["chb"] = {"Chibcha"},
["chc"] = {"Catawba"},
["chd"] = {"Highland Oaxaca Chontal"},
["chf"] = {"Tabasco Chontal"},
["chg"] = {"Chagatai"},
["chh"] = {"Chinook"},
["chj"] = {"Ojitlán Chinantec"},
["chk"] = {"Chuukese"},
["chl"] = {"Cahuilla"},
["chm"] = {"Mari (Russia)"},
["chn"] = {"Chinook jargon"},
["cho"] = {"Choctaw"},
["chp"] = {"Chipewyan", "Dene Suline"},
["chq"] = {"Quiotepec Chinantec"},
["chr"] = {"Cherokee"},
["cht"] = {"Cholón"},
["chw"] = {"Chuwabu"},
["chx"] = {"Chantyal"},
["chy"] = {"Cheyenne"},
["chz"] = {"Ozumacín Chinantec"},
["cia"] = {"Cia-Cia"},
["cib"] = {"Ci Gbe"},
["cic"] = {"Chickasaw"},
["cid"] = {"Chimariko"},
["cie"] = {"Cineni"},
["cih"] = {"Chinali"},
["cik"] = {"Chitkuli Kinnauri"},
["cim"] = {"Cimbrian"},
["cin"] = {"Cinta Larga"},
["cip"] = {"Chiapanec"},
["cir"] = {"Tiri", "Haméa", "Méa"},
["ciw"] = {"Chippewa"},
["ciy"] = {"Chaima"},
["cja"] = {"Western Cham"},
["cje"] = {"Chru"},
["cjh"] = {"Upper Chehalis"},
["cji"] = {"Chamalal"},
["cjk"] = {"Chokwe"},
["cjm"] = {"Eastern Cham"},
["cjn"] = {"Chenapian"},
["cjo"] = {"Ashéninka Pajonal"},
["cjp"] = {"Cabécar"},
["cjs"] = {"Shor"},
["cjv"] = {"Chuave"},
["cjy"] = {"Jinyu Chinese"},
["ckb"] = {"Central Kurdish"},
["ckh"] = {"Chak"},
["ckl"] = {"Cibak"},
["ckm"] = {"Chakavian"},
["ckn"] = {"Kaang Chin"},
["cko"] = {"Anufo"},
["ckq"] = {"Kajakse"},
["ckr"] = {"Kairak"},
["cks"] = {"Tayo"},
["ckt"] = {"Chukot"},
["cku"] = {"Koasati"},
["ckv"] = {"Kavalan"},
["ckx"] = {"Caka"},
["cky"] = {"Cakfem-Mushere"},
["ckz"] = {"Cakchiquel-Quiché Mixed Language"},
["cla"] = {"Ron"},
["clc"] = {"Chilcotin"},
["cld"] = {"Chaldean Neo-Aramaic"},
["cle"] = {"Lealao Chinantec"},
["clh"] = {"Chilisso"},
["cli"] = {"Chakali"},
["clj"] = {"Laitu Chin"},
["clk"] = {"Idu-Mishmi"},
["cll"] = {"Chala"},
["clm"] = {"Clallam"},
["clo"] = {"Lowland Oaxaca Chontal"},
["clt"] = {"Lautu Chin"},
["clu"] = {"Caluyanun"},
["clw"] = {"Chulym"},
["cly"] = {"Eastern Highland Chatino"},
["cma"] = {"Maa"},
["cmc"] = {"Chamic languages"},
["cme"] = {"Cerma"},
["cmg"] = {"Classical Mongolian"},
["cmi"] = {"Emberá-Chamí"},
["cml"] = {"Campalagian"},
["cmm"] = {"Michigamea"},
["cmn"] = {"Mandarin Chinese"},
["cmo"] = {"Central Mnong"},
["cmr"] = {"Mro-Khimi Chin"},
["cms"] = {"Messapic"},
["cmt"] = {"Camtho"},
["cna"] = {"Changthang"},
["cnb"] = {"Chinbon Chin"},
["cnc"] = {"Côông"},
["cng"] = {"Northern Qiang"},
["cnh"] = {"Hakha Chin", "Haka Chin"},
["cni"] = {"Asháninka"},
["cnk"] = {"Khumi Chin"},
["cnl"] = {"Lalana Chinantec"},
["cno"] = {"Con"},
["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"},
["cnr"] = {"Montenegrin"},
["cns"] = {"Central Asmat"},
["cnt"] = {"Tepetotutla Chinantec"},
["cnu"] = {"Chenoua"},
["cnw"] = {"Ngawn Chin"},
["cnx"] = {"Middle Cornish"},
["coa"] = {"Cocos Islands Malay"},
["cob"] = {"Chicomuceltec"},
["coc"] = {"Cocopa"},
["cod"] = {"Cocama-Cocamilla"},
["coe"] = {"Koreguaje"},
["cof"] = {"Colorado"},
["cog"] = {"Chong"},
["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"},
["coj"] = {"Cochimi"},
["cok"] = {"Santa Teresa Cora"},
["col"] = {"Columbia-Wenatchi"},
["com"] = {"Comanche"},
["con"] = {"Cofán"},
["coo"] = {"Comox"},
["cop"] = {"Coptic"},
["coq"] = {"Coquille"},
["cot"] = {"Caquinte"},
["cou"] = {"Wamey"},
["cov"] = {"Cao Miao"},
["cow"] = {"Cowlitz"},
["cox"] = {"Nanti"},
["coz"] = {"Chochotec"},
["cpa"] = {"Palantla Chinantec"},
["cpb"] = {"Ucayali-Yurúa Ashéninka"},
["cpc"] = {"Ajyíninka Apurucayali"},
["cpe"] = {"English-based creoles and pidgins"},
["cpf"] = {"French-based creoles and pidgins"},
["cpg"] = {"Cappadocian Greek"},
["cpi"] = {"Chinese Pidgin English"},
["cpn"] = {"Cherepon"},
["cpo"] = {"Kpeego"},
["cpp"] = {"Portuguese-based creoles and pidgins"},
["cps"] = {"Capiznon"},
["cpu"] = {"Pichis Ashéninka"},
["cpx"] = {"Pu-Xian Chinese"},
["cpy"] = {"South Ucayali Ashéninka"},
["cqd"] = {"Chuanqiandian Cluster Miao"},
["cra"] = {"Chara"},
["crb"] = {"Island Carib"},
["crc"] = {"Lonwolwol"},
["crd"] = {"Coeur d'Alene"},
["crf"] = {"Caramanta"},
["crg"] = {"Michif"},
["crh"] = {"Crimean Tatar", "Crimean Turkish"},
["cri"] = {"Sãotomense"},
["crj"] = {"Southern East Cree"},
["crk"] = {"Plains Cree"},
["crl"] = {"Northern East Cree"},
["crm"] = {"Moose Cree"},
["crn"] = {"El Nayar Cora"},
["cro"] = {"Crow"},
["crp"] = {"Creoles and pidgins"},
["crq"] = {"Iyo'wujwa Chorote"},
["crr"] = {"Carolina Algonquian"},
["crs"] = {"Seselwa Creole French"},
["crt"] = {"Iyojwa'ja Chorote"},
["crv"] = {"Chaura"},
["crw"] = {"Chrau"},
["crx"] = {"Carrier"},
["cry"] = {"Cori"},
["crz"] = {"Cruzeño"},
["csa"] = {"Chiltepec Chinantec"},
["csb"] = {"Kashubian"},
["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"},
["csd"] = {"Chiangmai Sign Language"},
["cse"] = {"Czech Sign Language"},
["csf"] = {"Cuba Sign Language"},
["csg"] = {"Chilean Sign Language"},
["csh"] = {"Asho Chin"},
["csi"] = {"Coast Miwok"},
["csj"] = {"Songlai Chin"},
["csk"] = {"Jola-Kasa"},
["csl"] = {"Chinese Sign Language"},
["csm"] = {"Central Sierra Miwok"},
["csn"] = {"Colombian Sign Language"},
["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"},
["csp"] = {"Southern Ping Chinese", "Southern Pinghua"},
["csq"] = {"Croatia Sign Language"},
["csr"] = {"Costa Rican Sign Language"},
["css"] = {"Southern Ohlone"},
["cst"] = {"Northern Ohlone"},
["csu"] = {"Central Sudanic languages"},
["csv"] = {"Sumtu Chin"},
["csw"] = {"Swampy Cree"},
["csy"] = {"Siyin Chin"},
["csz"] = {"Coos"},
["cta"] = {"Tataltepec Chatino"},
["ctc"] = {"Chetco"},
["ctd"] = {"Tedim Chin"},
["cte"] = {"Tepinapa Chinantec"},
["ctg"] = {"Chittagonian"},
["cth"] = {"Thaiphum Chin"},
["ctl"] = {"Tlacoatzintepec Chinantec"},
["ctm"] = {"Chitimacha"},
["ctn"] = {"Chhintange"},
["cto"] = {"Emberá-Catío"},
["ctp"] = {"Western Highland Chatino"},
["cts"] = {"Northern Catanduanes Bikol"},
["ctt"] = {"Wayanad Chetti"},
["ctu"] = {"Chol"},
["ctz"] = {"Zacatepec Chatino"},
["cua"] = {"Cua"},
["cub"] = {"Cubeo"},
["cuc"] = {"Usila Chinantec"},
["cug"] = {"Chungmboko", "Cung"},
["cuh"] = {"Chuka", "Gichuka"},
["cui"] = {"Cuiba"},
["cuj"] = {"Mashco Piro"},
["cuk"] = {"San Blas Kuna"},
["cul"] = {"Culina", "Kulina"},
["cuo"] = {"Cumanagoto"},
["cup"] = {"Cupeño"},
["cuq"] = {"Cun"},
["cur"] = {"Chhulung"},
["cus"] = {"Cushitic languages"},
["cut"] = {"Teutila Cuicatec"},
["cuu"] = {"Tai Ya"},
["cuv"] = {"Cuvok"},
["cuw"] = {"Chukwa"},
["cux"] = {"Tepeuxila Cuicatec"},
["cuy"] = {"Cuitlatec"},
["cvg"] = {"Chug"},
["cvn"] = {"Valle Nacional Chinantec"},
["cwa"] = {"Kabwa"},
["cwb"] = {"Maindo"},
["cwd"] = {"Woods Cree"},
["cwe"] = {"Kwere"},
["cwg"] = {"Chewong", "Cheq Wong"},
["cwt"] = {"Kuwaataay"},
["cya"] = {"Nopala Chatino"},
["cyb"] = {"Cayubaba"},
["cyo"] = {"Cuyonon"},
["czh"] = {"Huizhou Chinese"},
["czk"] = {"Knaanic"},
["czn"] = {"Zenzontepec Chatino"},
["czo"] = {"Min Zhong Chinese"},
["czt"] = {"Zotung Chin"},
["daa"] = {"Dangaléat"},
["dac"] = {"Dambi"},
["dad"] = {"Marik"},
["dae"] = {"Duupa"},
["dag"] = {"Dagbani"},
["dah"] = {"Gwahatike"},
["dai"] = {"Day"},
["daj"] = {"Dar Fur Daju"},
["dak"] = {"Dakota"},
["dal"] = {"Dahalo"},
["dam"] = {"Damakawa"},
["dao"] = {"Daai Chin"},
["daq"] = {"Dandami Maria"},
["dar"] = {"Dargwa"},
["das"] = {"Daho-Doo"},
["dau"] = {"Dar Sila Daju"},
["dav"] = {"Taita", "Dawida"},
["daw"] = {"Davawenyo"},
["dax"] = {"Dayi"},
["day"] = {"Land Dayak languages"},
["daz"] = {"Dao"},
["dba"] = {"Bangime"},
["dbb"] = {"Deno"},
["dbd"] = {"Dadiya"},
["dbe"] = {"Dabe"},
["dbf"] = {"Edopi"},
["dbg"] = {"Dogul Dom Dogon"},
["dbi"] = {"Doka"},
["dbj"] = {"Ida'an"},
["dbl"] = {"Dyirbal"},
["dbm"] = {"Duguri"},
["dbn"] = {"Duriankere"},
["dbo"] = {"Dulbu"},
["dbp"] = {"Duwai"},
["dbq"] = {"Daba"},
["dbr"] = {"Dabarre"},
["dbt"] = {"Ben Tey Dogon"},
["dbu"] = {"Bondum Dom Dogon"},
["dbv"] = {"Dungu"},
["dbw"] = {"Bankan Tey Dogon"},
["dby"] = {"Dibiyaso"},
["dcc"] = {"Deccan"},
["dcr"] = {"Negerhollands"},
["dda"] = {"Dadi Dadi"},
["ddd"] = {"Dongotono"},
["dde"] = {"Doondo"},
["ddg"] = {"Fataluku"},
["ddi"] = {"West Goodenough"},
["ddj"] = {"Jaru"},
["ddn"] = {"Dendi (Benin)"},
["ddo"] = {"Dido"},
["ddr"] = {"Dhudhuroa"},
["dds"] = {"Donno So Dogon"},
["ddw"] = {"Dawera-Daweloor"},
["dec"] = {"Dagik"},
["ded"] = {"Dedua"},
["dee"] = {"Dewoin"},
["def"] = {"Dezfuli"},
["deg"] = {"Degema"},
["deh"] = {"Dehwari"},
["dei"] = {"Demisa"},
["dek"] = {"Dek"},
["del"] = {"Delaware"},
["dem"] = {"Dem"},
["den"] = {"Slave (Athapascan)"},
["dep"] = {"Pidgin Delaware"},
["deq"] = {"Dendi (Central African Republic)"},
["der"] = {"Deori"},
["des"] = {"Desano"},
["dev"] = {"Domung"},
["dez"] = {"Dengese"},
["dga"] = {"Southern Dagaare"},
["dgb"] = {"Bunoge Dogon"},
["dgc"] = {"Casiguran Dumagat Agta"},
["dgd"] = {"Dagaari Dioula"},
["dge"] = {"Degenan"},
["dgg"] = {"Doga"},
["dgh"] = {"Dghwede"},
["dgi"] = {"Northern Dagara"},
["dgk"] = {"Dagba"},
["dgl"] = {"Andaandi", "Dongolawi"},
["dgn"] = {"Dagoman"},
["dgo"] = {"Dogri (individual language)"},
["dgr"] = {"Dogrib", "Tłı̨chǫ"},
["dgs"] = {"Dogoso"},
["dgt"] = {"Ndra'ngith"},
["dgw"] = {"Daungwurrung"},
["dgx"] = {"Doghoro"},
["dgz"] = {"Daga"},
["dhd"] = {"Dhundari"},
["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"},
["dhi"] = {"Dhimal"},
["dhl"] = {"Dhalandji"},
["dhm"] = {"Zemba"},
["dhn"] = {"Dhanki"},
["dho"] = {"Dhodia"},
["dhr"] = {"Dhargari"},
["dhs"] = {"Dhaiso"},
["dhu"] = {"Dhurga"},
["dhv"] = {"Dehu", "Drehu"},
["dhw"] = {"Dhanwar (Nepal)"},
["dhx"] = {"Dhungaloo"},
["dia"] = {"Dia"},
["dib"] = {"South Central Dinka"},
["dic"] = {"Lakota Dida"},
["did"] = {"Didinga"},
["dif"] = {"Dieri", "Diyari"},
["dig"] = {"Digo", "Chidigo"},
["dih"] = {"Kumiai"},
["dii"] = {"Dimbong"},
["dij"] = {"Dai"},
["dik"] = {"Southwestern Dinka"},
["dil"] = {"Dilling"},
["dim"] = {"Dime"},
["din"] = {"Dinka"},
["dio"] = {"Dibo"},
["dip"] = {"Northeastern Dinka"},
["diq"] = {"Dimli (individual language)"},
["dir"] = {"Dirim"},
["dis"] = {"Dimasa"},
["diu"] = {"Diriku"},
["diw"] = {"Northwestern Dinka"},
["dix"] = {"Dixon Reef"},
["diy"] = {"Diuwe"},
["diz"] = {"Ding"},
["dja"] = {"Djadjawurrung"},
["djb"] = {"Djinba"},
["djc"] = {"Dar Daju Daju"},
["djd"] = {"Djamindjung", "Ngaliwurru"},
["dje"] = {"Zarma"},
["djf"] = {"Djangun"},
["dji"] = {"Djinang"},
["djj"] = {"Djeebbana"},
["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"},
["djm"] = {"Jamsay Dogon"},
["djn"] = {"Jawoyn", "Djauan"},
["djo"] = {"Jangkang"},
["djr"] = {"Djambarrpuyngu"},
["dju"] = {"Kapriman"},
["djw"] = {"Djawi"},
["dka"] = {"Dakpakha"},
["dkk"] = {"Dakka"},
["dkr"] = {"Kuijau"},
["dks"] = {"Southeastern Dinka"},
["dkx"] = {"Mazagway"},
["dlg"] = {"Dolgan"},
["dlk"] = {"Dahalik"},
["dlm"] = {"Dalmatian"},
["dln"] = {"Darlong"},
["dma"] = {"Duma"},
["dmb"] = {"Mombo Dogon"},
["dmc"] = {"Gavak"},
["dmd"] = {"Madhi Madhi"},
["dme"] = {"Dugwor"},
["dmf"] = {"Medefaidrin"},
["dmg"] = {"Upper Kinabatangan"},
["dmk"] = {"Domaaki"},
["dml"] = {"Dameli"},
["dmm"] = {"Dama"},
["dmn"] = {"Mande languages"},
["dmo"] = {"Kemedzung"},
["dmr"] = {"East Damar"},
["dms"] = {"Dampelas"},
["dmu"] = {"Dubu", "Tebi"},
["dmv"] = {"Dumpas"},
["dmw"] = {"Mudburra"},
["dmx"] = {"Dema"},
["dmy"] = {"Demta", "Sowari"},
["dna"] = {"Upper Grand Valley Dani"},
["dnd"] = {"Daonda"},
["dne"] = {"Ndendeule"},
["dng"] = {"Dungan"},
["dni"] = {"Lower Grand Valley Dani"},
["dnj"] = {"Dan"},
["dnk"] = {"Dengka"},
["dnn"] = {"Dzùùngoo"},
["dno"] = {"Ndrulo", "Northern Lendu"},
["dnr"] = {"Danaru"},
["dnt"] = {"Mid Grand Valley Dani"},
["dnu"] = {"Danau"},
["dnv"] = {"Danu"},
["dnw"] = {"Western Dani"},
["dny"] = {"Dení"},
["doa"] = {"Dom"},
["dob"] = {"Dobu"},
["doc"] = {"Northern Dong"},
["doe"] = {"Doe"},
["dof"] = {"Domu"},
["doh"] = {"Dong"},
["doi"] = {"Dogri (macrolanguage)"},
["dok"] = {"Dondo"},
["dol"] = {"Doso"},
["don"] = {"Toura (Papua New Guinea)"},
["doo"] = {"Dongo"},
["dop"] = {"Lukpa"},
["doq"] = {"Dominican Sign Language"},
["dor"] = {"Dori'o"},
["dos"] = {"Dogosé"},
["dot"] = {"Dass"},
["dov"] = {"Dombe"},
["dow"] = {"Doyayo"},
["dox"] = {"Bussa"},
["doy"] = {"Dompo"},
["doz"] = {"Dorze"},
["dpp"] = {"Papar"},
["dra"] = {"Dravidian languages"},
["drb"] = {"Dair"},
["drc"] = {"Minderico"},
["drd"] = {"Darmiya"},
["dre"] = {"Dolpo"},
["drg"] = {"Rungus"},
["dri"] = {"C'Lela"},
["drl"] = {"Paakantyi"},
["drn"] = {"West Damar"},
["dro"] = {"Daro-Matu Melanau"},
["drq"] = {"Dura"},
["drs"] = {"Gedeo"},
["drt"] = {"Drents"},
["dru"] = {"Rukai"},
["dry"] = {"Darai"},
["dsb"] = {"Lower Sorbian"},
["dse"] = {"Dutch Sign Language"},
["dsh"] = {"Daasanach"},
["dsi"] = {"Disa"},
["dsl"] = {"Danish Sign Language"},
["dsn"] = {"Dusner"},
["dso"] = {"Desiya"},
["dsq"] = {"Tadaksahak"},
["dta"] = {"Daur"},
["dtb"] = {"Labuk-Kinabatangan Kadazan"},
["dtd"] = {"Ditidaht"},
["dth"] = {"Adithinngithigh"},
["dti"] = {"Ana Tinga Dogon"},
["dtk"] = {"Tene Kan Dogon"},
["dtm"] = {"Tomo Kan Dogon"},
["dtn"] = {"Daatsʼíin"},
["dto"] = {"Tommo So Dogon"},
["dtp"] = {"Kadazan Dusun", "Central Dusun"},
["dtr"] = {"Lotud"},
["dts"] = {"Toro So Dogon"},
["dtt"] = {"Toro Tegu Dogon"},
["dtu"] = {"Tebul Ure Dogon"},
["dty"] = {"Dotyali"},
["dua"] = {"Duala"},
["dub"] = {"Dubli"},
["duc"] = {"Duna"},
["due"] = {"Umiray Dumaget Agta"},
["duf"] = {"Dumbea", "Drubea"},
["dug"] = {"Duruma", "Chiduruma"},
["duh"] = {"Dungra Bhil"},
["dui"] = {"Dumun"},
["duk"] = {"Uyajitaya"},
["dul"] = {"Alabat Island Agta"},
["dum"] = {"Middle Dutch (ca. 1050-1350)"},
["dun"] = {"Dusun Deyah"},
["duo"] = {"Dupaninan Agta"},
["dup"] = {"Duano"},
["duq"] = {"Dusun Malang"},
["dur"] = {"Dii"},
["dus"] = {"Dumi"},
["duu"] = {"Drung"},
["duv"] = {"Duvle"},
["duw"] = {"Dusun Witu"},
["dux"] = {"Duungooma"},
["duy"] = {"Dicamay Agta"},
["duz"] = {"Duli-Gey"},
["dva"] = {"Duau"},
["dwa"] = {"Diri"},
["dwk"] = {"Dawik Kui"},
["dwr"] = {"Dawro"},
["dws"] = {"Dutton World Speedwords"},
["dwu"] = {"Dhuwal"},
["dww"] = {"Dawawa"},
["dwy"] = {"Dhuwaya"},
["dwz"] = {"Dewas Rai"},
["dya"] = {"Dyan"},
["dyb"] = {"Dyaberdyaber"},
["dyd"] = {"Dyugun"},
["dyg"] = {"Villa Viciosa Agta"},
["dyi"] = {"Djimini Senoufo"},
["dym"] = {"Yanda Dom Dogon"},
["dyn"] = {"Dyangadi", "Dhanggatti"},
["dyo"] = {"Jola-Fonyi"},
["dyu"] = {"Dyula"},
["dyy"] = {"Djabugay", "Dyaabugay"},
["dza"] = {"Tunzu"},
["dze"] = {"Djiwarli"},
["dzg"] = {"Dazaga"},
["dzl"] = {"Dzalakha"},
["dzn"] = {"Dzando"},
["eaa"] = {"Karenggapa"},
["ebc"] = {"Beginci"},
["ebg"] = {"Ebughu"},
["ebk"] = {"Eastern Bontok"},
["ebo"] = {"Teke-Ebo"},
["ebr"] = {"Ebrié"},
["ebu"] = {"Embu", "Kiembu"},
["ecr"] = {"Eteocretan"},
["ecs"] = {"Ecuadorian Sign Language"},
["ecy"] = {"Eteocypriot"},
["eee"] = {"E"},
["efa"] = {"Efai"},
["efe"] = {"Efe"},
["efi"] = {"Efik"},
["ega"] = {"Ega"},
["egl"] = {"Emilian"},
["ego"] = {"Eggon"},
["egx"] = {"Egyptian languages"},
["egy"] = {"Egyptian (Ancient)"},
["ehu"] = {"Ehueun"},
["eip"] = {"Eipomek"},
["eit"] = {"Eitiep"},
["eiv"] = {"Askopan"},
["eja"] = {"Ejamat"},
["eka"] = {"Ekajuk"},
["eke"] = {"Ekit"},
["ekg"] = {"Ekari"},
["eki"] = {"Eki"},
["ekk"] = {"Standard Estonian"},
["ekl"] = {"Kol (Bangladesh)", "Kol"},
["ekm"] = {"Elip"},
["eko"] = {"Koti"},
["ekp"] = {"Ekpeye"},
["ekr"] = {"Yace"},
["eky"] = {"Eastern Kayah"},
["ele"] = {"Elepi"},
["elh"] = {"El Hugeirat"},
["eli"] = {"Nding"},
["elk"] = {"Elkei"},
["elm"] = {"Eleme"},
["elo"] = {"El Molo"},
["elu"] = {"Elu"},
["elx"] = {"Elamite"},
["ema"] = {"Emai-Iuleha-Ora"},
["emb"] = {"Embaloh"},
["eme"] = {"Emerillon"},
["emg"] = {"Eastern Meohang"},
["emi"] = {"Mussau-Emira"},
["emk"] = {"Eastern Maninkakan"},
["emm"] = {"Mamulique"},
["emn"] = {"Eman"},
["emp"] = {"Northern Emberá"},
["ems"] = {"Pacific Gulf Yupik"},
["emu"] = {"Eastern Muria"},
["emw"] = {"Emplawas"},
["emx"] = {"Erromintxela"},
["emy"] = {"Epigraphic Mayan"},
["ena"] = {"Apali"},
["enb"] = {"Markweeta"},
["enc"] = {"En"},
["end"] = {"Ende"},
["enf"] = {"Forest Enets"},
["enh"] = {"Tundra Enets"},
["enl"] = {"Enlhet"},
["enm"] = {"Middle English (1100-1500)"},
["enn"] = {"Engenni"},
["eno"] = {"Enggano"},
["enq"] = {"Enga"},
["enr"] = {"Emumu", "Emem"},
["enu"] = {"Enu"},
["env"] = {"Enwan (Edu State)"},
["enw"] = {"Enwan (Akwa Ibom State)"},
["enx"] = {"Enxet"},
["eot"] = {"Beti (Côte d'Ivoire)"},
["epi"] = {"Epie"},
["era"] = {"Eravallan"},
["erg"] = {"Sie"},
["erh"] = {"Eruwa"},
["eri"] = {"Ogea"},
["erk"] = {"South Efate"},
["ero"] = {"Horpa"},
["err"] = {"Erre"},
["ers"] = {"Ersu"},
["ert"] = {"Eritai"},
["erw"] = {"Erokwanas"},
["ese"] = {"Ese Ejja"},
["esg"] = {"Aheri Gondi"},
["esh"] = {"Eshtehardi"},
["esi"] = {"North Alaskan Inupiatun"},
["esk"] = {"Northwest Alaska Inupiatun"},
["esl"] = {"Egypt Sign Language"},
["esm"] = {"Esuma"},
["esn"] = {"Salvadoran Sign Language"},
["eso"] = {"Estonian Sign Language"},
["esq"] = {"Esselen"},
["ess"] = {"Central Siberian Yupik"},
["esu"] = {"Central Yupik"},
["esx"] = {"Eskimo-Aleut languages"},
["esy"] = {"Eskayan"},
["etb"] = {"Etebi"},
["etc"] = {"Etchemin"},
["eth"] = {"Ethiopian Sign Language"},
["etn"] = {"Eton (Vanuatu)"},
["eto"] = {"Eton (Cameroon)"},
["etr"] = {"Edolo"},
["ets"] = {"Yekhee"},
["ett"] = {"Etruscan"},
["etu"] = {"Ejagham"},
["etx"] = {"Eten"},
["etz"] = {"Semimi"},
["euq"] = {"Basque (family)"},
["eve"] = {"Even"},
["evh"] = {"Uvbie"},
["evn"] = {"Evenki"},
["ewo"] = {"Ewondo"},
["ext"] = {"Extremaduran"},
["eya"] = {"Eyak"},
["eyo"] = {"Keiyo"},
["eza"] = {"Ezaa"},
["eze"] = {"Uzekwe"},
["faa"] = {"Fasu"},
["fab"] = {"Fa d'Ambu"},
["fad"] = {"Wagi"},
["faf"] = {"Fagani"},
["fag"] = {"Finongan"},
["fah"] = {"Baissa Fali"},
["fai"] = {"Faiwol"},
["faj"] = {"Faita"},
["fak"] = {"Fang (Cameroon)"},
["fal"] = {"South Fali"},
["fam"] = {"Fam"},
["fan"] = {"Fang (Equatorial Guinea)"},
["fap"] = {"Paloor"},
["far"] = {"Fataleka"},
["fat"] = {"Fanti"},
["fau"] = {"Fayu"},
["fax"] = {"Fala"},
["fay"] = {"Southwestern Fars"},
["faz"] = {"Northwestern Fars"},
["fbl"] = {"West Albay Bikol"},
["fcs"] = {"Quebec Sign Language"},
["fer"] = {"Feroge"},
["ffi"] = {"Foia Foia"},
["ffm"] = {"Maasina Fulfulde"},
["fgr"] = {"Fongoro"},
["fia"] = {"Nobiin"},
["fie"] = {"Fyer"},
["fif"] = {"Faifi"},
["fil"] = {"Filipino", "Pilipino"},
["fip"] = {"Fipa"},
["fir"] = {"Firan"},
["fit"] = {"Tornedalen Finnish"},
["fiu"] = {"Finno-Ugrian languages"},
["fiw"] = {"Fiwaga"},
["fkk"] = {"Kirya-Konzəl"},
["fkv"] = {"Kven Finnish"},
["fla"] = {"Kalispel-Pend d'Oreille"},
["flh"] = {"Foau"},
["fli"] = {"Fali"},
["fll"] = {"North Fali"},
["fln"] = {"Flinders Island"},
["flr"] = {"Fuliiru"},
["fly"] = {"Flaaitaal", "Tsotsitaal"},
["fmp"] = {"Fe'fe'"},
["fmu"] = {"Far Western Muria"},
["fnb"] = {"Fanbak"},
["fng"] = {"Fanagalo"},
["fni"] = {"Fania"},
["fod"] = {"Foodo"},
["foi"] = {"Foi"},
["fom"] = {"Foma"},
["fon"] = {"Fon"},
["for"] = {"Fore"},
["fos"] = {"Siraya"},
["fox"] = {"Formosan languages"},
["fpe"] = {"Fernando Po Creole English"},
["fqs"] = {"Fas"},
["frc"] = {"Cajun French"},
["frd"] = {"Fordata"},
["frk"] = {"Frankish"},
["frm"] = {"Middle French (ca. 1400-1600)"},
["fro"] = {"Old French (842-ca. 1400)"},
["frp"] = {"Arpitan", "Francoprovençal"},
["frq"] = {"Forak"},
["frr"] = {"Northern Frisian"},
["frs"] = {"Eastern Frisian"},
["frt"] = {"Fortsenal"},
["fse"] = {"Finnish Sign Language"},
["fsl"] = {"French Sign Language"},
["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"},
["fub"] = {"Adamawa Fulfulde"},
["fuc"] = {"Pulaar"},
["fud"] = {"East Futuna"},
["fue"] = {"Borgu Fulfulde"},
["fuf"] = {"Pular"},
["fuh"] = {"Western Niger Fulfulde"},
["fui"] = {"Bagirmi Fulfulde"},
["fuj"] = {"Ko"},
["fum"] = {"Fum"},
["fun"] = {"Fulniô"},
["fuq"] = {"Central-Eastern Niger Fulfulde"},
["fur"] = {"Friulian"},
["fut"] = {"Futuna-Aniwa"},
["fuu"] = {"Furu"},
["fuv"] = {"Nigerian Fulfulde"},
["fuy"] = {"Fuyug"},
["fvr"] = {"Fur"},
["fwa"] = {"Fwâi"},
["fwe"] = {"Fwe"},
["gaa"] = {"Ga"},
["gab"] = {"Gabri"},
["gac"] = {"Mixed Great Andamanese"},
["gad"] = {"Gaddang"},
["gae"] = {"Guarequena"},
["gaf"] = {"Gende"},
["gag"] = {"Gagauz"},
["gah"] = {"Alekano"},
["gai"] = {"Borei"},
["gaj"] = {"Gadsup"},
["gak"] = {"Gamkonora"},
["gal"] = {"Galolen"},
["gam"] = {"Kandawo"},
["gan"] = {"Gan Chinese"},
["gao"] = {"Gants"},
["gap"] = {"Gal"},
["gaq"] = {"Gata'"},
["gar"] = {"Galeya"},
["gas"] = {"Adiwasi Garasia"},
["gat"] = {"Kenati"},
["gau"] = {"Mudhili Gadaba"},
["gaw"] = {"Nobonob"},
["gax"] = {"Borana-Arsi-Guji Oromo"},
["gay"] = {"Gayo"},
["gaz"] = {"West Central Oromo"},
["gba"] = {"Gbaya (Central African Republic)"},
["gbb"] = {"Kaytetye"},
["gbd"] = {"Karajarri"},
["gbe"] = {"Niksek"},
["gbf"] = {"Gaikundi"},
["gbg"] = {"Gbanziri"},
["gbh"] = {"Defi Gbe"},
["gbi"] = {"Galela"},
["gbj"] = {"Bodo Gadaba"},
["gbk"] = {"Gaddi"},
["gbl"] = {"Gamit"},
["gbm"] = {"Garhwali"},
["gbn"] = {"Mo'da"},
["gbo"] = {"Northern Grebo"},
["gbp"] = {"Gbaya-Bossangoa"},
["gbq"] = {"Gbaya-Bozoum"},
["gbr"] = {"Gbagyi"},
["gbs"] = {"Gbesi Gbe"},
["gbu"] = {"Gagadu"},
["gbv"] = {"Gbanu"},
["gbw"] = {"Gabi-Gabi"},
["gbx"] = {"Eastern Xwla Gbe"},
["gby"] = {"Gbari"},
["gbz"] = {"Zoroastrian Dari"},
["gcc"] = {"Mali"},
["gcd"] = {"Ganggalida"},
["gce"] = {"Galice"},
["gcf"] = {"Guadeloupean Creole French"},
["gcl"] = {"Grenadian Creole English"},
["gcn"] = {"Gaina"},
["gcr"] = {"Guianese Creole French"},
["gct"] = {"Colonia Tovar German"},
["gda"] = {"Gade Lohar"},
["gdb"] = {"Pottangi Ollar Gadaba"},
["gdc"] = {"Gugu Badhun"},
["gdd"] = {"Gedaged"},
["gde"] = {"Gude"},
["gdf"] = {"Guduf-Gava"},
["gdg"] = {"Ga'dang"},
["gdh"] = {"Gadjerawang", "Gajirrabeng"},
["gdi"] = {"Gundi"},
["gdj"] = {"Gurdjar"},
["gdk"] = {"Gadang"},
["gdl"] = {"Dirasha"},
["gdm"] = {"Laal"},
["gdn"] = {"Umanakaina"},
["gdo"] = {"Ghodoberi"},
["gdq"] = {"Mehri"},
["gdr"] = {"Wipi"},
["gds"] = {"Ghandruk Sign Language"},
["gdt"] = {"Kungardutyi"},
["gdu"] = {"Gudu"},
["gdx"] = {"Godwari"},
["gea"] = {"Geruma"},
["geb"] = {"Kire"},
["gec"] = {"Gboloo Grebo"},
["ged"] = {"Gade"},
["gef"] = {"Gerai"},
["geg"] = {"Gengle"},
["geh"] = {"Hutterite German", "Hutterisch"},
["gei"] = {"Gebe"},
["gej"] = {"Gen"},
["gek"] = {"Ywom"},
["gel"] = {"ut-Ma'in"},
["gem"] = {"Germanic languages"},
["geq"] = {"Geme"},
["ges"] = {"Geser-Gorom"},
["gev"] = {"Eviya"},
["gew"] = {"Gera"},
["gex"] = {"Garre"},
["gey"] = {"Enya"},
["gez"] = {"Geez"},
["gfk"] = {"Patpatar"},
["gft"] = {"Gafat"},
["gga"] = {"Gao"},
["ggb"] = {"Gbii"},
["ggd"] = {"Gugadj"},
["gge"] = {"Gurr-goni"},
["ggg"] = {"Gurgula"},
["ggk"] = {"Kungarakany"},
["ggl"] = {"Ganglau"},
["ggt"] = {"Gitua"},
["ggu"] = {"Gagu", "Gban"},
["ggw"] = {"Gogodala"},
["gha"] = {"Ghadamès"},
["ghc"] = {"Hiberno-Scottish Gaelic"},
["ghe"] = {"Southern Ghale"},
["ghh"] = {"Northern Ghale"},
["ghk"] = {"Geko Karen"},
["ghl"] = {"Ghulfan"},
["ghn"] = {"Ghanongga"},
["gho"] = {"Ghomara"},
["ghr"] = {"Ghera"},
["ghs"] = {"Guhu-Samane"},
["ght"] = {"Kuke", "Kutang Ghale"},
["gia"] = {"Kija"},
["gib"] = {"Gibanawa"},
["gic"] = {"Gail"},
["gid"] = {"Gidar"},
["gie"] = {"Gaɓogbo", "Guébie"},
["gig"] = {"Goaria"},
["gih"] = {"Githabul"},
["gil"] = {"Gilbertese"},
["gim"] = {"Gimi (Eastern Highlands)"},
["gin"] = {"Hinukh"},
["gip"] = {"Gimi (West New Britain)"},
["giq"] = {"Green Gelao"},
["gir"] = {"Red Gelao"},
["gis"] = {"North Giziga"},
["git"] = {"Gitxsan"},
["giu"] = {"Mulao"},
["giw"] = {"White Gelao"},
["gix"] = {"Gilima"},
["giy"] = {"Giyug"},
["giz"] = {"South Giziga"},
["gji"] = {"Geji"},
["gjk"] = {"Kachi Koli"},
["gjm"] = {"Gunditjmara"},
["gjn"] = {"Gonja"},
["gjr"] = {"Gurindji Kriol"},
["gju"] = {"Gujari"},
["gka"] = {"Guya"},
["gkd"] = {"Magɨ (Madang Province)"},
["gke"] = {"Ndai"},
["gkn"] = {"Gokana"},
["gko"] = {"Kok-Nar"},
["gkp"] = {"Guinea Kpelle"},
["gku"] = {"ǂUngkue"},
["glc"] = {"Bon Gula"},
["gld"] = {"Nanai"},
["glh"] = {"Northwest Pashai", "Northwest Pashayi"},
["glj"] = {"Gula Iro"},
["glk"] = {"Gilaki"},
["gll"] = {"Garlali"},
["glo"] = {"Galambu"},
["glr"] = {"Glaro-Twabo"},
["glu"] = {"Gula (Chad)"},
["glw"] = {"Glavda"},
["gly"] = {"Gule"},
["gma"] = {"Gambera"},
["gmb"] = {"Gula'alaa"},
["gmd"] = {"Mághdì"},
["gme"] = {"East Germanic languages"},
["gmg"] = {"Magɨyi"},
["gmh"] = {"Middle High German (ca. 1050-1500)"},
["gml"] = {"Middle Low German"},
["gmm"] = {"Gbaya-Mbodomo"},
["gmn"] = {"Gimnime"},
["gmq"] = {"North Germanic languages"},
["gmr"] = {"Mirning", "Mirniny"},
["gmu"] = {"Gumalu"},
["gmv"] = {"Gamo"},
["gmw"] = {"West Germanic languages"},
["gmx"] = {"Magoma"},
["gmy"] = {"Mycenaean Greek"},
["gmz"] = {"Mgbolizhia"},
["gna"] = {"Kaansa"},
["gnb"] = {"Gangte"},
["gnc"] = {"Guanche"},
["gnd"] = {"Zulgo-Gemzek"},
["gne"] = {"Ganang"},
["gng"] = {"Ngangam"},
["gnh"] = {"Lere"},
["gni"] = {"Gooniyandi"},
["gnj"] = {"Ngen"},
["gnk"] = {"ǁGana"},
["gnl"] = {"Gangulu"},
["gnm"] = {"Ginuman"},
["gnn"] = {"Gumatj"},
["gno"] = {"Northern Gondi"},
["gnq"] = {"Gana"},
["gnr"] = {"Gureng Gureng"},
["gnt"] = {"Guntai"},
["gnu"] = {"Gnau"},
["gnw"] = {"Western Bolivian Guaraní"},
["gnz"] = {"Ganzi"},
["goa"] = {"Guro"},
["gob"] = {"Playero"},
["goc"] = {"Gorakor"},
["god"] = {"Godié"},
["goe"] = {"Gongduk"},
["gof"] = {"Gofa"},
["gog"] = {"Gogo"},
["goh"] = {"Old High German (ca. 750-1050)"},
["goi"] = {"Gobasi"},
["goj"] = {"Gowlan"},
["gok"] = {"Gowli"},
["gol"] = {"Gola"},
["gom"] = {"Goan Konkani"},
["gon"] = {"Gondi"},
["goo"] = {"Gone Dau"},
["gop"] = {"Yeretuar"},
["goq"] = {"Gorap"},
["gor"] = {"Gorontalo"},
["gos"] = {"Gronings"},
["got"] = {"Gothic"},
["gou"] = {"Gavar"},
["gow"] = {"Gorowa"},
["gox"] = {"Gobu"},
["goy"] = {"Goundo"},
["goz"] = {"Gozarkhani"},
["gpa"] = {"Gupa-Abawa"},
["gpe"] = {"Ghanaian Pidgin English"},
["gpn"] = {"Taiap"},
["gqa"] = {"Ga'anda"},
["gqi"] = {"Guiqiong"},
["gqn"] = {"Guana (Brazil)"},
["gqr"] = {"Gor"},
["gqu"] = {"Qau"},
["gra"] = {"Rajput Garasia"},
["grb"] = {"Grebo"},
["grc"] = {"Ancient Greek (to 1453)"},
["grd"] = {"Guruntum-Mbaaru"},
["grg"] = {"Madi"},
["grh"] = {"Gbiri-Niragu"},
["gri"] = {"Ghari"},
["grj"] = {"Southern Grebo"},
["grk"] = {"Greek languages"},
["grm"] = {"Kota Marudu Talantang"},
["gro"] = {"Groma"},
["grq"] = {"Gorovu"},
["grr"] = {"Taznatit"},
["grs"] = {"Gresi"},
["grt"] = {"Garo"},
["gru"] = {"Kistane"},
["grv"] = {"Central Grebo"},
["grw"] = {"Gweda"},
["grx"] = {"Guriaso"},
["gry"] = {"Barclayville Grebo"},
["grz"] = {"Guramalum"},
["gse"] = {"Ghanaian Sign Language"},
["gsg"] = {"German Sign Language"},
["gsl"] = {"Gusilay"},
["gsm"] = {"Guatemalan Sign Language"},
["gsn"] = {"Nema", "Gusan"},
["gso"] = {"Southwest Gbaya"},
["gsp"] = {"Wasembo"},
["gss"] = {"Greek Sign Language"},
["gsw"] = {"Swiss German", "Alemannic", "Alsatian"},
["gta"] = {"Guató"},
["gtu"] = {"Aghu-Tharnggala"},
["gua"] = {"Shiki"},
["gub"] = {"Guajajára"},
["guc"] = {"Wayuu"},
["gud"] = {"Yocoboué Dida"},
["gue"] = {"Gurindji"},
["guf"] = {"Gupapuyngu"},
["gug"] = {"Paraguayan Guaraní"},
["guh"] = {"Guahibo"},
["gui"] = {"Eastern Bolivian Guaraní"},
["guk"] = {"Gumuz"},
["gul"] = {"Sea Island Creole English"},
["gum"] = {"Guambiano"},
["gun"] = {"Mbyá Guaraní"},
["guo"] = {"Guayabero"},
["gup"] = {"Gunwinggu"},
["guq"] = {"Aché"},
["gur"] = {"Farefare"},
["gus"] = {"Guinean Sign Language"},
["gut"] = {"Maléku Jaíka"},
["guu"] = {"Yanomamö"},
["guw"] = {"Gun"},
["gux"] = {"Gourmanchéma"},
["guz"] = {"Gusii", "Ekegusii"},
["gva"] = {"Guana (Paraguay)"},
["gvc"] = {"Guanano"},
["gve"] = {"Duwet"},
["gvf"] = {"Golin"},
["gvj"] = {"Guajá"},
["gvl"] = {"Gulay"},
["gvm"] = {"Gurmana"},
["gvn"] = {"Kuku-Yalanji"},
["gvo"] = {"Gavião Do Jiparaná"},
["gvp"] = {"Pará Gavião"},
["gvr"] = {"Gurung"},
["gvs"] = {"Gumawana"},
["gvy"] = {"Guyani"},
["gwa"] = {"Mbato"},
["gwb"] = {"Gwa"},
["gwc"] = {"Gawri", "Kalami"},
["gwd"] = {"Gawwada"},
["gwe"] = {"Gweno"},
["gwf"] = {"Gowro"},
["gwg"] = {"Moo"},
["gwi"] = {"Gwichʼin"},
["gwj"] = {"ǀGwi"},
["gwm"] = {"Awngthim"},
["gwn"] = {"Gwandara"},
["gwr"] = {"Gwere"},
["gwt"] = {"Gawar-Bati"},
["gwu"] = {"Guwamu"},
["gww"] = {"Kwini"},
["gwx"] = {"Gua"},
["gxx"] = {"Wè Southern"},
["gya"] = {"Northwest Gbaya"},
["gyb"] = {"Garus"},
["gyd"] = {"Kayardild"},
["gye"] = {"Gyem"},
["gyf"] = {"Gungabula"},
["gyg"] = {"Gbayi"},
["gyi"] = {"Gyele"},
["gyl"] = {"Gayil"},
["gym"] = {"Ngäbere"},
["gyn"] = {"Guyanese Creole English"},
["gyo"] = {"Gyalsumdo"},
["gyr"] = {"Guarayu"},
["gyy"] = {"Gunya"},
["gza"] = {"Ganza"},
["gzi"] = {"Gazi"},
["gzn"] = {"Gane"},
["haa"] = {"Han"},
["hab"] = {"Hanoi Sign Language"},
["hac"] = {"Gurani"},
["had"] = {"Hatam"},
["hae"] = {"Eastern Oromo"},
["haf"] = {"Haiphong Sign Language"},
["hag"] = {"Hanga"},
["hah"] = {"Hahon"},
["hai"] = {"Haida"},
["haj"] = {"Hajong"},
["hak"] = {"Hakka Chinese"},
["hal"] = {"Halang"},
["ham"] = {"Hewa"},
["han"] = {"Hangaza"},
["hao"] = {"Hakö"},
["hap"] = {"Hupla"},
["haq"] = {"Ha"},
["har"] = {"Harari"},
["has"] = {"Haisla"},
["hav"] = {"Havu"},
["haw"] = {"Hawaiian"},
["hax"] = {"Southern Haida"},
["hay"] = {"Haya"},
["haz"] = {"Hazaragi"},
["hba"] = {"Hamba"},
["hbb"] = {"Huba"},
["hbn"] = {"Heiban"},
["hbo"] = {"Ancient Hebrew"},
["hbu"] = {"Habu"},
["hca"] = {"Andaman Creole Hindi"},
["hch"] = {"Huichol"},
["hdn"] = {"Northern Haida"},
["hds"] = {"Honduras Sign Language"},
["hdy"] = {"Hadiyya"},
["hea"] = {"Northern Qiandong Miao"},
["hed"] = {"Herdé"},
["heg"] = {"Helong"},
["heh"] = {"Hehe"},
["hei"] = {"Heiltsuk"},
["hem"] = {"Hemba"},
["hgm"] = {"Haiǁom"},
["hgw"] = {"Haigwai"},
["hhi"] = {"Hoia Hoia"},
["hhr"] = {"Kerak"},
["hhy"] = {"Hoyahoya"},
["hia"] = {"Lamang"},
["hib"] = {"Hibito"},
["hid"] = {"Hidatsa"},
["hif"] = {"Fiji Hindi"},
["hig"] = {"Kamwe"},
["hih"] = {"Pamosu"},
["hii"] = {"Hinduri"},
["hij"] = {"Hijuk"},
["hik"] = {"Seit-Kaitetu"},
["hil"] = {"Hiligaynon"},
["him"] = {"Himachali languages", "Western Pahari languages"},
["hio"] = {"Tsoa"},
["hir"] = {"Himarimã"},
["hit"] = {"Hittite"},
["hiw"] = {"Hiw"},
["hix"] = {"Hixkaryána"},
["hji"] = {"Haji"},
["hka"] = {"Kahe"},
["hke"] = {"Hunde"},
["hkk"] = {"Hunjara-Kaina Ke"},
["hkn"] = {"Mel-Khaonh"},
["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"},
["hla"] = {"Halia"},
["hlb"] = {"Halbi"},
["hld"] = {"Halang Doan"},
["hle"] = {"Hlersu"},
["hlt"] = {"Matu Chin"},
["hlu"] = {"Hieroglyphic Luwian"},
["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"},
["hmb"] = {"Humburi Senni Songhay"},
["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"},
["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"},
["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"},
["hmf"] = {"Hmong Don"},
["hmg"] = {"Southwestern Guiyang Hmong"},
["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"},
["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"},
["hmj"] = {"Ge", "Gejia"},
["hmk"] = {"Maek"},
["hml"] = {"Luopohe Hmong", "Luopohe Miao"},
["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"},
["hmn"] = {"Hmong", "Mong"},
["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"},
["hmq"] = {"Eastern Qiandong Miao"},
["hmr"] = {"Hmar"},
["hms"] = {"Southern Qiandong Miao"},
["hmt"] = {"Hamtai"},
["hmu"] = {"Hamap"},
["hmv"] = {"Hmong Dô"},
["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"},
["hmx"] = {"Hmong-Mien languages"},
["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"},
["hmz"] = {"Hmong Shua", "Sinicized Miao"},
["hna"] = {"Mina (Cameroon)"},
["hnd"] = {"Southern Hindko"},
["hne"] = {"Chhattisgarhi"},
["hng"] = {"Hungu"},
["hnh"] = {"ǁAni"},
["hni"] = {"Hani"},
["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"},
["hnn"] = {"Hanunoo"},
["hno"] = {"Northern Hindko"},
["hns"] = {"Caribbean Hindustani"},
["hnu"] = {"Hung"},
["hoa"] = {"Hoava"},
["hob"] = {"Mari (Madang Province)"},
["hoc"] = {"Ho"},
["hod"] = {"Holma"},
["hoe"] = {"Horom"},
["hoh"] = {"Hobyót"},
["hoi"] = {"Holikachuk"},
["hoj"] = {"Hadothi", "Haroti"},
["hok"] = {"Hokan languages"},
["hol"] = {"Holu"},
["hom"] = {"Homa"},
["hoo"] = {"Holoholo"},
["hop"] = {"Hopi"},
["hor"] = {"Horo"},
["hos"] = {"Ho Chi Minh City Sign Language"},
["hot"] = {"Hote", "Malê"},
["hov"] = {"Hovongan"},
["how"] = {"Honi"},
["hoy"] = {"Holiya"},
["hoz"] = {"Hozo"},
["hpo"] = {"Hpon"},
["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"},
["hra"] = {"Hrangkhol"},
["hrc"] = {"Niwer Mil"},
["hre"] = {"Hre"},
["hrk"] = {"Haruku"},
["hrm"] = {"Horned Miao"},
["hro"] = {"Haroi"},
["hrp"] = {"Nhirrpi"},
["hrt"] = {"Hértevin"},
["hru"] = {"Hruso"},
["hrw"] = {"Warwar Feni"},
["hrx"] = {"Hunsrik"},
["hrz"] = {"Harzani"},
["hsb"] = {"Upper Sorbian"},
["hsh"] = {"Hungarian Sign Language"},
["hsl"] = {"Hausa Sign Language"},
["hsn"] = {"Xiang Chinese"},
["hss"] = {"Harsusi"},
["hti"] = {"Hoti"},
["hto"] = {"Minica Huitoto"},
["hts"] = {"Hadza"},
["htu"] = {"Hitu"},
["htx"] = {"Middle Hittite"},
["hub"] = {"Huambisa"},
["huc"] = {"ǂHua", "ǂʼAmkhoe"},
["hud"] = {"Huaulu"},
["hue"] = {"San Francisco Del Mar Huave"},
["huf"] = {"Humene"},
["hug"] = {"Huachipaeri"},
["huh"] = {"Huilliche"},
["hui"] = {"Huli"},
["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"},
["huk"] = {"Hulung"},
["hul"] = {"Hula"},
["hum"] = {"Hungana"},
["huo"] = {"Hu"},
["hup"] = {"Hupa"},
["huq"] = {"Tsat"},
["hur"] = {"Halkomelem"},
["hus"] = {"Huastec"},
["hut"] = {"Humla"},
["huu"] = {"Murui Huitoto"},
["huv"] = {"San Mateo Del Mar Huave"},
["huw"] = {"Hukumina"},
["hux"] = {"Nüpode Huitoto"},
["huy"] = {"Hulaulá"},
["huz"] = {"Hunzib"},
["hvc"] = {"Haitian Vodoun Culture Language"},
["hve"] = {"San Dionisio Del Mar Huave"},
["hvk"] = {"Haveke"},
["hvn"] = {"Sabu"},
["hvv"] = {"Santa María Del Mar Huave"},
["hwa"] = {"Wané"},
["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"},
["hwo"] = {"Hwana"},
["hya"] = {"Hya"},
["hyw"] = {"Western Armenian"},
["hyx"] = {"Armenian (family)"},
["iai"] = {"Iaai"},
["ian"] = {"Iatmul"},
["iar"] = {"Purari"},
["iba"] = {"Iban"},
["ibb"] = {"Ibibio"},
["ibd"] = {"Iwaidja"},
["ibe"] = {"Akpes"},
["ibg"] = {"Ibanag"},
["ibh"] = {"Bih"},
["ibl"] = {"Ibaloi"},
["ibm"] = {"Agoi"},
["ibn"] = {"Ibino"},
["ibr"] = {"Ibuoro"},
["ibu"] = {"Ibu"},
["iby"] = {"Ibani"},
["ica"] = {"Ede Ica"},
["ich"] = {"Etkywan"},
["icl"] = {"Icelandic Sign Language"},
["icr"] = {"Islander Creole English"},
["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"},
["idb"] = {"Indo-Portuguese"},
["idc"] = {"Idon", "Ajiya"},
["idd"] = {"Ede Idaca"},
["ide"] = {"Idere"},
["idi"] = {"Idi"},
["idr"] = {"Indri"},
["ids"] = {"Idesa"},
["idt"] = {"Idaté"},
["idu"] = {"Idoma"},
["ifa"] = {"Amganad Ifugao"},
["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"},
["ife"] = {"Ifè"},
["iff"] = {"Ifo"},
["ifk"] = {"Tuwali Ifugao"},
["ifm"] = {"Teke-Fuumu"},
["ifu"] = {"Mayoyao Ifugao"},
["ify"] = {"Keley-I Kallahan"},
["igb"] = {"Ebira"},
["ige"] = {"Igede"},
["igg"] = {"Igana"},
["igl"] = {"Igala"},
["igm"] = {"Kanggape"},
["ign"] = {"Ignaciano"},
["igo"] = {"Isebe"},
["igs"] = {"Interglossa"},
["igw"] = {"Igwe"},
["ihb"] = {"Iha Based Pidgin"},
["ihi"] = {"Ihievbe"},
["ihp"] = {"Iha"},
["ihw"] = {"Bidhawal"},
["iin"] = {"Thiin"},
["iir"] = {"Indo-Iranian languages"},
["ijc"] = {"Izon"},
["ije"] = {"Biseni"},
["ijj"] = {"Ede Ije"},
["ijn"] = {"Kalabari"},
["ijo"] = {"Ijo languages"},
["ijs"] = {"Southeast Ijo"},
["ike"] = {"Eastern Canadian Inuktitut"},
["iki"] = {"Iko"},
["ikk"] = {"Ika"},
["ikl"] = {"Ikulu"},
["iko"] = {"Olulumo-Ikom"},
["ikp"] = {"Ikpeshi"},
["ikr"] = {"Ikaranggal"},
["iks"] = {"Inuit Sign Language"},
["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"},
["ikv"] = {"Iku-Gora-Ankwa"},
["ikw"] = {"Ikwere"},
["ikx"] = {"Ik"},
["ikz"] = {"Ikizu"},
["ila"] = {"Ile Ape"},
["ilb"] = {"Ila"},
["ilg"] = {"Garig-Ilgar"},
["ili"] = {"Ili Turki"},
["ilk"] = {"Ilongot"},
["ilm"] = {"Iranun (Malaysia)"},
["ilo"] = {"Iloko"},
["ilp"] = {"Iranun (Philippines)"},
["ils"] = {"International Sign"},
["ilu"] = {"Ili'uun"},
["ilv"] = {"Ilue"},
["ima"] = {"Mala Malasar"},
["imi"] = {"Anamgura"},
["iml"] = {"Miluk"},
["imn"] = {"Imonda"},
["imo"] = {"Imbongu"},
["imr"] = {"Imroing"},
["ims"] = {"Marsian"},
["imy"] = {"Milyan"},
["inb"] = {"Inga"},
["inc"] = {"Indic languages"},
["ine"] = {"Indo-European languages"},
["ing"] = {"Degexit'an"},
["inh"] = {"Ingush"},
["inj"] = {"Jungle Inga"},
["inl"] = {"Indonesian Sign Language"},
["inm"] = {"Minaean"},
["inn"] = {"Isinai"},
["ino"] = {"Inoke-Yate"},
["inp"] = {"Iñapari"},
["ins"] = {"Indian Sign Language"},
["int"] = {"Intha"},
["inz"] = {"Ineseño"},
["ior"] = {"Inor"},
["iou"] = {"Tuma-Irumu"},
["iow"] = {"Iowa-Oto"},
["ipi"] = {"Ipili"},
["ipo"] = {"Ipiko"},
["iqu"] = {"Iquito"},
["iqw"] = {"Ikwo"},
["ira"] = {"Iranian languages"},
["ire"] = {"Iresim"},
["irh"] = {"Irarutu"},
["iri"] = {"Rigwe", "Irigwe"},
["irk"] = {"Iraqw"},
["irn"] = {"Irántxe"},
["iro"] = {"Iroquoian languages"},
["irr"] = {"Ir"},
["iru"] = {"Irula"},
["irx"] = {"Kamberau"},
["iry"] = {"Iraya"},
["isa"] = {"Isabi"},
["isc"] = {"Isconahua"},
["isd"] = {"Isnag"},
["ise"] = {"Italian Sign Language"},
["isg"] = {"Irish Sign Language"},
["ish"] = {"Esan"},
["isi"] = {"Nkem-Nkum"},
["isk"] = {"Ishkashimi"},
["ism"] = {"Masimasi"},
["isn"] = {"Isanzu"},
["iso"] = {"Isoko"},
["isr"] = {"Israeli Sign Language"},
["ist"] = {"Istriot"},
["isu"] = {"Isu (Menchum Division)"},
["itb"] = {"Binongan Itneg"},
["itc"] = {"Italic languages"},
["itd"] = {"Southern Tidung"},
["ite"] = {"Itene"},
["iti"] = {"Inlaod Itneg"},
["itk"] = {"Judeo-Italian"},
["itl"] = {"Itelmen"},
["itm"] = {"Itu Mbon Uzo"},
["ito"] = {"Itonama"},
["itr"] = {"Iteri"},
["its"] = {"Isekiri"},
["itt"] = {"Maeng Itneg"},
["itv"] = {"Itawit"},
["itw"] = {"Ito"},
["itx"] = {"Itik"},
["ity"] = {"Moyadan Itneg"},
["itz"] = {"Itzá"},
["ium"] = {"Iu Mien"},
["ivb"] = {"Ibatan"},
["ivv"] = {"Ivatan"},
["iwk"] = {"I-Wak"},
["iwm"] = {"Iwam"},
["iwo"] = {"Iwur"},
["iws"] = {"Sepik Iwam"},
["ixc"] = {"Ixcatec"},
["ixl"] = {"Ixil"},
["iya"] = {"Iyayu"},
["iyo"] = {"Mesaka"},
["iyx"] = {"Yaka (Congo)"},
["izh"] = {"Ingrian"},
["izr"] = {"Izere"},
["izz"] = {"Izii"},
["jaa"] = {"Jamamadí"},
["jab"] = {"Hyam"},
["jac"] = {"Popti'", "Jakalteko"},
["jad"] = {"Jahanka"},
["jae"] = {"Yabem"},
["jaf"] = {"Jara"},
["jah"] = {"Jah Hut"},
["jaj"] = {"Zazao"},
["jak"] = {"Jakun"},
["jal"] = {"Yalahatan"},
["jam"] = {"Jamaican Creole English"},
["jan"] = {"Jandai"},
["jao"] = {"Yanyuwa"},
["jaq"] = {"Yaqay"},
["jas"] = {"New Caledonian Javanese"},
["jat"] = {"Jakati"},
["jau"] = {"Yaur"},
["jax"] = {"Jambi Malay"},
["jay"] = {"Yan-nhangu", "Nhangu"},
["jaz"] = {"Jawe"},
["jbe"] = {"Judeo-Berber"},
["jbi"] = {"Badjiri"},
["jbj"] = {"Arandai"},
["jbk"] = {"Barikewa"},
["jbn"] = {"Nafusi"},
["jbo"] = {"Lojban"},
["jbr"] = {"Jofotek-Bromnya"},
["jbt"] = {"Jabutí"},
["jbu"] = {"Jukun Takum"},
["jbw"] = {"Yawijibaya"},
["jcs"] = {"Jamaican Country Sign Language"},
["jct"] = {"Krymchak"},
["jda"] = {"Jad"},
["jdg"] = {"Jadgali"},
["jdt"] = {"Judeo-Tat"},
["jeb"] = {"Jebero"},
["jee"] = {"Jerung"},
["jeh"] = {"Jeh"},
["jei"] = {"Yei"},
["jek"] = {"Jeri Kuo"},
["jel"] = {"Yelmek"},
["jen"] = {"Dza"},
["jer"] = {"Jere"},
["jet"] = {"Manem"},
["jeu"] = {"Jonkor Bourmataguil"},
["jgb"] = {"Ngbee"},
["jge"] = {"Judeo-Georgian"},
["jgk"] = {"Gwak"},
["jgo"] = {"Ngomba"},
["jhi"] = {"Jehai"},
["jhs"] = {"Jhankot Sign Language"},
["jia"] = {"Jina"},
["jib"] = {"Jibu"},
["jic"] = {"Tol"},
["jid"] = {"Bu"},
["jie"] = {"Jilbe"},
["jig"] = {"Jingulu", "Djingili"},
["jih"] = {"sTodsde", "Shangzhai"},
["jii"] = {"Jiiddu"},
["jil"] = {"Jilim"},
["jim"] = {"Jimi (Cameroon)"},
["jio"] = {"Jiamao"},
["jiq"] = {"Guanyinqiao", "Lavrung"},
["jit"] = {"Jita"},
["jiu"] = {"Youle Jinuo"},
["jiv"] = {"Shuar"},
["jiy"] = {"Buyuan Jinuo"},
["jje"] = {"Jejueo"},
["jjr"] = {"Bankal"},
["jka"] = {"Kaera"},
["jkm"] = {"Mobwa Karen"},
["jko"] = {"Kubo"},
["jkp"] = {"Paku Karen"},
["jkr"] = {"Koro (India)"},
["jku"] = {"Labir"},
["jle"] = {"Ngile"},
["jls"] = {"Jamaican Sign Language"},
["jma"] = {"Dima"},
["jmb"] = {"Zumbun"},
["jmc"] = {"Machame"},
["jmd"] = {"Yamdena"},
["jmi"] = {"Jimi (Nigeria)"},
["jml"] = {"Jumli"},
["jmn"] = {"Makuri Naga"},
["jmr"] = {"Kamara"},
["jms"] = {"Mashi (Nigeria)"},
["jmw"] = {"Mouwase"},
["jmx"] = {"Western Juxtlahuaca Mixtec"},
["jna"] = {"Jangshung"},
["jnd"] = {"Jandavra"},
["jng"] = {"Yangman"},
["jni"] = {"Janji"},
["jnj"] = {"Yemsa"},
["jnl"] = {"Rawat"},
["jns"] = {"Jaunsari"},
["job"] = {"Joba"},
["jod"] = {"Wojenaka"},
["jog"] = {"Jogi"},
["jor"] = {"Jorá"},
["jos"] = {"Jordanian Sign Language"},
["jow"] = {"Jowulu"},
["jpa"] = {"Jewish Palestinian Aramaic"},
["jpr"] = {"Judeo-Persian"},
["jpx"] = {"Japanese (family)"},
["jqr"] = {"Jaqaru"},
["jra"] = {"Jarai"},
["jrb"] = {"Judeo-Arabic"},
["jrr"] = {"Jiru"},
["jrt"] = {"Jorto"},
["jru"] = {"Japrería"},
["jsl"] = {"Japanese Sign Language"},
["jua"] = {"Júma"},
["jub"] = {"Wannu"},
["juc"] = {"Jurchen"},
["jud"] = {"Worodougou"},
["juh"] = {"Hõne"},
["jui"] = {"Ngadjuri"},
["juk"] = {"Wapan"},
["jul"] = {"Jirel"},
["jum"] = {"Jumjum"},
["jun"] = {"Juang"},
["juo"] = {"Jiba"},
["jup"] = {"Hupdë"},
["jur"] = {"Jurúna"},
["jus"] = {"Jumla Sign Language"},
["jut"] = {"Jutish"},
["juu"] = {"Ju"},
["juw"] = {"Wãpha"},
["juy"] = {"Juray"},
["jvd"] = {"Javindo"},
["jvn"] = {"Caribbean Javanese"},
["jwi"] = {"Jwira-Pepesa"},
["jya"] = {"Jiarong"},
["jye"] = {"Judeo-Yemeni Arabic"},
["jyy"] = {"Jaya"},
["kaa"] = {"Kara-Kalpak", "Karakalpak"},
["kab"] = {"Kabyle"},
["kac"] = {"Kachin", "Jingpho"},
["kad"] = {"Adara"},
["kae"] = {"Ketangalan"},
["kaf"] = {"Katso"},
["kag"] = {"Kajaman"},
["kah"] = {"Kara (Central African Republic)"},
["kai"] = {"Karekare"},
["kaj"] = {"Jju"},
["kak"] = {"Kalanguya", "Kayapa Kallahan"},
["kam"] = {"Kamba (Kenya)"},
["kao"] = {"Xaasongaxango"},
["kap"] = {"Bezhta"},
["kaq"] = {"Capanahua"},
["kar"] = {"Karen languages"},
["kav"] = {"Katukína"},
["kaw"] = {"Kawi"},
["kax"] = {"Kao"},
["kay"] = {"Kamayurá"},
["kba"] = {"Kalarko"},
["kbb"] = {"Kaxuiâna"},
["kbc"] = {"Kadiwéu"},
["kbd"] = {"Kabardian"},
["kbe"] = {"Kanju"},
["kbg"] = {"Khamba"},
["kbh"] = {"Camsá"},
["kbi"] = {"Kaptiau"},
["kbj"] = {"Kari"},
["kbk"] = {"Grass Koiari"},
["kbl"] = {"Kanembu"},
["kbm"] = {"Iwal"},
["kbn"] = {"Kare (Central African Republic)"},
["kbo"] = {"Keliko"},
["kbp"] = {"Kabiyè"},
["kbq"] = {"Kamano"},
["kbr"] = {"Kafa"},
["kbs"] = {"Kande"},
["kbt"] = {"Abadi"},
["kbu"] = {"Kabutra"},
["kbv"] = {"Dera (Indonesia)"},
["kbw"] = {"Kaiep"},
["kbx"] = {"Ap Ma"},
["kby"] = {"Manga Kanuri"},
["kbz"] = {"Duhwa"},
["kca"] = {"Khanty"},
["kcb"] = {"Kawacha"},
["kcc"] = {"Lubila"},
["kcd"] = {"Ngkâlmpw Kanum"},
["kce"] = {"Kaivi"},
["kcf"] = {"Ukaan"},
["kcg"] = {"Tyap"},
["kch"] = {"Vono"},
["kci"] = {"Kamantan"},
["kcj"] = {"Kobiana"},
["kck"] = {"Kalanga"},
["kcl"] = {"Kela (Papua New Guinea)", "Kala"},
["kcm"] = {"Gula (Central African Republic)"},
["kcn"] = {"Nubi"},
["kco"] = {"Kinalakna"},
["kcp"] = {"Kanga"},
["kcq"] = {"Kamo"},
["kcr"] = {"Katla"},
["kcs"] = {"Koenoem"},
["kct"] = {"Kaian"},
["kcu"] = {"Kami (Tanzania)"},
["kcv"] = {"Kete"},
["kcw"] = {"Kabwari"},
["kcx"] = {"Kachama-Ganjule"},
["kcy"] = {"Korandje"},
["kcz"] = {"Konongo"},
["kda"] = {"Worimi"},
["kdc"] = {"Kutu"},
["kdd"] = {"Yankunytjatjara"},
["kde"] = {"Makonde"},
["kdf"] = {"Mamusi"},
["kdg"] = {"Seba"},
["kdh"] = {"Tem"},
["kdi"] = {"Kumam"},
["kdj"] = {"Karamojong"},
["kdk"] = {"Numèè", "Kwényi"},
["kdl"] = {"Tsikimba"},
["kdm"] = {"Kagoma"},
["kdn"] = {"Kunda"},
["kdo"] = {"Kordofanian languages"},
["kdp"] = {"Kaningdon-Nindem"},
["kdq"] = {"Koch"},
["kdr"] = {"Karaim"},
["kdt"] = {"Kuy"},
["kdu"] = {"Kadaru"},
["kdw"] = {"Koneraw"},
["kdx"] = {"Kam"},
["kdy"] = {"Keder", "Keijar"},
["kdz"] = {"Kwaja"},
["kea"] = {"Kabuverdianu"},
["keb"] = {"Kélé"},
["kec"] = {"Keiga"},
["ked"] = {"Kerewe"},
["kee"] = {"Eastern Keres"},
["kef"] = {"Kpessi"},
["keg"] = {"Tese"},
["keh"] = {"Keak"},
["kei"] = {"Kei"},
["kej"] = {"Kadar"},
["kek"] = {"Kekchí"},
["kel"] = {"Kela (Democratic Republic of Congo)"},
["kem"] = {"Kemak"},
["ken"] = {"Kenyang"},
["keo"] = {"Kakwa"},
["kep"] = {"Kaikadi"},
["keq"] = {"Kamar"},
["ker"] = {"Kera"},
["kes"] = {"Kugbo"},
["ket"] = {"Ket"},
["keu"] = {"Akebu"},
["kev"] = {"Kanikkaran"},
["kew"] = {"West Kewa"},
["kex"] = {"Kukna"},
["key"] = {"Kupia"},
["kez"] = {"Kukele"},
["kfa"] = {"Kodava"},
["kfb"] = {"Northwestern Kolami"},
["kfc"] = {"Konda-Dora"},
["kfd"] = {"Korra Koraga"},
["kfe"] = {"Kota (India)"},
["kff"] = {"Koya"},
["kfg"] = {"Kudiya"},
["kfh"] = {"Kurichiya"},
["kfi"] = {"Kannada Kurumba"},
["kfj"] = {"Kemiehua"},
["kfk"] = {"Kinnauri"},
["kfl"] = {"Kung"},
["kfm"] = {"Khunsari"},
["kfn"] = {"Kuk"},
["kfo"] = {"Koro (Côte d'Ivoire)"},
["kfp"] = {"Korwa"},
["kfq"] = {"Korku"},
["kfr"] = {"Kachhi", "Kutchi"},
["kfs"] = {"Bilaspuri"},
["kft"] = {"Kanjari"},
["kfu"] = {"Katkari"},
["kfv"] = {"Kurmukar"},
["kfw"] = {"Kharam Naga"},
["kfx"] = {"Kullu Pahari"},
["kfy"] = {"Kumaoni"},
["kfz"] = {"Koromfé"},
["kga"] = {"Koyaga"},
["kgb"] = {"Kawe"},
["kge"] = {"Komering"},
["kgf"] = {"Kube"},
["kgg"] = {"Kusunda"},
["kgi"] = {"Selangor Sign Language"},
["kgj"] = {"Gamale Kham"},
["kgk"] = {"Kaiwá"},
["kgl"] = {"Kunggari"},
["kgm"] = {"Karipúna"},
["kgn"] = {"Karingani"},
["kgo"] = {"Krongo"},
["kgp"] = {"Kaingang"},
["kgq"] = {"Kamoro"},
["kgr"] = {"Abun"},
["kgs"] = {"Kumbainggar"},
["kgt"] = {"Somyev"},
["kgu"] = {"Kobol"},
["kgv"] = {"Karas"},
["kgw"] = {"Karon Dori"},
["kgx"] = {"Kamaru"},
["kgy"] = {"Kyerung"},
["kha"] = {"Khasi"},
["khb"] = {"Lü"},
["khc"] = {"Tukang Besi North"},
["khd"] = {"Bädi Kanum"},
["khe"] = {"Korowai"},
["khf"] = {"Khuen"},
["khg"] = {"Khams Tibetan"},
["khh"] = {"Kehu"},
["khi"] = {"Khoisan languages"},
["khj"] = {"Kuturmi"},
["khk"] = {"Halh Mongolian"},
["khl"] = {"Lusi"},
["khn"] = {"Khandesi"},
["kho"] = {"Khotanese", "Sakan"},
["khp"] = {"Kapori", "Kapauri"},
["khq"] = {"Koyra Chiini Songhay"},
["khr"] = {"Kharia"},
["khs"] = {"Kasua"},
["kht"] = {"Khamti"},
["khu"] = {"Nkhumbi"},
["khv"] = {"Khvarshi"},
["khw"] = {"Khowar"},
["khx"] = {"Kanu"},
["khy"] = {"Kele (Democratic Republic of Congo)"},
["khz"] = {"Keapara"},
["kia"] = {"Kim"},
["kib"] = {"Koalib"},
["kic"] = {"Kickapoo"},
["kid"] = {"Koshin"},
["kie"] = {"Kibet"},
["kif"] = {"Eastern Parbate Kham"},
["kig"] = {"Kimaama", "Kimaghima"},
["kih"] = {"Kilmeri"},
["kii"] = {"Kitsai"},
["kij"] = {"Kilivila"},
["kil"] = {"Kariya"},
["kim"] = {"Karagas"},
["kio"] = {"Kiowa"},
["kip"] = {"Sheshi Kham"},
["kiq"] = {"Kosadle", "Kosare"},
["kis"] = {"Kis"},
["kit"] = {"Agob"},
["kiu"] = {"Kirmanjki (individual language)"},
["kiv"] = {"Kimbu"},
["kiw"] = {"Northeast Kiwai"},
["kix"] = {"Khiamniungan Naga"},
["kiy"] = {"Kirikiri"},
["kiz"] = {"Kisi"},
["kja"] = {"Mlap"},
["kjb"] = {"Q'anjob'al", "Kanjobal"},
["kjc"] = {"Coastal Konjo"},
["kjd"] = {"Southern Kiwai"},
["kje"] = {"Kisar"},
["kjg"] = {"Khmu"},
["kjh"] = {"Khakas"},
["kji"] = {"Zabana"},
["kjj"] = {"Khinalugh"},
["kjk"] = {"Highland Konjo"},
["kjl"] = {"Western Parbate Kham"},
["kjm"] = {"Kháng"},
["kjn"] = {"Kunjen"},
["kjo"] = {"Harijan Kinnauri"},
["kjp"] = {"Pwo Eastern Karen"},
["kjq"] = {"Western Keres"},
["kjr"] = {"Kurudu"},
["kjs"] = {"East Kewa"},
["kjt"] = {"Phrae Pwo Karen"},
["kju"] = {"Kashaya"},
["kjv"] = {"Kaikavian Literary Language"},
["kjx"] = {"Ramopa"},
["kjy"] = {"Erave"},
["kjz"] = {"Bumthangkha"},
["kka"] = {"Kakanda"},
["kkb"] = {"Kwerisa"},
["kkc"] = {"Odoodee"},
["kkd"] = {"Kinuku"},
["kke"] = {"Kakabe"},
["kkf"] = {"Kalaktang Monpa"},
["kkg"] = {"Mabaka Valley Kalinga"},
["kkh"] = {"Khün"},
["kki"] = {"Kagulu"},
["kkj"] = {"Kako"},
["kkk"] = {"Kokota"},
["kkl"] = {"Kosarek Yale"},
["kkm"] = {"Kiong"},
["kkn"] = {"Kon Keu"},
["kko"] = {"Karko"},
["kkp"] = {"Gugubera", "Koko-Bera"},
["kkq"] = {"Kaeku"},
["kkr"] = {"Kir-Balar"},
["kks"] = {"Giiwo"},
["kkt"] = {"Koi"},
["kku"] = {"Tumi"},
["kkv"] = {"Kangean"},
["kkw"] = {"Teke-Kukuya"},
["kkx"] = {"Kohin"},
["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"},
["kkz"] = {"Kaska"},
["kla"] = {"Klamath-Modoc"},
["klb"] = {"Kiliwa"},
["klc"] = {"Kolbila"},
["kld"] = {"Gamilaraay"},
["kle"] = {"Kulung (Nepal)"},
["klf"] = {"Kendeje"},
["klg"] = {"Tagakaulo"},
["klh"] = {"Weliki"},
["kli"] = {"Kalumpang"},
["klj"] = {"Khalaj"},
["klk"] = {"Kono (Nigeria)"},
["kll"] = {"Kagan Kalagan"},
["klm"] = {"Migum"},
["kln"] = {"Kalenjin"},
["klo"] = {"Kapya"},
["klp"] = {"Kamasa"},
["klq"] = {"Rumu"},
["klr"] = {"Khaling"},
["kls"] = {"Kalasha"},
["klt"] = {"Nukna"},
["klu"] = {"Klao"},
["klv"] = {"Maskelynes"},
["klw"] = {"Tado", "Lindu"},
["klx"] = {"Koluwawa"},
["kly"] = {"Kalao"},
["klz"] = {"Kabola"},
["kma"] = {"Konni"},
["kmb"] = {"Kimbundu"},
["kmc"] = {"Southern Dong"},
["kmd"] = {"Majukayang Kalinga"},
["kme"] = {"Bakole"},
["kmf"] = {"Kare (Papua New Guinea)"},
["kmg"] = {"Kâte"},
["kmh"] = {"Kalam"},
["kmi"] = {"Kami (Nigeria)"},
["kmj"] = {"Kumarbhag Paharia"},
["kmk"] = {"Limos Kalinga"},
["kml"] = {"Tanudan Kalinga"},
["kmm"] = {"Kom (India)"},
["kmn"] = {"Awtuw"},
["kmo"] = {"Kwoma"},
["kmp"] = {"Gimme"},
["kmq"] = {"Kwama"},
["kmr"] = {"Northern Kurdish"},
["kms"] = {"Kamasau"},
["kmt"] = {"Kemtuik"},
["kmu"] = {"Kanite"},
["kmv"] = {"Karipúna Creole French"},
["kmw"] = {"Komo (Democratic Republic of Congo)"},
["kmx"] = {"Waboda"},
["kmy"] = {"Koma"},
["kmz"] = {"Khorasani Turkish"},
["kna"] = {"Dera (Nigeria)"},
["knb"] = {"Lubuagan Kalinga"},
["knc"] = {"Central Kanuri"},
["knd"] = {"Konda"},
["kne"] = {"Kankanaey"},
["knf"] = {"Mankanya"},
["kng"] = {"Koongo"},
["kni"] = {"Kanufi"},
["knj"] = {"Western Kanjobal"},
["knk"] = {"Kuranko"},
["knl"] = {"Keninjal"},
["knm"] = {"Kanamarí"},
["knn"] = {"Konkani (individual language)"},
["kno"] = {"Kono (Sierra Leone)"},
["knp"] = {"Kwanja"},
["knq"] = {"Kintaq"},
["knr"] = {"Kaningra"},
["kns"] = {"Kensiu"},
["knt"] = {"Panoan Katukína"},
["knu"] = {"Kono (Guinea)"},
["knv"] = {"Tabo"},
["knw"] = {"Kung-Ekoka"},
["knx"] = {"Kendayan", "Salako"},
["kny"] = {"Kanyok"},
["knz"] = {"Kalamsé"},
["koa"] = {"Konomala"},
["koc"] = {"Kpati"},
["kod"] = {"Kodi"},
["koe"] = {"Kacipo-Balesi"},
["kof"] = {"Kubi"},
["kog"] = {"Cogui", "Kogi"},
["koh"] = {"Koyo"},
["koi"] = {"Komi-Permyak"},
["kok"] = {"Konkani (macrolanguage)"},
["kol"] = {"Kol (Papua New Guinea)"},
["koo"] = {"Konzo"},
["kop"] = {"Waube"},
["koq"] = {"Kota (Gabon)"},
["kos"] = {"Kosraean"},
["kot"] = {"Lagwan"},
["kou"] = {"Koke"},
["kov"] = {"Kudu-Camo"},
["kow"] = {"Kugama"},
["koy"] = {"Koyukon"},
["koz"] = {"Korak"},
["kpa"] = {"Kutto"},
["kpb"] = {"Mullu Kurumba"},
["kpc"] = {"Curripaco"},
["kpd"] = {"Koba"},
["kpe"] = {"Kpelle"},
["kpf"] = {"Komba"},
["kpg"] = {"Kapingamarangi"},
["kph"] = {"Kplang"},
["kpi"] = {"Kofei"},
["kpj"] = {"Karajá"},
["kpk"] = {"Kpan"},
["kpl"] = {"Kpala"},
["kpm"] = {"Koho"},
["kpn"] = {"Kepkiriwát"},
["kpo"] = {"Ikposo"},
["kpq"] = {"Korupun-Sela"},
["kpr"] = {"Korafe-Yegha"},
["kps"] = {"Tehit"},
["kpt"] = {"Karata"},
["kpu"] = {"Kafoa"},
["kpv"] = {"Komi-Zyrian"},
["kpw"] = {"Kobon"},
["kpx"] = {"Mountain Koiali"},
["kpy"] = {"Koryak"},
["kpz"] = {"Kupsabiny"},
["kqa"] = {"Mum"},
["kqb"] = {"Kovai"},
["kqc"] = {"Doromu-Koki"},
["kqd"] = {"Koy Sanjaq Surat"},
["kqe"] = {"Kalagan"},
["kqf"] = {"Kakabai"},
["kqg"] = {"Khe"},
["kqh"] = {"Kisankasa"},
["kqi"] = {"Koitabu"},
["kqj"] = {"Koromira"},
["kqk"] = {"Kotafon Gbe"},
["kql"] = {"Kyenele"},
["kqm"] = {"Khisa"},
["kqn"] = {"Kaonde"},
["kqo"] = {"Eastern Krahn"},
["kqp"] = {"Kimré"},
["kqq"] = {"Krenak"},
["kqr"] = {"Kimaragang"},
["kqs"] = {"Northern Kissi"},
["kqt"] = {"Klias River Kadazan"},
["kqu"] = {"Seroa"},
["kqv"] = {"Okolod"},
["kqw"] = {"Kandas"},
["kqx"] = {"Mser"},
["kqy"] = {"Koorete"},
["kqz"] = {"Korana"},
["kra"] = {"Kumhali"},
["krb"] = {"Karkin"},
["krc"] = {"Karachay-Balkar"},
["krd"] = {"Kairui-Midiki"},
["kre"] = {"Panará"},
["krf"] = {"Koro (Vanuatu)"},
["krh"] = {"Kurama"},
["kri"] = {"Krio"},
["krj"] = {"Kinaray-A"},
["krk"] = {"Kerek"},
["krl"] = {"Karelian"},
["krn"] = {"Sapo"},
["kro"] = {"Kru languages"},
["krp"] = {"Korop"},
["krr"] = {"Krung"},
["krs"] = {"Gbaya (Sudan)"},
["krt"] = {"Tumari Kanuri"},
["kru"] = {"Kurukh"},
["krv"] = {"Kavet"},
["krw"] = {"Western Krahn"},
["krx"] = {"Karon"},
["kry"] = {"Kryts"},
["krz"] = {"Sota Kanum"},
["ksa"] = {"Shuwa-Zamani"},
["ksb"] = {"Shambala"},
["ksc"] = {"Southern Kalinga"},
["ksd"] = {"Kuanua"},
["kse"] = {"Kuni"},
["ksf"] = {"Bafia"},
["ksg"] = {"Kusaghe"},
["ksh"] = {"Kölsch"},
["ksi"] = {"Krisa", "I'saka"},
["ksj"] = {"Uare"},
["ksk"] = {"Kansa"},
["ksl"] = {"Kumalu"},
["ksm"] = {"Kumba"},
["ksn"] = {"Kasiguranin"},
["kso"] = {"Kofa"},
["ksp"] = {"Kaba"},
["ksq"] = {"Kwaami"},
["ksr"] = {"Borong"},
["kss"] = {"Southern Kisi"},
["kst"] = {"Winyé"},
["ksu"] = {"Khamyang"},
["ksv"] = {"Kusu"},
["ksw"] = {"S'gaw Karen"},
["ksx"] = {"Kedang"},
["ksy"] = {"Kharia Thar"},
["ksz"] = {"Kodaku"},
["kta"] = {"Katua"},
["ktb"] = {"Kambaata"},
["ktc"] = {"Kholok"},
["ktd"] = {"Kokata", "Kukatha"},
["kte"] = {"Nubri"},
["ktf"] = {"Kwami"},
["ktg"] = {"Kalkutung"},
["kth"] = {"Karanga"},
["kti"] = {"North Muyu"},
["ktj"] = {"Plapo Krumen"},
["ktk"] = {"Kaniet"},
["ktl"] = {"Koroshi"},
["ktm"] = {"Kurti"},
["ktn"] = {"Karitiâna"},
["kto"] = {"Kuot"},
["ktp"] = {"Kaduo"},
["ktq"] = {"Katabaga"},
["kts"] = {"South Muyu"},
["ktt"] = {"Ketum"},
["ktu"] = {"Kituba (Democratic Republic of Congo)"},
["ktv"] = {"Eastern Katu"},
["ktw"] = {"Kato"},
["ktx"] = {"Kaxararí"},
["kty"] = {"Kango (Bas-Uélé District)"},
["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"},
["kub"] = {"Kutep"},
["kuc"] = {"Kwinsu"},
["kud"] = {"'Auhelawa"},
["kue"] = {"Kuman (Papua New Guinea)"},
["kuf"] = {"Western Katu"},
["kug"] = {"Kupa"},
["kuh"] = {"Kushi"},
["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"},
["kuj"] = {"Kuria"},
["kuk"] = {"Kepo'"},
["kul"] = {"Kulere"},
["kum"] = {"Kumyk"},
["kun"] = {"Kunama"},
["kuo"] = {"Kumukio"},
["kup"] = {"Kunimaipa"},
["kuq"] = {"Karipuna"},
["kus"] = {"Kusaal"},
["kut"] = {"Kutenai"},
["kuu"] = {"Upper Kuskokwim"},
["kuv"] = {"Kur"},
["kuw"] = {"Kpagua"},
["kux"] = {"Kukatja"},
["kuy"] = {"Kuuku-Ya'u"},
["kuz"] = {"Kunza"},
["kva"] = {"Bagvalal"},
["kvb"] = {"Kubu"},
["kvc"] = {"Kove"},
["kvd"] = {"Kui (Indonesia)"},
["kve"] = {"Kalabakan"},
["kvf"] = {"Kabalai"},
["kvg"] = {"Kuni-Boazi"},
["kvh"] = {"Komodo"},
["kvi"] = {"Kwang"},
["kvj"] = {"Psikye"},
["kvk"] = {"Korean Sign Language"},
["kvl"] = {"Kayaw"},
["kvm"] = {"Kendem"},
["kvn"] = {"Border Kuna"},
["kvo"] = {"Dobel"},
["kvp"] = {"Kompane"},
["kvq"] = {"Geba Karen"},
["kvr"] = {"Kerinci"},
["kvt"] = {"Lahta Karen", "Lahta"},
["kvu"] = {"Yinbaw Karen"},
["kvv"] = {"Kola"},
["kvw"] = {"Wersing"},
["kvx"] = {"Parkari Koli"},
["kvy"] = {"Yintale Karen", "Yintale"},
["kvz"] = {"Tsakwambo", "Tsaukambo"},
["kwa"] = {"Dâw"},
["kwb"] = {"Kwa"},
["kwc"] = {"Likwala"},
["kwd"] = {"Kwaio"},
["kwe"] = {"Kwerba"},
["kwf"] = {"Kwara'ae"},
["kwg"] = {"Sara Kaba Deme"},
["kwh"] = {"Kowiai"},
["kwi"] = {"Awa-Cuaiquer"},
["kwj"] = {"Kwanga"},
["kwk"] = {"Kwakiutl"},
["kwl"] = {"Kofyar"},
["kwm"] = {"Kwambi"},
["kwn"] = {"Kwangali"},
["kwo"] = {"Kwomtari"},
["kwp"] = {"Kodia"},
["kwr"] = {"Kwer"},
["kws"] = {"Kwese"},
["kwt"] = {"Kwesten"},
["kwu"] = {"Kwakum"},
["kwv"] = {"Sara Kaba Náà"},
["kww"] = {"Kwinti"},
["kwx"] = {"Khirwar"},
["kwy"] = {"San Salvador Kongo"},
["kwz"] = {"Kwadi"},
["kxa"] = {"Kairiru"},
["kxb"] = {"Krobu"},
["kxc"] = {"Konso", "Khonso"},
["kxd"] = {"Brunei"},
["kxf"] = {"Manumanaw Karen", "Manumanaw"},
["kxh"] = {"Karo (Ethiopia)"},
["kxi"] = {"Keningau Murut"},
["kxj"] = {"Kulfa"},
["kxk"] = {"Zayein Karen"},
["kxm"] = {"Northern Khmer"},
["kxn"] = {"Kanowit-Tanjong Melanau"},
["kxo"] = {"Kanoé"},
["kxp"] = {"Wadiyara Koli"},
["kxq"] = {"Smärky Kanum"},
["kxr"] = {"Koro (Papua New Guinea)"},
["kxs"] = {"Kangjia"},
["kxt"] = {"Koiwat"},
["kxv"] = {"Kuvi"},
["kxw"] = {"Konai"},
["kxx"] = {"Likuba"},
["kxy"] = {"Kayong"},
["kxz"] = {"Kerewo"},
["kya"] = {"Kwaya"},
["kyb"] = {"Butbut Kalinga"},
["kyc"] = {"Kyaka"},
["kyd"] = {"Karey"},
["kye"] = {"Krache"},
["kyf"] = {"Kouya"},
["kyg"] = {"Keyagana"},
["kyh"] = {"Karok"},
["kyi"] = {"Kiput"},
["kyj"] = {"Karao"},
["kyk"] = {"Kamayo"},
["kyl"] = {"Kalapuya"},
["kym"] = {"Kpatili"},
["kyn"] = {"Northern Binukidnon"},
["kyo"] = {"Kelon"},
["kyp"] = {"Kang"},
["kyq"] = {"Kenga"},
["kyr"] = {"Kuruáya"},
["kys"] = {"Baram Kayan"},
["kyt"] = {"Kayagar"},
["kyu"] = {"Western Kayah"},
["kyv"] = {"Kayort"},
["kyw"] = {"Kudmali"},
["kyx"] = {"Rapoisi"},
["kyy"] = {"Kambaira"},
["kyz"] = {"Kayabí"},
["kza"] = {"Western Karaboro"},
["kzb"] = {"Kaibobo"},
["kzc"] = {"Bondoukou Kulango"},
["kzd"] = {"Kadai"},
["kze"] = {"Kosena"},
["kzf"] = {"Da'a Kaili"},
["kzg"] = {"Kikai"},
["kzi"] = {"Kelabit"},
["kzk"] = {"Kazukuru"},
["kzl"] = {"Kayeli"},
["kzm"] = {"Kais"},
["kzn"] = {"Kokola"},
["kzo"] = {"Kaningi"},
["kzp"] = {"Kaidipang"},
["kzq"] = {"Kaike"},
["kzr"] = {"Karang"},
["kzs"] = {"Sugut Dusun"},
["kzu"] = {"Kayupulau"},
["kzv"] = {"Komyandaret"},
["kzw"] = {"Karirí-Xocó"},
["kzx"] = {"Kamarian"},
["kzy"] = {"Kango (Tshopo District)"},
["kzz"] = {"Kalabra"},
["laa"] = {"Southern Subanen"},
["lab"] = {"Linear A"},
["lac"] = {"Lacandon"},
["lad"] = {"Ladino"},
["lae"] = {"Pattani"},
["laf"] = {"Lafofa"},
["lag"] = {"Langi"},
["lah"] = {"Lahnda"},
["lai"] = {"Lambya"},
["laj"] = {"Lango (Uganda)"},
["lak"] = {"Laka (Nigeria)"},
["lal"] = {"Lalia"},
["lam"] = {"Lamba"},
["lan"] = {"Laru"},
["lap"] = {"Laka (Chad)"},
["laq"] = {"Qabiao"},
["lar"] = {"Larteh"},
["las"] = {"Lama (Togo)"},
["lau"] = {"Laba"},
["law"] = {"Lauje"},
["lax"] = {"Tiwa"},
["lay"] = {"Lama Bai"},
["laz"] = {"Aribwatsa"},
["lbb"] = {"Label"},
["lbc"] = {"Lakkia"},
["lbe"] = {"Lak"},
["lbf"] = {"Tinani"},
["lbg"] = {"Laopang"},
["lbi"] = {"La'bi"},
["lbj"] = {"Ladakhi"},
["lbk"] = {"Central Bontok"},
["lbl"] = {"Libon Bikol"},
["lbm"] = {"Lodhi"},
["lbn"] = {"Rmeet"},
["lbo"] = {"Laven"},
["lbq"] = {"Wampar"},
["lbr"] = {"Lohorung"},
["lbs"] = {"Libyan Sign Language"},
["lbt"] = {"Lachi"},
["lbu"] = {"Labu"},
["lbv"] = {"Lavatbura-Lamusong"},
["lbw"] = {"Tolaki"},
["lbx"] = {"Lawangan"},
["lby"] = {"Lamalama", "Lamu-Lamu"},
["lbz"] = {"Lardil"},
["lcc"] = {"Legenyem"},
["lcd"] = {"Lola"},
["lce"] = {"Loncong", "Sekak"},
["lcf"] = {"Lubu"},
["lch"] = {"Luchazi"},
["lcl"] = {"Lisela"},
["lcm"] = {"Tungag"},
["lcp"] = {"Western Lawa"},
["lcq"] = {"Luhu"},
["lcs"] = {"Lisabata-Nuniali"},
["lda"] = {"Kla-Dan"},
["ldb"] = {"Dũya"},
["ldd"] = {"Luri"},
["ldg"] = {"Lenyima"},
["ldh"] = {"Lamja-Dengsa-Tola"},
["ldi"] = {"Laari"},
["ldj"] = {"Lemoro"},
["ldk"] = {"Leelau"},
["ldl"] = {"Kaan"},
["ldm"] = {"Landoma"},
["ldn"] = {"Láadan"},
["ldo"] = {"Loo"},
["ldp"] = {"Tso"},
["ldq"] = {"Lufu"},
["lea"] = {"Lega-Shabunda"},
["leb"] = {"Lala-Bisa"},
["lec"] = {"Leco"},
["led"] = {"Lendu"},
["lee"] = {"Lyélé"},
["lef"] = {"Lelemi"},
["leh"] = {"Lenje"},
["lei"] = {"Lemio"},
["lej"] = {"Lengola"},
["lek"] = {"Leipon"},
["lel"] = {"Lele (Democratic Republic of Congo)"},
["lem"] = {"Nomaande"},
["len"] = {"Lenca"},
["leo"] = {"Leti (Cameroon)"},
["lep"] = {"Lepcha"},
["leq"] = {"Lembena"},
["ler"] = {"Lenkau"},
["les"] = {"Lese"},
["let"] = {"Lesing-Gelimi", "Amio-Gelimi"},
["leu"] = {"Kara (Papua New Guinea)"},
["lev"] = {"Lamma"},
["lew"] = {"Ledo Kaili"},
["lex"] = {"Luang"},
["ley"] = {"Lemolang"},
["lez"] = {"Lezghian"},
["lfa"] = {"Lefa"},
["lfn"] = {"Lingua Franca Nova"},
["lga"] = {"Lungga"},
["lgb"] = {"Laghu"},
["lgg"] = {"Lugbara"},
["lgh"] = {"Laghuu"},
["lgi"] = {"Lengilu"},
["lgk"] = {"Lingarak", "Neverver"},
["lgl"] = {"Wala"},
["lgm"] = {"Lega-Mwenga"},
["lgn"] = {"T'apo", "Opuuo"},
["lgq"] = {"Logba"},
["lgr"] = {"Lengo"},
["lgt"] = {"Pahi"},
["lgu"] = {"Longgu"},
["lgz"] = {"Ligenza"},
["lha"] = {"Laha (Viet Nam)"},
["lhh"] = {"Laha (Indonesia)"},
["lhi"] = {"Lahu Shi"},
["lhl"] = {"Lahul Lohar"},
["lhm"] = {"Lhomi"},
["lhn"] = {"Lahanan"},
["lhp"] = {"Lhokpu"},
["lhs"] = {"Mlahsö"},
["lht"] = {"Lo-Toga"},
["lhu"] = {"Lahu"},
["lia"] = {"West-Central Limba"},
["lib"] = {"Likum"},
["lic"] = {"Hlai"},
["lid"] = {"Nyindrou"},
["lie"] = {"Likila"},
["lif"] = {"Limbu"},
["lig"] = {"Ligbi"},
["lih"] = {"Lihir"},
["lij"] = {"Ligurian"},
["lik"] = {"Lika"},
["lil"] = {"Lillooet"},
["lio"] = {"Liki"},
["lip"] = {"Sekpele"},
["liq"] = {"Libido"},
["lir"] = {"Liberian English"},
["lis"] = {"Lisu"},
["liu"] = {"Logorik"},
["liv"] = {"Liv"},
["liw"] = {"Col"},
["lix"] = {"Liabuku"},
["liy"] = {"Banda-Bambari"},
["liz"] = {"Libinza"},
["lja"] = {"Golpa"},
["lje"] = {"Rampi"},
["lji"] = {"Laiyolo"},
["ljl"] = {"Li'o"},
["ljp"] = {"Lampung Api"},
["ljw"] = {"Yirandali"},
["ljx"] = {"Yuru"},
["lka"] = {"Lakalei"},
["lkb"] = {"Kabras", "Lukabaras"},
["lkc"] = {"Kucong"},
["lkd"] = {"Lakondê"},
["lke"] = {"Kenyi"},
["lkh"] = {"Lakha"},
["lki"] = {"Laki"},
["lkj"] = {"Remun"},
["lkl"] = {"Laeko-Libuat"},
["lkm"] = {"Kalaamaya"},
["lkn"] = {"Lakon", "Vure"},
["lko"] = {"Khayo", "Olukhayo"},
["lkr"] = {"Päri"},
["lks"] = {"Kisa", "Olushisa"},
["lkt"] = {"Lakota"},
["lku"] = {"Kungkari"},
["lky"] = {"Lokoya"},
["lla"] = {"Lala-Roba"},
["llb"] = {"Lolo"},
["llc"] = {"Lele (Guinea)"},
["lld"] = {"Ladin"},
["lle"] = {"Lele (Papua New Guinea)"},
["llf"] = {"Hermit"},
["llg"] = {"Lole"},
["llh"] = {"Lamu"},
["lli"] = {"Teke-Laali"},
["llj"] = {"Ladji Ladji"},
["llk"] = {"Lelak"},
["lll"] = {"Lilau"},
["llm"] = {"Lasalimu"},
["lln"] = {"Lele (Chad)"},
["llp"] = {"North Efate"},
["llq"] = {"Lolak"},
["lls"] = {"Lithuanian Sign Language"},
["llu"] = {"Lau"},
["llx"] = {"Lauan"},
["lma"] = {"East Limba"},
["lmb"] = {"Merei"},
["lmc"] = {"Limilngan"},
["lmd"] = {"Lumun"},
["lme"] = {"Pévé"},
["lmf"] = {"South Lembata"},
["lmg"] = {"Lamogai"},
["lmh"] = {"Lambichhong"},
["lmi"] = {"Lombi"},
["lmj"] = {"West Lembata"},
["lmk"] = {"Lamkang"},
["lml"] = {"Hano"},
["lmn"] = {"Lambadi"},
["lmo"] = {"Lombard"},
["lmp"] = {"Limbum"},
["lmq"] = {"Lamatuka"},
["lmr"] = {"Lamalera"},
["lmu"] = {"Lamenu"},
["lmv"] = {"Lomaiviti"},
["lmw"] = {"Lake Miwok"},
["lmx"] = {"Laimbue"},
["lmy"] = {"Lamboya"},
["lna"] = {"Langbashe"},
["lnb"] = {"Mbalanhu"},
["lnd"] = {"Lundayeh", "Lun Bawang"},
["lng"] = {"Langobardic"},
["lnh"] = {"Lanoh"},
["lni"] = {"Daantanai'"},
["lnj"] = {"Leningitij"},
["lnl"] = {"South Central Banda"},
["lnm"] = {"Langam"},
["lnn"] = {"Lorediakarkar"},
["lno"] = {"Lango (South Sudan)"},
["lns"] = {"Lamnso'"},
["lnu"] = {"Longuda"},
["lnw"] = {"Lanima"},
["lnz"] = {"Lonzo"},
["loa"] = {"Loloda"},
["lob"] = {"Lobi"},
["loc"] = {"Inonhan"},
["loe"] = {"Saluan"},
["lof"] = {"Logol"},
["log"] = {"Logo"},
["loh"] = {"Narim"},
["loi"] = {"Loma (Côte d'Ivoire)"},
["loj"] = {"Lou"},
["lok"] = {"Loko"},
["lol"] = {"Mongo"},
["lom"] = {"Loma (Liberia)"},
["lon"] = {"Malawi Lomwe"},
["loo"] = {"Lombo"},
["lop"] = {"Lopa"},
["loq"] = {"Lobala"},
["lor"] = {"Téén"},
["los"] = {"Loniu"},
["lot"] = {"Otuho"},
["lou"] = {"Louisiana Creole"},
["lov"] = {"Lopi"},
["low"] = {"Tampias Lobu"},
["lox"] = {"Loun"},
["loy"] = {"Loke"},
["loz"] = {"Lozi"},
["lpa"] = {"Lelepa"},
["lpe"] = {"Lepki"},
["lpn"] = {"Long Phuri Naga"},
["lpo"] = {"Lipo"},
["lpx"] = {"Lopit"},
["lra"] = {"Rara Bakati'"},
["lrc"] = {"Northern Luri"},
["lre"] = {"Laurentian"},
["lrg"] = {"Laragia"},
["lri"] = {"Marachi", "Olumarachi"},
["lrk"] = {"Loarki"},
["lrl"] = {"Lari"},
["lrm"] = {"Marama", "Olumarama"},
["lrn"] = {"Lorang"},
["lro"] = {"Laro"},
["lrr"] = {"Southern Yamphu"},
["lrt"] = {"Larantuka Malay"},
["lrv"] = {"Larevat"},
["lrz"] = {"Lemerig"},
["lsa"] = {"Lasgerdi"},
["lsd"] = {"Lishana Deni"},
["lse"] = {"Lusengo"},
["lsh"] = {"Lish"},
["lsi"] = {"Lashi"},
["lsl"] = {"Latvian Sign Language"},
["lsm"] = {"Saamia", "Olusamia"},
["lsn"] = {"Tibetan Sign Language"},
["lso"] = {"Laos Sign Language"},
["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"},
["lsr"] = {"Aruop"},
["lss"] = {"Lasi"},
["lst"] = {"Trinidad and Tobago Sign Language"},
["lsv"] = {"Sivia Sign Language"},
["lsy"] = {"Mauritian Sign Language"},
["ltc"] = {"Late Middle Chinese"},
["ltg"] = {"Latgalian"},
["lth"] = {"Thur"},
["lti"] = {"Leti (Indonesia)"},
["ltn"] = {"Latundê"},
["lto"] = {"Tsotso", "Olutsotso"},
["lts"] = {"Tachoni", "Lutachoni"},
["ltu"] = {"Latu"},
["lua"] = {"Luba-Lulua"},
["luc"] = {"Aringa"},
["lud"] = {"Ludian"},
["lue"] = {"Luvale"},
["luf"] = {"Laua"},
["lui"] = {"Luiseno"},
["luj"] = {"Luna"},
["luk"] = {"Lunanakha"},
["lul"] = {"Olu'bo"},
["lum"] = {"Luimbi"},
["lun"] = {"Lunda"},
["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"},
["lup"] = {"Lumbu"},
["luq"] = {"Lucumi"},
["lur"] = {"Laura"},
["lus"] = {"Lushai"},
["lut"] = {"Lushootseed"},
["luu"] = {"Lumba-Yakkha"},
["luv"] = {"Luwati"},
["luw"] = {"Luo (Cameroon)"},
["luy"] = {"Luyia", "Oluluyia"},
["luz"] = {"Southern Luri"},
["lva"] = {"Maku'a"},
["lvi"] = {"Lavi"},
["lvk"] = {"Lavukaleve"},
["lvs"] = {"Standard Latvian"},
["lvu"] = {"Levuka"},
["lwa"] = {"Lwalu"},
["lwe"] = {"Lewo Eleng"},
["lwg"] = {"Wanga", "Oluwanga"},
["lwh"] = {"White Lachi"},
["lwl"] = {"Eastern Lawa"},
["lwm"] = {"Laomian"},
["lwo"] = {"Luwo"},
["lws"] = {"Malawian Sign Language"},
["lwt"] = {"Lewotobi"},
["lwu"] = {"Lawu"},
["lww"] = {"Lewo"},
["lya"] = {"Layakha"},
["lyg"] = {"Lyngngam"},
["lyn"] = {"Luyana"},
["lzh"] = {"Literary Chinese"},
["lzl"] = {"Litzlitz"},
["lzn"] = {"Leinong Naga"},
["lzz"] = {"Laz"},
["maa"] = {"San Jerónimo Tecóatl Mazatec"},
["mab"] = {"Yutanduchi Mixtec"},
["mad"] = {"Madurese"},
["mae"] = {"Bo-Rukul"},
["maf"] = {"Mafa"},
["mag"] = {"Magahi"},
["mai"] = {"Maithili"},
["maj"] = {"Jalapa De Díaz Mazatec"},
["mak"] = {"Makasar"},
["mam"] = {"Mam"},
["man"] = {"Mandingo", "Manding"},
["map"] = {"Austronesian languages"},
["maq"] = {"Chiquihuitlán Mazatec"},
["mas"] = {"Masai"},
["mat"] = {"San Francisco Matlatzinca"},
["mau"] = {"Huautla Mazatec"},
["mav"] = {"Sateré-Mawé"},
["maw"] = {"Mampruli"},
["max"] = {"North Moluccan Malay"},
["maz"] = {"Central Mazahua"},
["mba"] = {"Higaonon"},
["mbb"] = {"Western Bukidnon Manobo"},
["mbc"] = {"Macushi"},
["mbd"] = {"Dibabawon Manobo"},
["mbe"] = {"Molale"},
["mbf"] = {"Baba Malay"},
["mbh"] = {"Mangseng"},
["mbi"] = {"Ilianen Manobo"},
["mbj"] = {"Nadëb"},
["mbk"] = {"Malol"},
["mbl"] = {"Maxakalí"},
["mbm"] = {"Ombamba"},
["mbn"] = {"Macaguán"},
["mbo"] = {"Mbo (Cameroon)"},
["mbp"] = {"Malayo"},
["mbq"] = {"Maisin"},
["mbr"] = {"Nukak Makú"},
["mbs"] = {"Sarangani Manobo"},
["mbt"] = {"Matigsalug Manobo"},
["mbu"] = {"Mbula-Bwazza"},
["mbv"] = {"Mbulungish"},
["mbw"] = {"Maring"},
["mbx"] = {"Mari (East Sepik Province)"},
["mby"] = {"Memoni"},
["mbz"] = {"Amoltepec Mixtec"},
["mca"] = {"Maca"},
["mcb"] = {"Machiguenga"},
["mcc"] = {"Bitur"},
["mcd"] = {"Sharanahua"},
["mce"] = {"Itundujia Mixtec"},
["mcf"] = {"Matsés"},
["mcg"] = {"Mapoyo"},
["mch"] = {"Maquiritari"},
["mci"] = {"Mese"},
["mcj"] = {"Mvanip"},
["mck"] = {"Mbunda"},
["mcl"] = {"Macaguaje"},
["mcm"] = {"Malaccan Creole Portuguese"},
["mcn"] = {"Masana"},
["mco"] = {"Coatlán Mixe"},
["mcp"] = {"Makaa"},
["mcq"] = {"Ese"},
["mcr"] = {"Menya"},
["mcs"] = {"Mambai"},
["mct"] = {"Mengisa"},
["mcu"] = {"Cameroon Mambila"},
["mcv"] = {"Minanibai"},
["mcw"] = {"Mawa (Chad)"},
["mcx"] = {"Mpiemo"},
["mcy"] = {"South Watut"},
["mcz"] = {"Mawan"},
["mda"] = {"Mada (Nigeria)"},
["mdb"] = {"Morigi"},
["mdc"] = {"Male (Papua New Guinea)"},
["mdd"] = {"Mbum"},
["mde"] = {"Maba (Chad)"},
["mdf"] = {"Moksha"},
["mdg"] = {"Massalat"},
["mdh"] = {"Maguindanaon"},
["mdi"] = {"Mamvu"},
["mdj"] = {"Mangbetu"},
["mdk"] = {"Mangbutu"},
["mdl"] = {"Maltese Sign Language"},
["mdm"] = {"Mayogo"},
["mdn"] = {"Mbati"},
["mdp"] = {"Mbala"},
["mdq"] = {"Mbole"},
["mdr"] = {"Mandar"},
["mds"] = {"Maria (Papua New Guinea)"},
["mdt"] = {"Mbere"},
["mdu"] = {"Mboko"},
["mdv"] = {"Santa Lucía Monteverde Mixtec"},
["mdw"] = {"Mbosi"},
["mdx"] = {"Dizin"},
["mdy"] = {"Male (Ethiopia)"},
["mdz"] = {"Suruí Do Pará"},
["mea"] = {"Menka"},
["meb"] = {"Ikobi"},
["mec"] = {"Marra"},
["med"] = {"Melpa"},
["mee"] = {"Mengen"},
["mef"] = {"Megam"},
["meh"] = {"Southwestern Tlaxiaco Mixtec"},
["mei"] = {"Midob"},
["mej"] = {"Meyah"},
["mek"] = {"Mekeo"},
["mel"] = {"Central Melanau"},
["mem"] = {"Mangala"},
["men"] = {"Mende (Sierra Leone)"},
["meo"] = {"Kedah Malay"},
["mep"] = {"Miriwoong"},
["meq"] = {"Merey"},
["mer"] = {"Meru"},
["mes"] = {"Masmaje"},
["met"] = {"Mato"},
["meu"] = {"Motu"},
["mev"] = {"Mano"},
["mew"] = {"Maaka"},
["mey"] = {"Hassaniyya"},
["mez"] = {"Menominee"},
["mfa"] = {"Pattani Malay"},
["mfb"] = {"Bangka"},
["mfc"] = {"Mba"},
["mfd"] = {"Mendankwe-Nkwen"},
["mfe"] = {"Morisyen"},
["mff"] = {"Naki"},
["mfg"] = {"Mogofin"},
["mfh"] = {"Matal"},
["mfi"] = {"Wandala"},
["mfj"] = {"Mefele"},
["mfk"] = {"North Mofu"},
["mfl"] = {"Putai"},
["mfm"] = {"Marghi South"},
["mfn"] = {"Cross River Mbembe"},
["mfo"] = {"Mbe"},
["mfp"] = {"Makassar Malay"},
["mfq"] = {"Moba"},
["mfr"] = {"Marrithiyel"},
["mfs"] = {"Mexican Sign Language"},
["mft"] = {"Mokerang"},
["mfu"] = {"Mbwela"},
["mfv"] = {"Mandjak"},
["mfw"] = {"Mulaha"},
["mfx"] = {"Melo"},
["mfy"] = {"Mayo"},
["mfz"] = {"Mabaan"},
["mga"] = {"Middle Irish (900-1200)"},
["mgb"] = {"Mararit"},
["mgc"] = {"Morokodo"},
["mgd"] = {"Moru"},
["mge"] = {"Mango"},
["mgf"] = {"Maklew"},
["mgg"] = {"Mpumpong"},
["mgh"] = {"Makhuwa-Meetto"},
["mgi"] = {"Lijili"},
["mgj"] = {"Abureni"},
["mgk"] = {"Mawes"},
["mgl"] = {"Maleu-Kilenge"},
["mgm"] = {"Mambae"},
["mgn"] = {"Mbangi"},
["mgo"] = {"Meta'"},
["mgp"] = {"Eastern Magar"},
["mgq"] = {"Malila"},
["mgr"] = {"Mambwe-Lungu"},
["mgs"] = {"Manda (Tanzania)"},
["mgt"] = {"Mongol"},
["mgu"] = {"Mailu"},
["mgv"] = {"Matengo"},
["mgw"] = {"Matumbi"},
["mgy"] = {"Mbunga"},
["mgz"] = {"Mbugwe"},
["mha"] = {"Manda (India)"},
["mhb"] = {"Mahongwe"},
["mhc"] = {"Mocho"},
["mhd"] = {"Mbugu"},
["mhe"] = {"Besisi", "Mah Meri"},
["mhf"] = {"Mamaa"},
["mhg"] = {"Margu"},
["mhi"] = {"Ma'di"},
["mhj"] = {"Mogholi"},
["mhk"] = {"Mungaka"},
["mhl"] = {"Mauwake"},
["mhm"] = {"Makhuwa-Moniga"},
["mhn"] = {"Mócheno"},
["mho"] = {"Mashi (Zambia)"},
["mhp"] = {"Balinese Malay"},
["mhq"] = {"Mandan"},
["mhr"] = {"Eastern Mari"},
["mhs"] = {"Buru (Indonesia)"},
["mht"] = {"Mandahuaca"},
["mhu"] = {"Digaro-Mishmi", "Darang Deng"},
["mhw"] = {"Mbukushu"},
["mhx"] = {"Maru", "Lhaovo"},
["mhy"] = {"Ma'anyan"},
["mhz"] = {"Mor (Mor Islands)"},
["mia"] = {"Miami"},
["mib"] = {"Atatláhuca Mixtec"},
["mic"] = {"Mi'kmaq", "Micmac"},
["mid"] = {"Mandaic"},
["mie"] = {"Ocotepec Mixtec"},
["mif"] = {"Mofu-Gudur"},
["mig"] = {"San Miguel El Grande Mixtec"},
["mih"] = {"Chayuco Mixtec"},
["mii"] = {"Chigmecatitlán Mixtec"},
["mij"] = {"Abar", "Mungbam"},
["mik"] = {"Mikasuki"},
["mil"] = {"Peñoles Mixtec"},
["mim"] = {"Alacatlatzala Mixtec"},
["min"] = {"Minangkabau"},
["mio"] = {"Pinotepa Nacional Mixtec"},
["mip"] = {"Apasco-Apoala Mixtec"},
["miq"] = {"Mískito"},
["mir"] = {"Isthmus Mixe"},
["mis"] = {"Uncoded languages"},
["mit"] = {"Southern Puebla Mixtec"},
["miu"] = {"Cacaloxtepec Mixtec"},
["miw"] = {"Akoye"},
["mix"] = {"Mixtepec Mixtec"},
["miy"] = {"Ayutla Mixtec"},
["miz"] = {"Coatzospan Mixtec"},
["mjb"] = {"Makalero"},
["mjc"] = {"San Juan Colorado Mixtec"},
["mjd"] = {"Northwest Maidu"},
["mje"] = {"Muskum"},
["mjg"] = {"Tu"},
["mjh"] = {"Mwera (Nyasa)"},
["mji"] = {"Kim Mun"},
["mjj"] = {"Mawak"},
["mjk"] = {"Matukar"},
["mjl"] = {"Mandeali"},
["mjm"] = {"Medebur"},
["mjn"] = {"Ma (Papua New Guinea)"},
["mjo"] = {"Malankuravan"},
["mjp"] = {"Malapandaram"},
["mjq"] = {"Malaryan"},
["mjr"] = {"Malavedan"},
["mjs"] = {"Miship"},
["mjt"] = {"Sauria Paharia"},
["mju"] = {"Manna-Dora"},
["mjv"] = {"Mannan"},
["mjw"] = {"Karbi"},
["mjx"] = {"Mahali"},
["mjy"] = {"Mahican"},
["mjz"] = {"Majhi"},
["mka"] = {"Mbre"},
["mkb"] = {"Mal Paharia"},
["mkc"] = {"Siliput"},
["mke"] = {"Mawchi"},
["mkf"] = {"Miya"},
["mkg"] = {"Mak (China)"},
["mkh"] = {"Mon-Khmer languages"},
["mki"] = {"Dhatki"},
["mkj"] = {"Mokilese"},
["mkk"] = {"Byep"},
["mkl"] = {"Mokole"},
["mkm"] = {"Moklen"},
["mkn"] = {"Kupang Malay"},
["mko"] = {"Mingang Doso"},
["mkp"] = {"Moikodi"},
["mkq"] = {"Bay Miwok"},
["mkr"] = {"Malas"},
["mks"] = {"Silacayoapan Mixtec"},
["mkt"] = {"Vamale"},
["mku"] = {"Konyanka Maninka"},
["mkv"] = {"Mafea"},
["mkw"] = {"Kituba (Congo)"},
["mkx"] = {"Kinamiging Manobo"},
["mky"] = {"East Makian"},
["mkz"] = {"Makasae"},
["mla"] = {"Malo"},
["mlb"] = {"Mbule"},
["mlc"] = {"Cao Lan"},
["mle"] = {"Manambu"},
["mlf"] = {"Mal"},
["mlh"] = {"Mape"},
["mli"] = {"Malimpung"},
["mlj"] = {"Miltu"},
["mlk"] = {"Ilwana", "Kiwilwana"},
["mll"] = {"Malua Bay"},
["mlm"] = {"Mulam"},
["mln"] = {"Malango"},
["mlo"] = {"Mlomp"},
["mlp"] = {"Bargam"},
["mlq"] = {"Western Maninkakan"},
["mlr"] = {"Vame"},
["mls"] = {"Masalit"},
["mlu"] = {"To'abaita"},
["mlv"] = {"Motlav", "Mwotlap"},
["mlw"] = {"Moloko"},
["mlx"] = {"Malfaxal", "Naha'ai"},
["mlz"] = {"Malaynon"},
["mma"] = {"Mama"},
["mmb"] = {"Momina"},
["mmc"] = {"Michoacán Mazahua"},
["mmd"] = {"Maonan"},
["mme"] = {"Mae"},
["mmf"] = {"Mundat"},
["mmg"] = {"North Ambrym"},
["mmh"] = {"Mehináku"},
["mmi"] = {"Musar"},
["mmj"] = {"Majhwar"},
["mmk"] = {"Mukha-Dora"},
["mml"] = {"Man Met"},
["mmm"] = {"Maii"},
["mmn"] = {"Mamanwa"},
["mmo"] = {"Mangga Buang"},
["mmp"] = {"Siawi"},
["mmq"] = {"Musak"},
["mmr"] = {"Western Xiangxi Miao"},
["mmt"] = {"Malalamai"},
["mmu"] = {"Mmaala"},
["mmv"] = {"Miriti"},
["mmw"] = {"Emae"},
["mmx"] = {"Madak"},
["mmy"] = {"Migaama"},
["mmz"] = {"Mabaale"},
["mna"] = {"Mbula"},
["mnb"] = {"Muna"},
["mnc"] = {"Manchu"},
["mnd"] = {"Mondé"},
["mne"] = {"Naba"},
["mnf"] = {"Mundani"},
["mng"] = {"Eastern Mnong"},
["mnh"] = {"Mono (Democratic Republic of Congo)"},
["mni"] = {"Manipuri"},
["mnj"] = {"Munji"},
["mnk"] = {"Mandinka"},
["mnl"] = {"Tiale"},
["mnm"] = {"Mapena"},
["mnn"] = {"Southern Mnong"},
["mno"] = {"Manobo languages"},
["mnp"] = {"Min Bei Chinese"},
["mnq"] = {"Minriq"},
["mnr"] = {"Mono (USA)"},
["mns"] = {"Mansi"},
["mnu"] = {"Mer"},
["mnv"] = {"Rennell-Bellona"},
["mnw"] = {"Mon"},
["mnx"] = {"Manikion"},
["mny"] = {"Manyawa"},
["mnz"] = {"Moni"},
["moa"] = {"Mwan"},
["moc"] = {"Mocoví"},
["mod"] = {"Mobilian"},
["moe"] = {"Innu", "Montagnais"},
["mog"] = {"Mongondow"},
["moh"] = {"Mohawk"},
["moi"] = {"Mboi"},
["moj"] = {"Monzombo"},
["mok"] = {"Morori"},
["mom"] = {"Mangue"},
["moo"] = {"Monom"},
["mop"] = {"Mopán Maya"},
["moq"] = {"Mor (Bomberai Peninsula)"},
["mor"] = {"Moro"},
["mos"] = {"Mossi"},
["mot"] = {"Barí"},
["mou"] = {"Mogum"},
["mov"] = {"Mohave"},
["mow"] = {"Moi (Congo)"},
["mox"] = {"Molima"},
["moy"] = {"Shekkacho"},
["moz"] = {"Mukulu", "Gergiko"},
["mpa"] = {"Mpoto"},
["mpb"] = {"Malak Malak", "Mullukmulluk"},
["mpc"] = {"Mangarrayi"},
["mpd"] = {"Machinere"},
["mpe"] = {"Majang"},
["mpg"] = {"Marba"},
["mph"] = {"Maung"},
["mpi"] = {"Mpade"},
["mpj"] = {"Martu Wangka", "Wangkajunga"},
["mpk"] = {"Mbara (Chad)"},
["mpl"] = {"Middle Watut"},
["mpm"] = {"Yosondúa Mixtec"},
["mpn"] = {"Mindiri"},
["mpo"] = {"Miu"},
["mpp"] = {"Migabac"},
["mpq"] = {"Matís"},
["mpr"] = {"Vangunu"},
["mps"] = {"Dadibi"},
["mpt"] = {"Mian"},
["mpu"] = {"Makuráp"},
["mpv"] = {"Mungkip"},
["mpw"] = {"Mapidian"},
["mpx"] = {"Misima-Panaeati"},
["mpy"] = {"Mapia"},
["mpz"] = {"Mpi"},
["mqa"] = {"Maba (Indonesia)"},
["mqb"] = {"Mbuko"},
["mqc"] = {"Mangole"},
["mqe"] = {"Matepi"},
["mqf"] = {"Momuna"},
["mqg"] = {"Kota Bangun Kutai Malay"},
["mqh"] = {"Tlazoyaltepec Mixtec"},
["mqi"] = {"Mariri"},
["mqj"] = {"Mamasa"},
["mqk"] = {"Rajah Kabunsuwan Manobo"},
["mql"] = {"Mbelime"},
["mqm"] = {"South Marquesan"},
["mqn"] = {"Moronene"},
["mqo"] = {"Modole"},
["mqp"] = {"Manipa"},
["mqq"] = {"Minokok"},
["mqr"] = {"Mander"},
["mqs"] = {"West Makian"},
["mqt"] = {"Mok"},
["mqu"] = {"Mandari"},
["mqv"] = {"Mosimo"},
["mqw"] = {"Murupi"},
["mqx"] = {"Mamuju"},
["mqy"] = {"Manggarai"},
["mqz"] = {"Pano"},
["mra"] = {"Mlabri"},
["mrb"] = {"Marino"},
["mrc"] = {"Maricopa"},
["mrd"] = {"Western Magar"},
["mre"] = {"Martha's Vineyard Sign Language"},
["mrf"] = {"Elseng"},
["mrg"] = {"Mising"},
["mrh"] = {"Mara Chin"},
["mrj"] = {"Western Mari"},
["mrk"] = {"Hmwaveke"},
["mrl"] = {"Mortlockese"},
["mrm"] = {"Merlav", "Mwerlap"},
["mrn"] = {"Cheke Holo"},
["mro"] = {"Mru"},
["mrp"] = {"Morouas"},
["mrq"] = {"North Marquesan"},
["mrr"] = {"Maria (India)"},
["mrs"] = {"Maragus"},
["mrt"] = {"Marghi Central"},
["mru"] = {"Mono (Cameroon)"},
["mrv"] = {"Mangareva"},
["mrw"] = {"Maranao"},
["mrx"] = {"Maremgi", "Dineor"},
["mry"] = {"Mandaya"},
["mrz"] = {"Marind"},
["msb"] = {"Masbatenyo"},
["msc"] = {"Sankaran Maninka"},
["msd"] = {"Yucatec Maya Sign Language"},
["mse"] = {"Musey"},
["msf"] = {"Mekwei"},
["msg"] = {"Moraid"},
["msh"] = {"Masikoro Malagasy"},
["msi"] = {"Sabah Malay"},
["msj"] = {"Ma (Democratic Republic of Congo)"},
["msk"] = {"Mansaka"},
["msl"] = {"Molof", "Poule"},
["msm"] = {"Agusan Manobo"},
["msn"] = {"Vurës"},
["mso"] = {"Mombum"},
["msp"] = {"Maritsauá"},
["msq"] = {"Caac"},
["msr"] = {"Mongolian Sign Language"},
["mss"] = {"West Masela"},
["msu"] = {"Musom"},
["msv"] = {"Maslam"},
["msw"] = {"Mansoanka"},
["msx"] = {"Moresada"},
["msy"] = {"Aruamu"},
["msz"] = {"Momare"},
["mta"] = {"Cotabato Manobo"},
["mtb"] = {"Anyin Morofo"},
["mtc"] = {"Munit"},
["mtd"] = {"Mualang"},
["mte"] = {"Mono (Solomon Islands)"},
["mtf"] = {"Murik (Papua New Guinea)"},
["mtg"] = {"Una"},
["mth"] = {"Munggui"},
["mti"] = {"Maiwa (Papua New Guinea)"},
["mtj"] = {"Moskona"},
["mtk"] = {"Mbe'"},
["mtl"] = {"Montol"},
["mtm"] = {"Mator"},
["mtn"] = {"Matagalpa"},
["mto"] = {"Totontepec Mixe"},
["mtp"] = {"Wichí Lhamtés Nocten"},
["mtq"] = {"Muong"},
["mtr"] = {"Mewari"},
["mts"] = {"Yora"},
["mtt"] = {"Mota"},
["mtu"] = {"Tututepec Mixtec"},
["mtv"] = {"Asaro'o"},
["mtw"] = {"Southern Binukidnon"},
["mtx"] = {"Tidaá Mixtec"},
["mty"] = {"Nabi"},
["mua"] = {"Mundang"},
["mub"] = {"Mubi"},
["muc"] = {"Ajumbu"},
["mud"] = {"Mednyj Aleut"},
["mue"] = {"Media Lengua"},
["mug"] = {"Musgu"},
["muh"] = {"Mündü"},
["mui"] = {"Musi"},
["muj"] = {"Mabire"},
["muk"] = {"Mugom"},
["mul"] = {"Multiple languages"},
["mum"] = {"Maiwala"},
["mun"] = {"Munda languages"},
["muo"] = {"Nyong"},
["mup"] = {"Malvi"},
["muq"] = {"Eastern Xiangxi Miao"},
["mur"] = {"Murle"},
["mus"] = {"Creek"},
["mut"] = {"Western Muria"},
["muu"] = {"Yaaku"},
["muv"] = {"Muthuvan"},
["mux"] = {"Bo-Ung"},
["muy"] = {"Muyang"},
["muz"] = {"Mursi"},
["mva"] = {"Manam"},
["mvb"] = {"Mattole"},
["mvd"] = {"Mamboru"},
["mve"] = {"Marwari (Pakistan)"},
["mvf"] = {"Peripheral Mongolian"},
["mvg"] = {"Yucuañe Mixtec"},
["mvh"] = {"Mulgi"},
["mvi"] = {"Miyako"},
["mvk"] = {"Mekmek"},
["mvl"] = {"Mbara (Australia)"},
["mvm"] = {"Muya"},
["mvn"] = {"Minaveha"},
["mvo"] = {"Marovo"},
["mvp"] = {"Duri"},
["mvq"] = {"Moere"},
["mvr"] = {"Marau"},
["mvs"] = {"Massep"},
["mvt"] = {"Mpotovoro"},
["mvu"] = {"Marfa"},
["mvv"] = {"Tagal Murut"},
["mvw"] = {"Machinga"},
["mvx"] = {"Meoswar"},
["mvy"] = {"Indus Kohistani"},
["mvz"] = {"Mesqan"},
["mwa"] = {"Mwatebu"},
["mwb"] = {"Juwal"},
["mwc"] = {"Are"},
["mwe"] = {"Mwera (Chimwera)"},
["mwf"] = {"Murrinh-Patha"},
["mwg"] = {"Aiklep"},
["mwh"] = {"Mouk-Aria"},
["mwi"] = {"Labo", "Ninde"},
["mwk"] = {"Kita Maninkakan"},
["mwl"] = {"Mirandese"},
["mwm"] = {"Sar"},
["mwn"] = {"Nyamwanga"},
["mwo"] = {"Central Maewo"},
["mwp"] = {"Kala Lagaw Ya"},
["mwq"] = {"Mün Chin"},
["mwr"] = {"Marwari"},
["mws"] = {"Mwimbi-Muthambi"},
["mwt"] = {"Moken"},
["mwu"] = {"Mittu"},
["mwv"] = {"Mentawai"},
["mww"] = {"Hmong Daw"},
["mwz"] = {"Moingi"},
["mxa"] = {"Northwest Oaxaca Mixtec"},
["mxb"] = {"Tezoatlán Mixtec"},
["mxc"] = {"Manyika"},
["mxd"] = {"Modang"},
["mxe"] = {"Mele-Fila"},
["mxf"] = {"Malgbe"},
["mxg"] = {"Mbangala"},
["mxh"] = {"Mvuba"},
["mxi"] = {"Mozarabic"},
["mxj"] = {"Miju-Mishmi", "Geman Deng"},
["mxk"] = {"Monumbo"},
["mxl"] = {"Maxi Gbe"},
["mxm"] = {"Meramera"},
["mxn"] = {"Moi (Indonesia)"},
["mxo"] = {"Mbowe"},
["mxp"] = {"Tlahuitoltepec Mixe"},
["mxq"] = {"Juquila Mixe"},
["mxr"] = {"Murik (Malaysia)"},
["mxs"] = {"Huitepec Mixtec"},
["mxt"] = {"Jamiltepec Mixtec"},
["mxu"] = {"Mada (Cameroon)"},
["mxv"] = {"Metlatónoc Mixtec"},
["mxw"] = {"Namo"},
["mxx"] = {"Mahou", "Mawukakan"},
["mxy"] = {"Southeastern Nochixtlán Mixtec"},
["mxz"] = {"Central Masela"},
["myb"] = {"Mbay"},
["myc"] = {"Mayeka"},
["mye"] = {"Myene"},
["myf"] = {"Bambassi"},
["myg"] = {"Manta"},
["myh"] = {"Makah"},
["myj"] = {"Mangayat"},
["myk"] = {"Mamara Senoufo"},
["myl"] = {"Moma"},
["mym"] = {"Me'en"},
["myn"] = {"Mayan languages"},
["myo"] = {"Anfillo"},
["myp"] = {"Pirahã"},
["myr"] = {"Muniche"},
["mys"] = {"Mesmes"},
["myu"] = {"Mundurukú"},
["myv"] = {"Erzya"},
["myw"] = {"Muyuw"},
["myx"] = {"Masaaba"},
["myy"] = {"Macuna"},
["myz"] = {"Classical Mandaic"},
["mza"] = {"Santa María Zacatepec Mixtec"},
["mzb"] = {"Tumzabt"},
["mzc"] = {"Madagascar Sign Language"},
["mzd"] = {"Malimba"},
["mze"] = {"Morawa"},
["mzg"] = {"Monastic Sign Language"},
["mzh"] = {"Wichí Lhamtés Güisnay"},
["mzi"] = {"Ixcatlán Mazatec"},
["mzj"] = {"Manya"},
["mzk"] = {"Nigeria Mambila"},
["mzl"] = {"Mazatlán Mixe"},
["mzm"] = {"Mumuye"},
["mzn"] = {"Mazanderani"},
["mzo"] = {"Matipuhy"},
["mzp"] = {"Movima"},
["mzq"] = {"Mori Atas"},
["mzr"] = {"Marúbo"},
["mzs"] = {"Macanese"},
["mzt"] = {"Mintil"},
["mzu"] = {"Inapang"},
["mzv"] = {"Manza"},
["mzw"] = {"Deg"},
["mzx"] = {"Mawayana"},
["mzy"] = {"Mozambican Sign Language"},
["mzz"] = {"Maiadomu"},
["naa"] = {"Namla"},
["nab"] = {"Southern Nambikuára"},
["nac"] = {"Narak"},
["nae"] = {"Naka'ela"},
["naf"] = {"Nabak"},
["nag"] = {"Naga Pidgin"},
["nah"] = {"Nahuatl languages"},
["nai"] = {"North American Indian languages"},
["naj"] = {"Nalu"},
["nak"] = {"Nakanai"},
["nal"] = {"Nalik"},
["nam"] = {"Ngan'gityemerri"},
["nan"] = {"Min Nan Chinese"},
["nao"] = {"Naaba"},
["nap"] = {"Neapolitan"},
["naq"] = {"Khoekhoe", "Nama (Namibia)"},
["nar"] = {"Iguta"},
["nas"] = {"Naasioi"},
["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"},
["naw"] = {"Nawuri"},
["nax"] = {"Nakwi"},
["nay"] = {"Ngarrindjeri"},
["naz"] = {"Coatepec Nahuatl"},
["nba"] = {"Nyemba"},
["nbb"] = {"Ndoe"},
["nbc"] = {"Chang Naga"},
["nbd"] = {"Ngbinda"},
["nbe"] = {"Konyak Naga"},
["nbg"] = {"Nagarchal"},
["nbh"] = {"Ngamo"},
["nbi"] = {"Mao Naga"},
["nbj"] = {"Ngarinyman"},
["nbk"] = {"Nake"},
["nbm"] = {"Ngbaka Ma'bo"},
["nbn"] = {"Kuri"},
["nbo"] = {"Nkukoli"},
["nbp"] = {"Nnam"},
["nbq"] = {"Nggem"},
["nbr"] = {"Numana"},
["nbs"] = {"Namibian Sign Language"},
["nbt"] = {"Na"},
["nbu"] = {"Rongmei Naga"},
["nbv"] = {"Ngamambo"},
["nbw"] = {"Southern Ngbandi"},
["nby"] = {"Ningera"},
["nca"] = {"Iyo"},
["ncb"] = {"Central Nicobarese"},
["ncc"] = {"Ponam"},
["ncd"] = {"Nachering"},
["nce"] = {"Yale"},
["ncf"] = {"Notsi"},
["ncg"] = {"Nisga'a"},
["nch"] = {"Central Huasteca Nahuatl"},
["nci"] = {"Classical Nahuatl"},
["ncj"] = {"Northern Puebla Nahuatl"},
["nck"] = {"Na-kara"},
["ncl"] = {"Michoacán Nahuatl"},
["ncm"] = {"Nambo"},
["ncn"] = {"Nauna"},
["nco"] = {"Sibe"},
["ncq"] = {"Northern Katang"},
["ncr"] = {"Ncane"},
["ncs"] = {"Nicaraguan Sign Language"},
["nct"] = {"Chothe Naga"},
["ncu"] = {"Chumburung"},
["ncx"] = {"Central Puebla Nahuatl"},
["ncz"] = {"Natchez"},
["nda"] = {"Ndasa"},
["ndb"] = {"Kenswei Nsei"},
["ndc"] = {"Ndau"},
["ndd"] = {"Nde-Nsele-Nta"},
["ndf"] = {"Nadruvian"},
["ndg"] = {"Ndengereko"},
["ndh"] = {"Ndali"},
["ndi"] = {"Samba Leko"},
["ndj"] = {"Ndamba"},
["ndk"] = {"Ndaka"},
["ndl"] = {"Ndolo"},
["ndm"] = {"Ndam"},
["ndn"] = {"Ngundi"},
["ndp"] = {"Ndo"},
["ndq"] = {"Ndombe"},
["ndr"] = {"Ndoola"},
["nds"] = {"Low German", "Low Saxon"},
["ndt"] = {"Ndunga"},
["ndu"] = {"Dugun"},
["ndv"] = {"Ndut"},
["ndw"] = {"Ndobo"},
["ndx"] = {"Nduga"},
["ndy"] = {"Lutos"},
["ndz"] = {"Ndogo"},
["nea"] = {"Eastern Ngad'a"},
["neb"] = {"Toura (Côte d'Ivoire)"},
["nec"] = {"Nedebang"},
["ned"] = {"Nde-Gbite"},
["nee"] = {"Nêlêmwa-Nixumwak"},
["nef"] = {"Nefamese"},
["neg"] = {"Negidal"},
["neh"] = {"Nyenkha"},
["nei"] = {"Neo-Hittite"},
["nej"] = {"Neko"},
["nek"] = {"Neku"},
["nem"] = {"Nemi"},
["nen"] = {"Nengone"},
["neo"] = {"Ná-Meo"},
["neq"] = {"North Central Mixe"},
["ner"] = {"Yahadian"},
["nes"] = {"Bhoti Kinnauri"},
["net"] = {"Nete"},
["neu"] = {"Neo"},
["nev"] = {"Nyaheun"},
["new"] = {"Newari", "Nepal Bhasa"},
["nex"] = {"Neme"},
["ney"] = {"Neyo"},
["nez"] = {"Nez Perce"},
["nfa"] = {"Dhao"},
["nfd"] = {"Ahwai"},
["nfl"] = {"Ayiwo", "Äiwoo"},
["nfr"] = {"Nafaanra"},
["nfu"] = {"Mfumte"},
["nga"] = {"Ngbaka"},
["ngb"] = {"Northern Ngbandi"},
["ngc"] = {"Ngombe (Democratic Republic of Congo)"},
["ngd"] = {"Ngando (Central African Republic)"},
["nge"] = {"Ngemba"},
["ngf"] = {"Trans-New Guinea languages"},
["ngg"] = {"Ngbaka Manza"},
["ngh"] = {"Nǁng"},
["ngi"] = {"Ngizim"},
["ngj"] = {"Ngie"},
["ngk"] = {"Dalabon"},
["ngl"] = {"Lomwe"},
["ngm"] = {"Ngatik Men's Creole"},
["ngn"] = {"Ngwo"},
["ngo"] = {"Ngoni"},
["ngp"] = {"Ngulu"},
["ngq"] = {"Ngurimi", "Ngoreme"},
["ngr"] = {"Engdewu"},
["ngs"] = {"Gvoko"},
["ngt"] = {"Kriang", "Ngeq"},
["ngu"] = {"Guerrero Nahuatl"},
["ngv"] = {"Nagumi"},
["ngw"] = {"Ngwaba"},
["ngx"] = {"Nggwahyi"},
["ngy"] = {"Tibea"},
["ngz"] = {"Ngungwel"},
["nha"] = {"Nhanda"},
["nhb"] = {"Beng"},
["nhc"] = {"Tabasco Nahuatl"},
["nhd"] = {"Chiripá", "Ava Guaraní"},
["nhe"] = {"Eastern Huasteca Nahuatl"},
["nhf"] = {"Nhuwala"},
["nhg"] = {"Tetelcingo Nahuatl"},
["nhh"] = {"Nahari"},
["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"},
["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"},
["nhm"] = {"Morelos Nahuatl"},
["nhn"] = {"Central Nahuatl"},
["nho"] = {"Takuu"},
["nhp"] = {"Isthmus-Pajapan Nahuatl"},
["nhq"] = {"Huaxcaleca Nahuatl"},
["nhr"] = {"Naro"},
["nht"] = {"Ometepec Nahuatl"},
["nhu"] = {"Noone"},
["nhv"] = {"Temascaltepec Nahuatl"},
["nhw"] = {"Western Huasteca Nahuatl"},
["nhx"] = {"Isthmus-Mecayapan Nahuatl"},
["nhy"] = {"Northern Oaxaca Nahuatl"},
["nhz"] = {"Santa María La Alta Nahuatl"},
["nia"] = {"Nias"},
["nib"] = {"Nakame"},
["nic"] = {"Niger-Kordofanian languages"},
["nid"] = {"Ngandi"},
["nie"] = {"Niellim"},
["nif"] = {"Nek"},
["nig"] = {"Ngalakgan"},
["nih"] = {"Nyiha (Tanzania)"},
["nii"] = {"Nii"},
["nij"] = {"Ngaju"},
["nik"] = {"Southern Nicobarese"},
["nil"] = {"Nila"},
["nim"] = {"Nilamba"},
["nin"] = {"Ninzo"},
["nio"] = {"Nganasan"},
["niq"] = {"Nandi"},
["nir"] = {"Nimboran"},
["nis"] = {"Nimi"},
["nit"] = {"Southeastern Kolami"},
["niu"] = {"Niuean"},
["niv"] = {"Gilyak"},
["niw"] = {"Nimo"},
["nix"] = {"Hema"},
["niy"] = {"Ngiti"},
["niz"] = {"Ningil"},
["nja"] = {"Nzanyi"},
["njb"] = {"Nocte Naga"},
["njd"] = {"Ndonde Hamba"},
["njh"] = {"Lotha Naga"},
["nji"] = {"Gudanji"},
["njj"] = {"Njen"},
["njl"] = {"Njalgulgule"},
["njm"] = {"Angami Naga"},
["njn"] = {"Liangmai Naga"},
["njo"] = {"Ao Naga"},
["njr"] = {"Njerep"},
["njs"] = {"Nisa"},
["njt"] = {"Ndyuka-Trio Pidgin"},
["nju"] = {"Ngadjunmaya"},
["njx"] = {"Kunyi"},
["njy"] = {"Njyem"},
["njz"] = {"Nyishi"},
["nka"] = {"Nkoya"},
["nkb"] = {"Khoibu Naga"},
["nkc"] = {"Nkongho"},
["nkd"] = {"Koireng"},
["nke"] = {"Duke"},
["nkf"] = {"Inpui Naga"},
["nkg"] = {"Nekgini"},
["nkh"] = {"Khezha Naga"},
["nki"] = {"Thangal Naga"},
["nkj"] = {"Nakai"},
["nkk"] = {"Nokuku"},
["nkm"] = {"Namat"},
["nkn"] = {"Nkangala"},
["nko"] = {"Nkonya"},
["nkp"] = {"Niuatoputapu"},
["nkq"] = {"Nkami"},
["nkr"] = {"Nukuoro"},
["nks"] = {"North Asmat"},
["nkt"] = {"Nyika (Tanzania)"},
["nku"] = {"Bouna Kulango"},
["nkv"] = {"Nyika (Malawi and Zambia)"},
["nkw"] = {"Nkutu"},
["nkx"] = {"Nkoroo"},
["nkz"] = {"Nkari"},
["nla"] = {"Ngombale"},
["nlc"] = {"Nalca"},
["nle"] = {"East Nyala"},
["nlg"] = {"Gela"},
["nli"] = {"Grangali"},
["nlj"] = {"Nyali"},
["nlk"] = {"Ninia Yali"},
["nll"] = {"Nihali"},
["nlm"] = {"Mankiyali"},
["nlo"] = {"Ngul"},
["nlq"] = {"Lao Naga"},
["nlu"] = {"Nchumbulu"},
["nlv"] = {"Orizaba Nahuatl"},
["nlw"] = {"Walangama"},
["nlx"] = {"Nahali"},
["nly"] = {"Nyamal"},
["nlz"] = {"Nalögo"},
["nma"] = {"Maram Naga"},
["nmb"] = {"Big Nambas", "V'ënen Taut"},
["nmc"] = {"Ngam"},
["nmd"] = {"Ndumu"},
["nme"] = {"Mzieme Naga"},
["nmf"] = {"Tangkhul Naga (India)"},
["nmg"] = {"Kwasio"},
["nmh"] = {"Monsang Naga"},
["nmi"] = {"Nyam"},
["nmj"] = {"Ngombe (Central African Republic)"},
["nmk"] = {"Namakura"},
["nml"] = {"Ndemli"},
["nmm"] = {"Manangba"},
["nmn"] = {"ǃXóõ"},
["nmo"] = {"Moyon Naga"},
["nmp"] = {"Nimanbur"},
["nmq"] = {"Nambya"},
["nmr"] = {"Nimbari"},
["nms"] = {"Letemboi"},
["nmt"] = {"Namonuito"},
["nmu"] = {"Northeast Maidu"},
["nmv"] = {"Ngamini"},
["nmw"] = {"Nimoa", "Rifao"},
["nmx"] = {"Nama (Papua New Guinea)"},
["nmy"] = {"Namuyi"},
["nmz"] = {"Nawdm"},
["nna"] = {"Nyangumarta"},
["nnb"] = {"Nande"},
["nnc"] = {"Nancere"},
["nnd"] = {"West Ambae"},
["nne"] = {"Ngandyera"},
["nnf"] = {"Ngaing"},
["nng"] = {"Maring Naga"},
["nnh"] = {"Ngiemboon"},
["nni"] = {"North Nuaulu"},
["nnj"] = {"Nyangatom"},
["nnk"] = {"Nankina"},
["nnl"] = {"Northern Rengma Naga"},
["nnm"] = {"Namia"},
["nnn"] = {"Ngete"},
["nnp"] = {"Wancho Naga"},
["nnq"] = {"Ngindo"},
["nnr"] = {"Narungga"},
["nnt"] = {"Nanticoke"},
["nnu"] = {"Dwang"},
["nnv"] = {"Nugunu (Australia)"},
["nnw"] = {"Southern Nuni"},
["nny"] = {"Nyangga"},
["nnz"] = {"Nda'nda'"},
["noa"] = {"Woun Meu"},
["noc"] = {"Nuk"},
["nod"] = {"Northern Thai"},
["noe"] = {"Nimadi"},
["nof"] = {"Nomane"},
["nog"] = {"Nogai"},
["noh"] = {"Nomu"},
["noi"] = {"Noiri"},
["noj"] = {"Nonuya"},
["nok"] = {"Nooksack"},
["nol"] = {"Nomlaki"},
["nom"] = {"Nocamán"},
["non"] = {"Old Norse"},
["nop"] = {"Numanggang"},
["noq"] = {"Ngongo"},
["nos"] = {"Eastern Nisu"},
["not"] = {"Nomatsiguenga"},
["nou"] = {"Ewage-Notu"},
["nov"] = {"Novial"},
["now"] = {"Nyambo"},
["noy"] = {"Noy"},
["noz"] = {"Nayi"},
["npa"] = {"Nar Phu"},
["npb"] = {"Nupbikha"},
["npg"] = {"Ponyo-Gongwang Naga"},
["nph"] = {"Phom Naga"},
["npi"] = {"Nepali (individual language)"},
["npl"] = {"Southeastern Puebla Nahuatl"},
["npn"] = {"Mondropolon"},
["npo"] = {"Pochuri Naga"},
["nps"] = {"Nipsan"},
["npu"] = {"Puimei Naga"},
["npx"] = {"Noipx"},
["npy"] = {"Napu"},
["nqg"] = {"Southern Nago"},
["nqk"] = {"Kura Ede Nago"},
["nql"] = {"Ngendelengo"},
["nqm"] = {"Ndom"},
["nqn"] = {"Nen"},
["nqo"] = {"N'Ko", "N’Ko"},
["nqq"] = {"Kyan-Karyaw Naga"},
["nqy"] = {"Akyaung Ari Naga"},
["nra"] = {"Ngom"},
["nrb"] = {"Nara"},
["nrc"] = {"Noric"},
["nre"] = {"Southern Rengma Naga"},
["nrf"] = {"Jèrriais", "Guernésiais"},
["nrg"] = {"Narango"},
["nri"] = {"Chokri Naga"},
["nrk"] = {"Ngarla"},
["nrl"] = {"Ngarluma"},
["nrm"] = {"Narom"},
["nrn"] = {"Norn"},
["nrp"] = {"North Picene"},
["nrr"] = {"Norra", "Nora"},
["nrt"] = {"Northern Kalapuya"},
["nru"] = {"Narua"},
["nrx"] = {"Ngurmbur"},
["nrz"] = {"Lala"},
["nsa"] = {"Sangtam Naga"},
["nsb"] = {"Lower Nossob"},
["nsc"] = {"Nshi"},
["nsd"] = {"Southern Nisu"},
["nse"] = {"Nsenga"},
["nsf"] = {"Northwestern Nisu"},
["nsg"] = {"Ngasa"},
["nsh"] = {"Ngoshie"},
["nsi"] = {"Nigerian Sign Language"},
["nsk"] = {"Naskapi"},
["nsl"] = {"Norwegian Sign Language"},
["nsm"] = {"Sumi Naga"},
["nsn"] = {"Nehan"},
["nso"] = {"Pedi", "Northern Sotho", "Sepedi"},
["nsp"] = {"Nepalese Sign Language"},
["nsq"] = {"Northern Sierra Miwok"},
["nsr"] = {"Maritime Sign Language"},
["nss"] = {"Nali"},
["nst"] = {"Tase Naga"},
["nsu"] = {"Sierra Negra Nahuatl"},
["nsv"] = {"Southwestern Nisu"},
["nsw"] = {"Navut"},
["nsx"] = {"Nsongo"},
["nsy"] = {"Nasal"},
["nsz"] = {"Nisenan"},
["ntd"] = {"Northern Tidung"},
["nte"] = {"Nathembo"},
["ntg"] = {"Ngantangarra"},
["nti"] = {"Natioro"},
["ntj"] = {"Ngaanyatjarra"},
["ntk"] = {"Ikoma-Nata-Isenye"},
["ntm"] = {"Nateni"},
["nto"] = {"Ntomba"},
["ntp"] = {"Northern Tepehuan"},
["ntr"] = {"Delo"},
["ntu"] = {"Natügu"},
["ntw"] = {"Nottoway"},
["ntx"] = {"Tangkhul Naga (Myanmar)"},
["nty"] = {"Mantsi"},
["ntz"] = {"Natanzi"},
["nua"] = {"Yuanga"},
["nub"] = {"Nubian languages"},
["nuc"] = {"Nukuini"},
["nud"] = {"Ngala"},
["nue"] = {"Ngundu"},
["nuf"] = {"Nusu"},
["nug"] = {"Nungali"},
["nuh"] = {"Ndunda"},
["nui"] = {"Ngumbi"},
["nuj"] = {"Nyole"},
["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"},
["nul"] = {"Nusa Laut"},
["num"] = {"Niuafo'ou"},
["nun"] = {"Anong"},
["nuo"] = {"Nguôn"},
["nup"] = {"Nupe-Nupe-Tako"},
["nuq"] = {"Nukumanu"},
["nur"] = {"Nukuria"},
["nus"] = {"Nuer"},
["nut"] = {"Nung (Viet Nam)"},
["nuu"] = {"Ngbundu"},
["nuv"] = {"Northern Nuni"},
["nuw"] = {"Nguluwan"},
["nux"] = {"Mehek"},
["nuy"] = {"Nunggubuyu"},
["nuz"] = {"Tlamacazapa Nahuatl"},
["nvh"] = {"Nasarian"},
["nvm"] = {"Namiae"},
["nvo"] = {"Nyokon"},
["nwa"] = {"Nawathinehena"},
["nwb"] = {"Nyabwa"},
["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"},
["nwe"] = {"Ngwe"},
["nwg"] = {"Ngayawung"},
["nwi"] = {"Southwest Tanna"},
["nwm"] = {"Nyamusa-Molo"},
["nwo"] = {"Nauo"},
["nwr"] = {"Nawaru"},
["nwx"] = {"Middle Newar"},
["nwy"] = {"Nottoway-Meherrin"},
["nxa"] = {"Nauete"},
["nxd"] = {"Ngando (Democratic Republic of Congo)"},
["nxe"] = {"Nage"},
["nxg"] = {"Ngad'a"},
["nxi"] = {"Nindi"},
["nxk"] = {"Koki Naga"},
["nxl"] = {"South Nuaulu"},
["nxm"] = {"Numidian"},
["nxn"] = {"Ngawun"},
["nxo"] = {"Ndambomo"},
["nxq"] = {"Naxi"},
["nxr"] = {"Ninggerum"},
["nxx"] = {"Nafri"},
["nyb"] = {"Nyangbo"},
["nyc"] = {"Nyanga-li"},
["nyd"] = {"Nyore", "Olunyole"},
["nye"] = {"Nyengo"},
["nyf"] = {"Giryama", "Kigiryama"},
["nyg"] = {"Nyindu"},
["nyh"] = {"Nyikina"},
["nyi"] = {"Ama (Sudan)"},
["nyj"] = {"Nyanga"},
["nyk"] = {"Nyaneka"},
["nyl"] = {"Nyeu"},
["nym"] = {"Nyamwezi"},
["nyn"] = {"Nyankole"},
["nyo"] = {"Nyoro"},
["nyp"] = {"Nyang'i"},
["nyq"] = {"Nayini"},
["nyr"] = {"Nyiha (Malawi)"},
["nys"] = {"Nyungar"},
["nyt"] = {"Nyawaygi"},
["nyu"] = {"Nyungwe"},
["nyv"] = {"Nyulnyul"},
["nyw"] = {"Nyaw"},
["nyx"] = {"Nganyaywana"},
["nyy"] = {"Nyakyusa-Ngonde"},
["nza"] = {"Tigon Mbembe"},
["nzb"] = {"Njebi"},
["nzd"] = {"Nzadi"},
["nzi"] = {"Nzima"},
["nzk"] = {"Nzakara"},
["nzm"] = {"Zeme Naga"},
["nzs"] = {"New Zealand Sign Language"},
["nzu"] = {"Teke-Nzikou"},
["nzy"] = {"Nzakambay"},
["nzz"] = {"Nanga Dama Dogon"},
["oaa"] = {"Orok"},
["oac"] = {"Oroch"},
["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"},
["oav"] = {"Old Avar"},
["obi"] = {"Obispeño"},
["obk"] = {"Southern Bontok"},
["obl"] = {"Oblo"},
["obm"] = {"Moabite"},
["obo"] = {"Obo Manobo"},
["obr"] = {"Old Burmese"},
["obt"] = {"Old Breton"},
["obu"] = {"Obulom"},
["oca"] = {"Ocaina"},
["och"] = {"Old Chinese"},
["oco"] = {"Old Cornish"},
["ocu"] = {"Atzingo Matlatzinca"},
["oda"] = {"Odut"},
["odk"] = {"Od"},
["odt"] = {"Old Dutch"},
["odu"] = {"Odual"},
["ofo"] = {"Ofo"},
["ofs"] = {"Old Frisian"},
["ofu"] = {"Efutop"},
["ogb"] = {"Ogbia"},
["ogc"] = {"Ogbah"},
["oge"] = {"Old Georgian"},
["ogg"] = {"Ogbogolo"},
["ogo"] = {"Khana"},
["ogu"] = {"Ogbronuagum"},
["oht"] = {"Old Hittite"},
["ohu"] = {"Old Hungarian"},
["oia"] = {"Oirata"},
["oin"] = {"Inebu One"},
["ojb"] = {"Northwestern Ojibwa"},
["ojc"] = {"Central Ojibwa"},
["ojg"] = {"Eastern Ojibwa"},
["ojp"] = {"Old Japanese"},
["ojs"] = {"Severn Ojibwa"},
["ojv"] = {"Ontong Java"},
["ojw"] = {"Western Ojibwa"},
["oka"] = {"Okanagan"},
["okb"] = {"Okobo"},
["okd"] = {"Okodia"},
["oke"] = {"Okpe (Southwestern Edo)"},
["okg"] = {"Koko Babangk"},
["okh"] = {"Koresh-e Rostam"},
["oki"] = {"Okiek"},
["okj"] = {"Oko-Juwoi"},
["okk"] = {"Kwamtim One"},
["okl"] = {"Old Kentish Sign Language"},
["okm"] = {"Middle Korean (10th-16th cent.)"},
["okn"] = {"Oki-No-Erabu"},
["oko"] = {"Old Korean (3rd-9th cent.)"},
["okr"] = {"Kirike"},
["oks"] = {"Oko-Eni-Osayen"},
["oku"] = {"Oku"},
["okv"] = {"Orokaiva"},
["okx"] = {"Okpe (Northwestern Edo)"},
["ola"] = {"Walungge"},
["old"] = {"Mochi"},
["ole"] = {"Olekha"},
["olk"] = {"Olkol"},
["olm"] = {"Oloma"},
["olo"] = {"Livvi"},
["olr"] = {"Olrat"},
["olt"] = {"Old Lithuanian"},
["olu"] = {"Kuvale"},
["oma"] = {"Omaha-Ponca"},
["omb"] = {"East Ambae"},
["omc"] = {"Mochica"},
["omg"] = {"Omagua"},
["omi"] = {"Omi"},
["omk"] = {"Omok"},
["oml"] = {"Ombo"},
["omn"] = {"Minoan"},
["omo"] = {"Utarmbung"},
["omp"] = {"Old Manipuri"},
["omq"] = {"Oto-Manguean languages"},
["omr"] = {"Old Marathi"},
["omt"] = {"Omotik"},
["omu"] = {"Omurano"},
["omv"] = {"Omotic languages"},
["omw"] = {"South Tairora"},
["omx"] = {"Old Mon"},
["ona"] = {"Ona"},
["onb"] = {"Lingao"},
["one"] = {"Oneida"},
["ong"] = {"Olo"},
["oni"] = {"Onin"},
["onj"] = {"Onjob"},
["onk"] = {"Kabore One"},
["onn"] = {"Onobasulu"},
["ono"] = {"Onondaga"},
["onp"] = {"Sartang"},
["onr"] = {"Northern One"},
["ons"] = {"Ono"},
["ont"] = {"Ontenu"},
["onu"] = {"Unua"},
["onw"] = {"Old Nubian"},
["onx"] = {"Onin Based Pidgin"},
["ood"] = {"Tohono O'odham"},
["oog"] = {"Ong"},
["oon"] = {"Önge"},
["oor"] = {"Oorlams"},
["oos"] = {"Old Ossetic"},
["opa"] = {"Okpamheri"},
["opk"] = {"Kopkaka"},
["opm"] = {"Oksapmin"},
["opo"] = {"Opao"},
["opt"] = {"Opata"},
["opy"] = {"Ofayé"},
["ora"] = {"Oroha"},
["orc"] = {"Orma"},
["ore"] = {"Orejón"},
["org"] = {"Oring"},
["orh"] = {"Oroqen"},
["orn"] = {"Orang Kanaq"},
["oro"] = {"Orokolo"},
["orr"] = {"Oruma"},
["ors"] = {"Orang Seletar"},
["ort"] = {"Adivasi Oriya"},
["oru"] = {"Ormuri"},
["orv"] = {"Old Russian"},
["orw"] = {"Oro Win"},
["orx"] = {"Oro"},
["ory"] = {"Odia (individual language)", "Oriya (individual language)"},
["orz"] = {"Ormu"},
["osa"] = {"Osage"},
["osc"] = {"Oscan"},
["osi"] = {"Osing"},
["oso"] = {"Ososo"},
["osp"] = {"Old Spanish"},
["ost"] = {"Osatu"},
["osu"] = {"Southern One"},
["osx"] = {"Old Saxon"},
["ota"] = {"Ottoman Turkish (1500-1928)"},
["otb"] = {"Old Tibetan"},
["otd"] = {"Ot Danum"},
["ote"] = {"Mezquital Otomi"},
["oti"] = {"Oti"},
["otk"] = {"Old Turkish"},
["otl"] = {"Tilapa Otomi"},
["otm"] = {"Eastern Highland Otomi"},
["otn"] = {"Tenango Otomi"},
["oto"] = {"Otomian languages"},
["otq"] = {"Querétaro Otomi"},
["otr"] = {"Otoro"},
["ots"] = {"Estado de México Otomi"},
["ott"] = {"Temoaya Otomi"},
["otu"] = {"Otuke"},
["otw"] = {"Ottawa"},
["otx"] = {"Texcatepec Otomi"},
["oty"] = {"Old Tamil"},
["otz"] = {"Ixtenco Otomi"},
["oua"] = {"Tagargrent"},
["oub"] = {"Glio-Oubi"},
["oue"] = {"Oune"},
["oui"] = {"Old Uighur"},
["oum"] = {"Ouma"},
["ovd"] = {"Elfdalian", "Övdalian"},
["owi"] = {"Owiniga"},
["owl"] = {"Old Welsh"},
["oyb"] = {"Oy"},
["oyd"] = {"Oyda"},
["oym"] = {"Wayampi"},
["oyy"] = {"Oya'oya"},
["ozm"] = {"Koonzime"},
["paa"] = {"Papuan languages"},
["pab"] = {"Parecís"},
["pac"] = {"Pacoh"},
["pad"] = {"Paumarí"},
["pae"] = {"Pagibete"},
["paf"] = {"Paranawát"},
["pag"] = {"Pangasinan"},
["pah"] = {"Tenharim"},
["pai"] = {"Pe"},
["pak"] = {"Parakanã"},
["pal"] = {"Pahlavi"},
["pam"] = {"Pampanga", "Kapampangan"},
["pao"] = {"Northern Paiute"},
["pap"] = {"Papiamento"},
["paq"] = {"Parya"},
["par"] = {"Panamint", "Timbisha"},
["pas"] = {"Papasena"},
["pat"] = {"Papitalai"},
["pau"] = {"Palauan"},
["pav"] = {"Pakaásnovos"},
["paw"] = {"Pawnee"},
["pax"] = {"Pankararé"},
["pay"] = {"Pech"},
["paz"] = {"Pankararú"},
["pbb"] = {"Páez"},
["pbc"] = {"Patamona"},
["pbe"] = {"Mezontla Popoloca"},
["pbf"] = {"Coyotepec Popoloca"},
["pbg"] = {"Paraujano"},
["pbh"] = {"E'ñapa Woromaipu"},
["pbi"] = {"Parkwa"},
["pbl"] = {"Mak (Nigeria)"},
["pbm"] = {"Puebla Mazatec"},
["pbn"] = {"Kpasam"},
["pbo"] = {"Papel"},
["pbp"] = {"Badyara"},
["pbr"] = {"Pangwa"},
["pbs"] = {"Central Pame"},
["pbt"] = {"Southern Pashto"},
["pbu"] = {"Northern Pashto"},
["pbv"] = {"Pnar"},
["pby"] = {"Pyu (Papua New Guinea)"},
["pca"] = {"Santa Inés Ahuatempan Popoloca"},
["pcb"] = {"Pear"},
["pcc"] = {"Bouyei"},
["pcd"] = {"Picard"},
["pce"] = {"Ruching Palaung"},
["pcf"] = {"Paliyan"},
["pcg"] = {"Paniya"},
["pch"] = {"Pardhan"},
["pci"] = {"Duruwa"},
["pcj"] = {"Parenga"},
["pck"] = {"Paite Chin"},
["pcl"] = {"Pardhi"},
["pcm"] = {"Nigerian Pidgin"},
["pcn"] = {"Piti"},
["pcp"] = {"Pacahuara"},
["pcw"] = {"Pyapun"},
["pda"] = {"Anam"},
["pdc"] = {"Pennsylvania German"},
["pdi"] = {"Pa Di"},
["pdn"] = {"Podena", "Fedan"},
["pdo"] = {"Padoe"},
["pdt"] = {"Plautdietsch"},
["pdu"] = {"Kayan"},
["pea"] = {"Peranakan Indonesian"},
["peb"] = {"Eastern Pomo"},
["ped"] = {"Mala (Papua New Guinea)"},
["pee"] = {"Taje"},
["pef"] = {"Northeastern Pomo"},
["peg"] = {"Pengo"},
["peh"] = {"Bonan"},
["pei"] = {"Chichimeca-Jonaz"},
["pej"] = {"Northern Pomo"},
["pek"] = {"Penchal"},
["pel"] = {"Pekal"},
["pem"] = {"Phende"},
["peo"] = {"Old Persian (ca. 600-400 B.C.)"},
["pep"] = {"Kunja"},
["peq"] = {"Southern Pomo"},
["pes"] = {"Iranian Persian"},
["pev"] = {"Pémono"},
["pex"] = {"Petats"},
["pey"] = {"Petjo"},
["pez"] = {"Eastern Penan"},
["pfa"] = {"Pááfang"},
["pfe"] = {"Pere"},
["pfl"] = {"Pfaelzisch"},
["pga"] = {"Sudanese Creole Arabic"},
["pgd"] = {"Gāndhārī"},
["pgg"] = {"Pangwali"},
["pgi"] = {"Pagi"},
["pgk"] = {"Rerep"},
["pgl"] = {"Primitive Irish"},
["pgn"] = {"Paelignian"},
["pgs"] = {"Pangseng"},
["pgu"] = {"Pagu"},
["pgz"] = {"Papua New Guinean Sign Language"},
["pha"] = {"Pa-Hng"},
["phd"] = {"Phudagi"},
["phg"] = {"Phuong"},
["phh"] = {"Phukha"},
["phi"] = {"Philippine languages"},
["phk"] = {"Phake"},
["phl"] = {"Phalura", "Palula"},
["phm"] = {"Phimbi"},
["phn"] = {"Phoenician"},
["pho"] = {"Phunoi"},
["phq"] = {"Phana'"},
["phr"] = {"Pahari-Potwari"},
["pht"] = {"Phu Thai"},
["phu"] = {"Phuan"},
["phv"] = {"Pahlavani"},
["phw"] = {"Phangduwali"},
["pia"] = {"Pima Bajo"},
["pib"] = {"Yine"},
["pic"] = {"Pinji"},
["pid"] = {"Piaroa"},
["pie"] = {"Piro"},
["pif"] = {"Pingelapese"},
["pig"] = {"Pisabo"},
["pih"] = {"Pitcairn-Norfolk"},
["pii"] = {"Pini"},
["pij"] = {"Pijao"},
["pil"] = {"Yom"},
["pim"] = {"Powhatan"},
["pin"] = {"Piame"},
["pio"] = {"Piapoco"},
["pip"] = {"Pero"},
["pir"] = {"Piratapuyo"},
["pis"] = {"Pijin"},
["pit"] = {"Pitta Pitta"},
["piu"] = {"Pintupi-Luritja"},
["piv"] = {"Pileni", "Vaeakau-Taumako"},
["piw"] = {"Pimbwe"},
["pix"] = {"Piu"},
["piy"] = {"Piya-Kwonci"},
["piz"] = {"Pije"},
["pjt"] = {"Pitjantjatjara"},
["pka"] = {"Ardhamāgadhī Prākrit"},
["pkb"] = {"Pokomo", "Kipfokomo"},
["pkc"] = {"Paekche"},
["pkg"] = {"Pak-Tong"},
["pkh"] = {"Pankhu"},
["pkn"] = {"Pakanha"},
["pko"] = {"Pökoot"},
["pkp"] = {"Pukapuka"},
["pkr"] = {"Attapady Kurumba"},
["pks"] = {"Pakistan Sign Language"},
["pkt"] = {"Maleng"},
["pku"] = {"Paku"},
["pla"] = {"Miani"},
["plb"] = {"Polonombauk"},
["plc"] = {"Central Palawano"},
["pld"] = {"Polari"},
["ple"] = {"Palu'e"},
["plf"] = {"Central Malayo-Polynesian languages"},
["plg"] = {"Pilagá"},
["plh"] = {"Paulohi"},
["plj"] = {"Polci"},
["plk"] = {"Kohistani Shina"},
["pll"] = {"Shwe Palaung"},
["pln"] = {"Palenquero"},
["plo"] = {"Oluta Popoluca"},
["plq"] = {"Palaic"},
["plr"] = {"Palaka Senoufo"},
["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"},
["plt"] = {"Plateau Malagasy"},
["plu"] = {"Palikúr"},
["plv"] = {"Southwest Palawano"},
["plw"] = {"Brooke's Point Palawano"},
["ply"] = {"Bolyu"},
["plz"] = {"Paluan"},
["pma"] = {"Paama"},
["pmb"] = {"Pambia"},
["pmd"] = {"Pallanganmiddang"},
["pme"] = {"Pwaamei"},
["pmf"] = {"Pamona"},
["pmh"] = {"Māhārāṣṭri Prākrit"},
["pmi"] = {"Northern Pumi"},
["pmj"] = {"Southern Pumi"},
["pmk"] = {"Pamlico"},
["pml"] = {"Lingua Franca"},
["pmm"] = {"Pomo"},
["pmn"] = {"Pam"},
["pmo"] = {"Pom"},
["pmq"] = {"Northern Pame"},
["pmr"] = {"Paynamar"},
["pms"] = {"Piemontese"},
["pmt"] = {"Tuamotuan"},
["pmw"] = {"Plains Miwok"},
["pmx"] = {"Poumei Naga"},
["pmy"] = {"Papuan Malay"},
["pmz"] = {"Southern Pame"},
["pna"] = {"Punan Bah-Biau"},
["pnb"] = {"Western Panjabi"},
["pnc"] = {"Pannei"},
["pnd"] = {"Mpinda"},
["pne"] = {"Western Penan"},
["png"] = {"Pongu"},
["pnh"] = {"Penrhyn"},
["pni"] = {"Aoheng"},
["pnj"] = {"Pinjarup"},
["pnk"] = {"Paunaka"},
["pnl"] = {"Paleni"},
["pnm"] = {"Punan Batu 1"},
["pnn"] = {"Pinai-Hagahai"},
["pno"] = {"Panobo"},
["pnp"] = {"Pancana"},
["pnq"] = {"Pana (Burkina Faso)"},
["pnr"] = {"Panim"},
["pns"] = {"Ponosakan"},
["pnt"] = {"Pontic"},
["pnu"] = {"Jiongnai Bunu"},
["pnv"] = {"Pinigura"},
["pnw"] = {"Banyjima", "Panytyima"},
["pnx"] = {"Phong-Kniang"},
["pny"] = {"Pinyin"},
["pnz"] = {"Pana (Central African Republic)"},
["poc"] = {"Poqomam"},
["poe"] = {"San Juan Atzingo Popoloca"},
["pof"] = {"Poke"},
["pog"] = {"Potiguára"},
["poh"] = {"Poqomchi'"},
["poi"] = {"Highland Popoluca"},
["pok"] = {"Pokangá"},
["pom"] = {"Southeastern Pomo"},
["pon"] = {"Pohnpeian"},
["poo"] = {"Central Pomo"},
["pop"] = {"Pwapwâ"},
["poq"] = {"Texistepec Popoluca"},
["pos"] = {"Sayula Popoluca"},
["pot"] = {"Potawatomi"},
["pov"] = {"Upper Guinea Crioulo"},
["pow"] = {"San Felipe Otlaltepec Popoloca"},
["pox"] = {"Polabian"},
["poy"] = {"Pogolo"},
["poz"] = {"Malayo-Polynesian languages"},
["ppe"] = {"Papi"},
["ppi"] = {"Paipai"},
["ppk"] = {"Uma"},
["ppl"] = {"Pipil", "Nicarao"},
["ppm"] = {"Papuma"},
["ppn"] = {"Papapana"},
["ppo"] = {"Folopa"},
["ppp"] = {"Pelende"},
["ppq"] = {"Pei"},
["pps"] = {"San Luís Temalacayuca Popoloca"},
["ppt"] = {"Pare"},
["ppu"] = {"Papora"},
["pqa"] = {"Pa'a"},
["pqe"] = {"Eastern Malayo-Polynesian languages"},
["pqm"] = {"Malecite-Passamaquoddy"},
["pqw"] = {"Western Malayo-Polynesian languages"},
["pra"] = {"Prakrit languages"},
["prc"] = {"Parachi"},
["prd"] = {"Parsi-Dari"},
["pre"] = {"Principense"},
["prf"] = {"Paranan"},
["prg"] = {"Prussian"},
["prh"] = {"Porohanon"},
["pri"] = {"Paicî"},
["prk"] = {"Parauk"},
["prl"] = {"Peruvian Sign Language"},
["prm"] = {"Kibiri"},
["prn"] = {"Prasuni"},
["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"},
["prp"] = {"Parsi"},
["prq"] = {"Ashéninka Perené"},
["prr"] = {"Puri"},
["prs"] = {"Dari", "Afghan Persian"},
["prt"] = {"Phai"},
["pru"] = {"Puragi"},
["prw"] = {"Parawen"},
["prx"] = {"Purik"},
["prz"] = {"Providencia Sign Language"},
["psa"] = {"Asue Awyu"},
["psc"] = {"Persian Sign Language"},
["psd"] = {"Plains Indian Sign Language"},
["pse"] = {"Central Malay"},
["psg"] = {"Penang Sign Language"},
["psh"] = {"Southwest Pashai", "Southwest Pashayi"},
["psi"] = {"Southeast Pashai", "Southeast Pashayi"},
["psl"] = {"Puerto Rican Sign Language"},
["psm"] = {"Pauserna"},
["psn"] = {"Panasuan"},
["pso"] = {"Polish Sign Language"},
["psp"] = {"Philippine Sign Language"},
["psq"] = {"Pasi"},
["psr"] = {"Portuguese Sign Language"},
["pss"] = {"Kaulong"},
["pst"] = {"Central Pashto"},
["psu"] = {"Sauraseni Prākrit"},
["psw"] = {"Port Sandwich"},
["psy"] = {"Piscataway"},
["pta"] = {"Pai Tavytera"},
["pth"] = {"Pataxó Hã-Ha-Hãe"},
["pti"] = {"Pindiini", "Wangkatha"},
["ptn"] = {"Patani"},
["pto"] = {"Zo'é"},
["ptp"] = {"Patep"},
["ptq"] = {"Pattapu"},
["ptr"] = {"Piamatsina"},
["ptt"] = {"Enrekang"},
["ptu"] = {"Bambam"},
["ptv"] = {"Port Vato"},
["ptw"] = {"Pentlatch"},
["pty"] = {"Pathiya"},
["pua"] = {"Western Highland Purepecha"},
["pub"] = {"Purum"},
["puc"] = {"Punan Merap"},
["pud"] = {"Punan Aput"},
["pue"] = {"Puelche"},
["puf"] = {"Punan Merah"},
["pug"] = {"Phuie"},
["pui"] = {"Puinave"},
["puj"] = {"Punan Tubu"},
["pum"] = {"Puma"},
["puo"] = {"Puoc"},
["pup"] = {"Pulabu"},
["puq"] = {"Puquina"},
["pur"] = {"Puruborá"},
["put"] = {"Putoh"},
["puu"] = {"Punu"},
["puw"] = {"Puluwatese"},
["pux"] = {"Puare"},
["puy"] = {"Purisimeño"},
["pwa"] = {"Pawaia"},
["pwb"] = {"Panawa"},
["pwg"] = {"Gapapaiwa"},
["pwi"] = {"Patwin"},
["pwm"] = {"Molbog"},
["pwn"] = {"Paiwan"},
["pwo"] = {"Pwo Western Karen"},
["pwr"] = {"Powari"},
["pww"] = {"Pwo Northern Karen"},
["pxm"] = {"Quetzaltepec Mixe"},
["pye"] = {"Pye Krumen"},
["pym"] = {"Fyam"},
["pyn"] = {"Poyanáwa"},
["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"},
["pyu"] = {"Puyuma"},
["pyx"] = {"Pyu (Myanmar)"},
["pyy"] = {"Pyen"},
["pzn"] = {"Para Naga"},
["qua"] = {"Quapaw"},
["qub"] = {"Huallaga Huánuco Quechua"},
["quc"] = {"K'iche'", "Quiché"},
["qud"] = {"Calderón Highland Quichua"},
["quf"] = {"Lambayeque Quechua"},
["qug"] = {"Chimborazo Highland Quichua"},
["quh"] = {"South Bolivian Quechua"},
["qui"] = {"Quileute"},
["quk"] = {"Chachapoyas Quechua"},
["qul"] = {"North Bolivian Quechua"},
["qum"] = {"Sipacapense"},
["qun"] = {"Quinault"},
["qup"] = {"Southern Pastaza Quechua"},
["quq"] = {"Quinqui"},
["qur"] = {"Yanahuanca Pasco Quechua"},
["qus"] = {"Santiago del Estero Quichua"},
["quv"] = {"Sacapulteco"},
["quw"] = {"Tena Lowland Quichua"},
["qux"] = {"Yauyos Quechua"},
["quy"] = {"Ayacucho Quechua"},
["quz"] = {"Cusco Quechua"},
["qva"] = {"Ambo-Pasco Quechua"},
["qvc"] = {"Cajamarca Quechua"},
["qve"] = {"Eastern Apurímac Quechua"},
["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"},
["qvi"] = {"Imbabura Highland Quichua"},
["qvj"] = {"Loja Highland Quichua"},
["qvl"] = {"Cajatambo North Lima Quechua"},
["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"},
["qvn"] = {"North Junín Quechua"},
["qvo"] = {"Napo Lowland Quechua"},
["qvp"] = {"Pacaraos Quechua"},
["qvs"] = {"San Martín Quechua"},
["qvw"] = {"Huaylla Wanca Quechua"},
["qvy"] = {"Queyu"},
["qvz"] = {"Northern Pastaza Quichua"},
["qwa"] = {"Corongo Ancash Quechua"},
["qwc"] = {"Classical Quechua"},
["qwe"] = {"Quechuan (family)"},
["qwh"] = {"Huaylas Ancash Quechua"},
["qwm"] = {"Kuman (Russia)"},
["qws"] = {"Sihuas Ancash Quechua"},
["qwt"] = {"Kwalhioqua-Tlatskanai"},
["qxa"] = {"Chiquián Ancash Quechua"},
["qxc"] = {"Chincha Quechua"},
["qxh"] = {"Panao Huánuco Quechua"},
["qxl"] = {"Salasaca Highland Quichua"},
["qxn"] = {"Northern Conchucos Ancash Quechua"},
["qxo"] = {"Southern Conchucos Ancash Quechua"},
["qxp"] = {"Puno Quechua"},
["qxq"] = {"Qashqa'i"},
["qxr"] = {"Cañar Highland Quichua"},
["qxs"] = {"Southern Qiang"},
["qxt"] = {"Santa Ana de Tusi Pasco Quechua"},
["qxu"] = {"Arequipa-La Unión Quechua"},
["qxw"] = {"Jauja Wanca Quechua"},
["qya"] = {"Quenya"},
["qyp"] = {"Quiripi"},
["raa"] = {"Dungmali"},
["rab"] = {"Camling"},
["rac"] = {"Rasawa"},
["rad"] = {"Rade"},
["raf"] = {"Western Meohang"},
["rag"] = {"Logooli", "Lulogooli"},
["rah"] = {"Rabha"},
["rai"] = {"Ramoaaina"},
["raj"] = {"Rajasthani"},
["rak"] = {"Tulu-Bohuai"},
["ral"] = {"Ralte"},
["ram"] = {"Canela"},
["ran"] = {"Riantana"},
["rao"] = {"Rao"},
["rap"] = {"Rapanui"},
["raq"] = {"Saam"},
["rar"] = {"Rarotongan", "Cook Islands Maori"},
["ras"] = {"Tegali"},
["rat"] = {"Razajerdi"},
["rau"] = {"Raute"},
["rav"] = {"Sampang"},
["raw"] = {"Rawang"},
["rax"] = {"Rang"},
["ray"] = {"Rapa"},
["raz"] = {"Rahambuu"},
["rbb"] = {"Rumai Palaung"},
["rbk"] = {"Northern Bontok"},
["rbl"] = {"Miraya Bikol"},
["rbp"] = {"Barababaraba"},
["rcf"] = {"Réunion Creole French"},
["rdb"] = {"Rudbari"},
["rea"] = {"Rerau"},
["reb"] = {"Rembong"},
["ree"] = {"Rejang Kayan"},
["reg"] = {"Kara (Tanzania)"},
["rei"] = {"Reli"},
["rej"] = {"Rejang"},
["rel"] = {"Rendille"},
["rem"] = {"Remo"},
["ren"] = {"Rengao"},
["rer"] = {"Rer Bare"},
["res"] = {"Reshe"},
["ret"] = {"Retta"},
["rey"] = {"Reyesano"},
["rga"] = {"Roria"},
["rge"] = {"Romano-Greek"},
["rgk"] = {"Rangkas"},
["rgn"] = {"Romagnol"},
["rgr"] = {"Resígaro"},
["rgs"] = {"Southern Roglai"},
["rgu"] = {"Ringgou"},
["rhg"] = {"Rohingya"},
["rhp"] = {"Yahang"},
["ria"] = {"Riang (India)"},
["rif"] = {"Tarifit"},
["ril"] = {"Riang Lang", "Riang (Myanmar)"},
["rim"] = {"Nyaturu"},
["rin"] = {"Nungu"},
["rir"] = {"Ribun"},
["rit"] = {"Ritharrngu"},
["riu"] = {"Riung"},
["rjg"] = {"Rajong"},
["rji"] = {"Raji"},
["rjs"] = {"Rajbanshi"},
["rka"] = {"Kraol"},
["rkb"] = {"Rikbaktsa"},
["rkh"] = {"Rakahanga-Manihiki"},
["rki"] = {"Rakhine"},
["rkm"] = {"Marka"},
["rkt"] = {"Rangpuri", "Kamta"},
["rkw"] = {"Arakwal"},
["rma"] = {"Rama"},
["rmb"] = {"Rembarrnga"},
["rmc"] = {"Carpathian Romani"},
["rmd"] = {"Traveller Danish"},
["rme"] = {"Angloromani"},
["rmf"] = {"Kalo Finnish Romani"},
["rmg"] = {"Traveller Norwegian"},
["rmh"] = {"Murkim"},
["rmi"] = {"Lomavren"},
["rmk"] = {"Romkun"},
["rml"] = {"Baltic Romani"},
["rmm"] = {"Roma"},
["rmn"] = {"Balkan Romani"},
["rmo"] = {"Sinte Romani"},
["rmp"] = {"Rempi"},
["rmq"] = {"Caló"},
["rms"] = {"Romanian Sign Language"},
["rmt"] = {"Domari"},
["rmu"] = {"Tavringer Romani"},
["rmv"] = {"Romanova"},
["rmw"] = {"Welsh Romani"},
["rmx"] = {"Romam"},
["rmy"] = {"Vlax Romani"},
["rmz"] = {"Marma"},
["rnd"] = {"Ruund"},
["rng"] = {"Ronga"},
["rnl"] = {"Ranglong"},
["rnn"] = {"Roon"},
["rnp"] = {"Rongpo"},
["rnr"] = {"Nari Nari"},
["rnw"] = {"Rungwa"},
["roa"] = {"Romance languages"},
["rob"] = {"Tae'"},
["roc"] = {"Cacgia Roglai"},
["rod"] = {"Rogo"},
["roe"] = {"Ronji"},
["rof"] = {"Rombo"},
["rog"] = {"Northern Roglai"},
["rol"] = {"Romblomanon"},
["rom"] = {"Romany"},
["roo"] = {"Rotokas"},
["rop"] = {"Kriol"},
["ror"] = {"Rongga"},
["rou"] = {"Runga"},
["row"] = {"Dela-Oenale"},
["rpn"] = {"Repanbitip"},
["rpt"] = {"Rapting"},
["rri"] = {"Ririo"},
["rro"] = {"Waima"},
["rrt"] = {"Arritinngithigh"},
["rsb"] = {"Romano-Serbian"},
["rsl"] = {"Russian Sign Language"},
["rsm"] = {"Miriwoong Sign Language"},
["rtc"] = {"Rungtu Chin"},
["rth"] = {"Ratahan"},
["rtm"] = {"Rotuman"},
["rts"] = {"Yurats"},
["rtw"] = {"Rathawi"},
["rub"] = {"Gungu"},
["ruc"] = {"Ruuli"},
["rue"] = {"Rusyn"},
["ruf"] = {"Luguru"},
["rug"] = {"Roviana"},
["ruh"] = {"Ruga"},
["rui"] = {"Rufiji"},
["ruk"] = {"Che"},
["ruo"] = {"Istro Romanian"},
["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"},
["ruq"] = {"Megleno Romanian"},
["rut"] = {"Rutul"},
["ruu"] = {"Lanas Lobu"},
["ruy"] = {"Mala (Nigeria)"},
["ruz"] = {"Ruma"},
["rwa"] = {"Rawo"},
["rwk"] = {"Rwa"},
["rwm"] = {"Amba (Uganda)"},
["rwo"] = {"Rawa"},
["rwr"] = {"Marwari (India)"},
["rxd"] = {"Ngardi"},
["rxw"] = {"Karuwali", "Garuwali"},
["ryn"] = {"Northern Amami-Oshima"},
["rys"] = {"Yaeyama"},
["ryu"] = {"Central Okinawan"},
["rzh"] = {"Rāziḥī"},
["saa"] = {"Saba"},
["sab"] = {"Buglere"},
["sac"] = {"Meskwaki"},
["sad"] = {"Sandawe"},
["sae"] = {"Sabanê"},
["saf"] = {"Safaliba"},
["sah"] = {"Yakut"},
["sai"] = {"South American Indian languages"},
["saj"] = {"Sahu"},
["sak"] = {"Sake"},
["sal"] = {"Salishan languages"},
["sam"] = {"Samaritan Aramaic"},
["sao"] = {"Sause"},
["saq"] = {"Samburu"},
["sar"] = {"Saraveca"},
["sas"] = {"Sasak"},
["sat"] = {"Santali"},
["sau"] = {"Saleman"},
["sav"] = {"Saafi-Saafi"},
["saw"] = {"Sawi"},
["sax"] = {"Sa"},
["say"] = {"Saya"},
["saz"] = {"Saurashtra"},
["sba"] = {"Ngambay"},
["sbb"] = {"Simbo"},
["sbc"] = {"Kele (Papua New Guinea)"},
["sbd"] = {"Southern Samo"},
["sbe"] = {"Saliba"},
["sbf"] = {"Chabu", "Shabo"},
["sbg"] = {"Seget"},
["sbh"] = {"Sori-Harengan"},
["sbi"] = {"Seti"},
["sbj"] = {"Surbakhal"},
["sbk"] = {"Safwa"},
["sbl"] = {"Botolan Sambal"},
["sbm"] = {"Sagala"},
["sbn"] = {"Sindhi Bhil"},
["sbo"] = {"Sabüm"},
["sbp"] = {"Sangu (Tanzania)"},
["sbq"] = {"Sileibi"},
["sbr"] = {"Sembakung Murut"},
["sbs"] = {"Subiya"},
["sbt"] = {"Kimki"},
["sbu"] = {"Stod Bhoti"},
["sbv"] = {"Sabine"},
["sbw"] = {"Simba"},
["sbx"] = {"Seberuang"},
["sby"] = {"Soli"},
["sbz"] = {"Sara Kaba"},
["scb"] = {"Chut"},
["sce"] = {"Dongxiang"},
["scf"] = {"San Miguel Creole French"},
["scg"] = {"Sanggau"},
["sch"] = {"Sakachep"},
["sci"] = {"Sri Lankan Creole Malay"},
["sck"] = {"Sadri"},
["scl"] = {"Shina"},
["scn"] = {"Sicilian"},
["sco"] = {"Scots"},
["scp"] = {"Hyolmo", "Helambu Sherpa"},
["scq"] = {"Sa'och"},
["scs"] = {"North Slavey"},
["sct"] = {"Southern Katang"},
["scu"] = {"Shumcho"},
["scv"] = {"Sheni"},
["scw"] = {"Sha"},
["scx"] = {"Sicel"},
["sda"] = {"Toraja-Sa'dan"},
["sdb"] = {"Shabak"},
["sdc"] = {"Sassarese Sardinian"},
["sde"] = {"Surubu"},
["sdf"] = {"Sarli"},
["sdg"] = {"Savi"},
["sdh"] = {"Southern Kurdish"},
["sdj"] = {"Suundi"},
["sdk"] = {"Sos Kundi"},
["sdl"] = {"Saudi Arabian Sign Language"},
["sdn"] = {"Gallurese Sardinian"},
["sdo"] = {"Bukar-Sadung Bidayuh"},
["sdp"] = {"Sherdukpen"},
["sdq"] = {"Semandang"},
["sdr"] = {"Oraon Sadri"},
["sds"] = {"Sened"},
["sdt"] = {"Shuadit"},
["sdu"] = {"Sarudu"},
["sdv"] = {"Eastern Sudanic languages"},
["sdx"] = {"Sibu Melanau"},
["sdz"] = {"Sallands"},
["sea"] = {"Semai"},
["seb"] = {"Shempire Senoufo"},
["sec"] = {"Sechelt"},
["sed"] = {"Sedang"},
["see"] = {"Seneca"},
["sef"] = {"Cebaara Senoufo"},
["seg"] = {"Segeju"},
["seh"] = {"Sena"},
["sei"] = {"Seri"},
["sej"] = {"Sene"},
["sek"] = {"Sekani"},
["sel"] = {"Selkup"},
["sem"] = {"Semitic languages"},
["sen"] = {"Nanerigé Sénoufo"},
["seo"] = {"Suarmin"},
["sep"] = {"Sìcìté Sénoufo"},
["seq"] = {"Senara Sénoufo"},
["ser"] = {"Serrano"},
["ses"] = {"Koyraboro Senni Songhai"},
["set"] = {"Sentani"},
["seu"] = {"Serui-Laut"},
["sev"] = {"Nyarafolo Senoufo"},
["sew"] = {"Sewa Bay"},
["sey"] = {"Secoya"},
["sez"] = {"Senthang Chin"},
["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"},
["sfe"] = {"Eastern Subanen"},
["sfm"] = {"Small Flowery Miao"},
["sfs"] = {"South African Sign Language"},
["sfw"] = {"Sehwi"},
["sga"] = {"Old Irish (to 900)"},
["sgb"] = {"Mag-antsi Ayta"},
["sgc"] = {"Kipsigis"},
["sgd"] = {"Surigaonon"},
["sge"] = {"Segai"},
["sgg"] = {"Swiss-German Sign Language"},
["sgh"] = {"Shughni"},
["sgi"] = {"Suga"},
["sgj"] = {"Surgujia"},
["sgk"] = {"Sangkong"},
["sgm"] = {"Singa"},
["sgn"] = {"Sign languages"},
["sgp"] = {"Singpho"},
["sgr"] = {"Sangisari"},
["sgs"] = {"Samogitian"},
["sgt"] = {"Brokpake"},
["sgu"] = {"Salas"},
["sgw"] = {"Sebat Bet Gurage"},
["sgx"] = {"Sierra Leone Sign Language"},
["sgy"] = {"Sanglechi"},
["sgz"] = {"Sursurunga"},
["sha"] = {"Shall-Zwall"},
["shb"] = {"Ninam"},
["shc"] = {"Sonde"},
["shd"] = {"Kundal Shahi"},
["she"] = {"Sheko"},
["shg"] = {"Shua"},
["shh"] = {"Shoshoni"},
["shi"] = {"Tachelhit"},
["shj"] = {"Shatt"},
["shk"] = {"Shilluk"},
["shl"] = {"Shendu"},
["shm"] = {"Shahrudi"},
["shn"] = {"Shan"},
["sho"] = {"Shanga"},
["shp"] = {"Shipibo-Conibo"},
["shq"] = {"Sala"},
["shr"] = {"Shi"},
["shs"] = {"Shuswap"},
["sht"] = {"Shasta"},
["shu"] = {"Chadian Arabic"},
["shv"] = {"Shehri"},
["shw"] = {"Shwai"},
["shx"] = {"She"},
["shy"] = {"Tachawit"},
["shz"] = {"Syenara Senoufo"},
["sia"] = {"Akkala Sami"},
["sib"] = {"Sebop"},
["sid"] = {"Sidamo"},
["sie"] = {"Simaa"},
["sif"] = {"Siamou"},
["sig"] = {"Paasaal"},
["sih"] = {"Zire", "Sîshëë"},
["sii"] = {"Shom Peng"},
["sij"] = {"Numbami"},
["sik"] = {"Sikiana"},
["sil"] = {"Tumulung Sisaala"},
["sim"] = {"Mende (Papua New Guinea)"},
["sio"] = {"Siouan languages"},
["sip"] = {"Sikkimese"},
["siq"] = {"Sonia"},
["sir"] = {"Siri"},
["sis"] = {"Siuslaw"},
["sit"] = {"Sino-Tibetan languages"},
["siu"] = {"Sinagen"},
["siv"] = {"Sumariup"},
["siw"] = {"Siwai"},
["six"] = {"Sumau"},
["siy"] = {"Sivandi"},
["siz"] = {"Siwi"},
["sja"] = {"Epena"},
["sjb"] = {"Sajau Basap"},
["sjd"] = {"Kildin Sami"},
["sje"] = {"Pite Sami"},
["sjg"] = {"Assangori"},
["sjk"] = {"Kemi Sami"},
["sjl"] = {"Sajalong", "Miji"},
["sjm"] = {"Mapun"},
["sjn"] = {"Sindarin"},
["sjo"] = {"Xibe"},
["sjp"] = {"Surjapuri"},
["sjr"] = {"Siar-Lak"},
["sjs"] = {"Senhaja De Srair"},
["sjt"] = {"Ter Sami"},
["sju"] = {"Ume Sami"},
["sjw"] = {"Shawnee"},
["ska"] = {"Skagit"},
["skb"] = {"Saek"},
["skc"] = {"Ma Manda"},
["skd"] = {"Southern Sierra Miwok"},
["ske"] = {"Seke (Vanuatu)"},
["skf"] = {"Sakirabiá"},
["skg"] = {"Sakalava Malagasy"},
["skh"] = {"Sikule"},
["ski"] = {"Sika"},
["skj"] = {"Seke (Nepal)"},
["skm"] = {"Kutong"},
["skn"] = {"Kolibugan Subanon"},
["sko"] = {"Seko Tengah"},
["skp"] = {"Sekapan"},
["skq"] = {"Sininkere"},
["skr"] = {"Saraiki", "Seraiki"},
["sks"] = {"Maia"},
["skt"] = {"Sakata"},
["sku"] = {"Sakao"},
["skv"] = {"Skou"},
["skw"] = {"Skepi Creole Dutch"},
["skx"] = {"Seko Padang"},
["sky"] = {"Sikaiana"},
["skz"] = {"Sekar"},
["sla"] = {"Slavic languages"},
["slc"] = {"Sáliba"},
["sld"] = {"Sissala"},
["sle"] = {"Sholaga"},
["slf"] = {"Swiss-Italian Sign Language"},
["slg"] = {"Selungai Murut"},
["slh"] = {"Southern Puget Sound Salish"},
["sli"] = {"Lower Silesian"},
["slj"] = {"Salumá"},
["sll"] = {"Salt-Yui"},
["slm"] = {"Pangutaran Sama"},
["sln"] = {"Salinan"},
["slp"] = {"Lamaholot"},
["slq"] = {"Salchuq"},
["slr"] = {"Salar"},
["sls"] = {"Singapore Sign Language"},
["slt"] = {"Sila"},
["slu"] = {"Selaru"},
["slw"] = {"Sialum"},
["slx"] = {"Salampasu"},
["sly"] = {"Selayar"},
["slz"] = {"Ma'ya"},
["sma"] = {"Southern Sami"},
["smb"] = {"Simbari"},
["smc"] = {"Som"},
["smd"] = {"Sama"},
["smf"] = {"Auwe"},
["smg"] = {"Simbali"},
["smh"] = {"Samei"},
["smi"] = {"Sami languages"},
["smj"] = {"Lule Sami"},
["smk"] = {"Bolinao"},
["sml"] = {"Central Sama"},
["smm"] = {"Musasa"},
["smn"] = {"Inari Sami"},
["smp"] = {"Samaritan"},
["smq"] = {"Samo"},
["smr"] = {"Simeulue"},
["sms"] = {"Skolt Sami"},
["smt"] = {"Simte"},
["smu"] = {"Somray"},
["smv"] = {"Samvedi"},
["smw"] = {"Sumbawa"},
["smx"] = {"Samba"},
["smy"] = {"Semnani"},
["smz"] = {"Simeku"},
["snb"] = {"Sebuyau"},
["snc"] = {"Sinaugoro"},
["sne"] = {"Bau Bidayuh"},
["snf"] = {"Noon"},
["sng"] = {"Sanga (Democratic Republic of Congo)"},
["sni"] = {"Sensi"},
["snj"] = {"Riverain Sango"},
["snk"] = {"Soninke"},
["snl"] = {"Sangil"},
["snm"] = {"Southern Ma'di"},
["snn"] = {"Siona"},
["sno"] = {"Snohomish"},
["snp"] = {"Siane"},
["snq"] = {"Sangu (Gabon)"},
["snr"] = {"Sihan"},
["sns"] = {"South West Bay", "Nahavaq"},
["snu"] = {"Senggi", "Viid"},
["snv"] = {"Sa'ban"},
["snw"] = {"Selee"},
["snx"] = {"Sam"},
["sny"] = {"Saniyo-Hiyewe"},
["snz"] = {"Kou"},
["soa"] = {"Thai Song"},
["sob"] = {"Sobei"},
["soc"] = {"So (Democratic Republic of Congo)"},
["sod"] = {"Songoora"},
["soe"] = {"Songomeno"},
["sog"] = {"Sogdian"},
["soh"] = {"Aka"},
["soi"] = {"Sonha"},
["soj"] = {"Soi"},
["sok"] = {"Sokoro"},
["sol"] = {"Solos"},
["son"] = {"Songhai languages"},
["soo"] = {"Songo"},
["sop"] = {"Songe"},
["soq"] = {"Kanasi"},
["sor"] = {"Somrai"},
["sos"] = {"Seeku"},
["sou"] = {"Southern Thai"},
["sov"] = {"Sonsorol"},
["sow"] = {"Sowanda"},
["sox"] = {"Swo"},
["soy"] = {"Miyobe"},
["soz"] = {"Temi"},
["spb"] = {"Sepa (Indonesia)"},
["spc"] = {"Sapé"},
["spd"] = {"Saep"},
["spe"] = {"Sepa (Papua New Guinea)"},
["spg"] = {"Sian"},
["spi"] = {"Saponi"},
["spk"] = {"Sengo"},
["spl"] = {"Selepet"},
["spm"] = {"Akukem"},
["spn"] = {"Sanapaná"},
["spo"] = {"Spokane"},
["spp"] = {"Supyire Senoufo"},
["spq"] = {"Loreto-Ucayali Spanish"},
["spr"] = {"Saparua"},
["sps"] = {"Saposa"},
["spt"] = {"Spiti Bhoti"},
["spu"] = {"Sapuan"},
["spv"] = {"Sambalpuri", "Kosli"},
["spx"] = {"South Picene"},
["spy"] = {"Sabaot"},
["sqa"] = {"Shama-Sambuga"},
["sqh"] = {"Shau"},
["sqj"] = {"Albanian languages"},
["sqk"] = {"Albanian Sign Language"},
["sqm"] = {"Suma"},
["sqn"] = {"Susquehannock"},
["sqo"] = {"Sorkhei"},
["sqq"] = {"Sou"},
["sqr"] = {"Siculo Arabic"},
["sqs"] = {"Sri Lankan Sign Language"},
["sqt"] = {"Soqotri"},
["squ"] = {"Squamish"},
["sra"] = {"Saruga"},
["srb"] = {"Sora"},
["src"] = {"Logudorese Sardinian"},
["sre"] = {"Sara"},
["srf"] = {"Nafi"},
["srg"] = {"Sulod"},
["srh"] = {"Sarikoli"},
["sri"] = {"Siriano"},
["srk"] = {"Serudung Murut"},
["srl"] = {"Isirawa"},
["srm"] = {"Saramaccan"},
["srn"] = {"Sranan Tongo"},
["sro"] = {"Campidanese Sardinian"},
["srq"] = {"Sirionó"},
["srr"] = {"Serer"},
["srs"] = {"Sarsi"},
["srt"] = {"Sauri"},
["sru"] = {"Suruí"},
["srv"] = {"Southern Sorsoganon"},
["srw"] = {"Serua"},
["srx"] = {"Sirmauri"},
["sry"] = {"Sera"},
["srz"] = {"Shahmirzadi"},
["ssa"] = {"Nilo-Saharan languages"},
["ssb"] = {"Southern Sama"},
["ssc"] = {"Suba-Simbiti"},
["ssd"] = {"Siroi"},
["sse"] = {"Balangingi", "Bangingih Sama"},
["ssf"] = {"Thao"},
["ssg"] = {"Seimat"},
["ssh"] = {"Shihhi Arabic"},
["ssi"] = {"Sansi"},
["ssj"] = {"Sausi"},
["ssk"] = {"Sunam"},
["ssl"] = {"Western Sisaala"},
["ssm"] = {"Semnam"},
["ssn"] = {"Waata"},
["sso"] = {"Sissano"},
["ssp"] = {"Spanish Sign Language"},
["ssq"] = {"So'a"},
["ssr"] = {"Swiss-French Sign Language"},
["sss"] = {"Sô"},
["sst"] = {"Sinasina"},
["ssu"] = {"Susuami"},
["ssv"] = {"Shark Bay"},
["ssx"] = {"Samberigi"},
["ssy"] = {"Saho"},
["ssz"] = {"Sengseng"},
["sta"] = {"Settla"},
["stb"] = {"Northern Subanen"},
["std"] = {"Sentinel"},
["ste"] = {"Liana-Seti"},
["stf"] = {"Seta"},
["stg"] = {"Trieng"},
["sth"] = {"Shelta"},
["sti"] = {"Bulo Stieng"},
["stj"] = {"Matya Samo"},
["stk"] = {"Arammba"},
["stl"] = {"Stellingwerfs"},
["stm"] = {"Setaman"},
["stn"] = {"Owa"},
["sto"] = {"Stoney"},
["stp"] = {"Southeastern Tepehuan"},
["stq"] = {"Saterfriesisch"},
["str"] = {"Straits Salish"},
["sts"] = {"Shumashti"},
["stt"] = {"Budeh Stieng"},
["stu"] = {"Samtao"},
["stv"] = {"Silt'e"},
["stw"] = {"Satawalese"},
["sty"] = {"Siberian Tatar"},
["sua"] = {"Sulka"},
["sub"] = {"Suku"},
["suc"] = {"Western Subanon"},
["sue"] = {"Suena"},
["sug"] = {"Suganga"},
["sui"] = {"Suki"},
["suj"] = {"Shubi"},
["suk"] = {"Sukuma"},
["suq"] = {"Suri"},
["sur"] = {"Mwaghavul"},
["sus"] = {"Susu"},
["sut"] = {"Subtiaba"},
["suv"] = {"Puroik"},
["suw"] = {"Sumbwa"},
["sux"] = {"Sumerian"},
["suy"] = {"Suyá"},
["suz"] = {"Sunwar"},
["sva"] = {"Svan"},
["svb"] = {"Ulau-Suain"},
["svc"] = {"Vincentian Creole English"},
["sve"] = {"Serili"},
["svk"] = {"Slovakian Sign Language"},
["svm"] = {"Slavomolisano"},
["svs"] = {"Savosavo"},
["svx"] = {"Skalvian"},
["swb"] = {"Maore Comorian"},
["swc"] = {"Congo Swahili"},
["swf"] = {"Sere"},
["swg"] = {"Swabian"},
["swh"] = {"Swahili (individual language)", "Kiswahili"},
["swi"] = {"Sui"},
["swj"] = {"Sira"},
["swk"] = {"Malawi Sena"},
["swl"] = {"Swedish Sign Language"},
["swm"] = {"Samosa"},
["swn"] = {"Sawknah"},
["swo"] = {"Shanenawa"},
["swp"] = {"Suau"},
["swq"] = {"Sharwa"},
["swr"] = {"Saweru"},
["sws"] = {"Seluwasan"},
["swt"] = {"Sawila"},
["swu"] = {"Suwawa"},
["swv"] = {"Shekhawati"},
["sww"] = {"Sowa"},
["swx"] = {"Suruahá"},
["swy"] = {"Sarua"},
["sxb"] = {"Suba"},
["sxc"] = {"Sicanian"},
["sxe"] = {"Sighu"},
["sxg"] = {"Shuhi", "Shixing"},
["sxk"] = {"Southern Kalapuya"},
["sxl"] = {"Selian"},
["sxm"] = {"Samre"},
["sxn"] = {"Sangir"},
["sxo"] = {"Sorothaptic"},
["sxr"] = {"Saaroa"},
["sxs"] = {"Sasaru"},
["sxu"] = {"Upper Saxon"},
["sxw"] = {"Saxwe Gbe"},
["sya"] = {"Siang"},
["syb"] = {"Central Subanen"},
["syc"] = {"Classical Syriac"},
["syd"] = {"Samoyedic languages"},
["syi"] = {"Seki"},
["syk"] = {"Sukur"},
["syl"] = {"Sylheti"},
["sym"] = {"Maya Samo"},
["syn"] = {"Senaya"},
["syo"] = {"Suoy"},
["syr"] = {"Syriac"},
["sys"] = {"Sinyar"},
["syw"] = {"Kagate"},
["syx"] = {"Samay"},
["syy"] = {"Al-Sayyid Bedouin Sign Language"},
["sza"] = {"Semelai"},
["szb"] = {"Ngalum"},
["szc"] = {"Semaq Beri"},
["szd"] = {"Seru"},
["sze"] = {"Seze"},
["szg"] = {"Sengele"},
["szl"] = {"Silesian"},
["szn"] = {"Sula"},
["szp"] = {"Suabo"},
["szs"] = {"Solomon Islands Sign Language"},
["szv"] = {"Isu (Fako Division)"},
["szw"] = {"Sawai"},
["szy"] = {"Sakizaya"},
["taa"] = {"Lower Tanana"},
["tab"] = {"Tabassaran"},
["tac"] = {"Lowland Tarahumara"},
["tad"] = {"Tause"},
["tae"] = {"Tariana"},
["taf"] = {"Tapirapé"},
["tag"] = {"Tagoi"},
["tai"] = {"Tai languages"},
["taj"] = {"Eastern Tamang"},
["tak"] = {"Tala"},
["tal"] = {"Tal"},
["tan"] = {"Tangale"},
["tao"] = {"Yami"},
["tap"] = {"Taabwa"},
["taq"] = {"Tamasheq"},
["tar"] = {"Central Tarahumara"},
["tas"] = {"Tay Boi"},
["tau"] = {"Upper Tanana"},
["tav"] = {"Tatuyo"},
["taw"] = {"Tai"},
["tax"] = {"Tamki"},
["tay"] = {"Atayal"},
["taz"] = {"Tocho"},
["tba"] = {"Aikanã"},
["tbc"] = {"Takia"},
["tbd"] = {"Kaki Ae"},
["tbe"] = {"Tanimbili"},
["tbf"] = {"Mandara"},
["tbg"] = {"North Tairora"},
["tbh"] = {"Dharawal", "Thurawal"},
["tbi"] = {"Gaam"},
["tbj"] = {"Tiang"},
["tbk"] = {"Calamian Tagbanwa"},
["tbl"] = {"Tboli"},
["tbm"] = {"Tagbu"},
["tbn"] = {"Barro Negro Tunebo"},
["tbo"] = {"Tawala"},
["tbp"] = {"Taworta", "Diebroud"},
["tbq"] = {"Tibeto-Burman languages"},
["tbr"] = {"Tumtum"},
["tbs"] = {"Tanguat"},
["tbt"] = {"Tembo (Kitembo)"},
["tbu"] = {"Tubar"},
["tbv"] = {"Tobo"},
["tbw"] = {"Tagbanwa"},
["tbx"] = {"Kapin"},
["tby"] = {"Tabaru"},
["tbz"] = {"Ditammari"},
["tca"] = {"Ticuna"},
["tcb"] = {"Tanacross"},
["tcc"] = {"Datooga"},
["tcd"] = {"Tafi"},
["tce"] = {"Southern Tutchone"},
["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"},
["tcg"] = {"Tamagario"},
["tch"] = {"Turks And Caicos Creole English"},
["tci"] = {"Wára"},
["tck"] = {"Tchitchege"},
["tcl"] = {"Taman (Myanmar)"},
["tcm"] = {"Tanahmerah"},
["tcn"] = {"Tichurong"},
["tco"] = {"Taungyo"},
["tcp"] = {"Tawr Chin"},
["tcq"] = {"Kaiy"},
["tcs"] = {"Torres Strait Creole", "Yumplatok"},
["tct"] = {"T'en"},
["tcu"] = {"Southeastern Tarahumara"},
["tcw"] = {"Tecpatlán Totonac"},
["tcx"] = {"Toda"},
["tcy"] = {"Tulu"},
["tcz"] = {"Thado Chin"},
["tda"] = {"Tagdal"},
["tdb"] = {"Panchpargania"},
["tdc"] = {"Emberá-Tadó"},
["tdd"] = {"Tai Nüa"},
["tde"] = {"Tiranige Diga Dogon"},
["tdf"] = {"Talieng"},
["tdg"] = {"Western Tamang"},
["tdh"] = {"Thulung"},
["tdi"] = {"Tomadino"},
["tdj"] = {"Tajio"},
["tdk"] = {"Tambas"},
["tdl"] = {"Sur"},
["tdm"] = {"Taruma"},
["tdn"] = {"Tondano"},
["tdo"] = {"Teme"},
["tdq"] = {"Tita"},
["tdr"] = {"Todrah"},
["tds"] = {"Doutai"},
["tdt"] = {"Tetun Dili"},
["tdv"] = {"Toro"},
["tdx"] = {"Tandroy-Mahafaly Malagasy"},
["tdy"] = {"Tadyawan"},
["tea"] = {"Temiar"},
["teb"] = {"Tetete"},
["tec"] = {"Terik"},
["ted"] = {"Tepo Krumen"},
["tee"] = {"Huehuetla Tepehua"},
["tef"] = {"Teressa"},
["teg"] = {"Teke-Tege"},
["teh"] = {"Tehuelche"},
["tei"] = {"Torricelli"},
["tek"] = {"Ibali Teke"},
["tem"] = {"Timne"},
["ten"] = {"Tama (Colombia)"},
["teo"] = {"Teso"},
["tep"] = {"Tepecano"},
["teq"] = {"Temein"},
["ter"] = {"Tereno"},
["tes"] = {"Tengger"},
["tet"] = {"Tetum"},
["teu"] = {"Soo"},
["tev"] = {"Teor"},
["tew"] = {"Tewa (USA)"},
["tex"] = {"Tennet"},
["tey"] = {"Tulishi"},
["tez"] = {"Tetserret"},
["tfi"] = {"Tofin Gbe"},
["tfn"] = {"Tanaina"},
["tfo"] = {"Tefaro"},
["tfr"] = {"Teribe"},
["tft"] = {"Ternate"},
["tga"] = {"Sagalla"},
["tgb"] = {"Tobilung"},
["tgc"] = {"Tigak"},
["tgd"] = {"Ciwogai"},
["tge"] = {"Eastern Gorkha Tamang"},
["tgf"] = {"Chalikha"},
["tgh"] = {"Tobagonian Creole English"},
["tgi"] = {"Lawunuia"},
["tgj"] = {"Tagin"},
["tgn"] = {"Tandaganon"},
["tgo"] = {"Sudest"},
["tgp"] = {"Tangoa"},
["tgq"] = {"Tring"},
["tgr"] = {"Tareng"},
["tgs"] = {"Nume"},
["tgt"] = {"Central Tagbanwa"},
["tgu"] = {"Tanggu"},
["tgv"] = {"Tingui-Boto"},
["tgw"] = {"Tagwana Senoufo"},
["tgx"] = {"Tagish"},
["tgy"] = {"Togoyo"},
["tgz"] = {"Tagalaka"},
["thd"] = {"Kuuk Thaayorre", "Thayore"},
["the"] = {"Chitwania Tharu"},
["thf"] = {"Thangmi"},
["thh"] = {"Northern Tarahumara"},
["thi"] = {"Tai Long"},
["thk"] = {"Tharaka", "Kitharaka"},
["thl"] = {"Dangaura Tharu"},
["thm"] = {"Aheu"},
["thn"] = {"Thachanadan"},
["thp"] = {"Thompson"},
["thq"] = {"Kochila Tharu"},
["thr"] = {"Rana Tharu"},
["ths"] = {"Thakali"},
["tht"] = {"Tahltan"},
["thu"] = {"Thuri"},
["thv"] = {"Tahaggart Tamahaq"},
["thy"] = {"Tha"},
["thz"] = {"Tayart Tamajeq"},
["tia"] = {"Tidikelt Tamazight"},
["tic"] = {"Tira"},
["tif"] = {"Tifal"},
["tig"] = {"Tigre"},
["tih"] = {"Timugon Murut"},
["tii"] = {"Tiene"},
["tij"] = {"Tilung"},
["tik"] = {"Tikar"},
["til"] = {"Tillamook"},
["tim"] = {"Timbe"},
["tin"] = {"Tindi"},
["tio"] = {"Teop"},
["tip"] = {"Trimuris"},
["tiq"] = {"Tiéfo"},
["tis"] = {"Masadiit Itneg"},
["tit"] = {"Tinigua"},
["tiu"] = {"Adasen"},
["tiv"] = {"Tiv"},
["tiw"] = {"Tiwi"},
["tix"] = {"Southern Tiwa"},
["tiy"] = {"Tiruray"},
["tiz"] = {"Tai Hongjin"},
["tja"] = {"Tajuasohn"},
["tjg"] = {"Tunjung"},
["tji"] = {"Northern Tujia"},
["tjj"] = {"Tjungundji"},
["tjl"] = {"Tai Laing"},
["tjm"] = {"Timucua"},
["tjn"] = {"Tonjon"},
["tjo"] = {"Temacine Tamazight"},
["tjp"] = {"Tjupany"},
["tjs"] = {"Southern Tujia"},
["tju"] = {"Tjurruru"},
["tjw"] = {"Djabwurrung"},
["tka"] = {"Truká"},
["tkb"] = {"Buksa"},
["tkd"] = {"Tukudede"},
["tke"] = {"Takwane"},
["tkf"] = {"Tukumanféd"},
["tkg"] = {"Tesaka Malagasy"},
["tkl"] = {"Tokelau"},
["tkm"] = {"Takelma"},
["tkn"] = {"Toku-No-Shima"},
["tkp"] = {"Tikopia"},
["tkq"] = {"Tee"},
["tkr"] = {"Tsakhur"},
["tks"] = {"Takestani"},
["tkt"] = {"Kathoriya Tharu"},
["tku"] = {"Upper Necaxa Totonac"},
["tkv"] = {"Mur Pano"},
["tkw"] = {"Teanu"},
["tkx"] = {"Tangko"},
["tkz"] = {"Takua"},
["tla"] = {"Southwestern Tepehuan"},
["tlb"] = {"Tobelo"},
["tlc"] = {"Yecuatla Totonac"},
["tld"] = {"Talaud"},
["tlf"] = {"Telefol"},
["tlg"] = {"Tofanma"},
["tlh"] = {"Klingon", "tlhIngan Hol"},
["tli"] = {"Tlingit"},
["tlj"] = {"Talinga-Bwisi"},
["tlk"] = {"Taloki"},
["tll"] = {"Tetela"},
["tlm"] = {"Tolomako"},
["tln"] = {"Talondo'"},
["tlo"] = {"Talodi"},
["tlp"] = {"Filomena Mata-Coahuitlán Totonac"},
["tlq"] = {"Tai Loi"},
["tlr"] = {"Talise"},
["tls"] = {"Tambotalo"},
["tlt"] = {"Sou Nama", "Teluti"},
["tlu"] = {"Tulehu"},
["tlv"] = {"Taliabu"},
["tlx"] = {"Khehek"},
["tly"] = {"Talysh"},
["tma"] = {"Tama (Chad)"},
["tmb"] = {"Katbol", "Avava"},
["tmc"] = {"Tumak"},
["tmd"] = {"Haruai"},
["tme"] = {"Tremembé"},
["tmf"] = {"Toba-Maskoy"},
["tmg"] = {"Ternateño"},
["tmh"] = {"Tamashek"},
["tmi"] = {"Tutuba"},
["tmj"] = {"Samarokena"},
["tmk"] = {"Northwestern Tamang"},
["tml"] = {"Tamnim Citak"},
["tmm"] = {"Tai Thanh"},
["tmn"] = {"Taman (Indonesia)"},
["tmo"] = {"Temoq"},
["tmq"] = {"Tumleo"},
["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"},
["tms"] = {"Tima"},
["tmt"] = {"Tasmate"},
["tmu"] = {"Iau"},
["tmv"] = {"Tembo (Motembo)"},
["tmw"] = {"Temuan"},
["tmy"] = {"Tami"},
["tmz"] = {"Tamanaku"},
["tna"] = {"Tacana"},
["tnb"] = {"Western Tunebo"},
["tnc"] = {"Tanimuca-Retuarã"},
["tnd"] = {"Angosturas Tunebo"},
["tng"] = {"Tobanga"},
["tnh"] = {"Maiani"},
["tni"] = {"Tandia"},
["tnk"] = {"Kwamera"},
["tnl"] = {"Lenakel"},
["tnm"] = {"Tabla"},
["tnn"] = {"North Tanna"},
["tno"] = {"Toromono"},
["tnp"] = {"Whitesands"},
["tnq"] = {"Taino"},
["tnr"] = {"Ménik"},
["tns"] = {"Tenis"},
["tnt"] = {"Tontemboan"},
["tnu"] = {"Tay Khang"},
["tnv"] = {"Tangchangya"},
["tnw"] = {"Tonsawang"},
["tnx"] = {"Tanema"},
["tny"] = {"Tongwe"},
["tnz"] = {"Ten'edn"},
["tob"] = {"Toba"},
["toc"] = {"Coyutla Totonac"},
["tod"] = {"Toma"},
["tof"] = {"Gizrra"},
["tog"] = {"Tonga (Nyasa)"},
["toh"] = {"Gitonga"},
["toi"] = {"Tonga (Zambia)"},
["toj"] = {"Tojolabal"},
["tol"] = {"Tolowa"},
["tom"] = {"Tombulu"},
["too"] = {"Xicotepec De Juárez Totonac"},
["top"] = {"Papantla Totonac"},
["toq"] = {"Toposa"},
["tor"] = {"Togbo-Vara Banda"},
["tos"] = {"Highland Totonac"},
["tou"] = {"Tho"},
["tov"] = {"Upper Taromi"},
["tow"] = {"Jemez"},
["tox"] = {"Tobian"},
["toy"] = {"Topoiyo"},
["toz"] = {"To"},
["tpa"] = {"Taupota"},
["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"},
["tpe"] = {"Tippera"},
["tpf"] = {"Tarpia"},
["tpg"] = {"Kula"},
["tpi"] = {"Tok Pisin"},
["tpj"] = {"Tapieté"},
["tpk"] = {"Tupinikin"},
["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"},
["tpm"] = {"Tampulma"},
["tpn"] = {"Tupinambá"},
["tpo"] = {"Tai Pao"},
["tpp"] = {"Pisaflores Tepehua"},
["tpq"] = {"Tukpa"},
["tpr"] = {"Tuparí"},
["tpt"] = {"Tlachichilco Tepehua"},
["tpu"] = {"Tampuan"},
["tpv"] = {"Tanapag"},
["tpw"] = {"Tupí"},
["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"},
["tpy"] = {"Trumai"},
["tpz"] = {"Tinputz"},
["tqb"] = {"Tembé"},
["tql"] = {"Lehali"},
["tqm"] = {"Turumsa"},
["tqn"] = {"Tenino"},
["tqo"] = {"Toaripi"},
["tqp"] = {"Tomoip"},
["tqq"] = {"Tunni"},
["tqr"] = {"Torona"},
["tqt"] = {"Western Totonac"},
["tqu"] = {"Touo"},
["tqw"] = {"Tonkawa"},
["tra"] = {"Tirahi"},
["trb"] = {"Terebu"},
["trc"] = {"Copala Triqui"},
["trd"] = {"Turi"},
["tre"] = {"East Tarangan"},
["trf"] = {"Trinidadian Creole English"},
["trg"] = {"Lishán Didán"},
["trh"] = {"Turaka"},
["tri"] = {"Trió"},
["trj"] = {"Toram"},
["trk"] = {"Turkic languages"},
["trl"] = {"Traveller Scottish"},
["trm"] = {"Tregami"},
["trn"] = {"Trinitario"},
["tro"] = {"Tarao Naga"},
["trp"] = {"Kok Borok"},
["trq"] = {"San Martín Itunyoso Triqui"},
["trr"] = {"Taushiro"},
["trs"] = {"Chicahuaxtla Triqui"},
["trt"] = {"Tunggare"},
["tru"] = {"Turoyo", "Surayt"},
["trv"] = {"Taroko"},
["trw"] = {"Torwali"},
["trx"] = {"Tringgus-Sembaan Bidayuh"},
["try"] = {"Turung"},
["trz"] = {"Torá"},
["tsa"] = {"Tsaangi"},
["tsb"] = {"Tsamai"},
["tsc"] = {"Tswa"},
["tsd"] = {"Tsakonian"},
["tse"] = {"Tunisian Sign Language"},
["tsg"] = {"Tausug"},
["tsh"] = {"Tsuvan"},
["tsi"] = {"Tsimshian"},
["tsj"] = {"Tshangla"},
["tsk"] = {"Tseku"},
["tsl"] = {"Ts'ün-Lao"},
["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"},
["tsp"] = {"Northern Toussian"},
["tsq"] = {"Thai Sign Language"},
["tsr"] = {"Akei"},
["tss"] = {"Taiwan Sign Language"},
["tst"] = {"Tondi Songway Kiini"},
["tsu"] = {"Tsou"},
["tsv"] = {"Tsogo"},
["tsw"] = {"Tsishingini"},
["tsx"] = {"Mubami"},
["tsy"] = {"Tebul Sign Language"},
["tsz"] = {"Purepecha"},
["tta"] = {"Tutelo"},
["ttb"] = {"Gaa"},
["ttc"] = {"Tektiteko"},
["ttd"] = {"Tauade"},
["tte"] = {"Bwanabwana"},
["ttf"] = {"Tuotomb"},
["ttg"] = {"Tutong"},
["tth"] = {"Upper Ta'oih"},
["tti"] = {"Tobati"},
["ttj"] = {"Tooro"},
["ttk"] = {"Totoro"},
["ttl"] = {"Totela"},
["ttm"] = {"Northern Tutchone"},
["ttn"] = {"Towei"},
["tto"] = {"Lower Ta'oih"},
["ttp"] = {"Tombelala"},
["ttq"] = {"Tawallammat Tamajaq"},
["ttr"] = {"Tera"},
["tts"] = {"Northeastern Thai"},
["ttt"] = {"Muslim Tat"},
["ttu"] = {"Torau"},
["ttv"] = {"Titan"},
["ttw"] = {"Long Wat"},
["tty"] = {"Sikaritai"},
["ttz"] = {"Tsum"},
["tua"] = {"Wiarumus"},
["tub"] = {"Tübatulabal"},
["tuc"] = {"Mutu"},
["tud"] = {"Tuxá"},
["tue"] = {"Tuyuca"},
["tuf"] = {"Central Tunebo"},
["tug"] = {"Tunia"},
["tuh"] = {"Taulil"},
["tui"] = {"Tupuri"},
["tuj"] = {"Tugutil"},
["tul"] = {"Tula"},
["tum"] = {"Tumbuka"},
["tun"] = {"Tunica"},
["tuo"] = {"Tucano"},
["tup"] = {"Tupi languages"},
["tuq"] = {"Tedaga"},
["tus"] = {"Tuscarora"},
["tut"] = {"Altaic languages"},
["tuu"] = {"Tututni"},
["tuv"] = {"Turkana"},
["tuw"] = {"Tungus languages"},
["tux"] = {"Tuxináwa"},
["tuy"] = {"Tugen"},
["tuz"] = {"Turka"},
["tva"] = {"Vaghua"},
["tvd"] = {"Tsuvadi"},
["tve"] = {"Te'un"},
["tvk"] = {"Southeast Ambrym"},
["tvl"] = {"Tuvalu"},
["tvm"] = {"Tela-Masbuar"},
["tvn"] = {"Tavoyan"},
["tvo"] = {"Tidore"},
["tvs"] = {"Taveta"},
["tvt"] = {"Tutsa Naga"},
["tvu"] = {"Tunen"},
["tvw"] = {"Sedoa"},
["tvx"] = {"Taivoan"},
["tvy"] = {"Timor Pidgin"},
["twa"] = {"Twana"},
["twb"] = {"Western Tawbuid"},
["twc"] = {"Teshenawa"},
["twd"] = {"Twents"},
["twe"] = {"Tewa (Indonesia)"},
["twf"] = {"Northern Tiwa"},
["twg"] = {"Tereweng"},
["twh"] = {"Tai Dón"},
["twl"] = {"Tawara"},
["twm"] = {"Tawang Monpa"},
["twn"] = {"Twendi"},
["two"] = {"Tswapong"},
["twp"] = {"Ere"},
["twq"] = {"Tasawaq"},
["twr"] = {"Southwestern Tarahumara"},
["twt"] = {"Turiwára"},
["twu"] = {"Termanu"},
["tww"] = {"Tuwari"},
["twx"] = {"Tewe"},
["twy"] = {"Tawoyan"},
["txa"] = {"Tombonuo"},
["txb"] = {"Tokharian B"},
["txc"] = {"Tsetsaut"},
["txe"] = {"Totoli"},
["txg"] = {"Tangut"},
["txh"] = {"Thracian"},
["txi"] = {"Ikpeng"},
["txj"] = {"Tarjumo"},
["txm"] = {"Tomini"},
["txn"] = {"West Tarangan"},
["txo"] = {"Toto"},
["txq"] = {"Tii"},
["txr"] = {"Tartessian"},
["txs"] = {"Tonsea"},
["txt"] = {"Citak"},
["txu"] = {"Kayapó"},
["txx"] = {"Tatana"},
["txy"] = {"Tanosy Malagasy"},
["tya"] = {"Tauya"},
["tye"] = {"Kyanga"},
["tyh"] = {"O'du"},
["tyi"] = {"Teke-Tsaayi"},
["tyj"] = {"Tai Do", "Tai Yo"},
["tyl"] = {"Thu Lao"},
["tyn"] = {"Kombai"},
["typ"] = {"Thaypan"},
["tyr"] = {"Tai Daeng"},
["tys"] = {"Tày Sa Pa"},
["tyt"] = {"Tày Tac"},
["tyu"] = {"Kua"},
["tyv"] = {"Tuvinian"},
["tyx"] = {"Teke-Tyee"},
["tyz"] = {"Tày"},
["tza"] = {"Tanzanian Sign Language"},
["tzh"] = {"Tzeltal"},
["tzj"] = {"Tz'utujil"},
["tzl"] = {"Talossan"},
["tzm"] = {"Central Atlas Tamazight"},
["tzn"] = {"Tugun"},
["tzo"] = {"Tzotzil"},
["tzx"] = {"Tabriak"},
["uam"] = {"Uamué"},
["uan"] = {"Kuan"},
["uar"] = {"Tairuma"},
["uba"] = {"Ubang"},
["ubi"] = {"Ubi"},
["ubl"] = {"Buhi'non Bikol"},
["ubr"] = {"Ubir"},
["ubu"] = {"Umbu-Ungu"},
["uby"] = {"Ubykh"},
["uda"] = {"Uda"},
["ude"] = {"Udihe"},
["udg"] = {"Muduga"},
["udi"] = {"Udi"},
["udj"] = {"Ujir"},
["udl"] = {"Wuzlam"},
["udm"] = {"Udmurt"},
["udu"] = {"Uduk"},
["ues"] = {"Kioko"},
["ufi"] = {"Ufim"},
["uga"] = {"Ugaritic"},
["ugb"] = {"Kuku-Ugbanh"},
["uge"] = {"Ughele"},
["ugn"] = {"Ugandan Sign Language"},
["ugo"] = {"Ugong"},
["ugy"] = {"Uruguayan Sign Language"},
["uha"] = {"Uhami"},
["uhn"] = {"Damal"},
["uis"] = {"Uisai"},
["uiv"] = {"Iyive"},
["uji"] = {"Tanjijili"},
["uka"] = {"Kaburi"},
["ukg"] = {"Ukuriguma"},
["ukh"] = {"Ukhwejo"},
["uki"] = {"Kui (India)"},
["ukk"] = {"Muak Sa-aak"},
["ukl"] = {"Ukrainian Sign Language"},
["ukp"] = {"Ukpe-Bayobiri"},
["ukq"] = {"Ukwa"},
["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"},
["uku"] = {"Ukue"},
["ukv"] = {"Kuku"},
["ukw"] = {"Ukwuani-Aboh-Ndoni"},
["uky"] = {"Kuuk-Yak"},
["ula"] = {"Fungwa"},
["ulb"] = {"Ulukwumi"},
["ulc"] = {"Ulch"},
["ule"] = {"Lule"},
["ulf"] = {"Usku", "Afra"},
["uli"] = {"Ulithian"},
["ulk"] = {"Meriam Mir"},
["ull"] = {"Ullatan"},
["ulm"] = {"Ulumanda'"},
["uln"] = {"Unserdeutsch"},
["ulu"] = {"Uma' Lung"},
["ulw"] = {"Ulwa"},
["uma"] = {"Umatilla"},
["umb"] = {"Umbundu"},
["umc"] = {"Marrucinian"},
["umd"] = {"Umbindhamu"},
["umg"] = {"Morrobalama", "Umbuygamu"},
["umi"] = {"Ukit"},
["umm"] = {"Umon"},
["umn"] = {"Makyan Naga"},
["umo"] = {"Umotína"},
["ump"] = {"Umpila"},
["umr"] = {"Umbugarla"},
["ums"] = {"Pendau"},
["umu"] = {"Munsee"},
["una"] = {"North Watut"},
["und"] = {"Undetermined"},
["une"] = {"Uneme"},
["ung"] = {"Ngarinyin"},
["unk"] = {"Enawené-Nawé"},
["unm"] = {"Unami"},
["unn"] = {"Kurnai"},
["unr"] = {"Mundari"},
["unu"] = {"Unubahe"},
["unx"] = {"Munda"},
["unz"] = {"Unde Kaili"},
["upi"] = {"Umeda"},
["upv"] = {"Uripiv-Wala-Rano-Atchin"},
["ura"] = {"Urarina"},
["urb"] = {"Urubú-Kaapor", "Kaapor"},
["urc"] = {"Urningangg"},
["ure"] = {"Uru"},
["urf"] = {"Uradhi"},
["urg"] = {"Urigina"},
["urh"] = {"Urhobo"},
["uri"] = {"Urim"},
["urj"] = {"Uralic languages"},
["urk"] = {"Urak Lawoi'"},
["url"] = {"Urali"},
["urm"] = {"Urapmin"},
["urn"] = {"Uruangnirin"},
["uro"] = {"Ura (Papua New Guinea)"},
["urp"] = {"Uru-Pa-In"},
["urr"] = {"Lehalurup", "Löyöp"},
["urt"] = {"Urat"},
["uru"] = {"Urumi"},
["urv"] = {"Uruava"},
["urw"] = {"Sop"},
["urx"] = {"Urimo"},
["ury"] = {"Orya"},
["urz"] = {"Uru-Eu-Wau-Wau"},
["usa"] = {"Usarufa"},
["ush"] = {"Ushojo"},
["usi"] = {"Usui"},
["usk"] = {"Usaghade"},
["usp"] = {"Uspanteco"},
["uss"] = {"us-Saare"},
["usu"] = {"Uya"},
["uta"] = {"Otank"},
["ute"] = {"Ute-Southern Paiute"},
["uth"] = {"ut-Hun"},
["utp"] = {"Amba (Solomon Islands)"},
["utr"] = {"Etulo"},
["utu"] = {"Utu"},
["uum"] = {"Urum"},
["uun"] = {"Kulon-Pazeh"},
["uur"] = {"Ura (Vanuatu)"},
["uuu"] = {"U"},
["uve"] = {"West Uvean", "Fagauvea"},
["uvh"] = {"Uri"},
["uvl"] = {"Lote"},
["uwa"] = {"Kuku-Uwanh"},
["uya"] = {"Doko-Uyanga"},
["uzn"] = {"Northern Uzbek"},
["uzs"] = {"Southern Uzbek"},
["vaa"] = {"Vaagri Booli"},
["vae"] = {"Vale"},
["vaf"] = {"Vafsi"},
["vag"] = {"Vagla"},
["vah"] = {"Varhadi-Nagpuri"},
["vai"] = {"Vai"},
["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"},
["val"] = {"Vehes"},
["vam"] = {"Vanimo"},
["van"] = {"Valman"},
["vao"] = {"Vao"},
["vap"] = {"Vaiphei"},
["var"] = {"Huarijio"},
["vas"] = {"Vasavi"},
["vau"] = {"Vanuma"},
["vav"] = {"Varli"},
["vay"] = {"Wayu"},
["vbb"] = {"Southeast Babar"},
["vbk"] = {"Southwestern Bontok"},
["vec"] = {"Venetian"},
["ved"] = {"Veddah"},
["vel"] = {"Veluws"},
["vem"] = {"Vemgo-Mabas"},
["veo"] = {"Ventureño"},
["vep"] = {"Veps"},
["ver"] = {"Mom Jango"},
["vgr"] = {"Vaghri"},
["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"},
["vic"] = {"Virgin Islands Creole English"},
["vid"] = {"Vidunda"},
["vif"] = {"Vili"},
["vig"] = {"Viemo"},
["vil"] = {"Vilela"},
["vin"] = {"Vinza"},
["vis"] = {"Vishavan"},
["vit"] = {"Viti"},
["viv"] = {"Iduna"},
["vka"] = {"Kariyarra"},
["vki"] = {"Ija-Zuba"},
["vkj"] = {"Kujarge"},
["vkk"] = {"Kaur"},
["vkl"] = {"Kulisusu"},
["vkm"] = {"Kamakan"},
["vko"] = {"Kodeoha"},
["vkp"] = {"Korlai Creole Portuguese"},
["vkt"] = {"Tenggarong Kutai Malay"},
["vku"] = {"Kurrama"},
["vlp"] = {"Valpei"},
["vls"] = {"Vlaams"},
["vma"] = {"Martuyhunira"},
["vmb"] = {"Barbaram"},
["vmc"] = {"Juxtlahuaca Mixtec"},
["vmd"] = {"Mudu Koraga"},
["vme"] = {"East Masela"},
["vmf"] = {"Mainfränkisch"},
["vmg"] = {"Lungalunga"},
["vmh"] = {"Maraghei"},
["vmi"] = {"Miwa"},
["vmj"] = {"Ixtayutla Mixtec"},
["vmk"] = {"Makhuwa-Shirima"},
["vml"] = {"Malgana"},
["vmm"] = {"Mitlatongo Mixtec"},
["vmp"] = {"Soyaltepec Mazatec"},
["vmq"] = {"Soyaltepec Mixtec"},
["vmr"] = {"Marenje"},
["vms"] = {"Moksela"},
["vmu"] = {"Muluridyi"},
["vmv"] = {"Valley Maidu"},
["vmw"] = {"Makhuwa"},
["vmx"] = {"Tamazola Mixtec"},
["vmy"] = {"Ayautla Mazatec"},
["vmz"] = {"Mazatlán Mazatec"},
["vnk"] = {"Vano", "Lovono"},
["vnm"] = {"Vinmavis", "Neve'ei"},
["vnp"] = {"Vunapu"},
["vor"] = {"Voro"},
["vot"] = {"Votic"},
["vra"] = {"Vera'a"},
["vro"] = {"Võro"},
["vrs"] = {"Varisi"},
["vrt"] = {"Burmbar", "Banam Bay"},
["vsi"] = {"Moldova Sign Language"},
["vsl"] = {"Venezuelan Sign Language"},
["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"},
["vto"] = {"Vitou"},
["vum"] = {"Vumbu"},
["vun"] = {"Vunjo"},
["vut"] = {"Vute"},
["vwa"] = {"Awa (China)"},
["waa"] = {"Walla Walla"},
["wab"] = {"Wab"},
["wac"] = {"Wasco-Wishram"},
["wad"] = {"Wandamen"},
["wae"] = {"Walser"},
["waf"] = {"Wakoná"},
["wag"] = {"Wa'ema"},
["wah"] = {"Watubela"},
["wai"] = {"Wares"},
["waj"] = {"Waffa"},
["wak"] = {"Wakashan languages"},
["wal"] = {"Wolaytta", "Wolaitta"},
["wam"] = {"Wampanoag"},
["wan"] = {"Wan"},
["wao"] = {"Wappo"},
["wap"] = {"Wapishana"},
["waq"] = {"Wagiman"},
["war"] = {"Waray (Philippines)"},
["was"] = {"Washo"},
["wat"] = {"Kaninuwa"},
["wau"] = {"Waurá"},
["wav"] = {"Waka"},
["waw"] = {"Waiwai"},
["wax"] = {"Watam", "Marangis"},
["way"] = {"Wayana"},
["waz"] = {"Wampur"},
["wba"] = {"Warao"},
["wbb"] = {"Wabo"},
["wbe"] = {"Waritai"},
["wbf"] = {"Wara"},
["wbh"] = {"Wanda"},
["wbi"] = {"Vwanji"},
["wbj"] = {"Alagwa"},
["wbk"] = {"Waigali"},
["wbl"] = {"Wakhi"},
["wbm"] = {"Wa"},
["wbp"] = {"Warlpiri"},
["wbq"] = {"Waddar"},
["wbr"] = {"Wagdi"},
["wbs"] = {"West Bengal Sign Language"},
["wbt"] = {"Warnman"},
["wbv"] = {"Wajarri"},
["wbw"] = {"Woi"},
["wca"] = {"Yanomámi"},
["wci"] = {"Waci Gbe"},
["wdd"] = {"Wandji"},
["wdg"] = {"Wadaginam"},
["wdj"] = {"Wadjiginy"},
["wdk"] = {"Wadikali"},
["wdu"] = {"Wadjigu"},
["wdy"] = {"Wadjabangayi"},
["wea"] = {"Wewaw"},
["wec"] = {"Wè Western"},
["wed"] = {"Wedau"},
["weg"] = {"Wergaia"},
["weh"] = {"Weh"},
["wei"] = {"Kiunum"},
["wem"] = {"Weme Gbe"},
["wen"] = {"Sorbian languages"},
["weo"] = {"Wemale"},
["wep"] = {"Westphalien"},
["wer"] = {"Weri"},
["wes"] = {"Cameroon Pidgin"},
["wet"] = {"Perai"},
["weu"] = {"Rawngtu Chin"},
["wew"] = {"Wejewa"},
["wfg"] = {"Yafi", "Zorop"},
["wga"] = {"Wagaya"},
["wgb"] = {"Wagawaga"},
["wgg"] = {"Wangkangurru", "Wangganguru"},
["wgi"] = {"Wahgi"},
["wgo"] = {"Waigeo"},
["wgu"] = {"Wirangu"},
["wgy"] = {"Warrgamay"},
["wha"] = {"Sou Upaa", "Manusela"},
["whg"] = {"North Wahgi"},
["whk"] = {"Wahau Kenyah"},
["whu"] = {"Wahau Kayan"},
["wib"] = {"Southern Toussian"},
["wic"] = {"Wichita"},
["wie"] = {"Wik-Epa"},
["wif"] = {"Wik-Keyangan"},
["wig"] = {"Wik Ngathan"},
["wih"] = {"Wik-Me'anha"},
["wii"] = {"Minidien"},
["wij"] = {"Wik-Iiyanh"},
["wik"] = {"Wikalkan"},
["wil"] = {"Wilawila"},
["wim"] = {"Wik-Mungkan"},
["win"] = {"Ho-Chunk"},
["wir"] = {"Wiraféd"},
["wiu"] = {"Wiru"},
["wiv"] = {"Vitu"},
["wiy"] = {"Wiyot"},
["wja"] = {"Waja"},
["wji"] = {"Warji"},
["wka"] = {"Kw'adza"},
["wkb"] = {"Kumbaran"},
["wkd"] = {"Wakde", "Mo"},
["wkl"] = {"Kalanadi"},
["wkr"] = {"Keerray-Woorroong"},
["wku"] = {"Kunduvadi"},
["wkw"] = {"Wakawaka"},
["wky"] = {"Wangkayutyuru"},
["wla"] = {"Walio"},
["wlc"] = {"Mwali Comorian"},
["wle"] = {"Wolane"},
["wlg"] = {"Kunbarlang"},
["wlh"] = {"Welaun"},
["wli"] = {"Waioli"},
["wlk"] = {"Wailaki"},
["wll"] = {"Wali (Sudan)"},
["wlm"] = {"Middle Welsh"},
["wlo"] = {"Wolio"},
["wlr"] = {"Wailapa"},
["wls"] = {"Wallisian"},
["wlu"] = {"Wuliwuli"},
["wlv"] = {"Wichí Lhamtés Vejoz"},
["wlw"] = {"Walak"},
["wlx"] = {"Wali (Ghana)"},
["wly"] = {"Waling"},
["wma"] = {"Mawa (Nigeria)"},
["wmb"] = {"Wambaya"},
["wmc"] = {"Wamas"},
["wmd"] = {"Mamaindé"},
["wme"] = {"Wambule"},
["wmh"] = {"Waima'a"},
["wmi"] = {"Wamin"},
["wmm"] = {"Maiwa (Indonesia)"},
["wmn"] = {"Waamwang"},
["wmo"] = {"Wom (Papua New Guinea)"},
["wms"] = {"Wambon"},
["wmt"] = {"Walmajarri"},
["wmw"] = {"Mwani"},
["wmx"] = {"Womo"},
["wnb"] = {"Wanambre"},
["wnc"] = {"Wantoat"},
["wnd"] = {"Wandarang"},
["wne"] = {"Waneci"},
["wng"] = {"Wanggom"},
["wni"] = {"Ndzwani Comorian"},
["wnk"] = {"Wanukaka"},
["wnm"] = {"Wanggamala"},
["wnn"] = {"Wunumara"},
["wno"] = {"Wano"},
["wnp"] = {"Wanap"},
["wnu"] = {"Usan"},
["wnw"] = {"Wintu"},
["wny"] = {"Wanyi", "Waanyi"},
["woa"] = {"Kuwema", "Tyaraity"},
["wob"] = {"Wè Northern"},
["woc"] = {"Wogeo"},
["wod"] = {"Wolani"},
["woe"] = {"Woleaian"},
["wof"] = {"Gambian Wolof"},
["wog"] = {"Wogamusin"},
["woi"] = {"Kamang"},
["wok"] = {"Longto"},
["wom"] = {"Wom (Nigeria)"},
["won"] = {"Wongo"},
["woo"] = {"Manombai"},
["wor"] = {"Woria"},
["wos"] = {"Hanga Hundi"},
["wow"] = {"Wawonii"},
["woy"] = {"Weyto"},
["wpc"] = {"Maco"},
["wra"] = {"Warapu"},
["wrb"] = {"Waluwarra", "Warluwara"},
["wrd"] = {"Warduji"},
["wrg"] = {"Warungu", "Gudjal"},
["wrh"] = {"Wiradjuri"},
["wri"] = {"Wariyangga"},
["wrk"] = {"Garrwa"},
["wrl"] = {"Warlmanpa"},
["wrm"] = {"Warumungu"},
["wrn"] = {"Warnang"},
["wro"] = {"Worrorra"},
["wrp"] = {"Waropen"},
["wrr"] = {"Wardaman"},
["wrs"] = {"Waris"},
["wru"] = {"Waru"},
["wrv"] = {"Waruna"},
["wrw"] = {"Gugu Warra"},
["wrx"] = {"Wae Rana"},
["wry"] = {"Merwari"},
["wrz"] = {"Waray (Australia)"},
["wsa"] = {"Warembori"},
["wsg"] = {"Adilabad Gondi"},
["wsi"] = {"Wusi"},
["wsk"] = {"Waskia"},
["wsr"] = {"Owenia"},
["wss"] = {"Wasa"},
["wsu"] = {"Wasu"},
["wsv"] = {"Wotapuri-Katarqalai"},
["wtf"] = {"Watiwa"},
["wth"] = {"Wathawurrung"},
["wti"] = {"Berta"},
["wtk"] = {"Watakataui"},
["wtm"] = {"Mewati"},
["wtw"] = {"Wotu"},
["wua"] = {"Wikngenchera"},
["wub"] = {"Wunambal"},
["wud"] = {"Wudu"},
["wuh"] = {"Wutunhua"},
["wul"] = {"Silimo"},
["wum"] = {"Wumbvu"},
["wun"] = {"Bungu"},
["wur"] = {"Wurrugu"},
["wut"] = {"Wutung"},
["wuu"] = {"Wu Chinese"},
["wuv"] = {"Wuvulu-Aua"},
["wux"] = {"Wulna"},
["wuy"] = {"Wauyai"},
["wwa"] = {"Waama"},
["wwb"] = {"Wakabunga"},
["wwo"] = {"Wetamut", "Dorig"},
["wwr"] = {"Warrwa"},
["www"] = {"Wawa"},
["wxa"] = {"Waxianghua"},
["wxw"] = {"Wardandi"},
["wya"] = {"Wyandot"},
["wyb"] = {"Wangaaybuwan-Ngiyambaa"},
["wyi"] = {"Woiwurrung"},
["wym"] = {"Wymysorys"},
["wyr"] = {"Wayoró"},
["wyy"] = {"Western Fijian"},
["xaa"] = {"Andalusian Arabic"},
["xab"] = {"Sambe"},
["xac"] = {"Kachari"},
["xad"] = {"Adai"},
["xae"] = {"Aequian"},
["xag"] = {"Aghwan"},
["xai"] = {"Kaimbé"},
["xaj"] = {"Ararandewára"},
["xak"] = {"Máku"},
["xal"] = {"Kalmyk", "Oirat"},
["xam"] = {"ǀXam"},
["xan"] = {"Xamtanga"},
["xao"] = {"Khao"},
["xap"] = {"Apalachee"},
["xaq"] = {"Aquitanian"},
["xar"] = {"Karami"},
["xas"] = {"Kamas"},
["xat"] = {"Katawixi"},
["xau"] = {"Kauwera"},
["xav"] = {"Xavánte"},
["xaw"] = {"Kawaiisu"},
["xay"] = {"Kayan Mahakam"},
["xbb"] = {"Lower Burdekin"},
["xbc"] = {"Bactrian"},
["xbd"] = {"Bindal"},
["xbe"] = {"Bigambal"},
["xbg"] = {"Bunganditj"},
["xbi"] = {"Kombio"},
["xbj"] = {"Birrpayi"},
["xbm"] = {"Middle Breton"},
["xbn"] = {"Kenaboi"},
["xbo"] = {"Bolgarian"},
["xbp"] = {"Bibbulman"},
["xbr"] = {"Kambera"},
["xbw"] = {"Kambiwá"},
["xby"] = {"Batjala", "Batyala"},
["xcb"] = {"Cumbric"},
["xcc"] = {"Camunic"},
["xce"] = {"Celtiberian"},
["xcg"] = {"Cisalpine Gaulish"},
["xch"] = {"Chemakum", "Chimakum"},
["xcl"] = {"Classical Armenian"},
["xcm"] = {"Comecrudo"},
["xcn"] = {"Cotoname"},
["xco"] = {"Chorasmian"},
["xcr"] = {"Carian"},
["xct"] = {"Classical Tibetan"},
["xcu"] = {"Curonian"},
["xcv"] = {"Chuvantsy"},
["xcw"] = {"Coahuilteco"},
["xcy"] = {"Cayuse"},
["xda"] = {"Darkinyung"},
["xdc"] = {"Dacian"},
["xdk"] = {"Dharuk"},
["xdm"] = {"Edomite"},
["xdo"] = {"Kwandu"},
["xdy"] = {"Malayic Dayak"},
["xeb"] = {"Eblan"},
["xed"] = {"Hdi"},
["xeg"] = {"ǁXegwi"},
["xel"] = {"Kelo"},
["xem"] = {"Kembayan"},
["xep"] = {"Epi-Olmec"},
["xer"] = {"Xerénte"},
["xes"] = {"Kesawai"},
["xet"] = {"Xetá"},
["xeu"] = {"Keoru-Ahia"},
["xfa"] = {"Faliscan"},
["xga"] = {"Galatian"},
["xgb"] = {"Gbin"},
["xgd"] = {"Gudang"},
["xgf"] = {"Gabrielino-Fernandeño"},
["xgg"] = {"Goreng"},
["xgi"] = {"Garingbal"},
["xgl"] = {"Galindan"},
["xgm"] = {"Dharumbal", "Guwinmal"},
["xgn"] = {"Mongolian languages"},
["xgr"] = {"Garza"},
["xgu"] = {"Unggumi"},
["xgw"] = {"Guwa"},
["xha"] = {"Harami"},
["xhc"] = {"Hunnic"},
["xhd"] = {"Hadrami"},
["xhe"] = {"Khetrani"},
["xhr"] = {"Hernican"},
["xht"] = {"Hattic"},
["xhu"] = {"Hurrian"},
["xhv"] = {"Khua"},
["xib"] = {"Iberian"},
["xii"] = {"Xiri"},
["xil"] = {"Illyrian"},
["xin"] = {"Xinca"},
["xir"] = {"Xiriâna"},
["xis"] = {"Kisan"},
["xiv"] = {"Indus Valley Language"},
["xiy"] = {"Xipaya"},
["xjb"] = {"Minjungbal"},
["xjt"] = {"Jaitmatang"},
["xka"] = {"Kalkoti"},
["xkb"] = {"Northern Nago"},
["xkc"] = {"Kho'ini"},
["xkd"] = {"Mendalam Kayan"},
["xke"] = {"Kereho"},
["xkf"] = {"Khengkha"},
["xkg"] = {"Kagoro"},
["xki"] = {"Kenyan Sign Language"},
["xkj"] = {"Kajali"},
["xkk"] = {"Kaco'"},
["xkl"] = {"Mainstream Kenyah"},
["xkn"] = {"Kayan River Kayan"},
["xko"] = {"Kiorr"},
["xkp"] = {"Kabatei"},
["xkq"] = {"Koroni"},
["xkr"] = {"Xakriabá"},
["xks"] = {"Kumbewaha"},
["xkt"] = {"Kantosi"},
["xku"] = {"Kaamba"},
["xkv"] = {"Kgalagadi"},
["xkw"] = {"Kembra"},
["xkx"] = {"Karore"},
["xky"] = {"Uma' Lasan"},
["xkz"] = {"Kurtokha"},
["xla"] = {"Kamula"},
["xlb"] = {"Loup B"},
["xlc"] = {"Lycian"},
["xld"] = {"Lydian"},
["xle"] = {"Lemnian"},
["xlg"] = {"Ligurian (Ancient)"},
["xli"] = {"Liburnian"},
["xln"] = {"Alanic"},
["xlo"] = {"Loup A"},
["xlp"] = {"Lepontic"},
["xls"] = {"Lusitanian"},
["xlu"] = {"Cuneiform Luwian"},
["xly"] = {"Elymian"},
["xma"] = {"Mushungulu"},
["xmb"] = {"Mbonga"},
["xmc"] = {"Makhuwa-Marrevone"},
["xmd"] = {"Mbudum"},
["xme"] = {"Median"},
["xmf"] = {"Mingrelian"},
["xmg"] = {"Mengaka"},
["xmh"] = {"Kugu-Muminh"},
["xmj"] = {"Majera"},
["xmk"] = {"Ancient Macedonian"},
["xml"] = {"Malaysian Sign Language"},
["xmm"] = {"Manado Malay"},
["xmn"] = {"Manichaean Middle Persian"},
["xmo"] = {"Morerebi"},
["xmp"] = {"Kuku-Mu'inh"},
["xmq"] = {"Kuku-Mangk"},
["xmr"] = {"Meroitic"},
["xms"] = {"Moroccan Sign Language"},
["xmt"] = {"Matbat"},
["xmu"] = {"Kamu"},
["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"},
["xmw"] = {"Tsimihety Malagasy"},
["xmx"] = {"Maden"},
["xmy"] = {"Mayaguduna"},
["xmz"] = {"Mori Bawah"},
["xna"] = {"Ancient North Arabian"},
["xnb"] = {"Kanakanabu"},
["xnd"] = {"Na-Dene languages"},
["xng"] = {"Middle Mongolian"},
["xnh"] = {"Kuanhua"},
["xni"] = {"Ngarigu"},
["xnk"] = {"Nganakarti"},
["xnm"] = {"Ngumbarl"},
["xnn"] = {"Northern Kankanay"},
["xno"] = {"Anglo-Norman"},
["xnr"] = {"Kangri"},
["xns"] = {"Kanashi"},
["xnt"] = {"Narragansett"},
["xnu"] = {"Nukunul"},
["xny"] = {"Nyiyaparli"},
["xnz"] = {"Kenzi", "Mattoki"},
["xoc"] = {"O'chi'chi'"},
["xod"] = {"Kokoda"},
["xog"] = {"Soga"},
["xoi"] = {"Kominimung"},
["xok"] = {"Xokleng"},
["xom"] = {"Komo (Sudan)"},
["xon"] = {"Konkomba"},
["xoo"] = {"Xukurú"},
["xop"] = {"Kopar"},
["xor"] = {"Korubo"},
["xow"] = {"Kowaki"},
["xpa"] = {"Pirriya"},
["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"},
["xpc"] = {"Pecheneg"},
["xpd"] = {"Oyster Bay Tasmanian"},
["xpe"] = {"Liberia Kpelle"},
["xpf"] = {"Southeast Tasmanian", "Nuenonne"},
["xpg"] = {"Phrygian"},
["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"},
["xpi"] = {"Pictish"},
["xpj"] = {"Mpalitjanh"},
["xpk"] = {"Kulina Pano"},
["xpl"] = {"Port Sorell Tasmanian"},
["xpm"] = {"Pumpokol"},
["xpn"] = {"Kapinawá"},
["xpo"] = {"Pochutec"},
["xpp"] = {"Puyo-Paekche"},
["xpq"] = {"Mohegan-Pequot"},
["xpr"] = {"Parthian"},
["xps"] = {"Pisidian"},
["xpt"] = {"Punthamara"},
["xpu"] = {"Punic"},
["xpv"] = {"Northern Tasmanian", "Tommeginne"},
["xpw"] = {"Northwestern Tasmanian", "Peerapper"},
["xpx"] = {"Southwestern Tasmanian", "Toogee"},
["xpy"] = {"Puyo"},
["xpz"] = {"Bruny Island Tasmanian"},
["xqa"] = {"Karakhanid"},
["xqt"] = {"Qatabanian"},
["xra"] = {"Krahô"},
["xrb"] = {"Eastern Karaboro"},
["xrd"] = {"Gundungurra"},
["xre"] = {"Kreye"},
["xrg"] = {"Minang"},
["xri"] = {"Krikati-Timbira"},
["xrm"] = {"Armazic"},
["xrn"] = {"Arin"},
["xrr"] = {"Raetic"},
["xrt"] = {"Aranama-Tamique"},
["xru"] = {"Marriammu"},
["xrw"] = {"Karawa"},
["xsa"] = {"Sabaean"},
["xsb"] = {"Sambal"},
["xsc"] = {"Scythian"},
["xsd"] = {"Sidetic"},
["xse"] = {"Sempan"},
["xsh"] = {"Shamang"},
["xsi"] = {"Sio"},
["xsj"] = {"Subi"},
["xsl"] = {"South Slavey"},
["xsm"] = {"Kasem"},
["xsn"] = {"Sanga (Nigeria)"},
["xso"] = {"Solano"},
["xsp"] = {"Silopi"},
["xsq"] = {"Makhuwa-Saka"},
["xsr"] = {"Sherpa"},
["xss"] = {"Assan"},
["xsu"] = {"Sanumá"},
["xsv"] = {"Sudovian"},
["xsy"] = {"Saisiyat"},
["xta"] = {"Alcozauca Mixtec"},
["xtb"] = {"Chazumba Mixtec"},
["xtc"] = {"Katcha-Kadugli-Miri"},
["xtd"] = {"Diuxi-Tilantongo Mixtec"},
["xte"] = {"Ketengban"},
["xtg"] = {"Transalpine Gaulish"},
["xth"] = {"Yitha Yitha"},
["xti"] = {"Sinicahua Mixtec"},
["xtj"] = {"San Juan Teita Mixtec"},
["xtl"] = {"Tijaltepec Mixtec"},
["xtm"] = {"Magdalena Peñasco Mixtec"},
["xtn"] = {"Northern Tlaxiaco Mixtec"},
["xto"] = {"Tokharian A"},
["xtp"] = {"San Miguel Piedras Mixtec"},
["xtq"] = {"Tumshuqese"},
["xtr"] = {"Early Tripuri"},
["xts"] = {"Sindihui Mixtec"},
["xtt"] = {"Tacahua Mixtec"},
["xtu"] = {"Cuyamecalco Mixtec"},
["xtv"] = {"Thawa"},
["xtw"] = {"Tawandê"},
["xty"] = {"Yoloxochitl Mixtec"},
["xua"] = {"Alu Kurumba"},
["xub"] = {"Betta Kurumba"},
["xud"] = {"Umiida"},
["xug"] = {"Kunigami"},
["xuj"] = {"Jennu Kurumba"},
["xul"] = {"Ngunawal", "Nunukul"},
["xum"] = {"Umbrian"},
["xun"] = {"Unggaranggu"},
["xuo"] = {"Kuo"},
["xup"] = {"Upper Umpqua"},
["xur"] = {"Urartian"},
["xut"] = {"Kuthant"},
["xuu"] = {"Kxoe", "Khwedam"},
["xve"] = {"Venetic"},
["xvi"] = {"Kamviri"},
["xvn"] = {"Vandalic"},
["xvo"] = {"Volscian"},
["xvs"] = {"Vestinian"},
["xwa"] = {"Kwaza"},
["xwc"] = {"Woccon"},
["xwd"] = {"Wadi Wadi"},
["xwe"] = {"Xwela Gbe"},
["xwg"] = {"Kwegu"},
["xwj"] = {"Wajuk"},
["xwk"] = {"Wangkumara"},
["xwl"] = {"Western Xwla Gbe"},
["xwo"] = {"Written Oirat"},
["xwr"] = {"Kwerba Mamberamo"},
["xwt"] = {"Wotjobaluk"},
["xww"] = {"Wemba Wemba"},
["xxb"] = {"Boro (Ghana)"},
["xxk"] = {"Ke'o"},
["xxm"] = {"Minkin"},
["xxr"] = {"Koropó"},
["xxt"] = {"Tambora"},
["xya"] = {"Yaygir"},
["xyb"] = {"Yandjibara"},
["xyj"] = {"Mayi-Yapi"},
["xyk"] = {"Mayi-Kulan"},
["xyl"] = {"Yalakalore"},
["xyt"] = {"Mayi-Thakurti"},
["xyy"] = {"Yorta Yorta"},
["xzh"] = {"Zhang-Zhung"},
["xzm"] = {"Zemgalian"},
["xzp"] = {"Ancient Zapotec"},
["yaa"] = {"Yaminahua"},
["yab"] = {"Yuhup"},
["yac"] = {"Pass Valley Yali"},
["yad"] = {"Yagua"},
["yae"] = {"Pumé"},
["yaf"] = {"Yaka (Democratic Republic of Congo)"},
["yag"] = {"Yámana"},
["yah"] = {"Yazgulyam"},
["yai"] = {"Yagnobi"},
["yaj"] = {"Banda-Yangere"},
["yak"] = {"Yakama"},
["yal"] = {"Yalunka"},
["yam"] = {"Yamba"},
["yan"] = {"Mayangna"},
["yao"] = {"Yao"},
["yap"] = {"Yapese"},
["yaq"] = {"Yaqui"},
["yar"] = {"Yabarana"},
["yas"] = {"Nugunu (Cameroon)"},
["yat"] = {"Yambeta"},
["yau"] = {"Yuwana"},
["yav"] = {"Yangben"},
["yaw"] = {"Yawalapití"},
["yax"] = {"Yauma"},
["yay"] = {"Agwagwune"},
["yaz"] = {"Lokaa"},
["yba"] = {"Yala"},
["ybb"] = {"Yemba"},
["ybe"] = {"West Yugur"},
["ybh"] = {"Yakha"},
["ybi"] = {"Yamphu"},
["ybj"] = {"Hasha"},
["ybk"] = {"Bokha"},
["ybl"] = {"Yukuben"},
["ybm"] = {"Yaben"},
["ybn"] = {"Yabaâna"},
["ybo"] = {"Yabong"},
["ybx"] = {"Yawiyo"},
["yby"] = {"Yaweyuha"},
["ych"] = {"Chesu"},
["ycl"] = {"Lolopo"},
["ycn"] = {"Yucuna"},
["ycp"] = {"Chepya"},
["yda"] = {"Yanda"},
["ydd"] = {"Eastern Yiddish"},
["yde"] = {"Yangum Dey"},
["ydg"] = {"Yidgha"},
["ydk"] = {"Yoidik"},
["yea"] = {"Ravula"},
["yec"] = {"Yeniche"},
["yee"] = {"Yimas"},
["yei"] = {"Yeni"},
["yej"] = {"Yevanic"},
["yel"] = {"Yela"},
["yer"] = {"Tarok"},
["yes"] = {"Nyankpa"},
["yet"] = {"Yetfa"},
["yeu"] = {"Yerukula"},
["yev"] = {"Yapunda"},
["yey"] = {"Yeyi"},
["yga"] = {"Malyangapa"},
["ygi"] = {"Yiningayi"},
["ygl"] = {"Yangum Gel"},
["ygm"] = {"Yagomi"},
["ygp"] = {"Gepo"},
["ygr"] = {"Yagaria"},
["ygs"] = {"Yolŋu Sign Language"},
["ygu"] = {"Yugul"},
["ygw"] = {"Yagwoia"},
["yha"] = {"Baha Buyang"},
["yhd"] = {"Judeo-Iraqi Arabic"},
["yhl"] = {"Hlepho Phowa"},
["yhs"] = {"Yan-nhaŋu Sign Language"},
["yia"] = {"Yinggarda"},
["yif"] = {"Ache"},
["yig"] = {"Wusa Nasu"},
["yih"] = {"Western Yiddish"},
["yii"] = {"Yidiny"},
["yij"] = {"Yindjibarndi"},
["yik"] = {"Dongshanba Lalo"},
["yil"] = {"Yindjilandji"},
["yim"] = {"Yimchungru Naga"},
["yin"] = {"Riang Lai", "Yinchia"},
["yip"] = {"Pholo"},
["yiq"] = {"Miqie"},
["yir"] = {"North Awyu"},
["yis"] = {"Yis"},
["yit"] = {"Eastern Lalu"},
["yiu"] = {"Awu"},
["yiv"] = {"Northern Nisu"},
["yix"] = {"Axi Yi"},
["yiz"] = {"Azhe"},
["yka"] = {"Yakan"},
["ykg"] = {"Northern Yukaghir"},
["yki"] = {"Yoke"},
["ykk"] = {"Yakaikeke"},
["ykl"] = {"Khlula"},
["ykm"] = {"Kap"},
["ykn"] = {"Kua-nsi"},
["yko"] = {"Yasa"},
["ykr"] = {"Yekora"},
["ykt"] = {"Kathu"},
["yku"] = {"Kuamasi"},
["yky"] = {"Yakoma"},
["yla"] = {"Yaul"},
["ylb"] = {"Yaleba"},
["yle"] = {"Yele"},
["ylg"] = {"Yelogu"},
["yli"] = {"Angguruk Yali"},
["yll"] = {"Yil"},
["ylm"] = {"Limi"},
["yln"] = {"Langnian Buyang"},
["ylo"] = {"Naluo Yi"},
["ylr"] = {"Yalarnnga"},
["ylu"] = {"Aribwaung"},
["yly"] = {"Nyâlayu", "Nyelâyu"},
["ymb"] = {"Yambes"},
["ymc"] = {"Southern Muji"},
["ymd"] = {"Muda"},
["yme"] = {"Yameo"},
["ymg"] = {"Yamongeri"},
["ymh"] = {"Mili"},
["ymi"] = {"Moji"},
["ymk"] = {"Makwe"},
["yml"] = {"Iamalele"},
["ymm"] = {"Maay"},
["ymn"] = {"Yamna", "Sunum"},
["ymo"] = {"Yangum Mon"},
["ymp"] = {"Yamap"},
["ymq"] = {"Qila Muji"},
["ymr"] = {"Malasar"},
["yms"] = {"Mysian"},
["ymx"] = {"Northern Muji"},
["ymz"] = {"Muzi"},
["yna"] = {"Aluo"},
["ynd"] = {"Yandruwandha"},
["yne"] = {"Lang'e"},
["yng"] = {"Yango"},
["ynk"] = {"Naukan Yupik"},
["ynl"] = {"Yangulam"},
["ynn"] = {"Yana"},
["yno"] = {"Yong"},
["ynq"] = {"Yendang"},
["yns"] = {"Yansi"},
["ynu"] = {"Yahuna"},
["yob"] = {"Yoba"},
["yog"] = {"Yogad"},
["yoi"] = {"Yonaguni"},
["yok"] = {"Yokuts"},
["yol"] = {"Yola"},
["yom"] = {"Yombe"},
["yon"] = {"Yongkom"},
["yot"] = {"Yotti"},
["yox"] = {"Yoron"},
["yoy"] = {"Yoy"},
["ypa"] = {"Phala"},
["ypb"] = {"Labo Phowa"},
["ypg"] = {"Phola"},
["yph"] = {"Phupha"},
["ypk"] = {"Yupik languages"},
["ypm"] = {"Phuma"},
["ypn"] = {"Ani Phowa"},
["ypo"] = {"Alo Phola"},
["ypp"] = {"Phupa"},
["ypz"] = {"Phuza"},
["yra"] = {"Yerakai"},
["yrb"] = {"Yareba"},
["yre"] = {"Yaouré"},
["yrk"] = {"Nenets"},
["yrl"] = {"Nhengatu"},
["yrm"] = {"Yirrk-Mel"},
["yrn"] = {"Yerong"},
["yro"] = {"Yaroamë"},
["yrs"] = {"Yarsun"},
["yrw"] = {"Yarawata"},
["yry"] = {"Yarluyandi"},
["ysc"] = {"Yassic"},
["ysd"] = {"Samatao"},
["ysg"] = {"Sonaga"},
["ysl"] = {"Yugoslavian Sign Language"},
["ysn"] = {"Sani"},
["yso"] = {"Nisi (China)"},
["ysp"] = {"Southern Lolopo"},
["ysr"] = {"Sirenik Yupik"},
["yss"] = {"Yessan-Mayo"},
["ysy"] = {"Sanie"},
["yta"] = {"Talu"},
["ytl"] = {"Tanglang"},
["ytp"] = {"Thopho"},
["ytw"] = {"Yout Wam"},
["yty"] = {"Yatay"},
["yua"] = {"Yucateco", "Yucatec Maya"},
["yub"] = {"Yugambal"},
["yuc"] = {"Yuchi"},
["yud"] = {"Judeo-Tripolitanian Arabic"},
["yue"] = {"Yue Chinese", "Cantonese"},
["yuf"] = {"Havasupai-Walapai-Yavapai"},
["yug"] = {"Yug"},
["yui"] = {"Yurutí"},
["yuj"] = {"Karkar-Yuri"},
["yuk"] = {"Yuki"},
["yul"] = {"Yulu"},
["yum"] = {"Quechan"},
["yun"] = {"Bena (Nigeria)"},
["yup"] = {"Yukpa"},
["yuq"] = {"Yuqui"},
["yur"] = {"Yurok"},
["yut"] = {"Yopno"},
["yuw"] = {"Yau (Morobe Province)"},
["yux"] = {"Southern Yukaghir"},
["yuy"] = {"East Yugur"},
["yuz"] = {"Yuracare"},
["yva"] = {"Yawa"},
["yvt"] = {"Yavitero"},
["ywa"] = {"Kalou"},
["ywg"] = {"Yinhawangka"},
["ywl"] = {"Western Lalu"},
["ywn"] = {"Yawanawa"},
["ywq"] = {"Wuding-Luquan Yi"},
["ywr"] = {"Yawuru"},
["ywt"] = {"Xishanba Lalo", "Central Lalo"},
["ywu"] = {"Wumeng Nasu"},
["yww"] = {"Yawarawarga"},
["yxa"] = {"Mayawali"},
["yxg"] = {"Yagara"},
["yxl"] = {"Yardliyawarra"},
["yxm"] = {"Yinwum"},
["yxu"] = {"Yuyu"},
["yxy"] = {"Yabula Yabula"},
["yyr"] = {"Yir Yoront"},
["yyu"] = {"Yau (Sandaun Province)"},
["yyz"] = {"Ayizi"},
["yzg"] = {"E'ma Buyang"},
["yzk"] = {"Zokhuo"},
["zaa"] = {"Sierra de Juárez Zapotec"},
["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"},
["zac"] = {"Ocotlán Zapotec"},
["zad"] = {"Cajonos Zapotec"},
["zae"] = {"Yareni Zapotec"},
["zaf"] = {"Ayoquesco Zapotec"},
["zag"] = {"Zaghawa"},
["zah"] = {"Zangwal"},
["zai"] = {"Isthmus Zapotec"},
["zaj"] = {"Zaramo"},
["zak"] = {"Zanaki"},
["zal"] = {"Zauzou"},
["zam"] = {"Miahuatlán Zapotec"},
["zao"] = {"Ozolotepec Zapotec"},
["zap"] = {"Zapotec"},
["zaq"] = {"Aloápam Zapotec"},
["zar"] = {"Rincón Zapotec"},
["zas"] = {"Santo Domingo Albarradas Zapotec"},
["zat"] = {"Tabaa Zapotec"},
["zau"] = {"Zangskari"},
["zav"] = {"Yatzachi Zapotec"},
["zaw"] = {"Mitla Zapotec"},
["zax"] = {"Xadani Zapotec"},
["zay"] = {"Zayse-Zergulla", "Zaysete"},
["zaz"] = {"Zari"},
["zba"] = {"Balaibalan"},
["zbc"] = {"Central Berawan"},
["zbe"] = {"East Berawan"},
["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"},
["zbt"] = {"Batui"},
["zbw"] = {"West Berawan"},
["zca"] = {"Coatecas Altas Zapotec"},
["zch"] = {"Central Hongshuihe Zhuang"},
["zdj"] = {"Ngazidja Comorian"},
["zea"] = {"Zeeuws"},
["zeg"] = {"Zenag"},
["zeh"] = {"Eastern Hongshuihe Zhuang"},
["zen"] = {"Zenaga"},
["zga"] = {"Kinga"},
["zgb"] = {"Guibei Zhuang"},
["zgh"] = {"Standard Moroccan Tamazight"},
["zgm"] = {"Minz Zhuang"},
["zgn"] = {"Guibian Zhuang"},
["zgr"] = {"Magori"},
["zhb"] = {"Zhaba"},
["zhd"] = {"Dai Zhuang"},
["zhi"] = {"Zhire"},
["zhn"] = {"Nong Zhuang"},
["zhw"] = {"Zhoa"},
["zhx"] = {"Chinese (family)"},
["zia"] = {"Zia"},
["zib"] = {"Zimbabwe Sign Language"},
["zik"] = {"Zimakani"},
["zil"] = {"Zialo"},
["zim"] = {"Mesme"},
["zin"] = {"Zinza"},
["ziw"] = {"Zigula"},
["ziz"] = {"Zizilivakan"},
["zka"] = {"Kaimbulawa"},
["zkb"] = {"Koibal"},
["zkd"] = {"Kadu"},
["zkg"] = {"Koguryo"},
["zkh"] = {"Khorezmian"},
["zkk"] = {"Karankawa"},
["zkn"] = {"Kanan"},
["zko"] = {"Kott"},
["zkp"] = {"São Paulo Kaingáng"},
["zkr"] = {"Zakhring"},
["zkt"] = {"Kitan"},
["zku"] = {"Kaurna"},
["zkv"] = {"Krevinian"},
["zkz"] = {"Khazar"},
["zle"] = {"East Slavic languages"},
["zlj"] = {"Liujiang Zhuang"},
["zlm"] = {"Malay (individual language)"},
["zln"] = {"Lianshan Zhuang"},
["zlq"] = {"Liuqian Zhuang"},
["zls"] = {"South Slavic languages"},
["zlw"] = {"West Slavic languages"},
["zma"] = {"Manda (Australia)"},
["zmb"] = {"Zimba"},
["zmc"] = {"Margany"},
["zmd"] = {"Maridan"},
["zme"] = {"Mangerr"},
["zmf"] = {"Mfinu"},
["zmg"] = {"Marti Ke"},
["zmh"] = {"Makolkol"},
["zmi"] = {"Negeri Sembilan Malay"},
["zmj"] = {"Maridjabin"},
["zmk"] = {"Mandandanyi"},
["zml"] = {"Matngala"},
["zmm"] = {"Marimanindji", "Marramaninyshi"},
["zmn"] = {"Mbangwe"},
["zmo"] = {"Molo"},
["zmp"] = {"Mpuono"},
["zmq"] = {"Mituku"},
["zmr"] = {"Maranunggu"},
["zms"] = {"Mbesa"},
["zmt"] = {"Maringarr"},
["zmu"] = {"Muruwari"},
["zmv"] = {"Mbariman-Gudhinma"},
["zmw"] = {"Mbo (Democratic Republic of Congo)"},
["zmx"] = {"Bomitaba"},
["zmy"] = {"Mariyedi"},
["zmz"] = {"Mbandja"},
["zna"] = {"Zan Gula"},
["znd"] = {"Zande languages"},
["zne"] = {"Zande (individual language)"},
["zng"] = {"Mang"},
["znk"] = {"Manangkari"},
["zns"] = {"Mangas"},
["zoc"] = {"Copainalá Zoque"},
["zoh"] = {"Chimalapa Zoque"},
["zom"] = {"Zou"},
["zoo"] = {"Asunción Mixtepec Zapotec"},
["zoq"] = {"Tabasco Zoque"},
["zor"] = {"Rayón Zoque"},
["zos"] = {"Francisco León Zoque"},
["zpa"] = {"Lachiguiri Zapotec"},
["zpb"] = {"Yautepec Zapotec"},
["zpc"] = {"Choapan Zapotec"},
["zpd"] = {"Southeastern Ixtlán Zapotec"},
["zpe"] = {"Petapa Zapotec"},
["zpf"] = {"San Pedro Quiatoni Zapotec"},
["zpg"] = {"Guevea De Humboldt Zapotec"},
["zph"] = {"Totomachapan Zapotec"},
["zpi"] = {"Santa María Quiegolani Zapotec"},
["zpj"] = {"Quiavicuzas Zapotec"},
["zpk"] = {"Tlacolulita Zapotec"},
["zpl"] = {"Lachixío Zapotec"},
["zpm"] = {"Mixtepec Zapotec"},
["zpn"] = {"Santa Inés Yatzechi Zapotec"},
["zpo"] = {"Amatlán Zapotec"},
["zpp"] = {"El Alto Zapotec"},
["zpq"] = {"Zoogocho Zapotec"},
["zpr"] = {"Santiago Xanica Zapotec"},
["zps"] = {"Coatlán Zapotec"},
["zpt"] = {"San Vicente Coatlán Zapotec"},
["zpu"] = {"Yalálag Zapotec"},
["zpv"] = {"Chichicapan Zapotec"},
["zpw"] = {"Zaniza Zapotec"},
["zpx"] = {"San Baltazar Loxicha Zapotec"},
["zpy"] = {"Mazaltepec Zapotec"},
["zpz"] = {"Texmelucan Zapotec"},
["zqe"] = {"Qiubei Zhuang"},
["zra"] = {"Kara (Korea)"},
["zrg"] = {"Mirgan"},
["zrn"] = {"Zerenkel"},
["zro"] = {"Záparo"},
["zrp"] = {"Zarphatic"},
["zrs"] = {"Mairasi"},
["zsa"] = {"Sarasira"},
["zsk"] = {"Kaskean"},
["zsl"] = {"Zambian Sign Language"},
["zsm"] = {"Standard Malay"},
["zsr"] = {"Southern Rincon Zapotec"},
["zsu"] = {"Sukurum"},
["zte"] = {"Elotepec Zapotec"},
["ztg"] = {"Xanaguía Zapotec"},
["ztl"] = {"Lapaguía-Guivini Zapotec"},
["ztm"] = {"San Agustín Mixtepec Zapotec"},
["ztn"] = {"Santa Catarina Albarradas Zapotec"},
["ztp"] = {"Loxicha Zapotec"},
["ztq"] = {"Quioquitani-Quierí Zapotec"},
["zts"] = {"Tilquiapan Zapotec"},
["ztt"] = {"Tejalapan Zapotec"},
["ztu"] = {"Güilá Zapotec"},
["ztx"] = {"Zaachila Zapotec"},
["zty"] = {"Yatee Zapotec"},
["zua"] = {"Zeem"},
["zuh"] = {"Tokano"},
["zum"] = {"Kumzari"},
["zun"] = {"Zuni"},
["zuy"] = {"Zumaya"},
["zwa"] = {"Zay"},
["zxx"] = {"No linguistic content", "Not applicable"},
["zyb"] = {"Yongbei Zhuang"},
["zyg"] = {"Yang Zhuang"},
["zyj"] = {"Youjiang Zhuang"},
["zyn"] = {"Yongnan Zhuang"},
["zyp"] = {"Zyphe Chin"},
["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"},
["zzj"] = {"Zuojiang Zhuang"}
}
local deprecated = {
["in"] = {"Indonesian"},
["iw"] = {"Hebrew"},
["ji"] = {"Yiddish"},
["jw"] = {"Javanese"},
["mo"] = {"Moldavian", "Moldovan"},
["aam"] = {"Aramanik"},
["adp"] = {"Adap"},
["agp"] = {"Paranan"},
["ais"] = {"Nataoran Amis"},
["aoh"] = {"Arma"},
["asd"] = {"Asas"},
["aue"] = {"ǂKxʼauǁʼein"},
["ayx"] = {"Ayi (China)"},
["ayy"] = {"Tayabas Ayta"},
["baz"] = {"Tunen"},
["bbz"] = {"Babalia Creole Arabic"},
["bgm"] = {"Baga Mboteni"},
["bhk"] = {"Albay Bicolano"},
["bjd"] = {"Bandjigali"},
["bjq"] = {"Southern Betsimisaraka Malagasy"},
["bkb"] = {"Finallig"},
["bmy"] = {"Bemba (Democratic Republic of Congo)"},
["bpb"] = {"Barbacoas"},
["btb"] = {"Beti (Cameroon)"},
["btl"] = {"Bhatola"},
["bxx"] = {"Borna (Democratic Republic of Congo)"},
["byy"] = {"Buya"},
["cbe"] = {"Chipiajes"},
["cbh"] = {"Cagua"},
["cca"] = {"Cauca"},
["ccq"] = {"Chaungtha"},
["cdg"] = {"Chamari"},
["cjr"] = {"Chorotega"},
["cka"] = {"Khumi Awa Chin"},
["cmk"] = {"Chimakum"},
["coy"] = {"Coyaima"},
["cqu"] = {"Chilean Quechua"},
["cum"] = {"Cumeral"},
["daf"] = {"Dan"},
["dap"] = {"Nisi (India)"},
["dgu"] = {"Degaru"},
["dha"] = {"Dhanwar (India)"},
["dit"] = {"Dirari"},
["djl"] = {"Djiwarli"},
["dkl"] = {"Kolum So Dogon"},
["drh"] = {"Darkhat"},
["drr"] = {"Dororo"},
["drw"] = {"Darwazi"},
["dud"] = {"Hun-Saare"},
["duj"] = {"Dhuwal"},
["dwl"] = {"Walo Kumbe Dogon"},
["dzd"] = {"Daza"},
["ekc"] = {"Eastern Karnic"},
["elp"] = {"Elpaputih"},
["emo"] = {"Emok"},
["gav"] = {"Gabutamon"},
["gbc"] = {"Garawa"},
["gfx"] = {"Mangetti Dune ǃXung"},
["ggn"] = {"Eastern Gurung"},
["ggo"] = {"Southern Gondi"},
["ggr"] = {"Aghu Tharnggalu"},
["gio"] = {"Gelao"},
["gli"] = {"Guliguli"},
["gti"] = {"Gbati-ri"},
["guv"] = {"Gey"},
["hrr"] = {"Horuru"},
["iap"] = {"Iapama"},
["ibi"] = {"Ibilo"},
["ill"] = {"Iranun"},
["ilw"] = {"Talur"},
["ime"] = {"Imeraguen"},
["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"},
["jar"] = {"Jarawa (Nigeria)"},
["jeg"] = {"Jeng"},
["kbf"] = {"Kakauhua"},
["kdv"] = {"Kado"},
["kgc"] = {"Kasseng"},
["kgd"] = {"Kataang"},
["kgh"] = {"Upper Tanudan Kalinga"},
["kjf"] = {"Khalaj [Indo-Iranian]"},
["koj"] = {"Sara Dunjo"},
["kox"] = {"Coxima"},
["kpp"] = {"Paku Karen"},
["krm"] = {"Krim"},
["ktr"] = {"Kota Marudu Tinagas"},
["kvs"] = {"Kunggara"},
["kwq"] = {"Kwak"},
["kxe"] = {"Kakihum"},
["kxl"] = {"Nepali Kurux"},
["kxu"] = {"Kui (India)"},
["kzh"] = {"Kenuzi-Dongola"},
["kzj"] = {"Coastal Kadazan"},
["kzt"] = {"Tambunan Dusun"},
["lba"] = {"Lui"},
["leg"] = {"Lengua"},
["lii"] = {"Lingkhim"},
["llo"] = {"Khlor"},
["lmm"] = {"Lamam"},
["lmz"] = {"Lumbee"},
["lsg"] = {"Lyons Sign Language"},
["meg"] = {"Mea"},
["mgx"] = {"Omati"},
["mhh"] = {"Maskoy Pidgin"},
["mja"] = {"Mahei"},
["mld"] = {"Malakhel"},
["mnt"] = {"Maykulan"},
["mof"] = {"Mohegan-Montauk-Narragansett"},
["mst"] = {"Cataelano Mandaya"},
["mwd"] = {"Mudbura"},
["mwj"] = {"Maligo"},
["mwx"] = {"Mediak"},
["mwy"] = {"Mosiro"},
["myd"] = {"Maramba"},
["myi"] = {"Mina (India)"},
["myq"] = {"Forest Maninka"},
["myt"] = {"Sangab Mandaya"},
["nad"] = {"Nijadali"},
["nbf"] = {"Naxi"},
["nbx"] = {"Ngura"},
["ncp"] = {"Ndaktup"},
["nln"] = {"Durango Nahuatl"},
["nlr"] = {"Ngarla"},
["nns"] = {"Ningye"},
["nnx"] = {"Ngong"},
["noo"] = {"Nootka"},
["nts"] = {"Natagaimas"},
["nxu"] = {"Narau"},
["ome"] = {"Omejes"},
["oun"] = {"ǃOǃung"},
["pbz"] = {"Palu"},
["pcr"] = {"Panang"},
["pgy"] = {"Pongyong"},
["plp"] = {"Palpa"},
["pmc"] = {"Palumata"},
["pmu"] = {"Mirpur Panjabi"},
["pod"] = {"Ponares"},
["ppa"] = {"Pao"},
["ppr"] = {"Piru"},
["prb"] = {"Lua'"},
["pry"] = {"Pray 3"},
["puk"] = {"Pu Ko"},
["puz"] = {"Purum Naga"},
["rie"] = {"Rien"},
["rmr"] = {"Caló"},
["rna"] = {"Runa"},
["rsi"] = {"Rennellese Sign Language"},
["sap"] = {"Sanapaná"},
["sca"] = {"Sansu"},
["sdm"] = {"Semandang"},
["sgl"] = {"Sanglechi-Ishkashimi"},
["sgo"] = {"Songa"},
["skk"] = {"Sok"},
["snh"] = {"Shinabo"},
["sul"] = {"Surigaonon"},
["sum"] = {"Sumo-Mayangna"},
["svr"] = {"Savara"},
["tbb"] = {"Tapeba"},
["tdu"] = {"Tempasuk Dusun"},
["tgg"] = {"Tangga"},
["thc"] = {"Tai Hang Tong"},
["thw"] = {"Thudam"},
["thx"] = {"The"},
["tid"] = {"Tidong"},
["tie"] = {"Tingal"},
["tkk"] = {"Takpa"},
["tlw"] = {"South Wemale"},
["tmp"] = {"Tai Mène"},
["tne"] = {"Tinoc Kallahan"},
["tnf"] = {"Tangshewi"},
["toe"] = {"Tomedes"},
["tsf"] = {"Southwestern Tamang"},
["unp"] = {"Worora"},
["uok"] = {"Uokha"},
["wgw"] = {"Wagawaga"},
["wit"] = {"Wintu"},
["wiw"] = {"Wirangu"},
["xba"] = {"Kamba (Brazil)"},
["xbx"] = {"Kabixí"},
["xia"] = {"Xiandao"},
["xip"] = {"Xipináwa"},
["xkh"] = {"Karahawyana"},
["xrq"] = {"Karranga"},
["xtz"] = {"Tasmanian"},
["ybd"] = {"Yangbye"},
["yds"] = {"Yiddish Sign Language"},
["yen"] = {"Yendang"},
["yiy"] = {"Yir Yoront"},
["yma"] = {"Yamphe"},
["ymt"] = {"Mator-Taygi-Karagas"},
["ynh"] = {"Yangho"},
["yos"] = {"Yos"},
["yri"] = {"Yarí"},
["yuu"] = {"Yugh"},
["zir"] = {"Ziriya"}
}
return {
active = active,
deprecated = deprecated,
}</text>
<sha1>ovivjpdxwq6a7libm47gfgmj3ul9cet</sha1>
</revision>
</page>
<page>
<title>Module:Language/data/iana regions</title>
<ns>828</ns>
<id>42494629</id>
<revision>
<id>981046271</id>
<parentid>972925131</parentid>
<timestamp>2020-09-29T23:32:49Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>update to 2020-09-29 data;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="7999" xml:space="preserve">-- File-Date: 2020-09-29
return {
["AC"] = {"Ascension Island"},
["AD"] = {"Andorra"},
["AE"] = {"United Arab Emirates"},
["AF"] = {"Afghanistan"},
["AG"] = {"Antigua and Barbuda"},
["AI"] = {"Anguilla"},
["AL"] = {"Albania"},
["AM"] = {"Armenia"},
["AO"] = {"Angola"},
["AQ"] = {"Antarctica"},
["AR"] = {"Argentina"},
["AS"] = {"American Samoa"},
["AT"] = {"Austria"},
["AU"] = {"Australia"},
["AW"] = {"Aruba"},
["AX"] = {"Åland Islands"},
["AZ"] = {"Azerbaijan"},
["BA"] = {"Bosnia and Herzegovina"},
["BB"] = {"Barbados"},
["BD"] = {"Bangladesh"},
["BE"] = {"Belgium"},
["BF"] = {"Burkina Faso"},
["BG"] = {"Bulgaria"},
["BH"] = {"Bahrain"},
["BI"] = {"Burundi"},
["BJ"] = {"Benin"},
["BL"] = {"Saint Barthélemy"},
["BM"] = {"Bermuda"},
["BN"] = {"Brunei Darussalam"},
["BO"] = {"Bolivia"},
["BQ"] = {"Bonaire, Sint Eustatius and Saba"},
["BR"] = {"Brazil"},
["BS"] = {"Bahamas"},
["BT"] = {"Bhutan"},
["BV"] = {"Bouvet Island"},
["BW"] = {"Botswana"},
["BY"] = {"Belarus"},
["BZ"] = {"Belize"},
["CA"] = {"Canada"},
["CC"] = {"Cocos (Keeling) Islands"},
["CD"] = {"The Democratic Republic of the Congo"},
["CF"] = {"Central African Republic"},
["CG"] = {"Congo"},
["CH"] = {"Switzerland"},
["CI"] = {"Côte d'Ivoire"},
["CK"] = {"Cook Islands"},
["CL"] = {"Chile"},
["CM"] = {"Cameroon"},
["CN"] = {"China"},
["CO"] = {"Colombia"},
["CP"] = {"Clipperton Island"},
["CR"] = {"Costa Rica"},
["CU"] = {"Cuba"},
["CV"] = {"Cabo Verde", "Cape Verde"},
["CW"] = {"Curaçao"},
["CX"] = {"Christmas Island"},
["CY"] = {"Cyprus"},
["CZ"] = {"Czechia", "Czech Republic"},
["DE"] = {"Germany"},
["DG"] = {"Diego Garcia"},
["DJ"] = {"Djibouti"},
["DK"] = {"Denmark"},
["DM"] = {"Dominica"},
["DO"] = {"Dominican Republic"},
["DZ"] = {"Algeria"},
["EA"] = {"Ceuta, Melilla"},
["EC"] = {"Ecuador"},
["EE"] = {"Estonia"},
["EG"] = {"Egypt"},
["EH"] = {"Western Sahara"},
["ER"] = {"Eritrea"},
["ES"] = {"Spain"},
["ET"] = {"Ethiopia"},
["EU"] = {"European Union"},
["EZ"] = {"Eurozone"},
["FI"] = {"Finland"},
["FJ"] = {"Fiji"},
["FK"] = {"Falkland Islands (Malvinas)"},
["FM"] = {"Federated States of Micronesia"},
["FO"] = {"Faroe Islands"},
["FR"] = {"France"},
["GA"] = {"Gabon"},
["GB"] = {"United Kingdom"},
["GD"] = {"Grenada"},
["GE"] = {"Georgia"},
["GF"] = {"French Guiana"},
["GG"] = {"Guernsey"},
["GH"] = {"Ghana"},
["GI"] = {"Gibraltar"},
["GL"] = {"Greenland"},
["GM"] = {"Gambia"},
["GN"] = {"Guinea"},
["GP"] = {"Guadeloupe"},
["GQ"] = {"Equatorial Guinea"},
["GR"] = {"Greece"},
["GS"] = {"South Georgia and the South Sandwich Islands"},
["GT"] = {"Guatemala"},
["GU"] = {"Guam"},
["GW"] = {"Guinea-Bissau"},
["GY"] = {"Guyana"},
["HK"] = {"Hong Kong"},
["HM"] = {"Heard Island and McDonald Islands"},
["HN"] = {"Honduras"},
["HR"] = {"Croatia"},
["HT"] = {"Haiti"},
["HU"] = {"Hungary"},
["IC"] = {"Canary Islands"},
["ID"] = {"Indonesia"},
["IE"] = {"Ireland"},
["IL"] = {"Israel"},
["IM"] = {"Isle of Man"},
["IN"] = {"India"},
["IO"] = {"British Indian Ocean Territory"},
["IQ"] = {"Iraq"},
["IR"] = {"Islamic Republic of Iran"},
["IS"] = {"Iceland"},
["IT"] = {"Italy"},
["JE"] = {"Jersey"},
["JM"] = {"Jamaica"},
["JO"] = {"Jordan"},
["JP"] = {"Japan"},
["KE"] = {"Kenya"},
["KG"] = {"Kyrgyzstan"},
["KH"] = {"Cambodia"},
["KI"] = {"Kiribati"},
["KM"] = {"Comoros"},
["KN"] = {"Saint Kitts and Nevis"},
["KP"] = {"Democratic People's Republic of Korea"},
["KR"] = {"Republic of Korea"},
["KW"] = {"Kuwait"},
["KY"] = {"Cayman Islands"},
["KZ"] = {"Kazakhstan"},
["LA"] = {"Lao People's Democratic Republic"},
["LB"] = {"Lebanon"},
["LC"] = {"Saint Lucia"},
["LI"] = {"Liechtenstein"},
["LK"] = {"Sri Lanka"},
["LR"] = {"Liberia"},
["LS"] = {"Lesotho"},
["LT"] = {"Lithuania"},
["LU"] = {"Luxembourg"},
["LV"] = {"Latvia"},
["LY"] = {"Libya"},
["MA"] = {"Morocco"},
["MC"] = {"Monaco"},
["MD"] = {"Moldova"},
["ME"] = {"Montenegro"},
["MF"] = {"Saint Martin (French part)"},
["MG"] = {"Madagascar"},
["MH"] = {"Marshall Islands"},
["MK"] = {"North Macedonia"},
["ML"] = {"Mali"},
["MM"] = {"Myanmar"},
["MN"] = {"Mongolia"},
["MO"] = {"Macao"},
["MP"] = {"Northern Mariana Islands"},
["MQ"] = {"Martinique"},
["MR"] = {"Mauritania"},
["MS"] = {"Montserrat"},
["MT"] = {"Malta"},
["MU"] = {"Mauritius"},
["MV"] = {"Maldives"},
["MW"] = {"Malawi"},
["MX"] = {"Mexico"},
["MY"] = {"Malaysia"},
["MZ"] = {"Mozambique"},
["NA"] = {"Namibia"},
["NC"] = {"New Caledonia"},
["NE"] = {"Niger"},
["NF"] = {"Norfolk Island"},
["NG"] = {"Nigeria"},
["NI"] = {"Nicaragua"},
["NL"] = {"Netherlands"},
["NO"] = {"Norway"},
["NP"] = {"Nepal"},
["NR"] = {"Nauru"},
["NU"] = {"Niue"},
["NZ"] = {"New Zealand"},
["OM"] = {"Oman"},
["PA"] = {"Panama"},
["PE"] = {"Peru"},
["PF"] = {"French Polynesia"},
["PG"] = {"Papua New Guinea"},
["PH"] = {"Philippines"},
["PK"] = {"Pakistan"},
["PL"] = {"Poland"},
["PM"] = {"Saint Pierre and Miquelon"},
["PN"] = {"Pitcairn"},
["PR"] = {"Puerto Rico"},
["PS"] = {"State of Palestine"},
["PT"] = {"Portugal"},
["PW"] = {"Palau"},
["PY"] = {"Paraguay"},
["QA"] = {"Qatar"},
["RE"] = {"Réunion"},
["RO"] = {"Romania"},
["RS"] = {"Serbia"},
["RU"] = {"Russian Federation"},
["RW"] = {"Rwanda"},
["SA"] = {"Saudi Arabia"},
["SB"] = {"Solomon Islands"},
["SC"] = {"Seychelles"},
["SD"] = {"Sudan"},
["SE"] = {"Sweden"},
["SG"] = {"Singapore"},
["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"},
["SI"] = {"Slovenia"},
["SJ"] = {"Svalbard and Jan Mayen"},
["SK"] = {"Slovakia"},
["SL"] = {"Sierra Leone"},
["SM"] = {"San Marino"},
["SN"] = {"Senegal"},
["SO"] = {"Somalia"},
["SR"] = {"Suriname"},
["SS"] = {"South Sudan"},
["ST"] = {"Sao Tome and Principe"},
["SV"] = {"El Salvador"},
["SX"] = {"Sint Maarten (Dutch part)"},
["SY"] = {"Syrian Arab Republic"},
["SZ"] = {"Eswatini", "eSwatini", "Swaziland"},
["TA"] = {"Tristan da Cunha"},
["TC"] = {"Turks and Caicos Islands"},
["TD"] = {"Chad"},
["TF"] = {"French Southern Territories"},
["TG"] = {"Togo"},
["TH"] = {"Thailand"},
["TJ"] = {"Tajikistan"},
["TK"] = {"Tokelau"},
["TL"] = {"Timor-Leste"},
["TM"] = {"Turkmenistan"},
["TN"] = {"Tunisia"},
["TO"] = {"Tonga"},
["TR"] = {"Turkey"},
["TT"] = {"Trinidad and Tobago"},
["TV"] = {"Tuvalu"},
["TW"] = {"Taiwan, Province of China"},
["TZ"] = {"United Republic of Tanzania"},
["UA"] = {"Ukraine"},
["UG"] = {"Uganda"},
["UM"] = {"United States Minor Outlying Islands"},
["UN"] = {"United Nations"},
["US"] = {"United States"},
["UY"] = {"Uruguay"},
["UZ"] = {"Uzbekistan"},
["VA"] = {"Holy See (Vatican City State)"},
["VC"] = {"Saint Vincent and the Grenadines"},
["VE"] = {"Venezuela"},
["VG"] = {"British Virgin Islands"},
["VI"] = {"U.S. Virgin Islands"},
["VN"] = {"Viet Nam"},
["VU"] = {"Vanuatu"},
["WF"] = {"Wallis and Futuna"},
["WS"] = {"Samoa"},
["YE"] = {"Yemen"},
["YT"] = {"Mayotte"},
["ZA"] = {"South Africa"},
["ZM"] = {"Zambia"},
["ZW"] = {"Zimbabwe"},
["001"] = {"World"},
["002"] = {"Africa"},
["003"] = {"North America"},
["005"] = {"South America"},
["009"] = {"Oceania"},
["011"] = {"Western Africa"},
["013"] = {"Central America"},
["014"] = {"Eastern Africa"},
["015"] = {"Northern Africa"},
["017"] = {"Middle Africa"},
["018"] = {"Southern Africa"},
["019"] = {"Americas"},
["021"] = {"Northern America"},
["029"] = {"Caribbean"},
["030"] = {"Eastern Asia"},
["034"] = {"Southern Asia"},
["035"] = {"South-Eastern Asia"},
["039"] = {"Southern Europe"},
["053"] = {"Australia and New Zealand"},
["054"] = {"Melanesia"},
["057"] = {"Micronesia"},
["061"] = {"Polynesia"},
["142"] = {"Asia"},
["143"] = {"Central Asia"},
["145"] = {"Western Asia"},
["150"] = {"Europe"},
["151"] = {"Eastern Europe"},
["154"] = {"Northern Europe"},
["155"] = {"Western Europe"},
["202"] = {"Sub-Saharan Africa"},
["419"] = {"Latin America and the Caribbean"}
}</text>
<sha1>os486psopbsaxqtdnq1igp3azz1lve3</sha1>
</revision>
</page>
<page>
<title>Module:Language/data/iana scripts</title>
<ns>828</ns>
<id>42494561</id>
<revision>
<id>981046264</id>
<parentid>972924990</parentid>
<timestamp>2020-09-29T23:32:46Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>update to 2020-09-29 data;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="6833" xml:space="preserve">-- File-Date: 2020-09-29
return {
["Adlm"] = {"Adlam"},
["Afak"] = {"Afaka"},
["Aghb"] = {"Caucasian Albanian"},
["Ahom"] = {"Ahom", "Tai Ahom"},
["Arab"] = {"Arabic"},
["Aran"] = {"Arabic (Nastaliq variant)"},
["Armi"] = {"Imperial Aramaic"},
["Armn"] = {"Armenian"},
["Avst"] = {"Avestan"},
["Bali"] = {"Balinese"},
["Bamu"] = {"Bamum"},
["Bass"] = {"Bassa Vah"},
["Batk"] = {"Batak"},
["Beng"] = {"Bengali", "Bangla"},
["Bhks"] = {"Bhaiksuki"},
["Blis"] = {"Blissymbols"},
["Bopo"] = {"Bopomofo"},
["Brah"] = {"Brahmi"},
["Brai"] = {"Braille"},
["Bugi"] = {"Buginese"},
["Buhd"] = {"Buhid"},
["Cakm"] = {"Chakma"},
["Cans"] = {"Unified Canadian Aboriginal Syllabics"},
["Cari"] = {"Carian"},
["Cham"] = {"Cham"},
["Cher"] = {"Cherokee"},
["Chrs"] = {"Chorasmian"},
["Cirt"] = {"Cirth"},
["Copt"] = {"Coptic"},
["Cpmn"] = {"Cypro-Minoan"},
["Cprt"] = {"Cypriot syllabary"},
["Cyrl"] = {"Cyrillic"},
["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"},
["Deva"] = {"Devanagari", "Nagari"},
["Diak"] = {"Dives Akuru"},
["Dogr"] = {"Dogra"},
["Dsrt"] = {"Deseret", "Mormon"},
["Dupl"] = {"Duployan shorthand", "Duployan stenography"},
["Egyd"] = {"Egyptian demotic"},
["Egyh"] = {"Egyptian hieratic"},
["Egyp"] = {"Egyptian hieroglyphs"},
["Elba"] = {"Elbasan"},
["Elym"] = {"Elymaic"},
["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"},
["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"},
["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"},
["Glag"] = {"Glagolitic"},
["Gong"] = {"Gunjala Gondi"},
["Gonm"] = {"Masaram Gondi"},
["Goth"] = {"Gothic"},
["Gran"] = {"Grantha"},
["Grek"] = {"Greek"},
["Gujr"] = {"Gujarati"},
["Guru"] = {"Gurmukhi"},
["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"},
["Hang"] = {"Hangul", "Hangŭl", "Hangeul"},
["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"},
["Hano"] = {"Hanunoo", "Hanunóo"},
["Hans"] = {"Han (Simplified variant)"},
["Hant"] = {"Han (Traditional variant)"},
["Hatr"] = {"Hatran"},
["Hebr"] = {"Hebrew"},
["Hira"] = {"Hiragana"},
["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"},
["Hmng"] = {"Pahawh Hmong"},
["Hmnp"] = {"Nyiakeng Puachue Hmong"},
["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"},
["Hung"] = {"Old Hungarian", "Hungarian Runic"},
["Inds"] = {"Indus", "Harappan"},
["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"},
["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"},
["Java"] = {"Javanese"},
["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"},
["Jurc"] = {"Jurchen"},
["Kali"] = {"Kayah Li"},
["Kana"] = {"Katakana"},
["Khar"] = {"Kharoshthi"},
["Khmr"] = {"Khmer"},
["Khoj"] = {"Khojki"},
["Kitl"] = {"Khitan large script"},
["Kits"] = {"Khitan small script"},
["Knda"] = {"Kannada"},
["Kore"] = {"Korean (alias for Hangul + Han)"},
["Kpel"] = {"Kpelle"},
["Kthi"] = {"Kaithi"},
["Lana"] = {"Tai Tham", "Lanna"},
["Laoo"] = {"Lao"},
["Latf"] = {"Latin (Fraktur variant)"},
["Latg"] = {"Latin (Gaelic variant)"},
["Latn"] = {"Latin"},
["Leke"] = {"Leke"},
["Lepc"] = {"Lepcha", "Róng"},
["Limb"] = {"Limbu"},
["Lina"] = {"Linear A"},
["Linb"] = {"Linear B"},
["Lisu"] = {"Lisu", "Fraser"},
["Loma"] = {"Loma"},
["Lyci"] = {"Lycian"},
["Lydi"] = {"Lydian"},
["Mahj"] = {"Mahajani"},
["Maka"] = {"Makasar"},
["Mand"] = {"Mandaic", "Mandaean"},
["Mani"] = {"Manichaean"},
["Marc"] = {"Marchen"},
["Maya"] = {"Mayan hieroglyphs"},
["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"},
["Mend"] = {"Mende Kikakui"},
["Merc"] = {"Meroitic Cursive"},
["Mero"] = {"Meroitic Hieroglyphs"},
["Mlym"] = {"Malayalam"},
["Modi"] = {"Modi", "Moḍī"},
["Mong"] = {"Mongolian"},
["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"},
["Mroo"] = {"Mro", "Mru"},
["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"},
["Mult"] = {"Multani"},
["Mymr"] = {"Myanmar", "Burmese"},
["Nand"] = {"Nandinagari"},
["Narb"] = {"Old North Arabian", "Ancient North Arabian"},
["Nbat"] = {"Nabataean"},
["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"},
["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"},
["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"},
["Nkoo"] = {"N’Ko", "N'Ko"},
["Nshu"] = {"Nüshu"},
["Ogam"] = {"Ogham"},
["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"},
["Orkh"] = {"Old Turkic", "Orkhon Runic"},
["Orya"] = {"Oriya", "Odia"},
["Osge"] = {"Osage"},
["Osma"] = {"Osmanya"},
["Palm"] = {"Palmyrene"},
["Pauc"] = {"Pau Cin Hau"},
["Perm"] = {"Old Permic"},
["Phag"] = {"Phags-pa"},
["Phli"] = {"Inscriptional Pahlavi"},
["Phlp"] = {"Psalter Pahlavi"},
["Phlv"] = {"Book Pahlavi"},
["Phnx"] = {"Phoenician"},
["Piqd"] = {"Klingon (KLI pIqaD)"},
["Plrd"] = {"Miao", "Pollard"},
["Prti"] = {"Inscriptional Parthian"},
["Rjng"] = {"Rejang", "Redjang", "Kaganga"},
["Rohg"] = {"Hanifi Rohingya"},
["Roro"] = {"Rongorongo"},
["Runr"] = {"Runic"},
["Samr"] = {"Samaritan"},
["Sara"] = {"Sarati"},
["Sarb"] = {"Old South Arabian"},
["Saur"] = {"Saurashtra"},
["Sgnw"] = {"SignWriting"},
["Shaw"] = {"Shavian", "Shaw"},
["Shrd"] = {"Sharada", "Śāradā"},
["Shui"] = {"Shuishu"},
["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"},
["Sind"] = {"Khudawadi", "Sindhi"},
["Sinh"] = {"Sinhala"},
["Sogd"] = {"Sogdian"},
["Sogo"] = {"Old Sogdian"},
["Sora"] = {"Sora Sompeng"},
["Soyo"] = {"Soyombo"},
["Sund"] = {"Sundanese"},
["Sylo"] = {"Syloti Nagri"},
["Syrc"] = {"Syriac"},
["Syre"] = {"Syriac (Estrangelo variant)"},
["Syrj"] = {"Syriac (Western variant)"},
["Syrn"] = {"Syriac (Eastern variant)"},
["Tagb"] = {"Tagbanwa"},
["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"},
["Tale"] = {"Tai Le"},
["Talu"] = {"New Tai Lue"},
["Taml"] = {"Tamil"},
["Tang"] = {"Tangut"},
["Tavt"] = {"Tai Viet"},
["Telu"] = {"Telugu"},
["Teng"] = {"Tengwar"},
["Tfng"] = {"Tifinagh", "Berber"},
["Tglg"] = {"Tagalog", "Baybayin", "Alibata"},
["Thaa"] = {"Thaana"},
["Thai"] = {"Thai"},
["Tibt"] = {"Tibetan"},
["Tirh"] = {"Tirhuta"},
["Toto"] = {"Toto"},
["Ugar"] = {"Ugaritic"},
["Vaii"] = {"Vai"},
["Visp"] = {"Visible Speech"},
["Wara"] = {"Warang Citi", "Varang Kshiti"},
["Wcho"] = {"Wancho"},
["Wole"] = {"Woleai"},
["Xpeo"] = {"Old Persian"},
["Xsux"] = {"Sumero-Akkadian cuneiform"},
["Yezi"] = {"Yezidi"},
["Yiii"] = {"Yi"},
["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"},
["Zinh"] = {"Code for inherited script"},
["Zmth"] = {"Mathematical notation"},
["Zsye"] = {"Symbols (Emoji variant)"},
["Zsym"] = {"Symbols"},
["Zxxx"] = {"Code for unwritten documents"},
["Zyyy"] = {"Code for undetermined script"},
["Zzzz"] = {"Code for uncoded script"}
}</text>
<sha1>ajkqfjxgc4d152t51z145trvao7xa0s</sha1>
</revision>
</page>
<page>
<title>Module:Language/data/iana suppressed scripts</title>
<ns>828</ns>
<id>56104181</id>
<revision>
<id>981631435</id>
<parentid>981046298</parentid>
<timestamp>2020-10-03T14:28:06Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>update to 2020-09-29 data;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1281" xml:space="preserve">-- File-Date: 2020-09-29
return {
["Arab"] = {"ar", "fa", "ps", "ur"},
["Armn"] = {"hy"},
["Beng"] = {"as", "bn"},
["Blis"] = {"zbl"},
["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"},
["Deva"] = {"hi", "mr", "ne", "kok", "mai"},
["Ethi"] = {"am", "ti"},
["Geor"] = {"ka"},
["Grek"] = {"el"},
["Gujr"] = {"gu"},
["Guru"] = {"pa"},
["Hebr"] = {"he", "iw", "yi"},
["Jpan"] = {"ja"},
["Khmr"] = {"km"},
["Knda"] = {"kn"},
["Kore"] = {"ko"},
["Laoo"] = {"lo"},
["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo",
"es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn",
"gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb",
"ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd",
"nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn",
"ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv",
"sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb",
"frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh",
"tpi", "tvl"},
["Mlym"] = {"ml"},
["Mymr"] = {"my"},
["Nkoo"] = {"nqo"},
["Orya"] = {"or"},
["Sinh"] = {"si"},
["Taml"] = {"ta"},
["Telu"] = {"te"},
["Thaa"] = {"dv"},
["Thai"] = {"th"},
["Tibt"] = {"dz"}
}</text>
<sha1>l54rqb4fcqbdx43b4jmwvhloukogqch</sha1>
</revision>
</page>
<page>
<title>Module:Language/data/iana variants</title>
<ns>828</ns>
<id>55716082</id>
<revision>
<id>981046292</id>
<parentid>972925376</parentid>
<timestamp>2020-09-29T23:33:03Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>update to 2020-09-29 data;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="11316" xml:space="preserve">-- File-Date: 2020-09-29
return {
["1606nict"] = {
["descriptions"] = {"Late Middle French (to 1606)"},
["prefixes"] = {"frm"},
},
["1694acad"] = {
["descriptions"] = {"Early Modern French"},
["prefixes"] = {"fr"},
},
["1901"] = {
["descriptions"] = {"Traditional German orthography"},
["prefixes"] = {"de"},
},
["1959acad"] = {
["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"},
["prefixes"] = {"be"},
},
["1994"] = {
["descriptions"] = {"Standardized Resian orthography"},
["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"},
},
["1996"] = {
["descriptions"] = {"German orthography of 1996"},
["prefixes"] = {"de"},
},
["abl1943"] = {
["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"},
["prefixes"] = {"pt-br"},
},
["akuapem"] = {
["descriptions"] = {"Akuapem Twi"},
["prefixes"] = {"tw"},
},
["alalc97"] = {
["descriptions"] = {"ALA-LC Romanization, 1997 edition"},
["prefixes"] = {},
},
["aluku"] = {
["descriptions"] = {"Aluku dialect", "Boni dialect"},
["prefixes"] = {"djk"},
},
["ao1990"] = {
["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"},
["prefixes"] = {"pt", "gl"},
},
["aranes"] = {
["descriptions"] = {"Aranese"},
["prefixes"] = {"oc"},
},
["asante"] = {
["descriptions"] = {"Asante Twi", "Ashanti Twi"},
["prefixes"] = {"tw"},
},
["auvern"] = {
["descriptions"] = {"Auvergnat"},
["prefixes"] = {"oc"},
},
["baku1926"] = {
["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"},
["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"},
},
["balanka"] = {
["descriptions"] = {"The Balanka dialect of Anii"},
["prefixes"] = {"blo"},
},
["barla"] = {
["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"},
["prefixes"] = {"kea"},
},
["basiceng"] = {
["descriptions"] = {"Basic English"},
["prefixes"] = {"en"},
},
["bauddha"] = {
["descriptions"] = {"Buddhist Hybrid Sanskrit"},
["prefixes"] = {"sa"},
},
["biscayan"] = {
["descriptions"] = {"Biscayan dialect of Basque"},
["prefixes"] = {"eu"},
},
["biske"] = {
["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"},
["prefixes"] = {"sl-rozaj"},
},
["bohoric"] = {
["descriptions"] = {"Slovene in Bohorič alphabet"},
["prefixes"] = {"sl"},
},
["boont"] = {
["descriptions"] = {"Boontling"},
["prefixes"] = {"en"},
},
["bornholm"] = {
["descriptions"] = {"Bornholmsk"},
["prefixes"] = {"da"},
},
["cisaup"] = {
["descriptions"] = {"Cisalpine"},
["prefixes"] = {"oc"},
},
["colb1945"] = {
["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"},
["prefixes"] = {"pt"},
},
["cornu"] = {
["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"},
["prefixes"] = {"en"},
},
["creiss"] = {
["descriptions"] = {"Occitan variants of the Croissant area"},
["prefixes"] = {"oc"},
},
["dajnko"] = {
["descriptions"] = {"Slovene in Dajnko alphabet"},
["prefixes"] = {"sl"},
},
["ekavsk"] = {
["descriptions"] = {"Serbian with Ekavian pronunciation"},
["prefixes"] = {"sr", "sr-latn", "sr-cyrl"},
},
["emodeng"] = {
["descriptions"] = {"Early Modern English (1500-1700)"},
["prefixes"] = {"en"},
},
["fonipa"] = {
["descriptions"] = {"International Phonetic Alphabet"},
["prefixes"] = {},
},
["fonkirsh"] = {
["descriptions"] = {"Kirshenbaum Phonetic Alphabet"},
["prefixes"] = {},
},
["fonnapa"] = {
["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"},
["prefixes"] = {},
},
["fonupa"] = {
["descriptions"] = {"Uralic Phonetic Alphabet"},
["prefixes"] = {},
},
["fonxsamp"] = {
["descriptions"] = {"X-SAMPA transcription"},
["prefixes"] = {},
},
["gascon"] = {
["descriptions"] = {"Gascon"},
["prefixes"] = {"oc"},
},
["grclass"] = {
["descriptions"] = {"Classical Occitan orthography"},
["prefixes"] = {"oc"},
},
["grital"] = {
["descriptions"] = {"Italian-inspired Occitan orthography"},
["prefixes"] = {"oc"},
},
["grmistr"] = {
["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"},
["prefixes"] = {"oc"},
},
["hepburn"] = {
["descriptions"] = {"Hepburn romanization"},
["prefixes"] = {"ja-latn"},
},
["hognorsk"] = {
["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"},
["prefixes"] = {"nn"},
},
["hsistemo"] = {
["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"},
["prefixes"] = {"eo"},
},
["ijekavsk"] = {
["descriptions"] = {"Serbian with Ijekavian pronunciation"},
["prefixes"] = {"sr", "sr-latn", "sr-cyrl"},
},
["itihasa"] = {
["descriptions"] = {"Epic Sanskrit"},
["prefixes"] = {"sa"},
},
["ivanchov"] = {
["descriptions"] = {"Bulgarian in 1899 orthography"},
["prefixes"] = {"bg"},
},
["jauer"] = {
["descriptions"] = {"Jauer dialect of Romansh"},
["prefixes"] = {"rm"},
},
["jyutping"] = {
["descriptions"] = {"Jyutping Cantonese Romanization"},
["prefixes"] = {"yue"},
},
["kkcor"] = {
["descriptions"] = {"Common Cornish orthography of Revived Cornish"},
["prefixes"] = {"kw"},
},
["kociewie"] = {
["descriptions"] = {"The Kociewie dialect of Polish"},
["prefixes"] = {"pl"},
},
["kscor"] = {
["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"},
["prefixes"] = {"kw"},
},
["laukika"] = {
["descriptions"] = {"Classical Sanskrit"},
["prefixes"] = {"sa"},
},
["lemosin"] = {
["descriptions"] = {"Limousin"},
["prefixes"] = {"oc"},
},
["lengadoc"] = {
["descriptions"] = {"Languedocien"},
["prefixes"] = {"oc"},
},
["lipaw"] = {
["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"},
["prefixes"] = {"sl-rozaj"},
},
["luna1918"] = {
["descriptions"] = {"Post-1917 Russian orthography"},
["prefixes"] = {"ru"},
},
["metelko"] = {
["descriptions"] = {"Slovene in Metelko alphabet"},
["prefixes"] = {"sl"},
},
["monoton"] = {
["descriptions"] = {"Monotonic Greek"},
["prefixes"] = {"el"},
},
["ndyuka"] = {
["descriptions"] = {"Ndyuka dialect", "Aukan dialect"},
["prefixes"] = {"djk"},
},
["nedis"] = {
["descriptions"] = {"Natisone dialect", "Nadiza dialect"},
["prefixes"] = {"sl"},
},
["newfound"] = {
["descriptions"] = {"Newfoundland English"},
["prefixes"] = {"en-ca"},
},
["nicard"] = {
["descriptions"] = {"Niçard"},
["prefixes"] = {"oc"},
},
["njiva"] = {
["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"},
["prefixes"] = {"sl-rozaj"},
},
["nulik"] = {
["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"},
["prefixes"] = {"vo"},
},
["osojs"] = {
["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"},
["prefixes"] = {"sl-rozaj"},
},
["oxendict"] = {
["descriptions"] = {"Oxford English Dictionary spelling"},
["prefixes"] = {"en"},
},
["pahawh2"] = {
["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"},
["prefixes"] = {"mww", "hnj"},
},
["pahawh3"] = {
["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"},
["prefixes"] = {"mww", "hnj"},
},
["pahawh4"] = {
["descriptions"] = {"Pahawh Hmong Final Version orthography"},
["prefixes"] = {"mww", "hnj"},
},
["pamaka"] = {
["descriptions"] = {"Pamaka dialect"},
["prefixes"] = {"djk"},
},
["peano"] = {
["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"},
["prefixes"] = {"la"},
},
["petr1708"] = {
["descriptions"] = {"Petrine orthography"},
["prefixes"] = {"ru"},
},
["pinyin"] = {
["descriptions"] = {"Pinyin romanization"},
["prefixes"] = {"zh-latn", "bo-latn"},
},
["polyton"] = {
["descriptions"] = {"Polytonic Greek"},
["prefixes"] = {"el"},
},
["provenc"] = {
["descriptions"] = {"Provençal"},
["prefixes"] = {"oc"},
},
["puter"] = {
["descriptions"] = {"Puter idiom of Romansh"},
["prefixes"] = {"rm"},
},
["rigik"] = {
["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"},
["prefixes"] = {"vo"},
},
["rozaj"] = {
["descriptions"] = {"Resian", "Resianic", "Rezijan"},
["prefixes"] = {"sl"},
},
["rumgr"] = {
["descriptions"] = {"Rumantsch Grischun"},
["prefixes"] = {"rm"},
},
["scotland"] = {
["descriptions"] = {"Scottish Standard English"},
["prefixes"] = {"en"},
},
["scouse"] = {
["descriptions"] = {"Scouse"},
["prefixes"] = {"en"},
},
["simple"] = {
["descriptions"] = {"Simplified form"},
["prefixes"] = {},
},
["solba"] = {
["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"},
["prefixes"] = {"sl-rozaj"},
},
["sotav"] = {
["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"},
["prefixes"] = {"kea"},
},
["spanglis"] = {
["descriptions"] = {"Spanglish"},
["prefixes"] = {"en", "es"},
},
["surmiran"] = {
["descriptions"] = {"Surmiran idiom of Romansh"},
["prefixes"] = {"rm"},
},
["sursilv"] = {
["descriptions"] = {"Sursilvan idiom of Romansh"},
["prefixes"] = {"rm"},
},
["sutsilv"] = {
["descriptions"] = {"Sutsilvan idiom of Romansh"},
["prefixes"] = {"rm"},
},
["tarask"] = {
["descriptions"] = {"Belarusian in Taraskievica orthography"},
["prefixes"] = {"be"},
},
["tongyong"] = {
["descriptions"] = {"Tongyong Pinyin romanization"},
["prefixes"] = {"zh-latn"},
},
["tunumiit"] = {
["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"},
["prefixes"] = {"kl"},
},
["uccor"] = {
["descriptions"] = {"Unified Cornish orthography of Revived Cornish"},
["prefixes"] = {"kw"},
},
["ucrcor"] = {
["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"},
["prefixes"] = {"kw"},
},
["ulster"] = {
["descriptions"] = {"Ulster dialect of Scots"},
["prefixes"] = {"sco"},
},
["unifon"] = {
["descriptions"] = {"Unifon phonetic alphabet"},
["prefixes"] = {"en", "hup", "kyh", "tol", "yur"},
},
["vaidika"] = {
["descriptions"] = {"Vedic Sanskrit"},
["prefixes"] = {"sa"},
},
["valencia"] = {
["descriptions"] = {"Valencian"},
["prefixes"] = {"ca"},
},
["vallader"] = {
["descriptions"] = {"Vallader idiom of Romansh"},
["prefixes"] = {"rm"},
},
["vecdruka"] = {
["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"},
["prefixes"] = {"lv"},
},
["vivaraup"] = {
["descriptions"] = {"Vivaro-Alpine"},
["prefixes"] = {"oc"},
},
["wadegile"] = {
["descriptions"] = {"Wade-Giles romanization"},
["prefixes"] = {"zh-latn"},
},
["xsistemo"] = {
["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"},
["prefixes"] = {"eo"},
}
}</text>
<sha1>8gfcq11qihf8knz0u7rd9ck1zl2gycx</sha1>
</revision>
</page>
<page>
<title>Module:List</title>
<ns>828</ns>
<id>41068627</id>
<revision>
<id>915206629</id>
<parentid>914636065</parentid>
<timestamp>2019-09-11T21:05:14Z</timestamp>
<contributor>
<username>Paine Ellsworth</username>
<id>9092818</id>
</contributor>
<comment>xfer from sandbox per edit request on talk page</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="5410" xml:space="preserve">-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist hlist-separated')
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent &gt; 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items &lt; 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create('div')
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return tostring(root)
end
function p.renderTrackingCategories(args)
local isDeprecated = false -- Tracks deprecated parameters.
for k, v in pairs(args) do
k = tostring(k)
if k:find('^item_style%d+$') or k:find('^item_value%d+$') then
isDeprecated = true
break
end
end
local ret = ''
if isDeprecated then
ret = ret .. '[[Category:List templates with deprecated parameters]]'
end
return ret
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
local list = p.renderList(data)
local trackingCategories = p.renderTrackingCategories(args)
return list .. trackingCategories
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame, {
valueFunc = function (key, value)
if not value or not mw.ustring.find(value, '%S') then return nil end
if mw.ustring.find(value, '^%s*[%*#;:]') then
return value
else
return value:match('^%s*(.-)%s*$')
end
return nil
end
})
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p</text>
<sha1>1kfxv6e8upfdko23gc41ky0lax25kzs</sha1>
</revision>
</page>
<page>
<title>Module:Lua banner</title>
<ns>828</ns>
<id>42951651</id>
<revision>
<id>961849059</id>
<parentid>956153638</parentid>
<timestamp>2020-06-10T18:51:54Z</timestamp>
<contributor>
<username>MSGJ</username>
<id>42630</id>
</contributor>
<comment>show link to module sandbox, requested by [[User:Andrybak]]</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3880" xml:space="preserve">-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local p = {}
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules)
local trackingCategories = p.renderTrackingCategories(args, modules)
return box .. trackingCategories
end
function p.renderBox(modules)
local boxArgs = {}
if #modules &lt; 1 then
boxArgs.text = '&lt;strong class="error"&gt;Error: no modules specified&lt;/strong&gt;'
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
local maybeSandbox = mw.title.new(module .. '/sandbox')
if maybeSandbox.exists then
moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText)
end
end
local moduleList = mList.makeList('bulleted', moduleLinks)
local title = mw.title.getCurrentTitle()
if title.subpageText == "doc" then
title = title.basePageTitle
end
if title.contentModel == "Scribunto" then
boxArgs.text = 'This module depends on the following other modules:' .. moduleList
else
boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList
end
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=|link=]]'
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj)
if yesno(args.nocat) then
return ''
end
local cats = {}
-- Error category
if #modules &lt; 1 then
cats[#cats + 1] = 'Lua templates with errors'
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
local subpageBlacklist = {
doc = true,
sandbox = true,
sandbox2 = true,
testcases = true
}
if not subpageBlacklist[titleObj.subpageText] then
local protCatName
if titleObj.namespace == 10 then
local category = args.category
if not category then
local categories = {
['Module:String'] = 'Lua String-based templates',
['Module:Math'] = 'Templates based on the Math Lua module',
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
['Module:Citation'] = 'Lua-based citation templates'
}
categories['Module:Citation/CS1'] = categories['Module:Citation']
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
end
cats[#cats + 1] = category
protCatName = "Templates using under-protected Lua modules"
elseif titleObj.namespace == 828 then
protCatName = "Modules depending on under-protected modules"
end
if not args.noprotcat and protCatName then
local protLevels = {
autoconfirmed = 1,
extendedconfirmed = 2,
templateeditor = 3,
sysop = 4
}
local currentProt
if titleObj.id ~= 0 then
-- id is 0 (page does not exist) if am previewing before creating a template.
currentProt = titleObj.protectionLevels["edit"][1]
end
if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end
for i, module in ipairs(modules) do
if module ~= "WP:libraryUtil" then
local moduleProt = mw.title.new(module).protectionLevels["edit"][1]
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end
if moduleProt &lt; currentProt then
cats[#cats + 1] = protCatName
break
end
end
end
end
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p</text>
<sha1>jyzkcu97in5ms894d1hxq91kby64msp</sha1>
</revision>
</page>
<page>
<title>Module:Message box</title>
<ns>828</ns>
<id>40574910</id>
<revision>
<id>970994177</id>
<parentid>948472512</parentid>
<timestamp>2020-08-03T15:47:52Z</timestamp>
<contributor>
<username>MSGJ</username>
<id>42630</id>
</contributor>
<comment>show link to talk discussion when used in small format, per request</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="18353" xml:space="preserve">-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('Module:No globals')
local getArgs
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
else
-- default to ombox
obj.cfg = cfg.ombox
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
table.insert(self.classes, class)
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText
if self.isSmall then
local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk)
talkText = string.format('([[%s|talk]])', talkLink)
else
talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" &lt;small class='date-container'&gt;''(&lt;span class='date'&gt;%s&lt;/span&gt;)''&lt;/small&gt;", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count &gt; 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums &gt; 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template &lt;code&gt;%s[[Template:%s|%s]]%s&lt;/code&gt; has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Create the box table.
local boxTable = root:tag('table')
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)</text>
<sha1>tiqc5on6uuhw82w1gda9wz6beyz2y0x</sha1>
</revision>
</page>
<page>
<title>Module:Message box/configuration</title>
<ns>828</ns>
<id>40627038</id>
<revision>
<id>948472514</id>
<parentid>948472513</parentid>
<timestamp>2020-04-01T06:12:44Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="6141" xml:space="preserve">--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = 'Article message templates with missing parameters',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'},
removalNotice = '[[Help:Maintenance template removal|Learn how and when to remove this template message]]'
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'imbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'imbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}</text>
<sha1>rz63o9789otb966y0k5pcntqf0bl6te</sha1>
</revision>
</page>
<page>
<title>Module:Navbar</title>
<ns>828</ns>
<id>38827227</id>
<revision>
<id>948473991</id>
<parentid>948472522</parentid>
<timestamp>2020-04-01T06:30:21Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<comment>Undid revision 948472521 by [[Special:Contributions/w&gt;MusikAnimal|w&gt;MusikAnimal]] ([[User talk:w&gt;MusikAnimal|talk]])</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3091" xml:space="preserve">local p = {}
local getArgs
local ul
function p.addItem (mini, full, link, descrip, args, url)
local l
if url then
l = {'[', '', ']'}
else
l = {'[[', '|', ']]'}
end
ul:tag('li')
:addClass('nv-'..full)
:wikitext(l[1] .. link .. l[2])
:tag(args.mini and 'abbr' or 'span')
:attr('title', descrip..' this template')
:cssText(args.fontstyle)
:wikitext(args.mini and mini or full)
:done()
:wikitext(l[3])
end
function p.brackets (position, c, args, div)
if args.brackets then
div
:tag('span')
:css('margin-'..position, '-0.125em')
:cssText(args.fontstyle)
:wikitext(c)
end
end
function p._navbar(args)
local show = {true, true, true, false, false, false}
local titleArg = 1
if args.collapsible then
titleArg = 2
if not args.plain then args.mini = 1 end
if args.fontcolor then
args.fontstyle = 'color:' .. args.fontcolor .. ';'
end
args.style = 'float:left; text-align:left'
end
if args.template then
titleArg = 'template'
show = {true, false, false, false, false, false}
local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6}
for k,v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do
local num = index[v]
if num then show[num] = true end
end
end
if args.noedit then show[3] = false end
local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
local title = mw.title.new(mw.text.trim(titleText), 'Template')
if not title then
error('Invalid title ' .. titleText)
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
local div = mw.html.create():tag('div')
div
:addClass('plainlinks')
:addClass('hlist')
:addClass('navbar')
:cssText(args.style)
if args.mini then div:addClass('mini') end
if not (args.mini or args.plain) then
div
:tag('span')
:css('word-spacing', 0)
:cssText(args.fontstyle)
:wikitext(args.text or 'This box:')
:wikitext(' ')
end
p.brackets('right', '&amp;#91; ', args, div)
ul = div:tag('ul')
if show[1] then p.addItem('v', 'view', title.fullText, 'View', args) end
if show[2] then p.addItem('t', 'talk', talkpage, 'Discuss', args) end
if show[3] then p.addItem('e', 'edit', title:fullUrl('action=edit'), 'Edit', args, true) end
if show[4] then p.addItem('h', 'hist', title:fullUrl('action=history'), 'History of', args, true) end
if show[5] then
local move = mw.title.new ('Special:Movepage')
p.addItem('m', 'move', move:fullUrl('target='..title.fullText), 'Move', args, true) end
if show[6] then p.addItem('w', 'watch', title:fullUrl('action=watch'), 'Watch', args, true) end
p.brackets('left', ' &amp;#93;', args, div)
if args.collapsible then
div
:done()
:tag('div')
:css('font-size', '114%')
:css('margin', args.mini and '0 4em' or '0 7em')
:cssText(args.fontstyle)
:wikitext(args[1])
end
return tostring(div:done())
end
function p.navbar(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return p._navbar(getArgs(frame))
end
return p</text>
<sha1>0kto9e56pycr6rz0vadnqvghkpm06x9</sha1>
</revision>
</page>
<page>
<title>Module:Navbox</title>
<ns>828</ns>
<id>38634746</id>
<revision>
<id>979759450</id>
<parentid>976559973</parentid>
<timestamp>2020-09-22T16:45:56Z</timestamp>
<contributor>
<username>Nardog</username>
<id>5908908</id>
</contributor>
<comment>suppress images inside navboxes showing up in Media Viewer</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="12840" xml:space="preserve">--
-- This module implements {{Navbox}}
--
local p = {}
local navbar = require('Module:Navbar')._navbar
local getArgs -- lazily initialized
local args
local border
local listnums
local ODD_EVEN_MARKER = '\127_ODDEVEN_\127'
local RESTART_MARKER = '\127_ODDEVEN0_\127'
local REGEX_MARKER = '\127_ODDEVEN(%d?)_\127'
local function striped(wikitext)
-- Return wikitext with markers replaced for odd/even striping.
-- Child (subgroup) navboxes are flagged with a category that is removed
-- by parent navboxes. The result is that the category shows all pages
-- where a child navbox is not contained in a parent navbox.
local orphanCat = '[[Category:Navbox orphans]]'
if border == 'subgroup' and args.orphan ~= 'yes' then
-- No change; striping occurs in outermost navbox.
return wikitext .. orphanCat
end
local first, second = 'odd', 'even'
if args.evenodd then
if args.evenodd == 'swap' then
first, second = second, first
else
first = args.evenodd
second = first
end
end
local changer
if first == second then
changer = first
else
local index = 0
changer = function (code)
if code == '0' then
-- Current occurrence is for a group before a nested table.
-- Set it to first as a valid although pointless class.
-- The next occurrence will be the first row after a title
-- in a subgroup and will also be first.
index = 0
return first
end
index = index + 1
return index % 2 == 1 and first or second
end
end
local regex = orphanCat:gsub('([%[%]])', '%%%1')
return (wikitext:gsub(regex, ''):gsub(REGEX_MARKER, changer)) -- () omits gsub count
end
local function processItem(item, nowrapitems)
if item:sub(1, 2) == '{|' then
-- Applying nowrap to lines in a table does not make sense.
-- Add newlines to compensate for trim of x in |parm=x in a template.
return '\n' .. item ..'\n'
end
if nowrapitems == 'yes' then
local lines = {}
for line in (item .. '\n'):gmatch('([^\n]*)\n') do
local prefix, content = line:match('^([*:;#]+)%s*(.*)')
if prefix and not content:match('^&lt;span class="nowrap"&gt;') then
line = prefix .. '&lt;span class="nowrap"&gt;' .. content .. '&lt;/span&gt;'
end
table.insert(lines, line)
end
item = table.concat(lines, '\n')
end
if item:match('^[*:;#]') then
return '\n' .. item ..'\n'
end
return item
end
local function renderNavBar(titleCell)
if args.navbar ~= 'off' and args.navbar ~= 'plain' and not (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == 'Template:Navbox') then
titleCell:wikitext(navbar{
args.name,
mini = 1,
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;'
})
end
end
--
-- Title row
--
local function renderTitleRow(tbl)
if not args.title then return end
local titleRow = tbl:tag('tr')
if args.titlegroup then
titleRow
:tag('th')
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.titlegroupclass)
:cssText(args.basestyle)
:cssText(args.groupstyle)
:cssText(args.titlegroupstyle)
:wikitext(args.titlegroup)
end
local titleCell = titleRow:tag('th'):attr('scope', 'col')
if args.titlegroup then
titleCell
:css('border-left', '2px solid #fdfdfd')
:css('width', '100%')
end
local titleColspan = 2
if args.imageleft then titleColspan = titleColspan + 1 end
if args.image then titleColspan = titleColspan + 1 end
if args.titlegroup then titleColspan = titleColspan - 1 end
titleCell
:cssText(args.basestyle)
:cssText(args.titlestyle)
:addClass('navbox-title')
:attr('colspan', titleColspan)
renderNavBar(titleCell)
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args.title))
:addClass(args.titleclass)
:css('font-size', '114%')
:css('margin', '0 4em')
:wikitext(processItem(args.title))
end
--
-- Above/Below rows
--
local function getAboveBelowColspan()
local ret = 2
if args.imageleft then ret = ret + 1 end
if args.image then ret = ret + 1 end
return ret
end
local function renderAboveRow(tbl)
if not args.above then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.aboveclass)
:cssText(args.basestyle)
:cssText(args.abovestyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:attr('id', args.title and nil or mw.uri.anchorEncode(args.above))
:wikitext(processItem(args.above, args.nowrapitems))
end
local function renderBelowRow(tbl)
if not args.below then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.belowclass)
:cssText(args.basestyle)
:cssText(args.belowstyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(processItem(args.below, args.nowrapitems))
end
--
-- List rows
--
local function renderListRow(tbl, index, listnum)
local row = tbl:tag('tr')
if index == 1 and args.imageleft then
row
:tag('td')
:addClass('noviewer')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 2px 0px 0px')
:cssText(args.imageleftstyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.imageleft))
end
if args['group' .. listnum] then
local groupCell = row:tag('th')
-- id for aria-labelledby attribute, if lone group with no title or above
if listnum == 1 and not (args.title or args.above or args.group2) then
groupCell
:attr('id', mw.uri.anchorEncode(args.group1))
end
groupCell
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.groupclass)
:cssText(args.basestyle)
:css('width', args.groupwidth or '1%') -- If groupwidth not specified, minimize width
groupCell
:cssText(args.groupstyle)
:cssText(args['group' .. listnum .. 'style'])
:wikitext(args['group' .. listnum])
end
local listCell = row:tag('td')
if args['group' .. listnum] then
listCell
:css('text-align', 'left')
:css('border-left-width', '2px')
:css('border-left-style', 'solid')
else
listCell:attr('colspan', 2)
end
if not args.groupwidth then
listCell:css('width', '100%')
end
local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing
if index % 2 == 1 then
rowstyle = args.oddstyle
else
rowstyle = args.evenstyle
end
local listText = args['list' .. listnum]
local oddEven = ODD_EVEN_MARKER
if listText:sub(1, 12) == '&lt;/div&gt;&lt;table' then
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find('&lt;th[^&gt;]*"navbox%-title"') and RESTART_MARKER or 'odd'
end
listCell
:css('padding', '0px')
:cssText(args.liststyle)
:cssText(rowstyle)
:cssText(args['list' .. listnum .. 'style'])
:addClass('navbox-list')
:addClass('navbox-' .. oddEven)
:addClass(args.listclass)
:addClass(args['list' .. listnum .. 'class'])
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
:wikitext(processItem(listText, args.nowrapitems))
if index == 1 and args.image then
row
:tag('td')
:addClass('noviewer')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 0px 0px 2px')
:cssText(args.imagestyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.image))
end
end
--
-- Tracking categories
--
local function needsHorizontalLists()
if border == 'subgroup' or args.tracking == 'no' then
return false
end
local listClasses = {
['plainlist'] = true, ['hlist'] = true, ['hlist hnum'] = true,
['hlist hwrap'] = true, ['hlist vcard'] = true, ['vcard hlist'] = true,
['hlist vevent'] = true,
}
return not (listClasses[args.listclass] or listClasses[args.bodyclass])
end
local function hasBackgroundColors()
for _, key in ipairs({'titlestyle', 'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('background', 1, true) then
return true
end
end
end
local function hasBorders()
for _, key in ipairs({'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('border', 1, true) then
return true
end
end
end
local function isIllegible()
local styleratio = require('Module:Color contrast')._styleratio
for key, style in pairs(args) do
if tostring(key):match("style$") then
if styleratio{mw.text.unstripNoWiki(style)} &lt; 4.5 then
return true
end
end
end
return false
end
local function getTrackingCategories()
local cats = {}
if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end
if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end
if isIllegible() then table.insert(cats, 'Potentially illegible navboxes') end
if hasBorders() then table.insert(cats, 'Navboxes using borders') end
return cats
end
local function renderTrackingCategories(builder)
local title = mw.title.getCurrentTitle()
if title.namespace ~= 10 then return end -- not in template space
local subpage = title.subpageText
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end
for _, cat in ipairs(getTrackingCategories()) do
builder:wikitext('[[Category:' .. cat .. ']]')
end
end
--
-- Main navbox tables
--
local function renderMainTable()
local tbl = mw.html.create('table')
:addClass('nowraplinks')
:addClass(args.bodyclass)
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
if args.state == 'collapsed' then args.state = 'mw-collapsed' end
tbl
:addClass('mw-collapsible')
:addClass(args.state or 'autocollapse')
end
tbl:css('border-spacing', 0)
if border == 'subgroup' or border == 'none' then
tbl
:addClass('navbox-subgroup')
:cssText(args.bodystyle)
:cssText(args.style)
else -- regular navbox - bodystyle and style will be applied to the wrapper table
tbl
:addClass('navbox-inner')
:css('background', 'transparent')
:css('color', 'inherit')
end
tbl:cssText(args.innerstyle)
renderTitleRow(tbl)
renderAboveRow(tbl)
for i, listnum in ipairs(listnums) do
renderListRow(tbl, i, listnum)
end
renderBelowRow(tbl)
return tbl
end
function p._navbox(navboxArgs)
args = navboxArgs
listnums = {}
for k, _ in pairs(args) do
if type(k) == 'string' then
local listnum = k:match('^list(%d+)$')
if listnum then table.insert(listnums, tonumber(listnum)) end
end
end
table.sort(listnums)
border = mw.text.trim(args.border or args[1] or '')
if border == 'child' then
border = 'subgroup'
end
-- render the main body of the navbox
local tbl = renderMainTable()
-- render the appropriate wrapper around the navbox, depending on the border param
local res = mw.html.create()
if border == 'none' then
local nav = res:tag('div')
:attr('role', 'navigation')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
elseif border == 'subgroup' then
-- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
-- therefore inside a div with padding:0em 0.25em. We start with a &lt;/div&gt; to avoid the
-- padding being applied, and at the end add a &lt;div&gt; to balance out the parent's &lt;/div&gt;
res
:wikitext('&lt;/div&gt;')
:node(tbl)
:wikitext('&lt;div&gt;')
else
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.navboxclass)
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
end
if (args.nocat or 'false'):lower() == 'false' then
renderTrackingCategories(res)
end
return striped(tostring(res))
end
function p.navbox(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
args = getArgs(frame, {wrappers = {'Template:Navbox'}})
-- Read the arguments in the order they'll be output in, to make references number in the right order.
local _
_ = args.title
_ = args.above
for i = 1, 20 do
_ = args["group" .. tostring(i)]
_ = args["list" .. tostring(i)]
end
_ = args.below
return p._navbox(args)
end
return p</text>
<sha1>bc958emdhcifoov0yk148od75bgl1ef</sha1>
</revision>
</page>
<page>
<title>Module:No globals</title>
<ns>828</ns>
<id>42567026</id>
<revision>
<id>948473889</id>
<parentid>948472526</parentid>
<timestamp>2020-04-01T06:28:55Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<comment>Undid revision 948472525 by [[Special:Contributions/w&gt;DiBabelYurikBot|w&gt;DiBabelYurikBot]] ([[User talk:w&gt;DiBabelYurikBot|talk]])</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="307" xml:space="preserve">local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)</text>
<sha1>gggsv54pq7f94l3up48hr91qtxnskdm</sha1>
</revision>
</page>
<page>
<title>Module:Protection banner</title>
<ns>828</ns>
<id>42040984</id>
<revision>
<id>979210729</id>
<parentid>948472529</parentid>
<timestamp>2020-09-19T13:06:07Z</timestamp>
<contributor>
<username>Mr. Stradivarius</username>
<id>4708675</id>
</contributor>
<comment>don't add protection categories or show padlock icons for user js/css pages; based on code contributed by [[User:ProcrastinatingReader]]</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="25969" xml:space="preserve">-- This module implements {{pp-meta}} and its daughter templates such as
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.
-- Initialise necessary modules.
require('Module:No globals')
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main
local yesno = require('Module:Yesno')
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function makeCategoryLink(cat, sort)
if cat then
return string.format(
'[[%s:%s|%s]]',
mw.site.namespaces[14].name,
cat,
sort
)
end
end
-- Validation function for the expiry and the protection date
local function validateDate(dateString, dateType)
if not lang then
lang = mw.language.getContentLanguage()
end
local success, result = pcall(lang.formatDate, lang, 'U', dateString)
if success then
result = tonumber(result)
if result then
return result
end
end
error(string.format(
'invalid %s: %s',
dateType,
tostring(dateString)
), 4)
end
local function makeFullUrl(page, query, display)
return string.format(
'[%s %s]',
tostring(mw.uri.fullUrl(page, query)),
display
)
end
-- Given a directed graph formatted as node -&gt; table of direct successors,
-- get a table of all nodes reachable from a given node (though always
-- including the given node).
local function getReachableNodes(graph, start)
local toWalk, retval = {[start] = true}, {}
while true do
-- Can't use pairs() since we're adding and removing things as we're iterating
local k = next(toWalk) -- This always gets the "first" key
if k == nil then
return retval
end
toWalk[k] = nil
retval[k] = true
for _,v in ipairs(graph[k]) do
if not retval[v] then
toWalk[v] = true
end
end
end
end
--------------------------------------------------------------------------------
-- Protection class
--------------------------------------------------------------------------------
local Protection = {}
Protection.__index = Protection
Protection.supportedActions = {
edit = true,
move = true,
autoreview = true,
upload = true
}
Protection.bannerConfigFields = {
'text',
'explanation',
'tooltip',
'alt',
'link',
'image'
}
function Protection.new(args, cfg, title)
local obj = {}
obj._cfg = cfg
obj.title = title or mw.title.getCurrentTitle()
-- Set action
if not args.action then
obj.action = 'edit'
elseif Protection.supportedActions[args.action] then
obj.action = args.action
else
error(string.format(
'invalid action: %s',
tostring(args.action)
), 3)
end
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.
obj.level = '*'
end
-- Set expiry
local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)
if effectiveExpiry == 'infinity' then
obj.expiry = 'indef'
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
end
-- Set reason
if args[1] then
obj.reason = mw.ustring.lower(args[1])
if obj.reason:find('|') then
error('reasons cannot contain the pipe character ("|")', 3)
end
end
-- Set protection date
if args.date then
obj.protectionDate = validateDate(args.date, 'protection date')
end
-- Set banner config
do
obj.bannerConfig = {}
local configTables = {}
if cfg.banners[obj.action] then
configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]
end
if cfg.defaultBanners[obj.action] then
configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]
configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default
end
configTables[#configTables + 1] = cfg.masterBanner
for i, field in ipairs(Protection.bannerConfigFields) do
for j, t in ipairs(configTables) do
if t[field] then
obj.bannerConfig[field] = t[field]
break
end
end
end
end
return setmetatable(obj, Protection)
end
function Protection:isUserScript()
-- Whether the page is a user JavaScript or CSS page.
local title = self.title
return title.namespace == 2 and (
title.contentModel == 'javascript' or title.contentModel == 'css'
)
end
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:shouldShowLock()
-- Whether we should output a banner/padlock
return self:isProtected() and not self:isUserScript()
end
-- Whether this page needs a protection category.
Protection.shouldHaveProtectionCategory = Protection.shouldShowLock
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Protection:makeProtectionCategory()
if not self:shouldHaveProtectionCategory() then
return ''
end
local cfg = self._cfg
local title = self.title
-- Get the expiry key fragment.
local expiryFragment
if self.expiry == 'indef' then
expiryFragment = self.expiry
elseif type(self.expiry) == 'number' then
expiryFragment = 'temp'
end
-- Get the namespace key fragment.
local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]
if not namespaceFragment and title.namespace % 2 == 1 then
namespaceFragment = 'talk'
end
-- Define the order that key fragments are tested in. This is done with an
-- array of tables containing the value to be tested, along with its
-- position in the cfg.protectionCategories table.
local order = {
{val = expiryFragment, keypos = 1},
{val = namespaceFragment, keypos = 2},
{val = self.reason, keypos = 3},
{val = self.level, keypos = 4},
{val = self.action, keypos = 5}
}
--[[
-- The old protection templates used an ad-hoc protection category system,
-- with some templates prioritising namespaces in their categories, and
-- others prioritising the protection reason. To emulate this in this module
-- we use the config table cfg.reasonsWithNamespacePriority to set the
-- reasons for which namespaces have priority over protection reason.
-- If we are dealing with one of those reasons, move the namespace table to
-- the end of the order table, i.e. give it highest priority. If not, the
-- reason should have highest priority, so move that to the end of the table
-- instead.
--]]
table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))
--[[
-- Define the attempt order. Inactive subtables (subtables with nil "value"
-- fields) are moved to the end, where they will later be given the key
-- "all". This is to cut down on the number of table lookups in
-- cfg.protectionCategories, which grows exponentially with the number of
-- non-nil keys. We keep track of the number of active subtables with the
-- noActive parameter.
--]]
local noActive, attemptOrder
do
local active, inactive = {}, {}
for i, t in ipairs(order) do
if t.val then
active[#active + 1] = t
else
inactive[#inactive + 1] = t
end
end
noActive = #active
attemptOrder = active
for i, t in ipairs(inactive) do
attemptOrder[#attemptOrder + 1] = t
end
end
--[[
-- Check increasingly generic key combinations until we find a match. If a
-- specific category exists for the combination of key fragments we are
-- given, that match will be found first. If not, we keep trying different
-- key fragment combinations until we match using the key
-- "all-all-all-all-all".
--
-- To generate the keys, we index the key subtables using a binary matrix
-- with indexes i and j. j is only calculated up to the number of active
-- subtables. For example, if there were three active subtables, the matrix
-- would look like this, with 0 corresponding to the key fragment "all", and
-- 1 corresponding to other key fragments.
--
-- j 1 2 3
-- i
-- 1 1 1 1
-- 2 0 1 1
-- 3 1 0 1
-- 4 0 0 1
-- 5 1 1 0
-- 6 0 1 0
-- 7 1 0 0
-- 8 0 0 0
--
-- Values of j higher than the number of active subtables are set
-- to the string "all".
--
-- A key for cfg.protectionCategories is constructed for each value of i.
-- The position of the value in the key is determined by the keypos field in
-- each subtable.
--]]
local cats = cfg.protectionCategories
for i = 1, 2^noActive do
local key = {}
for j, t in ipairs(attemptOrder) do
if j &gt; noActive then
key[t.keypos] = 'all'
else
local quotient = i / 2 ^ (j - 1)
quotient = math.ceil(quotient)
if quotient % 2 == 1 then
key[t.keypos] = t.val
else
key[t.keypos] = 'all'
end
end
end
key = table.concat(key, '|')
local attempt = cats[key]
if attempt then
return makeCategoryLink(attempt, title.text)
end
end
return ''
end
function Protection:isIncorrect()
local expiry = self.expiry
return not self:shouldHaveProtectionCategory()
or type(expiry) == 'number' and expiry &lt; os.time()
end
function Protection:isTemplateProtectedNonTemplate()
local action, namespace = self.action, self.title.namespace
return self.level == 'templateeditor'
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = {self:makeProtectionCategory()}
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-incorrect'],
self.title.text
)
end
if self:isTemplateProtectedNonTemplate() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-template'],
self.title.text
)
end
return table.concat(ret)
end
--------------------------------------------------------------------------------
-- Blurb class
--------------------------------------------------------------------------------
local Blurb = {}
Blurb.__index = Blurb
Blurb.bannerTextFields = {
text = true,
explanation = true,
tooltip = true,
alt = true,
link = true
}
function Blurb.new(protectionObj, args, cfg)
return setmetatable({
_cfg = cfg,
_protectionObj = protectionObj,
_args = args
}, Blurb)
end
-- Private methods --
function Blurb:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
local success, date = pcall(
lang.formatDate,
lang,
self._cfg.msg['expiry-date-format'] or 'j F Y',
'@' .. tostring(num)
)
if success then
return date
end
end
function Blurb:_getExpandedMessage(msgKey)
return self:_substituteParameters(self._cfg.msg[msgKey])
end
function Blurb:_substituteParameters(msg)
if not self._params then
local parameterFuncs = {}
parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter
parameterFuncs.EDITREQUEST = self._makeEditRequestParameter
parameterFuncs.EXPIRY = self._makeExpiryParameter
parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter
parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter
parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
self._params = setmetatable({}, {
__index = function (t, k)
local param
if parameterFuncs[k] then
param = parameterFuncs[k](self)
end
param = param or ''
t[k] = param
return param
end
})
end
msg = msg:gsub('${(%u+)}', self._params)
return msg
end
function Blurb:_makeCurrentVersionParameter()
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return makeFullUrl(
'Special:Log',
{type = 'move', page = pagename},
self:_getExpandedMessage('current-version-move-display')
)
else
-- We need the history link.
return makeFullUrl(
pagename,
{action = 'history'},
self:_getExpandedMessage('current-version-edit-display')
)
end
end
function Blurb:_makeEditRequestParameter()
local mEditRequest = require('Module:Submit an edit request')
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Get the edit request type.
local requestType
if action == 'edit' then
if level == 'autoconfirmed' then
requestType = 'semi'
elseif level == 'extendedconfirmed' then
requestType = 'extended'
elseif level == 'templateeditor' then
requestType = 'template'
end
end
requestType = requestType or 'full'
-- Get the display value.
local display = self:_getExpandedMessage('edit-request-display')
return mEditRequest._link{type = requestType, display = display}
end
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return self:_formatDate(expiry)
else
return expiry
end
end
function Blurb:_makeExplanationBlurbParameter()
-- Cover special cases first.
if self._protectionObj.title.namespace == 8 then
-- MediaWiki namespace
return self:_getExpandedMessage('explanation-blurb-nounprotect')
end
-- Get explanation blurb table keys
local action = self._protectionObj.action
local level = self._protectionObj.level
local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'
-- Find the message in the explanation blurb table and substitute any
-- parameters.
local explanations = self._cfg.explanationBlurbs
local msg
if explanations[action][level] and explanations[action][level][talkKey] then
msg = explanations[action][level][talkKey]
elseif explanations[action][level] and explanations[action][level].default then
msg = explanations[action][level].default
elseif explanations[action].default and explanations[action].default[talkKey] then
msg = explanations[action].default[talkKey]
elseif explanations[action].default and explanations[action].default.default then
msg = explanations[action].default.default
else
error(string.format(
'could not find explanation blurb for action "%s", level "%s" and talk key "%s"',
action,
level,
talkKey
), 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeImageLinkParameter()
local imageLinks = self._cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if imageLinks[action][level] then
msg = imageLinks[action][level]
elseif imageLinks[action].default then
msg = imageLinks[action].default
else
msg = imageLinks.edit.default
end
return self:_substituteParameters(msg)
end
function Blurb:_makeIntroBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-blurb-expiry')
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
return pagetypes[self._protectionObj.title.namespace]
or pagetypes.default
or error('no default pagetype defined', 8)
end
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionBlurbs[action][level] then
msg = protectionBlurbs[action][level]
elseif protectionBlurbs[action].default then
msg = protectionBlurbs[action].default
elseif protectionBlurbs.edit.default then
msg = protectionBlurbs.edit.default
else
error('no protection blurb defined for protectionBlurbs.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionDateParameter()
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return self:_formatDate(protectionDate)
else
return protectionDate
end
end
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionLevels[action][level] then
msg = protectionLevels[action][level]
elseif protectionLevels[action].default then
msg = protectionLevels[action].default
elseif protectionLevels.edit.default then
msg = protectionLevels.edit.default
else
error('no protection level defined for protectionLevels.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return makeFullUrl(
'Special:Log',
{type = 'stable', page = pagename},
self:_getExpandedMessage('pc-log-display')
)
else
-- We need the protection log.
return makeFullUrl(
'Special:Log',
{type = 'protect', page = pagename},
self:_getExpandedMessage('protection-log-display')
)
end
end
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
end
function Blurb:_makeTooltipBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function Blurb:_makeVandalTemplateParameter()
return require('Module:Vandal-m')._main{
self._args.user or self._protectionObj.title.baseText
}
end
-- Public methods --
function Blurb:makeBannerText(key)
-- Validate input.
if not key or not Blurb.bannerTextFields[key] then
error(string.format(
'"%s" is not a valid banner config field',
tostring(key)
), 2)
end
-- Generate the text.
local msg = self._protectionObj.bannerConfig[key]
if type(msg) == 'string' then
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._args)
if type(msg) ~= 'string' then
error(string.format(
'bad output from banner config function with key "%s"'
.. ' (expected string, got %s)',
tostring(key),
type(msg)
), 4)
end
return self:_substituteParameters(msg)
end
end
--------------------------------------------------------------------------------
-- BannerTemplate class
--------------------------------------------------------------------------------
local BannerTemplate = {}
BannerTemplate.__index = BannerTemplate
function BannerTemplate.new(protectionObj, cfg)
local obj = {}
obj._cfg = cfg
-- Set the image filename.
local imageFilename = protectionObj.bannerConfig.image
if imageFilename then
obj._imageFilename = imageFilename
else
-- If an image filename isn't specified explicitly in the banner config,
-- generate it from the protection status and the namespace.
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
-- Deal with special cases first.
if (
namespace == 10
or namespace == 828
or reason and obj._cfg.indefImageReasons[reason]
)
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Fully protected modules and templates get the special red "indef"
-- padlock.
obj._imageFilename = obj._cfg.msg['image-filename-indef']
else
-- Deal with regular protection types.
local images = obj._cfg.images
if images[action] then
if images[action][level] then
obj._imageFilename = images[action][level]
elseif images[action].default then
obj._imageFilename = images[action].default
end
end
end
end
return setmetatable(obj, BannerTemplate)
end
function BannerTemplate:renderImage()
local filename = self._imageFilename
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
return makeFileLink{
file = filename,
size = (self.imageWidth or 20) .. 'px',
alt = self._imageAlt,
link = self._imageLink,
caption = self.imageCaption
}
end
--------------------------------------------------------------------------------
-- Banner class
--------------------------------------------------------------------------------
local Banner = setmetatable({}, BannerTemplate)
Banner.__index = Banner
function Banner.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 40
obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.
obj._reasonText = blurbObj:makeBannerText('text')
obj._explanationText = blurbObj:makeBannerText('explanation')
obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.
return setmetatable(obj, Banner)
end
function Banner:__tostring()
-- Renders the banner.
makeMessageBox = makeMessageBox or require('Module:Message box').main
local reasonText = self._reasonText or error('no reason text set', 2)
local explanationText = self._explanationText
local mbargs = {
page = self._page,
type = 'protection',
image = self:renderImage(),
text = string.format(
"'''%s'''%s",
reasonText,
explanationText and '&lt;br /&gt;' .. explanationText or ''
)
}
return makeMessageBox('mbox', mbargs)
end
--------------------------------------------------------------------------------
-- Padlock class
--------------------------------------------------------------------------------
local Padlock = setmetatable({}, BannerTemplate)
Padlock.__index = Padlock
function Padlock.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 20
obj.imageCaption = blurbObj:makeBannerText('tooltip')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockIndicatorNames.default
or 'pp-default'
return setmetatable(obj, Padlock)
end
function Padlock:__tostring()
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{
name = 'indicator',
args = {name = self._indicatorName},
content = self:renderImage()
}
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- This is used for testing purposes.
return {
Protection = Protection,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
}
end
function p._main(args, cfg, title)
args = args or {}
cfg = cfg or require(CONFIG_MODULE)
local protectionObj = Protection.new(args, cfg, title)
local ret = {}
-- If a page's edit protection is equally or more restrictive than its
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)]
then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
-- Render the banner
if protectionObj:shouldShowLock() then
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
.new(protectionObj, blurbObj, cfg)
)
end
end
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
return table.concat(ret)
end
function p.main(frame, cfg)
cfg = cfg or require(CONFIG_MODULE)
-- Find default args, if any.
local parent = frame.getParent and frame:getParent()
local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]
-- Find user args, and use the parent frame if we are being called from a
-- wrapper template.
getArgs = getArgs or require('Module:Arguments').getArgs
local userArgs = getArgs(frame, {
parentOnly = defaultArgs,
frameOnly = not defaultArgs
})
-- Build the args table. User-specified args overwrite default args.
local args = {}
for k, v in pairs(defaultArgs or {}) do
args[k] = v
end
for k, v in pairs(userArgs) do
args[k] = v
end
return p._main(args, cfg)
end
return p</text>
<sha1>pwlommmk9wzkviwu5fu6f8b29n12m1l</sha1>
</revision>
</page>
<page>
<title>Module:Protection banner/config</title>
<ns>828</ns>
<id>42982788</id>
<revision>
<id>976938143</id>
<parentid>975805773</parentid>
<timestamp>2020-09-06T00:07:52Z</timestamp>
<contributor>
<username>ProcrastinatingReader</username>
<id>32939139</id>
</contributor>
<comment>fix broken testcase &amp; improper categorisation, per talk</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="46035" xml:space="preserve">-- This module provides configuration data for [[Module:Protection banner]].
return {
--------------------------------------------------------------------------------
--
-- BANNER DATA
--
--------------------------------------------------------------------------------
--[[
-- Banner data consists of six fields:
-- * text - the main protection text that appears at the top of protection
-- banners.
-- * explanation - the text that appears below the main protection text, used
-- to explain the details of the protection.
-- * tooltip - the tooltip text you see when you move the mouse over a small
-- padlock icon.
-- * link - the page that the small padlock icon links to.
-- * alt - the alt text for the small padlock icon. This is also used as tooltip
-- text for the large protection banners.
-- * image - the padlock image used in both protection banners and small padlock
-- icons.
--
-- The module checks in three separate tables to find a value for each field.
-- First it checks the banners table, which has values specific to the reason
-- for the page being protected. Then the module checks the defaultBanners
-- table, which has values specific to each protection level. Finally, the
-- module checks the masterBanner table, which holds data for protection
-- templates to use if no data has been found in the previous two tables.
--
-- The values in the banner data can take parameters. These are specified
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
-- enclosed in curly braces).
--
-- Available parameters:
--
-- ${CURRENTVERSION} - a link to the page history or the move log, with the
-- display message "current-version-edit-display" or
-- "current-version-move-display".
--
-- ${EDITREQUEST} - a link to create an edit request for the current page.
--
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes
-- on the talk page; you may submit a request to ask an administrator to make
-- an edit if it is minor or supported by consensus."
--
-- ${IMAGELINK} - a link to set the image to, depending on the protection
-- action and protection level.
--
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY."
--
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation
-- so that it can be used in run-on sentences.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
-- Defined in the cfg.pagetypes table.
--
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.
-- "Editing of this page by new or unregistered users is currently disabled"
--
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the
-- template.
--
-- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or
-- "semi-protected".
--
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links
-- straight to that talk page section.
--
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to
-- create a blurb like "This template is semi-protected", or "This article is
-- move-protected until DD Month YYYY".
--
-- ${VANDAL} - links for the specified username (or the root page name)
-- using Module:Vandal-m.
--
-- Functions
--
-- For advanced users, it is possible to use Lua functions instead of strings
-- in the banner config tables. Using functions gives flexibility that is not
-- possible just by using parameters. Functions take two arguments, the
-- protection object and the template arguments, and they must output a string.
--
-- For example:
--
-- text = function (protectionObj, args)
-- if protectionObj.level == 'autoconfirmed' then
-- return 'foo'
-- else
-- return 'bar'
-- end
-- end
--
-- Some protection object properties and methods that may be useful:
-- protectionObj.action - the protection action
-- protectionObj.level - the protection level
-- protectionObj.reason - the protection reason
-- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set
-- to indefinite, and the protection time in unix time if temporary.
-- protectionObj.protectionDate - the protection date in unix time, or nil if
-- unspecified.
-- protectionObj.bannerConfig - the banner config found by the module. Beware
-- of editing the config field used by the function, as it could create an
-- infinite loop.
-- protectionObj:isProtected - returns a boolean showing whether the page is
-- protected.
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is
-- temporary.
-- protectionObj:isIncorrect - returns a boolean showing whether the protection
-- template is incorrect.
--]]
-- The master banner data, used if no values have been found in banners or
-- defaultBanners.
masterBanner = {
text = '${INTROBLURB}',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
},
-- The default banner data. This holds banner data for different protection
-- levels.
-- *required* - this table needs edit, move, autoreview and upload subtables.
defaultBanners = {
edit = {},
move = {},
autoreview = {
default = {
alt = 'Page protected with pending changes',
tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',
image = 'Pending-protection-shackle.svg'
}
},
upload = {}
},
-- The banner data. This holds banner data for different protection reasons.
-- In fact, the reasons specified in this table control which reasons are
-- valid inputs to the first positional parameter.
--
-- There is also a non-standard "description" field that can be used for items
-- in this table. This is a description of the protection reason for use in the
-- module documentation.
--
-- *required* - this table needs edit, move, autoreview and upload subtables.
banners = {
edit = {
blp = {
description = 'For pages protected to promote compliance with the'
.. ' [[Wikipedia:Biographies of living persons'
.. '|biographies of living persons]] policy',
text = '${INTROFRAGMENT} to promote compliance with'
.. ' [[Wikipedia:Biographies of living persons'
.. "|Wikipedia's&amp;nbsp;policy on&amp;nbsp;the&amp;nbsp;biographies"
.. ' of&amp;nbsp;living&amp;nbsp;people]].',
tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'
.. ' biographies of living persons',
},
dmca = {
description = 'For pages protected by the Wikimedia Foundation'
.. ' due to [[Digital Millennium Copyright Act]] takedown requests',
explanation = function (protectionObj, args)
local ret = 'Pursuant to a rights owner notice under the Digital'
.. ' Millennium Copyright Act (DMCA) regarding some content'
.. ' in this article, the Wikimedia Foundation acted under'
.. ' applicable law and took down and restricted the content'
.. ' in question.'
if args.notice then
ret = ret .. ' A copy of the received notice can be found here: '
.. args.notice .. '.'
end
ret = ret .. ' For more information, including websites discussing'
.. ' how to file a counter-notice, please see'
.. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}."
.. "'''Do not remove this template from the article until the"
.. " restrictions are withdrawn'''."
return ret
end,
image = 'Office-protection-shackle.svg',
},
dispute = {
description = 'For pages protected due to editing disputes',
text = function (protectionObj, args)
-- Find the value of "disputes".
local display = 'disputes'
local disputes
if args.section then
disputes = string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
args.section,
display
)
else
disputes = display
end
-- Make the blurb, depending on the expiry.
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROFRAGMENT} or until editing %s have been resolved.'
else
msg = '${INTROFRAGMENT} until editing %s have been resolved.'
end
return string.format(msg, disputes)
end,
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',
},
ecp = {
description = 'For articles in topic areas authorized by'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'
.. ' meets the criteria for community use',
tooltip = 'This ${PAGETYPE} is extended-confirmed protected',
alt = 'Extended-protected ${PAGETYPE}',
},
mainpage = {
description = 'For pages protected for being displayed on the [[Main Page]]',
text = 'This file is currently'
.. ' [[Wikipedia:This page is protected|protected]] from'
.. ' editing because it is currently or will soon be displayed'
.. ' on the [[Main Page]].',
explanation = 'Images on the Main Page are protected due to their high'
.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'
.. '&lt;br /&gt;&lt;span style="font-size:90%;"&gt;'
.. "'''Administrators:''' Once this image is definitely off the Main Page,"
.. ' please unprotect this file, or reduce to semi-protection,'
.. ' as appropriate.&lt;/span&gt;',
},
office = {
description = 'For pages protected by the Wikimedia Foundation',
text = function (protectionObj, args)
local ret = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.'
if protectionObj.protectionDate then
ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'
end
return ret
end,
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"
.. " page unless you are authorized by the Wikimedia Foundation to do"
.. " so.'''",
image = 'Office-protection-shackle.svg',
},
reset = {
description = 'For pages protected by the Wikimedia Foundation and'
.. ' "reset" to a bare-bones version',
text = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.protectionDate then
ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'
else
ret = ret .. 'This ${PAGETYPE} has been'
end
ret = ret .. ' reduced to a'
.. ' simplified, "bare bones" version so that it may be completely'
.. ' rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'
.. ' Standard Wikipedia policies will apply to its rewriting—which'
.. ' will eventually be open to all editors—and will be strictly'
.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'
.. ' it is being rebuilt.\n\n'
.. 'Any insertion of material directly from'
.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'
.. ' will any material added to the ${PAGETYPE} that is not properly'
.. ' sourced. The associated talk page(s) were also cleared on the'
.. " same date.\n\n"
.. "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not override"
.. " this action, and do not remove protection from this page,"
.. " unless you are authorized by the Wikimedia Foundation"
.. " to do so. No editor may remove this notice.'''"
return ret
end,
image = 'Office-protection-shackle.svg',
},
sock = {
description = 'For pages protected due to'
.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'
.. ' [[Wikipedia:Blocking policy|blocked]] or'
.. ' [[Wikipedia:Banning policy|banned users]]'
.. ' from editing it.',
tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'
.. ' editing it',
},
template = {
description = 'For [[Wikipedia:High-risk templates|high-risk]]'
.. ' templates and Lua modules',
text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'
.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',
explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] or'
.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'
.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by'
.. ' [[Wikipedia:Consensus|consensus]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'
.. ' to prevent vandalism',
alt = 'Permanently protected ${PAGETYPE}',
},
usertalk = {
description = 'For pages protected against disruptive edits by a'
.. ' particular user',
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'
.. ' such as abusing the'
.. ' &amp;#123;&amp;#123;[[Template:unblock|unblock]]&amp;#125;&amp;#125; template.',
explanation = 'If you cannot edit this user talk page and you need to'
.. ' make a change or leave a message, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for edits to a protected page'
.. '|request an edit]],'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]],'
.. ' [[Special:Userlogin|log in]],'
.. ' or [[Special:UserLogin/signup|create an account]].',
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism|vandalism]]',
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.level == 'sysop' then
ret = ret .. "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. '
end
return ret .. '${EXPLANATIONBLURB}'
end,
tooltip = '${TOOLTIPFRAGMENT} due to vandalism',
}
},
move = {
dispute = {
description = 'For pages protected against page moves due to'
.. ' disputes over the page title',
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
image = 'Move-protection-shackle.svg'
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism#Page-move vandalism'
.. ' |page-move vandalism]]'
}
},
autoreview = {},
upload = {}
},
--------------------------------------------------------------------------------
--
-- GENERAL DATA TABLES
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Protection blurbs
--------------------------------------------------------------------------------
-- This table produces the protection blurbs available with the
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and
-- protection level, and is checked by the module in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionBlurbs = {
edit = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|'
.. 'protected]] from editing',
autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'
.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'
.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',
extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection',
},
move = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]]'
},
autoreview = {
default = 'All edits made to this ${PAGETYPE} by'
.. ' [[Wikipedia:User access levels#New users|new]] or'
.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
.. ' users are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]'
},
upload = {
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'
}
},
--------------------------------------------------------------------------------
-- Explanation blurbs
--------------------------------------------------------------------------------
-- This table produces the explanation blurbs available with the
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,
-- protection level, and whether the page is a talk page or not. If the page is
-- a talk page it will have a talk key of "talk"; otherwise it will have a talk
-- key of "subject". The table is checked in the following order:
-- 1. page's protection action, page's protection level, page's talk key
-- 2. page's protection action, page's protection level, default talk key
-- 3. page's protection action, default protection level, page's talk key
-- 4. page's protection action, default protection level, default talk key
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
explanationBlurbs = {
edit = {
autoconfirmed = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
},
extendedconfirmed = {
default = 'Extended confirmed protection prevents edits from all unregistered editors'
.. ' and registered users with fewer than 30 days tenure and 500 edits.'
.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'
.. ' specifies that extended confirmed protection can be applied to combat'
.. ' disruption, if semi-protection has proven to be ineffective.'
.. ' Extended confirmed protection may also be applied to enforce'
.. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].'
.. ' Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask for uncontroversial changes supported by'
.. ' [[Wikipedia:Consensus|consensus]].'
},
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]]. You may also [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|request]] that this page be unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' You may [[Wikipedia:Requests for page'
.. ' protection#Current requests for edits to a protected page|request an'
.. ' edit]] to this page, or [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|ask]] for it to be unprotected.'
}
},
move = {
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves at'
.. ' [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.'
}
},
autoreview = {
default = {
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} by new and unregistered users'
.. ' will not be visible to readers until they are accepted by'
.. ' a reviewer. To avoid the need for your edits to be'
.. ' reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].'
},
},
upload = {
default = {
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but new versions of the file'
.. ' cannot be uploaded until it is unprotected. You can'
.. ' request that a new version be uploaded by using a'
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'
.. ' can [[Wikipedia:Requests for page protection|request]]'
.. ' that the file be unprotected.'
}
}
},
--------------------------------------------------------------------------------
-- Protection levels
--------------------------------------------------------------------------------
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- produces a short label for different protection levels. It is sorted by
-- protection action and protection level, and is checked in the following
-- order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionLevels = {
edit = {
default = 'protected',
templateeditor = 'template-protected',
extendedconfirmed = 'extended-protected',
autoconfirmed = 'semi-protected',
},
move = {
default = 'move-protected'
},
autoreview = {
},
upload = {
default = 'upload-protected'
}
},
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- This table lists different padlock images for each protection action and
-- protection level. It is used if an image is not specified in any of the
-- banner data tables, and if the page does not satisfy the conditions for using
-- the ['image-filename-indef'] image. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
images = {
edit = {
default = 'Full-protection-shackle.svg',
templateeditor = 'Template-protection-shackle.svg',
extendedconfirmed = 'Extended-protection-shackle.svg',
autoconfirmed = 'Semi-protection-shackle.svg'
},
move = {
default = 'Move-protection-shackle.svg',
},
autoreview = {
default = 'Pending-protection-shackle.svg'
},
upload = {
default = 'Upload-protection-shackle.svg'
}
},
-- Pages with a reason specified in this table will show the special "indef"
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.
indefImageReasons = {
template = true
},
--------------------------------------------------------------------------------
-- Image links
--------------------------------------------------------------------------------
-- This table provides the data for the ${IMAGELINK} parameter, which gets
-- the image link for small padlock icons based on the page's protection action
-- and protection level. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
imageLinks = {
edit = {
default = 'Wikipedia:Protection policy#full',
templateeditor = 'Wikipedia:Protection policy#template',
extendedconfirmed = 'Wikipedia:Protection policy#extended',
autoconfirmed = 'Wikipedia:Protection policy#semi'
},
move = {
default = 'Wikipedia:Protection policy#move'
},
autoreview = {
default = 'Wikipedia:Protection policy#pending'
},
upload = {
default = 'Wikipedia:Protection policy#upload'
}
},
--------------------------------------------------------------------------------
-- Padlock indicator names
--------------------------------------------------------------------------------
-- This table provides the "name" attribute for the &lt;indicator&gt; extension tag
-- with which small padlock icons are generated. All indicator tags on a page
-- are displayed in alphabetical order based on this attribute, and with
-- indicator tags with duplicate names, the last tag on the page wins.
-- The attribute is chosen based on the protection action; table keys must be a
-- protection action name or the string "default".
padlockIndicatorNames = {
autoreview = 'pp-autoreview',
default = 'pp-default'
},
--------------------------------------------------------------------------------
-- Protection categories
--------------------------------------------------------------------------------
--[[
-- The protection categories are stored in the protectionCategories table.
-- Keys to this table are made up of the following strings:
--
-- 1. the expiry date
-- 2. the namespace
-- 3. the protection reason (e.g. "dispute" or "vandalism")
-- 4. the protection level (e.g. "sysop" or "autoconfirmed")
-- 5. the action (e.g. "edit" or "move")
--
-- When the module looks up a category in the table, first it will will check to
-- see a key exists that corresponds to all five parameters. For example, a
-- user page semi-protected from vandalism for two weeks would have the key
-- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module
-- changes the first part of the key to "all" and checks the table again. It
-- keeps checking increasingly generic key combinations until it finds the
-- field, or until it reaches the key "all-all-all-all-all".
--
-- The module uses a binary matrix to determine the order in which to search.
-- This is best demonstrated by a table. In this table, the "0" values
-- represent "all", and the "1" values represent the original data (e.g.
-- "indef" or "file" or "vandalism").
--
-- expiry namespace reason level action
-- order
-- 1 1 1 1 1 1
-- 2 0 1 1 1 1
-- 3 1 0 1 1 1
-- 4 0 0 1 1 1
-- 5 1 1 0 1 1
-- 6 0 1 0 1 1
-- 7 1 0 0 1 1
-- 8 0 0 0 1 1
-- 9 1 1 1 0 1
-- 10 0 1 1 0 1
-- 11 1 0 1 0 1
-- 12 0 0 1 0 1
-- 13 1 1 0 0 1
-- 14 0 1 0 0 1
-- 15 1 0 0 0 1
-- 16 0 0 0 0 1
-- 17 1 1 1 1 0
-- 18 0 1 1 1 0
-- 19 1 0 1 1 0
-- 20 0 0 1 1 0
-- 21 1 1 0 1 0
-- 22 0 1 0 1 0
-- 23 1 0 0 1 0
-- 24 0 0 0 1 0
-- 25 1 1 1 0 0
-- 26 0 1 1 0 0
-- 27 1 0 1 0 0
-- 28 0 0 1 0 0
-- 29 1 1 0 0 0
-- 30 0 1 0 0 0
-- 31 1 0 0 0 0
-- 32 0 0 0 0 0
--
-- In this scheme the action has the highest priority, as it is the last
-- to change, and the expiry has the least priority, as it changes the most.
-- The priorities of the expiry, the protection level and the action are
-- fixed, but the priorities of the reason and the namespace can be swapped
-- through the use of the cfg.bannerDataNamespaceHasPriority table.
--]]
-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
reasonsWithNamespacePriority = {
vandalism = true,
},
-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
categoryNamespaceKeys = {
[ 2] = 'user',
[ 3] = 'user',
[ 4] = 'project',
[ 6] = 'file',
[ 8] = 'mediawiki',
[ 10] = 'template',
[ 12] = 'project',
[ 14] = 'category',
[100] = 'portal',
[828] = 'module',
},
protectionCategories = {
['all|all|all|all|all'] = 'Wikipedia fully protected pages',
['all|all|office|all|all'] = 'Wikipedia Office-protected pages',
['all|all|reset|all|all'] = 'Wikipedia Office-protected pages',
['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages',
['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files',
['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages',
['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages',
['all|template|all|all|edit'] = 'Wikipedia fully protected templates',
['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages',
['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages',
['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people',
['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people',
['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute',
['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users',
['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',
['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories',
['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files',
['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals',
['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages',
['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages',
['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates',
['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages',
['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',
['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected
['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people',
['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people',
['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute',
['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users',
['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism',
['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories',
['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files',
['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages',
['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages',
['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates',
['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates',
['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages',
['all|module|all|all|edit'] = 'Wikipedia fully-protected modules',
['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules',
['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules',
['all|all|all|sysop|move'] = 'Wikipedia move-protected pages',
['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages',
['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute',
['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages',
['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages',
['all|template|all|sysop|move'] = 'Wikipedia move-protected templates',
['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages',
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',
['all|file|all|all|upload'] = 'Wikipedia upload-protected files',
},
--------------------------------------------------------------------------------
-- Expiry category config
--------------------------------------------------------------------------------
-- This table configures the expiry category behaviour for each protection
-- action.
-- * If set to true, setting that action will always categorise the page if
-- an expiry parameter is not set.
-- * If set to false, setting that action will never categorise the page.
-- * If set to nil, the module will categorise the page if:
-- 1) an expiry parameter is not set, and
-- 2) a reason is provided, and
-- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck
-- table.
expiryCheckActions = {
edit = nil,
move = false,
autoreview = true,
upload = false
},
reasonsWithoutExpiryCheck = {
blp = true,
template = true,
},
--------------------------------------------------------------------------------
-- Pagetypes
--------------------------------------------------------------------------------
-- This table produces the page types available with the ${PAGETYPE} parameter.
-- Keys are namespace numbers, or the string "default" for the default value.
pagetypes = {
[0] = 'article',
[6] = 'file',
[10] = 'template',
[14] = 'category',
[828] = 'module',
default = 'page'
},
--------------------------------------------------------------------------------
-- Strings marking indefinite protection
--------------------------------------------------------------------------------
-- This table contains values passed to the expiry parameter that mean the page
-- is protected indefinitely.
indefStrings = {
['indef'] = true,
['indefinite'] = true,
['indefinitely'] = true,
['infinite'] = true,
},
--------------------------------------------------------------------------------
-- Group hierarchy
--------------------------------------------------------------------------------
-- This table maps each group to all groups that have a superset of the original
-- group's page editing permissions.
hierarchy = {
sysop = {},
reviewer = {'sysop'},
filemover = {'sysop'},
templateeditor = {'sysop'},
extendedconfirmed = {'sysop'},
autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},
user = {'autoconfirmed'},
['*'] = {'user'}
},
--------------------------------------------------------------------------------
-- Wrapper templates and their default arguments
--------------------------------------------------------------------------------
-- This table contains wrapper templates used with the module, and their
-- default arguments. Templates specified in this table should contain the
-- following invocation, and no other template content:
--
-- {{#invoke:Protection banner|main}}
--
-- If other content is desired, it can be added between
-- &lt;noinclude&gt;...&lt;/noinclude&gt; tags.
--
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. However, users can override any of the
-- arguments.
wrappers = {
['Template:Pp'] = {},
['Template:Pp-extended'] = {'ecp'},
['Template:Pp-blp'] = {'blp'},
-- we don't need Template:Pp-create
['Template:Pp-dispute'] = {'dispute'},
['Template:Pp-main-page'] = {'mainpage'},
['Template:Pp-move'] = {action = 'move'},
['Template:Pp-move-dispute'] = {'dispute', action = 'move'},
-- we don't need Template:Pp-move-indef
['Template:Pp-move-vandalism'] = {'vandalism', action = 'move'},
['Template:Pp-office'] = {'office'},
['Template:Pp-office-dmca'] = {'dmca'},
['Template:Pp-pc'] = {action = 'autoreview', small = true},
['Template:Pp-pc1'] = {action = 'autoreview', small = true},
['Template:Pp-reset'] = {'reset'},
['Template:Pp-semi-indef'] = {small = true},
['Template:Pp-sock'] = {'sock'},
['Template:Pp-template'] = {'template', small = true},
['Template:Pp-upload'] = {action = 'upload'},
['Template:Pp-usertalk'] = {'usertalk'},
['Template:Pp-vandalism'] = {'vandalism'},
},
--------------------------------------------------------------------------------
--
-- MESSAGES
--
--------------------------------------------------------------------------------
msg = {
--------------------------------------------------------------------------------
-- Intro blurb and intro fragment
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${INTROBLURB} and
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use
-- intro-blurb-noexpiry or intro-fragment-noexpiry.
-- It is possible to use banner parameters in these messages.
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',
--------------------------------------------------------------------------------
-- Tooltip blurb
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.
-- If the protection is temporary the tooltip-blurb-expiry message is used, and
-- if not the tooltip-blurb-noexpiry message is used.
-- It is possible to use banner parameters in these messages.
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',
--------------------------------------------------------------------------------
-- Special explanation blurb
--------------------------------------------------------------------------------
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages
-- in the MediaWiki namespace.
-- It is possible to use banner parameters in this message.
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]].',
--------------------------------------------------------------------------------
-- Protection log display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the protection log link
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.
-- It is possible to use banner parameters in these messages.
['protection-log-display'] = 'protection log',
['pc-log-display'] = 'pending changes log',
--------------------------------------------------------------------------------
-- Current version display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the page history link
-- or the move log link produced by the ${CURRENTVERSION} parameter.
-- It is possible to use banner parameters in these messages.
['current-version-move-display'] = 'current title',
['current-version-edit-display'] = 'current version',
--------------------------------------------------------------------------------
-- Talk page
--------------------------------------------------------------------------------
-- This message determines the display value of the talk page link produced
-- with the ${TALKPAGE} parameter.
-- It is possible to use banner parameters in this message.
['talk-page-link-display'] = 'talk page',
--------------------------------------------------------------------------------
-- Edit requests
--------------------------------------------------------------------------------
-- This message determines the display value of the edit request link produced
-- with the ${EDITREQUEST} parameter.
-- It is possible to use banner parameters in this message.
['edit-request-display'] = 'submit an edit request',
--------------------------------------------------------------------------------
-- Expiry date format
--------------------------------------------------------------------------------
-- This is the format for the blurb expiry date. It should be valid input for
-- the first parameter of the #time parser function.
['expiry-date-format'] = 'F j, Y "at" H:i e',
--------------------------------------------------------------------------------
-- Tracking categories
--------------------------------------------------------------------------------
-- These messages determine which tracking categories the module outputs.
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- These are images that are not defined by their protection action and protection level.
['image-filename-indef'] = 'Full-protection-shackle.svg',
['image-filename-default'] = 'Transparent.gif',
--------------------------------------------------------------------------------
-- End messages
--------------------------------------------------------------------------------
}
--------------------------------------------------------------------------------
-- End configuration
--------------------------------------------------------------------------------
}</text>
<sha1>5ltdht3qen29flk1vw801ukkdsv9cxq</sha1>
</revision>
</page>
<page>
<title>Module:Purge</title>
<ns>828</ns>
<id>46701444</id>
<revision>
<id>810146905</id>
<parentid>662264650</parentid>
<timestamp>2017-11-13T16:20:48Z</timestamp>
<contributor>
<username>Dinoguy1000</username>
<id>2412089</id>
</contributor>
<comment>from the sandbox: if the pagename is specified, don't add the title text or its span</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1097" xml:space="preserve">-- This module implements [[Template:Purge]].
local p = {}
local function makeUrlLink(url, display)
return string.format('[%s %s]', url, display)
end
function p._main(args)
-- Make the URL
local url
do
local title
if args.page then
title = mw.title.new(args.page)
if not title then
error(string.format(
"'%s' is not a valid page name",
args.page
), 2)
end
else
title = mw.title.getCurrentTitle()
end
if args.anchor then
title.fragment = args.anchor
end
url = title:fullUrl{action = 'purge'}
end
-- Make the display
local display
if args.page then
display = args[1] or 'Purge'
else
display = mw.html.create('span')
display
:attr('title', 'Purge this page')
:wikitext(args[1] or 'Purge')
display = tostring(display)
end
-- Output the HTML
local root = mw.html.create('span')
root
:addClass('noprint')
:addClass('plainlinks')
:addClass('purgelink')
:wikitext(makeUrlLink(url, display))
return tostring(root)
end
function p.main(frame)
local args = frame:getParent().args
return p._main(args)
end
return p</text>
<sha1>7zn4wpraqp0o2q6ovvb2j9zno19p3zp</sha1>
</revision>
</page>
<page>
<title>Module:Section link</title>
<ns>828</ns>
<id>44646152</id>
<revision>
<id>965340153</id>
<parentid>931455529</parentid>
<timestamp>2020-06-30T19:17:25Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<comment>fix error for when {{}} are used inside of the slink (TPER)</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="4584" xml:space="preserve">-- This module implements {{section link}}.
require('Module:No globals');
local checkType = require('libraryUtil').checkType
local p = {}
local function makeSectionLink(page, section, display)
display = display or section
page = page or ''
-- MediaWiki doesn't allow these in `page`, so only need to do for `section`
if type(section) == 'string' then
section = string.gsub(section, "{", "&amp;#x7B;")
section = string.gsub(section, "}", "&amp;#x7D;")
end
return string.format('[[%s#%s|%s]]', page, section, display)
end
local function normalizeTitle(title)
title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '')
title = mw.ustring.gsub(title, "%b&lt;&gt;", "")
return mw.title.new(title).prefixedText
end
function p._main(page, sections, options, title)
-- Validate input.
checkType('_main', 1, page, 'string', true)
checkType('_main', 3, options, 'table', true)
if sections == nil then
sections = {}
elseif type(sections) == 'string' then
sections = {sections}
elseif type(sections) ~= 'table' then
error(string.format(
"type error in argument #2 to '_main' " ..
"(string, table or nil expected, got %s)",
type(sections)
), 2)
end
options = options or {}
title = title or mw.title.getCurrentTitle()
-- Deal with blank page names elegantly
if page and not page:find('%S') then
page = nil
options.nopage = true
end
-- Make the link(s).
local isShowingPage = not options.nopage
if #sections &lt;= 1 then
local linkPage = page or ''
local section = sections[1] or 'Notes'
local display = '§&amp;nbsp;' .. section
if isShowingPage then
page = page or title.prefixedText
if options.display and options.display ~= '' then
if normalizeTitle(options.display) == normalizeTitle(page) then
display = options.display .. ' ' .. display
else
error(string.format(
'Display title "%s" was ignored since it is ' ..
"not equivalent to the page's actual title",
options.display
), 0)
end
else
display = page .. ' ' .. display
end
end
return makeSectionLink(linkPage, section, display)
else
-- Multiple sections. First, make a list of the links to display.
local ret = {}
for i, section in ipairs(sections) do
ret[i] = makeSectionLink(page, section)
end
-- Assemble the list of links into a string with mw.text.listToText.
-- We use the default separator for mw.text.listToText, but a custom
-- conjunction. There is also a special case conjunction if we only
-- have two links.
local conjunction
if #sections == 2 then
conjunction = '&amp;#8203; and '
else
conjunction = ', and '
end
ret = mw.text.listToText(ret, nil, conjunction)
-- Add the intro text.
local intro = '§§&amp;nbsp;'
if isShowingPage then
intro = (page or title.prefixedText) .. ' ' .. intro
end
ret = intro .. ret
return ret
end
end
function p.main(frame)
local yesno = require('Module:Yesno')
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Section link',
valueFunc = function (key, value)
value = value:match('^%s*(.-)%s*$') -- Trim whitespace
-- Allow blank first parameters, as the wikitext template does this.
if value ~= '' or key == 1 then
return value
end
end
})
for k, v in pairs(args) do -- replace underscores in the positional parameter values
if 'number' == type(k) then
if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes
args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters
else
args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores
end
end
end
-- Sort the arguments.
local page
local sections, options = {}, {}
for k, v in pairs(args) do
if k == 1 then
-- Doing this in the loop because of a bug in [[Module:Arguments]]
-- when using pairs with deleted arguments.
page = mw.text.decode(v, true)
elseif type(k) == 'number' then
sections[k] = v
else
options[k] = v
end
end
options.nopage = yesno (options.nopage); -- make boolean
-- Extract section from page, if present
if page then
local p, s = page:match('^(.-)#(.*)$')
if p then page, sections[1] = p, s end
end
-- Compress the sections array.
local function compressArray(t)
local nums, ret = {}, {}
for num in pairs(t) do
nums[#nums + 1] = num
end
table.sort(nums)
for i, num in ipairs(nums) do
ret[i] = t[num]
end
return ret
end
sections = compressArray(sections)
return p._main(page, sections, options)
end
return p</text>
<sha1>d7vs0d653q4eub1uslni5ah7cayid6t</sha1>
</revision>
</page>
<page>
<title>Module:String</title>
<ns>828</ns>
<id>38569505</id>
<revision>
<id>970815276</id>
<parentid>924313232</parentid>
<timestamp>2020-08-02T15:49:42Z</timestamp>
<contributor>
<username>RexxS</username>
<id>6112901</id>
</contributor>
<comment>separate annotations for str.match from those for str._match</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="18033" xml:space="preserve">--[[
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
]]
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:String|len|target_string|}}
OR
{{#invoke:String|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} )
local s = new_args['s'] or ''
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:String|sub|target_string|start_index|end_index}}
OR
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } )
local s = new_args['s'] or ''
local i = tonumber( new_args['i'] ) or 1
local j = tonumber( new_args['j'] ) or -1
local len = mw.ustring.len( s )
-- Convert negatives for range checking
if i &lt; 0 then
i = len + i + 1
end
if j &lt; 0 then
j = len + j + 1
end
if i &gt; len or j &gt; len or i &lt; 1 or j &lt; 1 then
return str._error( 'String subset index out of range' )
end
if j &lt; i then
return str._error( 'String subset indices out of order' )
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
_match
This function returns a substring from the source string that matches a
specified pattern. It is exported for use in other modules
Usage:
strmatch = require("Module:String")._match
sresult = strmatch( s, pattern, start, match, plain, nomatch )
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This sub-routine is exported for use in other modules
function str._match( s, pattern, start, match_index, plain_flag, nomatch )
if s == '' then
return str._error( 'Target string is empty' )
end
if pattern == '' then
return str._error( 'Pattern string is empty' )
end
start = tonumber(start) or 1
if math.abs(start) &lt; 1 or math.abs(start) &gt; mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' )
end
if match_index == 0 then
return str._error( 'Match index is out of range' )
end
if plain_flag then
pattern = str._escapePattern( pattern )
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start &gt; 1 then
s = mw.ustring.sub( s, start )
end
local iterator = mw.ustring.gmatch(s, pattern)
if match_index &gt; 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table = {}
local count = 1
for w in iterator do
result_table[count] = w
count = count + 1
end
result = result_table[ count + match_index ]
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' )
else
return nomatch
end
else
return result
end
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
-- This is the entry point for #invoke:String|match
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} )
local s = new_args['s'] or ''
local start = tonumber( new_args['start'] ) or 1
local plain_flag = str._getBoolean( new_args['plain'] or false )
local pattern = new_args['pattern'] or ''
local match_index = math.floor( tonumber(new_args['match']) or 1 )
local nomatch = new_args['nomatch']
return str._match( s, pattern, start, match_index, plain_flag, nomatch )
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:String|pos|target_string|index_value}}
OR
{{#invoke:String|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} )
local target_str = new_args['target'] or ''
local pos = tonumber( new_args['pos'] ) or 0
if pos == 0 or math.abs(pos) &gt; mw.ustring.len( target_str ) then
return str._error( 'String index out of range' )
end
return mw.ustring.sub( target_str, pos, pos )
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} )
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index &gt;= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['target'] or ''
local start_pos = tonumber(new_args['start']) or 1
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return 0
end
plain = str._getBoolean( plain )
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } )
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber( new_args['count'] )
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean( plain )
if plain then
pattern = str._escapePattern( pattern )
replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences.
end
local result
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count )
else
result = mw.ustring.gsub( source_str, pattern, replace )
end
return result
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
escapePattern
This function escapes special characters from a Lua string pattern. See [1]
for details on how patterns work.
[1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
Usage:
{{#invoke:String|escapePattern|pattern_string}}
Parameters
pattern_string: The pattern string to escape.
]]
function str.escapePattern( frame )
local pattern_str = frame.args[1]
if not pattern_str then
return str._error( 'No pattern string specified' )
end
local result = str._escapePattern( pattern_str )
return result
end
--[[
count
This function counts the number of occurrences of one string in another.
]]
function str.count(frame)
local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'})
local source = args.source or ''
local pattern = args.pattern or ''
local plain = str._getBoolean(args.plain or true)
if plain then
pattern = str._escapePattern(pattern)
end
local _, count = mw.ustring.gsub(source, pattern, '')
return count
end
--[[
endswith
This function determines whether a string ends with another string.
]]
function str.endswith(frame)
local args = str._getParameters(frame.args, {'source', 'pattern'})
local source = args.source or ''
local pattern = args.pattern or ''
if pattern == '' then
-- All strings end with the empty string.
return "yes"
end
if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then
return "yes"
else
return ""
end
end
--[[
join
Join all non empty arguments together; the first argument is the separator.
Usage:
{{#invoke:String|join|sep|one|two|three}}
]]
function str.join(frame)
local args = {}
local sep
for _, v in ipairs( frame.args ) do
if sep then
if v ~= '' then
table.insert(args, v)
end
else
sep = v
end
end
return table.concat( args, sep or '' )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {}
local index = 1
local value
for _, arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index]
index = index + 1
end
new_args[arg] = value
end
return new_args
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '&lt;strong class="error"&gt;String Module Error: ' .. error_str .. '&lt;/strong&gt;'
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower()
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false
else
boolean_value = true
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str
else
error( 'No boolean value found' )
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
return str</text>
<sha1>cufmbepw7ml3gut4lchtqrhtj5r63cp</sha1>
</revision>
</page>
<page>
<title>Module:TableTools</title>
<ns>828</ns>
<id>41371028</id>
<revision>
<id>983044092</id>
<parentid>958399831</parentid>
<timestamp>2020-10-11T22:22:43Z</timestamp>
<contributor>
<username>GorillaWarfare</username>
<id>4968133</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Module:TableTools]]": [[WP:High-risk templates|High-risk Lua module]]: bumping protection level due to high usage, plus the stability of the module. See https://en.wikipedia.org/w/index.php?title=Wikipedia:Requests_for_page_protection&amp;oldid=983044034#Module:TableTools ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="12649" xml:space="preserve">--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
return type(v) == 'number' and v &gt;= 1 and floor(v) == v and v &lt; infinity
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
return type(v) == 'number' and tostring(v) == '-nan'
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i &lt;= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
local function defaultKeySort(item1, item2)
-- "number" &lt; "string", so numbers will be sorted before strings.
local type1, type2 = type(item1), type(item2)
if type1 ~= type2 then
return type1 &lt; type2
else -- This will fail with table, boolean, function.
return item1 &lt; item2
end
end
--[[
Returns a list of the keys in a table, sorted using either a default
comparison function or a custom keySort function.
]]
function p.keysToList(t, keySort, checked)
if not checked then
checkType('keysToList', 1, t, 'table')
checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })
end
local list = {}
local index = 1
for key, value in pairs(t) do
list[index] = key
index = index + 1
end
if keySort ~= false then
keySort = type(keySort) == 'function' and keySort or defaultKeySort
table.sort(list, keySort)
end
return list
end
--[[
Iterates through a table, with the keys sorted using the keysToList function.
If there are only numerical keys, sparseIpairs is probably more efficient.
]]
function p.sortedPairs(t, keySort)
checkType('sortedPairs', 1, t, 'table')
checkType('sortedPairs', 2, keySort, 'function', true)
local list = p.keysToList(t, keySort, true)
local i = 0
return function()
i = i + 1
local key = list[i]
if key ~= nil then
return key, t[key]
else
return nil, nil
end
end
end
--[[
Returns true if all keys in the table are consecutive integers starting at 1.
--]]
function p.isArray(t)
checkType("isArray", 1, t, "table")
local i = 0
for k, v in pairs(t) do
i = i + 1
if t[i] == nil then
return false
end
end
return true
end
-- { "a", "b", "c" } -&gt; { a = 1, b = 2, c = 3 }
function p.invert(array)
checkType("invert", 1, array, "table")
local map = {}
for i, v in ipairs(array) do
map[v] = i
end
return map
end
--[[
{ "a", "b", "c" } -&gt; { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
function p.listToSet(t)
checkType("listToSet", 1, t, "table")
local set = {}
for _, item in ipairs(t) do
set[item] = true
end
return set
end
--[[
Recursive deep copy function.
Preserves identities of subtables.
]]
local function _deepCopy(orig, includeMetatable, already_seen)
-- Stores copies of tables indexed by the original table.
already_seen = already_seen or {}
local copy = already_seen[orig]
if copy ~= nil then
return copy
end
if type(orig) == 'table' then
copy = {}
for orig_key, orig_value in pairs(orig) do
copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)
end
already_seen[orig] = copy
if includeMetatable then
local mt = getmetatable(orig)
if mt ~= nil then
local mt_copy = deepcopy(mt, includeMetatable, already_seen)
setmetatable(copy, mt_copy)
already_seen[mt] = mt_copy
end
end
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function p.deepCopy(orig, noMetatable, already_seen)
checkType("deepCopy", 3, already_seen, "table", true)
return _deepCopy(orig, not noMetatable, already_seen)
end
--[[
Concatenates all values in the table that are indexed by a number, in order.
sparseConcat{ a, nil, c, d } =&gt; "acd"
sparseConcat{ nil, b, c, d } =&gt; "bcd"
]]
function p.sparseConcat(t, sep, i, j)
local list = {}
local list_i = 0
for _, v in p.sparseIpairs(t) do
list_i = list_i + 1
list[list_i] = v
end
return table.concat(list, sep, i, j)
end
--[[
-- Finds the length of an array, or of a quasi-array with keys such
-- as "data1", "data2", etc., using an exponential search algorithm.
-- It is similar to the operator #, but may return
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t, prefix)
-- requiring module inline so that [[Module:Exponential search]]
-- which is only needed by this one function
-- doesn't get millions of transclusions
local expSearch = require("Module:Exponential search")
checkType('length', 1, t, 'table')
checkType('length', 2, prefix, 'string', true)
return expSearch(function(i)
local key
if prefix then
key = prefix .. tostring(i)
else
key = i
end
return t[key] ~= nil
end) or 0
end
function p.inArray(arr, valueToFind)
checkType("inArray", 1, arr, "table")
-- if valueToFind is nil, error?
for _, v in ipairs(arr) do
if v == valueToFind then
return true
end
end
return false
end
return p</text>
<sha1>k8alxjj4kl038b9fpyfzl6qf0yqrdst</sha1>
</revision>
</page>
<page>
<title>Module:Template wrapper</title>
<ns>828</ns>
<id>56140564</id>
<revision>
<id>884905647</id>
<parentid>884594328</parentid>
<timestamp>2019-02-24T19:51:48Z</timestamp>
<contributor>
<username>Pppery</username>
<id>28032115</id>
</contributor>
<comment>Reverting self: this parameter won't actually be useful due to its tendency to mangle param order and spacing</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="12426" xml:space="preserve">require('Module:No globals');
local error_msg = '&lt;span style=\"font-size:100%\" class=\"error\"&gt;&lt;code style=\"color:inherit; border:inherit; padding:inherit;\"&gt;&amp;#124;_template=&lt;/code&gt; missing or empty&lt;/span&gt;';
--[[--------------------------&lt; I S _ I N _ T A B L E &gt;--------------------------------------------------------
scan through tbl looking for value; return true if found, false else
]]
local function is_in_table (tbl, value)
for k, v in pairs (tbl) do
if v == value then return true end
end
return false;
end
--[[--------------------------&lt; A D D _ P A R A M E T E R &gt;----------------------------------------------------
adds parameter name and its value to args table according to the state of boolean list argument; kv pair for
template execution; k=v string for template listing.
]]
local function add_parameter (k, v, args, list)
if list then
table.insert( args, table.concat ({k, '=', v})); -- write parameter names and values to args table as string
else
args[k] = v; -- copy parameters to args table
end
end
--[[--------------------------&lt; A L I A S _ M A P _ G E T &gt;----------------------------------------------------
returns a table of local template (parent frame) parameter names and the target template names that match where
in [key]=&lt;value&gt; pairs where:
[key] is local template parameter name (an alias)
&lt;value&gt; is target template parameter name (the canonical parameter name used in the working template)
The parameter |_alias-map= has the form:
|_alias-map=&lt;list&gt;
where &lt;list&gt; is a comma-separated list of alias / canonical parameter name pairs in the form
&lt;from&gt; : &lt;to&gt;
where:
&lt;from&gt; is the local template's parameter name (alias)
&lt;to&gt; is the target template's parameter name (canonical)
for enumerated parameters place an octothorp (#) where the enumerator digits are placed in the parameter names:
&lt;from#&gt; : &lt;to#&gt;
]]
local function alias_map_get (_alias_map)
local T = mw.text.split (_alias_map, '%s*,%s*'); -- convert the comma-separated list into a table of alias pairs
local mapped_aliases = {}; -- mapped aliases will go here
local l_name, t_name; -- parameter names
for _, alias_pair in ipairs (T) do -- loop through the table of alias pairs
l_name, t_name = alias_pair:match ('(.-)%s*:%s*(.+)'); -- from each pair, get local and target parameter names
if l_name and t_name then -- if both are set
if tonumber (l_name) then
l_name = tonumber (l_name); -- convert number-as-text to a number
end
mapped_aliases[l_name] = t_name; -- add them to the map table
end
end
return mapped_aliases;
end
--[[--------------------------&lt; F R A M E _ A R G S _ G E T &gt;--------------------------------------------------
Fetch the wrapper template's 'default' and control parameters; adds default parameters to args
returns content of |_template= parameter (name of the working template); nil else
]]
local function frame_args_get (frame_args, args, list)
local template;
for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters
if 'string' == type (k) and (v and ('' ~= v)) then -- do not pass along positional or empty parameters
if '_template' == k then
template = v; -- save the name of template that we are wrapping
elseif '_exclude' ~= k and '_reuse' ~= k and '_include-positional' ~= k and '_alias-map' ~= k then -- these already handled so ignore here;
add_parameter (k, v, args, list); -- add all other parameters to args in the style dictated by list
end
end
end
return template; -- return contents of |_template= parameter
end
--[=[--------------------------&lt; P F R A M E _ A R G S _ G E T &gt;------------------------------------------------
Fetches the wrapper template's 'live' parameters; adds live parameters that aren't members of the exclude table to
args table; positional parameters may not be excluded
no return value
]=]
local function pframe_args_get (pframe_args, args, exclude, _include_positional, list)
for k, v in pairs (pframe_args) do
if 'string' == type (k) and not is_in_table (exclude, k) then -- do not pass along excluded parameters
if v and ('' ~= v) then -- pass along only those parameters that have assigned values
if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template
v = ''; -- unset the value in the args table
end
add_parameter (k, v, args, list) -- add all other parameters to args in the style dictated by list; alias map only supported for local-template parameters
end
end
end
if _include_positional then
for i, v in ipairs (pframe_args) do -- pass along positional parameters
if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template
v = ''; -- unset the value in the args table
end
add_parameter (i, v, args, list);
end
end
end
--[[--------------------------&lt; _ M A I N &gt;--------------------------------------------------------------------
Collect the various default and live parameters into args styled according to boolean list.
returns name of the working or listed template or nil for an error message
]]
local function _main (frame, args, list)
local template;
local exclude = {}; -- table of parameter names for parameters that are not passed to the working template
local reuse_list = {}; -- table of pframe parameter names whose values are modified before they are passed to the working template as the same name
local alias_map = {}; -- table that maps parameter aliases to working template canonical parameter names
local _include_positional;
if frame.args._exclude and ('' ~= frame.args._exclude) then -- if there is |_exclude= and it's not empty
exclude = mw.text.split (frame.args._exclude, "%s*,%s*"); -- make a table from its contents
end
-- TODO: |_reuse= needs a better name (|_reuse=)
if frame.args._reuse and ('' ~= frame.args._reuse) then -- if there is |_reuse= and it's not empty
reuse_list = mw.text.split (frame.args._reuse, "%s*,%s*"); -- make a table from its contents
end
if frame.args['_alias-map'] and ('' ~= frame.args['_alias-map']) then -- if there is |_alias-map= and it's not empty
alias_map = alias_map_get (frame.args['_alias-map']); -- make a table from its contents
end
template = frame_args_get (frame.args, args, list); -- get parameters provided in the {{#invoke:template wrapper|...|...}}
if nil == template or '' == template then -- this is the one parameter that is required by this module
return nil; -- not present, tell calling function to emit an error message
end
_include_positional = 'yes' == frame.args['_include-positional']; -- when true pass all positional parameters along with non-excluded named parameters to ...
-- ... the working template; positional parameters are not excludable
local _pframe_args = frame:getParent().args; -- here we get the wrapper template's 'live' parameters from pframe.args
local pframe_args = {}; -- a local table that we can modify
for k, v in pairs (_pframe_args) do -- make a copy that we can modify
pframe_args[k] = v;
end
-- here we look for pframe parameters that are aliases of canonical parameter names; when found
-- we replace the alias with the canonical. We do this here because the reuse_list works on
-- canonical parameter names so first we convert alias parameter names to canonical names and then
-- we remove those canonical names from the pframe table that are reused (provided to the working
-- template through the frame args table)
for k, v in pairs (alias_map) do -- k is alias name, v is canonical name
if pframe_args[k] then -- if pframe_args has parameter with alias name
pframe_args[v] = _pframe_args[k]; -- create new canonical name with alias' value
pframe_args[k] = nil; -- unset the alias
end
end
for k, v in pairs (pframe_args) do -- do enumerated parameter alias -&gt; canonical translation
if 'string' == type (k) then -- only named parameters can be enumerated
if alias_map[k..'#'] then -- non-enumerated alias matches enumerated parameter pattern? enumerator at end only
pframe_args[alias_map[k..'#']:gsub('#', '')] = v; -- remove '#' and copy parameter to pframe_args table
pframe_args[k] = nil; -- unset the alias
elseif k:match ('%d+') then -- if this parameter name contains digits
local temp = k:gsub ('%d+', '#'); -- make a copy; digits replaced with single '#'
local enum = k:match ('%d+'); -- get the enumerator
if alias_map[temp] then -- if this parameter is a recognized enumerated alias
pframe_args[alias_map[temp]:gsub('#', enum)] = v; -- use canonical name and replace '#' with enumerator and add to pframe_args
pframe_args[k] = nil; -- unset the alias
end
end
end
end
-- pframe parameters that are _reused are 'reused' have the form something like this:
-- |chapter=[[wikisource:{{{chapter}}}|{{{chapter}}}]]
-- where a parameter in the wrapping template is modified and then passed to the working template
-- using the same parameter name (in this example |chapter=)
-- remove parameters that will be reused
for k, v in ipairs (reuse_list) do -- k is numerical index, v is canonical parameter name to ignore
if pframe_args[v] then -- if pframe_args has parameter that should be ignored
pframe_args[v] = nil; -- unset the ignored parameter
end
end
pframe_args_get (pframe_args, args, exclude, _include_positional, list); -- add parameters and values to args that are not listed in the exclude table
return template; -- args now has all default and live parameters, return working template name
end
--[[--------------------------&lt; W R A P &gt;----------------------------------------------------------------------
Template entry point. Call this function to 'execute' the working template
]]
local function wrap (frame)
local args = {}; -- table of default and live parameters and their values to be passed to the wrapped template
local template; -- the name of the working template
template = _main (frame, args, false); -- get default and live parameters and the name of the working template
if not template then -- template name is required
return error_msg; -- emit error message and abandon if template name not present
end
return frame:expandTemplate {title=template, args=args}; -- render the working template
end
--[[--------------------------&lt; L I S T &gt;----------------------------------------------------------------------
Template entry point. Call this function to 'display' the source for the working template. This function added
as a result of a TfD here: Wikipedia:Templates_for_discussion/Log/2018_April_28#Module:PassArguments
This function replaces a similarly named function which was used in {{cite compare}} and {{cite compare2}}
Values in the args table are numerically indexed strings in the form 'name=value'
]]
local function list (frame)
local args = {}; -- table of default and live parameters and their values to be passed to the listed template
local template; -- the name of the listed template
template = _main (frame, args, true); -- get default and live parameters and the name of the listed template
if not template then -- template name is required
return error_msg; -- emit error message and abandon if template name not present
end
return frame:preprocess (table.concat ({'&lt;code style="color:inherit; background:inherit; border:none;"&gt;&lt;nowiki&gt;{{', template, ' |', table.concat( args, ' |' ), '}}&lt;/nowiki&gt;&lt;/code&gt;'})); -- render the template
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
list = list,
wrap = wrap,
};</text>
<sha1>o026rrye83xg61og90a8bnhg2u42iaw</sha1>
</revision>
</page>
<page>
<title>Module:Tlg</title>
<ns>828</ns>
<id>63673341</id>
<revision>
<id>952327088</id>
<parentid>952264743</parentid>
<timestamp>2020-04-21T18:00:02Z</timestamp>
<contributor>
<username>MusikBot II</username>
<id>29539620</id>
</contributor>
<minor/>
<comment>Protected "[[Module:Tlg]]": [[Wikipedia:High-risk templates|High-risk template or module]] ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3356" xml:space="preserve">-- This implements Template:Tlg
local getArgs = require('Module:Arguments').getArgs
local p = {}
-- Is a string non-empty?
local function _ne(s)
return s ~= nil and s ~= ""
end
local nw = mw.text.nowiki
local function addTemplate(s)
local i, _ = s:find(':', 1, true)
if i == nil then
return 'Template:' .. s
end
local ns = s:sub(1, i - 1)
if ns == '' or mw.site.namespaces[ns] then
return s
else
return 'Template:' .. s
end
end
local function trimTemplate(s)
local needle = 'template:'
if s:sub(1, needle:len()):lower() == needle then
return s:sub(needle:len() + 1)
else
return s
end
end
local function linkTitle(args)
if _ne(args.nolink) then
return args['1']
end
local titleObj
local titlePart = '[['
if args['1'] then
-- This handles :Page and other NS
titleObj = mw.title.new(args['1'], 'Template')
else
titleObj = mw.title.getCurrentTitle()
end
titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or
addTemplate(args['1']))
local textPart = args.alttext
if not _ne(textPart) then
if titleObj ~= nil then
textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText
else
-- redlink
textPart = args['1']
end
end
if _ne(args.subst) then
-- HACK: the ns thing above is probably broken
textPart = 'subst:' .. textPart
end
if _ne(args.brace) then
textPart = nw('{{') .. textPart .. nw('}}')
elseif _ne(args.braceinside) then
textPart = nw('{') .. textPart .. nw('}')
end
titlePart = titlePart .. '|' .. textPart .. ']]'
if _ne(args.braceinside) then
titlePart = nw('{') .. titlePart .. nw('}')
end
return titlePart
end
function p.main(frame)
local args = getArgs(frame, {
trim = true,
removeBlanks = false
})
return p._main(args)
end
function p._main(args)
local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname)
local italic = _ne(args.italic) or _ne(args.italics)
local dontBrace = _ne(args.brace) or _ne(args.braceinside)
local code = _ne(args.code) or _ne(args.tt)
-- Build the link part
local titlePart = linkTitle(args)
if bold then titlePart = "'''" .. titlePart .. "'''" end
if _ne(args.nowrapname) then titlePart = '&lt;span class="nowrap"&gt;' .. titlePart .. '&lt;/span&gt;' end
-- Build the arguments
local textPart = ""
for i = 2, 11 do
local ii = tostring(i)
local val = args[ii]
if val ~= nil then val = mw.text.unstripNoWiki(val) else break end
if _ne(args.nowiki) then val = nw(val) end
if italic then val = '&lt;span style="font-style:italic;"&gt;' .. val .. '&lt;/span&gt;' end
textPart = textPart .. '&amp;#124;' .. val
end
if _ne(args['12']) then textPart = textPart .. '&amp;#124;…' end
-- final wrap
local ret = titlePart .. textPart
if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end
if _ne(args.a) then ret = nw('*') .. '&amp;nbsp;' .. ret end
if _ne(args.kbd) then ret = '&lt;kbd&gt;' .. ret .. '&lt;/kbd&gt;' end
if code then
ret = '&lt;code&gt;' .. ret .. '&lt;/code&gt;'
elseif _ne(args.plaincode) then
ret = '&lt;code style="border:none;background:transparent;"&gt;' .. ret .. '&lt;/code&gt;'
end
if _ne(args.nowrap) then ret = '&lt;span class="nowrap"&gt;' .. ret .. '&lt;/span&gt;' end
--[[ Wrap as html??
local span = mw.html.create('span')
span:wikitext(ret)
--]]
if _ne(args.debug) then ret = ret .. '\n&lt;pre&gt;' .. mw.text.encode(mw.dumpObject(args)) .. '&lt;/pre&gt;' end
return ret
end
return p</text>
<sha1>9v2mu819mr06chi30bhe3gas87d94qt</sha1>
</revision>
</page>
<page>
<title>Module:Transclusion count</title>
<ns>828</ns>
<id>61792794</id>
<revision>
<id>981054179</id>
<parentid>981029749</parentid>
<timestamp>2020-09-30T00:41:43Z</timestamp>
<contributor>
<username>ProcrastinatingReader</username>
<id>32939139</id>
</contributor>
<comment>add a truthy check too</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="1410" xml:space="preserve">local p = {}
function p.fetch(frame)
local template = nil
local return_value = nil
-- Use demo parameter if it exists, otherswise use current template name
local namespace = mw.title.getCurrentTitle().namespace
if frame.args["demo"] and frame.args["demo"] ~= "" then
template = frame.args["demo"]
elseif namespace == 10 then -- Template namespace
template = mw.title.getCurrentTitle().text
elseif namespace == 828 then -- Module namespace
template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text)
end
-- If in template or module namespace, look up count in /data
if template ~= nil then
namespace = mw.title.new(template, "Template").namespace
if namespace == 10 or namespace == 828 then
template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end
local index = mw.ustring.sub(mw.title.new(template).text,1,1)
local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))
return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")])
end
end
-- If database value doesn't exist, use value passed to template
if return_value == nil and frame.args[1] ~= nil then
local arg1=mw.ustring.match(frame.args[1], '[%d,]+')
if arg1 and arg1 ~= '' then
return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R'))
end
end
return return_value
end
return p</text>
<sha1>h9ky1fdc2argcyjstoy2n0i4o1hjaj9</sha1>
</revision>
</page>
<page>
<title>Module:Transclusion count/data/C</title>
<ns>828</ns>
<id>61481071</id>
<revision>
<id>988779438</id>
<parentid>987615353</parentid>
<timestamp>2020-11-15T05:27:33Z</timestamp>
<contributor>
<username>Ahechtbot</username>
<id>26109785</id>
</contributor>
<minor/>
<comment>[[Wikipedia:BOT|Bot]]: Updated page.</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="33145" xml:space="preserve">return {
["C"] = 517000,
["C-Class"] = 60000,
["C-SPAN"] = 11000,
["C-cmn"] = 2300,
["C-pl"] = 53000,
["CAN"] = 19000,
["CANelec"] = 8800,
["CANelec/hold"] = 3000,
["CANelec/source"] = 5000,
["CANelec/top"] = 5100,
["CANelec/total"] = 5200,
["CAS"] = 3800,
["CBB_Standings_End"] = 11000,
["CBB_Standings_Entry"] = 11000,
["CBB_Standings_Start"] = 11000,
["CBB_Yearly_Record_End"] = 2500,
["CBB_Yearly_Record_Entry"] = 2600,
["CBB_Yearly_Record_Start"] = 2500,
["CBB_Yearly_Record_Subhead"] = 3400,
["CBB_Yearly_Record_Subtotal"] = 2400,
["CBB_roster/Footer"] = 5200,
["CBB_roster/Header"] = 5200,
["CBB_roster/Player"] = 5200,
["CBB_schedule_end"] = 7700,
["CBB_schedule_entry"] = 7800,
["CBB_schedule_start"] = 7800,
["CBB_yearly_record_end"] = 3500,
["CBB_yearly_record_end/legend"] = 3000,
["CBB_yearly_record_entry"] = 3400,
["CBB_yearly_record_start"] = 3400,
["CBB_yearly_record_subhead"] = 3500,
["CBB_yearly_record_subtotal"] = 3200,
["CBSB_Standings_End"] = 3000,
["CBSB_Standings_Entry"] = 3000,
["CBSB_Standings_Start"] = 3000,
["CBSB_link"] = 2600,
["CC0"] = 5800,
["CENTURY"] = 16000,
["CFB_Standings_End"] = 26000,
["CFB_Standings_Entry"] = 26000,
["CFB_Standings_Start"] = 26000,
["CFB_Yearly_Record_End"] = 5800,
["CFB_Yearly_Record_End/legend"] = 2000,
["CFB_Yearly_Record_Entry"] = 5800,
["CFB_Yearly_Record_Start"] = 5800,
["CFB_Yearly_Record_Subhead"] = 5800,
["CFB_Yearly_Record_Subtotal"] = 5700,
["CFB_schedule"] = 20000,
["CFB_schedule_entry"] = 14000,
["CFL_Year"] = 4900,
["CGF_year"] = 2300,
["CHE"] = 9300,
["CHI"] = 2500,
["CHL"] = 3300,
["CHN"] = 10000,
["COI"] = 14000,
["COIUL"] = 113000,
["COI_editnotice"] = 5400,
["COL"] = 4400,
["COLON"] = 13000,
["CRO"] = 3600,
["CSK"] = 2600,
["CSS_image_crop"] = 2900,
["CUB"] = 3300,
["CURRENTDATE"] = 3600,
["CURRENTMINUTE"] = 2900,
["CZE"] = 12000,
["Calendar"] = 2300,
["California's_Geographic_Names"] = 2600,
["California/color"] = 12000,
["Call_sign_disambiguation"] = 2800,
["Campaignbox"] = 20000,
["CanadaByProvinceCatNav"] = 9300,
["CanadaProvinceThe"] = 3800,
["Canadian_English"] = 3800,
["Canadian_Parliament_links"] = 4900,
["Canadian_election_result"] = 8800,
["Canadian_election_result/hold"] = 3000,
["Canadian_election_result/source"] = 5800,
["Canadian_election_result/top"] = 8200,
["Canadian_election_result/top/ElectionYearTest"] = 4200,
["Canadian_election_result/total"] = 7000,
["Canadian_party_colour"] = 12000,
["Canadian_party_colour/colour"] = 12000,
["Canadian_party_colour/colour/default"] = 12000,
["Canadian_party_colour/name"] = 9700,
["Canadian_party_colour/name/default"] = 4300,
["Cascite"] = 13000,
["Caselaw_source"] = 3800,
["Cast_listing"] = 6100,
["Cat"] = 223000,
["CatAutoTOC"] = 573000,
["CatAutoTOC/core"] = 572000,
["CatRel"] = 3800,
["CatTrack"] = 3100,
["Cat_class"] = 7000,
["Cat_in_use"] = 56000,
["Cat_main"] = 161000,
["Cat_more"] = 110000,
["Cat_more_if_exists"] = 40000,
["Cat_see_also"] = 2900,
["Catalog_lookup_link"] = 469000,
["Category"] = 45000,
["Category-Class"] = 13000,
["Category-inline"] = 6800,
["Category_TOC"] = 66000,
["Category_TOC/tracking"] = 66000,
["Category_U.S._State_elections_by_year"] = 6900,
["Category_U.S._State_elections_by_year/core"] = 6900,
["Category_class"] = 40000,
["Category_class/column"] = 40000,
["Category_class/second_row_column"] = 40000,
["Category_described_in_year"] = 5400,
["Category_diffuse"] = 9000,
["Category_disambiguation"] = 2100,
["Category_disambiguation/category_link"] = 2100,
["Category_explanation"] = 67000,
["Category_handler"] = 2980000,
["Category_ifexist"] = 4600,
["Category_importance"] = 12000,
["Category_importance/column"] = 12000,
["Category_importance/second_row_column"] = 12000,
["Category_link"] = 144000,
["Category_link_with_count"] = 5000,
["Category_ordered_by_date"] = 9300,
["Category_other"] = 786000,
["Category_pair"] = 4300,
["Category_pair/core"] = 4300,
["Category_redirect"] = 99000,
["Category_see_also"] = 37000,
["Category_see_also/Category_pair_check"] = 37000,
["Category_see_also_if_exists"] = 45000,
["Category_see_also_if_exists_2"] = 77000,
["Category_title"] = 2700,
["Catexp"] = 5500,
["CathEncy"] = 2400,
["Catholic"] = 4300,
["Catholic_Encyclopedia"] = 4900,
["Catmain"] = 22000,
["Catmore"] = 9100,
["Caution"] = 2100,
["Cbb_link"] = 6100,
["Cbignore"] = 22000,
["Cc-by-2.5"] = 5100,
["Cc-by-3.0"] = 12000,
["Cc-by-sa-2.5"] = 3600,
["Cc-by-sa-2.5,2.0,1.0"] = 3700,
["Cc-by-sa-3.0"] = 36000,
["Cc-by-sa-3.0,2.5,2.0,1.0"] = 3900,
["Cc-by-sa-3.0-migrated"] = 33000,
["Cc-by-sa-4.0"] = 14000,
["Cc-zero"] = 5800,
["CensusAU"] = 9400,
["Census_2016_AUS"] = 7500,
["Cent"] = 4700,
["Center"] = 565000,
["Centralized_discussion"] = 5000,
["Centralized_discussion/core"] = 5000,
["Centre"] = 2200,
["Century"] = 2000,
["Century_name_from_decade_or_year"] = 67000,
["Century_name_from_title_decade"] = 5900,
["Century_name_from_title_year"] = 6100,
["Certification_Cite/Title"] = 19000,
["Certification_Cite/URL"] = 21000,
["Certification_Cite_Ref"] = 19000,
["Certification_Table_Bottom"] = 19000,
["Certification_Table_Entry"] = 19000,
["Certification_Table_Entry/Foot"] = 18000,
["Certification_Table_Entry/Foot/helper"] = 18000,
["Certification_Table_Entry/Region"] = 19000,
["Certification_Table_Entry/Sales"] = 17000,
["Certification_Table_Entry/Sales/GermanPeriod"] = 2700,
["Certification_Table_Top"] = 20000,
["Cfb_link"] = 20000,
["Cfd_result"] = 2500,
["Cfdend"] = 3800,
["Chart"] = 4500,
["Chart/end"] = 4500,
["Chart/start"] = 4500,
["Check_completeness_of_transclusions"] = 3700,
["Check_talk"] = 21000,
["Check_talk_wp"] = 1310000,
["Check_winner_by_scores"] = 10000,
["CheckedSockpuppet"] = 7100,
["Checked_sockpuppet"] = 17000,
["Checkedsockpuppet"] = 5300,
["Checkip"] = 11000,
["Checkuser"] = 60000,
["Checkuserblock-account"] = 6400,
["Chem"] = 3800,
["Chem/atom"] = 3800,
["Chem/link"] = 3800,
["Chem_molar_mass"] = 15000,
["Chem_molar_mass/format"] = 15000,
["Chembox"] = 12000,
["Chembox_3DMet"] = 12000,
["Chembox_3DMet/format"] = 12000,
["Chembox_AllOtherNames"] = 11000,
["Chembox_AllOtherNames/format"] = 11000,
["Chembox_Appearance"] = 5200,
["Chembox_BoilingPt"] = 3500,
["Chembox_CASNo"] = 12000,
["Chembox_CASNo/format"] = 12000,
["Chembox_CalcTemperatures"] = 6100,
["Chembox_ChEBI"] = 12000,
["Chembox_ChEBI/format"] = 12000,
["Chembox_ChEMBL"] = 12000,
["Chembox_ChEMBL/format"] = 12000,
["Chembox_ChemSpiderID"] = 12000,
["Chembox_ChemSpiderID/format"] = 12000,
["Chembox_CompTox"] = 12000,
["Chembox_CompTox/format"] = 12000,
["Chembox_Density"] = 4400,
["Chembox_DrugBank"] = 12000,
["Chembox_DrugBank/format"] = 12000,
["Chembox_ECHA"] = 7000,
["Chembox_ECNumber"] = 12000,
["Chembox_ECNumber/format"] = 12000,
["Chembox_Elements"] = 12000,
["Chembox_Elements/molecular_formula"] = 15000,
["Chembox_Footer"] = 12000,
["Chembox_Footer/tracking"] = 12000,
["Chembox_Hazards"] = 11000,
["Chembox_IUPHAR_ligand"] = 12000,
["Chembox_IUPHAR_ligand/format"] = 12000,
["Chembox_Identifiers"] = 12000,
["Chembox_InChI"] = 11000,
["Chembox_InChI/format"] = 11000,
["Chembox_Indexlist"] = 12000,
["Chembox_Jmol"] = 12000,
["Chembox_Jmol/format"] = 12000,
["Chembox_KEGG"] = 12000,
["Chembox_KEGG/format"] = 12000,
["Chembox_MeltingPt"] = 5200,
["Chembox_Properties"] = 12000,
["Chembox_PubChem"] = 12000,
["Chembox_PubChem/format"] = 12000,
["Chembox_RTECS"] = 12000,
["Chembox_RTECS/format"] = 12000,
["Chembox_Related"] = 2600,
["Chembox_SMILES"] = 11000,
["Chembox_SMILES/format"] = 11000,
["Chembox_SolubilityInWater"] = 3400,
["Chembox_UNII"] = 12000,
["Chembox_UNII/format"] = 12000,
["Chembox_headerbar"] = 12000,
["Chembox_image"] = 12000,
["Chembox_image_cell"] = 11000,
["Chembox_image_sbs"] = 12000,
["Chembox_parametercheck"] = 12000,
["Chembox_templatePar/formatPreviewMessage"] = 12000,
["Chembox_verification"] = 7200,
["Chemicals"] = 8400,
["Chemistry"] = 3000,
["Chemspidercite"] = 11000,
["Chessgames_player"] = 2900,
["Chinese"] = 6900,
["Chr"] = 8700,
["ChristianityWikiProject"] = 6900,
["Circa"] = 34000,
["Circular_reference"] = 5100,
["Citation"] = 303000,
["Citation/make_link"] = 4600,
["Citation_needed"] = 447000,
["Citation_needed_span"] = 2600,
["Citation_style"] = 4400,
["Cite_AV_media"] = 28000,
["Cite_AV_media_notes"] = 19000,
["Cite_Appletons'"] = 2300,
["Cite_Australian_Dictionary_of_Biography"] = 2500,
["Cite_Catholic_Encyclopedia"] = 7800,
["Cite_DCB"] = 2600,
["Cite_DNB"] = 17000,
["Cite_EB1911"] = 21000,
["Cite_GNIS"] = 2300,
["Cite_Jewish_Encyclopedia"] = 2500,
["Cite_NIE"] = 3600,
["Cite_NSW_Parliament"] = 3100,
["Cite_NSW_SHR"] = 2600,
["Cite_ODNB"] = 9100,
["Cite_Q"] = 43000,
["Cite_QHR"] = 2900,
["Cite_QPN"] = 3900,
["Cite_Russian_law"] = 7000,
["Cite_Sports-Reference"] = 53000,
["Cite_WoRMS"] = 3500,
["Cite_arXiv"] = 3800,
["Cite_av_media"] = 3400,
["Cite_bcgnis"] = 2700,
["Cite_book"] = 1280000,
["Cite_certification"] = 21000,
["Cite_cgndb"] = 2400,
["Cite_conference"] = 11000,
["Cite_court"] = 4400,
["Cite_document"] = 6800,
["Cite_encyclopedia"] = 124000,
["Cite_episode"] = 15000,
["Cite_gnis"] = 32000,
["Cite_interview"] = 5300,
["Cite_iucn"] = 31000,
["Cite_journal"] = 719000,
["Cite_magazine"] = 122000,
["Cite_map"] = 29000,
["Cite_news"] = 1150000,
["Cite_newspaper"] = 7200,
["Cite_newspaper_The_Times"] = 5700,
["Cite_paper"] = 3200,
["Cite_patent"] = 4000,
["Cite_patent/authors"] = 2700,
["Cite_patent/core"] = 4400,
["Cite_peakbagger"] = 3600,
["Cite_podcast"] = 2100,
["Cite_press_release"] = 46000,
["Cite_report"] = 21000,
["Cite_simbad"] = 3500,
["Cite_sports-reference"] = 58000,
["Cite_thesis"] = 15000,
["Cite_tweet"] = 15000,
["Cite_video"] = 11000,
["Cite_video_game"] = 2500,
["Cite_web"] = 3720000,
["Cite_wikisource"] = 4200,
["Cite_wikisource/make_link"] = 50000,
["Civil_navigation"] = 2400,
["Cl"] = 99000,
["Clade"] = 5200,
["Clade/styles.css"] = 5200,
["Clarify"] = 36000,
["Class"] = 8870000,
["Class/colour"] = 8920000,
["Class/icon"] = 8890000,
["Class_mask"] = 9060000,
["Class_mask/b"] = 289000,
["Classical"] = 7600,
["Classicon"] = 4300,
["Clc"] = 4100,
["Cleanup"] = 13000,
["Cleanup_reorganize"] = 2700,
["Cleanup_rewrite"] = 5300,
["Clear"] = 3040000,
["Clear-left"] = 18000,
["Clear_left"] = 30000,
["Clear_right"] = 2700,
["Clerk-Note"] = 7700,
["Clerknote"] = 5600,
["Clickable_button"] = 11000,
["Clickable_button_2"] = 727000,
["Clr"] = 3500,
["Cmbox"] = 328000,
["Cn"] = 76000,
["Coat_of_arms"] = 7600,
["Cob"] = 8800,
["Code"] = 36000,
["Col-1-of-2"] = 3100,
["Col-2"] = 147000,
["Col-2-of-2"] = 3000,
["Col-3"] = 12000,
["Col-4"] = 4200,
["Col-begin"] = 195000,
["Col-break"] = 191000,
["Col-end"] = 192000,
["Col-float"] = 2000,
["Col-float/styles.css"] = 2000,
["Col-start"] = 18000,
["Colbegin"] = 49000,
["Colend"] = 58000,
["Collapse"] = 8800,
["Collapse_bottom"] = 44000,
["Collapse_top"] = 44000,
["Collapsebottom"] = 3700,
["Collapsetop"] = 3600,
["Collapsible_list"] = 43000,
["Collapsible_option"] = 121000,
["Colledge"] = 3100,
["College"] = 6400,
["CollegePrimaryHeader"] = 3700,
["CollegePrimaryStyle"] = 79000,
["College_Athlete_Recruit_End"] = 2200,
["College_Athlete_Recruit_Entry"] = 2300,
["College_Athlete_Recruit_Start"] = 2300,
["College_athlete_recruit_end"] = 3200,
["College_athlete_recruit_entry"] = 3300,
["College_athlete_recruit_start"] = 3300,
["College_color_list"] = 3500,
["Colon"] = 16000,
["Color"] = 400000,
["Color_box"] = 58000,
["Colorbox"] = 2400,
["Colorbull"] = 4500,
["Colored_link"] = 26000,
["Colors"] = 18000,
["Colour"] = 10000,
["Coloured_link"] = 4300,
["Column-count"] = 18000,
["Column-width"] = 938000,
["Columns-list"] = 85000,
["Columns/styles.css"] = 3300,
["Comedy"] = 3200,
["Comic_Book_DB"] = 3700,
["Comicbookdb"] = 3600,
["Comics-replaceability"] = 2900,
["Comics_infobox_sec"] = 11000,
["Comics_infobox_sec/creator_nat"] = 3000,
["Comics_infobox_sec/formcat"] = 3000,
["Comics_infobox_sec/genre"] = 3700,
["Comics_infobox_sec/genrecat"] = 3400,
["Comicsproj"] = 30000,
["Comicsyrimage"] = 2100,
["Comma_separated_entries"] = 307000,
["Comment"] = 3700,
["Committed_identity"] = 2700,
["Committed_identity/styles.css"] = 2700,
["Commons"] = 64000,
["Commons-inline"] = 12000,
["Commons_cat"] = 49000,
["Commons_category"] = 785000,
["Commons_category-inline"] = 111000,
["Commons_category_inline"] = 6900,
["Commonscat"] = 75000,
["Commonscat-inline"] = 26000,
["Commonscat_inline"] = 3100,
["Commonscatinline"] = 7100,
["Compact_ToC"] = 6400,
["Compare"] = 7100,
["Compare_image_with_Wikidata"] = 7100,
["Composition_bar"] = 7800,
["ConfirmationOTRS"] = 3100,
["Confirmed"] = 13000,
["Confused"] = 2600,
["Confusing"] = 2400,
["CongBio"] = 9800,
["CongLinks"] = 4200,
["Connected_contributor"] = 14000,
["Connected_contributor_(paid)"] = 4900,
["Conservative_Party_(UK)/meta/color"] = 11000,
["Conservative_Party_(UK)/meta/shortname"] = 9000,
["Conservative_and_Unionist_Party_(UK)/meta/color"] = 11000,
["Constellation_navbox"] = 4900,
["Container"] = 8400,
["Container_cat"] = 6400,
["Container_category"] = 33000,
["Containercat"] = 2700,
["Contains_special_characters"] = 4100,
["Contains_special_characters/core"] = 4100,
["Content_category"] = 6600,
["Context"] = 3900,
["Continent2continental"] = 14000,
["Continent_adjective_to_noun"] = 2200,
["Controversial"] = 3000,
["Convert"] = 1040000,
["Convinfobox"] = 179000,
["Convinfobox/2"] = 12000,
["Convinfobox/3"] = 107000,
["Convinfobox/pri2"] = 54000,
["Convinfobox/prisec2"] = 2600,
["Convinfobox/prisec3"] = 21000,
["Convinfobox/sec2"] = 7000,
["Coord"] = 1240000,
["Coord_missing"] = 119000,
["Coord_missing/CheckCat"] = 117000,
["Coords"] = 6800,
["Copied"] = 15000,
["Copy_to_Wikimedia_Commons"] = 157000,
["Copyvios"] = 4000,
["Cospar"] = 2800,
["Cot"] = 8600,
["Count"] = 10000,
["Country2continent"] = 19000,
["CountryPrefixThe"] = 95000,
["Country_abbreviation"] = 81000,
["Country_alias"] = 14000,
["Country_at_games_navbox"] = 2100,
["Country_at_games_navbox/below"] = 2100,
["Country_data"] = 4800,
["Country_data_ALB"] = 5800,
["Country_data_ALG"] = 7500,
["Country_data_AND"] = 2300,
["Country_data_ANG"] = 3900,
["Country_data_ARG"] = 40000,
["Country_data_ARM"] = 5900,
["Country_data_AUS"] = 65000,
["Country_data_AUT"] = 38000,
["Country_data_AZE"] = 6900,
["Country_data_Afghanistan"] = 9600,
["Country_data_Alaska"] = 2100,
["Country_data_Albania"] = 15000,
["Country_data_Alberta"] = 3800,
["Country_data_Algeria"] = 19000,
["Country_data_American_Samoa"] = 2600,
["Country_data_Andorra"] = 6500,
["Country_data_Angola"] = 9700,
["Country_data_Anguilla"] = 2400,
["Country_data_Antigua_and_Barbuda"] = 5500,
["Country_data_Apulia"] = 7900,
["Country_data_Argentina"] = 65000,
["Country_data_Arizona"] = 2200,
["Country_data_Armenia"] = 16000,
["Country_data_Aruba"] = 3500,
["Country_data_Australia"] = 102000,
["Country_data_Austria"] = 59000,
["Country_data_Azerbaijan"] = 21000,
["Country_data_BAH"] = 3800,
["Country_data_BAN"] = 3400,
["Country_data_BAR"] = 2200,
["Country_data_BEL"] = 43000,
["Country_data_BHR"] = 3500,
["Country_data_BIH"] = 10000,
["Country_data_BLR"] = 21000,
["Country_data_BOL"] = 5600,
["Country_data_BOT"] = 2000,
["Country_data_BRA"] = 49000,
["Country_data_BUL"] = 21000,
["Country_data_Bahamas"] = 8700,
["Country_data_Bahrain"] = 8700,
["Country_data_Bangladesh"] = 14000,
["Country_data_Barbados"] = 7000,
["Country_data_Belarus"] = 33000,
["Country_data_Belgium"] = 68000,
["Country_data_Belize"] = 4600,
["Country_data_Benin"] = 6100,
["Country_data_Bermuda"] = 5100,
["Country_data_Bhutan"] = 4100,
["Country_data_Bolivia"] = 12000,
["Country_data_Bosnia_and_Herzegovina"] = 21000,
["Country_data_Botswana"] = 7500,
["Country_data_Brazil"] = 83000,
["Country_data_British_Columbia"] = 2500,
["Country_data_British_Virgin_Islands"] = 3300,
["Country_data_Brunei"] = 5400,
["Country_data_Bulgaria"] = 40000,
["Country_data_Burkina_Faso"] = 8500,
["Country_data_Burma"] = 2700,
["Country_data_Burundi"] = 4600,
["Country_data_CAN"] = 51000,
["Country_data_CHE"] = 3900,
["Country_data_CHI"] = 15000,
["Country_data_CHN"] = 35000,
["Country_data_CIV"] = 6300,
["Country_data_CMR"] = 6800,
["Country_data_COD"] = 2600,
["Country_data_COL"] = 21000,
["Country_data_CRC"] = 6000,
["Country_data_CRO"] = 28000,
["Country_data_CUB"] = 8000,
["Country_data_CYP"] = 7500,
["Country_data_CZE"] = 40000,
["Country_data_California"] = 6200,
["Country_data_Cambodia"] = 7700,
["Country_data_Cameroon"] = 14000,
["Country_data_Canada"] = 101000,
["Country_data_Cape_Verde"] = 4800,
["Country_data_Catalonia"] = 2400,
["Country_data_Cayman_Islands"] = 4100,
["Country_data_Central_African_Republic"] = 4000,
["Country_data_Chad"] = 4500,
["Country_data_Chile"] = 32000,
["Country_data_China"] = 65000,
["Country_data_Chinese_Taipei"] = 15000,
["Country_data_Colombia"] = 37000,
["Country_data_Colorado"] = 4800,
["Country_data_Comoros"] = 3600,
["Country_data_Confederate_States_of_America"] = 2900,
["Country_data_Connecticut"] = 2900,
["Country_data_Cook_Islands"] = 3200,
["Country_data_Costa_Rica"] = 14000,
["Country_data_Croatia"] = 45000,
["Country_data_Cuba"] = 17000,
["Country_data_Curaçao"] = 3400,
["Country_data_Cyprus"] = 17000,
["Country_data_Czech_Republic"] = 63000,
["Country_data_Czechoslovakia"] = 15000,
["Country_data_DEN"] = 29000,
["Country_data_DEU"] = 7500,
["Country_data_DNK"] = 2800,
["Country_data_DOM"] = 7100,
["Country_data_Democratic_Republic_of_the_Congo"] = 9100,
["Country_data_Denmark"] = 56000,
["Country_data_Djibouti"] = 3800,
["Country_data_Dominica"] = 3500,
["Country_data_Dominican_Republic"] = 15000,
["Country_data_ECU"] = 10000,
["Country_data_EGY"] = 11000,
["Country_data_ENG"] = 38000,
["Country_data_ESA"] = 2200,
["Country_data_ESP"] = 60000,
["Country_data_EST"] = 12000,
["Country_data_ETH"] = 3200,
["Country_data_EU"] = 3400,
["Country_data_East_Germany"] = 9600,
["Country_data_East_Timor"] = 4000,
["Country_data_Ecuador"] = 19000,
["Country_data_Egypt"] = 25000,
["Country_data_El_Salvador"] = 11000,
["Country_data_Empire_of_Japan"] = 3300,
["Country_data_England"] = 78000,
["Country_data_Equatorial_Guinea"] = 4300,
["Country_data_Eritrea"] = 4200,
["Country_data_Estonia"] = 26000,
["Country_data_Eswatini"] = 4100,
["Country_data_Ethiopia"] = 9800,
["Country_data_Europe"] = 2300,
["Country_data_European_Union"] = 6500,
["Country_data_FIJ"] = 3200,
["Country_data_FIN"] = 29000,
["Country_data_FRA"] = 81000,
["Country_data_FRG"] = 11000,
["Country_data_FR_Yugoslavia"] = 3500,
["Country_data_Falkland_Islands"] = 2000,
["Country_data_Faroe_Islands"] = 4600,
["Country_data_Federated_States_of_Micronesia"] = 2500,
["Country_data_Fiji"] = 9100,
["Country_data_Finland"] = 52000,
["Country_data_Florida"] = 6400,
["Country_data_France"] = 174000,
["Country_data_French_Polynesia"] = 3200,
["Country_data_GAB"] = 2200,
["Country_data_GBR"] = 45000,
["Country_data_GDR"] = 5500,
["Country_data_GEO"] = 10000,
["Country_data_GER"] = 67000,
["Country_data_GHA"] = 8100,
["Country_data_GRE"] = 21000,
["Country_data_GUA"] = 4600,
["Country_data_GUI"] = 2300,
["Country_data_GUY"] = 2400,
["Country_data_Gabon"] = 6400,
["Country_data_Gambia"] = 5200,
["Country_data_Georgia"] = 9400,
["Country_data_Georgia_(U.S._state)"] = 2500,
["Country_data_Georgia_(country)"] = 21000,
["Country_data_German_Empire"] = 4500,
["Country_data_Germany"] = 122000,
["Country_data_Ghana"] = 18000,
["Country_data_Gibraltar"] = 4000,
["Country_data_Great_Britain"] = 53000,
["Country_data_Greece"] = 45000,
["Country_data_Greenland"] = 2500,
["Country_data_Grenada"] = 4500,
["Country_data_Guadeloupe"] = 2300,
["Country_data_Guam"] = 4300,
["Country_data_Guatemala"] = 11000,
["Country_data_Guernsey"] = 2100,
["Country_data_Guinea"] = 6800,
["Country_data_Guinea-Bissau"] = 4000,
["Country_data_Guyana"] = 6900,
["Country_data_HAI"] = 3000,
["Country_data_HKG"] = 11000,
["Country_data_HON"] = 3800,
["Country_data_HUN"] = 30000,
["Country_data_Haiti"] = 7700,
["Country_data_Honduras"] = 9500,
["Country_data_Hong_Kong"] = 21000,
["Country_data_Hungary"] = 52000,
["Country_data_IDN"] = 4700,
["Country_data_INA"] = 8900,
["Country_data_IND"] = 26000,
["Country_data_IRE"] = 9700,
["Country_data_IRI"] = 4100,
["Country_data_IRL"] = 18000,
["Country_data_IRN"] = 5300,
["Country_data_IRQ"] = 3300,
["Country_data_ISL"] = 7700,
["Country_data_ISR"] = 18000,
["Country_data_ITA"] = 72000,
["Country_data_Iceland"] = 18000,
["Country_data_Idaho"] = 2000,
["Country_data_Illinois"] = 5100,
["Country_data_India"] = 87000,
["Country_data_Indiana"] = 2600,
["Country_data_Indonesia"] = 30000,
["Country_data_Iowa"] = 2900,
["Country_data_Iran"] = 88000,
["Country_data_Iraq"] = 11000,
["Country_data_Ireland"] = 28000,
["Country_data_Isle_of_Man"] = 2800,
["Country_data_Israel"] = 36000,
["Country_data_Italy"] = 115000,
["Country_data_Ivory_Coast"] = 13000,
["Country_data_JAM"] = 8200,
["Country_data_JOR"] = 3100,
["Country_data_JP"] = 7600,
["Country_data_JPN"] = 50000,
["Country_data_Jamaica"] = 16000,
["Country_data_Japan"] = 95000,
["Country_data_Jersey"] = 2400,
["Country_data_Jordan"] = 9400,
["Country_data_KAZ"] = 16000,
["Country_data_KEN"] = 6100,
["Country_data_KGZ"] = 3000,
["Country_data_KOR"] = 27000,
["Country_data_KSA"] = 4600,
["Country_data_KUW"] = 3300,
["Country_data_Kazakhstan"] = 25000,
["Country_data_Kenya"] = 15000,
["Country_data_Kingdom_of_Great_Britain"] = 3900,
["Country_data_Kingdom_of_Italy"] = 3300,
["Country_data_Kiribati"] = 2400,
["Country_data_Kosovo"] = 6400,
["Country_data_Kuwait"] = 8800,
["Country_data_Kyrgyzstan"] = 7700,
["Country_data_LAT"] = 12000,
["Country_data_LIB"] = 2500,
["Country_data_LIE"] = 2800,
["Country_data_LIT"] = 2900,
["Country_data_LTU"] = 10000,
["Country_data_LUX"] = 8900,
["Country_data_Laos"] = 6300,
["Country_data_Latvia"] = 25000,
["Country_data_Lebanon"] = 12000,
["Country_data_Lesotho"] = 4300,
["Country_data_Liberia"] = 5800,
["Country_data_Libya"] = 7300,
["Country_data_Liechtenstein"] = 6500,
["Country_data_Lithuania"] = 24000,
["Country_data_Luxembourg"] = 18000,
["Country_data_MAC"] = 2300,
["Country_data_MAR"] = 9500,
["Country_data_MAS"] = 9300,
["Country_data_MDA"] = 5900,
["Country_data_MEX"] = 27000,
["Country_data_MGL"] = 2100,
["Country_data_MKD"] = 5900,
["Country_data_MLI"] = 3300,
["Country_data_MLT"] = 5100,
["Country_data_MNE"] = 6600,
["Country_data_MON"] = 2900,
["Country_data_MRI"] = 2100,
["Country_data_MYA"] = 2800,
["Country_data_MYS"] = 3900,
["Country_data_Macau"] = 6300,
["Country_data_Macedonia"] = 5100,
["Country_data_Madagascar"] = 7500,
["Country_data_Malawi"] = 4600,
["Country_data_Malaysia"] = 30000,
["Country_data_Maldives"] = 5100,
["Country_data_Mali"] = 9300,
["Country_data_Malta"] = 13000,
["Country_data_Manitoba"] = 2500,
["Country_data_Marshall_Islands"] = 3000,
["Country_data_Martinique"] = 2500,
["Country_data_Maryland"] = 2900,
["Country_data_Massachusetts"] = 2600,
["Country_data_Mauritania"] = 4600,
["Country_data_Mauritius"] = 7100,
["Country_data_Mexico"] = 51000,
["Country_data_Michigan"] = 3800,
["Country_data_Minnesota"] = 3500,
["Country_data_Moldova"] = 14000,
["Country_data_Monaco"] = 8500,
["Country_data_Mongolia"] = 7700,
["Country_data_Montana"] = 2300,
["Country_data_Montenegro"] = 14000,
["Country_data_Montserrat"] = 2400,
["Country_data_Morocco"] = 21000,
["Country_data_Mozambique"] = 6100,
["Country_data_Myanmar"] = 12000,
["Country_data_NAM"] = 3200,
["Country_data_NED"] = 49000,
["Country_data_NEP"] = 2400,
["Country_data_NGA"] = 6400,
["Country_data_NGR"] = 7000,
["Country_data_NIR"] = 8300,
["Country_data_NLD"] = 5800,
["Country_data_NOR"] = 24000,
["Country_data_NZ"] = 2400,
["Country_data_NZL"] = 28000,
["Country_data_Namibia"] = 8500,
["Country_data_Nazi_Germany"] = 8500,
["Country_data_Nepal"] = 13000,
["Country_data_Netherlands"] = 88000,
["Country_data_Netherlands_Antilles"] = 2100,
["Country_data_New_Brunswick"] = 2600,
["Country_data_New_Caledonia"] = 3000,
["Country_data_New_Jersey"] = 4000,
["Country_data_New_South_Wales"] = 5000,
["Country_data_New_York"] = 3600,
["Country_data_New_York_(state)"] = 5100,
["Country_data_New_Zealand"] = 50000,
["Country_data_Newfoundland_and_Labrador"] = 2200,
["Country_data_Nicaragua"] = 8100,
["Country_data_Niger"] = 4700,
["Country_data_Nigeria"] = 26000,
["Country_data_North_Carolina"] = 3200,
["Country_data_North_Korea"] = 11000,
["Country_data_North_Macedonia"] = 12000,
["Country_data_Northern_Ireland"] = 12000,
["Country_data_Northern_Mariana_Islands"] = 2300,
["Country_data_Norway"] = 56000,
["Country_data_Nova_Scotia"] = 2200,
["Country_data_OMA"] = 2200,
["Country_data_Ohio"] = 4700,
["Country_data_Oman"] = 7500,
["Country_data_Ontario"] = 3400,
["Country_data_Ottoman_Empire"] = 2100,
["Country_data_PAK"] = 7300,
["Country_data_PAN"] = 6000,
["Country_data_PAR"] = 9000,
["Country_data_PER"] = 11000,
["Country_data_PHI"] = 10000,
["Country_data_PHL"] = 3000,
["Country_data_PNG"] = 2300,
["Country_data_POL"] = 41000,
["Country_data_POR"] = 25000,
["Country_data_PRC"] = 2800,
["Country_data_PRK"] = 4200,
["Country_data_PRT"] = 2600,
["Country_data_PUR"] = 7600,
["Country_data_Pakistan"] = 24000,
["Country_data_Palau"] = 2400,
["Country_data_Palestine"] = 5600,
["Country_data_Panama"] = 13000,
["Country_data_Papua_New_Guinea"] = 7000,
["Country_data_Paraguay"] = 17000,
["Country_data_Pennsylvania"] = 3200,
["Country_data_People's_Republic_of_China"] = 2800,
["Country_data_Peru"] = 25000,
["Country_data_Philippines"] = 30000,
["Country_data_Poland"] = 126000,
["Country_data_Portugal"] = 50000,
["Country_data_Prussia"] = 2300,
["Country_data_Puerto_Rico"] = 15000,
["Country_data_QAT"] = 6300,
["Country_data_Qatar"] = 14000,
["Country_data_Quebec"] = 3900,
["Country_data_ROC"] = 2200,
["Country_data_ROM"] = 12000,
["Country_data_ROU"] = 21000,
["Country_data_RSA"] = 27000,
["Country_data_RUS"] = 55000,
["Country_data_Republic_of_China"] = 5900,
["Country_data_Republic_of_Ireland"] = 19000,
["Country_data_Republic_of_the_Congo"] = 6300,
["Country_data_Romania"] = 53000,
["Country_data_Russia"] = 93000,
["Country_data_Russian_Empire"] = 3900,
["Country_data_Rwanda"] = 5400,
["Country_data_SAM"] = 2600,
["Country_data_SCG"] = 2800,
["Country_data_SCO"] = 22000,
["Country_data_SEN"] = 6000,
["Country_data_SER"] = 3100,
["Country_data_SGP"] = 2000,
["Country_data_SIN"] = 6700,
["Country_data_SLO"] = 16000,
["Country_data_SLV"] = 2900,
["Country_data_SMR"] = 2700,
["Country_data_SPA"] = 3400,
["Country_data_SRB"] = 22000,
["Country_data_SRI"] = 4300,
["Country_data_SUI"] = 35000,
["Country_data_SVK"] = 24000,
["Country_data_SVN"] = 5500,
["Country_data_SWE"] = 48000,
["Country_data_SWI"] = 4200,
["Country_data_SYR"] = 3000,
["Country_data_Saint_Kitts_and_Nevis"] = 4100,
["Country_data_Saint_Lucia"] = 4600,
["Country_data_Saint_Vincent_and_the_Grenadines"] = 4300,
["Country_data_Samoa"] = 6500,
["Country_data_San_Marino"] = 6900,
["Country_data_Saskatchewan"] = 3600,
["Country_data_Saudi_Arabia"] = 15000,
["Country_data_Scotland"] = 41000,
["Country_data_Senegal"] = 13000,
["Country_data_Serbia"] = 43000,
["Country_data_Serbia_and_Montenegro"] = 4300,
["Country_data_Seychelles"] = 4400,
["Country_data_Sierra_Leone"] = 5900,
["Country_data_Singapore"] = 22000,
["Country_data_Slovakia"] = 40000,
["Country_data_Slovenia"] = 32000,
["Country_data_Solomon_Islands"] = 4200,
["Country_data_Somalia"] = 5000,
["Country_data_South_Africa"] = 53000,
["Country_data_South_Carolina"] = 3100,
["Country_data_South_Korea"] = 50000,
["Country_data_South_Sudan"] = 2800,
["Country_data_Soviet_Union"] = 27000,
["Country_data_Spain"] = 104000,
["Country_data_Sri_Lanka"] = 16000,
["Country_data_Sudan"] = 6600,
["Country_data_Suriname"] = 5200,
["Country_data_Swaziland"] = 2000,
["Country_data_Sweden"] = 81000,
["Country_data_Switzerland"] = 64000,
["Country_data_Syria"] = 13000,
["Country_data_São_Tomé_and_Príncipe"] = 2700,
["Country_data_TAN"] = 2300,
["Country_data_TCH"] = 8900,
["Country_data_THA"] = 19000,
["Country_data_TJK"] = 2000,
["Country_data_TKM"] = 2500,
["Country_data_TPE"] = 13000,
["Country_data_TRI"] = 4500,
["Country_data_TUN"] = 8100,
["Country_data_TUR"] = 22000,
["Country_data_Taiwan"] = 9800,
["Country_data_Tajikistan"] = 7400,
["Country_data_Tanzania"] = 8900,
["Country_data_Texas"] = 5100,
["Country_data_Thailand"] = 35000,
["Country_data_Togo"] = 5500,
["Country_data_Tonga"] = 5500,
["Country_data_Trinidad_and_Tobago"] = 12000,
["Country_data_Tunisia"] = 16000,
["Country_data_Turkey"] = 56000,
["Country_data_Turkmenistan"] = 6500,
["Country_data_Turks_and_Caicos_Islands"] = 2600,
["Country_data_Tuvalu"] = 2500,
["Country_data_U.S._Virgin_Islands"] = 4300,
["Country_data_UAE"] = 7700,
["Country_data_UGA"] = 3200,
["Country_data_UK"] = 22000,
["Country_data_UKGBI"] = 2300,
["Country_data_UKR"] = 30000,
["Country_data_URS"] = 10000,
["Country_data_URU"] = 13000,
["Country_data_US"] = 4900,
["Country_data_USA"] = 120000,
["Country_data_USSR"] = 4200,
["Country_data_UZB"] = 9000,
["Country_data_Uganda"] = 9900,
["Country_data_Ukraine"] = 51000,
["Country_data_United_Arab_Emirates"] = 16000,
["Country_data_United_Kingdom"] = 76000,
["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 3400,
["Country_data_United_Nations"] = 3300,
["Country_data_United_States"] = 251000,
["Country_data_United_States_of_America"] = 5100,
["Country_data_Uruguay"] = 24000,
["Country_data_Uzbekistan"] = 16000,
["Country_data_VEN"] = 15000,
["Country_data_VIE"] = 5500,
["Country_data_Vanuatu"] = 4400,
["Country_data_Venezuela"] = 27000,
["Country_data_Vietnam"] = 18000,
["Country_data_Virginia"] = 2600,
["Country_data_WAL"] = 15000,
["Country_data_Wales"] = 27000,
["Country_data_Washington"] = 3200,
["Country_data_Washington,_D.C."] = 2100,
["Country_data_Washington_(state)"] = 3400,
["Country_data_West_Germany"] = 17000,
["Country_data_West_Indies"] = 2200,
["Country_data_Wisconsin"] = 5500,
["Country_data_YUG"] = 8200,
["Country_data_Yemen"] = 6600,
["Country_data_Yugoslavia"] = 14000,
["Country_data_ZAF"] = 4100,
["Country_data_ZAM"] = 2600,
["Country_data_ZIM"] = 7100,
["Country_data_Zambia"] = 7900,
["Country_data_Zimbabwe"] = 14000,
["Country_flagbio"] = 21000,
["Country_name"] = 8700,
["Country_showdata"] = 5300,
["Country_topics"] = 20000,
["County"] = 7200,
["County_(judet)_of_Romania"] = 3300,
["Course_assignment"] = 4300,
["Course_details"] = 4400,
["Cquote"] = 36000,
["Cr"] = 3800,
["Create_taxonomy"] = 2400,
["Create_taxonomy/link"] = 74000,
["Cricinfo"] = 19000,
["Cricketarchive"] = 2700,
["Crime_opentask"] = 29000,
["Cross"] = 7100,
["Ct"] = 10000,
["Curlie"] = 7100,
["Current_events_footer"] = 6000,
["Current_events_header"] = 7100,
["Currentdate"] = 20000,
["Cvt"] = 59000,
["Cycling_Archives"] = 5700,
["Cycling_archives"] = 3900,
["Cycling_team_link"] = 10000,
["Module:CFB_schedule"] = 20000,
["Module:CallAssert"] = 190000,
["Module:CanElecResTopTest"] = 4200,
["Module:CanadaByProvinceCatNav"] = 9300,
["Module:Cat_main"] = 161000,
["Module:Cat_more_if_exists"] = 39000,
["Module:Catalog_lookup_link"] = 469000,
["Module:Category_described_in_year"] = 5400,
["Module:Category_described_in_year/conf"] = 5400,
["Module:Category_handler"] = 4070000,
["Module:Category_handler/blacklist"] = 4070000,
["Module:Category_handler/config"] = 4070000,
["Module:Category_handler/data"] = 4070000,
["Module:Category_handler/shared"] = 4070000,
["Module:Category_see_also"] = 37000,
["Module:Celestial_object_quadrangle"] = 2500,
["Module:Check_DYK_hook"] = 103000,
["Module:Check_for_clobbered_parameters"] = 480000,
["Module:Check_for_deprecated_parameters"] = 391000,
["Module:Check_for_unknown_parameters"] = 11000000,
["Module:Check_isxn"] = 462000,
["Module:Check_winner_by_scores"] = 10000,
["Module:Citation/CS1"] = 4630000,
["Module:Citation/CS1/COinS"] = 4630000,
["Module:Citation/CS1/Configuration"] = 4630000,
["Module:Citation/CS1/Date_validation"] = 4630000,
["Module:Citation/CS1/Identifiers"] = 4630000,
["Module:Citation/CS1/Suggestions"] = 28000,
["Module:Citation/CS1/Utilities"] = 4630000,
["Module:Citation/CS1/Whitelist"] = 4630000,
["Module:Citation/CS1/styles.css"] = 4760000,
["Module:Cite_Q"] = 43000,
["Module:Cite_iucn"] = 31000,
["Module:Clade"] = 5200,
["Module:Clickable_button_2"] = 727000,
["Module:Collapsible_list"] = 45000,
["Module:College_color"] = 107000,
["Module:College_color/data"] = 106000,
["Module:Color_contrast"] = 433000,
["Module:Color_contrast/colors"] = 434000,
["Module:Commons_link"] = 90000,
["Module:Complex_date"] = 57000,
["Module:Convert"] = 1080000,
["Module:Convert/data"] = 1080000,
["Module:Convert/helper"] = 5700,
["Module:Convert/text"] = 1080000,
["Module:Convert/wikidata"] = 2500,
["Module:Convert/wikidata/data"] = 2500,
["Module:ConvertNumeric"] = 22000,
["Module:Convert_character_width"] = 2800,
["Module:Convert_character_width/data"] = 2800,
["Module:Coordinates"] = 1240000,
["Module:Copied"] = 15000,
["Module:CountryAdjectiveDemonym"] = 38000,
["Module:CountryAdjectiveDemonym/Adjectives"] = 38000,
["Module:CountryAdjectiveDemonym/Demonyms"] = 38000,
["Module:CountryAdjectiveDemonym/The"] = 38000,
["Module:CountryData"] = 17000,
["Module:Country_adjective"] = 3300,
["Module:Country_alias"] = 45000,
["Module:Country_alias/data"] = 45000,
}</text>
<sha1>szitummi0ohfhmh0qsij4740xxos52u</sha1>
</revision>
</page>
<page>
<title>Module:Unicode data</title>
<ns>828</ns>
<id>57744930</id>
<revision>
<id>945547965</id>
<parentid>915705458</parentid>
<timestamp>2020-03-14T17:52:07Z</timestamp>
<contributor>
<username>Drmccreedy</username>
<id>1543097</id>
</contributor>
<comment>Unicode 13.0 release</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="16011" xml:space="preserve">local p = {}
local floor = math.floor
local function errorf(level, ...)
if type(level) == "number" then
return error(string.format(...), level + 1)
else -- level is actually the format string.
return error(string.format(level, ...), 2)
end
end
local function binary_range_search(codepoint, ranges)
local low, mid, high
low, high = 1, ranges.length or require "Module:TableTools".length(ranges)
while low &lt;= high do
mid = floor((low + high) / 2)
local range = ranges[mid]
if codepoint &lt; range[1] then
high = mid - 1
elseif codepoint &lt;= range[2] then
return range, mid
else
low = mid + 1
end
end
return nil, mid
end
p.binary_range_search = binary_range_search
--[[
local function linear_range_search(codepoint, ranges)
for i, range in ipairs(ranges) do
if range[1] &lt;= codepoint and codepoint &lt;= range[2] then
return range
end
end
end
--]]
-- Load a module by indexing "loader" with the name of the module minus the
-- "Module:Unicode data/" part. For instance, loader.blocks returns
-- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be
-- returned.
local loader = setmetatable({}, {
__index = function (self, key)
local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key)
if not success then
data = false
end
self[key] = data
return data
end
})
-- For the algorithm used to generate Hangul Syllable names,
-- see "Hangul Syllable Name Generation" in section 3.12 of the
-- Unicode Specification:
-- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf
local name_hooks = {
{ 0x00, 0x1F, "&lt;control-%04X&gt;" }, -- C0 control characters
{ 0x7F, 0x9F, "&lt;control-%04X&gt;" }, -- DEL and C1 control characters
{ 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A
{ 0x4E00, 0x9FFC, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph
{ 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables
local Hangul_data = loader.Hangul
local syllable_index = codepoint - 0xAC00
return ("HANGUL SYLLABLE %s%s%s"):format(
Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)],
Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count)
/ Hangul_data.trail_count)],
Hangul_data.trails[syllable_index % Hangul_data.trail_count]
)
end },
-- High Surrogates, High Private Use Surrogates, Low Surrogates
{ 0xD800, 0xDFFF, "&lt;surrogate-%04X&gt;" },
{ 0xE000, 0xF8FF, "&lt;private-use-%04X&gt;" }, -- Private Use
-- CJK Compatibility Ideographs
{ 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" },
{ 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" },
{ 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph
{ 0x18800, 0x18AFF, function (codepoint)
return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF)
end },
{ 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement
{ 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu
{ 0x20000, 0x2A6DD, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B
{ 0x2A700, 0x2B734, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C
{ 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D
{ 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E
{ 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F
-- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane)
{ 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" },
{ 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement
return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17)
end},
{ 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G
{ 0xF0000, 0xFFFFD, "&lt;private-use-%04X&gt;" }, -- Plane 15 Private Use
{ 0x100000, 0x10FFFD, "&lt;private-use-%04X&gt;" } -- Plane 16 Private Use
}
name_hooks.length = #name_hooks
local name_range_cache
local function generate_name(data, codepoint)
if type(data) == "string" then
return data:format(codepoint)
else
return data(codepoint)
end
end
--[[
-- Checks that the code point is a number and in range.
-- Does not check whether code point is an integer.
-- Not used
local function check_codepoint(funcName, argIdx, val)
require 'libraryUtil'.checkType(funcName, argIdx, val, 'number')
if codepoint &lt; 0 or 0x10FFFF &lt; codepoint then
errorf("Codepoint %04X out of range", codepoint)
end
end
--]]
-- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8
function p.lookup_name(codepoint)
-- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned
-- (Cn) and specifically noncharacters:
-- https://www.unicode.org/faq/private_use.html#nonchar4
if 0xFDD0 &lt;= codepoint and (codepoint &lt;= 0xFDEF
or floor(codepoint % 0x10000) &gt;= 0xFFFE) then
return ("&lt;noncharacter-%04X&gt;"):format(codepoint)
end
if name_range_cache -- Check if previously used "name hook" applies to this code point.
and codepoint &gt;= name_range_cache[1]
and codepoint &lt;= name_range_cache[2] then
return generate_name(name_range_cache[3], codepoint)
end
local range = binary_range_search(codepoint, name_hooks)
if range then
name_range_cache = range
return generate_name(range[3], codepoint)
end
local data = loader[('names/%03X'):format(codepoint / 0x1000)]
if data and data[codepoint] then
return data[codepoint]
-- Unassigned (Cn) consists of noncharacters and reserved characters.
-- The character has been established not to be a noncharacter,
-- and if it were assigned, its name would already been retrieved,
-- so it must be reserved.
else
return ("&lt;reserved-%04X&gt;"):format(codepoint)
end
end
--[[
-- No image data modules on Wikipedia yet.
function p.lookup_image(codepoint)
local data = loader[('images/%03X'):format(codepoint / 0x1000)]
if data then
return data[codepoint]
end
end
--]]
local planes = {
[ 0] = "Basic Multilingual Plane";
[ 1] = "Supplementary Multilingual Plane";
[ 2] = "Supplementary Ideographic Plane";
[ 3] = "Tertiary Ideographic Plane";
[14] = "Supplementary Special-purpose Plane";
[15] = "Supplementary Private Use Area-A";
[16] = "Supplementary Private Use Area-B";
}
-- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable.
local blocks
local function block_iter(blocks, i)
i = i + 1
local data = blocks[i]
if data then
-- Unpack doesn't work on tables loaded with mw.loadData.
return i, data[1], data[2], data[3]
end
end
-- An ipairs-type iterator generator for the list of blocks.
function p.enum_blocks()
local blocks = loader.blocks
return block_iter, blocks, 0
end
function p.lookup_plane(codepoint)
local i = floor(codepoint / 0x10000)
return planes[i] or ("Plane %u"):format(i)
end
function p.lookup_block(codepoint)
local blocks = loader.blocks
local range = binary_range_search(codepoint, blocks)
if range then
return range[3]
else
return "No Block"
end
end
function p.get_block_info(name)
for i, block in ipairs(loader.blocks) do
if block[3] == name then
return block
end
end
end
function p.is_valid_pagename(pagename)
local has_nonws = false
for cp in mw.ustring.gcodepoint(pagename) do
if (cp == 0x0023) -- #
or (cp == 0x005B) -- [
or (cp == 0x005D) -- ]
or (cp == 0x007B) -- {
or (cp == 0x007C) -- |
or (cp == 0x007D) -- }
or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR
or ((cp &gt;= 0x2000) and (cp &lt;= 0x200A)) -- spaces in General Punctuation block
or (cp == 0xFFFD) -- REPLACEMENT CHARACTER
then
return false
end
local printable, result = p.is_printable(cp)
if not printable then
return false
end
if result ~= "space-separator" then
has_nonws = true
end
end
return has_nonws
end
local function manual_unpack(what, from)
if what[from + 1] == nil then
return what[from]
end
local result = {}
from = from or 1
for i, item in ipairs(what) do
if i &gt;= from then
table.insert(result, item)
end
end
return unpack(result)
end
local function compare_ranges(range1, range2)
return range1[1] &lt; range2[1]
end
-- Creates a function to look up data in a module that contains "singles" (a
-- code point-to-data map) and "ranges" (an array containing arrays that contain
-- the low and high code points of a range and the data associated with that
-- range).
-- "loader" loads and returns the "singles" and "ranges" tables.
-- "match_func" is passed the code point and either the data or the "dots", and
-- generates the final result of the function.
-- The varargs ("dots") describes the default data to be returned if there wasn't
-- a match.
-- In case the function is used more than once, "cache" saves ranges that have
-- already been found to match, or a range whose data is the default if there
-- was no match.
local function memo_lookup(data_module_subpage, match_func, ...)
local dots = { ... }
local cache = {}
local singles, ranges
return function (codepoint)
if not singles then
local data_module = loader[data_module_subpage]
singles, ranges = data_module.singles, data_module.ranges
end
if singles[codepoint] then
return match_func(codepoint, singles[codepoint])
end
local range = binary_range_search(codepoint, cache)
if range then
return match_func(codepoint, manual_unpack(range, 3))
end
local range, index = binary_range_search(codepoint, ranges)
if range then
table.insert(cache, range)
table.sort(cache, compare_ranges)
return match_func(codepoint, manual_unpack(range, 3))
end
if ranges[index] then
local dots_range
if codepoint &gt; ranges[index][2] then
dots_range = {
ranges[index][2] + 1,
ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF,
unpack(dots)
}
else -- codepoint &lt; range[index][1]
dots_range = {
ranges[index - 1] and ranges[index - 1][2] + 1 or 0,
ranges[index][1] - 1,
unpack(dots)
}
end
table.sort(cache, compare_ranges)
end
return match_func(codepoint)
end
end
-- Get a code point's combining class value in [[Module:Unicode data/combining]],
-- and return whether this value is not zero. Zero is assigned as the default
-- if the combining class value is not found in this data module.
-- That is, return true if character is combining, or false if it is not.
-- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for
-- more information.
p.is_combining = memo_lookup(
"combining",
function (codepoint, combining_class)
return combining_class and combining_class ~= 0 or false
end,
0)
function p.add_dotted_circle(str)
return (mw.ustring.gsub(str, ".",
function(char)
if p.is_combining(mw.ustring.codepoint(char)) then
return '◌' .. char
end
end))
end
local lookup_control = memo_lookup(
"control",
function (codepoint, ccc)
return ccc or "assigned"
end,
"assigned")
p.lookup_control = lookup_control
function p.is_assigned(codepoint)
return lookup_control(codepoint) ~= "unassigned"
end
function p.is_printable(codepoint)
local result = lookup_control(codepoint)
return (result == "assigned") or (result == "space-separator"), result
end
function p.is_whitespace(codepoint)
local result = lookup_control(codepoint)
return (result == "space-separator"), result
end
p.lookup_category = memo_lookup(
"category",
function (codepoint, category)
return category
end,
"Cn")
local lookup_script = memo_lookup(
"scripts",
function (codepoint, script_code)
return script_code or 'Zzzz'
end,
"Zzzz")
p.lookup_script = lookup_script
function p.get_best_script(str)
-- Check type of argument, because mw.text.decode coerces numbers to strings!
require "libraryUtil".checkType("get_best_script", 1, str, "string")
-- Convert HTML character references (including named character references,
-- or character entities) to characters.
str = mw.text.decode(str, true)
local scripts = {}
for codepoint in mw.ustring.gcodepoint(str) do
local script = lookup_script(codepoint)
-- Ignore "Inherited", "Undetermined", or "Uncoded" scripts.
if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then
scripts[script] = true
end
end
-- If scripts does not contain two or more keys,
-- return first and only key (script code) in table.
if not next(scripts, next(scripts)) then
return next(scripts)
end -- else return majority script, or else "Zzzz"?
end
function p.is_Latin(str)
require "libraryUtil".checkType("get_best_script", 1, str, "string")
str = mw.text.decode(str, true)
-- Search for the leading bytes that introduce the UTF-8 encoding of the
-- code points U+0340-U+10FFFF. If they are not found and there is at least
-- one Latin-script character, the string counts as Latin, because the rest
-- of the characters can only be Zyyy, Zinh, and Zzzz.
-- The only scripts found below U+0370 (the first code point of the Greek
-- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz.
-- See the codepage in the [[UTF-8]] article.
if not str:find "[\205-\244]" then
for codepoint in mw.ustring.gcodepoint(str) do
if lookup_script(codepoint) == "Latn" then
return true
end
end
end
local Latn = false
for codepoint in mw.ustring.gcodepoint(str) do
local script = lookup_script(codepoint)
if script == "Latn" then
Latn = true
elseif not (script == "Zyyy" or script == "Zinh"
or script == "Zzzz") then
return false
end
end
return Latn
end
-- Checks that a string contains only characters belonging to right-to-left
-- scripts, or characters of ignorable scripts.
function p.is_rtl(str)
require "libraryUtil".checkType("get_best_script", 1, str, "string")
str = mw.text.decode(str, true)
-- Search for the leading bytes that introduce the UTF-8 encoding of the
-- code points U+0580-U+10FFFF. If they are not found, the string can only
-- have characters from a left-to-right script, because the first code point
-- in a right-to-left script is U+0591, in the Hebrew block.
if not str:find "[\214-\244]" then
return false
end
local result = false
local rtl = loader.scripts.rtl
for codepoint in mw.ustring.gcodepoint(str) do
local script = lookup_script(codepoint)
if rtl[script] then
result = true
elseif not (script == "Zyyy" or script == "Zinh"
or script == "Zzzz") then
return false
end
end
return result
end
local function get_codepoint(args, arg)
local codepoint_string = args[arg]
or errorf(2, "Parameter %s is required", tostring(arg))
local codepoint = tonumber(codepoint_string, 16)
or errorf(2, "Parameter %s is not a code point in hexadecimal base",
tostring(arg))
if not (0 &lt;= codepoint and codepoint &lt;= 0x10FFFF) then
errorf(2, "code point in parameter %s out of range", tostring(arg))
end
return codepoint
end
local function get_func(args, arg, prefix)
local suffix = args[arg]
or errorf(2, "Parameter %s is required", tostring(arg))
suffix = mw.text.trim(suffix)
local func_name = prefix .. suffix
local func = p[func_name]
or errorf(2, "There is no function '%s'", func_name)
return func
end
-- This function allows any of the "lookup" functions to be invoked. The first
-- parameter is the word after "lookup_"; the second parameter is the code point
-- in hexadecimal base.
function p.lookup(frame)
local func = get_func(frame.args, 1, "lookup_")
local codepoint = get_codepoint(frame.args, 2)
local result = func(codepoint)
if func == p.lookup_name then
-- Prevent code point labels such as &lt;control-0000&gt; from being
-- interpreted as HTML tags.
result = result:gsub("&lt;", "&amp;lt;")
end
return result
end
function p.is(frame)
local func = get_func(frame.args, 1, "is_")
-- is_Latin and is_valid_pagename take strings.
if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then
return (func(frame.args[2]))
else -- The rest take code points.
local codepoint = get_codepoint(frame.args, 2)
return (func(codepoint)) -- Adjust to one result.
end
end
return p</text>
<sha1>6kd0945q1e20ht5w0rqqfrsnwfn49yr</sha1>
</revision>
</page>
<page>
<title>Module:Unicode data/scripts</title>
<ns>828</ns>
<id>55899854</id>
<revision>
<id>945125169</id>
<parentid>915587638</parentid>
<timestamp>2020-03-11T23:37:18Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>update per talk page</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="32238" xml:space="preserve">--[=[
-- Official Unicode script values for individual codepoints and ranges of
-- codepoints.
-- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided
-- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt
-- provided script codes corresponding to the names (see [[Script (Unicode)]]).
--]=]
local data = {
singles = {
[0x000AA] = "Latn",
[0x000BA] = "Latn",
[0x000D7] = "Zyyy",
[0x000F7] = "Zyyy",
[0x00374] = "Zyyy",
[0x0037E] = "Zyyy",
[0x0037F] = "Grek",
[0x00384] = "Grek",
[0x00385] = "Zyyy",
[0x00386] = "Grek",
[0x00387] = "Zyyy",
[0x0038C] = "Grek",
[0x00605] = "Zyyy",
[0x0060C] = "Zyyy",
[0x0061B] = "Zyyy",
[0x0061C] = "Arab",
[0x0061E] = "Arab",
[0x0061F] = "Zyyy",
[0x00640] = "Zyyy",
[0x00670] = "Zinh",
[0x006DD] = "Zyyy",
[0x0085E] = "Mand",
[0x008E2] = "Zyyy",
[0x009B2] = "Beng",
[0x009D7] = "Beng",
[0x00A3C] = "Guru",
[0x00A51] = "Guru",
[0x00A5E] = "Guru",
[0x00AD0] = "Gujr",
[0x00B9C] = "Taml",
[0x00BD0] = "Taml",
[0x00BD7] = "Taml",
[0x00CDE] = "Knda",
[0x00DBD] = "Sinh",
[0x00DCA] = "Sinh",
[0x00DD6] = "Sinh",
[0x00E3F] = "Zyyy",
[0x00E84] = "Laoo",
[0x00EA5] = "Laoo",
[0x00EC6] = "Laoo",
[0x010C7] = "Geor",
[0x010CD] = "Geor",
[0x010FB] = "Zyyy",
[0x01258] = "Ethi",
[0x012C0] = "Ethi",
[0x01804] = "Mong",
[0x01805] = "Zyyy",
[0x01940] = "Limb",
[0x01CD3] = "Zyyy",
[0x01CE1] = "Zyyy",
[0x01CED] = "Zinh",
[0x01CF4] = "Zinh",
[0x01CFA] = "Zyyy",
[0x01D2B] = "Cyrl",
[0x01D78] = "Cyrl",
[0x01DBF] = "Grek",
[0x01F59] = "Grek",
[0x01F5B] = "Grek",
[0x01F5D] = "Grek",
[0x02071] = "Latn",
[0x0207F] = "Latn",
[0x02126] = "Grek",
[0x02132] = "Latn",
[0x0214E] = "Latn",
[0x02D27] = "Geor",
[0x02D2D] = "Geor",
[0x02D7F] = "Tfng",
[0x03005] = "Hani",
[0x03006] = "Zyyy",
[0x03007] = "Hani",
[0x030A0] = "Zyyy",
[0x032FF] = "Zyyy",
[0x0A92E] = "Zyyy",
[0x0A92F] = "Kali",
[0x0A95F] = "Rjng",
[0x0A9CF] = "Zyyy",
[0x0AB5B] = "Zyyy",
[0x0AB65] = "Grek",
[0x0FB3E] = "Hebr",
[0x0FEFF] = "Zyyy",
[0x0FF70] = "Zyyy",
[0x101A0] = "Grek",
[0x101FD] = "Zinh",
[0x102E0] = "Zinh",
[0x1039F] = "Ugar",
[0x1056F] = "Aghb",
[0x10808] = "Cprt",
[0x1083C] = "Cprt",
[0x1083F] = "Cprt",
[0x1091F] = "Phnx",
[0x1093F] = "Lydi",
[0x1107F] = "Brah",
[0x110CD] = "Kthi",
[0x11288] = "Mult",
[0x1133B] = "Zinh",
[0x11350] = "Gran",
[0x11357] = "Gran",
[0x118FF] = "Wara",
[0x11909] = "Diak",
[0x11D3A] = "Gonm",
[0x11FB0] = "Lisu",
[0x11FFF] = "Taml",
[0x16FE0] = "Tang",
[0x16FE1] = "Nshu",
[0x16FE4] = "Kits",
[0x1B000] = "Kana",
[0x1D4A2] = "Zyyy",
[0x1D4BB] = "Zyyy",
[0x1D546] = "Zyyy",
[0x1E2FF] = "Wcho",
[0x1EE24] = "Arab",
[0x1EE27] = "Arab",
[0x1EE39] = "Arab",
[0x1EE3B] = "Arab",
[0x1EE42] = "Arab",
[0x1EE47] = "Arab",
[0x1EE49] = "Arab",
[0x1EE4B] = "Arab",
[0x1EE54] = "Arab",
[0x1EE57] = "Arab",
[0x1EE59] = "Arab",
[0x1EE5B] = "Arab",
[0x1EE5D] = "Arab",
[0x1EE5F] = "Arab",
[0x1EE64] = "Arab",
[0x1EE7E] = "Arab",
[0x1F200] = "Hira",
[0xE0001] = "Zyyy",
},
ranges = {
{ 0x00000, 0x00040, "Zyyy" },
{ 0x00041, 0x0005A, "Latn" },
{ 0x0005B, 0x00060, "Zyyy" },
{ 0x00061, 0x0007A, "Latn" },
{ 0x0007B, 0x000A9, "Zyyy" },
{ 0x000AB, 0x000B9, "Zyyy" },
{ 0x000BB, 0x000BF, "Zyyy" },
{ 0x000C0, 0x000D6, "Latn" },
{ 0x000D8, 0x000F6, "Latn" },
{ 0x000F8, 0x002B8, "Latn" },
{ 0x002B9, 0x002DF, "Zyyy" },
{ 0x002E0, 0x002E4, "Latn" },
{ 0x002E5, 0x002E9, "Zyyy" },
{ 0x002EA, 0x002EB, "Bopo" },
{ 0x002EC, 0x002FF, "Zyyy" },
{ 0x00300, 0x0036F, "Zinh" },
{ 0x00370, 0x00373, "Grek" },
{ 0x00375, 0x00377, "Grek" },
{ 0x0037A, 0x0037D, "Grek" },
{ 0x00388, 0x0038A, "Grek" },
{ 0x0038E, 0x003A1, "Grek" },
{ 0x003A3, 0x003E1, "Grek" },
{ 0x003E2, 0x003EF, "Copt" },
{ 0x003F0, 0x003FF, "Grek" },
{ 0x00400, 0x00484, "Cyrl" },
{ 0x00485, 0x00486, "Zinh" },
{ 0x00487, 0x0052F, "Cyrl" },
{ 0x00531, 0x00556, "Armn" },
{ 0x00559, 0x0058A, "Armn" },
{ 0x0058D, 0x0058F, "Armn" },
{ 0x00591, 0x005C7, "Hebr" },
{ 0x005D0, 0x005EA, "Hebr" },
{ 0x005EF, 0x005F4, "Hebr" },
{ 0x00600, 0x00604, "Arab" },
{ 0x00606, 0x0060B, "Arab" },
{ 0x0060D, 0x0061A, "Arab" },
{ 0x00620, 0x0063F, "Arab" },
{ 0x00641, 0x0064A, "Arab" },
{ 0x0064B, 0x00655, "Zinh" },
{ 0x00656, 0x0066F, "Arab" },
{ 0x00671, 0x006DC, "Arab" },
{ 0x006DE, 0x006FF, "Arab" },
{ 0x00700, 0x0070D, "Syrc" },
{ 0x0070F, 0x0074A, "Syrc" },
{ 0x0074D, 0x0074F, "Syrc" },
{ 0x00750, 0x0077F, "Arab" },
{ 0x00780, 0x007B1, "Thaa" },
{ 0x007C0, 0x007FA, "Nkoo" },
{ 0x007FD, 0x007FF, "Nkoo" },
{ 0x00800, 0x0082D, "Samr" },
{ 0x00830, 0x0083E, "Samr" },
{ 0x00840, 0x0085B, "Mand" },
{ 0x00860, 0x0086A, "Syrc" },
{ 0x008A0, 0x008B4, "Arab" },
{ 0x008B6, 0x008C7, "Arab" },
{ 0x008D3, 0x008E1, "Arab" },
{ 0x008E3, 0x008FF, "Arab" },
{ 0x00900, 0x00950, "Deva" },
{ 0x00951, 0x00954, "Zinh" },
{ 0x00955, 0x00963, "Deva" },
{ 0x00964, 0x00965, "Zyyy" },
{ 0x00966, 0x0097F, "Deva" },
{ 0x00980, 0x00983, "Beng" },
{ 0x00985, 0x0098C, "Beng" },
{ 0x0098F, 0x00990, "Beng" },
{ 0x00993, 0x009A8, "Beng" },
{ 0x009AA, 0x009B0, "Beng" },
{ 0x009B6, 0x009B9, "Beng" },
{ 0x009BC, 0x009C4, "Beng" },
{ 0x009C7, 0x009C8, "Beng" },
{ 0x009CB, 0x009CE, "Beng" },
{ 0x009DC, 0x009DD, "Beng" },
{ 0x009DF, 0x009E3, "Beng" },
{ 0x009E6, 0x009FE, "Beng" },
{ 0x00A01, 0x00A03, "Guru" },
{ 0x00A05, 0x00A0A, "Guru" },
{ 0x00A0F, 0x00A10, "Guru" },
{ 0x00A13, 0x00A28, "Guru" },
{ 0x00A2A, 0x00A30, "Guru" },
{ 0x00A32, 0x00A33, "Guru" },
{ 0x00A35, 0x00A36, "Guru" },
{ 0x00A38, 0x00A39, "Guru" },
{ 0x00A3E, 0x00A42, "Guru" },
{ 0x00A47, 0x00A48, "Guru" },
{ 0x00A4B, 0x00A4D, "Guru" },
{ 0x00A59, 0x00A5C, "Guru" },
{ 0x00A66, 0x00A76, "Guru" },
{ 0x00A81, 0x00A83, "Gujr" },
{ 0x00A85, 0x00A8D, "Gujr" },
{ 0x00A8F, 0x00A91, "Gujr" },
{ 0x00A93, 0x00AA8, "Gujr" },
{ 0x00AAA, 0x00AB0, "Gujr" },
{ 0x00AB2, 0x00AB3, "Gujr" },
{ 0x00AB5, 0x00AB9, "Gujr" },
{ 0x00ABC, 0x00AC5, "Gujr" },
{ 0x00AC7, 0x00AC9, "Gujr" },
{ 0x00ACB, 0x00ACD, "Gujr" },
{ 0x00AE0, 0x00AE3, "Gujr" },
{ 0x00AE6, 0x00AF1, "Gujr" },
{ 0x00AF9, 0x00AFF, "Gujr" },
{ 0x00B01, 0x00B03, "Orya" },
{ 0x00B05, 0x00B0C, "Orya" },
{ 0x00B0F, 0x00B10, "Orya" },
{ 0x00B13, 0x00B28, "Orya" },
{ 0x00B2A, 0x00B30, "Orya" },
{ 0x00B32, 0x00B33, "Orya" },
{ 0x00B35, 0x00B39, "Orya" },
{ 0x00B3C, 0x00B44, "Orya" },
{ 0x00B47, 0x00B48, "Orya" },
{ 0x00B4B, 0x00B4D, "Orya" },
{ 0x00B55, 0x00B57, "Orya" },
{ 0x00B5C, 0x00B5D, "Orya" },
{ 0x00B5F, 0x00B63, "Orya" },
{ 0x00B66, 0x00B77, "Orya" },
{ 0x00B82, 0x00B83, "Taml" },
{ 0x00B85, 0x00B8A, "Taml" },
{ 0x00B8E, 0x00B90, "Taml" },
{ 0x00B92, 0x00B95, "Taml" },
{ 0x00B99, 0x00B9A, "Taml" },
{ 0x00B9E, 0x00B9F, "Taml" },
{ 0x00BA3, 0x00BA4, "Taml" },
{ 0x00BA8, 0x00BAA, "Taml" },
{ 0x00BAE, 0x00BB9, "Taml" },
{ 0x00BBE, 0x00BC2, "Taml" },
{ 0x00BC6, 0x00BC8, "Taml" },
{ 0x00BCA, 0x00BCD, "Taml" },
{ 0x00BE6, 0x00BFA, "Taml" },
{ 0x00C00, 0x00C0C, "Telu" },
{ 0x00C0E, 0x00C10, "Telu" },
{ 0x00C12, 0x00C28, "Telu" },
{ 0x00C2A, 0x00C39, "Telu" },
{ 0x00C3D, 0x00C44, "Telu" },
{ 0x00C46, 0x00C48, "Telu" },
{ 0x00C4A, 0x00C4D, "Telu" },
{ 0x00C55, 0x00C56, "Telu" },
{ 0x00C58, 0x00C5A, "Telu" },
{ 0x00C60, 0x00C63, "Telu" },
{ 0x00C66, 0x00C6F, "Telu" },
{ 0x00C77, 0x00C7F, "Telu" },
{ 0x00C80, 0x00C8C, "Knda" },
{ 0x00C8E, 0x00C90, "Knda" },
{ 0x00C92, 0x00CA8, "Knda" },
{ 0x00CAA, 0x00CB3, "Knda" },
{ 0x00CB5, 0x00CB9, "Knda" },
{ 0x00CBC, 0x00CC4, "Knda" },
{ 0x00CC6, 0x00CC8, "Knda" },
{ 0x00CCA, 0x00CCD, "Knda" },
{ 0x00CD5, 0x00CD6, "Knda" },
{ 0x00CE0, 0x00CE3, "Knda" },
{ 0x00CE6, 0x00CEF, "Knda" },
{ 0x00CF1, 0x00CF2, "Knda" },
{ 0x00D00, 0x00D0C, "Mlym" },
{ 0x00D0E, 0x00D10, "Mlym" },
{ 0x00D12, 0x00D44, "Mlym" },
{ 0x00D46, 0x00D48, "Mlym" },
{ 0x00D4A, 0x00D4F, "Mlym" },
{ 0x00D54, 0x00D63, "Mlym" },
{ 0x00D66, 0x00D7F, "Mlym" },
{ 0x00D81, 0x00D83, "Sinh" },
{ 0x00D85, 0x00D96, "Sinh" },
{ 0x00D9A, 0x00DB1, "Sinh" },
{ 0x00DB3, 0x00DBB, "Sinh" },
{ 0x00DC0, 0x00DC6, "Sinh" },
{ 0x00DCF, 0x00DD4, "Sinh" },
{ 0x00DD8, 0x00DDF, "Sinh" },
{ 0x00DE6, 0x00DEF, "Sinh" },
{ 0x00DF2, 0x00DF4, "Sinh" },
{ 0x00E01, 0x00E3A, "Thai" },
{ 0x00E40, 0x00E5B, "Thai" },
{ 0x00E81, 0x00E82, "Laoo" },
{ 0x00E86, 0x00E8A, "Laoo" },
{ 0x00E8C, 0x00EA3, "Laoo" },
{ 0x00EA7, 0x00EBD, "Laoo" },
{ 0x00EC0, 0x00EC4, "Laoo" },
{ 0x00EC8, 0x00ECD, "Laoo" },
{ 0x00ED0, 0x00ED9, "Laoo" },
{ 0x00EDC, 0x00EDF, "Laoo" },
{ 0x00F00, 0x00F47, "Tibt" },
{ 0x00F49, 0x00F6C, "Tibt" },
{ 0x00F71, 0x00F97, "Tibt" },
{ 0x00F99, 0x00FBC, "Tibt" },
{ 0x00FBE, 0x00FCC, "Tibt" },
{ 0x00FCE, 0x00FD4, "Tibt" },
{ 0x00FD5, 0x00FD8, "Zyyy" },
{ 0x00FD9, 0x00FDA, "Tibt" },
{ 0x01000, 0x0109F, "Mymr" },
{ 0x010A0, 0x010C5, "Geor" },
{ 0x010D0, 0x010FA, "Geor" },
{ 0x010FC, 0x010FF, "Geor" },
{ 0x01100, 0x011FF, "Hang" },
{ 0x01200, 0x01248, "Ethi" },
{ 0x0124A, 0x0124D, "Ethi" },
{ 0x01250, 0x01256, "Ethi" },
{ 0x0125A, 0x0125D, "Ethi" },
{ 0x01260, 0x01288, "Ethi" },
{ 0x0128A, 0x0128D, "Ethi" },
{ 0x01290, 0x012B0, "Ethi" },
{ 0x012B2, 0x012B5, "Ethi" },
{ 0x012B8, 0x012BE, "Ethi" },
{ 0x012C2, 0x012C5, "Ethi" },
{ 0x012C8, 0x012D6, "Ethi" },
{ 0x012D8, 0x01310, "Ethi" },
{ 0x01312, 0x01315, "Ethi" },
{ 0x01318, 0x0135A, "Ethi" },
{ 0x0135D, 0x0137C, "Ethi" },
{ 0x01380, 0x01399, "Ethi" },
{ 0x013A0, 0x013F5, "Cher" },
{ 0x013F8, 0x013FD, "Cher" },
{ 0x01400, 0x0167F, "Cans" },
{ 0x01680, 0x0169C, "Ogam" },
{ 0x016A0, 0x016EA, "Runr" },
{ 0x016EB, 0x016ED, "Zyyy" },
{ 0x016EE, 0x016F8, "Runr" },
{ 0x01700, 0x0170C, "Tglg" },
{ 0x0170E, 0x01714, "Tglg" },
{ 0x01720, 0x01734, "Hano" },
{ 0x01735, 0x01736, "Zyyy" },
{ 0x01740, 0x01753, "Buhd" },
{ 0x01760, 0x0176C, "Tagb" },
{ 0x0176E, 0x01770, "Tagb" },
{ 0x01772, 0x01773, "Tagb" },
{ 0x01780, 0x017DD, "Khmr" },
{ 0x017E0, 0x017E9, "Khmr" },
{ 0x017F0, 0x017F9, "Khmr" },
{ 0x01800, 0x01801, "Mong" },
{ 0x01802, 0x01803, "Zyyy" },
{ 0x01806, 0x0180E, "Mong" },
{ 0x01810, 0x01819, "Mong" },
{ 0x01820, 0x01878, "Mong" },
{ 0x01880, 0x018AA, "Mong" },
{ 0x018B0, 0x018F5, "Cans" },
{ 0x01900, 0x0191E, "Limb" },
{ 0x01920, 0x0192B, "Limb" },
{ 0x01930, 0x0193B, "Limb" },
{ 0x01944, 0x0194F, "Limb" },
{ 0x01950, 0x0196D, "Tale" },
{ 0x01970, 0x01974, "Tale" },
{ 0x01980, 0x019AB, "Talu" },
{ 0x019B0, 0x019C9, "Talu" },
{ 0x019D0, 0x019DA, "Talu" },
{ 0x019DE, 0x019DF, "Talu" },
{ 0x019E0, 0x019FF, "Khmr" },
{ 0x01A00, 0x01A1B, "Bugi" },
{ 0x01A1E, 0x01A1F, "Bugi" },
{ 0x01A20, 0x01A5E, "Lana" },
{ 0x01A60, 0x01A7C, "Lana" },
{ 0x01A7F, 0x01A89, "Lana" },
{ 0x01A90, 0x01A99, "Lana" },
{ 0x01AA0, 0x01AAD, "Lana" },
{ 0x01AB0, 0x01AC0, "Zinh" },
{ 0x01B00, 0x01B4B, "Bali" },
{ 0x01B50, 0x01B7C, "Bali" },
{ 0x01B80, 0x01BBF, "Sund" },
{ 0x01BC0, 0x01BF3, "Batk" },
{ 0x01BFC, 0x01BFF, "Batk" },
{ 0x01C00, 0x01C37, "Lepc" },
{ 0x01C3B, 0x01C49, "Lepc" },
{ 0x01C4D, 0x01C4F, "Lepc" },
{ 0x01C50, 0x01C7F, "Olck" },
{ 0x01C80, 0x01C88, "Cyrl" },
{ 0x01C90, 0x01CBA, "Geor" },
{ 0x01CBD, 0x01CBF, "Geor" },
{ 0x01CC0, 0x01CC7, "Sund" },
{ 0x01CD0, 0x01CD2, "Zinh" },
{ 0x01CD4, 0x01CE0, "Zinh" },
{ 0x01CE2, 0x01CE8, "Zinh" },
{ 0x01CE9, 0x01CEC, "Zyyy" },
{ 0x01CEE, 0x01CF3, "Zyyy" },
{ 0x01CF5, 0x01CF7, "Zyyy" },
{ 0x01CF8, 0x01CF9, "Zinh" },
{ 0x01D00, 0x01D25, "Latn" },
{ 0x01D26, 0x01D2A, "Grek" },
{ 0x01D2C, 0x01D5C, "Latn" },
{ 0x01D5D, 0x01D61, "Grek" },
{ 0x01D62, 0x01D65, "Latn" },
{ 0x01D66, 0x01D6A, "Grek" },
{ 0x01D6B, 0x01D77, "Latn" },
{ 0x01D79, 0x01DBE, "Latn" },
{ 0x01DC0, 0x01DF9, "Zinh" },
{ 0x01DFB, 0x01DFF, "Zinh" },
{ 0x01E00, 0x01EFF, "Latn" },
{ 0x01F00, 0x01F15, "Grek" },
{ 0x01F18, 0x01F1D, "Grek" },
{ 0x01F20, 0x01F45, "Grek" },
{ 0x01F48, 0x01F4D, "Grek" },
{ 0x01F50, 0x01F57, "Grek" },
{ 0x01F5F, 0x01F7D, "Grek" },
{ 0x01F80, 0x01FB4, "Grek" },
{ 0x01FB6, 0x01FC4, "Grek" },
{ 0x01FC6, 0x01FD3, "Grek" },
{ 0x01FD6, 0x01FDB, "Grek" },
{ 0x01FDD, 0x01FEF, "Grek" },
{ 0x01FF2, 0x01FF4, "Grek" },
{ 0x01FF6, 0x01FFE, "Grek" },
{ 0x02000, 0x0200B, "Zyyy" },
{ 0x0200C, 0x0200D, "Zinh" },
{ 0x0200E, 0x02064, "Zyyy" },
{ 0x02066, 0x02070, "Zyyy" },
{ 0x02074, 0x0207E, "Zyyy" },
{ 0x02080, 0x0208E, "Zyyy" },
{ 0x02090, 0x0209C, "Latn" },
{ 0x020A0, 0x020BF, "Zyyy" },
{ 0x020D0, 0x020F0, "Zinh" },
{ 0x02100, 0x02125, "Zyyy" },
{ 0x02127, 0x02129, "Zyyy" },
{ 0x0212A, 0x0212B, "Latn" },
{ 0x0212C, 0x02131, "Zyyy" },
{ 0x02133, 0x0214D, "Zyyy" },
{ 0x0214F, 0x0215F, "Zyyy" },
{ 0x02160, 0x02188, "Latn" },
{ 0x02189, 0x0218B, "Zyyy" },
{ 0x02190, 0x02426, "Zyyy" },
{ 0x02440, 0x0244A, "Zyyy" },
{ 0x02460, 0x027FF, "Zyyy" },
{ 0x02800, 0x028FF, "Brai" },
{ 0x02900, 0x02B73, "Zyyy" },
{ 0x02B76, 0x02B95, "Zyyy" },
{ 0x02B97, 0x02BFF, "Zyyy" },
{ 0x02C00, 0x02C2E, "Glag" },
{ 0x02C30, 0x02C5E, "Glag" },
{ 0x02C60, 0x02C7F, "Latn" },
{ 0x02C80, 0x02CF3, "Copt" },
{ 0x02CF9, 0x02CFF, "Copt" },
{ 0x02D00, 0x02D25, "Geor" },
{ 0x02D30, 0x02D67, "Tfng" },
{ 0x02D6F, 0x02D70, "Tfng" },
{ 0x02D80, 0x02D96, "Ethi" },
{ 0x02DA0, 0x02DA6, "Ethi" },
{ 0x02DA8, 0x02DAE, "Ethi" },
{ 0x02DB0, 0x02DB6, "Ethi" },
{ 0x02DB8, 0x02DBE, "Ethi" },
{ 0x02DC0, 0x02DC6, "Ethi" },
{ 0x02DC8, 0x02DCE, "Ethi" },
{ 0x02DD0, 0x02DD6, "Ethi" },
{ 0x02DD8, 0x02DDE, "Ethi" },
{ 0x02DE0, 0x02DFF, "Cyrl" },
{ 0x02E00, 0x02E52, "Zyyy" },
{ 0x02E80, 0x02E99, "Hani" },
{ 0x02E9B, 0x02EF3, "Hani" },
{ 0x02F00, 0x02FD5, "Hani" },
{ 0x02FF0, 0x02FFB, "Zyyy" },
{ 0x03000, 0x03004, "Zyyy" },
{ 0x03008, 0x03020, "Zyyy" },
{ 0x03021, 0x03029, "Hani" },
{ 0x0302A, 0x0302D, "Zinh" },
{ 0x0302E, 0x0302F, "Hang" },
{ 0x03030, 0x03037, "Zyyy" },
{ 0x03038, 0x0303B, "Hani" },
{ 0x0303C, 0x0303F, "Zyyy" },
{ 0x03041, 0x03096, "Hira" },
{ 0x03099, 0x0309A, "Zinh" },
{ 0x0309B, 0x0309C, "Zyyy" },
{ 0x0309D, 0x0309F, "Hira" },
{ 0x030A1, 0x030FA, "Kana" },
{ 0x030FB, 0x030FC, "Zyyy" },
{ 0x030FD, 0x030FF, "Kana" },
{ 0x03105, 0x0312F, "Bopo" },
{ 0x03131, 0x0318E, "Hang" },
{ 0x03190, 0x0319F, "Zyyy" },
{ 0x031A0, 0x031BF, "Bopo" },
{ 0x031C0, 0x031E3, "Zyyy" },
{ 0x031F0, 0x031FF, "Kana" },
{ 0x03200, 0x0321E, "Hang" },
{ 0x03220, 0x0325F, "Zyyy" },
{ 0x03260, 0x0327E, "Hang" },
{ 0x0327F, 0x032CF, "Zyyy" },
{ 0x032D0, 0x032FE, "Kana" },
{ 0x03300, 0x03357, "Kana" },
{ 0x03358, 0x033FF, "Zyyy" },
{ 0x03400, 0x04DBF, "Hani" },
{ 0x04DC0, 0x04DFF, "Zyyy" },
{ 0x04E00, 0x09FFC, "Hani" },
{ 0x0A000, 0x0A48C, "Yiii" },
{ 0x0A490, 0x0A4C6, "Yiii" },
{ 0x0A4D0, 0x0A4FF, "Lisu" },
{ 0x0A500, 0x0A62B, "Vaii" },
{ 0x0A640, 0x0A69F, "Cyrl" },
{ 0x0A6A0, 0x0A6F7, "Bamu" },
{ 0x0A700, 0x0A721, "Zyyy" },
{ 0x0A722, 0x0A787, "Latn" },
{ 0x0A788, 0x0A78A, "Zyyy" },
{ 0x0A78B, 0x0A7BF, "Latn" },
{ 0x0A7C2, 0x0A7CA, "Latn" },
{ 0x0A7F5, 0x0A7FF, "Latn" },
{ 0x0A800, 0x0A82C, "Sylo" },
{ 0x0A830, 0x0A839, "Zyyy" },
{ 0x0A840, 0x0A877, "Phag" },
{ 0x0A880, 0x0A8C5, "Saur" },
{ 0x0A8CE, 0x0A8D9, "Saur" },
{ 0x0A8E0, 0x0A8FF, "Deva" },
{ 0x0A900, 0x0A92D, "Kali" },
{ 0x0A930, 0x0A953, "Rjng" },
{ 0x0A960, 0x0A97C, "Hang" },
{ 0x0A980, 0x0A9CD, "Java" },
{ 0x0A9D0, 0x0A9D9, "Java" },
{ 0x0A9DE, 0x0A9DF, "Java" },
{ 0x0A9E0, 0x0A9FE, "Mymr" },
{ 0x0AA00, 0x0AA36, "Cham" },
{ 0x0AA40, 0x0AA4D, "Cham" },
{ 0x0AA50, 0x0AA59, "Cham" },
{ 0x0AA5C, 0x0AA5F, "Cham" },
{ 0x0AA60, 0x0AA7F, "Mymr" },
{ 0x0AA80, 0x0AAC2, "Tavt" },
{ 0x0AADB, 0x0AADF, "Tavt" },
{ 0x0AAE0, 0x0AAF6, "Mtei" },
{ 0x0AB01, 0x0AB06, "Ethi" },
{ 0x0AB09, 0x0AB0E, "Ethi" },
{ 0x0AB11, 0x0AB16, "Ethi" },
{ 0x0AB20, 0x0AB26, "Ethi" },
{ 0x0AB28, 0x0AB2E, "Ethi" },
{ 0x0AB30, 0x0AB5A, "Latn" },
{ 0x0AB5C, 0x0AB64, "Latn" },
{ 0x0AB66, 0x0AB69, "Latn" },
{ 0x0AB6A, 0x0AB6B, "Zyyy" },
{ 0x0AB70, 0x0ABBF, "Cher" },
{ 0x0ABC0, 0x0ABED, "Mtei" },
{ 0x0ABF0, 0x0ABF9, "Mtei" },
{ 0x0AC00, 0x0D7A3, "Hang" },
{ 0x0D7B0, 0x0D7C6, "Hang" },
{ 0x0D7CB, 0x0D7FB, "Hang" },
{ 0x0F900, 0x0FA6D, "Hani" },
{ 0x0FA70, 0x0FAD9, "Hani" },
{ 0x0FB00, 0x0FB06, "Latn" },
{ 0x0FB13, 0x0FB17, "Armn" },
{ 0x0FB1D, 0x0FB36, "Hebr" },
{ 0x0FB38, 0x0FB3C, "Hebr" },
{ 0x0FB40, 0x0FB41, "Hebr" },
{ 0x0FB43, 0x0FB44, "Hebr" },
{ 0x0FB46, 0x0FB4F, "Hebr" },
{ 0x0FB50, 0x0FBC1, "Arab" },
{ 0x0FBD3, 0x0FD3D, "Arab" },
{ 0x0FD3E, 0x0FD3F, "Zyyy" },
{ 0x0FD50, 0x0FD8F, "Arab" },
{ 0x0FD92, 0x0FDC7, "Arab" },
{ 0x0FDF0, 0x0FDFD, "Arab" },
{ 0x0FE00, 0x0FE0F, "Zinh" },
{ 0x0FE10, 0x0FE19, "Zyyy" },
{ 0x0FE20, 0x0FE2D, "Zinh" },
{ 0x0FE2E, 0x0FE2F, "Cyrl" },
{ 0x0FE30, 0x0FE52, "Zyyy" },
{ 0x0FE54, 0x0FE66, "Zyyy" },
{ 0x0FE68, 0x0FE6B, "Zyyy" },
{ 0x0FE70, 0x0FE74, "Arab" },
{ 0x0FE76, 0x0FEFC, "Arab" },
{ 0x0FF01, 0x0FF20, "Zyyy" },
{ 0x0FF21, 0x0FF3A, "Latn" },
{ 0x0FF3B, 0x0FF40, "Zyyy" },
{ 0x0FF41, 0x0FF5A, "Latn" },
{ 0x0FF5B, 0x0FF65, "Zyyy" },
{ 0x0FF66, 0x0FF6F, "Kana" },
{ 0x0FF71, 0x0FF9D, "Kana" },
{ 0x0FF9E, 0x0FF9F, "Zyyy" },
{ 0x0FFA0, 0x0FFBE, "Hang" },
{ 0x0FFC2, 0x0FFC7, "Hang" },
{ 0x0FFCA, 0x0FFCF, "Hang" },
{ 0x0FFD2, 0x0FFD7, "Hang" },
{ 0x0FFDA, 0x0FFDC, "Hang" },
{ 0x0FFE0, 0x0FFE6, "Zyyy" },
{ 0x0FFE8, 0x0FFEE, "Zyyy" },
{ 0x0FFF9, 0x0FFFD, "Zyyy" },
{ 0x10000, 0x1000B, "Linb" },
{ 0x1000D, 0x10026, "Linb" },
{ 0x10028, 0x1003A, "Linb" },
{ 0x1003C, 0x1003D, "Linb" },
{ 0x1003F, 0x1004D, "Linb" },
{ 0x10050, 0x1005D, "Linb" },
{ 0x10080, 0x100FA, "Linb" },
{ 0x10100, 0x10102, "Zyyy" },
{ 0x10107, 0x10133, "Zyyy" },
{ 0x10137, 0x1013F, "Zyyy" },
{ 0x10140, 0x1018E, "Grek" },
{ 0x10190, 0x1019C, "Zyyy" },
{ 0x101D0, 0x101FC, "Zyyy" },
{ 0x10280, 0x1029C, "Lyci" },
{ 0x102A0, 0x102D0, "Cari" },
{ 0x102E1, 0x102FB, "Zyyy" },
{ 0x10300, 0x10323, "Ital" },
{ 0x1032D, 0x1032F, "Ital" },
{ 0x10330, 0x1034A, "Goth" },
{ 0x10350, 0x1037A, "Perm" },
{ 0x10380, 0x1039D, "Ugar" },
{ 0x103A0, 0x103C3, "Xpeo" },
{ 0x103C8, 0x103D5, "Xpeo" },
{ 0x10400, 0x1044F, "Dsrt" },
{ 0x10450, 0x1047F, "Shaw" },
{ 0x10480, 0x1049D, "Osma" },
{ 0x104A0, 0x104A9, "Osma" },
{ 0x104B0, 0x104D3, "Osge" },
{ 0x104D8, 0x104FB, "Osge" },
{ 0x10500, 0x10527, "Elba" },
{ 0x10530, 0x10563, "Aghb" },
{ 0x10600, 0x10736, "Lina" },
{ 0x10740, 0x10755, "Lina" },
{ 0x10760, 0x10767, "Lina" },
{ 0x10800, 0x10805, "Cprt" },
{ 0x1080A, 0x10835, "Cprt" },
{ 0x10837, 0x10838, "Cprt" },
{ 0x10840, 0x10855, "Armi" },
{ 0x10857, 0x1085F, "Armi" },
{ 0x10860, 0x1087F, "Palm" },
{ 0x10880, 0x1089E, "Nbat" },
{ 0x108A7, 0x108AF, "Nbat" },
{ 0x108E0, 0x108F2, "Hatr" },
{ 0x108F4, 0x108F5, "Hatr" },
{ 0x108FB, 0x108FF, "Hatr" },
{ 0x10900, 0x1091B, "Phnx" },
{ 0x10920, 0x10939, "Lydi" },
{ 0x10980, 0x1099F, "Mero" },
{ 0x109A0, 0x109B7, "Merc" },
{ 0x109BC, 0x109CF, "Merc" },
{ 0x109D2, 0x109FF, "Merc" },
{ 0x10A00, 0x10A03, "Khar" },
{ 0x10A05, 0x10A06, "Khar" },
{ 0x10A0C, 0x10A13, "Khar" },
{ 0x10A15, 0x10A17, "Khar" },
{ 0x10A19, 0x10A35, "Khar" },
{ 0x10A38, 0x10A3A, "Khar" },
{ 0x10A3F, 0x10A48, "Khar" },
{ 0x10A50, 0x10A58, "Khar" },
{ 0x10A60, 0x10A7F, "Sarb" },
{ 0x10A80, 0x10A9F, "Narb" },
{ 0x10AC0, 0x10AE6, "Mani" },
{ 0x10AEB, 0x10AF6, "Mani" },
{ 0x10B00, 0x10B35, "Avst" },
{ 0x10B39, 0x10B3F, "Avst" },
{ 0x10B40, 0x10B55, "Prti" },
{ 0x10B58, 0x10B5F, "Prti" },
{ 0x10B60, 0x10B72, "Phli" },
{ 0x10B78, 0x10B7F, "Phli" },
{ 0x10B80, 0x10B91, "Phlp" },
{ 0x10B99, 0x10B9C, "Phlp" },
{ 0x10BA9, 0x10BAF, "Phlp" },
{ 0x10C00, 0x10C48, "Orkh" },
{ 0x10C80, 0x10CB2, "Hung" },
{ 0x10CC0, 0x10CF2, "Hung" },
{ 0x10CFA, 0x10CFF, "Hung" },
{ 0x10D00, 0x10D27, "Rohg" },
{ 0x10D30, 0x10D39, "Rohg" },
{ 0x10E60, 0x10E7E, "Arab" },
{ 0x10E80, 0x10EA9, "Yezi" },
{ 0x10EAB, 0x10EAD, "Yezi" },
{ 0x10EB0, 0x10EB1, "Yezi" },
{ 0x10F00, 0x10F27, "Sogo" },
{ 0x10F30, 0x10F59, "Sogd" },
{ 0x10FB0, 0x10FCB, "Chrs" },
{ 0x10FE0, 0x10FF6, "Elym" },
{ 0x11000, 0x1104D, "Brah" },
{ 0x11052, 0x1106F, "Brah" },
{ 0x11080, 0x110C1, "Kthi" },
{ 0x110D0, 0x110E8, "Sora" },
{ 0x110F0, 0x110F9, "Sora" },
{ 0x11100, 0x11134, "Cakm" },
{ 0x11136, 0x11147, "Cakm" },
{ 0x11150, 0x11176, "Mahj" },
{ 0x11180, 0x111DF, "Shrd" },
{ 0x111E1, 0x111F4, "Sinh" },
{ 0x11200, 0x11211, "Khoj" },
{ 0x11213, 0x1123E, "Khoj" },
{ 0x11280, 0x11286, "Mult" },
{ 0x1128A, 0x1128D, "Mult" },
{ 0x1128F, 0x1129D, "Mult" },
{ 0x1129F, 0x112A9, "Mult" },
{ 0x112B0, 0x112EA, "Sind" },
{ 0x112F0, 0x112F9, "Sind" },
{ 0x11300, 0x11303, "Gran" },
{ 0x11305, 0x1130C, "Gran" },
{ 0x1130F, 0x11310, "Gran" },
{ 0x11313, 0x11328, "Gran" },
{ 0x1132A, 0x11330, "Gran" },
{ 0x11332, 0x11333, "Gran" },
{ 0x11335, 0x11339, "Gran" },
{ 0x1133C, 0x11344, "Gran" },
{ 0x11347, 0x11348, "Gran" },
{ 0x1134B, 0x1134D, "Gran" },
{ 0x1135D, 0x11363, "Gran" },
{ 0x11366, 0x1136C, "Gran" },
{ 0x11370, 0x11374, "Gran" },
{ 0x11400, 0x1145B, "Newa" },
{ 0x1145D, 0x11461, "Newa" },
{ 0x11480, 0x114C7, "Tirh" },
{ 0x114D0, 0x114D9, "Tirh" },
{ 0x11580, 0x115B5, "Sidd" },
{ 0x115B8, 0x115DD, "Sidd" },
{ 0x11600, 0x11644, "Modi" },
{ 0x11650, 0x11659, "Modi" },
{ 0x11660, 0x1166C, "Mong" },
{ 0x11680, 0x116B8, "Takr" },
{ 0x116C0, 0x116C9, "Takr" },
{ 0x11700, 0x1171A, "Ahom" },
{ 0x1171D, 0x1172B, "Ahom" },
{ 0x11730, 0x1173F, "Ahom" },
{ 0x11800, 0x1183B, "Dogr" },
{ 0x118A0, 0x118F2, "Wara" },
{ 0x11900, 0x11906, "Diak" },
{ 0x1190C, 0x11913, "Diak" },
{ 0x11915, 0x11916, "Diak" },
{ 0x11918, 0x11935, "Diak" },
{ 0x11937, 0x11938, "Diak" },
{ 0x1193B, 0x11946, "Diak" },
{ 0x11950, 0x11959, "Diak" },
{ 0x119A0, 0x119A7, "Nand" },
{ 0x119AA, 0x119D7, "Nand" },
{ 0x119DA, 0x119E4, "Nand" },
{ 0x11A00, 0x11A47, "Zanb" },
{ 0x11A50, 0x11AA2, "Soyo" },
{ 0x11AC0, 0x11AF8, "Pauc" },
{ 0x11C00, 0x11C08, "Bhks" },
{ 0x11C0A, 0x11C36, "Bhks" },
{ 0x11C38, 0x11C45, "Bhks" },
{ 0x11C50, 0x11C6C, "Bhks" },
{ 0x11C70, 0x11C8F, "Marc" },
{ 0x11C92, 0x11CA7, "Marc" },
{ 0x11CA9, 0x11CB6, "Marc" },
{ 0x11D00, 0x11D06, "Gonm" },
{ 0x11D08, 0x11D09, "Gonm" },
{ 0x11D0B, 0x11D36, "Gonm" },
{ 0x11D3C, 0x11D3D, "Gonm" },
{ 0x11D3F, 0x11D47, "Gonm" },
{ 0x11D50, 0x11D59, "Gonm" },
{ 0x11D60, 0x11D65, "Gong" },
{ 0x11D67, 0x11D68, "Gong" },
{ 0x11D6A, 0x11D8E, "Gong" },
{ 0x11D90, 0x11D91, "Gong" },
{ 0x11D93, 0x11D98, "Gong" },
{ 0x11DA0, 0x11DA9, "Gong" },
{ 0x11EE0, 0x11EF8, "Maka" },
{ 0x11FC0, 0x11FF1, "Taml" },
{ 0x12000, 0x12399, "Xsux" },
{ 0x12400, 0x1246E, "Xsux" },
{ 0x12470, 0x12474, "Xsux" },
{ 0x12480, 0x12543, "Xsux" },
{ 0x13000, 0x1342E, "Egyp" },
{ 0x13430, 0x13438, "Egyp" },
{ 0x14400, 0x14646, "Hluw" },
{ 0x16800, 0x16A38, "Bamu" },
{ 0x16A40, 0x16A5E, "Mroo" },
{ 0x16A60, 0x16A69, "Mroo" },
{ 0x16A6E, 0x16A6F, "Mroo" },
{ 0x16AD0, 0x16AED, "Bass" },
{ 0x16AF0, 0x16AF5, "Bass" },
{ 0x16B00, 0x16B45, "Hmng" },
{ 0x16B50, 0x16B59, "Hmng" },
{ 0x16B5B, 0x16B61, "Hmng" },
{ 0x16B63, 0x16B77, "Hmng" },
{ 0x16B7D, 0x16B8F, "Hmng" },
{ 0x16E40, 0x16E9A, "Medf" },
{ 0x16F00, 0x16F4A, "Plrd" },
{ 0x16F4F, 0x16F87, "Plrd" },
{ 0x16F8F, 0x16F9F, "Plrd" },
{ 0x16FE2, 0x16FE3, "Zyyy" },
{ 0x16FF0, 0x16FF1, "Hani" },
{ 0x17000, 0x187F7, "Tang" },
{ 0x18800, 0x18AFF, "Tang" },
{ 0x18B00, 0x18CD5, "Kits" },
{ 0x18D00, 0x18D08, "Tang" },
{ 0x1B001, 0x1B11E, "Hira" },
{ 0x1B150, 0x1B152, "Hira" },
{ 0x1B164, 0x1B167, "Kana" },
{ 0x1B170, 0x1B2FB, "Nshu" },
{ 0x1BC00, 0x1BC6A, "Dupl" },
{ 0x1BC70, 0x1BC7C, "Dupl" },
{ 0x1BC80, 0x1BC88, "Dupl" },
{ 0x1BC90, 0x1BC99, "Dupl" },
{ 0x1BC9C, 0x1BC9F, "Dupl" },
{ 0x1BCA0, 0x1BCA3, "Zyyy" },
{ 0x1D000, 0x1D0F5, "Zyyy" },
{ 0x1D100, 0x1D126, "Zyyy" },
{ 0x1D129, 0x1D166, "Zyyy" },
{ 0x1D167, 0x1D169, "Zinh" },
{ 0x1D16A, 0x1D17A, "Zyyy" },
{ 0x1D17B, 0x1D182, "Zinh" },
{ 0x1D183, 0x1D184, "Zyyy" },
{ 0x1D185, 0x1D18B, "Zinh" },
{ 0x1D18C, 0x1D1A9, "Zyyy" },
{ 0x1D1AA, 0x1D1AD, "Zinh" },
{ 0x1D1AE, 0x1D1E8, "Zyyy" },
{ 0x1D200, 0x1D245, "Grek" },
{ 0x1D2E0, 0x1D2F3, "Zyyy" },
{ 0x1D300, 0x1D356, "Zyyy" },
{ 0x1D360, 0x1D378, "Zyyy" },
{ 0x1D400, 0x1D454, "Zyyy" },
{ 0x1D456, 0x1D49C, "Zyyy" },
{ 0x1D49E, 0x1D49F, "Zyyy" },
{ 0x1D4A5, 0x1D4A6, "Zyyy" },
{ 0x1D4A9, 0x1D4AC, "Zyyy" },
{ 0x1D4AE, 0x1D4B9, "Zyyy" },
{ 0x1D4BD, 0x1D4C3, "Zyyy" },
{ 0x1D4C5, 0x1D505, "Zyyy" },
{ 0x1D507, 0x1D50A, "Zyyy" },
{ 0x1D50D, 0x1D514, "Zyyy" },
{ 0x1D516, 0x1D51C, "Zyyy" },
{ 0x1D51E, 0x1D539, "Zyyy" },
{ 0x1D53B, 0x1D53E, "Zyyy" },
{ 0x1D540, 0x1D544, "Zyyy" },
{ 0x1D54A, 0x1D550, "Zyyy" },
{ 0x1D552, 0x1D6A5, "Zyyy" },
{ 0x1D6A8, 0x1D7CB, "Zyyy" },
{ 0x1D7CE, 0x1D7FF, "Zyyy" },
{ 0x1D800, 0x1DA8B, "Sgnw" },
{ 0x1DA9B, 0x1DA9F, "Sgnw" },
{ 0x1DAA1, 0x1DAAF, "Sgnw" },
{ 0x1E000, 0x1E006, "Glag" },
{ 0x1E008, 0x1E018, "Glag" },
{ 0x1E01B, 0x1E021, "Glag" },
{ 0x1E023, 0x1E024, "Glag" },
{ 0x1E026, 0x1E02A, "Glag" },
{ 0x1E100, 0x1E12C, "Hmnp" },
{ 0x1E130, 0x1E13D, "Hmnp" },
{ 0x1E140, 0x1E149, "Hmnp" },
{ 0x1E14E, 0x1E14F, "Hmnp" },
{ 0x1E2C0, 0x1E2F9, "Wcho" },
{ 0x1E800, 0x1E8C4, "Mend" },
{ 0x1E8C7, 0x1E8D6, "Mend" },
{ 0x1E900, 0x1E94B, "Adlm" },
{ 0x1E950, 0x1E959, "Adlm" },
{ 0x1E95E, 0x1E95F, "Adlm" },
{ 0x1EC71, 0x1ECB4, "Zyyy" },
{ 0x1ED01, 0x1ED3D, "Zyyy" },
{ 0x1EE00, 0x1EE03, "Arab" },
{ 0x1EE05, 0x1EE1F, "Arab" },
{ 0x1EE21, 0x1EE22, "Arab" },
{ 0x1EE29, 0x1EE32, "Arab" },
{ 0x1EE34, 0x1EE37, "Arab" },
{ 0x1EE4D, 0x1EE4F, "Arab" },
{ 0x1EE51, 0x1EE52, "Arab" },
{ 0x1EE61, 0x1EE62, "Arab" },
{ 0x1EE67, 0x1EE6A, "Arab" },
{ 0x1EE6C, 0x1EE72, "Arab" },
{ 0x1EE74, 0x1EE77, "Arab" },
{ 0x1EE79, 0x1EE7C, "Arab" },
{ 0x1EE80, 0x1EE89, "Arab" },
{ 0x1EE8B, 0x1EE9B, "Arab" },
{ 0x1EEA1, 0x1EEA3, "Arab" },
{ 0x1EEA5, 0x1EEA9, "Arab" },
{ 0x1EEAB, 0x1EEBB, "Arab" },
{ 0x1EEF0, 0x1EEF1, "Arab" },
{ 0x1F000, 0x1F02B, "Zyyy" },
{ 0x1F030, 0x1F093, "Zyyy" },
{ 0x1F0A0, 0x1F0AE, "Zyyy" },
{ 0x1F0B1, 0x1F0BF, "Zyyy" },
{ 0x1F0C1, 0x1F0CF, "Zyyy" },
{ 0x1F0D1, 0x1F0F5, "Zyyy" },
{ 0x1F100, 0x1F1AD, "Zyyy" },
{ 0x1F1E6, 0x1F1FF, "Zyyy" },
{ 0x1F201, 0x1F202, "Zyyy" },
{ 0x1F210, 0x1F23B, "Zyyy" },
{ 0x1F240, 0x1F248, "Zyyy" },
{ 0x1F250, 0x1F251, "Zyyy" },
{ 0x1F260, 0x1F265, "Zyyy" },
{ 0x1F300, 0x1F6D7, "Zyyy" },
{ 0x1F6E0, 0x1F6EC, "Zyyy" },
{ 0x1F6F0, 0x1F6FC, "Zyyy" },
{ 0x1F700, 0x1F773, "Zyyy" },
{ 0x1F780, 0x1F7D8, "Zyyy" },
{ 0x1F7E0, 0x1F7EB, "Zyyy" },
{ 0x1F800, 0x1F80B, "Zyyy" },
{ 0x1F810, 0x1F847, "Zyyy" },
{ 0x1F850, 0x1F859, "Zyyy" },
{ 0x1F860, 0x1F887, "Zyyy" },
{ 0x1F890, 0x1F8AD, "Zyyy" },
{ 0x1F8B0, 0x1F8B1, "Zyyy" },
{ 0x1F900, 0x1F978, "Zyyy" },
{ 0x1F97A, 0x1F9CB, "Zyyy" },
{ 0x1F9CD, 0x1FA53, "Zyyy" },
{ 0x1FA60, 0x1FA6D, "Zyyy" },
{ 0x1FA70, 0x1FA74, "Zyyy" },
{ 0x1FA78, 0x1FA7A, "Zyyy" },
{ 0x1FA80, 0x1FA86, "Zyyy" },
{ 0x1FA90, 0x1FAA8, "Zyyy" },
{ 0x1FAB0, 0x1FAB6, "Zyyy" },
{ 0x1FAC0, 0x1FAC2, "Zyyy" },
{ 0x1FAD0, 0x1FAD6, "Zyyy" },
{ 0x1FB00, 0x1FB92, "Zyyy" },
{ 0x1FB94, 0x1FBCA, "Zyyy" },
{ 0x1FBF0, 0x1FBF9, "Zyyy" },
{ 0x20000, 0x2A6DD, "Hani" },
{ 0x2A700, 0x2B734, "Hani" },
{ 0x2B740, 0x2B81D, "Hani" },
{ 0x2B820, 0x2CEA1, "Hani" },
{ 0x2CEB0, 0x2EBE0, "Hani" },
{ 0x2F800, 0x2FA1D, "Hani" },
{ 0x30000, 0x3134A, "Hani" },
{ 0xE0020, 0xE007F, "Zyyy" },
{ 0xE0100, 0xE01EF, "Zinh" },
},
-- Scripts.txt gives full names; here we consider them aliases to save space.
aliases = {
Adlm = "Adlam",
Aghb = "Caucasian Albanian",
Ahom = "Ahom",
Arab = "Arabic",
Armi = "Imperial Aramaic",
Armn = "Armenian",
Avst = "Avestan",
Bali = "Balinese",
Bamu = "Bamum",
Bass = "Bassa Vah",
Batk = "Batak",
Beng = "Bengali",
Bhks = "Bhaiksuki",
Bopo = "Bopomofo",
Brah = "Brahmi",
Brai = "Braille",
Bugi = "Buginese",
Buhd = "Buhid",
Cakm = "Chakma",
Cans = "Canadian Aboriginal",
Cari = "Carian",
Cham = "Cham",
Cher = "Cherokee",
Chrs = "Chorasmian",
Copt = "Coptic",
Cprt = "Cypriot",
Cyrl = "Cyrillic",
Deva = "Devanagari",
Diak = "Dives Akuru",
Dogr = "Dogra",
Dsrt = "Deseret",
Dupl = "Duployan",
Egyp = "Egyptian Hieroglyphs",
Elba = "Elbasan",
Elym = "Elymaic",
Ethi = "Ethiopic",
Geor = "Georgian",
Glag = "Glagolitic",
Gong = "Gunjala Gondi",
Gonm = "Masaram Gondi",
Goth = "Gothic",
Gran = "Grantha",
Grek = "Greek",
Gujr = "Gujarati",
Guru = "Gurmukhi",
Hang = "Hangul",
Hani = "Han",
Hano = "Hanunoo",
Hatr = "Hatran",
Hebr = "Hebrew",
Hira = "Hiragana",
Hluw = "Anatolian Hieroglyphs",
Hmng = "Pahawh Hmong",
Hmnp = "Nyiakeng Puachue Hmong",
Hrkt = "Katakana Or Hiragana",
Hung = "Old Hungarian",
Ital = "Old Italic",
Java = "Javanese",
Kali = "Kayah Li",
Kana = "Katakana",
Khar = "Kharoshthi",
Khmr = "Khmer",
Khoj = "Khojki",
Kits = "Khitan Small Script",
Knda = "Kannada",
Kthi = "Kaithi",
Lana = "Tai Tham",
Laoo = "Lao",
Latn = "Latin",
Lepc = "Lepcha",
Limb = "Limbu",
Lina = "Linear A",
Linb = "Linear B",
Lisu = "Lisu",
Lyci = "Lycian",
Lydi = "Lydian",
Mahj = "Mahajani",
Maka = "Makasar",
Mand = "Mandaic",
Mani = "Manichaean",
Marc = "Marchen",
Medf = "Medefaidrin",
Mend = "Mende Kikakui",
Merc = "Meroitic Cursive",
Mero = "Meroitic Hieroglyphs",
Mlym = "Malayalam",
Modi = "Modi",
Mong = "Mongolian",
Mroo = "Mro",
Mtei = "Meetei Mayek",
Mult = "Multani",
Mymr = "Myanmar",
Nand = "Nandinagari",
Narb = "Old North Arabian",
Nbat = "Nabataean",
Newa = "Newa",
Nkoo = "Nko",
Nshu = "Nushu",
Ogam = "Ogham",
Olck = "Ol Chiki",
Orkh = "Old Turkic",
Orya = "Oriya",
Osge = "Osage",
Osma = "Osmanya",
Palm = "Palmyrene",
Pauc = "Pau Cin Hau",
Perm = "Old Permic",
Phag = "Phags Pa",
Phli = "Inscriptional Pahlavi",
Phlp = "Psalter Pahlavi",
Phnx = "Phoenician",
Plrd = "Miao",
Prti = "Inscriptional Parthian",
Rjng = "Rejang",
Rohg = "Hanifi Rohingya",
Runr = "Runic",
Samr = "Samaritan",
Sarb = "Old South Arabian",
Saur = "Saurashtra",
Sgnw = "SignWriting",
Shaw = "Shavian",
Shrd = "Sharada",
Sidd = "Siddham",
Sind = "Khudawadi",
Sinh = "Sinhala",
Sogd = "Sogdian",
Sogo = "Old Sogdian",
Sora = "Sora Sompeng",
Soyo = "Soyombo",
Sund = "Sundanese",
Sylo = "Syloti Nagri",
Syrc = "Syriac",
Tagb = "Tagbanwa",
Takr = "Takri",
Tale = "Tai Le",
Talu = "New Tai Lue",
Taml = "Tamil",
Tang = "Tangut",
Tavt = "Tai Viet",
Telu = "Telugu",
Tfng = "Tifinagh",
Tglg = "Tagalog",
Thaa = "Thaana",
Thai = "Thai",
Tibt = "Tibetan",
Tirh = "Tirhuta",
Ugar = "Ugaritic",
Vaii = "Vai",
Wara = "Warang Citi",
Wcho = "Wancho",
Xpeo = "Old Persian",
Xsux = "Cuneiform",
Yezi = "Yezidi",
Yiii = "Yi",
Zanb = "Zanabazar Square",
Zinh = "Inherited",
Zyyy = "Common",
Zzzz = "Unknown",
},
}
-- Required for binary search function in [[Module:Language/scripts]].
-- Cannot get length of module loaded with mw.loadData.
data.ranges.length = #data.ranges
data.rtl = {}
for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do
-- [[Module:Lang/data]] has script codes in lowercase;
-- this module has script codes with the first letter capitalized.
data.rtl[script:gsub("^%a", string.upper)] = true
end
return data</text>
<sha1>8jz0zjbzyrduz3quytfv1bqj0wrzm72</sha1>
</revision>
</page>
<page>
<title>Module:Yesno</title>
<ns>828</ns>
<id>38665046</id>
<revision>
<id>948473803</id>
<parentid>948472535</parentid>
<timestamp>2020-04-01T06:27:55Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<comment>Undid revision 948472533 by [[Special:Contributions/w&gt;Vogone|w&gt;Vogone]] ([[User talk:w&gt;Vogone|talk]])</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="745" xml:space="preserve">-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end</text>
<sha1>swdskn7svew8i9wuydn9uj5l3r2ghcs</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/edition</title>
<ns>10</ns>
<id>34353517</id>
<revision>
<id>675608488</id>
<parentid>675606923</parentid>
<timestamp>2015-08-11T16:35:13Z</timestamp>
<contributor>
<username>Izkala</username>
<id>23051379</id>
</contributor>
<minor/>
<comment>Reverted edits by [[Special:Contribs/M777|M777]] ([[User talk:M777|talk]]) to last version by Jason Quinn</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="256" xml:space="preserve">* '''edition''': When the publication has more than one edition; for example: "2nd", "Revised", and so forth. Appends the string "&amp;nbsp;ed." after the field, so {{para|edition|2nd}} produces "2nd&amp;nbsp;ed." Does not display if a periodical field is defined.</text>
<sha1>7pdzcmdl6w5p65ad4l9wmmymn2bm7t7</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/title</title>
<ns>10</ns>
<id>36298815</id>
<revision>
<id>983484569</id>
<parentid>983484144</parentid>
<timestamp>2020-10-14T14:04:53Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>formatting</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="3212" xml:space="preserve">{{Crossreference|(See also [[Help:Citation Style 1#Titles and chapters|Help:Citation Style 1 § Titles and chapters]].)}}
* '''{{#switch:{{{title_title}}}
|encyclopedia=encyclopedia
|#default = title}}''': Title of source. {{#switch:{{{link}}}|no=|wikilink_only=Can be wikilinked to an existing Wikipedia article.|Can be wikilinked to an existing Wikipedia article or '''url''' may be used to add an external link, but not both.}} {{#switch:{{BASEPAGENAME}}
|Cite arXiv = Displays in quotes
|Cite book = Displays in italics
|Cite conference = Displays in quotes
|Cite episode = Displays in quotes
|Cite journal = Displays in quotes
|Cite magazine = Displays in quotes
|Cite news = Displays in quotes
|Cite web = Displays in quotes
|Cite press release = Displays in quotes
|Cite podcast = Displays in quotes
|Cite report = Displays unformatted, without italics or quotes
|#default = Displays in italics}}. {{#if:{{{limited_param_list|}}}||If '''script-title''' is defined, '''title''' holds a [[WP:ROMAN|Romanization]] of title in '''script-title'''.
** '''script-title''': Original title for languages that do not use a Latin-based script (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, etc.); not italicized, follows italicized Romanization defined in '''title'''. Must be prefixed with one of the [[Help:Citation_Style_1#{{pipe}}script-&amp;lt;param&gt;{{=}} language codes|supported language codes]] to help browsers properly display the script:
**:&lt;code&gt;&lt;nowiki&gt;... |title=Tōkyō tawā |script-title=ja:東京タワー |trans-title=Tokyo Tower ...&lt;/nowiki&gt;&lt;/code&gt;
** '''trans-title''': English translation of the title if the source cited is in a foreign language. Displays in square brackets after '''{{#switch:{{{title_title}}}
|encyclopedia=encyclopedia
|#default = title}}'''; if '''url''' is defined, then '''trans-title''' is included in the link. Use of the '''language''' parameter is recommended.}}
:Titles containing certain characters will not display and link correctly unless those characters are encoded.
{| class="wikitable" style="margin-left: 5em"
! newline !! [ !! ] !! &amp;#124;
|-
| space || style="text-align: center;" | &amp;amp;#91; || style="text-align: center;" | &amp;amp;#93; || style="text-align: center;" | &lt;code&gt;&lt;nowiki&gt;{{!}}&lt;/nowiki&gt;&lt;/code&gt; (preferred)
|-
|
| colspan="2" style="text-align: center;" | [[Template:Bracket|&lt;nowiki&gt;{{bracket|text}}&lt;/nowiki&gt;]] || &amp;amp;#124; or [[Template:Pipe|&lt;nowiki&gt;{{pipe}}&lt;/nowiki&gt;]] – {{crossref|see also {{section link|Help:Table|Rendering the pipe}}}}
|}{{#if:{{{limited_param_list|}}}||
:* '''title-link''': Title of existing Wikipedia article about the source named in '''title''' – do not use a web address; do not wikilink. Alias: '''titlelink'''.
{{#switch:{{BASEPAGENAME}}|Cite journal =
:: Some identifiers (specifying free resources) will automatically be linked to the title when {{para|url}} and {{para|title-link}} are not used to specify a different link target. This behaviour can be overridden by one out of a number of special keywords for {{para|title-link}} to manually select a specific source ({{para|title-link|pmc}} or {{para|title-link|doi}}) for auto-linking or to disable the feature ({{para|title-link|none}}).}}
}}</text>
<sha1>h6xvy13zuvzlu4hwau52iinkfw53lvt</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/volume</title>
<ns>10</ns>
<id>34353526</id>
<revision>
<id>879220702</id>
<parentid>864500516</parentid>
<timestamp>2019-01-19T20:46:47Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>Change after update, per [[Help_talk:Citation_Style_1#When_|volume=_is_a_Roman_Numeral|this discussion]]. I think I got this description correct.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="497" xml:space="preserve">* &lt;b id="csdoc_volume"&gt;volume&lt;/b&gt;: For one publication published in several volumes. Displays after the '''title''' and '''series''' fields; {{#if:{{{magazine|}}}|prefixed with 'Vol. '.|volume numbers should be entered just as a numeral (e.g. 37); volume values that are wholly digits, wholly uppercase roman numerals, or less than five characters will appear in bold. Any non-numeric value of five or more characters will be presumed to follow some other convention and will not appear in bold.}}</text>
<sha1>lce9xvhubeqigoyrgtgye7frs780jik</sha1>
</revision>
</page>
<page>
<title>Template:Cite news/doc</title>
<ns>10</ns>
<id>6500660</id>
<revision>
<id>988319879</id>
<parentid>988319696</parentid>
<timestamp>2020-11-12T13:16:07Z</timestamp>
<contributor>
<username>Tom.Reding</username>
<id>9784415</id>
</contributor>
<minor/>
<comment>Reverted 1 edit by [[Special:Contributions/200.95.170.67|200.95.170.67]] ([[User talk:200.95.170.67|talk]]) to last revision by Tom.Reding</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="37842" xml:space="preserve">{{Documentation subpage}}
{{csdoc|lua}}
{{csdoc|cs1}}
{{csdoc|lead|news articles in print, video, audio or web}}
{{High-risk|1020075+}}
==Usage==
{{csdoc|usage}}
{{csdoc|usage common}}
;To cite a news article with a credited author
&lt;code&gt;&lt;nowiki&gt;{{cite news |last= |first= |date= |title= |url= |work= |location= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
&lt;br /&gt;
;To cite a news article with no credited author
&lt;code&gt;&lt;nowiki&gt;{{cite news |author=&lt;!--Staff writer(s); no by-line.--&gt; |title= |url= |work= |location= |date= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
&lt;br /&gt;
;To cite an online news article that has been archived
&lt;code&gt;&lt;nowiki&gt;{{cite news |last= |first= |date= |title= |url= |url-status= |work= |location= |archive-url= |archive-date= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
&lt;br /&gt;
;To cite a news article written in a foreign language
&lt;code&gt;&lt;nowiki&gt;{{cite news |last= |first= |date= |title= |trans-title= |url= |language= |work= |location= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
;To cite and quote an archived news article clipped with an information aggregation service requiring a subscription
&lt;code&gt;&lt;nowiki&gt;{{cite news |last1= |first1= |last2= |first2= |date= |title= |trans-title= |url= |url-status= |language= |work= |location= |archive-url= |archive-date= |access-date= |via= |quote=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage full}}
:&lt;code&gt;&lt;nowiki&gt;{{cite news |last1= |first1= |author-link1= |last2= |first2= |author-link2= |last3= |first3= |author-link3= |last4= |first4= |author-link4= |last5= |first5= |author-link5= |display-authors= |author-mask= |name-list-style= |date= |year= |orig-year= |title= |script-title= |trans-title= |url= |url-status= |format= |editor1-last= |editor1-first= |editor1-link= |editor2-last= |editor2-first= |editor2-link= |editor3-last= |editor3-first= |editor3-link= |editor4-last= |editor4-first= |editor4-link= |editor5-last= |editor5-first= |editor5-link= |display-editors= |department= |work= |type= |series= |language= |volume= |issue= |others= |edition= |location= |publisher= |publication-date= |agency= |page= |pages= |at= |nopp= |arxiv= |asin= |bibcode= |doi= |doi-broken-date= |isbn= |issn= |jfm= |jstor= |lccn= |mr= |oclc= |ol= |osti= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |archive-url= |archive-date= |access-date= |via= |registration= |lay-url= |lay-source= |lay-date= |quote= |postscript= |ref=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage vertical common}}
;To cite a news article with a credited author
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| last =
| first =
| date =
| title =
| url =
| work =
| location =
| access-date =
}}
&lt;/pre&gt;
;To cite a news article with no credited author
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| author =&lt;!--Staff writer(s); no by-line.--&gt;
| title =
| url =
| work =
| location =
| date =
| access-date =
}}
&lt;/pre&gt;
;To cite an online news article that has been archived
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| last =
| first =
| date =
| title =
| url =
| url-status =
| work =
| location =
| archive-url =
| archive-date =
| access-date =
}}
&lt;/pre&gt;
;To cite a news article written in a foreign language
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| last =
| first =
| date =
| title =
| trans-title =
| url =
| language =
| work =
| location =
| access-date =
}}
&lt;/pre&gt;
;To cite and quote a clipped and archived news article on an information aggregation service requiring a subscription
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| last1 =
| first1 =
| last2 =
| first2 =
| date =
| title =
| trans-title =
| url =
| url-status =
| format =
| language =
| work =
| location =
| archive-url =
| archive-date =
| access-date =
| via =
| url-access =
| quote =
}}
&lt;/pre&gt;
{{end}}
{{csdoc|usage vertical}}
&lt;pre style="margin:0px; border:none;"&gt;
{{cite news
| last1 =
| first1 =
| author-link1 =
| last2 =
| first2 =
| author-link2 =
| last3 =
| first3 =
| author-link3 =
| last4 =
| first4 =
| author-link4 =
| last5 =
| first5 =
| author-link5 =
| display-authors =
| author-mask =
| name-list-style =
| date =
| year =
| orig-year =
| title =
| script-title =
| trans-title =
| url =
| url-status =
| format =
| editor1-last =
| editor1-first =
| editor1-link =
| editor2-last =
| editor2-first =
| editor2-link =
| editor3-last =
| editor3-first =
| editor3-link =
| editor4-last =
| editor4-first =
| editor4-link =
| editor5-last =
| editor5-first =
| editor5-link =
| display-editors =
| department =
| work =
| type =
| series =
| language =
| volume =
| issue =
| others =
| edition =
| location =
| publisher =
| publication-date =
| agency =
| page =
| pages =
| at =
| nopp =
| arxiv =
| asin =
| bibcode =
| doi =
| doi-broken-date =
| isbn =
| issn =
| jfm =
| jstor =
| lccn =
| mr =
| oclc =
| ol =
| osti =
| pmc =
| pmid =
| rfc =
| ssrn =
| zbl =
| id =
| archive-url =
| archive-date =
| access-date =
| via =
| lay-url =
| lay-source =
| lay-date =
| quote =
| postscript =
| ref =
}}
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none;"&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none;"&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical end}}
===Choosing between {{tlf|Cite web}} and {{tlf|Cite news}}===
{{anchor|Consistency}}
Before 2014, editors needed to decide whether to use {{tl|Cite web}} or {{tlf|Cite news}} based on their features. In 2014, however, ''most of'' the differences between the two templates were eliminated.
As of {{diff|Module:Citation/CS1|732205428|723907342|29 July 2016}}, {{tlf|Cite web}} and {{tlf|Cite news}} have the following differences:
*{{tlf|Cite news}} can be used for [[WP:OFFLINE|offline]] (paper) sources whereas {{tlf|Cite web}} generates a missing URL error when no URL is provided
*{{tlf|Cite news}} accepts {{para|issue}} and {{para|volume}} parameters while {{tlf|Cite web}} does not (See {{section link|1=Help talk:Citation Style 1/Archive 10|2=&amp;#x7C;volume=, &amp;#x7C;issue=, &amp;#x7C;page(s)= and cite magazine}}.)
But given the same set of valid parameters, their output is exactly the same:
&lt;!-- ATTENTION!
The following example only serves to demonstrate parameter rending results.
Whether you must include all these parameters in actual articles is not a concern here.
--&gt;
{|
| '''Cite web''': || {{cite web |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015}}
|-
| '''Cite news''': || {{cite news |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle|publisher=Hearst Corporation |access-date=May 26, 2015}}
|}
==Examples==
;A news article with a credited author
:&lt;code&gt;&lt;nowiki&gt;{{cite news |last=Wolford |first=Ben |date=2013-10-16 |title=Citrus Canker Lawsuit Headed Back to Trial |url=http://www.sun-sentinel.com/news/palm-beach/fl-citrus-canker-ruling-20131016,0,7602285.story |work=South Florida Sun-Sentinel |access-date=2013-10-17}}&lt;/nowiki&gt;&lt;/code&gt;
:Displays as:
* {{cite news |last=Wolford |first=Ben |date=2013-10-16 |title=Citrus Canker Lawsuit Headed Back to Trial |url=http://www.sun-sentinel.com/news/palm-beach/fl-citrus-canker-ruling-20131016,0,7602285.story |work=South Florida Sun-Sentinel |access-date=2013-10-17}}
;A news article released by a news agency and having no credited author
:&lt;code&gt;&lt;nowiki&gt;{{cite news |author=&lt;!--Staff writer(s); no by-line.--&gt; |title=Bellingham Police Arrest WWU Student in Melee |url=http://blogs.seattletimes.com/today/2013/10/bellingham-police-arrest-wwu-student-in-melee/ |work=The Seattle Times |agency=Associated Press |date=2013-10-17 |access-date=2013-10-17}}&lt;/nowiki&gt;&lt;/code&gt;
:Displays as:
* {{cite news |author=&lt;!--Staff writer(s); no by-line.--&gt; |title=Bellingham Police Arrest WWU Student in Melee |url=http://blogs.seattletimes.com/today/2013/10/bellingham-police-arrest-wwu-student-in-melee/ |work=The Seattle Times |agency=Associated Press |date=2013-10-17 |access-date=2013-10-17}}
;A news article that has been archived
:&lt;code&gt;&lt;nowiki&gt;{{cite news |last=Pank |first=Philip |date=2013-10-18 |title=Families Accuse Network Rail of Cover-Up |url=http://www.thetimes.co.uk/tto/business/industries/transport/article3897709.ece |url-status=dead |work=The Times |location=London |archiveurl=https://www.webcitation.org/6KS5scqfE |archivedate=2013-10-18 |access-date=2013-10-18}}&lt;/nowiki&gt;&lt;/code&gt;
:Displays as:
* {{cite news |last=Pank |first=Philip |date=2013-10-18 |title=Families Accuse Network Rail of Cover-Up |url=http://www.thetimes.co.uk/tto/business/industries/transport/article3897709.ece |url-status=dead |work=The Times |location=London |archiveurl=https://www.webcitation.org/6KS5scqfE |archivedate=2013-10-18 |access-date=2013-10-18}}
;A news article written in a foreign language
:&lt;code&gt;&lt;nowiki&gt;{{cite news |last=Bourmaud |first=François-Xavier |date=2013-10-17 |title=Hollande dans le bourbier de l'affaire Leonarda |trans-title=Hollande in the quagmire of the Leonarda case |url=http://www.lefigaro.fr/politique/2013/10/17/01002-20131017ARTFIG00575-hollande-dans-le-bourbier-de-l-affaire-leonarda.php |language=French |work=Le Figaro |location=Paris |access-date=2013-10-17}}&lt;/nowiki&gt;&lt;/code&gt;
:Displays as:
* {{cite news |last=Bourmaud |first=François-Xavier |date=2013-10-17 |title=Hollande dans le Bourbier de L'affaire Leonarda |trans-title=Holland in the Quagmire of the Leonarda Case |url=http://www.lefigaro.fr/politique/2013/10/17/01002-20131017ARTFIG00575-hollande-dans-le-bourbier-de-l-affaire-leonarda.php |language=French |work=Le Figaro |location=Paris |access-date=2013-10-17}}
;A clipped and archived news article that you quote, found on an information aggregation service requiring a subscription
:&lt;code&gt;&lt;nowiki&gt;{{cite news |url=https://www.newspapers.com/clip/30201172/daily_news/ |title=Czechs honor Yuri |date=30 April 1961 |newspaper=Daily News|access-date=2 April 2019|archive-url=https://web.archive.org/web/20190402233429/https://www.newspapers.com/clip/30201172/daily_news/|archive-date=2 April 2019|url-status=live |agency=Reuters |location=New York |page=35 |via=Newspapers.com |quote=Czech President [[Antonin Novotny]] today made visiting Soviet spaceman Yuri Gagarin a "Hero of Socialist Labor".}}&lt;/nowiki&gt;&lt;/code&gt;
:Displays as:
* {{cite news |url=https://www.newspapers.com/clip/30201172/daily_news/ |title=Czechs honor Yuri |date=30 April 1961 |newspaper=Daily News|access-date=2 April 2019|archive-url=https://web.archive.org/web/20190402233429/https://www.newspapers.com/clip/30201172/daily_news/|archive-date=2 April 2019|url-status=live |agency=Reuters |location=New York |page=35 |via=Newspapers.com |quote=Czech President [[Antonin Novotny]] today made visiting Soviet spaceman Yuri Gagarin a "Hero of Socialist Labor".}}
==Parameters==
===Syntax===
{{csdoc|syntax}}
{{csdoc|sep_period}}
===COinS===
{{csdoc|coins}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated}}
===Description===
====Authors====
{{csdoc|author|others=yes}}
====Title====
{{csdoc|title|title_format=work}}
{{csdoc|language}}
====Periodical====
{{csdoc|journal|department=yes}}
====Date====
{{csdoc|date}}
====Publisher====
{{csdoc|publisher}}
{{csdoc|agency}}
====Edition, volume====
{{csdoc|edition}}
{{csdoc|volume}}
====In-source locations====
{{csdoc|pages}}
===={{Anchor|url}}URL====
{{csdoc|url}}
====Anchor====
{{csdoc|ref}}
====Identifiers====
{{csdoc|id1}}
{{csdoc|id2}}
====Quote====
{{csdoc|quote}}
====Editors====
{{csdoc|editor}}
====Laysummary====
{{csdoc|lay}}
====Display options====
{{csdoc|display}}
====Subscription or registration required====
{{csdoc|registration}}
==TemplateData==
{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "This template formats a citation to a news article in print, video, audio or web using the provided source information (e.g. author, publication, date) and various formatting options.",
"params": {
"url": {
"label": "URL",
"description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the protocol relative scheme \"//...\"",
"type": "string",
"suggested": true,
"aliases": [
"URL"
],
"example": "https://www.nytimes.com/..."
},
"title": {
"label": "Source title",
"description": "The title of the article as it appears in the source; displays in quotes",
"type": "string",
"required": true
},
"last": {
"label": "Last name",
"description": "The surname of the author; don't wikilink, use 'author-link'.",
"aliases": [
"last1",
"author",
"author1",
"authors"
],
"suggested": true
},
"first": {
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'author-link'.",
"aliases": [
"first1"
],
"suggested": true
},
"date": {
"label": "Source date",
"description": "Full date of the source; do not wikilink",
"type": "string",
"suggested": true
},
"publisher": {
"label": "Publisher",
"description": "Name of the parent institution or company that publishes the newspaper, magazine, or periodical; displays after name of the publication",
"type": "string",
"aliases": [
"distributor",
"institution"
],
"example": "[[Gannett]]"
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'author-link2'.",
"aliases": [
"author2"
]
},
"first2": {
"label": "First name 2",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink."
},
"others": {
"label": "Others",
"description": "Used to record other contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'",
"type": "string"
},
"month": {
"label": "Month of publication",
"description": "Name of the month of publication; do not wikilink; use 'date' instead, if day of month is also known",
"type": "string"
},
"year": {
"label": "Year of publication",
"description": "Year of the source being referenced; use 'date' instead, if month and day are also known",
"type": "string"
},
"editor-last": {
"label": "Editor last name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-last', 'editor', and 'editors'",
"aliases": [
"editor-last1",
"editor1-last",
"editor-surname",
"editor-surname1",
"editor1-surname",
"editor",
"editor1"
]
},
"editor-first": {
"label": "Editor first name",
"description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-first'",
"aliases": [
"editor-first1",
"editor1-first",
"editor-given",
"editor-given1",
"editor1-given"
]
},
"editor-link": {
"label": "Editor link",
"description": "Title of existing Wikipedia article about the editor; can suffix with a numeral to add additional editors; alias of 'editor1-link'",
"type": "wiki-page-name",
"aliases": [
"editor-link1"
]
},
"issue": {
"label": "Issue",
"description": "Issue identifier when the source is part of a series that is published periodically",
"type": "string",
"aliases": [
"number"
]
},
"department": {
"label": "Department",
"description": "Department within the periodical",
"type": "string"
},
"location": {
"label": "Location of publication",
"description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place; alias of 'place'",
"type": "string",
"aliases": [
"place"
]
},
"publication-place": {
"label": "Place of publication",
"description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'",
"type": "string"
},
"publication-date": {
"label": "Publication date",
"description": "Date of publication when different from the date the work was written; do not wikilink",
"type": "string"
},
"agency": {
"label": "Agency",
"description": "The news agency (wire service) that provided the content; examples: Associated Press, Reuters, Agence France-Presse",
"type": "string"
},
"edition": {
"label": "Edition",
"description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed with ' ed.'",
"type": "string"
},
"volume": {
"label": "Volume",
"description": "For one publication published in several volumes",
"type": "string"
},
"page": {
"label": "Page",
"description": "Page in the source that supports the content; displays after 'p.'",
"type": "string"
},
"pages": {
"label": "Pages",
"description": "Pages in the source that support the content (not an indication of the number of pages in the source; displays after 'pp.'",
"type": "string",
"example": "2–3"
},
"nopp": {
"label": "No pp",
"description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')",
"type": "string"
},
"at": {
"label": "At",
"description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient",
"type": "string"
},
"language": {
"label": "Language",
"description": "The language in which the source is written, if not English; use the full language name; do not use icons or templates",
"type": "string"
},
"script-title": {
"label": "Script title",
"description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...",
"type": "string"
},
"trans-title": {
"label": "Translated title",
"description": "An English language title, if the source cited is in a foreign language; 'language' is recommended",
"type": "string"
},
"type": {
"label": "Type",
"description": "Additional information about the media type of the source; format in sentence case",
"type": "string"
},
"format": {
"label": "Format",
"description": "Format of the work referred to by 'url'; examples: PDF, DOC, XLS; do not specify HTML",
"type": "string"
},
"arxiv": {
"label": "arXiv identifier",
"description": "An identifier for arXive electronic preprints of scientific papers",
"type": "string"
},
"asin": {
"label": "ASIN",
"description": "Amazon Standard Identification Number; 10 characters",
"type": "string"
},
"asin-tld": {
"label": "ASIN TLD",
"description": "ASIN top-level domain for Amazon sites other than the US",
"type": "string"
},
"bibcode": {
"label": "Bibcode",
"description": "Bibliographic Reference Code (REFCODE); 19 characters",
"type": "string"
},
"doi": {
"label": "DOI",
"description": "Digital Object Identifier; begins with '10.'",
"type": "string"
},
"doi-broken-date": {
"label": "DOI broken date",
"description": "The date that the DOI was determined to be broken",
"type": "string",
"aliases": [
"doi_brokendate",
"doi-inactive-date"
]
},
"isbn": {
"label": "ISBN",
"description": "International Standard Book Number; use the 13-digit ISBN where possible",
"type": "string",
"aliases": [
"ISBN"
]
},
"issn": {
"label": "ISSN",
"description": "International Standard Serial Number; 8 characters; may be split into two groups of four using a hyphen",
"type": "string",
"aliases": [
"ISSN"
]
},
"jfm": {
"label": "jfm code",
"description": "Jahrbuch über die Fortschritte der Mathematik classification code",
"type": "string"
},
"jstor": {
"label": "JSTOR",
"description": "JSTOR identifier",
"type": "string"
},
"lccn": {
"label": "LCCN",
"description": "Library of Congress Control Number",
"type": "string"
},
"mr": {
"label": "MR",
"description": "Mathematical Reviews identifier",
"type": "string"
},
"oclc": {
"label": "OCLC",
"description": "Online Computer Library Center number",
"type": "string"
},
"ol": {
"label": "OL",
"description": "Open Library identifier",
"type": "string"
},
"osti": {
"label": "OSTI",
"description": "Office of Scientific and Technical Information identifier",
"type": "string"
},
"pmc": {
"label": "PMC",
"description": "PubMed Center article number",
"type": "string"
},
"pmid": {
"label": "PMID",
"description": "PubMed Unique Identifier",
"type": "string"
},
"rfc": {
"label": "RFC",
"description": "Request for Comments number",
"type": "string"
},
"ssrn": {
"label": "SSRN",
"description": "Social Science Research Network",
"type": "string"
},
"zbl": {
"label": "Zbl",
"description": "Zentralblatt MATH journal identifier",
"type": "string"
},
"id": {
"label": "id",
"description": "A unique identifier used where none of the specialized ones are applicable",
"type": "string"
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source; displays last, enclosed in quotes; needs to include terminating punctuation",
"type": "string"
},
"ref": {
"label": "Ref",
"description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates",
"type": "string"
},
"postscript": {
"label": "Postscript",
"description": "The closing punctuation for the citation; ignored if 'quote' is defined; to suppress use reserved keyword 'none'",
"type": "string",
"default": "."
},
"registration": {
"label": "Registration",
"description": "For online sources that require registration, set to 'yes' (or 'y', or 'true'); superseded by subscription if both are set",
"type": "string",
"deprecated": true
},
"subscription": {
"label": "Subscription",
"description": "For online sources that require subscription, set to 'yes' (or 'y', or 'true'); supersedes registration if both are set",
"type": "string",
"deprecated": true
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'author-link3'.",
"aliases": [
"author3"
]
},
"first3": {
"label": "First name 3",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink."
},
"last4": {
"label": "Last name 4",
"description": "The surname of the fourth author; don't wikilink, use 'author-link4'.",
"aliases": [
"author4"
]
},
"first4": {
"label": "First name 4",
"description": "Given or first name, middle names, or initials of the fourth author; don't wikilink."
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'author-link5'.",
"aliases": [
"author5"
]
},
"first5": {
"label": "First name 5",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink."
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'author-link6'.",
"aliases": [
"author6"
]
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink."
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'author-link7'.",
"aliases": [
"author7"
]
},
"first7": {
"label": "First name 7",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink."
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'author-link8'.",
"aliases": [
"author8"
]
},
"first8": {
"label": "First name 8",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink."
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'author-link9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"aliases": [
"author9"
]
},
"first9": {
"label": "First name 9",
"description": "Given or first name, middle names, or initials of the ninth author; don't wikilink."
},
"author-mask": {
"label": "Author mask",
"description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string"
},
"author-name-separator": {
"label": "Author name separator",
"description": "Changes the separator between last and first names; defaults to a comma and space; a space must be encoded as &amp;#32;",
"type": "string",
"default": ", "
},
"author-separator": {
"label": "Author separator",
"description": "Changes the separator between authors; defaults to a semicolon and space; a space must be encoded as &amp;#32;",
"type": "string",
"default": "; "
},
"display-authors": {
"label": "Display authors",
"description": "number of authors to display before 'et al.' is used;",
"type": "number",
"aliases": [
"displayauthors"
]
},
"author-link": {
"label": "Author link",
"description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink",
"authorlink1",
"author-link1",
"author1-link"
]
},
"author-link2": {
"label": "Author link 2",
"description": "Title of existing Wikipedia article about the second author. (Up to nine authors can be listed, 3-9 are toward the end of the parameter list)",
"type": "wiki-page-name",
"aliases": [
"authorlink2"
]
},
"archive-url": {
"label": "Archive URL",
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archivedate'",
"type": "string",
"aliases": [
"archiveurl"
]
},
"archive-date": {
"label": "Archive date",
"description": "Date when the original URL was archived; do not wikilink",
"type": "string",
"aliases": [
"archivedate"
]
},
"lay-url": {
"label": "Lay URL",
"description": "URL link to a non-technical summary or review of the source; alias of 'laysummary'",
"type": "string",
"aliases": [
"layurl"
]
},
"lay-source": {
"label": "Lay source",
"description": "Name of the source of the laysummary; displays in italics, preceded by an en dash",
"type": "string",
"aliases": [
"laysource"
]
},
"lay-date": {
"label": "Lay date",
"description": "Date of the summary; displays in parentheses",
"type": "string",
"aliases": [
"laydate"
]
},
"author-link3": {
"label": "Author link 3",
"description": "Title of existing Wikipedia article about the third author.",
"type": "wiki-page-name",
"aliases": [
"authorlink3",
"author3-link"
]
},
"author-link4": {
"label": "Author link 4",
"description": "Title of existing Wikipedia article about the fourth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink4",
"author4-link"
]
},
"author-link5": {
"label": "Author link 5",
"description": "Title of existing Wikipedia article about the fifth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink5",
"author5-link"
]
},
"author-link6": {
"label": "Author link 6",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink6",
"author6-link"
]
},
"author-link7": {
"label": "Author link 7",
"description": "Title of existing Wikipedia article about the seventh author.",
"type": "wiki-page-name",
"aliases": [
"authorlink7",
"author7-link"
]
},
"author-link8": {
"label": "Author link 8",
"description": "Title of existing Wikipedia article about the eighth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink8",
"author8-link"
]
},
"author-link9": {
"label": "Author link 9",
"description": "Title of existing Wikipedia article about the ninth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink9",
"author9-link"
]
},
"last-author-amp": {
"label": "Last author ampersand",
"description": "When set to any value, changes the separator between the last two names of the author list to 'space ampersand space'",
"type": "string",
"aliases": [
"lastauthoramp"
]
},
"access-date": {
"label": "URL access date",
"description": "The full date when the original URL was accessed; do not wikilink",
"type": "string",
"suggested": true,
"aliases": [
"accessdate"
]
},
"orig-year": {
"label": "Original year",
"description": "Original year of publication; provide specifics",
"type": "string",
"aliases": [
"origyear"
]
},
"via": {
"label": "via",
"description": "Identify the aggregator of the resource that provided the digital version (usually a database provider), when it differs from the publisher (e.g., for The Wikipedia Library)",
"example": "EBSCOHost , Proquest, Newspapers.com",
"type": "string"
},
"url-access": {
"label": "URL access level",
"description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')",
"type": "string"
},
"bibcode-access": {
"label": "Bibcode access level",
"description": "If the full text is available from ADS via this Bibcode, type 'free'.",
"type": "string"
},
"doi-access": {
"label": "DOI access level",
"description": "If the full text is free to read via the DOI, type 'free'.",
"type": "string"
},
"hdl-access": {
"label": "HDL access level",
"description": "If the full text is free to read via the HDL, type 'free'.",
"type": "string"
},
"jstor-access": {
"label": "Jstor access level",
"description": "If the full text is free to read on Jstor, type 'free'.",
"type": "string"
},
"ol-access": {
"label": "OpenLibrary access level",
"description": "If the full text is free to read on OpenLibrary, type 'free'.",
"type": "string"
},
"osti-access": {
"label": "OSTI access level",
"description": "If the full text is free to read on OSTI, type 'free'.",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title display is adjusted; useful for when the URL is archived preemptively but still live. Set to \"dead\" or 'usurped' for broken links. Entering 'unfit' or 'usurped' makes the original link not appear at all.",
"example": "'dead' or 'live'",
"default": "'dead' if an Archive URL is entered",
"type": "string",
"autovalue": "live",
"suggested": true
},
"work": {
"aliases": [
"journal",
"magazine",
"periodical",
"newspaper",
"website"
],
"label": "Name of publication",
"description": "Name of the newspaper, magazine or periodical; displays after title",
"example": "[[The Wall Street Journal]]",
"type": "string",
"suggested": true
}
},
"maps": {
"proveit": {
"main": "title",
"textarea": [
"quote"
]
},
"citoid": {
"title": "title",
"url": "url",
"publisher": "publisher",
"publicationTitle": "work",
"date": "date",
"accessDate": "access-date",
"location": "location",
"ISSN": [
"issn"
],
"ISBN": [
"isbn"
],
"PMCID": "pmc",
"PMID": "pmid",
"pages": "pages",
"volume": "volume",
"issue": "issue",
"DOI": "doi",
"oclc": "oclc",
"language": "language",
"contributor": "others",
"author": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"editor": [
[
"editor-first",
"editor-last"
]
]
}
},
"format": "inline",
"paramOrder": [
"last",
"first",
"author-link",
"last2",
"first2",
"author-link2",
"last3",
"first3",
"author-link3",
"last4",
"first4",
"author-link4",
"last5",
"first5",
"author-link5",
"last6",
"first6",
"author-link6",
"last7",
"first7",
"author-link7",
"last8",
"first8",
"author-link8",
"last9",
"first9",
"author-link9",
"display-authors",
"author-mask",
"last-author-amp",
"author-name-separator",
"author-separator",
"others",
"date",
"month",
"year",
"orig-year",
"title",
"script-title",
"language",
"trans-title",
"edition",
"volume",
"page",
"pages",
"nopp",
"at",
"work",
"publisher",
"agency",
"issue",
"department",
"location",
"publication-place",
"publication-date",
"editor-last",
"editor-first",
"editor-link",
"type",
"format",
"url",
"url-status",
"url-access",
"access-date",
"archive-url",
"archive-date",
"arxiv",
"asin",
"asin-tld",
"bibcode",
"doi",
"doi-broken-date",
"isbn",
"issn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"id",
"quote",
"ref",
"postscript",
"registration",
"subscription",
"lay-url",
"lay-source",
"lay-date",
"via",
"bibcode-access",
"doi-access",
"hdl-access",
"jstor-access",
"ol-access",
"osti-access"
]
}
&lt;/templatedata&gt;
==See also==
{{Citation Style 1}}
{{Wikipedia referencing}}
{{UF-COinS}}
&lt;includeonly&gt;{{Sandbox other||
[[Category:Citation Style 1 templates|N]]
}}&lt;/includeonly&gt;</text>
<sha1>06o3awaw751y5ke0tsz91qfbsnbtzay</sha1>
</revision>
</page>
<page>
<title>Template:High-risk</title>
<ns>10</ns>
<id>11453893</id>
<redirect title="Template:High-use" />
<revision>
<id>948472462</id>
<parentid>866614961</parentid>
<timestamp>2020-04-01T06:12:35Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="117" xml:space="preserve">#REDIRECT [[Template:High-use]]
{{Rcat shell|
{{Wikidata redirect}}
{{R from merge}}
{{R from template shortcut}}
}}</text>
<sha1>5ypw8nzs5x9l9hs9og1m6vi8vbxlq11</sha1>
</revision>
</page>
<page>
<title>Template:Cite journal/doc</title>
<ns>10</ns>
<id>6966738</id>
<revision>
<id>989238339</id>
<parentid>989224255</parentid>
<timestamp>2020-11-17T20:58:41Z</timestamp>
<contributor>
<username>Tom.Reding</username>
<id>9784415</id>
</contributor>
<minor/>
<comment>lay-</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="54892" xml:space="preserve">&lt;noinclude&gt;{{pp-template}}{{pp-move-indef}}&lt;/noinclude&gt;
{{Documentation subpage}}
{{High-use}}
{{csdoc|lua|lua=yes}}
{{csdoc|cs1|lua=yes}}
{{csdoc|lead|academic and scientific papers published in bona fide journals. For articles in magazines and newsletters, use {{tlx|cite magazine}}. For academic and scientific papers not published in bona fide journals, please use one of the templates listed on this page in the "Citation Style 1 templates" box. If you have a [[digital object identifier]] (DOI) for the journal reference you wish to add, Wikipedia has a citation bot that will read that DOI and expand it into a full reference with the author's name, journal name, date, volume, issue, pages, etc. You can view instructions on how to add this gadget to your Wikipedia preferences at [[User:Citation bot/use]]|lua=yes}}
==Usage==
{{csdoc|usage}}
{{csdoc|usage common}}
; To cite a professional or scientific journal
: &lt;code&gt;&lt;nowiki&gt;{{cite journal |last1= |first1= |last2= |first2= |date= |title= |url= |journal= |volume= |issue= |pages= |doi= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
; [[Vancouver system]] author style for a scientific journal
: &lt;code&gt;&lt;nowiki&gt;{{cite journal |vauthors= |date= |title= |url= |journal= |volume= |issue= |pages= |doi= |pmc= |pmid= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
: or
: &lt;code&gt;&lt;nowiki&gt;{{cite journal |last1= |first1= |last2= |first2= |date= |title= |url= |journal= |volume= |issue= |pages= |doi= |pmc= |pmid= |access-date= | name-list-style=vanc}}&lt;/nowiki&gt;&lt;/code&gt;
; To cite a journal article with no credited author
: &lt;code&gt;&lt;nowiki&gt;{{cite journal |author=&lt;!--Staff writer(s); no by-line.--&gt; |date= |title= |url= |journal= |volume= |issue= |pages= |doi= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
;To cite an online article that has been archived
:&lt;code&gt;&lt;nowiki&gt;{{cite journal |last= |first= |date= |title= |url= |url-status= |journal= |volume= |issue= |pages= |doi= |archive-url= |archive-date= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
;To cite an article written in a foreign language
:&lt;code&gt;&lt;nowiki&gt;{{cite journal |last= |first= |date= |title= |trans-title= |url= |language= |journal= |volume= |issue= |pages= |doi= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
;To cite and quote an archived, two-author, foreign language journal article re-published as a PDF on an information aggregation service requiring a subscription
:&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1= |first1= |last2= |first2= |date= |title= |trans-title= |url= |access-date= |language= |journal= |volume= |issue= |pages= |doi= |archive-url= |archive-date= |url-status= |via= |quote=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{anchor|full horizontal}}{{csdoc|usage full}}
:&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1= |first1= |author-link1= |last2= |first2= |author-link2= |last3= |first3= |author-link3= |last4= |first4= |author-link4= |last5= |first5= |author-link5= |display-authors= |author-mask= |name-list-style= |name-list-style= |date= |year= |orig-year= |editor1-last= |editor1-first= |editor1-link= |editor2-last= |editor2-first= |editor2-link= |editor3-last= |editor3-first= |editor3-link= |editor4-last= |editor4-first= |editor4-link= |editor5-last= |editor5-first= |editor5-link= |display-editors= |others= |title= |script-title= |trans-title= |url= |access-date= |url-access= |format= |department= |journal= |type= |series= |language= |edition= |location= |publisher= |publication-place= |publication-date= |volume= |issue= |page= |pages= |at= |nopp= |arxiv= |asin= |bibcode= |bibcode-access= |biorxiv= |citeseerx= |doi= |doi-access= |doi-broken-date= |isbn= |issn= |jfm= |jstor= |jstor-access= |lccn= |mr= |oclc= |ol= |ol-access= |osti= |osti-access= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |archive-url= |archive-date= |url-status= |via= |lay-url= |lay-source= |lay-date= |quote= |postscript= |ref=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage vertical common}}
;To cite a professional or scientific journal
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last1 =
| first1 =
| last2 =
| first2 =
| date =
| title =
| url =
| journal =
| volume =
| issue =
| pages =
| doi =
| access-date =
}}
&lt;/pre&gt;
;[[Vancouver system]] author style for a scientific journal
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| vauthors =
| date =
| title =
| url =
| journal =
| volume =
| issue =
| pages =
| doi =
| pmc =
| pmid =
| access-date =
}}
&lt;/pre&gt;
or
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last1 =
| first1 =
| last2 =
| first2 =
| date =
| title =
| url =
| journal =
| volume =
| issue =
| pages =
| doi =
| pmc =
| pmid =
| access-date =
| name-list-style = vanc
}}
&lt;/pre&gt;
;To cite a journal article with no credited author
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| author = &lt;!--Staff writer(s); no by-line.--&gt;
| date =
| title =
| url =
| journal =
| volume =
| issue =
| pages =
| doi =
| access-date =
}}
&lt;/pre&gt;
;To cite an online article that has been archived
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last =
| first =
| date =
| title =
| url =
| url-status =
| journal =
| volume =
| issue =
| pages =
| doi =
| archive-url =
| archive-date=
| access-date =
}}
&lt;/pre&gt;
;To cite a journal article written in a foreign language
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last =
| first =
| date =
| title =
| trans-title =
| url =
| language =
| journal =
| volume =
| issue =
| pages =
| doi =
| access-date =
}}
&lt;/pre&gt;
;To cite and quote an archived, two-author, foreign language journal article re-published as a PDF on an information aggregation service requiring a subscription
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last1 =
| first1 =
| last2 =
| first2 =
| date =
| title =
| trans-title =
| url =
| url-status =
| format =
| language =
| journal =
| volume =
| issue =
| pages =
| doi =
| archive-url =
| archive-date =
| access-date =
| via =
| url-access =
| quote =
}}
&lt;/pre&gt;
{{end}}
{{anchor|full vertical}}{{csdoc|usage vertical}}
&lt;pre style="margin:0px; border:none;"&gt;
{{cite journal
| last1 =
| first1 =
| author-link1 =
| last2 =
| first2 =
| author-link2 =
| last3 =
| first3 =
| author-link3 =
| last4 =
| first4 =
| author-link4 =
| last5 =
| first5 =
| author-link5 =
| display-authors =
| author-mask =
| name-list-style =
| name-list-style =
| date =
| year =
| orig-year =
| editor1-last =
| editor1-first =
| editor1-link =
| editor2-last =
| editor2-first =
| editor2-link =
| editor3-last =
| editor3-first =
| editor3-link =
| editor4-last =
| editor4-first =
| editor4-link =
| editor5-last =
| editor5-first =
| editor5-link =
| display-editors =
| others =
| title =
| script-title =
| trans-title =
| url =
| url-status =
| format =
| url-access =
| department =
| journal =
| type =
| series =
| language =
| edition =
| location =
| publisher =
| publication-place =
| publication-date =
| volume =
| issue =
| page =
| pages =
| at =
| nopp =
| arxiv =
| asin =
| bibcode =
| biorxiv =
| citeseerx =
| doi =
| doi-broken-date =
| doi-access =
| isbn =
| issn =
| jfm =
| jstor =
| jstor-access =
| lccn =
| mr =
| oclc =
| ol =
| ol-access =
| osti =
| osti-access =
| pmc =
| pmid =
| rfc =
| ssrn =
| zbl =
| id =
| archive-url =
| archive-date =
| access-date =
| via =
| registration =
| subscription =
| lay-url =
| lay-source =
| lay-date =
| quote =
| postscript =
| ref =
}}
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none;"&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;last1
&amp;nbsp;
&amp;nbsp;last1
&amp;nbsp;last2
&amp;nbsp;
&amp;nbsp;last2
&amp;nbsp;last3
&amp;nbsp;
&amp;nbsp;last3
&amp;nbsp;last4
&amp;nbsp;
&amp;nbsp;last4
&amp;nbsp;last5
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;editor1-last
&amp;nbsp;editor2-last
&amp;nbsp;
&amp;nbsp;editor2-last
&amp;nbsp;editor3-last
&amp;nbsp;
&amp;nbsp;editor3-last
&amp;nbsp;editor4-last
&amp;nbsp;
&amp;nbsp;editor4-last
&amp;nbsp;editor5-last
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;title or script-title
&amp;nbsp;archive-url
&amp;nbsp;url
&amp;nbsp;url
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;doi
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;jstor
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;ol
&amp;nbsp;
&amp;nbsp;osti
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;url
&amp;nbsp;archive-url
&amp;nbsp;url
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical mid}}
&lt;pre style="margin:0px; border:none;"&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;/pre&gt;
{{csdoc|usage vertical end}}
==Examples==
;Journal article
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Overpeck |first1=J. T. |last2=Webb |first2=T. |last3=Prentice |first3=I. C. |date=January 1985 |title=Quantitative interpretation of fossil pollen spectra: Dissimilarity coefficients and the method of modern analogs |journal=Quaternary Research |volume=23 |pages=87–108 |bibcode=1985QuRes..23...87O |doi=10.1016/0033-5894(85)90074-2}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Overpeck |first1=J. T. |last2=Webb |first2=T. |last3=Prentice |first3=I. C. |date=January 1985 |title=Quantitative interpretation of fossil pollen spectra: Dissimilarity coefficients and the method of modern analogs |journal=Quaternary Research |volume=23 |pages=87–108 |doi=10.1016/0033-5894(85)90074-2|bibcode=1985QuRes..23...87O}}
;Vancouver style (common in biomedicine); see {{vcite}} for specific templates
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |vauthors=Bannen R, Suresh V, Phillips GN Jr, Wright S, Mitchell J |date=2008 |title=Optimal design of thermally stable proteins |url=http://bioinformatics.oxfordjournals.org/cgi/content/full/24/20/2339 |journal=Bioinformatics |volume=24 |issue=20 |pages=2339–2343 |doi=10.1093/bioinformatics/btn450 |pmc=2562006 |pmid=18723523}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
*{{cite journal |vauthors=Bannen R, Suresh V, Phillips GN Jr, Wright S, Mitchell J |date=2008 |title=Optimal design of thermally stable proteins |url=http://bioinformatics.oxfordjournals.org/cgi/content/full/24/20/2339 |journal=Bioinformatics |volume=24 |issue=20 |pages=2339–2343 |doi=10.1093/bioinformatics/btn450 &lt;!--|doi-access=free --&gt; |pmc=2562006 |pmid=18723523}}
or
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Bannen |first1=RM |last2=Suresh |first2=V |last3=Phillips |first3=GN Jr |last4=Wright |first4=SJ |last5=Mitchell |first5=JC |date=2008 |title=Optimal design of thermally stable proteins |url=http://bioinformatics.oxfordjournals.org/cgi/content/full/24/20/2339 |journal=Bioinformatics |volume=24 |issue=20 |pages=2339–2343 |doi=10.1093/bioinformatics/btn450 |pmc=2562006 |pmid=18723523 |name-list-style=vanc}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Bannen |first1=RM |last2=Suresh |first2=V |last3=Phillips |first3=GN Jr |last4=Wright |first4=SJ |last5=Mitchell |first5=JC |date=2008 |title=Optimal design of thermally stable proteins |url=http://bioinformatics.oxfordjournals.org/cgi/content/full/24/20/2339 |journal=Bioinformatics |volume=24 |issue=20 |pages=2339–2343 |doi=10.1093/bioinformatics/btn450 &lt;!--|doi-access=free --&gt; |pmc=2562006 |pmid=18723523 |name-list-style=vanc}}
;Include URL link to article, pre-print, or abstract.
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Aries |first1=Myriam B. C. |last2=Newsham |first2=Guy R. |name-list-style=amp |date=2008 |title=Effect of daylight saving time on lighting energy use: a literature review |url=http://archive.nrc-cnrc.gc.ca/obj/irc/doc/pubs/nrcc49212/nrcc49212.pdf |journal=Energy Policy |volume=36 |issue=6 |pages=1858–1866 |doi=10.1016/j.enpol.2007.05.021 |access-date=October 18, 2013}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Aries |first1=Myriam B. C. |last2=Newsham |first2=Guy R. |name-list-style=amp |date=2008 |title=Effect of daylight saving time on lighting energy use: a literature review |url=http://archive.nrc-cnrc.gc.ca/obj/irc/doc/pubs/nrcc49212/nrcc49212.pdf |journal=Energy Policy |volume=36 |issue=6 |pages=1858–1866 |doi=10.1016/j.enpol.2007.05.021 |access-date=October 18, 2013}}
If the linked document is PDF, but the [[filename extension|extension]] is not .pdf or .PDF, you may add the parameter {{para|format|PDF}}, which displays " (PDF)" after the link.
;Specify the [[digital object identifier|DOI]] to provide a permanent link, and an URL where the article is free. For medical articles also give the [[PMID]] and [[PubMed Central]] (PMC) ID: the PMC value will link the free full-text repository and will link the title if the URL is not specified. {{para|access-date}} is not necessary when a permanent identifier is used.
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |url=http://www.jci.org/articles/view/16567 |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 |pmc=151837 |pmid=12511592 |access-date=2012-11-17}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |url=http://www.jci.org/articles/view/16567 |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 &lt;!--|doi-access=free --&gt; |pmc=151837 |pmid=12511592 |access-date=2012-11-17}}
Whereas if the URL had not been specified, then the title is linked to the PMC link, which is repeated:
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 |pmc=151837 |pmid=12511592}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 &lt;!--|doi-access=free --&gt; |pmc=151837 |pmid=12511592}}
If the doi link is broken, then use of '''doi-broken-date''' unlinks the doi value, indicates when the doi-problem was first noticed, and will also add the page to "Category:Pages with DOIs inactive as of YYYY" (tracking category [[:Category:Pages with inactive DOIs]]):
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 |doi-broken-date=2019-01-01 |pmc=151837 |pmid=12511592}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last1=Viollet |first1=Benoît |last2=Andreelli |first2=Fabrizio |last3=Jørgensen |first3=Sebastian B. |last4=Perrin |first4=Christophe |last5=Geloen |first5=Alain |last6=Flamez |first6=Daisy |last7=Mu |first7=James |last8=Lenzner |first8=Claudia |last9=Baud |first9=Olivier |last10=Bennoun |first10=Myriam |last11=Gomas |first11=Emmanuel |last12=Nicolas |first12=Gaël |last13=Wojtaszewski |first13=Jørgen F. P. |last14=Kahn1 |first14=Axel |last15=Carling |first15=David |last16=Schuit |first16=Frans C. |last17=Birnbaum |first17=Morris J. |last18=Richter |first18=Erik A. |last19=Burcelin |first19=Rémy |last20=Vaulont |first20=Sophie |display-authors=5 |date=January 2003 |title=The AMP-activated protein kinase α2 catalytic subunit controls whole-body insulin sensitivity |journal=The Journal of Clinical Investigation |volume=111 |issue=1 |pages=91–98 |doi=10.1172/JCI16567 |doi-broken-date=2019-01-01 |pmc=151837 |pmid=12511592 |no-tracking=yes}}
;If the article is in a foreign language, and the original title is unknown, enclose the translated title in square brackets and use {{para|title}}. Otherwise use {{para|title}} for the foreign-language title and {{para|trans-title}} for the English-language title.
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last1=Huang |first1=Y. |last2=Lu |first2=J. |last3=Shen |first3=Y. |last4=Lu |first4=J. |name-list-style=amp |date=March 1999 |title=[The protective effects of total flavonoids from Lycium Barbarum L. on lipid peroxidation of liver mitochondria and red blood cell in rats] |journal=Wei Sheng Yan Jiu |language=Chinese |volume=28 |issue=2 |pages=115–116 |pmid=11938998}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
:{{cite journal |last1=Huang |first1=Y. |last2=Lu |first2=J. |last3=Shen |first3=Y. |last4=Lu |first4=J. |name-list-style=amp |date=March 1999 |title=[The protective effects of total flavonoids from Lycium Barbarum L. on lipid peroxidation of liver mitochondria and red blood cell in rats] |journal=Wei Sheng Yan Jiu |language=Chinese |volume=28 |issue=2 |pages=115–116 |pmid=11938998}}
;Example using other identifiers
*&lt;code&gt;&lt;nowiki&gt;{{cite journal |last=Merimovich |first=C. |date=2007 |title=A power function with a fixed finite gap everywhere |journal=Journal of Symbolic Logic |volume=72 |issue=2 |pages=361–417 |doi=10.2178/jsl/1185803615 |mr=2320282}}&lt;/nowiki&gt;&lt;/code&gt;
Displays as:
* {{cite journal |last=Merimovich |first=C. |date=2007 |title=A power function with a fixed finite gap everywhere |journal=Journal of Symbolic Logic |volume=72 |issue=2 |pages=361–417 |doi=10.2178/jsl/1185803615 |mr=2320282}}
==Parameters==
===Syntax===
{{csdoc|syntax}}
{{csdoc|sep_period}}
===COinS===
{{csdoc|coins}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated}}
===Description===
====Authors====
{{csdoc|author|others=yes}}
====Date====
{{csdoc|date}}
====Editors====
{{csdoc|editor}}
====Title====
{{csdoc|title|title_format=quotes}}
{{csdoc|type}}
{{csdoc|language}}
===={{Anchor|url}}URL====
{{csdoc|url|pmc=yes}}
====Periodical====
{{csdoc|journal|department=yes}}
====Publisher====
{{csdoc|publisher}}
====Edition, series, volume====
{{csdoc|edition}}
{{csdoc|series}}
{{csdoc|volume}}
====In-source locations====
{{csdoc|pages|work=y|journal=y}}
====Identifiers====
{{csdoc|id1}}
{{csdoc|id2}}
====Subscription or registration required====
{{csdoc|registration}}
====Lay summary====
{{anchor|Laysummary}}{{csdoc|lay}}
====Quote====
{{csdoc|quote}}
====Anchor====
{{csdoc|ref}}
====Display options====
{{csdoc|display}}
==Notes==
Although it may appear redundant to include multiple ids for articles, it is helpful for many editors who only have access to a certain resource. If only one ID is to be included, the DOI should be used, as this is the universal standard preferred by professional publications. Specifying a link as a DOI, PMID, etc. is always preferable to including it as a URL parameter, as it makes it clear that the link is accurate and stable, but not necessarily openly accessible. {{para|access-date}} is not necessary when a permanent identifier is used.
==TemplateData==
{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "This template formats a citation to an article in a magazine or journal, using the provided source information (e.g. journal name, author, title, issue, URL) and various formatting options.",
"params": {
"url": {
"label": "URL",
"description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the &amp;nbsp;protocol relative scheme \"//...\"",
"type": "line",
"aliases": [
"URL"
],
"suggested": true,
"example": "https://www.nytimes.com/..."
},
"title": {
"label": "Title",
"description": "The title of the article; can be wikilinked to an existing Wikipedia article or url may be used to add an external link, but not both. Displays in quotes.",
"type": "content",
"required": true
},
"last": {
"label": "Last name",
"description": "The surname of the author; don't wikilink, use 'author-link'; can suffix with a numeral to add additional authors",
"aliases": [
"author",
"author1",
"authors",
"last1"
],
"type": "line",
"suggested": true
},
"first": {
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'author-link'; can suffix with a numeral to add additional authors",
"aliases": [
"first1"
],
"type": "line",
"suggested": true
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'author-link2'.",
"aliases": [
"author2"
],
"type": "line"
},
"first2": {
"label": "First name 2",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink.",
"type": "line"
},
"date": {
"label": "Source date",
"description": "Date of the source; do not wikilink. As listed in the publication",
"type": "date",
"suggested": true
},
"journal": {
"label": "Journal",
"description": "Name of the source journal; may be wikilinked; displays in italics; alias of 'work'",
"type": "content",
"required": true,
"example": "[[American Journal of Sociology]]"
},
"publisher": {
"label": "Publisher",
"description": "Name of the publisher; displays after title",
"type": "content",
"example": "[[University of Chicago Press]]"
},
"issue": {
"label": "Issue",
"description": "Issue identifier when the source is part of a series that is published periodically",
"type": "line"
},
"doi": {
"label": "DOI",
"description": "Digital Object Identifier; begins with '10.'",
"type": "string"
},
"doi-broken-date": {
"label": "DOI broken date",
"description": "The date that the DOI was determined to be broken",
"type": "date"
},
"others": {
"label": "Others",
"description": "Used to record other contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'",
"type": "content"
},
"year": {
"label": "Year of publication",
"description": "Year of the source being referenced; recommended only when date parameter format is YYYY-MM-DD and a CITEREF disambiguator is needed",
"type": "number"
},
"orig-year": {
"label": "Original year",
"description": "Original year of publication; provide specifics",
"type": "number",
"aliases": [
"origyear"
]
},
"editor-last": {
"label": "Editor last name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-last', 'editor'",
"aliases": [
"editor1-last"
],
"type": "line"
},
"editor-first": {
"label": "Editor first name",
"description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-first'",
"aliases": [
"editor1-first"
],
"type": "line"
},
"editor-link": {
"label": "Editor link",
"description": "Title of existing Wikipedia article about the editor; can suffix with a numeral to add additional editors; alias of 'editor1-link'",
"type": "wiki-page-name"
},
"series": {
"label": "Series",
"description": "Series identifier when the source is part of a series, such as a book series or a journal; alias of 'version'",
"type": "content",
"aliases": [
"version"
]
},
"department": {
"label": "Department",
"description": "Department within the periodical",
"type": "string"
},
"location": {
"label": "Location of publication",
"description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place; alias of 'place'",
"type": "string"
},
"publication-place": {
"label": "Place of publication",
"description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'",
"type": "content"
},
"publication-date": {
"label": "Publication date",
"description": "Date of publication when different from the date the work was written; do not wikilink",
"type": "date"
},
"edition": {
"label": "Edition",
"description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed with ' ed.'",
"type": "line"
},
"volume": {
"label": "Volume",
"description": "For one publication published in several volumes",
"type": "line",
"suggested": true
},
"page": {
"label": "Page",
"description": "Page in the source that supports the content; displays after 'p.'",
"type": "line"
},
"pages": {
"label": "Pages",
"description": "Pages in the source that support the content (not an indication of the number of pages in the source; displays after 'pp.'",
"type": "line",
"suggested": true
},
"nopp": {
"label": "No pp",
"description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')",
"type": "line"
},
"at": {
"label": "At",
"description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient",
"type": "line"
},
"language": {
"label": "Language",
"description": "The language in which the source is written, if not English; use the full language name; do not use icons or templates",
"type": "content"
},
"script-title": {
"label": "Script title",
"description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...",
"type": "line"
},
"trans-title": {
"label": "Translated title",
"description": "An English language title, if the source cited is in a foreign language; 'language' is recommended",
"type": "content"
},
"type": {
"label": "Type",
"description": "Additional information about the media type of the source; format in sentence case",
"type": "content"
},
"format": {
"label": "Format",
"description": "Format of the work referred to by 'url' ('url' is required when using 'format'); examples: PDF, DOC, XLS; do not specify HTML",
"type": "content"
},
"arxiv": {
"label": "arXiv identifier",
"description": "An identifier for arXive electronic preprints of scientific papers",
"type": "line"
},
"asin": {
"label": "ASIN",
"description": "Amazon Standard Identification Number; 10 characters",
"type": "line"
},
"asin-tld": {
"label": "ASIN TLD",
"description": "ASIN top-level domain for Amazon sites other than the US",
"type": "line"
},
"bibcode": {
"label": "Bibcode",
"description": "Bibliographic Reference Code (REFCODE); 19 characters",
"type": "line"
},
"biorxiv": {
"label": "biorXiv",
"description": "biorXiv identifier; 6 digits",
"type": "line"
},
"citeseerx": {
"label": "CiteSeerX",
"description": "CiteSeerX identifier; found after the 'doi=' query parameter",
"type": "line"
},
"isbn": {
"label": "ISBN",
"description": "International Standard Book Number; use the 13-digit ISBN where possible",
"type": "line"
},
"issn": {
"label": "ISSN",
"description": "International Standard Serial Number (print); 8 characters; usually split into two groups of four using a hyphen",
"type": "line"
},
"eissn": {
"label": "eISSN",
"description": "International Standard Serial Number (online); 8 characters; usually split into two groups of four using a hyphen",
"type": "line"
},
"jfm": {
"label": "jfm code",
"description": "Jahrbuch über die Fortschritte der Mathematik classification code",
"type": "line"
},
"jstor": {
"label": "JSTOR",
"description": "JSTOR identifier",
"type": "line"
},
"lccn": {
"label": "LCCN",
"description": "Library of Congress Control Number",
"type": "line"
},
"mr": {
"label": "MR",
"description": "Mathematical Reviews identifier",
"type": "line"
},
"oclc": {
"label": "OCLC",
"description": "Online Computer Library Center number",
"type": "number"
},
"ol": {
"label": "OL",
"description": "Open Library identifier",
"type": "line"
},
"osti": {
"label": "OSTI",
"description": "Office of Scientific and Technical Information identifier",
"type": "line"
},
"pmc": {
"label": "PMC",
"description": "PubMed Center article number",
"type": "number"
},
"pmid": {
"label": "PMID",
"description": "PubMed Unique Identifier",
"type": "line"
},
"rfc": {
"label": "RFC",
"description": "Request for Comments number",
"type": "number"
},
"ssrn": {
"label": "SSRN",
"description": "Social Science Research Network",
"type": "line"
},
"zbl": {
"label": "Zbl",
"description": "Zentralblatt MATH journal identifier",
"type": "line"
},
"id": {
"label": "id",
"description": "A unique identifier used where none of the specialized ones are applicable",
"type": "line"
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source; displays last, enclosed in quotes; must include terminating punctuation",
"type": "content"
},
"ref": {
"label": "Ref",
"description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates",
"type": "line"
},
"separator": {
"label": "Separator",
"description": "The punctuation used to separate lists of authors, editors, etc.; a space must be encoded as &amp;#32; to suppress use reserved keyword 'none'",
"type": "line",
"default": "."
},
"postscript": {
"label": "Postscript",
"description": "The closing punctuation for the citation; ignored if 'quote' is defined; to suppress use reserved keyword 'none'",
"type": "line",
"default": "."
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'author-link3'.",
"aliases": [
"author3"
],
"type": "line"
},
"first3": {
"label": "First name 3",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink.",
"type": "line"
},
"last4": {
"label": "Last name 4",
"description": "The surname of the forth author; don't wikilink, use 'author-link4'.",
"aliases": [
"author4"
],
"type": "line"
},
"first4": {
"label": "First name 4",
"description": "Given or first name, middle names, or initials of the forth author; don't wikilink.",
"type": "line"
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'author-link5'.",
"aliases": [
"author5"
],
"type": "line"
},
"first5": {
"label": "First name 5",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink.",
"type": "line"
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'author-link6'.",
"aliases": [
"author6"
],
"type": "line"
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.",
"type": "line"
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'author-link7'.",
"aliases": [
"author7"
],
"type": "line"
},
"first7": {
"label": "First name 7",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink.",
"type": "line"
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'author-link8'.",
"aliases": [
"author8"
],
"type": "line"
},
"first8": {
"label": "First name 8",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink.",
"type": "line"
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'author-link9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"aliases": [
"author9"
],
"type": "line"
},
"first9": {
"label": "First name 9",
"description": "Given or first name, middle names, or initials of the ninth author; don't wikilink.",
"type": "line"
},
"last10": {
"label": "Last name 10",
"description": "The surname of the tenth author; don't wikilink, use 'author-link9'. If ten authors are defined, then only eight will show and 'et al.' will show in place of the last two authors.",
"aliases": [
"author10"
],
"type": "line"
},
"first10": {
"label": "First name 10",
"description": "Given or first name, middle names, or initials of the tenth author; don't wikilink.",
"type": "line"
},
"last11": {
"label": "Last name 11",
"description": "The surname of the 11th author; don't wikilink, use 'author-link9'. If more than nine authors are defined, then only eight will show and 'et al.' will show in place of the remaining authors.",
"aliases": [
"author11"
],
"type": "line"
},
"first11": {
"label": "First name 11",
"description": "Given or first name, middle names, or initials of the 11th author; don't wikilink.",
"type": "line"
},
"editor2-last": {
"label": "Editor last name 2",
"description": "The surname of the second editor; don't wikilink, use 'editor2-link'.",
"aliases": [
"editor2"
],
"type": "line"
},
"editor2-first": {
"label": "Editor first name 2",
"description": "Given or first name, middle names, or initials of the second editor; don't wikilink.",
"type": "line"
},
"editor3-last": {
"label": "Editor last name 3",
"description": "The surname of the third editor; don't wikilink, use 'editor3-link'.",
"aliases": [
"editor3"
],
"type": "line"
},
"editor3-first": {
"label": "Editor first name 3",
"description": "Given or first name, middle names, or initials of the third editor; don't wikilink.",
"type": "line"
},
"editor4-last": {
"label": "Editor last name 4",
"description": "The surname of the fourth editor; don't wikilink, use 'editor4-link'.",
"aliases": [
"editor4"
],
"type": "line"
},
"editor4-first": {
"label": "Editor first name 4",
"description": "Given or first name, middle names, or initials of the fourth editor; don't wikilink.",
"type": "line"
},
"editor5-last": {
"label": "Editor last name 5",
"description": "The surname of the fifth editor; don't wikilink, use 'editor5-link'.",
"aliases": [
"editor5"
],
"type": "line"
},
"editor5-first": {
"label": "Editor first name 5",
"description": "Given or first name, middle names, or initials of the fifth editor; don't wikilink.",
"type": "line"
},
"editor6-last": {
"label": "Editor last name 6",
"description": "The surname of the sixth editor; don't wikilink, use 'editor6-link'.",
"aliases": [
"editor6"
],
"type": "line"
},
"editor6-first": {
"label": "Editor first name 6",
"description": "Given or first name, middle names, or initials of the sixth editor; don't wikilink.",
"type": "line"
},
"editor7-last": {
"label": "Editor last name 7",
"description": "The surname of the seventh editor; don't wikilink, use 'editor7-link'.",
"aliases": [
"editor7"
],
"type": "line"
},
"editor7-first": {
"label": "Editor first name 7",
"description": "Given or first name, middle names, or initials of the seventh editor; don't wikilink.",
"type": "line"
},
"editor8-last": {
"label": "Editor last name 8",
"description": "The surname of the eighth editor; don't wikilink, use 'editor8-link'.",
"aliases": [
"editor8"
],
"type": "line"
},
"editor8-first": {
"label": "Editor first name 8",
"description": "Given or first name, middle names, or initials of the eighth editor; don't wikilink.",
"type": "line"
},
"editor9-last": {
"label": "Editor last name 9",
"description": "The surname of the ninth editor; don't wikilink, use 'editor9-link'.",
"aliases": [
"editor9"
],
"type": "line"
},
"editor9-first": {
"label": "Editor first name 9",
"description": "Given or first name, middle names, or initials of the ninth editor; don't wikilink.",
"type": "line"
},
"author-mask": {
"label": "Author mask",
"description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string"
},
"author-name-separator": {
"label": "Author name separator",
"description": "Changes the separator between last and first names; defaults to a comma and space; a space must be encoded as &amp;#32;",
"type": "line",
"default": ", "
},
"author-separator": {
"label": "Author separator",
"description": "Changes the separator between authors; defaults to a semicolon and space; a space must be encoded as &amp;#32;",
"type": "line",
"default": "; "
},
"subscription": {
"label": "Subscription",
"description": "If the reference requires a subscription, type 'yes' to notify the reader.",
"type": "string"
},
"author-link": {
"label": "Author link",
"description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink"
]
},
"author-link2": {
"label": "Author link 2",
"description": "Title of existing Wikipedia article about the second author.",
"type": "wiki-page-name",
"aliases": [
"author2-link",
"authorlink2"
]
},
"access-date": {
"label": "URL access date",
"description": "The full date when the original URL was accessed; do not wikilink",
"type": "date",
"aliases": [
"accessdate"
]
},
"archive-url": {
"label": "Archive URL",
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archivedate'",
"type": "line",
"aliases": [
"archiveurl"
]
},
"archive-date": {
"label": "Archive date",
"description": "Date when the original URL was archived; do not wikilink",
"type": "date",
"aliases": [
"archivedate"
]
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays with the URL linked; if set to 'dead', the title displays with the archive URL linked",
"type": "line"
},
"lay-url": {
"label": "Lay summary URL",
"description": "URL link to a non-technical summary or review of the source; alias of 'laysummary'",
"type": "line",
"aliases": [
"layurl",
"laysummary"
]
},
"lay-source": {
"label": "Lay source",
"description": "Name of the source of the laysummary; displays in italics, preceded by an en dash",
"type": "string",
"aliases": [
"laysource"
]
},
"lay-date": {
"label": "Lay date",
"description": "Date of the summary; displays in parentheses",
"type": "date",
"aliases": [
"laydate"
]
},
"author-link3": {
"label": "Author link 3",
"description": "Title of existing Wikipedia article about the third author.",
"type": "wiki-page-name",
"aliases": [
"author3-link",
"authorlink3"
]
},
"author-link4": {
"label": "Author link 4",
"description": "Title of existing Wikipedia article about the forth author.",
"type": "wiki-page-name",
"aliases": [
"author4-link",
"authorlink4"
]
},
"author-link5": {
"label": "Author link 5",
"description": "Title of existing Wikipedia article about the fifth author.",
"type": "wiki-page-name",
"aliases": [
"author5-link",
"authorlink5"
]
},
"author-link6": {
"label": "Author link 6",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"author6-link",
"authorlink6"
]
},
"author-link7": {
"label": "Author link 7",
"description": "Title of existing Wikipedia article about the seventh author.",
"type": "wiki-page-name",
"aliases": [
"author7-link",
"authorlink7"
]
},
"author-link8": {
"label": "Author link 8",
"description": "Title of existing Wikipedia article about the eighth author.",
"type": "wiki-page-name",
"aliases": [
"author8-link",
"authorlink8"
]
},
"author-link9": {
"label": "Author link 9",
"description": "Title of existing Wikipedia article about the ninth author.",
"type": "wiki-page-name",
"aliases": [
"author9-link",
"authorlink9"
]
},
"editor2-link": {
"label": "Editor link 2",
"description": "Title of existing Wikipedia article about the second editor.",
"type": "wiki-page-name",
"aliases": [
"editor2link",
"editorlink2"
]
},
"editor3-link": {
"label": "Editor link 3",
"description": "Title of existing Wikipedia article about the third editor.",
"type": "wiki-page-name",
"aliases": [
"editor3link",
"editorlink3"
]
},
"editor4-link": {
"label": "Editor link 4",
"description": "Title of existing Wikipedia article about the fourth editor.",
"type": "wiki-page-name",
"aliases": [
"editor4link",
"editorlink4"
]
},
"editor5-link": {
"label": "Editor link 5",
"description": "Title of existing Wikipedia article about the fifth editor.",
"type": "wiki-page-name",
"aliases": [
"editor5link",
"editorlink5"
]
},
"editor6-link": {
"label": "Editor link 6",
"description": "Title of existing Wikipedia article about the sixth editor.",
"type": "wiki-page-name",
"aliases": [
"editor6link",
"editorlink6"
]
},
"editor7-link": {
"label": "Editor link 7",
"description": "Title of existing Wikipedia article about the seventh editor.",
"type": "wiki-page-name",
"aliases": [
"editor7link",
"editorlink7"
]
},
"editor8-link": {
"label": "Editor link 8",
"description": "Title of existing Wikipedia article about the eighth editor.",
"type": "wiki-page-name",
"aliases": [
"editor8link",
"editorlink8"
]
},
"editor9-link": {
"label": "Editor link 9",
"description": "Title of existing Wikipedia article about the ninth editor.",
"type": "wiki-page-name",
"aliases": [
"editor9link",
"editorlink9"
]
},
"last-author-amp": {
"label": "Last author ampersand",
"description": "When set to any value, changes the separator between the last two names of the author list to 'space ampersand space'",
"type": "boolean",
"aliases": [
"lastauthoramp"
]
},
"registration": {
"label": "Registration",
"description": "If the reference requires registration, type 'yes' to notify the reader.",
"type": "string"
},
"chapter": {
"label": "Chapter",
"description": "The chapter heading of the source",
"type": "string"
},
"via": {
"label": "Content deliverer (i.e. Database)",
"description": "Provider of the article (not the publisher), usually an aggregator of journal articles or a repository",
"example": "JSTOR, Project MUSE, Elsevier Science Direct",
"type": "string",
"suggested": true
},
"url-access": {
"label": "URL access level",
"description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')",
"type": "string"
},
"bibcode-access": {
"label": "Bibcode access level",
"description": "If the full text is available from ADS via this Bibcode, type 'free'.",
"type": "string"
},
"doi-access": {
"label": "DOI access level",
"description": "If the full text is free to read via the DOI, type 'free'.",
"type": "string"
},
"hdl-access": {
"label": "HDL access level",
"description": "If the full text is free to read via the HDL, type 'free'.",
"type": "string"
},
"jstor-access": {
"label": "Jstor access level",
"description": "If the full text is free to read on Jstor, type 'free'.",
"type": "string"
},
"ol-access": {
"label": "OpenLibrary access level",
"description": "If the full text is free to read on OpenLibrary, type 'free'.",
"type": "string"
},
"osti-access": {
"label": "HDL access level",
"description": "If the full text is free to read on OSTI, type 'free'.",
"type": "string"
},
"vauthors": {
"label": "Vancouver style authors",
"description": "comma-separated list of author names in Vancouver style; enclose corporate or institutional author names in doubled parentheses",
"type": "line"
},
"display-authors": {
"aliases": [
"displayauthors"
],
"label": "Display authors",
"description": "number of authors to display before 'et al.' is used;",
"type": "number"
}
},
"paramOrder": [
"last",
"first",
"author-link",
"last2",
"first2",
"author-link2",
"last3",
"first3",
"author-link3",
"last4",
"first4",
"author-link4",
"last5",
"first5",
"author-link5",
"last6",
"first6",
"author-link6",
"last7",
"first7",
"author-link7",
"last8",
"first8",
"author-link8",
"last9",
"first9",
"author-link9",
"last10",
"first10",
"last11",
"first11",
"display-authors",
"author-mask",
"last-author-amp",
"author-separator",
"author-name-separator",
"vauthors",
"date",
"year",
"orig-year",
"editor-last",
"editor-first",
"editor-link",
"editor2-last",
"editor2-first",
"editor2-link",
"editor3-last",
"editor3-first",
"editor3-link",
"editor4-last",
"editor4-first",
"editor4-link",
"editor5-last",
"editor5-first",
"editor5-link",
"editor6-last",
"editor6-first",
"editor6-link",
"editor7-last",
"editor7-first",
"editor7-link",
"editor8-last",
"editor8-first",
"editor8-link",
"editor9-last",
"editor9-first",
"editor9-link",
"others",
"title",
"script-title",
"trans-title",
"url",
"url-status",
"format",
"department",
"journal",
"chapter",
"type",
"series",
"language",
"edition",
"location",
"publisher",
"publication-place",
"publication-date",
"volume",
"issue",
"page",
"pages",
"at",
"nopp",
"arxiv",
"asin",
"asin-tld",
"bibcode",
"biorxiv",
"citeseerx",
"doi",
"doi-broken-date",
"isbn",
"issn",
"eissn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"id",
"url-access",
"archive-url",
"archive-date",
"access-date",
"registration",
"subscription",
"lay-url",
"lay-source",
"lay-date",
"quote",
"postscript",
"ref",
"separator",
"via",
"bibcode-access",
"doi-access",
"hdl-access",
"jstor-access",
"ol-access",
"osti-access"
],
"maps": {
"citoid": {
"title": "title",
"url": "url",
"publisher": "publisher",
"publicationTitle": "journal",
"proceedingsTitle": "journal",
"encyclopediaTitle": "journal",
"dictionaryTitle": "journal",
"date": "date",
"place": "location",
"ISSN": [
"issn"
],
"ISBN": [
"isbn"
],
"PMCID": "pmc",
"PMID": "pmid",
"pages": "pages",
"volume": "volume",
"series": "series",
"seriesNumber": "volume",
"issue": "issue",
"DOI": "doi",
"oclc": "oclc",
"language": "language",
"contributor": "others",
"author": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
],
[
"first10",
"last10"
],
[
"first11",
"last11"
]
],
"editor": [
[
"editor-first",
"editor-last"
],
[
"editor2-first",
"editor2-last"
],
[
"editor3-first",
"editor3-last"
],
[
"editor4-first",
"editor4-last"
],
[
"editor5-first",
"editor5-last"
],
[
"editor6-first",
"editor6-last"
],
[
"editor7-first",
"editor7-last"
],
[
"editor8-first",
"editor8-last"
],
[
"editor9-first",
"editor9-last"
]
]
}
},
"format": "inline"
}
&lt;/templatedata&gt;
==See also==
* [https://tools.wmflabs.org/citation-template-filling/cgi-bin/index.cgi Citation-template-filling tool], can be used for [[DrugBank]], [[HGNC]], [[ISBN]], [[PubMed]], and [[PubChem]]
{{Citation Style 1}}
{{Wikipedia referencing}}
{{UF-COinS}}
&lt;includeonly&gt;{{Sandbox other||
[[Category:Citation Style 1 templates|J]]
}}&lt;/includeonly&gt;</text>
<sha1>2ql51z7lesq73ey68pech6oz83i03b7</sha1>
</revision>
</page>
<page>
<title>Template:Vcite</title>
<ns>10</ns>
<id>34325749</id>
<revision>
<id>475493179</id>
<parentid>470427892</parentid>
<timestamp>2012-02-07T00:55:10Z</timestamp>
<contributor>
<username>Paine Ellsworth</username>
<id>9092818</id>
</contributor>
<comment>add cat</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="130" xml:space="preserve">[[Help:Citation Style Vancouver|Citation Style Vancouver]]&lt;noinclude&gt;
[[Category:Documentation assistance templates]]
&lt;/noinclude&gt;</text>
<sha1>8k5vq2ej0f7rixlmx4qm9bzd1k3c9wp</sha1>
</revision>
</page>
<page>
<title>Template:'</title>
<ns>10</ns>
<id>5593936</id>
<revision>
<id>700770577</id>
<parentid>694728302</parentid>
<timestamp>2016-01-20T14:48:54Z</timestamp>
<contributor>
<username>Huntster</username>
<id>92632</id>
</contributor>
<comment>Change per talk page discussion. If there are any issues found, contact me or another admin to revert.</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="177" xml:space="preserve">&lt;span class="nowrap" style="padding-left:0.1em;"&gt;&amp;#39;&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>ey7sacklsawhwpz5k5ytshi6df53r90</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/chapter</title>
<ns>10</ns>
<id>34353500</id>
<revision>
<id>982632745</id>
<parentid>982630278</parentid>
<timestamp>2020-10-09T10:39:28Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<minor/>
<comment>ce;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1637" xml:space="preserve">* '''{{#switch:{{{title_title}}}
| booktitle = booktitle
| #default = chapter}}''': The chapter heading of the source. May be wikilinked or may use '''chapter-url''', but not both. {{#switch:{{BASEPAGENAME}}
|Cite journal
|Cite web
|Cite news
|Cite press release
|Cite conference
|Cite podcast = Not displayed even if set
|#default = Displays in quotes}}.
** '''script-chapter''': Chapter heading for languages that do not use a Latin-based script (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, etc); follows [[WP:ROMAN|Romanization]] defined in '''chapter'''. Must be prefixed with one of the [[Help:Citation_Style_1#{{pipe}}script-&amp;lt;param&gt;{{=}} language codes|supported language codes]] to help browsers properly display the script:
**:&lt;code&gt;&lt;nowiki&gt;... |chapter=Tōkyō tawā |script-chapter=ja:東京タワー |trans-chapter=Tokyo Tower ...&lt;/nowiki&gt;&lt;/code&gt;
** '''trans-chapter''': English translation of the chapter heading, if the source cited is in a foreign language. Displays in square brackets after the '''{{#switch:{{{title_title}}}
| booktitle = booktitle
| #default = chapter}}''' field; if '''chapter-url''' is defined, then '''trans-chapter''' is included in the link. Use of the '''language''' parameter is recommended.
* '''contribution''': A separately-authored part of '''author'''{{'}}s book. May be wikilinked or may use '''contribution-url''', but not both. Values of &lt;code&gt;Afterword&lt;/code&gt;, &lt;code&gt;Foreword&lt;/code&gt;, &lt;code&gt;Introduction&lt;/code&gt;, or &lt;code&gt;Preface&lt;/code&gt; will display unquoted; any other value will display in quotation marks. The author of the contribution is given in '''contributor'''.</text>
<sha1>nfi198qy69t90rf5ol7zmeydjq6v7jx</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/chapterurl</title>
<ns>10</ns>
<id>34353632</id>
<revision>
<id>983198195</id>
<parentid>919297327</parentid>
<timestamp>2020-10-12T20:39:10Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>moved non-hyphenated alias at the end of list of aliases</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="890" xml:space="preserve">* '''chapter-url''': URL of an online location where the text of the publication named by '''chapter''' or '''contribution''' can be found. Cannot be used if those parameters are wikilinked. Should be at the same site as '''url''', if any. If '''chapter-url''' is used, '''url''' should only be used if the beginning of the work and the cited chapter are on separate webpages at the site. Aliases: '''contribution-url''', '''section-url''', '''chapterurl'''.
* &lt;b id="csdoc_chapter_format"&gt;chapter-format&lt;/b&gt;: Format of the work referred to by '''chapter-url'''; for example: PDF, DOC, or XLS; displayed in parentheses after '''chapter'''. HTML is implied and should not be specified. Does not change the [[Help:External link icons|external link icon]]. Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add format information for the visually impaired.</text>
<sha1>m88725uv7fpmlyrghipc1g97o596u0j</sha1>
</revision>
</page>
<page>
<title>Template:Cite book/TemplateData</title>
<ns>10</ns>
<id>55799911</id>
<revision>
<id>979679662</id>
<parentid>978439083</parentid>
<timestamp>2020-09-22T04:17:36Z</timestamp>
<contributor>
<username>Sdkb</username>
<id>13006032</id>
</contributor>
<comment>add example for publisher</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="55948" xml:space="preserve">{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "This template formats a citation to a book using the provided bibliographic information (such as author and title) as well as various formatting options.",
"params": {
"url": {
"label": "URL",
"description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the  protocol relative scheme \"//...\"",
"type": "string",
"aliases": [
"URL"
],
"example": "https://books.google.com/books?id=..."
},
"title": {
"label": "Title",
"description": "The title of the book; displays in italics",
"type": "string",
"required": true
},
"last": {
"label": "Last name",
"description": "The surname of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"last1",
"author",
"author1",
"author1-last",
"author-last",
"surname1",
"author-last1",
"subject1",
"surname",
"author-last",
"subject"
],
"suggested": true,
"type": "string"
},
"first": {
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"given",
"author-first",
"first1",
"given1",
"author-first1",
"author1-first"
],
"suggested": true,
"type": "string"
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'authorlink2'; can suffix with a numeral to add additional authors",
"aliases": [
"author2",
"surname2",
"author-last2",
"author2-last",
"subject2"
],
"type": "string"
},
"first2": {
"label": "First name 2",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink, use 'authorlink2'; can suffix with a numeral to add additional authors",
"aliases": [
"given2",
"author-first2",
"author2-first"
],
"type": "string"
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'authorlink3'.",
"aliases": [
"author3",
"surname3",
"author-last3",
"author3-last",
"subject3"
],
"type": "string"
},
"first3": {
"label": "First name 3",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink.",
"aliases": [
"given3",
"author-first3",
"author3-first"
],
"type": "string"
},
"last4": {
"label": "Last name 4",
"description": "The surname of the fourth author; don't wikilink, use 'authorlink4'.",
"aliases": [
"author4",
"surname4",
"author-last4",
"author4-last",
"subject4"
],
"type": "string"
},
"first4": {
"label": "First name 4",
"description": "Given or first name, middle names, or initials of the fourth author; don't wikilink.",
"aliases": [
"given4",
"author-first4",
"author4-first"
],
"type": "string"
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'authorlink5'.",
"aliases": [
"author5",
"surname5",
"author-last5",
"author5-last",
"subject5"
],
"type": "string"
},
"first5": {
"label": "First name 5",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink.",
"aliases": [
"given5",
"author-first5",
"author5-first"
],
"type": "string"
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'authorlink6'.",
"aliases": [
"author6",
"surname6",
"author-last6",
"author6-last",
"subject6"
],
"type": "string"
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.",
"aliases": [
"given6",
"author-first6",
"author6-first"
],
"type": "string"
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'authorlink7'.",
"aliases": [
"author7",
"surname7",
"author-last7",
"author7-last",
"subject7"
],
"type": "string"
},
"first7": {
"label": "First name 7",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink.",
"aliases": [
"given7",
"author-first7",
"author7-first"
],
"type": "string"
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'authorlink8'.",
"aliases": [
"author8",
"surname8",
"author-last8",
"author8-last",
"subject8"
],
"type": "string"
},
"first8": {
"label": "First name 8",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink.",
"aliases": [
"given8",
"author-first8",
"author8-first"
],
"type": "string"
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'authorlink9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"aliases": [
"author9",
"surname9",
"author-last9",
"author9-last",
"subject9"
],
"type": "string"
},
"first9": {
"label": "First name 9",
"description": "Given or first name, middle names, or initials of the ninth author; don't wikilink.",
"aliases": [
"given9",
"author-first9",
"author9-first"
],
"type": "string"
},
"date": {
"label": "Date",
"description": "Full date of the source; do not wikilink",
"type": "date",
"aliases": [
"air-date",
"airdate"
]
},
"work": {
"label": "Work",
"description": "Name of the work in which the cited book text is found",
"type": "string",
"aliases": [
"journal",
"website",
"newspaper",
"magazine",
"encyclopedia",
"encyclopaedia",
"dictionary",
"mailinglist"
]
},
"publisher": {
"label": "Publisher",
"description": "Name of the publisher; displays after title",
"type": "string",
"suggested": true,
"aliases": [
"distributor",
"institution",
"newsgroup"
],
"example": "[[HarperCollins]]"
},
"others": {
"label": "Others",
"description": "Used to record other contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'",
"type": "string"
},
"year": {
"label": "Year of publication",
"description": "Year of the source being referenced; use 'date' instead, if month and day are also known",
"type": "string",
"suggested": true
},
"isbn": {
"label": "ISBN",
"description": "International Standard Book Number; use the 13-digit ISBN where possible",
"type": "string",
"suggested": true,
"aliases": [
"ISBN13",
"isbn13",
"ISBN"
]
},
"editor-last": {
"label": "Editor last name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors",
"aliases": [
"editor",
"editor-surname",
"editor-last1",
"editor-surname1",
"editor1",
"editor1-last",
"editor1-surname"
]
},
"editor-first": {
"label": "Editor first name",
"description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors",
"aliases": [
"editor-given",
"editor-first1",
"editor-given1",
"editor1-first",
"editor1-given"
]
},
"editor-link": {
"label": "Link for editor",
"description": "Title of existing Wikipedia article about the editor",
"type": "wiki-page-name",
"aliases": [
"editorlink",
"editor-link1",
"editor1-link",
"editorlink1",
"editor1link"
]
},
"editor-mask": {
"label": "Editor mask",
"description": "Replaces the name of the first editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask",
"editormask1",
"editor1-mask",
"editor-mask1",
"editor1mask"
]
},
"edition": {
"label": "Edition",
"description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed by ' ed.'",
"type": "string"
},
"series": {
"label": "Series identifier",
"description": "Series identifier when the source is part of a series, such as a book series or a journal",
"aliases": [
"version"
],
"type": "string"
},
"volume": {
"label": "Volume",
"description": "For one publication published in several volumes",
"type": "string"
},
"location": {
"label": "Location of publication",
"description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place",
"aliases": [
"place"
],
"type": "string",
"suggested": true
},
"publication-place": {
"label": "Place of publication",
"description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'",
"aliases": [
"publicationplace"
],
"type": "string"
},
"publication-date": {
"label": "Publication date",
"description": "Date of publication when different from the date the work was written; do not wikilink",
"type": "string",
"aliases": [
"publicationdate"
]
},
"page": {
"label": "Page",
"description": "The number of a single page in the source that supports the content; displays after 'p.'; use either page= or pages=, but not both",
"type": "string",
"aliases": [
"p"
]
},
"pages": {
"label": "Page(s) cited",
"description": "A range of pages in the source that support the content (not an indication of the number of pages in the source); displays after 'pp.'; use either page= or pages=, but not both",
"type": "string",
"suggested": true,
"aliases": [
"pp"
],
"example": "5–11"
},
"nopp": {
"label": "No pp",
"description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')",
"type": "string"
},
"at": {
"label": "At",
"description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient",
"type": "string"
},
"language": {
"label": "Language",
"description": "The language in which the source is written, if not English; use the full language name; do not use icons or templates",
"type": "string",
"aliases": [
"in"
]
},
"script-title": {
"label": "Script title",
"description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Bengali, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...",
"type": "string"
},
"trans-title": {
"label": "Translated title",
"description": "An English language title, if the source cited is in a foreign language; 'language' is recommended",
"type": "string",
"aliases": [
"trans_title"
]
},
"chapter": {
"label": "Chapter",
"description": "The chapter heading of the source; may be wikilinked or with 'chapterurl' but not both. For the contribution alias, see contributor-last",
"type": "string",
"aliases": [
"contribution",
"entry",
"article",
"section"
]
},
"trans-chapter": {
"label": "Translated chapter",
"description": "An English language chapter heading, if the source cited is in a foreign language; 'language' is recommended",
"type": "string",
"aliases": [
"trans_chapter"
]
},
"type": {
"label": "Type",
"description": "Additional information about the media type of the source; format in sentence case",
"type": "string",
"aliases": [
"medium"
]
},
"format": {
"label": "Format",
"description": "Format of the work referred to by 'url'; examples: PDF, DOC, XLS; do not specify HTML",
"type": "string"
},
"arxiv": {
"label": "arXiv identifier",
"description": "An identifier for arXive electronic preprints of scientific papers",
"type": "string",
"aliases": [
"ARXIV",
"eprint"
]
},
"asin": {
"label": "ASIN",
"description": "Amazon Standard Identification Number; 10 characters",
"type": "string",
"aliases": [
"ASIN"
]
},
"asin-tld": {
"label": "ASIN TLD",
"description": "ASIN top-level domain for Amazon sites other than the US",
"type": "string"
},
"bibcode": {
"label": "Bibcode",
"description": "Bibliographic Reference Code (REFCODE); 19 characters",
"type": "string"
},
"biorxiv": {
"label": "biorXiv",
"description": "biorXiv identifier; 6 digits",
"type": "line"
},
"citeseerx": {
"label": "CiteSeerX",
"description": "CiteSeerX identifier; found after the 'doi=' query parameter",
"type": "line"
},
"doi": {
"label": "DOI",
"description": "Digital Object Identifier; begins with '10.'",
"type": "string",
"aliases": [
"DOI"
]
},
"issn": {
"label": "ISSN",
"description": "International Standard Serial Number; 8 characters; may be split into two groups of four using a hyphen",
"type": "string",
"aliases": [
"ISSN"
]
},
"jfm": {
"label": "jfm code",
"description": "Jahrbuch über die Fortschritte der Mathematik classification code",
"type": "string"
},
"jstor": {
"label": "JSTOR",
"description": "JSTOR identifier",
"type": "string",
"aliases": [
"JSTOR"
]
},
"lccn": {
"label": "LCCN",
"description": "Library of Congress Control Number",
"type": "string",
"aliases": [
"LCCN"
]
},
"mr": {
"label": "MR",
"description": "Mathematical Reviews identifier",
"type": "string",
"aliases": [
"MR"
]
},
"oclc": {
"label": "OCLC",
"description": "Online Computer Library Center number",
"type": "string",
"aliases": [
"OCLC"
]
},
"ol": {
"label": "OL",
"description": "Open Library identifier; do not include \"OL\" at beginning of identifier",
"type": "string",
"aliases": [
"OL"
]
},
"osti": {
"label": "OSTI",
"description": "Office of Scientific and Technical Information identifier",
"type": "string",
"aliases": [
"OSTI"
]
},
"pmc": {
"label": "PMC",
"description": "PubMed Center article number",
"type": "string"
},
"pmid": {
"label": "PMID",
"description": "PubMed Unique Identifier",
"type": "string",
"aliases": [
"PMID"
]
},
"rfc": {
"label": "RFC",
"description": "Request for Comments number",
"type": "string"
},
"ssrn": {
"label": "SSRN",
"description": "Social Science Research Network",
"type": "string"
},
"zbl": {
"label": "Zbl",
"description": "Zentralblatt MATH journal identifier",
"type": "string"
},
"id": {
"label": "id",
"description": "A unique identifier used where none of the specialized ones are applicable",
"type": "string",
"aliases": [
"ID"
]
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source; displays last, enclosed in quotes; needs to include terminating punctuation",
"type": "string",
"aliases": [
"quotation"
]
},
"ref": {
"label": "Ref",
"description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates",
"type": "string"
},
"name-list-format": {
"label": "Name list format",
"description": "Accepts the single keyword 'vanc' to emulate Vancouver Style author / editor name-lists.",
"type": "string"
},
"mode": {
"label": "Mode",
"description": "Sets separator and terminal punctuation to the style named in the assigned value; allowable values are: 'cs1' or 'cs2'",
"type": "string"
},
"postscript": {
"label": "Postscript",
"description": "The closing punctuation for the citation; ignored if 'quote' is defined; to suppress use reserved keyword 'none'",
"type": "string",
"default": "."
},
"registration": {
"label": "Registration",
"description": "For online sources that require registration, set to 'yes' (or 'y', or 'true'); superseded by subscription if both are set",
"type": "string"
},
"subscription": {
"label": "Subscription",
"description": "For online sources that require subscription, set to 'yes' (or 'y', or 'true'); supersedes registration if both are set",
"type": "string"
},
"author-mask": {
"label": "Author mask",
"description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask",
"authormask1",
"author1-mask",
"author-mask1",
"author1mask"
]
},
"author-mask2": {
"label": "Author mask 2",
"description": "Replaces the name of the second author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask2",
"author2-mask",
"author2mask"
]
},
"author-mask3": {
"label": "Author mask 3",
"description": "Replaces the name of the third author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask3",
"author3-mask",
"author3mask"
]
},
"author-mask4": {
"label": "Author mask 4",
"description": "Replaces the name of the fourth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask4",
"author4-mask",
"author4mask"
]
},
"author-mask5": {
"label": "Author mask 5",
"description": "Replaces the name of the fifth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask5",
"author5-mask",
"author5mask"
]
},
"author-mask6": {
"label": "Author mask 6",
"description": "Replaces the name of the sixth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask6",
"author6-mask",
"author6mask"
]
},
"author-mask7": {
"label": "Author mask 7",
"description": "Replaces the name of the seventh author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask7",
"author7-mask",
"author7mask"
]
},
"author-mask8": {
"label": "Author mask 8",
"description": "Replaces the name of the eighth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask8",
"author8-mask",
"author8mask"
]
},
"author-mask9": {
"label": "Author mask 9",
"description": "Replaces the name of the ninth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead",
"type": "string",
"aliases": [
"authormask9",
"author9-mask",
"author9mask"
]
},
"display-authors": {
"label": "Display authors",
"description": "number of authors to display before 'et al.' is used",
"type": "number",
"aliases": [
"displayauthors"
]
},
"author-link": {
"label": "Author link",
"description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink",
"subjectlink",
"subject-link",
"authorlink1",
"author-link1",
"author1-link",
"subjectlink1",
"author1link",
"subject-link1",
"subject1-link",
"subject1link"
]
},
"author-link2": {
"label": "Author link 2",
"description": "Title of existing Wikipedia article about the second author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink2",
"author2-link",
"subjectlink2",
"author2link",
"subject-link2",
"subject2-link",
"subject2link"
]
},
"author-link3": {
"label": "Author link 3",
"description": "Title of existing Wikipedia article about the third author.",
"type": "wiki-page-name",
"aliases": [
"authorlink3",
"author3-link",
"subjectlink3",
"author3link",
"subject-link3",
"subject3-link",
"subject3link"
]
},
"author-link4": {
"label": "Author link 4",
"description": "Title of existing Wikipedia article about the fourth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink4",
"author4-link",
"subjectlink4",
"author4link",
"subject-link4",
"subject4-link",
"subject4link"
]
},
"author-link5": {
"label": "Author link 5",
"description": "Title of existing Wikipedia article about the fifth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink5",
"author5-link",
"subjectlink5",
"author5link",
"subject-link5",
"subject5-link",
"subject5link"
]
},
"author-link6": {
"label": "Author link 6",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink6",
"author6-link",
"subjectlink6",
"author6link",
"subject-link6",
"subject6-link",
"subject6link"
]
},
"author-link7": {
"label": "Author link 7",
"description": "Title of existing Wikipedia article about the seventh author.",
"type": "wiki-page-name",
"aliases": [
"authorlink7",
"author7-link",
"subjectlink7",
"author7link",
"subject-link7",
"subject7-link",
"subject7link"
]
},
"author-link8": {
"label": "Author link 8",
"description": "Title of existing Wikipedia article about the eighth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink8",
"author8-link",
"subjectlink8",
"author8link",
"subject-link8",
"subject8-link",
"subject8link"
]
},
"author-link9": {
"label": "Author link 9",
"description": "Title of existing Wikipedia article about the ninth author.",
"type": "wiki-page-name",
"aliases": [
"authorlink9",
"author9-link",
"subjectlink9",
"author9link",
"subject-link9",
"subject9-link",
"subject9link"
]
},
"access-date": {
"label": "URL access date",
"description": "The full date when the original URL was accessed; do not wikilink",
"type": "string",
"aliases": [
"accessdate"
]
},
"orig-year": {
"label": "Original year",
"description": "Original year of publication; provide specifics",
"type": "string",
"aliases": [
"origyear"
]
},
"editor-last2": {
"label": "Last name of second editor",
"description": "The surname of the second editor; don't wikilink, use 'editor2-link'",
"type": "string",
"aliases": [
"editor-surname2",
"editor2",
"editor2-last",
"editor2-surname"
]
},
"editor-first2": {
"label": "First name of second editor",
"description": "Given or first name, middle names, or initials of the second editor; don't wikilink, use 'editor2-link'",
"type": "string",
"aliases": [
"editor-given2",
"editor2-first",
"editor2-given"
]
},
"editor-link2": {
"label": "Link for second editor",
"description": "Title of existing Wikipedia article about the second editor",
"type": "wiki-page-name",
"aliases": [
"editor2-link",
"editorlink2",
"editor2link"
]
},
"editor-mask2": {
"label": "Mask for second editor",
"description": "Replaces the name of the second editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask2",
"editor2-mask",
"editor2mask"
]
},
"editor-last3": {
"label": "Last name of third editor",
"description": "The surname of the third editor; don't wikilink, use 'editor3-link'",
"type": "string",
"aliases": [
"editor-surname3",
"editor3",
"editor3-last",
"editor3-surname"
]
},
"editor-first3": {
"label": "First name of third editor",
"description": "Given or first name, middle names, or initials of the third editor; don't wikilink, use 'editor3-link'",
"type": "string",
"aliases": [
"editor-given3",
"editor3-first",
"editor3-given"
]
},
"editor-link3": {
"label": "Link for third editor",
"description": "Title of existing Wikipedia article about the third editor",
"type": "wiki-page-name",
"aliases": [
"editor3-link",
"editorlink3",
"editor3link"
]
},
"editor-mask3": {
"label": "Mask for third editor",
"description": "Replaces the name of the third editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask3",
"editor3-mask",
"editor3mask"
]
},
"editor-last4": {
"label": "Last name of fourth editor",
"description": "The surname of the fourth editor; don't wikilink, use 'editor4-link'",
"type": "string",
"aliases": [
"editor-surname4",
"editor4",
"editor4-last",
"editor4-surname"
]
},
"editor-first4": {
"label": "First name of fourth editor",
"description": "Given or first name, middle names, or initials of the fourth editor; don't wikilink, use 'editor4-link'",
"type": "string",
"aliases": [
"editor-given4",
"editor4-first",
"editor4-given"
]
},
"editor-link4": {
"label": "Link for fourth editor",
"description": "Title of existing Wikipedia article about the fourth editor",
"type": "wiki-page-name",
"aliases": [
"editor4-link",
"editorlink4",
"editor4link"
]
},
"editor-mask4": {
"label": "Mask for fourth editor",
"description": "Replaces the name of the fourth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask4",
"editor4-mask",
"editor4mask"
]
},
"editor-last5": {
"label": "Last name of fifth editor",
"description": "The surname of the fifth editor; don't wikilink, use 'editor5-link'",
"type": "string",
"aliases": [
"editor-surname5",
"editor5",
"editor5-last",
"editor5-surname"
]
},
"editor-first5": {
"label": "First name of fifth editor",
"description": "Given or first name, middle names, or initials of the fifth editor; don't wikilink, use 'editor5-link'",
"type": "string",
"aliases": [
"editor-given5",
"editor5-first",
"editor5-given"
]
},
"editor-link5": {
"label": "Link for fifth editor",
"description": "Title of existing Wikipedia article about the fifth editor",
"type": "wiki-page-name",
"aliases": [
"editor5-link",
"editorlink5",
"editor5link"
]
},
"editor-mask5": {
"label": "Mask for fifth editor",
"description": "Replaces the name of the fifth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask5",
"editor5-mask",
"editor5mask"
]
},
"editor-last6": {
"label": "Last name of sixth editor",
"description": "The surname of the sixth editor; don't wikilink, use 'editor6-link'",
"type": "string",
"aliases": [
"editor-surname6",
"editor6",
"editor6-last",
"editor6-surname"
]
},
"editor-first6": {
"label": "First name of sixth editor",
"description": "Given or first name, middle names, or initials of the sixth editor; don't wikilink, use 'editor6-link'",
"type": "string",
"aliases": [
"editor-given6",
"editor6-first",
"editor6-given"
]
},
"editor-link6": {
"label": "Link for sixth editor",
"description": "Title of existing Wikipedia article about the sixth editor",
"type": "wiki-page-name",
"aliases": [
"editor6-link",
"editorlink6",
"editor6link"
]
},
"editor-mask6": {
"label": "Mask for sixth editor",
"description": "Replaces the name of the sixth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask6",
"editor6-mask",
"editor6mask"
]
},
"editor-last7": {
"label": "Last name of seventh editor",
"description": "The surname of the seventh editor; don't wikilink, use 'editor7-link'",
"type": "string",
"aliases": [
"editor-surname7",
"editor7",
"editor7-last",
"editor7-surname"
]
},
"editor-first7": {
"label": "First name of seventh editor",
"description": "Given or first name, middle names, or initials of the seventh editor; don't wikilink, use 'editor7-link'",
"type": "string",
"aliases": [
"editor-given7",
"editor7-first",
"editor7-given"
]
},
"editor-link7": {
"label": "Link for seventh editor",
"description": "Title of existing Wikipedia article about the seventh editor",
"type": "wiki-page-name",
"aliases": [
"editor7-link",
"editorlink7",
"editor7link"
]
},
"editor-mask7": {
"label": "Mask for seventh editor",
"description": "Replaces the name of the seventh editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask7",
"editor7-mask",
"editor7mask"
]
},
"editor-last8": {
"label": "Last name of eighth editor",
"description": "The surname of the eighth editor; don't wikilink, use 'editor8-link'",
"type": "string",
"aliases": [
"editor-surname8",
"editor8",
"editor8-last",
"editor8-surname"
]
},
"editor-first8": {
"label": "First name of eighth editor",
"description": "Given or first name, middle names, or initials of the eighth editor; don't wikilink, use 'editor8-link'",
"type": "string",
"aliases": [
"editor-given8",
"editor8-first",
"editor8-given"
]
},
"editor-link8": {
"label": "Link for eighth editor",
"description": "Title of existing Wikipedia article about the eighth editor",
"type": "wiki-page-name",
"aliases": [
"editor8-link",
"editorlink8",
"editor8link"
]
},
"editor-mask8": {
"label": "Mask for eighth editor",
"description": "Replaces the name of the eighth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask8",
"editor8-mask",
"editor8mask"
]
},
"editor-last9": {
"label": "Last name of ninth editor",
"description": "The surname of the ninth editor; don't wikilink, use 'editor9-link'",
"type": "string",
"aliases": [
"editor-surname9",
"editor9",
"editor9-last",
"editor9-surname"
]
},
"editor-first9": {
"label": "First name of ninth editor",
"description": "Given or first name, middle names, or initials of the ninth editor; don't wikilink, use 'editor9-link'",
"type": "string",
"aliases": [
"editor-given9",
"editor9-first",
"editor9-given"
]
},
"editor-link9": {
"label": "Link for ninth editor",
"description": "Title of existing Wikipedia article about the ninth editor",
"type": "wiki-page-name",
"aliases": [
"editor9-link",
"editorlink9",
"editor9link"
]
},
"editor-mask9": {
"label": "Mask for ninth editor",
"description": "Replaces the name of the ninth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead",
"type": "string",
"aliases": [
"editormask9",
"editor9-mask",
"editor9mask"
]
},
"chapter-url": {
"label": "Chapter URL",
"description": "The URL of the online location where the text of the chapter can be found",
"aliases": [
"chapterurl",
"contribution-url",
"section-url",
"contributionurl",
"sectionurl"
],
"type": "string"
},
"doi-broken-date": {
"label": "DOI broken date",
"description": "The date that the DOI was determined to be broken",
"type": "string",
"aliases": [
"doi_brokendate"
]
},
"archive-url": {
"label": "Archive URL",
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archivedate'",
"type": "string",
"aliases": [
"archiveurl"
]
},
"archive-date": {
"label": "Archive date",
"description": "Date when the original URL was archived; do not wikilink",
"type": "string",
"aliases": [
"archivedate"
]
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title display is adjusted; useful for when the URL is archived preemptively but still live. Set to \"dead\" or 'usurped' for broken links. Entering 'unfit' or 'usurped' makes the original link not appear at all.",
"example": "'dead' or 'live'",
"type": "string",
"default": "dead"
},
"lay-url": {
"label": "Lay URL",
"description": "URL link to a non-technical summary or review of the source",
"aliases": [
"lay-summary",
"laysummary",
"layurl"
],
"type": "string"
},
"lay-source": {
"label": "Lay source",
"description": "Name of the source of the laysummary; displays in italics, preceded by an en dash",
"type": "string",
"aliases": [
"laysource"
]
},
"lay-date": {
"label": "Lay date",
"description": "Date of the summary; displays in parentheses",
"type": "string",
"aliases": [
"laydate"
]
},
"last-author-amp": {
"label": "Last author ampersand",
"description": "When set to any value, changes the separator between the last two names of the author list to 'space ampersand space'",
"type": "string",
"aliases": [
"lastauthoramp"
]
},
"via": {
"description": "Aggregate or database provider, when different from the Publisher. Typically used for Ebooks.",
"example": "Open Edition, JSTOR ",
"type": "string"
},
"url-access": {
"label": "URL access level",
"description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')",
"type": "string"
},
"bibcode-access": {
"label": "Bibcode access level",
"description": "If the full text is available from ADS via this Bibcode, type 'free'.",
"type": "string"
},
"doi-access": {
"label": "DOI access level",
"description": "If the full text is free to read via the DOI, type 'free'.",
"type": "string"
},
"hdl-access": {
"label": "HDL access level",
"description": "If the full text is free to read via the HDL, type 'free'.",
"type": "string"
},
"jstor-access": {
"label": "Jstor access level",
"description": "If the full text is free to read on Jstor, type 'free'.",
"type": "string"
},
"ol-access": {
"label": "OpenLibrary access level",
"description": "If the full text is free to read on OpenLibrary, type 'free'.",
"type": "string"
},
"osti-access": {
"label": "OSTI access level",
"description": "If the full text is free to read on OSTI, type 'free'.",
"type": "string"
},
"ismn": {
"aliases": [
"ISMN"
],
"label": "ISMN",
"description": "International Standard Music Number; Use the ISMN actually printed on or in the work. Hyphens or spaces in the ISMN are optional.",
"type": "string",
"example": "979-0-9016791-7-7"
},
"eissn": {
"aliases": [
"EISSN"
],
"label": "EISSN",
"description": "International Standard Serial Number for the electronic media of a serial publication; eight characters may be split into two groups of four using a hyphen, but not an en dash or a space.",
"example": "2009-0048",
"type": "string"
},
"editors": {
"label": "Editors list",
"description": "Free-form list of editor names; use of this parameter is discouraged",
"deprecated": "For multiple editors, use editor-last1, editor-first1 through editor-lastn, editor-firstn"
},
"translator-last": {
"label": "Translator last name",
"description": "The surname of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.",
"aliases": [
"translator",
"translator-last1",
"translator1",
"translator1-last"
],
"type": "string"
},
"translator-first": {
"label": "Translator first name",
"description": "Given or first name, middle names, or initials of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.",
"aliases": [
"translator1-first",
"translator-first1"
],
"type": "string"
},
"translator-link": {
"label": "Translator link",
"description": "Title of existing Wikipedia article about the translator; can suffix with a numeral to add additional translators.",
"type": "wiki-page-name",
"aliases": [
"translator-link1",
"translator1-link"
]
},
"translator-last2": {
"label": "Translator last name 2",
"description": "The surname of the second translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator2",
"translator2-last"
],
"type": "string"
},
"translator-first2": {
"label": "Translator first name 2",
"description": "Given or first name, middle names, or initials of the second translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator2-first"
],
"type": "string"
},
"translator-last3": {
"label": "Translator last name 3",
"description": "The surname of the third translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator3",
"translator3-last"
],
"type": "string"
},
"translator-first3": {
"label": "Translator first name 3",
"description": "Given or first name, middle names, or initials of the third translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator3-first"
],
"type": "string"
},
"translator-last4": {
"label": "Translator last name 4",
"description": "The surname of the fourth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator4",
"translator4-last"
],
"type": "string"
},
"translator-first4": {
"label": "Translator first name 4",
"description": "Given or first name, middle names, or initials of the fourth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator4-first"
],
"type": "string"
},
"translator-last5": {
"label": "Translator last name 5",
"description": "The surname of the fifth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator5",
"translator5-last"
],
"type": "string"
},
"translator-first5": {
"label": "Translator first name 5",
"description": "Given or first name, middle names, or initials of the fifth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator5-first"
],
"type": "string"
},
"translator-last6": {
"label": "Translator last name 6",
"description": "The surname of the sixth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator6",
"translator6-last"
],
"type": "string"
},
"translator-first6": {
"label": "Translator first name 6",
"description": "Given or first name, middle names, or initials of the sixth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator6-first"
],
"type": "string"
},
"translator-last7": {
"label": "Translator last name 7",
"description": "The surname of the seventh translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator7",
"translator7-last"
],
"type": "string"
},
"translator-first7": {
"label": "Translator first name 7",
"description": "Given or first name, middle names, or initials of the seventh translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator7-first"
],
"type": "string"
},
"translator-last8": {
"label": "Translator last name 8",
"description": "The surname of the eighth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator8",
"translator8-last"
],
"type": "string"
},
"translator-first8": {
"label": "Translator first name 8",
"description": "Given or first name, middle names, or initials of the eighth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator8-first"
],
"type": "string"
},
"translator-last9": {
"label": "Translator last name 9",
"description": "The surname of the ninth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator9",
"translator9-last"
],
"type": "string"
},
"translator-first9": {
"label": "Translator first name 9",
"description": "Given or first name, middle names, or initials of the ninth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator9-first"
],
"type": "string"
},
"translator-link2": {
"label": "Translator link 2",
"description": "Title of existing Wikipedia article about the second translator.",
"type": "wiki-page-name",
"aliases": [
"translator2-link"
]
},
"translator-link3": {
"label": "Translator link 3",
"description": "Title of existing Wikipedia article about the third translator.",
"type": "wiki-page-name",
"aliases": [
"translator3-link"
]
},
"translator-link4": {
"label": "Translator link 4",
"description": "Title of existing Wikipedia article about the fourth translator.",
"type": "wiki-page-name",
"aliases": [
"translator4-link"
]
},
"translator-link5": {
"label": "Translator link 5",
"description": "Title of existing Wikipedia article about the fifth translator.",
"type": "wiki-page-name",
"aliases": [
"translator5-link"
]
},
"translator-link6": {
"label": "Translator link 6",
"description": "Title of existing Wikipedia article about the sixth translator.",
"type": "wiki-page-name",
"aliases": [
"translator6-link"
]
},
"translator-link7": {
"label": "Translator link 7",
"description": "Title of existing Wikipedia article about the seventh translator.",
"type": "wiki-page-name",
"aliases": [
"translator7-link"
]
},
"translator-link8": {
"label": "Translator link 8",
"description": "Title of existing Wikipedia article about the eighth translator.",
"type": "wiki-page-name",
"aliases": [
"translator8-link"
]
},
"translator-link9": {
"label": "Translator link 9",
"description": "Title of existing Wikipedia article about the ninth translator.",
"type": "wiki-page-name",
"aliases": [
"translator9-link"
]
},
"vauthors": {
"label": "Vancouver style author list",
"description": "If using Vancouver style, comma separated list of author names; enclose corporate or institutional author names in doubled parentheses",
"example": "Smythe JB, ((Megabux Corporation))",
"type": "string"
},
"issue": {
"label": "Issue",
"description": "Issue number. This parameter is not supported by and should generally not be used with cite book. Consider that a different cite template may be more appropriate, such as cite magazine or cite journal. See Help:Citation_Style_1#Pages.",
"type": "string",
"aliases": [
"number"
]
},
"coauthor": {
"label": "Coauthor",
"description": "Coauthor",
"type": "string",
"deprecated": "Use last# / first# or author or authors. If coauthor · coauthors are used for et al, then use display-authors=etal instead.Include coauthors in author or authors or use separate authorn or lastn/firstn to list coauthors. lastn/firstn is the preferred way of coding this."
},
"coauthors": {
"label": "Coauthors",
"description": "Coauthors",
"type": "string",
"deprecated": "Use last# / first# or author or authors. If coauthor · coauthors are used for et al, then use display-authors=etal instead.Include coauthors in author or authors or use separate authorn or lastn/firstn to list coauthors. lastn/firstn is the preferred way of coding this."
},
"display-editors": {
"aliases": [
"displayeditors"
],
"label": "Display Editors",
"description": "Controls the number of editor names that are displayed when a citation is published. To change the displayed number of editors, set display-editors to the desired number. For example, |display-editors=2 will display only the first two editors in a citation. By default, all editors are displayed. |display-editors=etal displays all editors in the list followed by et al.",
"type": "string"
},
"authors": {
"label": "Authors list",
"description": "List of authors as a free form list. Use of this parameter is discouraged, \"lastn\" to \"firstn\" are preferable. Warning: do not use if last or any of its aliases are used.",
"type": "string",
"aliases": [
"people",
"host",
"credits"
]
},
"veditors": {
"label": "Vancouver style editor list",
"description": "Comma separated list of editor names in Vancouver style; enclose corporate or institutional names in doubled parentheses",
"example": "Smythe JB, ((Megabux Corporation))",
"type": "string"
},
"city": {
"label": "City of Publication",
"description": "Where published",
"type": "string",
"deprecated": "Use place or location instead."
},
"chapter-format": {
"aliases": [
"contribution-format",
"section-format"
],
"label": "Format of Chapter URL",
"type": "string",
"description": "Format of the work referred to by chapter-url; displayed in parentheses after chapter. HTML is implied and should not be specified.",
"example": "PDF, DOC, or XLS"
},
"agency": {
"label": "Agency",
"description": "Unusual in cite book. Use if an agency is needed in addition to publisher, etc.",
"type": "string"
},
"title-link": {
"aliases": [
"titlelink",
"episode-link",
"episodelink"
],
"label": "Title link",
"description": "Title of existing Wikipedia article about the source named in title – do not use a web address; do not wikilink.",
"type": "wiki-page-name"
},
"ignore-isbn-error": {
"label": "Ignore ISBN Error",
"description": "True if ISBN Errors should be ignored.If set, page will be added to a maintenance category \"CS1 maint: Ignored ISBN errors\".",
"type": "boolean"
},
"collaboration": {
"label": "Collaboration",
"description": "Name of a group of authors or collaborators; requires author, last, or vauthors which list one or more primary authors; follows author name-list; appends 'et al.' to author name-list.",
"type": "string"
},
"script-chapter": {
"label": "Script Chapter",
"description": "Chapter heading for languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc); follows transliteration defined in chapter. Should be prefixed with an ISO 639-1 two-character code to help browsers properly display the script",
"example": "ja:東京タワー",
"type": "string"
},
"department": {
"label": "Department",
"description": "Unusual in cite book."
},
"class": {
"label": "arXiv Class",
"description": "Cite arXiv identifiers",
"type": "string"
},
"hdl": {
"aliases": [
"HDL"
],
"label": " Handle System identifier",
"description": "Handle System identifier for digital objects and other resources on the Internet",
"type": "string"
},
"archive-format": {
"label": "Archive Format",
"description": "Format of the Archive",
"type": "string"
},
"df": {
"label": "Date format",
"description": "Sets rendered dates to the specified format",
"type": "string"
}
},
"maps": {
"citoid": {
"edition": "edition",
"title": "title",
"bookTitle": "title",
"publicationTitle": "title",
"url": "url",
"publisher": "publisher",
"date": "date",
"place": "location",
"ISSN": [
"issn"
],
"ISBN": [
"isbn"
],
"oclc": "oclc",
"PMCID": "pmc",
"PMID": "pmid",
"pages": "pages",
"volume": "volume",
"series": "series",
"DOI": "doi",
"language": "language",
"translator": [
[
"translator-first",
"translator-last"
],
[
"translator-first2",
"translator-last2"
],
[
"translator-first3",
"translator-last3"
],
[
"translator-first3",
"translator-last3"
],
[
"translator-first4",
"translator-last4"
],
[
"translator-first5",
"translator-last5"
],
[
"translator-first6",
"translator-last6"
],
[
"translator-first7",
"translator-last7"
],
[
"translator-first8",
"translator-last8"
],
[
"translator-first9",
"translator-last9"
]
],
"contributor": "others",
"author": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"editor": [
[
"editor-first",
"editor-last"
],
[
"editor-first2",
"editor-last2"
],
[
"editor-first3",
"editor-last3"
],
[
"editor-first4",
"editor-last4"
],
[
"editor-first5",
"editor-last5"
],
[
"editor-first6",
"editor-last6"
],
[
"editor-first7",
"editor-last7"
],
[
"editor-first8",
"editor-last8"
],
[
"editor-first9",
"editor-last9"
]
]
}
},
"paramOrder": [
"last",
"first",
"url",
"title",
"title-link",
"vauthors",
"last2",
"first2",
"last3",
"first3",
"last4",
"first4",
"last5",
"first5",
"last6",
"first6",
"last7",
"first7",
"last8",
"first8",
"last9",
"first9",
"collaboration",
"date",
"work",
"publisher",
"others",
"year",
"isbn",
"ignore-isbn-error",
"editor-last",
"editor-first",
"editor-link",
"editor-mask",
"veditors",
"editors",
"edition",
"series",
"volume",
"location",
"publication-place",
"publication-date",
"page",
"pages",
"nopp",
"at",
"language",
"translator-last",
"translator-first",
"script-title",
"trans-title",
"chapter",
"script-chapter",
"trans-chapter",
"type",
"format",
"arxiv",
"class",
"asin",
"asin-tld",
"bibcode",
"biorxiv",
"citeseerx",
"doi",
"eissn",
"hdl",
"ismn",
"issn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"id",
"quote",
"ref",
"name-list-format",
"mode",
"postscript",
"registration",
"subscription",
"author-mask",
"author-mask2",
"author-mask3",
"author-mask4",
"author-mask5",
"author-mask6",
"author-mask7",
"author-mask8",
"author-mask9",
"display-authors",
"author-link",
"author-link2",
"author-link3",
"author-link4",
"author-link5",
"author-link6",
"author-link7",
"author-link8",
"author-link9",
"access-date",
"orig-year",
"editor-last2",
"editor-first2",
"editor-link2",
"editor-mask2",
"editor-last3",
"editor-first3",
"editor-link3",
"editor-mask3",
"editor-last4",
"editor-first4",
"editor-link4",
"editor-mask4",
"editor-last5",
"editor-first5",
"editor-link5",
"editor-mask5",
"editor-last6",
"editor-first6",
"editor-link6",
"editor-mask6",
"editor-last7",
"editor-first7",
"editor-link7",
"editor-mask7",
"editor-last8",
"editor-first8",
"editor-link8",
"editor-mask8",
"editor-last9",
"editor-first9",
"editor-link9",
"editor-mask9",
"display-editors",
"translator-last2",
"translator-first2",
"translator-last3",
"translator-first3",
"translator-last4",
"translator-first4",
"translator-last5",
"translator-first5",
"translator-last6",
"translator-first6",
"translator-last7",
"translator-first7",
"translator-last8",
"translator-first8",
"translator-last9",
"translator-first9",
"translator-link",
"translator-link2",
"translator-link3",
"translator-link4",
"translator-link5",
"translator-link6",
"translator-link7",
"translator-link8",
"translator-link9",
"chapter-url",
"chapter-format",
"doi-broken-date",
"url-access",
"archive-url",
"archive-format",
"archive-date",
"url-status",
"lay-url",
"lay-source",
"lay-date",
"last-author-amp",
"via",
"bibcode-access",
"doi-access",
"hdl-access",
"jstor-access",
"ol-access",
"osti-access",
"issue",
"coauthor",
"coauthors",
"authors",
"city",
"agency",
"department",
"df"
],
"format": "inline"
}
&lt;/templatedata&gt;</text>
<sha1>959711kk0u3v7ipwo0j7nolej2ywxzi</sha1>
</revision>
</page>
<page>
<title>Template:Cite book/doc</title>
<ns>10</ns>
<id>6915751</id>
<revision>
<id>988035710</id>
<parentid>983010100</parentid>
<timestamp>2020-11-10T17:51:30Z</timestamp>
<contributor>
<username>Tom.Reding</username>
<id>9784415</id>
</contributor>
<minor/>
<comment>/* Examples */ Prefer author-link over authorlink</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="30202" xml:space="preserve">&lt;noinclude&gt;{{pp-protected|reason=Persistent [[WP:Disruptive editing|disruptive editing]] Protecting high visibility template.|small=yes}}&lt;/noinclude&gt;{{Documentation subpage}}
&lt;!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --&gt;
{{high-risk| 1000000+}}
{{csdoc|lua}}
{{csdoc|cs1}}
{{csdoc|lead|books}} When citing an article in a periodical, use {{tl|cite journal}} or {{tl|cite magazine}}. For conference papers, use {{tl|cite conference}}. For edited collections, use {{tl|cite encyclopedia}}. For theses, use {{tl|cite thesis}}.
==Usage==
{{csdoc|usage}}
{{csdoc|usage common}}
; To cite a book with a credited author
: &lt;code&gt;&lt;nowiki&gt;{{cite book |last= |first= |author-link= |date= |title= |url= |location= |publisher= |page= |isbn=}}&lt;/nowiki&gt;&lt;/code&gt;
; To cite a book with no credited author
: &lt;code&gt;&lt;nowiki&gt;{{cite book |author=&lt;!--Staff writer(s); no by-line.--&gt; |title= |url= |location= |publisher= |page= |date= |isbn=}}&lt;/nowiki&gt;&lt;/code&gt;
; To cite an online book that has been archived
: &lt;code&gt;&lt;nowiki&gt;{{cite book |last= |first= |date= |title= |url= |url-status= |location= |publisher= |isbn= |archive-url= |archive-date=}}&lt;/nowiki&gt;&lt;/code&gt;
; To cite a book written in a foreign language
: &lt;code&gt;&lt;nowiki&gt;{{cite book |last= |first= |date= |title= |trans-title= |url= |language= |location= |publisher= |isbn=}}&lt;/nowiki&gt;&lt;/code&gt;
; To cite and quote an archived, two-author, foreign language book re-published as a PDF on an information aggregation service requiring a subscription
: &lt;code&gt;&lt;nowiki&gt;{{cite book |last1= |first1= |last2= |first2= |date= |title= |trans-title= |url= |url-status= |url-access= |format= |language= |location= |publisher= |isbn= |archive-url= |archive-date= |via= |quote=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{{csdoc|usage vertical common}}
&lt;pre style="margin:0px; border:none; white-space:pre;"&gt;
{{cite book
|last=
|first=
|author-link=
|date=
|title=
|url=
|location=
|publisher=
|page= &lt;!-- or pages= --&gt;
|isbn=
}}
&lt;/pre&gt;
{{end}}
{{csdoc|usage full}}
&lt;code&gt;&lt;nowiki&gt;{{cite book |last1= |first1= |author-link1= |last2= |first2= |author-link2= |last3= |first3= |author-link3= |last4= |first4= |author-link4= |last5= |first5= |author-link5= |display-authors= |author-mask1= |author-mask2= |author-mask3= |author-mask4= |author-mask5= |name-list-style= |translator-last1= |translator-first1= |translator-link1= |translator-last2= |translator-first2= |translator-link2= |display-translators= |translator-mask1= |translator-mask2= |date= |year= |orig-year= |chapter= |script-chapter= |trans-chapter= |chapter-url= |chapter-format= |editor1-last= |editor1-first= |editor1-link= |editor2-last= |editor2-first= |editor2-link= |editor3-last= |editor3-first= |editor3-link= |editor4-last= |editor4-first= |editor4-link= |editor5-last= |editor5-first= |editor5-link= |display-editors= |title= |script-title= |trans-title= |url= |url-status= |url-access= |format= |type= |series= |language= |volume= |others= |edition= |location= |publisher= |publication-date= |page= |pages= |at= |nopp= |arxiv= |asin= |bibcode= |doi= |doi-broken-date= |isbn= |ismn= |issn= |jfm= |jstor= |lccn= |mr= |oclc= |ol= |osti= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |archive-url= |archive-date= |access-date= |via= |lay-url= |lay-source= |lay-date= |lay-format= |quote= |name-list-style= |mode= |postscript= |ref=}}&lt;/nowiki&gt;&lt;/code&gt;
{{end}}
{| class="wikitable"
|+Full parameter set in vertical format
! Parameters !! Prerequisites !! Brief instructions / notes !! Vertical list
|-
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
|
| Author's last name or single name author. Don't link.
| rowspan="98" style="vertical-align:top;" | &lt;pre style="margin:0px; border:none;"&gt;
{{cite book
&amp;nbsp;|last1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=
|first1 =
|author-link1 =
|last2 =
|first2 =
|author-link2 =
|last3 =
|first3 =
|author-link3 =
|last4 =
|first4 =
|author-link4 =
|last5 =
|first5 =
|author-link5 =
|display-authors =
|author-mask1 =
|author-mask2 =
|author-mask3 =
|author-mask4 =
|author-mask5 =
|name-list-style =
|translator-last1 =
|translator-first1 =
|translator-link1 =
|translator-last2 =
|translator-first2 =
|translator-link2 =
|display-translators =
|translator-mask1 =
|translator-mask2 =
|date =
|year =
|orig-year =
|chapter =
|script-chapter =
|trans-chapter =
|chapter-url =
|chapter-format =
|editor1-last =
|editor1-first =
|editor1-link =
|editor2-last =
|editor2-first =
|editor2-link =
|editor3-last =
|editor3-first =
|editor3-link =
|editor4-last =
|editor4-first =
|editor4-link =
|editor5-last =
|editor5-first =
|editor5-link =
|display-editors =
|title =
|script-title =
|trans-title =
|url =
|url-status =
|url-access =
|format =
|type =
|series =
|language =
|volume =
|others =
|edition =
|location =
|publisher =
|publication-date =
|page =
|pages =
|at =
|nopp =
|arxiv =
|asin =
|bibcode =
|doi =
|doi-broken-date =
|isbn =
|ismn =
|issn =
|jfm =
|jstor =
|lccn =
|mr =
|oclc =
|ol =
|osti =
|pmc =
|pmid =
|rfc =
|ssrn =
|zbl =
|id =
|archive-url =
|archive-date =
|access-date =
|via =
|lay-url =
|lay-source =
|lay-date =
|lay-format =
|quote =
|name-list-style =
|mode =
|postscript =
|ref =
}}
&lt;/pre&gt;
|-
| {{Hover title|or any of its aliases, including: first; given1; given; author-first1; author-first; (etc.)|first1}}
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
| Author's first name. Don't link.
|-
| {{Hover title|or any of its aliases, including: author-link; authorlink1; authorlink; subject-link1; subject-link; (etc.)|author-link1}}
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
| Title of Wikipedia article about the first author. Don't link.
|-
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
| Like &lt;code&gt;last1&lt;/code&gt;, but for 2nd author.
|-
| {{Hover title|or any of its aliases, including: given2; author-first2; (etc.)|first2}}
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for 2nd author.
|-
| {{Hover title|or any of its aliases, including: authorlink2; subject-link2; (etc.)|author-link2}}
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for 2nd author.
|-
| {{Hover title|or any of its aliases, including: author3; author-last3; (etc.)|last3}}
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
| Like &lt;code&gt;last1&lt;/code&gt;, but for 3rd author.
|-
| {{Hover title|or any of its aliases, including: given3; author-first3; (etc.)|first3}}
| {{Hover title|or any of its aliases, including: author3; author-last3; (etc.)|last3}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for 3rd author.
|-
| {{Hover title|or any of its aliases, including: authorlink3; subject-link3; (etc.)|author-link3}}
| {{Hover title|or any of its aliases, including: author3; author-last3; (etc.)|last3}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for 3rd author.
|-
| {{Hover title|or any of its aliases, including: author4; author-last4; (etc.)|last4}}
| {{Hover title|or any of its aliases, including: author3; author-last3; (etc.)|last3}}
| Like &lt;code&gt;last1&lt;/code&gt;, but for 4th author.
|-
| {{Hover title|or any of its aliases, including: given4; author-first4; (etc.)|first4}}
| {{Hover title|or any of its aliases, including: author4; author-last4; (etc.)|last4}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for 4th author.
|-
| {{Hover title|or any of its aliases, including: authorlink4; subject-link4; (etc.)|author-link4}}
| {{Hover title|or any of its aliases, including: author4; author-last4; (etc.)|last4}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for 4th author.
|-
| {{Hover title|or any of its aliases, including: author5; author-last5; (etc.)|last5}}
| {{Hover title|or any of its aliases, including: author4; author-last4; (etc.)|last4}}
| Like &lt;code&gt;last1&lt;/code&gt;, but for 5th author. Similar: last6, etc.
|-
| {{Hover title|or any of its aliases, including: given5; author-first5; (etc.)|first5}}
| {{Hover title|or any of its aliases, including: author5; author-last5; (etc.)|last5}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for 5th author. Similar: first6, etc.
|-
| {{Hover title|or any of its aliases, including: authorlink5; subject-link5; (etc.)|author-link5}}
| {{Hover title|or any of its aliases, including: author5; author-last5; (etc.)|last5}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for 5th author. Similar: author-link6, etc.
|-
| {{Hover title|or alias displayauthors|display-authors}}
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
| Number (number of authors displayed) or &lt;code&gt;etal&lt;/code&gt; (more authors)
|-
| {{Hover title|or any of its aliases, including: author-mask; authormask1; authormask; (etc.)|author-mask1}}
| {{Hover title|or any of its aliases, including: last; author1; author; author-last1; author-last; (etc.)|last1}}
| rowspan="5" | See [[#Display options|Display options]] below; not for lists of cited works
|-
| {{Hover title|or any of its aliases, including: author2-mask; authormask2; (etc.)|author-mask2}}
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
|-
| {{Hover title|or any of its aliases, including: author3-mask; authormask3; (etc.)|author-mask3}}
| {{Hover title|or any of its aliases, including: author3; author-last3; (etc.)|last3}}
|-
| {{Hover title|or any of its aliases, including: author4-mask; authormask4; (etc.)|author-mask4}}
| {{Hover title|or any of its aliases, including: author4; author-last4; (etc.)|last4}}
|-
| {{Hover title|or any of its aliases, including: author5-mask; authormask5; (etc.)|author-mask5}}
| {{Hover title|or any of its aliases, including: author5; author-last5; (etc.)|last5}}
|-
| name-list-style
| {{Hover title|or any of its aliases, including: author2; author-last2; (etc.)|last2}}
| Set to &lt;code&gt;amp&lt;/code&gt; or &lt;code&gt;ampersand&lt;/code&gt; to separate the last author with {{nowrap|"&lt;code&gt; &amp; &lt;/code&gt;"}}; set to &lt;code&gt;and&lt;/code&gt; to separate with {{nowrap|"&lt;code&gt; and &lt;/code&gt;"}}
|-
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
|
| Like &lt;code&gt;last1&lt;/code&gt;, but for translator
|-
| {{Hover title|or any of its aliases, including: translator-first; translator-given1; translator-given; (etc.)|translator-first1}}
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for translator
|-
| {{Hover title|or any of its aliases, including: translator-link; (etc.)|translator-link1}}
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for translator
|-
| {{Hover title|or any of its aliases, including: translator2; translator-surname2; (etc.)|translator-last2}}
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
| Like &lt;code&gt;last1&lt;/code&gt;, but for 2nd translator. Similar: translator-last3, etc.
|-
| {{Hover title|or any of its aliases, including: translator2-first; translator-given2; (etc.)|translator-first2}}
| {{Hover title|or any of its aliases, including: translator2; translator-surname2; (etc.)|translator-last2}}
| Like &lt;code&gt;first1&lt;/code&gt;, but for 2nd translator. Similar: translator-first3, etc.
|-
| {{Hover title|or alias translator2-link|translator-link2}}
| {{Hover title|or any of its aliases, including: translator2; translator-surname2; (etc.)|translator-last2}}
| Like &lt;code&gt;author-link1&lt;/code&gt;, but for 2nd transl. Similar: translator-link3, ...
|-
| {{nowrap|display-translators}}
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
| Like &lt;code&gt;display-authors&lt;/code&gt;, but for translators
|-
| {{Hover title|or any of its aliases, including: translator-mask; (etc.)|translator-mask1}}
| {{Hover title|or any of its aliases, including: translator-last; translator1; translator; translator-surname; (etc.)|translator-last1}}
| rowspan="2" | See [[#Display options|Display options]] below; not for lists of cited works
|-
| {{Hover title|or alias translator2-mask|translator-mask2}}
| {{Hover title|or any of its aliases, including: translator2; translator-surname2; (etc.)|translator-last2}}
|-
|| date || ||
|-
|| year || ||
|-
|| orig-year || year or date ||
|-
|| chapter || || This should be the title of the chapter cited. Do not wikilink "chapter" if "chapterurl" is provided
|-
|| script-chapter || ||
|-
|| trans-chapter || chapter or script-chapter ||
|-
|| chapter-url || chapter or script-chapter ||
|-
|| chapter-format || chapter-url ||
|-
|| editor1-last || || may also use "editor-last"
|-
|| editor1-first || editor1-last || may also use 'editor-first"
|-
|| editor1-link || editor1-last || may also use "editor-link"
|-
|| editor1-mask || editor1-last
|-
|| display-editors || ||
|-
|| title || ||
|-
|| script-title || ||
|-
|| trans-title || title or script-title ||
|-
|| url || title or script-title ||
|-
|| url-status || archive-url ||
|-
|| url-access || url ||
|-
|| format || url ||
|-
|| type || ||
|-
|| series || ||
|-
|| language || ||
|-
|| volume || ||
|-
|| others || ||
|-
|| edition || || Ordinal number
|-
|| location || publisher ||
|-
|| publisher || ||
|-
|| publication-date || ||
|-
|| page || || choose one: "page", "pages", or "at"
|-
|| pages || || choose one: "page", "pages", or "at". Use when content on multiple pages supports the article text.
|-
|| at || || choose one: "page", "pages", or "at"
|-
|| nopp || page or pages || set nopp to "yes" to suppress the "p." or "pp." before page numbers
|-
|| arxiv || ||
|-
|| asin || ||
|-
|| bibcode || ||
|-
|| doi || ||
|-
|| doi-broken-date || doi ||
|-
|| isbn || || '''always include ISBN''', if one has been assigned
|-
|| issn || ||
|-
|| ismn || ||
|-
|| jfm || ||
|-
|| jstor || ||
|-
|| lccn || ||
|-
|| mr || ||
|-
|| oclc || ||
|-
|| ol || ||
|-
|| osti || ||
|-
|| pmc || ||
|-
|| pmid || ||
|-
|| rfc || ||
|-
|| ssrn || ||
|-
|| zbl || ||
|-
|| id || ||
|-
|| archive-url || archive-date, url ||
|-
|| archive-date || archive-url ||
|-
|| access-date || url ||
|-
|| via || ||
|-
|| lay-url || ||
|-
|| lay-source || lay-url ||
|-
|| lay-date || lay-url ||
|-
|| lay-format || lay-url ||
|-
|| quote || ||
|-
|| name-list-format || || &lt;code&gt;vanc&lt;/code&gt; to emulate [[Vancouver style]]
|-
|| mode || || &lt;code&gt;cs1&lt;/code&gt; or &lt;code&gt;cs2&lt;/code&gt;
|-
|| postscript || ||
|-
|| ref || ||
|-
| colspan="4" style="text-align: center " | If a field name is listed in the '''Prerequisites''' column it is a prerequisite for the field to the left.
|}
==Examples==
{{markup2|t=Title
|m=&lt;nowiki&gt;{{cite book |title=Mysterious Book}}&lt;/nowiki&gt;
|r={{cite book |title=Mysterious Book}}
}}
{{markup2|t=Title and year
|m=&lt;nowiki&gt;{{cite book |title=Mysterious Book |date=1901}}&lt;/nowiki&gt;
|r={{cite book |title=Mysterious Book |date=1901}}
}}
{{markup2|t=Basic usage (single author)
|m=&lt;nowiki&gt;{{cite book |last=Bloggs |first=Joe |author-link=Joe Bloggs |date=1974 |title=Book of Bloggs}}&lt;/nowiki&gt;
|r={{cite book |last=Bloggs |first=Joe |author-link=Joe Bloggs |date=1974 |title=Book of Bloggs}}
}}
{{markup2|t=Basic usage (two authors)
|m=&lt;nowiki&gt;{{cite book |last1=Bloggs |first1=Joe |author-link1=Joe Bloggs |last2=Bloggs |first2=Fred |author-link2=Fred Bloggs |date=1974 |title=Book of Bloggs}}&lt;/nowiki&gt;
|r={{cite book |last1=Bloggs |first1=Joe |author-link1=Joe Bloggs |last2=Bloggs |first2=Fred |author-link2=Fred Bloggs |date=1974 |title=Book of Bloggs}}
}}
{{markup2|t=Basic usage with url (and access-date) and edition
|m=&lt;nowiki&gt;{{cite book |last=Bloggs |first=Joe |author-link=Joe Bloggs |date=1974 |title=Book of Bloggs |edition=1st |url=http://en.wikipedia.org/ |access-date=February 17, 2006}}&lt;/nowiki&gt;
|r={{cite book |last=Bloggs |first=Joe |author-link=Joe Bloggs |date=1974 |title=Book of Bloggs |edition=1st |url=http://en.wikipedia.org/ |access-date=February 17, 2006}}
}}{{anchor|different authors}}
{{markup2|t=Citing a chapter in a book with different authors for different chapters and an editor
|m=&lt;nowiki&gt;{{cite book |last=Bloggs |first=Fred |editor-last=Doe |editor-first=John |title=Big Compilation Book with Many Chapters and Distinct Chapter Authors |publisher=Book Publishers |date=January 1, 2001 |pages=100–110 |chapter=Chapter 2: The History of the Bloggs Family |isbn=978-1-234-56789-7}}&lt;/nowiki&gt;
|r={{cite book |last=Bloggs |first=Fred |editor-last=Doe |editor-first=John |title=Big Compilation Book with Many Chapters and Distinct Chapter Authors |publisher=Book Publishers |date=January 1, 2001 |pages=100–110 |chapter=Chapter 2: The History of the Bloggs Family |isbn=978-1-234-56789-7}}
}}
{{markup2|t=Citing a chapter in a book with two joint authors and an editor
|m=&lt;nowiki&gt;{{cite book |last1=Bloggs |first1=Joe |last2=Egg |first2=Fred |editor-last=Doe |editor-first=John |title=Big Book with Many Chapters and Two Co-authors |publisher=Book Publishers |date=January 1, 2001 |orig-year=1st pub. 1986 |pages=100–110 |chapter=Chapter 6: Getting There |chapterurl=http://en.wikipedia.org/ |isbn=978-1-234-56789-7 |name-list-style=amp}}&lt;/nowiki&gt;
|r={{cite book |last1=Bloggs |first1=Joe |last2=Egg |first2=Fred |editor-last=Doe |editor-first=John |title=Big Book with Many Chapters and Two Co-authors |publisher=Book Publishers |date=January 1, 2001 |orig-year=1st pub. 1986 |pages=100–110 |chapter=Chapter 6: Getting There |chapterurl=http://en.wikipedia.org/ |isbn=978-1-234-56789-7 |name-list-style=amp}}
}}
{{markup2|t=Three authors, title with a piped wikilink, edition
|m=&lt;nowiki&gt;{{cite book |last1=Bloggs |first1=Joe |author-link1=Joe Bloggs |last2=Smith |first2=John |last3=Smythe |first3=Jim |title=[[A Thousand Acres|1000 Acres]] |edition=2nd}}&lt;/nowiki&gt;
|r={{cite book |last1=Bloggs |first1=Joe |author-link1=Joe Bloggs |last2=Smith |first2=John |last3=Smythe |first3=Jim |title=[[A Thousand Acres|1000 Acres]] |edition=2nd}}
}}
{{markup2|t=Complex usage showing effect of using volume parameter and lastauthoramp parameter (without volume and lastauthoramp)
|m=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East. Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2007 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3}}&lt;/nowiki&gt;
|r={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East. Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2007 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3}}
}}
{{markup2|t=Complex usage showing effect of using volume parameter and lastauthoramp parameter (with volume and lastauthoramp)
|m=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East |volume=Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2007 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |name-list-style=amp}}&lt;/nowiki&gt;
|r={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East |volume=Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2007 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |name-list-style=amp}}
}}
{{markup2|t=Date without day, wikilinked title and publisher, pages, edition, location
|m=&lt;nowiki&gt;{{cite book |last1=Cordell |first1=Bruce R. |last2=Grubb |first2=Jeff |last3=Noonan |first3=David |date=September 2001 |title=[[Manual of the Planes]] |edition=3rd |publisher=Wizards of the Coast |location=Renton, Washington |isbn=0-7869-1850-0 |pages=134–137}}&lt;/nowiki&gt;
|r={{cite book |last1=Cordell |first1=Bruce R. |last2=Grubb |first2=Jeff |last3=Noonan |first3=David |date=September 2001 |title=[[Manual of the Planes]] |edition=3rd |publisher=Wizards of the Coast |location=Renton, Washington |isbn=0-7869-1850-0 |pages=134–137}}
}}
{{markup2|t=Other language
|m=&lt;nowiki&gt;{{cite book |last=Bloggs |first=Jean |date=1974 |title=Livre de Bloggs |edition=1st |language=French |trans-title=Book of Bloggs |url=http://en.wikipedia.org/ |access-date=February 17, 2006}}&lt;/nowiki&gt;
|r={{cite book |last=Bloggs |first=Jean |date=1974 |title=Livre de Bloggs |edition=1st |language=French |trans-title=Book of Bloggs |url=http://en.wikipedia.org/ |access-date=February 17, 2006}}
}}
{{markup2|t=Using a [[Digital object identifier|DOI]]
|m=&lt;nowiki&gt;{{cite book |last=Mumford |first=David |author-link=David Mumford |date=1999 |title=The Red Book of Varieties and Schemes: Includes the Michigan Lectures (1974) on Curves and Their Jacobians |edition=2nd |publisher=Springer-Verlag |doi=10.1007/b62130 |isbn=354063293X}}&lt;/nowiki&gt;
|r={{cite book |last=Mumford |first=David |author-link=David Mumford |date=1999 |title=The Red Book of Varieties and Schemes: Includes the Michigan Lectures (1974) on Curves and Their Jacobians |edition=2nd |publisher=Springer-Verlag |doi=10.1007/b62130 |isbn=354063293X}}
}}
{{markup2|t=Using author-mask parameter
|m=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |name-list-style=amp}}&lt;/nowiki&gt;
|m2=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Flynn |first2=F.C. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=The Mediterranean and Middle East, Volume II: The Germans Come to the Help of Their Ally (1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-66-1 |name-list-style=amp |author-mask=2}}&lt;/nowiki&gt;
|m3=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Flynn |first2=F.C. |last3=Molony |first3=C.J.C. |last4=Gleave |first4=T.P. |editor-last=Butler |editor-first=Sir James |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=The Mediterranean and Middle East, Volume III: British Fortunes Reach Their Lowest Ebb (September 1941 to September 1942) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-67-X |name-list-style=amp |author-mask=2}}&lt;/nowiki&gt;
|r={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |name-list-style=amp}}
|r2={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Flynn |first2=F.C. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=The Mediterranean and Middle East, Volume II: The Germans Come to the Help of Their Ally (1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-66-1 |name-list-style=amp |author-mask=2}}
|r3={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Flynn |first2=F.C. |last3=Molony |first3=C.J.C. |last4=Gleave |first4=T.P. |editor-last=Butler |editor-first=Sir James |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=The Mediterranean and Middle East, Volume III: British Fortunes Reach Their Lowest Ebb (September 1941 to September 1942) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-67-X |name-list-style=amp |author-mask=2}}
}}
{{markup2|t=Using display-authors parameter
|m=&lt;nowiki&gt;{{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |display-authors=1}}&lt;/nowiki&gt;
|r={{cite book |last1=Playfair |first1=I.S.O. |author-link1=Ian Stanley Ord Playfair |last2=Stitt |first2=G.M.S. |last3=Molony |first3=C.J.C. |last4=Toomer |first4=S.E. |editor-last=Butler |editor-first=J.R.M. |editor-link=James Ramsay Montagu Butler |series=History of the Second World War, United Kingdom Military Series |title=Mediterranean and Middle East Volume I: The Early Successes Against Italy (to May 1941) |publisher=Naval &amp; Military Press |location=Uckfield, East Sussex |date=2004 |orig-year=1st pub. [[HMSO]]:1954 |isbn=1-845740-65-3 |display-authors=1}}
}}
==Parameters==
===Syntax===
{{csdoc|syntax}}
===COinS===
{{csdoc|coins}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated}}
===Description===
====Authors====
{{csdoc|author|contributor=yes|others=yes}}
====Title====
{{csdoc|title|title_format=italics}}
{{csdoc|type}}
{{csdoc|chapter}}
{{csdoc|language}}
====Date====
{{csdoc|date}}
====Publisher====
{{csdoc|publisher}}
====Edition, series, volume====
{{csdoc|edition}}
{{csdoc|series}}
{{csdoc|volume}}
====In-source locations====
{{csdoc|pages}}
===={{Anchor|url}}URL====
{{csdoc|url}}
====Chapter URL====
{{csdoc|chapterurl}}
====Anchor====
{{csdoc|ref}}
====Identifiers====
{{csdoc|id1}}
{{csdoc|id2}}
====Quote====
{{csdoc|quote}}
====Editors====
{{csdoc|editor}}
====Laysummary====
{{csdoc|lay}}
====Display options====
{{csdoc|display}}
====Subscription or registration required====
{{csdoc|registration}}
==TemplateData==
See [[Template:Cite book/TemplateData]].
==See also==
* [https://reftag.appspot.com/ Reftag], tool for translating [[Google Books]] permalinks into Wikipedia references
{{Citation Style 1}}
{{Wikipedia referencing}}
{{UF-COinS}}
&lt;includeonly&gt;{{Sandbox other||
&lt;!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --&gt;
[[Category:Citation Style 1 templates|B]]
[[Category:Book templates]]
}}&lt;/includeonly&gt;</text>
<sha1>ifu85x0wwug6ob4ln7wq8ml1jlhfl4c</sha1>
</revision>
</page>
<page>
<title>Template:Collapse bottom</title>
<ns>10</ns>
<id>14588666</id>
<revision>
<id>956571369</id>
<parentid>956569021</parentid>
<timestamp>2020-05-14T03:02:13Z</timestamp>
<contributor>
<username>Barkeep49</username>
<id>299135</id>
</contributor>
<comment>Undid revision 956569021 by [[Special:Contributions/Northamerica1000|Northamerica1000]] ([[User talk:Northamerica1000|talk]]) per the notice that needs to be there</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="166" xml:space="preserve">|}&lt;/div&gt;&lt;noinclude&gt;
{{Documentation|Template:Collapse top/doc}}
&lt;!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --&gt;
&lt;/noinclude&gt;</text>
<sha1>thrcxllb1z8kfhc183yxne30rpzluba</sha1>
</revision>
</page>
<page>
<title>Template:Collapse top</title>
<ns>10</ns>
<id>14588579</id>
<revision>
<id>968142044</id>
<parentid>885089474</parentid>
<timestamp>2020-07-17T14:03:48Z</timestamp>
<contributor>
<username>Izno</username>
<id>2927383</id>
</contributor>
<comment>per tper</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1388" xml:space="preserve">&lt;div style="margin-left:{{{indent|0}}}"&gt;&lt;!-- NOTE: width renders incorrectly if added to main STYLE section --&gt;
{| &lt;!-- Template:Collapse top --&gt; class="mw-collapsible {{{{{|safesubst:}}}#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{{{{|safesubst:}}}#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;"
|-
! style="background: {{{bg|#{{main other|F0F2F5|CCFFCC}}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{{{{|safesubst:}}}#if:{{{left|}}}|left|{{{{{|safesubst:}}}#if:{{{align|}}}|left|center}}}}; {{{{{|safesubst:}}}#if:{{{fc|}}}|color: {{{fc}}};|}}" | &lt;div style="display:inline;font-size:115%"&gt;{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}&lt;/div&gt;
{{{{{|safesubst:}}}#if:{{{warning|{{{2|}}}}}}
|{{{{{|safesubst:}}}!}}-
{{{{{|safesubst:}}}!}} style="text-align:center; font-style:italic;" {{{{{|safesubst:}}}!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }}
|-
| style="border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|White}}};" {{{{{|safesubst:}}}!}}&lt;noinclude&gt;
{{lorem ipsum|3}}
{{Collapse bottom}}
{{Documentation}}
{{Collapse top/TemplateData}}
&lt;/noinclude&gt;</text>
<sha1>0499saf84vfqfe8hu8ka47kg01mfohz</sha1>
</revision>
</page>
<page>
<title>Template:Hover title</title>
<ns>10</ns>
<id>3235839</id>
<revision>
<id>919210453</id>
<parentid>882261753</parentid>
<timestamp>2019-10-02T12:35:52Z</timestamp>
<contributor>
<username>MSGJ</username>
<id>42630</id>
</contributor>
<comment>add class name per request of [[User:Þjarkur]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="345" xml:space="preserve">{{#ifeq:{{{link}}}|yes
|[[{{{2}}}|&lt;span title="{{{1}}}" class="rt-commentedText" {{#ifeq:{{{dotted|yes}}}|no|
|style="border-bottom:1px dotted"
}}&gt;{{{2}}}&lt;/span&gt;]]
|&lt;span title="{{{1}}}" class="rt-commentedText" {{#ifeq:{{{dotted|yes}}}|no|
|style="border-bottom:1px dotted"
}}&gt;{{{2}}}&lt;/span&gt;
}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>8be3d01ppoa3odv1lcqn9qkfcpyapi4</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/time</title>
<ns>10</ns>
<id>34353605</id>
<revision>
<id>870106537</id>
<parentid>636279721</parentid>
<timestamp>2018-11-22T12:22:31Z</timestamp>
<contributor>
<username>Jonesey95</username>
<id>9755426</id>
</contributor>
<comment>fix docs to match module behavior; see [[Help talk:Citation Style 1]] archive for this time stamp</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="281" xml:space="preserve">* '''minutes''': Time the event occurs in the source; followed by "minutes in".
* OR: '''time''': Time the event occurs in the source; preceded by default text "Event occurs at".
** '''time-caption''': Changes the default text displayed before '''time'''. Alias: '''timecaption'''.</text>
<sha1>b5b8j52modbezlizrim38tfrya1hgwr</sha1>
</revision>
</page>
<page>
<title>Template:Cite AV media/doc</title>
<ns>10</ns>
<id>6577859</id>
<revision>
<id>984919423</id>
<parentid>975826464</parentid>
<timestamp>2020-10-22T21:46:25Z</timestamp>
<contributor>
<username>SMcCandlish</username>
<id>378390</id>
</contributor>
<minor/>
<comment>/* Examples */ [[MOS:CAPS]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="13827" xml:space="preserve">{{Documentation subpage}}
{{Ombox
| type = content
| textstyle = font-weight: bold; font-size: 110%;
| text = Do not use this template to cite material that [[WP:V#Copyright and plagiarism|violates copyright law]].&lt;br /&gt;Citations to such material must either be replaced with a non-copyvio source or &lt;u&gt;removed immediately&lt;/u&gt;.
}}{{csdoc|lua}}
{{csdoc|cs1}}
{{csdoc|lead|audio and visual works}} For media in episodic or serial format, use {{tl|cite episode}} or {{tl|cite serial}}. To cite liner notes and other print media associated with audio or visual media, use {{tlx|cite AV media notes}}.
==Usage==
{{csdoc|usage}}
Horizontal list:
&lt;code&gt;&lt;nowiki&gt;{{cite AV media |people= |date= |title= |trans-title= |medium= |language= |url= |access-date= |archive-url= |archive-date= |format= |time= |location= |publisher= |id= |isbn= |oclc= |quote= |ref=}}&lt;/nowiki&gt;&lt;/code&gt;
Vertical format:
{{pre2|&lt;nowiki&gt;{{cite AV media
| people =
| date =
| title =
| trans-title =
| medium =
| language =
| url =
| access-date =
| archive-url =
| archive-date =
| format =
| time =
| location =
| publisher =
| id =
| isbn =
| oclc =
| quote =
| ref =
}}&lt;/nowiki&gt;}}
===Examples===
{{markup2
|m=&lt;nowiki&gt;{{cite AV media | people=Fouladkar, Assad (director) | date=May 15, 2003 | title=Lamma hikyit Maryam | trans-title = When Maryam Spoke Out | medium=Motion picture | location=Lebanon | publisher=Fouladkar, Assad}}&lt;/nowiki&gt;
|r={{cite AV media | people=Fouladkar, Assad (director) | date=May 15, 2003 | title=Lamma hikyit Maryam | trans-title=When Maryam Spoke Out |medium=Motion picture | location=Lebanon | publisher=Fouladkar, Assad}}
}}
==Parameters==
===Syntax===
{{csdoc|syntax}}
{{csdoc|sep_period}}
===COinS===
{{csdoc|coins}}
===Deprecated===
{{csdoc|deprecated|date2=y}}
===Description===
====Authors====
{{csdoc|author|others=yes}}
====Title====
{{csdoc|title|title_format=italics}}
{{csdoc|type}} Use one of the following as applicable: {{xt|Motion picture}}, {{xt|Television production}}, {{xt|Videotape}}, {{xt|DVD}}, {{xt|Blu-ray}}, {{xt|Trailer}}, {{xt|CD}}, {{xt|Radio broadcast}}, {{xt|Podcast}}.
{{csdoc|chapter}}
{{csdoc|language}}
====Date====
{{csdoc|date}}
====Publisher====
{{csdoc|publisher}}
====Edition, series, volume====
{{csdoc|edition}}
{{csdoc|series}}
{{csdoc|volume}}
====In-source locations====
{{csdoc|time}}
{{csdoc|pages}}
====URL====
{{csdoc|url|media=yes}}
====Anchor====
{{csdoc|ref}}
====Identifiers====
{{csdoc|id1}}
{{csdoc|id2}}
====Quote====
{{csdoc|quote}}
====Editors====
{{csdoc|editor}}
====Laysummary====
{{csdoc|lay}}
====Display options====
{{csdoc|display}}
====Subscription or registration required====
{{csdoc|registration}}
{{Citation Style 1}}
{{Wikipedia referencing}}
{{UF-COinS}}
==TemplateData==
{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "This template formats a citation to audiovisual media sources.",
"params": {
"url": {
"label": "URL",
"description": "The URL of the online location where the media can be found",
"type": "string",
"suggested": true,
"aliases": [
"URL"
]
},
"title": {
"label": "Source title",
"description": "The title of the source page on the website; displays in italics",
"type": "string",
"suggested": true
},
"last": {
"label": "Author last name",
"description": "The surname of the author; Do not wikilink - use author-link instead.",
"aliases": [
"author",
"author1",
"authors",
"last1",
"people"
],
"suggested": true,
"type": "string"
},
"first": {
"label": "Author first name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink",
"aliases": [
"first1"
],
"suggested": true,
"type": "string"
},
"date": {
"label": "Source date",
"description": "Full date of the source; do not wikilink",
"type": "date",
"suggested": true
},
"publisher": {
"label": "Publisher",
"description": "Name of the publisher; displays after title",
"type": "string"
},
"year": {
"label": "Year",
"description": "Year of source being referenced. Do not use in combination with 'Source date'.",
"type": "number"
},
"language": {
"label": "Language",
"description": "The language the source is written in, if not English. Displays in parentheses with \"in\" before the language name. Use the full language name or ISO 639-1 code.",
"type": "string",
"suggested": true
},
"trans-title": {
"label": "English translation of title",
"description": "The English translation of the title if the source cited is in a foreign language. Displays in square brackets after title. Use with the language parameter.",
"type": "string"
},
"author-link": {
"aliases": [
"authorlink1",
"authorlink",
"author1-link",
"author1link"
],
"label": "Author article title",
"description": "Title of existing Wikipedia article about the author — not the author's website.",
"type": "wiki-page-name"
},
"others": {
"label": "Other contributors",
"description": "Other contributors to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'.",
"type": "string"
},
"type": {
"label": "Media type",
"description": "Media type of the source; format in sentence case. Displays in parentheses following the title. Use one of the following as applicable: Motion picture, Television production, Videotape, DVD, Trailer, Video game, CD, Radio broadcast, Podcast.",
"type": "string",
"suggested": true
},
"orig-year": {
"label": "Original publication year",
"description": "Original publication year; displays after the date or year. For clarity, please supply specifics - such as 'First published 1859'.",
"type": "string"
},
"place": {
"aliases": [
"location"
],
"label": "Place of publication",
"description": "Geographical place of publication; generally not wikilinked; omit when the name of the work includes the location.",
"type": "string"
},
"publication-place": {
"label": "Place of publication (Alternate)",
"description": "If any one of publication-place, place or location are defined, then the location shows after the title; if publication-place and place or location are defined, then place or location are shown before the title prefixed with \"written at\" and publication-place is shown after the title.",
"type": "string"
},
"edition": {
"label": "Edition",
"description": "When the publication has more than one edition; for example: \"2nd\", \"Revised\", and so forth. Appends \" ed.\" after the field.",
"type": "string"
},
"series": {
"aliases": [
"version"
],
"label": "Series",
"description": "When the source is part of a series, such as a book series or a journal where the issue numbering has restarted",
"type": "string"
},
"volume": {
"label": "Volume",
"description": "For one publication published in several volumes. Displays after the title and series fields; displays in bold",
"type": "string"
},
"minutes": {
"label": "In-source location: Minutes",
"description": "Time the event occurs in the source; followed by \"minutes in\". ",
"type": "number"
},
"time": {
"label": "In-source location: Time",
"description": "Time the event occurs in the source; preceded by default text \"Event occurs at time\". ",
"type": "string"
},
"time-caption": {
"aliases": [
"timecaption"
],
"label": "In-source location: Time caption",
"description": "Changes the default text displayed before time",
"type": "string"
},
"page": {
"label": "In-source location: Page",
"description": "The number of a single page in the source that supports the content. Use 'pages' instead for a range of pages.",
"type": "number"
},
"at": {
"label": "In-source location: At",
"description": "For when other in-source locations are inappropriate or insufficient.",
"type": "string"
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "URL: Access date",
"description": "Full date when the contents pointed to by url was last verified to support the text in the article; do not wikilink",
"type": "date"
},
"archive-url": {
"aliases": [
"archiveurl"
],
"label": "URL: Archive URL",
"description": "The URL of an archived copy of a web page, if or in case the url becomes unavailable. ",
"type": "string"
},
"archive-date": {
"aliases": [
"archivedate"
],
"label": "URL: Archive date",
"description": "Date when the original URL was archived; preceded by default text \"archived from the original on\". Use the same format as other access and archive dates in the citations.",
"type": "date"
},
"dead-url": {
"aliases": [
"deadurl"
],
"label": "URL: Original is dead",
"description": "When the URL is still live, but pre-emptively archived, set to No. This changes the display order with the title retaining the original link and the archive linked at the end",
"type": "string"
},
"format": {
"label": "Format",
"description": "Format of the work referred to by url; for example: PDF, DOC, or XLS; displayed in parentheses after title. HTML is implied and should not be specified. Does not change the external link icon.",
"type": "string"
},
"ref": {
"label": "Anchor ID",
"description": "Generates anchor with the given ID, allowing it to be made the target of wikilinks to full references. The special value 'harv' generates an anchor suitable for the harv template.",
"type": "string"
},
"id": {
"label": "Identifier",
"description": "A unique identifier, used where none of the specialized identifiers are applicable",
"type": "string"
},
"arxiv": {
"label": "Identifier: arXiv",
"description": "arXiv identifier; for example: arxiv=hep-th/9205027 (before April 2007) or arxiv=0706.0001 (since April 2007). Do not include extraneous file extensions like \".pdf\" or \".html\".",
"type": "string"
},
"asin": {
"label": "Identifier: ASIN",
"description": "Amazon Standard Identification Number; if first character of asin value is a digit, use isbn. ",
"type": "string"
},
"bibcode": {
"label": "Identifier: Bibcode",
"description": "Bibcode; used by a number of astronomical data systems; for example: 1974AJ.....79..819H",
"type": "string"
},
"doi": {
"label": "Identifier: DOI",
"description": "Digital object identifier; for example: 10.1038/news070508-7. It is checked to ensure it begins with 10.",
"type": "string"
},
"isbn": {
"label": "Identifier: ISBN",
"description": " International Standard Book Number; for example: 978-0-8126-9593-9. Dashes in the ISBN are optional, but preferred. Use the ISBN actually printed on or in the book. Use the 13-digit ISBN – beginning with 978 or 979 – when it is available.",
"type": "string"
},
"issn": {
"label": "Identifier: ISSN",
"description": "International Standard Serial Number; eight characters may be split into two groups of four using a hyphen, but not an en dash or a space.",
"type": "string"
},
"jfm": {
"label": "Identifier: JFM",
"description": "Jahrbuch über die Fortschritte der Mathematik",
"type": "string"
},
"jstor": {
"label": "Identifier: JSTOR",
"description": "JSTOR abstract; for example: \"3793107\"",
"type": "number"
},
"lccn": {
"label": "Identifier: LCCN",
"description": "Library of Congress Control Number. When present, alphabetic prefix characters are to be lower case.",
"type": "string"
},
"mr": {
"label": "Identifier: Mathematical Reviews",
"type": "string"
},
"oclc": {
"label": "Identifier: OCLC",
"description": "Online Computer Library Center",
"type": "string"
},
"ol": {
"label": "Identifier: Open Library",
"description": "Open Library identifier; do not include \"OL\" in the value.",
"type": "number"
},
"osti": {
"label": "Identifier: OSTI",
"description": "Office of Scientific and Technical Information",
"type": "string"
},
"pmc": {
"label": "Identifier: PMC",
"description": "PubMed Central; use article number for full-text free repository of a journal article, e.g. 345678. Do not include \"PMC\" in the value",
"type": "number"
},
"pmid": {
"label": "Identifier: PMID",
"description": "PubMed; use unique identifier",
"type": "number"
},
"rfc": {
"label": "Identifier: RFC",
"description": "Request for Comments",
"type": "number"
},
"ssrn": {
"label": "Identifier: SSRN",
"description": "Social Science Research Network",
"type": "string"
},
"zbl": {
"label": "Identifier: ZBL",
"type": "string"
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source. Displays enclosed in quotes. When supplied, the citation terminator (a period by default) is suppressed, so the quote needs to include terminating punctuation.",
"type": "string"
}
},
"paramOrder": [
"url",
"title",
"date",
"last",
"first",
"type",
"language",
"publisher",
"year",
"trans-title",
"author-link",
"others",
"place",
"orig-year",
"publication-place",
"edition",
"series",
"volume",
"minutes",
"time",
"time-caption",
"page",
"at",
"access-date",
"archive-url",
"archive-date",
"dead-url",
"format",
"ref",
"id",
"arxiv",
"asin",
"bibcode",
"doi",
"isbn",
"issn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"quote"
]
}
&lt;/templatedata&gt;
&lt;includeonly&gt;{{Sandbox other||
[[Category:Citation Style 1 templates|A]]
}}&lt;/includeonly&gt;</text>
<sha1>ls6fvve198rqov4oyyixfmcnnxeceza</sha1>
</revision>
</page>
<page>
<title>Template:Pre2</title>
<ns>10</ns>
<id>15949932</id>
<revision>
<id>964613753</id>
<parentid>964595653</parentid>
<timestamp>2020-06-26T14:52:13Z</timestamp>
<contributor>
<username>Great Brightstar</username>
<id>17692702</id>
</contributor>
<comment>Minor fix</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="551" xml:space="preserve">&lt;pre&lt;includeonly&gt;&lt;/includeonly&gt; style="{{#ifeq:{{{1}}}|scroll|overflow:auto; white-space:pre; width:auto; {{#ifeq:{{{border|}}}|no|border:none !important;}} {{{style|}}}"&gt;{{#switch:{{{2}}}|nowiki|nw={{#tag:nowiki|{{{3}}}}}|{{{2}}}}}|white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;{{{style|}}}"&gt;{{#switch:{{{1}}}|nowiki|nw={{#tag:nowiki|{{{2}}}}}|{{{1}}}}} }}&lt;/pre&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --&gt;
&lt;/noinclude&gt;</text>
<sha1>mzm8xqcc8ehb6r4y4nkyufxkjmr7k7u</sha1>
</revision>
</page>
<page>
<title>Template:Abbr</title>
<ns>10</ns>
<id>2557713</id>
<revision>
<id>976320897</id>
<parentid>729977787</parentid>
<timestamp>2020-09-02T09:46:47Z</timestamp>
<contributor>
<username>Primefac</username>
<id>11508456</id>
</contributor>
<comment>remove third parameter, as it is causing lint issues (TPER)</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="245" xml:space="preserve">&lt;abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&amp;quot;}}}}"&gt;{{{1|}}}&lt;/abbr&gt;&lt;noinclude&gt;{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>b6zvtcrye54kh0akzk3y1jq9lxg4lm6</sha1>
</revision>
</page>
<page>
<title>Template:Cascade-protected template</title>
<ns>10</ns>
<id>59283434</id>
<revision>
<id>955080628</id>
<parentid>908813307</parentid>
<timestamp>2020-05-05T21:25:55Z</timestamp>
<contributor>
<username>Denimalt</username>
<id>38859708</id>
</contributor>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1246" xml:space="preserve">{{protected page text
| image = Cascade-protection-shackle.svg
| protection-message = This {{{page|template}}} is [[Wikipedia:Transclusion|transcluded]] in one or more [[Wikipedia:Protection policy#Cascading protection|cascade-protected]] pages, therefore only [[Wikipedia:Administrators|administrators]] can edit it.
| suggestions = {{{suggestions|}}}
| protection-reason = Cascading protection is used to prevent vandalism to particularly visible pages, such as the [[Main Page]] and a few [[Wikipedia:High-risk templates|very highly used templates]].
| log-text = This page is [[Wikipedia:Transclusion|transcluded]] in one or more pages protected with the "[[Wikipedia:Protection policy#Cascading protection|cascading]]" option. If you "View source" on (attempt to edit) this page, the automatically generated version of the protection notice on the editing page will include a list of the cascade-protected pages that transclude this one.
| template-links = yes
| who-can-edit = An [[Wikipedia:Administrators|administrator]]
| request-type = full
| hide-requestlower = yes&lt;!--Because such requests are automatically declined for cascade-protected templates.--&gt;
}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>r6w3zrb0mtw6fcpm5cy8lzht0px0euo</sha1>
</revision>
</page>
<page>
<title>Template:Category handler</title>
<ns>10</ns>
<id>25084818</id>
<revision>
<id>874046584</id>
<parentid>577959188</parentid>
<timestamp>2018-12-16T20:13:00Z</timestamp>
<contributor>
<username>Amorymeltzer</username>
<id>141948</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Category handler]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="148" xml:space="preserve">{{#invoke:Category handler|main}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, and interwikis to Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>og6fhyj2ssd4fmzpqzuodk12q3cms0z</sha1>
</revision>
</page>
<page>
<title>Template:Citation/doc</title>
<ns>10</ns>
<id>9408494</id>
<revision>
<id>989359174</id>
<parentid>989359002</parentid>
<timestamp>2020-11-18T15:09:10Z</timestamp>
<contributor>
<username>Oshawott 12</username>
<id>32349500</id>
</contributor>
<minor/>
<comment>Reverted 1 edit by [[Special:Contributions/2804:D55:52B1:3900:F433:2C7F:B915:44CB|2804:D55:52B1:3900:F433:2C7F:B915:44CB]] ([[User talk:2804:D55:52B1:3900:F433:2C7F:B915:44CB|talk]]) to last revision by Izno</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="63602" xml:space="preserve">{{Documentation subpage}}
&lt;!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --&gt;
{{for2|the{{nbsp}} {{fake citation needed}} template|{{tl|citation needed}}}}
{{#ifeq: {{PAGENAME}}|{{ROOTPAGENAME}}|{{Cascade-protected template}}}}
{{#ifeq: {{PAGENAME}}|{{ROOTPAGENAME}}|{{High-risk|189000+}}}}
{{csdoc|lua|lua=yes}}
The '''Citation''' template generates a citation for a book, periodical, contribution in a collective work, or a web page. It determines the citation type by examining which parameters are used. As with other citation templates, this template can be used either in a footnote (between {{tag|ref}} tags) or in a section that lists sources. This template uses the same [[WP:Lua|Lua]] code as [[help:Citation Style 1|citation style 1 (CS1)]] templates with parameters to change the displayed format to [[help:Citation Style 2|citation style 2 (CS2)]].
If the correct parameters are used, this template produces output identical to that of the Cite templates, such as {{Tl|Cite book}} and {{Tl|Cite web}}, with one important exception: By default, this Citation template uses commas in places where the Cite templates use periods (full stops) by default; either type of template can use periods (full stops) or commas by using an optional parameter.
Regardless of which citation templates are used or even if none are used at all, all citations should have the same format throughout an article in the saved, rendered text.
Note: All parameter names must be [[lowercase]].
==Simple citations==
This section covers the most commonly used parameters. You can copy the horizontal form or vertical form below and then add in extra parameters from the full list. Spacing and ordering of the parameters within the template is irrelevant and does not affect the final, rendered text.
&lt;code&gt;&lt;nowiki&gt;{{Citation |last= |first= |year= |title= |publisher= |publication-place= |page= |url= |access-date=}}&lt;/nowiki&gt;&lt;/code&gt;
{| class="wikitable"
|-
| &lt;pre&gt;{{Citation
| last =
| first =
| year =
| title =
| publisher =
| publication-place =
| page =
| url =
| access-date =
}}&lt;/pre&gt;
|}
* '''last''': The author's surname or last name. Don't use with the '''author''' parameter.
* '''first''': The author's first or given name(s).
* '''year''': Year of authorship or publication. Mandatory for use with links from [[:Template:Harvard citation]], unless {{para|date}} specifies both month and year.
* '''title''': Title of the work. Mandatory for web references.
* '''publisher''': The name of the publisher. Omit terms such as ''Publishers'', ''Co.'', ''Inc.'', ''Ltd.'', etc., but retain the words ''Books'' or ''Press''. Not normally included where the publication is a periodical which has its own Wikipedia article (e.g. ''[[Newsweek]]'', ''[[Billboard (magazine)|Billboard]]'').
** '''publication-place''' (or '''place''' or '''location'''): The city of publication. If more than one town/city is listed on the title page, give the first one or the location of the publisher's head office. Omit when the publication is a periodical whose name specifies the location (e.g. ''The New York Times'', ''The Times of India'')
* '''page''': For use when one page is cited. Adds "p." before the page number. Do not use with '''pages'''.
* '''url''': A [[Uniform resource locator|url]] of an online location where the item can be found. If the url includes double quotes, these must be encoded as "%22".
** '''access-date''': Date&lt;ref group="n" name="dates" /&gt; when the url was accessed.
===Example===
{| class="wikitable"
|-
| &lt;pre&gt;{{Citation
| last = Turner
| first = Orsamus
| title = History of the pioneer settlement of
Phelps and Gorham's purchase, and Morris' reserve
| publisher = William Alling
| place = Rochester, New York
| year = 1851
| ol = 7120924W
}}
&lt;/pre&gt;
| {{Citation
| last = Turner
| first = Orsamus
| title = History of the pioneer settlement of Phelps and Gorham's purchase, and Morris' reserve
| publisher = William Alling
| place = Rochester, New York
| year = 1851
| ol = 7120924W
}}
|}
==Full citation parameters==
These can be used for all types of publication. All are optional and indentation is used simply to group related items&amp;nbsp;— these may be mutually exclusive where indicated. Some hyphenated names can also be placed without hyphens.
{| class="wikitable"
|-
| &lt;pre&gt;{{Citation
| author =
| last =
| first =
| author2 =
| last2 =
| first2 =
| author-link =
| author2-link =
| author-separator =
| author-name-separator =
| author-mask =
| display-authors =
| editor =
| editor-last =
| editor-first =
| editor2 =
| editor2-last =
| editor2-first =
| editor-link =
| editor2-link =
| translator-last =
| translator-first =
| translator-link =
| translator2-last =
| translator2-first =
| translator2-link =
| others =
| publication-date =
| date =
| year =
| origyear =
| title =
| chapter =
| chapter-url =
| chapter-format =
| contribution =
| contribution-url =
| type =
| journal =
| periodical =
| newspaper =
| magazine =
| encyclopedia =
| work =
| edition =
| series =
| volume =
| issue =
| publisher =
| publication-place =
| place =
| language =
| page =
| pages =
| nopp =
| at =
| id =
| isbn =
| issn =
| oclc =
| pmid =
| pmc =
| bibcode =
| doi =
| doi-inactive-date=
| zbl =
| url =
| access-date =
| format =
| archive-url =
| archive-date =
| url-status =
| quote =
| layurl =
| laysource =
| laydate =
| separator =
| postscript =
| ref =
}}
&lt;/pre&gt;
|}
==Parameters==
===Syntax===
{{csdoc|syntax|lua=yes}}
{{csdoc|sep_comma|lua=yes}}
===COinS===
{{csdoc|coins|lua=yes}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated|lua=yes}}
===Description===
====Authors====
{{csdoc|author|lua=yes||contributor=yes|others=yes}}
====Editors====
{{csdoc|editor|lua=yes}}
====Title====
{{csdoc|title|lua=yes|title_format=italics}}
{{csdoc|chapter|lua=yes}}
{{csdoc|type|lua=yes}}
{{csdoc|language|lua=yes}}
====Date====
{{csdoc|date|lua=yes}}
====Work====
{{csdoc|journal|lua=yes}}
====Publisher====
{{csdoc|publisher|lua=yes}}
====Edition, series, volume====
{{csdoc|edition|lua=yes}}
{{csdoc|series|lua=yes}}
{{csdoc|volume|lua=yes}}
====In-source locations====
{{csdoc|pages|lua=yes}}
====URL====
{{anchor|url}}{{csdoc|url}}
====Chapter URL====
{{anchor|chapterurl}}{{csdoc|chapterurl|lua=yes}}
====Anchor====
{{csdoc|ref|lua=yes}}
====Identifiers====
{{anchor|id1}}{{csdoc|id1|lua=yes}}
{{anchor|id2}}{{csdoc|id2|lua=yes}}
====Quote====
{{csdoc|quote|lua=yes|cs2=yes}}
====Laysummary====
{{csdoc|lay|lua=yes}}
====Display options====
{{csdoc|display|lua=yes|cs2=yes}}
====Subscription or registration required====
{{csdoc|registration|lua=yes}}
==Examples==
===Books===
{| class="wikitable"
|-
| Three authors, a volume, and an edition. Ampersand (&amp;amp;) forced before final author's name.
| &lt;pre&gt;{{Citation
| last1 = Lincoln
| first1 = A.
| last2 = Washington
| first2 = G.
| last3 = Adams
| first3 = J.
| name-list-style = amp
| title = All the Presidents' Names
| publisher = The Pentagon
| place = Home Base, New York
| volume = XII
| edition = 2nd
| year = 2007
}}
&lt;/pre&gt;
| {{Citation
| last1 = Lincoln
| first1 = A.
| last2 = Washington
| first2 = G.
| last3 = Adams
| first3 = J.
| name-list-style = amp
| title = All the Presidents' Names
| publisher = The Pentagon
| place = Home Base, New York
| volume = XII
| edition = 2nd
| year = 2007
}}
|}
===Web===
{| class="wikitable"
|-
| Web page
| &lt;pre&gt;{{Citation
| url = http://nrhp.focus.nps.gov/
| title = NPS Focus
| work = National Register of Historic Places
| publisher = [[National Park Service]]
| access-date = November 30, 2010
| ref = none
}}
&lt;/pre&gt;
| {{Citation
| url = http://nrhp.focus.nps.gov/
| title = NPS Focus
| work = National Register of Historic Places
| publisher = [[National Park Service]]
| access-date = November 30, 2010
| ref = none
}}
|-
| Archived page
| &lt;pre&gt;{{Citation
| url = http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html
| title = Earth's Atmosphere
| access-date = October 25, 2007
| publisher = [[National Aeronautics and Space Administration]]
| year = 1995
| author = NASA
| archive-url = https://web.archive.org/web/20071013232332/http://
liftoff.msfc.nasa.gov/academy/space/atmosphere.html
| archive-date = October 13, 2007
}}
&lt;/pre&gt;
| {{Citation | url = http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | title = Earth's Atmosphere | access-date = October 25, 2007 | publisher = [[National Aeronautics and Space Administration]] | year = 1995 | author = NASA | archive-url = https://web.archive.org/web/20071013232332/http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | archive-date = October 13, 2007}}
|}
===Journals, newspapers, magazines, or other periodicals===
{| class="wikitable"
|-
| Journal article
| &lt;pre&gt;{{Citation
| last = Hill
| first = Marvin S.
| title = Joseph Smith and the 1826
Trial: New Evidence and New
Difficulties
| journal = BYU Studies
| volume = 12
| issue = 2
| year = 1976
| pages = 1–8
| url = https://byustudies.byu.edu/shop/PDFSRC/12.2Hill.pdf
}}
&lt;/pre&gt;
| {{Citation
| last = Hill
| first = Marvin S.
| title = Joseph Smith and the 1826 Trial: New Evidence and New Difficulties
| journal = BYU Studies
| volume = 12
| issue = 2
| year = 1976
| pages = 1–8
| url = https://byustudies.byu.edu/shop/PDFSRC/12.2Hill.pdf
}}
|-
| Journal article with multiple authors and identifier
| &lt;pre&gt;{{Citation
| last1 = Mandelkern
| first1 = M
| last2 = Elias
| first2 = J
| last3 = Eden
| first3 = D
| last4 = Crothers
| first4 = D
| display-authors = 2
| title = The dimensions of DNA in solution
| journal = J Mol Biol
| volume = 152
| issue = 1
| pages = 153–161
| year = 1981
| pmid = 7338906
| doi = 10.1016/0022-2836(81)90099-1
}}
&lt;/pre&gt;
| {{Citation
| last1 = Mandelkern
| first1 = M
| last2 = Elias
| first2 = J
| last3 = Eden
| first3 = D
| last4 = Crothers
| first4 = D
| display-authors = 2
| title = The dimensions of DNA in solution
| journal = J Mol Biol
| volume = 152
| issue = 1
| pages = 153–161
| year = 1981
| pmid = 7338906
| doi = 10.1016/0022-2836(81)90099-1
}}
|-
| Newspaper article
| &lt;pre&gt;{{Citation
| last = Smith
| first = Joseph III
| author-link = Joseph Smith III
| title = Last Testimony of Sister Emma
| newspaper = The Saints' Herald
| location = Plano, IL
| volume = 26
| issue = 19
| date = October 1, 1879
| page = 289
| url = http://www.sidneyrigdon.com/dbroadhu/
IL/sain1872.htm#100179
}}
&lt;/pre&gt;
| {{Citation
| last = Smith
| first = Joseph III
| author-link = Joseph Smith III
| title = Last Testimony of Sister Emma
| newspaper = The Saints' Herald
| location = Plano, IL
| volume = 26
| issue = 19
| date = October 1, 1879
| page = 289
| url = http://www.sidneyrigdon.com/dbroadhu/IL/sain1872.htm#100179
}}
|}
===Conference papers and public lectures===
{| class="wikitable"
|-
| Conference paper
| &lt;pre&gt;{{Citation
| last = Sullivan
| first = D.B.
| contribution = Time and frequency measurement
at NIST: The first 100 years
| year = 2001
| title = 2001 IEEE Int'l Frequency Control Symp.
| publisher = National Institute of Standards and Technology
| contribution-url = http://tf.nist.gov/timefreq/general/pdf/1485.pdf
}}
&lt;/pre&gt;
| {{Citation
| last = Sullivan
| first = D.B.
| contribution = Time and frequency measurement at NIST: The first 100 years
| year = 2001
| title = 2001 IEEE Int'l Frequency Control Symp.
| publisher = National Institute of Standards and Technology
| contribution-url = http://tf.nist.gov/timefreq/general/pdf/1485.pdf
}}
|-
| Lecture
| &lt;pre&gt;{{Citation
| last = Habicht
| first = Christian
| contribution = Hellenistic Athens and her Philosophers
| year = 1988
| title = David Magie Lecture, Princeton University Program in the History, Archaeology, and Religions of the Ancient World
| publisher = Princeton University
| page=14
}}
&lt;/pre&gt;
|{{Citation
| last = Habicht
| first = Christian
| contribution = Hellenistic Athens and her Philosophers
| year = 1988
| title = David Magie Lecture, Princeton University Program in the History, Archaeology, and Religions of the Ancient World
| publisher = Princeton University
| page=14
}}
|}
===Parts of books, including encyclopedia articles===
{| class="wikitable"
|-
|Manuscript published in an edited compilation
|&lt;pre&gt;{{Citation
| last = Bidamon
| first = Emma Smith
| author-link = Emma Hale Smith
| chapter = Letter to Emma S. Pilgrim
| date = March 27, 1876
| editor-last = Vogel
| editor-first = Dan
| title = Early Mormon Documents
| volume = 1
| publisher = Signature Books
| publication-date = 1996
| isbn = 1-56085-072-8
}}
&lt;/pre&gt;
| {{Citation
| last = Bidamon
| first = Emma Smith
| author-link = Emma Hale Smith
| chapter = Letter to Emma S. Pilgrim
| date = March 27, 1876
| editor-last = Vogel
| editor-first = Dan
| title = Early Mormon Documents
| volume = 1
| publisher = Signature Books
| publication-date = 1996
| isbn = 1-56085-072-8
}}
|-
| Work with an editor but no author
| &lt;pre&gt;{{Citation
| editor-last = Vogel
| editor-first = Dan
| title = Early Mormon Documents
| volume = 1
| publisher = Signature Books
| date = 1996
| isbn = 1-56085-072-8
}}
&lt;/pre&gt;
| {{Citation
| editor-last = Vogel
| editor-first = Dan
| title = Early Mormon Documents
| volume = 1
| publisher = Signature Books
| date = 1996
| isbn = 1-56085-072-8
}}
|-
| Encyclopedia article by a named author
| &lt;pre&gt;{{Citation
| last = Kramer
| first = Martin
| author-link = Martin Kramer
| year=1999
| title = Bernard Lewis
| editor-last = Boyd
| editor-first = Kelley
| encyclopedia = Encyclopedia of Historians and Historical Writing
| volume = 1
| pages = 719–720
| location = London
| publisher = Fitzroy Dearborn
| url = http://www.geocities.com/martinkramerorg/BernardLewis.htm
}}
&lt;/pre&gt;
| {{Citation
| last = Kramer
| first = Martin
| author-link = Martin Kramer
| year = 1999
| title = Bernard Lewis
| editor-last = Boyd
| editor-first = Kelley
| encyclopedia = Encyclopedia of Historians and Historical Writing
| volume = 1
| pages = 719–720
| location = London
| publisher = Fitzroy Dearborn
| url = http://www.geocities.com/martinkramerorg/BernardLewis.htm
}}
|-
| Encyclopedia article with no named author
| &lt;pre&gt;{{Citation
| title = Bernard Lewis
| editor-last = Boyd
| editor-first = Kelley
| year = 1999
| encyclopedia = Encyclopedia of Historians
and Historical Writing
| volume = 1
| pages = 719–720
| publisher = Fitzroy Dearborn
| location = London
| url = http://www.geocities.com/martinkramerorg/BernardLewis.htm
}}
&lt;/pre&gt;
| {{Citation
| title = Bernard Lewis
| editor-last = Boyd
| editor-first = Kelley
| year = 1999
| encyclopedia = Encyclopedia of Historians and Historical Writing
| volume = 1
| pages = 719–720
| location = London
| publisher = Fitzroy Dearborn
| url = http://www.geocities.com/martinkramerorg/BernardLewis.htm
}}
|}
===Republications, or edited quotations in a periodical article===
{| class="wikitable"
|-
| Manuscript edited and published in a journal
| &lt;pre&gt;{{Citation
| last = Knight
| first = Joseph, Sr.
| year = 1833
| editor-last = Jessee
| editor-first = Dean
| title = Joseph Knight's Recollection
of Early Mormon History
| journal = BYU Studies
| volume = 17
| issue = 1
| publication-date = 1976
| page = 35
| url = https://byustudies.byu.edu/shop/PDFSRC/17.1Jessee.pdf
}}&lt;/pre&gt;
| {{Citation
| last = Knight
| first = Joseph, Sr.
| year = 1833
| editor-last = Jessee
| editor-first = Dean
| title = Joseph Knight's Recollection of Early Mormon History
| journal = BYU Studies
| volume = 17
| issue = 1
| publication-date = 1976
| page = 35
| url = https://byustudies.byu.edu/shop/PDFSRC/17.1Jessee.pdf
}}
|-
| Manuscript written at one date and place, then published in a periodical at a different date and place with commentary by the editor.
| &lt;pre&gt;{{Citation
| last = Klingensmith
| first = Philip
| type = Affidavit
| date = September 5, 1872
| place = Lincoln County, Nevada
| title = Mountain Meadows Massacre
| editor-last = Toohy
| editor-first = Dennis J.
| journal = Corinne Daily Reporter
| publication-date = September 24, 1872
| publication-place = Corinne, Utah
| volume = 5
| issue = 252
| page = 1
| url = http://udn.lib.utah.edu/u?/corinne,5359
}}
&lt;/pre&gt;
| {{Citation
| last = Klingensmith
| first = Philip
| type = Affidavit
| date = September 5, 1872
| place = Lincoln County, Nevada
| title = Mountain Meadows Massacre
| editor-last = Toohy
| editor-first = Dennis J.
| journal = Corinne Daily Reporter
| publication-date = September 24, 1872
| publication-place = Corinne, Utah
| volume = 5
| issue = 252
| page = 1
| url = http://udn.lib.utah.edu/u?/corinne,5359
}}
|}
===Press release===
{| class="wikitable"
|-
| Press release with quotation
| &lt;pre&gt;{{Citation
| url = https://www.apple.com/pr/library/2010/04/05ipad.html
| title = Apple Sells Over 300,000 iPads First Day
| publisher = Apple Inc
| access-date = April 10, 2010
| quote = in the US as of midnight Saturday, April 3
| ref = none}}
&lt;/pre&gt;
| {{Citation
| url = https://www.apple.com/pr/library/2010/04/05ipad.html
| title = Apple Sells Over 300,000 iPads First Day
| publisher = Apple Inc
| access-date = April 10, 2010
| quote = in the US as of midnight Saturday, April 3
| ref = none}}
|}
==Anchored citations==
This template can generate a citation that can be combined with [[WP:CITESHORT|shortened footnotes]] or [[Wikipedia:Parenthetical referencing|parenthetical referencing]]. It does this by creating an [[HTML element#Anchor|HTML anchor]] containing an ID. The special parameter {{para|ref|harv}} generates an ID suitable for [[Harvard referencing]] templates such as {{tl|harv}} as specified in the next section; this is the default for the {{tl|citation}} template.
To disable anchor generation, specify {{para|ref|none}} (in contrast, other Cite templates such as {{tl|cite book}} and {{tl|cite news}} do not create an anchor by default). You can also specify the ID directly, using the {{para|ref|&lt;var&gt;ID&lt;/var&gt;}} parameter. For example, suppose an article's ''References'' section contains the markup:
* &lt;code&gt;&lt;nowiki&gt;{{Citation |author=Sigmund Freud |title=Civilization and Its Discontents |year=1930 |ref=CivDis}}&lt;/nowiki&gt;&lt;/code&gt;
which generates the citation:
* {{Citation |author=Sigmund Freud |title=Civilization and Its Discontents |year=1930 |ref=CivDis}}
Then, the markup "&lt;code&gt;&lt;nowiki&gt;([[#CivDis|Freud 1930]])&lt;/nowiki&gt;&lt;/code&gt;" generates a parenthetical reference "([[#CivDis|Freud 1930]])" containing a wikilink to the citation (try clicking on the wikilink).
===Anchors for Harvard referencing templates===
IDs compatible with Harvard referencing templates such as {{tl|harv}} are computed from the last names of the authors (or editors, if no authors are given) and the year of the cited source. For example, the markup "&lt;code&gt;&lt;nowiki&gt;{{harv|Wright|Evans|1851|p=ix}}&lt;/nowiki&gt;&lt;/code&gt;" generates the Harvard reference "{{harv|Wright|Evans|1851|p=ix}}", which wikilinks to the citation whose markup and appearance are shown below:
* &lt;code&gt;&lt;nowiki&gt;{{Citation |last1=Wright |first1=Thomas |last2=Evans |first2=R. H. |title=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |publisher=Henry G. Bohn |year=1851 |oclc=59510372}}&lt;/nowiki&gt;&lt;/code&gt;
* {{Citation |last1=Wright |first1=Thomas |last2=Evans |first2=R. H. |title=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |publisher=Henry G. Bohn |year=1851 |oclc=59510372}}
In this example the {{tl|citation}} template defines, and the {{tl|harv}} template uses, the HTML ID "&lt;code&gt;CITEREFWrightEvans1851&lt;/code&gt;", composed by concatenating the string "&lt;code&gt;CITEREF&lt;/code&gt;" with the last names of the authors and the year. The {{tl|harvid}} template can be used to generate such IDs, for example, &lt;code&gt;&lt;nowiki&gt;{{harvid|Wright|Evans|1851}}&lt;/nowiki&gt;&lt;/code&gt; generates "&lt;code&gt;{{harvid|Wright|Evans|1851}}&lt;/code&gt;".
Related methods which leave only a number in the text are to use the {{tl|harvnb}} template enclosed in the &lt;nowiki&gt;&lt;ref&gt;&lt;/ref&gt;&lt;/nowiki&gt; html code, or to use the {{tl|sfn}} template alone. The example above would be &lt;code&gt;&lt;nowiki&gt;&lt;ref&gt;{{harvnb|Wright|Evans|1851|p=ix}}&lt;/ref&gt;&lt;/nowiki&gt;&lt;/code&gt; or &lt;code&gt;&lt;nowiki&gt;{{sfn|Wright|Evans|1851|p=ix}}&lt;/nowiki&gt;&lt;/code&gt; both of which generate a footnote, such as
:17. {{harvnb|Wright|Evans|1851|p=ix}}
The names of only the first four authors are used; other author names are not concatenated to the ID. If no author names are given, editor names are used instead.
Last names are used, as specified by the parameters {{para|last1}} (or {{para|last}}), {{para|last2}}, {{para|last3}}, and {{para|last4}}, and similarly for {{para|editor1-last}} etc. and for {{para|inventor1-last}} etc. If a full name is given but no last name is specified, this template falls back on the full name, but this usage is not recommended. For example, in "&lt;code&gt;&lt;nowiki&gt;{{Citation | author = Sigmund Freud | title = The Ego and the Id | year = 1923}}&lt;/nowiki&gt;&lt;/code&gt;" no last name is given, so this citation cannot be combined with the Harvard reference "&lt;code&gt;&lt;nowiki&gt;{{harv|Freud|1923}}&lt;/nowiki&gt;&lt;/code&gt;". To make these {{tl|citation}} and {{tl|harv}} invocations compatible, either replace "{{para|author|Sigmund Freud}}" with "{{para|first|Sigmund}} {{para|last|Freud}}", or add "{{para|ref|&lt;nowiki&gt;{{harvid|Freud|1923}}&lt;/nowiki&gt;}}" to the {{tl|citation}} invocation, or add the same ref parameter (say, "{{para|ref|EgoId}}") to both the {{tl|citation}} and the {{tl|harv}} invocations.
Similarly, the year is used, as specified by {{para|year}}. If no year is given, this template attempts to derive the year from {{para|date}} (or, if no date is given, from {{para|publication-date}}) by applying the [[mw:Help:Extension:ParserFunctions##time|MediaWiki §&amp;nbsp;Time function]]. This heuristic works with many common date formats (American, International and [[ISO 8601#Calendar dates|ISO 8601 standard format]] YYYY-MM-DD as listed in [[WP:MOS]]), but may not work as expected with other formats, so when in doubt it may be safer to use {{para|year}}. Note that if only a year, say 2005, is known you must use {{para|year|2005}} rather than {{para|date|2005}}.
===IDs must be unique===
Names, years, and hand-specified IDs must be chosen so that the IDs are unique within a page; otherwise the HTML will not conform to the W3C standards, and any references to the citations will not work reliably. For example, suppose a page contains the following two citations with {{tl|harv}}-compatible IDs:
* {{Citation |last1=Montes |first1=G. |last2=Halterman |first2=J. S. |year=2008a |journal=Pediatrics |volume=121 |issue=4 |pages=e821–e826 |title=Association of Childhood Autism Spectrum Disorders and Loss of Family Income |doi=10.1542/peds.2007-1594 |pmid=18381511 |url= http://pediatrics.aappublications.org/cgi/content/full/121/4/e821}}
* {{Citation |last1=Montes |first1=G. |last2=Halterman |first2=J. S. |year=2008b |journal=Pediatrics |volume=122 |issue=1 |pages=e202–e208 |title=Child Care Problems and Employment Among Families with Preschool-aged Children with Autism in the United States |doi=10.1542/peds.2007-3037 |pmid=18595965 |url= http://pediatrics.aappublications.org/cgi/content/full/122/1/e202}}
If these citations were altered to say "2008" rather than "2008a" and "2008b", the resulting page would not work, because the two different citations would both attempt to use the ID "&lt;code&gt;CITEREFMontesHalterman2008&lt;/code&gt;". To avoid this problem, distinguish the citations by appending suffixes to the years, e.g. "{{para|year|2008a}}" and "{{para|year|2008b}}", as was done above. Any Harvard references to these citations should use years with the same suffixes.
It is good practice to verify that a page does not contain duplicate IDs by using the [[W3C Markup Validation Service]]; see ''[[#External links|External links]]''.
==Dates==
{{Reflist|group="n"|refs=&lt;ref name="dates" group="n"&gt;The format of dates in the references of an article should use consistent and unambiguous styles. Example formats used in Wikipedia citations include:
* ''2009''
* ''2009-09-14'' ([[ISO 8601#Calendar dates|ISO 8601 standard format]]: YYYY-MM-DD)
* ''14 September 2009''
* ''September 14, 2009'' (with comma)
* ''September 2009''
Dates should not be linked (say, to a Wikipedia article of the same name) in references.
Please see [[Wikipedia:Manual of Style (dates and numbers)#Dates|Wikipedia:Manual of Style (dates and numbers) §&amp;nbsp;Dates]] for more guidance about formatting dates.
&lt;/ref&gt;}}
==Tools==
See [[Wikipedia:Citing sources#Citation templates and tools|Wikipedia:Citing sources §&amp;nbsp;Citation templates and tools]] for a list of tools that can help create a reference in the "citation" format.
==TemplateData==
{{notice|This template data section needs to be edited. It includes deprecated parameters and does not include parameters that were added in the Lua updates.}}
{{TemplateData header}}
&lt;templatedata&gt;
{
"description": "The Citation template generates a citation for a book, periodical, contribution in a collective work, or a web page. It determines the citation type by examining which parameters are used.",
"params": {
"last": {
"label": "Last name",
"description": "The surname of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"author",
"author1",
"last1"
],
"type": "line",
"suggested": true
},
"first": {
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"first1"
],
"type": "line",
"suggested": true
},
"title": {
"label": "Title of source",
"type": "string",
"description": "Title of source. Works display in italics and articles surrounded in quotation marks.",
"required": true
},
"date": {
"label": "Date of source",
"type": "string",
"description": "Full date of source being referenced in the same format as other publication dates in the citations.[1] Do not wikilink. Displays after the authors and enclosed in parentheses. If there is no author, then displays after publisher."
},
"url": {
"label": "URL of source",
"type": "string",
"description": "URL of an online location where the text of the publication can be found."
},
"publication-date": {
"label": "Publication date",
"type": "string",
"required": false,
"description": "Date of publication when different from the date the work was written. Displays only if year or date are defined and only if different, else publication-date is used and displayed as date. Use the same format as other dates in the article; do not wikilink. Follows publisher; if work is not defined, then publication-date is preceded by \"published\" and enclosed in parenthesis."
},
"df": {
"label": "Date format",
"description": "Sets rendered dates to the specified format",
"type": "string"
},
"year": {
"label": "Year of publication",
"description": "Year of the source being referenced; recommended only when date parameter format is YYYY-MM-DD and a CITEREF disambiguator is needed",
"type": "number"
},
"postscript": {
"label": "Postscript",
"type": "string",
"required": false,
"description": "Controls the closing punctuation for a citation; defaults to a period (.); for no terminating punctuation, specify |postscript=none – leaving |postscript= empty is the same as omitting it, but is ambiguous. Ignored if quote is defined."
},
"author-mask": {
"label": "Author mask",
"type": "string",
"required": false,
"aliases": [
"authormask"
],
"description": "Replaces the name of the first author with em dashes or text. Set author-mask to a numeric value n to set the dash n em spaces wide; set author-mask to a text value to display the text without a trailing author separator; for example, \"with\". You must still include the values for all authors for metadata purposes. Primarily intended for use with bibliographies or bibliography styles where multiple works by a single author are listed sequentially such as shortened footnotes. Do not use in a list generated by {{reflist}}, &lt;references /&gt; or similar as there is no control of the order in which references are displayed. You can also use editor-mask and translator-mask in the same way."
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'authorlink2'.",
"aliases": [
"author2",
"surname2"
],
"type": "line"
},
"first2": {
"label": "First name 2",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink.",
"type": "line",
"aliases": [
"given2"
]
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'authorlink3'.",
"aliases": [
"author3",
"surname3"
],
"type": "line"
},
"first3": {
"label": "First name 3",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink.",
"type": "line",
"aliases": [
"given3"
]
},
"last4": {
"label": "Last name 4",
"description": "The surname of the forth author; don't wikilink, use 'authorlink4'.",
"aliases": [
"author4",
"surname4"
],
"type": "line"
},
"first4": {
"label": "First name 4",
"description": "Given or first name, middle names, or initials of the forth author; don't wikilink.",
"type": "line",
"aliases": [
"given4"
]
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'authorlink5'.",
"aliases": [
"author5",
"surname5"
],
"type": "line"
},
"first5": {
"label": "First name 5",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink.",
"type": "line",
"aliases": [
"given5"
]
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'authorlink6'.",
"aliases": [
"author6",
"surname6"
],
"type": "line"
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.",
"type": "line"
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'authorlink7'.",
"aliases": [
"author7",
"surname7"
],
"type": "line"
},
"first7": {
"label": "First name 7",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink.",
"type": "line",
"aliases": [
"given7"
]
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'authorlink8'.",
"aliases": [
"author8",
"surname8"
],
"type": "line"
},
"first8": {
"label": "First name 8",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink.",
"type": "line",
"aliases": [
"given8"
]
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'authorlink9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"aliases": [
"author9",
"surname9"
],
"type": "line"
},
"first9": {
"label": "First name 9",
"description": "Given or first name, middle names, or initials of the ninth author; don't wikilink.",
"type": "line",
"aliases": [
"given9"
]
},
"author-link": {
"label": "Author link",
"description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors",
"type": "wiki-page-name",
"aliases": [
"authorlink",
"author1-link",
"authorlink1"
]
},
"author-link2": {
"label": "Author link 2",
"description": "Title of existing Wikipedia article about the second author.",
"type": "wiki-page-name",
"aliases": [
"author2-link",
"authorlink2"
]
},
"author-link3": {
"label": "Author link 3",
"description": "Title of existing Wikipedia article about the third author.",
"type": "wiki-page-name",
"aliases": [
"author3-link",
"authorlink3"
]
},
"author-link4": {
"label": "Author link 4",
"description": "Title of existing Wikipedia article about the forth author.",
"type": "wiki-page-name",
"aliases": [
"author4-link",
"authorlink4"
]
},
"author-link5": {
"label": "Author link 5",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"author5-link",
"authorlink5"
]
},
"author-link6": {
"label": "Author link 6",
"description": "Title of existing Wikipedia article about the sixth author.",
"type": "wiki-page-name",
"aliases": [
"author6-link",
"authorlink6"
]
},
"author-link7": {
"label": "Author link 7",
"description": "Title of existing Wikipedia article about the seventh author.",
"type": "wiki-page-name",
"aliases": [
"author7-link",
"authorlink7"
]
},
"author-link8": {
"label": "Author link 8",
"description": "Title of existing Wikipedia article about the eighth author.",
"type": "wiki-page-name",
"aliases": [
"author8-link",
"authorlink8"
]
},
"author-link9": {
"label": "Author link 9",
"description": "Title of existing Wikipedia article about the ninth author.",
"type": "wiki-page-name",
"aliases": [
"author9-link",
"authorlink9"
]
},
"orig-year": {
"label": "Original year",
"description": "Original year of publication; provide specifics",
"type": "number",
"aliases": [
"origyear"
]
},
"trans-title": {
"label": "Translated title",
"description": "An English language title, if the source cited is in a foreign language; 'language' is recommended",
"type": "content"
},
"trans-chapter": {
"label": "Translated chapter title",
"description": "An English language chapter title, if the source cited is in a foreign language; 'language' is recommended",
"type": "content"
},
"type": {
"label": "Type",
"description": "Additional information about the media type of the source; format in sentence case",
"type": "content"
},
"archive-url": {
"label": "Archive URL",
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "line",
"aliases": [
"archiveurl"
]
},
"series": {
"label": "Series",
"description": "Series identifier when the source is part of a series, such as a book series or a journal; alias of 'version'",
"type": "content",
"aliases": [
"version"
]
},
"work": {
"label": "Work",
"description": "Name of the work in which the cited title is found",
"type": "string",
"aliases": [
"journal",
"website",
"newspaper",
"magazine",
"encyclopedia",
"encyclopaedia",
"dictionary",
"mailinglist",
"periodical"
]
},
"volume": {
"label": "Volume",
"description": "For one publication published in several volumes",
"type": "line",
"suggested": true
},
"issue": {
"label": "Issue",
"description": "Issue number",
"type": "string",
"aliases": [
"number"
]
},
"page": {
"label": "Page",
"description": "Page in the source that supports the content; displays after 'p.'",
"type": "line"
},
"pages": {
"label": "Pages",
"description": "Pages in the source that support the content (not an indication of the number of pages in the source; displays after 'pp.'",
"type": "line",
"suggested": true
},
"at": {
"label": "At",
"description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient",
"type": "line"
},
"nopp": {
"label": "No pp",
"description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')",
"type": "line"
},
"chapter": {
"label": "Chapter",
"description": "The chapter heading of the source",
"type": "string"
},
"contribution": {
"label": "contribution",
"type": "string",
"required": false
},
"chapter-url": {
"label": "chapter-url",
"type": "string",
"required": false,
"aliases": [
"chapterurl"
]
},
"contribution-url": {
"label": "contribution-url",
"type": "string",
"required": false
},
"chapter-format": {
"label": "chapter-format",
"type": "string",
"required": false
},
"others": {
"label": "Others",
"type": "string",
"required": false,
"description": "Free-text field for people involved in creating a work who cannot be added with another name parameter such as author or editor"
},
"edition": {
"label": "Edition",
"description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed with ' ed.'",
"type": "line"
},
"place": {
"label": "Location of publication",
"description": "Geographical place of publication; usually not wikilinked",
"type": "string",
"aliases": [
"location"
]
},
"publication-place": {
"label": "Place of publication",
"description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'",
"type": "content"
},
"publisher": {
"label": "Publisher",
"description": "Name of the publisher; displays after title",
"type": "content"
},
"language": {
"label": "Language",
"description": "The language in which the source is written, if not English; use the full language name; do not use icons or templates",
"type": "content"
},
"format": {
"label": "Format",
"description": "Format of the work referred to by 'url' ('url' is required when using 'format'); examples: PDF, DOC, XLS; do not specify HTML",
"type": "content"
},
"arxiv": {
"label": "arXiv identifier",
"description": "An identifier for arXive electronic preprints of scientific papers",
"type": "line"
},
"asin": {
"label": "ASIN",
"description": "Amazon Standard Identification Number; 10 characters",
"type": "line",
"aliases": [
"ASIN"
]
},
"asin-tld": {
"label": "ASIN TLD",
"description": "ASIN top-level domain for Amazon sites other than the US",
"type": "line"
},
"bibcode": {
"label": "Bibcode",
"description": "Bibliographic Reference Code (REFCODE); 19 characters",
"type": "line"
},
"biorxiv": {
"label": "biorXiv",
"description": "biorXiv identifier; 6 digits",
"type": "line"
},
"citeseerx": {
"label": "CiteSeerX",
"description": "CiteSeerX identifier; found after the 'doi=' query parameter",
"type": "line"
},
"doi": {
"label": "DOI",
"description": "Digital Object Identifier; begins with '10.'",
"type": "string",
"aliases": [
"DOI"
]
},
"doi-broken-date": {
"label": "DOI broken date",
"description": "The date that the DOI was determined to be broken",
"type": "date"
},
"isbn": {
"label": "ISBN",
"description": "International Standard Book Number; use the 13-digit ISBN where possible",
"type": "line"
},
"issn": {
"label": "ISSN",
"description": "International Standard Serial Number (print); 8 characters; usually split into two groups of four using a hyphen",
"type": "line"
},
"eissn": {
"label": "eISSN",
"description": "International Standard Serial Number (online); 8 characters; usually split into two groups of four using a hyphen",
"type": "line"
},
"jfm": {
"label": "jfm code",
"description": "Jahrbuch über die Fortschritte der Mathematik classification code",
"type": "line"
},
"jstor": {
"label": "JSTOR",
"description": "JSTOR identifier",
"type": "line"
},
"lccn": {
"label": "LCCN",
"description": "Library of Congress Control Number",
"type": "line"
},
"mr": {
"label": "MR",
"description": "Mathematical Reviews identifier",
"type": "line"
},
"oclc": {
"label": "OCLC",
"description": "Online Computer Library Center number",
"type": "number"
},
"ol": {
"label": "OL",
"description": "Open Library identifier",
"type": "line"
},
"osti": {
"label": "OSTI",
"description": "Office of Scientific and Technical Information identifier",
"type": "line"
},
"pmc": {
"label": "PMC",
"description": "PubMed Center article number",
"type": "number"
},
"pmid": {
"label": "PMID",
"description": "PubMed Unique Identifier",
"type": "line"
},
"rfc": {
"label": "RFC",
"description": "Request for Comments number",
"type": "number"
},
"ssrn": {
"label": "SSRN",
"description": "Social Science Research Network",
"type": "line"
},
"zbl": {
"label": "Zbl",
"description": "Zentralblatt MATH journal identifier",
"type": "line"
},
"id": {
"label": "id",
"description": "A unique identifier used where none of the specialized ones are applicable",
"type": "line"
},
"quote": {
"label": "Quote",
"description": "Relevant text quoted from the source; displays last, enclosed in quotes; needs to include terminating punctuation",
"type": "content"
},
"ref": {
"label": "Ref",
"description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates",
"type": "line"
},
"access-date": {
"label": "URL access date",
"description": "The full date when the original URL was accessed; do not wikilink",
"type": "date",
"aliases": [
"accessdate"
]
},
"lay-source": {
"label": "Lay source",
"description": "Name of the source of the laysummary; displays in italics, preceded by an en dash",
"type": "string",
"aliases": [
"laysource"
]
},
"lay-date": {
"label": "Lay date",
"description": "Date of the summary; displays in parentheses",
"type": "date",
"aliases": [
"laydate"
]
},
"archive-date": {
"label": "Archive date",
"description": "Date when the original URL was archived; do not wikilink",
"type": "date",
"aliases": [
"archivedate"
]
},
"editor-last": {
"label": "Editor last name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors",
"aliases": [
"editor",
"editor-surname",
"editor-last1",
"editor-surname1",
"editor1",
"editor1-last",
"editor1-surname",
"editors"
]
},
"editor-first": {
"label": "Editor first name",
"description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors",
"aliases": [
"editor-first1",
"editor-given1",
"editor1-first",
"editor1-given"
]
},
"editor2-last": {
"label": "Editor last name 2",
"description": "The surname of the second editor; don't wikilink, use 'editor2-link'.",
"aliases": [
"editor2"
],
"type": "line"
},
"editor2-first": {
"label": "Editor first name 2",
"description": "Given or first name, middle names, or initials of the second editor; don't wikilink.",
"type": "line",
"aliases": [
"editor2-given"
]
},
"editor3-last": {
"label": "Editor last name 3",
"description": "The surname of the third editor; don't wikilink, use 'editor3-link'.",
"aliases": [
"editor3"
],
"type": "line"
},
"editor3-first": {
"label": "Editor first name 3",
"description": "Given or first name, middle names, or initials of the third editor; don't wikilink.",
"type": "line",
"aliases": [
"editor3-given"
]
},
"editor4-last": {
"label": "Editor last name 4",
"description": "The surname of the fourth editor; don't wikilink, use 'editor4-link'.",
"aliases": [
"editor4"
],
"type": "line"
},
"editor4-first": {
"label": "Editor first name 4",
"description": "Given or first name, middle names, or initials of the fourth editor; don't wikilink.",
"type": "line",
"aliases": [
"editor4-given"
]
},
"editor5-last": {
"label": "Editor last name 5",
"description": "The surname of the fifth editor; don't wikilink, use 'editor5-link'.",
"aliases": [
"editor5"
],
"type": "line"
},
"editor5-first": {
"label": "Editor first name 5",
"description": "Given or first name, middle names, or initials of the fifth editor; don't wikilink.",
"type": "line",
"aliases": [
"editor5-given"
]
},
"editor6-last": {
"label": "Editor last name 6",
"description": "The surname of the sixth editor; don't wikilink, use 'editor6-link'.",
"aliases": [
"editor6"
],
"type": "line"
},
"editor6-first": {
"label": "Editor first name 6",
"description": "Given or first name, middle names, or initials of the sixth editor; don't wikilink.",
"type": "line",
"aliases": [
"editor6-given"
]
},
"editor7-last": {
"label": "Editor last name 7",
"description": "The surname of the seventh editor; don't wikilink, use 'editor7-link'.",
"aliases": [
"editor7"
],
"type": "line"
},
"editor7-first": {
"label": "Editor first name 7",
"description": "Given or first name, middle names, or initials of the seventh editor; don't wikilink.",
"type": "line",
"aliases": [
"editor7-given"
]
},
"editor8-last": {
"label": "Editor last name 8",
"description": "The surname of the eighth editor; don't wikilink, use 'editor8-link'.",
"aliases": [
"editor8"
],
"type": "line"
},
"editor8-first": {
"label": "Editor first name 8",
"description": "Given or first name, middle names, or initials of the eighth editor; don't wikilink.",
"type": "line",
"aliases": [
"editor8-given"
]
},
"editor9-last": {
"label": "Editor last name 9",
"description": "The surname of the ninth editor; don't wikilink, use 'editor9-link'.",
"aliases": [
"editor9"
],
"type": "line"
},
"editor9-first": {
"label": "Editor first name 9",
"description": "Given or first name, middle names, or initials of the ninth editor; don't wikilink.",
"type": "line",
"aliases": [
"editor9-given"
]
},
"editor-link": {
"label": "editor-link",
"type": "string",
"required": false
},
"editor1-link": {
"label": "editor1-link",
"type": "string",
"required": false
},
"editor2-link": {
"label": "editor2-link",
"type": "string",
"required": false
},
"editor3-link": {
"label": "editor3-link",
"type": "string",
"required": false
},
"editor4-link": {
"label": "editor4-link",
"type": "string",
"required": false
},
"translator-last": {
"label": "Translator last name",
"description": "The surname of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.",
"aliases": [
"translator",
"translator-last1",
"translator1",
"translator1-last"
],
"type": "string"
},
"translator-first": {
"label": "Translator first name",
"description": "Given or first name, middle names, or initials of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.",
"aliases": [
"translator1-first",
"translator-first1"
],
"type": "string"
},
"translator-link": {
"label": "Translator link",
"description": "Title of existing Wikipedia article about the translator; can suffix with a numeral to add additional translators.",
"type": "wiki-page-name",
"aliases": [
"translator-link1",
"translator1-link"
]
},
"translator-last2": {
"label": "Translator last name 2",
"description": "The surname of the second translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator2",
"translator2-last"
],
"type": "string"
},
"translator-first2": {
"label": "Translator first name 2",
"description": "Given or first name, middle names, or initials of the second translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator2-first"
],
"type": "string"
},
"translator-last3": {
"label": "Translator last name 3",
"description": "The surname of the third translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator3",
"translator3-last"
],
"type": "string"
},
"translator-first3": {
"label": "Translator first name 3",
"description": "Given or first name, middle names, or initials of the third translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator3-first"
],
"type": "string"
},
"translator-last4": {
"label": "Translator last name 4",
"description": "The surname of the fourth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator4",
"translator4-last"
],
"type": "string"
},
"translator-first4": {
"label": "Translator first name 4",
"description": "Given or first name, middle names, or initials of the fourth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator4-first"
],
"type": "string"
},
"translator-last5": {
"label": "Translator last name 5",
"description": "The surname of the fifth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator5",
"translator5-last"
],
"type": "string"
},
"translator-first5": {
"label": "Translator first name 5",
"description": "Given or first name, middle names, or initials of the fifth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator5-first"
],
"type": "string"
},
"translator-last6": {
"label": "Translator last name 6",
"description": "The surname of the sixth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator6",
"translator6-last"
],
"type": "string"
},
"translator-first6": {
"label": "Translator first name 6",
"description": "Given or first name, middle names, or initials of the sixth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator6-first"
],
"type": "string"
},
"translator-last7": {
"label": "Translator last name 7",
"description": "The surname of the seventh translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator7",
"translator7-last"
],
"type": "string"
},
"translator-first7": {
"label": "Translator first name 7",
"description": "Given or first name, middle names, or initials of the seventh translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator7-first"
],
"type": "string"
},
"translator-last8": {
"label": "Translator last name 8",
"description": "The surname of the eighth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator8",
"translator8-last"
],
"type": "string"
},
"translator-first8": {
"label": "Translator first name 8",
"description": "Given or first name, middle names, or initials of the eighth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator8-first"
],
"type": "string"
},
"translator-last9": {
"label": "Translator last name 9",
"description": "The surname of the ninth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator9",
"translator9-last"
],
"type": "string"
},
"translator-first9": {
"label": "Translator first name 9",
"description": "Given or first name, middle names, or initials of the ninth translator; don't wikilink, use 'translator-link'.",
"aliases": [
"translator9-first"
],
"type": "string"
},
"translator-link2": {
"label": "Translator link 2",
"description": "Title of existing Wikipedia article about the second translator.",
"type": "wiki-page-name",
"aliases": [
"translator2-link"
]
},
"translator-link3": {
"label": "Translator link 3",
"description": "Title of existing Wikipedia article about the third translator.",
"type": "wiki-page-name",
"aliases": [
"translator3-link"
]
},
"translator-link4": {
"label": "Translator link 4",
"description": "Title of existing Wikipedia article about the fourth translator.",
"type": "wiki-page-name",
"aliases": [
"translator4-link"
]
},
"translator-link5": {
"label": "Translator link 5",
"description": "Title of existing Wikipedia article about the fifth translator.",
"type": "wiki-page-name",
"aliases": [
"translator5-link"
]
},
"translator-link6": {
"label": "Translator link 6",
"description": "Title of existing Wikipedia article about the sixth translator.",
"type": "wiki-page-name",
"aliases": [
"translator6-link"
]
},
"translator-link7": {
"label": "Translator link 7",
"description": "Title of existing Wikipedia article about the seventh translator.",
"type": "wiki-page-name",
"aliases": [
"translator7-link"
]
},
"translator-link8": {
"label": "Translator link 8",
"description": "Title of existing Wikipedia article about the eighth translator.",
"type": "wiki-page-name",
"aliases": [
"translator8-link"
]
},
"translator-link9": {
"label": "Translator link 9",
"description": "Title of existing Wikipedia article about the ninth translator.",
"type": "wiki-page-name",
"aliases": [
"translator9-link"
]
},
"lay-url": {
"aliases": [
"layurl"
],
"label": "Lay URL",
"description": "URL link to a non-technical summary or review of the source",
"type": "line"
},
"display-authors": {
"label": "Display authors",
"description": "number of authors to display before 'et al.' is used; must be less than the number listed",
"type": "number"
},
"name-list-style": {
"aliases": [
"name-list-format"
],
"label": "Name list style",
"description": "Sets the style for the list. Accepts 'amp', 'and', and 'vanc'. amp displays an ampersand after the penultimate name; and the same with 'and', and vanc displays in Vancouver format",
"type": "string"
}
},
"maps": {
"citoid": {
"edition": "edition",
"title": "title",
"caseName": "title",
"nameOfAct": "title",
"url": "url",
"label": "publisher",
"company": "publisher",
"studio": "publisher",
"network": "publisher",
"distributor": "publisher",
"publisher": "publisher",
"publicationTitle": "work",
"dictionaryTitle": "work",
"encyclopediaTitle": "work",
"bookTitle": "work",
"date": "date",
"dateEnacted": "date",
"dateDecided": "date",
"accessDate": "access-date",
"place": "place",
"ISSN": [
"issn"
],
"ISBN": [
"isbn"
],
"PMCID": "pmc",
"PMID": "pmid",
"oclc": "oclc",
"pages": "pages",
"firstPage": "pages",
"codePages": "pages",
"volume": "volume",
"reporterVolume": "volume",
"codeVolume": "volume",
"series": "series",
"programTitle": "series",
"episodeNumber": "issue",
"billNumber": "issue",
"documentNumber": "issue",
"publicLawNumber": "issue",
"docketNumber": "issue",
"issue": "issue",
"type": "type",
"genre": "type",
"letterType": "type",
"mapType": "type",
"DOI": "doi",
"language": "language",
"podcaster": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"cartographer": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"interviewee": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"performer": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"programmer": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"sponsor": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"artist": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"director": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"contributor": "others",
"author": [
[
"first",
"last"
],
[
"first2",
"last2"
],
[
"first3",
"last3"
],
[
"first4",
"last4"
],
[
"first5",
"last5"
],
[
"first6",
"last6"
],
[
"first7",
"last7"
],
[
"first8",
"last8"
],
[
"first9",
"last9"
]
],
"translator": [
[
"translator-first",
"translator-last"
],
[
"translator-first2",
"translator-last2"
],
[
"translator-first3",
"translator-last3"
],
[
"translator-first4",
"translator-last4"
],
[
"translator-first5",
"translator-last5"
],
[
"translator-first6",
"translator-last6"
],
[
"translator-first7",
"translator-last7"
],
[
"translator-first8",
"translator-last8"
],
[
"translator-first9",
"translator-last9"
]
],
"editor": [
[
"editor-first",
"editor-last"
],
[
"editor2-first",
"editor2-last"
],
[
"editor3-first",
"editor3-last"
],
[
"editor4-first",
"editor4-last"
]
]
}
},
"paramOrder": [
"last",
"first",
"title",
"date",
"url",
"work",
"volume",
"issue",
"page",
"pages",
"publication-date",
"df",
"year",
"postscript",
"editor-last",
"editor-first",
"author-mask",
"orig-year",
"trans-title",
"trans-chapter",
"type",
"archive-url",
"series",
"at",
"nopp",
"chapter",
"contribution",
"chapter-url",
"contribution-url",
"chapter-format",
"others",
"edition",
"place",
"publication-place",
"publisher",
"language",
"format",
"arxiv",
"asin",
"asin-tld",
"bibcode",
"biorxiv",
"citeseerx",
"doi",
"doi-broken-date",
"isbn",
"issn",
"eissn",
"jfm",
"jstor",
"lccn",
"mr",
"oclc",
"ol",
"osti",
"pmc",
"pmid",
"rfc",
"ssrn",
"zbl",
"id",
"quote",
"ref",
"access-date",
"lay-url",
"lay-source",
"lay-date",
"name-list-style",
"display-authors",
"archive-date",
"last2",
"first2",
"last3",
"first3",
"last4",
"first4",
"last5",
"first5",
"last6",
"first6",
"last7",
"first7",
"last8",
"first8",
"last9",
"first9",
"author-link",
"author-link2",
"author-link3",
"author-link4",
"author-link5",
"author-link6",
"author-link7",
"author-link8",
"author-link9",
"editor2-last",
"editor2-first",
"editor3-last",
"editor3-first",
"editor4-last",
"editor4-first",
"editor5-last",
"editor5-first",
"editor6-last",
"editor6-first",
"editor7-last",
"editor7-first",
"editor8-last",
"editor8-first",
"editor9-last",
"editor9-first",
"editor-link",
"editor1-link",
"editor2-link",
"editor3-link",
"editor4-link",
"translator-last",
"translator-first",
"translator-link",
"translator-last2",
"translator-first2",
"translator-last3",
"translator-first3",
"translator-last4",
"translator-first4",
"translator-last5",
"translator-first5",
"translator-last6",
"translator-first6",
"translator-last7",
"translator-first7",
"translator-last8",
"translator-first8",
"translator-last9",
"translator-first9",
"translator-link2",
"translator-link3",
"translator-link4",
"translator-link5",
"translator-link6",
"translator-link7",
"translator-link8",
"translator-link9"
]
}
&lt;/templatedata&gt;
{{UF-COinS}}
== See also ==
* [[Wikipedia:Citation templates]]
* [[Wikipedia:Inline citation]]
* [[Wikipedia:Parenthetical referencing]]
* For a comparison of citations using templates with citations written freehand, see [[Wikipedia:Citing sources/Example edits for different methods#Footnotes|Wikipedia:Citing sources/Example edits for different methods §&amp;nbsp;Footnotes]]
== Notes ==
{{Reflist}}
{{Wikipedia referencing}}
{{Wikipedia help pages}}
&lt;includeonly&gt;{{Sandbox other||
&lt;!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --&gt;
[[Category:Citation Style 2 templates]]
}}&lt;/includeonly&gt;</text>
<sha1>dacdpwumwka6a4zahca9e5tu9kuozbr</sha1>
</revision>
</page>
<page>
<title>Template:Citation Style documentation/sep comma</title>
<ns>10</ns>
<id>34353319</id>
<revision>
<id>478252155</id>
<parentid>470891965</parentid>
<timestamp>2012-02-22T14:16:08Z</timestamp>
<contributor>
<username>Gadget850</username>
<id>339034</id>
</contributor>
<comment>ce</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="59" xml:space="preserve">By default, sets of fields are terminated with a comma (,).</text>
<sha1>0j48ofbcivh1taec49zwtiraamz54pf</sha1>
</revision>
</page>
<page>
<title>Template:Define</title>
<ns>10</ns>
<id>38022627</id>
<redirect title="Template:Abbr" />
<revision>
<id>804536496</id>
<parentid>770910842</parentid>
<timestamp>2017-10-09T17:20:34Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>Protected "[[Template:Define]]": [[WP:High-risk templates|Highly visible template]]; 1,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="69" xml:space="preserve">#REDIRECT [[Template:Abbr]]
{{Rcat shell|
{{R related}}
{{R tsh}}
}}</text>
<sha1>8q7baju53rjf2ipddc2n21cg8pzm4hp</sha1>
</revision>
</page>
<page>
<title>Template:Delink</title>
<ns>10</ns>
<id>28069338</id>
<revision>
<id>696877808</id>
<parentid>695173639</parentid>
<timestamp>2015-12-26T16:26:10Z</timestamp>
<contributor>
<username>Frietjes</username>
<id>13791031</id>
</contributor>
<comment>{{documentation}} does this</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="179" xml:space="preserve">{{&lt;includeonly&gt;safesubst:&lt;/includeonly&gt;#invoke:delink|delink}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>nxxwkb2lon9wgne4irg9ctbsle6zwiy</sha1>
</revision>
</page>
<page>
<title>Template:Edit</title>
<ns>10</ns>
<id>692091</id>
<revision>
<id>921756948</id>
<parentid>640984360</parentid>
<timestamp>2019-10-17T18:13:48Z</timestamp>
<contributor>
<username>Wugapodes</username>
<id>24484530</id>
</contributor>
<comment>Add support for tooltips per edit request on talk</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="473" xml:space="preserve">&lt;span class="noprint plainlinks" title="{{#if:{{{tooltip|}}}|{{{tooltip}}}|Edit {{{1}}}}}"&gt;[{{fullurl:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|action=edit{{#if:{{{section|}}}|&amp;section={{{section}}}}}{{#if:{{{editintro|}}}|&amp;editintro={{urlencode:{{{editintro}}}|wiki}}}}{{#if:{{{preload|}}}|&amp;preload={{urlencode:{{{preload}}}|wiki}}}}{{#if:{{{preloadtitle|}}}|&amp;preloadtitle={{urlencode:{{{preloadtitle}}}}}}}}} {{{2|edit}}}]&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>3tfmuuvjjnszagj2mzafv2005px018o</sha1>
</revision>
</page>
<page>
<title>Template:Fake citation needed</title>
<ns>10</ns>
<id>33669709</id>
<revision>
<id>951543108</id>
<parentid>649877962</parentid>
<timestamp>2020-04-17T18:01:12Z</timestamp>
<contributor>
<username>Andrybak</username>
<id>23735172</id>
</contributor>
<comment>remove categorization by [[Template:Fake fix]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="177" xml:space="preserve">{{fake fix
|link=Wikipedia:Citation needed
|text=citation needed
|nocat=yes
}}&lt;noinclude&gt;
{{Documentation}}
&lt;!--Categories and interwikis go on the /doc subpage.--&gt;
&lt;/noinclude&gt;</text>
<sha1>kjo4aqwak0yui0n1qpa461kgw5lsj80</sha1>
</revision>
</page>
<page>
<title>Template:Fake fix</title>
<ns>10</ns>
<id>43931470</id>
<redirect title="Template:Fix" />
<revision>
<id>949864674</id>
<parentid>839673914</parentid>
<timestamp>2020-04-08T23:38:11Z</timestamp>
<contributor>
<username>GreenComputer</username>
<id>29238288</id>
</contributor>
<comment>Add rcats</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="94" xml:space="preserve">#REDIRECT [[Template:Fix]]
{{rcat shell|
{{Wikidata redirect}}
{{R from alternative name}}
}}</text>
<sha1>8d8wp4oxl0kb4uifbw52sml9gxi4wbx</sha1>
</revision>
</page>
<page>
<title>Template:Fix</title>
<ns>10</ns>
<id>5632010</id>
<revision>
<id>814292698</id>
<parentid>713657347</parentid>
<timestamp>2017-12-07T23:00:24Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>replaced self-closed &lt;nowiki/&gt; and space with numeric space entity;</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1113" xml:space="preserve">{{#switch:{{{subst|¬}}}
|¬={{category handler
|template=[[Category:Templates needing substitution checking]]
|nocat={{{nocat|&lt;noinclude&gt;true&lt;/noinclude&gt;}}}
}}
|SUBST=[[Category:Pages with incorrectly substituted templates]]
}}{{Category handler
|main={{Fix/category
|cat-date={{{cat-date|}}}
|cat={{{cat|}}}
|cat-date2={{{cat-date2|}}}
|cat2={{{cat2|}}}
|cat-date3={{{cat-date3|}}}
|cat3={{{cat3|}}}
|date={{{date|}}}
}}
|template={{#if:{{{name|}}}|{{#ifeq:{{{name}}}|{{ROOTPAGENAME}}||{{#if:{{{date|}}}||[[Category:Templates including undated clean-up tags]]}}}}}}
|subpage=no
}}{{#if:{{{text|}}}
|&lt;sup class="noprint Inline-Template {{{class|}}}" style="white-space:nowrap;"&gt;&amp;#91;&lt;i&gt;{{#if:{{{pre-text|}}}
|{{{pre-text}}}&amp;#32;
}}[[{{{link|Wikipedia:Cleanup}}}|&lt;span title="{{delink|1={{{title|{{{link|Wikipedia:Cleanup}}}}}}{{#if:{{{date|}}}|&amp;#32;({{{date}}})}}}}"&gt;{{{text|}}}&lt;/span&gt;]]{{#if:{{{post-text|}}}
|&amp;#32;{{{post-text}}}
}}&lt;/i&gt;&amp;#93;&lt;/sup&gt;|{{{special|}}}
}}&lt;noinclude&gt;
{{Documentation}}
&lt;!-- Add cats and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>owg7pdp6e9nqycfh3g7fuee1rm3t159</sha1>
</revision>
</page>
<page>
<title>Template:Fmbox</title>
<ns>10</ns>
<id>19236000</id>
<revision>
<id>885089481</id>
<parentid>714241420</parentid>
<timestamp>2019-02-25T22:06:47Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Fmbox]]": [[Wikipedia:High-risk templates|High-risk template or module]]; used in system message ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="141" xml:space="preserve">{{#invoke:Message box|fmbox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>q4qfnrd9je1n71bknyj9gdhs02g2rws</sha1>
</revision>
</page>
<page>
<title>Template:For2</title>
<ns>10</ns>
<id>4388989</id>
<revision>
<id>836449663</id>
<parentid>666865807</parentid>
<timestamp>2018-04-14T22:04:46Z</timestamp>
<contributor>
<username>SkyGazer 512</username>
<id>32875844</id>
</contributor>
<comment>Now allows to link to 5 different topics and articles instead of 3</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="303" xml:space="preserve">{{Hatnote|For {{{1}}}, see {{{2}}}{{#if:{{{4|}}}|. For {{{3}}}, see {{{4}}}{{#if:{{{6|}}}|. For {{{5}}}, see {{{6}}}.|.}}{{#if:{{{8|}}}|&amp;nbsp;For {{{7}}}, see {{{8}}}.}}{{#if: {{{9|}}}|&amp;nbsp;For {{{9}}}, see {{{10}}}.}}|{{#if:{{{3|}}}|&amp;nbsp;and {{{3}}}.|.}}}}}}&lt;noinclude&gt;{{Documentation}}&lt;/noinclude&gt;</text>
<sha1>bfctflzfy1ei8y5h6039tg3phnliqcu</sha1>
</revision>
</page>
<page>
<title>Template:Harv</title>
<ns>10</ns>
<id>3083829</id>
<redirect title="Template:Harvard citation" />
<revision>
<id>95236892</id>
<parentid>27653786</parentid>
<timestamp>2006-12-19T03:27:09Z</timestamp>
<contributor>
<username>Renesis</username>
<id>475878</id>
</contributor>
<minor/>
<comment>Protected Template:Harv: Redirect to hprotected template [edit=sysop:move=sysop]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="39" xml:space="preserve">#REDIRECT [[Template:Harvard citation]]</text>
<sha1>dn9qlg927pkdnmfh95oeycbtkzo47bk</sha1>
</revision>
</page>
<page>
<title>Template:Harvard citation</title>
<ns>10</ns>
<id>3103864</id>
<revision>
<id>972066551</id>
<parentid>884947524</parentid>
<timestamp>2020-08-10T00:19:45Z</timestamp>
<contributor>
<username>Bsherr</username>
<id>4386431</id>
</contributor>
<minor/>
<comment>as found, replacing [[Template:Tld]] with [[Template:Tlc]] or adding/updating category placement comments, plus general and typo fixes</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="222" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Footnotes|harvard_citation
|bracket_left= (
|bracket_right = )
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --&gt;
&lt;/noinclude&gt;</text>
<sha1>nu22p5asevjuxsevxu91z5vdnzmtbmi</sha1>
</revision>
</page>
<page>
<title>Template:Harvard citation no brackets</title>
<ns>10</ns>
<id>5326834</id>
<revision>
<id>972066849</id>
<parentid>947689928</parentid>
<timestamp>2020-08-10T00:21:39Z</timestamp>
<contributor>
<username>Bsherr</username>
<id>4386431</id>
</contributor>
<minor/>
<comment>as found, replacing [[Template:Tld]] with [[Template:Tlc]] or adding/updating category placement comments, plus general and typo fixes</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="201" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Footnotes|harvard_citation|template=harvnb}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --&gt;
&lt;/noinclude&gt;</text>
<sha1>rtjyyomketoec83yixes4x8swygwqvq</sha1>
</revision>
</page>
<page>
<title>Template:Harvid</title>
<ns>10</ns>
<id>25416230</id>
<redirect title="Template:SfnRef" />
<revision>
<id>911344118</id>
<parentid>804521304</parentid>
<timestamp>2019-08-18T08:58:52Z</timestamp>
<contributor>
<username>Redrose64</username>
<id>9612106</id>
</contributor>
<comment>wrong prot template</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="71" xml:space="preserve">#REDIRECT [[Template:SfnRef]]
{{R from merge}}
{{R template-protected}}</text>
<sha1>6zmhna2etmyxuy6yr28w55zpb0xn2wx</sha1>
</revision>
</page>
<page>
<title>Template:Harvnb</title>
<ns>10</ns>
<id>5326925</id>
<redirect title="Template:Harvard citation no brackets" />
<revision>
<id>774336434</id>
<parentid>103261552</parentid>
<timestamp>2017-04-07T19:22:02Z</timestamp>
<contributor>
<username>Jo-Jo Eumerus</username>
<id>17449355</id>
</contributor>
<minor/>
<comment>Changed protection level for "[[Template:Harvnb]]": Matching redirect target ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="50" xml:space="preserve">#REDIRECT[[Template:Harvard citation no brackets]]</text>
<sha1>3shv1t0unnkqbpog36jda0nnq7r7rca</sha1>
</revision>
</page>
<page>
<title>Template:Hatnote</title>
<ns>10</ns>
<id>945764</id>
<revision>
<id>609825987</id>
<parentid>607120708</parentid>
<timestamp>2014-05-23T15:55:04Z</timestamp>
<contributor>
<username>SMcCandlish</username>
<id>378390</id>
</contributor>
<minor/>
<comment>tweak</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="171" xml:space="preserve">&lt;includeonly&gt;{{#invoke:Hatnote|hatnote}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>8nnude79i1y2v6yy2z7j285k1k4v8p3</sha1>
</revision>
</page>
<page>
<title>Template:Nbsp</title>
<ns>10</ns>
<id>9539256</id>
<redirect title="Template:Spaces" />
<revision>
<id>869606862</id>
<parentid>869569085</parentid>
<timestamp>2018-11-19T18:04:40Z</timestamp>
<contributor>
<username>Amorymeltzer</username>
<id>141948</id>
</contributor>
<minor/>
<comment>{{R from template shortcut}}</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="133" xml:space="preserve">#REDIRECT [[Template:Spaces]]
{{Redirect category shell|
{{R from move}}
{{R from alternative name}}
{{R from template shortcut}}
}}</text>
<sha1>2axdy32whej7ce74avad8qnsbuwaoxi</sha1>
</revision>
</page>
<page>
<title>Template:Notice</title>
<ns>10</ns>
<id>1720676</id>
<revision>
<id>987229787</id>
<parentid>842723603</parentid>
<timestamp>2020-11-05T18:55:20Z</timestamp>
<contributor>
<username>Xaosflux</username>
<id>502540</id>
</contributor>
<minor/>
<comment>w/s cleanup</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="1009" xml:space="preserve">{{Mbox
| name = Notice
| demospace = {{{demospace|}}}
| style = {{#if:{{{style|}}} |{{#if:{{{small|}}}||width:80%;}} {{{style}}} }}
| subst = &lt;includeonly&gt;{{subst:substcheck}}&lt;/includeonly&gt;
| type = notice
| image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice]]}}
| small = {{{small|}}}
| smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice]]}}
| imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }}
| textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}}
| text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |&lt;div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}"&gt;'''{{{header|{{{heading|{{{title|}}}}}}}}}'''&lt;/div&gt;}}&lt;!--
--&gt;{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}}
}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
<sha1>c5tlkvifsklc496ph8epcuspvmjr6h7</sha1>
</revision>
</page>
<page>
<title>Template:Protected page text</title>
<ns>10</ns>
<id>41508461</id>
<revision>
<id>975364382</id>
<parentid>962915348</parentid>
<timestamp>2020-08-28T03:11:24Z</timestamp>
<contributor>
<username>Xaosflux</username>
<id>502540</id>
</contributor>
<comment>w/s cleanup requested on talk</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="4108" xml:space="preserve">&lt;includeonly&gt;{{fmbox
| id = mw-protectedpagetext
| type = system
| image = none
| style = border-style:none;
| text =
{{mbox
| type = protection
| textstyle = font-weight:bold; font-size:130%;
| image = [[File:{{{image|Full-protection-shackle.svg}}}|40x40px|link=|alt=]]
| text = &lt;div style="text-align: center;"&gt;{{{protection-message}}}&lt;/div&gt;
}}{{#if: {{{suggestions|}}}
|
&lt;table style="margin-top:1em; background:none;"&gt;
&lt;tr&gt;
&lt;td style="width:50%; vertical-align:top;"&gt;
&lt;div style="width:80%; vertical-align:top; background:transparent;"&gt;
&lt;h2 style="border-bottom:0; font-size:130%; font-weight:bold; padding:.15em;"&gt;Why is the page protected?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;{{{protection-reason}}}
&lt;/li&gt;
&lt;li&gt;{{{log-text|The reason for protection can be found in the [{{fullurl:Special:Log|type=protect&amp;page={{urlencode:{{#ifeq:{{NAMESPACENUMBER}}|-1|{{#titleparts:{{FULLPAGENAME}}|0|2}}|{{FULLPAGENAME}}}}}}}} protection log]. If there are no relevant entries in the protection log, the page may have been moved after being protected.}}}
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style="width:50%; vertical-align:top;"&gt;
&lt;h2 style="border-bottom:0; font-size:130%; font-weight:bold; padding:.15em;"&gt;What can I do?&lt;/h2&gt;
&lt;ul&gt;
{{#if: {{{login-message|}}}
| &lt;li&gt; If you have a user account, [[Special:UserLogin|log in]] first. If you do not yet have an account, you may [{{fullurl:Special:UserLogin|type=signup&amp;campaign=semiprotectednotice}} create one]; after [[Wikipedia:User access levels#Autoconfirmed users|4 days and 10 edits]], you will be able to edit semi-protected pages.
&lt;/li&gt;
}}{{#ifeq: {{#if:{{{main-page-links|}}}|{{FULLPAGENAME}}}} | Main Page
|
&lt;li&gt;[[Wikipedia:Why create an account?|Register for an account]] if you don't already have one
&lt;/li&gt;
&lt;li&gt;Visit the [[Wikipedia:Sandbox|Sandbox]] to make test edits
&lt;/li&gt;
&lt;li&gt;Check out the [[Wikipedia:Tutorial|Tutorial]] to learn more about editing
&lt;/li&gt;
&lt;li&gt;[[Wikipedia:Main Page/Errors|Report errors on the Main Page]]
&lt;/li&gt;
| {{#ifeq: {{#if:{{{template-links|}}}|{{NAMESPACE}}}} | Template
| {{#switch:
{{#ifexist: {{FULLPAGENAME}}/doc
| doc
}}{{#ifexist: {{FULLPAGENAME}}/sandbox
| sandbox
}}
| doc = &lt;li&gt; This template has a [[Wikipedia:Template documentation|documentation]] page – [[{{FULLPAGENAME}}/doc]] – which may be freely edited.
&lt;/li&gt;
| sandbox = &lt;li&gt; This template has a [[Wikipedia:Template test cases|sandbox]] page – [[{{FULLPAGENAME}}/sandbox]] – which may be freely edited.
&lt;/li&gt;
| docsandbox = &lt;li&gt; This template has a [[Wikipedia:Template documentation|documentation]] page – [[{{FULLPAGENAME}}/doc]] – and a [[Wikipedia:Template test cases|sandbox]] page – [[{{FULLPAGENAME}}/sandbox]] – both may be freely edited.
&lt;/li&gt;
}}
}}{{#ifexist: {{FULLPAGENAME}}
| {{#ifeq: {{NAMESPACE}} | {{TALKSPACE}}
|
| {{#if: {{TALKPAGENAME}}
| &lt;li&gt; [[{{TALKPAGENAME}}|Discuss this page]] with others.
&lt;/li&gt;
}}
&lt;li&gt; For move-protected pages, see [[Wikipedia:requested moves|requested moves]].
&lt;/li&gt;
}}
}}
{{#if: {{{hide-requestlower|}}}||&lt;li&gt; [[Wikipedia:Requests for page protection#Current requests for reduction in protection level|Request that the page's protection level be reduced]].
&lt;/li&gt;}}
&lt;li&gt; [[Help:Introduction|Find out more about how to get started editing Wikipedia]].
&lt;/li&gt;
{{#if: {{TALKPAGENAME}}
|
&lt;li&gt;If you have noticed an error or have a suggestion for a simple, non-controversial change, you can submit an edit request, by clicking the button below and following instructions. {{{who-can-edit}}} may then make the change on your behalf. Please check [[{{TALKPAGENAMEE}}|the talk page]] first in case the issue is already being discussed.
&lt;/li&gt;
&lt;li style="list-style:none; display:inline;"&gt;
&lt;div style="text-align:center; margin:auto;"&gt;
{{Submit an edit request|type={{{request-type}}}}}
&lt;/div&gt;
&lt;/li&gt;
}}
}}
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
}}
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
<sha1>e4oryq1x3vzhf4cmwh35kgx5by6ehs3</sha1>
</revision>
</page>
<page>
<title>Template:Resize</title>
<ns>10</ns>
<id>7736359</id>
<revision>
<id>951407444</id>
<parentid>772120884</parentid>
<timestamp>2020-04-17T00:41:14Z</timestamp>
<contributor>
<username>Ahecht</username>
<id>2016996</id>
</contributor>
<comment>Copy from sandbox. Make substable</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="274" xml:space="preserve">{{safesubst&lt;noinclude /&gt;:#if:{{{2|}}}
|&lt;span style="font-size:{{{1|}}};"&gt;{{{2|}}}&lt;/span&gt;
|&lt;span style="font-size:90%;"&gt;{{{1}}}&lt;/span&gt;
}}&lt;noinclude&gt;
{{documentation}}
{{Resize/TemplateData}}
&lt;!--PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS--&gt;
&lt;/noinclude&gt;</text>
<sha1>il8z48xrh0jofetyf2ro2ri98zf6zix</sha1>
</revision>
</page>
<page>
<title>Template:SfnRef</title>
<ns>10</ns>
<id>25072600</id>
<revision>
<id>965983067</id>
<parentid>958078171</parentid>
<timestamp>2020-07-04T15:54:11Z</timestamp>
<contributor>
<username>Ahecht</username>
<id>2016996</id>
</contributor>
<comment>safesubst&lt;noinclude /&gt;:</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="93" xml:space="preserve">{{safesubst&lt;noinclude /&gt;:#invoke:Footnotes|sfnref}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>a5bwsbkzmzfw9xjrhfy0ur5p5priatn</sha1>
</revision>
</page>
<page>
<title>Template:Smaller</title>
<ns>10</ns>
<id>5117873</id>
<revision>
<id>668584667</id>
<parentid>662442951</parentid>
<timestamp>2015-06-25T07:36:48Z</timestamp>
<contributor>
<username>Salix alba</username>
<id>212526</id>
</contributor>
<comment>needs a separate TemplateData page so works with VE</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="102" xml:space="preserve">{{Resize|90%|{{{1}}}}}&lt;noinclude&gt;
{{Documentation|Template:Resize/doc}}
{{/TemplateData}}
&lt;/noinclude&gt;</text>
<sha1>k1qtrx9lyxt4z46c4w03964r8vs2pzc</sha1>
</revision>
</page>
<page>
<title>Template:Spaces</title>
<ns>10</ns>
<id>5660335</id>
<revision>
<id>687408551</id>
<parentid>663789983</parentid>
<timestamp>2015-10-25T11:38:26Z</timestamp>
<contributor>
<username>Edokter</username>
<id>1624037</id>
</contributor>
<comment>use class</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="394" xml:space="preserve">&lt;span class="nowrap"&gt;{{#iferror:{{#expr:{{{1|1}}}}}
|{{#switch:{{{1}}}
|fig=&amp;#8199;
|en=&amp;ensp;
|em=&amp;emsp;
|thin=&amp;thinsp;
|hair=&amp;#8202;
|&amp;nbsp;
}}
|{{#invoke:String|rep|{{#switch:{{{2}}}
|fig=&amp;#8199;
|en=&amp;ensp;
|em=&amp;emsp;
|thin=&amp;thinsp;
|hair=&amp;#8202;
|&amp;nbsp;
}}|{{{1|1}}}}}
}}&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
<sha1>jukvcl40dksi5vvimpqq0n6czue0473</sha1>
</revision>
</page>
<page>
<title>Template:Wikipedia help pages</title>
<ns>10</ns>
<id>29803308</id>
<revision>
<id>989106479</id>
<parentid>989068501</parentid>
<timestamp>2020-11-17T02:19:19Z</timestamp>
<contributor>
<username>JsfasdF252</username>
<id>39818221</id>
</contributor>
<comment>[[WP:TEMPLATECAT]]</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text bytes="8456" xml:space="preserve">&lt;noinclude&gt;{{Notice |style=margin-bottom:1.5em; |1=&lt;span style="font-size:large;color:purple;"&gt;Please do not post your requests or questions on this page. If you have questions about using Wikipedia, please ask at the '''[[Wikipedia:Help desk|Help&amp;nbsp;desk]]''' or the '''[[Wikipedia:Teahouse|Teahouse]]'''. For questions about subjects and topics, please use the '''[[Wikipedia:Reference desk|Reference Desk]]'''. Volunteers at these locations will respond to your questions as soon as possible.&lt;/span&gt;}}&lt;/noinclude&gt;&lt;!--
--&gt;{{Navbox
| name = Wikipedia help pages
| state ={{{state&lt;includeonly&gt;|{{{1|collapsed}}}&lt;/includeonly&gt;}}}
| bodyclass = hlist
| basestyle = text-align:center;
| title = [[Help:Directory|Wikipedia help pages]]
| navbar = {{{state|off}}}
| above =
*'''Visit the ''[[Wikipedia:Teahouse|Teahouse]]'' or the ''[[Wikipedia:Help desk|Help desk]]'' for an interactive {{abbr|Q &amp; A|questions and answers}} forum.'''
----
* '''[[Wikipedia:FAQ|FAQs]]'''&amp;nbsp;'''{{Define|(?)|This is a list of frequently asked questions about using and contributing to Wikipedia.}}'''
* '''[[Wikipedia:Reference desk|Reference desks]]'''&amp;nbsp;'''{{Define|(?)|Works like a library reference desk. Ask a question here and Wikipedia volunteers will try to answer it.}}'''
* '''[[Wikipedia:Noticeboards|Noticeboards]]'''&amp;nbsp;'''{{Define|(?)|Pages where editors can ask questions and request assistance from people who are familiar with the policies and guidelines covered by each individual board.}}'''
* '''[[Help:Cheatsheet|Cheatsheet]]'''&amp;nbsp;'''{{Define|(?)| For a list of the most commonly used Wiki markup and templates.}}'''
*''' [[Wikipedia:Directories and indexes|Directories]]'''&amp;nbsp;'''{{Define|(?)|For a list of Wikipedia's directories and indexes.}}'''
| group1 = [[Wikipedia:About|About Wikipedia]]&amp;nbsp;{{Define|(?)|Wikipedia's governess and customs}}
| list1 =
* [[Wikipedia:Administration|Administration]]
**[[Wikipedia:Purpose|Purpose]]
** [[Wikipedia:Five pillars|Principles]]
* [[Wikipedia:Policies and guidelines|Policies and guidelines]]
* [[Wikipedia:What Wikipedia is not|What Wikipedia is not]]
* [[Wikipedia:General disclaimer|Disclaimer]]&amp;nbsp;([[Wikipedia:Advice for parents|parental advice]])
* [[Wikipedia:Request directory|Making requests]]
* [[Wikipedia:Who writes Wikipedia?|Who writes Wikipedia?]]
| group2 = [[Wikipedia:Reader's index to Wikipedia|Help for readers]]&amp;nbsp;{{Define|(?)|Concerns and questions readers may have about Wikipedia}}
| list2 =
*[[Wikipedia:FAQ/Readers|FAQ]]
*[[Wikipedia:Wikipedia book creator status|Books]]
* [[Help:Copyright|Copyright]]
* [[Help:Glossary|Glossary]]
* [[Help:Mobile access|Mobile access]]
* [[Help:Navigation|Navigation]]
* [[Help:Other languages|Other languages]]
* [[Help:Searching|Searching]]
* [[Help:Student help|Students]]
* [[Help:Viewing media|Viewing media]]
| group3 = [[Wikipedia:Contributing to Wikipedia|Contributing&lt;br/&gt;to Wikipedia]]&amp;nbsp;{{Define|(?)|Overviews and resources needed to comprehend, comment on, and edit}}
| list3 =
* [[Wikipedia:Guidance for younger editors|Advice for young editors]]
* [[Wikipedia:Avoiding common mistakes|Avoiding common mistakes]]
* [[Wikipedia:Etiquette|Etiquette]]
* [[Wikipedia:Simplified Manual of Style|Simplified Manual of Style]]
* [[Wikipedia:Simplified ruleset|Simplified rule-set]]
** [[Wikipedia:Ignore all rules|"Ignore all rules"]]
** [[Wikipedia:The rules are principles|"The rules are principles"]]
*[[Wikipedia:Styletips|Style-tips]]
* [[Wikipedia:Tip of the day|Tip of the day]]
* [[Help:Your first article|Your first article]]&amp;nbsp;([[Wikipedia:Article wizard|article wizard]])
| group4 = [[Help:Getting started|Getting started]]&amp;nbsp;{{Define|(?)|Introductions and tutorials}}
| list4 =
* [[Wikipedia:Why create an account?|Why create an account?]]
*[[Help:Introduction|Introductions by topic]]
* [[Wikipedia:The Wikipedia Adventure|The Wikipedia Adventure]]
* [[Wikipedia:Graphics tutorials|Graphics tutorials]]
** [[Help:Pictures|Picture tutorial]]
** [[Wikipedia:IRC/Tutorial|IRC {{smaller|(live chat)}} tutorial]]
* [[Wikipedia:VisualEditor/User guide|VisualEditor user guide]]
| group5 = [[Wikipedia:Dos and don'ts|Dos and don'ts]]&amp;nbsp;{{Define|(?)|Wikipedia policies, guidelines, and formatting standards in bullet points}}
| list5 =
* [[Wikipedia:Accessibility dos and don'ts|Accessibility]]
* [[Wikipedia:Biography dos and don'ts|Biographies]]
* [[Wikipedia:Biographies of living persons dos and don'ts|Biographies (living)]]
* [[Wikipedia:Categorization dos and don'ts|Categorization]]
* [[Wikipedia:Consensus dos and don'ts|Consensus]]
* [[Wikipedia:Talk dos and don'ts|Discussions]]
* [[Wikipedia:Disambiguation dos and don'ts|Disambiguation]]
* [[Wikipedia:Image dos and don'ts|Images]]
* [[Wikipedia:Lead dos and don'ts|Leads]]
* [[Wikipedia:Linking dos and don'ts|Links]]
* [[Wikipedia:List dos and don'ts|Lists]]
* [[Wikipedia:References dos and don'ts|References]]
* [[Wikipedia:Table dos and don'ts|Tables]]
* [[Wikipedia:Article title dos and don'ts|Titles (of articles)]]
| group7 = [[:Category:Wikipedia how-to|How-to pages]] and&lt;br/&gt;[[:Category:Wikipedia information pages|information pages]]&amp;nbsp;{{Define|(?)|Topic specific informative and instructional pages}}
| list7 =
* [[Wikipedia:Guide to appealing blocks|Appealing blocks]]
* [[Wikipedia:Guide to deletion|Article deletion]]
* [[Help:Category|Categories]]
* [[Help:Citations quick reference|Citations/references]]
** [[Help:Referencing for beginners|Referencing for beginners]]
** [[Help:Citation Style 1|Citation Style 1]]
** [[Help:Cite errors|Cite errors]]
** [[Help:References and page numbers|References and page numbers]]
* [[Help:Convert|Convert]]
* [[Help:Diff|Diff]]
* [[Help:Editing|Editing]]
** [[Help:Minor edit|Minor edit]]
** [[Help:Edit toolbar|toolbar]]
** [[Help:Edit conflict|edit conflict]]
* [[Help:Find sources|Find sources]]
* [[Help:Files|Files]]
* [[Help:Footnotes|Footnotes]]
* [[Wikipedia:Guide to image deletion|Image deletion]]
* [[Help:Infobox|Infoboxes]]
* [[Help:Link|Linking]]&amp;nbsp;([[Help:Link color|link color]])
* [[Help:Logging in|Logging in]]
* [[Wikipedia:Merging|Merging]]
* [[Help:Page name|Page name]]
** [[Help:How to move a page|Renaming pages]]
* [[Help:Redirect|Redirect]]
* [[Help:Reset password|Passwords]]
** [[Help:Email confirmation|Email confirmation]]
* [[Help:Reverting|Reverting]]
** [[Help:Simple guide to vandalism cleanup|Simple vandalism cleanup]]
* [[Help:Talk pages|Talk pages]]&amp;nbsp;([[Help:Archiving a talk page|archiving]])
* [[Help:User contributions|User contributions]]
| group8 = [[Wiki markup|Coding]]&amp;nbsp;{{Define|(?)|Wikitext information consists of the syntax used to format a page}}
| list8 =
* [[Help:Wikitext|Wiki markup]]
* [[Help:Barchart|Barchart]]s
* [[Help:Calculation|Calculation]]s
* [[Help:Special characters|Characters]]
* [[Help:Columns|Column]]s
* [[Wikipedia:Manual of Style/Hidden text|Hidden text]]
* [[Help:HTML in wikitext|HTML]]
* [[Help:List|Lists]]
* [[Help:Magic words|Magic words]]
* [[Help:Musical symbols|Music symbols]]
* [[Help:Section|Sections]]
* [[Help:Sound file markup|Sounds]]
* [[Help:Table|Tables]]
* [[Help:Template|Template]]s
* [[Wikipedia:Transclusion|Transclusion]]
* [[Help:URL|URL]]
* [[Help:Visual file markup|Visual files]]
| group9 = [[Wikipedia:Directories and indexes|Directories]]&amp;nbsp;{{Define|(?)|Wikipedia's directories and indexes}}
| list9 =
* [[Wikipedia:Wikipedia abbreviations|Abbreviations]]
*[[Wikipedia:Contents|Contents]] &lt;small&gt;(Encyclopedia proper)&lt;/small&gt;
* [[Wikipedia:Department directory|Departments]]
* [[Wikipedia:Editor's index to Wikipedia|Editor's index]]
* [[Wikipedia:Essay directory|Essays]]
* [[Wikipedia:FAQ/Index|FAQs]]
* [[Wikipedia:Glossary|Glossary]]
* [[Wikipedia:List of guidelines|Guidelines]]
* [[Wikipedia:Manual of Style/Contents|Manual of Style ]]
* [[Wikipedia:List of policies|Policies]]
*[[Wikipedia:Maintenance|Tasks]]
* [[Wikipedia:Tips|Tips]]
* [[Wikipedia:Tools|Tools]]
| below =''' [[Help: Wikipedia: The Missing Manual|Missing Manual]]'''
----
{{edit|Special:MyTalk|'''Ask for help on your talk page'''|section=new|preload=Help:Contents/helpmepreload|preloadtitle=Help me!}}&amp;nbsp;'''{{Define|(?)|
If you need help, you can use this link to ask a question on your talk page; a volunteer will visit you there shortly!}}'''
}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --&gt;
&lt;/noinclude&gt;</text>
<sha1>44nk4xx5vtneplptp4fpfolcfe12i6s</sha1>
</revision>
</page>
<page>
<title>Module:Category handler</title>
<ns>828</ns>
<id>39772274</id>
<revision>
<id>948472489</id>
<parentid>948472486</parentid>
<timestamp>2020-04-01T06:12:40Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="7871" xml:space="preserve">--------------------------------------------------------------------------------
-- --
-- CATEGORY HANDLER --
-- --
-- This module implements the {{category handler}} template in Lua, --
-- with a few improvements: all namespaces and all namespace aliases --
-- are supported, and namespace names are detected automatically for --
-- the local wiki. This module requires [[Module:Namespace detect]] --
-- and [[Module:Yesno]] to be available on the local wiki. It can be --
-- configured for different wikis by altering the values in --
-- [[Module:Category handler/config]], and pages can be blacklisted --
-- from categorisation by using [[Module:Category handler/blacklist]]. --
-- --
--------------------------------------------------------------------------------
-- Load required modules
local yesno = require('Module:Yesno')
-- Lazily load things we don't always need
local mShared, mappings
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function trimWhitespace(s, removeBlanks)
if type(s) ~= 'string' then
return s
end
s = s:match('^%s*(.-)%s*$')
if removeBlanks then
if s ~= '' then
return s
else
return nil
end
else
return s
end
end
--------------------------------------------------------------------------------
-- CategoryHandler class
--------------------------------------------------------------------------------
local CategoryHandler = {}
CategoryHandler.__index = CategoryHandler
function CategoryHandler.new(data, args)
local obj = setmetatable({ _data = data, _args = args }, CategoryHandler)
-- Set the title object
do
local pagename = obj:parameter('demopage')
local success, titleObj
if pagename then
success, titleObj = pcall(mw.title.new, pagename)
end
if success and titleObj then
obj.title = titleObj
if titleObj == mw.title.getCurrentTitle() then
obj._usesCurrentTitle = true
end
else
obj.title = mw.title.getCurrentTitle()
obj._usesCurrentTitle = true
end
end
-- Set suppression parameter values
for _, key in ipairs{'nocat', 'categories'} do
local value = obj:parameter(key)
value = trimWhitespace(value, true)
obj['_' .. key] = yesno(value)
end
do
local subpage = obj:parameter('subpage')
local category2 = obj:parameter('category2')
if type(subpage) == 'string' then
subpage = mw.ustring.lower(subpage)
end
if type(category2) == 'string' then
subpage = mw.ustring.lower(category2)
end
obj._subpage = trimWhitespace(subpage, true)
obj._category2 = trimWhitespace(category2) -- don't remove blank values
end
return obj
end
function CategoryHandler:parameter(key)
local parameterNames = self._data.parameters[key]
local pntype = type(parameterNames)
if pntype == 'string' or pntype == 'number' then
return self._args[parameterNames]
elseif pntype == 'table' then
for _, name in ipairs(parameterNames) do
local value = self._args[name]
if value ~= nil then
return value
end
end
return nil
else
error(string.format(
'invalid config key "%s"',
tostring(key)
), 2)
end
end
function CategoryHandler:isSuppressedByArguments()
return
-- See if a category suppression argument has been set.
self._nocat == true
or self._categories == false
or (
self._category2
and self._category2 ~= self._data.category2Yes
and self._category2 ~= self._data.category2Negative
)
-- Check whether we are on a subpage, and see if categories are
-- suppressed based on our subpage status.
or self._subpage == self._data.subpageNo and self.title.isSubpage
or self._subpage == self._data.subpageOnly and not self.title.isSubpage
end
function CategoryHandler:shouldSkipBlacklistCheck()
-- Check whether the category suppression arguments indicate we
-- should skip the blacklist check.
return self._nocat == false
or self._categories == true
or self._category2 == self._data.category2Yes
end
function CategoryHandler:matchesBlacklist()
if self._usesCurrentTitle then
return self._data.currentTitleMatchesBlacklist
else
mShared = mShared or require('Module:Category handler/shared')
return mShared.matchesBlacklist(
self.title.prefixedText,
mw.loadData('Module:Category handler/blacklist')
)
end
end
function CategoryHandler:isSuppressed()
-- Find if categories are suppressed by either the arguments or by
-- matching the blacklist.
return self:isSuppressedByArguments()
or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist()
end
function CategoryHandler:getNamespaceParameters()
if self._usesCurrentTitle then
return self._data.currentTitleNamespaceParameters
else
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
return mShared.getNamespaceParameters(
self.title,
mappings
)
end
end
function CategoryHandler:namespaceParametersExist()
-- Find whether any namespace parameters have been specified.
-- We use the order "all" --&gt; namespace params --&gt; "other" as this is what
-- the old template did.
if self:parameter('all') then
return true
end
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
for ns, params in pairs(mappings) do
for i, param in ipairs(params) do
if self._args[param] then
return true
end
end
end
if self:parameter('other') then
return true
end
return false
end
function CategoryHandler:getCategories()
local params = self:getNamespaceParameters()
local nsCategory
for i, param in ipairs(params) do
local value = self._args[param]
if value ~= nil then
nsCategory = value
break
end
end
if nsCategory ~= nil or self:namespaceParametersExist() then
-- Namespace parameters exist - advanced usage.
if nsCategory == nil then
nsCategory = self:parameter('other')
end
local ret = {self:parameter('all')}
local numParam = tonumber(nsCategory)
if numParam and numParam &gt;= 1 and math.floor(numParam) == numParam then
-- nsCategory is an integer
ret[#ret + 1] = self._args[numParam]
else
ret[#ret + 1] = nsCategory
end
if #ret &lt; 1 then
return nil
else
return table.concat(ret)
end
elseif self._data.defaultNamespaces[self.title.namespace] then
-- Namespace parameters don't exist, simple usage.
return self._args[1]
end
return nil
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- Used for testing purposes.
return {
CategoryHandler = CategoryHandler
}
end
function p._main(args, data)
data = data or mw.loadData('Module:Category handler/data')
local handler = CategoryHandler.new(data, args)
if handler:isSuppressed() then
return nil
end
return handler:getCategories()
end
function p.main(frame, data)
data = data or mw.loadData('Module:Category handler/data')
local args = require('Module:Arguments').getArgs(frame, {
wrappers = data.wrappers,
valueFunc = function (k, v)
v = trimWhitespace(v)
if type(k) == 'number' then
if v ~= '' then
return v
else
return nil
end
else
return v
end
end
})
return p._main(args, data)
end
return p</text>
<sha1>letwavu3yvlayfzew66uuwixmwebq5b</sha1>
</revision>
</page>
<page>
<title>Module:Category handler/blacklist</title>
<ns>828</ns>
<id>43232926</id>
<revision>
<id>951673917</id>
<parentid>948472491</parentid>
<timestamp>2020-04-18T08:48:05Z</timestamp>
<contributor>
<username>Jo-Jo Eumerus</username>
<id>17449355</id>
</contributor>
<comment>Per category talk page</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="761" xml:space="preserve">-- This module contains the blacklist used by [[Module:Category handler]].
-- Pages that match Lua patterns in this list will not be categorised unless
-- categorisation is explicitly requested.
return {
'^Main Page$', -- don't categorise the main page.
-- Don't categorise the following pages or their subpages.
-- "%f[/\0]" matches if the next character is "/" or the end of the string.
'^Wikipedia:Cascade%-protected items%f[/\0]',
'^User:UBX%f[/\0]', -- The userbox "template" space.
'^User talk:UBX%f[/\0]',
-- Don't categorise subpages of these pages, but allow
-- categorisation of the base page.
'^Wikipedia:Template index/.*$',
-- Don't categorise archives.
'/[aA]rchive',
"^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$",
}</text>
<sha1>fsv1drcay6t25e91hzhqxtyp7pckbpx</sha1>
</revision>
</page>
<page>
<title>Module:Category handler/config</title>
<ns>828</ns>
<id>42291997</id>
<revision>
<id>948472494</id>
<parentid>894414603</parentid>
<timestamp>2020-04-01T06:12:40Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="5755" xml:space="preserve">--------------------------------------------------------------------------------
-- [[Module:Category handler]] configuration data --
-- Language-specific parameter names and values can be set here. --
-- For blacklist config, see [[Module:Category handler/blacklist]]. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- foo = 'parameter name', --
-- --
-- To add multiple names, you can use this format: --
-- --
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --
--------------------------------------------------------------------------------
cfg.parameters = {
-- The nocat and categories parameter suppress
-- categorisation. They are used with Module:Yesno, and work as follows:
--
-- cfg.nocat:
-- Result of yesno() Effect
-- true Categorisation is suppressed
-- false Categorisation is allowed, and
-- the blacklist check is skipped
-- nil Categorisation is allowed
--
-- cfg.categories:
-- Result of yesno() Effect
-- true Categorisation is allowed, and
-- the blacklist check is skipped
-- false Categorisation is suppressed
-- nil Categorisation is allowed
nocat = 'nocat',
categories = 'categories',
-- The parameter name for the legacy "category2" parameter. This skips the
-- blacklist if set to the cfg.category2Yes value, and suppresses
-- categorisation if present but equal to anything other than
-- cfg.category2Yes or cfg.category2Negative.
category2 = 'category2',
-- cfg.subpage is the parameter name to specify how to behave on subpages.
subpage = 'subpage',
-- The parameter for data to return in all namespaces.
all = 'all',
-- The parameter name for data to return if no data is specified for the
-- namespace that is detected.
other = 'other',
-- The parameter name used to specify a page other than the current page;
-- used for testing and demonstration.
demopage = 'page',
}
--------------------------------------------------------------------------------
-- Parameter values --
-- These are set values that can be used with certain parameters. Only one --
-- value can be specified, like this: --
-- --
-- cfg.foo = 'value name' -- --
--------------------------------------------------------------------------------
-- The following settings are used with the cfg.category2 parameter. Setting
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2
-- is present but equal to anything other than cfg.category2Yes or
-- cfg.category2Negative then it supresses cateogrisation.
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- The following settings are used with the cfg.subpage parameter.
-- cfg.subpageNo is the value to specify to not categorise on subpages;
-- cfg.subpageOnly is the value to specify to only categorise on subpages.
cfg.subpageNo = 'no'
cfg.subpageOnly = 'only'
--------------------------------------------------------------------------------
-- Default namespaces --
-- This is a table of namespaces to categorise by default. The keys are the --
-- namespace numbers. --
--------------------------------------------------------------------------------
cfg.defaultNamespaces = {
[ 0] = true, -- main
[ 6] = true, -- file
[ 12] = true, -- help
[ 14] = true, -- category
[100] = true, -- portal
[108] = true, -- book
}
--------------------------------------------------------------------------------
-- Wrappers --
-- This is a wrapper template or a list of wrapper templates to be passed to --
-- [[Module:Arguments]]. --
--------------------------------------------------------------------------------
cfg.wrappers = 'Template:Category handler'
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.</text>
<sha1>6ga9hbq2pdwalsvx68i53dmbr421rq5</sha1>
</revision>
</page>
<page>
<title>Module:Category handler/data</title>
<ns>828</ns>
<id>43233647</id>
<revision>
<id>948472496</id>
<parentid>894414581</parentid>
<timestamp>2020-04-01T06:12:41Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="631" xml:space="preserve">-- This module assembles data to be passed to [[Module:Category handler]] using
-- mw.loadData. This includes the configuration data and whether the current
-- page matches the title blacklist.
local data = require('Module:Category handler/config')
local mShared = require('Module:Category handler/shared')
local blacklist = require('Module:Category handler/blacklist')
local title = mw.title.getCurrentTitle()
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(
title.prefixedText,
blacklist
)
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(
title,
mShared.getParamMappings()
)
return data</text>
<sha1>k26mwixuaeijisfddb0sxkg82iux8v4</sha1>
</revision>
</page>
<page>
<title>Module:Category handler/shared</title>
<ns>828</ns>
<id>43232937</id>
<revision>
<id>948472498</id>
<parentid>894414384</parentid>
<timestamp>2020-04-01T06:12:41Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="888" xml:space="preserve">-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local p = {}
function p.matchesBlacklist(page, blacklist)
for i, pattern in ipairs(blacklist) do
local match = mw.ustring.match(page, pattern)
if match then
return true
end
end
return false
end
function p.getParamMappings(useLoadData)
local dataPage = 'Module:Namespace detect/data'
if useLoadData then
return mw.loadData(dataPage).mappings
else
return require(dataPage).mappings
end
end
function p.getNamespaceParameters(titleObj, mappings)
-- We don't use title.nsText for the namespace name because it adds
-- underscores.
local mappingsKey
if titleObj.isTalkPage then
mappingsKey = 'talk'
else
mappingsKey = mw.site.namespaces[titleObj.namespace].name
end
mappingsKey = mw.ustring.lower(mappingsKey)
return mappings[mappingsKey] or {}
end
return p</text>
<sha1>omlsnhudxz6juptvtxz7ns97jutbzc5</sha1>
</revision>
</page>
<page>
<title>Module:Delink</title>
<ns>828</ns>
<id>38999128</id>
<revision>
<id>695173753</id>
<parentid>617654635</parentid>
<timestamp>2015-12-14T07:03:21Z</timestamp>
<contributor>
<username>The Earwig</username>
<id>7418060</id>
</contributor>
<minor/>
<comment>Protected "[[Module:Delink]]": [[WP:High-risk templates|Highly visible template]]: 55,000+ mainspace transclusions ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="6545" xml:space="preserve">-- This module de-links most wikitext.
require('Module:No globals')
local p = {}
local getArgs
local function delinkReversePipeTrick(s)
if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes.
return s
else
return s:match("%[%[|(.*)%]%]")
end
end
local function delinkPipeTrick(s)
local linkarea, display = "", ""
-- We need to deal with colons, brackets, and commas, per [[Help:Pipe trick]].
-- First, remove the text before the first colon, if any.
if s:match(":") then
s = s:match("%[%[.-:(.*)|%]%]")
-- If there are no colons, grab all of the text apart from the square brackets and the pipe.
else
s = s:match("%[%[(.*)|%]%]")
end
-- Next up, brackets and commas.
if s:match("%(.-%)$") then -- Brackets trump commas.
s = s:match("(.-) ?%(.-%)$")
elseif s:match(",") then -- If there are no brackets, display only the text before the first comma.
s = s:match("(.-),.*$")
end
return s
end
local function delinkWikilink(s)
local result = s
-- Deal with the reverse pipe trick.
if result:match("%[%[|") then
return delinkReversePipeTrick(result)
end
result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs.
result = mw.text.decode(result, true) -- decode HTML entities.
-- Check for bad titles. To do this we need to find the
-- title area of the link, i.e. the part before any pipes.
local titlearea
if result:match("|") then -- Find if we're dealing with a piped link.
titlearea = result:match("^%[%[(.-)|.*%]%]")
else
titlearea = result:match("^%[%[(.-)%]%]")
end
-- Check for bad characters.
if mw.ustring.match(titlearea, "[%[%]&lt;&gt;{}%%%c\n]") then
return s
end
-- Check for categories, interwikis, and files.
local colonprefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon.
local ns = mw.site.namespaces[colonprefix] -- see if this is a known namespace
if mw.language.isKnownLanguageTag(colonprefix)
or ( ns and ( ns.canonicalName == "File" or ns.canonicalName == "Category" ) ) then
return ""
end
-- Remove the colon if the link is using the [[Help:Colon trick]].
if result:match("%[%[:") then
result = "[[" .. result:match("%[%[:(.*%]%])")
end
-- Deal with links using the [[Help:Pipe trick]].
if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then
return delinkPipeTrick(result)
end
-- Find the display area of the wikilink
if result:match("|") then -- Find if we're dealing with a piped link.
result = result:match("^%[%[.-|(.+)%]%]")
-- Remove new lines from the display of multiline piped links,
-- where the pipe is before the first new line.
result = result:gsub("\n", "")
else
result = result:match("^%[%[(.-)%]%]")
end
return result
end
local function delinkURL(s)
-- Assume we have already delinked internal wikilinks, and that
-- we have been passed some text between two square brackets [foo].
-- If the text contains a line break it is not formatted as a URL, regardless of other content.
if s:match("\n") then
return s
end
-- Check if the text has a valid URL prefix and at least one valid URL character.
local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"}
local url_prefix
for i,v in ipairs(valid_url_prefixes) do
if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then
url_prefix = v
break
end
end
-- Get display text
if not url_prefix then
return s
end
s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket.
s = s:match('^.-(["&lt;&gt; ].*)') or "" -- Grab all of the text after the first URL separator character ("&lt;&gt; ).
s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off.
local s_decoded = mw.text.decode(s, true)
if mw.ustring.match(s_decoded, "%c") then
return s
else
return s_decoded
end
end
local function delinkLinkClass(s, pattern, delinkFunction)
if not type(s) == "string" then
error("Attempt to de-link non-string input.", 2)
end
if not ( type(pattern) == "string" and mw.ustring.sub(pattern, 1, 1) == "^" ) then
error('Invalid pattern detected. Patterns must begin with "^".', 2)
end
-- Iterate over the text string, and replace any matched text. using the
-- delink function. We need to iterate character by character rather
-- than just use gsub, otherwise nested links aren't detected properly.
local result = ""
while s ~= '' do
-- Replace text using one iteration of gsub.
s = mw.ustring.gsub(s, pattern, delinkFunction, 1)
-- Append the left-most character to the result string.
result = result .. mw.ustring.sub(s, 1, 1)
s = mw.ustring.sub(s, 2, -1)
end
return result
end
function p._delink(args)
local text = args[1] or ""
if args.refs == "yes" then
-- Remove any [[Help:Strip markers]] representing ref tags. In most situations
-- this is not a good idea - only use it if you know what you are doing!
text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "")
end
if not (args.comments == "no") then
text = text:gsub("&lt;!%-%-.-%-%-&gt;", "") -- Remove html comments.
end
if not (args.wikilinks == "no") then
text = delinkLinkClass(text, "^%[%[.-%]%]", delinkWikilink) -- De-link wikilinks.
end
if not (args.urls == "no") then
text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs.
end
if not (args.whitespace == "no") then
-- Replace single new lines with a single space, but leave double new lines
-- and new lines only containing spaces or tabs before a second new line.
text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2")
text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces.
end
return text
end
function p.delink(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return p._delink(getArgs(frame, {wrappers = 'Template:Delink'}))
end
return p</text>
<sha1>9uut60bk5e8nnvyxo8jbf7qt3b17a4v</sha1>
</revision>
</page>
<page>
<title>Module:Footnotes</title>
<ns>828</ns>
<id>38969239</id>
<revision>
<id>979973404</id>
<parentid>958422692</parentid>
<timestamp>2020-09-23T21:11:20Z</timestamp>
<contributor>
<username>Matthiaspaul</username>
<id>13467261</id>
</contributor>
<comment>CE</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="19322" xml:space="preserve">require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;
--[[--------------------------&lt; A R G S _ D E F A U L T &gt;------------------------------------------------------
a table to specify initial values.
]]
local args_default = {
bracket_left = '',
bracket_right = '',
bracket_year_left = '',
bracket_year_right = '',
postscript = '',
page = '',
pages = '',
location = '',
page_sep = ", p.&amp;nbsp;",
pages_sep = ", pp.&amp;nbsp;",
ref = '',
template = 'harv', -- if template name not provided in {{#invoke:}} use this
};
--[[--------------------------&lt; T A R G E T _ C H E C K &gt;------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, args)
local namespace = mw.title.getCurrentTitle().namespace;
local anchor_id_list_module = mw.loadData ('Module:Footnotes/anchor_id_list');
local anchor_id_list = anchor_id_list_module.anchor_id_list;
local article_whitelist = anchor_id_list_module.article_whitelist;
local template_list = anchor_id_list_module.template_list;
local whitelist_module = mw.loadData ('Module:Footnotes/whitelist');
local whitelist = whitelist_module.whitelist;
local special_patterns = whitelist_module.special_patterns;
local DNB_special_patterns = whitelist_module.DNB_special_patterns;
local DNB_template_names = whitelist_module.DNB_template_names;
if 10 == namespace then
return ''; -- automatic form of |no-tracking=yes; TODO: is this too broad?
end
local tally = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a tally
local msg;
local category;
if not tally then
if args.ignore then
return ''; -- if ignore is true then no message, no category
end
if article_whitelist and article_whitelist[anchor_id] then -- if an article-local whitelist and anchor ID is in it
return ''; -- done
end
local wl_anchor_id = anchor_id; -- copy to be modified to index into the whitelist
if args.year then -- for anchor IDs created by this template (not in |ref=) that have a date
if args.year:match ('%d%l$') or -- use the date value to determine if we should remove the disambiguator
args.year:match ('n%.d%.%l$') or
args.year:match ('nd%l$') then
wl_anchor_id = wl_anchor_id:gsub ('%l$', ''); -- remove the disambiguator
end
end
local t_tbl = whitelist[wl_anchor_id]; -- get list of templates associated with this anchor ID
if t_tbl then -- when anchor ID not whitelisted t_tbl is nil
for _, t in ipairs (t_tbl) do -- spin through the list of templates associated with this anchor ID
if template_list[t] then -- if associated template is found in the list of templates in the article
return ''; -- anchor ID is whitlisted and article has matching template so no error
end
end
end
for _, pattern in ipairs (special_patterns) do -- spin through the spcial patterns and try to match
if anchor_id:match (pattern) then
return '';
end
end
for _, dnb_t in ipairs (DNB_template_names or {}) do -- getting desparate now, are there any DNB templates? DNB_template_names may be nil; empty table prevents script error
if template_list[dnb_t] then -- if the article has this DNB template
for _, pattern in ipairs (DNB_special_patterns) do -- spin through the DNB-specifiec wildcard patterns
if anchor_id:match (pattern) then -- and attempt a match
return ''; -- found a match
end
end
end
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found
category = '[[Category:Harv and Sfn no-target errors]]';
elseif 1 &lt; tally then
msg = 'multiple targets (' .. tally .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = '[[Category:Harv and Sfn multiple-target errors]]';
end
-- category = 0 == namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
category = 0 == namespace and category or ''; -- only categorize in article space
--use this version to show error messages
-- return msg and '&lt;span class="error harv-error" style="display: inline; font-size:100%"&gt; ' .. args.template .. ' error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])&lt;/span&gt;' .. category or '';
--use this version to hide error messages
return msg and '&lt;span class="error harv-error" style="display: none; font-size:100%"&gt; ' .. args.template .. ' error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])&lt;/span&gt;' .. category or '';
end
--[[--------------------------&lt; I S _ Y E A R &gt;----------------------------------------------------------------
evaluates param to see if it is one of these forms with or without lowercase letter disambiguator:
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
return true when param has a recognized form; false else
]]
local patterns_date= {
'^%d%d%d%d?%l?$',
'^n%.d%.%l?$',
'^nd%l?$',
'^c%. %d%d%d%d?%l?$',
'^%d%d%d%d–%d%d%d%d%l?$',
'^%d%d%d%d–%d%d%l?$',
}
local function is_year (param, args)
args.year = ''; -- used for harv error;
for _, pattern in ipairs (patterns_date) do
if mw.ustring.match (param, pattern) then
args.year = param; -- used for harv error;
return true;
end
end
end
--[[--------------------------&lt; C O R E &gt;----------------------------------------------------------------------
returns an anchor link (CITEREF) formed from one to four author names, year, and insource location (|p=, |pp=, loc=)
]]
local function core( args )
local result;
local err_msg = ''
if args.P5 ~= '' then
if is_year (args.P5, args) then
result = table.concat ({args.P1, ' et al. ', args.bracket_year_left, args.P5, args.bracket_year_right});
else
args.P5 = ''; -- when P5 not a year don't include in anchor
result = table.concat ({args.P1, ' et al.'}); -- and don't render it
end
elseif args.P4 ~= '' then
if is_year (args.P4, args) then
result = table.concat ({args.P1, ', ', args.P2, ' &amp;amp; ', args.P3, ' ', args.bracket_year_left, args.P4, args.bracket_year_right}); -- three names and a year
else
result = table.concat ({args.P1, ' et al.'}); -- four names
end
elseif args.P3 ~= '' then
if is_year (args.P3, args) then
result = table.concat ({args.P1, ' &amp;amp; ', args.P2, ' ', args.bracket_year_left, args.P3, args.bracket_year_right}); -- two names and a year
else
result = table.concat ({args.P1, ', ', args.P2, ' ', ' &amp;amp; ', args.P3}); -- three names
end
elseif args.P2 ~= '' then
if is_year (args.P2, args) then
result = table.concat ({args.P1, ' ', args.bracket_year_left, args.P2, args.bracket_year_right}); -- one name and year
else
result = table.concat ({args.P1, ' &amp;amp; ', args.P2}); -- two names
end
else
result = args.P1; -- one name
end
-- when author-date result ends with a dot (typically when the last positional parameter holds 'n.d.')
-- and when no in-source location (no |p=, |pp=, or |loc=)
-- and when the first or only character in args.postscript is a dot
-- remove the author-date result trailing dot
-- the author-date result trailing dot will be replaced later with the content of args.postscript (usually a dot)
if ('.' == result:sub(-1)) and ('.' == args.postscript:sub(1)) and ('' == args.page) and ('' == args.pages) and ('' == args.location) then
result = result:gsub ('%.$', '');
end
if args.ref ~= 'none' then
local anchor_id;
if args.ref ~= '' then
anchor_id = mw.uri.anchorEncode (args.ref);
err_msg = target_check (anchor_id, args);
result = table.concat ({'[[#', anchor_id, '|', result, ']]'});
else
anchor_id = mw.uri.anchorEncode (table.concat ({'CITEREF', args.P1, args.P2, args.P3, args.P4, args.P5}));
err_msg = target_check (anchor_id, args);
result = table.concat ({'[[#', anchor_id, '|', result, ']]'});
end
end
if args.page ~= '' then
result = table.concat ({result, args.page_sep, args.page});
elseif args.pages ~= ''then
result = table.concat ({result, args.pages_sep, args.pages});
end
if args.location ~= '' then
result = table.concat ({result, ', ', args.location});
end
result = table.concat ({args.bracket_left, result, args.bracket_right, args.postscript}):gsub ('%s+', ' '); -- strip redundant spaces
return result .. err_msg;
end
--[[--------------------------&lt; A R G S _ F E T C H &gt;---------------------------------------------------------
Because all of the templates share a common set of parameters, a single common function to fetch those parameters
from frame and parent frame.
]]
local function args_fetch (frame, ps)
local args = args_default; -- create a copy of the default table
local pframe = frame:getParent(); -- point to the template's parameter table
for k, v in pairs (frame.args) do -- override defaults with values provided in the #invoke: if any
args[k] = v;
end
args.postscript = pframe.args.postscript or pframe.args.ps or ps;
if 'none' == args.postscript then
args.postscript = '';
end
args.page = pframe.args.p or pframe.args.page or '';
args.pages = pframe.args.pp or pframe.args.pages or '';
args.location = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or '';
args.ignore = ('yes' == pframe.args['ignore-false-positive']) or ('yes' == pframe.args['ignore-err']);
for i, v in ipairs ({'P1', 'P2', 'P3', 'P4', 'P5'}) do -- loop through the five positional parameters and trim if set else empty string
args[v] = (pframe.args[i] and mw.text.trim (pframe.args[i])) or '';
end
if args.P5 and not is_year (args.P5, args) then
local i = 6; -- initialize the indexer to the sixth positional parameter
while pframe.args[i] do -- in case there are too many authors loop through the authors looking for a year
local v = mw.text.trim (pframe.args[i]); -- trim
if is_year (v, args) then -- if a year
args.P5 = v; -- overwrite whatever was in args.P5 with year
break; -- and abandon the search
end
i = i + 1; -- bump the indexer
end
end
return args;
end
--[[--------------------------&lt; H A R V A R D _ C I T A T I O N &gt;----------------------------------------------
common entry point for:
{{harvard citation}} aka {{harv}}
{{Harvard citation no brackets}} aka {{harvnb}}
{{harvcol}}
{{harvcolnb}}
{{harvcoltxt}}
{{Harvard citation text}} aka {{harvtxt}}
{{Harvp}}
Distinguishing features (brackets and page separators) are specified in this module's {{#invoke}} in the respective templates.
]]
local function harvard_citation (frame)
local args = args_fetch (frame, ''); -- get the template and invoke parameters; default postscript is empty string
return core (args);
end
--[[--------------------------&lt; S T R I P _ U R L &gt;------------------------------------------------------------
used by sfn() and sfnm(). This function fixes an issue with reference tooltip gadget where the tooltip is not displayed
when an insource locator (|p=, |pp=, |loc=) has an external wikilink that contains a # character
strip uri-reserved characters from urls in |p=, |pp-, and |loc= parameters The researved characters are:
!#$&amp;'()*+,/:;=?@[]
]]
local function strip_url (pages)
local escaped_uri;
if not pages or ('' == pages) then
return pages;
end
for uri in pages:gmatch ('%[(%a[%w%+%.%-]*://%S+)') do -- for each external link get the uri
escaped_uri = uri:gsub ("([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ); -- save a copy with lua pattern characters escaped
uri = uri:gsub ("[!#%$&amp;'%(%)%*%+,/:;=%?@%[%]%.%%]", ''); -- remove reserved characters and '%' because '%20' (space character) is a lua 'invalid capture index'
pages = pages:gsub (escaped_uri, uri, 1); -- replace original uri with the stripped version
end
return pages;
end
--[[--------------------------&lt; S F N &gt;------------------------------------------------------------------------
entry point for {{sfn}} and {{sfnp}}
]]
local function sfn (frame)
local args = args_fetch (frame, '.'); -- get the template and invoke parameters; default postscript is a dot
local result = core (args); -- go make a CITEREF anchor
-- put it all together and then strip redundant spaces
local name = table.concat ({'FOOTNOTE', args.P1, args.P2, args.P3, args.P4, args.P5, strip_url (args.page), strip_url (args.pages), strip_url (args.location)}):gsub ('%s+', ' ');
return frame:extensionTag ({name='ref', args={name=name}, content=result});
end
--[[--------------------------&lt; S F N M &gt;----------------------------------------------------------------------
common entry point for {{sfnm}} and {{sfnmp}}
Distinguishing features (brackets) are specified in this module's {{#invoke}} in the respective templates.
]]
local function sfnm (frame)
local args = args_default; -- create a copy of the default table
local pframe = frame:getParent(); -- point to the template's parameter table
local n = 1; -- index of source; this is the 'n' in na1, ny, etc
local first_pnum = 1; -- first of a pair of positional parameters
local second_pnum = 2; -- second of a pair of positional parameters
local last_ps = 0; -- index of the last source with |nps= set
local last_index = 0; -- index of the last source; these used to determine which of |ps= or |nps= will terminate the whole rendering
local out = {}; -- table to hold rendered sources
local footnote = {'FOOTNOTE'}; -- all author, date, insource location stuff becomes part of the reference's footnote id; added as we go
for k, v in pairs (frame.args) do -- override defaults with values provided in the #invoke: if any
args[k] = v;
end
while true do
if not pframe.args[table.concat ({n, 'a1'})] and not pframe.args[first_pnum] then
break; -- no na1 or matching positional parameter so done
end
if pframe.args[table.concat ({n, 'a1'})] then -- does this source use named parameters?
for _, v in ipairs ({'P1', 'P2', 'P3', 'P4', 'P5'}) do -- initialize for this source
args[v] = '';
end
for i, v in ipairs ({'P1', 'P2', 'P3', 'P4', 'P5'}) do -- extract author and year parameters for this source
args[v] = pframe.args[table.concat ({n, 'a', i})] or ''; -- attempt to assign author name
if '' == args[v] then -- when there wasn't an author name
args[v] = pframe.args[table.concat ({n, 'y'})] or ''; -- attempt to assign year
break; -- done with author/date for this source
end
end
else -- this source uses positional parameters
args.P1 = mw.text.trim (pframe.args[first_pnum]); -- yes, only one author supported
args.P2 = (pframe.args[second_pnum] and mw.text.trim (pframe.args[second_pnum])) or ''; -- when positional author, year must also be positional
for _, v in ipairs ({'P3', 'P4', 'P5'}) do -- blank the rest of these for this source
args[v] = '';
end
first_pnum = first_pnum + 2; -- source must use positional author and positional year
second_pnum = first_pnum + 1; -- bump these for possible next positional source
end
args.postscript = pframe.args[table.concat ({n, 'ps'})] or '';
if 'none' == args.postscript then -- this for compatibility with other footnote templates; does nothing
args.postscript = '';
end
args.ref = pframe.args[table.concat ({n, 'ref'})] or ''; -- alternate reference for this source
args.page = pframe.args[table.concat ({n, 'p'})] or ''; -- insource locations for this source
args.pages = pframe.args[table.concat ({n, 'pp'})] or '';
args.location = pframe.args[table.concat ({n, 'loc'})] or '';
args.ignore = ('yes' == pframe.args[table.concat ({n, 'ignore-false-positive'})]) or ('yes' == pframe.args[table.concat ({n, 'ignore-err'})]);
-- args.ignore = 'yes' == pframe.args[table.concat ({n, 'ignore-err'})];
table.insert (out, core (args)); -- save the rendering of this source
for k, v in ipairs ({'P1', 'P2', 'P3', 'P4', 'P5'}) do -- create the FOOTNOTE id
if '' ~= args[v] then
table.insert (footnote, args[v]);
end
end
for k, v in ipairs ({'page', 'pages', 'location'}) do -- these done separately so that we can strip uri-reserved characters from extlinked page numbers
if '' ~= args[v] then
table.insert (footnote, strip_url (args[v]))
end
end
last_index = n; -- flags used to select terminal postscript from nps or from end_ps
if '' ~= args.postscript then
last_ps = n;
end
n = n+1; -- bump for the next one
end
local name = table.concat (footnote):gsub ('%s+', ' '); -- put the footnote together and strip redundant space
args.end_ps = pframe.args.postscript or pframe.args.ps or '.'; -- this is the postscript for the whole not for the individual sources
if 'none' == args.end_ps then -- not an original sfnm parameter value; added for compatibility with other footnote templates
args.end_ps = '';
end
local result = table.concat ({table.concat (out, '; '), (last_index == last_ps) and '' or args.end_ps});
return frame:extensionTag ({name='ref', args={name=name}, content=result});
end
--[[--------------------------&lt; S F N R E F &gt;------------------------------------------------------------------
implements {{sfnref}}
]]
local function sfnref (frame)
local args = getArgs (frame);
local out = {};
for i=1, 5 do -- get the first five args if there are five args
if args[i] then
out[i] = args[i];
else
break; -- less than 5 args break out
end
end
if 5 == #out then -- when we have seen five args there may bemore
local i = 6; -- initialize the indexer to the sixth positional parameter
while args[i] do -- in case there are too many authors loop through the authors looking for a year
if is_year (args[i], args) then -- if a year
out[5] = args[i]; -- overwrite whatever was in args[5] with year
break; -- and abandon the search
end
i = i + 1; -- bump the indexer
end
end
return mw.uri.anchorEncode ('CITEREF' .. table.concat (out));
end
--[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------
]]
return {
harvard_citation = harvard_citation,
sfn = sfn,
sfnm = sfnm,
sfnref = sfnref,
};</text>
<sha1>s1zvviwv48uujx1ljtwb7kcezsoewgu</sha1>
</revision>
</page>
<page>
<title>Module:Footnotes/anchor id list</title>
<ns>828</ns>
<id>63248705</id>
<revision>
<id>962723108</id>
<parentid>958451323</parentid>
<timestamp>2020-06-15T17:44:57Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<comment>sync from sandbox;</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="37482" xml:space="preserve">require('Module:No globals');
local data = mw.loadData ('Module:Footnotes/anchor id list/data');
local whitelist = mw.loadData ('Module:Footnotes/whitelist');
local Lang_obj = mw.language.getContentLanguage(); -- used by template_list_add() to uppercase first letter of template name TODO: better way to do that?
local redirects_date = {
['date'] = true,
['datetomos'] = true,
['formatdate'] = true,
['isotodmymdy'] = true,
['isotomos'] = true,
}
local redirects_patent = { -- special case cs1-like templates because uses different parameters for name and date in anchor ID
['Cite patent'] = true,
['Citeref patent'] = true,
['Ref patent'] = true,
}
local redirects_sfnref = {
['sfnref'] = true,
['harvid'] = true,
}
local aliases_author = { -- these use pseudo-patterns in the same way as cs1|2; '#' represents 1 or more enumerator digits
'last#',
'author#',
'surname#',
'author-last#',
'author#-last',
'subject#',
'host#',
}
local aliases_contributor = {
'contributor#',
'contributor-last#',
'contributor#-last',
'contributor-surname#',
'contributor#-surname',
}
local aliases_editor = {
'editor#',
'editor-last#',
'editor#-last',
'editor-surname#',
'editor#-surname',
}
local aliases_harvc_author = {
'last#',
'author#',
}
local aliases_inventor = { -- cite patent
'inventor#',
'inventor-last#',
'inventor#-last',
'inventor-surname#',
'inventor#-surname',
'invent#',
'invent-#',
}
local alias_patterns_date = { -- normal lua patterns for most cs1|2-like templates
'|%s*year%s*=%s*',
'|%s*date%s*=%s*',
'|%s*publication%-?date%s*=%s*',
}
local alias_patterns_harvc_date = { -- normal lua patterns for harvc template
'|%s*anchor%-year%s*=%s*',
'|%s*year%s*=%s*',
}
local alias_patterns_patent_date = { -- normal lua patterns for cite patent templates
'|%s*issue%-date%s*=%s*',
'|%s*gdate%s*=%s*',
'|%s*publication%-date%s*=%s*',
'|%s*pubdate%s*=%s*',
}
local patterns_date = { -- normal lua patterns
'(%d%d%d%d–%d%d%d%d%l?)$', -- YYYY–YYYY four-digit year range at end (Season YYYY–YYYY); with or without dab
'^(%d%d%d%d–%d%d%l?)$', -- YYYY–YY two-digit year range; with or without dab
'^(c%. %d%d%d%d?%l?)$', -- three- or four-digit circa year; with or without dab
'(%d%d%d%d?%l?)$', -- three- or four-digit year at end of date (dmy or mdy); with or without dab
'^(%d%d%d%d?%l?)', -- three- or four-digit year at beginning of date (ymd or YYYY); with or without dab
'^(n%.d%.%l?)$', -- 'no date' with dots; with or without dab
'^(nd%l?)$', -- 'no date' without dots; with or without dab
}
local patterns_tags = {
'&lt;nowiki&gt;.-&lt;/nowiki&gt;',
'&lt;!%-%-.-%-%-&gt;',
'&lt;pre&gt;.-&lt;/pre&gt;',
'&lt;syntaxhighlight.-&gt;.-&lt;/syntaxhighlight&gt;',
'&lt;source.-&gt;.-&lt;/source&gt;', -- deprecated alias of syntaxhighlight tag
}
local template_skip = { -- templates to be skipped for whatever reason; mostly because they resemble cs1-like templates
['Citation-attribution'] = true,
}
local Article_content;
local anchor_id_list = {}; -- exported tables
local template_list = {};
local article_whitelist = {};
--[[--------------------------&lt; A R T I C L E _ C O N T E N T _ G E T &gt;----------------------------------------
get article content, remove certain html-like tags and their content so that this code doesn't include any citation
templates inside the tags as valid tagets; they are not.
]]
local function article_content_get ()
if not Article_content then
Article_content = mw.title.getCurrentTitle():getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625
for _, tag in ipairs (patterns_tags) do
Article_content = Article_content:gsub (tag, ''); -- remove certain html-like tags and their content
end
end
end
--[[--------------------------&lt; S F N R E F _ G E T &gt;----------------------------------------------------------
make an anchor id from the contents of {{sfnref}} or {{harvid}}. this function assumes that {{sfnref}} and {{harvid}}
are correctly formed.
]]
local function sfnref_get (template)
template = template:gsub ('{{%s*(.-)%s*}}', '%1'); -- strip bounding template markup and trim
local parts = mw.text.split (template, '%s*|%s*'); -- split at the pipe and remove extraneous space characters
local anchor_id = {};
if redirects_sfnref[parts[1]:lower()] then
anchor_id[1] = 'CITEREF';
else
return nil; -- not an sfnref or harvid template
end
local i = 2; -- indexer into parts{} table
local j = 2; -- indexer into anchor_id{} table which already has 'CITEREF' at [1]
while parts[i] and 7 &gt; j do -- loop through what should be just positional parameters for names and year (2-6 four names and a date)
if not parts[i]:find ('=') then -- look for equal sign (named paraneter in a template that doesn't support named parameters)
anchor_id[j] = parts[i]; -- positional parameters are saved
j = j+1; -- bump the anchor_id{} indexer
end
i = i+ 1; -- bump the parts{} indexer
end
return table.concat (anchor_id, '');
end
--[[--------------------------&lt; D A T E _ G E T &gt;--------------------------------------------------------------
extract year from one of |year=, |date=, |publicationdate=, or |publication-date in that order. Does not error
check (that is left to the cs1|2 templates to do)
also gets date from |&lt;date alias&gt;={{date|...}}
]]
local function date_get (template, aliases)
local date;
local rvalue;
for _, pattern in ipairs (aliases) do -- spin through the date alias patterns
rvalue = tostring(template):match (pattern); -- is this |&lt;date alias&gt;= used (tostring() because something makes match() think template is a table)
if rvalue then
rvalue = tostring(template):match (pattern .. '(%b{})'); -- is rvalue a template?
if rvalue then
rvalue = rvalue:gsub ('{{%s*(.-)%s*}}', '%1'); -- strip bounding template markup and trim
local parts = mw.text.split (rvalue, '%s*|%s*'); -- split at the pipe and remove extraneous space characters
if redirects_date[parts[1]:lower()] then -- if parts[1] names {{date}} or redirect
rvalue = parts[2]; -- assume that date template is properly formed, first positional parameter is the date
else
return ''; -- |date= holds some other template than {{date}} or redirect
end
else
rvalue = template:match (pattern .. '([^|}]+)');
if rvalue then -- if rvalue is something
rvalue = mw.text.trim (rvalue); -- trim it
end
if not rvalue or '' == rvalue then -- if rvale was nothing or trimed to nothing
rvalue = nil; -- ensure that it is unset so we can try the next parameter in the list
end
end
if rvalue then
for _, pattern in ipairs (patterns_date) do -- spin through the recognized date formats
date = rvalue:match (pattern); -- attempt to extract year portion according to the pattern
if date then
return date; -- matched so return;
end
end
break; -- found a date but it was malformed so abandon
end
end
end
return ''; -- no date param or date param doesn't hold a recognized date; empty string for concatenation
end
--[[--------------------------&lt; V N A M E S _ G E T &gt;----------------------------------------------------------
extract names from |vauthors= or |veditors=; there is no |vcontributors= parameter.
splits the v parameter value at the comma; correctly handles accept-as-witten markup when used to wrap a comma-
separated names (corporate)
]]
local function vnames_get (params, vparam)
local vnames = {}; -- first four author or editor names go here
local split = {}; -- temp table to assist in decoding accept-as-witten-markup
if params[vparam] then -- test for |vauthors= or |veditor=
split = mw.text.split (params[vparam], '%s*,%s*'); -- this will separate portions of ((Black, Brown, White, an Co.))
local i = 1; -- an indexer
while split[i] do
if split[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of comma-separated accept-as-witten; this segment has the opening doubled parens
local name = split[i];
i=i+1; -- bump indexer to next segment
while split[i] do
name = name .. ', ' .. split[i]; -- concatenate with previous segments
if split[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parens
break; -- and done reassembling so
end
i=i+1; -- bump indexer
end
table.insert (vnames, name); -- and add accept-as-witten name to the vnames table
else
table.insert (vnames, split[i]); -- and add name to the vnames table
end
i=i+1; -- bump indexer
if 5 == i then break; end -- limit to four names
end
for i, vname in ipairs (vnames) do
if not vname:match ('%(%(.-%)%)') then -- without accept-this-value-as-written markup
vnames[i] = vname:gsub ('(.-)%s+%u+$', '%1'); -- extract and save surname(s)
end
end
for i, vname in ipairs (vnames) do -- repeat, this time for accept-this-value-as-written markup
vnames[i] = vname:gsub ('%(%((.-)%)%)', '%1'); -- remove markup if present and save the whole name
end
end
return 0 ~= #vnames and table.concat (vnames) or nil -- return a concatenation of the vnames; nil else
end
--[[--------------------------&lt; N A M E S _ G E T &gt;------------------------------------------------------------
cs1|2 makes anchor id from contributor, author, or editor name-lists in that order
get the names from the cs1|2 template; if there are no contributor names, try author names, then try editor names.
returns concatenated names in enumeration order when successful; nil else
empty name (nameholding parameter n is present without value) and missing name (nameholding parameter n is not
present) are included as empty string with all other names
]]
local function names_get (params, aliases_list)
local names = {}; -- first four author or editor names go here
local enum_alias; -- alias with '#' replaced with a digit
for enum=1, 4 do -- four names only
for i, alias in ipairs (aliases_list) do
if not names[enum] then -- hanven't found a previous alias with this [enum]? see if we can find this alias with this enum
enum_alias = alias:gsub ('#', enum); -- replace '#' to make 'lastn'
if 1 == enum then -- because |last= and last1= are exact aliases
if params[enum_alias] then -- test |last1= first
names[enum] = params[enum_alias]; -- found so save the value assigned to |last1=
break; -- next enum
else
enum_alias = alias:gsub ('#', ''); -- replace '#' to make 'last'
if params[enum_alias] then
names[enum] = params[enum_alias]; -- found so save the value assigned to |last=
break; -- next enum
end
end
else -- here for enum 2, 3, 4
if params[enum_alias] then
names[enum] = params[enum_alias]; -- found so save the value assigned to |lastn=
break; -- next enum
end
end
end
end
end
for enum=1, 4 do -- spin through the names table and
local name = names[enum];
if not name then -- when nameholding parameter n is not present (nil)
name = ''; -- convert to empty string for concatenation
end
name = name:gsub('%(%((.-)%)%)', '%1'); -- remove accept-as-written markup if present
names[enum] = name; -- save the modified name
end
local name_str = table.concat (names); -- concatenate the names
return '' ~= name_str and name_str or nil; -- return the concatenation if not empty string; nil else
end
--[[--------------------------&lt; T E M P L A T E _ S T R I P &gt;--------------------------------------------------
removes the citation or havrc template's {{ and }} markup then removes, in whole, any templates found inside the
citation or harvc template.
Templates are not allowed in parameters that are made part of COinS metadata; yet, they will appear. cs1|2 does
not see the template markup but instead sees the result of the template as html. cs1|2 strips the html which
leaves the displayed value for the anchor id. We can't do that here so, because templates aren't allowed in
parameters, we simply discard any templates found in the cs1|2 template.
this may leave a |lastn= parameter empty which will be treated as if it were really empty as cs1|2 do (three authors,
|last2= empty -&gt; CITEREFLast1Last3YYYY (the harv and sfn render: 'Last1, &amp; Last3 YYYY' with CITEREFLast1Last3YYYY).
]]
local function template_strip (template)
template = template:gsub ('^{{', ''):gsub ('}}$', '', 1); -- remove outer {{ and }} (cs1|2 template delimiters)
template = template:gsub ('%b{}', ''); -- remove any templates from the cs1|2 template
return template;
end
--[[--------------------------&lt; E S C A P E _ L U A _ M A G I C _ C H A R S &gt;----------------------------------
Returns a string where all of lua's magic characters have been escaped. This is important because functions like
string.gsub() treat their pattern and replace strings as patterns, not literal strings.
]]
local function escape_lua_magic_chars (argument)
argument = argument:gsub("%%", "%%%%"); -- replace % with %%
argument = argument:gsub("([%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"); -- replace all other lua magic pattern characters
return argument;
end
--[=[-------------------------&lt; W I K I L I N K _ S T R I P &gt;--------------------------------------------------
Wikilink markup does not belong in an anchor id and can / does confuse the code that parses apart citation and
harvc templates so here we remove any wiki markup:
[[link|label]] -&gt; label
[[link]] -&gt; link
]=]
local function wikilink_strip (template)
for wikilink in template:gmatch ('%[%b[]%]') do -- get a wikilink
template = template:gsub ('%[%b[]%]', '__57r1P__', 1); -- install a marker
if wikilink:match ('%[%[.-|(.-)%]%]') then
wikilink = wikilink:match ('%[%[.-|(.-)%]%]'); -- extract label from complex [[link|label]] wikilink
else
wikilink = wikilink:match ('%[%[(.-)%]%]'); -- extract link from simple [[link]] wikilinks
end
wikilink = escape_lua_magic_chars (wikilink); -- in case there are lua magic characters in wikilink
template = template:gsub ('__57r1P__', wikilink, 1); -- replace the marker with the appropriate text
end
return template;
end
--[[--------------------------&lt; T E M P L A T E _ N A M E _ G E T &gt;--------------------------------------------
return the citation or harvc template's name; convert to lower case and trim leading and trailing whitespace;
when the template is a sandbox the subpage portion of the template name is omitted from the returned template name
{{Cite book/new |...}} returns cite book
]]
local function template_name_get (template)
local template_name = template:match ('^{{%s*([^/|}]+)'); -- get template name; ignore subpages ~/new, ~/sandbox; parser functions
if not template_name or template_name:match ('^#') then -- parser functions, magic words don't count as templates
return nil; -- could not get template name from (possibly corrupt) template; extraneous opening { mid template can cause this;
end;
template_name = template_name:gsub ('%s*$', ''); -- trim trailing whitespace; leading whitespace already removed
return Lang_obj:ucfirst (template_name); -- first character in template name must be uppercase (same as canonical template name) TODO: better way to do this?
end
--[[--------------------------&lt; T E M P L A T E _ P A R A M S _ G E T &gt;----------------------------------------
parse apart a template's parameters and store in the params table where key is the parameter's name and value is
the parameter's value; empty parameters are not saved
]]
local function template_params_get (template, params)
template = wikilink_strip (template); -- because piped wikilinks confuse code that builds params{} and because wikilinks not allowed in an anchor id
-- strip templates after getting |ref= value because |ref={{sfnref}} and |ref={{harvid}} are allowed
template = template_strip (template); -- because template markup can confuse code that builds params{} and because templates in name parameters are not allowed
template = template:gsub ('|%s*|', '|'); -- when pipe follows pipe with or without white space, remove extraneous pipe
for param, value in template:gmatch ('|%s*([^=]-)%s*=%s*([^|}]+)') do -- build a table of template parameters and their values
if value then -- there must be a value
if '' ~= value and not value:match ('^%s$') then -- skip when value is empty string or only whitespace
params[param] = mw.text.trim (value); -- add trimmed value else
end
end
end
end
--[[--------------------------&lt; C I T E R E F _ M A K E _ H A R V C &gt;------------------------------------------
makes anchor_id from {{harvc}} or redirects
]]
local function anchor_id_make_harvc (template)
local date = date_get (template, alias_patterns_harvc_date); -- get date; done here because might be in {{date}}; return date if valid; empty string else
local anchor_id;
local params = {}; -- table of harvc parameters
local id; -- custom anchor id for this {{harvc}} template
id = template:match ('|%s*id%s*=%s*(%b{})'); -- in case |id={{sfnref}}; done here because templates will be stripped
template_params_get (template, params); -- build a table of template parameters and their values; this strips wikilinks and templates
if id then -- when set is {{sfnref}} or {{harvid}} template
return sfnref_get (id); -- returns content of {{sfnref}} or {{harvid}}; nil else
end
if params.id then -- custom anchor for this {{harvc}} template (text)
return params.id; -- |id= value as written
end
anchor_id = names_get (params, aliases_harvc_author); -- get the harvc contributor names
if anchor_id then -- if names were gotten
return 'CITEREF' .. anchor_id .. date;
end
return nil; -- no names; no anchor_id
end
--[[--------------------------&lt; A N C H O R _ I D _ M A K E _ W R A P P E R &gt;----------------------------------
for wrapper templates
inspect externally visible |ref= to decide what to do:
|ref= - empty or missing: get names and date from whitelist defaults; override defaults from externally visible template parameters
|ref=harv - same as empty or missing
|ref={{SfnRef|name|name|name|name|year}} - assemble an anchor id from {{sfnref}} positional parameters
|ref={{Harvid|name|name|name|name|year}} - assemble an anchor id from {{harvid}} positional parameters
|ref=none - skip; do nothing because an anchor id intentionally suppressed; TODO: keep with a type code of '0'?
|ref=&lt;text&gt; - save param value because may match an anchor id override value in {{harv}} template |ref= parameter or {{harvc}} |id= parameter
]]
local function anchor_id_make_wrapper (template)
local ref; -- content of |ref=
local template_name; -- name of the template
local anchor_id; -- the assembled anchor id from this template
local date;
local name_default;
local date_default;
local vol;
local params = {}; -- table of template parameters
template_name = template_name_get (template); -- get first char uppercase trimmed template name; ignore subpages ~/new, ~/sandbox
if not template_name or template_skip[template_name] then
return nil; -- could not extract template name from (possibly corrupted) template (extraneous opening { in the template will cause this)
end
date = date_get (template, alias_patterns_date); -- get date; done here because might be in {{date}}
-- if '' == date then
-- date = whitelist.wrapper_templates[template_name][2] or ''; -- no externally visible date so get default date
-- end
ref = template:match ('|%s*ref%s*=%s*(%b{})'); -- first look for |ref={{sfnref}} or |ref={{harvid}} because we will strip templates from the wrapper template
if not ref then
if template:match ('|%s*ref%s*=([^|}]+)') then -- |ref={{template}} not found; if there is a |ref= param with an assigned value
ref = template:match ('|%s*ref%s*=([^|}]+)'); -- get the value; whitespace is a 'value'
if ref then -- nil when |ref=|... or when |ref=}} (no spaces between assignment operator and pipe or closing brace)
ref = mw.text.trim (ref); -- something, could be just whitespace, so trim leading / trailing whitespace
if '' == ref then -- trimming a string of whitespace makes an empty string
ref = nil; -- make empty ref same as missing ref
end
end
end
end
template_params_get (template, params); -- build a table of template parameters and their values
if whitelist.wrapper_templates[template_name][1] then -- is this wrapper a simple-default wrapper?
name_default = whitelist.wrapper_templates[template_name][1]; -- get the default names
date_default = whitelist.wrapper_templates[template_name][2]; -- get the default date
else
vol = params['volume'] or 'default';
if not whitelist.wrapper_templates[template_name][vol] then -- make sure this volume exists
vol = 'default'; -- doesn't exist, use default volume
end
name_default = whitelist.wrapper_templates[template_name][vol][1]; -- get the default names
date_default = whitelist.wrapper_templates[template_name][vol][2]; -- get the default date
end
if 'harv' == ref or not ref then -- |ref=harv specified or |ref= missing or empty
anchor_id = names_get (params, aliases_contributor) or -- get contributor, author, or editor names
names_get (params, aliases_author) or
vnames_get (params, 'vauthors') or -- |vauthors=
names_get (params, aliases_editor) or
vnames_get (params, 'veditors') or -- |veditors=
name_default; -- default names from whitelist
-- whitelist.wrapper_templates[template_name][1]; -- default names from whitelist
if '' == date then -- if date not provided in the template
date = date_default; -- use the default date from whitelist
end
if anchor_id then -- if names were gotten
anchor_id = 'CITEREF' .. anchor_id .. date;
end
elseif ref:match ('%b{}') then -- ref holds a template
anchor_id = sfnref_get (ref); -- returns content of {{sfnref}} or {{harvid}}; nil else
elseif 'none' == ref then -- |ref=none
return nil; -- anchor id expicitly suppressed
else
anchor_id = ref; -- |ref=&lt;text&gt; may match an anchor id override value in {{harv}} template |ref= parameter
end
return anchor_id; -- anchor_id text; nil else
end
--[[--------------------------&lt; A N C H O R _ I D _ M A K E _ C S 1 2 &gt;----------------------------------------
for cs1|2 template and cs1-like templates
inspect |ref= to decide what to do:
|ref= - empty or missing: get names and date from template parameters; all cs1|2 create CITEREF anchor IDs
|ref=harv - get names and date from template parameters
|ref={{SfnRef|name|name|name|name|year}} - assemble an anchor id from {{sfnref}} positional parameters
|ref={{Harvid|name|name|name|name|year}} - assemble an anchor id from {{harvid}} positional parameters
|ref=none - skip; do nothing because an anchor id intentionally suppressed; TODO: keep with a type code of '0'?
|ref=&lt;text&gt; - save param value because may match an anchor id override value in {{harv}} template |ref= parameter or {{harvc}} |id= parameter
]]
local function anchor_id_make_cs12 (template)
local ref; -- content of |ref=
local template_name; -- name of the template
local anchor_id; -- the assembled anchor id from this template
local date;
local params = {}; -- table of template parameters
template_name = template_name_get (template); -- get first char uppercase trimmed template name; ignore subpages ~/new, ~/sandbox
if not template_name or template_skip[template_name] then
return nil; -- could not extract template name from (possibly corrupted) template (extraneous opening { in the template will cause this)
end
if redirects_patent[template_name] then
date = date_get (template, alias_patterns_patent_date); -- get date; done here because might be in {{date}}
else
date = date_get (template, alias_patterns_date);
end
ref = template:match ('|%s*ref%s*=%s*(%b{})'); -- first look for |ref={{sfnref}} or |ref={{harvid}} because we will strip templates from the cs1|2 template
if not ref then
if template:match ('|%s*ref%s*=([^|}]+)') then -- |ref={{template}} not found; if there is a |ref= param with an assigned value
ref = template:match ('|%s*ref%s*=([^|}]+)'); -- get the value; whitespace is a 'value'
if ref then -- nil when |ref=|... or when |ref=}} (no spaces between assignment operator and pipe or closing brace)
ref = mw.text.trim (ref); -- something, could be just whitespace, so trim leading / trailing whitespace
if '' == ref then -- trimming a string of whitespace makes an empty string
ref = nil; -- make empty ref same as missing ref
end
end
end
end
template_params_get (template, params); -- build a table of template parameters and their values
if not ref then -- |ref= not set, might be cite LSA which doesn't support |ref=
if 'cite lsa' == template_name then
return 'CITEREF' .. (params.last or '') .. (params.year or ''); -- cite LSA always creates an anchor id using only |last= and |year= (no aliases)
end
end
if 'harv' == ref or not ref then -- |ref=harv specified or |ref= missing or empty
if redirects_patent[template_name] then -- if this is a cite patent template
anchor_id = names_get (params, aliases_inventor); -- inventor names only
else -- cs1|2 template
anchor_id = names_get (params, aliases_contributor) or -- get contributor, author, or editor names
names_get (params, aliases_author) or
vnames_get (params, 'vauthors') or -- |vauthors=
names_get (params, aliases_editor) or
vnames_get (params, 'veditors'); -- |veditors=
end
if anchor_id then -- if names were gotten
anchor_id = 'CITEREF' .. anchor_id .. date;
end
elseif ref:match ('%b{}') then -- ref holds a template
anchor_id = sfnref_get (ref); -- returns content of {{sfnref}} or {{harvid}}; nil else
elseif 'none' == ref and not redirects_patent[template_name] then -- |ref=none; not supported by cite patent
return nil; -- anchor id expicitly suppressed
else
anchor_id = ref; -- |ref=&lt;text&gt; may match an anchor id override value in {{harv}} template |ref= parameter
end
return anchor_id; -- anchor_id text; nil else
end
--[[--------------------------&lt; L I S T _ A D D &gt;--------------------------------------------------------------
adds an &lt;item&gt; to &lt;list&gt; table; for anchor IDs, the boolean &lt;encode&gt; argument must be set true; no return value
]]
local function list_add (item, list, encode)
if item then -- if there was an item
if encode then -- for anchor IDs ...
item = mw.uri.anchorEncode (item); -- encode to remove wikimarkup, convert spaces to underscores etc
end
if not list[item] then -- if not already saved
list[item] = 1; -- save it
else -- here when this item already saved
list[item] = list[item] + 1; -- to indicate that there are multiple items
end
end
end
--[[--------------------------&lt; A N C H O R _ I D _ M A K E _ A N C H O R &gt;------------------------------------
make anchor IDs from {{anchor}}; there may be more than one because {{anchor}} is not limited to the number of
anchors it may hold.
]]
local function anchor_id_make_anchor (template, anchor_id_list)
template = template:gsub ('^{{[^|]+|', ''):gsub ('}}$', '', 1); -- remove outer {{ and }} and template name
template = wikilink_strip (template); -- strip any wikilink markup (there shouldn't be any but just in case)
local params = {};
local anchor_id;
for param in template:gmatch ('%b{}') do -- loop through the template; remove and save templates (presumed to be sfnref or harvid)
table.insert (params, param); -- save it
template = template:gsub ('%b{}', '', 1); -- remove it from source template
end
for _, t in ipairs (params) do -- spin through the templates in params
anchor_id = sfnref_get (t); -- attempt to decode {{sfnref}} and {{harvid}}
if anchor_id then -- nil when not {{sfnref}} or {{harvid}}
list_add (anchor_id, anchor_id_list, true); -- add anchor ID to the list
end
end
template = template:gsub ('|%s*|', '|'); -- when pipe follows pipe with or without white space, remove extraneous pipe
template = template:gsub ('^|', ''):gsub('|$', ''); -- remove extraneous leading and trailing pipes
params = mw.text.split (template, '%s*|%s*'); -- split at the pipe and remove extraneous space characters
for _, t in ipairs (params) do -- spin through the anchor IDs
anchor_id = mw.text.trim (t); -- trim white space
if '' ~= anchor_id then -- should always have something
list_add (anchor_id, anchor_id_list, true); -- add anchor ID to the list
end
end
end
--[[--------------------------&lt; T E M P L A T E _ L I S T _ A D D &gt;--------------------------------------------
makes a list of templates use in the article.
]]
local function template_list_add (template)
local template = template:match ('{{%s*(.-)[|}]'); -- keep the case of the template - this is different from template_name_get()
if template and not template:match ('^#') then -- found a template or magic word; ignore magic words
template=mw.text.trim (template); -- trim whitespace
template = Lang_obj:ucfirst (template); -- first character in template name must be uppercase (same as canonical template name) TODO: better way to do this?
list_add (template, template_list); -- add to list with (unused) tally
end
end
--[[--------------------------&lt; A N C H O R _ I D _ L I S T _ M A K E &gt;----------------------------------------
makes a list of anchor ids from cs1|2, cs1|2-like, vcite xxx, harvc, anchor, wikicite templates
Because cs1|2 wrapper templates can, and often do, hide the author and date parameters inside the wrapper,
these parameters are not available in the article's wikisource so {{harv}}, {{sfn}}, and {{harvc}} templates that
link correctly to those wrapper templates will incorrectly show error messages. Use |ignore-err=yes in the {{harv}},
{{sfn}}, and {{harvc}} templates to supress the error message.
creates a list of templates used in the article for use with the whitelist
creates a list of article-local whitelisted anchor IDs from {{sfn whitelist}}
]]
local function anchor_id_list_make ()
article_content_get (); -- attempt to get this article's content
if '' == Article_content then -- when there is no article content
return ''; -- no point in continuing
end
local template; -- place to hold the template that we found
local template_name;
local anchor_id; -- place to hold an anchor id as it is extracted / decoded
local find_pattern = '%f[{]{{[^{]';
local tstart, tend = Article_content:find (find_pattern); -- find the first template; do not find template variables: {{{template var|}}}
while tstart do
template = Article_content:match ('%b{}', tstart); -- get the whole template
if not template then
break; -- template is nil for some reason (last template missing closing }} for example) so declare ourselves done
end
template_name = template_name_get (template); -- get first char uppercase trimmed template name; ignore subpages ~/new, ~/sandbox
template_list_add (template); -- add this template's name to the list
if data.known_templates_cs12 [template_name] then
anchor_id = anchor_id_make_cs12 (template); -- extract an anchor id from this template
list_add (anchor_id, anchor_id_list, true)
elseif data.known_templates_vcite [template_name] then
local ref = template:match ('|%s*ref%s*=%s*(%b{})'); -- first look for |ref={{sfnref}} or |ref={{harvid}} because we will strip templates from the vcite template
if ref then -- |ref={{template}}
anchor_id = sfnref_get (ref); -- returns content of {{sfnref}} or {{harvid}}; nil else
list_add (anchor_id, anchor_id_list, true);
else
local params = {};
template_params_get (template, params); -- build a table of template parameters and their values
anchor_id = params['ref']; -- when both set, vcite uses value from |ref=
if not anchor_id and params['harvid'] then
anchor_id = 'CITEREF' .. params['harvid']; -- in vcite, |harvid= auto-adds 'CITEREF' prefix to the value in |harvid=
end
list_add (anchor_id, anchor_id_list, true);
end
elseif data.known_templates_harvc [template_name] then
anchor_id = anchor_id_make_harvc (template); -- extract an anchor id from this template
list_add (anchor_id, anchor_id_list, true);
elseif data.known_templates_wikicite [template_name] then
local ref = template:match ('|%s*ref%s*=%s*(%b{})'); -- first look for |ref={{sfnref}} or |ref={{harvid}}
if ref then
anchor_id = sfnref_get (ref);
elseif template:match ('|%s*ref%s*=([^|}]+)') then
anchor_id = template:match ('|%s*ref%s*=([^|}]+)'); -- plain-text
elseif template:match ('|%s*id%s*=%s*(%b{})') then
ref = template:match ('|%s*id%s*=%s*(%b{})');
anchor_id = 'Reference-' .. sfnref_get (ref);
elseif template:match ('|%s*id%s*=([^|}]+)') then
anchor_id = 'Reference-' .. template:match ('|%s*id%s*=([^|}]+)'); -- plain-text
else
anchor_id = nil; -- no matches, ensure that anchor_id has no value
end
if anchor_id then
list_add (anchor_id, anchor_id_list, true);
end
elseif data.known_templates_anchor [template_name] then
anchor_id_make_anchor (template, anchor_id_list); -- extract anchor ids from this template if any
elseif data.known_templates_sfn_whitelist [template_name] then
template = template:gsub ('^{{[^|]+|', ''):gsub ('}}$', '', 1); -- remove outer {{ and }} and template name
template = mw.text.trim (template, '%s|'); -- trim leading trailing white space and pipes
template = mw.text.split (template, '%s*|%s*'); -- make a table of the template's parameters
for _, anchor_id in ipairs (template) do -- spin through this template's parameter
if '' ~= anchor_id and not article_whitelist[anchor_id] then
article_whitelist[anchor_id] = 1; -- add to the whitelist
end
end
elseif template_name and whitelist.wrapper_templates[template_name] then
anchor_id = anchor_id_make_wrapper (template); -- extract an anchor id from this template if possible
list_add (anchor_id, anchor_id_list, true);
elseif template_name and template_name:match ('^Cit[ea]') then -- not known, not known wrapper; last gasp, try as cs1-like
anchor_id = anchor_id_make_cs12 (template); -- extract an anchor id from this template if possible
list_add (anchor_id, anchor_id_list, true);
end
tstart, tend = Article_content:find (find_pattern, tend); -- search for another template; begin at end of last search
end
mw.logObject (anchor_id_list, 'anchor_id_list');
mw.logObject (template_list, 'template_list');
mw.logObject (article_whitelist, 'article_whitelist');
return anchor_id_list;
end
--[[--------------------------&lt; E X P O R T E D _ T A B L E S &gt;------------------------------------------------
]]
return {
anchor_id_list = anchor_id_list_make(), -- table of anchor ids available in this article
article_whitelist = article_whitelist, -- table of anchor ids with false-positive error message to be suppressed
template_list = template_list, -- table of templates used in this article
}</text>
<sha1>65ku2gjb3g2cks2ei1ltygnso8kpo1v</sha1>
</revision>
</page>
<page>
<title>Module:Footnotes/anchor id list/data</title>
<ns>828</ns>
<id>64016762</id>
<revision>
<id>958410539</id>
<parentid>958285249</parentid>
<timestamp>2020-05-23T17:06:22Z</timestamp>
<contributor>
<username>Trappist the monk</username>
<id>10289486</id>
</contributor>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="12238" xml:space="preserve">-- copied from Module:Ref info/data - maybe overkill here?
-- for this application make lists from the redirect lists and force all template names first character uppercase
require('Module:No globals');
--[[--------------------------&lt; C S 1 _ T E M P L A T E _ P A T T E R N S &gt;------------------------------------
These are patterns for cs1 templates and their redirects. These patterns exclude redirects that are vcite-like
which redirects should be deleted because vcite is not cs1.
]]
local cs1_template_patterns = { -- lua patterns of the cannonical names and redirects
'[Cc]ite ar[Xx]iv', -- arXiv is the canonical name
'[Cc]ite ArXiv',
'[Cc]ite AV media', -- canonical
'[Cc]ite audio', '[Cc]ite AV', '[Cc]ite AV ?Media', '[Cc]ite av media',
'[Cc]ite cd', '[Cc]ite DVD', '[Cc]ite dvd', '[Cc]ite film',
'[Cc]ite image', '[Cc]ite media', '[Cc]ite movie',
'[Cc]ite music video', '[Cc]ite radio', '[Cc]ite song',
'[Cc]ite ?video', '[Cc]ite visual', '[Cc]ite You[Tt]ube',
'[Cc]ita vídeo', -- non-English redirect; TODO: tally separately?
'[Cc]ite AV media notes', -- canonical
'[Cc]ite album[ %-]notes', '[Cc]ite av media notes',
'[Cc]ite DVD[ %-]notes', '[Cc]ite dvd%-notes', '[Cc]ite liner notes',
'[Cc]ite music release notes', '[Ll]iner notes',
'[Cc]ite bio[Rr]xiv', -- bioRxiv is the canonical form
'[Cc]ite [Bb]ook', -- book is the canonical form
'[Bb]ook cite', '[Bb]ook reference', '[Bb]ook reference url',
'[Cc] book', '[Cc]it book', '[Cc]ite books', '[Cc]ite chapter',
'[Cc]ite ebook', '[Cc]ite manual', '[Cc]ite page',
'[Cc]ite publication', '[Cc]ite score',
'[Cc]ite work', '[Cc]ite%-?book',
'[Bb]okref', '[Cc]itace monografie', '[Cc]itar livro', -- non-English redirects; TODO: tally separately?
'[Cc]iteer boek', '[Oo]uvrage', '[Rr]ef%-llibre', '서적 인용',
'[Cc]ite citeseerx', -- canonical
'[Cc]ite conference', -- canonical
'[Cc]ita conferenza', '[Cc]ite proceedings', '[Cc]onference reference', -- cita conferenza is non-English; TODO: tally separately?
'[Cc]ite ?encyclopedia', -- cite encyclopedia is the canonical name
'[Cc]ite contribution', '[Cc]ite dic', '[Cc]ite dictionary',
'[Cc]ite encyclopaedia', '[Cc]ite encyclopædia', '[Ee]ncyclopedia',
'[Cc]ite [Ee]pisode', -- episode is the canonical form
'[Cc]ite show',
'[Cc]ite interview', -- canonical
'[Cc]ite ?journal', -- cite journal is the canonical form
'[Cc] journal', '[Cc]itation journal', '[Cc]ite abstract',
'[Cc]ite document', '[Cc]ite Journal', '[Cc]ite journal zh',
'[Cc]ite ?paper', '[Vv]cite2 journal',
'[Cc]ita pubblicazione', '[Cc]itace periodika', '[Cc]itar jornal', -- non-English redirects; TODO: tally separately?
'[Cc]itar publicació', '[Cc]ytuj pismo', '[Tt]idskriftsref',
'Навод из стручног часописа', '저널 인용',
'[Cc]ite [Mm]agazine', -- magazine is the canonical form
'[Cc]ite mag', '[Cc]ite magazine article', '[Cc]ite newsletter',
'[Cc]ite periodical',
'[Cc]ite mailing ?list', -- mailing list is the canonical form
'[Cc]ite list',
'[Cc]ite maps?', -- map is the canonical form
'[Cc]ite[ %-]?news', -- cite news is the canonical form
'[Cc] news', '[Cc]it news', '[Cc]itation news', '[Cc]ite article',
'[Cc]ite n', '[Cc]ite new', '[Cc]ite newspaper', '[Cc]ite News',
'[Cc]ite news%-q', '[Cc]ite news2', '[Cc]itenewsauthor', '[Cc]ute news',
'[Cc]itar notícia', '[Hh]aber kaynağı', '[Tt]idningsref', 'استشهاد بخبر', -- non-English redirects; TODO: tally separately?
'뉴스 인용',
'[Cc]ite newsgroup', -- canonical
'[Cc]ite usenet',
'[Cc]ite podcast', -- canonical
'[Cc]ite [Pp]ress release', -- press release is the canonical form
'[Cc]ite media release', '[Cc]ite news release', '[Cc]ite pr',
'[Cc]ite press', '[Cc]ite press release\.', '[Cc]ite press[%-]?release',
'[Cc]ite report', -- canonical
'[Cc]ite serial', -- canonical
'[Cc]ite sign', -- canonical
'[Cc]ite plaque',
'[Cc]ite speech', -- canonical
'[Cc]ite ssrn', -- canonical
'[Cc]ite SSRN',
'[Cc]ite tech ?report', -- techreport is the canonical form
'[Cc]ite standard', '[Cc]ite technical report', '[Tt]echrep reference',
'[Cc]ite thesis', -- canonical
'[Cc]ite dissertation',
'[Cc]itar tese', -- non-English redirect; TODO: tally separately?
'[Cc]ite [Ww]eb', -- web is the canonical form
'[Cc] web', '[Cc]it web', '[Cc]ite blog', '[Cc]ite URL', '[Cc]ite url',
'[Cc]ite w', '[Cc]ite wb', '[Cc]ite we', '[Cc]ite web\.',
'[Cc]ite webpage', '[Cc]ite website', '[Cc]ite website article',
'[Cc]ite%-?web', '[Cc]itweb', '[Cc]w', '[Rr]ef web', '[Ww]eb citation',
'[Ww]eb cite', '[Ww]eb link', '[Ww]eb[ %-]reference', '[Ww]eblink',
'[Cc]hú thích web', '[Cc]ita web', '[Cc]itace elektronické monografie', -- non-English redirects; TODO: tally separately?
'[Cc]itat web', 'مرجع ويب', 'یادکرد وب', '웹 인용',
}
--[[--------------------------&lt; C S 2 _ T E M P L A T E _ P A T T E R N S &gt;------------------------------------
These are patterns for cs2 templates redirects.
]]
local cs2_template_patterns = { -- lua patterns of the cannonical names and redirects
'[Cc]itation',
'[Cc]ite', '[Cc]ite citation', '[Cc]ite study',
'[Cc]ite [Tt]echnical standard',
}
--[[--------------------------&lt; V C I T E _ T E M P L A T E _ P A T T E R N S &gt;--------------------------------
These are patterns for Vcite-family templates and their redirects.
]]
local vcite_template_patterns = {
'[Vv]cite book', -- canonical
'[Vv]ancite book', '[Vv]ancite report', '[Vv]cite encyclopedia',
'[Vv]cite report',
'[Vv]cite journal', -- canonical
'[Cc]it journal', '[Cc]it paper', '[Vv]ancite journal', '[Vv]cite paper',
'[Vv]cite news', -- canonical
'[Vv]ancite news',
'[Vv]cite web', -- canonical
'[Vv]ancite web',
}
--[[--------------------------&lt; H A R V C _ T E M P L A T E _ P A T T E R N S &gt;--------------------------------
These are patterns for the harvc template and its redirects.
]]
local harvc_template_patterns = {
'[Hh]arvc', -- canonical
'[Cc]itec',
}
--[[--------------------------&lt; C S 1 _ L I K E _ T E M P L A T E _ P A T T E R N S &gt;--------------------------
These are patterns for miscellaneous templates and their redirects that 'look like' cs1 templates (begin with cite ...)
Because they 'look like' cs1 templates they are handled as if they were cs1 templates. These templates are NOT
wrapper templates; names and dates are always to be extracted from the article instantiation of the template.
]]
local cs1_like_template_patterns = {
'[Cc]ite LSA', -- canonical
}
--[[--------------------------&lt; W I K I C I T E _ T E M P L A T E _ P A T T E R N S &gt;--------------------------
These are patterns for the wikicite template and its redirects.
]]
local wikicite_template_patterns = {
'[Ww]ikicite', -- canonical
}
--[[--------------------------&lt; A N C H O R _ T E M P L A T E _ P A T T E R N S &gt;------------------------------
These are patterns for the anchor template and its redirects.
]]
local anchor_template_patterns = {
'[Aa]nchors?', -- anchor is canonical form
'[Aa]nchor for redirect',
'[Aa]nchro',
'[Aa]ncor',
}
--[[--------------------------&lt; S F N _ W H I T E L I S T _ P A T T E R N S &gt;----------------------------------
These are patterns for the anchor template and its redirects.
]]
local sfn_whitelist_patterns = {
'[Ss]fn whitelist', -- canonical
'[Hh]arv whitelist',
}
--[[--------------------------&lt; K N O W N _ T E M P L A T E S &gt;------------------------------------------------
These tables are created from the *_template_patterns tables. To make these tables, entries in the source tables
are evaluated to replace lua patterns with the appropriate characters to create names for the output tables.
First charqacter is always uppercase
For example:
[Cc]ite ar[Xx]iv
becomes
Cite arXiv
Cite arxiv
]]
local known_templates_cs12 = {}; -- the exported tables
local known_templates_vcite = {};
local known_templates_harvc = {};
local known_templates_wikicite = {};
local known_templates_anchor = {};
local known_templates_sfn_whitelist = {};
local function add_stripped (list, name)
if not list[name] then
list[name] = true;
end
end
local function pattern_convert (pattern, list)
local lead, tail, c, l, name;
local first_char_patterns = {
'^%[(%a)%a%]', -- leading character (usually uppercase)
'^%[%a(%a)%]', -- leading character (usually lowercase)
}
c = tostring (pattern:match ('%u')); -- tostring() required because I don't know why; lua chokes complaining that c is not a string
name = pattern:gsub ('^%[%a%a%]', c); -- replace bracketed first character [Xx] with selected character from the match
if name:match ('(.-)%[(%a)(%a)%](.*)') then -- mixed case optional letters
lead, c, l, tail = name:match ('(.-)%[(%a)(%a)%](.*)');
add_stripped (list, lead .. c .. tail); -- uppercase
add_stripped (list, lead .. l .. tail); -- lowercase
elseif name:match ('^([^%[]+)(%[ %%%-%]%?)(.+)$') then -- [ %-]?
lead, c, tail = name:match ('^([^%[]+)(%[ %%%-%]%?)(.+)$');
add_stripped (list, lead .. tail); -- neither char
add_stripped (list, lead .. ' ' .. tail); -- space
add_stripped (list, lead .. '-' .. tail); -- hyphen
elseif name:match ('^([^%[]+)(%[%%%-%]%?)(.+)$') then -- [%-]?
lead, c, tail = name:match ('^([^%[]+)(%[%%%-%]%?)(.+)$');
add_stripped (list, lead .. tail); -- no hyphen
add_stripped (list, lead .. '-' .. tail); -- hyphen
elseif name:match ('^([^%[]+)(%[ %%%-%])(.+)$') then -- [ %-]
lead, c, tail = name:match ('^([^%[]+)(%[ %%%-%])(.+)$');
add_stripped (list, lead .. ' ' .. tail); -- space
add_stripped (list, lead .. '-' .. tail); -- hyphen
elseif name:match ('^([^%?]+)(%%%-%?)(.+)$') then -- %-?
lead, c, tail = name:match ('^([^%?]+)(%%%-%?)(.+)$');
add_stripped (list, lead .. tail); -- no hyphen
add_stripped (list, lead .. '-' .. tail); -- hyphen
elseif name:match ('^(.-)(%%%-)(.+)$') then -- %-
lead, c, tail = name:match ('^(.-)(%%%-)(.+)$');
add_stripped (list, lead .. '-' .. tail); -- hyphen
elseif name:match ('^(.-)(.)%?(.*)$') then -- .?
lead, c, tail = name:match ('^(.-)(.)%?(.*)$');
add_stripped (list, lead .. tail); -- no character
add_stripped (list, lead .. c .. tail); -- character
else
add_stripped (list, name); -- no patterns so save as is
end
end
for _, t in ipairs ({
{cs1_template_patterns, known_templates_cs12},
{cs2_template_patterns, known_templates_cs12},
{cs1_like_template_patterns, known_templates_cs12},
{vcite_template_patterns, known_templates_vcite},
{harvc_template_patterns, known_templates_harvc},
{wikicite_template_patterns, known_templates_wikicite},
{anchor_template_patterns, known_templates_anchor},
{sfn_whitelist_patterns, known_templates_sfn_whitelist},
}) do
for _, pattern in ipairs (t[1]) do -- for each patern in *_template_patterns
pattern_convert (pattern, t[2]) -- convert and store in known_templates_*
end
end
--[[--------------------------&lt; E X P O R T S &gt;----------------------------------------------------------------
]]
return
{
known_templates_anchor = known_templates_anchor,
known_templates_cs12 = known_templates_cs12,
known_templates_harvc = known_templates_harvc,
known_templates_vcite = known_templates_vcite,
known_templates_wikicite = known_templates_wikicite,
known_templates_sfn_whitelist = known_templates_sfn_whitelist,
}</text>
<sha1>bht9pmjzuvuqajea0fn73uv88hds8sh</sha1>
</revision>
</page>
<page>
<title>Module:Footnotes/whitelist</title>
<ns>828</ns>
<id>63517642</id>
<revision>
<id>989297097</id>
<parentid>988176795</parentid>
<timestamp>2020-11-18T04:44:55Z</timestamp>
<contributor>
<username>Renata3</username>
<id>320236</id>
</contributor>
<comment>['CITEREFPloumidisAlexiou1974'] = {'Ιστορία του Ελληνικού Έθνους'}</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="59925" xml:space="preserve">--[[--------------------------&lt; W R A P P E R _ T E M P L A T E _ D E F A U L T S &gt;----------------------------
A list of wrapper templates by their canonical names – spelling and capitalization is important. Each wrapper
template has a table of two values: [1] is the wrapper's default name-list as it is used in an anchor ID; [2] is
the default year. This table is indexed indirectly through the wrapper_templates table.
This table is not available externally.
]]
local wrapper_template_defaults = { -- keys are canonical template names
['Americana'] = {'Rines', '1920'}, -- tables with default name and default year
['Cite EB1911'] = {'Chisholm', '1911'}, -- tables with default name and default year
['EB1911'] = {'Chisholm', '1911'},
['EI3'] = {'FleetKrämerMatringeNawas', ''},
['ODNB'] = {'', ''}, -- there is no default anchor ID; this forces evaluation of {{cite ODNB}} redirects
}
--[[--------------------------&lt; W R A P P E R _ T E M P L A T E _ D E F A U L T S _ V O L &gt;--------------------
For wrapper templates that use |volume= to specify default name (often editor names) and year. Wrapper templates
are indexed by their canonical names – spelling and capitalization is important. Each wrapper template has a table
of values for every volume. Volumes may be indexed by Arabic or Roman numerals. Each volume index has a table of
twp values" [1] is the wrapper's default name-list as it is used in an anchor ID; [2] is the default year. Each
wrapper template in this table must have a ['default'] key for those occasions when |volume= is omitted or empty.
This table is indexed indirectly through the wrapper_templates table.
This table is not available externally.
]]
local wrapper_template_defaults_vol = { -- primary keys are canonical template names; TODO: do these keys have to be canonical template names?
['Cite Catholic Encyclopedia'] = { -- secondary keys are volume
['1'] = {'Herbermann', '1907'},
['2'] = {'Herbermann', '1907'},
['3'] = {'Herbermann', '1908'},
['4'] = {'Herbermann', '1908'},
['5'] = {'Herbermann', '1909'},
['6'] = {'Herbermann', '1909'},
['7'] = {'Herbermann', '1910'},
['8'] = {'Herbermann', '1910'},
['9'] = {'Herbermann', '1910'},
['10'] = {'Herbermann', '1911'},
['11'] = {'Herbermann', '1911'},
['12'] = {'Herbermann', '1911'},
['13'] = {'Herbermann', '1912'},
['14'] = {'Herbermann', '1912'},
['15'] = {'Herbermann', '1912'},
['default'] = {'Herbermann', '1913'},
},
['Cite EB9'] = {
['1'] = {'Baynes', '1878'}, ['I'] = {'Baynes', '1878'},
['2'] = {'Baynes', '1878'}, ['II'] = {'Baynes', '1878'},
['3'] = {'Baynes', '1878'}, ['III'] = {'Baynes', '1878'},
['4'] = {'Baynes', '1878'}, ['IV'] = {'Baynes', '1878'},
['5'] = {'Baynes', '1878'}, ['V'] = {'Baynes', '1878'},
['6'] = {'Baynes', '1878'}, ['VI'] = {'Baynes', '1878'},
['7'] = {'Baynes', '1878'}, ['VII'] = {'Baynes', '1878'},
['8'] = {'Baynes', '1878'}, ['VIII'] = {'Baynes', '1878'},
['9'] = {'Baynes', '1879'}, ['IX'] = {'Baynes', '1879'},
['10'] = {'Baynes', '1879'}, ['X'] = {'Baynes', '1879'},
['11'] = {'BaynesSmith', '1880'}, ['XI'] = {'BaynesSmith', '1880'},
['12'] = {'BaynesSmith', '1881'}, ['XII'] = {'BaynesSmith', '1881'},
['13'] = {'BaynesSmith', '1881'}, ['XIII'] = {'BaynesSmith', '1881'},
['14'] = {'BaynesSmith', '1882'}, ['XIV'] = {'BaynesSmith', '1882'},
['15'] = {'BaynesSmith', '1883'}, ['XV'] = {'BaynesSmith', '1883'},
['16'] = {'BaynesSmith', '1883'}, ['XVI'] = {'BaynesSmith', '1883'},
['17'] = {'BaynesSmith', '1884'}, ['XVII'] = {'BaynesSmith', '1884'},
['18'] = {'BaynesSmith', '1885'}, ['XVIII'] = {'BaynesSmith', '1885'},
['19'] = {'BaynesSmith', '1885'}, ['XIX'] = {'BaynesSmith', '1885'},
['20'] = {'BaynesSmith', '1886'}, ['XX'] = {'BaynesSmith', '1886'},
['21'] = {'BaynesSmith', '1886'}, ['XXI'] = {'BaynesSmith', '1886'},
['22'] = {'BaynesSmith', '1887'}, ['XXII'] = {'BaynesSmith', '1887'},
['23'] = {'BaynesSmith', '1888'}, ['XXIII'] = {'BaynesSmith', '1888'},
['24'] = {'BaynesSmith', '1888'}, ['XXIV'] = {'BaynesSmith', '1888'},
['default'] = {'Baynes', '1875–1889'},
},
['Encyclopaedia of Islam, New Edition'] = {
['1'] = {'GibbKramersLévi-ProvençalSchacht', '1960'},
['2'] = {'LewisPellatSchacht', '1965'},
['3'] = {'LewisMénagePellatSchacht', '1971'},
['4'] = {'van_DonzelLewisPellatBosworth', '1978'},
['5'] = {'Bosworthvan_DonzelLewisPellat', '1986'},
['6'] = {'Bosworthvan_DonzelPellat', '1991'},
['7'] = {'Bosworthvan_DonzelHeinrichsPellat', '1993'},
['8'] = {'Bosworthvan_DonzelHeinrichsLecomte', '1995'},
['9'] = {'Bosworthvan_DonzelHeinrichsLecomte', '1997'},
['10'] = {'BearmanBianquisBosworthvan_Donzel', '2000'},
['11'] = {'BearmanBianquisBosworthvan_Donzel', '2002'},
['12'] = {'BearmanBianquisBosworthvan_Donzel', '2004'},
['atlas'] = {'Brice', '1981'},
['abridged'] = {'van_Donzel', '1994'},
['default'] = {'BearmanBianquisBosworthvan_Donzel', '1960–2005'},
},
['The History of al-Tabari'] = {
['1'] = {'Rosenthal', '1989'},
['2'] = {'Brinner', '1986'},
['3'] = {'Brinner', '1991'},
['4'] = {'Perlmann', '1987'},
['5'] = {'Bosworth', '1999'},
['6'] = {'WattMcDonald', '1989'},
['7'] = {'McDonald', '1987'},
['8'] = {'Fishbein', '1997'},
['9'] = {'Poonawala', '1990'},
['10'] = {'Donner', '1993'},
['11'] = {'Blankinship', '1993'},
['12'] = {'Friedmann', '1992'},
['13'] = {'Juynboll', '1989'},
['14'] = {'Smith', '1994'},
['15'] = {'Humphreys', '1990'},
['16'] = {'Brockett', '1997'},
['17'] = {'Hawting', '1996'},
['18'] = {'Morony', '1987'},
['19'] = {'Howard', '1990'},
['20'] = {'Hawting', '1989'},
['21'] = {'Fishbein', '1990'},
['22'] = {'Rowson', '1989'},
['23'] = {'Hinds', '1990'},
['24'] = {'Powers', '1989'},
['25'] = {'Blankinship', '1989'},
['26'] = {'Hillenbrand', '1989'},
['27'] = {'Williams', '1985'},
['28'] = {'McAuliffe', '1995'},
['29'] = {'Kennedy', '1990'},
['30'] = {'Bosworth', '1989'},
['31'] = {'Fishbein', '1992'},
['32'] = {'Bosworth', '1987'},
['33'] = {'Bosworth', '1991'},
['34'] = {'Kraemer', '1989'},
['35'] = {'Saliba', '1985'},
['36'] = {'Waines', '1992'},
['37'] = {'Fields', '1987'},
['38'] = {'Rosenthal', '1985'},
['39'] = {'Landau-Tasseron', '1998'},
['40'] = {'Popovkin', '2007'},
['default'] = {'Yarshater', '1985–2007'},
},
}
--[[--------------------------&lt; W R A P P E R _ T E M P L A T E S &gt;--------------------------------------------
A list of wrapper templates and their redirects – spelling and capitalization is important; first character is
always uppercase. Each wrapper template gets its value from a k/v pair in the wrapper_template_defaults table.
article reader queries this table to see if template_name is a wrapper template
]]
local wrapper_templates = { -- keys are names of wrapper templates and their redirects
['Americana'] = wrapper_template_defaults['Americana'], -- canonical name; this template calls Cite Americana
['Catholic Encyclopedia'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['1913Catholic'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Catholic'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Catholic encyclopedia'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['CatholicEncyclopedia'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['CE13'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['CE1913'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Cite Americana'] = wrapper_template_defaults['Americana'], -- canonical name
['Cite Catholic Encyclopedia'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['CathEncy'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Cite Catholic Encyclopædia'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Cite CE1913'] = wrapper_template_defaults_vol['Cite Catholic Encyclopedia'],
['Cite EB1911'] = wrapper_template_defaults['Cite EB1911'], -- canonical name
['1911EB'] = wrapper_template_defaults['Cite EB1911'], -- redirects
['EB1911 cite'] = wrapper_template_defaults['Cite EB1911'],
['Wikisource1911Enc Citation'] = wrapper_template_defaults['Cite EB1911'],
['Wikisource1911Enc citation'] = wrapper_template_defaults['Cite EB1911'],
['Cite EB9'] = wrapper_template_defaults_vol['Cite EB9'], -- canonical
['Eb9'] = wrapper_template_defaults_vol['Cite EB9'],
['EB1911'] = wrapper_template_defaults['EB1911'], -- canonical name; this template calls Cite EB1911
['1911'] = wrapper_template_defaults['EB1911'], -- redirects
['1911s'] = wrapper_template_defaults['EB1911'],
['Britannica 1911'] = wrapper_template_defaults['EB1911'],
['Encyclopedia Britannica 1911'] = wrapper_template_defaults['EB1911'],
['Encyclopædia Britannica 1911'] = wrapper_template_defaults['EB1911'],
['EB9'] = wrapper_template_defaults_vol['Cite EB9'], -- canonical; this template calls Cite EB9
['Encyclopaedia of Islam, New Edition'] = wrapper_template_defaults_vol['Encyclopaedia of Islam, New Edition'], -- canonical
['EI2'] = wrapper_template_defaults_vol['Encyclopaedia of Islam, New Edition'],
['Encyclopaedia of Islam, THREE'] = wrapper_template_defaults['EI3'], -- canonical
['EI3'] = wrapper_template_defaults['EI3'],
['Cite ODNB'] = wrapper_template_defaults['ODNB'], -- canonical
['Cite odnb'] = wrapper_template_defaults['ODNB'],
['DNBweb'] = wrapper_template_defaults['ODNB'],
['OBDNweb'] = wrapper_template_defaults['ODNB'],
['ODNB'] = wrapper_template_defaults['ODNB'],
['ODNBref'] = wrapper_template_defaults['ODNB'],
['ODNBweb'] = wrapper_template_defaults['ODNB'],
['The History of al-Tabari'] = wrapper_template_defaults_vol['The History of al-Tabari'], -- canonical
['The History of Al-Tabari'] = wrapper_template_defaults_vol['The History of al-Tabari'], -- redirects
['The History of al-Ṭabarī'] = wrapper_template_defaults_vol['The History of al-Tabari'], -- redirects
}
--[[--------------------------&lt; T E M P L A T E _ N A M E S &gt;--------------------------------------------------
This table holds the names of templates and the names of their redirects. Template names must be written exactly
as they are named at their templatespace page. This same also applies to redirects.
The indexes in this table are not critical but should be short and concise.
]]
local template_names = {
['ADB'] = {'Allgemeine Deutsche Biographie', 'Cite ADB'},
['Butt_Stations'] = {'Butt-Stations', 'Butt-stations'},
['Cam_Hist_Iran'] = {'Cambridge History of Iran', 'The Cambridge History of Iran'},
['DNB'] = {'Cite DNB', 'DNB', 'DNB Cite', 'Cite DNBSupp', 'DNBSupp', 'Cite DNB12', 'Cite DNBIE', 'DNB12', 'DNBIE'},
['ME-ref'] = {'ME-ref', 'Me-ref'},
['ODB'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['ODLA'] = {'ODLA', 'Oxford Dictionary of Late Antiquity'},
['NDB'] = {'Cite NDB', 'NDB'},
}
--[[--------------------------&lt; S P E C I A L _ P A T T E R N S &gt;----------------------------------------------
Lua patterns. These are scanned sequentially which costs time and processing far and above the time and processing
needed to index into whitelist{}. Do not create a pattern here if a normal whitelist entry or entries can be created.
]]
local special_patterns = {
'CITEREFACAD%u%u%u?%u?%d+%u%u?', -- {{Acad}} ID appears to be 2-4 letters, then 3 numbers, then 1-2 letters
'CITEREFAHD%d+', -- {{Cite AHD}}
'CITEREFHistoric_England%d+', -- {{National Heritage List for England}} &amp; {{PastScape}}
'CITEREFHistoric_Environment_Scotland%u%u%u?%u?%d', -- {{Historic Environment Scotland}} %u can be BTL, GLD, HMPA, LB, SM
'CITEREFQHR%d+', -- {{Cite QHR}}
}
--[[--------------------------&lt; D N B _ S P E C I A L _ P A T T E R N S &gt;--------------------------------------
Lua patterns. Note at special_patterns applies. These for the DNB templates only; these will be tried only when
there is a DNB template in the article.
Pretty much any author name during the period 1885–1901 inclusive, and 1912.
The DNBIE was published in 1903, and Template:DNBIE says that its use is deprecated, but we do not fight that battle here.
]]
local DNB_special_patterns = {
'CITEREF%a[%a%-_\']*188[5-9]', -- 1885–1889
'CITEREF%a[%a%-_\']*189%d', -- 1890–1899
'CITEREF%a[%a%-_\']*190[0-1]', -- 1900–1901
'CITEREF%a[%a%-_\']*1903', -- 1903 IE
'CITEREF%a[%a%-_\']*1912', -- 1912 supplement
}
--[[--------------------------&lt; W H I T E L I S T &gt;------------------------------------------------------------
This is a list of anchor IDs known to be associated with specific wrapper templates. The anchor ID serves as an
index into the table. The assigned value is another table that lists the associated template and any redirects.
Except for year disambiguators, anchor IDs must have the same form as the anchor creator makes; must be the
anchor-encoded form. Remove the year disambiguator.
Template names must be written exactly as they are named at their templatespace page. This same also applies to
redirects. Module:Footnotes reads the template names left to right so most-commonly-used template or redirect name
should appear first. When there are more than one name and when those templates have various anchor IDs the template
namelist should be added to the template_names{} table.
Note that references to Template:EB1911 are listed under "E" in the alphabetical list below to keep them organized.
]]
local whitelist = {
----------&lt; # &gt;----------
['CITEREF2013_Statistical_Yearbook_of_the_Republic_of_Croatia'] = {'Croatia Yearbook 2013'},
----------&lt; A &gt;----------
['CITEREFAGA_1884–1897'] = {'Schubert\'s compositions (references)'},
['CITEREFATOC2009'] = {'ATOCConnectingCommunitiesReportS10'},
['CITEREFAbramowitzStegun1983'] = {'Abramowitz Stegun ref'},
['CITEREFActa_Lipsiensium1723'] = {'Bach\'s compositions (sources)'},
['CITEREFAdamsFranzosa2009'] = {'Adams Franzosa Introduction to Topology Pure and Applied'},
['CITEREFAdaschErnstKeim1978'] = {'Adasch Topological Vector Spaces'},
['CITEREFAhlgrimm1969'] = {'Bach\'s compositions (sources)'},
['CITEREFAhrons1927'] = {'Book-Ahrons-British Steam Railway Locomotive'},
['CITEREFAl-Kindi1912'] = {'The Governors and Judges of Egypt'},
['CITEREFAlbert_Schumann1886'] = {'Cite ADB'},
['CITEREFAlden1916'] = {'Shakespeare sonnets bibliography'},
['CITEREFAldrich1969'] = {'Aldrich-LocosGER7'},
['CITEREFAlexiou2010'] = {'Cite flatiron'},
['CITEREFAllenBoddyBrownFry1970'] = {'RCTS-LocosLNER-8A'},
['CITEREFAllenBoddyBrownFry1971'] = {'RCTS-LocosLNER-8B'},
['CITEREFAllenBoddyBrownFry1983'] = {'RCTS-LocosLNER-8A'},
['CITEREFAmerican_Railway_Association1922'] = {'1922 Locomotive Cyclopedia'},
['CITEREFAnderson1952'] = {'Naval Wars in the Levant 1559–1853'},
['CITEREFArkhangel&amp;#039;skiiPonomarev1984'] = {'Arkhangel\'skii Ponomarev Fundamentals of General Topology Problems and Exercises'},
['CITEREFArrey_von_Dommer1875'] = {'Cite ADB'},
['CITEREFAsmus1966'] = template_names['NDB'],
['CITEREFAtkins2007'] = {'Shakespeare sonnets bibliography'},
['CITEREFAvdoyan2018'] = template_names['ODLA'],
['CITEREFAwdry1990'] = {'Awdry-RailCo', 'Carnarvonshire Railway'},
----------&lt; B &gt;----------
['CITEREFBabinger1978'] = {'Mehmed the Conqueror and His Time'},
['CITEREFBabinger1992'] = {'Mehmed the Conqueror and His Time'},
['CITEREFBachAgricola1754'] = {'Bach\'s compositions (sources)'},
['CITEREFBadura-SkodaBranscombe2008'] = {'Schubert\'s compositions (references)'},
['CITEREFBaldwinKazhdan1991'] = template_names['ODB'],
['CITEREFBaldwinTalbot1991'] = {'Oxford Dictionary of Byzantium'},
['CITEREFBaltzer1916'] = {'Baltzer-Kolonialbahnen'},
['CITEREFBanach1932'] = {'Banach Théorie des Opérations Linéaires'},
['CITEREFBartusis1991'] = template_names['ODB'],
['CITEREFBaxter1971'] = {'Baxter-BritishLocoCat1'},
['CITEREFBaxter1977'] = {'Baxter-BritishLocoCat1'},
['CITEREFBaxter1978'] = {'Baxter-BritishLocoCat2A'},
['CITEREFBaxter1979'] = {'Baxter-BritishLocoCat2B'},
['CITEREFBaxter1982'] = {'Baxter-BritishLocoCat3A', 'Baxter-BritishLocoCat3B'},
['CITEREFBaxter1984'] = {'Baxter-BritishLocoCat4'},
['CITEREFBaxter1986'] = {'Baxter-BritishLocoCat5A'},
['CITEREFBaxter1988'] = {'Baxter-BritishLocoCat5B'},
['CITEREFBaxter2012'] = {'Baxter-BritishLocoCat6'},
['CITEREFBeißwenger1991'] = {'Bach\'s compositions (sources)'},
['CITEREFBelke1996'] = {'Tabula Imperii Byzantini'},
['CITEREFBelkeMersisch1990'] = {'Tabula Imperii Byzantini'},
['CITEREFBelkeRestle1984'] = {'Tabula Imperii Byzantini'},
['CITEREFBernhard_von_Poten1889'] = template_names['ADB'],
['CITEREFBernhard_von_Poten1898'] = template_names['ADB'],
['CITEREFBezilla1980'] = {'Bezilla-PRR-Electric-Traction'},
['CITEREFBierstedt1988'] = {'Bierstedt An Introduction to Locally Convex Inductive Limits'},
['CITEREFBirken1976'] = {'Die Provinzen des Osmanischen Reiches'},
['CITEREFBivar1983'] = template_names['Cam_Hist_Iran'],
['CITEREFBlake1966'] = {'DisraeliRef'},
['CITEREFBlanken2019'] = {'Bach\'s compositions (sources)'},
['CITEREFBlankinship1994'] = {'The End of the Jihâd State', 'The End of the Jihad State'},
['CITEREFBock1978'] = {'Audie-bock-directors'},
['CITEREFBoddyBrownFryHennigan1968'] = {'RCTS-LocosLNER-4'},
['CITEREFBoddyBrownFryHennigan1975'] = {'RCTS-LocosLNER-2B'},
['CITEREFBoddyBrownFryHennigan1977'] = {'RCTS-LocosLNER-9A', 'RCTS-LocosLNER-9B'},
['CITEREFBoddyBrownFryHennigan1979'] = {'RCTS-LocosLNER-3A'},
['CITEREFBoddyBrownHenniganHoole1984'] = {'RCTS-LocosLNER-6C'},
['CITEREFBoddyBrownHenniganNeve1981'] = {'RCTS-LocosLNER-3B'},
['CITEREFBoddyBrownNeveYeadon1983'] = {'RCTS-LocosLNER-6B'},
['CITEREFBoddyFryHenniganHoole1990'] = {'RCTS-LocosLNER-10B'},
['CITEREFBoddyFryHenniganProud1963'] = {'RCTS-LocosLNER-1'},
['CITEREFBoddyNeveTeeYeadon1982'] = {'RCTS-LocosLNER-6A'},
['CITEREFBoddyNeveYeadon1973'] = {'RCTS-LocosLNER-2A'},
['CITEREFBody1989'] = {'Body-Railways-Vol2'},
['CITEREFBon1969'] = {'La Morée franque'},
['CITEREFBonner2010'] = {'New Cambridge History of Islam'},
['CITEREFBonnett2005'] = {'Bonnett Practical Rail Engineering'},
['CITEREFBonporti1712'] = {'Bach\'s compositions (sources)'},
['CITEREFBooth2000'] = {'Shakespeare sonnets bibliography'},
['CITEREFBorsari1964'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFBossert1914'] = {'Schaff-Herzog'},
['CITEREFBosworth1968'] = {'Cambridge History of Iran'},
['CITEREFBosworth1975'] = template_names['Cam_Hist_Iran'],
['CITEREFBourbaki1987'] = {'Bourbaki Topological Vector Spaces'},
['CITEREFBourbaki1989'] = {'Bourbaki General Topology Part I Chapters 1-4', 'Bourbaki General Topology Part II Chapters 5-10', 'Bourbaki Algebra I Chapters 1-3 Springer'},
['CITEREFBourbaki1994'] = {'Bourbaki EHM'},
['CITEREFBowmanCameronGarnsey2005'] = {'Cambridge Ancient History'},
['CITEREFBoyd1970'] = {'Boyd-MidWales'},
['CITEREFBoyd1975'] = {'Boyd-FR1'},
['CITEREFBoyd1985'] = {'Boyd-NCaerns2Penrhyn'},
['CITEREFBoyd1986'] = {'Boyd-NCaerns3Dinorwic'},
['CITEREFBoyd1988'] = {'Boyd-SCaerns1'},
['CITEREFBoyd1989'] = {'Boyd-SCaerns2'},
['CITEREFBoyd1990'] = {'Boyd-NCaerns1'},
['CITEREFBradshaw1968'] = {'Bradshaw-1910April'},
['CITEREFBradshaw1985'] = {'Bradshaw-1922July'},
['CITEREFBradshaw2011'] = {'Bradshaw-1895December'},
['CITEREFBradshaw2012'] = {'Bradshaw-1850March'},
['CITEREFBrand1968'] = {'Byzantium Confronts the West'},
['CITEREFBrand1991'] = template_names['ODB'],
['CITEREFBrand1991'] = {'DBI'},
['CITEREFBrand1991'] = {'ODB'},
['CITEREFBray2010'] = {'Bray-SDJR'},
['CITEREFBrett2010'] = {'New Cambridge History of Islam'},
['CITEREFBrunner1975'] = template_names['Cam_Hist_Iran'],
['CITEREFBrunner1983'] = template_names['Cam_Hist_Iran'],
['CITEREFBryan1886'] = {'Bryan (3rd edition)'},
['CITEREFBuhle1909'] = {'Bach\'s compositions (sources)'},
['CITEREFBurant1987'] = {'Cite DCB'},
['CITEREFBurch1911'] = {'Burch Electric Traction'},
['CITEREFBurke1866'] = {'O\'Donnell family tree'},
['CITEREFBurrowsWallace1999'] = {'Cite gotham'},
['CITEREFButt1995'] = template_names['Butt_Stations'],
----------&lt; C &gt;----------
['CITEREFCIC1983'] = {'CIC1983bib'},
['CITEREFCalifornia1988'] = {'CA-Rail Passenger Development Plan-1988'},
['CITEREFCaltrans1984'] = {'Countrystudy'},
['CITEREFCameronWard-PerkinsWhitby2000'] = {'Cambridge Ancient History'},
['CITEREFCanepa2018'] = template_names['ODLA'],
['CITEREFCanny2008'] = {'O\'Donnell family tree'},
['CITEREFCappelCutlerKazhdan1991'] = {'ODB'},
['CITEREFCarl_von_Prantl1879'] = {'Cite ADB'},
['CITEREFCarlson2010'] = {'Dlmf'},
['CITEREFCaro1974'] = {'Cite Power Broker'},
['CITEREFCarpenter1977'] = template_names['ME-ref'],
['CITEREFCarpenter1981'] = template_names['ME-ref'],
['CITEREFCarter2006'] = {'Carter-RailwaysMotivePowerArgentina'},
['CITEREFCasserley1968'] = {'Casserley-joint'},
['CITEREFCasserleyJohnston1966'] = {'Casserley-LocoGrouping3'},
['CITEREFCasserleyJohnston1974'] = {'Casserley-LocoGrouping3', 'Casserley-LocoGrouping2', '0-7110-0554-0'},
['CITEREFCasway1984'] = {'O\'Donnell family tree'},
['CITEREFCawley2010'] = {'MLCC'},
['CITEREFCawley2011'] = {'MLCC'},
['CITEREFChaléardChanson-JabeurBéranger2006'] = {'Chaléard-Le cdf en Afrique'},
['CITEREFChasiotis1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFCheyneBlack1899'] = {'Biblica'},
['CITEREFCheyneBlack1899'] = {'Cite Biblica'},
['CITEREFCheyneBlack1899–1903'] = {'Cite Biblica'},
['CITEREFCheyneBlack1901'] = {'Cite Biblica'},
['CITEREFCheyneBlack1902'] = {'Cite Biblica'},
['CITEREFCheyneBlack1903'] = {'Cite Biblica'},
['CITEREFChisholm1922'] = {'EB1922', 'Cite EB1922'},
['CITEREFChoniates1984'] = {'O City of Byzantium'},
['CITEREFChung1994'] = {'Country study'},
['CITEREFChurchmanHurst2001'] = {'Churchman &amp; Hurst Railways of New Zealand'},
['CITEREFChurchman_&amp;amp;_Hurst2001'] = {'Churchman &amp; Hurst Railways of New Zealand'},
['CITEREFChurella2013'] = {'Churella-PRR-1'},
['CITEREFClementsMcMahon2008'] = {'ClementsMcMahon-GSR Locomotives'},
['CITEREFClinker1978'] = {'Clinker-Stations'},
['CITEREFClinker1988'] = {'Clinker-Stations'},
['CITEREFCoates1990'] = {'Coates-Reading'},
['CITEREFColledgeWarlow2006'] = {'Colledge'},
['CITEREFCollins2016'] = {'Cite Collins 2016'},
['CITEREFConolly1998'] = {'IanAllan-PreGroup-Atlas1998'},
['CITEREFConway1990'] = {'Conway A Course in Functional Analysis'},
['CITEREFCoulthard-Clark2002'] = {'Australian Dictionary of Biography'},
['CITEREFCousin1910'] = {'A Short Biographical Dictionary of English Literature', 'Cite SBDEL'},
['CITEREFCox1967'] = {'Cox-Upper Darby'},
['CITEREFCox2011'] = {'Cox-Dixie'},
['CITEREFCrone1980'] = {'Slaves on Horses'},
['CITEREFCroughtonKidnerYoung1982'] = {'Croughton-PrivateStations'},
['CITEREFCruickshanks1970'] = {'HistoryofParliament'},
['CITEREFCudahy2002'] = {'Cudahy-Hudson'},
['CITEREFCudahy2003'] = {'Cudahy-Subways'},
----------&lt; D &gt;----------
['CITEREFDBI'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFDZS2015'] = {'Croatia Yearbook 2015'},
['CITEREFDadelsen1957'] = {'Bach\'s compositions (sources)'},
['CITEREFDaftary1990'] = {'Daftary-The Ismailis'},
['CITEREFDaftary2007'] = {'Daftary-The Ismailis'},
['CITEREFDaniel2010'] = {'New Cambridge History of Islam'},
['CITEREFDanielsDench1963'] = {'Daniels-NoMore'},
['CITEREFDanielsDench1973'] = {'Daniels-NoMore'},
['CITEREFDarleyCanepa2018'] = {'Oxford Dictionary of Late Antiquity'},
['CITEREFDaryaeeCanepa2018'] = template_names['ODLA'],
['CITEREFDavid1961'] = {'Bach\'s compositions (sources)'},
['CITEREFDavidson2010'] = {'HistoryofParliament'},
['CITEREFDavidsonThrush2010'] = {'HistoryofParliament'},
['CITEREFDavies1996'] = {'Davies-PLMLocoList'},
['CITEREFDavies1997'] = {'Davies-NordLocoList'},
['CITEREFDavies2001'] = {'Davies-EstLocoList3', 'Davies-ÉtatLocoList'},
['CITEREFDavies2003'] = {'Davies-SNCFLocoList'},
['CITEREFDaviesFirthLuckingThomas1966'] = {'RCTS-LocosGWR-10'},
['CITEREFDeutsch1951'] = {'Schubert\'s compositions (references)'},
['CITEREFDeutsch1978'] = {'Schubert\'s compositions (references)'},
['CITEREFDewick2005'] = {'Dewick-Atlas'},
['CITEREFDickens2018'] = template_names['ODLA'],
['CITEREFDirksen1998'] = {'Bach\'s compositions (sources)'},
['CITEREFDirksen2010'] = {'Bach\'s compositions (sources)'},
['CITEREFDirksen2016'] = {'Bach\'s compositions (sources)'},
['CITEREFDixmier1984'] = {'Dixmier General Topology'},
['CITEREFDoleckiMynard2016'] = {'Dolecki Mynard Convergence Foundations Of Topology'},
['CITEREFDolkart1998'] = {'Cite morningside'},
['CITEREFDonohue2003'] = {'The Buwayhid Dynasty in Iraq'},
['CITEREFDow1962'] = {'Dow-GC2'},
['CITEREFDow1965'] = {'Dow-GC3'},
['CITEREFDow1985'] = {'Dow-GC1'},
['CITEREFDowney2007'] = {'Downey-Chicago'},
['CITEREFDrummond1964'] = {'HistoryofParliament'},
['CITEREFDrury1985'] = {'Drury Historical Guide 1985'},
['CITEREFDrury1993'] = {'Drury-North American Steam'},
['CITEREFDugundji1966'] = {'Dugundji Topology'},
['CITEREFDuke1995'] = {'Duke-Santa Fe-1'},
['CITEREFDukeKeilty1990'] = {'Duke-RDC'},
['CITEREFDumbarton_Oaks_Hagiography_Database'] = {'Dumbarton Oaks Hagiography Database'},
['CITEREFDunbar1969'] = {'Dunbar-Railroads'},
['CITEREFDuncan-Jones2010'] = {'Shakespeare sonnets bibliography'},
['CITEREFDunlop1895'] = {'O\'Donnell family tree'},
['CITEREFDunn2013'] = {'Dunn-Comeng-5'},
['CITEREFDurrant1972'] = {'Durrant-Steam Locos Eastern Europe'},
['CITEREFDurrant1981'] = {'Durrant-Garratt-Rev'},
['CITEREFDurrantLewisJorgensen1981'] = {'Durrant-SteamAfrica'},
['CITEREFDömlingKohlhase1971'] = {'Bach\'s compositions (sources)'},
['CITEREFDürr1952'] = {'Bach\'s compositions (sources)'},
['CITEREFDürr1954'] = {'Bach\'s compositions (sources)'},
['CITEREFDürr1987'] = {'Bach\'s compositions (sources)'},
['CITEREFDürrJones2006'] = {'Bach\'s compositions (sources)'},
['CITEREFDürrKobayashi1998'] = {'Bach\'s compositions (sources)'},
----------&lt; E &gt;----------
['CITEREFEarle2018'] = {'Gymnosperm Database'},
['CITEREFEdwards1995'] = {'Edwards Functional Analysis Theory and Applications'},
['CITEREFEichberg1976'] = {'Bach\'s compositions (sources)'},
['CITEREFEl-Hibri2010'] = {'New Cambridge History of Islam'},
['CITEREFEldredgeHorenstein2014'] = {'Cite concrete'},
['CITEREFElsholz1982'] = {'Schubert\'s compositions (references)'},
['CITEREFEppstein1966'] = {'Bach\'s compositions (sources)'},
['CITEREFEppstein1982'] = {'Bach\'s compositions (sources)'},
['CITEREFEuDaly2009'] = {'Complete Book of North American Railroading'},
['CITEREFEuDalySchaferJessupBoyd2009'] = {'Complete Book of North American Railroading'},
----------&lt; F &gt;----------
['CITEREFFang1943'] = {'Cite ECCP'},
['CITEREFFeder1958'] = {'Bach\'s compositions (sources)'},
['CITEREFFernandez1983'] = {'Fernandez1983'},
['CITEREFFiaccadori1991'] = {'ODB'},
['CITEREFFine1991'] = {'The Early Medieval Balkans'},
['CITEREFFine1994'] = {'The Late Medieval Balkans'},
['CITEREFFletcher,_Great_Tank_Scandal'] = {'Book-Fletcher-Great Tank Scandal'},
['CITEREFFletcher,_Universal_Tank'] = {'Book-Fletcher-Universal Tank'},
['CITEREFFluckMarshallWilson1996'] = {'FluMarWil-LocRailCR'},
['CITEREFFonstad1991'] = template_names['ME-ref'],
['CITEREFForkelTerry1920'] = {'Bach\'s compositions (sources)'},
['CITEREFFornaçon,_Siegfried1957'] = template_names['NDB'],
['CITEREFForrestal1999'] = {'Forrestal-Wineries'},
['CITEREFForster1990'] = {'Cite DCB'},
['CITEREFFoss1991'] = {'ODB'},
['CITEREFFoster1971'] = template_names['ME-ref'],
['CITEREFFoster1996'] = {'Foster-Field Guide'},
['CITEREFFouracre2005'] = {'New Cambridge Medieval History'},
['CITEREFFrailey2010'] = {'Frailey-Twilight'},
['CITEREFFranz_Schnorr_von_Carolsfeld1883'] = {'Cite ADB'},
['CITEREFFriedrich_Wilhelm_Bautz1975'] = {'BBKL'},
['CITEREFFriedrich_Wilhelm_Bautz1990'] = {'BBKL'},
['CITEREFFry1964'] = {'RCTS-LocosLNER-7'},
['CITEREFFry1966'] = {'RCTS-LocosLNER-5'},
['CITEREFFrye1975'] = {'The Cambridge History of Iran'},
['CITEREFFrye1983'] = template_names['Cam_Hist_Iran'],
['CITEREFFudenbergTirole1991'] = {'Cite Fudenberg Tirole 1991'},
['CITEREFFultonHarris1991'] = {'Fulton-Harris'},
----------&lt; G &gt;----------
['CITEREFGareyJohnson1979'] = {'Garey-Johnson'},
['CITEREFGarth2003'] = template_names['ME-ref'],
['CITEREFGeanakoplos1959'] = {'Emperor Michael Palaeologus and the West'},
['CITEREFGeorg_von_Dadelsen1953'] = template_names['NDB'],
['CITEREFGibb1923'] = {'The Arab Conquests in Central Asia'},
['CITEREFGil1997'] = {'A History of Palestine, 634-1099', 'A History of Palestine, 634–1099'},
['CITEREFGillham2001'] = {'Gillham-Waterloo-City'},
['CITEREFGilliland1969'] = {'Gilliland'},
['CITEREFGilliland1994'] = {'Pop Chronicles 40s'},
['CITEREFGilliverMarshallWeiner2006'] = template_names['ME-ref'],
['CITEREFGilmanPeckColby1905'] = {'New International Encyclopedia', 'NIE'},
['CITEREFGilmanPeckColby1916'] = {'New International Encyclopedia', 'NIE'},
['CITEREFGleaves1921'] = {'Gleaves'},
['CITEREFGlischinski1997'] = {'Glischinski-Santa Fe'},
['CITEREFGlöckner1983'] = {'Bach\'s compositions (sources)'},
['CITEREFGoldberg1981'] = {'Goldberg-Amtrak'},
['CITEREFGordon2001'] = {'Gordon-The Breaking of a Thousand Swords'},
['CITEREFGrant1994'] = {'Grant-Death'},
['CITEREFGrant2010'] = {'Grant-Twilight'},
['CITEREFGrant2017'] = {'Grant-RailCo'},
['CITEREFGreenlaw2007'] = {'Greenlaw-Via Rail'},
['CITEREFGregory1991'] = {'ODB'},
['CITEREFGregoryŠevčenko1991'] = {'ODB'},
['CITEREFGrete_Schemann1957'] = template_names['NDB'],
['CITEREFGrierson1903'] = {'Cite LSI', 'LSI', 'Linguistic Survey of India'},
['CITEREFGrierson1908'] = {'Cite LSI', 'LSI', 'Linguistic Survey of India'},
['CITEREFGrierson1919'] = {'Cite LSI', 'LSI', 'Linguistic Survey of India'},
['CITEREFGrierson1967'] = {'Cite LSI', 'LSI', 'Linguistic Survey of India'},
['CITEREFGriffithsSmith1999'] = {'Griffiths-Sheds1'},
['CITEREFGriffithsSmith2000'] = {'Griffiths-Sheds2'},
['CITEREFGrothendieck1955'] = {'Grothendieck Produits Tensoriels Topologiques et Espaces Nucléaires'},
['CITEREFGrothendieck1973'] = {'Grothendieck Topological Vector Spaces'},
['CITEREFGrothendieckDieudonné1960'] = {'EGA'},
['CITEREFGrothendieckDieudonné1961'] = {'EGA'},
['CITEREFGrothendieckDieudonné1963'] = {'EGA'},
['CITEREFGrothendieckDieudonné1964'] = {'EGA'},
['CITEREFGrothendieckDieudonné1965'] = {'EGA'},
['CITEREFGrothendieckDieudonné1966'] = {'EGA'},
['CITEREFGrothendieckDieudonné1967'] = {'EGA'},
['CITEREFGrothendieckDieudonné1971'] = {'EGA'},
['CITEREFGroves2005'] = {'MSW3 Primates', 'MSW3 Groves'},
['CITEREFGulino2005'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFGunzburg1984'] = {'Gunzburg-History WAGR Steam'},
----------&lt; H &gt;----------
['CITEREFHaldon1999'] = {'Warfare, State and Society in the Byzantine World, 565–1204'},
['CITEREFHalliday1985'] = {'Halliday-AustWineCompend'},
['CITEREFHalliday2008'] = {'Halliday-JHWAtlasAust2008'},
['CITEREFHalliday2009'] = {'Halliday-AustWineEncyc'},
['CITEREFHalpenny1990'] = {'Canadabio'},
['CITEREFHammondAnderson1993'] = template_names['ME-ref'],
['CITEREFHammondScull1995'] = template_names['ME-ref'],
['CITEREFHammondScull2005'] = template_names['ME-ref'],
['CITEREFHammondScull2006a'] = template_names['ME-ref'],
['CITEREFHammondScull2006b'] = template_names['ME-ref'],
['CITEREFHans_Heinrich_Borcherdt1955'] = template_names['NDB'],
['CITEREFHans_Knudsen1972'] = template_names['NDB'],
['CITEREFHartshorne1977'] = {'Hartshorne AG'},
['CITEREFHasumi2003'] = {'Hasumi-shiguehiko-ozu-2003'},
['CITEREFHaswell-Smith2004'] = {'Haswell-Smith'},
['CITEREFHaugic1908'] = {'Schaff-Herzog'},
['CITEREFHawting2000'] = {'The First Dynasty of Islam'},
['CITEREFHaynes2011'] = {'RubberBible92nd'},
['CITEREFHeinichen1728'] = {'Bach\'s compositions (sources)'},
['CITEREFHeinrich_Welti1890'] = {'Cite ADB'},
['CITEREFHellmann1965'] = {'Bach\'s compositions (sources)'},
['CITEREFHenrici1725'] = {'Bach\'s compositions (sources)'},
['CITEREFHenryOrsmond1928'] = {'Raiatea family tree'},
['CITEREFHermann_Palm1876'] = {'Cite ADB'},
['CITEREFHerr2000'] = {'Herr-LN'},
['CITEREFHidyHidyScottHofsummer2004'] = {'Hidy-Great Northern'},
['CITEREFHildHellenkemper1990'] = {'Tabula Imperii Byzantini'},
['CITEREFHildHellenkemper1994'] = {'Tabula Imperii Byzantini'},
['CITEREFHildRestle1981'] = {'Tabula Imperii Byzantini'},
['CITEREFHills,_Power_from_Steam'] = {'Book-Hills-Power from Steam'},
['CITEREFHills1989'] = {'Book-Hills-Power from Steam'},
['CITEREFHilmarJestremski2004'] = {'Schubert\'s compositions (references)'},
['CITEREFHilton1980'] = {'Hilton-Amtrak'},
['CITEREFHilton1990'] = {'Hilton Narrow Gauge'},
['CITEREFHiltonDue1960'] = {'Hilton-Interurban'},
['CITEREFHinton1986'] = {'HistoryofParliament'},
['CITEREFHistoric_Environment_Scotland1972'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_Scotland1976'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_ScotlandLB33744'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_ScotlandLB50114'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_Scotland2020'] = {'Historic Environment Scotland'},
['CITEREFHob.'] = {'Schubert\'s compositions (references)'},
['CITEREFHoffmann1738'] = {'Bach\'s compositions (sources)'},
['CITEREFHofmann1983'] = {'Bach\'s compositions (sources)'},
['CITEREFHofmann1987'] = {'Bach\'s compositions (sources)'},
['CITEREFHofmann1999'] = {'Bach\'s compositions (sources)'},
['CITEREFHolland1972'] = {'Holland-Vol 2'},
['CITEREFHolland1988'] = {'Cite DCB'},
['CITEREFHolland2001'] = {'Holland-Classic'},
['CITEREFHollingsworth1980'] = {'Hollingsworth-Atlas-Rigby'},
['CITEREFHollingsworth1991'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['CITEREFHollingsworthCutler1991'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['CITEREFHolmgren2003'] = {'EFloras'},
['CITEREFHoltBiddle1986'] = {'Holt-NorthWest'},
['CITEREFHolton1989'] = {'Holton-Reading-1'},
['CITEREFHopley1983'] = {'Australian Dictionary of Biography'},
['CITEREFHorváth1966'] = {'Horváth Topological Vector Spaces and Distributions Volume 1 1966'},
['CITEREFHughes1990'] = {'Hughes-IndianLocos1'},
['CITEREFHughes1992'] = {'Hughes-IndianLocos2'},
['CITEREFHughes1994'] = {'Hughes-IndianLocos3'},
['CITEREFHughes1996'] = {'Hughes-IndianLocos4'},
['CITEREFHunter2008'] = {'Country study'},
----------&lt; I &gt;----------
['CITEREFImber2002'] = {'Imber-The Ottoman Empire, 1300–1650'},
['CITEREFInalcik1989'] = {'Setton-A History of the Crusades'},
['CITEREFIshino1998'] = {'Teishajo'},
['CITEREFIvey1919'] = {'Ivey-Marquette'},
----------&lt; J &gt;----------
['CITEREFJackson1908'] = {'Schaff-Herzog'},
['CITEREFJackson1995'] = {'Cite enc-nyc'},
['CITEREFJackson2010'] = {'Cite enc-nyc2'},
['CITEREFJacobs1904'] = {'Cite Jewish Encyclopedia'},
['CITEREFJarchow1981'] = {'Jarchow Locally Convex Spaces'},
['CITEREFJohnstonWelshSchafer2001'] = {'Johnston-Streamliner'},
['CITEREFJones2011'] = {'Cite EPD'},
['CITEREFJordan2002'] = {'Jordan-WineWABest'},
['CITEREFJoshi1983'] = {'Joshi Introduction to General Topology'},
['CITEREFJoslen2003'] = {'Joslen-OOB'},
['CITEREFJowett1989'] = {'Jowett-Atlas', 'Carnarvonshire Railway'},
['CITEREFJowett2000'] = {'Jowett-Nationalised'},
['CITEREFJupp1986'] = {'HistoryofParliament'},
----------&lt; K &gt;----------
['CITEREFK.'] = {'Schubert\'s compositions (references)'},
['CITEREFKadinsky2016'] = {'Cite Hidden Waters NYC'},
['CITEREFKaegi1991'] = {'ODB'},
['CITEREFKang2008'] = {'Country study'},
['CITEREFKarl_Frohnmeyer1953'] = template_names['NDB'],
['CITEREFKarnow1989'] = {'Cite-Karnow'},
['CITEREFKazhdan1991'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['CITEREFKazhdanCutler1991'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['CITEREFKazhdanŠevčenko1991'] = {'ODB'},
['CITEREFKeefe2006'] = {'Schubert\'s compositions (references)'},
['CITEREFKeller1937'] = {'Bach\'s compositions (sources)'},
['CITEREFKellyBurrage1920'] = {'Cite AMB1920'},
['CITEREFKennedy1998'] = {'Cite Kennedy 1998'},
['CITEREFKennedy2001'] = {'Kennedy-The Armies of the Caliphs'},
['CITEREFKennedy2004'] = {'The Prophet and the Age of the Caliphates'},
['CITEREFKennedy2007'] = {'Kennedy-The Great Arab Conquests'},
['CITEREFKennedy2016'] = {'The Prophet and the Age of the Caliphates'},
['CITEREFKenyon2011'] = {'Bach\'s compositions (sources)'},
['CITEREFKerrigan1995'] = {'Shakespeare sonnets bibliography'},
['CITEREFKhaleelulla1982'] = {'Khaleelulla Counterexamples in Topological Vector Spaces'},
['CITEREFKhan2012'] = {'Cite Banglapedia'},
['CITEREFKim1994'] = {'Country study'},
['CITEREFKirnberger1774'] = {'Bach\'s compositions (sources)'},
['CITEREFKirnberger1780'] = {'Bach\'s compositions (sources)'},
['CITEREFKlein2006'] = {'Klein-UP-2'},
['CITEREFKobayashi1978'] = {'Bach\'s compositions (sources)'},
['CITEREFKoderHild1976'] = {'Tabula Imperii Byzantini'},
['CITEREFKoderSoustalKoder1998'] = {'Tabula Imperii Byzantini'},
['CITEREFKofos1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFKolde1914'] = {'Schaff-Herzog'},
['CITEREFKoliopoulos1978'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFKolmogorovFomin1957'] = {'Kolmogorov Fomin Elements of the Theory of Functions and Functional Analysis'},
['CITEREFKonrad_Ameln1985'] = template_names['NDB'],
['CITEREFKoska2011'] = {'Bach\'s compositions (sources)'},
['CITEREFKratville1962'] = {'Kratville-SSL'},
['CITEREFKretzschmar1910'] = {'Bach\'s compositions (sources)'},
['CITEREFKube2009'] = {'Schubert\'s compositions (references)'},
['CITEREFKöthe1969'] = {'Köthe Topological Vector Spaces I'},
['CITEREFKülzer2008'] = {'Tabula Imperii Byzantini'},
----------&lt; L &gt;----------
['CITEREFLadefogedMaddieson1996'] = {'SOWL'},
['CITEREFLandauCondit1996'] = {'Cite nysky'},
['CITEREFLandmann1907'] = {'Bach\'s compositions (sources)'},
['CITEREFLaërtius1925'] = {'Cite Lives of the Eminent Philosophers', 'Cite LotEP'},
['CITEREFLe_Quien1740'] = {'Oriens Christianus'},
['CITEREFLe_Strange1900'] = {'Baghdad During the Abbasid Caliphate'},
['CITEREFLe_Strange1905'] = {'Lands of the Eastern Caliphate'},
['CITEREFLe_Strange1922'] = {'Baghdad During the Abbasid Caliphate'},
['CITEREFLee1903'] = {'Cite DNBIE'},
['CITEREFLeisingerWollny1993'] = {'Bach\'s compositions (sources)'},
['CITEREFLevitan2001'] = {'Springer'},
['CITEREFLewin1925'] = {'Lewin-EarlyRail'},
['CITEREFLewis1969'] = {'Setton-A History of the Crusades'},
['CITEREFLewis1986'] = {'Lewis-Shortline-1986'},
['CITEREFLewis1991'] = {'Lewis-Shortline-1991'},
['CITEREFLewis1996'] = {'Lewis-Shortline-1996'},
['CITEREFLiederNet_Archive'] = {'Schubert\'s compositions (references)'},
['CITEREFLighthouses_of_Australia_Inc'] = {'Cite loa'},
['CITEREFLind1986'] = {'Lind-Limiteds'},
['CITEREFLongnon1969'] = {'Setton-A History of the Crusades'},
['CITEREFLuttrell1975'] = {'Setton-A History of the Crusades'},
['CITEREFLuttrell1987'] = {'DBI'},
['CITEREFLynch2004'] = {'Lynch-Penn Central'},
['CITEREFLynch2005'] = {'Lynch-New Haven passenger'},
['CITEREFle_Fleming1953'] = {'RCTS-LocosGWR-8'},
['CITEREFle_Fleming1960'] = {'RCTS-LocosGWR-8'},
----------&lt; M &gt;----------
['CITEREFMacDermot1927'] = {'Infobox GWR'},
['CITEREFMacDermot1931'] = {'Infobox GWR'},
['CITEREFMadelung1975'] = template_names['Cam_Hist_Iran'],
['CITEREFMagdalino2002'] = {'The Empire of Manuel I Komnenos'},
['CITEREFMaiken1989'] = {'Maiken-Night Trains'},
['CITEREFMailer2004'] = {'Mailer-Omaha Road'},
['CITEREFManfred_Knedlik2007'] = {'BBKL'},
['CITEREFMarshall1972'] = {'Lancashire &amp; Yorkshire Railway 3'},
['CITEREFMarshall2001'] = {'Marshall-INGSR'},
['CITEREFMartin_Persch1992'] = {'BBKL'},
['CITEREFMartin_Persch1993'] = {'BBKL'},
['CITEREFMartin_Persch1996'] = {'BBKL'},
['CITEREFMartindale1980'] = {'Prosopography of the Later Roman Empire', 'PLRE'},
['CITEREFMartindale1992'] = {'Prosopography of the Later Roman Empire', 'PLRE'},
['CITEREFMartindaleJonesMorris1971'] = {'Prosopography of the Later Roman Empire', 'PLRE'},
['CITEREFMayGray2006'] = {'MayGray-WAGRPassCar'},
['CITEREFMcArthurMcArthur2003'] = {'Cite ogn', 'Cite Oregon Geographic Names'},
['CITEREFMcCurdyRogers1902'] = {'Cite Jewish Encyclopedia'},
['CITEREFMcDonnell2015'] = {'McDonnell-Locomotives-2nd'},
['CITEREFMcGhee2008'] = {'Cite McGhee 2008'},
['CITEREFMeiningen1704'] = {'Bach\'s compositions (sources)'},
['CITEREFMeints1992'] = {'Meints-Companies'},
['CITEREFMeints2005'] = {'Meints-Lines'},
['CITEREFMelamed1988'] = {'Bach\'s compositions (sources)'},
['CITEREFMelamed1995'] = {'Bach\'s compositions (sources)'},
['CITEREFMiddleton1961'] = {'Middleton-Interurban'},
['CITEREFMiddleton2001'] = {'Middleton-Electrified-2nd'},
['CITEREFMiddleton2002'] = {'Middleton-PRR-Under-Wire'},
['CITEREFMiddletonSmerkDiehl2007'] = {'Encyclopedia of North American Railroads'},
['CITEREFMillar2011'] = {'NZR Steam Locomotive'},
['CITEREFMiller1908'] = {'The Latins in the Levant', 'Latins in the Levant'},
['CITEREFMiller1921'] = {'Essays on the Latin Orient'},
['CITEREFMinnich2008'] = {'Country study'},
['CITEREFMiramar_Ship_Index'] = {'Csr', 'Cite ship register'},
['CITEREFMitchell1965'] = {'Mitchell TOC'},
['CITEREFMittermeierKonstantHawkinsLouis2006'] = {'LoM2'},
['CITEREFMittermeierLouisRichardsonSchwitzer2010'] = {'LoM3'},
['CITEREFMittermeierTattersallKonstantMeyers1994'] = {'LoM1'},
['CITEREFMorana1993'] = {'Bach\'s compositions (sources)'},
['CITEREFMottahedeh1975'] = template_names['Cam_Hist_Iran'],
['CITEREFMozartHaydnHaydn2008'] = {'Schubert\'s compositions (references)'},
['CITEREFMunkres1974'] = {'Munkres Topology'},
['CITEREFMunkres2000'] = {'Munkres Topology'},
['CITEREFMurray2006'] = {'Murray-Illinois Central'},
['CITEREFMüller,_Hans-Christian1966'] = template_names['NDB'],
----------&lt; N &gt;----------
['CITEREFNSA_II,_15'] = {'Schubert\'s compositions (references)'},
['CITEREFNSA_scores'] = {'Schubert\'s compositions (references)'},
['CITEREFNSA_website'] = {'Schubert\'s compositions (references)'},
['CITEREFNariciBeckenstein2011'] = {'Narici Beckenstein Topological Vector Spaces'},
['CITEREFNersessian2018'] = template_names['ODLA'],
['CITEREFNeukirch1999'] = {'Neukirch ANT'},
['CITEREFNeukirchSchmidtWingberg2000'] = {'Neukirch et al. CNF'},
['CITEREFNew_York_City_Landmarks_Preservation_CommissionDolkartPostal2009'] = {'Cite nycland'},
['CITEREFNewbould1999'] = {'Schubert\'s compositions (references)'},
['CITEREFNicholsonCanepaDaryaee2018'] = template_names['ODLA'],
['CITEREFNicol1988'] = {'Byzantium and Venice: A Study in Diplomatic and Cultural Relations'},
['CITEREFNicol1993'] = {'The Last Centuries of Byzantium, 1261–1453', 'The Last Centuries of Byzantium'},
['CITEREFNock1974'] = {'Nock-EustonGlasgow'},
----------&lt; O &gt;----------
['CITEREFO&amp;#039;ConnorRobertson1996'] = {'MacTutor Biography', 'MacTutor'},
['CITEREFO&amp;#039;ConnorRobertson2000'] = {'MacTutor Biography', 'MacTutor'},
['CITEREFODB'] = {'Oxford Dictionary of Byzantium'},
['CITEREFODLA'] = template_names['ODLA'],
['CITEREFOfficial_Guide_of_the_Railways1950'] = {'Official Guide of the Railways'},
['CITEREFOgorek2012'] = {'Ogorek-South Shore'},
['CITEREFOikonomides1991'] = {'ODB'},
----------&lt; P &gt;----------
['CITEREFPLP'] = {'Prosopographisches Lexikon der Palaiologenzeit', 'PLP'},
['CITEREFPalmer1875'] = {'Cite ADB'},
['CITEREFPalmer_&amp;amp;_Stewart1965'] = {'Palmer &amp; Stewart'},
['CITEREFPaxtonBourne1985'] = {'Paxton-Bourne'},
['CITEREFPeck1898'] = {'HDCA'},
['CITEREFPerreault2004'] = {'Bach\'s compositions (sources)'},
['CITEREFPetropoulosKoumarianou1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFPfau2008'] = {'Bach\'s compositions (sources)'},
['CITEREFPinkepank1973'] = {'Pinkepank diesel spotters guide 2'},
['CITEREFPlantlist2016'] = {'Plantlist'},
['CITEREFPlaten1976'] = {'Bach\'s compositions (sources)'},
['CITEREFPmbZ'] = {'Prosopographie der mittelbyzantinischen Zeit', 'PMBZ'},
['CITEREFPolemis1968'] = {'Polemis-The Doukai'},
['CITEREFPloumidisAlexiou1974'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFPopplewell'] = {'Popplewell-Gazetteer'},
['CITEREFPrawer1985'] = {'Setton-A History of the Crusades'},
['CITEREFProsopographie_der_mittelbyz._Zeit'] = {'Prosopographie der mittelbyzantinischen Zeit'},
----------&lt; Q &gt;----------
['CITEREFQuick2009'] = {'Quick-Stations'},
['CITEREFQuick2019'] = {'Quick-stations-5'},
----------&lt; R &gt;----------
['CITEREFRamaer1974'] = {'Ramaer-SteamLocosEAR'},
['CITEREFRateliff2007'] = template_names['ME-ref'],
['CITEREFRavegnano2000'] = {'DBI'},
['CITEREFReed1953'] = {'RCTS-LocosGWR-2'},
['CITEREFReed1975'] = {'Reed-Streamline era'},
['CITEREFReed1997'] = {'Schubert\'s compositions (references)'},
['CITEREFReinhard_Tenberg1990'] = {'BBKL'},
['CITEREFReynolds1921'] = {'Cite Collier\'s'},
['CITEREFReynoldsOroszi2000'] = {'Reynolds-BO'},
['CITEREFRigo2005'] = {'ODB'},
['CITEREFRipleyDana1863'] = {'New American Cyclopedia'},
['CITEREFRipleyDana1864'] = {'New American Cyclopedia'},
['CITEREFRipleyDana1879'] = {'Cite AmCyc'},
['CITEREFRistaino1988'] = {'Country study'},
['CITEREFRobertson1983'] = {'Robertson-OriginScot'},
['CITEREFRoltKichenside1982'] = {'Rolt-Red'},
['CITEREFRose1857'] = {'Cite Newgenbio'},
['CITEREFRosenfeld1974'] = template_names['NDB'],
['CITEREFRosenzweigBlackmar1992'] = {'Cite Central Park history'},
['CITEREFRowledge1975'] = {'Rowledge-Engines of the LMS'},
['CITEREFRowledge1993'] = {'Rowledge-Irish Steam Register'},
['CITEREFRowlett'] = {'Cite rowlett'},
['CITEREFRudin1973'] = {'Rudin Walter Functional Analysis'},
['CITEREFRudin1991'] = {'Rudin Walter Functional Analysis'},
['CITEREFRunciman1951'] = {'Runciman-A History of the Crusades'},
['CITEREFRunciman1951–1954'] = {'Runciman-A History of the Crusades'},
['CITEREFRunciman1952'] = {'Runciman-A History of the Crusades'},
['CITEREFRunciman1954'] = {'Runciman-A History of the Crusades'},
['CITEREFRunciman1989'] = {'Runciman-A History of the Crusades'},
['CITEREFRybczynski2000'] = {'Rybczynski2000'},
----------&lt; S &gt;----------
['CITEREFSR_staff2013'] = {'Houston family tree'},
['CITEREFSalo2004'] = template_names['ME-ref'],
['CITEREFSanders2003'] = {'Sanders-Indiana'},
['CITEREFSanders2006'] = {'Sanders-Heartland'},
['CITEREFSanders2007'] = {'Sanders-Akron'},
['CITEREFSarikakis1974'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFSaunders2001'] = {'Saunders-Merging Lines'},
['CITEREFSaunders2013'] = {'Saunders-Giants of the Seas'},
['CITEREFSavadaShaw1992'] = {'Country study'},
['CITEREFSchaeferWolff1999'] = {'Schaefer Wolff Topological Vector Spaces'},
['CITEREFSchafer1996'] = {'Schafer-Classic-Railroads-1'},
['CITEREFSchafer1998'] = {'Schafer-Vintage Diesel'},
['CITEREFSchafer2000'] = {'Schafer-More-Classic'},
['CITEREFSchafer2003'] = {'Schafer-Classic-Railroads-3'},
['CITEREFSchaferSolomon1997'] = {'Schafer-Pennsylvania'},
['CITEREFSchaferWelsh1997'] = {'Schafer-Classic'},
['CITEREFSchaferWelsh2002'] = {'Schafer-Streamliners'},
['CITEREFSchaferWelshHolland2001'] = {'Schafer-American passenger train'},
['CITEREFSchaff-Herzog'] = {'Schaff-Herzog'},
['CITEREFSchechter1996'] = {'Schechter Handbook of Analysis and Its Foundations'},
['CITEREFScheide1960'] = {'Bach\'s compositions (sources)'},
['CITEREFSchicht1805'] = {'Bach\'s compositions (sources)'},
['CITEREFSchilling1997'] = {'Schilling-pop-culture'},
['CITEREFSchlitter2005'] = {'MSW3 Tubulidentata'},
['CITEREFSchmieder1950'] = {'Bach\'s compositions (sources)'},
['CITEREFSchmieder1990'] = {'Bach\'s compositions (sources)'},
['CITEREFSchneider1907'] = {'Bach\'s compositions (sources)'},
['CITEREFSchneider1912'] = {'Bach\'s compositions (sources)'},
['CITEREFScholze1736'] = {'Bach\'s compositions (sources)'},
['CITEREFSchroeter1961'] = {'Schroeter-Eisenbahnen'},
['CITEREFSchroeterRamaer1993'] = {'Schroeter-Ramaer-Eisenbahnen'},
['CITEREFSchubert-online'] = {'Schubert\'s compositions (references)'},
['CITEREFSchubert1968'] = {'Schubert Topology'},
['CITEREFSchulenberg2010'] = {'Bach\'s compositions (sources)'},
['CITEREFSchulenberg2013'] = {'Bach\'s compositions (sources)'},
['CITEREFSchulze1980'] = {'Bach\'s compositions (sources)'},
['CITEREFSchulze1983'] = {'Bach\'s compositions (sources)'},
['CITEREFSchulze1984'] = {'Bach\'s compositions (sources)'},
['CITEREFSchwieterman2001'] = {'Schwieterman-Leaves-Eastern'},
['CITEREFScottNegus2011'] = {'Scott-Negus-Cellar Door'},
['CITEREFScribbins1970'] = {'Scribbins-Hiawatha'},
['CITEREFScribbins2008'] = {'Scribbins-400-2008', 'Scribbins-Remembered'},
['CITEREFSearle'] = {'Cite sslidx'},
['CITEREFSellwood1983'] = template_names['Cam_Hist_Iran'],
['CITEREFSemmensGoldfinch2000'] = {'Book-Semmens-Goldfinch-How Steam Locomotives Really Work'},
['CITEREFSetton1975'] = {'Setton-A History of the Crusades'},
['CITEREFSetton1976'] = {'The Papacy and the Levant'},
['CITEREFSetton1978'] = {'The Papacy and the Levant'},
['CITEREFSetton1984'] = {'The Papacy and the Levant'},
['CITEREFShaughnessy1997'] = {'Shaughnessy-DH'},
['CITEREFShaw1978'] = {'Shaw-RailroadAccidents'},
['CITEREFShindo2004'] = {'Kaneto-shindo-shinario-jinsei'},
['CITEREFShtern2001'] = {'Springer', 'SpringerEOM'},
['CITEREFSiegele1957'] = {'Bach\'s compositions (sources)'},
['CITEREFSilke2006'] = {'O\'Donnell family tree'},
['CITEREFSimon1966'] = {'Simon-Wines Australia'},
['CITEREFSimonWarner2011'] = {'Amtrak By the Numbers'},
['CITEREFSinger1905'] = {'Jewish Encyclopedia'},
['CITEREFSkoulatos1980'] = {'Les personnages byzantins de l\'Alexiade'},
['CITEREFSmith1870'] = {'DGRBM'},
['CITEREFSmith2010'] = {'Smith-Cruise Ships-2010'},
['CITEREFSolomentsev2001'] = {'Springer', 'SpringerEOM'},
['CITEREFSolomon2000'] = {'Solomon-American Diesel', 'Solomon-UP'},
['CITEREFSolomon2003'] = {'Solomon-Masterpieces'},
['CITEREFSolomon2004'] = {'Solomon-Amtrak'},
['CITEREFSolomon2005'] = {'Solomon-SP-Passenger'},
['CITEREFSolomon2006'] = {'Solomon-EMD Locomotives'},
['CITEREFSolomon2011'] = {'Solomon-Modern Diesel'},
['CITEREFSolomon2014'] = {'Solomon-GE and EMD'},
['CITEREFSolomonSchafer2007'] = {'Solomon-New York Central'},
['CITEREFSolopova2009'] = template_names['ME-ref'],
['CITEREFSoustal1991'] = {'Tabula Imperii Byzantini'},
['CITEREFSoustalKoder1981'] = {'Tabula Imperii Byzantini'},
['CITEREFSpitta1894'] = {'Bach\'s compositions (sources)'},
['CITEREFSpitta1899'] = {'Bach\'s compositions (sources)'},
['CITEREFSpringirth2016'] = {'Springirth-Philadelphia'},
['CITEREFStagner1993'] = {'Stagner-Transition'},
['CITEREFStansfield1999'] = {'Stansfield-AyrRenfrew'},
['CITEREFStatistical_Yearbook_of_the_Republic_of_Croatia_2015'] = {'Croatia Yearbook 2015'},
['CITEREFStaufer1993'] = {'Staufer-Pennsy_III'},
['CITEREFStauferPennypacker1962'] = {'Staufer-Pennsy'},
['CITEREFStauferPennypacker1968'] = {'Staufer-Pennsy Power II'},
['CITEREFStaunton1988'] = {'Australian Dictionary of Biography'},
['CITEREFSternGilmartinMellins1987'] = {'Cite New York 1930'},
['CITEREFStewart1974'] = {'When Steam Was King'},
['CITEREFStrachey1981'] = template_names['ME-ref'],
['CITEREFStrickland1983'] = {'Strickland Locomotive Directory'},
['CITEREFStähelin1909'] = {'Schaff-Herzog'},
['CITEREFSuetin2001'] = {'Springer', 'SpringerEOM'},
['CITEREFSusanne_Schurr1992'] = {'BBKL'},
['CITEREFSusanne_Siebert1992'] = {'BBKL'},
['CITEREFSwartz1992'] = {'Swartz An Introduction to Functional Analysis'},
----------&lt; T &gt;----------
['CITEREFTaber1977'] = {'Taber-DLW-19th'},
['CITEREFTaberTaber1980'] = {'Taber-DLW-20th-1'},
['CITEREFTaberTaber1981'] = {'Taber-DLW-20th-2'},
['CITEREFTalbot1991'] = {'ODB'},
['CITEREFTalbotKazhdan1991'] = {'Oxford Dictionary of Byzantium'},
['CITEREFTer-Ghewondyan1976'] = {'The Arab Emirates in Bagratid Armenia'},
['CITEREFThe_London_Gazette1950'] = {'London Gazette'},
['CITEREFThielemann2012'] = {'Bach\'s compositions (sources)'},
['CITEREFThomas1970'] = {'HistoryofParliament'},
['CITEREFThomas1971'] = {'Thomas-History-VI'},
['CITEREFThrush2010'] = {'HistoryofParliament'},
['CITEREFTikhomirov2001'] = {'Springer'},
['CITEREFTittel1966'] = {'Bach\'s compositions (sources)'},
['CITEREFTodt1996'] = {'BBKL'},
['CITEREFTodtVest2014'] = {'Tabula Imperii Byzantini'},
['CITEREFTolkien1937'] = template_names['ME-ref'],
['CITEREFTolkien1954'] = template_names['ME-ref'],
['CITEREFTolkien1955'] = template_names['ME-ref'],
['CITEREFTolkien1964'] = template_names['ME-ref'],
['CITEREFTolkien1966'] = template_names['ME-ref'],
['CITEREFTolkien1977'] = template_names['ME-ref'],
['CITEREFTolkien1980'] = template_names['ME-ref'],
['CITEREFTolkien1982'] = template_names['ME-ref'],
['CITEREFTolkien1983'] = template_names['ME-ref'],
['CITEREFTolkien1984'] = template_names['ME-ref'],
['CITEREFTolkien1985'] = template_names['ME-ref'],
['CITEREFTolkien1986'] = template_names['ME-ref'],
['CITEREFTolkien1987'] = template_names['ME-ref'],
['CITEREFTolkien1988'] = template_names['ME-ref'],
['CITEREFTolkien1989'] = template_names['ME-ref'],
['CITEREFTolkien1990'] = template_names['ME-ref'],
['CITEREFTolkien1992'] = template_names['ME-ref'],
['CITEREFTolkien1993'] = template_names['ME-ref'],
['CITEREFTolkien1994'] = template_names['ME-ref'],
['CITEREFTolkien1996'] = template_names['ME-ref'],
['CITEREFTolkien1998'] = template_names['ME-ref'],
['CITEREFTolkien1999'] = template_names['ME-ref'],
['CITEREFTolkien2007'] = template_names['ME-ref'],
['CITEREFTolkienSwan1978'] = template_names['ME-ref'],
['CITEREFTolkienTolkien1992'] = template_names['ME-ref'],
['CITEREFTonks1988'] = {'Tonks ironstone'},
['CITEREFTonks1989'] = {'Tonks ironstone'},
['CITEREFTonks1992'] = {'Tonks ironstone'},
['CITEREFTopping1975'] = {'Setton-A History of the Crusades'},
['CITEREFTorri2013'] = {'Bach\'s compositions (sources)'},
['CITEREFTourret1995'] = {'Tourret-Allied Military Locomotives'},
['CITEREFTrapp1991'] = template_names['ODB'],
['CITEREFTrappBeyerSturm-Schnabl1983'] = {'Prosopographisches Lexikon der Palaiologenzeit'},
['CITEREFTrappWaltherBeyer1976'] = {'Prosopographisches Lexikon der Palaiologenzeit'},
['CITEREFTrappWaltherBeyerSturm-Schnabl1978'] = {'Prosopographisches Lexikon der Palaiologenzeit'},
['CITEREFTreadgold1988'] = {'The Byzantine Revival, 780–842'},
['CITEREFTreadgold1997'] = {'A History of the Byzantine State and Society'},
['CITEREFTrèves2006'] = {'Trèves François Topological vector spaces, distributions and kernels'},
['CITEREFTurim1998'] = {'Turim-oshima'},
----------&lt; U &gt;----------
['CITEREFUS-NHub_Music_Deposit_31_(Klavierbüchlein_für_W._F._Bach)_at_Bach_Digital'] = {'Bach\'s compositions (sources)'},
['CITEREFUwe_Eckardt2001'] = {'BBKL'},
['CITEREFunknown_author1881'] = {'Cite ADB'},
['CITEREFunknown_author1882'] = {'Cite ADB'},
----------&lt; V &gt;----------
['CITEREFVakalopoulos1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFVan_Cleve1969'] = {'Setton-A History of the Crusades'},
['CITEREFVan_Hoorickx1971'] = {'Schubert\'s compositions (references)'},
['CITEREFVan_Hoorickx_1974–1976'] = {'Schubert\'s compositions (references)'},
['CITEREFVan_Riemsdijk,_Compound_Locomotives'] = {'Book-Van Riemsdijk-Compound Locomotives'},
['CITEREFVan_Tricht2011'] = {'The Latin Renovatio of Byzantium'},
['CITEREFVarzos1984'] = {'Η Γενεαλογία των Κομνηνών', 'Varzos-Genealogy of the Komnenoi'},
['CITEREFVendler1997'] = {'Shakespeare sonnets bibliography'},
['CITEREFVetter1713'] = {'Bach\'s compositions (sources)'},
['CITEREFVischer1912'] = {'Schaff-Herzog'},
['CITEREFVolkmer1991'] = {'Volkmer-Pennsy-Electric'},
['CITEREFvan_Leyden1956'] = {'Bach\'s compositions (sources)'},
['CITEREFvon_Prantl1879'] = {'Cite ADB'},
----------&lt; W &gt;----------
['CITEREFWalter_Asmus1966'] = template_names['NDB'],
['CITEREFWayner1972'] = {'Wayner - Car names, numbers, consists'},
['CITEREFWayner1973'] = {'Wayner-Spotter-2nd'},
['CITEREFWegman2008'] = {'Wegman-Illustrated'},
['CITEREFWeibel1994'] = {'Weibel IHA'},
['CITEREFWeinrebHibbertKeayKeay2008'] = {'London encyclopedia'},
['CITEREFWellhausen1927'] = {'The Arab Kingdom and its Fall'},
['CITEREFWells1982'] = {'Accents of English'},
['CITEREFWells2008'] = {'Cite LPD'},
['CITEREFWelsh2006'] = {'Welsh-Broadway'},
['CITEREFWelsh2008'] = {'Welsh-UP'},
['CITEREFWerner_Raupp2001'] = {'BBKL'},
['CITEREFWestermayer,_Georg1882'] = {'Cite ADB'},
['CITEREFWham1997'] = {'Wham-Ayrshire'},
['CITEREFWharton1991'] = {'ODB'},
['CITEREFWhishaw1842'] = {'Whishaw-RailofGB-2ndEd'},
['CITEREFWhishaw1969'] = {'Whishaw-RailofGB'},
['CITEREFWhite1985'] = {'White-Passenger-1985'},
['CITEREFWhite1993'] = {'White - American railroad freight car'},
['CITEREFWhiteWillenskyLeadon2010'] = {'Cite aia5'},
['CITEREFWhitehurst1973'] = {'Whitehurst GW Engines from 1940'},
['CITEREFWhittow1996'] = {'The Making of Byzantium, 600–1025'},
['CITEREFWickman1982'] = {'Country study'},
['CITEREFWiesehöfer2018'] = template_names['ODLA'],
['CITEREFWilansky2013'] = {'Wilansky Modern Methods in Topological Vector Spaces'},
['CITEREFWillard2004'] = {'Willard General Topology'},
['CITEREFWilliams1998'] = {'Williams-Philadelphia'},
['CITEREFWilliams2003'] = {'Bach\'s compositions (sources)'},
['CITEREFWillis1750'] = {'Cite Notitia Parliamentaria'},
['CITEREFWilson2017'] = {'Wilson-Guide'},
['CITEREFWilsonFiske1891'] = {'Appletons\'', 'Cite Appletons\'', 'Appletons'},
['CITEREFWilsonFiske1900'] = {'Appletons\'', 'Cite Appletons\'', 'Appletons'},
['CITEREFWiltshire2000'] = {'Lloyd-Margaret River'},
['CITEREFWinfieldLyon2004'] = {'Winfield'},
['CITEREFWinkler1883'] = template_names['ADB'],
['CITEREFWolff1969'] = {'Setton-A History of the Crusades'},
['CITEREFWollny2015'] = {'Bach\'s compositions (sources)'},
['CITEREFWood1907'] = {'Cite Nuttall'},
['CITEREFWood1907'] = {'Nuttall'},
['CITEREFWorden2008'] = {'Country study'},
['CITEREFWozencraft2005'] = {'MSW3 Carnivora'},
['CITEREFWright2000'] = {'Bach\'s compositions (sources)'},
----------&lt; X &gt;----------
----------&lt; Y &gt;----------
['CITEREFYenne2005'] = {'Yenne-Chiefs'},
['CITEREFYonge1990'] = {'Quail-4'},
['CITEREFYonge1994'] = {'Quail-5'},
['CITEREFYonge2002'] = {'Quail-5'},
['CITEREFYonge2008'] = {'Quail-5'},
['CITEREFYonge2016'] = {'Quail-2-2016'},
['CITEREFYongePadgettSzwenk2013'] = {'Quail-4-Paper-3rdEd'},
----------&lt; Z &gt;----------
['CITEREFZahn1889–1893'] = {'Bach\'s compositions (sources)'},
['CITEREFZarrinkub1975'] = template_names['Cam_Hist_Iran'],
['CITEREFZekulich2000'] = {'Zekulich-WineWA'},
['CITEREFZimmermann2004'] = {'Zimmermann-Burlington'},
['CITEREFZimmermann2007'] = {'Zimmermann-GrandLuxe'},
['CITEREFZuccaric._1747'] = {'Bach\'s compositions (sources)'},
----------&lt; UNSORTED &gt;----------
['CITEREFHelgen2005'] = {'MSW3 Scandentia'},
['CITEREFSimmons2005'] = {'MSW3 Chiroptera'},
['CITEREFHoffmanSmith2005'] = {'MSW3 Lagomorpha'},
['CITEREFWoodsKilpatrick2005'] = {'MSW3 Hystricognathi'},
}
--[[--------------------------&lt; E X P O R T E D T A B L E S &gt;------------------------------------------------
]]
return {
DNB_special_patterns = DNB_special_patterns,
DNB_template_names = template_names['DNB'],
special_patterns = special_patterns,
whitelist = whitelist,
wrapper_templates = wrapper_templates,
}</text>
<sha1>dg1wqz8nhpvkqgivfnurzlnetkkde8c</sha1>
</revision>
</page>
<page>
<title>Module:Namespace detect/config</title>
<ns>828</ns>
<id>42256703</id>
<revision>
<id>948472518</id>
<parentid>948472515</parentid>
<timestamp>2020-04-01T06:12:44Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="3545" xml:space="preserve">--------------------------------------------------------------------------------
-- Namespace detect configuration data --
-- --
-- This module stores configuration data for Module:Namespace detect. Here --
-- you can localise the module to your wiki's language. --
-- --
-- To activate a configuration item, you need to uncomment it. This means --
-- that you need to remove the text "-- " at the start of the line. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. Values added --
-- here will work in addition to the default English parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- cfg.foo = 'parameter name' --
-- --
-- To add multiple names, you can use this format: --
-- --
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} --
--------------------------------------------------------------------------------
---- This parameter displays content for the main namespace:
-- cfg.main = 'main'
---- This parameter displays in talk namespaces:
-- cfg.talk = 'talk'
---- This parameter displays content for "other" namespaces (namespaces for which
---- parameters have not been specified):
-- cfg.other = 'other'
---- This parameter makes talk pages behave as though they are the corresponding
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].
---- Edit that module to change the default values of "yes", "no", etc.
-- cfg.subjectns = 'subjectns'
---- This parameter sets a demonstration namespace:
-- cfg.demospace = 'demospace'
---- This parameter sets a specific page to compare:
cfg.demopage = 'page'
--------------------------------------------------------------------------------
-- Table configuration --
-- These configuration items allow customisation of the "table" function, --
-- used to generate a table of possible parameters in the module --
-- documentation. --
--------------------------------------------------------------------------------
---- The header for the namespace column in the wikitable containing the list of
---- possible subject-space parameters.
-- cfg.wikitableNamespaceHeader = 'Namespace'
---- The header for the wikitable containing the list of possible subject-space
---- parameters.
-- cfg.wikitableAliasesHeader = 'Aliases'
--------------------------------------------------------------------------------
-- End of configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.</text>
<sha1>1o6ozz56i8q0xgyl6xa41n2v7kelhli</sha1>
</revision>
</page>
<page>
<title>Module:Namespace detect/data</title>
<ns>828</ns>
<id>42257476</id>
<revision>
<id>948472520</id>
<parentid>948472519</parentid>
<timestamp>2020-04-01T06:12:45Z</timestamp>
<contributor>
<username>MusikAnimal</username>
<id>14882394</id>
</contributor>
<minor/>
<comment>1 revision imported</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text bytes="2569" xml:space="preserve">--------------------------------------------------------------------------------
-- Namespace detect data --
-- This module holds data for [[Module:Namespace detect]] to be loaded per --
-- page, rather than per #invoke, for performance reasons. --
--------------------------------------------------------------------------------
local cfg = require('Module:Namespace detect/config')
local function addKey(t, key, defaultKey)
if key ~= defaultKey then
t[#t + 1] = key
end
end
-- Get a table of parameters to query for each default parameter name.
-- This allows wikis to customise parameter names in the cfg table while
-- ensuring that default parameter names will always work. The cfg table
-- values can be added as a string, or as an array of strings.
local defaultKeys = {
'main',
'talk',
'other',
'subjectns',
'demospace',
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
local cfgValue = cfg[defaultKey]
local cfgValueType = type(cfgValue)
if cfgValueType == 'string' then
addKey(t, cfgValue, defaultKey)
elseif cfgValueType == 'table' then
for i, key in ipairs(cfgValue) do
addKey(t, key, defaultKey)
end
end
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.
end
local function getParamMappings()
--[[
-- Returns a table of how parameter names map to namespace names. The keys
-- are the actual namespace names, in lower case, and the values are the
-- possible parameter names for that namespace, also in lower case. The
-- table entries are structured like this:
-- {
-- [''] = {'main'},
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},
-- ...
-- }
--]]
local mappings = {}
local mainNsName = mw.site.subjectNamespaces[0].name
mainNsName = mw.ustring.lower(mainNsName)
mappings[mainNsName] = mw.clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
table.insert(mappings[nsname], canonicalName)
end
for _, alias in ipairs(ns.aliases) do
table.insert(mappings[nsname], mw.ustring.lower(alias))
end
end
end
return mappings
end
return {
argKeys = argKeys,
cfg = cfg,
mappings = getParamMappings()
}</text>
<sha1>ojp6d3pc8mql5nufaqdg576c9so3479</sha1>
</revision>
</page>
</mediawiki>

File Metadata

Mime Type
text/html
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8788779
Default Alt Text
Wikipedia-20201120021235.xml (2 MB)

Event Timeline