Wikipedia
enwiki
https://en.wikipedia.org/wiki/Main_Page
MediaWiki 1.39.0-wmf.19
first-letter
Media
Special
Talk
User
User talk
Wikipedia
Wikipedia talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Portal
Portal talk
Draft
Draft talk
TimedText
TimedText talk
Module
Module talk
Gadget
Gadget talk
Gadget definition
Gadget definition talk
Iron Maiden
0
159172
1096807035
1096801691
2022-07-06T19:11:42Z
Fnlayson
1216158
Remove some excess/repeated links per [[MOS:OVERLINK]].
wikitext
text/x-wiki
{{short description|English heavy metal band}}
{{about|the band|their eponymous album|Iron Maiden (album)|the supposed torture device|Iron maiden|other uses}}
{{good article}}
{{EngvarB|date=November 2021}}
{{Use dmy dates|date=August 2016}}
{{Infobox musical artist
| name = Iron Maiden
| image = IronMaidencollage2.jpg
| caption = Top: [[Steve Harris (musician)|Steve Harris]] (L), [[Dave Murray (musician)|Dave Murray]] (R) <br />Middle: [[Adrian Smith]] (L), [[Bruce Dickinson]] (R) <br />Bottom: [[Nicko McBrain]] (L), [[Janick Gers]] (R)
| landscape = no
| origin = [[London]], England
| genre = [[Heavy metal music|Heavy metal]]{{sfn|Phillips|Cogan|2009a|p=117}}
| years_active = 1975–present<!-- See MOS:DATE -->
| label = {{flatlist|
* [[EMI Records|EMI]]
* [[Parlophone]]
* [[BMG Records|BMG]]
* [[UMe]]
* [[Sanctuary Records Group|Sanctuary]]
* [[Legacy Records]]
* [[Columbia Records|Columbia]]
* [[Portrait Records|Portrait]]
* [[CMC International|CMC]]
* [[Epic Records|Epic]]
* [[Capitol Records|Capitol]]
* [[Harvest Records|Harvest]]
}}
| associated_acts = {{flatlist|
* [[ASAP (band)|ASAP]]
* [[The Entire Population of Hackney]]
* [[Gogmagog (band)|Gogmagog]]
* [[Praying Mantis (band)|Praying Mantis]]
* [[Samson (band)|Samson]]
* [[Trust (French band)|Trust]]
* [[Urchin (band)|Urchin]]
}}
| website = {{URL|ironmaiden.com}}
| current_members =
* [[Steve Harris (musician)|Steve Harris]]
* [[Dave Murray (musician)|Dave Murray]]
* [[Adrian Smith]]
* [[Bruce Dickinson]]
* [[Nicko McBrain]]
* [[Janick Gers]]
| past_members =
* [[List of Iron Maiden band members#Former members|Dennis Wilcock]]
* [[Bob Sawyer]]
* [[Tony Moore (musician)|Tony Moore]]
* [[Barry Purkis|Barry "Thunderstick" Purkis]]
* [[Terry Wapram]]
* [[Doug Sampson]]
* [[List of Iron Maiden band members#Former members|Paul Todd]]
* [[Paul Cairns]]
* [[List of Iron Maiden band members#Former members|Tony Parsons]]
* [[Paul Di'Anno]]
* [[Clive Burr]]
* [[Dennis Stratton]]
* [[Blaze Bayley]]
}}
'''Iron Maiden''' are<!-- Please refer to WP:ENGVAR. British English uses the plural format whilst referring to rock bands. Please do not change "are" to "is". --> an English [[Heavy metal music|heavy metal]] band formed in [[Leyton]], [[East London]], in 1975 by bassist and primary songwriter [[Steve Harris (musician)|Steve Harris]]. The band's [[Iron Maiden discography|discography]] has grown to 41 albums, including 17 studio albums, 13 live albums, four [[Extended play|EPs]], and seven [[compilation album|compilations]]. They have also released 47 singles and 20 video albums. Two electronic games have been released with Iron Maiden soundtracks, and the band's music is featured in a number of other video games.
As pioneers of the [[new wave of British heavy metal]] movement, Iron Maiden achieved initial success during the early 1980s. After several line-up changes, the band went on to release a series of UK and US platinum and gold albums, including 1980's [[Iron Maiden (album)|debut album]], 1981's ''[[Killers (Iron Maiden album)|Killers]]'', 1982's ''[[The Number of the Beast (album)|The Number of the Beast]]'', 1983's ''[[Piece of Mind]]'', 1984's ''[[Powerslave]]'', 1985's live release ''[[Live After Death]]'', 1986's ''[[Somewhere in Time (Iron Maiden album)|Somewhere in Time]]'', 1988's ''[[Seventh Son of a Seventh Son]]'', 1990's ''[[No Prayer for the Dying]]'', and 1992's ''[[Fear of the Dark (Iron Maiden album)|Fear of the Dark]]''. In 1982 the band released its album ''[[The Number of the Beast (album)|The Number of the Beast]]'', the first with [[Bruce Dickinson]], who replaced [[Paul Di'Anno]] as lead singer. This was a turning point in their career, helping establish Iron Maiden as one of heavy metal's most important artists.{{sfn|NOTB History|2021}} ''[[The Number of the Beast (album)|The Number of the Beast]]'' is among the most popular heavy metal albums of all time, having sold almost 20 million copies worldwide.{{sfn|Dig20|2022}}{{sfn|20mln|2022}}{{sfn|40A1|2022}}{{sfn|40A2|2022}}{{sfn|40A3|2022}}{{sfn|NotBHist|2022}}{{sfn|Number40|2022}}{{sfn|TN40An20|2022}}{{sfn|TNOTB40|2022}}{{Sfn|NotBData|2021}}{{sfn|NOTB40CS|2022}}
Since the return of lead vocalist [[Bruce Dickinson]] and guitarist [[Adrian Smith]] in 1999, the band has undergone a resurgence in popularity, with a series of new albums and highly successful tours.{{sfn|Green|2010}} Released in 2006, fourteenth studio album ''[[A Matter of Life and Death (album)|A Matter of Life and Death]]'', reached top sales in dozen of countries, initiating the series of Iron Maiden's highest-ranked albums. Their 2010 album, ''[[The Final Frontier]]'', peaked at No. 1 in 28 countries and received widespread critical acclaim. The sixteenth studio album, ''[[The Book of Souls]]'', was released on 4 September 2015 to similar success, debuting at number one in the album charts of 24 countries with physical sales and summary in 43 territories with physical and digital sales<!--Per sources: 24 countries. The other 19 no longer publish retail charts.-->.<ref name="OfficialBio">{{cite news |title=Official Bio |url=https://www.ironmaiden.com/the-band |publisher=ironmaiden.com |date=8 October 2015}}</ref><ref name="hammer 28">{{cite news |last1=Kielty |first1=Martin |title=Maiden hit No.1 in 24 countries with physical sales and summary 43 territories with physical and digital sales|url=http://metalhammer.teamrock.com/news/2015-09-18/iron-maiden-book-of-souls-no1-24-countries |website=[[Metal Hammer]] |access-date=18 September 2015 |date=18 September 2015}}</ref><ref name="toronto sun">{{cite news |title=Iron Maiden coming to Edmonton in April |url=http://www.torontosun.com/2015/10/08/iron-maiden-coming-to-edmonton-in-edmonton-in-april |access-date=1 November 2015 |newspaper=[[Toronto Sun]] |date=8 October 2015}}</ref> The seventeenth studio album ''[[Senjutsu (album)|Senjutsu]]'' was released on 3 September 2021 and eventually reached No. 1 in 24 countries.{{sfn|SenCh24|2022}}{{sfn|Lat|2022}}{{Sfn|Senjutsu Success|2021}}{{Sfn|A Success|2021}}{{Sfn|Senj23|2021}}
By 2017, Iron Maiden had sold well over 100 million copies of their albums worldwide,{{sfn|Thring|2017}}{{sfn|Johnson|2017}}{{sfn|WellOver 100|2021}} despite minimal radio and mainstream media support.{{sfn|Smith|2009}} As of 2021, the band's catalogue's sold over 200 million copies worldwide, including albums, singles, compilations, and videos.{{sfn|JHF|2022}}{{sfn|TID|2022}}{{sfn|200MLN|2021}}{{sfn|MetCa|2021}}{{sfn|Sales Gen|2022}} By 2022 their releases have been certified silver, gold and platinum around 600 times worldwide.{{sfn|Cert600|2022}} Iron Maiden have become one of the most influential and revered rock bands of all time and helped spawn an entire genre of music. Critics have stated that the band elevated heavy metal to an art form, proving that academic and musical inspirations can coexist.{{sfn|IMINF|2022}}{{sfn|Neil Daniels|2019b}}{{sfn|Kiss Stanley|2021}}{{sfn|MHoF2021|2021}} The band is also hailed as one of the greatest live acts of all time.{{sfn|DF22|2022}}
The band and its members have received multiple industry awards including the [[Grammy Awards]] and its equivalents in other countries. Other accolades the band has received include [[Brit Awards]],<ref name="snI6H">{{cite news |url= http://www.blabbermouth.net/news.aspx?mode=Article&newsitemID=114646 |title= Iron Maiden named 'Best British Live Act' at Brit Awards |access-date= 1 September 2011 |date= 18 February 2009 |work= [[Blabbermouth.net]]}}</ref> [[Silver Clef Award]],<ref name="QSm0Y">{{cite web|last1=Cooper|first1=Leonie|title=Iron Maiden win O2 Silver Clef 2015 Award for outstanding contribution to UK music|url=http://www.nme.com/news/iron-maiden/83831|website=[[NME]]|access-date=23 March 2015|date=23 March 2015}}</ref> [[Nordoff-Robbins Award]],{{sfn|Nordoff-Robbins|2021}} [[Ivor Novello Awards]],{{sfn|Sanctuary Group|2002}} [[Juno Awards]],{{sfn|Juno Awards|2010}} [[Guinness Book of World Records]],<ref name="OnoLG">{{cite web |url=https://stason.org/TULARC/music-bands/iron-maiden/26-Other-IRON-MAIDEN-tidbits.html|title= Music bands – Iron Maiden | publisher= stason.org | date= 2021-05-28 | access-date= 2021-05-28}}</ref> [[Public choice|Public Choice International]],{{sfn|IPCH1985|2021}} [[Classic Rock Roll of Honour Awards]], [[ECHO Awards]],<ref name="mplC6">{{cite web|url=https://www.metal-hammer.de/echo-2016-iron-maiden-und-frei-wild-erhalten-auszeichnungen-606231/|title=Echo Awards 2016 |publisher= metal-hammer.de/ |date=10 February 2009 |access-date=10 February 2009}}</ref><ref name="43YY5">{{cite web|url= https://twitter.com/ECHO_Musikpreis/status/718159366755639297|title=Musikpreis Iron Maiden|publisher= twitter.com/ECHO_Musikpreis |date=13 February 2016 |access-date=13 February 2016}}</ref> Top.HR Music Awards,{{Sfn|TopHR1|2022}}{{Sfn|TopHR2|2022}} Žebřík Music Awards,{{sfn|Zebrik|2022}} [[Honorary Doctorate]]s, State Prizes,{{sfn|State Prize|2021}}{{Sfn|BAC1|2021}}{{Sfn|HCoS|2021}}{{Sfn|VOTC|2021}} sales recognition, charity and sport awards among many others. Iron Maiden were inducted into the [[Guitar Center#Hollywood's RockWalk|Hollywood RockWalk]], BPI Hall of Fame and Kerrang! Hall of Fame.{{sfn|KerrangHoF|2021}}{{sfn|Guitar Center}} The band is also a part of permanent exhibitions of the [[Rock and Roll Hall of Fame]],{{sfn|Heavy Metal Exhibition|2021}} [[British Music Experience]]{{sfn|BME1|2021}}{{sfn|BME2|2021}}{{sfn|BME3|2021}} and [[Wacken Open Air]] Hall of Fame.{{sfn|WOAHOF|2021}}
Iron Maiden's lyrics cover such topics as history, literature, war, mythology, society and religion. Many of their songs are based on history, classic literature and film.{{sfn|Historical Topics|2021}}{{sfn|Literature|2021}} {{as of|2019|October|}}, the band have played some [[List of Iron Maiden concert tours|2500 live shows]], performing for tens of millions of fans. For over 40 years, the musicians have been supported by their famous mascot, "[[Eddie (Iron Maiden)|Eddie]]", who has appeared on almost all of their album and single covers, videos and merchandise. Originally designed by [[Derek Riggs]], Eddie became the main attraction of Iron Maiden live shows, which feature theatrical elements like coloured backdrops, inflatables, pyrotechnics, elaborate lighting rigs, props and stage sets.{{sfn|Eddie Riggs|2021}}
==History==
===Early years (1975–1978)===
[[File:Cartandhorses.jpg|thumb|right|The Cart and Horses Pub, located in Maryland Point, Stratford, was where Iron Maiden played some of their first shows in 1976. The building was officially named "The Birthplace of Iron Maiden".{{sfnm|1a1=Wall|1y=2004a|1p=29|2a1=Bushell|2a2=Halfin|2y=1985a|2p=9}}]]
Iron Maiden were formed on Christmas Day, 25 December 1975 by bassist [[Steve Harris (musician)|Steve Harris]] shortly after he left his previous group, Smiler. Harris attributed the band's name to a film adaptation of ''[[The Man in the Iron Mask (1939 film)|The Man in the Iron Mask]]'' from the novel by [[Alexandre Dumas]], the title of which reminded him of the [[iron maiden|iron maiden torture device]].{{sfn|Barton|1979}} They originally had the name Ash Mountain, but most of the band members preferred the name Iron Maiden anyway so that name was chosen shortly after the band formed. After months of rehearsal, Iron Maiden made their debut at St. Nicks Hall in Poplar on 1 May 1976,{{sfn|EMI|2004}} before taking up a semi-residency at the Cart and Horses Pub in [[Maryland, London|Maryland]], Stratford.{{sfn|Wall|2004b|p=29}} A few decades later the pub in Maryland was officially named "The Birthplace of Iron Maiden" and turned into a music pub with many mementos of the band's early years as part of London's rock music history.{{sfn|Cart and Horses|2021}}
The original line-up was short-lived, with vocalist [[Paul Day (musician)|Paul Day]] being the first casualty as, according to Harris, he lacked "energy or charisma on stage".{{sfn|Wall|2004c|p=32}} He was replaced by Dennis Wilcock, a [[Kiss (band)|Kiss]] fan who used make-up and fake blood during live performances.{{sfn|Wall|2004c|p=32}} Wilcock's friend, guitarist [[Dave Murray (musician)|Dave Murray]], was invited to join, much to the dismay of the band's guitarists Dave Sullivan and Terry Rance.{{sfn|Wall|2004d|p=33}} Their frustration led Harris to temporarily disband Iron Maiden in 1976,{{sfn|Wall|2004d|p=33}} though the group reformed soon after with Murray as the sole guitarist. Harris and Murray remain the band's longest-standing members and have performed on all of their releases.
[[File:Harris 1.jpg|thumb|left|Dave Murray and Steve Harris in 2008. Harris and Murray are the only members to have performed on all of the band's albums.]]
Iron Maiden recruited yet another guitarist in 1977, Bob Sawyer, who was sacked for embarrassing the band on stage by pretending to play guitar with his teeth.{{sfn|Wall|2004e|p=44}} Tension ensued again, causing a rift between Murray and Wilcock, who convinced Harris to fire Murray,{{sfn|Wall|2004f|p=46}} as well as original drummer Ron Matthews.{{sfn|EMI|2004}} A new line-up was put together, including future [[Cutting Crew]] member [[Tony Moore (musician)|Tony Moore]] on keyboards, Terry Wapram on guitar, and drummer [[Thunderstick|Barry Purkis]] (better known today as Thunderstick). After a single gig with the band in January 1978, Moore was asked to leave as Harris decided that keyboards did not suit the band's sound.{{sfn|Wall|2004i|p=48}} Dave Murray rejoined in late March 1978 which Terry Wapram disapproved of so he was sacked. A few weeks later, Dennis Wilcock decided to leave Iron Maiden to form his own band, V1, with Terry Wapram, and drummer [[Thunderstick|Barry Purkis]] left as well. Doug Sampson was at Dennis and Thunderstick's last gig and so joined the band afterwards.
Harris, Murray, and Sampson spent the summer and autumn of 1978 rehearsing while they searched for a singer to complete the band's new line-up.{{sfn|Wall|2004k|p=52}} A chance meeting at the Red Lion pub in [[Leytonstone]] in November 1978 evolved into a successful audition for vocalist [[Paul Di'Anno]].{{sfn|Wall|2004l|p=54}} Steve Harris stated, "There's sort of a quality in Paul's voice, a raspiness in his voice, or whatever you want to call it, that just gave it this great edge."{{sfn|Wall|2004m|p=53}} At this time, Murray would typically act as their sole guitarist, with Harris commenting, "Davey was so good he could do a lot of it on his own. The plan was always to get a second guitarist in, but finding one that could match Davey was really difficult."{{sfn|Wall|2004n|p=64}}
===Record contract and early releases (1978–1981)===
{{main|The Soundhouse Tapes|Iron Maiden (album)|Killers (Iron Maiden album)}}
On New Year's Eve 1978, Iron Maiden recorded a demo, consisting of four songs, at Spaceward Studios in Cambridge.{{sfn|Wall|2004o|p=66}} Hoping that the recording would help them secure more gigs,{{sfn|Wall|2004o|p=66}} the band presented a copy to [[Neal Kay]], then managing a heavy metal club called "Bandwagon Heavy Metal Soundhouse", located in Kingsbury Circle, northwest London.{{sfn|Wall|2004p|p=67}} Upon hearing the tape, Kay began playing the demo regularly at the Bandwagon, and one of the songs, "Prowler", eventually went to No. 1 in the Soundhouse charts, which were published weekly in ''[[Sounds (magazine)|Sounds]]'' magazine.{{sfn|Wall|2004r|pp=104–105}} A copy was also acquired by [[Rod Smallwood]], who soon became the band's manager,{{sfn|Wall|2004s|p=83}} and, as Iron Maiden's popularity increased, they released the demo on their own record label as ''[[The Soundhouse Tapes]]'', named after the club.{{sfn|Wall|2004t|p=103}} Featuring only three tracks (one song, "Strange World", was excluded as the band were unsatisfied with its production){{sfn|Wall|2004u|p=102}} all five thousand copies sold out within weeks.{{sfn|Wall|2004v|pp=104–105}}
[[File:IRON MAIDEN - Manchester Apollo - 1980.jpg|thumb|upright|[[Paul Di'Anno]] and [[Steve Harris (musician)|Steve Harris]] supporting [[Judas Priest]] on their British Steel Tour, 1980]]
In December 1979, the band secured a major record deal with [[EMI]],{{sfn|Wall|2004w|p=108}} and asked Dave Murray's childhood friend, [[Adrian Smith]] of [[Urchin (band)|Urchin]], to join the group as their second guitarist.{{sfn|Wall|2004z|pp=163–164}} Due to his commitment to Urchin, Smith declined and [[Dennis Stratton]] was hired instead.{{sfn|Wall|2004aa|p=121}} Shortly afterwards, [[Doug Sampson]] left due to health issues, and was replaced by ex-[[Samson (band)|Samson]] drummer [[Clive Burr]] at Stratton's suggestion on 26 December 1979.{{sfn|Wall|2004bb|p=123}} Iron Maiden's first appearance on an album was on the ''[[Metal for Muthas]]'' compilation (released on 15 February 1980) with two early versions of "[[Sanctuary (Iron Maiden song)|Sanctuary]]" and "Wrathchild".{{sfn|Wall|2004cc|p=137}} The release led to an [[Metal for Muthas Tour|ensuing tour]] which featured several other bands linked with the [[new wave of British heavy metal]] ([[NWoBHM]]) movement.{{sfnm|1a1=Wall|1y=2004dd|1p=139|2a1=Saulnier|2y=2012dd}} According to different sources between May 1976 and December 1979 the band played about 200 shows in [[Great Britain]].{{sfn|SetlistED|2021}}{{sfn|DDotB|2021}}
Iron Maiden released their [[Iron Maiden (album)|self-titled album]] in 1980, which debuted at No. 4 in the [[UK Albums Chart]].{{sfn|Wall|2004ee|p=143}} The album includes other early favourites such as "[[Running Free]]", "Transylvania", "Phantom of the Opera", and "[[Sanctuary (Iron Maiden song)|Sanctuary]]" – which was not on the original UK release, but appeared on the US version and subsequent remasters. The band embarked on a [[Iron Maiden Tour|headline tour of the UK]], before opening for [[Kiss (band)|Kiss]] on their 1980 [[Unmasked Tour]]'s European leg as well as supporting Judas Priest on [[British Steel Tour|select dates]]. Iron Maiden also appeared, to much acclaim, at the Reading Festival 1980 with almost 40,000 in attendance. They were second to top of the bill on the Saturday, with [[UFO (band)|UFO]] headlining. After the Kiss tour, [[Dennis Stratton]] was dismissed from the band as a result of creative and personal differences,{{sfn|Hinchcliffe|1999}} and was replaced by Smith in October 1980. In Europe Iron Maiden played 28 shows to about 400,000 people (mainly [[Kiss (band)|Kiss]] fans). In December the musicians played at the [[Rainbow Theatre]] in London where the band's very first live video was filmed. ''[[Live at the Rainbow]]'' was released in May 1981 and the cuts "Iron Maiden" and "Wrathchild" from this video received heavy rotation on [[MTV]] during its first hours on the air as the first metal videos ever.{{sfn|First Albums|2021}}{{sfn|DDotB|2021}}{{sfn|Roland|2013}}
An eponymous debut album achieved critical acclaim in [[Japan]] where Iron Maiden were named "The Best Newcoming Foreign Band" by readers of Music Life magazine and received their the very first Gold certificate.{{sfn|Japan 1980|2021}} Four decades later Iron Maiden's debut album was ranked No. 13 of "The Greatest Hard Rock & Metal Albums Ever" published by journalists of opinion-forming [[Rolling Stone]] magazine and also named the third most important metal debut album of all time. ''Iron Maiden'' is ranked at the similar positions in many other polls worldwide.{{sfn|40Anni|2021}}{{sfn|40Anos|2021}}
In 1981, Iron Maiden released their second studio album, ''[[Killers (Iron Maiden album)|Killers]]''. Containing many tracks written prior to their debut release, it had only two new songs written for the record: "Prodigal Son" and "Murders in the Rue Morgue"{{sfn|Wall|2004ff|p=183}} (the latter's title was taken from the [[The Murders in the Rue Morgue|short story]] by [[Edgar Allan Poe]]).{{sfn|Brannigan}} The leitmotif of the lyrics was a murder contemplated from different perspectives.{{sfn|First Albums|2021}} Unsatisfied with the production on their debut album,{{sfn|Wall|2004gg|p=145}} the band hired veteran producer [[Martin Birch]],{{sfn|Wall|2004hh|p=181}} who would continue to work with Iron Maiden until his retirement in 1992.{{sfn|Wall|2004ii|p=300}} The record was followed by the band's first [[Killer World Tour|world tour]], which included their debut performance in the United States, opening for Judas Priest at [[Aladdin (hotel and casino)|The Aladdin Casino]] in Las Vegas. Iron Maiden played 45 shows in [[North America]] to several hundred thousand fans, including two headline gigs in Canada.{{sfn|USA1981|2021}}{{sfn|Wall|2004jj|p=251}} ''Killers'' made the band's USA album charts debut, reaching No. 78 on the [[Billboard 200|''Billboard'' 200]].{{sfn|Billboard}} Iron Maiden booked 132 shows to promote their second album.{{sfn|Tour1981|2021}} The musicians played the small or mid-size venues using standard type of stage equipment including 200 lamps, smoke machines, two backdrops with [[Eddie (Iron Maiden)|Eddie]] and four members of the crew wearing Eddie's masks during the "Iron Maiden" song live performance.{{sfn|Tour1981|2021}}
[[File:Iron Maiden, Steve Harris - Manchester Apollo - 1980.jpg|thumb|Iron Maiden on stage, [[Killer World Tour]] 1981]]
The band's second album featured the single "[[Twilight Zone (Iron Maiden song)|Twilight Zone/Wrathchild]]" (released with double A-side) and speed metal opus "[[Purgatory (song)|Purgatory]]" as well as two instrumental songs ("The Ides of March", "Genghis Khan") and the proto-thrash title track.{{sfn|KillSingles|2021}} The music style of the album inspired generations of thrash, speed and power metal bands. The cover illustration by [[Derek Riggs]] became the first of many more iconic covers in the history of the genre.{{sfn|First Albums|2021}} ''Killers''' sold much better worldwide than their debut, hitting the million mark a year after launch, earning the group Gold certificates in [[Germany]], [[Japan]], [[Canada]], [[Belgium]], [[Denmark]], [[France]] (double Gold) and in [[United Kingdom]]. The album debuted at No. 12 in the UK and reached the Top 10 and Top 20 in many countries around the world.{{sfn|First Albums|2021}}{{sfn|DDotB|2021}}
The UK tour included the band's headline performance at the [[Hammersmith Odeon]]. However, Paul Di'Anno's addiction problems led to the cancellation of several German dates. In some of those cities, local fans reacted with street riots. Iron Maiden then toured [[Japan]] for the first time in seven shows. All tickets were sold out in record time, but further problems with Di'Anno forced the band to cancel two shows. The concert recordings from [[Nagoya]] were used on the mini-album ''[[Maiden Japan]]'' (''[[Heavy Metal Army]]'' in Japan) released in September 1981.{{sfn|First Albums|2021}}{{sfn|DDotB|2021}} Musicians visited [[Yugoslavia]] to be a headliner of the Belgrade festival with 50,000 people. It was the first time the band had played behind the [[Iron Curtain]] and also a groundbreaking performance for a new generation of heavy metal artists at the so-called [[Eastern Bloc]].{{sfn|Juras1981|2021|pp=178–184}} During the summer, Iron Maiden played several festivals in Europe, including appearances as "very special guests" at the Golden Summernights 1981 festival series held at [[Zeppelinfeld]] in [[Nuremberg]] with 100,000 people, but also in [[Stuttgart]] and [[Darmstadt]] in front of an audience of tens of thousands.{{Sfn|DDotB|2021}}
===Success (1981–1985)===
{{main|The Number of the Beast (album)|Piece of Mind|Powerslave|Live After Death}}
By 1981, [[Paul Di'Anno]] was demonstrating increasingly self-destructive behaviour, particularly due to his drug usage,{{sfn|EMI|2004}} about which Di'Anno comments, "it wasn't just that I was snorting a bit of coke, though; I was just going for it non-stop, 24 hours a day, every day ... the band had commitments piling up that went on for months, years, and I just couldn't see my way to the end of it. I knew I'd never last the whole tour. It was too much."{{sfn|Wall|2004kk|p=194}} With his performances waning, Di'Anno was immediately dismissed following the Killer World Tour,{{sfn|Wall|2004ll|p=219}} at which point the band had already selected his replacement.{{sfn|Wall|2004mm|p=218}}
[[File:Iron Maiden in San Sebastian.jpg|thumb|Stage set 1982]]
After a meeting with Rod Smallwood at the [[Reading and Leeds Festivals|Reading Festival]],{{sfn|Wall|2004nn|p=217}} [[Bruce Dickinson]], previously of [[Samson (band)|Samson]], auditioned for Iron Maiden in September 1981 and was immediately hired.{{sfn|Walloo|2004|p=218}} The following month, Dickinson went out on the road with the band on a small headlining tour in Italy, as well as a one-off show at the [[Rainbow Theatre]] in the UK.{{sfn|Wall|2004pp|p=219}} For the last show, and in anticipation of their forthcoming album, the band played "Children of the Damned" and "22 Acacia Avenue", introducing fans to the sound towards which they were progressing.{{sfn|Dome|2014}}
In 1982, Iron Maiden released their third studio album, ''[[The Number of the Beast (album)|The Number of the Beast]]''. This became the band's first UK Albums Chart No. 1 record,{{sfn|Wall|2004rr|p=227}} was a Top Ten hit in many other countries, and reached No. 33 on the [[Billboard 200|''Billboard'' 200]].{{sfn|Billboard}}{{sfn|Wall|2004ss|p=228}} At the time, Dickinson was in the midst of legal difficulties with Samson's management, and was not permitted to add his name to any of the songwriting credits, although he still made what he described as a "moral contribution" to "Children of the Damned", "The Prisoner" and "[[Run to the Hills]]".{{sfn|Shooman|2007aa|p=82}} For the second time the band embarked on a world tour, dubbed [[The Beast on the Road]], during which they visited North America, Japan, Australia, and Europe, including a headline appearance for 40,000 people at the [[Reading festival|Reading Festival]]. Iron Maiden played 188 shows in 10 months.{{sfn|DDotB|2021}} For the very first time they presented conceptual setting including specially designed stage and lighting composed of almost 400 lamps. Also for the first time in the history of the band, the movable, three-meter Eddie was presented on stage during the performance of the song "Iron Maiden".{{sfn|DDotB|2021}}
The Beast on the Road's US leg proved controversial when an American conservative political lobbying group claimed that Iron Maiden were [[Satanism|Satanic]] because of the new album's title track and demonic cover art,{{sfn|Wall|2004tt|p=228}} to the point where a group of Christian [[activism|activists]] destroyed Iron Maiden records in protest.{{sfn|Young(1)}} In recent years, Dickinson stated that the band treated this as "silliness",{{sfn|Eagle Vision|2001}} and that the demonstrations in fact gave them "loads of publicity".{{sfn|EMI|2004}} An American professor Bryan A. Bardine referring to visual aspect of band's third album stated the authors' message seems to be understandable: "this album evokes power, passion and music that present darker themes and images."{{Sfn|Bayer|2009|pp=133–134}}
The band played over 100 dates in North America supporting [[Scorpions (band)|Scorpions]], Judas Priest and [[Rainbow (rock band)|Rainbow]]. Iron Maiden headlined some Canadian dates, New York, Chicago free show and the other soloed stops. They also performed at the biggest American festivals ([[Day on the Green]], SuperFest, Pacific Jam, Rock Fest) which were held on big stadiums as [[Rich Stadium]], [[Anaheim Stadium]], [[Oakland Alameda Coliseum]] or [[Comiskey Park]] among many others.{{sfn|DDotB|2021}} Iron Maiden were quickly promoted to the hard rock extra-league and avantgarde of heavy metal. ''[[The Number of the Beast (album)|The Number of the Beast]]'' is considered as the ground-breaking album for modern heavy metal and has been back on the album sales charts and the all time heavy metal albums polls constantly.{{sfn|DDotB|2021}}{{sfn|Golden Era|2021}} The album's crowning track entitled "[[Hallowed Be Thy Name (song)|Hallowed Be Thy Name]]" is considered one of a few most important in the history of the genre, it has repeatedly held leading positions in various polls.{{sfn|Hallowed|2021}} After the first year of its release 2.5 million copies were sold.{{sfn|39Anos|2021}} A new and hugely successful chapter in Iron Maiden's future was cemented; by 2010, the album had sold over 14 million copies worldwide.{{sfn|Pfanner|2010}} The "Golden Era" in the band's history has begun{{sfn|Golden Era|2021}} Since a few decades ''The Number of the Beast'' is considered one of the albums of all time (Top 3, Top 5) in heavy music, and by December 2021 it had sold almost 20 million copies worldwide.{{sfn|Dig20|2022}}{{sfn|20mln|2022}}{{sfn|40A1|2022}}{{sfn|40A2|2022}}{{sfn|40A3|2022}}{{sfn|NotBHist|2022}}{{sfn|Number40|2022}}{{sfn|TN40An20|2022}}{{sfn|NOTB40CS|2022}}{{sfn|TNOTB40|2022}}{{Sfn|NotBData|2021}} In December 1982, drummer [[Clive Burr]] was fired from the band and replaced by [[Nicko McBrain]], who previously played for [[Trust (French band)|Trust]].{{sfn|Wall|2004uu|p=233}} Although Harris stated that his dismissal took place because his live performances were affected by offstage activities,{{sfn|Wall|2004ww|pp=232–233}} Burr objected to this, and claimed that he was unfairly ousted from the band.{{sfn|Marlow|2011}}
[[File:Nicko McBrain 2.jpg|thumb|upright|[[Nicko McBrain]] has been Iron Maiden's drummer since 1982]]
Soon afterwards, the band journeyed for the first time to The Bahamas to record the first of three consecutive albums at [[Compass Point Studios]].{{sfn|Wall|2004vv|p=246}} In 1983, they released their fourth studio album, ''[[Piece of Mind]]'', which reached the No. 3 spot in the UK,{{sfn|Wall|2004zz|p=247}} and No. 14 on the [[Billboard 200|''Billboard'' 200]].{{sfn|Billboard}} ''Piece of Mind'' features the successful singles "[[The Trooper]]" and "[[Flight of Icarus]]", the latter being notable as one of the band's few songs to gain substantial airplay in the US.{{sfn|Wall|2004aaa|p=245}} The other notable songs of the album are "Where Eagles Dare" (based on so same entitled movie with [[Clint Eastwood]] starring), "Revelations", "Die with Your Boots On" and an epic "To Tame a Land" based on [[Frank Herbert]]'s novel titled "Dune".{{sfn|PoM Album|2021}} Iron Maiden played 151 concerts in Europe and North America as a part of [[World Piece Tour]]. For the very the first time they booked a massive North America tour as headliners.{{sfn|DDotB|2021}} Nearly 90 shows took place in 10,000 + capacity arenas, and the band sold out [[Madison Square Garden]] with a crowd of 20,000.{{sfn|WPT|2021}} In London, they played four consecutive nights at the [[Hammersmith Odeon]], then toured many large venues across [[Western Europe]], including an extensive German leg. The World Piece Tour was summed up by two headlining performances at the Rock & Pop Festival at the [[Westfalenhallen|Westfalenhalle]] in Dortmund. The show was broadcast live to 300 million people with the exception of the song "Iron Maiden" due to the band's "violent behaviour on stage".{{sfn|WPT|2021}}{{sfn|DDotB|2021}}
The setting of the tour was the next step in the visual development of the band's concerts. Iron Maiden used, inter alia, 100,000 watts sound system for the first time in the history of a group specially designed for large sports arenas.{{sfn|DDotB|2021}} The lighting equipment, in addition to the standard ramps with spots, included four movable, triangular ramps, rising to different heights above the stage and illuminating the audience from different angles. Those ones were the first ramps of this type in the world, and their construction became a significant step forward as a starting point for the creation of mobile, extensive lighting systems used on subsequent routes. The lighting platform was built on the basis of over 520 lamps.{{sfn|DDotB|2021}} As with the previous tour, the band had a conceptual set design with a number of props referring to the image of the promoted album, the movable Eddie and his big head emerging from behind the stage, also more use was made of pyrotechnics.{{sfn|Golden Era|2021}}
UK magazine ''[[Kerrang!]]'' summed up the passing year, and readers were asked to select one hundred best metal albums of all time, with ''[[Piece of Mind]]'' ranked first, followed by ''[[The Number of the Beast (album)|The Number of the Beast]]'', and the band's other releases were in the Top 50.{{sfn|DDotB|2021}} The rankings in other regions of the world looked similar. Iron Maiden became the most serious contenders for the title of "the biggest heavy metal formation in the world". In the year of the premiere, the circulation of the fourth album exceeded 2 million copies sold.{{sfn|Golden Era|2021}}{{sfn|DDotB|2021}} In September 1983 the band released a video compilation ''[[Video Pieces]]'' containing official clips from ''[[The Number of the Beast (album)|The Number of the Beast]]'' and ''[[Piece of Mind]]'' albums.{{sfn|Piece Videos|2021}}
Soon after the success of ''Piece of Mind'' and its [[World Piece Tour|supporting tour]], the band released their fifth studio album, ''[[Powerslave]]'', on 9 September 1984. The album features the singles "[[2 Minutes to Midnight]]" and "[[Aces High (song)|Aces High]]", an emotional title track as well as "Rime of the Ancient Mariner", based on [[Samuel Taylor Coleridge]]'s [[Rime of the Ancient Mariner|poem of the same name]], and running over 13 minutes in length.{{sfn|Wall|2004bbb|p=253}} ''Powerslave'' was another chart success, reaching No. 12 on the [[Billboard 200|''Billboard'' 200]]{{sfn|Billboard}} and No. 2 in the UK as a result of band's record company EMI's third ''[[Now That's What I Call Music!]]'' pop compilation which should not be listed.{{sfn|UK Charts|2021}}{{sfn|Wall|2004ccc|pp=253–255}}
The tour, following the album, dubbed the [[World Slavery Tour]], was the band's largest to date, consisting of 193 shows in 28 countries over 13 months,{{sfn|Wall|2004ddd|p=253}} playing to an estimated three and a half million people.{{sfn|LouderSound|2021}}{{sfn|Stenning 1|2006|p=102}} The most elaborate tour to date was famous from using the custom made props, such as the extendible golden [[Sarcophagus|sarcophagi]], 33-foot [[Eddie (mascot)|Eddie]] appearing as big one and mummified walking phantom, the conceptual stage set with an [[Ancient Egyptian]] motives and extensive [[pyrotechnics]].{{sfn|LouderSound|2021}} The band's own equipment travelled in six 45 foot articulated trucks, and touring needed three buses for 60 road crew and two more for musicians. The PA front system power had 153,000 watts and an additional 21,000 for stage monitors. A custom-built and flexible lighting rig held nearly 800 lamps in vast triangular ramps of moving aluminium. The band's 2008–2009 tour, [[Somewhere Back in Time World Tour]], featured a stage set which largely emulated the World Slavery Tour.{{sfn|WST|2021}}{{sfn|DDotB|2021}}
The enterprise started in August 1984 with five shows in [[Poland]]. Iron Maiden were the first Western artists which brought the full-scale production behind the [[Iron Curtain]].{{sfn|Golden Era|2021}} Average attendance in Poland was estimated as 12,000 people plus few thousands outside each night. The inaugural show in [[Warsaw]] held at [[Torwar Hall|Torwar Arena]] gathered over 14,000 people and five thousand more listened outside.{{sfn|IMBio|2021}}{{sfn|WST1|2021}} In Budapest, some 50,000 fans filled a parking lot.{{sfn|IMHUU|2021}}{{sfn|IMHU|2021}} Iron Maiden played to capacity crowds all over Europe and the UK. 105 dates in North America were massive successes. Many shows were played back-to-back in the same city, such as in Long Beach, California, where the band played four consecutive concerts at [[Long Beach Arena]] for combined audience of 54,000 fans.{{sfn|Golden Era|2021}} In New York City, the band played five nights at [[Radio City Music Hall]] and only Dickinson's illness prevented the five scheduled shows from being seven.{{sfn|DDotB|2021}}
The band's third official video entitled ''[[Behind the Iron Curtain (video)|Behind the Iron Curtain]]'' was released in October 1984. The [[World Slavery Tour]] documentary brought footage of the band touring the [[Eastern Europe]] in 1984, performing shows in visited countries, and additionally portrayed the musicians as playing at the Polish wedding in [[Poznań]]. The video contained two promotional clips for songs from the ''[[Powerslave]]'' album, brand new live tracks and special interviews with musicians and members of the road crew. ''Behind the Iron Curtain'' was the first documentary published by a Western artist which pictured them touring the countries of [[Eastern Bloc]]. MTV broadcast an expanded version (about one hour long) of this document, which became a part of the ''[[Live After Death|Live After Death DVD]]'' released in February 2008.{{sfn|DDotB|2021}}{{sfn|BTRC|2021}}
Iron Maiden also made their debut appearance in South America, where they co-headlined (with [[Queen (band)|Queen]]) the [[Rock in Rio]] festival to an estimated 350,000 – 500,000 in attendance.{{sfn|RiRAt|2022}}{{sfn|EMI|2008}} The tour was physically gruelling for the band, who demanded six months off when it ended (although this was later reduced to four months).{{sfn|Wall|2004eee|p=258}} This was the first substantial break in the group's history, including the cancellation of a proposed supporting tour for the new live album,{{sfn|Stenning 2|2006|p=104}} with Bruce Dickinson threatening to quit unless the tour ended.{{sfn|Wall|2004fff|p=255}} In October 1985 Iron Maiden published their first double live album, ''[[Live After Death]]'', which was a critical and commercial success, peaking at No. 19 on the ''[[Billboard 200]]''{{sfn|Billboard}} and No. 2 in the UK.{{sfn|Wall|2004ggg|p=257}} The album was recorded at [[Long Beach Arena]] and also features additional tracks from four nights at London's [[Hammersmith Apollo]]. ''Live After Death'' is widely regarded as one of the greatest live albums of all time and has been described by [[Classic Rock (magazine)|''Classic Rock'']] as "the last great live album of the vinyl era" and seminal heavy metal live release.{{sfn|LAD|2021|p=193}}{{sfn|Live Coll|2021}} Along with the album a same-titled official video was also released and debuted at No. 1 in the UK charts and topped music video charts worldwide. ''Live After Death'' live video was digitally remastered and released in 2008 as a part of the "History of Iron Maiden" series.{{sfn|IMBio|2021}} In November 1985, Iron Maiden were named the best rock and metal band in the world and awarded at Public Choice International. This recognition sealed their status as the biggest heavy metal band in the world.{{sfn|IPCH1985|2021}}
===Experimentation (1986–1989)===
{{main|Somewhere in Time (Iron Maiden album)|Seventh Son of a Seventh Son}}
Returning from their time off, the band adopted a different style for their 1986 studio album, ''[[Somewhere in Time (Iron Maiden album)|Somewhere in Time]].'' For the first time in the band's history, this featured [[synthesiser|synthesised]] bass and guitars to add textures and layers to the sound.{{sfn|Huey(3)}} The release charted well across the world, particularly with the single "[[Wasted Years]]", but notably included no writing credits from Dickinson, whose material was rejected by the rest of the band.{{sfn|Wall|2004hhh|p=260}} While Dickinson was focused on his own music, guitarist Adrian Smith, who typically collaborated with the vocalist, was "left to [his] own devices" and began writing songs on his own, coming up with "Wasted Years", "Sea of Madness", and "[[Stranger in a Strange Land (Iron Maiden song)|Stranger in a Strange Land]]",{{sfn|Wall|2004iii|p=261}} the last of which would be the album's second single.{{sfn|Wall|2004jjj|p=260}} The album was the band's biggest American chart success to date, reaching No. 11 on the ''[[Billboard 200]]''{{sfn|Billboard}} and No. 2 in the UK charts. Album immediately reached Gold status in the UK and Platinum in the States where eventually went Double Platinum according to band's official biography "Run to the Hills".{{sfn|Wall|2004kkk|p=257}} The [[Somewhere on Tour]] production was the most ambitious to date. ''Somewhere in Time'' features "Caught Somewhere in Time" as an opening track, anthemic "Heaven Can wait" and progressive epic opus "Alexander the Great" crowning the album.{{sfn|SOT|2021}} Band used seven or eight 45 foot articulated trucks packed with over 100 tons of equipment, three crowd buses for 60 people and two nightliners for five musicians. The band – owned customised Turbosound system was probably the biggest in the world used indoors. Total power (PA and stage monitors) was estimated at 180,000 watts. The vast and flexible lighting rig held over 1100 lamps hanged over futuristic stage set including flying space ships, inflatable props, laser guns, pyrotechnics, hydraulic stands, backdrops and monumental Eddie's appearance.{{sfn|SOT|2021}}
[[Somewhere on Tour]] was a big success everywhere. Band played 157 shows to two and a half million of fans. 81 shows in North America were spectacular success and musicians booked the bigger indoor arenas and some stadiums too. Once again Iron Maiden visited Poland, Hungary and [[Yugoslavia]] to play for tens of thousands fans in each country.{{sfn|IMBio|2021}} Massive UK leg including six nights at Hammersmith Odeon was sold out in advance.{{sfn|SOT|2021}} In October 1987 Iron Maiden released ''[[12 Wasted Years]]'' video documentary, focusing on the history of the band from 1975 to 1987. It included several rare videos and interviews from the band's career, some of which were later included on the 2004 documentary ''[[The History of Iron Maiden – Part 1: The Early Days|The Early Days]]''. In March 2013, Iron Maiden included the full documentary in a reissue of their 1989 concert film, ''[[Maiden England]]''.{{sfn|12WY|2021}}
The experimentation evident on ''Somewhere in Time'' continued on their next album, ''[[Seventh Son of a Seventh Son]]'', which was released in 1988. A [[concept album]] recorded at [[Musicland Studios]] in Munich,{{sfn|Musiclands|2021}} based on the 1987 novel ''[[Seventh Son (novel)|Seventh Son]]'' by [[Orson Scott Card]],{{sfn|Popoff|2005(d)}} it was the band's first record to include keyboards, performed by Harris and Smith.{{sfn|Popoff|2005(d)}} After his contributions were not used for ''Somewhere in Time'', Dickinson's enthusiasm was renewed as his ideas were accepted for this album.{{sfn|Wall|2004lll|p=265}} Another popular release, it became Iron Maiden's second album to hit No. 1 in the UK charts,{{sfn|Wall|2004mmm|p=263}} and reached No. 12 on the ''[[Billboard 200]]'',{{sfn|Billboard}} initially it only achieved a Gold certification in the US, in contrast to its four predecessors.{{sfn|RIAA}} The album incorporated many progressive rock influences and brought four hit singles (Top 5 in the UK alone) such as "Can I Play with Madness", "Infinite Dreams", "The Evil That Men Do" and "The Clairvoyant", epic title track and expressive "Moonchild" or "Only the Good Die Young" inspired by [[Aleister Crowley]]'s works.{{sfn|77Album|2021}}{{sfn|DDotB|2021}}
After the blockbuster tour in North America, Iron Maiden were headliners of [[Monsters of Rock|Monsters of Rock festivals]] in Europe for the very first time. They headlined stadiums and festivals in [[UK]], [[Germany]], [[Netherlands]], [[Switzerland]], [[France]], [[Italy]], [[Spain]], [[Greece]], [[Czechoslovakia]] and [[Hungary]].{{sfn|MOR1988|2021}} During the following [[Seventh Tour of a Seventh Tour|tour]], the band headlined the [[Monsters of Rock]] festival at [[Donington Park]] for the first time on 20 August 1988, playing to the largest crowd in the festival's history, with an estimated 107,000 in attendance.{{sfn|Wall|2004nnn|p=269}} Also included on the bill were [[Kiss (band)|Kiss]], [[David Lee Roth]], [[Megadeth]], [[Guns N' Roses]], and [[Helloween]].{{sfn|UK Rock Festivals}} The festival was marred, however, by the deaths of two fans in a crowd-surge during Guns N' Roses' performance; the following year's festival was cancelled as a result.{{sfn|Wall|2004ooo|p=269}} The tour concluded with several headline shows in the UK in November and December 1988, with the concerts at the [[National Exhibition Centre|NEC Arena]], Birmingham recorded for a live video, entitled ''[[Maiden England]]''.{{sfn|Wall|2004ppp|p=272}}
To promote the album, the band hosted an evening of television, radio and press interviews at [[Attendorn#Schnellenberg Castle|Castle Schnellenberg]] in Attendorn, Germany prior to the record's release,<ref name="plucky seven" /> before holding a small number of "secret" club shows, under the name "Charlotte and the Harlots", at Empire, Cologne and [[L'amour (venue)|L'Amour]], New York.<ref name="qEsFh">{{cite journal|last=Smolden|first=Michael |title=Iron Maiden Plays the Numbers |journal=[[Guitar World]]|date=October 1988|pages=34|url=http://www.guitarworld.com/steve-harris-and-dave-murray-iron-maiden-open-1988-guitar-world-interview?page=0,0|access-date=5 January 2013}}</ref> In May, the group set out on a [[Seventh Tour of a Seventh Tour|supporting tour]] which saw them performing 103 shows to well over two million people worldwide over seven months.<ref name="plucky seven">{{cite journal |title= Plucky Seven |journal= [[Kerrang!]] |date= 16 April 1988 |first= Mick |last= Wall |author-link=Mick Wall| issue= 183 |page= 45}}</ref> To recreate the album's keyboards onstage, the group recruited Michael Kenney, Steve Harris' bass technician, to play the keys throughout the tour, during which he would perform the song "Seventh Son of a Seventh Son" on a forklift truck under the alias of "The Count" (for which he would wear a black cape and mask). Kenney has acted as the band's live keyboard player ever since, also performing on the band's four following albums before Harris took over as the group's sole studio keyboardist from 2000's ''[[Brave New World (Iron Maiden album)|Brave New World]]''.{{sfn|Gennet|2010}} Stage set and equipment which has been taken by band was transported in dozens of trucks and was the most elaborate to date and one of the biggest in the world including over 200,000 watts of PA and over 1,500 spot lamps.{{sfn|Gennet|2010}}<ref name="cgiUb">{{cite journal |title= Waiting for the (Seventh) Son |journal= [[Kerrang!]] |date= 20 August 1988 |first= Howard |last= Johnson |issue= 201 |page= 12}}</ref> Iron Maiden was included in the [[Guinness Book of World Records]] Museum for its performance at the Monsters of Rock festival in 1988.<ref name="fu0PB">Guinness Book of Records 1990 ed. p. 155.</ref><ref name="90kM4">{{cite web |url=https://stason.org/TULARC/music-bands/iron-maiden/26-Other-IRON-MAIDEN-tidbits.html |title= Music bands – Iron Maiden |publisher= stason.org |date= 2021-05-28 |access-date= 2021-05-28 |quote= Largest PA system: On Aug 20th 1988 at the Castle Donington 'Monsters of Rock' Festival a total of 360 Turbosound cabinets offering a potential 523kW of programme power, formed the largest front-of-house PA. The average Sound Pressure Level at the mixing tower was 118dB, peaking at a maximum of 124dB during Iron Maiden's set. It took five days to set up the system.}}</ref>
===Upheaval (1989–1994)===
{{main|No Prayer for the Dying|Fear of the Dark (Iron Maiden album)}}
During another break in 1989, guitarist Adrian Smith released a solo album with his band [[ASAP (band)|ASAP]], entitled ''[[Silver and Gold (ASAP album)|Silver and Gold]].''{{sfn|Wall|2004rrr|p=273}} Vocalist Bruce Dickinson began work on a solo album with former [[Gillan (band)|Gillan]] guitarist [[Janick Gers]], releasing ''[[Tattooed Millionaire]]'' in 1990,{{sfn|Wall|2004sss|p=281}} followed by a tour.{{sfn|Wall|2004axx|p=285}} At the same time, to mark the band's ten-year recording anniversary, Iron Maiden released a compilation collection, ''[[The First Ten Years (boxed set)|The First Ten Years]]'', a series of ten CDs and double [[12-inch single]]s. Between 24 February and 28 April 1990, the individual parts were released one-by-one, each containing two of Iron Maiden's singles, including the original B-sides.{{sfn|DDotB|2021}} Band also released the career spanning video compilation entitled ''[[The First Ten Years: The Videos]]''{{sfn|F10YV|2021}} in 1992 re-issued as ''[[The First Ten Years: The Videos|From There to Eternity]]''.{{sfn|FHTEV|2021}} The 1980s were closed by the group with over 25 million albums sold, of which 10 million in America, over five million videos were sold only in the US, which gave Iron Maiden six of 120 Gold and Platinum certificates received worldwide. ''The Number of the Beast'' became the band's best selling album achieving sales result of six million copies in eight years since its publication.{{sfn|Wall|2004asa|pp=234–244}} All the achievements sealed the group's status as the largest representative of the heavy metal genre those days.{{sfn|LouderSound|2021}} Musicians set new records in the UK: six Top 5 singles in the Top 5, 10 double maxi-singles in the Top 10, the highest position ever for a debut single from a rock band, the most albums in the Top 10 for a British performer, excluding [[The Rolling Stones]], [[The Beatles]] and [[Queen (band)|Queen]], 20 singles consecutively released on the charts.{{sfn|Recap80|2021}}{{sfn|Rodriguez|2020aa|pp=291–295}}
Soon afterwards, Iron Maiden regrouped to work on a new studio record. During the pre-production stages, Adrian Smith left the band due to differences with Steve Harris, regarding the direction the band should be taking, disagreeing with the "stripped down" style that they were leaning towards.{{sfn|Wall|2004ttt|p=283}} Janick Gers, having worked on Dickinson's solo project, was chosen to replace Smith, and became the band's first new member in seven years.{{sfn|Wall|2004uuu|p=285}} The album, ''[[No Prayer for the Dying]]'', was released in October 1990.{{sfn|Prato}} It contained hit singles as "[[Holy Smoke (song)|Holy Smoke]]" and "[[Bring Your Daughter... to the Slaughter]]", the band's first (and to date, only) [[UK Singles Chart]] No. 1, originally recorded by Dickinson's solo outfit for the soundtrack to ''[[A Nightmare on Elm Street 5: The Dream Child]]''.{{sfn|Wall|2004www|p=282}} The song was banned by the BBC and only a 90-second live clip on Top of the Pops was shown. In 1990 Bruce Dickinson received the [[Golden Raspberry Awards]] in category "The Worst Original Song" for the band's most successful single in Great Britain.{{sfn|Razzie1990|2021}} Dickinson's composition was nominated to an [[American Music Award]] in category "Best Rock Song".{{sfn|AME|2022}} In 1992 "[[Bring Your Daughter... to the Slaughter]]" received another nomination to [[Brit Awards]] in category "Best British Single".{{sfn|Brit92|2022}} Iron Maiden's nine studio album debuted at No. 2 in the UK albums chart{{sfn|Wall|2004vvv|p=282}} and No. 17 on the ''[[Billboard 200]]''.{{sfn|Billboard}} ''No Prayer for the Dying'' signalled the return of Iron Maiden to the roots of theirs musical style, in particular in its simplicity of composition and raw sound.{{sfn|NPftD|2021}}{{sfn|DDotB|2021}}{{sfn|Wall|2004zzz|p=283}}
[[No Prayer on the Road]] tour was booked for 120 shows in Europe, North America and Japan. The main support act for Iron Maiden were an American thrash metal band [[Anthrax (American band)|Anthrax]]. Tour's started with 20 dates in British music theatres and was continued in European and American arenas. 33 shows in continental Europe were sold out to 530,000 fans.{{sfn|1990EU|2021}} In 1991 Iron Maiden played North America, Japan and outdoors in France, Denmark and Switzerland. For the first time band headlined [[Roskilde Festival]] for 60,000 fans.{{sfn|DDotB|2021}} Following large-scale stage shows band have played in the '80s, musicians opted for a less elaborate production including only mobile and the big [[Eddie the Head|Eddie]], traditional lighting rig and large backdrops. Once again Iron Maiden played for some two million fans.{{sfn|Wall|2004ab|p=287}}{{sfn|1990EU|2021}}
After another extensive tour and some more time off, the band recorded their next studio album, ''[[Fear of the Dark (Iron Maiden album)|Fear of the Dark]]'', which was released in 1992. The title track is now a regular fixture in the band's concert setlists. Achieving their third No. 1 in the UK albums chart and No. 12 on the ''[[Billboard 200]]'',{{sfn|Billboard}}{{sfn|Wall|2004ac|p=289}} the release also included the No. 2 single "[[Be Quick or Be Dead]]", the No. 21 single "[[From Here to Eternity (Iron Maiden song)|From Here to Eternity]]", "[[Wasting Love]]" and pacifistic anthem "Afraid to Shoot Strangers" based on [[Gulf War]] 1991.{{sfn|Wall|2004ad|pp=288–290}} The album featured the first songwriting by Gers, and no collaboration at all between Harris and Dickinson on songs. The [[Fear of the Dark Tour|extensive worldwide tour that followed]] included their first ever Latin American leg (12 stadium and arena shows after a single concert during the World Slavery Tour), and headlining the [[Monsters of Rock]] festivals in seven European countries: UK, Germany, Spain, France, Italy, Switzerland and Sweden.{{sfn|MOR1992|2021}} Iron Maiden's second performance at [[Donington Park]], to sold-out audience of 75,000 (the attendance was capped after the incident in 1988),{{sfn|FotDCDROM|2021}}{{sfn|Wall|2004ae|p=291}} was filmed for the audio and video release ''[[Live at Donington (Iron Maiden album)|Live at Donington]]'', and featured a guest appearance by Adrian Smith, who joined the band to perform "Running Free".{{sfn|Wall|2004af|p=291}} Christian organisations prevented Iron Maiden from performing in Chile and accused musicians of being "emissaries of satanic propaganda".{{sfn|Brave Words & Bloody Knuckles|2011(2)}}
[[Fear of the Dark Tour|Fear of the Dark Tour 1992]] included 66 concerts played on five continents for well over a million fans. The band presented a powerful and elaborated lighting rig (over 1000 lamps and lasers) and scenery partly reminiscent of the 1980s. The setting of the Monsters of Rock concerts was completed by the huge Eddie crowning the stage and screens. Iron Maiden made their first appearance in [[Iceland]] and returned to Oceania after a seven-year hiatus. The tour in Japan was the largest in the history of the group. The tour witnessed the personal conflicts between Bruce Dickinson and rest of the band.{{sfn|DDotB|2021}}{{sfn|DarkEra|2021}}
In 1993, Bruce Dickinson left the band to further pursue his solo career, but agreed to remain for a [[Real Live Tour|farewell tour]] and two live albums (later re-released in [[A Real Live Dead One|one package]]).{{sfn|Wall|2004ag|p=293}} The first, ''[[A Real Live One]]'', featured songs from 1986 to 1992, and was released in March 1993. The second, ''[[A Real Dead One]]'', featured songs from 1980 to 1984, and was released after Dickinson had left the band. The tour did not go well, with Steve Harris claiming that Dickinson would only perform properly for high-profile shows, and that at several concerts, he would only mumble into the microphone.{{sfn|Wall|2004ah|p=296}} Dickinson denied that he was under-performing, stating that it was impossible to "make like Mr Happy Face if the vibe wasn't right", and that news of his exit from the band had prevented any chance of a good atmosphere during the tour.{{sfn|Wall|2004ai|p=297}} On May 1, 1993 the band performed at the "Primo Maggio Free Festival" in Rome, Piazza San Giovanni. According to different sources the crowd was estimated between 500,000 and one million people.{{sfn|Primo1|2021}}{{sfn|Primo2|2021}} The band toured an extensive Italian leg and visited Russia for the very first time, playing three consecutive nights at Moscow's [[Olympic Stadium (Moscow)|Olympic Stadium]].{{sfn|MOR1992|2021}} Bruce Dickinson played his farewell show with Iron Maiden on August 28, 1993. The show was filmed, broadcast by the [[BBC]], and released on video under the name ''[[Raising Hell (video)|Raising Hell]]''.{{sfn|Wall|2004ai|p=298}}
===Blaze Bayley era, ''The X Factor'' and ''Virtual XI'' (1994–1999)===
{{main|The X Factor (album)|Virtual XI}}
[[File:Blaze Bayley Eternal Flame.jpg|thumb|Blaze Bayley, Iron Maiden frontman from 1994 to 1998]]
In 1994 title track from ''[[Fear of the Dark (Iron Maiden album)|Fear of the Dark]]'' album received nomination for an American music award [[Grammy|Grammy Awards]] in category "Best Metal Performance". It happened for the very first time in band's history.{{sfn|Grammy1994|2021}} Since May 1976 Iron Maiden has played over 1400 shows for a combined audience estimated at more than 20 million fans worldwide, on five continents, a record-breaking achievement for a heavy metal band.{{sfn|Attendance1994|2021}} The band listened to hundreds of tapes sent in by vocalists before convincing [[Blaze Bayley]], formerly of the band [[Wolfsbane (band)|Wolfsbane]], who had supported Iron Maiden in 1990, to audition for them.{{sfn|Wall|2004aj|p=301}} Harris' preferred choice from the outset,{{sfn|Wall|2004ak|p=302}} Bayley had a different vocal style from his predecessor and ultimately received a mixed reception among fans.{{sfn|Stagno|2006(b)}}
After a three-year hiatus from studio releases – a record for the band at the time - Iron Maiden returned in 1995. Releasing their next studio album, ''[[The X Factor (album)|The X Factor]]'', the band had their lowest chart position since 1981 for an album in the UK (debuting at No. 8),.{{sfn|Wall|2004al|p=313}} The album would go on to win ''Album of the Year'' awards in France, Spain and Germany.{{sfn|Wall|2004am|p=311}} After more than ten years of the Iron Maiden's constant domination in the readers' polls of [[Kerrang!]] magazine, band's founder Steve Harris received the prestigious ''Kerrang Kreativity Award''.{{sfn|KreativityAward|2021}} The record included the 11-minute epic "Sign of the Cross", the band's longest song since "Rime of the Ancient Mariner", as well as the singles "[[Man on the Edge]]" (based on the film ''[[Falling Down]]''),{{sfn|Paterson|2009|p=44}} and "[[Lord of the Flies (song)|Lord of the Flies]]", based on the [[Lord of the Flies|novel of the same name]].{{sfn|Popoff|2005(b)}} The release is notable for its "dark" tone, inspired by Steve Harris' divorce.{{sfn|Wall|2004an|p=311}} [[The X Factour|The band toured]] for the rest of 1995 and 1996, playing for the first time in Israel and South Africa, Malta, Bulgaria, Romania in Europe and ending in the [[Americas]]. The biggest show of the whole tour was a headline appearance for 60,000 people at the [[Monsters of Rock]] festival in São Paulo, Brazil.{{sfn|Wall|2004ao|p=314}}
Generally Iron Maiden booked smaller venues including clubs, theatres and mid-size arenas, especially in the States. The band played in stadiums and large arenas in South America and resurged with mainstream popularity in Greece. The stage production was smaller than previous years but included many elements Iron Maiden were famous for: two Eddies, mobile lighting rig, conceptual stage set or backdrops. The tenth studio album sold in 1.3 million copies, the lowest sales result since 1981.{{sfn|Wall|2004ap|p=315}} After the tour, Iron Maiden released a compilation album, ''[[Best of the Beast]]''. The band's first compilation, it included a new single, "[[Virus (Iron Maiden song)|Virus]]", in which the lyrics attack the critics, who had recently written off the band. Initially the musicians planned to release a video compilation but quit, due to the unsatisfying quality of available video remastering.{{sfn|Wall|2004ar|p=316}}
In 1998 Iron Maiden released ''[[Virtual XI]]'', whose chart scores were the band's lowest to date, failing to score one million worldwide sales for the first time in the band's history.{{sfn|Stagno|2006(a)}}{{sfn|Sverigetopplistan}} The album peaked at No. 16 in the UK; the band's lowest for a new studio record.{{sfn|Official Charts Company|1998}} At the same time, Steve Harris assisted in remastering the band's entire discography, up to and including ''Live at Donington'' (which was given a mainstream release for the first time). ''Virtual XI'' features the singles "[[The Angel and the Gambler]]" and "[[Futureal]]", as well as epic opus entitled "Clansman" and the power ballad "Como Estais Amigos" dedicated to all people who died in [[Falklands War]].{{sfn|Saulnier|2010}} "Futureal" stood for two weeks at the first position on US Metal Radio charts.{{sfn|Wall|2004ass|pp=335-337}}{{sfn|MRUS|1998}}
Prior to the album's release, the band organised a publicity tour in which they held football matches in different European countries with some guest musicians and pro-footballers from the UK and Europe.{{sfn|Paterson|2021|p=72}} Following the more "back to the basic" stage sets that they had been using following 1988's [[Seventh Tour of a Seventh Tour]], they returned to a conception of an elaborate stage set.{{sfn|Paterson|2021|pp=75–76}} The musicians and management stated [[Virtual XI World Tour]] would bring a "massive show, with huge production, including stadium-levelling amounts of pyro". They also announced the participation of Dave Lights, who did their lighting and effects in the 1980s. Management booked more mid–size arenas and stadiums in Latin America, including a headline show at the [[Monsters of Rock]] festival in Buenos Aires, Argentina as the final show of the tour.{{sfn|VXI|2021}} Finally, the band used bigger backdrops, more elaborate lighting rigs, a conceptual stage set and an inflatable Eddie's head and hands which embraced both sides of the stage. Fans didn't see pyrotechnics and the kind of production comparable with ‘80s monumental stage sets as it was previously announced. The tour was a big disappointment, both to musicians and the fans.{{sfn|1998Prod|2021}}
Bayley's tenure in Iron Maiden ended in January 1999 when he was asked to leave during a band meeting.{{sfn|Wall|2004as|p=324}} The dismissal took place due to issues Bayley had experienced with his voice during the [[Virtual XI World Tour]],{{sfn|Wall|2004at|p=321}} although Janick Gers stated that this was partly the band's fault for forcing him to perform songs pitched outside the natural range of his voice.{{sfn|Brave Words & Bloody Knuckles|2010}}
===Return of Dickinson and Smith, ''Brave New World'' (1999–2002)===
{{main|Ed Hunter|Brave New World (Iron Maiden album)}}
[[File:Iron Maiden en Costa Rica.jpg|thumb|Adrian Smith (left) re-joined Iron Maiden in 1999, resulting in a three–guitar line-up.]]
While the group were considering a replacement for Bayley, Rod Smallwood convinced Steve Harris to invite Bruce Dickinson back into the band.{{sfn|Wall|2004au|p=328}} Although Harris admitted that he "wasn't really into it" at first, he then thought, "'Well, if the change happens, who should we get?' The thing is, we know Bruce and we know what he's capable of, and you think, 'Well, better the devil you know.' I mean, we got on well professionally for, like, eleven years, and so ... after I thought about it, I didn't really have a problem with it."{{sfn|Wall|2004aw|p=328}}
The band entered into talks with Dickinson, who agreed to rejoin during a meeting in Brighton in January 1999,{{sfn|Wall|2004av|p=329}} along with guitarist Adrian Smith, who was telephoned a few hours later.{{sfn|Wall|2004az|p=330}} With Gers, Smith's replacement, remaining, Iron Maiden now had a three-guitar line-up (called "The Three Amigos"), and embarked on a hugely successful reunion tour.{{sfn|Wall|2004a1|p=331}} Dubbed [[The Ed Hunter Tour]], it tied in with the band's newly released greatest hits collection, ''[[Ed Hunter]]'', whose track listing was decided by a poll on the group's website, and also contained a computer game of the same name starring [[Eddie (mascot)|the band's mascot]].{{sfn|Adams}} The 1999 reunion tour was the biggest enterprise in terms of production since [[Fear of the Dark Tour|Fear of the Dark Tour 1992]]. The band visited North America and several European countries to present the conceptual show inspired by scenes from the game. Iron Maiden used a two-part stage related to graphics from the promoted game, three movable screens surrounded by light ramps, projectors, huge backdrops, pyrotechnics (for the first time since 1988), colourful props, visuals and two types of Eddie in the version known from the game. The equipment travelled in seven huge trucks.{{sfn|DDotB|2021}}
One of Dickinson's primary concerns on rejoining the group "was whether we would in fact be making a real state-of-the-art record and not just a comeback album,"{{sfn|Wall|2004a3|p=328}} which eventually took the form of 2000's ''[[Brave New World (Iron Maiden album)|Brave New World]]''.{{sfn|Wall|2004a4|p=341}} Having disliked the results from Harris' personal studio, Barnyard Studios located on his property in Essex,{{sfn|Berelian|2000}} which had been used for the last four Iron Maiden studio albums, the band recorded the new release at Guillaume Tell Studios in Paris, France in November 1999 with producer [[Kevin Shirley]].{{sfn|Wall|2004a5|p=341}} New release was promoted by two singles "[[The Wicker Man (song)|The Wicker Man]]" and "[[Out of the Silent Planet (song)|Out of the Silent Planet]]", both of them achieving success on the UK singles chart.{{sfn|Wall|2004a6|pp=341–343}} Thematic influences continued with "The Wicker Man" – based on the 1973 British [[The Wicker Man (1973 film)|cult film of the same name]] – and "Brave New World" – a title taken from the [[Aldous Huxley]] [[Brave New World|novel of the same name]].{{sfn|Wall|2004a7|p=342}} The album furthered the more progressive and melodic sound present in some earlier recordings, with elaborate song structures and keyboard orchestration.{{sfn|Wall|2004a8|p=342}} The album was a commercial and an artistic success and is considered a modern classic alongside the band's releases from the '80s. ''Brave New World'' charted at No. 7 in the [[UK Album Charts]] and No. 39 on the ''[[Billboard 200]]'' and Top 5 in many other territories, and eventually went Gold and Platinum in a dozen other countries worldwide. The album re-established the band as a "metal powerhouse".{{sfn|Wall|2004axx|pp=342–344}}{{sfn|DDotB|2021}}<ref>{{Cite web|last=Ruskell|first=Nick|date=Mar 2, 2020|title=Iron Maiden: The story behind Brave New World and Bruce's return to the band|url=https://www.kerrang.com/the-story-behind-brave-new-world-by-iron-maiden|access-date=2022-02-10|website=Kerrang!|language=en}}</ref>
[[Brave New World Tour|The reunion world tour]] that followed consisted of well over 100 dates (including 31 shows of the 1999 tour), and culminated on 19 January 2001 in a show at the [[Rock in Rio]] festival in Brazil, where Iron Maiden played to an audience of over 250,000.{{sfnm|1a1=Wall|1y=2004a9|1p=353|2a1=Shooman|2y=2007a10|2p=176|3a1=Sanctuary|3y=2002a11|4a1=Martins|4y=2002a12}} While the performance was being produced for a CD and a highly successful DVD release in March 2002, under the name ''[[Rock in Rio (album)|Rock in Rio]]'',{{sfn|Wall|2004a13|p=357}} the band took a year off from touring, during which they played three consecutive shows at [[Brixton Academy]] in aid of former drummer [[Clive Burr]], who had recently announced that he had been diagnosed with [[multiple sclerosis]].{{sfn|Wall|2004a14|p=361}} The band performed two further concerts for Burr's MS Trust Fund charity in 2005,{{sfn|Blabbermouth.net|2005c}} and 2007,{{sfn|Blabbermouth.net|2007c}} before his death in 2013.{{sfn|BBC News|2013}}
During the 2000–2002 tour, Iron Maiden played 91 shows for over two million people in 33 countries. The band visited big arenas, stadiums and performed at the biggest festivals.{{Sfn|NewTour|2021}} The world tour dubbed "Metal 2000 Tour" was a great undertaking, the main aim of which was to restore the concert glory of the band from the '80s. Iron Maiden used a huge lighting rig with moving parts and 600 lamps, pyrotechnics, a walking Eddie and a large wicker Eddie with dancers in the center, a burning cross lifting Bruce Dickinson up, alongside backdrops and conceptual scenery related to the ''Brave New World'' album cover illustration.{{sfn|Metal2000Tour|2021}} In addition to their touring success, the band were nominated twice for the annual [[Grammy Awards]]{{sfn|Grammy2001|2021}} and received the International Achievement Award at the 2001 [[Ivor Novello Awards]], in recognition of Maiden's reign as one of Great Britain's biggest musical exports{{sfn|IvorNovello|2021}} Iron Maiden was hailed as the most successful British metal group on [[Channel 4 (British Television Station)|British Channel 4]], and ''The Number of the Beast'' album was included in the prestigious [[Eagle Vision (company)|Eagle Vision]]'s "Classic Albums" series.{{sfn|DDotB|2021}} In 2001 the band won a gong at the ''Online Music Awards Germany'' in the category, "Best Artist Website".{{sfn|Online Music Awards|2021}}
In November 2002, Iron Maiden released their third "best of" compilation ''[[Edward the Great]]'', and a limited edition of a very special collector's metal casket entitled ''[[Eddie's Archive]]''. The special box included three double CDs: ''[[BBC Archives (album)|BBC Archives]]'', ''[[Beast over Hammersmith]]'' and ''[[Best of the 'B' Sides]]'' with unique live recordings from Reading Festivals 1980 and 1982, Donington's Monsters of Rock Festival 1988, BBC Rock Friday 1979, songs from B-sides of particular singles and a live recording of London's Hammersmith Odeon 1982 in its entirety. As special fan souvenir, the box included a parchment scroll with the band's family tree (by Pete Frame), a customised [[shot glass]] and a metal ring.{{sfn|Wall|2004a15|pp=364–365}}
===''Dance of Death'' and ''A Matter of Life and Death'' (2003–2007)===
{{main|Dance of Death (album)|A Matter of Life and Death (album)}}
In June 2003 Iron Maiden released a double DVD promo-video compilation entitled ''[[Visions of the Beast]],'' which went multi-platinum worldwide. At the same period, the band began a promotional tour for the new DVD and forthcoming album.{{sfn|VOTB|2021}} The summer leg of the tour's run was entitled the [[Give Me Ed... 'Til I'm Dead Tour]] and included 57 shows in Europe and North America. They played indoor arenas, stadiums, American amphitheaters and headlined large festivals such as Roskilde, Heineken Jammin' Festival, [[Rock am Ring and Rock im Park]] (combined attendance of 130,000) and the first [[Download Festival]] held at [[Donington Park]] as a successor to Monsters of Rock.{{sfn|GMET|2021}} The Spanish leg of the 2003 tour spanned nine shows, with 160,000 fans in attendance. This was the most successful attendance record for the band in that territory in band's career. 28 more shows were played in Europe to 720,000 fans and Iron Maiden visited the US and Canada to play 29 shows for the hundreds of thousands of people. Fans were treated to classic material, alongside the brand new song "[[Wildest Dreams (Iron Maiden song)|Wildest Dreams]]", the first promotional single from the forthcoming studio album.{{sfn|2003-04|2021}} The tour was another visual attraction, the stage set and theme referring to the most popular incarnations of Eddie along with all the lighting effects and pyrotechnics fans had come to expect. There was also a public lobotomy of the group's mascot taking place during the song "Iron Maiden".{{sfn|DDotB|2021}}
Following their [[Give Me Ed... 'Til I'm Dead Tour]] in the summer of 2003, Iron Maiden released ''[[Dance of Death (album)|Dance of Death]]'', their thirteenth studio album, which was met with worldwide critical and commercial success. The album reached No. 2 on the UK Albums Chart{{sfn|Wall|2004a16|p=368}} and No. 18 on the ''[[Billboard 200]]''.{{sfn|Billboard}} Produced by Kevin Shirley, now the band's regular producer, many critics felt that this release matched up to their earlier efforts, such as ''Killers'', ''Piece of Mind'' and ''The Number of the Beast''.{{sfn|Wall|2004a17|p=369}} As usual, historical, and literary references were present, with "Montségur" in particular, focussing on the [[Catharism|Cathar]] stronghold conquered in 1244,{{sfn|Wall|2004a18|p=373}} and "Paschendale" relating to [[Battle of Passchendaele|the significant battle]] which took place during [[World War I|the First World War]].{{sfn|Wall|2004a19|p=375}} The album features the successful singles "[[Wildest Dreams (Iron Maiden song)|Wildest Dreams]]" and "[[Rainmaker (Iron Maiden song)|Rainmaker]]", alongside the epic title track and live favourite "[[No More Lies (Iron Maiden song)|No More Lies]]". No More Lies was released as an EP on 29 March 2004 and featured the track alongsided an orchestral version of Paschendale and an 'electric' version of the song "Journeyman". "Journeyman", a departure for the band, featured on the album as a mostly acoustic ballad, something that had not been attempted since the song "Prodigal Son" had appeared on "Killers" in 1982. The album also touted the first ever song composed by drummer Nicko McBrain entitled "The New Frontier". The band recorded the album at London's [[Sarm West Studios]] which they used again for the following album in 2006.{{sfn|Wall|2004a20|pp=369–371}}
[[Dance of Death Tour|The Dance of Death Tour 2003–04]] began in September 2003 and was the band's most theatrical tour to date. The stage portrayed a medieval castle with an opening gates, [[Grim Reaper]] statues on either side of the stage, large towers, and two versions of Eddie as the ominous Grim Reaper character.{{sfn|DDotB|2021}} Bruce Dickinson used many props and costumes, such as a sinister black coat, carnival masks, a throne, and a [[World War I]] uniform and helmet. During the performance of "Paschendale", fans witnessed the stage being transformed into a battlefield, with deceased soldier mannequins, trenches, barbed wire and barricades, and the lighting system imitating flashes of explosions that echoed through the powerful sound system. Iron Maiden played 53 shows visiting European indoor arenas, North America, Latin American stadiums and Japan.{{sfn|2003-04|2021}} During the tour, members of the band took a part in charity football events called Music Soccer Six. In 2004 Iron Maiden received the Special Achievement Award at the [[Nordoff-Robbins music therapy|Nordoff-Robbins Silver Clef]] awards.{{sfn|Nordoff-Robbins|2021}} During the album tour, the band's performance at [[Westfalenhalle]], in Dortmund, Germany, was recorded and released in August 2005 as a live album and DVD, entitled ''[[Death on the Road]]''.{{sfn|Blabbermouth.net|2005a}}
In 2005, the band announced the [[Eddie Rips Up the World Tour]], which, tying in with their 2004 DVD entitled ''[[The History of Iron Maiden – Part 1: The Early Days]]'', only featured material from their first four albums and was the first of three retrospective tours in the "History of Iron Maiden" series referring to the '80s.{{sfn|Blabbermouth.net|2005b}} As part of this celebration of their earlier years, "The Number of the Beast" single was re-released{{sfn|Blabbermouth.net|2004d}} and went straight to No. 3 in the UK Chart.{{sfn|Official Charts Company|2005}} The tour included many headlining stadium and festival dates, including a performance at [[Ullevi Stadium]] in Sweden to an audience of almost 60,000.{{sfn|Metal Underground|2004}} This concert was also broadcast live on satellite television all over Europe to approximately 60 million viewers.{{sfn|Metal Underground|2005}} The tour was the first step in transforming the reborn Iron Maiden into a stadium-size band. The stage production was larger than ever before and reflected the visual elements from the tours promoting the group's first four albums. The band used more backdrops, several incarnations of Eddie, and a more powerful lighting rig with triangular ramps, trusses and pyrotechnics.{{sfn|DDotB|2021}}
Following this run of European shows, the band co-headlined the US festival tour, [[Ozzfest]], with [[Black Sabbath]]. An average Ozzfest concert attendance was estimated at 30,000 people. The San Bernardino show before 50,000 fans earned international press coverage after it was sabotaged by singer [[Ozzy Osbourne]]'s family, who took offence to Dickinson's remarks about reality television, in what became known as ''The Eggfest Incident''.{{sfnm|1a1=KNAC|1y=2005|2a1=Sullivan|2y=2005}} The band completed the tour by headlining the [[Reading and Leeds Festivals]] on 26–28 August,{{sfnm|1a1=NME|1y=2005|2a1=Williams|2y=2005}} and the [[RDS Arena|RDS Stadium]] in Ireland on 31 August. For the second time, the band played a charity show for The Clive Burr MS Trust Fund, which took place at the [[Hammersmith Apollo]].{{sfn|Blabbermouth.net|2005c}} That same year, the band were inducted into the [[Guitar Center#Hollywood's RockWalk|Hollywood RockWalk]] on [[Sunset Boulevard]], Los Angeles.<ref name="gtYmH">{{cite news |title=Iron Maiden to join Rock Walk Of Fame|url=https://www.nme.com/news/music/iron-maiden-104-1360008 |access-date=13 April 2020 |work=NME}}</ref> In the same period, Iron Maiden were inducted into the ''Kerrang! Hall of Fame''.{{sfn|KerrangHoF|2021}}
[[File:Bruce Dickinson and Eddie 30nov2006.jpg|thumb|left|upright=1.2|Vocalist [[Bruce Dickinson]] during A Matter of Life and Death World Tour. Throughout the tour's first leg, the band played the ''A Matter of Life and Death'' album in its entirety.]]
At the end of 2005, Iron Maiden began work on ''[[A Matter of Life and Death (album)|A Matter of Life and Death]]'', their fourteenth studio album, released in autumn 2006. While not a concept album,{{sfn|Blabbermouth.net|2006}} war and religion are recurring themes in the lyrics, as well as in the cover artwork. The release was a critical and commercial success, earning the band their first top ten on the [[Billboard 200|''Billboard'' 200]] and debuting at number one in the album charts of 13 countries{{sfn|Billboard|2006}}{{sfn|DDotB|2021}} The new effort featured the singles, "[[Different World (Iron Maiden song)|Different World]]" and "[[The Reincarnation of Benjamin Breeg]]", but the album itself grabbed critical attention for its focus on dark themes and reflections on the futility of war. It was also noted for progressive compositions such as "Brighter Than a Thousand Suns", "The Longest Day", "For the Greater Good of God" and "The Legacy".{{sfn|AMOLADalbum|2021}} Among many accolades, Maiden's fourteenth album received the Album of the Year award at the 2006 [[Classic Rock (magazine)|''Classic Rock'' Roll of Honour Awards]].{{sfn|Blabbermouth.net|2006b}}
A [[A Matter of Life and Death Tour|supporting tour]] followed, during which they played the album in its entirety; response to this was mixed. Iron Maiden played in North America, Japan and Europe selling out indoor arenas everywhere. They played multiple shows in venues such as the [[Earls Court Exhibition Centre]] in London, [[Forum di Assago]] in Milano, and [[Globen Arena]] in Stockholm or [[Hartwall Arena]] in Helsinki.{{sfn|AMOLADTOUR|2021}}{{sfnm|1a1=Vincentelli|1y=2006|2a1=Evening Times|2y=2006}} The setting of the 2006–07 tour was an extension of the ideas accompanying the presentation of the song "Paschendale" from the Dance of Death tour. The stage set resembled a battlefield fortification featuring sand bags, barricades, trenches and the like. Movable light ramps were covered with camouflage netting and khaki fabric. There were also uniformed paratrooper mannequins woven into the scene. Additional lighting was also used, and at the climax of the show, the set turned into a huge moving tank.{{sfn|DDotB|2021}}{{sfn|AMOLADTour200607|2021}}
[[File:A Matter of Life and Death Tour.jpg|thumb|right|Iron Maiden militarian stage set presented on A Matter of Life and Death World Tour]]
The second part of the "A Matter of Life and Death" tour, which took place in 2007, was dubbed "A Matter of the Beast" to celebrate the 25th anniversary of ''The Number of the Beast'' album's release, and included appearances at several major festivals and stadiums worldwide.{{sfn|Blabbermouth.net|2007b}} The tour opened in the Middle East with the band's first ever performance in Dubai at the [[Dubai Desert Rock Festival]] for 25,000 people,{{sfn|Blabbermouth.net|2007a}} after which they played to over 40,000 people at the [[Bangalore Palace]] Grounds,{{sfn|Vulliamy|2007}} marking the first concert by any major heavy metal band in the Indian sub-continent.{{sfn|Blabbermouth.net|2007a}}
The band went on to play a string of European dates, including an appearance at [[Download Festival]], their fourth headline performance at [[Donington Park]],{{sfn|Metal Underground|2007}} to approximately 80,000 people.{{sfn|Blabbermouth.net|2007d}} Iron Maiden performed at [[Olympic Stadium (Rome)]] in Rome, [[Bazaly Stadium]] in Ostrava, [[Lokomotiv Stadium (Sofia)|Lokomotiv Stadium]] in Sofia, [[Sudweststadion]] in Ludwigshafen, Fair Arena in Belgrade, Bezigrad Stadion in Ljubjana, and played shows in the big indoor arenas of Düsseldorf and Athens. Finally, the band headlined the BBK Live Festival in Bilbao, [[Graspop Metal Meeting]] in Dessel, [[Fields of Rock|Fields of Rock Festival]] in Biddinghuizen, and the [[Heineken Jammin Festival]] in [[Venice]].{{sfn|AMOLADTour200607|2021}} On 24 June they ended the tour with a performance at London's [[Brixton Academy]] in aid of The Clive Burr [[multiple sclerosis|MS]] Trust fund.{{sfn|Blabbermouth.net|2007c}}
The four consecutive world tours, two successful studio albums and three DVD releases cemented Iron Maiden's status as the one of the most relevant and successful metal bands in the world. During the period of 2003–2007, Iron Maiden released two studio albums and played 215 shows to combined audience estimated at five million people.{{sfn|DDotB|2021}}
===Somewhere Back in Time World Tour and ''Flight 666'' (2007–2009)===
{{main|Somewhere Back in Time World Tour|Iron Maiden: Flight 666}}
[[File:Iron Maiden 47f b.jpg|thumb|left|Somewhere Back in Time World Tour was one of the most important in Iron Maiden career]]
On 5 September 2007, the band announced their [[Somewhere Back in Time World Tour]], which tied in with the DVD release of their ''Live After Death'' album.{{sfn|Lane|2007}} The setlist for the tour consisted of successes from the 1980s, with a specific emphasis on the ''Powerslave'' era for set design.{{sfn|Lane|2007}} The first part of the tour, commencing in Mumbai, India on 1 February 2008, consisted of 24 concerts in 21 cities, travelling nearly 50,000 miles in the band's own chartered aeroplane,{{sfn|Metal Storm|2007}} named "Ed Force One".{{sfn|Cashmere|2008}} They played their first ever concerts in Costa Rica and Colombia and their first shows in Australia and Puerto Rico since 1992.{{citation needed|date=October 2021}}
The tour led to the release of a new compilation album, entitled ''[[Somewhere Back in Time]]'', which included a selection of tracks from their 1980 eponymous debut to 1988's ''Seventh Son of a Seventh Son'', as well as several live versions from ''Live After Death''.{{sfn|Lane|2008}} The tour turned out to be the biggest concert undertaking in the group's history so far. Iron Maiden have performed in huge stadiums and arenas in every corner of the world. Only seven concerts in [[Scandinavia]] saw over 250,000 viewers gathered at such venues as [[Ullevi Stadion]], [[Helsinki Olympic Stadium|Olympiastadion]] in Stockholm and Helsinki, [[Ratina Stadion]] in Finland and [[Valle Hovin]] in Oslo. According to [[Live Nation (events promoter)|Live Nation Scandinavia]], the band attracted the largest audience ever for a rock artist in this region of Europe. In 2008–09 in Latin America, the musicians gave as many as 27 concerts for about a million people in total. It was a record for a heavy rock performer.{{sfn|DDotB|2021}}{{sfn|SBiTTour|2021}}
The Somewhere Back in Time World Tour continued with two further legs in the US and Europe in the summer of 2008, during which the band used a more expansive stage-set, including further elements of the original ''Live After Death'' show.{{sfn|Sputnikmusic|2008}} With the sole UK concert taking place at [[Twickenham Stadium]], this would be the first time the band would headline a stadium in their own country.{{sfn|Thrash Hits|2007}} The three 2008 legs of the tour were remarkably successful; it was the second highest-grossing tour of the year for a British artist.{{sfn|Khan|2009}}
[[File:Iron Maiden - Twickenham London - 050708.jpg|thumb|right|upright=1.2|Iron Maiden performing in Toronto during the Somewhere Back in Time World Tour 2008. The stage set largely emulated that of the World Slavery Tour 1984–85.{{sfn|Lane|2007}}]]
The last part of the tour took place in February and March 2009, with the band, once again, using "Ed Force One".{{sfn|Bezer|2008}} The final leg included the band's first ever appearances in Peru and Ecuador, as well as their return to Venezuela and New Zealand after 17 years.{{sfn|Soto|2008}} The band also played another show in India (their third in the country within a span of 2 years) at the [[Rock in India]] festival to a crowd of 20,000. At their concert in São Paulo on 15 March, Dickinson announced on stage that it was the largest non-festival show of their career, with an overall attendance of 100,000 people.{{sfn|Kaczuroski|2009}}{{sfn|Iron Maiden Bio|2021}} The final leg ended in Florida on 2 April after which the band took a break. Overall, the tour reportedly had an attendance of over two and a half million people worldwide over both years.{{sfn|Bezer|2009d}} At the [[2009 Brit Awards]], Iron Maiden won the award for best British live act.{{sfn|Bezer|2009b}} Voted for by the public, the band reportedly won by a landslide.{{sfn|Blabbermouth.net|2009c}}
On 20 January 2009, the band announced that they were to release a full-length documentary film in select cinemas on 21 April 2009. Entitled ''[[Iron Maiden: Flight 666]]'', it was filmed during the first part of the Somewhere Back in Time World Tour between February and March 2008.{{sfn|Bezer|2009a}} ''Flight 666'' was co-produced by Banger Productions and was distributed in cinemas by Arts Alliance Media and [[EMI]], with [[D&E Entertainment]] sub-distributing in the US.{{sfn|Blabbermouth.net|2009d}} The film went on to have a Blu-ray, DVD, and CD release in May and June,{{sfn|Bezer|2009d}} topping the music DVD charts in 25 countries.{{sfn|Iron Maiden Bio|2021}} In most of them the release went Gold, Platinum or Multi-Platinum.{{sfn|DDotB|2021}}
===''The Final Frontier'' and Maiden England World Tour (2010–2014)===
{{main|The Final Frontier|The Final Frontier World Tour|En Vivo! (Iron Maiden album)|Maiden England World Tour}}
[[File:Iron Maiden @ Olympiastadion, 2011-07-08 (5918491552).jpg|thumb|left|The Final Frontier Tour, [[Helsinki Olympic Stadium|Olympiastadion]] in Helsinki]]
Following announcements that the band had begun composition of new material and booked studio time in early 2010 with [[Kevin Shirley]] producing,{{sfn|Masters|2009}} ''[[The Final Frontier]]'' was announced on 4 March and featured three singles "The Final Frontier", "El Dorado" and "Coming Home", as well as epic, progressive opuses such as "Isle of Avalon", "The Talisman" and "When The Wild Wind Blows".{{sfn|Bezer|2010a}} The album, the band's fifteenth, was released on 16 August,{{sfn|Blabbermouth.net|2010c}} garnering critical acclaim{{sfn|MetaCritic1}} and the band's greatest commercial success in their current history, reaching No. 1 in twenty-eight countries worldwide.{{sfn|Coleman|2011}} ''The Final Frontier'' debuted at No. 4 on ''[[Billboard 200]]'' reaching the highest American album charts position to date.{{sfn|Billboard|2021}} Although Steve Harris had been quoted in the past as claiming that the band would only produce fifteen studio releases,{{sfnm|1a1=Sputnikmusic|1y=2009|2a1=Travers|2y=2020}} band members have since confirmed that there will be at least one further record.{{sfnm|1a1=Bezer|1y=2010b|2a1=Hart|2y=2011}} The album was band's next commercial success, achieving Gold or Platinum status in 24 countries around the world.{{sfn|DDotB|2021}} Iron Maiden were awarded with the special sales recognition plaque for selling over 750,000 of their albums in Finland.{{sfn|TFFS|2021}}
The album's [[The Final Frontier World Tour|supporting tour]] saw the band perform 101 shows across the globe to an estimated audience of well over two and a half million,{{sfn|Blabbermouth.net|2011a}} including their first visits to Singapore, Indonesia, and South Korea,{{sfn|Coleman|2011}} before concluding in London on 6 August 2011.{{sfn|Blabbermouth.net|2010f}} As the tour's 2010 leg preceded ''The Final Frontier''{{'}}s release, the band made "[[El Dorado (Iron Maiden song)|El Dorado]]" available as a free download on 8 June,{{sfn|Blabbermouth.net|2010c}} which would go on to win the [[Grammy Award|award]] for [[Grammy Award for Best Metal Performance|Best Metal Performance]] at the [[2011 Grammy Awards]] on 13 February 2011.{{sfn|Blabbermouth.net|2010g}} It was the band's first win following two previous Grammy nominations ("[[Fear of the Dark (song)|Fear of the Dark]]" in 1994 and "[[The Wicker Man (song)|The Wicker Man]]" in 2001).{{sfn|Rock on the Net}} During both years of the tour band headlined the biggest festivals in the world, including [[Rock Werchter]], [[Roskilde Festival|Roskilde]], [[Nova Rock]], [[Pukkelpop]], [[Soundwave (Australian music festival)|Soundwave]] (five dates), [[Wacken Open Air|Wacken]], [[Sziget Festival|Sziget]], [[Ottawa Bluesfest]], [[Festival d'été de Québec]] also [[Sonisphere Festival]] dates in the UK, Sweden, Finland, Poland, Czech Republic, Bulgaria, Italy, Spain, Greece, Turkey and Switzerland. Iron Maiden played in the big indoor arenas, stadiums and festivals around the world, sometimes for 100,000 people.{{sfn|Soni|2021}}
[[File:Iron Maiden 2010.jpg|thumb|right|Iron Maiden in Ottawa in 2010 during The Final Frontier World Tour]]
On 15 March, a new compilation to accompany 2009's ''[[Somewhere Back in Time]]'' was announced. Entitled ''[[From Fear to Eternity (album)|From Fear to Eternity]]'', the original release date was set at 23 May, but was later delayed to 6 June.{{sfn|Blabbermouth.net|2011c}} The double disc set covers the period 1990–2010 (the band's most recent eight studio albums),{{sfn|Blabbermouth.net|2011c}} and, as on ''Somewhere Back in Time'', live versions with Bruce Dickinson were included in place of original recordings which featured other vocalists, in this case [[Blaze Bayley]].
In a press release regarding ''From Fear to Eternity'', band manager [[Rod Smallwood]] revealed that Iron Maiden would release a new concert video to DVD in 2011, filmed in Santiago, Chile and Buenos Aires, Argentina during The Final Frontier World Tour.{{sfn|Brave Words & Bloody Knuckles|2011}} On 17 January 2012, the band announced that the new release, entitled ''[[En Vivo! (Iron Maiden album)|En Vivo!]]'', based on footage from the Chile concert, would be made available worldwide on CD, LP, DVD, and Blu-ray on 26 March, except for the United States and Canada (where it was released on 27 March). DVD topped the music video charts around the world to achieve similar success as previous ones.{{sfn|Bio20121314|2021}}{{sfn|Blabbermouth.net|2012}} In addition to the concert footage, the video release includes an 88-minute tour documentary, entitled Behind The Beast, containing interviews with the band and their crew.{{sfn|UpVenue}} In December 2012, one song from the release ("Blood Brothers") was nominated for a [[Grammy Award for Best Hard Rock/Metal Performance]] at the [[2013 Grammy Awards]].{{sfn|Alderslade|2012b}}
[[The Final Frontier World Tour]] set design referred to the visual conventions known from the cover of ''The Final Frontier'' album.{{sfn|TFFTour|2021}} It resembled a modified space station (Satellite–15), crowned with 10-meter radar towers with spotlights. The lighting system was developed the most since 2000 and it consisted of two semicircular ramps and triangular modules with sets of various light points. Two versions of Eddie the Alien were also prepared, the movable one and in the form of a huge monster's bust and paws emerging from behind the stage. Panoramic backdrops referred to the illustrations contained in the booklet of the promoted album.{{sfn|DDotB|2021}}
[[File:Iron Maiden (9443669642).jpg|thumb|left|Iron Maiden used even more pyros than on previous tours. 2013 indoor arena show.]]
On 15 February 2012, the band announced their third retrospective [[Maiden England World Tour]] 2012–14, which was based around the [[Maiden England|video of the same name]].{{sfn|Alderslade|2012a}} The tour commenced in North America in the summer of 2012 and was followed by further dates in 2013 and 2014, which included the band's record-breaking fifth headline performance at [[Donington Park]] with 100,000 fans in attendance,{{sfn|NATour2012|2021}}{{sfn|Bio20121314|2021}}{{sfn|Kielty|2012}} their first show at the newly built [[Friends Arena|national stadium]] in Stockholm,{{sfn|Nilsson|2012}} a return to the [[Rock in Rio]] festival in Brazil,{{sfnm|1a1=Childers|1y=2012|2a1=Rocha|2y=2012}} and their debut appearance in Paraguay.{{sfn|Crónica|2013}} In August 2012, Steve Harris stated that the ''Maiden England'' video would be re-issued in 2013,{{sfn|Jaedike|2012}} with a release date later set for 25 March 2013 in DVD, CD, and LP formats under the title ''Maiden England '88''.{{sfn|Hartmann|2013}}
Maiden England World Tour stage set was built in an Arctic-style in many aspects reminding [[Seventh Tour of a Seventh Tour]]. The band presented wraparound stage including some special platforms and podiums. Stage set and backdrops portrayed a dozen of the frozen pictures of [[Eddie the Head|Eddie]] monster.{{sfn|IMshow2012|2021}} Fans could see the three incarnations of band's mascot and movable, custom-made elements of stage props as organs with silver pipes, frozen sculptures of Eddie, the crystal ball and movable lighting rig imitating construction from an era of 1988.{{sfn|IMshow2012|2021}} Iron Maiden decided to extend the pyrotechnics using even more than on previous tours, as Bruce Dickinson said "we like to alternate it every other year, because if you get the reputation that you've got to go and see a band because of the pyro and then you don't do the pyro, people think, 'Oh, I won't bother then."{{sfn|Pyro2012|2021}} The tour was even bigger logistical challenge than a few previous ones. Michele Stokley, organiser of [[Sarnia Bayfest]] stated, Iron Maiden "brought 22 tractor trailers and the [six] buses full of equipment for the show".{{sfn|StageEquipment|2021}}
[[File:Iron Maiden 2014 in Poznań HDR.jpg|thumb|right|Iron Maiden in Poland in 2014 during Maiden England World Tour]]
Iron Maiden closed their [[Maiden England World Tour]] in July 2014 headlining at [[Sonisphere Festival]], [[Knebworth]]. Musicians have impressed the crowds by having The Great War Display Team featuring [[Bruce Dickinson]] among its pilots, stage a sensational aerial dogfight in the skies above the Festival with band's frontman flying his very own [[Fokker Dr.I|WW1 German Fokker Dr1]], just hours before taking to the stage. Iron Maiden headlining show marked the final chapter in the band's trilogy of tours performing their 80's repertoire.{{sfn|Knebworth 2014|2021}} The historical tour was another big commercial success in band's career. Over three years, 100 shows were undertaken in 32 countries before an estimated audience of not less than two million and a seven hundred thousand people.{{sfn|METour2013|2021}}{{sfn|DDotB|2021}} Throughout the tour, consistent praise was received from music critics, with the band's performances and the stage show receiving very particular acclaim. Third retrospective tour established Iron Maiden's status as a stadium–filling band.{{sfn|METour2013|2021}}{{sfn|METour|2021}}
In 2013 Iron Maiden in collaboration with "[[Robinsons Brewery]]" released their own beer called Trooper Ale. Since its launch, the 4.7% Premium British Beer that was Trooper original has become a leading player amongst British ales, exported to over 60 countries around the world. The band and "[[Robinsons Brewery]]" have been celebrating over 30 million Trooper pints sold around the globe, during the week they marked the 8th Birthday of their hugely successful collaboration. Trooper has also won multiple gold medals at the prestigious British Bottlers' Institute Awards, as well as picking up awards at the World Beer Awards, Global Beer Masters, International Beer Challenge and International Brewing and Cider Awards (aka "Oscars of the brewing and cider world") among many others.{{sfn|BIO|2022}}{{sfn|Trooper30|2021}}
===''The Book of Souls'', ''Legacy of the Beast'', and ''Senjutsu'' (2015–present)===
{{main|The Book of Souls|The Book of Souls World Tour|Legacy of the Beast World Tour|Senjutsu (album)}}
[[File:Paléo 2016 – Iron Maiden-19 (28345030002).jpg|thumb|left|The Book of Souls stage with pyrotechnics]]
Following confirmation from the group that 2010's ''The Final Frontier'' would not be their last album,{{sfnm|1a1=Bezer|1y=2010b|2a1=Hart|2y=2011}} Bruce Dickinson revealed plans for a sixteenth studio record in July 2013, with a potential release date in 2015.{{sfn|Tez|2013}} In February 2015, drummer Nicko McBrain revealed that a new album had been completed, although the release was put on hold as Dickinson was recovering from treatment for a cancerous tumour found on his tongue.{{sfnm|1a1=Kielty|1y=2015a|2a1=Kaufman|2y=2015}} On 15 May, after Dickinson was cleared for activities, manager Rod Smallwood confirmed that the album would be released in 2015, although the band would not tour until 2016 to allow Dickinson to continue recuperating.{{sfn|Munro|2015}} On 18 June 2015, the band's website announced its title, ''[[The Book of Souls]]'', and confirmed a release date of 4 September 2015.{{sfn|Grow|2015}} It is the band's first original studio album not to be issued by EMI outside North America, following [[Parlophone]]'s acquisition by [[Warner Music Group]] in 2013.{{sfn|Morris|2013}} It was a critical and commercial success, becoming the band's fifth UK No. 1 album{{sfnm|1a1=MetaCritic2|2a1=Sexton|2y=2015}} and second No. 4 on ''[[Billboard 200]]'' in the US.{{sfn|Billboard|2021}} The new release reached number one positions in the album charts of 43 countries.<ref name="OfficialBio" /><!--Per source: 24 countries, plus 19 other territories which no longer publish retail charts.--> Iron Maiden received many accolades and prestigious awards including [[Planet Rock (radio station)|The Rocks Awards]], Silver Clef Award in recognition of outstanding contribution to UK music, Bandit Rock Awards, Classic Rock Roll of Honour Awards, ECHO Award, Kerrang! Awards, Loudwire Awards, Burrn! Awards, Metal Hammer Germany Awards, Golden Gods Awards among many others.{{sfn|Silver Clef2015|2021}} ''The Book of Souls'' went Gold and Platinum in twenty countries.{{sfn|DDotB|2021}}
[[File:Iron Maiden - The O2 - Saturday 27th May 2017 IronMaidenO2 270517-50 (34856367961).jpg|thumb|right|Smith and Dickinson on stage at London's [[The O2 Arena|O<sub>2</sub> Arena]] in May 2017]]
The new record was recorded at Guillaume Tell Studios, Paris, which they had previously used for 2000's ''Brave New World'', with regular producer Kevin Shirley in late summer 2014.{{sfn|Kielty|2015b}} With a total run time of 92 minutes, it is the group's first double studio album.{{sfn|Kielty|2015b}} In addition, the release's closing song, "[[Empire of the Clouds]]", penned by Dickinson, surpassed "Rime of the Ancient Mariner" (from 1984's ''Powerslave'') as Iron Maiden's longest song, at 18 minutes in length.{{sfn|Grow|2015}} A music video for the song "[[Speed of Light (Iron Maiden song)|Speed of Light]]" was issued on 14 August.{{sfn|Lach|2015a}} Apart from an aforementioned songs double album features epic tracks as the title one and Dickinson's "If Eternity Should Fail" referring to Mayan mythology, heavy rock hits such as "Death or Glory" and "Tears of a Clown" dedicated to late actor [[Robin Williams]], progressive opuses as "The Great Unknown" and "The Man of Sorrows" or the more complex, "The Red and the Black".{{sfn|New Album2015|2021}}
The touring setting was (once again) one of the best in the career of the six-person line-up to date. Referring to the title and the leading topic of the album, the stage set reflected the architectural solutions characteristic of the ancient Maya religious buildings.{{sfn|StageEquipment 2016|2021}} The group's mascot, Eddie the Head, appeared in a movable version, as the Mayan shaman, during the concert presentation of the title track from the album and as its big version during the presentation of "Iron Maiden" composition.{{sfn|StageEquipment 2016|2021}} This one was presenting by a huge (ten meters), inflatable and exploding bust known from the album's cover painted by [[Mark Wilkinson]]. The band used an extensive pyrotechnics, lasers, movable lighting rig based on a dozen of pillars. The construction was built on a pyramid plan, with a circular, movable target placed in the central point, around which multicolored LED floodlights were mounted, giving the effect of light reflecting on the audience.{{sfn|2016-17TourReviews|2021}}
[[File:Paléo 2016 – Iron Maiden-27 (28449875545).jpg|thumb|left|Iron Maiden used Mayan-themed stage set and inflatable Devil Goat]]
The individual segments of the stage design, were placed on the stage's podium, as well as the two stepped towers placed in the back of the stage on its extreme sides. Initially they were turned in the opposite direction to the original, during the presentation of selected inscriptions which were properly illuminated, creating the effect of the real buildings.{{sfn|Production2016|2021}} Panoramic backdrops have been changed with each song referred to the graphic convention and paintings from the Mayan era, originally included in the booklet of the promoted album.{{sfn|2016-17TourReviews|2021}} Bruce Dickinson changed his costumes several times and used a variety of props. Another attraction was an eight-meter long inflatable devil goat doll, emerging from behind the stage during the presentation of "The Number of the Beast" song.{{sfn|Bio201617|2021}}{{sfn|2016-17TourReviews|2021}}
In February 2016, the band embarked on [[The Book of Souls World Tour]], which saw them play concerts in 35 countries in North and South America, Asia, Australasia, Africa, and Europe, including their first ever performances in China, El Salvador, and Lithuania. It was Iron Maiden's biggest album tour since The X Factour 1995–1996.{{sfnm|1a1=Lach|1y=2015b|2a1=Alfa.lt|2y=2015}} As with 2008–09's Somewhere Back in Time World Tour and 2010–11's The Final Frontier World Tour, the group travelled in a customised aeroplane, flown by Dickinson and nicknamed "Ed Force One", although they used a [[Boeing 747-400]] jumbo jet.{{sfn|Lach|2015b}} The band completed the tour in 2017 with further European and North American shows.{{sfnm|1a1=Lach|1y=2016b|2a1=Childers|2y=2017}} Iron Maiden played 117 shows on six continents for well over two and a half million people.{{sfn|Bio201617|2021}}{{sfn|DDotB|2021}} On 20 September 2017, ''[[The Book of Souls: Live Chapter]]'' was announced. Recorded throughout The Book of Souls World Tour, it was released on 17 November 2017.{{sfn|Britton|2017}} On 11 November 2017 band released for free the entire concert video via [[YouTube]] as an official stream for loyal fans around the world. The event was called "Stream For Me, YouTube".{{sfn|Stream2017|2021}}
[[File:IM guitars.jpg|thumb|right|Smith, Murray and Gers performing "[[The Trooper]]" at Quebec City, July 2017]]
In the summer of 2016, the group launched a [[mobile game]], ''Iron Maiden: Legacy of the Beast''{{sfn|Lach|2016a}} and a [[pinball]] game with the same name in 2018.<ref name="nyOLo">{{cite news |title=Take a Look at Iron Maiden's Legacy of the Beast Pinball Machine |url=https://ultimateclassicrock.com/iron-maiden-pinball/ |access-date=7 October 2019 |work=Ultimate Classic Rock}}</ref> The game has been No. 1 mobile RPG in multiple markets, with over four million players worldwide having downloaded the game.{{sfn|LOTB Game|2021}} Inspired by the game's title, the band would undertake the [[Legacy of the Beast World Tour]], commencing in Europe in 2018,{{sfn|Munro|2017b}} with North and South American shows following in 2019. 82 shows of the tour attracted over two million fans filling sold-out arenas, stadiums and some of the biggest festivals in the world as [[Rock in Rio]] 2019 with well over 100,000 fans in attendance.{{sfn|Kreps|2018}}
The band achieved the another impressive success in Latin America, where over half a million viewers saw concerts in six cities of Mexico, Brazil, Argentina and Chile.{{sfn|Latin 2019|2021}} The 33 shows played in North America were the band's greatest success since their heyday in the mid-1980s. Iron Maiden set record attendance in many European cities.{{sfn|DDrB|2021}}
On 23 September 2019, the band announced they would play the 2020 Belsonic Festival in Belfast and a headline show at Donington Park, England, as part of 2020 Download Festival.<ref name="zX6Mc">{{cite news |title=KISS, Iron Maiden and System Of A Down to headline Download Festival 2020 |url=https://www.nme.com/news/music/kiss-iron-maiden-and-system-of-a-down-to-headline-download-festival-2020-line-up-tickets-2550525#FyJV4OFEt2AW9D2i.99 |access-date=9 October 2019 |work=NME}}</ref> On 7 November 2019, they announced Australian shows throughout May 2020 joined by [[Killswitch Engage]].<ref name="VJau9">[https://musicfeeds.com.au/news/iron-maiden-are-bringing-their-massive-legacy-of-the-beast-tour-to-australia-in-2020/ "Iron Maiden Are Bringing their Massive Legacy of the Beast Tour to Australia"] Musicfeeds.com.</ref> [[Legacy of the Beast World Tour|Legacy of The Beast World Tour]] has been critically acclaimed by fans and media as the most extravagant and visually stunningly live show of the band's career to date. Both the production and the decades-spanning set-list of fan favourites and hits were inspired by their so same named mobile phone game. The multi-themed shows opened with a replica [[Spitfire]] flying above the stage and progresses through a two-hour theatrical journey of ever-evolving interlocking stage sets with multiple incarnations of Eddie, pyrotechnics and special effects including muskets, claymores, flame throwers, a giant electrified crucifix, a noose, gallows and an enormous [[Icarus]] among many other attractions.{{sfn|LOTB Tour|2021}}
[[File:Iron Maiden au Hellfest 2018.jpg|thumb|left|Iron Maiden headlining Hellfest 2018]]
In May 2020, the band announced that all concerts for the year had been cancelled due to the [[COVID-19 pandemic]], with tour dates rescheduled for 2021. Nearly one million people bought tickets for all 35 shows originally booked for 2020.{{sfn|DDotB|2021}}<ref name="S3jAT">{{cite web |title=LEGACY OF THE BEAST TOURING UPDATE 2020/21 |url=https://www.ironmaiden.com/news/article/legacy-of-the-beast-touring-update-2020-21 |website=ironmaiden.com |access-date=6 August 2020}}</ref> In April 2021 it was announced that the 2021 tour was cancelled once again and most of the European shows were rescheduled for 2022.<ref name="22cuT">{{Cite web|url=https://www.ironmaiden.com/news/article/european-legacy-of-the-beast-summer-2021-tour-postponed-to-2022|title=European Legacy of the Beast Summer 2021 Tour Postponed to 2022 |website=ironmaiden.com}}</ref> In October 2020, the band announced that they would release a live album from the Legacy of the Beast World Tour called ''[[Nights of the Dead|Nights of the Dead, Legacy of the Beast: Live in Mexico City]]''. The double concert album was recorded during three sold-out concerts in [[Mexico City]]'s [[Palacio de los Deportes]] for a combined audience of over 70,000 people.{{Sfn|NofD|2021}} It was released worldwide on 20 November 2020.<ref name="zXVZS">[https://www.blabbermouth.net/news/iron-maiden-to-release-nights-of-the-dead-legacy-of-the-beast-live-in-mexico-city-in-november/ "IRON MAIDEN To Release 'Nights Of The Dead, Legacy Of The Beast: Live In Mexico City' In November"]. ''Blabbermouth''. Retrieved 23 November 2020</ref> That same month, Dickinson announced that Iron Maiden had been "been working together a little bit in the studio" for the follow-up to ''The Book of Souls''.<ref name="nETr1">[https://www.blabbermouth.net/news/iron-maiden-has-been-working-together-a-little-bit-in-the-studio-says-bruce-dickinson/ "IRON MAIDEN Has 'Been Working Together A Little Bit In The Studio,' Says BRUCE DICKINSON"]. ''Blabbermouth''. Retrieved 23 November 2020</ref> On 15 July 2021, Iron Maiden released a video for their first song in six years "[[The Writing on the Wall (Iron Maiden song)|The Writing on the Wall]]", which was directed by Nicos Livesey.<ref>{{Cite web|url=https://www.kerrang.com/the-news/iron-maiden-return-with-first-new-music-in-six-years-the-writing-on-the-wall/|title=Iron Maiden return with first new music in six years, The Writing On The Wall|website=[[Kerrang!]]}}</ref> Four days later, the band announced that their seventeenth studio album, ''[[Senjutsu (album)|Senjutsu]]'', would be released on 3 September 2021.<ref name="Brown">{{Cite web|last=Brown|first=Paul 'Browny'|date=2021-07-19|title=Iron Maiden's 17th Album Has a Title & Release Date!|url=https://wallofsoundau.com/2021/07/19/iron-maidens-17th-album-has-a-title-release-date/|access-date=2021-07-19|website=Wall Of Sound|language=en-US}}</ref><ref>{{Cite web|url=https://www.ironmaiden.com/news/article/im17|title=IRON MAIDEN – SENJUTSU|website=ironmaiden.com}}</ref> On 19 August 2021, the band released another single from the album, "Stratego".<ref>{{Cite web|url=https://loudwire.com/iron-maiden-stratego-song-lyrics/|title=Watch Iron Maiden's Trippy New Music Video for 'Stratego'|website=[[Loudwire]]}}</ref>
''Senjutsu'' eventually reached the top of the best-seller lists in 24 countries, including: Belgia (Wallonia and Flanders), Chile, Brazil, Colombia, Mexico, Bulgaria, Austria, Switzerland, Germany, Hungary, Croatia, Bosnia-Herzegovina, Serbia, Slovenia, Russia, Finland, Italy, Portugal, Spain, Sweden, Greece, Scotland, Wales and Luxembourg.{{sfn|SenCh24|2022}}{{sfn|Lat|2022}}{{Sfn|Senjutsu Success|2021}}{{sfn|SChB|2022}}{{Sfn|A Success|2021}}{{Sfn|Senj23|2021}} As such, it was the band's first album in fifteen years (since ''[[A Matter of Life and Death (album)|A Matter of Life and Death]]'' in 2006) not to reach number one on the [[UK Albums Chart|UK charts]], although it did top the [[UK Rock & Metal Singles and Albums Charts]]. In the list of sales of physical albums in the UK and the US, the double-disc release took the first position, also noted on the European Album Chart Top 200. ''Senjutsu'' was also in the Top 5 physical and digital best-selling albums combined in the USA (the highest in the history of the group), Australia, Ireland, Iceland, Denmark, Indonesia, Singapore, Israel, UEA, South Africa, Indonesia, England, Netherlands, France, Czech Republic, Slovakia, Montenegro, Poland, Estonia, Costa Rica, El Salvador, Bolivia, Nepal, Honduras, Uruguay, Cyprus, Lithuania, Latvia, Taiwan, Malta and Ukraine. In South America, the album went on sale only a week after the official date. At the same time as the Iron Maiden album, the latest releases of the most popular representatives of the pop scene and rap such as [[Drake (musician)|Drake]], [[Kanye West]], [[Imagine Dragons]] and [[Billie Eilish]] were on the best-seller lists. In total, ''Senjutsu'' reached the top three best-sellers in 55 countries around the world and the Top 5 best-sellers in 63 countries.{{Sfn|Senjutsu Charts|2021}}{{Sfn|Charts History|2021}} The animated video for "The Writing on the Wall" single was nominated for [[UK Music Video Awards|UK Music Video Awards 2021]] in category "Best Animation in a Video".{{Sfn|UK Music Video|2021}} ''Senjutsu'' was awarded the title of "Best Metal Album of 2021" by [[Rolling Stone]] magazine and took top positions in many summaries of the year around the world.{{sfn|SenA|2022}}
As many previous releases band's seventeenth studio effort was critically acclaimed and commercially successed album, especially appreciated for its ambitious epic scope. The band decided to continue postponed Legacy of the Beast Tour in 2022 adding next 30+ dates in North America and some new territories in Europe. Tour production was planned as even more spectacular with using a brand new scenery dedicated to ''Senjutsu'' album and including the setlist changes to perform songs from the seventeenth studio effort. Iron Maiden manager Rod Smallwood commented: "Next summer we will finally get to play the huge European stadium and festival tour for Legacy of the Beast originally set for 2020. The new show will be even more spectacular so after our visit to Rock in Rio early September 2022 we have decided to take it back to our fans in North America and Mexico too, playing in cities or venues we did not get to last time we toured in 2019. We are also adding some of the great cities of eastern Europe we were not initially visiting! We'll be making a couple of additions and changes to the production and setlist to include some songs from our new album ''Senjutsu'' and are making the 2022 version of Legacy of the Beast even more spectacular than the acclaimed original show. You can be sure that we will still be featuring all the "hits" and the key elements of the original tour like the Spitfire, Icarus, Hell, flamethrowers and pyro and the rest - but we will shake it up a bit and Trooper Eddie will have serious competition in the new "Senjutsu world" we are adding".{{sfn|TourPlans|2021}} During an appearance on the "[[Talk Is Jericho]]" podcast, Bruce Dickinson confirmed that Iron Maiden is planning to stage a tour where it will perform ''Senjutsu'' double album, in its entirety.{{sfn|STP|2022}}
==Image and legacy==
[[File:Guitar Center Hollywood (2372266757).jpg|thumb|left|[[Hollywood's Rockwalk|Hollywood's RockWalk]]]]
Iron Maiden and particular musicians of the band have received multiple nominations, honours and awards including [[Grammy Awards]]<ref>{{cite web|url=http://www.grammy.com/nominees |title=53rd Grammy Awards Winners |publisher=[[Grammy Award|Grammys]] |date=13 February 2011 |access-date=13 February 2011 |url-status=dead |archive-url=https://web.archive.org/web/20120201120225/http://www.grammy.com/nominees |archive-date=1 February 2012 }}</ref> and equivalents awards in many countries,{{sfn|YLE}}{{sfn|Wejbro|2011}} [[Brit Awards]],<ref name="snI6H">{{cite news |url= http://www.blabbermouth.net/news.aspx?mode=Article&newsitemID=114646 |title= Iron Maiden named 'Best British Live Act' at Brit Awards |access-date= 1 September 2011 |date= 18 February 2009 |work= [[Blabbermouth.net]]}}</ref> [[Silver Clef Award]],<ref name="QSm0Y">{{cite web|last1=Cooper|first1=Leonie|title=Iron Maiden win O2 Silver Clef 2015 Award for outstanding contribution to UK music|url=http://www.nme.com/news/iron-maiden/83831|website=[[NME]]|access-date=23 March 2015|date=23 March 2015}}</ref> [[Nordoff-Robbins Award]],{{sfn|Nordoff-Robbins|2021}} [[Ivor Novello Awards]],{{sfn|Sanctuary Group|2002}} [[Juno Awards]],{{sfn|Juno Awards|2010}} [[Guinness Book of World Records]],<ref name="OnoLG">{{cite web |url=https://stason.org/TULARC/music-bands/iron-maiden/26-Other-IRON-MAIDEN-tidbits.html|title= Music bands – Iron Maiden | publisher= stason.org | date= 2021-05-28 | access-date= 2021-05-28}}</ref> [[Public choice|Public Choice International]],{{sfn|IPCH1985|2021}} Online Music Awards Germany,{{sfn|Online Music Awards|2021}} [[Planet Rock (radio station)|The Rocks Awards]],{{sfn|Rocks1|2021}}{{sfn|Rocks2|2021}}{{sfn|Rocks3|2021}}{{sfn|Rocks4|2021}}{{sfn|Rocks5|2021}}{{sfn|Rocks6|2021}}{{sfn|Rocks7|2021}} [[Burrn!|Burrn! Awards]],{{sfn|Burrn! 1|2021}}{{sfn|Burrn! 2|2021}}{{sfn|Burrn! 3|2021}}{{sfn|Burrn! 4|2021}}{{sfn|Burrn! 5|2021}} [[Classic Rock Roll of Honour Awards]], [[ECHO Awards]],<ref name="mplC6">{{cite web|url=https://www.metal-hammer.de/echo-2016-iron-maiden-und-frei-wild-erhalten-auszeichnungen-606231/|title=Echo Awards 2016 |publisher= metal-hammer.de/ |date=10 February 2009 |access-date=10 February 2009}}</ref><ref name="43YY5">{{cite web|url= https://twitter.com/ECHO_Musikpreis/status/718159366755639297|title=Musikpreis Iron Maiden|publisher= twitter.com/ECHO_Musikpreis |date=13 February 2016 |access-date=13 February 2016}}</ref> Top.HR Music Awards,{{Sfn|TopHR1|2022}}{{Sfn|TopHR2|2022}} Žebřík Music Awards,{{sfn|Zebrik|2022}} [[Honorary Doctorate]]s, State Prizes,{{sfn|State Prize|2021}}{{Sfn|BAC1|2021}}{{Sfn|HCoS|2021}}{{Sfn|VOTC|2021}}sales recognition, charity and sport awards among many others. Musicians have also received ten awards from fifteen nominations at the [[Metal Hammer Golden Gods Awards|''Metal Hammer'' Golden Gods Awards]].<ref name="OR4pJ">{{cite web|last1=Munro|first1=Scott|title=Golden Gods 2017|url=http://teamrock.com/news/2017-06-12/golden-gods-2017-mastodon-a7x-gojira-among-winners|website=[[Metal Hammer]]|access-date=31 July 2017|date=12 June 2017}}</ref> The band was ranked No. 24 in [[VH1]]'s "100 Greatest Artists of Hard Rock",{{sfn|VH1|2005}} No. 4 in [[MTV]]'s "Top 10 Greatest Heavy Metal Bands of All Time",{{sfn|MTV|2006(a)}} No. 3 in [[VH1 Classic]]'s "Top 20 Metal Bands".,{{sfn|VH1|2006}} and was ranked as the most successful British metal group on [[Channel 4]].{{sfn|DDotB|2021}} In 2012 ''[[The Number of the Beast (album)|The Number of the Beast]]'' was voted as Best British Album Ever in the public poll related to [[Diamond Jubilee of Queen Elizabeth II]].{{sfn|DJEQII|2021}} Iron Maiden were inducted into [[Guitar Center#Hollywood's RockWalk|Hollywood RockWalk]], BPI Hall of Fame and Kerrang! Hall of Fame.{{sfn|Guitar Center}}{{sfn|KerrangHoF|2021}} The band's movie [[Flight 666]] was a part of prestigious [[British Music Experience]] exposition held in London, 2011<ref name="Mto39">{{cite web |url= https://bravewords.com/news/iron-maiden-exclusive-pictorial-preview-of-on-board-flight-666-book-at-the-british-music-experience |title= Flight 666 Exposition (London) |publisher= bravewords.com/ |access-date= 2021-01-20}}</ref> and [[Eddie the Head]] iconic mascot – monster was presented for the very first time at [[British Music Experience]]'s doorway in Liverpool in 2017 and became a part of permanent exhibition.{{sfn|BME1|2021}}{{sfn|BME2|2021}}{{sfn|BME3|2021}} Iron Maiden are also a part of permanent exhibition of the [[Rock and Roll Hall of Fame]]{{sfn|Heavy Metal Exhibition|2021}} and [[Wacken Open Air]] Hall of Fame.{{sfn|WOAHOF|2021}} Band's mascot is a part of Rock Legends Wax Museum placed in Ontario.{{sfn|WM1|2022}}{{Sfn|WM2|2022}} In February 2021, Iron Maiden were nominated for [[Rock and Roll Hall of Fame]] class.{{sfn|RnRHOF|2021}} In April 2021, ex-members of the band ([[Paul Di'Anno]], [[Blaze Bayley]] and famous illustrator [[Derek Riggs]]) were inducted into the Metal Hall of Fame.{{sfn|MHoF LA|2021}}{{sfn|MHoF2021|2021}} By 2017, Iron Maiden had sold well over 100 million<!-- NOTE (~~~): The sales figures (70m/80m/85m/110m) have gone through extensive discussion on the article's talk page. It would be greatly appreciated, since this is such a contentious subject, if you would join us on the Talk Page and discuss before changing. Thanks from all of us who have engaged in the discussion to reach the consensus you now see. --> copies of their albums worldwide,{{sfn|Thring|2017}}{{sfn|Johnson|2017}}{{sfn|WellOver 100|2021}} despite little radio or television support.{{sfn|Smith|2009}} According to many sources by 2021 all audio-visual catalogue of the band has sold in over 200 million copies worldwide, including regular albums, singles, compilations, and videos.<!-- NOTE (~~~):PLEASE do not delete this info and sources. Many other articles dedicated to Iron Maiden including so same data even the major music magazines. Just RESPECT someone's work, please. Thank You! -->{{sfn|200MLN|2021}}{{sfn|MetCa|2021}}{{sfn|Sales Gen|2022}}{{sfn|JHF|2022}}{{sfn|TID|2022}} By 2022 their releases have been certified silver, gold and platinum around 600 times worldwide.{{sfn|Cert600|2022}}
Iron Maiden frequently use the slogan "Up the Irons" in their disc liner notes, and the phrase can also be seen on several T-shirts officially licensed by the band. It is a paraphrase of "Up the Hammers", the phrase which refers to the London [[Association football|football]] club, [[West Ham United]], of which founder Steve Harris is a fan.{{sfn|Football Fancast}} Collection called "Die With Your Boots On" was published in 2020 as the result of a unique collaboration between Iron Maiden and West Ham United.{{sfn|IMDWYBO|2022}} Band's mascot is the official symbol of [[Força Jovem]] youth soccer club Vasco.{{Sfn|FJV|2022}}
[[File:Seventh Son Eddie 2013.jpg|thumb|right|Iron Maiden's mascot [[Eddie (Iron Maiden)|Eddie]] in the background during a performance of “Seventh Son of a Seventh Son” in Madrid, May 2013]]
Iron Maiden's [[mascot]], [[Eddie (mascot)|Eddie]], is a perennial fixture in the band's science fiction and horror-influenced album cover art, as well as in [[concert|live]] shows.{{sfn|Wall|2004b1|p=133}} Originally a papier-mâché mask incorporated in their backdrop which would squirt fake blood during their live shows,{{sfn|Wall|2004b2|p=62}} the name would be transferred to the character featured in the band's debut album cover, created by [[Derek Riggs]].{{sfn|Wall|2004b3|p=136}} Eddie was painted exclusively by Riggs until 1992, at which point the band began using artwork from numerous other artists as well, including [[Melvyn Grant]].{{sfn|Wall|2004b4|p=289}} Eddie is also featured in the band's [[first-person shooter]] video game, ''[[Ed Hunter]]'',{{sfn|Popoff|2005(a)}} as well as their [[Mobile operating system|mobile]] [[role-playing game]], ''Iron Maiden: Legacy of the Beast'',{{sfn|Lach|2016a}} in addition to numerous T-shirts, posters and other band-related merchandise.{{sfn|Wall|2004b5|p=133}} In 2008, he was awarded the "Icon Award" at the ''[[Metal Hammer]]'' Golden Gods,{{sfn|Thrash Hits|2008}} while [[Gibson Guitar Corporation|Gibson.com]] describes him as "the most recognisable metal icon in the world and one of the most versatile too".{{sfn|Lefkove|2008}} In November 2021, the group's management teamed up with [[Marvel Entertainment]], the oldest and largest producer of iconic comics in the world. The result of the collaboration was, among others, a series of gadgets containing the image of the most famous characters of Marvel and Eddie. According to the manager of Rod Smallwood, the collaboration was a dream come true, joining the band's mascot to the group of pop culture superheroes such as [[X-Men]], [[Avengers (comics)|Avengers]], [[Spider-Man]], [[Iron Man]], [[Captain America]], [[Venom (character)|Venom]], [[Thanos]], [[Thor (Marvel Cinematic Universe)|Thor]] or [[Deadpool]].{{Sfn|Marvel|2021}}
Over the whole period of the band's existence, Eddie has decorated covers, billboards, posters and t-shirts. Iron Maiden has come almost on par with [[Kiss (band)|KISS]] when it comes to exploiting merchandising. According to Enrique Campos, stylist, creative manager and fashion expert: "Eddie T-shirts can be seen everywhere and on all people, even those who have never heard the band's music. Rock is associated with being 'bad', with life on the sidelines. Concepts that part of the public likes to join from time to time, which is why you see chic girls from the Salamanca District wearing their T-shirts".{{Sfn|EsleM|2022}}
In 2016, the group launched a [[mobile game]], ''Iron Maiden: Legacy of the Beast''{{sfn|Lach|2016a}} and a [[pinball]] game with the same name in 2018. The game has been No. 1 mobile RPG in multiple markets, with over four million players worldwide having downloaded the game.{{sfn|LOTB Game|2021}} Inspired by the game's title, the band would undertake the [[Legacy of the Beast World Tour]], commencing in Europe in 2018 with North and South American shows following in 2019.{{sfn|Munro|2017b}} Finnish computer game developers [[Rovio Entertainment]] have teamed up with the management of Iron Maiden to include Eddie's group mascot as one of the characters creating a special installment of the game "[[Angry Birds Evolution]]", related to the Halloween celebration in 2017. Cooperation with the creators of the game [[Angry Birds (video game)|Angry Birds]], which has a multi-million audience of users around the world, meant that potentially many of them got a chance to initiate into the world of heavy metal.{{Sfn|IMAB|2022}} In May 2019, the band filed a $2 million lawsuit against video game company [[3D Realms]] for infringing on their trademark via the planned release of a game called [[Ion Maiden]], which the band claims "is nearly identical to the Iron Maiden trademark in appearance, sound and overall commercial impression." The suit further accuses 3D Realms of causing "confusion among consumers" by depicting a skull icon similar to the band's Eddie mascot and that ''Ion Maiden'' is similar to the band's own ''Legacy of the Beast'' video game.<ref name="3plQv">{{cite web |last1=Beaumont-Thomas |first1=Ben |title=Iron Maiden sue video game company for $2m over Ion Maiden game |url=https://www.theguardian.com/music/2019/may/30/iron-maiden-sue-video-game-developers-for-2m-over-ion-maiden-game |website=The Guardian |access-date=4 June 2019 |date=30 May 2019}}</ref>
Since 2021 Iron Maiden have welcomed in-game collaborations with the other rock and metal artists. As the first came [[Amon Amarth]] with a playable viking Berserker character, followed by the ethereal Shadow Sorceress, which represented [[Lacuna Coil]]'s frontwoman [[Cristina Scabbia]] and next step was [[Papa Emeritus]] of [[Ghost (Swedish band)|Ghost]] entering the arena. In 2022 [[Disturbed (band)|Disturbed]]'s mascot [[The Guy]] was brought into battle with misterious dark powers in the Legacy of the Beast mobile game.{{sfn|DLotB|2022}} Iron Maiden teamed up with German power metal band, [[Powerwolf]], to bring the Battle with Vârcolac (the werewolf) in games character showcase event: Macht Der Wölfe (Power of the Wolf){{sfn|PWLOB|2022}} Queen Beast is the next character appearing in the game, created with collaboration with Swedish melodic death metal band [[Arch Enemy]].{{sfn|ArchEnemyQB|2022}}
The huge puppet with the image of Eddie has appeared many times during the carnival celebrations in [[Rio de Janeiro|Rio De Janeiro]] and other South American cities, among other installations resembling the most famous stars of the stage, film, sports and influential personalities of world politics.{{Sfn|RiREd|2022}} During the [[Cavalcade of Magi]] 2021 in the Spanish city of [[Cádiz|Cadiz]], next to dolls representing characters known from the world of pop culture, there was a huge, inflatable mummy inspired by the characteristic image of the Iron Maiden mascot from 1985.{{Sfn|IIIK1|2022}}{{Sfn|IIIK2|2022}}{{Sfn|IIIK3|2022}} In addition to a wide range of widely available gadgets, the protagonist of which were the subsequent incarnations of the band's mascot, the image of Eddie turned out to be a popular theme for tattoos adorning various parts of the body of thousands of fans of SF / Fantasy aesthetics and heavy varieties of rock music.{{sfn|Gadg|2022}}
Over the course of several decades, the band's cover illustrations and iconography have appeared in various TV productions, music videos by artists representing popular music in the broad sense, and in press publications. The distinctive cover illustrations, especially the group's mascot and logo, have become part of celebrity clothing (especially [[t-shirts]]) worn privately, as well as at prestigious industry events, including fashion shows.{{Sfn|IMimage|2022}} Among hundreds of others can be found: [[Lady Gaga]], [[Paris Hilton]], [[Rihanna]], [[Madonna]], [[Rowan Atkinson]], [[Taylor Swift]], [[Taylor Hill (model)|Taylor Hill]], [[Selena Gomez]], [[David Beckham]], [[David Hasselhoff]], [[Diego Maradona]], [[Kelly Rowland]], [[Taryn Manning]], [[Olivia Munn]], [[Travis Scott]], [[Cameron Diaz]], [[Dolph Ziggler]], [[Justin Bieber]], [[Hilary Duff]], [[Kirsten Dunst]], [[Nicole Kidman]], [[Drew Barrymore]], [[Charlize Theron]], [[Lindsay Lohan]], [[Miley Cyrus]], [[Holly Madison]], [[David Banks (soccer)|David Banks]], [[Jaden Smith]], [[Michael Fassbender]], [[Sam Worthington]], [[Taylor Momsen]], [[Kat Von D]], [[Keith Urban]], [[Amy Poehler]], [[Paul Gascoigne]], [[Marc Overmars]], [[Faustino Asprilla]], [[Juicy J]], [[Kourtney Kardashian]], [[DJ Mustard]], [[Odell Beckham Jr.|Odell Beckham Jr]], [[Ann Sydney]], [[Kylie Jenner]], [[Benicio del Toro]], [[Pilar Rubio]], [[Slaven Bilic]], [[Pablo Zabaleta]], [[Anushka Sharma]], [[Terry Butcher]], [[Ian Wright]], [[Patrick Vieira]], [[Paul Mariner]], [[Stuart Pearce]], [[Iggy Azalea]], [[Bjorn Einar Romoren]].{{sfn|Importance of Iron Maiden|2021}}{{sfn|Iron Maiden Fashion|2021}}{{sfn|Iron Maiden Celebrities|2021}}
[[File:Iron Maiden Logo.png|thumb|left|Iron Maiden logotype and font]]
Iron Maiden's distinct logo has adorned all of the band's releases since their debut, 1979's ''[[The Soundhouse Tapes]]'' EP. The typeface originates with [[Vic Fair]]'s poster design for the 1976 science fiction film, ''[[The Man Who Fell to Earth (film)|The Man Who Fell to Earth]]'',{{sfn|Meansheets|2010}} also used by [[Gordon Giltrap]], although Steve Harris claims that he designed it himself, using his abilities as an architectural draughtsman.{{sfn|EMI|1998}} Metal Lord / Iron Maiden, a characteristic font known from the group's classic logo, disseminated around the world by graphic works related to the band's activities, has found its way into pop culture for good, becoming a motif commonly used to create various logos and inscriptions.{{sfn|IM Logotype|2021}} The band's characteristic graphic motifs have appeared on huge stadium banners many times during football games in many countries around the world.{{Sfn|BannIM|2022}} The song "[[Always Look on the Bright Side of Life]]" (from [[Monty Python]]'s ''[[Monty Python's Life of Brian|Life of Brian]]'') is a staple at their concerts, where the recording is played after the final encore.<ref name="O7iSI">{{cite news |title=Iron Maiden meets 'Monty Python' |url=https://www.blabbermouth.net/news/iron-maiden-meets-monty-python/ |access-date=4 September 2019 |work=Blabbermouth}}</ref>
At the beginning of January 2021, at general audience in [[Aula Paolo VI]], [[Pope Francis]] was honored with a circus show presented by 25 artists of Ronny Roller Circus, accompanied, among others, by presentation of the classic piece "[[The Trooper]]", one of the greatest standards of the British formation. It was the first time in history when a composition by a heavy metal artist was sounded in the [[Vatican City|Vatican]].{{Sfn|Vatican1|2022}}{{Sfn|Vatican2|2022}}{{Sfn|Vatican3|2022}}
===Influence on other artists and the genre===
[[Kiss (band)|Kiss]] co-founder [[Paul Stanley]] noted that Iron Maiden "have helped spawn an entire genre of music" and influenced literally thousands of other artists.{{sfn|Kiss Stanley|2021}}{{sfn|IMINF|2022}} According to ''[[Guitar World]]'', Iron Maiden's music has "influenced generations of newer metal acts, from legends like [[Metallica]] to current stars like [[Avenged Sevenfold]],"{{sfn|Bienstock|2011}} with Metallica drummer [[Lars Ulrich]] commenting that he has "always had an incredible amount of respect and admiration for them."{{sfn|Kerrang!|2008}} Ulrich has frequently cited Iron Maiden as probably the biggest influence on Metallica's career.{{sfn|Metallica's Achievements|2021}} Metallica's guitarist [[Kirk Hammett]] described the cover of Iron Maiden's debut LP as his favourite album cover and stated that the song "Phantom of the Opera" from that album played an important role in his development as a guitarist. Hammett explained how "(...) a lot of guitar elements from that song can still be heard in his work with Metallica today".{{sfn|KirkHammett|2022}} [[Kerry King]] of [[Slayer]] stated that "they meant so much to [him] in their early days".{{sfn|Young(2)}} Two of the founding members of [[Anthrax (American band)|Anthrax]], guitarist [[Scott Ian]] and bassist [[Dan Lilker|Danny Lilker]], have also cited Iron Maiden as one of the band's main influences and inspirations (especially early on in their career), the former going on to say that "they had a major impact on [his] life."{{sfn|Young(2)}}{{sfn|Lilker|2022}} [[Megadeth]] have cited Iron Maiden as one of their biggest inspiration on many different levels.{{sfn|Megadeth on Maiden|2021}} Members of [[Testament (band)|Testament]] have stated that Iron Maiden were one of their blueprint bands and have covered their songs many times.{{sfn|Testament on Maiden|2021}} [[Exodus (American band)|Exodus]] guitarist [[Gary Holt (musician)|Gary Holt]] and late singer [[Paul Baloff]] have also acknowledged Iron Maiden as one of the band's influences, with the former citing both them and [[Judas Priest]] as "basically the calibre of the stuff [he] listened to" in Exodus' early years.{{sfn|Exodus on Maiden|2021}}{{sfn|PBPD|2022}} [[Kurt Cobain]], late founder, composer, vocalist and guitarist of [[Nirvana (band)|Nirvana]], was a big fan of Iron Maiden.{{sfn|Cobain|2021}} Both former and current members of [[Suicidal Tendencies]] have also mentioned Iron Maiden as one of the sources of inspiration behind their music.{{sfn|Clark|2021}}{{sfn|Lombardo|2021}} [[Alice in Chains]] musicians mentioned about Iron Maiden's influences on them.{{sfn|AiCH|2022}}
[[Tobias Forge]], frontman and leader of Swedish rock band [[Ghost (Swedish band)|Ghost]] stated that "for me personally, they have been very influential musically, I've always listened to them a lot growing up as a metal fan. Their live album, ''[[Live After Death (album)|Live After Death]]'', had — and still has — a great impact on me when it comes to work ethic. Going through that book that came with the record, watching all those dates. When I was a kid, I would sit there with a map book and pin out all the cities they played on that tour. It was like a hundred shows all over America. The show was so over the top, so it set a standard. "[Iron] Maiden was one of the big movers when it came to '80s heavy metal merchandise. All of our merchandise has always been inspired by bands like Maiden. That's the sort of idea I had about rock and roll merchandise."{{sfn|Tobias Forge|2021}}{{sfn|ForgeMaid|2022}}{{sfn|GHIM|2022}}
[[M. Shadows]] of Avenged Sevenfold stated that Iron Maiden "are by far the best live band in the world and their music is timeless", while [[Trivium (band)|Trivium]] singer [[Matt Heafy]] comments that "without Iron Maiden, Trivium surely wouldn't exist".{{sfn|Kerrang!|2008}} [[Slipknot (band)|Slipknot]] and [[Stone Sour]] frontman [[Corey Taylor]] said that "Steve Harris does more with four fingers than I've ever seen anybody do. And Bruce Dickinson? Dude! To me, he was the quintessential old-school heavy metal singer. He could hit notes that were just sick, and he was a great showman. Everything made me a fan. And there wasn't a dude that I hung out with that wasn't trying to draw Eddie on their schoolbooks",{{sfn|MTV|2006(a)}} while their music also helped [[Jesper Strömblad]] of [[In Flames]] to pioneer the [[melodic death metal]] genre, stating that he had wanted to combine [[death metal]] with Iron Maiden's melodic guitar sounds.{{sfn|Metal Update|2010}} Viking metallers of Swedish band [[Amon Amarth]] stated Iron Maiden is one of their biggest influence also participated in Iron Maiden's ''Legacy of the Beast'' RPG game project.{{sfn|LOTB Game|2021}} [[Chris Impellitteri]] stated Iron Maiden have influenced "virtually every heavy metal band in existence with their music, brand, and of course talent!"{{sfn|Chris Impellitteri|2021}}
[[Anthrax (American band)|Anthrax]] drummer [[Charlie Benante]] stated Iron Maiden "made every band that were influenced by them aspire to be like them. When I was learning to play guitar, this was one of the tunes I practiced. I developed as a guitar player and my coordination got better and better. Maiden had something different, they brought out that Primal roar from us. This was a New style of Hard Rock and Metal, they had a Punk Drive to them with Boston styled Guitar licks, they changed the game. I often said, no Maiden, no Big 4."{{sfn|Benante|2021}} Rafael Bittencourt, the guitarist of Brazilian heavy metal band [[Angra (band)|Angra]], praised Iron Maiden as the band which finally defined power metal style.{{sfn|APM|2022}}
[[Employed to Serve]]'s Sammy Urwin stated: "(...) their influence is absolutely huge, Maiden are a funny one. They're the one that seems to stick out for people, especially in the hardcore scene. Everyone is into Sabbath and Priest, but Maiden can be the Marmite one of the three. But they've influenced so much metalcore. Everyone from [[Prayer for Cleansing|Prayer For Cleansing]], [[Unearth]] and [[Darkest Hour (band)|Darkest Hour]] – the influence of records like ''The Number Of The Beast'' on bands like that is undeniable. Not just influential on a musical level, ''The Number Of The Beast'' is as much a part of heavy music culture as it is a straightforward, mandatory soundtrack for diehard metalheads. In fact, the album has transcended its heavy metal origins and passed into the broader mainstream."{{sfn|NOTB40|2021}}
Famous pop singer [[Lady Gaga]] stated she admires what Iron Maiden have achieved in their career and aims to follow in their path. "The devotion of the fans moving in unison, pumping their fists, watching the show, when I see that, I see the paradigm for my future and the relationship I want to have with my fans. Iron Maiden‘s never had a hit song, and they tour stadiums around the world, and their fans live, breathe and die for Maiden, and that is my dream. That is my dream."{{sfn|Lady GaGa on Maiden|2021}} [[Chuck D]], founder of the iconic rap group [[Public Enemy]], admits: "The whole idea for the Public Enemy concept album began with our amazement that bands like Iron Maiden were able to include a number of messages and details on the covers of their albums."{{sfn|PubE|2022}} [[Joakim Brodén|Joakim Broden]], songwriter who is the lead vocalist, keyboardist, and occasional third guitarist of the Swedish heavy metal band [[Sabaton (band)|Sabaton]], stated Iron Maiden's ''[[The Number of the Beast (album)|The Number of the Beast]]'' "is an album that defines an entire music genre". Band's formula secret is about "taking the energy of punk and put it into heavy metal without losing any of what made metal great."{{sfn|Sabaton on Maiden|2021}}
Other artists who cite the band as an influence include [[Chris Jericho]], a professional wrestler and lead singer of [[Fozzy]],{{sfn|MTV|2006(b)}} multi-instrumentalist [[Twiggy Ramirez]] ([[Marilyn Manson]], [[A Perfect Circle]], [[Nine Inch Nails]]),{{sfn|Twiggy Ramirez|2021}} [[Myles Kennedy]] an American musician, singer, and songwriter, best known as the lead vocalist and rhythm guitarist of the rock band [[Alter Bridge]], and as the lead vocalist in guitarist [[Slash (musician)|Slash]]'s backing band,{{sfn|MKIM|2021}} guitarist [[Dave Navarro]] ([[Jane's Addiction]], [[Red Hot Chili Peppers]], [[Guns N' Roses]], [[Nine Inch Nails]], [[Alanis Morissette]]),{{sfn|Navarro|2021}} [[Serj Tankian]], frontman of [[System of a Down]],{{sfn|SOAD|2021}} [[Zoltan Bathory]], the guitarist of [[Five Finger Death Punch]],{{sfn|FFDP|2021}} musicians of an American heavy metal band [[Lamb of God (band)|Lamb of God]],{{sfn|LOG|2021}} [[David Vincent (musician)|David Vincent]] and [[Steve Tucker (musician)|Steve Tucker]] of [[Morbid Angel]],{{sfn|Morbid Angel|2021}} [[Lee Altus]] of Exodus and [[Heathen (band)|Heathen]],{{sfn|Altus|2021}} musicians of American progressive metal band [[Mastodon (band)|Mastodon]],{{sfn|Mastodon|2021}} [[Tom Morello]], the lead guitarist of [[RATM]] and [[Audioslave]],{{sfn|Morello|2021}} [[Cam Pipes]], lead vocalist of [[3 Inches of Blood]],{{sfn|Charlesworth|2009}} [[Joey Vera]] bassist of [[Armored Saint]],{{sfn|Vera Armored Saint|2021}} Vitaly Dubinin, bassist of [[Aria (band)|Aria]],{{sfn|Lenta.ru|2010}} [[Michel Langevin]], founding member and drummer of [[Voivod (band)|Voivod]],{{sfn|Voivod on Maiden|2021}} [[Mille Petrozza]], vocalist and lead guitarist of [[Kreator (band)|Kreator]],{{sfn|Mille Petrozza|2018}} [[Marcel Schirmer]] of German thrash metal band [[Destruction (band)|Destruction]],{{sfn|Schirmer|2016}} [[Chuck Schuldiner]], late frontman, founder and guitarist of [[Death (metal band)|Death]],{{sfn|Schuldiner|2019}} [[Paul Allender]], guitarist of British extreme metallers [[Cradle of Filth]],{{sfn|COF|2021}} [[Adam Nergal Darski]], co-founder, frontman, composer and the lead guitarist of Polish [[blackened death metal]] band [[Behemoth (band)|Behemoth]],{{sfn|Nergal|2021}} [[David Draiman]], the vocalist of American band [[Disturbed (band)|Disturbed]],{{sfn|David Draiman|2021}} [[Ihsahn]], composer, vocalist and lead guitarist of [[Emperor (band)|Emperor]],{{sfn|Ihsahn|2021}} musicians of German power metal band [[Helloween]],{{sfn|Helloween on Maiden|2021}} American metal band [[Machine Head (band)|Machine Head]],{{sfn|Machine Head|2021}} Washington-based band the [[Melvins]],{{sfn|Melvins|2021}} [[Bay Area thrash metal]] band [[Death Angel]],{{sfn|Death Angel|2021}} American progressive metal band [[Fates Warning]],{{sfn|Fates Warning|2021}} Canadian rock band [[Sum 41]],{{sfn|Sum 41|2021}} American rock band [[Skid Row (American band)|Skid Row]],{{sfn|Skid Row|2021}} American heavy metal bands [[Sanctuary (band)|Sanctuary]] and [[Nevermore (band)|Nevermore]],{{sfn|SancNever|2021}} [[Paul Gilbert]], co-founder of [[Mr. Big (American band)|Mr. Big]] band,{{sfn|Gilbert|2021}} [[Jon Schaffer]], the rhythm guitarist and principal songwriter of the Florida-based heavy metal band [[Iced Earth]],{{sfn|Iced Earth|2021}} [[Mikael Åkerfeldt]], guitarist and lead vocalist of [[Opeth]],{{sfn|Lawson|2013}} and [[X Japan]] drummer [[Yoshiki (musician)|Yoshiki]] and former guitarist [[Hide (musician)|hide]].{{sfn|Kakizawa}}{{sfn|Kato}} [[Andreas Kisser]] and [[Max Cavalera]] of Brazilian metal band [[Sepultura]].{{sfn|MCIM|2022}}{{sfn|AKIM|2022}} Welsh heavy metal band [[Bullet for My Valentine]],{{sfn|BFMV|2021}} American rock band [[My Chemical Romance]],{{sfn|MCHR|2021}} musicians of [[Sentenced (band)|Sentenced]],{{sfn|Sentenced on Maiden|2021}} [[Cristina Scabbia]] of [[Lacuna Coil]],{{sfn|LacunaCoil IM|2021}} [[Ville Valo]], the frontman of [[HIM (Finnish band)|HIM]],{{sfn|Ville Valo|2007|p=14}} also musicians of [[Amorphis]]{{sfn|Amorphis|2021}} and [[Therion (band)|Therion]].{{sfn|Therion|2021}} Both current and former [[Dream Theater]] members [[John Petrucci]], [[John Myung]], and [[Mike Portnoy]] have stated that Iron Maiden were one of their biggest influences.{{sfn|Blabbermouth.net|2010e}} [[Kat Von D]] a Mexican-American tattoo artist, model, entrepreneur and recording artist was influenced by the band.{{sfn|KVD|2021}} Franck Hueso better known as [[Carpenter Brut]] listed Iron Maiden's second album ''Killers'' among ten records which changed his life.{{sfn|CBO|2022}} Lorenzo Raganzini a techno musician and the performer who uses remixes of metal music including Iron Maiden's classics, described the band as one of his greatest inspirations.{{sfn|Lorenzo|2022}}
Iron Maiden's musical style has also influenced many Scandinavian extreme metal bands including [[Nifelheim]],{{sfn|Nifelheim|2021}} [[Watain]],{{sfn|Watain|2021}} [[Dissection (band)|Dissection]],{{sfn|Dissection|2021}} [[Dimmu Borgir]],{{sfn|Dimmu|2021}} [[Varg Vikernes]] of [[Burzum]],{{sfn|Vikernes|2021}} [[Fenriz]] of [[Darkthrone]]{{sfn|Fenriz|2021}} just to name a few. Greek metal stage was extremely influenced by the band, not mentioning traditional heavy metal bands, many Hellenic Black Metal artists were inspired by Iron Maiden. Musicians of [[Rotting Christ]],{{sfn|RCh|2022}} Varathron,{{sfn|Varathron|2022}} [[Necromantia]],{{sfn|Necro|2022}} or Yoth Iria have been stating about English formation has influenced on them.{{sfn|YI|2022}} Polish heavy metal pioneers [[Turbo (Polish band)|Turbo]] many times have mentioned about Iron Maiden being one of their biggest influences to date. The band's second album ''[[Smak ciszy]]'' (1985) was officially dedicated to Iron Maiden. A few decades later Turbo musicians supported live former Maiden's frontman [[Paul Di'Anno]].{{sfn|Turbo|2021}}
Among the countless musicians and bands which have been introduced into metal or influenced by Iron Maiden are: [[Gene Hoglan]] of [[Dark Angel (band)|Dark Angel]], [[Dethklok]] and ex-Death, Testament, [[Strapping Young Lad]] and [[Fear Factory]],{{sfn|Hoglan|2021}} the late [[Dimebag Darrell]] of [[Pantera]] and [[Damageplan]],{{sfn|Dime|2022}} [[Vicious Rumors]],{{sfn|Vicious|2021}} [[Anathema (band)|Anathema]],{{sfn|Anathema|2021}} [[Aaron Stainthorpe]] of [[My Dying Bride]],{{sfn|MDB|2021}} [[Bobby Ellsworth|Bobby 'Blitz' Ellsworth]] of [[Overkill (band)|Overkill]],{{sfn|Overkill|2021}} [[Karl Sanders]] of [[Nile (band)|Nile]],{{sfn|Sanders|2021}} [[Gojira (band)|Gojira]],{{sfn|Gojira|2021}} [[Moonspell]],{{sfn|Moonspell|2021}} [[HammerFall|Hammerfall]],{{sfn|Hammerfall|2021}} [[Kurdt Vanderhoof]] of [[Metal Church]],{{sfn|Vanderhoof|2021}} [[Annihilator (band)|Annihilator]]'s [[Jeff Waters]],{{sfn|Annihilator|2021}} [[Jørn Lande|Jorn Lande]],{{sfn|Jorn|2021}} [[Carcass (band)|Carcass]],{{sfn|Carcass|2021}} [[Stratovarius]],{{sfn|Stratovarius|2021}} [[Warlock (band)|Warlock]],{{sfn|Warlock|2021}} [[Larry LaLonde]] of [[Primus (band)|Primus]] and ex-[[Possessed (band)|Possessed]] and [[Blind Illusion]],{{sfn|LaLonde|2021}} [[Queensrÿche|Queensryche]],{{sfn|Queensryche|2021}} [[Michael Amott]] of [[Arch Enemy]],{{sfn|Arch Enemy|2021}} [[Funeral for a Friend]],{{sfn|FFAF|2021}} [[Children of Bodom]],{{sfn|Bodom|2021}} [[Running Wild (band)|Running Wild]],{{sfn|RWild|2021}} [[Grave Digger (band)|Grave Digger]],{{sfn|Digger|2021}} [[Necrophobic]],{{sfn|Necrophobic|2021}} [[Chris Barnes (musician)|Chris Barnes]] of [[Six Feet Under (band)|Six Feet Under]] and ex-[[Cannibal Corpse]],{{sfn|Barnes|2021}} [[George Fisher (musician)|George "Corpsegrinder" Fisher]] of [[Cannibal Corpse]],{{Sfn|CCI|2021}} [[Wolf (band)|Wolf]],{{sfn|Wolf|2021}} [[Edguy]],{{sfn|Edguy|2021}} [[Angra (band)|Angra]],{{sfn|Angra|2021}} [[Blind Guardian]],{{sfn|Blind Guardian|2021}} [[Nuclear Assault]],{{sfn|Lilker|2022}} [[Gamma Ray (band)|Gamma Ray]],{{sfn|Gamma|2021}} [[Iron Savior]],{{sfn|Iron Savior|2021}} [[Powerwolf]],{{sfn|Powerwolf|2021}} [[Zeal & Ardor]],{{sfn|Z&A|2022}} [[Marek Pająk]], guitarist of [[Vader (band)|Vader]], Nocny Kochanek,{{sfn|Polish Metal Alliance|2021}} Scream Maker,{{Sfn|SMI|2022}} CETI,{{sfn|CETI|2022}} [[Sepultura]],{{sfn|Sepultura|2021}} [[A Wilhelm Scream]],{{sfn|AWS|2022}} [[Savatage]],{{sfn|Savatage|2021}} [[Dirty Rotten Imbeciles|D.R.I.]],{{sfn|D.R.I.|2021}} Tony Hawk's [[Tony Hawk's (series)|Pro Skater]], [[Escape the Fate]], [[Hellsongs]], [[Candiria]],{{sfn|NOTB40|2021}} [[Sodom (band)|Sodom]],{{sfn|Sodom|2021}} [[Sacred Reich]],{{sfn|SR|2022}} [[Coroner (band)|Coroner]],{{sfn|Coroner|2022}} [[Watchtower (band)|Watchtower]],{{sfn|Watchtower|2022}} [[Wrathchild America]],{{sfn|WA|2022}} [[Forced Entry (band)|Forced Entry]],{{sfn|FE|2022}} [[Flotsam and Jetsam (band)|Flotsam and Jetsam]] (whose song "[[Flotsam and Jetsam (Flotsam and Jetsam album)|Iron Maiden]]" is a tribute to the band){{sfn|Flotsam and Jetsam|2021}} and surreal artist Vincent Castiglia{{sfn|VCA|2022}} among many others.
[[Brian Slagel]], the owner of [[Metal Blade Records]], stated: "''[[The Number of the Beast (album)|The Number Of The Beast]]'', to me, still to this day, is the perfect heavy metal album. Everything is perfect. The sound is perfect, the songs are perfect, the lyrics are perfect. It's the ultimate heavy metal album and it checks off all the boxes. Forty years on, the influence of ''The Number Of The Beast'' can be heard in a vast array of contemporary heaviness, and it might be quicker to list notable metal musicians who don't cite the record as an inspiration. For me it along a time when I was really heavily getting into the whole metal thing. I was starting my record company and it was a pivotal point in my life, and which determined what I would do for the rest of it! Maiden motivated me to do whatever I could to make other people hear this amazing music. It was a life-changing experience."{{sfn|NOTB40|2021}}
As noticed music journalist [[Geoff Barton]], the band's music constituted an important passage between the classic heavy rock school of the turn of the 1960s and 1970s, based on rhythm 'n blues, and contemporary heavy metal, characterised by sub-genre diversification and stylistic eclecticism.{{sfn|Barton|2015|p=150}} According to [[Rock 'n Roll Fantasy Camp]] the style and attitude of Iron Maiden drummer [[Nicko McBrain]] has inspired generations of heavy-metal drummers that followed.{{sfn|RNRFC|2021}} As stated the former editor of the German magazine ''[[Rock Hard (magazine)|Rock Hard]]'', Götz Kühnemund, Iron Maiden were (and still are) the inspiration for all the heavy metal bands we know today because they're an intrinsically heavy metal group. It is equally important for those who play power metal, speed, thrash, death, black, hard rock – almost every genre. Iron Maiden took hard rock from the '70s, took it into the' 80s, and created a new genre that didn't exist before. This band introduced a [[DIY]] approach to all rock music. They even more than all the others popularised guitar harmonies in metal. Many metal bands in existence today have two guitarists, who use double guitar harmonies, and that's where they are inspired by Iron Maiden.{{sfn|Götz Kühnemund|2019}}
Jörg Pistorius, German music journalist, stated there is: "No single band can claim to have created or invented heavy metal. However, there is one that shaped it and was largely responsible for making it a globally recognized style and market segment with high sales potential. (…) Iron Maiden played fast guitar figures sparkling with energy, combined with harmonious melodies and choruses that could be sung immediately. No band has shaped heavy metal as much as Iron Maiden."{{sfn|VTNOTB|2022}}
[[Ian Christe]], the Swiss musician, music journalist and an author of publication entitled ''[[Sound of the Beast]]'' claimed that Iron Maiden are responsible for the further development of the genre, carried out under the aegis of the New Wave of British Heavy Metal. As he claimed, Iron Maiden, together with Judas Priest, is responsible for the greatest development of the metal genre. While AC/DC and Black Sabbath remained primal, dark, it was Iron Maiden and Judas Priest who transformed the twin guitar harmonies, creating a whole new quality.{{sfn|SotB|2022}}
According to music journalist and the writer [[Neil Daniels]] Iron Maiden "redefined the whole genre blending classic heavy rock influence with punky vibe, twin guitars attack and progressive approach which finally have created the new quality. Band's influence on generations of rock and metal bands cannot be overstated. They elevated metal to an art form, proving that academic and musical inspirations can coexist."{{sfn|Neil Daniels|2019b}} From the artist's profile published by the [[Rock and Roll Hall of Fame]] it appears that "in the 1980s, Iron Maiden released seven high-octane albums that cemented them as one of the greatest rock bands – creating a blueprint for how heavy metal bands should look, sound and tour."{{sfn|RnRHoF Note|2021}}
Former guitarist and co-founder of Judas Priest band, [[K.K. Downing]], confessed Iron Maiden's "music does not quite suit my taste, I cannot deny that it has had a great influence on heavy metal and music in general. As a Brit, I am terribly proud of what they have managed over the years to fill the niche they have created. Besides, I have always admired them for being able to achieve such a great commercial success for their marketing activities."{{sfn|K.K. Downing|2018|pp=138–139}}
[[Steve Harris (musician)|Steve Harris]] is considered one of the most influential musicians and composers in heavy rock history. He is also the author of the lion's share of the Iron Maiden's repertoire and the creator of the archetypal composition pattern in modern metal. In addition to writing riffs, vocal melodies and lyrics for most songs, he was also involved in audio-visual production and editing. The riffs created by him are among the most unforgettable in history, as evidenced by compositions such as "[[The Trooper]]", "[[The Number of the Beast (song)|The Number of the Beast]]", "[[Phantom of the Opera (Iron Maiden song)|Phantom of the Opera]]", "[[Run to the Hills]]", "[[Fear of the Dark (song)|Fear of the Dark]]" or "[[Hallowed Be Thy Name (song)|Hallowed Be Thy Name]]". The creator of Iron Maiden has been repeatedly named the best and most influential metal bassist of all time. He is also the originator of extremely expressive, galloping bass lines. His compositional style is based on triplets consisting of sixteenths and eighth notes, creating intense rhythmic background for a double (then triple) guitar attack. Steve Harris is one of the few bass players who can play extremely fast and dense – only with his fingers! This ability has become a sensation in the context of the entire heavy metal scene. According to the [[Ultimate Classic Rock]] editors "technically it was incredibly impressive to achieve so much speed and dynamics in the sound without using a standard pick". The founder of Iron Maiden inspired masses of future musicians, including such thrash metal bassists as [[Frank Bello|Frankie Bello]] of Anthrax, and former and current Metallica bassists [[Cliff Burton]], [[Jason Newsted]], and [[Robert Trujillo]].{{sfn|Harris|2021}}
===Appearance in media===
The first heavy metal videos in history broadcast by [[MTV]] were the images for the live versions of "Iron Maiden" and "Wrathchild" taken from official VHS ''[[Live at the Rainbow|Live at the Rainbow (Iron Maiden)]]''.{{sfn|MTV|2021}}{{sfn|List25|2021}} The song "Flash of the Blade" was included on the soundtrack of [[Dario Argento]]'s 1985 horror film ''[[Phenomena (film)|Phenomena]]'' (AKA "Creepers") and was covered by the American band [[Avenged Sevenfold]] on their double live album/DVD ''[[Live in the LBC & Diamonds in the Rough]]''. [[Rhapsody of Fire]] have also recorded a cover of the song that is featured on the deluxe edition of their album ''[[From Chaos to Eternity]]''. "Flash of the Blade" can also be heard in the ''[[Jem and the Holograms]]'' episode "Kimber's Rebellion", just after the cartoon band members return home from Paris, on a boom-box stereo being carried by a passerby.{{sfn|DDotB|2021}}
The band's name has been mentioned prominently in several songs, such as the singles "[[Teenage Dirtbag]]" by [[Wheatus]],{{sfn|Basham|2000}} "[[Back to the 80's (song)|Back to the 80's]]" by Danish dance-pop band [[Aqua (band)|Aqua]].{{sfn|MetroLyrics(1)}} and "[[Fat Lip]]" by [[Sum 41]].{{sfn|Sputnikmusic(1)}} Iron Maiden have also been referenced in [[Weezer]]'s "Heart Songs" (from their 2008 self-titled "[[Weezer (2008 album)|Red]]" album),{{sfn|MetroLyrics(2)}} [[Blues Traveller]]'s "Psycho Joe" (from 1997's ''[[Straight On till Morning (album)|Straight on till Morning]]''),{{sfn|MetroLyrics(3)}} and [[NOFX]]'s "Eddie, Bruce and Paul" (from their 2009 album ''[[Coaster (album)|Coaster]]''), which [[Sputnikmusic]] describes as "a humorous retelling of Paul DiAnno's departure".{{sfn|Thomas|2009}}
The number of releases and ventures in tribute to the British formation can be estimated in hundreds, moreover - the reinterpretations of the band's achievements make up an extremely wide range of stylistic variants, such as: numerous sub-genres of rock and metal, soul, pop, classics, symphonic music, alternative music, electro, techno, industrial, hip-hop, rap, reggae, ska, jazz, chorales, pastiches, piano music, early music, string music, early music or acoustic versions with a wide range of classical instruments.{{sfn|Tribute1|2021}}{{sfn|Tribute2|2021}} In 2008, ''[[Kerrang!]]'' released ''[[Maiden Heaven: A Tribute to Iron Maiden]]'', an album composed of Iron Maiden cover songs performed by Metallica, [[Machine Head (band)|Machine Head]], [[Dream Theater]], Trivium, [[Coheed and Cambria]], Avenged Sevenfold, and other groups influenced by the band.{{sfn|Kerrang!|2008}} In 2010, [[Maiden uniteD]], an acoustic tribute band consisting of members of [[Ayreon]], [[Threshold (band)|Threshold]] and [[Within Temptation]], released ''[[Mind the Acoustic Pieces]]'', a re-interpretation of the entire ''[[Piece of Mind]]'' album.{{sfn|Maiden United}} As of 2021 nearly 200 Iron Maiden cover audio-visual releases exist (each featuring various artists), including piano,{{sfn|AllMusic}} electro,{{sfn|Aquarius Records}} string quartet{{sfn|Loftus}} and hip-hop tributes among many others.{{sfn|AllMusic(2)}}
Iron Maiden songs have been featured in the soundtracks of several video games, including ''[[Carmageddon 2]]'',{{sfn|Giant Bomb}} ''[[Grand Theft Auto: Vice City]]'',{{sfn|IGN}} ''[[Grand Theft Auto: Episodes from Liberty City]]'',{{sfn|Allgame}} ''[[Grand Theft Auto IV: The Lost and Damned]]'',{{sfn|Rockstar Games}} Marvel's ''[[Guardians of the Galaxy]]'',{{sfn|Polygon2021|2021}} ''[[Tony Hawk's Pro Skater 4]]'',{{sfn|Blabbermouth.net|2002}} ''[[SSX on Tour]]''{{sfn|Cheat Code Central}} and ''[[Madden NFL 10]]''.{{sfn|Metal Insider|2009}} Their music also appears in the ''[[Guitar Hero]] ''and ''[[Rock Band (video game)|Rock Band]]'' series of [[music video game|rhythmic video games]].{{sfnm|1a1=East|1y=2009|2a1=Rock Band}} The U.S shooter game entitled ''[[PowerSlave]]'' was a reference to the Iron Maiden's album of the same name, released In 1984, which also features an Egyptian-themed cover.{{sfn|PSMG|2022}}{{sfn|PSRU|2022}}
[[Transformers (toy line)|Transformers]] author Bill Forster is an avowed Iron Maiden fan and made several Iron Maiden references, including song lyrics and the phrase "Up the Irons" in his books, including ''[[The Transformers: The Ark : A Complete Compendium of Transformers Animation Models|The Ark]]'' series and ''The AllSpark Almanac'' series.{{sfnm|1a1=Angelfire(1)|2a1=Angelfire(2)}} Iron Maiden music, lyrics, themes, fans and iconography have appeared in many episodes and movies including quasi-documentary comedies as ''Schemers'',{{sfn|Schemers|2020}} ''The Night of the Beast''{{sfn|The Night of the Beast|2020}} also in documentary movies such as ''[[Global Metal]]''{{sfn|Global Metal|2008}} or band's own ''[[Flight 666]]'' among many others.{{sfn|Flight 666 the movie|2009}} Iron Maiden songs have also appeared in films, such as ''[[Phenomena (film)|Phenomena]]'' (entitled ''Creepers'' in the US),{{sfn|BillWyman.com|2014}} and ''[[Murder by Numbers]]'';{{sfn|JoBlo.com}} while MTV's animated duo [[Beavis and Butt-Head]] have commented favourably on the band several times.{{sfnm|1a1=Wardlaw|2a1=Ling|2y=2005}} "[[The Trooper]]" song and elements of the band's image appeared in a youth musical comedy entitled ''[[Metal Lords]]'' broadcast on [[Netflix]].{{sfn|MLNX|2022}}
[[Bruce Dickinson]] is the most active in media member of the band. Iron Maiden frontman presented ''Bruce Dickinson's Friday Rock Show'' on [[BBC]] radio station [[6 Music]] from 2002 to 2010.{{sfn|FRS|2010}} In addition to his show on 6 Music, Dickinson also hosted a series entitled ''Masters of Rock'' on [[BBC Radio 2]] from 2003 to 2007.{{sfn|MOR BBC|2007}} His singing and episode acting were presented in ''The Club Paradise'',{{sfn|Club Paradise|1990}} ''[[Mr Bean|Mr Bean's Elected]]'',{{sfn|Mr Bean|1991}} and ''[[A Nightmare on Elm Street: The Dream Child]]''{{sfn|Nightmare|1989}} Dickinson's aviation passion and storytelling talent were reflected in ''[[Flying Heavy Metal|Flying Heavy Metal (Discovery Series)]]'' among many other documents.{{sfn|Flying Heavy Metal|2005}} Bruce Dickinson was the main character of the ''Psycho Schizo Espresso'' podcast, which was published on social platforms. The topics of individual episodes were phenomena that could not be explained in a rational way. The interviews with controversial people were also broadcast.{{sfn| PSE |2022}}
===Claims of Satanic references===
In 1982, the band released one of their most popular, controversial and acclaimed albums, ''[[The Number of the Beast (album)|The Number of the Beast]]''. The artwork and title track led to Christian groups in the United States branding the band as [[Satanism|Satanists]], encouraging people to destroy copies of the release.{{sfn|Young(1)}} The band's manager, Rod Smallwood, later commented that Christians initially burnt the records, but later decided to destroy them with hammers through fear of breathing in the melting vinyl's fumes.{{sfnm|1a1=Eagle Vision|1y=2001|2a1=Young(1)}} The protests were not restricted to the US, with Christian organisations preventing Iron Maiden from performing in Chile in 1992.{{sfn|Brave Words & Bloody Knuckles|2011(2)}}
Contrary to the accusations, the band have always denied the notion that they are Satanists, with lead vocalist, Bruce Dickinson, doing so on-stage in the ''[[Live After Death]]'' concert video.{{sfn|EMI|2008}} Steve Harris has since commented that, "It was mad. They completely got the wrong end of the stick. They obviously hadn't read the lyrics. They just wanted to believe all that rubbish about us being Satanists."{{sfn|Wall|2004b6|p=228}} Harris has also stated that "[[The Number of the Beast (song)|The Number of the Beast]]" song was inspired by a nightmare he had after watching ''[[Damien: Omen II]]'',{{sfn|Wall|2004b7|p=224}} and also influenced by [[Robert Burns]]' "[[Tam o' Shanter (poem)|Tam o' Shanter]]".{{sfn|Eagle Vision|2001}} Furthermore, the band's drummer, [[Nicko McBrain]], has been a born-again Christian since 1999.{{sfn|Godscare}}
===Ed Force One===
[[File:Boeing 757-23A, Astraeus AN1497690.jpg|thumb|The band's former Ed Force One, a [[Boeing 757-200]]]]
For their [[Somewhere Back in Time World Tour]] in 2008 and 2009, Iron Maiden commissioned an [[Astraeus Airlines]] [[Boeing 757]]<!-- The first two Ed Force Ones were Boeing 757s. They upgraded to a 747 for the 2016 Book of Souls tour. --> as transport.{{sfnm|1a1=Bezer|1y=2008|2a1=Metal Storm|2y=2007}} The aeroplane was converted into a [[combi aircraft|combi]] configuration, which enabled it to carry the band, their crew and stage production, thereby allowing the group to perform in countries which were previously deemed unreachable logistically.{{sfn|Metal Storm|2007}} It was also repainted with a special Iron Maiden livery,{{sfn|Metal Storm|2007}} which the airline decided to retain after receiving positive feedback from customers.{{sfn|Blabbermouth.net|2008}}
[[File:Boeing747-IronMaiden01.jpg|thumb|left|Iron Maiden's Ed Force One, a [[Boeing 747-400]], as used during The Book of Souls World Tour in 2016.]]
The aircraft, named "Ed Force One" after a competition on the band's website,{{sfn|Cashmere|2008}} was flown by Dickinson, as he was also a commercial airline pilot for Astraeus, and plays a major role in the award-winning documentary{{sfnm|1a1=Juno Awards|1y=2010|2a1=Bezer|2y=2009c}} ''[[Iron Maiden: Flight 666]]'', which was released in cinemas in 42 countries in April 2009.{{sfn|Bezer|2009a}} A different aeroplane (registered G-STRX){{sfn|EMI|2012}} was used for [[The Final Frontier World Tour]] in 2011 with altered livery, adopting the artwork of ''[[The Final Frontier]]'' album,{{sfn|Blabbermouth.net|2010d}} and features heavily in the 2012 documentary "[[En Vivo! (Iron Maiden album)|Behind the Beast]]".
For [[The Book of Souls World Tour]] in 2016, the band upgraded to an ex-[[Air France]] [[Boeing 747-400]] jumbo jet, supplied by [[Air Atlanta Icelandic]] (registered TF-AAK){{sfnm|1a1=PlaneSpotters.net|2a1=Sands|2y=2016}} and customised by [[Volga-Dnepr Airlines|Volga-Dnepr Gulf]],{{sfn|volga-dnepr.com|2016}} which allows for more space without the aircraft having to undergo a significant conversion to carry their equipment.{{sfn|Lach|2015b}} In January 2022, Bruce Dickinson told the [[Associated Press]] that he would not be piloting band's plane on their upcoming tour citing his nearing the mandatory age limit for commercial airline pilots. According to the [[Federal Aviation Administration]] (FAA) and the [[International Civil Aviation Organization]] (ICAO), commercial pilots must retire at age 65. However, there is currently no maximum age limit for being a private pilot or for being an Air Force pilot.{{sfn|EF1B|2022}}
==Musical style and influences==
{{Listen
|filename= IronMaidenRTTH.ogg
|title= "Run to the Hills" (1982)
|description= "Run to the Hills" (''The Number of the Beast'') demonstrates the band's trademark "gallop" riff style.
|filename2= IronMaidenCSIT.ogg
|title2= "Caught Somewhere in Time" (1986)
|description2= "Caught Somewhere in Time" (''Somewhere in Time''). The band's use of harmonised guitars and usage of "gallop" rhythm remains unchanged as synthesisers are added.
|filename3= IronMaidenBNW.ogg
|title3= "Brave New World" (2000)
|description3= "Brave New World" (''Brave New World'') demonstrates the band's increased use of progressive elements in the latter half of their career.
}}
Steve Harris, Iron Maiden's bassist and primary songwriter,{{sfn|MusicRadar|2010}} has stated that his influences include [[Black Sabbath]], [[Deep Purple]], [[Led Zeppelin]], [[Uriah Heep (band)|Uriah Heep]], [[Pink Floyd]], [[Genesis (band)|Genesis]], [[Yes (band)|Yes]], [[Jethro Tull (band)|Jethro Tull]], [[Thin Lizzy]], [[UFO (band)|UFO]], [[Queen (band)|Queen]] and [[Wishbone Ash]].{{sfnm|1a1=Blabbermouth.net|1y=2004ca|2a1=EMI|2y=2004|3a1=Wall|3y=2004zw|3p=27|4a1=Wall|4y=2004wz|4p=154}} In 2010 Harris stated, "I think if anyone wants to understand Maiden's early thing, in particular the harmony guitars, all they have to do is listen to Wishbone Ash's ''[[Argus (album)|Argus]]'' album. Thin Lizzy too, but not as much. And then we wanted to have a bit of a prog thing thrown in as well, because I was really into bands like Genesis and Jethro Tull. So you combine all that with the heavy riffs and the speed, and you've got it."{{sfn|Bienstock|2011}} In 2004, Harris explained that the band's "heaviness" was inspired by "Black Sabbath and Deep Purple with a bit of Zeppelin thrown in."{{sfn|Blabbermouth.net|2004c}} On top of this, Harris developed his own playing style, which guitarist Janick Gers describes as "more like a rhythm guitar,"{{sfn|Popoff|2005(c)}} cited as responsible for the band's galloping style,{{sfn|Fender}} heard in such songs as "[[The Trooper]]"{{sfn|Huey(2)}} and "Run to the Hills."{{sfn|Lawson}}
The band's guitarists, Dave Murray, Adrian Smith, and Janick Gers, each have their own individual influences and playing style. Dave Murray is known for his [[legato]] technique which, he claims, "evolved naturally. I'd heard [[Jimi Hendrix]] using legato when I was growing up, and I liked that style of playing."{{sfn|McIver|2010(a)}} Stating that he "was inspired by [[blues rock]] rather than metal," Adrian Smith was influenced by [[Johnny Winter]] and [[Pat Travers]], leading to him becoming a "melodic player."{{sfn|McIver|2010(c)}} Janick Gers, on the other hand, prefers a more improvised style, largely inspired by [[Ritchie Blackmore]],{{sfn|Wall|2004b8|p=277}} which he claims is in contrast to Smith's "rhythmic" sound.{{sfn|McIver|2010(b)}}
Singer Bruce Dickinson, who typically works in collaboration with guitarist Adrian Smith,{{sfn|Wall|2004b14|p=244}} has an operatic vocal style, inspired by [[Arthur Brown (musician)|Arthur Brown]], [[Peter Hammill]], [[Ian Anderson]] and [[Ian Gillan]],{{sfn|Dmme.net}} and is often considered to be one of the best heavy metal vocalists of all time.{{sfnm|1a1=Rosen|1y=2011|2a1=HearYa.com|2y=2006|3a1=Blabbermouth.net|3y=2009a|4a1=Blabbermouth.net|4y=2009b}} Although Nicko McBrain has only received one writing credit, on the ''Dance of Death'' album,{{sfn|Ling|2005b}} Harris often relies on him while developing songs. Adrian Smith commented, "Steve loves playing with him. [They] used to work for hours going over these bass and drum patterns."{{sfn|Wall|2004b9|p=241}}
Throughout their career, the band's style has remained largely unchanged, in spite of the addition of guitar synthesisers on 1986's ''Somewhere in Time'',{{sfn|Prato}} keyboards on 1988's ''Seventh Son of a Seventh Son'',{{sfn|Wall|2004b10|p=265}} and an attempt to return to the "stripped down" production of their earlier material on {{notatypo|1990's}} ''No Prayer for the Dying''.{{sfn|Wall|2004b11|p=283}} In recent years, however, the band have begun using more [[progressive rock|progressive]] elements in their songs,{{sfnm|1a1=Dome|1y=2006a|2a1=Dome|2y=2006b}} which Steve Harris describes as not progressive "in the modern sense, but like [[Dream Theater]], more in a 70s way".{{sfn|Dome|2006b}} According to Harris, ''Seventh Son of a Seventh Son'' was the band's first album which was "more progressive",{{sfn|Wall|2004b12|p=264}} while they would only return to this style from 1995's ''The X Factor'', which he states is "like an extension of ''Seventh Son''..., in the sense of the progressive element to it".{{sfn|Wall|2004b13|p=311}} The development contrasts with the band's raw-sounding earlier material,{{sfn|Bienstock|2011}} which [[AllMusic]] states was "clearly drawing from elements of punk rock",{{sfn|Huey(1)}} although Harris firmly denies this.{{sfn|VH1|2011}}
==Band members==
{{further|List of Iron Maiden band members}}
{{col-begin}}
{{col-2}}
* [[Steve Harris (musician)|Steve Harris]] – [[Bass guitar|bass]], [[Backing vocalist|backing vocals]] <small>(1975–present)</small>, [[Keyboard instrument|keyboard]]s <small>(1988, 1998–present)</small>
* [[Dave Murray (musician)|Dave Murray]] – [[Electric guitar|guitar]]s <small>(1976–1977, 1978–present)</small>
* [[Adrian Smith]] – guitars, backing vocals <small>(1980–1990, 1999–present)</small>, keyboards <small>(1988)</small>
* [[Bruce Dickinson]] – [[Lead vocalist|lead vocals]] <small>(1981–1993, 1999–present)</small>, [[piano]] <small>(2015)</small>
* [[Nicko McBrain]] – [[Drum kit|drums]] <small>(1982–present)</small>
* [[Janick Gers]] – guitars <small>(1990–present)</small>
'''Touring musicians'''
* Michael Kenney – keyboards <small>(1988–present)</small>
{{col-end}}
==Discography==
{{main|Iron Maiden discography|List of songs recorded by Iron Maiden}}
{{col-begin}}
{{col-break|width=33%}}
* ''[[Iron Maiden (album)|Iron Maiden]]'' (1980)
* ''[[Killers (Iron Maiden album)|Killers]]'' (1981)
* ''[[The Number of the Beast (album)|The Number of the Beast]]'' (1982)
* ''[[Piece of Mind]]'' (1983)
* ''[[Powerslave]]'' (1984)
* ''[[Somewhere in Time (Iron Maiden album)|Somewhere in Time]]'' (1986)
* ''[[Seventh Son of a Seventh Son]]'' (1988)
* ''[[No Prayer for the Dying]]'' (1990)
* ''[[Fear of the Dark (Iron Maiden album)|Fear of the Dark]]'' (1992)
* ''[[The X Factor (album)|The X Factor]]'' (1995)
* ''[[Virtual XI]]'' (1998)
* ''[[Brave New World (Iron Maiden album)|Brave New World]]'' (2000)
* ''[[Dance of Death (album)|Dance of Death]]'' (2003)
* ''[[A Matter of Life and Death (album)|A Matter of Life and Death]]'' (2006)
* ''[[The Final Frontier]]'' (2010)
* ''[[The Book of Souls]]'' (2015)
* ''[[Senjutsu (album)|Senjutsu]]'' (2021)
{{col-end}}
==Concert tours==
{{main|List of Iron Maiden concert tours}}
{| class="wikitable"
|-
! style="width:220px;" rowspan="2"|Concert tour
! style="width:150px;" rowspan="2"|Duration
! colspan=6|Lineups
! style="width:40px;" rowspan="2"|Dates
|- style="font-size:smaller"
! style="width:100px;"| Vocals
! style="width:100px;"| Bass
! style="width:300px;" colspan=3|Guitars
! style="width:100px;"| Drums
|-
| Early Days Shows
| style="text-align:center;"| May 1976 – Dec 1979
| style="text-align:center;" rowspan="4"| [[Paul Di'Anno|P. Di'Anno]]
| style="text-align:center;" rowspan="25"| [[Steve Harris (musician)|S. Harris]]
| style="text-align:center;width:100px;" rowspan="25"| [[Dave Murray (musician)|D. Murray]]
| style="text-align:center;width:100px;" rowspan="3"| [[Dennis Stratton|D. Stratton]]
| rowspan="9" {{n/a}}
| style="text-align:center;" rowspan="5"| [[Clive Burr|C. Burr]]
| style="text-align:center;"|200
|-
| [[Metal for Muthas Tour]]
| style="text-align:center;"| Feb 1980
| style="text-align:center;"|30
|-
| [[Iron Maiden Tour]]
| style="text-align:center;"| Apr – Dec 1980
| style="text-align:center;"|127
|-
| [[Killer World Tour]]
| style="text-align:center;"| Feb – Dec 1981
| rowspan="6" style="text-align:center;" | [[Adrian Smith|A. Smith]]
| style="text-align:center;"|132
|-
| [[The Beast on the Road]]
| style="text-align:center;"| Feb – Dec 1982
| style="text-align:center;" rowspan="8"| [[Bruce Dickinson|B. Dickinson]]
| style="text-align:center;"|188
|-
| [[World Piece Tour]]
| style="text-align:center;"| May – Dec 1983
| style="text-align:center;" rowspan="20"| [[Nicko McBrain|N. McBrain]]
| style="text-align:center;"|151
|-
| [[World Slavery Tour]]
| style="text-align:center;"| Aug 1984 – Jul 1985
| style="text-align:center;"|193
|-
| [[Somewhere on Tour]]
| style="text-align:center;"| {{nowrap|Sep 1986 – May 1987}}
| style="text-align:center;"|157
|-
| [[Seventh Tour of a Seventh Tour]]
| style="text-align:center;"| Apr – Dec 1988
| style="text-align:center;"|103
|-
| [[No Prayer on the Road]]
| style="text-align:center;"| Sep 1990 – Sep 1991
| rowspan="5" {{n/a}}
| rowspan="16" style="text-align:center;width:100px;" |[[Janick Gers|J. Gers]]
| style="text-align:center;"|120
|-
| [[Fear of the Dark Tour]]
| style="text-align:center;"| Jun – Nov 1992
| style="text-align:center;"|66
|-
| [[Real Live Tour]]
| style="text-align:center;"| Mar – Aug 1993
| style="text-align:center;"|46
|-
| [[The X Factour]]
| style="text-align:center;"| Sep 1995 – Sep 1996
| style="text-align:center;" rowspan="2"| [[Blaze Bayley|B. Bayley]]
| style="text-align:center;"|133
|-
| [[Virtual XI World Tour]]
| style="text-align:center;"| Apr – Dec 1998
| style="text-align:center;"|83
|-
| [[The Ed Hunter Tour]]
| style="text-align:center;"| Jul – Oct 1999
| style="text-align:center;" rowspan="11"| B. Dickinson
| rowspan="11" style="text-align:center;" | A. Smith
| style="text-align:center;"|31
|-
| [[Brave New World Tour]]
| style="text-align:center;"| Jun 2000 – Mar 2002
| style="text-align:center;"|91
|-
| Give Me Ed... 'Til I'm Dead Tour
| style="text-align:center;"| May – Aug 2003
| style="text-align:center;"|57
|-
| [[Dance of Death World Tour]]
| style="text-align:center;"| Oct 2003 – Feb 2004
| style="text-align:center;"|53
|-
| [[Eddie Rips Up the World Tour]]
| style="text-align:center;"| May – Sep 2005
| style="text-align:center;"|45
|-
| [[A Matter of Life and Death Tour]]
| style="text-align:center;"| Oct 2006 – Jun 2007
| style="text-align:center;"|60
|-
| {{nowrap|[[Somewhere Back in Time World Tour]]}}
| style="text-align:center;"| Feb 2008 – Apr 2009
| style="text-align:center;"|91
|-
| [[The Final Frontier World Tour]]
| style="text-align:center;"| Jun 2010 – Aug 2011
| style="text-align:center;"|101
|-
| [[Maiden England World Tour]]
| style="text-align:center;"| Jun 2012 – Jul 2014
| style="text-align:center;"|100
|-
| [[The Book of Souls World Tour]]
| style="text-align:center;"| Feb 2016 – Jul 2017
| style="text-align:center;"|117
|-
| [[Legacy of the Beast World Tour]]
| style="text-align:center;"| May 2018 – Oct 2022
| style="text-align:center;"|140
|}
==Awards and nominations==
{{main|List of awards and nominations received by Iron Maiden}}
==See also==
* [[List of artists who reached number one on the UK Singles Chart]]
* [[List of new wave of British heavy metal bands]]
* [[List of music artists and bands from England]]
* [[List of songs recorded by Iron Maiden]]
* [[List of Iron Maiden tribute albums]]
* [[The Iron Maidens]]
== Citations ==
{{reflist|1=20em}}
==References==
{{refbegin|30em}}
* {{cite web|url=https://www.budapesttimes.hu/entertainment/music-and-an-instrument-of-torture/|publisher=budapesttimes.hu|title=Music and an instrument of torture|date=2022-05-30|access-date=2022-05-30|ref={{SfnRef|Cert600|2022}}}}
* {{cite web|url=https://loudwire.com/max-cavalera-learn-english-translate-metal-lyrics-interview/|publisher=loudwire.com|title=Max Cavalera on Iron Maiden|date=2022-05-20|access-date=2022-05-20|ref={{SfnRef|MCIM|2022}}}}
* {{cite web|url=https://www.metalcastle.net/sepulturas-andreas-kisser-we-never-thought-about-pleasing-anyone/|publisher=metalcastle.net|title=Andreas Kisser on Iron Maiden|date=2022-05-20|access-date=2022-05-20|ref={{SfnRef|AKIM|2022}}}}
* {{cite web|url=https://www.brewbound.com/news/iron-maidens-trooper-line-of-beers-rock-hard-in-the-us-ahead-of-the-bands-legacy-of-the-beast-world-tour-22/|publisher=brewbound.com|title=Senjutsu Charts|date=2022-05-19|access-date=2022-05-19|ref={{SfnRef|SenCh24|2022}}}}
* {{cite web|url=https://blabbermouth.net/news/tobias-forge-says-iron-maiden-was-a-massive-influence-on-ghost|title=Forge on Iron Maiden|publisher=blabbermouth.net|date=2022-05-15|access-date=2022-05-15|ref={{SfnRef|ForgeMaid|2022}}}}
* {{cite web|url=https://planetradio.co.uk/planet-rock/news/rock-news/ghost-tobias-forge-iron-maiden/|title=IM and Ghost|publisher=planetradio.co.uk|date=2022-05-15|access-date=2022-05-15|ref={{SfnRef|GHIM|2022}}}}
* {{cite web|url=https://bravewords.com/news/iron-maiden-legacy-of-the-beast-new-in-game-collaboration-with-arch-enemy|title=Queen Beast – Arch Enemy|publisher=bravewords.com|date=2022-05-15|access-date=2022-05-15|ref={{SfnRef|ArchEnemyQB|2022}}}}
* {{cite web|url=https://www.nme.com/news/music/lady-gaga-347-1286406|title=Lady GaGa on Iron Maiden|publisher=nme.com|date=2022-05-01|access-date=2022-05-01|ref={{SfnRef|Lady GaGa on Maiden|2021}}}}
* {{cite web|url=https://cuarteldelmetal.com/noticias/2022/04/guitarrista-de-angra-asegura-que-iron-maiden-definio-el-power-metal/|title=Iron Maiden definio el power metal|publisher=cuarteldelmetal.com|date=2022-04-29|access-date=2022-04-29|language=pt|ref={{SfnRef|APM|2022}}}}
* {{cite web|url=https://loudwire.com/iron-maiden-powerwolf-legacy-of-the-beast-game/|title=Collaboration with Powerwolf|publisher=loudwire.com|date=2022-04-14|access-date=2022-04-14|ref={{SfnRef|PWLOB|2022}}}}
* {{cite web|url=https://metalinjection.net/lists/a-wilhelm-scream-names-their-eight-essential-metal-albums|title=A Wilhelm Scream names their eight essential metal albums|publisher=metalinjection.net|date=2022-04-11|access-date=2022-04-11|ref={{SfnRef|AWS|2022}}}}
* {{cite web|url=https://screenrant.com/metal-lords-movie-soundtrack-songs/|title=Metal Lords NX|publisher=screenrant.com|date=2022-04-10|access-date=2022-04-10|ref={{SfnRef|MLNX|2022}}}}
* {{cite web|url=https://ra.co/dj/lorenzo-es|title=Lorenzo Raganzini|publisher=ra.co/dj/lorenzo-es|date=2022-04-10|access-date=2022-04-10|ref={{SfnRef|Lorenzo|2022}}}}
* {{cite web|url=https://www.youtube.com/channel/UCh2-FHcUx_3kaOgUNXeNSaw/about|title=Psycho Schizo Espresso|publisher=youtube.com|date=2022-04-10|access-date=2022-04-10|ref={{SfnRef|PSE|2022}}}}
* {{cite web|url=https://www.ironmaiden-bg.com/web/index.php/main-news/2925-iron-maiden-to-play-in-sofia-on13-07-2022|title=Senjutsu|publisher=ironmaiden-bg.com|date=2022-04-09|access-date=2022-04-09|ref={{SfnRef|SChB|2022}}}}
* {{cite web |url = https://www.anketazebrik.cz/vysledky/ |title = Zebriku Awards |publisher = ireport.cz |date = 2022-04-05 |access-date = 2022-04-05 |language = cs |ref = {{SfnRef|Zebrik|2022}} }}
* {{cite web |url = https://www.loudersound.com/features/carpenter-brut-10-albums-that-changed-my-life |title = Carpenter Brut: 10 albums that changed my life |publisher = loudersound.com |date = 2022-04-05 |access-date = 2022-04-05 |ref = {{SfnRef|CBO|2022}} }}
* {{cite web|url= https://www.maniacsonline.com.au/news/interview-zeal-ardors-manuel-gagneux-continues-redefining-metal|title= Zeal Ardor's influences|publisher= maniacsonline.com.au|date= 2022-03-27|access-date= 2022-03-27|ref= {{SfnRef|Z&A|2022}}}}
* {{cite web|url= https://www.thisisdig.com/feature/the-number-of-the-beast-iron-maiden-album/|title= TNOTB: 20 mln copies|publisher= thisisdig.com|date= 2022-03-27|access-date= 2022-03-27|ref= {{SfnRef|Dig20|2022}}}}
* {{cite web|url= https://www.swr.de/swr1/rp/iron-maiden-the-number-of-the-beast-100.html|title= TNOTB: 20 mln|publisher= swr.de|date= 2022-03-25|access-date= 2022-03-25|language= de|ref= {{SfnRef|20mln|2022}}}}
*{{cite web |url = https://www.revolvermag.com/music/number-beast-10-things-you-didnt-know-about-iron-maidens-breakout |title = TNOTB Anni: 40 Years |publisher = revolvermag.com |date = 2022-03-24 |access-date = 2022-03-24 |ref = {{SfnRef|40A3|2022}} }}
*{{cite web |url = https://loudwire.com/iron-maiden-number-of-the-beast-superfan-facts/ |title = TNOTB Anni: 40 Years |publisher = loudwire.com |date = 2022-03-24 |access-date = 2022-03-24 |ref = {{SfnRef|40A2|2022}} }}
*{{cite web |url = https://www.maniacsonline.com.au/news/iron-maiden-the-number-of-the-beast-turns-40 |title = TNOTB Anni: 40 Years |publisher = maniacsonline.com.au |date = 2022-03-24 |access-date = 2022-03-24 |ref = {{SfnRef|40A1|2022}} }}
*{{cite web |url = https://www.rheinpfalz.de/kultur_artikel,-vor-40-jahren-erschien-iron-maidens-album-the-number-of-the-beast-_arid,5331376.html?reduced=true |title = TNOTB 40 Years – The History |publisher = rheinpfalz.de |date = 2022-03-21 |access-date = 2022-03-21 |language = de |ref = {{SfnRef|NotBHist|2022}} }}
*{{cite web |url = https://www.newsbomb.gr/bombplus/politismos/story/1294782/iron-maiden-to-the-number-of-the-beast-kleinei-ta-40 |title = TNOTB 40 Years |publisher = treblezine.com |date = 2022-03-18 |access-date = 2022-03-18 |language = el |ref = {{SfnRef|Number40|2022}} }}
* {{cite web |url = https://www.loudersound.com/features/10-bands-who-wouldnt-exist-without-iron-maiden |title = Iron Maiden influence over the genre |publisher = loudersound.com |date = 2022-03-16 |access-date = 2022-03-16 |ref = {{SfnRef|IMINF|2022}} }}
* {{cite web |url = https://www.treblezine.com/iron-maiden-number-of-the-beast-metal-greatest-voices/ |title = TNOTB 40 Anni |publisher = treblezine.com |date = 2022-03-15 |access-date = 2022-03-15 |ref = {{SfnRef|TN40An20|2022}} }}
* {{Cite web|url = https://www.zmones.lt/naujiena/paskutine-pavasario-diena-lietuvoje-koncertuos-legendine-grupe-iron-maiden.b5596c7e-a368-11ec-bd3f-aa00003c90d0|title = New shows 2022|publisher = zmones.lt|access-date = 2022-03-14|date = 2022-03-14|language = lt|ref = {{SfnRef|Lat|2022}}}}
* {{Cite web |title = Održana treća dodjela Top.HR Music Awards |access-date = 2022-03-08 |publisher = sound-report.com |url = https://www.sound-report.com:443/vijesti/odrzana-treca-dodjela-tophr-music-awards/ |language = hr |ref = {{SfnRef|TopHR1|2022}} }}
* {{Cite web |title = Gloria - Dodjeljene Top.HR Music Awards: Najpopularniji glazbenici okupili se na jednom mjestu |date = 2022-03-08 |access-date = 2022-03-08 |publisher = www.gloria.hr |url = http://www.gloria.hr/gl/fokus/zvjezdane-staze/dodjeljene-top-hr-music-awards-najpopularniji-glazbenici-okupili-se-na-jednom-mjestu-15167303 |language = hr-hr |ref = {{SfnRef|TopHR2|2022}} }}
* {{Cite web|url = https://www.robinsonsbrewery.com/latest/robinsons-brewery-wins-at-brewing-industry-oscars/|title = Brewing Industry Oscars|publisher = robinsonsbrewery.com|date = 2022-03-06|access-date = 2022-03-06|ref = {{SfnRef|BIO|2022}}}}
* {{cite web|url=https://www.ultimate-guitar.com/news/general_music_news/kirk_hammett_names_one_song_that_played_a_big_part_in_his_development_as_guitar_player.html|publisher=www.ultimate-guitar.com|title=Kirk Hammett about Iron Maiden's first album|date=2022-03-05|access-date=2022-03-05|ref={{SfnRef|KirkHammett|2022}}}}
* {{cite web|url=https://www.leicestermercury.co.uk/news/local-news/wargasms-clash-after-confusion-over-6720680|publisher=leicestermercury.co.uk|title=Download Festival 2022|date=2022-02-26|access-date=2022-02-26|ref={{SfnRef|DF22|2022}}}}
* {{cite web|url=https://www.polskieradio.pl/7/160/Artykul/2908996,Legenda-polskiego-rocka-powraca-Zespol-CETI-z-nowa-plyta|publisher=polskieradio.pl|title=Legenda polskiego rocka powraca|date=2022-02-26|access-date=2022-02-26|language=pl|ref={{SfnRef|CETI|2022}}}}
* {{cite web | url = https://www.truemetal.it/heavy-metal-news/exodus-rob-dukes-paul-baloff-idolatrava-paul-dianno-per-la-sua-attitudine-punk-1078473 | publisher = www.truemetal.it | title = Paul Baloff about Iron Maiden's Di'Anno | date = 2022-02-21 | access-date = 2022-02-21 | language = it | ref = {{SfnRef|PBPD|2022}} }}
* {{cite web | url = https://www.rollingstone.fr/iron-maiden-the-number-of-the-beast-en-cassette/ | publisher = rollingstone.fr | title = The Number of the Beast | date = 2022-02-19 | access-date = 2022-02-19 | language = fr | ref = {{SfnRef|NOTB40CS|2022}} }}
* {{cite web |url= https://loudwire.com/disturbed-mascot-the-guy-iron-maiden-legacy-of-the-beast-game/ |title= Disturbed mascot The Guy in LotB game |publisher= loudwire.com |date= 2022-02-18 |access-date= 2022-02-18 |ref= {{SfnRef|DLotB|2022}} }}
* {{cite web |url= https://www.esloganmagazine.com/portadas-de-iron-maiden-derek-riggs/ |title= Iron Maiden in pop - culture |publisher= esloganmagazine.com |date= 2022-02-18 |access-date= 2022-02-18 |ref= {{SfnRef|EsleM|2022}} }}
* {{cite web |url= https://metalinjection.net/interviews/vincent-castiglia-talks-new-gallery-using-blood-in-his-art-love-of-iron-maiden-his-hidden-heavy-metal-gem |title= Vincent Castiglia |publisher= metalinjection.net |date= 2022-02-18 |access-date= 2022-02-18 |ref= {{SfnRef|VCA|2022}} }}
* {{cite web |url= https://whiplash.net/materias/news_722/339068-ironmaiden.html |title= TNOTB Anni |publisher= whiplash.net |date= 2022-02-12 |access-date= 2022-02-12 |ref= {{SfnRef|TNOTB40|2022}} }}
* {{cite web |url= https://www.metalcastle.net/the-rock-bands-that-james-hetfield-named-as-his-favorites/ |title= The rock bands that James Hetfield named as his favourites |publisher= www.metalcastle.net |date= 2022-02-12 |access-date= 2022-02-12 |ref= {{SfnRef|JHF|2022}} }}
* {{cite web |url= https://www.thisisdig.com/feature/best-iron-maiden-songs/ |title= Best Iron Maiden songs |publisher= thisisdig.com |date= 2022-02-12 |access-date= 2022-02-12 |ref= {{SfnRef|TID|2022}} }}
* {{cite web |url= https://www.blabbermouth.net/news/bruce-dickinson-wont-pilot-iron-maidens-plane-on-upcoming-tour/ |title= Bruce Dickinson won't pilot band's plane anymore |publisher= www.blabbermouth.net |date= 2022-02-04 |access-date= 2022-02-04 |ref= {{SfnRef|EF1B|2022}} }}
* {{cite web |url= https://buffstaterecord.com/17235/recent-stories/iron-maidens-bruce-dickinson-shares-his-strange-journey-at-rockwell-hall/ |title= Bruce Dickinson shares his strange journey at Rockwell Hall |publisher= buffstaterecord.com |date= 2022-02-04 |access-date= 2022-02-04 |ref= {{SfnRef|RiRAt|2022}} }}
* {{cite journal |title= Hallowed Ground |author= Dom Lawson |journal= Metal Hammer |date= March 2022 |issue=358 (3/2022) |pages= 52–58|ref={{SfnRef|NOTB40|2021}}}}
* {{cite web |url= https://theheadbangingmoose.com/2013/10/18/attraction-review-rock-legends-wax-museum-niagara-falls-canada/ |title= Rock Legends Wax Museum – Iron Maiden |publisher= ironmaiden.com |date= 2021-12-31 |access-date= 2021-12-31 |ref= {{SfnRef|WM1|2022}} }}
* {{cite web |url= https://www.tripadvisor.co.uk/Attraction_Review-g154998-d4091270-Reviews-Rock_Legends_Wax_Museum-Niagara_Falls_Ontario.html#/media-atf/4091270/123039142:p/?albumid=-160&type=0&category=-160 |title= Rock Legends Wax Museum – Iron Maiden's Eddie |publisher= ironmaiden.com |date= 2022-02-03 |access-date= 2022-02-03 |ref= {{SfnRef|WM2|2022}} }}
* {{cite book |url= https://books.google.com/books?id=drufAAAAMAAJ&q=Futureal |title= Top 20 Metal Songs Chart |publisher= US Metal Radio |access-date= 2022-02-01 |date= 2022-02-01 |isbn= 9781860746666 |ref= {{SfnRef|MRUS|1998}} }}
* {{cite web|url=https://kg-portal.ru/comments/103138-remaster-drevneegipetskogo-shutera-powerslave-exhumed-vyjdet-uzhe-v-fevrale/|title=PowerSlave 1996|publisher=kg-portal.ru|date=2012-08-13|access-date=2022-02-01|language=ru|ref={{SfnRef|PSRU|2022}}}}
* {{cite web |url= https://www.mobygames.com/game/powerslave |title= PowerSlave Game: Shooter |access-date= 2022-02-01 |publisher= www.mobygames.com |ref= {{SfnRef|PSMG|2022}} }}
* {{cite web |title= The BRITs 1992 {{!}} The BRIT Awards 2012 |date= 2012-08-13 |access-date= 2022-02-01 |url= http://www.brits.co.uk/history/shows/1992 |archive-url= https://web.archive.org/web/20120813013935/http://www.brits.co.uk/history/shows/1992 |archive-date= 13 August 2012 |ref= {{SfnRef|Brit92|2022}} }}
*{{cite web |title= Rock On The Net: 18th American Music Awards (presented in 1991) |access-date= 2022-02-01 |publisher= www.rockonthenet.com |url= http://www.rockonthenet.com/archive/1991/amas.htm |ref= {{SfnRef|AME|2022}} }}
* {{cite web|title= Bruce Dickinson Interview|url= https://bravewords.com/features/who-the-f-ck-is-bruce-dickinson-click-this-button-to-find-out|publisher= bravewords.com|date= 2022-01-27|access-date= 2022-01-27|ref= {{SfnRef|Sales Gen|2022}}}}
* {{cite web |title= [PT DE VISTA] - Iron Maiden, mais que uma banda |publisher= Iron Maiden Brasil |url= http://www.ironmaidenbrasil.com.br/2015/09/pt-de-vista-iron-maiden-mais-que-uma.html |access-date= 2022-01-24 |date= 2022-01-24 |language= pt |ref= {{SfnRef|PubE|2022}} }}
* {{cite web|url= https://www.bookdepository.com/Sound-Beast-Ian-Christe/9780749083519|title= Sound of the Beast ; Ian Christe ; 9780749083519|publisher= www.bookdepository.com|date= 2022-01-24|access-date= 2022-01-24|ref= {{SfnRef|SotB|2022}}}}
* {{cite web |url= https://www.blabbermouth.net/news/bruce-dickinson-says-iron-maiden-will-perform-entire-senjutsu-album-on-future-tour/#.YePcpASEif4.facebook |title= Iron Maiden's plans |publisher= blabbermouth.net |access-date= 2022-01-16 |date= 2022-01-16 |ref= {{SfnRef|STP|2022}} }}
* {{cite book |url= https://books.google.com/books?id=-kIxCgAAQBAJ&dq=rotting+christ+iron+maiden+influence&pg=PA86 |title= Iron Maiden's influences |access-date= 2022-01-17 |date= 2022-01-17 |isbn= 9781936239764 |ref= {{SfnRef|RCh|2022}} |last1= Patterson |first1= Dayal }}
* {{cite web |url= https://rideintoglory.com/the-everlasting-sins-an-interview-with-varathron/ |title= Iron Maiden's influences |publisher= rideintoglory.com |access-date= 2022-01-17 |date= 2022-01-17 |ref= {{SfnRef|Varathron|2022}} }}
* {{cite web |url= https://necromantiaofficial.bandcamp.com/album/12-years-doing-the-devils-work |title= Iron Maiden's influences |publisher= necromantiaofficial.bandcamp.com |access-date= 2022-01-17 |date= 2022-01-17 |ref= {{SfnRef|Necro|2022}} }}
* {{cite web |url= https://wonderboxmetal.com/tag/varathron/ |title= Iron Maiden's influences |publisher= wonderboxmetal.com |access-date= 2022-01-17 |date= 2022-01-17 |ref= {{SfnRef|YI|2022}} }}
* {{cite web |url= https://www.mopop.org/about-mopop/the-mopop-blog/posts/2020/november/mopop-oral-history-interview-alice-in-chains-musical-influences/ |title= Iron Maiden influences |publisher= mopop.org |access-date= 2022-01-15 |date= 2022-01-15 |ref= {{SfnRef|AiCH|2022}} }}
* {{cite web |url= https://www.forcajovem.com.br/#!#aforca |title= Eddie IM Forca Jovem |publisher= forcajovem.com.br |access-date= 2014-12-06 |date= 2014-12-06 |ref= {{SfnRef|FJV|2022}} }}
* {{cite web |url= https://ironmaidenlegacy.com/ |title= Iron Maiden – Legacy |publisher= ironmaidenlegacy.com |date= 2018-10-20 |access-date= 2018-10-20 |ref= {{SfnRef|IMAB|2022}} }}
* {{cite web|url= https://www.rollingstone.com/music/music-lists/best-metal-albums-2021-1264146/mastodon-hushed-and-grim-1264150/|title= Top 10 Best Metal Albums of 2021|publisher= rollingstone.com|access-date= 2021-12-14|date= 2021-12-14|ref= {{SfnRef|SenA|2022}}}}
* {{Cite web |title= Die With Your Boots On |access-date= 2022-01-08 |publisher= IRON MAIDEN |url= https://www.ironmaiden.com/news/article/die-with-your-boots-on |ref= {{SfnRef|IMDWYBO|2022}} }}
* {{Cite web |title= [PORSCHE CUP] – Como Eddie foi parar no carro do piloto Chico Horta |access-date= 2020-11-04 |publisher= IRON MAIDEN BRASIL |url= http://www.ironmaidenbrasil.com.br/2020/10/porsche-cup-como-eddie-foi-parar-no.html |language= pt |ref= {{SfnRef|IMimage|2022}} }}
* {{Cite web |author= Igor Soares |title= Carnaval: Eddie, Sérgio Moro e Japonês da PF viram bonecos gigantes em Olinda |access-date= 2020-01-12 |publisher= IRON MAIDEN 666 – BRASIL |url= http://www.ironmaiden666.com.br/2016/02/carnaval-eddie-sergio-moro-e-japones-da.html |language= pt |ref= {{SfnRef|RiREd|2022}} }}
* {{Cite web |author= lavozdelsur.es |title= Mulán "negra" y un oso "con esguince cervical": así ha sido la Cabalgata "del terror" en Cádiz |date= 2022-01-06 |access-date= 2022-01-06 |publisher= lavozdelsur.es |url= https://www.lavozdelsur.es/ediciones/cadiz/mulan-negra-oso-con-esguince-cervical-ha-sido-cabalgata-terror-en-cadiz_270295_102.html |language= es |ref= {{SfnRef|IIIK1|2022}} }}
* {{Cite web |title= Eddie, la mascota de Iron Maiden, protagonista de la cabalgata de Reyes de Cádiz |date= 2022-01-06 |access-date= 2022-01-06 |publisher= MariskalRock.com |url= https://mariskalrock.com/actualidad/eddie-la-mascota-de-iron-maiden-protagonista-de-la-cabalgata-de-reyes-de-cadiz/ |language= es |ref= {{SfnRef|IIIK2|2022}} }}
* {{Cite web |title= Eddie aparece en desfile por Bajada de Reyes y la gente se burla de la gigante mascota |access-date= 2022-01-06 |publisher= cuarteldelmetal.com |url= https://cuarteldelmetal.com/noticias/2022/01/eddie-desfile-bajada-reyes-iron-maiden/ |language= es |ref= {{SfnRef|IIIK3|2022}} }}
* {{Cite web |title= Palhaços e acrobatas na Sala Paulo VI, o Papa: "a beleza leva a Deus" - Vatican News |date= 2022-01-05 |access-date= 2022-01-06 |publisher= www.vaticannews.va |url= https://www.vaticannews.va/pt/papa/news/2022-01/palhacos-acrobatas-na-sala-paulo-vi-papa-beleza.html |language= pt |ref= {{SfnRef|Vatican1|2022}} }}
* {{cite web|url= https://www.loudersound.com/news/lady-gaga-s-big-love-for-iron-maiden|title= Lady Gaga wears Iron Maiden T-shirt|access-date= 2021-12-06|date= 2021-12-06|ref= {{SfnRef|Gadg|2022}}}}
* {{Cite web |title= Los trabajadores no religiosos pueden leer mensajes de fieles en las audiencias |access-date= 2022-01-06 |publisher= www.nuevarioja.com.ar |url= https://www.nuevarioja.com.ar/61095-los-trabajadores-no-religiosos-pueden-leer-mensajes-de-fieles-en-las-audiencias |language= es |ref= {{SfnRef|Vatican2|2022}} }}
* {{Cite web |title= Megalovania, la famosa canción de Undertale, suena por sorpresa en la audiencia del papa |access-date= 2022-01-06 |publisher= Vandal |url= https://vandal.elespanol.com/noticia/1350750621/megalovania-la-famosa-cancion-de-undertale-suena-por-sorpresa-en-la-audiencia-del-papa/ |language= es |ref= {{SfnRef|Vatican3|2022}} }}
* {{Cite web |title= Who helped with the banner? |date= 2 September 2019 |access-date= 2020-10-20 |publisher= philmacgiollabhain.ie |url= https://philmacgiollabhain.ie/2019/09/02/who-helped-with-the-ibrox-banner-yesterday/ |ref= {{SfnRef|BannIM|2022}} }}
* {{cite web | url= https://www.volksfreund.de/region/kultur/vinyl-der-woche-the-number-of-the-beast-iron-maiden_aid-65034431 | publisher= volksfreund.de | title= Vinyl der Woche: TNOTB | date= 2022-01-04 | access-date= 2022-01-04 | language= de | ref= {{SfnRef|VTNOTB|2022}} }}
* {{cite web | url= https://bravewords.com/news/scream-maker-release-dystopian-video-for-mirror-mirror | publisher= bravewords.com | title= Scream Maker about influences | date= 2022-01-04 | access-date= 2022-01-04 | ref= {{SfnRef|SMI|2022}} }}
* {{cite web | url= https://www.ironmaiden.com/news/article/30-shows-added-to-an-updated-legacy-of-the-beast-2022-world-tour-in-america-canada-mexico-and-europe | publisher= ironmaiden.com | title= 30 shows added to an updated Legacy of the Beast 2022 World Tour | date= 2021-12-24 | access-date= 2021-12-24 | ref= {{SfnRef|TourPlans|2021}} }}
* {{cite web | url= https://www.blabbermouth.net/news/cannibal-corpses-george-corpsegrinder-fisher-releases-first-single-from-upcoming-solo-album/ | publisher= blabbermouth.net | title= Iron Maiden influences | date= 2021-12-24 | access-date= 2021-12-24 | ref= {{SfnRef|CCI|2021}} }}
* {{cite web | url= https://chartmasters.org/2021/11/iron-maiden-albums-and-songs-sales/ | publisher= ChartMasters | title= Iron Maiden albums and songs sales | date= 2021-12-22 | access-date= 2021-12-22 | ref= {{SfnRef|NotBData|2021}} }}
* {{cite web|url=https://www.metalcastle.net/nicko-mcbrain-says-iron-maiden-doesnt-care-about-fans-expectations-in-the-studio-we-are-a-selfish-band/|title=Nicko McBrain Says Iron Maiden Doesn't Care About Fans Expectations in the Studio|date=2021-12-17|access-date=2021-12-17|publisher=metalcastle.net|ref={{SfnRef|MetCa|2021}}}}
* {{cite web|url=https://www.kerrang.com/the-news/iron-maiden-and-marvel-launch-new-collab-in-time-for-the-holidays/|title=Marvel collab|date=2021-11-30|access-date=2021-11-30|publisher=kerrang.com|ref={{SfnRef|Marvel|2021}}}}
* {{cite web|url=https://metalheadzone.com/bruce-dickinson-says-iron-maiden-members-are-not-mellowing-with-age/|title=Senjutsu|date=2021-11-23|access-date=2021-11-23|publisher=metalheadzone.com|ref={{SfnRef|Senj23|2021}}}}
* {{cite web|url=https://www.facebook.com/ralfie75/photos/a.1189581687799173/4675804969176810/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/4675804969176810 |archive-date=2022-02-26 |url-access=limited|title=Iron Maiden WOA HoF|date=2021-11-12|access-date=2021-11-12|publisher=facebook.com|ref={{SfnRef|WOAHOF|2021}}}}{{cbignore}}
* {{cite web|url=https://infostart.hu/kultura/2021/11/10/kiderult-mikor-jon-budapestre-az-iron-maiden|title=Iron Maiden in Hungary|date=2021-11-10|access-date=2021-11-10|publisher=infostart.hu|language=hu|ref={{SfnRef|IMHUU|2021}}}}
* {{cite web|url= https://news.tvs-24.com/entertainment/news/11573.html|title= Iron Maiden in Hungary|date= 2021-11-10|access-date= 2021-11-10|publisher= news.tvs-24.com|ref= {{SfnRef|IMHU|2021}}}}
* {{cite web|url=https://www.metalcastle.net/alter-bridges-myles-kennedy-says-its-inspiring-to-see-iron-maiden-on-stage/|title=Myles Kennedy about Iron Maiden|date=2021-11-04|access-date=2021-11-04|publisher=metalcastle.net|ref={{SfnRef|MKIM|2021}}}}
* {{cite web|url=https://www.metalcastle.net/who-is-the-richest-iron-maiden-member-bruce-dickinson-steve-harris-adrian-smith-nicko-mcbrain-dave-murray-janick-gers-net-worth-in-2021/|title=200 mln sales|date=2021-11-04|access-date=2021-11-04|publisher=metalcastle.net|ref={{SfnRef|200MLN|2021}}}}
* {{cite web |url=https://twitter.com/TheMendesUpdate/status/911196810856759297/photo/2 |title=RiR WoF |date=2021-10-25 |access-date=2021-10-25 |publisher=twitter.com |ref={{SfnRef|FAH|2021}} }}
* {{cite web|url=https://www.wikimetal.com.br/kat-von-d-cita-iron-maiden-explica-por-que-nao-fez-album-de-metal/|title=Kat Von D on Iron Maiden|date=2021-10-25|access-date=2021-10-25|publisher=wikimetal.com.br|ref={{SfnRef|KVD|2021}}}}
* {{cite web|url=https://www.youtube.com/watch?v=OULGGLz3CSU |archive-url=https://ghostarchive.org/varchive/youtube/20211211/OULGGLz3CSU| archive-date=2021-12-11 |url-status=live|title=Senjutsu album charts|publisher=youtube.com|date=2021-10-05|access-date=2021-10-05|ref={{SfnRef|A Success|2021}}}}{{cbignore}}
* {{cite web|url =https://www.shots.net/news/view/uk-music-video-awards-2021-nominations-revealed|title =Best Animation in a Video|publisher =shots.net|date =2021-10-02|access-date =2021-10-02|ref ={{SfnRef|UK Music Video|2021}}}}
* {{cite web |first= Владислав |last= Крылов |title= Стратегии выживания: Iron Maiden предостерегают о будущем, Saint Etienne вспоминают прошлое |date= 2021-10-01 |access-date= 2021-10-01 |publisher= Известия |url= https://iz.ru/1226286/vladislav-krylov/strategii-vyzhivaniia-iron-maiden-predosteregaiut-o-budushchem-saint-etienne-vspominaiut-proshloe |language= ru |ref= {{SfnRef|Senjutsu Success|2021}} }}
* {{cite web |title= 50-year career and sweeping: how Iron Maiden manage to outsell youth idols {{!}} ICON {{!}} OI Canadian |publisher= oicanadian.com |access-date= 2021-09-28 |date= 2021-09-28 |url= https://oicanadian.com/50-year-career-and-sweeping-how-iron-maiden-manage-to-outsell-youth-idols-icon/ |ref= {{SfnRef|Senjutsu Charts|2021}} }}
* {{cite web |title= Iron Maiden :: Charts & Sales History |access-date= 2021-09-28 |date= 2021-09-28 |publisher= UKMIX Forums |url= https://www.ukmix.org/forum/chart-discussion/artist-chart-analysis/38427-iron-maiden-charts-sales-history |ref= {{SfnRef|Charts History|2021}} }}
* {{cite web |url =https://www.blabbermouth.net/news/kiss-and-iron-maiden-members-triumph-stryper-marty-friedman-to-be-inducted-into-metal-hall-of-fame/ |title =Metal Hall of Fame Induction |publisher =blabbermouth.net |date =2021-08-18 |access-date =2021-08-18 |ref ={{SfnRef |MHoF LA|2021}} }}
* {{cite web|url= https://www.walesonline.co.uk/news/wales-news/bruce-dickinson-interview-im-dying-20990356|title= Well over 100 mln sales|publisher= walesonline.co.uk|access-date= 2021-07-24|date= 2021-07-24|ref= {{SfnRef|WellOver 100|2021}}}}
* {{cite web |url= https://www.shinko-music.co.jp/ |title= Masa Itoh: Iron Maiden Awards Burrn! Magazine |publisher= shinko-music.co.jp |language= ja |access-date= 2018-12-08 |date= 2018-12-08 |ref= {{SfnRef|Burrn! 1|2021}} }}
* {{cite web |url= http://www.ironmaiden.com:80/ironmaiden/news/news_030501.asp |title= Burrn! Magazine Awards |publisher= ironmaiden.com |access-date= 2018-12-08 |date= 2018-12-08 |ref= {{SfnRef|Burrn! 2|2021}} |archive-date= 2 April 2003 |archive-url= https://web.archive.org/web/20030402053732/http://www.ironmaiden.com/ironmaiden/news/news_030501.asp |url-status= dead }}
* {{cite web |url= https://ironmaiden.com/news/article/maiden-score-in-japan |title= Burrn! Magazine Awards 2006 Masa Itoh |publisher= ironmaiden.com |access-date= 2018-12-08 |date= 2018-12-08 |ref= {{SfnRef|Burrn! 3|2021}} }}
* {{cite web |url= https://ironmaiden.com/news/article/maiden-score-in-japan |title= Burrn! Magazine Awards 2016 |publisher= ironmaiden.com |access-date= 2018-12-08 |date= 2018-12-08 |ref= {{SfnRef|Burrn! 4|2021}} }}
* {{cite web |url= https://www.facebook.com/mikeportnoyofficial/photos/a.146191958731788/3876432759041004/?type=3&theater |archive-url=https://ghostarchive.org/iarchive/facebook/116713035013014/3876432759041004 |archive-date=2022-02-26 |url-access=limited|title= Burrn! Magazine Awards 2020 |publisher= facebook.com/mikeportnoyofficial |access-date= 2020-03-05 |date= 2020-03-05 |ref= {{SfnRef|Burrn! 5|2021}} }}{{cbignore}}
* {{cite web |url= http://pl.allfont.net/download/iron-maiden/ |title= Fonts: Iron Maiden |access-date= 2021-07-12 |date= 2021-07-12 |publisher= PL.AllFont.net |ref= {{SfnRef|IM Logotype|2021}} }}
* {{cite web |url= https://ironmaiden.com/diary/article/todd-s-diary-buenos-aires |title= Todd's Diary |publisher= ironmaiden.com |date= 2018-12-13 |access-date= 2018-12-13 |ref= {{SfnRef|BAC1|2021}} |archive-date= 19 September 2020 |archive-url= https://web.archive.org/web/20200919061926/https://www.ironmaiden.com/diary/article/todd-s-diary-buenos-aires |url-status= dead }}
* {{cite web |url= http://www.bhinfo.fr/bruce-dickinson-d-iron-maiden,5627.html |title= Municipal Council of Sarajevo |publisher= bhinfo.fr |language= fr |access-date= 2017-03-25 |date= 2017-03-25 |ref= {{SfnRef|HCoS|2021}} }}
* {{cite web |url= https://ironmaiden.com/news/article/ministry-of-tourism-thanks-iron-maiden-for-visiting-el-salvador |title= Visitors of the Country |publisher= ironmaiden.com |access-date= 2016-04-08 |date= 2016-04-08 |ref= {{SfnRef|VOTC|2021}} }}
* {{cite web|title= Wilma|publisher= BandMix.com|url= https://www.bandmix.com/mattleone666/|access-date= 2021-02-27|date= 2021-02-27|ref= {{SfnRef|Tribute1|2021}}}}
* {{cite web |url= http://www2.gibson.com/News-Lifestyle/Features/en-us/abriefhistoryofheavymetal.aspx |title= A Brief History Of Metal |publisher= gibson.com |access-date= 2010-08-22 |date= 2012-11-10 |ref= {{SfnRef|Tribute2|2021}} |archive-date= 10 November 2012 |archive-url= https://web.archive.org/web/20121110073816/http://www2.gibson.com/News-Lifestyle/Features/en-us/abriefhistoryofheavymetal.aspx |url-status= dead }}
* {{cite web |url= https://ironmaiden.com/news/article/iron-maiden-to-be-honoured-as-visitors-of-the-nation-by-congress-in-argentina |title= Maiden honoured in Argentina |publisher= ironmaiden.com |date= 2019-10-12 |access-date= 2019-10-12 |ref= {{SfnRef|State Prize|2021}} }}
* {{cite web |url= https://www.metalnews.pl/inne/the-number-of-the-beast-najlepszym-brytyjskim-albumem/ |title= Best British Album Ever |publisher= metalnews.pl |date= 2020-01-12 |access-date= 2020-01-12 |language= pl |ref= {{SfnRef|DJEQII|2021}} }}
* {{cite web |title= Iron Maiden ex-members inducted |url= https://www.thathashtagshow.com/2021/04/28/metal-hall-of-fame-inducting-paul-dianno-blaze-bayley-and-derek-riggs/ |publisher= thathashtagshow.com |access-date= 2021-04-28 |date= 2021-04-28 |ref= {{SfnRef|MHoF2021|2021}} }}
* {{cite web |url= http://www.razzies.com/asp/content/XcNewsPlus.asp?cmd=view&articleid=29 |title= The Razzies Iron Maiden |publisher= razzies.com |date= 2018-12-08 |archive-url= https://web.archive.org/web/20160104201355/http://www.razzies.com/asp/content/XcNewsPlus.asp?cmd=view&articleid=29 |archive-date= 2016-01-04 |ref= {{SfnRef|Razzie1990|2021}} }}
* {{cite web| title= Kerrang! Kreativity Award 1995| publisher= facebook.com/ralfie75 |url= https://www.facebook.com/ralfie75/photos/a.1189581687799173/4211329285624383/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/4211329285624383 |archive-date=2022-02-26 |url-access=limited| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|KreativityAward|2021}}}}{{cbignore}}
* {{cite web| title= Nights of the Dead Album| publisher= ironmaiden.com| url= https://www.ironmaiden.com/news/article/iron-maiden-live-album-coming-november-20th| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|NofD|2021}}}}
* {{cite web| title= 77 Album| publisher= ironmaiden.com| url= https://www.ironmaiden.com/discography/details/seventh-son-of-a-seventh-son| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|77Album|2021}}}}
* {{cite web| title= Piece of Mind Album| publisher= ironmaiden.com| url= https://www.ironmaiden.com/discography/details/piece-of-mind| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|PoM Album|2021}}}}
* {{cite web| title= HBTN – all you need to know| publisher= ultimateclassicrock.com| url= https://ultimateclassicrock.com/iron-maiden-hallowed-be-thy-name/| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|Hallowed|2021}}}}
* {{cite web| title= Guardians of the Galaxy soundtrack| publisher= polygon.com| url= https://www.polygon.com/e3/22524898/guardians-of-the-galaxy-game-release-date-square-enix-eidos-montreal-e3-2021| access-date= 2021-06-14| date= 2021-06-14| ref= {{SfnRef|Polygon2021|2021}}}}
* {{cite web | title= Bruce Dickinson: ele evita falar que público do Brasil é melhor para não causar ciúmes | publisher= whiplash.net | url= https://whiplash.net/materias/news_750/310590-ironmaiden.html | language= pt-BR | access-date= 2019-10-20 | date= 2019-10-20 | ref= {{SfnRef|Latin 2019|2021}} }}
* {{cite web|title=Stream For Me 2017|url=https://www.ironmaiden.com/news/article/stream-for-me|publisher=ironmaiden.com|access-date=2021-06-13|date=2021-06-13|ref={{SfnRef|StreamForMe|2021}}}}
* {{cite web|title=New Studio Album The Book of Souls|url=https://www.ironmaiden.com/news/article/new-iron-maiden-studio-album-the-book-of-souls|publisher=ironmaiden.com|access-date=2021-06-13|date=2021-06-13|ref={{SfnRef|New Album2015|2021}}}}
* {{cite web|title=2016-17 Tour reviews|url=https://www.ironmaiden.com/news/article/first-reviews-are-in|publisher=ironmaiden.com|access-date=2021-06-13|date=2021-06-13|ref={{SfnRef|New 2016-17TourReviews|2021}}}}
* {{cite web|title=New Tour 2016-17|url=https://maidenrevelations.com/2017/04/20/the-book-of-souls-tour-pt-ii-what-to-expect/|publisher=maidenrevelations.com|access-date=2021-06-13|date=2021-06-13|ref={{SfnRef|StageEquipment 2016|2021}}}}
* {{cite web|title=New Tour 2016-17|url=https://maidenrevelations.com/2016/12/17/best-worst-the-book-of-souls-world-tour-2016/|publisher=maidenrevelations.com|access-date=2021-06-13|date=2021-06-13|ref={{SfnRef|Bio201617|2021}}}}
* {{cite web|title=Bruce Dickinson Flies Iron Maiden's Book of Souls at BB&T Center on World Tour|url=http://www.browardpalmbeach.com/music/bruce-dickinson-flies-iron-maidens-book-of-souls-at-bbandt-center-on-world-tour-7610919|publisher=New Times Broward-Palm Beach|access-date=2016-02-26|date=2016-02-26|ref={{SfnRef|Production2016|2021}}}}
* {{cite web|title=ME North America|url=https://www.ironmaiden.com/tours/maiden-england-north-american-tour---2012|publisher=ironmaiden.com|date=2021-06-13|access-date=2021-06-13|ref={{SfnRef|NATour2012|2021}}}}
* {{cite web|title=Bio 2012-2014|url=https://www.ironmaiden.com/the-band|publisher=ironmaiden.com|date=2021-06-13|access-date=2021-06-13|ref={{SfnRef|Bio20121314|2021}}}}
* {{cite web|title=The Summer of Maiden|url=https://maidenrevelations.com/2013/06/17/the-summer-of-maiden/|publisher=maidenrevelations.com|date=2021-06-13|access-date=2021-06-13|ref={{SfnRef|2013Tour|2021}}}}
* {{cite web|title=Maiden England in Europe|url=https://maidenrevelations.com/2012/09/28/maiden-england-invades-europe-in-2013/#more-124|publisher=maidenrevelations.com|date=2021-06-13|access-date=2021-06-13|ref={{SfnRef|METour2013|2021}}}}
* {{cite web |url=http://www2.gibson.com/news-lifestyle/news/en-us/iron-maiden-0701-2011.aspx |title=Iron Maiden's Bruce Dickinson Jealous of Slipknot |last=Wright |first=Michael |date=1 July 2011 |publisher=[[Gibson Guitar Corporation|Gibson.com]] |url-status=dead |archive-url=https://web.archive.org/web/20130131153920/http://www2.gibson.com/news-lifestyle/news/en-us/iron-maiden-0701-2011.aspx |archive-date=31 January 2013 |access-date=16 July 2012 |ref={{SfnRef|Pyro2012|2021}} }}
* {{cite web |url=http://www.theobserver.ca/2012/07/14/fans-run-to-bayfest-for-iron-maiden |title=Bayfest's third night all about showmanship |date=15 July 2012 |website=[[Sarnia Observer]] |url-status=dead |archive-url=https://web.archive.org/web/20130520103854/http://www.theobserver.ca/2012/07/14/fans-run-to-bayfest-for-iron-maiden |archive-date=20 May 2013 |access-date=16 July 2012 |ref={{SfnRef|StageEquipment|2021}} }}
* {{cite news |url=http://www.leadertelegram.com/news/front_page/article_e1457b1e-d15d-11e1-8119-001a4bcf887a.html |title=Rock Fest: Iron Maiden show forces stage expansion |last=Hanson |first=Rob |date=18 July 2012 |work=Leader-Telegram |access-date=8 October 2012 |url-status=dead |archive-url=https://web.archive.org/web/20150723180401/http://www.leadertelegram.com/news/front_page/article_e1457b1e-d15d-11e1-8119-001a4bcf887a.html |archive-date=23 July 2015 |location=Eau Claire, Wisconsin |ref={{SfnRef|IMshow2012|2021}} }}
* {{cite web|title=The Final Frontier Success|url=https://www.stara.fi/2010/08/24/iron-maidenin-uutuus-myos-suomessa-platinaa/|publisher=stara.fi|date=2021-06-12|access-date=2021-06-12|language=fi|ref={{SfnRef|TFFS|2021}}}}
* {{cite web|title=The Final Frontier Tour|url=https://www.ironmaiden-bg.com/web/index.php/tff-tour-en|publisher=ironmaiden-bg.com|date=2021-06-12|access-date=2021-06-12|ref={{SfnRef|TFFTour|2021}}}}
* {{cite web|title=Best British Album|url=http://www.planetrock.com/on-air/wyatt-wendels/the-rocks-2016-winners/|publisher=Planet Rock|access-date=2016-02-25|date=2016-02-25|ref={{SfnRef|Rocks1|2021}}}}
* {{cite web|title=Best British Single|url=http://www.planetrock.com/on-air/wyatt-wendels/the-rocks-2016-winners/|publisher=Planet Rock|access-date=2016-02-25|date=2016-02-25|ref={{SfnRef|Rocks2|2021}}}}
* {{cite web|title=Best British Band|url=http://www.planetrock.com/news/rock-news/metallica-black-star-riders-and-joe-bonamassa-among-winners-of-the-rocks-2017/|publisher=Planet Rock|access-date=2017-03-03|date=2017-03-03|ref={{SfnRef|Rocks3|2021}}}}
* {{cite web|title=Band Of The Year|url=https://www.planetrock.com/magazine/|publisher=planetrock.com|access-date=2018-12-04|date=2018-12-04|ref={{SfnRef|Rocks4|2021}}}}
* {{cite web|title=Best LIVE Band 2019|website=[[Facebook]]|url=https://www.facebook.com/planetrockradio/|access-date=2019-02-21|date=2019-02-21|ref={{SfnRef|Rocks5|2021}}}}
* {{cite web|title=Best British Band 2019|url=https://twitter.com/hashtag/TheRocks2019?src=hash|access-date=2019-02-21|date=2019-02-21|ref={{SfnRef|Rocks6|2021}}}}
* {{cite web|url= https://twitter.com/PlanetRockRadio/status/1403418009721618438/photo/1|title= The Greatest Live Band of All Time|publisher= twitter.com/PlanetRockRadio|date= 2021-06-11|access-date= 2021-06-11|ref= {{SfnRef|Rocks7|2021}}}}
* {{cite web |title= Iron Maiden & Clive Burr – Tribute |url= https://www.facebook.com/ralfie75/posts/3082548041835852 |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/3082548041835852 |archive-date=2022-02-26 |url-access=limited|publisher= facebook.com/ralfie75 |date= 2021-06-12 |access-date= 2021-06-12 |ref= {{SfnRef|SBiTTour|2021}} }}{{cbignore}}
* {{cite web |title= AMOLAD Tour 2006-07 |url= http://www.ironmaidencommentary.com/?url=tour14_amolad/tour14_amolad&lang=eng&link=tours |publisher= ironmaiden.com |date= 2021-06-12 |access-date= 2021-06-12 |ref= {{SfnRef|AMOLADTour200607|2021}} }}
* {{cite web |title= Paul Gilbert influences |url= https://www.loudersound.com/features/the-10-albums-that-changed-paul-gilberts-life |publisher= loudersound.com |date= 2021-06-11 |access-date= 2021-06-11 |ref= {{SfnRef|Gilbert|2021}} }}
* {{cite news|url=https://www.ironmaiden.com/discography/details/a-matter-of-life-and-death|title=AMOLAD album|date=26 August 2005|work=[[BBC News]]|publisher=[[BBC]]|access-date=8 March 2009|ref={{SfnRef|AMOLADalbum|2021}}}}
* {{cite news|url=http://news.bbc.co.uk/2/hi/entertainment/4185168.stm|title=Green Day rock Kerrang! honours|date=26 August 2005|work=[[BBC News]]|publisher=[[BBC]]|access-date=8 March 2009|ref={{SfnRef|KerrangHoF|2021}}}}
* {{cite web |title= AMOLAD Tour |url= https://www.ironmaiden.com/tours/a-matter-of-life-and-death-world-tour-2006 |publisher= ironmaiden.com |date= 2021-06-11 |access-date= 2021-06-11 |ref= {{SfnRef|AMOLADTOUR|2021}} }}
* {{cite web |url= https://twitter.com/ironmaiden/status/865143424575340544 |title= Eddie the Head Icon Presentation (Liverpool) |publisher= twitter.com/ironmaiden |access-date= 2021-01-20 |date= 2021-01-20 |ref= {{SfnRef|BME1|2021}} }}
* {{cite web |url= https://englandrover.com/listing/british-music-experience/ |title= Eddie the Head Icon Presentation (Liverpool) |publisher= englandrover.com |access-date= 2021-01-20 |date= 2021-01-20 |ref= {{SfnRef|BME2|2021}} }}
* {{cite web |url= https://media-cdn.tripadvisor.com/media/photo-s/10/78/26/cc/eddie-the-iron-maiden.jpg |title= Eddie the Head Icon Presentation (Liverpool) |publisher= media-cdn.tripadvisor.com |access-date= 2021-01-20 |date= 2021-01-20 |ref= {{SfnRef|BME3|2021}} }}
* {{cite web | url= http://www.ironmaiden.com/maiden-receive-special-achievement-award-at-nordoff-robbins.html | title= Maiden receive Special Achievement Award at Nordoff Robbins | access-date= 2011-09-30 | publisher= IronMaiden.com | date= 2007-01-29 | ref= {{SfnRef|Nordoff-Robbins|2021}} | archive-date= 8 December 2014 | archive-url= https://web.archive.org/web/20141208054948/http://www.ironmaiden.com/maiden-receive-special-achievement-award-at-nordoff-robbins.html | url-status= dead }}
* {{cite web|title=Visions of the Beast|url=https://www.ironmaiden.com/discography/details/visions-of-the-beast-1455404719|publisher=ironmaiden.com|date=2021-06-11|access-date=2021-06-11|ref={{SfnRef|VOTB|2021}}}}
* {{cite web|title=Give Me Ed Tour|url=https://www.ironmaiden.com/tours/give-me-ed-til-im-dead-tour---2003|publisher=ironmaiden.com|date=2021-06-11|access-date=2021-06-11|ref={{SfnRef|GMET|2021}}}}
* {{cite web|title=2003-04 Tour|url=http://ironmaidencommentary.com/?url=tour13_dod/tour13_dod&link=tours&lang=eng|publisher=ironmaiden.com|date=2021-06-11|access-date=2021-06-11|ref={{SfnRef|2003-04|2021}}}}
* {{cite web |url= http://www.ironmaiden.com:80/ironmaiden/news/news_071201.shtml |title= Online Music Awards |publisher= ironmaiden.com |date= 2021-06-10 |archive-url= https://web.archive.org/web/20020203164940/http://www.ironmaiden.com/ironmaiden/news/news_071201.shtml |access-date= 2021-06-10 |archive-date= 3 February 2002 |ref= {{SfnRef|Online Music Awards|2021}} |url-status= live }}
* {{cite web |title= SSofSS Recording |url= https://www.ironmaiden.com/discography/details/seventh-son-of-a-seventh-son |publisher= ironmaiden.com |date= 2021-06-10 |access-date= 2021-06-10 |ref= {{SfnRef|Musiclands|2021}} }}
* {{cite web|url=http://www.rockonthenet.com/grammy/metal.htm|title=Grammy Awards 2001|publisher=Rock on the Net|access-date=2009-03-08|date=2009-03-08|ref={{SfnRef|Grammy2001|2021}}}}
* {{cite news|url=https://www.independent.co.uk/arts-entertainment/music/news/craig-david-makes-up-for-brits-snub-with-novello-titles-685919.html|title=Craig David makes up for Brits snub with Novello titles|last=Gray|first=Chris|date=25 May 2001|work=[[The Independent]]|access-date=8 March 2009|archive-url=https://web.archive.org/web/20090521164315/http://www.independent.co.uk/arts-entertainment/music/news/craig-david-makes-up-for-brits-snub-with-novello-titles-685919.html|archive-date=21 May 2009|url-status=dead|ref={{SfnRef|IvorNovello|2021}}}}
* {{cite web|url=https://www.facebook.com/ralfie75/photos/a.1189581687799173/2996032773820713/?type=3&theater |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/2996032773820713 |archive-date=2022-02-26 |url-access=limited|title=Public Choice International|publisher=www.facebook.com/ralfie75/photos|date=2021-04-29|access-date=2021-04-29|ref={{SfnRef|IPCH1985|2021}}}}{{cbignore}}
* {{cite journal |title= Donington's a goner |journal= [[Classic Rock (magazine)|Classic Rock]] |date= March 2000 |issue= 12 |pages= 6–7|ref={{SfnRef|NewTour|2021}}}}
* {{cite web |title= Metal 2000 Tour |url= http://www.ironmaidencommentary.com/?url=tour12_bnw/tour12_bnw&lang=eng&link=tours |publisher= ironmaidencommentary.com |date= 2021-06-10 |access-date= 2021-06-10 |ref= {{SfnRef|Metal2000Tour|2021}} }}
* {{cite book | last1= Bayer | first1 =Gerd | title= Heavy Metal Music in Britain | publisher= [[Ashgate Publishing]] | location= Farnham, Surrey, UK}}
* {{cite web |url= http://www.metal-archives.com/albums/Iron_Maiden/Killers/74 |title= Iron Maiden 1981 |publisher= metal-archives.com |date= 2014-12-14 |access-date= 2014-12-14 |ref= {{SfnRef|KillSingles|2021}} }}
* {{cite web |url= http://www.ironmaidencommentary.com/?url=tour01_ironmaiden/dates01_ironmaiden&lang=eng&link=tours |title= Tour 1981 |publisher= ironmaidencommentary.com |date= 2014-12-14 |access-date= 2014-12-14 |ref= {{SfnRef|Tour1981|2021}} }}
* {{cite web |url= http://maidenfans.com/index.php?url=live_setlists.htm |title= USA 1981 |publisher= maidenfans.com |date= 2014-12-14 |access-date= 2014-12-14 |ref= {{SfnRef|USA1981|2021}} |archive-date= 14 December 2014 |archive-url= https://web.archive.org/web/20141214192941/http://maidenfans.com/index.php?url=live_setlists.htm |url-status= dead }}
* {{cite web |url= http://motorhead.rockmetal.art.pl/chrono2.htm |title= Golden Summernight 4 |publisher= motorhead.rockmetal.art.pl |access-date= 2014-12-14 |date= 2014-12-14 |ref= {{SfnRef|GoldenSummernight|2021}} }}
* {{cite book |author= Stjepan Juras |chapter= Killer World Tour |title= Killers |date= May 2021 |location= Zadar, Croatia |editor= Maiden Croatia Stjepan Juras|ref={{SfnRef|Juras1981|2021}}}}
* {{cite web|title=The Birthplace of Iron Maiden|url=https://www.cartandhorses.london/iron-maiden/|publisher=cartandhorses.london|access-date=2021-06-08|date=2021-06-08|ref={{SfnRef|Cart and Horses|2021}}}}
* {{cite web|title=Cristina Scabbia about Maiden|url=https://www.kerrang.com/the-news/lacuna-coil-have-been-added-to-iron-maidens-video-game/|publisher=kerrang.com|access-date=2021-06-08|date=2021-06-08|ref={{SfnRef|LacunaCoil IM|2021}}}}
* {{cite web |title= 40 anni di Iron Maiden: il 14 aprile 1980 usciva il primo album della band |date= 2020-04-14 |access-date= 2020-04-14 |publisher= notiziemusica.it |url= https://notiziemusica.it/iron-maiden-tracklist-e-storia/news/ |language= it |ref= {{SfnRef|40Anni|2021}} }}
* {{cite web |title= Estos discos cumplen 40 años en 2020 ¿Cuál es tu favorito? Ya tenemos los resultados de la encuesta |date= 2020-03-19 |access-date= 2020-04-14 |publisher= mariskalrock.com |url= https://mariskalrock.com/general/estos-discos-cumplen-40-anos-en-2020-cual-es-tu-favorito-ya-tenemos-los-resultados-de-la-encuesta/ |language= es |ref= {{SfnRef|40Anos|2021}} }}
* {{cite web |url= http://avaxsearch.org/?q=iron%20maiden%20japanese%20remaster |title= Japan 1980 |publisher= avaxsearch.org |access-date= 2014-12-14 |date= 2014-12-14 |ref= {{SfnRef|Japan 1980|2021}} }}
* {{cite web|title=Three decades of heavy metal thunder|url=https://www.loudersound.com/features/steve-harris-three-decades-of-heavy-metal-thunder|publisher=loudersound.com|access-date=2021-06-08|date=2021-06-08|ref={{SfnRef|LouderSound|2021}}}}
* {{cite web|title=First 10 Years: The Videos|url=https://www.metal-archives.com/albums/Iron_Maiden/The_First_Ten_Years/10862|publisher=metal-archives.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|F10YV|2021}}}}
* {{cite web|title=From Here to Eternity Videos|url=https://www.metal-archives.com/albums/Iron_Maiden/From_There_to_Eternity/13173|publisher=metal-archives.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|FHTEV|2021}}}}
* {{cite web|title=12 Wasted Years|url=https://www.metal-archives.com/albums/Iron_Maiden/12_Wasted_Years/10846|publisher=metal-archives.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|12WY|2021}}}}
* {{cite web|title=Behind the Iron Curtain|url=https://www.metal-archives.com/albums/Iron_Maiden/Behind_the_Iron_Curtain/10844|publisher=metal-archives.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|BTRC|2021}}}}
* {{cite web|title=Piece Videos|url=https://www.metal-archives.com/albums/Iron_Maiden/Video_Pieces/10843|publisher=metal-archives.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|Piece Videos|2021}}}}
* {{cite web|title=First albums|url=https://maidenrevelations.com/2012/10/19/feature-friday-the-birth-of-the-iron-maiden-sound-1980-81/|publisher=maidenrevelations.com|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|First Albums|2021}}}}
* {{cite web|title=Setlists Early Days|url=https://www.setlist.fm/stats/iron-maiden-3bd6803c.html|publisher=setlist.fm|access-date=2021-06-07|date=2021-06-07|ref={{SfnRef|SetlistED|2021}}}}
* {{cite web|url=https://www.facebook.com/ralfie75/photos/a.1189581687799173/3817154741708508/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/3817154741708508 |archive-date=2022-02-26 |url-access=limited|title=1980s recap|publisher=facebook.com|access-date=2021-06-06|date=2021-06-06|ref={{SfnRef|Recap80|2021}}}}{{cbignore}}
* {{cite web|url= https://www.portablepress.com/blog/2016/03/first-20-videos-played-on-mtv/|title= ''List of First 25 Videos played on MTV''|publisher= portablepress.com|access-date= 2014-12-06|date= 2014-12-06|ref= {{SfnRef|List25|2021}}}}
* {{Cite web |url= http://www.mtv.com/artists/iron-maiden/ |title= MTV |publisher= mtv.com |access-date= 2014-12-06 |date= 2014-12-06 |ref= {{SfnRef|MTV|2021}} }}
* {{cite web|url=https://www.mtv.com/videos/shows/subterranean/108030/gerard-way-tells-about-my-chemical-romances-influences.jhtml|title=My Chemical Romance influences|publisher=mtv.com|access-date=2021-06-06|date=2021-06-06|ref={{SfnRef|MCHR|2021}}}}
* {{cite web |url=https://www.officialcharts.com/charts/albums-chart/19840909/7502/ |title=1984 Top 40 Official UK Albums Archive – 15 September 1984 |access-date=30 September 2011 |publisher=Official Charts Company |ref={{SfnRef|UK Charts|2021}} }}
* {{cite web|url=https://www.facebook.com/ralfie75/posts/3593848277372490 |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/3593848277372490 |archive-date=2022-02-26 |url-access=limited|title=World Slavery Tour|publisher=facebook.com|access-date=2021-06-06|date=2021-06-06|ref={{SfnRef|WST1|2021}}}}{{cbignore}}
* {{cite web|url=https://www.facebook.com/ralfie75/photos/a.1189581687799173/4086802178077095/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/4086802178077095 |archive-date=2022-02-26 |url-access=limited|title=No Prayer on the Road Europe|publisher=facebook.com|access-date=2021-06-06|date=2021-06-06|ref={{SfnRef|1990EU|2021}}}}{{cbignore}}
* {{cite web|url=https://www.ironmaiden.com/the-band|title=IM Bio|publisher=ironmaiden.com|date=2021-06-06|access-date=2021-06-06|ref={{SfnRef|IMBio|2021}}}}
* {{Cite book|title=Vinyl|last=Evans|first=Mike|publisher=Sterling|year=2015|ref={{SfnRef|LAD|2021}}}}
* {{cite web|last=Lane|first=Daniel|title=Iron Maiden tour plans|url=http://www.metalhammer.co.uk/news/iron-maiden-tour-plans/|work=[[Metal Hammer]]|access-date=27 November 2012|date=7 September 2007|archive-url=https://web.archive.org/web/20130602192105/http://www.metalhammer.co.uk/news/iron-maiden-tour-plans/|archive-date=2 June 2013|ref={{SfnRef|WST|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/tours/world-piece-tour--1983|title=World Piece Tour 1983|publisher=ironmaiden.com|date=2021-06-06|access-date=2021-06-06|ref={{SfnRef|WPT|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/news/article/the-live-collection-remastered|title=Live Collection|publisher=ironmaiden.com|date=2021-06-06|access-date=2021-06-06|ref={{SfnRef|Live Coll|2021}}}}
* {{cite web|url=https://maidenrevelations.com/2017/08/15/feature-friday-into-darkness-1992-1993/|title=1992 – 1993 era|publisher=maidenrevelations.com|date=2021-06-06|access-date=2021-06-06|ref={{SfnRef|DarkEra|2021}}}}
* {{cite web|url=http://www.ironmaidenbrasil.com.br/2021/03/the-number-of-beast-39-anos-de-ascensao.html|title=TNOTB 39 Anos|publisher=ironmaidenbrasil.com.br|date=2021-06-06|access-date=2021-06-06|language=pt|ref={{SfnRef|39Anos|2021}}}}
* {{cite web|url=https://maidenrevelations.com/2012/11/30/feature-friday-dawn-of-the-classic-era-1982-1983/|title=Dawn of the classic era|publisher=maidenrevelations.com|date=2021-06-06|access-date=2021-06-06|ref={{SfnRef|Golden Era|2021}}}}
* {{cite AV media|title=Fear of the Dark Enhanced CD|year=1998|publisher=EMI|ref={{SfnRef|FotDCDROM|2021}}}}
* {{cite book|last= Rodríguez Rojas |first= Luis Mariano |title= Detailed Discography of the Beast [ebook] |publisher= A Run Hard Publication |year=2020|ref={{SfnRef|DDotB|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/tours/virtual-xi-world-tour-1998|title=Virtual XI tour|publisher=ironmaiden.com|date=2021-06-05|access-date=2021-06-05|ref={{SfnRef|VXI|2021}}}}
* {{cite book |last=Paterson|first=Lawrence |author-link= Lawrence Paterson |title= At The End Of The Day – The story of the Blaze Bayley Band|publisher=Blaze Bayley Recordings Ltd. |year=2009 |ref={{SfnRef|Paterson|2021|p=72}}}}
* {{cite web |url= https://maidenrevelations.com/2020/10/05/maiden-history-the-blaze-era-part-2-1997-1998/ |title= 1998 stage production |publisher= maidenrevelations.com |access-date= 2021-06-05 |date= 2021-06-05 |ref= {{SfnRef|1998Prod|2021}} }}
* {{cite book |author= Rod Smallwood |title= X Factor Press Release|year= 1995|editor= EMI |location= UK|ref={{SfnRef|Attendance1994|2021}}}}
* {{cite web |url= http://www.rockonthenet.com/archive/1994/grammys.htm |title= Grammy 1994 |publisher= rockonthenet.com |access-date= 2014-12-15 |date= 2014-12-15 |ref= {{SfnRef|Grammy1994|2021}} }}
* {{cite web|url=https://www.ironmaiden.com/tours/the-final-frontier-world-tour-2010|title=The Final Frontier tour dates|publisher=ironmaiden.com|access-date=2021-06-02|date=2021-06-02|ref={{SfnRef|Soni|2021}}}}
* {{cite web|url=https://www.soundsblog.it/post/132751/concerto-primo-maggio-nel-1993-cerano-gli-iron-maiden-sul-palco-di-roma|title=Concerto Primo Maggio|publisher=soundsblog.it|access-date=2021-06-01|date=2021-06-01|language=it|ref={{SfnRef|Primo1|2021}}}}
* {{cite web|url=https://www.italymagazine.com/news/primo-maggio-concert-rome|title=Concerto Primo Maggio 1993|publisher=italymagazine.com|access-date=2021-06-01|date=2021-06-01|language=it|ref={{SfnRef|Primo2|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/tours/fear-of-the-dark-tour-1992|title=Fear of the Dark Tour MOR Tour|publisher=ironmaiden.com|access-date=2021-05-31|date=2021-05-31|ref={{SfnRef|MOR1992|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/tours/seventh-tour-of-a-seventh-tour-1988|title=Seventh Tour|publisher=ironmaiden.com|access-date=2021-05-31|date=2021-05-31|ref={{SfnRef|MOR1988|2021}}}}
* {{cite web|url=https://www.facebook.com/ralfie75/photos/a.1189581687799173/4087814017975911/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/4087814017975911 |archive-date=2022-02-26 |url-access=limited|title=SoT equipment|publisher=facebook.com|access-date=2021-05-31|date=2021-05-31|ref={{SfnRef|SOT|2021}}}}{{cbignore}}
* {{cite web|url=https://www.kerrang.com/features/inside-gojira-new-metal-masterpiece-fortitude-and-their-fight-for-our-future/?next|title=Gojira influences|publisher=kerrang.com|access-date=2021-05-30|date=2021-05-30|ref={{SfnRef|Gojira|2021}}}}
* {{cite web|url=http://strefamusicart.pl/2020/09/04/polish-metal-alliance-w-coverze-iron-maiden/|title=Polish Metal Alliance|publisher=strefamusicart.pl|language=pl|date=2021-05-27|access-date=2021-05-27|ref={{SfnRef|Polish Metal Alliance|2021}}}}
* {{cite web|url=https://www.allmusic.com/artist/funeral-for-a-friend-mn0000187422/biography|title=FFAF influences|publisher=allmusic.com|access-date=2021-05-25|date=2021-05-25|ref={{SfnRef|FFAF|2021}}}}
* {{cite web|url=https://www.allmusic.com/artist/iron-savior-mn0000083505/biography|title=Iron Savior influences|publisher=allmusic.com|access-date=2021-05-25|date=2021-05-25|ref={{SfnRef|Iron Savior|2021}}}}
* {{cite web |title= Steve Harris and His Right Hand Versus the World |access-date= 2021-05-25 |date= 2021-05-25 |publisher= ultimate-guitar.com |url= https://www.ultimate-guitar.com/articles/features/steve_harris_and_his_right_hand_versus_the_world-93421 |ref= {{SfnRef|Harris|2021}} }}
* {{cite book |author= Martin Popoff |title= Wheels of Steel – the explosive early years of the NWOBHM|isbn= 978-1912782185 |location= Canada |editor= Power Chord Press|year= 2021|ref= {{SfnRef|Barton|2015}}}}
* {{cite web|url=https://www.ironmaiden.com/the-band|title=Knebworth 2014|publisher=ironmaiden.com|date=2021-05-25|access-date=2021-05-25|ref={{SfnRef|Knebworth 2014|2021}}}}
* {{cite web|url=https://www.ironmaiden.com/news/article/trooper-announced-as-the-official-ale-of-sonisphere|title=Tour info|publisher=ironmaiden.com|date=2021-05-25|access-date=2021-05-25|ref={{SfnRef|METour|2021}}}}
* {{cite web|url=https://www.ironmaidenbeer.com/news/|title=30 mln pints sold|publisher=ironmaidenbeer.com|date=2021-05-25|access-date=2021-05-25|ref={{SfnRef|Trooper30|2021}}}}
* {{cite web |url= https://drummagazine.com/gene-hoglan-master-blaster-2/ |title= Gene Hoglan on Iron Maiden |date= 2021-05-31 |access-date= 2021-05-31 |publisher= drummagazine.com |ref= {{SfnRef|Hoglan|2021}} }}
* {{cite web |url= https://www.guitarworld.com/features/dimebag-darrell-reveals-his-12-favorite-metal-tracks-in-this-classic-1993-guitar-world-interview |title= Dimebag Darrell reveals his 12 favorite metal tracks in this classic 1993 Guitar World interview |date= 2022-02-21 |access-date= 2022-02-21 |publisher= [[Guitar World|guitarworld.com]] |ref= {{SfnRef|Dime|2022}} }}
* {{cite web |url= https://www.nolifetilmetal.com/viciousrumors.htm |title= Vicious Rumors on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= nolifetilmetal.com |ref= {{SfnRef|Vicious|2021}} }}
* {{cite web |url= http://www.bardomethodology.com/articles/2016/03/14/anathema/ |title= Anathema on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= bardomethodology.com |ref= {{SfnRef|Anathema|2021}} }}
* {{cite web |url= https://metalinjection.net/interviews/my-dying-brides-aaron-stainthorpe-the-artists-that-made-me |title= MDB on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metalinjection.net |ref= {{SfnRef|MDB|2021}} }}
* {{cite web |url= https://www.loudersound.com/features/overkills-bobby-blitz-ellsworth-the-10-records-that-changed-my-life |title= Bobby Blitz Ellsworth on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= loudersound.com |ref= {{SfnRef|Overkill|2021}} }}
* {{cite web |url= https://www.metal-rules.com/2019/10/18/nile-interview-with-karl-sanders-vocals-guitars-bass-keyboards-baglama-bouzouki/ |title= Sanders on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metal-rules.com |ref= {{SfnRef|Sanders|2021}} }}
* {{cite web |url= https://consequence.net/2021/03/heavy-culture-moonspell-fernando-ribeiro/ |title= Moonspell on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= consequence.net |ref= {{SfnRef|Moonspell|2021}} }}
* {{cite web |url= https://www.seaoftranquility.org/reviews.php?op=showcontent&id=4314 |title= Hammerfall on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= seaoftranquility.org |ref= {{SfnRef|Hammerfall|2021}} }}
* {{cite web |url= https://www.blabbermouth.net/news/did-metal-church-use-fast-thrash-style-riffing-before-metallica-kurdt-vanderhoof-weighs-in/ |title= Kurdt Vanderhoof on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= blabbermouth.net |ref= {{SfnRef|Vanderhoof|2021}} }}
* {{cite web |url= https://www.photogroupie.com/post/2013/08/13/jeff-waters-interview |title= Jeff Waters on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= photogroupie.com |ref= {{SfnRef|Annihilator|2021}} }}
* {{cite web |url= https://www.collideartandculture.com/single-post/2015/04/08/Interview-Bill-Steer-of-Carcass |title= Carcass on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= collideartandculture.com |ref= {{SfnRef|Carcass|2021}} }}
* {{cite web |url= https://www.rockpages.gr/stratovarius/?lang=en |title= Stratovarius on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= rockpages.gr |ref= {{SfnRef|Stratovarius|2021}} }}
* {{cite book |url= https://books.google.com/books?id=YaDDsg0H35gC&q=warlock+iron+maiden+influence&pg=PT265 |title= Warlock on Iron Maiden |date= 2021-05-25 |isbn= 9780760742181 |access-date= 2021-05-25 |ref= {{SfnRef|Warlock|2021}} |last1= Bukszpan |first1= Daniel }}
* {{cite web |url= http://www.ram.org/music/primus/articles/say_cheese.html |title= Larry LaLonde on Iron Maiden |date= 2021-12-29 |access-date= 2021-12-29 |publisher= ram.org |ref= {{SfnRef|LaLonde|2021}} }}
* {{cite web |url= http://anybodylistening.net/rockenfield.html |title= Queensryche on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |archive-url= https://web.archive.org/web/20130726210408/http://anybodylistening.net/rockenfield.html |archive-date= 26 July 2013 |ref= {{SfnRef|Queensryche|2021}} }}
* {{cite web |url= https://www.wikimetal.com.br/interview-with-michael-amott-arch-enemy/ |title= Arch Enemy on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= wikimetal.com.br |ref= {{SfnRef|Arch Enemy|2021}} }}
* {{cite web |url= https://www.givememetal.com/melodicdeathtrees/children-of-bodom-family-tree |title= Children of Bodom on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= givememetal.com |ref= {{SfnRef|Bodom|2021}} }}
* {{cite web |url= http://www.running-wild.net/html/rk051996.html |title= Running Wild on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= running-wild.net |ref= {{SfnRef|RWild|2021}} }}
* {{cite web |url= http://www.metal-temple.com/site/catalogues/entry/reviews/cd_3/g_2/grave-digger-heavy.htm |title= Grave Digger on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metal-temple.com |ref= {{SfnRef|Digger|2021}} }}
* {{cite web |url= https://echoesanddust.com/2020/11/anders-strokir-from-necrophobic/ |title= Necrophobic on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= echoesanddust.com |ref= {{SfnRef|Necrophobic|2021}} }}
* {{cite web |url= http://themetalist.net/a-second-interview-with-chris-barnes-six-feet-under/ |title= Chris Barnes on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= themetalist.net |ref= {{SfnRef|Barnes|2021}} }}
* {{cite web |url= https://www.metalreviews.com/reviews/album/3493 |title= Wolf on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metalreviews.com |ref= {{SfnRef|Wolf|2021}} }}
* {{cite web |url= https://www.metal-archives.com/reviews/Edguy/Mandrake/3153/lukretion/856242 |title= Edguy on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metal-archives.com |ref= {{SfnRef|Edguy|2021}} }}
* {{cite web |url= http://www.ram.org/music/articles/angrinterview.html |title= Angra on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= ram.org |ref= {{SfnRef|Angra|2021}} }}
* {{cite web |url= http://metalkings.com/reviews/blind-guardian/blind-guardian.htm |title= Blind Guardian on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= metalkings.com |ref= {{SfnRef|Blind Guardian|2021}} |archive-date= 29 January 2018 |archive-url= https://web.archive.org/web/20180129140623/http://metalkings.com/reviews/blind-guardian/blind-guardian.htm |url-status= dead }}
* {{cite web |url= https://www.blabbermouth.net/news/gamma-ray-frontman-we-wanted-to-create-album-that-was-more-cheerful-or-positive/ |title= Gamma Ray on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= blabbermouth.net |ref= {{SfnRef|Gamma|2021}} }}
* {{cite web |url= https://www.powerofmetal.dk/interviews/powerwolf.htm |title= Powerwolf on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= powerofmetal.dk |ref= {{SfnRef|Powerwolf|2021}} }}
* {{cite web |url= https://www.allmusic.com/artist/sepultura-mn0000741746/biography |title= Sepultura on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= allmusic.com |ref= {{SfnRef|Sepultura|2021}} }}
* {{cite web |url= https://www.allmusic.com/artist/savatage-mn0000255347/biography |title= Savatage on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= allmusic.com |ref= {{SfnRef|Savatage|2021}} }}
* {{cite web |url= https://www.allmusic.com/artist/dri-mn0000786360/related |title= D.R.I. on Iron Maiden |date= 2021-06-08 |access-date= 2021-06-08 |publisher= allmusic.com |ref= {{SfnRef|D.R.I.|2021}} }}
* {{cite web |url= https://www.givememetal.com/thrashmetaltrees/sodom-family-tree |title= Sodom on Iron Maiden |date= 2021-06-08 |access-date= 2021-06-08 |publisher= givememetal.com |ref= {{SfnRef|Sodom|2021}} }}
* {{cite web |url= http://www.metal-temple.com/site/catalogues/entry/musicians/phil_rind_sacred_reich.htm |title= Sacred Reich on Iron Maiden |date= 2022-04-29 |access-date= 2022-04-29 |publisher= metal-temple.com |ref= {{SfnRef|SR|2022}} }}
* {{cite web |url= https://www.allmusic.com/artist/coroner-mn0000122138/related |title= Coroner on Iron Maiden |date= 2022-04-29 |access-date= 2022-04-29 |publisher= allmusic.com |ref= {{SfnRef|Coroner|2022}} }}
* {{cite web |url= https://www.allmusic.com/artist/watchtower-mn0000237653/related |title= Watchtower on Iron Maiden |date= 2022-04-29 |access-date= 2022-04-29 |publisher= allmusic.com |ref= {{SfnRef|Watchtower|2022}} }}
* {{cite web |url= https://www.allmusic.com/artist/wrathchild-america-mn0000959503/related |title= Wrathchild America on Iron Maiden |date= 2022-04-29 |access-date= 2022-04-29 |publisher= allmusic.com |ref= {{SfnRef|WA|2022}} }}
* {{cite web |url= https://www.northwestmusicscene.net/forced-entry-reflects-back-25-years-uncertain-future/ |title= Forced Entry on Iron Maiden |date= 2022-04-29 |access-date= 2022-04-29 |publisher= northwestmusicscene.net |ref= {{SfnRef|FE|2022}} }}
* {{cite web |url= https://www.givememetal.com/thrashmetaltrees/flotsam-and-jetsam-family-tree |title= Flotsam and Jetsam on Iron Maiden |date= 2021-06-08 |access-date= 2021-06-08 |publisher= givememetal.com |ref= {{SfnRef|Flotsam and Jetsam|2021}} }}
* {{cite web |url= https://www.blabbermouth.net/news/ghost-leader-says-iron-maiden-has-been-very-influential-on-him-musically/ |title= Tobias Forge on Iron Maiden |date= 2021-05-25 |access-date= 2021-05-25 |publisher= blabbermouth.net |ref= {{SfnRef|Tobias Forge|2021}} }}
* {{cite web |url= https://www.metalcastle.net/tom-morello-reveals-his-musical-influences-favorite-band-of-all-time/ |title= Tom Morello on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= metalcastle.net |ref= {{SfnRef|Morello|2021}} }}
* {{cite web |url= https://loudwire.com/10-bands-who-influenced-mastodon/ |title= Mastodon on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= loudwire.com |ref= {{SfnRef|Mastodon|2021}} }}
* {{cite web |url= https://www.givememetal.com/deathmetaltrees/tag/inspirations |title= Vincent & Tucker on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= givememetal.com |ref= {{SfnRef|Morbid Angel|2021}} }}
* {{cite web |url= https://www.givememetal.com/thrashmetaltrees/heathen-family-tree |title= Altus on Iron Maiden |date= 2021-06-08 |access-date= 2021-06-08 |publisher= givememetal.com |ref= {{SfnRef|Altus|2021}} }}
* {{cite web |url= https://inflooenz.com/?artist=Lamb+of+God |title= Lamb of God on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= inflooenz.com |ref= {{SfnRef|LOG|2021}} }}
* {{cite web |url= https://www.musicradar.com/news/guitars/zoltan-bathory-picks-10-essential-guitar-albums-601347 |title= FFDP on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= musicradar.com |ref= {{SfnRef|FFDP|2021}} }}
* {{cite web |url= https://music.avclub.com/serj-tankian-on-his-musical-firsts-and-learning-to-love-1798233456 |title= Tankian on Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= music.avclub.com |ref= {{SfnRef|SOAD|2021}} }}
* {{cite web |url= http://rockandrollgarage.com/listen-to-possible-kurt-cobains-audio-playing-iron-maiden/ |title= K. Cobain plays Iron Maiden |date= 2021-05-23 |access-date= 2021-05-23 |publisher= rockandrollgarage.com |ref= {{SfnRef|Cobain|2021}} }}
* {{cite web |url= https://www.aversionline.com/view/mike-clark-waking-the-dead-ex-no-mercy-ex-suicidal-tendencies |title= Mike Clark on Iron Maiden |date= 2021-05-31 |access-date= 2021-05-31 |publisher= aversionline.com |ref= {{SfnRef|Clark|2021}} }}
* {{cite web |url= http://www.ultimate-guitar.com/news/general_music_news/former_iron_maiden_drummer_clive_burr_passes_away_at_56_fans_and_musicians_react.html |title= Dave Lombardo on Iron Maiden |date= 2021-05-31 |access-date= 2021-05-31 |publisher= ultimate-guitar.com |ref= {{SfnRef|Lombardo|2021}} }}
* {{cite web|url=http://www.metalstorm.net/bands/band.php?band_id=127|publisher=metalstorm.net|title=Sanctuary, Nevermore influences|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|SancNever|2021}}}}
* {{cite web|url=https://www.blabbermouth.net/news/cradle-of-filth-guitarist-a-few-people-have-described-us-as-iron-maiden-on-crack/|title=COF guitarist on Iron Maiden|publisher=blabbermouth.net|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|COF|2021}}}}
* {{cite web|url=https://www.rp.pl/artykul/897102-Nergal--zawodowiec-cynik-satanista-celebryta.html|title=Nergal – Biography|publisher=rp.pl|date=2021-05-23|access-date=2021-05-23|language=pl|ref={{SfnRef|Nergal|2021}}}}
* {{cite web|url=http://www.metalcentre.com/webzine.php?p=interviews&nr=322&lang=eng|title=Nifelheim on Maiden|publisher=metalcentre.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Nifelheim|2021}}}}
* {{cite web|url=https://www.allmusic.com/album/sworn-to-the-dark-mw0000746907|title=Watain's influences|publisher=allmusic.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Watain|2021}}}}
* {{cite web|url=http://www.deathmetal.org/bands/dissection/|title=Dissection's influences|publisher=deathmetal.org|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Dissection|2021}}}}
* {{cite web|url=https://www.allmusic.com/artist/dimmu-borgir-mn0000214580|title=Dimmu Borgir's influences|publisher=allmusic.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Dimmu|2021}}}}
* {{cite web|url=https://www.burzum.org/eng/library/2010_interview_guitar_world.shtml|title=Vikernes on Iron Maiden|publisher=burzum.org|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Vikernes|2021}}}}
* {{cite web|url=https://www.loudersound.com/features/darkthrones-fenriz-2016s-most-surprising-metal-celebrity|title=Fenriz on Iron Maiden|publisher=loudersound.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Fenriz|2021}}}}
* {{cite web|url=https://www.guitarworld.com/features/interview-kreators-mille-petrozza-talks-phantom-antichrist|title=Mille Petrozza on Iron Maiden|publisher=guitarworld.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Mille Petrozza|2018}}}}
* {{cite web|url=http://www.metalforcesmagazine.com/site/feature-destruction-05-16/|title=Schirmer on Iron Maiden|publisher=metalforcesmagazine.com|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Schirmer|2016}}}}
* {{cite web|url=https://www.emptywords.org/perennial.htm|title=Schuldiner on Iron Maiden|publisher=emptywords.org|date=2021-05-23|access-date=2021-05-23|ref={{SfnRef|Schuldiner|2019}}}}
* {{cite web|url= https://metalfromfinland.com/ten-questions/916/ten-questions-esa-holopainen-amorphis/|title= Amorphis on Maiden|publisher= metalfromfinland.com|date= 2021-05-22|access-date= 2021-05-22|ref= {{SfnRef|Amorphis|2021}}}}
* {{cite web|url= http://therion.se/band/|title= Therion on Maiden|date= 2021-05-22|archive-url= https://web.archive.org/web/20180927135703/http://therion.se/band/|access-date= 2021-05-22|archive-date= 27 September 2018|ref= {{SfnRef|Therion|2021}}}}
* {{cite book |author= Reinhardt Haydn |title= HIM – His Infernal Majesty |isbn= 978-0-85965-392-3 |location= London, United Kingdom |editor= Plexus Publishing |year= 2007|ref= {{SfnRef|Ville Valo|2007|p=14}}}}
* {{cite web |url= https://www.loudersound.com/features/10-albums-that-changed-my-life-by-sabaton-s-joakim-broden-metal-iron-maiden-judas-priest |title= Sabaton on Maiden |publisher= loudersound.com |date= 2021-05-22 |access-date= 2021-05-22 |ref= {{SfnRef|Sentenced|2021}} }}
* {{cite web |url=https://www.wikimetal.com.br/interview-with-jon-schaffer-iced-earth/ |title=Iced Earth on Maiden |publisher=wikimetal.com.br |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|Iced Earth|2021}} }}
* {{cite web |url=https://www.ultimate-guitar.com/news/interviews/bullet_for_my_valentine_what_you_need_to_rock.html |title=Bullet For My Valentine on Maiden |publisher=ultimate-guitar.com |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|BFMV|2021}} }}
* {{cite web |url=http://www.sentenced.org/v3/interview_3.html |title=Sentenced on Maiden |publisher=sentenced.org |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|Sentenced on Maiden|2021}} }}
* {{cite web |url=https://www.metalblade.com/us/news/iron-maiden-legacy-of-the-beast-announces-ground-breaking-in-game-collaboration-with-amon-amarth/ |title=LOTB Game results |publisher=metalblade.com |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|LOTB Game|2021}} }}
* {{cite web |url=https://www.theguardian.com/media/2010/mar/10/bbc-6-music-bruce-dickinson |title=Friday Rock Show |publisher=theguardian.com |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|FRS|2010}} }}
* {{cite web|url= https://www.blabbermouth.net/news/iron-maiden-singer-to-host-masters-of-rock-radio-program|title= Masters of Rock|publisher= blabbermouth.net|date= 2021-05-22|access-date= 2021-05-22|ref= {{SfnRef|MOR BBC|2007}}}}
* {{cite web|url= https://www.imdb.com/title/tt0101165/|title= The Club Paradise|publisher= IMDb|date= 2021-05-22|access-date= 2021-05-22|ref= {{SfnRef|Club Paradise|1990}}}}
* {{cite web |url= https://www.imdb.com/title/tt7797318/?ref_=nv_sr_srsg_0 |title= Mr Bean's Elected |publisher= IMDb |date= 2021-05-22 |access-date= 2021-05-22 |ref= {{SfnRef|Mr Bean|1991}} }}
* {{cite web |url= https://www.imdb.com/title/tt0097981/ |title= A Nightmare on Elm Street: The Dream Child |publisher= IMDb |date= 2021-05-22 |access-date= 2021-05-22 |ref= {{SfnRef|Nightmare|1989}} }}
* {{cite web |url= https://www.imdb.com/title/tt5714748/ |title= Flying Heavy Metal (Discovery Series) |publisher= IMDb |date= 2021-05-22 |access-date= 2021-05-22 |ref= {{SfnRef|Flying Heavy Metal|2005}} }}
* {{cite web|url= https://www.imdb.com/title/tt6107796/?ref_=nv_sr_srsg_0|title= Schemers|publisher= IMDb|date= 2021-05-22|access-date= 2021-05-22|ref= {{SfnRef|Schemers|2020}}}}
* {{cite web |url=https://www.imdb.com/title/tt8995862/ |title=The Night of the Beast |publisher=IMDb |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|The Night of the Beast|2020}} }}
* {{cite web |url=https://www.imdb.com/title/tt1249171/?ref_=nv_sr_srsg_0 |title=Global Metal documentary |publisher=IMDb |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|Global Metal|2008}} }}
* {{cite web |url=https://www.allmovie.com/movie/v482034 |title=Flight 666 documentary |publisher=IMDb |date=2021-05-22 |access-date=2021-05-22 |ref={{SfnRef|Flight 666 the movie|2009}} }}
* {{cite web |url= http://turbo.art.pl/biografia/historia-zespolu/ |title= Biografia Turbo |publisher= turbo.art.pl |date= 2021-05-21 |access-date= 2021-05-21 |language= pl |ref= {{SfnRef|Turbo|2021}} }}
* {{cite web |url=https://loudwire.com/david-draiman-korn-tool-deftones-influence-disturbed/ |title=Iron Maiden influences |publisher=loudwire.com |date=2021-05-21 |access-date=2021-05-21 |ref={{SfnRef|David Draiman|2021}} }}
* {{cite web |url=http://www.knac.com/article.asp?ArticleID=16287 |title=Sum 41 influences |publisher=knac.com |date=2021-05-21 |access-date=2021-05-21 |ref={{SfnRef|Sum 41|2021}} }}
* {{cite web |url=https://www.blabbermouth.net/news/watch-machine-head-perform-cover-of-iron-maidens-hallowed-be-thy-name-in-fort-lauderdale/ |title=Machine Head perform cover of Iron Maiden's classic hit |publisher=blabbermouth.net |date=2021-05-21 |access-date=2021-05-21 |ref={{SfnRef|Machine Head|2021}} }}
* {{cite web |url=https://www.givememetal.com/sludgemetaltrees/melvins-family-tree |title=Melvins on Iron Maiden |work=givememetal.com |date=2021-12-29 |access-date=2021-12-29 |ref={{SfnRef|Melvins|2021}} }}
* {{cite web |url=https://vulturehound.co.uk/2014/10/interview-skid-row/ |title=Skid Row influences |publisher=vulturehound.co.uk |date=2021-05-21 |access-date=2021-05-21 |ref={{SfnRef|Skid Row|2021}} }}
* {{cite web |url=https://www.latimes.com/archives/la-xpm-1988-01-24-ca-37884-story.html |title=Death Angel influences |work=[[Los Angeles Times|latimes.com]] |date=2021-05-21 |access-date=2021-05-21 |ref={{SfnRef|Death Angel|2021}} }}
* {{cite web |url=https://www.givememetal.com/progressivemetaltrees/fates-warning-family-tree |title=Fates Warning on Iron Maiden |work=givememetal.com |date=2021-12-29 |access-date=2021-12-29 |ref={{SfnRef|Fates Warning|2021}} }}
* {{cite book |author= K.K. Downing, Mark Eglinton |title= Heavy Duty: Nights and Days in Judas Priest |isbn= 978-0306903311 |location= UK |editor =Da Capo Press |year= 2018|ref= {{SfnRef|K.K. Downing|2018|pp=138–139}}}}
* {{cite web|title=Twiggy Ramirez influences|url=http://www.basetendencies.com/Biography|publisher=basetendencies.com|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Twiggy Ramirez|2021}}}}
* {{cite web|title=Helloween on Iron Maiden|url=https://www.loudersound.com/features/helloween-were-not-as-big-as-maiden-but-were-way-bigger-than-spinal-tap|publisher=loudersound.com|date=2021-05-21|access-date=2021-05-21|ref={{SfnRef|Helloween on Maiden|2021}}}}
* {{cite web|title=Dave Navarro Bio|url=https://forbassplayersonly.com/dave-navarro/|publisher=forbassplayersonly.com|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Navarro|2021}}}}
* {{cite web|title=RNRFC Nicko McBrain|url=https://www.rockcamp.com/fantasy-camp-dave-mustaine.php|publisher=rockcamp.com|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|RNRFC|2021}}}}
* {{cite web|title=Legacy of the Beast Tour extravagance|url=https://www.ironmaiden.com/the-band|publisher=ironmaiden.com|date=2021-05-21|access-date=2021-05-21|ref={{SfnRef|LOTB Tour|2021}}}}
* {{cite web|title=Iron Maiden Biography|url=https://www.ironmaiden.com/the-band|publisher=ironmaiden.com|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Iron Maiden Bio|2021}}}}
* {{cite web|url=https://www.guitarworld.com/features/armored-saint-joey-vera|publisher=guitarworld.com|title=Vera on Maiden|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Vera Armored Saint|2021}}}}
* {{cite web|url=https://bravewords.com/news/emperors-ihsahn-i-grew-up-on-iron-maiden|publisher=bravewords.com|title=Ihsahn on Maiden|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Ihsahn|2021}}}}
* {{cite web|url=https://www.eonmusic.co.uk/testament-chuck-billy-eonmusic-interview-october-2016.html|publisher=eonmusic.co.uk|title=Testament on Maiden|date=2021-05-20|access-date=2021-05-20|ref={{SfnRef|Testament on Maiden|2021}}}}
* {{cite web |url= https://englandrover.com/listing/british-music-experience/ |title= Eddie the Head Icon Presentation (Liverpool) |publisher= englandrover.com |access-date= 2021-05-19 |date= 2021-05-19 |ref= {{SfnRef|BME Exhibition|2021}} }}
* {{cite web |url= https://www.facebook.com/ralfie75/photos/a.1189581687799173/4134816023275710/ |archive-url=https://ghostarchive.org/iarchive/facebook/418784934878856/4134816023275710 |archive-date=2022-02-26 |url-access=limited|title= Heavy Metal exhibition in RNRHOF |publisher= facebook.com |access-date= 2021-05-19 |date= 2021-05-19 |ref= {{SfnRef|Heavy Metal Exhibition|2021}} }}{{cbignore}}
* {{cite web |title= Danny Lilker on Iron Maiden |url= https://www.metalcrypt.com/pages/interviews.php?intid=763 |publisher= metalcrypt.com |date= 2022-04-29 |access-date= 2022-04-29 |ref= {{SfnRef|Lilker|2022}} }}
* {{cite web |title= Megadeth on Iron Maiden |url= https://metalinjection.net/news/megadeths-dave-mustaine-shares-advice-iron-maidens-bruce-dickinson-gave-him-about-dealing-with-throat-cancer |publisher= metalinjection.net |date= 2021-05-19 |access-date= 2021-05-19 |ref= {{SfnRef|Megadeth on Maiden|2021}} }}
* {{cite web |title= Exodus on Iron Maiden |url= http://www.metalforcesmagazine.com/site/feature-exodus-mf9/ |publisher= metalforcesmagazine.com |date= 2021-05-19 |access-date= 2021-05-19 |ref= {{SfnRef|Exodus on Maiden|2021}} }}
* {{cite web |title= Voivod on Iron Maiden |url= https://www.kerrang.com/features/voivods-michel-away-langevin-the-fear-i-had-in-the-90s-of-being-completely-forgotten-hasnt-happened-i-have-achieved-what-i-was-hoping-to-do/ |publisher= kerrang.com |date= 2021-05-19 |access-date= 2021-05-19 |ref= {{SfnRef|Voivod on Maiden|2021}} }}
* {{cite book|title= Neil Daniels on Iron Maiden|url= https://books.google.com/books?id=3ZUnMQAACAAJ&q=Iron+Maiden+Playing+With+Madness+:+A+Collection+of+Writings+on+the+Beast,+Paperback+by+Daniels,+Neil,|date= 2021-05-18|isbn= 9781540515803|access-date= 2021-05-18|ref= {{SfnRef|Neil Daniels|2019}}|last1= Daniels|first1= Neil}}
* {{cite web|title= RnRHoF Note|url= https://www.rockhall.com/2021-nominee-iron-maiden|publisher= rockhall.com|date= 2021-05-19|access-date= 2021-05-19|ref= {{SfnRef|RnRHoF Note|2021}}}}
* {{cite book |author= Martin Popoff |title= Wheels of Steel – the explosive early years of the NWOBHM p.193 |isbn= 978-1912782185 |location= Canada |editor= Power Chord Press|year= 2021|ref= {{SfnRef|Götz Kühnemund|2019}}}}
* {{cite web|title= Impellitteri on Iron Maiden|url= https://www.facebook.com/chrisimpellitteriofficial/posts/305513064263359 |archive-url=https://ghostarchive.org/iarchive/facebook/100044140044387/305513064263359 |archive-date=2022-02-26 |url-access=limited|publisher= facebook.com|date= 2021-05-18|access-date= 2021-05-18|ref= {{SfnRef|Chris Impellitteri|2021}}}}{{cbignore}}
* {{cite web|title= Lady Gaga on Iron Maiden|url= https://www.nme.com/news/music/lady-gaga-347-1286406|publisher= nme.com|date= 2021-05-18|access-date= 2021-05-18|ref= {{SfnRef|Lady GaGa on Iron Maiden|2021}}}}
* {{cite web|title=Benante on Iron Maiden|url=https://www.facebook.com/watch/?v=563230517721510|publisher=facebook.com|date=18 May 2021|access-date=18 May 2021|ref={{SfnRef|Benante|2021}}}}
* {{cite web |title= Eternal importance of Iron Maiden |url= https://www.stereogum.com/1825458/lifelong-dirtbag-the-eternal-importance-of-iron-maiden/columns/sounding-board/ |publisher= stereogum.com |date= 18 May 2021 |access-date= 18 May 2021 |ref= {{SfnRef|Importance of Iron Maiden|2021}} }}
* {{cite web |title= Iron Maiden fashion? |url= https://www.shutterstock.com/editorial/search/iron-maiden |publisher= shutterstock.com |date= 18 May 2021 |access-date= 18 May 2021 |ref= {{SfnRef|Iron Maiden Fashion|2021}} }}
* {{cite web|title= Celebrities wearing Iron Maiden t-shirts|url= https://www.buzzfeed.com/kelleydunlap/celebrities-wearing-iron-maiden-t-shirts|publisher= buzzfeed.com|date= 18 May 2021|access-date= 18 May 2021|ref= {{SfnRef|Iron Maiden Celebrities|2021}}}}
* {{cite web |title= Story behind TNOTB |url= https://www.kerrang.com/features/the-story-behind-number-of-the-beast-by-iron-maiden/ |publisher= kerrang.com |date= 17 May 2021 |access-date= 17 May 2021 |ref= {{SfnRef|NOTB History|2021}} }}
* {{cite web |title= NOTB sales |url= https://www.nytimes.com/2010/09/06/business/media/06maiden.html?_r=1 |work= [[The New York Times]] |date= 17 May 2021 |access-date= 17 May 2021 |ref= {{SfnRef|NOTB Sales|2021}} }}
* {{cite web |title= Historical Topics |url= https://www.loudersound.com/features/the-11-best-iron-maiden-songs-based-on-history |publisher= loudersound.com |date= 17 May 2021 |access-date= 17 May 2021 |ref= {{SfnRef|Historical Topics|2021}} }}
* {{cite web|title=Literature and Iron Maiden lyrics|url=http://www.rbec.ect.ufrn.br/data/_uploaded/artigo/N3/RBEC_N3_A14.pdf|publisher=rbec.ect.ufrn.br/data|date=17 May 2021|access-date=17 May 2021|ref={{SfnRef|Literature|2021}}}}
* {{cite web|title=Eddie Iron Maiden Monster|url=http://derek.server311.com/derekriggs.com/|publisher=derekriggs.com/|work=derekriggs.com/|date=16 May 2021|access-date=16 May 2021|ref={{SfnRef|Eddie Riggs|2021}}}}
* {{cite web|title= Paul Stanley about Maiden|url= https://www.blabbermouth.net/news/paul-stanley-says-it-is-insanity-that-iron-maiden-has-not-yet-been-inducted-into-rock-and-roll-hall-of-fame/|publisher= blabbermouth.net|work= blabbermouth.net|date= 10 May 2021|access-date= 10 May 2021|ref= {{SfnRef|Kiss Stanley|2021}}}}
* {{cite web|title=Metallica Lars Urlich Thanks Iron Maiden|url=https://loudwire.com/metallica-lars-ulrich-thanks-iron-maiden/|publisher=loudwire.com|work=Loudwire.com|date=23 November 2011|access-date=2 February 2021|ref={{SfnRef|Metallica's Achievements|2021}}}}
* {{cite web|url=https://ironmaiden.com/the-band|title=Iron Maiden Biogram|access-date=4 April 2020|publisher=ironmaiden.com|work=Iron Maiden|ref={{SfnRef|Band Bio|2020}}}}
* {{cite web|url=http://www.mynewsdesk.com/se/mtg-radio/pressreleases/vinnarna-i-bandit-rock-awards-2019-2837090|title=Bandit Rock 2019|access-date=17 February 2019|publisher=mynewsdesk.com|ref={{SfnRef|Bandit Rock|2019}}}}
* {{cite web |url=https://www.allmusic.com/album/ed-hunter-mw0000669515 |title=Iron Maiden: ''Ed Hunter'' |last=Adams |first=Bret |access-date=16 February 2014 |publisher=[[Rovi Corporation]] |work=[[AllMusic]] }}
* {{cite magazine |url=http://www.metalhammer.co.uk/news/iron-maiden-announce-us-tour/ |title=Maiden announce US tour |date=15 February 2012 |last=Alderslade |first=Merlin |access-date=15 February 2012 |magazine=[[Metal Hammer]] |archive-url=https://web.archive.org/web/20131203065314/http://www.metalhammer.co.uk/news/iron-maiden-announce-us-tour/ |archive-date=3 December 2013 |ref={{SfnRef|Alderslade|2012a}} }}
* {{cite web|last=Alderslade|first=Merlin|title=Iron Maiden, Megadeth, Marilyn Manson, Lamb of God Among Grammy Nominees|url=http://www.metalhammer.co.uk/news/iron-maiden-megadeth-marilyn-manson-lamb-of-god-among-grammy-nominees/|work=[[Metal Hammer]]|access-date=6 December 2012|date=6 December 2012|archive-url=https://web.archive.org/web/20130609202711/http://www.metalhammer.co.uk/news/iron-maiden-megadeth-marilyn-manson-lamb-of-god-among-grammy-nominees/|archive-date=9 June 2013|ref={{SfnRef|Alderslade|2012b}}}}
* {{cite web|title=Iron Maiden nominated for RNRHOF|url=https://bravewords.com/news/iron-maiden-nominated-for-induction-into-rock-roll-hall-of-fame-foo-fighters-rage-against-the-machine-todd-rundgren-and-others-named-fan-vote-open|publisher=bravewords.com|access-date=10 February 2021|ref={{SfnRef|RnRHOF|2021}}}}
* {{cite web|title=Metalo milžinai "Iron Maiden" pirmą kartą atvyksta į Lietuvą Skaitykite daugiau: Metalo milžinai "Iron Maiden" pirmą kartą atvyksta į Lietuvą|url=http://www.alfa.lt/straipsnis/49932871/metalo-milzinai-iron-maiden-pirma-karta-atvyksta-i-lietuva|website=Alfa.lt|access-date=2 November 2015|language=lt|date=2 November 2015|ref={{SfnRef|Alfa.lt|2015}}}}
* {{cite web |url= http://www.allgame.com/game.php?id=71665&tab=credits |title= ''Grand Theft Auto: Episodes from Liberty City'' Credits |access-date= 25 February 2012 |publisher= [[Allgame]] |ref= {{SfnRef|Allgame}} |archive-date= 15 November 2014 |archive-url= https://web.archive.org/web/20141115214030/http://www.allgame.com/game.php?id=71665&tab=credits |url-status= dead }}
* {{cite web |url= https://www.allmusic.com/album/the-piano-tribute-to-iron-maiden-mw0000689488 |title= Various Artists – ''The Piano Tribute to Iron Maiden'' |access-date= 2 September 2014 |website= [[AllMusic]] |ref= {{SfnRef|AllMusic}} }}
* {{cite web |url= https://www.allmusic.com/album/hip-hop-tribute-to-iron-maiden-mw0000547876 |title= Various Artists – ''Hip-Hop Tribute to Iron Maiden'' |access-date= 2 September 2014 |website= [[AllMusic]] |ref= {{SfnRef|AllMusic(2)}} }}
* {{cite news|last1=Anderson|first1=Steve|title=''Kerrang!'' Awards 2013: Rock veterans Iron Maiden and Queen's Brian May and Roger Taylor honoured|url=https://www.independent.co.uk/arts-entertainment/music/news/kerrang-awards-2013-rock-veterans-iron-maiden-and-queens-brian-may-and-roger-taylor-honoured-8658881.html|access-date=2 September 2014|work=[[The Independent]]|date=14 June 2013}}
* {{cite web |url=http://www.angelfire.com/anime2/digipedia/annotated_almanac.html |title=Annotated AllSpark Almanac I notes by Chris McFeely |publisher=Angelfire.com |access-date=27 August 2010 |ref={{SfnRef|Angelfire(1)}} }}
* {{cite web |url=http://www.angelfire.com/anime2/digipedia/annotatedalmanac2.html |title=Annotated AllSpark Almanac II notes by Chris McFeely |publisher=Angelfire.com |access-date=27 August 2010 |ref={{SfnRef|Angelfire(2)}} }}
* {{cite web|title=''Powerslaves: An Elektro Tribute to Iron Maiden''|url=http://www.aquariusrecords.org/bin/search.cgi?search_string=powerslaves:%20an%20electro%20tribute|publisher=[[Aquarius Records (Canada)|Aquarius Records]]|access-date=2 September 2014|ref={{SfnRef|Aquarius Records}}|url-status=dead|archive-url=https://web.archive.org/web/20150109004814/http://www.aquariusrecords.org/bin/search.cgi?search_string=powerslaves:%20an%20electro%20tribute|archive-date=9 January 2015|df=dmy-all}}
* {{cite web|title=Alla vinnare i Bandit Rock Awards 2015!|url=http://rockawards.bandit.se/content/alla-vinnare-i-bandit-rock-awards-2015|website=[[Bandit Rock]]|access-date=27 February 2015|language=sv|date=27 February 2015|ref={{SfnRef|Bandit Rock|2015}}|url-status=dead|archive-url=https://web.archive.org/web/20150227194019/http://rockawards.bandit.se/content/alla-vinnare-i-bandit-rock-awards-2015|archive-date=27 February 2015|df=dmy-all}}
* {{cite web|title=Alla vinnare på Bandit Rock Awards|url=http://www.bandit.se/alla-vinnare-p%C3%A5-bandit-rock-awards|website=[[Bandit Rock]]|access-date=20 January 2016|language=sv|date=20 January 2016|ref={{SfnRef|Bandit Rock|2016}}}}
* {{cite web|last= Barton|first= Geoff|title= Blood and Iron: HM from the punky East End and nothing to do with Margaret Thatcher, sez Deaf Barton|date= 27 October 1979|work= [[Sounds (magazine)|Sounds]]|url= http://www.nwobhm.com/maiden.htm|archive-url= https://web.archive.org/web/20070629075244/http://www.nwobhm.com/maiden.htm|archive-date= 29 June 2007|publisher= NWOBHM.com|access-date= 8 October 2006}}
* {{cite web|last=Barton|first=Geoff|title=Iggy Pop 'Living Legend' At Classic Rock Awards|url=http://www.classicrockmagazine.com/news/iggy-pop-awarded-living-legend-at-classic-rock-roll-of-honour-2009/|work=[[Classic Rock (magazine)|Classic Rock]]|access-date=24 March 2013|date=2 November 2009|archive-url=https://web.archive.org/web/20131219005519/http://www.classicrockmagazine.com/news/iggy-pop-awarded-living-legend-at-classic-rock-roll-of-honour-2009/|archive-date=19 December 2013}}
* {{cite web|last=Basham|first=David|title=Wheatus Digs Up "Dirtbag," Gives Props To Iron Maiden|url=http://www.mtv.com/news/articles/1435209/wheatus-digs-up-dirtbag-gives-props-iron-maiden.jhtml|publisher=[[MTV]]|access-date=7 October 2013|date=23 August 2000}}
* {{cite news|title=Clive Burr, former Iron Maiden drummer, dies at 56|url=https://www.bbc.co.uk/news/entertainment-arts-21771857|work=[[BBC News]]|access-date=15 March 2013|date=13 March 2013|ref={{SfnRef|BBC News|2013}}}}
* {{cite news|title=Queen named 'living legends' at ''Classic Rock'' awards|url=https://www.bbc.co.uk/news/entertainment-arts-34785593|work=[[BBC News]]|access-date=11 November 2015|date=11 November 2015|ref={{SfnRef|BBC News|2015}}}}
* {{cite journal |title= The Wicked Man |journal= [[Classic Rock (magazine)|Classic Rock]] |date= June 2000 |last= Berelian |first= Essi |issue= 15 |pages= 36–43 }}
* {{cite web |url= http://www.metalhammer.co.uk/news/iron-maiden-announce-final-somewhere-in-time-dates/ |title= Iron Maiden Announce Final 'Somewhere Back in Time' Dates |date= 12 November 2008 |last= Bezer |first= Terry |access-date= 19 April 2013 |work= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20140204023003/http://www.metalhammer.co.uk/news/iron-maiden-announce-final-somewhere-in-time-dates/ |archive-date= 4 February 2014 }}
* {{cite web |url= http://www.classicrockmagazine.com/news/iron-maiden-the-movie-catch-the-trailer/ |title= Iron Maiden: The Movie! Catch The Trailer! |access-date= 29 November 2012 |last= Bezer |first= Terry |date= 20 January 2009 |work= [[Classic Rock (magazine)|Classic Rock]] |archive-url= https://web.archive.org/web/20090506110827/http://www.classicrockmagazine.com/news/iron-maiden-the-movie-catch-the-trailer/ |archive-date= 6 May 2009 |ref= {{SfnRef|Bezer|2009a}} }}
* {{cite magazine |url= http://www.metalhammer.co.uk/news/iron-maiden-win-brit-award/ |title= Iron Maiden wins Brit award |last= Bezer |first= Terry |date= 18 February 2009 |access-date= 1 September 2011 |magazine= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20130602195338/http://www.metalhammer.co.uk/news/iron-maiden-win-brit-award/ |archive-date= 2 June 2013 |ref= {{SfnRef|Bezer|2009b}} }}
* {{cite magazine |url= http://www.metalhammer.co.uk/uncategorized/iron-maiden-win-award-for-movie-at-sxsw/ |title= SXSW award for Flight 666 |last= Bezer |first= Terry |date= 23 March 2009 |access-date= 1 September 2011 |magazine= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20130514180604/http://www.metalhammer.co.uk/uncategorized/iron-maiden-win-award-for-movie-at-sxsw/ |archive-date= 14 May 2013 |ref= {{SfnRef|Bezer|2009c}} }}
* {{cite web |url= http://www.classicrockmagazine.com/news/iron-maiden-release-flight-666-dvd-details/ |title= Iron Maiden Release ''Flight 666'' DVD Details |last= Bezer |first= Terry |date= 15 April 2009 |access-date= 19 April 2013 |work= [[Classic Rock (magazine)|Classic Rock]] |archive-url= https://web.archive.org/web/20100115061155/http://www.classicrockmagazine.com/news/iron-maiden-release-flight-666-dvd-details/ |archive-date= 15 January 2010 |ref= {{SfnRef|Bezer|2009d}} }}
* {{cite magazine |url= http://www.metalhammer.co.uk/news/golden-gods-2009-your-winners-in-full/ |title= ''Metal Hammer'' awards 2009 winners |last= Bezer |first= Terry |date= 16 June 2009 |access-date= 1 September 2011 |magazine= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20131227084035/http://www.metalhammer.co.uk/news/golden-gods-2009-your-winners-in-full/ |archive-date= 27 December 2013 |ref= {{SfnRef|Bezer|2009e}} }}
* {{cite web |url= http://www.metalhammer.co.uk/news/iron-maiden-hit-number-one-in-over-20-countries/ |title= Iron Maiden Hit Number One in Over 20 Countries |date= 18 June 2009 |last= Bezer |first= Terry |access-date= 19 April 2013 |work= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20140204023122/http://www.metalhammer.co.uk/news/iron-maiden-hit-number-one-in-over-20-countries/ |archive-date= 4 February 2014 |ref= {{SfnRef|Bezer|2009f}} }}
* {{cite web|last=Bezer|first=Terry|title=Iron Maiden ''The Final Frontier'' Album Details Emerge|url=http://www.metalhammer.co.uk/news/iron-maiden-the-final-frontier-album-details-emerge/|work=[[Metal Hammer]]|access-date=26 November 2012|date=4 March 2010|archive-url=https://web.archive.org/web/20130602193558/http://www.metalhammer.co.uk/news/iron-maiden-the-final-frontier-album-details-emerge/|archive-date=2 June 2013|ref={{SfnRef|Bezer|2010a}}}}
* {{cite magazine|url=http://www.metalhammer.co.uk/news/iron-maidens-nicko-mcbrain-it-aint-gonna-be-the-last-record-not-as-far-as-im-concerned/|title=Iron Maiden's Nicko McBrain: "It Ain't Gonna Be The Last Record. Not As Far As I'm Concerned"|last=Bezer|first=Terry|magazine=[[Metal Hammer]]|date=10 August 2010|access-date=18 August 2010|archive-url=https://web.archive.org/web/20131029220633/http://www.metalhammer.co.uk/news/iron-maidens-nicko-mcbrain-it-aint-gonna-be-the-last-record-not-as-far-as-im-concerned/|archive-date=29 October 2013|ref={{SfnRef|Bezer|2010b}}}}
* {{cite magazine |url= https://www.guitarworld.com/iron-maiden-maiden-voyage?page=0%252C2,0 |title= Maiden Voyage |last= Bienstock |first= Richard |date= 3 July 2011 |access-date= 30 August 2011 |magazine= [[Guitar World]] |archive-url= https://web.archive.org/web/20131005083710/http://www.guitarworld.com/iron-maiden-maiden-voyage?page=0%252C2,0 |archive-date= 5 October 2013 |url-status= dead }}
* {{cite magazine|url={{BillboardURLbyName|artist=iron maiden|chart=all}}|title=Piece of Mind|magazine=[[Billboard (magazine)|Billboard]]|access-date=1 August 2009|ref={{SfnRef|Billboard}}}}
* {{cite magazine |url= https://www.billboard.com/articles/news/57265/beyonces-b-day-makes-big-bow-at-no-1 |title= Iron Maiden returns to the chart for the first time since 2003 |date= 13 September 2006 |access-date= 20 December 2011 |magazine= [[Billboard (magazine)|Billboard]] |ref= {{SfnRef|Billboard|2006}} }}
* {{cite web|title=Bill Wyman's ''Phenomena'' 'Valley' soundtrack and videos|url=http://billwyman.com/2014/03/bill-wymans-phenomena-valley-soundtrack-and-videos/|publisher=[[Bill Wyman|BillWyman.com]]|access-date=2 September 2014|date=24 March 2014|ref={{SfnRef|BillWyman.com|2014}}}}
* {{cite news |url= http://www.blabbermouth.net/news/ac-dc-bassist-to-tour-eastern-europe/ |title= AC/DC Bassist To Tour Eastern Europe |date= 20 October 2002 |access-date= 24 February 2012 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2002}} }}
* {{cite news |url= http://www.blabbermouth.net/news/metallica-slayer-iron-maiden-among-winners-at-metal-hammer-awards/ |title= ''Metal Hammer'' awards 2004 winners |date= 7 June 2004 |access-date= 1 September 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2004a}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-receive-special-achievement-award/ |title= Iron Maiden Receive Special Achievement Award |date= 18 June 2004 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2004b}} }}
* {{cite news |url=http://www.blabbermouth.net/news/iron-maiden-bassist-talks-about-his-technique-and-influences/ |title=Iron Maiden Bassist Talks About His Technique And Influences |work=[[Blabbermouth.net]] |date=24 September 2004 |access-date=25 April 2008 |ref={{SfnRef|Blabbermouth.net|2004c}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-to-release-number-of-the-beast-single/ |title= Iron Maiden To Release 'Number of the Beast' Single |date= 16 November 2004 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2004d}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-announce-details-of-death-on-the-road-dvd-cd/ |title= Iron Maiden Announce Details Of ''Death on the Road'' DVD/CD |date= 11 May 2005 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2005a}} }}
* {{cite news|url=http://www.blabbermouth.net/news/iron-maiden-eddie-rips-up-the-world-tour-opener-setlist-revealed/|title=Iron Maiden: 'Eddie Rips Up the World' Tour Opener Setlist Revealed|date=28 May 2005|work=[[Blabbermouth.net]]|access-date=1 January 2010|ref={{SfnRef|Blabbermouth.net|2005b}}}}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-announce-ebay-auction-and-hard-rock-caf-event/ |title= Iron Maiden Announce eBay Auction and Hard Rock Café Event |date= 22 November 2005 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2005c}} }}
* {{cite news |url=http://www.blabbermouth.net/news.aspx?mode=Article&newsitemID=54636 |title=Iron Maiden Drummer, Guitarist Talk About New Album |date=5 July 2006 |access-date=17 September 2006 |work=[[Blabbermouth.net]] |ref={{SfnRef|Blabbermouth.net|2006}} |archive-date=21 February 2013 |archive-url=https://archive.today/20130221054805/http://www.blabbermouth.net/news.aspx?mode=Article&newsitemID=54636 |url-status=dead }}
* {{cite news |url= http://www.blabbermouth.net/news/alice-cooper-iron-maiden-def-leppard-among-winners-at-classic-rock-roll-of-honour-awards/ |title= ''Classic Rock'' 2006 winners |date= 7 November 2006 |access-date= 1 September 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2006b}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-announces-first-ever-appearance-in-india/ |title= Iron Maiden Announces First-Ever Appearance in India |date= 13 February 2007 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2007a}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-announces-a-matter-of-the-beast-summer-tour/ |title= Iron Maiden Announces 'A Matter of the Beast Summer Tour '07' |date= 8 May 2007 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2007b}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-confirms-special-clive-burr-show/ |title= Iron Maiden Confirms Special Clive Burr Show |date= 25 May 2007 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2007c}} }}
* {{cite news|url=http://www.blabbermouth.net/news/uk-s-download-named-top-festival-at-billboard-touring-awards/|title=UK's Download named Top Festival|date=15 November 2007|access-date=15 November 2007|work=[[Blabbermouth.net]]|ref={{SfnRef|Blabbermouth.net|2007d}}}}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-frontman-issues-bruce-air-update/ |title= Iron Maiden Frontman Issues 'Bruce Air' Update |date= 7 July 2008 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2008}} }}
* {{cite news|url=http://www.blabbermouth.net/news/robert-plant-freddie-mercury-axl-rose-ian-gillan-among-greatest-voices-in-rock/|title=Robert Plant, Freddie Mercury, Axl Rose, Ian Gillan Among 'Greatest Voices in Rock'|date=2 January 2009|access-date=1 August 2010|work=[[Blabbermouth.net]]|ref={{SfnRef|Blabbermouth.net|2009a}}}}
* {{cite news|url=http://www.blabbermouth.net/news/bruce-dickinson-and-ronnie-james-dio-are-heavy-metal-s-top-singers/|title=Bruce Dickinson And Ronnie James Dio Are Heavy Metal's Top Singers|date=1 June 2009|access-date=1 August 2010|work=[[Blabbermouth.net]]|ref={{SfnRef|Blabbermouth.net|2009b}}}}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-named-best-british-live-act-at-brit-awards/ |title= Iron Maiden wins Brit award |date= 18 February 2009 |access-date= 1 September 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2009c}} }}
* {{cite news|title=Iron Maiden's ''Flight 666'' Was Biggest-Ever Worldwide Simultaneous Release of Documentary Film|url=http://www.blabbermouth.net/news/iron-maiden-s-flight-666-was-biggest-ever-worldwide-simultaneous-release-of-documentary-film/|work=[[Blabbermouth.net]]|access-date=27 October 2014|date=11 May 2009|ref={{SfnRef|Blabbermouth.net|2009d}}}}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-new-album-details-revealed/ |title= Iron Maiden: New Album Details Revealed |date= 7 June 2010 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2010c}} }}
* {{cite news|title=Iron Maiden: Around The World In 66 Days|url=http://www.blabbermouth.net/news/iron-maiden-around-the-world-in-66-days/|work=[[Blabbermouth.net]]|publisher=[[Roadrunner Records]]|access-date=8 June 2013|date=2 November 2010|ref={{SfnRef|Blabbermouth.net|2010d}}}}
* {{cite news |url= http://www.blabbermouth.net/news/dream-theater-and-iron-maiden-members-say-cheese-for-tour-photo/ |title= Dream Theater and Iron Maiden Members Say 'Cheese' for Tour Photo |date= 22 July 2010 |access-date= 2 September 2014 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2010e}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-to-end-the-final-frontier-world-tour-in-london/ |title= Iron Maiden To End 'The Final Frontier World Tour' In London |date= 20 November 2010 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2010f}} }}
* {{cite news|url=http://www.blabbermouth.net/news/iron-maiden-slayer-megadeth-ozzy-korn-among-grammy-awards-nominees/|title=Iron Maiden, Slayer, Megadeth, Ozzy, Korn Among Grammy Awards Nominees|work=[[Blabbermouth.net]]|date=1 December 2010|access-date=2 December 2010|ref={{SfnRef|Blabbermouth.net|2010g}}}}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-announces-support-acts-for-u-k-tour/ |title= Iron Maiden Announces Support Acts For UK Tour |date= 18 February 2011 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2011a}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-avenged-sevenfold-in-flames-sabaton-honored-at-bandit-rock-awards/ |title= Bandit Rock Awards 2011 |date= 4 April 2011 |access-date= 1 September 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2011b}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-from-fear-to-eternity-new-release-date-announced-promo-only-cd-single-detailed/ |title= ''From Fear To Eternity'' New Release Date Announced; Promo-Only CD Single Detailed |date= 6 May 2011 |access-date= 20 November 2011 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2011c}} }}
* {{cite news |url= http://www.blabbermouth.net/news/iron-maiden-to-release-en-vivo-concert-blu-ray-two-dvd-set-and-double-soundtrack-album/ |title= Iron Maiden To Release ''En Vivo!'' Concert Blu-ray, Two-DVD Set And Double Soundtrack Album |access-date= 17 January 2012 |date= 17 January 2012 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2012}} }}
* {{cite news |url= https://www.blabbermouth.net/news/saxon-anthrax-fear-factory-machine-head-honored-at-metal-hammer-golden-gods/ |title= Saxon, Anthrax, Fear Factory, Machine Head Honoured At 'Metal Hammer Golden Gods' |access-date= 27 February 2020 |date= 12 June 2012 |work= [[Blabbermouth.net]] |ref= {{SfnRef|Blabbermouth.net|2012b}} }}
* {{cite journal |title= Hack Job? |journal= [[Kerrang!|Kerrang! Legends]] |first= Paul |last= Brannigan |issue= 2 |pages= 26–27}}
* {{cite magazine |url= http://www.bravewords.com/news/145167 |title= Janick Gers interview- Talking Metal Pirate Radio No. 5 |date= 26 August 2010 |access-date= 25 February 2012 |magazine= [[Brave Words & Bloody Knuckles]] |ref= {{SfnRef|Brave Words & Bloody Knuckles|2010}} |archive-date= 16 May 2013 |archive-url= https://web.archive.org/web/20130516015714/http://www.bravewords.com/news/145167 |url-status= dead }}
* {{cite magazine |url= http://www.bravewords.com/news/158145 |title= Iron Maiden To Release From Fear To Eternity – The Best of 1990 – 2010; Details Revealed, Manager Rod Smallwood Comments |date= 15 March 2011 |access-date= 20 November 2011 |magazine= [[Brave Words & Bloody Knuckles]] |ref= {{SfnRef|Brave Words & Bloody Knuckles|2011}} |archive-date= 31 August 2011 |archive-url= https://web.archive.org/web/20110831193343/http://www.bravewords.com/news/158145 |url-status= dead }}
* {{cite magazine |url= http://www.bravewords.com/news/163787 |title= Chilean Magazine Slams Iron Maiden Why Music Matters Animated Film As "Full of Lies" |access-date= 20 September 2011 |date= 15 June 2011 |magazine= [[Brave Words & Bloody Knuckles]] |ref= {{SfnRef|Brave Words & Bloody Knuckles|2011(2)}} |archive-date= 16 August 2011 |archive-url= https://web.archive.org/web/20110816191108/http://www.bravewords.com/news/163787 |url-status= dead }}
* {{cite web|last=Britton|first=Luke Morgan|url=https://www.nme.com/news/music/iron-maiden-the-book-of-souls-live-album-2142961|title=Iron Maiden announce ''The Book of Souls'' live album|access-date=31 October 2017|date=20 September 2017|publisher=[[Johnston Press]]|work=[[i (newspaper)|i]]}}
* {{Cite book |last1=Bushell |first1=Garry |author-link1=Garry Bushell |year=1985 |last2=Halfin |first2=Ross |author-link2=Ross Halfin |title=Running Free, The Official Story of Iron Maiden |publisher=Zomba Books |isbn=0-946391-84-X |edition=second |url-access=registration |url=https://archive.org/details/ironmaidenrunnin00bush }}
* {{cite web |url= http://www.undercover.fm/news/3803-iron-maiden-reveal-ed-force-one |title= Iron Maiden Reveal Ed Force One |last= Cashmere |first= Tim |date= 15 January 2008 |access-date= 20 November 2011 |publisher= Undercover FM |archive-url= https://web.archive.org/web/20120430013502/http://www.undercover.fm/news/3803-iron-maiden-reveal-ed-force-one |archive-date= 30 April 2012 |url-status= dead }}
* {{cite web|url=http://www.spinner.com/2009/10/29/3-inches-of-bloods-cam-pipes-raised-on-classical-music/|title=3 Inches of Blood's Cam Pipes Raised on Classical Music|last=Charlesworth|first=Jenny|date=29 October 2009|publisher=[[Spinner.com]]|archive-url=https://web.archive.org/web/20130629161649/http://www.spinner.com/2009/10/29/3-inches-of-bloods-cam-pipes-raised-on-classical-music/|archive-date=29 June 2013|access-date=26 January 2010}}
* {{cite web |url= http://www.cheatcc.com/gc/rev/ssxontourreview.html |title= ''SSX on Tour'' Review |access-date= 24 September 2011 |publisher= Cheat Code Central |ref= {{SfnRef|Cheat Code Central}} }}
* {{cite web |last=Childers |first=Chad |title=Metallica + Iron Maiden Sign on to Headline Rock in Rio 2013 |url=http://loudwire.com/metallica-to-headline-rock-in-rio-2013/ |work=[[Loudwire]] |access-date=17 October 2012 |date=16 October 2012 |archive-url=https://web.archive.org/web/20121018002258/http://loudwire.com/metallica-to-headline-rock-in-rio-2013/ |archive-date=18 October 2012 |url-status=dead }}
* {{cite web|last1=Childers|first1=Chad|title=Iron Maiden Announce 2017 ''Book of Souls'' North American Tour With Ghost|url=http://loudwire.com/iron-maiden-2017-north-american-tour-ghost/|website=[[Loudwire]]|access-date=19 January 2017|date=19 January 2017}}
* {{cite news |url= http://www.birminghammail.co.uk/whats-on/music/music-iron-maidens-final-frontier-158499 |title= Music: Iron Maiden's final frontier |access-date= 24 September 2012 |last= Coleman |first= Andrew |date= 29 July 2011 |newspaper= [[Birmingham Mail]] |quote= hitting the number one spot in 28 countries }}
* {{cite web|last1=Cooper|first1=Leonie|title=Iron Maiden win O2 Silver Clef 2015 Award for outstanding contribution to UK music|url=https://www.nme.com/news/iron-maiden/83831|website=[[NME]]|access-date=23 March 2015|date=23 March 2015}}
* {{cite web |title=Iron Maiden, Slayer y Ghost confirmaron su venida histórica al Paraguay |url=http://www.cronica.com.py/online/articulo/6138-iron-maiden-slayer-y-ghost-confirmaron-su-venida-historica-al-paraguay.html |work=Crónica |access-date=11 April 2013 |archive-url=https://web.archive.org/web/20130926032639/http://www.cronica.com.py/online/articulo/6138-iron-maiden-slayer-y-ghost-confirmaron-su-venida-historica-al-paraguay.html |archive-date=26 September 2013 |language=es |date=11 April 2013 |ref={{SfnRef|Crónica|2013}} |url-status=dead }}
* {{cite web |last1=Hart |first1=Josh |title=Bruce Dickinson: Iron Maiden Will Make "At Least One More Album" |url=https://www.guitarworld.com/news/bruce-dickinson-iron-maiden-will-make-least-one-more-album |website=Guitar World |access-date=8 January 2021 |date=5 August 2011 |quote=at least one more album }}
* {{cite web |url= http://dmme.net/interviews/dickinson.html |title= Interview with Bruce Dickinson October 2001 |access-date= 15 August 2011 |publisher= dmme.net |ref= {{SfnRef|Dmme.net}} |archive-date= 3 October 2015 |archive-url= https://web.archive.org/web/20151003231948/http://dmme.net/interviews/dickinson.html |url-status= dead }}
* {{cite journal |title= The Good Life |journal= [[Classic Rock (magazine)|Classic Rock]] |date= September 2006 |first= Malcolm |last= Dome |author-link= Malcolm Dome |issue= 97 |page= 76 |ref={{SfnRef|Dome|2006a}}}}
* {{cite journal |title= Iron Maiden: War all the Time |journal= [[Metal Hammer]] |date= September 2006 |first= Malcolm |last= Dome |author-link= Malcolm Dome |issue= 157 |pages= 34–40 |ref={{SfnRef|Dome|2006b}}}}
* {{cite web|last1=Dome|first1=Malcolm|author-link=Malcolm Dome|title=Remembering The Day Bruce Joined Maiden|url=http://metalhammer.teamrock.com/features/2014-09-26/remembering-the-day-bruce-joined-maiden|website=[[Metal Hammer]]|publisher=TeamRock|access-date=26 September 2014|date=26 September 2014}}
* {{cite video|date= 4 December 2001|title=[[Classic Albums: Iron Maiden – The Number of the Beast]]|medium=DVD|publisher=[[Eagle Rock Entertainment|Eagle Vision]]|ref={{SfnRef|Eagle Vision|2001}}}}
* {{cite journal|last1=East|first1=Tom|title=''Guitar Hero Greatest Hits'' Tracklist Confirmed|journal=[[Official Nintendo Magazine]]|date=7 May 2009}}
* {{cite book |title= Iron Maiden: In Profile |chapter= Part 2: Groundwork |year= 1998 |publisher= [[EMI]]|ref={{SfnRef|EMI|1998}}}}
* {{Cite video |date=23 November 2004 |title=[[The History of Iron Maiden – Part 1: The Early Days]] |medium=DVD |location=UK |publisher=EMI|ref={{SfnRef|EMI|2004}}}} ASIN B0006B29Z2
* {{cite video|date= 4 February 2008|title=[[Live After Death]]|chapter=The History of Iron Maiden part 2|medium=DVD|publisher=[[EMI]]|ref={{SfnRef|EMI|2008}}}}
* {{cite video|date= 26 March 2012|title=[[En Vivo! (Iron Maiden album)|En Vivo!]]|chapter=Iron Maiden: Behind the Beast|medium=DVD|publisher=[[EMI]]|ref={{SfnRef|EMI|2012}}}}
* {{cite web |url=http://evening-times.vlex.co.uk/vid/bruce-blokes-dickinson-veteran-boys-65899750 |title=Dickinson and his veteran boys can still rock.. |work=[[Evening Times]] |publisher=vlex.co.uk |access-date=1 January 2009 |date=14 December 2006 |ref={{SfnRef|Evening Times|2006}} |url-status=dead |archive-url=https://archive.today/20130505092958/http://evening-times.vlex.co.uk/vid/bruce-blokes-dickinson-veteran-boys-65899750 |archive-date=5 May 2013 |df=dmy-all }}
* {{cite web |url= http://www.fender.com/en-GB/series/artist/steve-harris-precision-bass/ |title= Steve Harris Precision Bass® |access-date= 21 September 2011 |publisher= [[Fender Musical Instruments Corporation|Fender.com]] |ref= {{SfnRef|Fender}} |url-status= dead |archive-url= https://archive.today/20130122193733/http://www.fender.com/en-GB/series/artist/steve-harris-precision-bass/ |archive-date= 22 January 2013 |df= dmy-all }}
* {{cite web |url= http://www.footballfancast.com/2010/11/football-blogs/west-hams-top-ten-most-famous-fans/attachment/steve-harris-2 |title= Steve Harris: West Ham's Top Ten Most Famous Fans |publisher= Footballfancast.com |access-date= 30 August 2011 |ref= {{SfnRef|Football Fancast}} |url-status= dead |archive-url= https://web.archive.org/web/20111009092226/http://www.footballfancast.com/2010/11/football-blogs/west-hams-top-ten-most-famous-fans/attachment/steve-harris-2 |archive-date= 9 October 2011 |df= dmy-all }}
* {{Cite book |author=Fuentes Rodríguez, César |title=Iron Maiden: El Viaje De La Doncella |year=2005 |isbn=84-933891-2-9}} {{in lang|es}}
* {{cite web|last=Fulker|first=Rick|url=http://www.dw.com/en/germanys-music-scene-celebrates-at-the-25th-echo-awards/a-19172626|title=Germany's music scene celebrates at the 25th Echo awards|publisher=[[Deutsche Welle]]|access-date=8 April 2016|date=8 April 2016}}
* {{Cite book |author1=Gamba, Marco |author2=Visintini, Nicola |title=Iron Maiden Companion (1st ed.) |publisher=Moving Media & Arts |year=2000}}
* {{cite magazine |url= http://www.keyboardmag.com/article/Michael-Kenney---the-Man-Behind-the-Maiden/2314 |title= Michael Kenney – the Man Behind the Maiden |last= Gennet |first= Robbie |date= 3 October 2010 |access-date= 19 April 2012 |magazine= [[Keyboard Magazine]] |url-status= dead |archive-url= https://web.archive.org/web/20130516191252/http://www.keyboardmag.com/article/Michael-Kenney---the-Man-Behind-the-Maiden/2314 |archive-date= 16 May 2013 |df= dmy-all }}
* {{cite web |url= http://www.giantbomb.com/carmageddon-ii-carpocalypse-now/61-10553/ |title= Carmageddon 2 |access-date= 24 September 2011 |publisher= [[Giant Bomb]] |ref= {{SfnRef|Giant Bomb}} }}
* {{cite web|last=Gill|first=James|title=Iron Maiden Win at the Grammys|url=http://www.metalhammer.co.uk/news/iron-maiden-win-at-the-grammys/|work=[[Metal Hammer]]|access-date=7 October 2013|date=14 February 2011|archive-url=https://web.archive.org/web/20140204023108/http://www.metalhammer.co.uk/news/iron-maiden-win-at-the-grammys/|archive-date=4 February 2014}}
* {{cite web|url=http://www.godscare.net/witness/Iron%20Maiden.htm|title=The drummer with million|publisher=Godscare.net|access-date=27 August 2010|archive-url=https://web.archive.org/web/20110723135641/http://www.godscare.net/witness/Iron%20Maiden.htm|archive-date=23 July 2011|ref={{SfnRef|Godscare}}}}
* {{cite news |url= https://www.telegraph.co.uk/culture/music/rockandpopfeatures/7915012/Iron-Maiden-doing-it-their-own-way.html |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/culture/music/rockandpopfeatures/7915012/Iron-Maiden-doing-it-their-own-way.html |archive-date=10 January 2022 |url-access=subscription |url-status=live |title= Iron Maiden: doing it their own way |access-date= 24 December 2011 |quote= when Dickinson re-entered the fold in 1999 the band's ensuing career made them bigger than ever |location= London |work= [[The Daily Telegraph]] |first= Thomas H |last= Green |date= 28 July 2010 }}{{cbignore}}
* {{cite magazine|last1=Grow|first1=Kory|title=Iron Maiden Announce New Double Album ''The Book of Souls''|url=https://www.rollingstone.com/music/news/iron-maiden-announce-new-double-album-the-book-of-souls-20150618|magazine=[[Rolling Stone]]|access-date=18 June 2015|date=18 June 2015}}
* {{cite web |url= http://www.rockwalk.com/inductees/inductee.cfm?id=163 |title= Iron Maiden- Guitar Center Rockwalk |access-date= 1 September 2011 |publisher= [[Guitar Center]] |ref= {{SfnRef|Guitar Center}} }}
* {{cite web |url=http://loudwire.com/iron-maiden-to-release-maiden-england-88-concert-dvd/ |title=Iron Maiden to Release ''Maiden England '88'' Concert DVD With Never-Before-Seen Footage |last1=Hartmann |first1=Graham |date=12 February 2013 |work=[[Loudwire]] |access-date=12 February 2013 |archive-url=https://web.archive.org/web/20130214033006/http://loudwire.com/iron-maiden-to-release-maiden-england-88-concert-dvd/ |archive-date=14 February 2013 |url-status=dead }}
* {{cite web|url=http://www.hearya.com/2006/12/04/hit-paraders-top-100-metal-vocalists-of-all-time/|title=Hit Parader's Top 100 Metal Vocalists of All Time|date=4 December 2006|access-date=1 August 2010|publisher=HearYa.com|ref={{SfnRef|HearYa.com|2006}}|archive-date=8 September 2019|archive-url=https://web.archive.org/web/20190908211559/http://www.hearya.com/2006/12/04/hit-paraders-top-100-metal-vocalists-of-all-time/|url-status=dead}}
* {{cite web|last= Hinchcliffe|first= Jon|title= Dennis Stratton Interview: October 1999|date= 27 October 1999|url= http://www.praying-mantis.com/mantis/dennis99.shtml|publisher= Praying-Mantis.com|access-date= 8 October 2006}}
* {{cite web|url={{AllMusic|class=album|id=r9908|pure_url=yes}}|title=''Iron Maiden'' – Review|access-date=19 November 2011|first=Steve|last=Huey|publisher=[[Rovi Corporation]]|work=[[AllMusic]]|ref={{SfnRef|Huey(1)}}}}
* {{cite web|url={{AllMusic|class=album|id=r9912|pure_url=yes}}|title=''Piece of Mind'' – Review|access-date=19 November 2011|first=Steve|last=Huey|publisher=[[Rovi Corporation]]|work=[[AllMusic]]|ref={{SfnRef|Huey(2)}}}}
* {{cite web|url={{AllMusic|class=album|id=r9916|pure_url=yes}}|title=Iron Maiden – ''Somewhere in Time'' – Review|access-date=12 October 2008|last=Huey|first=Steve|publisher=[[Rovi Corporation]]|work=[[AllMusic]]|ref={{SfnRef|Huey(3)}}}}
* {{cite web|title=''Grand Theft Auto: Vice City'' Songs|url=https://uk.ign.com/wikis/grand-theft-auto-vice-city/Songs|website=[[IGN]]|access-date=2 September 2014|ref={{SfnRef|IGN}}}}
* {{Cite video |people=Iron Maiden (past and present band and management) |date=1996 |title=[[12 Wasted Years]] |medium=VHS |location=UK |publisher=Sanctuary Group}} {{OCLC|23531749}} {{ASIN|6301092643}}
* {{cite journal |title= Steve Harris: Es Geht Voran |journal= Rock Hard |date= 1 September 2012 |volume= 304 |language= de |pages= 16–21 |last= Jaedike |first= Jan}}
* {{cite web|title=''Murder By Numbers'' (2002)|url=https://www.joblo.com/horror-movies/reviews/murder-by-numbers|publisher=[[JoBlo.com]]|access-date=2 September 2014|ref={{SfnRef|JoBlo.com}}}}
* {{cite journal |title= Waiting for the (Seventh) Son |journal= [[Kerrang!]] |date= 20 August 1988 |first= Howard |last= Johnson |issue= 201 |page= 12}}
* {{cite web|last=Johnson|first=Andrew|url=https://inews.co.uk/essentials/culture/music/bruce-dickinson-interview-band-fragile-thing/|title=Bruce Dickinson interview: "Being in a band is a very fragile thing"|access-date=17 October 2017|date=17 October 2017|publisher=[[Johnston Press]]|work=[[i (newspaper)|i]]}}
* {{cite news |url=https://www.theguardian.com/uk/2005/aug/26/arts.artsnews |title=''Kerrang!'' 2005 winners |access-date=3 December 2011 |location=London |work=[[The Guardian]] |first=Sam |last=Jones |date=26 August 2005 }}
* {{cite web |url= http://junoawards.ca/2010/04/saturday-night-winners/ |title= Juno Winners – 2010 Gala Dinner & Awards |date= 18 April 2010 |access-date= 1 September 2011 |publisher= [[Juno Award]]s |ref= {{SfnRef|Juno Awards|2010}} |url-status= dead |archive-url= https://web.archive.org/web/20120426202935/http://junoawards.ca/2010/04/saturday-night-winners/ |archive-date= 26 April 2012 |df= dmy-all }}
* {{cite web|url=http://musica.terra.com.br/interna/0,,OI3636296-EI1267,00-Iron+Maiden+faz+maior+show+da+carreira+em+SP.html|title=Iron Maiden does biggest show of career in São Paulo|language=pt|last=Kaczuroski|first=Thiago|date=16 March 2009|publisher=[[Terra Networks]]}}
* {{cite web|last1=Kaufman|first1=Spencer|title=Iron Maiden's Bruce Dickinson Undergoes Treatment for Cancerous Tumor|url=http://loudwire.com/iron-maiden-bruce-dickinson-treatment-cancerous-tumor/|website=[[Loudwire]]|access-date=19 February 2015|date=19 February 2015}}
* {{cite magazine|url=http://www.kerrang.com/blog/2008/07/the_making_of_maiden_heaven.html|title=The making of Maiden Heaven|magazine=[[Kerrang!]]|date=16 July 2008|access-date=13 January 2011|archive-url=https://web.archive.org/web/20130501010936/http://www.kerrang.com/blog/2008/07/the_making_of_maiden_heaven.html|archive-date=1 May 2013|ref={{SfnRef|Kerrang!|2008}}}}
* {{cite news |url=https://www.telegraph.co.uk/culture/music/music-news/5109730/The-Police-and-Iron-Maiden-lead-British-music-stars-foreign-earnings-to-hit-record-levels.html |archive-url=https://ghostarchive.org/archive/20220110/https://www.telegraph.co.uk/culture/music/music-news/5109730/The-Police-and-Iron-Maiden-lead-British-music-stars-foreign-earnings-to-hit-record-levels.html |archive-date=10 January 2022 |url-access=subscription |url-status=live |title=The Police and Iron Maiden lead British music stars' foreign earnings to hit record levels |newspaper=[[The Daily Telegraph]] |date=6 April 2009 |access-date=18 February 2011 |location=London |first=Urmee |last=Khan }}{{cbignore}}
* {{cite magazine |url=http://www.classicrockmagazine.com/news/iron-maiden-confirmed-for-download-2013/ |title=Iron Maiden confirmed for Download 2013 |access-date=20 September 2012 |last=Kielty |first=Martin |date=20 September 2012 |magazine=[[Classic Rock (magazine)|Classic Rock]] |archive-url=https://web.archive.org/web/20120929002031/http://www.classicrockmagazine.com/news/iron-maiden-confirmed-for-download-2013/ |archive-date=29 September 2012 |url-status=dead }}
* {{cite magazine |url= http://classicrock.teamrock.com/news/2014-06-16/maiden-a7x-others-honoured-at-metal-hammer-golden-gods |title= Maiden, A7X, others honoured at Metal Hammer Golden Gods |access-date= 19 June 2014 |last= Kielty |first= Martin |date= 16 June 2014 |magazine= [[Classic Rock (magazine)|Classic Rock]] }}
* {{cite web |url= http://metalhammer.teamrock.com/news/2015-02-27/iron-maiden-album-on-hold-bruce-dickinson-cancer |title= Maiden album is ready but on hold |date= 27 February 2015 |last= Kielty |first= Martin |access-date= 27 February 2015 |work= [[Metal Hammer]] |ref= {{SfnRef|Kielty|2015a}} }}
* {{cite web|last1=Kielty|first1=Martin|title=Iron Maiden name album No.16|url=http://metalhammer.teamrock.com/news/2015-06-18/iron-maiden-name-album-no-16-book-of-souls|website=[[Metal Hammer]]|access-date=18 June 2015|date=18 June 2015|ref={{SfnRef|Kielty|2015b}}}}
* {{cite web |url= http://www.knac.com/article.asp?ArticleID=3824 |title= Iron Maiden Manager's Official Statement Regarding Ozzfest Feud |access-date= 16 September 2012 |date= 23 August 2005 |publisher= [[KNAC]] |ref= {{SfnRef|KNAC|2005}} }}
* {{Cite magazine|url=https://www.rollingstone.com/music/music-news/iron-maiden-2019-tour-754033/|title=Iron Maiden Map Out 2019 Legacy of the Beast Tour|last=Kreps|first=Daniel|date=9 November 2018|magazine=[[Rolling Stone]]|access-date=13 November 2018|language=en-US}}
* {{cite web|last1=Lach|first1=Stef|title=Iron Maiden unveil "Speed of Light"|url=http://metalhammer.teamrock.com/news/2015-08-14/iron-maiden-unveil-speed-of-light|website=[[Metal Hammer]]|access-date=14 August 2015|date=14 August 2015|ref={{SfnRef|Lach|2015a}}}}
* {{cite web|last1=Lach|first1=Stef|title=Maiden to tour world in new Ed Force One|url=http://teamrock.com/news/2015-08-25/maiden-to-tour-world-aboard-ed-force-one|website=[[Metal Hammer]]|access-date=25 August 2015|date=25 August 2015|ref={{SfnRef|Lach|2015b}}}}
* {{cite web|last1=Lach|first1=Stef|title=Iron Maiden reveal Legacy of the Beast video game|url=http://classicrock.teamrock.com/news/2016-01-18/iron-maiden-reveal-legacy-of-the-beast-video-game|website=[[Classic Rock (magazine)|Classic Rock]]|access-date=18 January 2016|date=18 January 2016|ref={{SfnRef|Lach|2016a}}}}
* {{cite web|last1=Lach|first1=Stef|title=Iron Maiden announce 2017 European Book Of Souls tour|url=http://teamrock.com/news/2016-09-23/iron-maiden-announce-2017-european-book-of-souls-tour|website=[[Classic Rock (magazine)|Classic Rock]]|access-date=23 September 2016|date=23 September 2016|ref={{SfnRef|Lach|2016b}}}}
* {{cite web |url= http://www.metalhammer.co.uk/news/iron-maiden-tour-plans/ |title= Iron Maiden Tour Plans |date= 7 September 2007 |last= Lane |first= Daniel |access-date= 29 November 2012 |work= [[Metal Hammer]] |archive-url= https://web.archive.org/web/20130602192105/http://www.metalhammer.co.uk/news/iron-maiden-tour-plans/ |archive-date= 2 June 2013 }}
* {{cite web|last=Lane|first=Daniel|title=Iron Maiden – New Album, Old Songs|url=http://www.metalhammer.co.uk/news/iron-maiden-new-album-old-songs/|work=[[Metal Hammer]]|access-date=19 April 2013|date=27 March 2008|archive-url=https://web.archive.org/web/20130602194346/http://www.metalhammer.co.uk/news/iron-maiden-new-album-old-songs/|archive-date=2 June 2013}}
* {{cite journal |title= 666 of the Best |journal= [[Kerrang!|Kerrang! Legends]] |first= Dom |last= Lawson |issue= 2 |pages= 36–37 }}
* {{cite journal|last=Lawson|first=Dom|title=Infinite Dreams|journal=[[Metal Hammer]]|date=April 2013|issue=242|page=43}}
* {{cite web |url= http://www2.gibson.com/News-Lifestyle/Features/en-us/abriefhistoryofheavymetal.aspx |title= Heavy Metal's Most Savage Mascots! |last= Lefkove |first= Aaron |date= 5 June 2008 |access-date= 23 September 2011 |publisher= [[Gibson Guitar Corporation|Gibson.com]] |archive-url= https://web.archive.org/web/20121110073816/http://www2.gibson.com/News-Lifestyle/Features/en-us/abriefhistoryofheavymetal.aspx |archive-date= 10 November 2012 |url-status= dead }}
* {{cite web|script-title=ru:Группа "Ария"|url=http://lenta.ru/conf/aria/|publisher=[[Lenta.ru]]|access-date=23 February 2013|language=ru|date=5 November 2010|ref={{SfnRef|Lenta.ru|2010}}}}
* {{cite journal |title= Made in England |journal= [[Classic Rock (magazine)|Classic Rock]] |date= November 2005 |first= Dave |last= Ling |issue= 86 |pages= 54 }}
* {{cite journal |title= Nicko McBrain |journal= Metal Hammer Presents: Iron Maiden 30 Years of Metal Mayhem |year= 2005 |first= Dave |last= Ling |page= 103 |ref={{SfnRef|Ling|2005b}}}}
* {{cite web|last1=Loftus|first1=Johnny|url=https://www.allmusic.com/album/anatomy-of-evil-the-string-quartet-tribute-to-iron-maiden-mw0000315149|title=Little Emo Quartet / Vitamin String Quartet – ''Anatomy of Evil: The String Quartet Tribute to Iron Maiden''|website=[[AllMusic]]|publisher=[[Rovi Corporation]]|access-date=2 September 2014}}
* {{cite web |url= http://www.maidenunited.com/discography.html |title= Maiden uniteD discography |access-date= 16 October 2011 |publisher= [[Maiden uniteD|MaidenuniteD.com]] |ref= {{SfnRef|Maiden United}} }}
* {{cite journal|last=Marlow|first=Lee|title=When drummer Clive Burr was ousted from Iron Maiden...|journal=[[Classic Rock (magazine)|Classic Rock]]|date=February 2011|issue=154|pages=52–55}}
* {{cite web |url= http://www.metal-rules.com/concerts/RockInRioIII.htm |title= Rock in Rio III Concert review |last= Martins |first= Thiago |access-date= 4 September 2011 |date= 5 April 2002 |publisher= [[Metal Rules]] |quote= From the supposed attendance of 250,000 people... }}
* {{cite news|url=http://news.bbc.co.uk/2/hi/8338887.stm|title=Rolling Stone Wood wins rock gong|work=[[BBC News]]|date=3 November 2009|access-date=27 November 2009|first=Tim|last=Masters}}
* {{cite journal |title= Iron Maiden: Dave Murray |journal= [[Total Guitar]] |date= December 2010 |first= Joel |last= McIver |issue= 208 |pages= 32–34 |ref={{SfnRef|McIver|2010(a)}}}}
* {{cite journal |title= Iron Maiden: Janick Gers |journal= [[Total Guitar]] |date= December 2010 |first= Joel |last= McIver |issue= 208 |pages= 36–38 |ref={{SfnRef|McIver|2010(b)}}}}
* {{cite journal |title= Iron Maiden: Adrian Smith |journal= [[Total Guitar]] |date= December 2010 |first= Joel |last= McIver |issue= 208 |pages= 40–42 |ref={{SfnRef|McIver|2010(c)}}}}
* {{cite web |url=http://meansheets.com/2010/03/09/fair-play/ |title=Fair Play |publisher=Meansheets.com |date=9 March 2010 |access-date=9 July 2011 |ref={{SfnRef|Meansheets|2010}} }}
* {{cite web |url=https://www.metacritic.com/music/the-final-frontier |title=''The Final Frontier'' – Iron Maiden |work=[[Metacritic]] |publisher=[[CBS Interactive Inc.]] |access-date=1 September 2011 |ref={{SfnRef|MetaCritic1}} }}
* {{cite web |title= Reviews for ''The Book of Souls'' by Iron Maiden |work= [[Metacritic]] |publisher= [[CBS Interactive]] |url= https://www.metacritic.com/music/the-book-of-souls/iron-maiden |access-date= 1 September 2015 |ref= {{SfnRef|MetaCritic2}} }}
* {{cite web |url=http://www.metalinsider.net/video-games/madden-10-more-like-maiden-10-game-soundtrack-revealed |title=Madden '10? More like Maiden '10! Game Soundtrack Revealed |publisher=Metal Insider |date=27 July 2009 |access-date=4 November 2009 |ref={{SfnRef|Metal Insider|2009}} }}
* {{cite magazine |url= http://www.metalstorm.net/awards/archive.php?year=2006 |title= Metal Storm 2006 winners |access-date= 1 September 2011 |magazine= [[Metal Storm (webzine)|Metal Storm]] |ref= {{SfnRef|Metal Storm (1)}} }}
* {{cite magazine |url= http://www.metalstorm.net/awards/archive.php?year=2009 |title= Metal Storm 2009 winners |access-date= 6 September 2011 |magazine= [[Metal Storm (webzine)|Metal Storm]] |ref= {{SfnRef|Metal Storm (2)}} }}
* {{cite magazine |url= http://www.metalstorm.net/awards/archive.php?year=2010 |title= Metal Storm 2010 winners |access-date= 1 September 2011 |magazine= [[Metal Storm (webzine)|Metal Storm]] |ref= {{SfnRef|Metal Storm (3)}} }}
* {{cite magazine |url= http://www.metalstorm.net/events/news_comments.php?news_id=5589&print_page=yes |title= Iron Maiden – More Somewhere Back in Time World Tour Dates |date= 1 November 2007 |access-date= 20 November 2011 |magazine= [[Metal Storm (webzine)|Metal Storm]] |ref= {{SfnRef|Metal Storm|2007}} }}
* {{cite magazine |url= http://www.metalstorm.net/events/news_comments.php?news_id=13834 |title= ''Metal Hammer'' awards 2011 winners |date= 16 June 2011 |access-date= 1 September 2011 |magazine= [[Metal Storm (webzine)|Metal Storm]] |ref= {{SfnRef|Metal Storm|2011}} }}
* {{cite web |url= http://www.metalunderground.com/news/details.cfm?newsid=10342 |title= Iron Maiden's Gothenburg Show Sold Out in 2.5 Hrs |date= 30 October 2004 |access-date= 20 November 2011 |publisher= Metal Underground |ref= {{SfnRef|Metal Underground|2004}} }}
* {{cite web |url= http://www.metalunderground.com/news/details.cfm?newsid=13627 |title= SVT To Broadcast Iron Maiden Live in Gothenburg |date= 18 May 2005 |access-date= 20 November 2011 |publisher= Metal Underground |ref= {{SfnRef|Metal Underground|2005}} }}
* {{cite web |url= http://www.metalunderground.com/news/details.cfm?newsid=24098 |title= Iron Maiden Headlining Download Festival |date= 31 January 2007 |access-date= 20 November 2011 |publisher= Metal Underground |ref= {{SfnRef|Metal Underground|2007}} }}
* {{cite web |url=http://www.metalupdate.com/interviewflames.html |title=Metal Update Interview with Jesper Strömblad |publisher=Metalupdate.com |date=19 November 1999 |access-date=27 August 2010 |ref={{SfnRef|Metal Update|2010}} }}
* {{cite web |url= http://www.metrolyrics.com/back-to-the-80s-lyrics-aqua.html |title= Aqua- 'Back to the 80s' (lyrics) |access-date= 16 October 2011 |publisher= [[MetroLyrics]] |ref= {{SfnRef|MetroLyrics(1)}} |archive-date= 29 October 2019 |archive-url= https://web.archive.org/web/20191029014848/https://www.metrolyrics.com/back-to-the-80s-lyrics-aqua.html |url-status= dead }}
* {{cite web |url= http://www.metrolyrics.com/heart-songs-lyrics-weezer.html |title= Weezer- 'Heart songs' (lyrics) |access-date= 16 October 2011 |publisher= [[MetroLyrics]] |ref= {{SfnRef|MetroLyrics(2)}} |archive-date= 3 June 2019 |archive-url= https://web.archive.org/web/20190603194752/http://www.metrolyrics.com/heart-songs-lyrics-weezer.html |url-status= dead }}
* {{cite web |url= http://www.metrolyrics.com/psycho-joe-lyrics-blues-traveler.html |title= Blues Traveller- 'Psycho Joe' lyrics |access-date= 16 October 2011 |publisher= [[MetroLyrics]] |archive-date= 29 October 2019 |archive-url= https://web.archive.org/web/20191029014848/http://www.metrolyrics.com/psycho-joe-lyrics-blues-traveler.html |url-status= dead |ref= {{SfnRef|MetroLyrics(3)}} }}
* {{cite web |url= http://www.metrolyrics.com/metal-machine-lyrics-sabaton.html |title= Sabaton- 'Metal Machine' (lyrics) |access-date= 16 October 2011 |publisher= [[MetroLyrics]] |archive-date= 29 October 2019 |archive-url= https://web.archive.org/web/20191029014848/http://www.metrolyrics.com/metal-machine-lyrics-sabaton.html |url-status= dead |ref= {{SfnRef|MetroLyrics(4)}} }}
* {{cite web |url= http://www.metrolyrics.com/metal-ripper-lyrics-sabaton.html |title= Sabaton- 'Metal Ripper' (lyrics) |access-date= 16 October 2011 |publisher= [[MetroLyrics]] |ref= {{SfnRef|MetroLyrics(5)}} |archive-date= 3 June 2019 |archive-url= https://web.archive.org/web/20190603194751/http://www.metrolyrics.com/metal-ripper-lyrics-sabaton.html |url-status= dead }}
* {{cite web|url=https://variety.com/2013/music/news/wmg-buys-parlophone-label-1118065823/|title=WMG Buys Parlophone Label|access-date=28 November 2018|date=7 February 2013|last=Morris|first=Chris|work=[[Variety (magazine)|Variety]]}}
* {{cite web |url= http://www.musicradar.com/news/guitars/the-25-greatest-bassists-of-all-time-279007/45 |title= The 60 greatest bassists of all time |date= 24 September 2010 |access-date= 21 September 2011 |publisher= [[MusicRadar]] |ref= {{SfnRef|MusicRadar|2010}} |url-status= dead |archive-url= https://web.archive.org/web/20131024113236/http://www.musicradar.com/news/guitars/the-25-greatest-bassists-of-all-time-279007/45 |archive-date= 24 October 2013 |df= dmy-all }}
* {{cite web |publisher=[[MTV]] |format=Official Website |title=The Greatest Metal Bands of All Time, 4: Iron Maiden |year=2006 |url=http://www.mtv.com/bands/m/metal/greatest_metal_bands/071406/index5.jhtml |access-date=7 October 2006 |ref={{SfnRef|MTV|2006(a)}} |url-status=dead |archive-url=https://web.archive.org/web/20101218144328/http://www.mtv.com/bands/m/metal/greatest_metal_bands/071406/index5.jhtml |archive-date=18 December 2010 }}
* {{cite web |url=http://www.mtv.com/bands/m/metal/greatest_metal_bands/071406/index14.jhtml |title=Top 10s from Some Top 10 Metal Heads |publisher=[[MTV]] |date=9 March 2006 |access-date=13 January 2011 |ref={{SfnRef|MTV|2006(b)}} }}
* {{cite magazine |url= http://metalhammer.teamrock.com/news/2015-05-15/dickinson-given-cancer-all-clear |title= Dickinson given cancer all-clear |access-date= 15 May 2015 |last= Munro |first= Scott |date= 15 May 2015 |magazine= [[Metal Hammer]] }}
* {{cite web|last1=Munro|first1=Scott|title=Golden Gods 2017|url=http://teamrock.com/news/2017-06-12/golden-gods-2017-mastodon-a7x-gojira-among-winners|website=[[Metal Hammer]]|access-date=31 July 2017|date=12 June 2017|ref={{SfnRef|Munro|2017a}}}}
* {{cite web|last1=Munro|first1=Scott|title=Iron Maiden announce Legacy Of The Beast UK and European tour|url=http://teamrock.com/news/2017-11-13/iron-maiden-announce-legacy-of-the-beast-uk-and-european-tour|website=[[Classic Rock (magazine)|Classic Rock]]|access-date=13 November 2017|date=13 November 2017|ref={{SfnRef|Munro|2017b}}}}
* {{cite web|work=[[Newsbeat]]|publisher=[[BBC News]]|title=Iron Maiden, Asking Alexandria and Creeper all win at ''Metal Hammer'' Golden God Awards|date=14 June 2016|url=http://www.bbc.co.uk/newsbeat/article/36525512/iron-maiden-asking-alexandria-and-creeper-all-win-at-metal-hammer-golden-god-awards|access-date=19 June 2016|ref={{SfnRef|Newsbeat|2016}}}}
* {{cite news |url=http://www.aftonbladet.se/nojesbladet/musik/hardrock/article15499116.ab |title=Bruce Dickinson laddad inför konserten i Sverige |access-date=25 September 2012 |last=Nilsson |first=Christoffer |date=25 September 2012 |work=[[Aftonbladet]] |language=sv |archive-url=https://web.archive.org/web/20120926205321/http://www.aftonbladet.se/nojesbladet/musik/hardrock/article15499116.ab |archive-date=26 September 2012 |url-status=dead }}
* {{cite web|work= [[NME]]|location= UK|format= Official Website|title= Iron Maiden rise above Osbourne's drama at Leeds|year= 2005|url= https://www.nme.com/news/113509.htm|access-date= 11 October 2006|archive-url= https://web.archive.org/web/20060720224945/http://www.nme.com/news/113509.htm <!-- Bot retrieved archive -->|archive-date= 20 July 2006|ref= {{SfnRef|NME|2005}}}}
* {{cite web |url= https://www.officialcharts.com/charts/albums-chart/19980329/7502/ |title= Official UK Albums Archive: 4 April 1998 |access-date= 17 October 2011 |publisher= [[Official Charts Company]] |ref= {{SfnRef|Official Charts Company|1998}} }}
* {{cite web |url= https://www.officialcharts.com/charts/singles-chart/20050109/7501/ |title= UK Singles Chart- 15 January 2005 |access-date= 20 September 2011 |publisher= [[Official Charts Company]] |ref= {{SfnRef|Official Charts Company|2005}} }}
* {{cite book |last1= Paterson |first1= Lawrence |author-link= Lawrence Paterson |title= Blaze Bayley: At the End of the Day |publisher= Blaze Bayley Recordings Ltd |year= 2009 |page= 44}}
* {{cite news|last=Pfanner|first=Eric|url=https://www.nytimes.com/2010/09/06/business/media/06maiden.html|title=Die-Hard Fans Follow Iron Maiden into the Digital Age|access-date=10 October 2010|newspaper=[[The New York Times]]|date=5 September 2010}}
* {{Cite book|first1=William|last1=Phillips|first2=Brian|last2=Cogan|title=Encyclopedia of Heavy Metal Music|url={{Google books|52hFCQAAQBAJ|page=PA117|keywords=|text=|plainurl=yes}}|year=2009|publisher=ABC-CLIO|isbn=978-0-313-34801-3}}
* {{cite web |url=https://www.planespotters.net/airframe/Boeing/747/32868/TF-AAK-Air-Atlanta-Icelandic |title=TF-AAK Air Atlanta Icelandic Boeing 747-428 – cn 32868 / 1325 |access-date=21 February 2016 |ref={{SfnRef|PlaneSpotters.net}} |url-status=dead |archive-url=https://web.archive.org/web/20160305034546/https://www.planespotters.net/airframe/Boeing/747/32868/TF-AAK-Air-Atlanta-Icelandic |archive-date=5 March 2016 |df=dmy-all }}
* {{cite journal |title= Bullet in the Head |journal= Metal Hammer Presents: Iron Maiden 30 Years of Metal Mayhem |year= 2005 |first= Martin |last= Popoff |author-link= Martin Popoff |page= 43 |ref={{SfnRef|Popoff|2005(a)}}}}
* {{cite journal |title= The X Offender |journal= Metal Hammer Presents: Iron Maiden 30 Years of Metal Mayhem |year= 2005 |first= Martin |last= Popoff |author-link= Martin Popoff |page= 63 |ref={{SfnRef|Popoff|2005(b)}}}}
* {{cite journal |title= Maiden at the Movies |journal= Metal Hammer Presents: Iron Maiden 30 Years of Metal Mayhem |year= 2005 |first= Martin |last= Popoff |author-link= Martin Popoff |pages= 104–105 |ref={{SfnRef|Popoff|2005(c)}}}}
* {{cite journal |title= Commercial Break! |journal= Metal Hammer Presents: Iron Maiden 30 Years of Metal Mayhem |year= 2005 |first= Martin |last= Popoff |author-link= Martin Popoff |pages= 108–109 |ref={{SfnRef|Popoff|2005(d)}}}}
* Popoff, Martin (2013). ''2 Minutes to Midnight: An Iron Maiden Day-by-Day''. Backbeat Books, {{ISBN|1-617-13565-8}}.
* {{cite web|url=https://www.allmusic.com/album/no-prayer-for-the-dying-mw0000204748|title=Iron Maiden – ''No Prayer for the Dying''|access-date=19 November 2011|first=Greg|last=Prato|publisher=[[Rovi Corporation]]|work=[[AllMusic]]}}
* {{cite web |url=http://riaa.com/goldandplatinumdata.php |title=RIAA Searchable database – Gold and Platinum |publisher=[[Recording Industry Association of America]] |access-date=30 March 2008 |ref={{SfnRef|RIAA}} |url-status=dead |archive-url=https://web.archive.org/web/20150904024728/http://www.riaa.com/goldandplatinumdata.php |archive-date=4 September 2015 }}
* {{cite news |last=Rocha |first=Pedro |title=Rock in Rio 2013 terá Springsteen, Metallica e Iron Maiden |url=http://www.jb.com.br/cultura/noticias/2012/10/16/rock-in-rio-2013-tera-springsteen-metallica-e-iron-maiden/ |access-date=17 October 2012 |newspaper=[[Jornal do Brasil]] |date=16 October 2012 |location=Rio de Janeiro |language=pt |archive-url=https://web.archive.org/web/20121017065340/http://www.jb.com.br/cultura/noticias/2012/10/16/rock-in-rio-2013-tera-springsteen-metallica-e-iron-maiden/ |archive-date=17 October 2012 |url-status=dead }}
* {{cite web |url= http://www.rockband.com/songs/artists/Iron+Maiden |title= Iron Maiden: All Songs by Artist |access-date= 24 September 2011 |publisher= Rock Band |ref= {{SfnRef|Rock Band}} |url-status= dead |archive-url= https://web.archive.org/web/20110304182807/http://www.rockband.com/songs/artists/Iron+Maiden |archive-date= 4 March 2011 |df= dmy-all }}
* {{cite web|url=http://www.rockonthenet.com/grammy/metal.htm|title=Grammy Awards: Best Metal Performance|publisher=Rock on the Net|access-date=8 March 2009|ref={{SfnRef|Rock on the Net}}}}
* {{cite web |url= http://www.rockstargames.com/thelostanddamned/music |title= ''The Lost and Damned'' soundtrack |access-date= 24 September 2011 |publisher= [[Rockstar Games]] |ref= {{SfnRef|Rockstar Games}} }}
* {{cite web|last=Roland|first=Driadonna|title=Ex-Iron Maiden Drummer Clive Burr Dead at 56|url=http://www.mtv.com/news/articles/1703626/iron-maiden-drummer-clive-burr-dead.jhtml|publisher=[[MTV]]|access-date=13 May 2013|date=13 March 2013}}
* {{cite web|url=http://www.roadrunnerrecords.com/news/the-50-greatest-metal-front-men-of-all-time|title=The 50 Greatest Metal Front-men of All Time!|last=Rosen|first=Jeremy|date=7 December 2011|access-date=1 August 2010|publisher=[[Roadrunner Records]]|archive-date=5 March 2013|archive-url=https://web.archive.org/web/20130305003959/http://www.roadrunnerrecords.com/news/the-50-greatest-metal-front-men-of-all-time|url-status=dead}}
* {{cite video|date= 10 June 2002|title=Iron Maiden: [[Rock in Rio (album)|Rock in Rio]]|medium=DVD|publisher=[[Sanctuary Records Group|Sanctuary]]|ref={{SfnRef|Sanctuary|2002}}}}
* {{cite web|title= Iron Maiden honoured with Ivor Novello award|date= 18 September 2002|publisher= [[Sanctuary Records Group|Sanctuary Group]]|format= Official Website|url= http://www.sanctuarygroup.com/index.php?page=1&l1=1&l2=2&l3=0&getArticleId=9|access-date= 11 October 2006|archive-url= https://web.archive.org/web/20070310153337/http://www.sanctuarygroup.com/index.php?page=1&l1=1&l2=2&l3=0&getArticleId=9 <!-- Bot retrieved archive -->|archive-date= 10 March 2007|ref= {{SfnRef|Sanctuary Group|2002}}}}
* {{cite news|last1=Sands|first1=Katie|title=Iron Maiden plane Ed Force One is coming to Cardiff|url=http://www.walesonline.co.uk/news/wales-news/iron-maiden-tour-cardiff-airport-10878666|access-date=21 February 2016|work=Wales Online|publisher=[[Media Wales]]|date=12 February 2016}}
* {{cite web|title=Blaze Bayley Interview: Iron Maiden Singer talks Wolfsbane|url=http://musiclegends.ca/interviews/blaze-bayley-iron-maiden-interview/|publisher=Music Legends|access-date=24 May 2013|date=30 April 2010|last=Saulnier|first=Jason}}
* {{cite web|publisher=Music Legends|url=http://musiclegends.ca/interviews/paul-dianno-interview/|title=Paul Di'Anno Interview|access-date=6 May 2013|date=22 November 2012|last=Saulnier|first=Jason}}
* {{cite magazine|last1=Sexton|first1=Paul|title=Iron Maiden Earns Fifth No. 1 Album in U.K. With The Book of Souls|url=https://www.billboard.com/articles/columns/chart-beat/6693297/iron-maiden-no-1-album-uk-chart|magazine=[[Billboard (magazine)|Billboard]]|access-date=12 September 2015|date=11 September 2015}}
* {{Cite book|last= Shooman|first= Joe|title= Bruce Dickinson: Flashing Metal with Iron Maiden and Flying Solo|year= 2007|publisher= Independent Music Press|isbn= 978-0-9552822-4-9}}
* {{cite web |url= http://news.sky.com/story/686694/award-winning-iron-maiden-film-hits-cinemas |title= Award Winning Iron Maiden Film Hits Cinemas |access-date= 26 November 2011 |date= 21 April 2009 |quote= ...largely without the help of radio airplay or the mainstream media. |publisher= [[BSkyB]] |last= Smith |first= Matt }}
* {{cite web|url=http://archive.peruthisweek.com/news/7988|title=Iron Maiden to perform in Lima March 2009|publisher=Living in Peru|last=Soto|first=Jobana|date=1 December 2008|access-date=6 December 2008|archive-url=https://web.archive.org/web/20120406212149/http://archive.peruthisweek.com/news/7988|archive-date=6 April 2012|url-status=dead}}
* {{cite web |url= http://www.sputnikmusic.com/bands/Sum-41/263/ |title= Biography: Sum 41 |access-date= 16 October 2011 |website= [[Sputnikmusic]] |ref= {{SfnRef|Sputnikmusic(1)}} }}
* {{cite web |url= http://www.sputnikmusic.com/news/6040/Iron-Maiden%3A-U.S.-Tour-Dates/ |title= Iron Maiden: US Tour Dates |date= 29 March 2008 |access-date= 20 November 2011 |website= [[Sputnikmusic]] |ref= {{SfnRef|Sputnikmusic|2008}} }}
* {{cite web |title=Maiden Cancel Plans To Quit |url=https://www.sputnikmusic.com/news/8792/Maiden-Cancel-Plans-To-Quit/ |website=Sputnikmusic |access-date=8 January 2021 |date=19 March 2009 |quote=We've always said we're only going to do 15 albums; we're coming up to it. There's going to be an ending point. |ref={{SfnRef|Sputnikmusic|2009}} }}
* {{cite web |url= https://www.sputnikmusic.com/review/7532/Iron-Maiden-Virtual-XI/ |title= Iron Maiden – ''Virtual XI'' |access-date= 28 January 2012 |date= 11 June 2006 |last= Stagno |first= Mike |website= [[Sputnikmusic]] |ref= {{SfnRef|Stagno|2006(a)}} }}
* {{cite web |url= https://www.sputnikmusic.com/review/8519/Iron-Maiden-The-X-Factor/ |title= Iron Maiden: ''The X Factor'' (Review) |last= Stagno |first= Mike |date= 2 August 2006 |access-date= 28 February 2012 |website= [[Sputnikmusic]] |quote= ...the often criticised Blaze Bayley himself. With his lower vocal range, he may not have been able to sing the old Iron Maiden classics as well as Bruce... |ref= {{SfnRef|Stagno|2006(b)}} }}
* {{Cite book |last=Stenning 1|first=Paul |author-link= Paul Stenning |title=Iron Maiden: 30 Years of the Beast – The Complete Unauthorised Biography |publisher= Chrome Dreams|edition=first |year=2006|isbn=1-84240-361-3}}
* {{Cite book |last=Stenning 2|first=Paul |author-link= Paul Stenning |title=Iron Maiden: 30 Years of the Beast – The Complete Unauthorised Biography |publisher= Chrome Dreams|edition=first |year=2006|isbn=1-84240-361-3}}
* {{cite news |url=https://www.theguardian.com/music/2005/aug/24/1 |location=London |work=[[The Guardian]] |first=Caroline |last=Sullivan |title=The revenge of Sharon Osbourne |date=24 August 2005 }}
* {{cite web |url= http://swedishcharts.com/showitem.asp?interpret=Iron+Maiden&titel=Virtual+XI&cat=a |title= Iron Maiden – ''Virtual XI'' Worldwide Charts |access-date= 11 April 2012 |publisher= Swedishcharts.com |work= [[Sverigetopplistan]] |ref= {{SfnRef|Sverigetopplistan}} }}
* {{cite web|last1=Tez|first1=Mehmet|title=Bir Bruce Dickinson röportajı: "Iron Maiden'ın farklı dİn ve kültürlerden İnsanları bİrleştİren yanını sevİyorum"|url=http://hafifmuzik.org/roportaj/bir-bruce-dickinson-roportaji-iron-maidenin-farkli-din-ve-kulturlerden-insanlari-birlestiren-yanini-seviyorum/|website=Hafif Müzik|access-date=27 February 2015|language=tr|date=26 July 2013}}
* {{cite web|url=https://www.sputnikmusic.com/review/30357/NOFX-Coaster/|title=NOFX- ''Coaster''|access-date=16 October 2011|website=[[Sputnikmusic]]|last=Thomas|first=Adam|date=29 April 2009}}
* {{cite web|url=http://www.thrashhits.com/2008/07/live-iron-maiden-london-twickenham-stadium-5-july-2008/|title=Iron Maiden live at Twickenham|access-date=12 October 2008|work=Thrash Hits|date=28 July 2007|ref={{SfnRef|Thrash Hits|2007}}|archive-url=https://web.archive.org/web/20080803023522/http://www.thrashhits.com/2008/07/live-iron-maiden-london-twickenham-stadium-5-july-2008/|archive-date=3 August 2008|url-status=dead|df=dmy-all}}
* {{cite web |url= http://www.thrashhits.com/2008/06/metal-hammer-golden-gods-2008-winners-and-gossip/ |title= ''Metal Hammer'' awards 2008 winners |date= 17 June 2008 |access-date= 1 September 2011 |publisher= Thrash Hits |ref= {{SfnRef|Thrash Hits|2008}} |archive-url= https://web.archive.org/web/20110821045432/http://www.thrashhits.com/2008/06/metal-hammer-golden-gods-2008-winners-and-gossip/ |archive-date= 21 August 2011 |url-status= dead |df= dmy-all }}
* {{cite news|last=Thring|first=Oliver|title=Bruce Dickinson: 'Iron Maiden's Bruce Dickinson – a man child in satan's sweet shop'|url=https://www.thetimes.co.uk/edition/news-review/iron-maidens-bruce-dickinson-a-man-child-in-satans-sweet-shop-wcjz6s7wt|website=[[The Sunday Times]]|access-date=31 October 2017|location=London|date=15 October 2017}}
* {{cite web |last1=Travers |first1=Paul |title=Iron Maiden: Every album ranked from worst to best |url=https://www.kerrang.com/features/iron-maiden-every-album-ranked-from-worst-to-best/ |website=Kerrang! |access-date=8 January 2021 |date=12 June 2020 }}
* {{cite web|url=http://www.ukrockfestivals.com/donington-1988.html|title=Donington – Iron Maiden|access-date=12 October 2009|publisher=UK Rock Festivals|ref={{SfnRef|UK Rock Festivals}}}}
* {{cite web |url=http://www.upvenue.com/article/1549-iron-maiden-releases-en-vivo-blu-ray-dvds-and-soundtrack.html |title=Iron Maiden Releasing ''En Vivo!'' Blu-ray, 2DVD and Soundtrack |date=17 January 2012 |access-date=17 January 2012 |work=UpVenue |ref={{SfnRef|UpVenue}} }}
* {{cite episode |title= VH1's 100 Greatest Hard Rock Artists |series= [[The Greatest (TV series)|The Greatest]] |credits= [[Carmen Electra]] (host) |network= [[VH1]] |airdate= 11 August 2005|ref={{SfnRef|VH1|2005}}}}
* {{cite AV media|title= VH1 Classic's Top 20 Metal Bands |publisher= [[VH1 Classic]] |date= 25 December 2006|ref={{SfnRef|VH1|2006}}}}
* {{cite episode |title= New Wave of British Heavy Metal |series= [[Metal Evolution]] |credits= Dunn, McFadyen (creators, directors) |network= [[VH1 Classic]] |airdate= 10 December 2011|ref={{SfnRef|VH1|2011}}}}
* {{cite news |url=https://www.nytimes.com/2006/12/31/arts/music/31vinc.html |title=Whole Albums in Concert |work=[[The New York Times]] |access-date=1 January 2009 |first=Elisabeth |last=Vincentelli |date=31 December 2006 }}
* {{cite web|url=http://www.volga-dnepr.com/en/press-center/news/3631/|title=Volga-Dnepr Gulf has successfully released the unique customised aircraft for Iron Maiden rock-band|date=1 March 2016|access-date=3 March 2016|publisher=[[Volga-Dnepr Airlines]]|ref={{SfnRef|volga-dnepr.com|2016}}}}
* {{cite news |url=https://www.theguardian.com/music/2007/apr/22/popandrock.features1 |title=Maiden India |access-date=8 January 2012 |location=London |work=[[The Guardian]] |first=Ed |last=Vulliamy |date=22 April 2007 }}
* {{Cite book|last= Wall|first= Mick |author-link= Mick Wall |title= Iron Maiden: Run to the Hills, the Authorised Biography|edition= third|publisher= Sanctuary Publishing|year= 2004|isbn= 1-86074-542-3}}
* {{cite web |url=http://www.kerrang.com/43773/kerrang-awards-2016-the-winners/ |title=''Kerrang!'' Awards 2016: The Winners! |last=Walker |first=Jen |access-date=19 June 2016 |date=9 June 2016 |work=[[Kerrang!]] |url-status=dead |archive-url=https://web.archive.org/web/20160609204645/http://www.kerrang.com/43773/kerrang-awards-2016-the-winners/ |archive-date=9 June 2016 }}
* {{cite web |url= http://ultimateclassicrock.com/top-beavis-and-butthead-classic-rock-song-commentaries/ |title= Top 10 Beavis And Butthead Classic Rock Song Commentaries |last= Wardlaw |first= Matt |access-date= 20 December 2011 |publisher= Ultimate Classic Rock }}
* {{cite news |url= http://www.aftonbladet.se/nojesbladet/musik/rockbjornen/article13549648.ab |title= Bästa liveakt hårdrock: Iron Maiden |last= Wejbro |first= Sandra |date= 31 August 2011 |access-date= 1 September 2011 |language= sv |newspaper= [[Aftonbladet]] }}
* {{cite web|last= Williams|first= Scott|title= Iron Maiden Reading 2005 Review|date= 31 August 2005|url= http://www.efestivals.co.uk/festivals/reading/2005/review-ironmaiden.shtml|publisher= EFestivals.com|access-date= 11 October 2006|archive-date= 14 October 2006|archive-url= https://web.archive.org/web/20061014201209/http://www.efestivals.co.uk/festivals/reading/2005/review-ironmaiden.shtml|url-status= dead}}
* {{cite web |url= http://yle.fi/vintti/yle.fi/pop/emman-historia.html |title= Emman historia |access-date= 4 September 2011 |language= fi |publisher= [[YLE]] |ref= {{SfnRef|YLE}} }}
* {{cite journal |title= Raising Hell |journal= [[Kerrang!|Kerrang! Legends]] |volume= 112 |first= Simon |last= Young |issue= 2 |page= 32|ref={{SfnRef|Young(1)}}|bibcode= 2006S&T...112f..54K |year= 2006 }}
* {{cite journal |title= Iron Men |journal= [[Kerrang!|Kerrang! Legends]] |first= Simon |last= Young |issue= 2 |pages= 90–93 |ref={{SfnRef|Young(2)}}}}
* {{cite journal |script-title=ja:YOSHIKI再び! |journal= Headbang |first= Chizuka |last= Kakizawa |volume= 9 |pages= 40–49 |date= 17 January 2016 |ref={{SfnRef|Kakizawa}}}}
* {{cite journal |title= Guitar Heroes: hide |journal= Rock 'n' Roll |first= Yusuke |last= Kato |volume= 93 |date= 27 January 1995 |ref={{SfnRef|Kato}}}}
{{refend}}
==Bibliography==
* {{cite book |last1= Bayer |first1= Gerd |title= Heavy Metal Music in Britain |publisher= [[Ashgate Publishing]]|year=2009 |location= Farnham, Surrey, UK |url=https://books.google.com/books?id=386hAgAAQBAJ&q=Heavy+Metal+Music+in+Britain&pg=PT19 |isbn= 978-0-7546-6423-9}}
* {{cite book|last=Bushell|first=Gary|title=Iron Maiden: Running Free|publisher=Hal Leonard Corp|year=1985|isbn=978-0-946-39184-4|url-access=registration|url=https://archive.org/details/ironmaidenrunnin00bush}}
* {{cite book|last=Daniels|first=Neil|title=Iron Maiden - Updated Edition: The Ultimate Illustrated History of the Beast |publisher=Voyageur Press|year=2016|isbn=978-0-760-35167-3}}
* {{cite book|last=Daniels|first=Neil|title=Iron Maiden - Playing With Madness: A Collection Of Writings On The Beast |publisher= Createspace |year=2019|isbn=978-1540515803}}
* {{cite book|last=Di'Anno|first=Paul|title=The Beast: Singing With Iron Maiden―The Drugs, the Groupies . . . the Whole Story|publisher=John Blake|year=2010|isbn=978-1-844-54884-2}}
* {{cite book|last=Dickinson|first=Bruce|title=What Does This Button Do?: An Autobiography|publisher=Dey Street Books|year=2017|isbn=978-0-062-46813-0}}
* {{cite book |last=Downing|first=K.K. |author-link= K.K. Downing |title= Heavy Duty: Nights and Days in Judas Priest |publisher= Da Capo Press |year=2018 |isbn=978-0306903311}}
* {{cite book |author=EMI |title= Iron Maiden: In Profile |chapter= Part 2: Groundwork |publisher= [[EMI]]}}
* {{cite book|title=Vinyl|last=Evans|first=Mike|publisher=Sterling|year=2015|isbn=978-1-4549-1781-6}}
* {{cite book |author=Fuentes Rodríguez, César |title=Iron Maiden: El Viaje De La Doncella |year=2005 |isbn=84-933891-2-9}}
* {{cite book |author1=Gamba, Marco |author2=Visintini, Nicola |title=Iron Maiden Companion (1st ed.) |publisher=Moving Media & Arts |year=2000|isbn=8867900234}}
* {{cite book |author1=Gamba, Marco |author2=Visintini, Nicola |title=Iron Maiden Companion (2nd ed.) |publisher=Moving Media & Arts |year=2004|isbn=978-8867900237}}
* {{cite book|last=Halfin|first=Ross|title=Iron Maiden|publisher=Vision On|year=2008|isbn=978-1-846-09445-3}}
* {{cite book |last=Haydn|first=Reinhardt|title= HIM – His Infernal Majesty|publisher= Plexus Publishing |year= 2007|isbn= 978-0-85965-392-3}}
* {{cite book |first= Stjepan|last= Juras|title= Killers |year= 2021 |location= Zadar, Croatia |editor= Maiden Croatia Stjepan Juras|isbn= 978-953-48280-3-8}}
* {{cite book|last=McMurtrie|first=John|title=Iron Maiden: On Board Flight 666|publisher=Orion Publishing|year=2013|isbn=978-1-409-14136-5}}
* {{cite book |last= Peterson|first=Lawrence |title= Blaze Bayley: At the End of the Day |year= 2009|publisher= Blaze Bayley Recordings Ltd|isbn= 9781844266876}}
* {{cite book|first1=William|last1=Phillips|first2=Brian|last2=Cogan|title=Encyclopedia of Heavy Metal Music|date=20 March 2009|url={{Google books|52hFCQAAQBAJ|page=PA117|plainurl=yes}}|publisher=ABC-CLIO|isbn=978-0-313-34801-3}}
* {{cite book|last=Popoff|first=Martin|title=2 Minutes to Midnight: An Iron Maiden Day-by-Day|publisher=Backbeat Books|year=2013|isbn=978-1-617-13565-1}}
* {{cite book|last=Popoff|first=Martin|title= Wheels of Steel – the explosive early years of the NWOBHM|publisher= Power Chord Press |year=2019|isbn=978-1912782185}}
* {{cite book|last=Prato|first=Greg|title=Iron Maiden: '80 '81|publisher=self-published|year=2015|isbn=978-1-508-53638-3}}
* {{cite book|last= Rodríguez Rojas |first= Luis Mariano |title= Detailed Discography of the Beast [ebook] |publisher= A Run Hard Publication |year=2020}}
* {{cite book|last= Shooman|first= Joe|title= Bruce Dickinson: Flashing Metal with Iron Maiden and Flying Solo|year= 2007|publisher= Independent Music Press|isbn= 978-0-9552822-4-9}}
* {{cite book |last= Smallwood|first=Rod |title= X Factor Press Release|year= 1995|publisher= EMI - Sanctuary Management}}
* {{cite book |last=Stenning|first=Paul |author-link= Paul Stenning |title=Iron Maiden: 30 Years of the Beast – The Complete Unauthorised Biography |publisher=Chrome Dreams |year=2006 |isbn=1-84240-361-3}}
* {{cite book|last= Wall|first= Mick |author-link= Mick Wall|title= Iron Maiden: Run to the Hills, the Authorised Biography|year= 2004 |edition= third|publisher= Sanctuary Publishin|isbn= 1-86074-542-3}}
==External links==
{{wikiquote}}
{{Commons category multi|Iron Maiden (band)|Ed Force One}}
* {{Official website|www.ironmaiden.com}}
* {{IMDb name|nm1442043}}
{{Iron Maiden}}
{{Bruce Dickinson}}
{{Blaze Bayley}}
{{Authority control}}
[[Category:Iron Maiden (band)| ]]
[[Category:1975 establishments in England]]
[[Category:Brit Award winners]]
[[Category:Capitol Records artists]]
[[Category:EMI Records artists]]
[[Category:English heavy metal musical groups]]
[[Category:Epic Records artists]]
[[Category:Grammy Award winners]]
[[Category:Harvest Records artists]]
[[Category:Ivor Novello Award winners]]
[[Category:Kerrang! Awards winners]]
[[Category:Musical groups established in 1975]]
[[Category:Musical groups from London]]
[[Category:New Wave of British Heavy Metal musical groups]]
[[Category:Second British Invasion artists]]
[[Category:Parlophone artists]]
[[Category:Universal Music Group artists]]
[[Category:Warner Music Sweden artists]]
sgo8cepaftrzlb9ba8q8zxyfr7539eu
Template:'
10
5593936
700770577
694728302
2016-01-20T14:48:54Z
Huntster
92632
Change per talk page discussion. If there are any issues found, contact me or another admin to revert.
wikitext
text/x-wiki
<span class="nowrap" style="padding-left:0.1em;">'</span><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
ey7sacklsawhwpz5k5ytshi6df53r90
Template:1x
10
15560851
579820311
538900702
2013-11-02T02:28:41Z
Fuhghettaboutit
665998
Changed protection level of Template:1x: Enable access by template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
wikitext
text/x-wiki
{{{1}}}<noinclude>
{{documentation}}
</noinclude>
pj4wuk9fq5if381k4yy1hzwd7uvj8jy
Template:ASIN
10
8751838
1027610971
1027610920
2021-06-08T23:10:03Z
Plastikspork
5075409
Replace per TfD
wikitext
text/x-wiki
[[Amazon Standard Identification Number|ASIN]] [https://www.amazon<!--
-->{{#if:{{{country|}}}
|{{#ifeq:{{{country|}}}|uk|.co}}.{{{country}}}
|.com
}}/dp/{{1x|1={{{1}}} }} {{{1}}}]<!--
-->{{#if:{{{title|<noinclude>x</noinclude>}}}
|, ''{{{title}}}''
}}<!--
-->{{#if:{{{date|<noinclude>x</noinclude>}}}
| ({{{date}}})
}}<noinclude>
{{documentation}}
</noinclude>
15n3ny4jdcpkz7nmi9c5wohh6ifkizc
Template:About
10
2468023
1044582448
1044580076
2021-09-16T00:56:50Z
Wbm1058
14383484
should implement in [[Module:About]]. Piped {{!}} links causing false positives.
wikitext
text/x-wiki
{{#invoke:about|about}}<noinclude>
{{Documentation}}
</noinclude>
65kia3vbcfrf851snuk172blbw5z7sh
Template:AllMusic
10
1272240
1040784286
997220424
2021-08-26T17:04:41Z
Pppery
28032115
Add authorlink per edit request
wikitext
text/x-wiki
{{#ifeq: {{{pure_url|}}} | yes
| https://www.allmusic.com/{{{class|{{Trim|{{{1|{{
#switch:{{padleft:|2|{{#invoke:String|replace|source={{{id|{{Trim|{{{2|}}}}}}}}|pattern=.*-|replace=|plain=false}}}}
| mn = artist
| mw = album
| mt = song
| mc = composition
| artist
}}}}}}}}}}/{{{id|{{Trim|{{{2|}}}}}}}}{{
#if: {{{tab|}}}
| /{{{tab}}}
}}
| {{#if: {{{2|{{{id<includeonly>|</includeonly>}}}}}}
| {{#if: {{{last|{{{author|}}}}}}
| {{#if: {{{author-link|}}}|[[{{{author-link}}}{{!}}{{{last|{{{author|}}}}}}{{#if: {{{first|}}}|, {{{first}}} }}]]|{{{last|{{{author|}}}}}}{{#if: {{{first|}}}|, {{{first}}} }}}}. 
}}[https://www.allmusic.com/{{{class|{{Trim|{{{1|{{
#switch:{{padleft:|2|{{#invoke:String|replace|source={{{id|{{Trim|{{{2|}}}}}}}}|pattern=.*-|replace=|plain=false}}}}
| mn = artist
| mw = album
| mt = song
| mc = composition
| artist
}}}}}}}}}}/{{{id|{{Trim|{{{2|}}}}}}}}{{
#if: {{{tab|}}}
| /{{{tab}}}
}} {{
#if: {{{3|{{{label|{{{title|}}}}}}}}}
| {{{3|{{{label|{{{title}}}}}}}}}
| {{PAGENAMEBASE}}
}}] at [[AllMusic]]{{
#if: {{{access-date|{{{accessdate|}}}}}}
| . Retrieved {{{access-date|{{{accessdate|}}}}}}.
}}
| {{#if: {{#property:P1728}}
| [https://www.allmusic.com/artist/{{First word|1={{#property:P1728}}|sep=,}} {{#if: {{{label|{{{title|}}}}}} | {{{label|{{{title}}}}}} | {{PAGENAMEBASE}} }}] at [[AllMusic]]{{EditAtWikidata|pid=P1728}}
| {{#if: {{#property:P1729}}
| [https://www.allmusic.com/album/{{First word|1={{#property:P1729}}|sep=,}} {{#if: {{{label|{{{title|}}}}}} | {{{label|{{{title}}}}}} | {{PAGENAMEBASE}} }}] at [[AllMusic]]{{EditAtWikidata|pid=P1729}}
| {{#if: {{#property:P1730}}
| [https://www.allmusic.com/song/{{First word|1={{#property:P1730}}|sep=,}} {{#if: {{{label|{{{title|}}}}}} | {{{label|{{{title}}}}}} | {{PAGENAMEBASE}} }}] at [[AllMusic]]{{EditAtWikidata|pid=P1730}}
| {{#if: {{#property:P1994}}
| [https://www.allmusic.com/composition/{{First word|1={{#property:P1994}}|sep=,}} {{#if: {{{label|{{{title|}}}}}} | {{{label|{{{title}}}}}} | {{PAGENAMEBASE}} }}] at [[AllMusic]]{{EditAtWikidata|pid=P1994}}
| <span class="error">{{[[Template:AllMusic|AllMusic]]}} template missing ID and not present in Wikidata.</span>{{Main other|[[Category:AllMusic template missing ID and not in Wikidata]]}}
}}
}}
}}
}}
}}
}}<noinclude>{{Documentation}}</noinclude>
rlvi9hugycnfobgp1cwabaup2037oq4
Template:As of
10
16011254
1076559894
1073465475
2022-03-11T18:47:23Z
Sdkb
13006032
Add bare parameter to parameter check to fix preview error
wikitext
text/x-wiki
<!--{{As of}} begin--><includeonly><!--
## param 1 is the year
## optional param 2 is the month
## optional param 3 is the day of the month
## optional named parameter alt=[text] is alternative display text (may include wiki markup)
## optional named parameter df=US produces American date format in displayed text
## optional named parameter lc=on gives lower-case-first output
## optional named parameter url=[URL] gives statement reference
## displayed text ([A/a]s of [Start date] by default)
-->{{#if: {{{alt|}}} | {{{alt}}} | {{#if:{{{bare|}}}||{{#if:{{{since|}}}|{{#ifeq: {{{lc}}} | {{{lc|}}} | s | S }}ince | {{#ifeq: {{{lc}}} | {{{lc|}}} | a | A }}s of}}}} {{#if:{{{pre|}}}|{{{pre}}} }}{{#if: {{{3|}}} | {{#ifeq:{{lc:{{{df|}}}}}|us|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}}, |{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}} }}{{{1}}}|{{#if: {{{2|}}} |{{MONTHNAME|{{{2}}}}} }}{{{1}}}}}}}{{#if:{{{post|}}}|<nowiki />{{{post}}}}}<!--
#### That nowiki is required or, various characters (:, ;, #, and *} will be parsed as wikisyntax for list items.
## ref/update inline banner (hidden by default)
--><sup class="plainlinks noexcerpt noprint asof-tag {{#if:{{{url|}}}|ref|update}}" style="display:none;">[{{#if:{{{url|}}}|{{{url}}} [ref]|{{fullurl:{{PAGENAME}}|action=edit}} [update]}}]</sup><!--
## categorisation disabled outside main namespace
-->{{DMCA|Articles containing potentially dated statements|from|<!--
## temporal category for template (word method)
-->{{#if: {{#ifexpr: {{{1}}} = 1 }} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | {{#time:Y|{{{1}}}}} | before 1990 }}}} | <!--
## temporal category for template (parameter method)
-->{{#ifexpr: {{{1}}} > 2004 | {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} | {{#ifexpr:{{{1}}} > 1989 | {{{1}}} | before 1990 }}}}}}|<!--
## global category for template
-->All articles containing potentially dated statements}}</includeonly><!--{{As of}} end--><noinclude><!--
## dynamic example (as of today, self ref)
-->{{As of|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}<sup class="plainlinks">[https://en.wikipedia.org/wiki/Template:As_of [ref]]</sup>
{{documentation}}
<!-- Add categories and inter-wikis to the /doc subpage, not here! -->
</noinclude>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using as of template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:As of]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | alt | bare | df | lc | post | pre | since | url }}
cnpwltrclotn4cesuixdpuayqfxpyl9
Template:Authority control
10
23327809
1056624773
1041946236
2021-11-22T21:18:20Z
MSGJ
42630
add extralist to list of recognised parameters
wikitext
text/x-wiki
{{#invoke:Authority control|authorityControl}}<noinclude>{{Documentation}}</noinclude><includeonly><noinclude>
</noinclude>{{#switch:{{NAMESPACE}}||{{ns:14}}=<noinclude> Only articles and categories.
</noinclude>{{#invoke:Check for unknown parameters|check|arts|state|extralist|ignoreblank=1|showblankpositional=1|unknown=[[Category:Pages using authority control with parameters|_VALUE_]]|preview=Page using [[Template:Authority control]] with "_VALUE_", please move this to Wikidata if possible}}
}}</includeonly>
r7zu90c4kw92cg7qpkt338qlrjs39u2
Template:BillboardURLbyName
10
38447198
1056358682
1018297463
2021-11-21T09:01:57Z
Paine Ellsworth
9092818
per edit request on talk page - fix urls with "404 page not found" returns
wikitext
text/x-wiki
<includeonly>https://www.billboard.com/artist/{{#invoke:WLink|ansiPercent|{{#invoke:String|replace|{{lc:{{{artist}}}}}|&|%26}}|space=-}}{{#if:{{{chart|}}}
|/chart-history/{{#ifeq:{{{chart}}}|all||{{#invoke:WLink|ansiPercent|{{#invoke:String|replace|{{lc:{{{chart}}}}}|&|%26}}|space=-}}}}
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
2uq726uhsjche7yeg2q69xklzfx3dnm
Template:Blaze Bayley
10
14191754
1068603995
1053658936
2022-01-29T10:27:06Z
Colonies Chris
577301
wikitext
text/x-wiki
{{Navbox musical artist
| state = {{{state<includeonly>|autocollapse</includeonly>}}}
| name = Blaze Bayley
| title = [[Blaze Bayley]]
|bodyclass = hlist
| background = solo_singer
| above =
* '''[[Blaze Bayley]]'''
* '''Chris Appleton'''
* '''Karl Schramm'''
* '''Martin McNee'''
* [[Jeff Singer]]
* [[Daniel Löble]]
* [[Oliver Palotai]]
* [[Luca Princiotta]]
* [[Thomas Zwijsen]]
* ([[List of Blaze Bayley band members|details]])
|group1=Studio albums
|list1=
* ''[[Silicon Messiah]]''
* ''[[Tenth Dimension]]''
* ''[[Blood & Belief]]''
* ''[[The Man Who Would Not Die (album)|The Man Who Would Not Die]]''
* ''[[Promise and Terror]]''
* ''[[The King of Metal]]''
* ''Infinite Entanglement''
* ''Endure and Survive''
* ''The Redemption of William Black''
* ''December Wind''
|group2=Live albums and DVDs
|list2=
* ''[[As Live as It Gets]]''
* ''[[Alive in Poland]]''
* ''The Night That Will Not Die''
* ''Live in Prague''
* ''Live in France''
* ''Live in Czech''
| group3 = With Wolfsbane
| list3 =
* ''[[Live Fast, Die Fast]]''
* ''[[All Hell's Breaking Loose Down at Little Kathy Wilson's Place]]''
* ''[[Down Fall the Good Guys]]''
* ''[[Massive Noise Injection]]''
* ''[[Wolfsbane (album)|Wolfsbane]]''
* ''[[Lifestyles of the Broke and Obscure]]''
* ''[[Wolfsbane Save the World]]''
| group4 = With Iron Maiden
| list4 =
* ''[[The X Factor (album)|The X Factor]]''
* ''[[Virtual XI]]''
* ''[[Best of the 'B' Sides]]''
| group5 = Related articles
| list5 =
* [[List of Blaze Bayley band members|Band members]]
* [[Blaze Bayley discography|Discography]]
* [[Iron Maiden]]
* [[Wolfsbane (band)|Wolfsbane]]
}}<noinclude>
{{collapsible option}}
[[Category:English rock musicians templates]]
[[Category:Heavy metal musicians templates]]
[[Category:Singers templates]]
</noinclude>
7srczb1cbjeg8d9lxfz97v4v64q3fn3
Template:Br separated entries
10
27461703
664153181
579827061
2015-05-26T18:06:33Z
Izkala
23051379
Switch to using [[Module:Separated entries]]; leading and trailing whitespace and newlines are now trimmed
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br}}<noinclude>
{{documentation}}
</noinclude>
3qzqyo0vc2bkjx7dik52fp751jwcnq3
Template:Bruce Dickinson
10
5594849
962509435
962506793
2020-06-14T13:27:28Z
DB1729
37664675
Reverted [[WP:AGF|good faith]] edits by [[Special:Contributions/2A02:C7F:5065:9300:1C34:FB5B:2E08:4D45|2A02:C7F:5065:9300:1C34:FB5B:2E08:4D45]]: See [[MOS:TITLECAPS]], "from" is on the list of not capped. ([[WP:TW|TW]])
wikitext
text/x-wiki
{{Navbox musical artist
|name = Bruce Dickinson
|title = [[Bruce Dickinson]]
|state = {{{state|autocollapse}}}
|bodyclass = hlist
|background = solo_singer
|above =
|group1 = Studio albums
|list1 =
* ''[[Tattooed Millionaire]]''
* ''[[Balls to Picasso]]''
* ''[[Skunkworks (album)|Skunkworks]]''
* ''[[Accident of Birth]]''
* ''[[The Chemical Wedding (Bruce Dickinson album)|The Chemical Wedding]]''
* ''[[Tyranny of Souls]]''
|group2 = Live albums
|list2 =
* ''[[Alive in Studio A]]''
* ''[[Scream for Me Brazil]]''
|group3 = Compilations
|list3 =
* ''[[The Best of Bruce Dickinson]]''
* ''[[Alive (Bruce Dickinson album)|Alive]]''
|group4 = Soundtracks
|list4 =
* ''Scream for Me Sarajevo''
|group5 = EPs
|list5 =
* ''[[Skunkworks Live EP]]''
|group6 = Videos
|list6 =
* ''[[Dive! Dive! Live!]]''
* ''[[Skunkworks Live Video]]''
* [[Anthology (Bruce Dickinson video)|''Anthology'']]
|group7 = Songs
|list7 =
* "[[Bring Your Daughter... to the Slaughter]]"
* "[[Tattooed Millionaire (song)|Tattooed Millionaire]]"
* "[[All the Young Dudes (song)|All the Young Dudes]]"
* "[[Dive! Dive! Dive!]]"
* "[[Born in '58]]"
* "[[Elected (song)#Cover_versions|(I Want To Be) Elected]]" <small>(with [[Mr. Bean]])</small>
* "[[Tears of the Dragon]]"
* "[[Shoot All the Clowns]]"
* "[[Back from the Edge (song)|Back from the Edge]]"
* "[[Accident of Birth (song)|Accident of Birth]]"
* "[[Man of Sorrows (song)|Man of Sorrows]]"
|group8 = Related articles
|list8 =
* [[Bruce Dickinson discography|Discography]]
* [[List of Bruce Dickinson band members|Band members]]
* [[List of Bruce Dickinson concert tours|Concert tours]]
* [[Iron Maiden]]
* [[Samson (band)|Samson]]
* [[Roy Z]]
* ''[[Flying Heavy Metal|Flying Heavy Metal]]''
* ''[[Chemical Wedding (film)|Chemical Wedding]]''
|below =
* {{icon|category}} [[:Category:Bruce Dickinson|Category]]
}}<noinclude>
{{collapsible option}}
[[category:Heavy metal musicians templates|Dickinson, Bruce]]
</noinclude>
oira01byweve3iff6149d94yug2pxc3
Template:Catalog lookup link
10
50392128
862301591
855471681
2018-10-03T13:51:48Z
Trappist the monk
10289486
Undid revision 855471681 by [[Special:Contributions/Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) restore the change now that the cs1|2 modules have been updated;
wikitext
text/x-wiki
<templatestyles src="Module:Citation/CS1/styles.css" />{{#invoke:Catalog lookup link|main}}<noinclude>
{{documentation}}
</noinclude>
464h1jyus0m20p4x31lf2k2pqgseen5
Template:Category handler
10
25084818
874046584
577959188
2018-12-16T20:13:00Z
Amorymeltzer
141948
Changed protection level for "[[Template:Category handler]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
{{#invoke:Category handler|main}}<noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, and interwikis to Wikidata. -->
</noinclude>
og6fhyj2ssd4fmzpqzuodk12q3cms0z
Template:Cbignore
10
47034649
728106388
728096339
2016-07-03T06:47:44Z
Closedmouth
372693
Protected "[[Template:Cbignore]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite))
wikitext
text/x-wiki
<noinclude>{{documentation}}</noinclude>
56q3glwxua861ekqmxdmx0ovfq3zxj9
Template:Citation needed
10
2048472
1087547841
1087547784
2022-05-13T03:22:19Z
Hyacinth
17171
Reverted edits by [[Special:Contribs/Hyacinth|Hyacinth]] ([[User talk:Hyacinth|talk]]) to last version by Izno
wikitext
text/x-wiki
{{ {{{|safesubst:}}}#invoke:Unsubst||date=__DATE__ |$B=
{{Fix
|name={{{name|Citation needed}}}
|link=Wikipedia:Citation needed
|text=citation needed
|class=Template-Fact
|title={{{reason|This claim needs references to reliable sources.}}}
|date={{{date|}}}
|cat=[[Category:All articles with unsourced statements]]
|cat-date=Category:Articles with unsourced statements
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages containing citation needed template with unsupported parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Citation needed]] with unknown parameter "_VALUE_"|ignoreblank=y| date | name | reason }}}}<noinclude>
{{Documentation}}
</noinclude>
1lanyzdl8lz3t31vc8lz268dkp3nq5h
Template:Cite AV media
10
2327169
774811519
690395471
2017-04-10T20:26:44Z
Lectonar
128863
Changed protection level for "[[Template:Cite AV media]]": request at rfpp ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#invoke:Citation/CS1 | citation
|CitationClass=audio-visual
}}</includeonly><noinclude>{{documentation}} </noinclude>
5uc4e2t6myaznmqj6pk8sugy3rcqv8a
Template:Cite book
10
4086375
810449908
810433573
2017-11-15T09:11:45Z
Salix alba
212526
put TD in a collapse top / bottom section
wikitext
text/x-wiki
<includeonly>{{#invoke:citation/CS1|citation
|CitationClass=book
}}</includeonly><noinclude>
{{documentation}}
{{collapse top|TemplateData}}
{{Cite book/TemplateData}}
{{collapse bottom}}
</noinclude>
my4yy07itdv4e2t5sc1x4l3pzgpmzo7
Template:Cite episode
10
4268531
690395482
657020245
2015-11-13T02:17:24Z
Fuhghettaboutit
665998
Changed protection level of Template:Cite episode: 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...
wikitext
text/x-wiki
<includeonly>{{#invoke:citation/CS1|citation
|CitationClass=episode
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
jvfdi0mqjvckd5aqot5911am34ya3kq
Template:Cite journal
10
4740319
690395473
579832342
2015-11-13T02:17:24Z
Fuhghettaboutit
665998
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...
wikitext
text/x-wiki
<includeonly>{{#invoke:Citation/CS1|citation
|CitationClass=journal
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
9fcytsszanq7xbwi3p28zsneear9938
Template:Cite magazine
10
7559370
886312468
745413566
2019-03-05T14:21:58Z
Xaosflux
502540
Changed protection level for "[[Template:Cite magazine]]": Pages alread protected from [[Wikipedia:Cascade-protected items/content]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#invoke:Citation/CS1|citation
|CitationClass=magazine
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
ihdnkvb90c6voz3z3uc97mmw5bytrkw
Template:Cite news
10
4321630
828626614
828404709
2018-03-03T19:19:37Z
Jo-Jo Eumerus
17449355
Per edit request on [[Help talk:Citation Style 1]]
wikitext
text/x-wiki
<includeonly>{{#invoke:citation/CS1|citation
|CitationClass=news
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
pbjnspfej5gxihr9izxrzkow3f1uf3i
Template:Cite video
10
38081459
530710885
2013-01-01T04:49:31Z
Delldot
476500
Delldot moved page [[Template:Cite video]] to [[Template:Cite AV media]]: [[Wikipedia:Templates_for_discussion/Log/2012_December_10#Template:Cite_video]]
wikitext
text/x-wiki
#REDIRECT [[Template:Cite AV media]]
o4m8a5iynt0evukcddod7ll58wl9l2o
Template:Cite web
10
1252907
753103437
753063659
2016-12-05T05:36:52Z
Anthony Appleyard
119438
Protected "[[Template:Cite web]]": restore old protection ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#invoke:citation/CS1|citation
|CitationClass=web
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
rcgmbcxu7hvs583g1f3rzz4c4dkizda
Template:Col-2
10
3218306
972054028
853607922
2020-08-09T22:31:42Z
Bsherr
4386431
adding comment
wikitext
text/x-wiki
{{col-break|width=50%|align={{{align|left}}}|valign={{{valign|top}}}}}<noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
hq7713co50rb1p4o1di7hfgd9kc3gh7
Template:Col-begin
10
3218295
972054407
861995989
2020-08-09T22:35:32Z
Bsherr
4386431
adding comment
wikitext
text/x-wiki
<div>
{| class="{{{class|}}} multicol" role="presentation" style="{{#if:{{{small|}}}|font-size:90%; }}border-collapse: collapse; padding: 0; border: {{{border|0}}}; background:{{{bgColor|{{{bgcolor|transparent}}}}}}; width:{{{width|100%}}}; {{{style|}}}"<noinclude>
|-
|
|}</div>
{{documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
99ncyc3mhkdrw36pqedq5m60cwxiged
Template:Col-break
10
3233169
1043158730
972054573
2021-09-08T17:07:15Z
Jonesey95
9755426
replace space character with noinclude due to continued fostered content errors, in testcases page and e.g. [[10-Piece handicap]].
wikitext
text/x-wiki
<noinclude/>
| style="{{#if:{{{width|}}}|width: {{{width}}}; }}text-align: {{{align|left}}}; vertical-align: {{{valign|top}}}; {{#if: {{{gap|}}}|padding-left: {{{gap}}};}} {{{style|}}}" |<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
6kvqt1c32wtgxc69tkw3wd7pjtc9s7r
Template:Col-end
10
3218301
1037229063
972054684
2021-08-05T08:10:43Z
WOSlinker
3138265
add includeonly
wikitext
text/x-wiki
<includeonly> 
|}</div></includeonly><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
</noinclude>
k24bcp3cs0m8f59jwmhng1acd8tpifu
Template:Commons category multi
10
9637943
845370086
791468017
2018-06-11T10:11:22Z
Fish and karate
224548
Changed protection level for "[[Template:Commons category multi]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
{{Sister project
| position = {{{position|{{{align|}}}}}}
| project = commons
| text = Wikimedia Commons has {{{alt-term|media related to}}} {{pagelist
|nspace=commons:Category
|delim =<wbr />'''''
|edelim='''''
|separator={{{delimiter|comma}}}
|conjunction={{{conjunction|{{{delimiter|}}}}}}
|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}}}.}}<noinclude>
{{Documentation}}
</noinclude>
2kef0ec4oyhjpre3hq35eqlmja1z0ko
Template:DMCA
10
23226218
774491639
296800547
2017-04-08T20:40:50Z
Jo-Jo Eumerus
17449355
Changed protection level for "[[Template:DMCA]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{Dated maintenance category
|onlyarticles=yes
|1={{{1|}}}
|2={{{2|}}}
|3={{{3|}}}
|4={{{4|}}}
|5={{{5|}}}
}}<noinclude>
{{documentation|Template:Dated maintenance category/doc}}
</noinclude>
cl1tba6o83bu6hpmnvwvbcse6qwofoo
Template:Dated maintenance category
10
22598546
589732290
584337311
2014-01-08T08:14:55Z
John of Reading
11308236
Second attempt. Those spaces upset inline templates such as {{As of}}. Instead, try an unconditional <nowiki/>
wikitext
text/x-wiki
<nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!--
-->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}}
|{{#if:{{{3|}}}
|[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!--
-->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}}
|<!--
-->|[[Category:Articles with invalid date parameter in template]]<!--
-->}}
|[[Category:{{#if:{{{5|}}}
|{{{5}}}<!--
-->|{{{1}}}<!--
-->}}]]<!--
-->}}{{#if:{{{4|}}}
|[[Category:{{{4}}}]]}}<!--
-->}}<!--
-->}}<noinclude>
{{documentation}}
</noinclude>
7p59j4cq4i8wg65odpv5287yu50sczo
Template:Delink
10
28069338
696877808
695173639
2015-12-26T16:26:10Z
Frietjes
13791031
{{documentation}} does this
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:delink|delink}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
nxxwkb2lon9wgne4irg9ctbsle6zwiy
Template:EditAtWikidata
10
51464314
915182280
907415032
2019-09-11T18:15:13Z
WOSlinker
3138265
add nbsp param
wikitext
text/x-wiki
{{#invoke:EditAtWikidata |showMessage |qid={{{qid|}}} |pid={{{pid|}}} |nbsp={{{nbsp|}}} |{{{1|}}} }}<noinclude>
{{documentation}}
</noinclude>
k3dnbwgfi8ka45sgpcor4r8i5d2lmjb
Template:EngvarB
10
28512348
983916757
982756588
2020-10-17T01:15:09Z
Primefac
11508456
TFD closed as keep ([[WP:XFDC|XFDcloser]])
wikitext
text/x-wiki
{{ {{{|safesubst:}}}#invoke:Unsubst||date=__DATE__ |$B=
{{DMCA|EngvarB|from|{{{date|}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
1i1hsi1jg32nmhqb6y8e6i7qy16fo8w
Template:Error-small
10
55072963
880607516
799379119
2019-01-28T10:31:16Z
Jonesey95
9755426
Actually make this smaller than a standard error message, not just non-bold.
wikitext
text/x-wiki
{{small|{{#invoke:Error|error|{{{message|{{{1}}}}}}|tag=span}}}}<noinclude>{{documentation}}</noinclude>
flg30hlgo3wckkfxn23ryl9hsmfet48
Template:FULLROOTPAGENAME
10
34701984
1063308743
774489771
2022-01-02T08:54:02Z
Dinoguy1000
2412089
fix "|=foo" bug
wikitext
text/x-wiki
{{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }}
| {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}}
| {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}
}}<noinclude>
{{documentation}}
</noinclude>
tk494gglkhfogc40do2k58d4bbttx9o
Template:Fix
10
5632010
1024430416
1024383868
2021-05-22T02:15:55Z
JJMC89
24812038
shouldn't be here
wikitext
text/x-wiki
{{#switch:{{{subst|¬}}}
|¬={{category handler
|template=[[Category:Templates needing substitution checking]]
|nocat={{{nocat|<noinclude>true</noinclude>}}}
}}
|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|}}}
|<sup class="noprint Inline-Template {{{class|}}}" style="white-space:nowrap;">[<i>{{#if:{{{pre-text|}}}
|{{{pre-text}}} 
}}[[{{{link|Wikipedia:Cleanup}}}|<span title="{{#invoke:string|replace|source={{delink|1={{{title|{{{link|Wikipedia:Cleanup}}}}}}{{#if:{{{date|}}}| ({{{date}}})}}}}|pattern=" |replace=' |plain=true}}">{{{text|}}}</span>]]{{#if:{{{post-text|}}}
| {{{post-text}}}
}}</i>]</sup>|{{{special|}}}
}}<noinclude>
{{Documentation}}
<!-- Add cats and interwikis to the /doc subpage, not here! -->
</noinclude>
1r71gb56no3991um3t95p5y9x80ldkz
Template:Fix/category
10
34017846
774489703
471928517
2017-04-08T20:24:09Z
Jo-Jo Eumerus
17449355
Changed protection level for "[[Template:Fix/category]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
<noinclude>{{pp-template|small=yes}}</noinclude>{{{cat|[[Category:All pages needing cleanup]]}}}{{#if:{{{cat-date|}}}
|[[{{{cat-date}}} {{#if:{{{date|}}}
|from {{{date}}}
}}]]{{#if:{{{date|}}}
|{{#ifexist:{{{cat-date}}} from {{{date}}}|
|[[Category:Articles with invalid date parameter in template]]
}}
}}
}}{{#if:{{{cat2|}}}|{{{cat2}}}}}{{#if:{{{cat-date2|}}}
|[[{{{cat-date2}}} {{#if:{{{date|}}}
|from {{{date}}}
}}]]{{#if:{{{date|}}}
|{{#ifexist:{{{cat-date2}}} from {{{date}}}|
|[[Category:Articles with invalid date parameter in template]]
}}
}}
}}{{#if:{{{cat3|}}}|{{{cat3}}}}}{{#if:{{{cat-date3|}}}
|[[{{{cat-date3}}} {{#if:{{{date|}}}
|from {{{date}}}
}}]]{{#if:{{{date|}}}
|{{#ifexist:{{{cat-date3}}} from {{{date}}}|
|[[Category:Articles with invalid date parameter in template]]
}}
}}
}}
gpikm5p2yggfosi6w5maxtx5my3u9im
Template:Flatlist
10
44066567
1073570105
958598899
2022-02-23T10:58:00Z
Xaosflux
502540
Changed protection settings for "[[Template:Flatlist]]": used in the mediawiki interface ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
<div class="hlist hlist-separated {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}|
{{{1}}}
</div>}}<noinclude></div>
{{documentation}}
</noinclude>
c8c9hiesbmhy95sd0yiemh58351exwt
Template:Further
10
1721317
852258832
827708293
2018-07-27T17:29:22Z
Galobtter
19502780
fix so that don't need [[Module:Further]] anymore
wikitext
text/x-wiki
<includeonly>{{#invoke:labelled list hatnote|labelledList|Further information{{#if:{{{topic|}}}| on {{{topic|}}}}}}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
pu1ae8is2dmdurv2yovsfwxjajnhn2s
Template:Good article
10
27528502
939628253
863019778
2020-02-07T17:41:31Z
QEDK
12460163
edit request
wikitext
text/x-wiki
{{Main other|{{Top icon
| imagename = symbol support vote.svg
| wikilink = Wikipedia:Good articles
| description = This is a good article. Click here for more information.
| id = good-star
| maincat = [[Category:Good articles]]
}}|<includeonly>{{Error|[[Template:Good article]] is only for [[Wikipedia:Good articles]].}}</includeonly>
}}<noinclude>
{{documentation}}
</noinclude>
m8vu17p3wwbgs4uztbxpdt1zpc5wbxn
Template:Google books
10
15651324
827245296
805503742
2018-02-23T16:29:55Z
Primefac
11508456
Changed protection level for "[[Template:Google books]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{#if:{{{plainurl|{{{plain-url|}}}}}}|https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}}|''[https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}} {{{2|{{{title|{{PAGENAME}}}}}}}}]''{{#if:{{{page|}}}|, p. {{{page}}},}} at [[Google Books]]}}<noinclude>{{Documentation}}</noinclude>
1a7m8ttpmk70kvk9e9gw8z2r3otlpyx
Template:IMDb name
10
942370
1025906869
1021647526
2021-05-30T08:13:34Z
GKFX
14918984
Simplify string handling
wikitext
text/x-wiki
[https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}}
| name/{{#if:{{#invoke:ustring|match|1={{{1|{{{id}}}}}}|2=^nm}}
| {{Trim|{{{1|{{{id}}}}}}}}/
| nm{{padleft:{{{1|{{{id}}}}}}|7}}/
}}
| {{#if: {{#property:P345}}
| name/{{First word|1={{#property:P345}}|sep=,}}/
| find?q={{urlencode:{{PAGENAME}}}}&s=nm
}}
}}{{#if: {{{1|}}} {{{id|}}} {{#property:P345}} | {{#switch: {{lc:{{{section|}}}}}
| award | awards = awards Awards for | biography | bio = bio Biography for
}}}} {{#if: {{{2|{{{name|}}}}}}
| {{{2|{{{name}}}}}}
| {{PAGENAMEBASE}}
}}] at [[IMDb]]<includeonly>{{#if: {{{1|{{{id|}}}}}}{{#property:P345}}
| {{EditAtWikidata|pid=P345|nbsp=yes|{{{1|{{{id|}}}}}}}}
| {{Main other|[[Category:IMDb template with no id set]]}}
}}{{#switch:{{#invoke:string2|matchAny|^nm.........|^nm.......|nm|.........|source={{{1|{{{id}}}}}}|plain=false}}
| 1 | 3 = {{Main other|[[Category:IMDb template with invalid id set]]}}{{preview warning|IMDb ID starting with ''nm'' should be followed by seven or eight digits, such as ''nm0000567'' or ''nm12345678''}}
| 4 = {{Main other|[[Category:IMDb template with invalid id set]]}}{{preview warning|IMDb ID should not contain more than eight digits}}
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
harbextsa5exnd1ykd7c9v67egzzas5
Template:ISBN
10
51604275
1062463277
1062434525
2021-12-28T16:26:32Z
Jonesey95
9755426
Undid revision 1062434525 by [[Special:Contributions/SilkTork|SilkTork]] ([[User talk:SilkTork|talk]]). see talk page
wikitext
text/x-wiki
{{#if:{{{1|<noinclude>$</noinclude>}}}|{{Catalog lookup link|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|article-link={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||{{#ifeq:{{yesno-yes|{{{link|}}}}}|no||ISBN (identifier)}}}}|article-name={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISBN}}|link-prefix=[Special:BookSources/|item-prefix={{!}}|item-postfix=]|list-leadout={{{leadout|}}}}}{{#if:{{trim|{{{1|}}}}}|{{#ifeq:{{yesno-no|{{{invalid1|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{1|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{2|}}}}}|{{#ifeq:{{yesno-no|{{{invalid2|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{2|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{3|}}}}}|{{#ifeq:{{yesno-no|{{{invalid3|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{3|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{4|}}}}}|{{#ifeq:{{yesno-no|{{{invalid4|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{4|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{5|}}}}}|{{#ifeq:{{yesno-no|{{{invalid5|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{5|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{6|}}}}}|{{#ifeq:{{yesno-no|{{{invalid6|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{6|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{7|}}}}}|{{#ifeq:{{yesno-no|{{{invalid7|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{7|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{8|}}}}}|{{#ifeq:{{yesno-no|{{{invalid8|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{8|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}{{#if:{{trim|{{{9|}}}}}|{{#ifeq:{{yesno-no|{{{invalid9|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{9|}}}|error={{error-small| Parameter error in {{tl|ISBN}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}}}}}}}}}}}}}}}}}}}|{{error-small|Parameter error in {{tl|ISBN}}: Missing [[ISBN]].}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using ISBN template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:ISBN]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | invalid1 | invalid2 | invalid3 | invalid4 | invalid5 | invalid6 | invalid7 | invalid8 | invalid9 | leadout | link | plainlink }}<noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude>
0ev67mne6uts13hevpx9fa8b6336x6t
Template:Icon
10
10964158
643803499
623318300
2015-01-23T10:29:55Z
Mr. Stradivarius
4708675
switch this to use [[Module:Icon]]
wikitext
text/x-wiki
{{#invoke:Icon|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
m4ab9noabl8v4ki5cx6t5ksjcjh5u8o
Template:In lang
10
61439969
979239482
932870444
2020-09-19T16:34:44Z
Trappist the monk
10289486
use [[Module:In lang]];
wikitext
text/x-wiki
{{#invoke:In lang|in_lang|template=in lang<noinclude>|{{CONTENTLANGUAGE}}</noinclude>}}<noinclude>
{{documentation}}
</noinclude>
szbgb2lf6rekweszdnzzmouvi00fwpl
Template:Infobox
10
891845
855069164
855063393
2018-08-15T18:33:36Z
Primefac
11508456
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
wikitext
text/x-wiki
{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
</noinclude>
f4hgwrnr11ahhwyo266vcd10dpi92pe
Template:Infobox musical artist
10
4592538
1091721513
1090441327
2022-06-05T23:54:47Z
Paine Ellsworth
9092818
per edit request on talk page - organize entries
wikitext
text/x-wiki
{{Infobox
| child = {{lc:{{{embed}}}}}
| bodyclass = vcard plainlist
| title = {{#ifeq:{{lc:{{{embed}}}}}|yes|'''Musical career'''}}
| decat = yes <!-- remove from template:infobox tracking categories -->
| abovestyle = background-color: {{Infobox musical artist/color}}; font-size: 125%;
| above = {{#ifeq:{{lc:{{{embed}}}}}|yes||{{#if:{{{Name|{{{name|{{PAGENAMEBASE}}}}}}}}|{{#if:{{{honorific_prefix|}}}|<div class="honorific-prefix" style="font-size: 78%; font-weight: normal;">{{{honorific_prefix|}}}</div>}}<div class="{{Infobox musical artist/hCard class|{{{Background|{{{background|}}}}}}}}">{{{Name|{{{name|{{PAGENAMEBASE}}}}}}}}</div>{{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}}}}{{#if:{{{honorific_suffix|}}}|<div class="honorific-suffix" style="font-size: 78%; font-weight: normal;">{{{honorific_suffix|}}}</div>}} |{{BASEPAGENAME}}}}}}
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{Img|{{{image|}}}}}}|size={{#ifeq:{{lc:{{{Landscape|{{{landscape|}}}}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{Img_size|{{{image_size}}}}}}}}|300|{{{Img_size|{{{image_size}}}}}}}}}}x200px|{{{Img_size|{{{image_size|}}}}}}}}|sizedefault=frameless|upright={{{Img_upright|{{{image_upright|1}}}}}}|title={{{Img_alt|{{{alt|{{{Img_capt|{{{caption|}}}}}}}}}}}}|alt={{{Img_alt|{{{alt|}}}}}}|suppressplaceholder=yes}}
| caption = {{{Img_capt|{{{caption|}}}}}}
| headerstyle = background-color: {{Infobox musical artist/color}}
| header1 = {{#if:{{{Img|{{{image|}}}}}}|Background information}}
| class3 = nickname
| label3 = {{Nowrap|Birth name}}
| data3 = {{{Birth_name|{{{birth_name|}}}}}}
| class4 = nickname
| label4 = {{Nowrap|Also known as}}
| data4 = {{{Alias|{{{alias|}}}}}}
| label5 = Born
| data5 = {{br separated entries|{{{birth_date|}}}|{{{birth_place|}}}}}
| label6 = Origin
| data6 = {{{Origin|{{{origin|}}}}}}
| label7 = Died
| data7 = {{br separated entries|{{{death_date|}}}|{{{death_place|}}}}}
| label8 = Genres
| data8 = {{{Genre|{{{genre|}}}}}}
| class9 = role
| label9 = {{Nowrap|{{#if:{{{Occupations|{{{occupations|}}}}}}|Occupations|Occupation(s)}}}}
| data9 = {{#if:{{{Occupations|{{{occupations|}}}}}}|{{{Occupations|{{{occupations|}}}}}}|{{{Occupation|{{{occupation|}}}}}}}}
| class10 = note
| label10 = Instruments
| data10 = {{{Instrument|{{{instrument|{{{instruments|}}}}}}}}}
| label11 = {{Nowrap|Years active}}
| data11 = {{{Years_active|{{{years_active|{{{yearsactive|}}}}}}}}}
| label12 = Labels
| data12 = {{{Label|{{{label|}}}}}}
| label13 = Member of
| data13 = {{{current_member_of|}}}
| label14 = Formerly of
| data14 = {{{past_member_of|}}}
| label15 = Spinoffs
| data15 = {{{spinoffs|}}}
| label16 = Spinoff of
| data16 = {{{spinoff_of|}}}
| label17 = <span class="nowrap">Spouse(s)</span>
| data17 = {{{spouse|{{{spouses|}}}}}}
| label18 = <span class="nowrap">Partner(s)</span>
| data18 = {{{partner|{{{partners|}}}}}}
| header19 = {{#if:{{{Current_members|{{{current_members|}}}}}}|<nowiki />}}
| label20 = Members
| data20 = {{{Current_members|{{{current_members|}}}}}}
| header21 = {{#if:{{{Past_members|{{{past_members|{{{Former_members|{{{former_members|}}}}}}}}}}}}|<nowiki />}}
| label22 = {{Nowrap|Past members}}
| data22 = {{{Past_members|{{{past_members|{{{Former_members|{{{former_members|}}}}}}}}}}}}
| label23 = Website
| data23 = {{{website|{{{URL|{{{url|}}}}}}}}}
| data60 = {{{module|}}}
| data61 = {{{module2|}}}
| data62 = {{{module3|}}}
}}<includeonly>{{#if:{{{current_members|}}}{{{past_members|}}}||{{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Mm]usical [Aa]rtists?}}{{#invoke:Is infobox in lead|main|[Ii]nfobox [Ss]inger}}{{#invoke:Is infobox in lead|main|[Ii]nfobox [Mm]usician}}{{#invoke:Is infobox in lead|main|[Ii]nfobox [Ii]nstrumentalist}}|true|{{short description|Musical artist|noreplace}}}}}}{{Main other|[[Category:Articles with hCards]]{{#invoke:Check for unknown parameters | check | unknown={{main other|[[Category:Pages using Template:Infobox musical artist with unknown parameters|_VALUE_]]}}| preview = Page using [[Template:Infobox musical artist]] with unknown parameter "_VALUE_"|ignoreblank=y | current_member_of | embed | honorific_prefix | Name | name | honorific_suffix | Img | image | Landscape | landscape | Img_size | image_size | image_upright | Img_upright | Img_alt | alt | Img_capt | caption | native_name | native_name_lang | Birth_name | birth_name | Alias | alias | birth_date | birth_place | Origin | origin | death_date | death_place | Genre | genre | Occupations | occupations | Occupation | occupation | Instrument | instrument | instruments | Years_active | years_active | yearsactive | Label | label | website | URL | url | Current_members | current_members | Past_members | past_members | past_member_of | Former_members | former_members | spinoff_of | spinoffs | module | module2 | module3 | Background | background | Associated_acts | associated_acts | spouse | spouses | partner | partners }}}}<!-- Associated acts tracking-->{{#if:{{{Associated_acts|{{{associated_acts|}}}}}}|[[Category:Pages using infobox musical artist with associated acts]]}}</includeonly><noinclude>
{{Documentation}}
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
</noinclude>
enx4utorahgj1682din4zktl1oaq1b9
Template:Infobox musical artist/color
10
4920565
1024589700
577829446
2021-05-23T01:54:23Z
Jonesey95
9755426
re-disable coloring per [[MOS:COLOR]] accessibility guideline and discussion at talk page
wikitext
text/x-wiki
<includeonly>{{#switch: {{{1|}}}
<!--| solo_singer = #f0e68c <!-- khaki -->
<!--| non_vocal_instrumentalist = #f4bf92 <!-- unnamed pale orange -->
<!--| non_performing_personnel = #bfe0bf <!-- unnamed pale green -->
<!--| group_or_band = #b0c4de <!-- lightsteelblue -->
<!--| classical_ensemble = #b0e0e6 <!-- PowderBlue -->
<!--| temporary = #d3d3d3 <!-- LightGrey -->
| #b0c4de
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
kcgyulc67wbtjbcj6u63cebetyf5gpb
Template:Infobox musical artist/hCard class
10
10891410
1091727381
578078381
2022-06-06T00:41:07Z
Paine Ellsworth
9092818
per edit request on talk page - include variant "person"
wikitext
text/x-wiki
{{#switch: {{{1|}}}
| person
| solo_singer
| non_vocal_instrumentalist
| non_performing_personnel = fn
| group_or_band
| cover_band
| classical_ensemble
| temporary = fn org
| {{{1|fn}}}
}}<!-- "fn" for individual people, "fn org" for bands and other groupings) --><noinclude>
{{documentation}}
</noinclude>
rlz9gi7dd1w8x4ims7z92vbvj1tio5g
Template:Iron Maiden
10
2341566
1065393323
1046147351
2022-01-13T09:17:29Z
Muhandes
5630772
avoid redirects in nav template
wikitext
text/x-wiki
{{Navbox musical artist
| name = Iron Maiden
| title = [[Iron Maiden]]
| bodyclass = hlist
| state = {{{state<includeonly>|collapsed</includeonly>}}}
| background = group_or_band
| above =
* '''[[Steve Harris (musician)|Steve Harris]]'''
* '''[[Dave Murray (musician)|Dave Murray]]'''
* '''[[Adrian Smith]]'''
* '''[[Bruce Dickinson]]'''
* '''[[Nicko McBrain]]'''
* '''[[Janick Gers]]'''
* [[Doug Sampson]]
* [[Paul Di'Anno]]
* [[Dennis Stratton]]
* [[Clive Burr]]
* [[Blaze Bayley]]
| group1 = Studio albums
| list1 =
* ''[[Iron Maiden (album)|Iron Maiden]]''
* ''[[Killers (Iron Maiden album)|Killers]]''
* ''[[The Number of the Beast (album)|The Number of the Beast]]''
* ''[[Piece of Mind]]''
* ''[[Powerslave]]''
* ''[[Somewhere in Time (Iron Maiden album)|Somewhere in Time]]''
* ''[[Seventh Son of a Seventh Son]]''
* ''[[No Prayer for the Dying]]''
* ''[[Fear of the Dark (Iron Maiden album)|Fear of the Dark]]''
* ''[[The X Factor (album)|The X Factor]]''
* ''[[Virtual XI]]''
* ''[[Brave New World (Iron Maiden album)|Brave New World]]''
* ''[[Dance of Death (album)|Dance of Death]]''
* ''[[A Matter of Life and Death (album)|A Matter of Life and Death]]''
* ''[[The Final Frontier]]''
* ''[[The Book of Souls]]''
* ''[[Senjutsu (album)|Senjutsu]]''
| group2 = Live albums
| list2 =
* ''[[Live After Death]]''
* ''[[A Real Live One]]''
* ''[[A Real Dead One]]''
* ''[[Live at Donington (Iron Maiden album)|Live at Donington]]''
* ''[[Maiden England]]''
* ''[[A Real Live Dead One]]''
* ''[[Rock in Rio (album)|Rock in Rio]]''
* ''[[BBC Archives (album)|BBC Archives]]''
* ''[[Beast over Hammersmith]]''
* ''[[Death on the Road]]''
* ''[[Iron Maiden: Flight 666|Flight 666]]''
* ''[[En Vivo! (Iron Maiden album)|En Vivo!]]''
* ''[[The Book of Souls: Live Chapter]]''
* ''[[Nights of the Dead|Nights of the Dead: Live in Mexico City]]''
| group3 = Compilations
| list3 =
* ''[[Best of the Beast]]''
* ''[[Ed Hunter]]''
* ''[[Best of the 'B' Sides]]''
* ''[[Edward the Great]]''
* ''[[The Essential Iron Maiden]]''
* ''[[Somewhere Back in Time]]''
* ''[[From Fear to Eternity (album)|From Fear to Eternity]]''
| group4 = Box sets
| list4 =
* ''[[The First Ten Years (box set)|The First Ten Years]]''
* ''[[Eddie's Head]]''
* ''[[Eddie's Archive]]''
| group5 = Extended plays
| list5 =
* ''[[The Soundhouse Tapes]]''
* ''[[Live!! +one]]''
* ''[[Maiden Japan]]''
* ''[[No More Lies (EP)|No More Lies]]''
| group6 = Singles
| list6 =
* "[[Running Free]]"
* "[[Sanctuary (Iron Maiden song)|Sanctuary]]"
* "[[Women in Uniform]]"
* "[[Twilight Zone (Iron Maiden song)|Twilight Zone]]"
* "[[Purgatory (song)|Purgatory]]"
* "[[Run to the Hills]]"
* "[[The Number of the Beast (song)|The Number of the Beast]]"
* "[[Flight of Icarus]]"
* "[[The Trooper]]"
* "[[2 Minutes to Midnight]]"
* "[[Aces High (song)|Aces High]]"
* "[[Wasted Years]]"
* "[[Stranger in a Strange Land (Iron Maiden song)|Stranger in a Strange Land]]"
* "[[Can I Play with Madness]]"
* "[[The Evil That Men Do (song)|The Evil That Men Do]]"
* "[[The Clairvoyant (song)|The Clairvoyant]]"
* "[[Infinite Dreams]]"
* "[[Holy Smoke (song)|Holy Smoke]]"
* "[[Bring Your Daughter... to the Slaughter]]"
* "[[Be Quick or Be Dead]]"
* "[[From Here to Eternity (Iron Maiden song)|From Here to Eternity]]"
* "[[Wasting Love]]"
* "[[Fear of the Dark (song)|Fear of the Dark]]"
* "[[Hallowed Be Thy Name (song)|Hallowed Be Thy Name]]"
* "[[Man on the Edge]]"
* "[[Lord of the Flies (song)|Lord of the Flies]]"
* "[[Virus (Iron Maiden song)|Virus]]"
* "[[The Angel and the Gambler]]"
* "[[Futureal]]"
* "[[The Wicker Man (song)|The Wicker Man]]"
* "[[Out of the Silent Planet (song)|Out of the Silent Planet]]"
* "[[Wildest Dreams (Iron Maiden song)|Wildest Dreams]]"
* "[[Rainmaker (Iron Maiden song)|Rainmaker]]"
* "[[The Reincarnation of Benjamin Breeg]]"
* "[[Different World (Iron Maiden song)|Different World]]"
* "[[El Dorado (song)|El Dorado]]"
* "[[Satellite 15... The Final Frontier]]"
* "[[Speed of Light (Iron Maiden song)|Speed of Light]]"
* "[[Empire of the Clouds]]"
* "[[The Writing on the Wall (Iron Maiden song)|The Writing On The Wall]]"
<!-- Do not add Writing on the Wall until there's an article. The purpose of navboxes are to navigate to ARTICLES not be a complete list -->
| group7 = Video albums
| list7 =
* ''[[Live at the Rainbow]]''
* ''[[Video Pieces]]''
* ''[[Behind the Iron Curtain (video)|Behind the Iron Curtain]]''
* ''[[Live After Death]]''
* ''[[12 Wasted Years]]''
* ''[[Maiden England]]''
* ''[[The First Ten Years: The Videos|The First Ten Years (From There to Eternity)]]''
* ''[[Live at Donington (Iron Maiden album)|Donington Live 1992]]''
* ''[[Raising Hell (video)|Raising Hell]]''
* ''[[Classic Albums: Iron Maiden – The Number of the Beast]]''
* ''[[Rock in Rio (album)|Rock in Rio]]''
* ''[[Visions of the Beast]]''
* ''[[The History of Iron Maiden – Part 1: The Early Days]]''
* ''[[Death on the Road]]''
* ''[[Iron Maiden: Flight 666|Flight 666]]''
* ''[[En Vivo! (Iron Maiden album)|En Vivo!]]''
* ''[[The Book of Souls: Live Chapter]]''
| group8 = [[List of Iron Maiden concert tours|Tours]]
| list8 =
* [[Metal for Muthas Tour]]
* [[Iron Maiden Tour]]
* [[Killer World Tour]]
* [[The Beast on the Road]]
* [[World Piece Tour]]
* [[World Slavery Tour]]
* [[Somewhere on Tour]]
* [[Seventh Tour of a Seventh Tour]]
* [[No Prayer on the Road]]
* [[Fear of the Dark Tour]]
* [[Real Live Tour]]
* [[The X Factour]]
* [[Virtual XI World Tour]]
* [[The Ed Hunter Tour]]
* [[Brave New World Tour]]
* [[Dance of Death World Tour]]
* [[Eddie Rips Up the World Tour]]
* [[A Matter of Life and Death Tour]]
* [[Somewhere Back in Time World Tour]]
* [[The Final Frontier World Tour]]
* [[Maiden England World Tour]]
* [[The Book of Souls World Tour]]
* [[Legacy of the Beast World Tour]]
| group9 = Related articles
| list9 =
* [[Iron Maiden discography|Discography]]
* [[List of songs recorded by Iron Maiden|Songs]]
* [[List of awards and nominations received by Iron Maiden|Awards and nominations]]
* [[List of Iron Maiden band members|Band members]]
* [[Eddie (Iron Maiden)|Eddie]]
* [[List of Iron Maiden tribute albums|Tribute albums]]
* [[Urchin (band)|Urchin]]
* [[Psycho Motel]]
* [[Samson (band)|Samson]]
* [[The Entire Population of Hackney]]
* [[The Iron Maidens]]
* [[Derek Riggs]]
* [[Rod Smallwood]]
* [[Andy Taylor (music entrepreneur)|Andy Taylor]]
| below =
* {{Icon|Category}} '''[[:Category:Iron Maiden (band)|Category]]'''
}}<noinclude>
{{collapsible option}}
[[Category:United Kingdom heavy metal musical group navigational boxes]]
</noinclude>
q98hvclkb4fyaiwuf53hribh9q70xcr
Template:Listen
10
1489759
846120847
611334265
2018-06-16T13:14:35Z
Nardog
5908908
includeonly
wikitext
text/x-wiki
<includeonly>{{#invoke:Listen|main}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
hrgupcux3r81j1cr9hj6di8wz9bpl12
Template:MONTHNAME
10
4858813
961873067
961872994
2020-06-10T21:21:03Z
Primefac
11508456
Reverted edits by [[Special:Contribs/Primefac|Primefac]] ([[User talk:Primefac|talk]]) to last version by Jo-Jo Eumerus
wikitext
text/x-wiki
<includeonly>{{#if:{{{1|}}}|{{#switch:{{MONTHNUMBER|{{{1}}}}}|1=January|2=February|3=March|4=April|5=May|6=June|7=July|8=August|9=September|10=October|11=November|12=December|Incorrect required parameter 1=''month''!}}|Missing required parameter 1=''month''!}}</includeonly><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
4cf5sge5nt8b4gwjre9u8yifa3kstt2
Template:MONTHNUMBER
10
4859929
874163611
388698933
2018-12-17T15:25:23Z
Amorymeltzer
141948
Changed protection level for "[[Template:MONTHNUMBER]]": Allow template editor access, see [[Template:MONTHNAME]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#if:{{{1|}}}
|{{#switch:{{lc:{{{1}}}}}
|january|jan=1
|february|feb=2
|march|mar=3
|apr|april=4
|may=5
|june|jun=6
|july|jul=7
|august|aug=8
|september|sep|sept=9
|october|oct=10
|november|nov=11
|december|dec=12
|{{#ifexpr:{{{1}}}<0
|{{#ifexpr:(({{{1}}})round 0)!=({{{1}}})
|{{#expr:12-(((0.5-({{{1}}}))round 0)mod 12)}}
|{{#expr:12-(((11.5-({{{1}}}))round 0)mod 12)}}
}}
|{{#expr:(((10.5+{{{1}}})round 0)mod 12)+1}}
}}
}}
|Missing required parameter 1=''month''!
}}</includeonly><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
mqnyq8bnd6mmrrl70a3uwqgeo8aevfc
Template:Main
10
1208356
1054074732
1050142713
2021-11-07T22:34:09Z
Nihiltres
236191
Includeonly the template to avoid errors on the template pages
wikitext
text/x-wiki
<includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
hz9saa715ercns6m73a0a1ud2ptzt26
Template:Main other
10
17220251
1059626360
388689011
2021-12-10T16:08:06Z
Xaosflux
502540
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:0}}
| main
| other
}}
}}
| main = {{{1|}}}
| other
| #default = {{{2|}}}
}}<noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
fqcj40f1ojeitvtz4m2eefrp1ymhi6o
Template:N/a
10
2499787
1095771597
951497955
2022-06-30T08:11:57Z
Primefac
11508456
per RFC, replacing "N/A" with "—"
wikitext
text/x-wiki
{| class="wikitable"
|-
| <onlyinclude>data-sort-value="{{{sort|}}}" style="background: #ececec; color: #2C2C2C; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!--
-->| {{{1|—}}}</onlyinclude>
|}
{{documentation}}
pyzwk8b0ado0tqa7sqf5jznj6g7v4we
Template:Navbox
10
995954
1030560841
1030560775
2021-06-26T18:05:09Z
Trialpears
35786750
Remove TfD notice as it wouldn't involve any changes to this template.
wikitext
text/x-wiki
<includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
tqodcaa2vvhehqaod229udlla0wimek
Template:Navbox musical artist
10
13594145
635989132
577849899
2014-11-30T04:59:56Z
Jackmcbarn
19285809
pass blank name if not given
wikitext
text/x-wiki
{{Navbox
|name = {{{name|}}}
|state = {{{state|autocollapse}}}
|navbar = {{{navbar|}}}
|title = {{{title|}}}
|border = {{{border|}}}
|titlestyle = background: {{Navbox musical artist/color|{{{background|}}}}};
|bodystyle = {{{bodystyle|}}}
|liststyle = {{{liststyle|}}}
|groupstyle = background: #EEEEEE; {{{groupstyle|}}}
|abovestyle = background: #EEEEEE; {{{abovestyle|}}}
|belowstyle = background: #EEEEEE; {{{belowstyle|}}}
|groupwidth = {{{groupwidth|}}}
|evenodd = {{{evenodd|}}}
|bodyclass = vcard {{{bodyclass|}}}
|titleclass = {{Infobox musical artist/hCard class|{{{background|}}}}}
|listclass = {{{listclass|}}}
|aboveclass = {{{aboveclass|}}}
|belowclass = {{{belowclass|}}}
|above = {{{above|}}}
|group1 = {{{group1|}}}
|list1 = {{{list1|}}}
|group2 = {{{group2|}}}
|list2 = {{{list2|}}}
|group3 = {{{group3|}}}
|list3 = {{{list3|}}}
|group4 = {{{group4|}}}
|list4 = {{{list4|}}}
|group5 = {{{group5|}}}
|list5 = {{{list5|}}}
|group6 = {{{group6|}}}
|list6 = {{{list6|}}}
|group7 = {{{group7|}}}
|list7 = {{{list7|}}}
|group8 = {{{group8|}}}
|list8 = {{{list8|}}}
|group9 = {{{group9|}}}
|list9 = {{{list9|}}}
|group10 = {{{group10|}}}
|list10 = {{{list10|}}}
|group11 = {{{group11|}}}
|list11 = {{{list11|}}}
|group12 = {{{group12|}}}
|list12 = {{{list12|}}}
|group13 = {{{group13|}}}
|list13 = {{{list13|}}}
|group14 = {{{group14|}}}
|list14 = {{{list14|}}}
|group15 = {{{group15|}}}
|list15 = {{{list15|}}}
|group16 = {{{group16|}}}
|list16 = {{{list16|}}}
|group17 = {{{group17|}}}
|list17 = {{{list17|}}}
|group18 = {{{group18|}}}
|list18 = {{{list18|}}}
|group19 = {{{group19|}}}
|list19 = {{{list19|}}}
|group20 = {{{group20|}}}
|list20 = {{{list20|}}}
|below = {{{below|}}}
}}<noinclude>
{{Documentation}}
</noinclude>
n1hjwby2cdb2as8hj0hw4nlo4zwrote
Template:Navbox musical artist/color
10
13716067
577828603
388733779
2013-10-19T10:49:32Z
WOSlinker
3138265
Changed protection level of Template:Navbox musical artist/color: allow template editors to modify ([Edit=Protected template] (indefinite) [Move=Protected template] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#switch: {{{1|}}}
| solo_singer = #f0e68c <!-- khaki -->
| non_vocal_instrumentalist = #f4bf92 <!-- unnamed pale orange -->
| non_performing_personnel = #bfe0bf <!-- unnamed pale green -->
| group_or_band = #b0c4de <!-- lightsteelblue -->
| cover_band = #d8bfd8 <!-- Thistle -->
| classical_ensemble = #b0e0e6 <!-- PowderBlue -->
| temporary = #d3d3d3 <!-- LightGrey -->
| {{{1|#a9a9a9}}}
}}</includeonly><noinclude>
{{documentation}}
</noinclude>
01ykafqmdap0soutxnn6gu951j3hjph
Template:Not a typo
10
20047488
827251058
498530777
2018-02-23T17:02:47Z
Primefac
11508456
Changed protection level for "[[Template:Not a typo]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{Sic|hide=y|{{{1|}}}|{{{2|}}}}}<noinclude>
{{Documentation}}
</noinclude>
d4y0ndx3mj670wntrrvffbdbw78fn6p
Template:Notatypo
10
36702153
1048396832
853987191
2021-10-05T19:26:51Z
MusikBot II
29539620
Protected "[[Template:Notatypo]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 333 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
wikitext
text/x-wiki
#REDIRECT [[Template:Not a typo]]
flthd54fee9u48t9ezw632s2a72okqm
Template:Nowrap
10
1627975
692794261
462345338
2015-11-28T10:13:53Z
Edokter
1624037
Adapt comment; edits inside noinclude blocks should not affect job queue, but won't kill parser either way.
wikitext
text/x-wiki
<span class="nowrap">{{{1}}}</span><noinclude>
{{documentation}}
<!-- Categories go on the /doc page; interwikis go to Wikidata. -->
</noinclude>
avb5tcymgupik1ikutqclidkj9tnitx
Template:Ns has subpages
10
22589696
1074822270
637438114
2022-03-02T10:43:18Z
Trialpears
35786750
Changed protection settings for "[[Template:Ns has subpages]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
0pg457y46td6p53rdt8tyc76jeg9pa8
Template:OCLC
10
6952153
951729583
800876292
2020-04-18T15:41:51Z
Matthiaspaul
13467261
deliberately going through (identifier) redirect for consistency with CS1 citation templates and to improve reverse lookup functionality
wikitext
text/x-wiki
{{Catalog lookup link|{{{oclc|{{{1|}}}}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|article-link=OCLC (identifier)|article-name=OCLC|link-prefix=https://www.worldcat.org/oclc/|list-leadout={{{leadout|}}}|link-postfix={{#if:{{{show|}}}|/editions}}|item-postfix={{#if:{{{show|}}}| ({{#ifeq:{{{show|}}}|all|all editions|{{{show|}}}}})}}}}<noinclude>
{{documentation}}
</noinclude>
tdqpno4mvt3q5deezn3vrnqfmfegefp
Template:Official website
10
7233408
902535586
902535560
2019-06-19T14:01:14Z
Xaosflux
502540
<!--Forceupdate-->
wikitext
text/x-wiki
<includeonly>{{#invoke:Official website|main}}{{#invoke:Check for unknown parameters|check|showblankpositional=1|unknown={{main other|1=[[Category:Pages using Official website with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Official website]] with unknown parameter "_VALUE_"|1|2|URL|url|mobile|name|format}}</includeonly><!--
--><noinclude>{{documentation}}</noinclude>
aekbcyqrxstb5s7tfcs53jvav61stmt
Template:PAGENAMEBASE
10
29780699
708575225
636280634
2016-03-06T09:37:56Z
Cabayi
6561336
per edit request & discussion
wikitext
text/x-wiki
{{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude>
{{documentation}}
</noinclude>
sam8aetb68ekom4findu6pp900ngldr
Template:Pagelist
10
4472403
810671221
810671155
2017-11-16T18:39:52Z
Paine Ellsworth
9092818
srv
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:pagelist|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
oaokru398r39bas7j5c87x84xw47qud
Template:Pagetype
10
23143954
616197024
580855388
2014-07-09T08:29:38Z
Callanecc
10440891
Changed protection level of Template:Pagetype: [[WP:High-risk templates|Highly visible template]]: With more than 5.5 million transclusions and cascade protections this should be full protected as well ([Edit=Allow only administrators] (indefinite) [Move=
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
lljnsh3xa96oyrio8us1qbonct9sq7b
Template:Refbegin
10
9391283
1054258436
999372035
2021-11-09T00:30:45Z
Izno
2927383
-refbegin-100, see styles page history for rationale
wikitext
text/x-wiki
<includeonly><templatestyles src="Refbegin/styles.css" /><!--
--><div class="refbegin <!--
-->{{#if: {{{indent|}}} | refbegin-hanging-indents }} <!--
-->{{#if: {{{1|}}}
| refbegin-columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
| references-column-width
| references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
| {{#if: {{{colwidth|}}}
| references-column-width }} }}" style="<!--
-->{{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
| column-width: {{#if:1|{{{1|30em}}}}}
| column-count: {{#if:1|{{{1}}}}}; }}
| {{#if: {{{colwidth|}}}
| column-width: {{{colwidth|30em}}} }} }}"></includeonly><noinclude>
{{Documentation}}
</noinclude>
phti1gd1af94q1ec12mn1uqky2cbl6p
Template:Refbegin/styles.css
10
58037900
1054258005
1011217839
2021-11-09T00:27:00Z
Izno
2927383
-.refbegin-100, used in just 100 of 200k articles. suitable alternative at [[template:Div col]]
sanitized-css
text/css
/* {{pp-template}} */
.refbegin {
font-size: 90%;
margin-bottom: 0.5em;
}
.refbegin-hanging-indents > ul {
margin-left: 0;
}
.refbegin-hanging-indents > ul > li {
margin-left: 0;
padding-left: 3.2em;
text-indent: -3.2em;
}
.refbegin-hanging-indents ul,
.refbegin-hanging-indents ul li {
list-style: none;
}
@media (max-width: 720px) {
.refbegin-hanging-indents > ul > li {
padding-left: 1.6em;
text-indent: -1.6em;
}
}
.refbegin-columns {
margin-top: 0.3em;
}
/* Reset top margin for lists embedded in columns */
.refbegin-columns ul {
margin-top: 0;
}
/* Avoid elements breaking between columns */
.refbegin-columns li {
page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
break-inside: avoid-column;
}
4q8lm27loa8oa0mutzhmgc4bt8d7qlg
Template:Refend
10
10023179
792167400
772120878
2017-07-24T21:40:56Z
WOSlinker
3138265
remove </dl> since no <dl> in Template:Refbegin
wikitext
text/x-wiki
<includeonly></div></includeonly><noinclude>
{{template doc|Template:refbegin/doc}}
{{TemplateDataHeader}}
<templatedata>
{
"description": "Ends a reference lists started by {{refbegin}}.",
"params": {
}
}
</templatedata>
</noinclude>
kcrxzrf6v4rvbl0yhnfcb5labufpnsp
Template:Reflist
10
7585648
1092654215
1011094246
2022-06-11T17:42:16Z
Izno
2927383
correct my error per [[Template talk:Reflist#liststyle and group]]
wikitext
text/x-wiki
<templatestyles src="Reflist/styles.css" /><div class="reflist <!--
-->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!--
-->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!--
-->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class
-->{{#if: {{{1|}}}<!-- start style -->
| {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}}
| {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}}
}}>
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#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 }}<noinclude>
{{Documentation}}
</noinclude>
geeeydvb5368tzzflcyuzs20a5hlnbz
Template:Reflist/styles.css
10
66126274
1011085734
1010048464
2021-03-08T23:00:26Z
Izno
2927383
Changed protection level for "[[Template:Reflist/styles.css]]": match parent ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
sanitized-css
text/css
/* {{pp|small=yes}} */
/* can we remove the font size declarations? .references gets a font-size in
* common.css that is always 90, and there is nothing else in reflist out in
* the wild. May affect column sizes.
*/
.reflist {
font-size: 90%; /* Default font-size */
margin-bottom: 0.5em;
list-style-type: decimal;
}
.reflist .references {
font-size: 100%; /* Reset font-size when nested in div.reflist */
margin-bottom: 0; /* Avoid double margin when nested in div.reflist */
list-style-type: inherit; /* Enable custom list style types */
}
/* columns-2 and columns-3 are legacy for "2 or more" column view from when the
* template was implemented with column-count.
*/
.reflist-columns-2 {
column-width: 30em;
}
.reflist-columns-3 {
column-width: 25em;
}
/* Reset top margin for lists embedded in columns */
.reflist-columns {
margin-top: 0.3em;
}
.reflist-columns ol {
margin-top: 0;
}
/* Avoid elements breaking between columns */
.reflist-columns li {
page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
break-inside: avoid-column;
}
.reflist-upper-alpha {
list-style-type: upper-alpha;
}
.reflist-upper-roman {
list-style-type: upper-roman;
}
.reflist-lower-alpha {
list-style-type: lower-alpha;
}
.reflist-lower-greek {
list-style-type: lower-greek;
}
.reflist-lower-roman {
list-style-type: lower-roman;
}
9pglv18rwto8wyb2wiymxh52wdd5ut0
Template:SDcat
10
64752604
971699885
971165861
2020-08-07T18:02:31Z
MusikBot II
29539620
Protected "[[Template:SDcat]]": [[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))
wikitext
text/x-wiki
<includeonly>{{#invoke:SDcat |setCat}}</includeonly><noinclude>
{{documentation}}
</noinclude>
gejktck2ca8vfelabmrprhfecoxzlpi
Template:Sfn
10
23092408
1000405995
1000116676
2021-01-14T23:46:10Z
Jonesey95
9755426
add undocumented "ignore-err" (which should be "ignore-error", no?) to error check per a note on my talk page
wikitext
text/x-wiki
<includeonly>{{#invoke:Footnotes|sfn|template=sfn}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using sfn with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Sfn]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | ignore-err | loc | p | page | pages | postscript | pp | ps | ref | Ref }}<noinclude>
{{documentation}}
</noinclude>
rf0flsau14dh7x1y90pgyjzzmg34yvn
Template:SfnRef
10
25072600
965983067
958078171
2020-07-04T15:54:11Z
Ahecht
2016996
safesubst<noinclude />:
wikitext
text/x-wiki
{{safesubst<noinclude />:#invoke:Footnotes|sfnref}}<noinclude>
{{documentation}}
</noinclude>
a5bwsbkzmzfw9xjrhfy0ur5p5priatn
Template:Sfnm
10
31274609
947692202
855191665
2020-03-27T22:18:25Z
Trappist the monk
10289486
+template;
wikitext
text/x-wiki
<includeonly>{{#invoke:Footnotes|sfnm|template=sfnm}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
30eu4d1lwkb49nkua2fvoy409c5paxk
Template:Short description
10
55686718
1071437311
1066790170
2022-02-12T16:33:32Z
ToBeFree
16759563
Changed protection settings for "[[Template:Short description]]": 4 million transclusions ([[WP:HRT]]) ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
{{#ifeq:{{lc:{{{1|}}}}}|none|<nowiki /><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description{{#ifeq:{{{pagetype}}}|Disambiguation pages|s}}]]</includeonly><!-- Start tracking
-->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!--
-->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!--
-->{{Short description/lowercasecheck|{{{1|}}}}}<!--
-->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude>
{{Documentation}}
</noinclude>
t36h9ek56znujq09ne6dfagkel1cjk9
Template:Short description/lowercasecheck
10
69815941
1071437571
1071316119
2022-02-12T16:35:05Z
ToBeFree
16759563
Changed protection settings for "[[Template:Short description/lowercasecheck]]": 4 million transclusions, through [[Template:Short description]] ([[WP:HRT]]) ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
{{#ifeq:<!--test first character for lower-case letter-->{{#invoke:string|find|1={{{1|}}}|2=^%l|plain=false}}|1
|<!-- first character is a lower case letter; test against whitelist
-->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist-->
|c. <!--for circa-->
|gTLD
|iMac
|iOS
|iOS,
|iPad
|iPhone
|iTunes
|macOS
|none
|pH
|pH-dependent=<!-- end whitelist; short description starts with an allowed lower-case string; whitelist matched; do nothing -->
|#default=<!-- apply category to track lower-case short descriptions -->{{main other|[[Category:Pages with lower-case short description|{{trim|{{{1|}}}}}]]}}{{Testcases other|{{red|CATEGORY APPLIED}}}}<!-- end whitelist test -->}}
|<!-- short description does not start with lower-case letter; do nothing; end lower-case test -->
}}<noinclude>
{{documentation}}
</noinclude>
i1e9w8d3rdcgxtws9nvbvfopq7y0nnk
Template:Sic
10
3023388
1048579484
1048564132
2021-10-06T19:51:08Z
Izno
2927383
Undid revision 1048564132 by [[Special:Contributions/Matthiaspaul|Matthiaspaul]] ([[User talk:Matthiaspaul|talk]]) no consensus that _anything_ needs to change in related discussion
wikitext
text/x-wiki
<!--
Display the first two default parameters unless ?
-->{{#ifeq:{{{1|?}}}|?|{{{2|}}}{{{3|}}}|{{{1|}}}{{{2|}}}}}<!--
Display options for [sic] linked, unlinked(default) or hidden.
-->{{#if:{{{hide|}}}|| [''{{#if:{{{nolink|}}}|sic|[[sic]]}}{{#ifeq:{{{1|}}}|?|?}}'']}}<!--
Categorisation options. Currently disabled - see [[Help talk:CS1 errors/Archive 1#%7B%7Bsic%7C?%7Cnolink=y%7D%7D]]
--><!--{{#ifeq:{{{1|}}}|?|{{#if:{{NAMESPACE}}||[[Category:Articles containing possible transcription errors]]}}}}--><noinclude>
{{documentation}}
</noinclude>
nmckqd1k8235nre979wktgk46j39hjs
Template:Side box
10
20504849
774482268
611333719
2017-04-08T19:24:23Z
Jo-Jo Eumerus
17449355
Changed protection level for "[[Template:Side box]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{#invoke:Side box|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
s1zpy5c500y28mjgve7gykq14088u4e
Template:Sister project
10
20505184
1033204932
1015416647
2021-07-12T07:41:36Z
Uzume
51070
pass 'textclass' and 'textstyle' params
wikitext
text/x-wiki
{{Side box
| metadata=no
| position = {{{position|}}}
| image =
{{#switch: {{{image|}}}
| none = <!-- "image=none", do nothing -->
| = <!-- No image fed, select an image -->
[[File:{{#switch: {{lc: {{{project|}}} }}
| commons = Commons-logo.svg
| meta|metawiki|m = Wikimedia Community Logo.svg
| wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg
| wikidata|data = Wikidata-logo.svg
| wikiquote|quote|wqt|q = Wikiquote-logo.svg
| wikipedia|wp|w = Wikipedia-logo-v2.svg
| wikisource|source|ws|s = Wikisource-logo.svg
| wiktionary|wkt|wdy|d = Wiktionary-logo-en-v2.svg
| wikinews|news|wnw|n = Wikinews-logo.svg
| wikispecies|species = Wikispecies-logo.svg
| wikiversity|wvy|v = Wikiversity logo 2017.svg
| wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg
| mediawiki|mw = MediaWiki-2020-icon.svg
| outreachwiki|outreach = Wikimedia Outreach.png
| incubator = Incubator-notext.svg
| #default = Wikimedia-logo.svg
}}|40x40px|class=noviewer|alt=|link=
]]
| #default = {{{image|}}}
}}
| textclass = {{{textclass|plainlist}}}
| textstyle = {{{textstyle|}}}
| text = {{{text}}}
| below = {{{below|}}}
| imageright = {{{imageright|}}}
| class = plainlinks sistersitebox
}}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
8xj4znh9zge3vfvmy1745bkgpe5h4v4
Template:Small
10
2385304
1066167302
1064748786
2022-01-17T03:43:07Z
Explicit
4842600
[[Wikipedia:Templates for discussion/Log/2022 January 10#Template:Smaller]] closed as merge ([[WP:XFDC#4.0.12|XFDcloser]])
wikitext
text/x-wiki
<span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude>
{{Documentation}}<!--Categories and interwikis go in the /doc sub-page.-->
</noinclude>
dvonxxvea06kvln677gbl2xk9rrnlog
Template:Template link
10
1487430
1014201710
1012903429
2021-03-25T19:03:22Z
Izno
2927383
[[Wikipedia:Templates for discussion/Log/2021 March 18#Template:Tlu]] closed as keep ([[WP:XFDC#4.0.11|XFDcloser]])
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
rf3qx5cilaxlnjqq9fivevkah92ncil
Template:Template other
10
21418395
874062289
774731050
2018-12-16T22:06:25Z
Amorymeltzer
141948
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))
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
| template
| other
}}
}}
| template = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
0tcssjmltwl7y5v3f5wj2kqciaabqly
Template:Tl
10
66733012
1006436965
2021-02-12T22:03:00Z
Anthony Appleyard
119438
Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move
wikitext
text/x-wiki
#REDIRECT [[Template:Template link]]
{{Redirect category shell|
{{R from move}}
}}
p1dn3i2ckb7gtckkrbn0xh6ckx8nei1
Template:Top icon
10
20101811
942260845
828918653
2020-02-23T16:39:35Z
Wbm1058
14383484
fix for issue described at [[Template talk:Top icon#Description non-functional?]] – see [[mw:Help:Parser functions in templates#Testing and passing undefined parameters]] for syntax documentation
wikitext
text/x-wiki
<includeonly><nowiki /><!-- This nowiki tag helps prevent whitespace at the top of articles. -->{{#tag:indicator|[[File:{{{image|{{{imagename|{{{1|}}}}}}}}}|{{#if:{{{width|}}}|{{{width}}}|20}}x{{#if:{{{height|}}}|{{{height}}}|20}}px
|{{#ifeq:{{{link|+}}}|{{{link|-}}}|link={{{link}}}|{{#ifeq:{{{wikilink|+}}}|{{{wikilink|-}}}|link={{{wikilink}}}|{{#ifeq:{{{2|+}}}|{{{2|-}}}|link={{{2}}}|}}}}}}
|{{#if:{{{alt|}}}|alt={{{alt}}}}}
|{{{text|{{{description|{{{3|}}}}}}}}}]]
|name = {{#if:{{{sortkey|}}}|{{{sortkey}}}-}}{{#if:{{{name|}}}|{{{name}}}|{{#if:{{{id|}}}|{{{id}}}|{{{image|{{{imagename|{{{1|}}}}}}}}}}}}}}}{{Category handler
|user = {{{usercat|}}}
|main = {{{maincat|}}}
|subpage = {{{subpage|no}}}
|nocat = {{{nocat|}}}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
3pz7t9waxgoej64nbdqmj8ho770i7na
Template:Trim
10
21815705
1028359514
668935791
2021-06-13T14:06:25Z
Plastikspork
5075409
Fix for |=foo bug
wikitext
text/x-wiki
<includeonly>{{safesubst:#if:1|{{{x|{{{1|}}}}}}}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
14wjdl1oebgpc4d7v8plj06vowkoodf
Template:URL
10
811789
926680896
907988472
2019-11-18T00:50:36Z
Jonesey95
9755426
Adding unknown parameter tracking through [[:Category:Pages using URL template with unknown parameters]] using [[Module:check for unknown parameters]]
wikitext
text/x-wiki
<includeonly>{{#invoke:URL|url}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using URL template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:URL]] with unknown parameter "_VALUE_"|ignoreblank=y | 1 | 2 }}<noinclude>{{documentation}}</noinclude>
a3iaiir0mhs0y2mdlkbw2snyhxnxqwu
Template:Use dmy dates
10
21044097
1073416164
930735233
2022-02-22T16:24:28Z
Frietjes
13791031
fix |=February 2022 bug (see https://en.wikipedia.org/w/index.php?title=Night_of_the_Pencils_(film)&type=revision&diff=1073091061&oldid=1067523640 which transcluded [[Template:February 2022]])
wikitext
text/x-wiki
{{ <includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B=
{{DMCA|Use dmy dates|from|{{{date|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using Use dmy dates template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Use dmy dates]] with unknown parameter "_VALUE_"|ignoreblank=y| cs1-dates | date }}}}<noinclude>{{documentation}}</noinclude>
6s1ha6s0v107eyxcwylok2grs9ktf53
Template:Wikiquote
10
958937
1086980265
663515314
2022-05-09T15:39:01Z
Xaosflux
502540
format change requested on talk
wikitext
text/x-wiki
{{Sister project
|project=wikiquote
|text=Wikiquote has quotations related to '''''[[q:{{{1|Special:Search/{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}]]'''''.
}}<noinclude>
{{documentation}}
</noinclude>
sky63egjmuheuh0ntjn2hnayhm11spx
Template:Yesno
10
22255088
975364754
821904792
2020-08-28T03:15:17Z
Xaosflux
502540
add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|f
|false
|off
|0 = {{{no|<!-- null -->}}}
| = {{{blank|{{{no|<!-- null -->}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|t
|true
|on
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
bioaq6x8oitfnx7oqmfhviol4hbp1nd
Template:Yesno-no
10
48375573
825510157
804450734
2018-02-13T20:27:17Z
WOSlinker
3138265
separate pp-template not needed
wikitext
text/x-wiki
{{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude>
{{Documentation|Template:Yesno/doc}}
<!--Categories go in the doc page referenced above; interwikis go in Wikidata.-->
</noinclude>
34vmtxa9ubuh1vz2ulp78m5ela68riu
Template:Yesno-yes
10
48375564
829824778
827246217
2018-03-11T01:06:35Z
JJMC89
24812038
allow subst
wikitext
text/x-wiki
{{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude>
{{Documentation|Template:Yesno/doc}}
<!--Categories go in the doc page referenced above; interwikis go in Wikidata.-->
</noinclude>
2ln5m2kzkd3wxvm1r25pwd6kj6j77we
Module:About
828
50080208
967653971
833407229
2020-07-14T13:59:23Z
Nihiltres
236191
Removed defaultOptions.namespace as redundant, per request on talk by Andrybak
Scribunto
text/plain
local mArguments --initialize lazily
local mHatnote = require('Module:Hatnote')
local mHatList = require('Module:Hatnote list')
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
function p.about (frame)
-- A passthrough that gets args from the frame and all
mArguments = require('Module:Arguments')
args = mArguments.getArgs(frame)
return p._about(args)
end
function p._about (args, options)
-- Produces "about" hatnote.
-- Type checks and defaults
checkType('_about', 1, args, 'table', true)
args = args or {}
checkType('_about', 2, options, 'table', true)
options = options or {}
local defaultOptions = {
aboutForm = 'This %s is about %s. ',
PageType = require('Module:Pagetype').main(),
otherText = nil, --included for complete list
sectionString = 'section'
}
for k, v in pairs(defaultOptions) do
if options[k] == nil then options[k] = v end
end
-- Set initial "about" string
local pageType = (args.section and options.sectionString) or options.PageType
local about = ''
if args[1] then
about = string.format(options.aboutForm, pageType, args[1])
end
--Allow passing through certain options
local fsOptions = {
otherText = options.otherText,
extratext = args.text
}
local hnOptions = {
selfref = args.selfref
}
-- Set for-see list
local forSee = mHatList._forSee(args, 2, fsOptions)
-- Concatenate and return
return mHatnote._hatnote(about .. forSee, hnOptions)
end
return p
34eqkrvgvpb6coyf5mc8amjmasfegyy
Module:Arguments
828
41298065
948472485
948472482
2020-04-01T06:12:40Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
-- 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
5qx9tzlul9ser30uxj9nbasjt92cevn
Module:Authority control
828
39028170
1089934163
1089010245
2022-05-26T12:17:45Z
MSGJ
42630
update link to USCG
Scribunto
text/plain
require('Module:No globals')
local p = {}
local title = mw.title.getCurrentTitle()
local namespace = title.namespace
local testcases = (string.sub(title.subpageText,1,9) == 'testcases')
--[[==========================================================================]]
--[[ Category functions ]]
--[[==========================================================================]]
local function addCat( cat )
if cat and cat ~= '' then return '[[Category:'..cat..']]'..p.redCatLink(cat) end
return ''
end
function p.getCatForId( id )
local cat = ''
if namespace == 0 then
cat = 'Articles with '..id..' identifiers'
end
return addCat(cat)
end
function p.redCatLink( cat ) --cat == 'Blah' (not 'Category:Blah', not '[[Category:Blah]]')
if cat and cat ~= '' and testcases == false and mw.title.new(cat, 14).exists == false then
return '[[Category:Pages with red-linked authority control categories]]'
end
return ''
end
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local faultyCat = 'Articles with faulty '..(specialCat or id)..' identifiers'
if links then -- all links[] use withUid = false; no check needed
local row = ''
if prefix then
row = row..'*'..prefix
end
for i, l in ipairs( links ) do
if i == 1 and not prefix then row = row..'*'
else row = row..'\n**' end
if l then
row = row..'<span class="uid">'..l..'</span>'
else
row = row..'<span class="error">The '..id..' id '..rawValues[i]..' is not valid.</span>'..addCat(faultyCat)
end
end
return row..'\n'
elseif link then -- All IDs that have a prefix support multiple identifiers, so prefix is not needed
if withUid then
return '*<span class="nowrap"><span class="uid">'..link..'</span></span>\n'
end
return '*<span class="nowrap">'..link..'</span>\n'
end
return '* <span class="error">The '..id..' id '..rawValues..' is not valid.</span>'..addCat(faultyCat)..'\n'
end
--[[==========================================================================]]
--[[ Property formatting functions ]]
--[[==========================================================================]]
-- If a link has a suitable entry in the global inter-wiki prefix table at [[:m:Interwiki_map]],
-- please consider routing through this prefix rather than as external link URL.
-- This will ease future maintenance as necessary updates to the link can be centrally carried out there rather than by updating this module.
-- The "external link" icon would disappear for such entries.
function p.aagLink( id, label)
--P3372's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[https://www.aucklandartgallery.com/explore-art-and-ideas/artist/'..id..'/ '..(label or 'Auckland')..']'..p.getCatForId( 'AAG' )
end
function p.acmLink( id, label )
--P864's format regex: \d{11} (e.g. 12345678901)
if not id:match( '^%d%d%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[https://dl.acm.org/profile/'..id..' '..(label or 'Association for Computing Machinery')..']'..p.getCatForId( 'ACM-DL' )
end
function p.adbLink( id, label )
--P1907's format regex: [a-z][-a-z]+-([1-3]\d|[1-9])\d{0,3} (e.g. barton-sir-edmund-toby-71)
if not id:match( '^[a-z][-a-z]+-[1-3]%d%d?%d?%d?$' ) and
not id:match( '^[a-z][-a-z]+-[1-9]%d?%d?%d?$' ) then
return false
end
return '[http://adb.anu.edu.au/biography/'..id..' '..(label or 'Australia')..']'..p.getCatForId( 'ADB' )
end
function p.admiraltyLink(id,label)
--P3562's format regex: [A-Q]\d{4}(\.\d+)? (e.g. D1204.1)
if not id:match('^[A-Q]%d%d%d%d$') and
not id:match('^[A-Q]%d%d%d%d%.%d+$') then
return false
end
return id..p.getCatForId( 'admiralty' )
end
function p.agsaLink( id, label )
--P6804's format regex: [1-9]\d* (e.g. 3625)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or 'South Australia')..']'..p.getCatForId( 'AGSA' )
end
function p.ARLHSLink(id,label)
--P2980's format regex: [A-Z]{3}\d{3,4}[A-Z]?| e.g. LAT023
if not id:match('^[A-Z][A-Z][A-Z]%d%d%d%d?[A-Z]?$') then
return false
end
return '[http://wlol.arlhs.com/lighthouse/'..id..'.html '..(label or 'ARLHS')..']'..p.getCatForId( 'ARLHS' )
end
function p.autoresuyLink( id, label )
--P2558's format regex: [1-9]\d{0,4} (e.g. 12345)
if not id:match( '^[1-9]%d?%d?%d?%d?$' ) then
return false
end
return '[https://autores.uy/autor/'..id..' '..(label or 'Uruguay')..']'..p.getCatForId( 'autores.uy' )
end
function p.awrLink( id, label )
--P4186's format regex: (([A-Z]{3}\d{4})|([A-Z]{2}\d{5}))[a-z] (e.g. PR00768b)
if not id:match( '^[A-Z][A-Z][A-Z]%d%d%d%d[a-z]$' ) and
not id:match( '^[A-Z][A-Z]%d%d%d%d%d[a-z]$' ) then
return false
end
return '[http://www.womenaustralia.info/biogs/'..id..'.htm '..(label or 'Australian Women\'s Register')..']'..p.getCatForId( 'AWR' )
end
function p.bibsysLink( id, label )
--P1015's format regex: [1-9]\d* or [1-9](\d{0,8}|\d{12}) (e.g. 1234567890123)
--TODO: follow up @ [[d:Property talk:P1015#Discrepancy between the 2 regex constraints]] or escalate/investigate
if not id:match( '^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?$' ) and
not id:match( '^[1-9]%d%d%d%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or 'Norway')..']'..p.getCatForId( 'BIBSYS' )
end
function p.bildLink( id, label )
--P2092's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (Germany)')..']'..p.getCatForId( 'Bildindex' )
end
function p.bncLink( id, label )
--P1890's format regex: \d{9} (e.g. 123456789)
if not id:match( '^%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or 'Chile')..']'..p.getCatForId( 'BNC' )
end
function p.bneLink( id, label )
--P950's format regex: (XX|FF|a)\d{4,7}|(bima|bimo|bica|bis[eo]|bivi|Mise|Mimo|Mima)\d{10} (e.g. XX1234567)
if not id:match( '^[XF][XF]%d%d%d%d%d?%d?%d?$' ) and
not id:match( '^a%d%d%d%d%d?%d?%d?$' ) and
not id:match( '^bi[mcsv][aoei]%d%d%d%d%d%d%d%d%d%d$' ) and
not id:match( '^Mi[sm][eoa]%d%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or 'Spain')..']'..p.getCatForId( 'BNE' ) --no https as of 9/2019
end
function p.bnfLink( id, label )
--P268's format regex: \d{8}[0-9bcdfghjkmnpqrstvwxz] (e.g. 123456789)
if not id:match( '^c?b?%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]$' ) then
return false
end
--Add cb prefix if it has been removed
if not id:match( '^cb.+$' ) then
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' '..(label or 'France')..'] [https://data.bnf.fr/ark:/12148/'..id..' (data)]'..p.getCatForId( 'BNF' )
end
function p.bnmmLink( id, label )
--P3788's format regex: \d{9} (e.g. 000024044)
if id:match( '^%d%d%d%d%d%d%d%d%d$' ) then
return '[https://catalogo.bn.gov.ar/F/?func=direct&local_base=BNA10&doc_number='..id..' '..(label or 'Argentina')..']'..p.getCatForId( 'BNMM' )
else
return false
end
end
function p.botanistLink( id, label )
--P428's format regex: ('t )?(d')?(de )?(la )?(van (der )?)?(Ma?c)?(De)?(Di)?\p{Lu}?C?['\p{Ll}]*([-'. ]*(van )?(y )?(d[ae][nr]?[- ])?(Ma?c)?[\p{Lu}bht]?C?['\p{Ll}]*)*\.? ?f?\.? (e.g. L.)
--not easily/meaningfully implementable in Lua's regex since "(this)?" is not allowed...
if not mw.ustring.match( id, "^[%u%l%d%. '-]+$" ) then --better than nothing
return false
end
id = id:gsub(' +', '%%20')
return '[https://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation='..id..' '..(label or 'International Plant Names Index')..']'..p.getCatForId( 'Botanist' )
end
function p.bpnLink( id, label )
--P651's format regex: \d{6,8} (e.g. 00123456)
if not id:match( '^%d%d%d%d%d%d%d%d$' ) and --original format regex, changed 8/2019 to
not id:match( '^0?%d%d%d%d%d%d%d$' ) and --allow 1-2 leading 0s, allowed by the website
not id:match( '^0?0?%d%d%d%d%d%d$' ) then
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or 'Netherlands')..']'..p.getCatForId( 'BPN' ) --no https as of 9/2019
end
function p.canticLink( id, label )
--P1273's format regex: a\d{7}[0-9x] (e.g. a10640745)
if not id:match( '^a%d%d%d%d%d%d%d[%dx]$' ) then
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or 'Catalonia')..']'..p.getCatForId( 'CANTIC' ) --no https as of 10/2019
end
function p.canticnLink( id, label )
--P9984's format regex: 981(0|1)\d{9}06706 (e.g. 981058515460906706)
if not id:match( '^981[0-1]%d%d%d%d%d%d%d%d%d06706$' ) then
return false
end
return '[https://cantic.bnc.cat/registre/'..id..' '..(label or 'Catalonia')..']'..p.getCatForId( 'CANTICN' )
end
function p.ccgLink( id, label )
--P3920's format regex: ([NAIP])?[1-9]\d*(\.\d+)? (e.g. A1761)
if not id:match( '^[NAIP]?[1-9]%d*$' ) and
not id:match( '^[NAIP]?[1-9]%d*%.%d+$' ) then
return false
end
return id..p.getCatForId( 'CCG' )
end
function p.ciniiLink( id, label )
--P271's format regex: DA\d{7}[\dX] (e.g. DA12345678)
if not id:match( '^DA%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (Japan)')..']'..p.getCatForId( 'CINII' )
end
function p.cwgcLink( id, label )
--P1908's format regex: [1-9]\d* (e.g. 75228351)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://www.cwgc.org/find-war-dead/casualty/'..id..'/ '..(label or 'Commonwealth War Graves Commission')..']'..p.getCatForId( 'CWGC' )
end
function p.emuLink( id, label )
--P4613's format regex: \d{1,6} (e.g. 15409 (or 015409))
if not id:match( '^%d%d?%d?%d?%d?%d?$' ) then
return false
end
return '[http://esu.com.ua/search_articles.php?id='..id..' '..(label or 'Ukraine')..']'..p.getCatForId( 'EMU' )
end
function p.daaoLink( id, label )
--P1707's format regex: [a-z\-]+\d* (e.g. rolf-harris)
if not id:match( '^[a-z%-]+%d*$' ) then
return false
end
return '[https://www.daao.org.au/bio/'..id..' '..(label or 'Australian Artists')..']'..p.getCatForId( 'DAAO' )
end
function p.dblpLink( id, label )
--P2456's format regex: \d{2,3} /\d+(-\d+)?|[a-z] /[a-zA-Z][0-9A-Za-z]*(-\d+)? (e.g. 123/123)
if not id:match( '^%d%d%d?/%d+$' ) and
not id:match( '^%d%d%d?/%d+%-%d+$' ) and
not id:match( '^[a-z]/[a-zA-Z][0-9A-Za-z]*$' ) and
not id:match( '^[a-z]/[a-zA-Z][0-9A-Za-z]*%-%d+$' ) then
return false
end
return '[https://dblp.org/pid/'..id..' '..(label or 'DBLP (computer science)')..']'..p.getCatForId( 'DBLP' )
end
function p.dibLink( id, label )
--P6829's format regex: 0[01]\d{4}(\.[A-D])? (e.g. 001953)
if not id:match( '^0[01]%d%d%d%d%.?[A-D]?$' ) then
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or 'Ireland')..']'..p.getCatForId( 'DIB' )
end
function p.dsiLink( id, label )
--P2349's format regex: [1-9]\d* (e.g. 1538)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[http://www.uni-stuttgart.de/hi/gnt/dsi2/index.php?table_name=dsi&function=details&where_field=id&where_value='..id..' '..(label or 'Scientific illustrators')..']'..p.getCatForId( 'DSI' )
end
function p.dtbioLink( id, label )
--P7902's format regex: 1[0-9]{7,8}[0-9X] (e.g. 118554700)
if not id:match( '^1[0-9]%d%d%d%d%d%d%d?[0-9X]$' ) then
return false
end
return '[https://www.deutsche-biographie.de/pnd'..id..'.html?language=en '..(label or 'Germany')..']'..p.getCatForId( 'DTBIO' )
end
function p.fastLink( id, label )
--P2163's format regex: [1-9]\d{0,7} (e.g. 1916996)
if not id:match( '^[1-9]%d?%d?%d?%d?%d?%d?%d?$' ) then
return false
end
return '[http://id.worldcat.org/fast/'..id..'/ '..(label or 'Faceted Application of Subject Terminology')..']'..p.getCatForId( 'FAST' )
end
function p.fnzaLink( id, label )
--P6792's format regex: [1-9]\d* (e.g. 9785)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://findnzartists.org.nz/artist/'..id..'/ '..(label or 'New Zealand Artists')..']'..p.getCatForId( 'FNZA' )
end
function p.gndLink( id, label )
--P227's format regex: 1[012]?\d{7}[0-9X]|[47]\d{6}-\d|[1-9]\d{0,7}-[0-9X]|3\d{7}[0-9X] (e.g. 4079154-3)
if not id:match( '^1[012]?%d%d%d%d%d%d%d[0-9X]$' ) and
not id:match( '^[47]%d%d%d%d%d%d%-%d$' ) and
not id:match( '^[1-9]%d?%d?%d?%d?%d?%d?%d?%-[0-9X]$' ) and
not id:match( '^3%d%d%d%d%d%d%d[0-9X]$' ) then
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Germany')..']'..p.getCatForId( 'GND' )
end
function p.googleLink( id, label )
--P1960's format regex: [-_0-9A-Za-z]{12} (e.g. CUO0vDcAAAAJ)
if not id:match( '^[%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u]$' ) then
return false
end
return '[https://scholar.google.com/citations?user='..id..' '..(label or 'Google Scholar')..']'..p.getCatForId( 'Google Scholar' )
end
function p.hdsLink( id, label )
--P902's format regex: \d{6} (e.g. 050123)
if not id:match( '^%d%d%d%d%d%d$' ) then
return false
end
return '[https://hls-dhs-dss.ch/fr/articles/'..id..' '..(label or 'Historical Dictionary of Switzerland')..']'..p.getCatForId( 'HDS' )
end
function p.iaafLink( id, label )
--P1146's format regex: [0-9][0-9]* (e.g. 012)
if not id:match( '^%d+$' ) then
return false
end
return '[https://www.iaaf.org/athletes/_/'..id..' '..(label or 'World Athletics')..']'..p.getCatForId( 'IAAF' )
end
function p.iccuLink( id, label )
--P396's format regex: \D{2}[A-Z0-3]V\d{6} (e.g. CFIV000163)
if not id:match( '^%u%u[%u0-3]V%d%d%d%d%d%d$' ) then --legacy: %u used here instead of %D (but the faulty ID cat is empty, out of ~12k uses)
return false
end
return '[https://opac.sbn.it/nome/'..id..' '..(label or 'Italy')..']'..p.getCatForId( 'ICCU' )
end
function p.iciaLink( id, label )
--P1736's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[https://www.imj.org.il/artcenter/newsite/en/?artist='..id..' '..(label or 'ICIA (Israel)')..']'..p.getCatForId( 'ICIA' )
end
function p.ieuLink( id, label )
--P9070's format regex: [A-Z]\\[A-Z]\\[A-Za-z0-9]+ (e.g. K\Y\Kyiv)
if not id:match( '^[A-Z]\\[A-Z]\\%w+$' ) then
return false
end
return '[http://www.encyclopediaofukraine.com/display.asp?linkpath=pages\\'..id..' '..(label or 'Internet Encyclopedia of Ukraine')..']'..p.getCatForId( 'IEU' )
end
function p.isniLink( id, label )
id = p.validateIsni( id ) --e.g. 0000-0000-6653-4145
if not id then
return false
end
return '[https://isni.org/isni/'..id..' '..(label or 'ISNI')..']'..p.getCatForId( 'ISNI' )
end
function p.j9uLink( id, label )
--P8189's format regex: 9870(0|1)\d{8}05171 (e.g. 987007305652505171)
if not id:match( '^9870[0-1]%d%d%d%d%d%d%d%d05171$' ) then
return false
end
return '[http://uli.nli.org.il/F/?func=find-b&local_base=NLX10&find_code=UID&request='..id..' '..(label or 'Israel')..']'..p.getCatForId( 'J9U' )
end
function p.jocondeLink( id, label )
--P347's format regex: [\-0-9A-Za-z]{11} (e.g. 12345678901)
local regex = '^'..string.rep('[%-0-9A-Za-z]', 11)..'$'
if not id:match( regex ) then
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (France)')..']'..p.getCatForId( 'Joconde' )
end
function p.kulturnavLink( id, label )
--P1248's format regex: [0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
return '[http://kulturnav.org/'..id..' '..(label or 'KulturNav (Norway)')..']'..p.getCatForId( 'KULTURNAV' ) --no https as of 9/2019
end
function p.lccnLink( id, label )
local parts = p.splitLccn( id ) --e.g. n78039510
if not parts then
return false
end
local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'
id = parts[1] .. parts[2] .. p.append( parts[3], '0', 6 )
return '[https://id.loc.gov/authorities/'..lccnType..'/'..id..' '..(label or 'United States')..']'..p.getCatForId( 'LCCN' )
end
function p.lirLink( id, label )
--P886's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (Switzerland)')..']'..p.getCatForId( 'LIR' ) --no https as of 9/2019
end
function p.lnbLink( id, label )
--P1368's format regex: \d{9} (e.g. 123456789)
if not id:match( '^%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[https://kopkatalogs.lv/F?func=direct&local_base=lnc10&doc_number='..id..'&P_CON_LNG=ENG '..(label or 'Latvia')..']'..p.getCatForId( 'LNB' )
end
function p.marinaMilitareLink( id, label )
--P3863's format regex: [1-9]\d* (e.g. 3856)
if id:match( '^[1-9]%d*$' ) then
return '[http://www.marina.difesa.it/cosa-facciamo/per-la-difesa-sicurezza/fari/Pagine/'..id..'.aspx '..(label or 'Italy')..']'..p.getCatForId( 'Marina Militare' )
else
return false
end
end
function p.mathsnLink( id, label )
--P4955's format regex: [1-9]\d{4,6} (e.g. 175270)
if not id:match( '^[1-9]%d%d%d%d%d?%d?$' ) then
return false
end
return '[https://mathscinet.ams.org/mathscinet/MRAuthorID/'..id..' '..(label or 'MathSciNet')..']'..p.getCatForId( 'MATHSN' )
end
function p.mbaLink( id, label )
--P434's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/artist/'..id
local cat = p.getCatForId( 'MusicBrainz' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBA (identifier)|MusicBrainz]] ['..url..' artist]'..cat
end
end
function p.mbareaLink( id, label )
--P982's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/area/'..id
local cat = p.getCatForId( 'MusicBrainz area' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBAREA (identifier)|MusicBrainz]] ['..url..' area]'..cat
end
end
function p.mbiLink( id, label )
--P1330's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/instrument/'..id
local cat = p.getCatForId( 'MusicBrainz instrument' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBI (identifier)|MusicBrainz]] ['..url..' instrument]'..cat
end
end
function p.mblLink( id, label )
--P966's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/label/'..id
local cat = p.getCatForId( 'MusicBrainz label' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBL (identifier)|MusicBrainz]] ['..url..' label]'..cat
end
end
function p.mbpLink( id, label )
--P1004's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/place/'..id
local cat = p.getCatForId( 'MusicBrainz place' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBP (identifier)|MusicBrainz]] ['..url..' place]'..cat
end
end
function p.mbrgLink( id, label )
--P436's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/release-group/'..id
local cat = p.getCatForId( 'MusicBrainz release group' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBRG (identifier)|MusicBrainz]] ['..url..' release group]'..cat
end
end
function p.mbsLink( id, label )
--P1407's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/series/'..id
local cat = p.getCatForId( 'MusicBrainz series' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBS (identifier)|MusicBrainz]] ['..url..' series]'..cat
end
end
function p.mbwLink( id, label )
--P435's format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)
if not id:match( '^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$' ) then
return false
end
local url = 'https://musicbrainz.org/work/'..id
local cat = p.getCatForId( 'MusicBrainz work' )--special cat name
if label then
return '['..url..' '..label..']'..cat
else
return '[[MBW (identifier)|MusicBrainz]] ['..url..' work]'..cat
end
end
function p.mgpLink( id, label )
--P549's format regex: \d{1,6} (e.g. 123456)
if not id:match( '^%d%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://www.mathgenealogy.org/id.php?id='..id..' '..(label or 'Mathematics Genealogy Project')..']'..p.getCatForId( 'MGP' )
end
function p.mtLink( id, label )
--P3601's format regex: \d{10} (e.g. 1000004707)
if id:match( '^%d%d%d%d%d%d%d%d%d%d$' ) then
return '[https://www.marinetraffic.com/en/ais/details/lights/'..id..' '..(label or 'MarineTraffic')..']'..p.getCatForId( 'MarineTraffic' )
else
return false
end
end
function p.naraLink( id, label )
--P1225's format regex: ^([1-9]\d{0,8})$ (e.g. 123456789)
if not id:match( '^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://catalog.archives.gov/id/'..id..' '..(label or 'National Archives (US)')..']'..p.getCatForId( 'NARA' )
end
function p.nclLink( id, label )
--P1048's format regex: \d+ (e.g. 1081436)
if not id:match( '^%d+$' ) then
return false
end
return '[http://aleweb.ncl.edu.tw/F/?func=accref&acc_sequence='..id..'&CON_LNG=ENG '..(label or 'Taiwan')..']'..p.getCatForId( 'NCL' ) --no https as of 9/2019
end
function p.ndlLink( id, label )
--P349's format regex: 0?\d{8} (e.g. 012345678)
if not id:match( '^0?%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or 'Japan')..']'..p.getCatForId( 'NDL' )
end
function p.ngaLink(id,label)
--P3563's format rgex: 11[0-6]-\d+(\.\d+)? (e.g. 114-7721.2)
if not id:match('^11[0-6]%-%d+%.?%d*$') then
return false
end
return '[https://wikidata-externalid-url.toolforge.org/?url=https%3A%2F%2Fmsi.nga.mil%2FqueryResults%3Fpublications%2Fngalol%2Flights-buoys%3Fvolume%3D%251%26featureNumber%3D%252%26includeRemovals%3Dfalse%26output%3Dhtml&exp=(%5Cd%7B3%7D)-(.*)&id='..id..' '..(label or 'NGA')..']'..p.getCatForId( 'NGA' )
end
function p.ngvLink( id, label )
--P2041's format regex: \d+ (e.g. 12354)
if not id:match( '^%d+$' ) then
return false
end
return '[https://www.ngv.vic.gov.au/explore/collection/artist/'..id..'/ '..(label or 'Victoria')..']'..p.getCatForId( 'NGV' )
end
function p.nkcLink( id, label )
--P691's format regex: [a-z]{2,4}[0-9]{2,14} (e.g. abcd12345678901234)
if not id:match( '^[a-z][a-z][a-z]?[a-z]?%d%d%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica='..id..'&CON_LNG=ENG '..(label or 'Czech Republic')..']'..p.getCatForId( 'NKC' )
end
function p.nlaLink( id, label )
--P409's format regex: [1-9][0-9]{0,11} (e.g. 123456789012)
if not id:match( '^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://nla.gov.au/anbd.aut-an'..id..' '..(label or 'Australia')..']'..p.getCatForId( 'NLA' )
end
function p.nlgLink( id, label )
--P3348's format regex: [1-9]\d* (e.g. 1)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or 'Greece')..']'..p.getCatForId( 'NLG' )
end
function p.nlkLink( id, label )
--P5034's format regex: KA.(19|20).{7} (e.g. KAC201501465)
if not id:match( '^KA.19.......$' ) and
not id:match( '^KA.20.......$' ) then
return false
end
return '[https://librarian.nl.go.kr/LI/contents/L20101000000.do?id='..id..' '..(label or 'Korea')..']'..p.getCatForId( 'NLK' )
end
function p.nlpLink( id, label )
--P1695's format regex: 9810[0-9]\d* or A[0-9]{7}[0-9X] (e.g. 9810123456789012345 or A10414836)
if not id:match( '^9810%d+$' ) and
not id:match( '^A%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or 'Poland')..']'..p.getCatForId( 'NLP' )
end
function p.nlrLink( id, label )
--P1003's format regex: \d{9} (e.g. 123456789)
if not id:match( '^%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[http://aleph.bibnat.ro:8991/F/?func=direct&local_base=NLR10&doc_number='..id..' '..(label or 'Romania')..']'..p.getCatForId( 'NLR' )
end
function p.nskLink( id, label )
--P1375's format regex: \d{9} (e.g. 123456789)
if not id:match( '^%d%d%d%d%d%d%d%d%d$' ) then
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or 'Croatia')..']'..p.getCatForId( 'NSK' ) --no https as of 9/2019
end
function p.ntaLink( id, label )
--P1006's format regex: \d{8}[\dX] (e.g. 12345678X)
if not id:match( '^%d%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or 'Netherlands')..']'..p.getCatForId( 'NTA' )
end
function p.orcidLink( id, label )
id = p.validateIsni( id ) --e.g. 0000-0002-7398-5483
if not id then
return false
end
id = id:sub( 1, 4 )..'-'..id:sub( 5, 8 )..'-'..id:sub( 9, 12 )..'-'..id:sub( 13, 16 )
return '[https://orcid.org/'..id..' '..(label or 'ORCID')..']'..p.getCatForId( 'ORCID' )
end
function p.picLink( id, label )
--P2750's format regex: [1-9]\d* (e.g. 1)
if not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://pic.nypl.org/constituents/'..id..' '..(label or 'Photographers\' Identities')..']'..p.getCatForId( 'PIC' )
end
function p.plwabnLink( id, label )
--P7293's format regex: 981[0-9]{8}05606 (e.g. 9810696457305606)
if not id:match( '^981%d%d%d%d%d%d%d%d05606*$' ) then
return false
end
return '[http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI='..id..' '..(label or 'Poland')..']'..p.getCatForId( 'PLWABN' )
end
function p.publonsLink( id, label )
--P3829's format regex: \d+ (e.g. 654601)
if not id:match( '^%d+$' ) then
return false
end
return '[https://publons.com/author/'..id..'/ '..(label or 'Publons (researchers)')..']'..p.getCatForId( 'Publons' )
end
function p.ridLink( id, label )
--P1053's format regex: [A-Z]{1,3}-\d{4}-(19|20)\d\d (e.g. AAS-5150-2020)
if not id:match( '^[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-19%d%d$' ) and
not id:match( '^[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-20%d%d$' ) then
return false
end
return '[https://www.researcherid.com/rid/'..id..' '..(label or 'ResearcherID')..']'..p.getCatForId( 'RID' )
end
function p.rismLink( id, label )
--P5504's format regex: (pe|ks)?\[1-9]d* (e.g. pe30006410)
if not id:match( '^pe[1-9]%d*$' ) and --99% start with 'pe'
not id:match( '^ks[1-9]%d*$' ) and
not id:match( '^[1-9]%d*$' ) then
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (France)')..']'..p.getCatForId( 'RISM' )
end
function p.reroLink( id, label )
--P3065's format regex: 0[1-2]-[A-Z0-9]{1,10} (e.g. 02-A012345678)
if not id:match( '^0[1-2]%-[A-Z%d][A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?$' ) then
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (Switzerland)')..']'..p.getCatForId( 'RERO' )
end
function p.rkdartistsLink( id, label )
--P650's format regex: [1-9]\d{0,5} (e.g. 123456)
if not id:match( '^[1-9]%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (Netherlands)')..']'..p.getCatForId( 'RKDartists' )
end
function p.rkdidLink( id, label )
--P350's format regex: [1-9]\d{0,5} (e.g. 123456)
if not id:match( '^[1-9]%d?%d?%d?%d?%d?$' ) then
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (Netherlands)')..']'..p.getCatForId( 'RKDID' )
end
function p.rslLink( id, label )
--P947's format regex: \d{1,9} (e.g. 123456789)
if not id:match( '^%d%d?%d?%d?%d?%d?%d?%d?%d?$' ) then
return false
end
return '[http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request='..id..'&CON_LNG=ENG '..(label or 'Russia')..']'..p.getCatForId( 'RSL' ) --no https as of 9/2019
end
function p.scopusLink( id, label )
--P1153's format regex: [1-9]\d{9,10} (e.g. 35247902700)
if not id:match( '^[1-9]%d%d%d%d%d%d%d%d%d%d?$' ) then
return false
end
return '[https://www.scopus.com/authid/detail.uri?authorId='..id..' '..(label or 'Scopus author')..']'..p.getCatForId( 'Scopus' )
end
function p.selibrLink( id, label )
--P906's format regex: [1-9]\d{4,5} (e.g. 123456)
if not id:match( '^[1-9]%d%d%d%d%d?$' ) then
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or 'Sweden')..']'..p.getCatForId( 'SELIBR' )
end
function p.sikartLink( id, label )
--P781's format regex: \d{7,9} (e.g. 123456789)
if not id:match( '^%d%d%d%d%d%d%d%d?%d?$' ) then
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (Switzerland)')..']'..p.getCatForId( 'SIKART' ) --no https as of 9/2019
end
function p.snacLink( id, label )
--P3430's format regex: \d*[A-Za-z][0-9A-Za-z]* (e.g. A)
if not id:match( '^%d*[A-Za-z][0-9A-Za-z]*$' ) then
return false
end
return '[https://snaccooperative.org/ark:/99166/'..id..' '..(label or 'Social Networks and Archival Context')..']'..p.getCatForId( 'SNAC-ID' )
end
function p.sudocLink( id, label )
--P269's format regex: (\d{8}[\dX]|) (e.g. 026927608)
if not id:match( '^%d%d%d%d%d%d%d%d[%dxX]$' ) then --legacy: allow lowercase 'x'
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (France)')..']'..p.getCatForId( 'SUDOC' )
end
function p.ta98Link( id, label )
--P1323's format regex: A\d{2}\.\d\.\d{2}\.\d{3}[FM]? (e.g. A12.3.45.678)
if not id:match( '^A%d%d%.%d%.%d%d%.%d%d%d[FM]?$' ) then
return false
end
local longurl = '[http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&url_suffix=%20Entity%20TA98%20EN.htm&id='
return longurl..id..' '..(label or 'Terminologia Anatomica')..']'..p.getCatForId( 'TA98' )
end
function p.tdviaLink( id, label )
--P7314's format regex: [0-9a-z/-]+] (e.g. barkan-omer-lutfi)
if not id:match( '^[%d%l/-]+$' ) then
return false
end
return '[https://islamansiklopedisi.org.tr/'..id..' '..(label or 'İslâm Ansiklopedisi')..']'..p.getCatForId( 'TDVİA' )
end
function p.tepapaLink( id, label )
--P3544's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (New Zealand)')..']'..p.getCatForId( 'TePapa' )
end
function p.tlsLink( id, label )
id = id:gsub(' +', '_')
--P1362's format regex: \p{Lu}[\p{L}\d_',\.\-\(\)\*\/–&]{3,89} (e.g. Abcd)
--Mediawiki page title partial URL so consider validation with mw.title or "[^#<>%[%] {|}]"
local class = "[%w_',%.%-%(%)%*%/–&]"
local idlen = mw.ustring.len (id)
if idlen < 4 or idlen > 90 then
return false
end
local regex = '^%u'..string.rep(class, idlen - 1)..'$'
if not mw.ustring.match( id, regex ) then
return false
end
return '[http://tls.theaterwissenschaft.ch/wiki/'..id..' '..(label or 'Theaterlexikon (Switzerland)')..']'..p.getCatForId( 'TLS' ) --no https as of 9/2019
end
function p.troveLink( id, label )
--P1315's format regex: [1-9]\d{5,7} (e.g. 12345678)
if not id:match( '^[1-9]%d%d%d%d%d%d?%d?$' ) then
return false
end
return '[https://trove.nla.gov.au/people/'..id..' '..(label or 'Trove (Australia)')..']'..p.getCatForId( 'Trove' )
end
function p.ukparlLink( id, label )
--P6213's format regex: [a-zA-Z\d]{8} (e.g. AQUupyiR)
if not id:match( '^[a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d]$' ) then
return false
end
return '[https://id.parliament.uk/'..id..' '..(label or 'UK Parliament')..']'..p.getCatForId( 'UKPARL' )
end
function p.ulanLink( id, label )
--P245's format regex: 500\d{6} (e.g. 500123456)
if not id:match( '^500%d%d%d%d%d%d$' ) then
return false
end
return '[https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid='..id..' '..(label or 'Artist Names (Getty)')..']'..p.getCatForId( 'ULAN' )
end
function p.uscgLink( id, label )
--P3723's format regex: [1-7]-\d{1,5}(.[1-9])? (e.g. 6-0695)
if not id:match( '^[1-7]%-%d%d?%d?%d?%d?$' ) and
not id:match( '^[1-7]%-%d%d?%d?%d?%d?%.%d*[1-9]$' ) then
return false
end
return '[[USCG (identifier)|USCG]] ([https://www.navcen.uscg.gov/pdf/lightlists/LightList%20V'..mw.ustring.sub(id,1,1)..'.pdf '..id..'])'..p.getCatForId( 'USCG' )
end
function p.uscongressLink( id, label )
--P1157's format regex: [A-Z]00[01]\d{3} (e.g. A000123)
if not id:match( '^[A-Z]00[01]%d%d%d$' ) then
return false
end
return '[http://bioguide.congress.gov/scripts/biodisplay.pl?index='..id..' '..(label or 'US Congress')..']'..p.getCatForId( 'USCongress' ) --no https as of 9/2019
end
function p.vcbaLink( id, label )
--P8034's format regex: \d{3}\/[1-9]\d{0,5} (e.g. 494/9793)
if not id:match( '^%d%d%d\/[1-9]%d?%d?%d?%d?%d?$' ) then
return false
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or 'Vatican')..']'..p.getCatForId( 'VcBA' )
end
function p.viafLink( id, label )
--P214's format regex: [1-9]\d(\d{0,7}|\d{17,20}) (e.g. 123456789, 1234567890123456789012)
if not id:match( '^[1-9]%d%d?%d?%d?%d?%d?%d?%d?$' ) and
not id:match( '^[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?$' ) then
return false
end
-- If the "VIAF" entry at [[:m:Interwiki map]] would resolve to "https://viaf.org/viaf/$1" (rather than "http://viaf.org/viaf/$1", as it currently still does),
-- then the code below could change from '[https://viaf.org/viaf/'..id..' '..id..']' to '[[:VIAF:'..id..'|'..id..']]'.
return '[https://viaf.org/viaf/'..id..' '..(label or 'VIAF')..']'..p.getCatForId( 'VIAF' )
end
function p.worldcatidLink( id, label )
--P7859's format regex: viaf-\d+|lccn-n[a-z]?[0-9\-]+|n[cps]-.+ (e.g. viaf-100181709, lccn-n78-95332, np-verbeck,%20william$1861)
if not id:match( '^viaf%-%d+$' ) and
not id:match( '^lccn%-n[a-z]?[0-9%-]+$' ) and
not id:match( '^n[cps]%-.+$' ) then
return false
end
return '[https://www.worldcat.org/identities/'..mw.uri.encode(id, 'PATH')..'/ '..(label or 'WorldCat')..']'..p.getCatForId( 'WORLDCATID' )
end
function p.zbmathLink( id, label )
--P1556's format regex: [a-z][a-z\-]*(\.[a-z][a-z\-]*)?(\.[0-9]*)? (e.g. turing.alan-m)
local ps = {'%l[%l%-]*', '%.%l[%l%-]*', '%.%d*'}
if not id:match( '^'..ps[1]..'$' ) and -- prefix with no capture options
not id:match( '^'..ps[1]..ps[2]..'$' ) and -- prefix with first capture option
not id:match( '^'..ps[1]..ps[3]..'$' ) and -- prefix with second capture option
not id:match( '^'..ps[1]..ps[2]..ps[3]..'$' ) then -- prefix and both capture options
return false
end
return '[https://zbmath.org/authors/?q=ai:'..id..' '..(label or 'zbMATH')..']'..p.getCatForId( 'ZBMATH' )
end
--[[=========================== Helper functions =============================]]
function p.append(str, c, length)
while str:len() < length do
str = c..str
end
return str
end
--Returns the ISNI check digit isni must be a string where the 15 first elements are digits, e.g. 0000000066534145
function p.getIsniCheckDigit( isni )
local total = 0
for i = 1, 15 do
local digit = isni:byte( i ) - 48 --Get integer value
total = (total + digit) * 2
end
local remainder = total % 11
local result = (12 - remainder) % 11
if result == 10 then
return 'X'
end
return tostring( result )
end
--Validate ISNI (and ORCID) and retuns it as a 16 characters string or returns false if it's invalid
--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier
function p.validateIsni( id )
--P213 (ISNI) format regex: [0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3}[0-9X] (e.g. 0000-0000-6653-4145)
--P496 (ORCID) format regex: 0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d{3}-\d{3}[\dX] (e.g. 0000-0002-7398-5483)
id = id:gsub( '[ %-]', '' ):upper()
if not id:match( '^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
if p.getIsniCheckDigit( id ) ~= string.char( id:byte( 16 ) ) then
return false
end
return id
end
function p.splitLccn( id )
--P244's format regex: (n|nb|nr|no|ns|sh)([4-9][0-9]|00|20[0-1][0-9])[0-9]{6} (e.g. n78039510)
if id:match( '^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) then
id = id:gsub( '^(%l+)(%d+)(%d%d%d%d%d%d)$', '%1/%2/%3' )
end
if id:match( '^%l%l?%l?/%d%d%d?%d?/%d+$' ) then
return mw.text.split( id, '/' )
end
return false
end
--[[==========================================================================]]
--[[ Wikidata & documentation functions ]]
--[[==========================================================================]]
function p.getIdsFromWikidata( itemId, property )
local ids = {}
if not mw.wikibase then
return ids
end
local statements = mw.wikibase.getBestStatements( itemId, property )
if statements then
for _, statement in ipairs( statements ) do
if statement.mainsnak.datavalue then
table.insert( ids, statement.mainsnak.datavalue.value )
end
end
end
return ids
end
function p.checkcat( category,label )
local ret='[[:Category:'..category..'|'..label..']]'
if mw.title.new(category, 14).exists == false then
ret = ret..' <span class="plainlinks" style="font-size:85%;">[['..tostring(mw.uri.fullUrl('Category:'..category,'action=edit&preload=Template:Authority_control/preload'))..' create]]</span>'
end
return ret
end
-- Creates a human-readable standalone wikitable version of p.conf, and tracking categories with page counts, for use in the documentation
function p.docConfTable( frame )
local wikiTable = '<table class="wikitable sortable">'..
'<tr><th rowspan=2>Parameter</th>'..
'<th rowspan=2>Section</th>'..
'<th rowspan=2>Appears as</th>'..
'<th rowspan=2 data-sort-type=number>Wikidata property</th>'..
'<th colspan=2>Tracking categories and page counts</th></tr>'..
'<tr><th>[[:Category:Articles with authority control information|Articles]]</th>'..
'<th>[[:Category:Articles with faulty authority control information|Faulty IDs]]</th></tr>'
local lang = mw.getContentLanguage()
local a, f, P = 0, 0, 0 --cumulative sums
for _, conf in pairs( p.conf ) do
local param, pid, section = conf[1], conf[2], conf[4]
local appearsAs
if conf.prefix then
appearsAs = conf.prefix
else
appearsAs = conf[3](conf[5])
end
local link = conf.link or param..' (identifier)'
local category = conf.category or param
local args = { id = 'f', pid }
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
--cats
local articleCat = 'Articles with '..category..' identifiers'
local faultyCat = 'Articles with faulty '..category..' identifiers'
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
local faultyCount = lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, 'pages') )
--calcs
P = P + 1 --property count
a = a + lang:parseFormattedNumber(articleCount)
f = f + lang:parseFormattedNumber(faultyCount)
--concat
wikiTable = wikiTable..'<tr><td>[['..link..'|'..param..']]</td>'..
'<td>'..section..'</td>'..
'<td>'..appearsAs..'</td>'..
'<td data-sort-value='..pid..'>'..wpl..'</td>'..
'<td style="text-align: right;">'..p.checkcat(articleCat,articleCount)..'</td>'..
'<td style="text-align: right;">'..p.checkcat(faultyCat,faultyCount)..'</td></tr>'
end
--append derivative WorldCat cats
local wcd = { 'WorldCat-LCCN', 'WorldCat-VIAF' }
for _, w in pairs(wcd) do
local articleCat = 'Articles with '..w..' identifiers'
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
local appearsAs
if w == 'WorldCat-LCCN' then
appearsAs = '[https://www.worldcat.org/identities/lccn-n79-113947 WorldCat (via Library of Congress)]'
else
appearsAs = '[https://www.worldcat.org/identities/containsVIAFID/12345789 WorldCat (via VIAF)]'
end
a = a + lang:parseFormattedNumber(articleCount)
wikiTable = wikiTable..'<tr><td>-</td>'..
'<td>General</td>'..
'<td>'..appearsAs..'</td>'..
'<td data-sort-value='..w..'>—</td>'..
'<td style="text-align: right;">[[:Category:'..articleCat..'|'..articleCount..']]</td>'..
'<td style="text-align: right;">—</td></tr>'
end
--append sums
wikiTable = wikiTable..'<tr><th style="text-align: right;" colspan=3>Totals</th>'..
'<th style="text-align: right;">'..lang:formatNum(P)..'</th>'..
'<th style="text-align: right;">'..lang:formatNum(a)..'</th>'..
'<th style="text-align: right;">'..lang:formatNum(f)..'</th></tr></table>'
return require('Module:Suppress categories').main(wikiTable)
end
--[[==========================================================================]]
--[[ Configuration ]]
--[[==========================================================================]]
-- Please use "<parameter> (identifier)" redirects rather than linking directly to the target page.
-- This reduces clutter in "What links here" on both the redirect and the target,
-- and improves reverse lookup of articles where a manifestation of each identifier is used.
-- p.conf table basic format: { 'parameter name', propertyId # in Wikidata, formatting/validation function, section, example ID for documentation }
-- p.conf table optional named parameters:
-- link: to override the link in the documentation (defaults to "<parameter> (identifer)")
-- category: to override the ID in category names (defaults to "... with <parameter> identifiers")
-- prefix: to include a prefix (usually a wikilink explaining what the identifier is) before the external link itself
p.conf = {
{ 'AAG', 3372, p.aagLink, 'Art galleries and museums', '1' },
{ 'ACM-DL', 864, p.acmLink, 'Scientific databases', '12345678901', link = 'ACM DL (identifier)' },
{ 'ADB', 1907, p.adbLink,'Biographical dictionaries', 'barton-sir-edmund-toby-71' },
{ 'admiralty', 3562, p.admiraltyLink, 'Lighthouse identifiers', 'D1204.1', prefix='[[Admiralty number|Admiralty]]'},
{ 'AGSA', 6804, p.agsaLink, 'Art galleries and museums', '3625' },
{ 'ARLHS', 2980, p.ARLHSLink, 'Lighthouse identifiers', 'LAT023'},
{ 'autores.uy', 2558, p.autoresuyLink, 'Biographical dictionaries', '12345' },
{ 'AWR', 4186, p.awrLink, 'Biographical dictionaries', 'PR00768b' },
{ 'BIBSYS', 1015, p.bibsysLink, 'National libraries', '1234567890123' },
{ 'Bildindex', 2092, p.bildLink, 'Art research institutes', '1' },
{ 'BNC', 1890, p.bncLink, 'National libraries', '123456789' },
{ 'BNE', 950, p.bneLink, 'National libraries', 'XX1234567' },
{ 'BNF', 268, p.bnfLink, 'National libraries', '123456789' },
{ 'BNMM', 3788, p.bnmmLink, 'National libraries', '000024044' },
{ 'Botanist', 428, p.botanistLink , 'Scientific databases', 'L.' },
{ 'BPN', 651, p.bpnLink , 'Biographical dictionaries', '12345678' },
{ 'CANTIC', 1273, p.canticLink, 'National libraries', 'a12345678' },
{ 'CANTICN', 9984, p.canticnLink, 'National libraries', '981058515460906706' },
{ 'CCG', 3920, p.ccgLink, 'Lighthouse identifiers', 'A1761', prefix='[[CCG (identifier)|CCG]]' },
{ 'CINII', 271, p.ciniiLink, 'Scientific databases', 'DA12345678', link = 'CiNii (identifier)' },
{ 'CWGC', 1908, p.cwgcLink, 'Other', '1234567' },
{ 'DAAO', 1707, p.daaoLink, 'Art research institutes', 'rolf-harris' },
{ 'DBLP', 2456, p.dblpLink, 'Scientific databases', '123/123' },
{ 'DIB', 6829, p.dibLink, 'Biographical dictionaries', '001953' },
{ 'DSI', 2349, p.dsiLink, 'Art research institutes', '1538' },
{ 'DTBIO', 7902, p.dtbioLink, 'Biographical dictionaries', '118554700' },
{ 'EMU', 4613, p.emuLink, 'National libraries', '15409' },
{ 'FAST', 2163, p.fastLink, 'Other', '1' },
{ 'FNZA', 6792, p.fnzaLink, 'Art research institutes', '12' },
{ 'GND', 227, p.gndLink, 'National libraries', '4079154-3' },
{ 'Google Scholar', 1960, p.googleLink, 'Scientific databases', 'QPdLuj8AAAAJ' },
{ 'HDS', 902, p.hdsLink, 'Other', '050123' },
{ 'IAAF', 1146, p.iaafLink, 'Other', '123' },
{ 'ICCU', 396, p.iccuLink, 'National libraries', 'CFIV000163' }, --formerly SBN
{ 'ICIA', 1736, p.iciaLink, 'Art research institutes', '1' },
{ 'IEU', 9070, p.ieuLink, 'Other', 'N\\A\\NationalAcademyofArtandArchitecture' },
{ 'ISNI', 213, p.isniLink, 'General', '0000-0000-6653-4145', prefix = '[[ISNI (identifier)|ISNI]]' },
{ 'J9U', 8189, p.j9uLink, 'National libraries', '987007305652505171' },
{ 'Joconde', 347, p.jocondeLink, 'Art research institutes', '12345678901' },
{ 'KULTURNAV', 1248, p.kulturnavLink, 'Art research institutes', '12345678-1234-1234-1234-1234567890AB', link = 'KulturNav (identifier)' },
{ 'LCCN', 244, p.lccnLink, 'National libraries', 'n78039510' },
{ 'LIR', 886, p.lirLink, 'Other', '1' },
{ 'LNB', 1368, p.lnbLink, 'National libraries', '123456789' },
{ 'Marina Militare', 3863, p.marinaMilitareLink, 'Lighthouse identifiers', '3856' },
{ 'MarineTraffic', 3601, p.mtLink, 'Lighthouse identifiers', '1000004707' },
{ 'MATHSN', 4955, p.mathsnLink, 'Scientific databases', '175270' },
{ 'MBA', 434, p.mbaLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz' }, --special cat name
{ 'MBAREA', 982, p.mbareaLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz area' }, --special cat name
{ 'MBI', 1330, p.mbiLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz instrument' }, --special cat name
{ 'MBL', 966, p.mblLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz label' }, --special cat name
{ 'MBP', 1004, p.mbpLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz place' }, --special cat name
{ 'MBRG', 436, p.mbrgLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz release group' }, --special cat name
{ 'MBS', 1407, p.mbsLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz series' }, --special cat name
{ 'MBW', 435, p.mbwLink, 'Other', '12345678-1234-1234-1234-1234567890AB', category = 'MusicBrainz work' }, --special cat name
{ 'MGP', 549, p.mgpLink, 'Scientific databases', '123456' },
{ 'NARA', 1225, p.naraLink, 'Other', '12345678' },
{ 'NCL', 1048, p.nclLink, 'National libraries', '1081436' },
{ 'NDL', 349, p.ndlLink, 'National libraries', '012345678' },
{ 'NGA', 3563, p.ngaLink, 'Lighthouse identifiers', '114-5592'},
{ 'NGV', 2041, p.ngvLink, 'Art galleries and museums', '12354' },
{ 'NKC', 691, p.nkcLink, 'National libraries', 'abcd12345678901234' },
{ 'NLA', 409, p.nlaLink, 'National libraries', '123456789012' },
{ 'NLG', 3348, p.nlgLink, 'National libraries', '12345678' },
{ 'NLK', 5034, p.nlkLink, 'National libraries', 'KAB197000000' },
{ 'NLP', 1695, p.nlpLink, 'National libraries', '9810123456789012345' },
{ 'NLR', 1003, p.nlrLink, 'National libraries', '123456789' },
{ 'NSK', 1375, p.nskLink, 'National libraries', '123456789' },
{ 'NTA', 1006, p.ntaLink, 'National libraries', '12345678X' },
{ 'ORCID', 496, p.orcidLink, 'General', '0000-0002-7398-5483', prefix = '[[ORCID (identifier)|ORCID]]' },
{ 'PIC', 2750, p.picLink, 'Art research institutes', '1' },
{ 'PLWABN', 7293, p.plwabnLink, 'National libraries', '9812345678905606' },
{ 'Publons', 3829, p.publonsLink, 'Scientific databases', '2776255' },
{ 'RID', 1053, p.ridLink, 'Scientific databases', 'A-1234-1934' },
{ 'RISM', 5504, p.rismLink, 'Other', 'pe1', prefix = '[[RISM (identifier)|RISM (France)]]' },
{ 'RERO', 3065, p.reroLink, 'Other', '02-A012345678', prefix = '[[RERO (identifier)|RERO (Switzerland)]]' },
{ 'RKDartists', 650, p.rkdartistsLink, 'Art research institutes', '123456' },
{ 'RKDID', 350, p.rkdidLink, 'Art research institutes', '123456' },
{ 'RSL', 947, p.rslLink, 'National libraries', '123456789' },
{ 'Scopus', 1153, p.scopusLink, 'Scientific databases', '7005487412' },
{ 'SELIBR', 906, p.selibrLink, 'National libraries', '123456' },
{ 'SIKART', 781, p.sikartLink, 'Art research institutes', '123456789' },
{ 'SNAC-ID', 3430, p.snacLink, 'Other', 'A' },
{ 'SUDOC', 269, p.sudocLink, 'Other', '026927608', prefix = '[[SUDOC (identifier)|SUDOC (France)]]' },
{ 'TA98', 1323, p.ta98Link, 'Scientific databases', 'A12.3.45.678' },
{ 'TDVİA', 7314, p.tdviaLink, 'Other', 'asim-b-behdele' },
{ 'TePapa', 3544, p.tepapaLink, 'Art galleries and museums', '1' },
{ 'TLS', 1362, p.tlsLink, 'Other', 'Abcd' },
{ 'Trove', 1315, p.troveLink, 'Other', '12345678', prefix = '[[Trove (identifier)|Trove (Australia)]]' }, --formerly NLA-person
{ 'UKPARL', 6213, p.ukparlLink, 'Other', 'AQUupyiR' },
{ 'ULAN', 245, p.ulanLink, 'Art research institutes', '500123456' },
{ 'USCG', 3723, p.uscgLink, 'Lighthouse identifiers', '6-0695'},
{ 'USCongress', 1157, p.uscongressLink, 'Other', 'A000123', link = 'US Congress (identifier)' },
{ 'VcBA', 8034, p.vcbaLink, 'National libraries', '494/9793' },
{ 'VIAF', 214, p.viafLink, 'General', '123456789', prefix = '[[VIAF (identifier)|VIAF]]' },
{ 'WORLDCATID', 7859, p.worldcatidLink, 'General', 'lccn-n78-95332', link = 'WorldCat Identities (identifier)' },
{ 'ZBMATH', 1556, p.zbmathLink, 'Scientific databases', 'turing.alan-m' },
}
-- Legitimate aliases to p.conf, for convenience
-- Format: { 'alias', 'parameter name in p.conf' }
p.aliases = {
{ 'DNB', 'GND' }, --Deutsche Nationalbibliothek -> Gemeinsame Normdatei
{ 'MusicBrainz', 'MBA' },
{ 'MusicBrainz artist', 'MBA' },
{ 'MusicBrainz label', 'MBL' },
{ 'MusicBrainz release group', 'MBRG' },
{ 'MusicBrainz work', 'MBW' },
{ 'SBN', 'ICCU' }, --SBN alias to be deprecated at a later stage
{ 'TDVIA', 'TDVİA' }, --alias name without diacritics
{ 'tdvia', 'TDVİA' }, --lowercase variant without diacritics
}
-- Deprecated aliases to p.conf; tracked in [[Category:Articles with deprecated authority control identifiers]]
-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' }
p.deprecated = {
{ 'GKD', 'GND' },
{ 'PND', 'GND' },
{ 'RLS', 'RSL' },
{ 'SWD', 'GND' },
{ 'NARA-organization', 'NARA' },
{ 'NARA-person', 'NARA' },
}
--[[==========================================================================]]
--[[ Main ]]
--[[==========================================================================]]
function p.authorityControl( frame )
local resolveEntity = require( 'Module:ResolveEntityId' )
local parentArgs = frame:getParent().args --WD IDs added here later
local iParentArgs = 0 --count original/manual parent args only later
local worldcatCat = ''
local elementsCat = ''
local multipleIdCat = ''
local suppressedIdCat = ''
local suppressedIdCatArts = ''
local deprecatedIdCat = ''
local differentOnWDCat = ''
local sameOnWDCat = ''
local stateCat = ''
--redirect aliases to proper parameter names
for _, a in pairs( p.aliases ) do
local alias, param = a[1], a[2]
if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[alias] then
parentArgs[param] = parentArgs[alias]
end
end
--redirect deprecated parameters to proper parameter names, and assign tracking cat
for _, d in pairs( p.deprecated ) do
local dep, param = d[1], d[2]
if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[dep] then
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[Category:Articles with deprecated authority control identifiers|'..dep..']]'
end
end
end
--use QID= parameter for testing/example purposes only
local itemId = nil
if namespace ~= 0 then
local qid = parentArgs['qid'] or parentArgs['QID']
if qid then
itemId = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '')
itemId = resolveEntity._id(itemId) --nil if unresolvable
end
elseif mw.wikibase then
itemId = mw.wikibase.getEntityIdForCurrentPage()
end
--Wikidata fallback if available
if itemId then
local suppressedIdCount = 0
local iMatches = 0
for _, params in ipairs( p.conf ) do
if params[2] > 0 then
local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]
if val == nil or val == '' then
local wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[2] )
if wikidataIds[1] then
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[Category:Articles with suppressed authority control identifiers|'..params[1]..']]'
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
end
end
else
iParentArgs = iParentArgs + 1
local wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[2] )
if wikidataIds[1] and differentOnWDCat == '' then
local bMatch = false
for _, wd in pairs( wikidataIds ) do
if val == wd then
iMatches = iMatches + 1
bMatch = true
end
end
if bMatch == false then
differentOnWDCat = '[[Category:Pages using authority control with parameters different on Wikidata|'..params[1]..']]'
end end end end end
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[Category:Pages using authority control with parameters all matching Wikidata]]'
end
if parentArgs['arts'] == 'arts' and suppressedIdCount > 0 then
if namespace == 0 or testcases then
local s = 's'
if suppressedIdCount == 1 then s = '' end
local sCat = 'ACArt with '..suppressedIdCount..' suppressed element'..s
suppressedIdCatArts = addCat(sCat)
end
end
end
--configure rows
local rct = 0
local sectionOrder = {
'General',
'National libraries',
'Art galleries and museums',
'Art research institutes',
'Biographical dictionaries',
'Scientific databases',
'Lighthouse identifiers',
'Other'
}
local sections = {
['General'] = {},
['National libraries'] = {},
['Art galleries and museums'] = {},
['Art research institutes'] = {},
['Biographical dictionaries'] = {},
['Scientific databases'] = {},
['Lighthouse identifiers'] = {},
['Other'] = {}
}
--don't show CANTIC if CANTICN is present, since they both go to the Library of Catalonia
--and the library has deprecated CANTIC IDs in favor of CANTICN IDs
if parentArgs.CANTICN or parentArgs.canticn then
parentArgs.CANTIC = ''
parentArgs.cantic = ''
end
--don't show NLP if PLWABN is present, since they both go to the National Library of Poland
--and the library has deprecated NLP IDs in favor of PLWABN IDs
if parentArgs.PLWABN or parentArgs.plwabn then
parentArgs.NLP = ''
parentArgs.nlp = ''
end
for _, params in ipairs( p.conf ) do
local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]
local tval, tlinks = {}, {} --init tables
if val and val ~= '' and type(params[3]) == 'function' then
table.insert( tval, val )
if params.prefix then
table.insert( tlinks, params[3]( val, '1' ) )
else
table.insert( tlinks, params[3]( val ) )
end
end
--collect other unique vals (IDs) from WD, if present
if itemId and tval[1] then
local nextIdVal = 2
local wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[2] )
for _, v in pairs( wikidataIds ) do
local bnew = true
for _, w in pairs( tval ) do
if v == w then bnew = false end
end
if bnew then
table.insert( tval, v )
table.insert( tlinks, params[3]( v, tostring(nextIdVal) ) )
nextIdVal = nextIdVal + 1
end
end
end
--assemble
if tval[1] then
table.insert( sections[params[4]], p.createRow( params[1], tval, nil, tlinks, true, params.category, params.prefix) )
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( 'multiple' )
end
end
end
--WorldCat-VIAF & WorldCat-LCCN
local worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']
if worldcatId == nil then --if WORLDCATID absent but unsuppressed
local viafId = parentArgs['viaf'] or parentArgs['VIAF']
local lccnId = parentArgs['lccn'] or parentArgs['LCCN']
if viafId and viafId ~= '' and p.viafLink( viafId ) then --VIAF must be present, unsuppressed, & validated
table.insert( sections['General'], p.createRow( 'VIAF', viafId, '[https://www.worldcat.org/identities/containsVIAFID/'..viafId..' WorldCat (via VIAF)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[Category:Articles with WorldCat-VIAF identifiers]]'
end
rct = rct + 1
elseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validated
local lccnParts = p.splitLccn( lccnId )
if lccnParts and lccnParts[1] ~= 'sh' then
local lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]
table.insert( sections['General'], p.createRow( 'LCCN', lccnId, '[https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' WorldCat (via Library of Congress)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[Category:Articles with WorldCat-LCCN identifiers]]'
end
end
rct = rct + 1
end
end
--configure Navbox
local outString = ''
local extrap = true
local extra = parentArgs.extralist
if extra == nil or extra == '' then
extrap = false
end
if rct > 0 or extrap then
local Navbox = require('Module:Navbox')
local sectionID = 1
local args = { pid = 'identifiers' } -- #target the list of identifiers
if testcases and itemId then args.qid = itemId end --expensive
local pencil = require('Module:EditAtWikidata')._showMessage(args)
local navboxArgs = {
name = 'Authority control',
navboxclass = 'authority-control',
bodyclass = 'hlist',
state = parentArgs.state or 'autocollapse',
navbar = 'off'
}
for _, sectName in ipairs(sectionOrder) do
if #sections[sectName] ~= 0 then
navboxArgs['group'..sectionID] = sectName
navboxArgs['list'..sectionID] = table.concat(sections[sectName])
sectionID = sectionID + 1
end
end
if extrap then
if parentArgs.extragroup then
navboxArgs['group'..sectionID] = parentArgs.extragroup
else
navboxArgs['group'..sectionID] = 'Additional'
end
navboxArgs['list'..sectionID] = extra
sectionID = sectionID + 1
end
if navboxArgs.list2 then
navboxArgs.title = '[[Help:Authority control|Authority control]]'..pencil
else
local sect = navboxArgs.group1
if sect == 'General' or sect == 'Other' or sect == 'Additional' then
-- Just say "Authority control" with no label if only general or only other IDs are present
-- since "general" is redundant and "other" is silly when there's nothing to contrast it with
navboxArgs.group1 = '[[Help:Authority control|Authority control]]'..pencil
else
navboxArgs.group1 = '[[Help:Authority control|Authority control: '..sect..']] '..pencil
end
end
outString = Navbox._navbox(navboxArgs)
end
--auxCats
if rct == 0 or rct >= 25 then
if namespace == 0 or testcases then
local eCat = 'AC with '..rct..' elements'
elementsCat = addCat(eCat)
end
end
if parentArgs.state then
if namespace == 0 or testcases then
local sCat
if parentArgs.state == 'collapsed' then sCat = 'AC using state parameter: collapsed'
elseif parentArgs.state == 'expanded' then sCat = 'AC using state parameter: expanded'
elseif parentArgs.state == 'autocollapse' then sCat = 'AC using state parameter: autocollapse'
else sCat = 'AC using state parameter: other'
end
stateCat = addCat(sCat)
end
end
local auxCats = worldcatCat..elementsCat..multipleIdCat..suppressedIdCat..suppressedIdCatArts..
deprecatedIdCat..differentOnWDCat..sameOnWDCat..stateCat
if testcases then
auxCats = mw.ustring.gsub(auxCats, '(%[%[)(Category)', '%1:%2') --for easier checking
end
--out
outString = outString..auxCats
if namespace ~= 0 then
outString = mw.ustring.gsub(outString, '(%[%[)(Category:Articles)', '%1:%2') --by definition
end
return outString
end
return p
hml9am1fcoeeliry3ls8pq1q9zs9meu
Module:Catalog lookup link
828
57923154
968117896
884931331
2020-07-17T10:11:36Z
Trappist the monk
10289486
fix lock icon css class;
Scribunto
text/plain
--[[
|1=, |2=, |3=, |4=, |5=, |6=, |7=, |8=, |9=: Optional unnamed parameters for 0 to 9 items to be listed.
Whitespace is trimmed off both ends and the strings are urlencoded as if they were query strings.
|article-link=: Optional Wikipedia article name to link to.
|article-name=: Optional alternative text to be displayed for |article-link= link in front of catalog link.
If not specified, |article-link= is used for display as well. If both parameters are not specified, the prefix is omitted completely.
|article-suffix=: Optional symbol to be displayed after article name or link (f.e. ":"; omitted, if not defined).
|link-prefix=: Optional prefix portion of url to external catalog item(s).
|link-suffix=: Optional suffix portion of url to external catalog item(s).
|item-prefix=: Optional text displayed in front of each external link (omitted, if not defined)
|item-suffix=: Optional text displayed immediately after each external link (omitted, if not defined)
|list-separator=: Optional alternative separator displayed between list items (default: ", ", if not specified). Whitespace must be encoded.
|list-leadout=: Optional alternative leadout text displayed between the last two list items (f.e. "and", "or", "as well as", etc., default is the |list-separator= or ", ".)
|leadout-suffix=: Optional alternative suffix text of the leadout (see |list-leadout=) displayed between the last two list items.
This gets added in front of the last list item instead of the default whitespace which is added without this parameter.
This may be necessary if |list-separator= is used not only to define the list separator but also parts of the item prefix
(except for the first one). (At present, this is used only to cope with format oddities of the {{MR}} template.)
new parameters that support access icons:
|allowed_icons= – comma-separated list of keywords: free, limited, registration, subscription, none, all (default; 'all' implied when this parameter empty or omitted)
the icons specified in the following parameters are checked agains the list in |allowed-icons=; not in the list? not displayed
|url-access-all= – applies specified icon to all items in the list; accepted keywords: free, limited, registration, subscription;
|url-accessn= – applies specified icon to item n of the list (the nth positional parameter); accepted keywords: free, limited, registration, subscription;
]]
require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['free'] = {'id-lock-free', 'Freely accessible'},
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
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
--[=[-------------------------< M A K E _ L A B E L >----------------------------------------------------------
Makes a wikilinked or plain text label from arguments; when both link and display text is provided, makes a
wikilink in the form [[L|D]]; if only link is provided, makes a wikilinked label in the form [[L]]; if only display
is provided, makes a plain-text label; if neither are provided makes a label from suffix, returns an empty string else.
]=]
local function make_label (link, display, suffix)
local label = '';
if is_set (link) then
if is_set (display) then
label = table.concat ({'[[', link, '|', display, ']]'}); -- make [[L|D]] wikilinked label
else
label = table.concat ({'[[', link, ']]'}); -- make [[L]] wikilinked label
end
elseif is_set (display) then
label = display; -- plain-text label
end
if is_set (label) then
return table.concat ({label, suffix, ' '}); -- assemble the complete label
else
return suffix; -- no space after suffix if no label
end
end
--[[--------------------------< I C O N _ I N D E X _ G E T >--------------------------------------------------
returns index into lock_icons[] if value assigned to |url-access= or |url-access-all= is a valid icon selector
(free, limited, registration, subscription)
icon selection may be limited to a subset of the icons with:
|allow_icons=<comma-separated list of allowed icons>
<comma-separated list of allowed icons> may be any of the keywords: free, limited, registration, subscription, none, all
keyword 'all' is default condition; 'all' is implied when |allowed=icons= is empty or omitted
keyword 'none' for use with identifiers where icons are inappropriate (isbn, issn, oclc)
Templates using this module should set:
|allow_icons=free for most identifiers;
|allow_icons=none for isbn, issn, oclc, etc
|url-access= is alias of |url-access1=
]]
local function icon_index_get (args, k)
local icon;
local param_name = (1 == k and is_set (args['url-access']) and 'url-access') or table.concat ({'url-access', k}); -- make an enumerated parameter name
if is_set (args['url-access-all']) and lock_icons[args['url-access-all']] then -- if set and valid
icon = args['url-access-all']; -- tentatively
elseif is_set (args[param_name]) and lock_icons[args[param_name]] then -- if set and valid
icon = args[param_name]; -- tentatively
else
return nil; -- neither |url-access-all= nor |url-accessn= set so return nil
end
if args['allow_icons'] and args['allow_icons']:find ('none') then -- if 'none' keyword is present
return nil; -- icons display not allowed
end
if not is_set (args['allow_icons']) or args['allow_icons']:find ('all') or args['allow_icons']:find (icon) then --if all allowed or specified icon is allowed
return icon; -- return selected icon as index into icon table
end
end
--[[--------------------------< M A I N >----------------------------------------------------------------------
Template entrypoint to this module; arguments come primarily from the parent frame though in templates that use
this module, |allowed-icons= is typically set, if needed, in the {{#invoke:}}.
]]
local function main (frame)
local args = getArgs (frame);
local out_text = '';
if is_set(args[1]) then
local result = {};
local label;
local article_suffix = args['article-suffix'] or args['article-postfix'] or '';
local link_prefix = args['link-prefix'] or '';
local link_suffix = args['link-suffix'] or args['link-postfix'] or '';
local item_prefix = args['item-prefix'] or '';
local item_suffix = args['item-suffix'] or args['item-postfix'] or '';
local list_separator = args['list-separator'] or ', ';
local leadout_suffix = args['leadout-suffix'] or args['leadout-postfix'] or ' ';
local list_leadout;
local icon_index;
if is_set (args['list-leadout']) then
list_leadout = table.concat ({
mw.ustring.gsub (args['list-leadout'], '^(%a)', ' %1'), -- insert leading space if first character is a letter
leadout_suffix,
});
else
list_leadout = '';
end
label = make_label (args['article-link'], args['article-name'], article_suffix);
for k, item in ipairs (args) do -- for each of the positional parameters
item = mw.text.trim (item); -- remove extraneous whitespace
if is_set (link_prefix) then -- if there is link prefix...
item = table.concat ({ -- create an external link item
'[', -- open ext link markup
link_prefix, -- url prefix
mw.uri.encode (item), -- item is part of url
link_suffix, -- url suffix
' ', -- required space between url and label
item_prefix, -- label prefix
item, -- item as label
item_suffix, -- item suffix
']' -- close ext link markup
});
icon_index = icon_index_get (args, k); -- set if icon specified and allowed for this item; nil else
if icon_index then
item = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[icon_index][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[icon_index][2], -- for an appropriate tool tip
'">', -- close the opening span tag
item,
'</span>', -- and close the span
});
end
else
item = table.concat ({ -- create an unlinked item
item_prefix, -- label prefix
item, -- item as label
item_suffix, -- item suffix
});
end
table.insert (result, item); -- add the item to the result list
end
if is_set (args['list-leadout']) then
out_text = table.concat ({label, mw.text.listToText (result, list_separator, list_leadout)});
else
out_text = table.concat ({label, table.concat (result, list_separator)});
end
end --is_set (args[1])
return out_text
end
return {main = main};
afhatnamr2i3fuucagrgsakx2kl7zso
Module:Category handler
828
39772274
948472489
948472486
2020-04-01T06:12:40Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- 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" --> namespace params --> "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 >= 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 < 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
letwavu3yvlayfzew66uuwixmwebq5b
Module:Category handler/blacklist
828
43232926
951673917
948472491
2020-04-18T08:48:05Z
Jo-Jo Eumerus
17449355
Per category talk page
Scribunto
text/plain
-- 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+$",
}
fsv1drcay6t25e91hzhqxtyp7pckbpx
Module:Category handler/config
828
42291997
948472494
894414603
2020-04-01T06:12:40Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
--------------------------------------------------------------------------------
-- [[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.
6ga9hbq2pdwalsvx68i53dmbr421rq5
Module:Category handler/data
828
43233647
948472496
894414581
2020-04-01T06:12:41Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
-- 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
k26mwixuaeijisfddb0sxkg82iux8v4
Module:Category handler/shared
828
43232937
948472498
894414384
2020-04-01T06:12:41Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
-- 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
omlsnhudxz6juptvtxz7ns97jutbzc5
Module:Check for unknown parameters
828
42286729
1073136630
1055951540
2022-02-21T05:24:13Z
BusterD
346148
Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
Scribunto
text/plain
-- 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) > 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) .. '<' .. tag .. '>...</' .. tag .. '>')
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
-- create the list of known args, regular expressions, and the return string
local knownargs = {}
local regexps = {}
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
-- loop over the parent args, and make sure they are on the list
local ignoreblank = isnotempty(args['ignoreblank'])
local showblankpos = isnotempty(args['showblankpositional'])
local values = {}
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 then
local knownflag = false
for _, regexp in ipairs(regexps) do
if mw.ustring.match(tostring(k), regexp) then
knownflag = true
break
end
end
if not knownflag and ( showblankpos or isnotempty(v) ) then
table.insert(values, k .. ' = ' .. clean(v))
end
end
end
-- add results to the output tables
local res = {}
if #values > 0 then
local unknown_text = args['unknown'] or 'Found _VALUE_, '
if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then
local preview_text = args['preview']
if isnotempty(preview_text) then
preview_text = require('Module:If preview')._warning({preview_text})
elseif preview == nil then
preview_text = unknown_text
end
unknown_text = preview_text
end
for _, v in pairs(values) do
-- Fix odd bug for | = which gets stripped to the empty string and
-- breaks category links
if v == '' then v = ' ' end
-- avoid error with v = 'example%2' ("invalid capture index")
local r = unknown_text: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
h9rooqvu67gk81cpbiswol48lpmwmym
Module:Check isxn
828
47420247
783139241
712698918
2017-05-31T10:38:54Z
The Anome
76
Changed protection level for "[[Module:Check isxn]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
Scribunto
text/plain
-- This template is a copy of the ISXN validation code from [[Module:Citation/CS1]]
-- which allows for validating ISBN, ISMN, and ISSN without invoking a citation template
local p = {}
--[[--------------------------< IS _ V A L I D _ I S X N >-----------------------------------------------------
ISBN-10 and ISSN validator code calculates checksum across all isbn/issn digits including the check digit. ISBN-13 is checked in check_isbn().
If the number is valid the result will be 0. Before calling this function, issbn/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
--[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >----------------------------------------------
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
--[[--------------------------< C H E C K _ I S B N >------------------------------------------------------------
Determines whether an ISBN string is valid
]]
local function check_isbn( isbn_str, error_string )
if nil ~= isbn_str:match("[^%s-0-9X]") then -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X
return error_string;
end
isbn_str = isbn_str:gsub( "-", "" ):gsub( " ", "" ); -- remove hyphens and spaces
local len = isbn_str:len();
if len ~= 10 and len ~= 13 then
return error_string;
end
if len == 10 then
if isbn_str:match( "^%d*X?$" ) == nil then
return error_string;
end
return is_valid_isxn(isbn_str, 10) and '' or error_string;
else
local temp = 0;
if isbn_str:match( "^97[89]%d*$" ) == nil then -- isbn13 begins with 978 or 979; ismn begins with 979
return error_string;
end
return is_valid_isxn_13 (isbn_str) and '' or error_string;
end
end
--[[--------------------------< C H E C K _ I S M N >------------------------------------------------------------
Determines whether an ISMN string is valid. Similar to isbn-13, ismn is 13 digits begining 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 check_ismn (id, error_string)
local text;
local valid_ismn = true;
id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the ismn
if 13 ~= id:len() or id:match( "^9790%d*$" ) == nil then -- ismn must be 13 digits and begin 9790
valid_ismn = false;
else
valid_ismn=is_valid_isxn_13 (id); -- validate ismn
end
return valid_ismn and '' or error_string
end
--[[--------------------------< I S S N >----------------------------------------------------------------------
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.
]]
local function check_issn(id, error_string)
local issn_copy = id; -- save a copy of unadulterated issn; use this version for display if issn does not validate
local text;
local valid_issn = true;
if not id:match ('^%d%d%d%d%-%d%d%d[%dX]$') then
return error_string;
end
id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the issn
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
return valid_issn and '' or error_string
end
------------------------------< E N T R Y P O I N T S >--------------------------------------------------====
function p.check_isbn(frame)
return check_isbn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error')
end
function p.check_ismn(frame)
return check_ismn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error')
end
function p.check_issn(frame)
return check_issn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error')
end
return p
m39a8k5gmtbg6x3k2f7rizj3jk5on20
Module:Citation/CS1
828
38573037
1096003161
1068074133
2022-07-01T17:45:25Z
Trappist the monk
10289486
sync from sandbox;
Scribunto
text/plain
require ('Module:No globals');
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
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
--[[------------------< P A G E S C O P E V A R I A B L E S >---------------
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 added_generic_name_errs; -- Boolean flag so we only emit one generic name error / category and stop testing names once an error is encountered
local Frame; -- holds the module's frame table
local is_preview_mode; -- true when article is in preview mode; false when using 'Preview page with this template' (previewing the module)
local is_sandbox; -- true when using sandbox modules to render citation
--[[--------------------------< F I R S T _ S E T >------------------------------------------------------------
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 <= 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
--[[--------------------------< A D D _ V A N C _ E R R O R >----------------------------------------------------
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, position)
if added_vanc_errs then return end
added_vanc_errs = true; -- note that we've added this category
utilities.set_message ('err_vancouver', {source, position});
end
--[[--------------------------< I S _ S C H E M E >------------------------------------------------------------
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
--[=[-------------------------< I S _ D O M A I N _ N A M E >--------------------------------------------------
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
--[[--------------------------< I S _ U R L >------------------------------------------------------------------
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
--[[--------------------------< S P L I T _ U R L >------------------------------------------------------------
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
--[[--------------------------< L I N K _ P A R A M _ O K >---------------------------------------------------
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:
# < > [ ] | { } _
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
|<param>-link= parameter is ok); else false when value appears to be a valid URL (the |<param>-link= parameter is NOT ok).
]]
local function link_param_ok (value)
local scheme, domain;
if value:find ('[<>%[%]|{}]') 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
--[[--------------------------< L I N K _ T I T L E _ O K >---------------------------------------------------
Use link_param_ok() to validate |<param>-link= value and its matching |<title>= value.
|<title>= may be wiki-linked but not when |<param>-link= has a value. This function emits an error message when
that condition exists
check <link> 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 <param>-link doesn't have a value
if not link_param_ok (link) then -- check |<param>-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
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
--[[--------------------------< C H E C K _ U R L >------------------------------------------------------------
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
--[=[-------------------------< I S _ P A R A M E T E R _ E X T _ W I K I L I N K >----------------------------
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
--[[-------------------------< C H E C K _ F O R _ U R L >-----------------------------------------------------
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, error_list)
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
table.insert (error_list, utilities.wrap_style ('parameter', k));
end
end
end
--[[--------------------------< S A F E _ F O R _ U R L >------------------------------------------------------
Escape sequences for content that will be used for URL descriptions
]]
local function safe_for_url( str )
if str:match( "%[%[.-%]%]" ) ~= nil then
utilities.set_message ('err_wikilink_in_url', {});
end
return str:gsub( '[%[%]\n]', {
['['] = '[',
[']'] = ']',
['\n'] = ' ' } );
end
--[[--------------------------< E X T E R N A L _ L I N K >----------------------------------------------------
Format an external link with error checking
]]
local function external_link (URL, label, source, access)
local err_msg = '';
local domain;
local path;
local base_url;
if not utilities.is_set (label) then
label = URL;
if utilities.is_set (source) then
utilities.set_message ('err_bare_url_missing_title', {utilities.wrap_style ('parameter', source)});
else
error (cfg.messages["bare_url_no_origin"]);
end
end
if not check_url (URL) then
utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)});
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 base_url;
end
--[[--------------------------< D E P R E C A T E D _ P A R A M E T E R >--------------------------------------
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
utilities.set_message ('err_deprecated_params', {name}); -- add error message
end
end
--[=[-------------------------< K E R N _ Q U O T E S >--------------------------------------------------------
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 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-left'], str);
str = utilities.substitute (cfg.presentation['kern-right'], str);
elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks
str = utilities.substitute (cfg.presentation['kern-left'], str);
elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks
str = utilities.substitute (cfg.presentation['kern-right'], str);
end
else -- plain text or [[L|D]]; text in label variable
label = mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark)
label = mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark)
cap = 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);
end
cap = 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);
end
if 2 == wl_type then
str = utilities.make_wikilink (link, label); -- reassemble the wikilink
else
str = label;
end
end
return str;
end
--[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >----------------------------------------
|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 <bdi>...</bdi> 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 <bdi> 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-<periodical>=
]]
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
utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing title part']}); -- 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', {name, lang})
else
utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['unknown language code']}); -- unknown script-language; add error message
end
lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute
else
utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['invalid language code']}); -- invalid language code; add error message
lang = ''; -- invalid so set lang to empty string
end
else
utilities.set_message ('err_script_parameter', {script_param, cfg.err_msg_supl['missing prefix']}); -- 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
--[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------
Initially for |title= and |script-title=, this function concatenates those two parameter values after the script
value has been wrapped in <bdi> tags.
]]
local function script_concatenate (title, script, script_param)
if utilities.is_set (script) then
script = format_script_value (script, script_param); -- <bdi> 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
--[[--------------------------< W R A P _ M S G >--------------------------------------------------------------
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
--[[----------------< W I K I S O U R C E _ U R L _ M A K E >-------------------
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
--[[----------------< F O R M A T _ P E R I O D I C A L >-----------------------
Format the three periodical parameters: |script-<periodical>=, |<periodical>=,
and |trans-<periodical>= into a single Periodical meta-parameter.
]]
local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical)
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); -- <bdi> 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;
utilities.set_message ('err_trans_missing_title', {'periodical'});
end
end
return periodical;
end
--[[------------------< F O R M A T _ C H A P T E R _ T I T L E >---------------
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 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 separators 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); -- <bdi> 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 .. ' ', '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-<param>
utilities.set_message ('err_trans_missing_title', {chapter_source});
end
end
return chapter;
end
--[[----------------< H A S _ I N V I S I B L E _ C H A R S >-------------------
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 capture; -- used by stripmarker detection to hold name of the stripmarker
local stripmarker; -- boolean set true when a stripmarker is found
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
for _, invisible_char in ipairs (cfg.invisible_chars) do
local char_name = invisible_char[1]; -- the character or group name
local pattern = invisible_char[2]; -- the pattern used to find it
position, _, capture = mw.ustring.find (v, pattern); -- see if the parameter value contains characters that match the pattern
if position and (cfg.invisible_defs.zwj == capture) 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
elseif cfg.emoji[mw.ustring.codepoint (v, position+1)] then -- is zwj followed by a character listed in emoji{}?
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 cfg.invisible_defs.del == capture 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 and not (cfg.invisible_defs.del == capture or cfg.invisible_defs.zwj == capture) then
err_msg = capture .. ' ' .. char_name;
else
err_msg = char_name .. ' ' .. 'character';
end
utilities.set_message ('err_invisible_char', {err_msg, utilities.wrap_style ('parameter', param), position}); -- add error message
return; -- and done with this parameter
end
end
end
end
--[[-------------------< A R G U M E N T _ W R A P P E R >----------------------
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
--[[--------------------------< N O W R A P _ D A T E >-------------------------
When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>.
When date is DD MMMM YYYY or is MMMM DD, YYYY then wrap in nowrap span:
<span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> 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
--[[--------------------------< S E T _ T I T L E T Y P E >---------------------
This function sets default title types (equivalent to the citation including
|type=<default value>) 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
--[[--------------------------< S A F E _ J O I N >-----------------------------
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) == '<' then -- special case of values enclosed in spans and other markup.
comp = value:gsub( "%b<>", "" ); -- remove HTML markup (<span>string</span> -> 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 .. "<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 & |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 <sepc><space>
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<>)" .. 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
--[[--------------------------< I S _ S U F F I X >-----------------------------
returns true if 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
--[[--------------------< I S _ G O O D _ V A N C _ N A M E >-------------------
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 be 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. The module doesn't do this
so editors may/must.
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 & B)
\199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B)
]]
local function is_good_vanc_name (last, first, suffix, position)
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, position);
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'], position);
return false; -- not a string of Latin characters; Vancouver requires Romanization
end;
return true;
end
--[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------
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, position)
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 > 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, position); -- 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 < 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 > 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
--[[--------------------------< L I S T _ P E O P L E >--------------------------
Formats a list of people (authors, contributors, editors, interviewers, translators)
names in the list will be linked when
|<name>-link= has a value
|<name>-mask- does NOT have a value; masked names are presumed to have been
rendered previously so should have been linked there
when |<name>-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 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
else
sep = cfg.presentation['sep_nl']; -- name-list separator between names is a semicolon
namesep = cfg.presentation['sep_name']; -- last/first separator is <comma><space>
end
if sep:sub (-1, -1) ~= " " then sep = sep .. " " end
if utilities.is_set (maximum) and maximum < 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 > 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("—", n) or nil; -- make a string of (n > 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, nil, i) then -- and name is all Latin characters; corporate authors not tested
first = reduce_to_initials (first, i); -- 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 <one> 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 < count then
if 1 < count and not etal then
if 'amp' == format then
name_list[#name_list-2] = " & "; -- 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
--[[--------------------< M A K E _ C I T E R E F _ I D >-----------------------
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 make_citeref_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
--[[--------------------------< C I T E _ C L A S S _A T T R I B U T E _M A K E >------------------------------
construct <cite> tag class attribute for this citation.
<cite_class> – config.CitationClass from calling template
<mode> – value from |mode= parameter
]]
local function cite_class_attribute_make (cite_class, mode)
local class_t = {};
table.insert (class_t, 'citation'); -- required for blue highlight
if 'citation' ~= cite_class then
table.insert (class_t, cite_class); -- identify this template for user css
table.insert (class_t, utilities.is_set (mode) and mode or 'cs1'); -- identify the citation style for user css or javascript
else
table.insert (class_t, utilities.is_set (mode) and mode or 'cs2'); -- identify the citation style for user css or javascript
end
for _, prop_key in ipairs (z.prop_keys_t) do
table.insert (class_t, prop_key); -- identify various properties for user css or javascript
end
return table.concat (class_t, ' '); -- make a big string and done
end
--[[---------------------< N A M E _ H A S _ E T A L >--------------------------
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 its previous state because
it may have been set by previous passes through this function or by the associated
|display-<names>=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-<names>=etal)
if not nocat then -- no categorization for |vauthors=
utilities.set_message ('err_etal', {param}); -- and set an error if not added
end
end
end
end
return name, etal;
end
--[[---------------------< N A M E _ I S _ N U M E R I C >----------------------
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
--[[-----------------< N A M E _ H A S _ M U L T _ N A M E S >------------------
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 "unescaped"
semicolons. Escaped semicolons are ones used as part of selected HTML entities.
If the condition is met, the function adds the multiple name maintenance category.
returns nothing
]]
local function name_has_mult_names (name, list_name)
local _, commas, semicolons, nbsps;
if utilities.is_set (name) then
_, commas = name:gsub (',', ''); -- count the number of commas
_, semicolons = name:gsub (';', ''); -- count the number of semicolons
-- nbsps probably should be its own separate count rather than merged in
-- some way with semicolons because Lua patterns do not support the
-- grouping operator that regex does, which means there is no way to add
-- more entities to escape except by adding more counts with the new
-- entities
_, nbsps = name:gsub (' ',''); -- count nbsps
-- There is exactly 1 semicolon per entity, so subtract nbsps
-- from semicolons to 'escape' them. If additional entities are added,
-- they also can be subtracted.
if 1 < commas or 0 < (semicolons - nbsps) then
utilities.set_message ('maint_mult_names', cfg.special_case_translation [list_name]); -- add a maint message
end
end
end
--[=[-------------------------< I S _ G E N E R I C >----------------------------------------------------------
Compares values assigned to various parameters according to the string provided as <item> in the function call.
<item> can have on of two values:
'generic_names' – for name-holding parameters: |last=, |first=, |editor-last=, etc
'generic_titles' – for |title=
There are two types of generic tests. The 'accept' tests look for a pattern that should not be rejected by the
'reject' test. For example,
|author=[[John Smith (author)|Smith, John]]
would be rejected by the 'author' reject test. But piped wikilinks with 'author' disambiguation should not be
rejected so the 'accept' test prevents that from happening. Accept tests are always performed before reject
tests.
Each of the 'accept' and 'reject' sequence tables hold tables for en.wiki (['en']) and local.wiki (['local'])
that each can hold a test sequence table The sequence table holds, at index [1], a test pattern, and, at index
[2], a boolean control value. The control value 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.
Returns
true when a reject test finds the pattern or string
false when an accept test finds the pattern or string
nil else
]=]
local function is_generic (item, value, wiki)
local test_val;
local str_lower = { -- use string.lower() for en.wiki (['en']) and use mw.ustring.lower() or local.wiki (['local'])
['en'] = string.lower,
['local'] = mw.ustring.lower,
}
local str_find = { -- use string.find() for en.wiki (['en']) and use mw.ustring.find() or local.wiki (['local'])
['en'] = string.find,
['local'] = mw.ustring.find,
}
local function test (val, test_t, wiki) -- local function to do the testing; <wiki> selects lower() and find() functions
val = test_t[2] and str_lower[wiki](value) or val; -- when <test_t[2]> set to 'true', plaintext search using lowercase value
return str_find[wiki] (val, test_t[1], 1, test_t[2]); -- return nil when not found or matched
end
local test_types_t = {'accept', 'reject'}; -- test accept patterns first, then reject patterns
local wikis_t = {'en', 'local'}; -- do tests for each of these keys; en.wiki first, local.wiki second
for _, test_type in ipairs (test_types_t) do -- for each test type
for _, generic_value in pairs (cfg.special_case_translation[item][test_type]) do -- spin through the list of generic value fragments to accept or reject
for _, wiki in ipairs (wikis_t) do
if generic_value[wiki] then
if test (value, generic_value[wiki], wiki) then -- go do the test
return ('reject' == test_type); -- param value rejected, return true; false else
end
end
end
end
end
end
--[[--------------------------< N A M E _ I S _ G E N E R I C >------------------------------------------------
calls is_generic() to determine if <name> is a 'generic name' listed in cfg.generic_names; <name_alias> is the
parameter name used in error messaging
]]
local function name_is_generic (name, name_alias)
if not added_generic_name_errs and is_generic ('generic_names', name) then
utilities.set_message ('err_generic_name', name_alias); -- set an error message
added_generic_name_errs = true;
end
end
--[[--------------------------< N A M E _ C H E C K S >--------------------------------------------------------
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, last_alias, first_alias)
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 <last>
if not accept_name then -- <last> not wrapped in accept-as-written markup
name_has_mult_names (last, list_name); -- check for multiple names in the parameter (last only)
name_is_numeric (last, list_name); -- check for names that are composed of digits and punctuation
name_is_generic (last, last_alias); -- check for names found in the generic names list
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 <first>
if not accept_name then -- <first> not wrapped in accept-as-written markup
name_is_numeric (first, list_name); -- check for names that are composed of digits and punctuation
name_is_generic (first, first_alias); -- check for names found in the generic names list
end
local wl_type, D = utilities.is_wikilink (first);
if 0 ~= wl_type then
first = D;
utilities.set_message ('err_bad_paramlink', first_alias);
end
end
return last, first; -- done
end
--[[----------------------< E X T R A C T _ N A M E S >-------------------------
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, an error is emitted.
]]
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, last_alias, first_alias); -- 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
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
}); -- 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 <= 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
utilities.set_message ('err_missing_name', {list_name:match ("(%w+)List"):lower(), i - 1}); -- 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
--[[--------------------------< N A M E _ T A G _ G E T >------------------------------------------------------
attempt to decode |language=<lang_param> and return language name and matching tag; nil else.
This function looks for:
<lang_param> as a tag in cfg.lang_code_remap{}
<lang_param> as a name in cfg.lang_name_remap{}
<lang_param> as a name in cfg.mw_languages_by_name_t
<lang_param> as a tag in cfg.mw_languages_by_tag_t
when those fail, presume that <lang_param> is an IETF-like tag that MediaWiki does not recognize. Strip all
script, region, variant, whatever subtags from <lang_param> to leave just a two or three character language tag
and look for the new <lang_param> in cfg.mw_languages_by_tag_t{}
on success, returns name (in properly capitalized form) and matching tag (in lowercase); on failure returns nil
]]
local function name_tag_get (lang_param)
local lang_param_lc = mw.ustring.lower (lang_param); -- use lowercase as an index into the various tables
local name;
local tag;
name = cfg.lang_code_remap[lang_param_lc]; -- assume <lang_param_lc> is a tag; attempt to get remapped language name
if name then -- when <name>, <lang_param> is a tag for a remapped language name
return name, lang_param_lc; -- so return <name> from remap and <lang_param_lc>
end
tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- still assuming that <lang_param_lc> is a tag; strip script, region, variant subtags
name = cfg.lang_code_remap[tag]; -- attempt to get remapped language name with language subtag only
if name then -- when <name>, <tag> is a tag for a remapped language name
return name, tag; -- so return <name> from remap and <tag>
end
if cfg.lang_name_remap[lang_param_lc] then -- not a tag, assume <lang_param_lc> is a name; attempt to get remapped language tag
return cfg.lang_name_remap[lang_param_lc][1], cfg.lang_name_remap[lang_param_lc][2]; -- for this <lang_param_lc>, return a (possibly) new name and appropriate tag
end
tag = cfg.mw_languages_by_name_t[lang_param_lc]; -- assume that <lang_param_lc> is a language name; attempt to get its matching tag
if tag then
return cfg.mw_languages_by_tag_t[tag], tag; -- <lang_param_lc> is a name so return the name from the table and <tag>
end
name = cfg.mw_languages_by_tag_t[lang_param_lc]; -- assume that <lang_param_lc> is a tag; attempt to get its matching language name
if name then
return name, lang_param_lc; -- <lang_param_lc> is a tag so return it and <name>
end
tag = lang_param_lc:match ('^(%a%a%a?)%-.*'); -- is <lang_param_lc> an IETF-like tag that MediaWiki doesn't recognize? <tag> gets the language subtag; nil else
if tag then
name = cfg.mw_languages_by_tag_t[tag]; -- attempt to get a language name using the shortened <tag>
if name then
return name, tag; -- <lang_param_lc> is an unrecognized IETF-like tag so return <name> and language subtag
end
end
end
--[[-------------------< L A N G U A G E _ P A R A M E T E R >------------------
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 tag; -- some form of IETF-like language tag; language subtag with optional region, sript, vatiant, etc subtags
local lang_subtag; -- ve populates |language= with mostly unecessary region subtags the MediaWiki does not recognize; this is the base language subtag
local name; -- the language name
local language_list = {}; -- table of language names to be rendered
local names_t = {}; -- 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_t = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list
for _, lang in ipairs (names_t) do -- reuse lang here because we don't yet know if lang is a language name or a language tag
name, tag = name_tag_get (lang); -- attempt to get name/tag pair for <lang>; <name> has proper capitalization; <tag> is lowercase
if utilities.is_set (tag) then
lang_subtag = tag:gsub ('^(%a%a%a?)%-.*', '%1'); -- for categorization, strip any IETF-like tags from language tag
if cfg.this_wiki_code ~= lang_subtag then -- when the language is not the same as this wiki's language
if 2 == lang_subtag:len() then -- and is a two-character tag
-- utilities.add_prop_cat ('foreign-lang-source', {name, lang_subtag}, lang_subtag); -- categorize it; tag appended to allow for multiple language categorization
utilities.add_prop_cat ('foreign-lang-source', {name, tag}, lang_subtag); -- categorize it; tag appended to allow for multiple language categorization
else -- or is a recognized language (but has a three-character tag)
utilities.add_prop_cat ('foreign-lang-source-2', {lang_subtag}, lang_subtag); -- categorize it differently TODO: support multiple three-character tag 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, lang_subtag}); -- categorize it
end
else
name = lang; -- return whatever <lang> has so that we show something
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 (1 == #language_list) and (lang_subtag == cfg.this_wiki_code) then -- when only one language, find lang name in this wiki lang name; for |language=en-us, 'English' in 'American English'
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
--[[-----------------------< S E T _ C S _ S T Y L E >--------------------------
Gets the default CS style configuration for the given mode.
Returns default separator and either postscript as passed in or the default.
In CS1, the default postscript and separator are '.'.
In CS2, the default postscript is the empty string and the default separator is ','.
]]
local function set_cs_style (postscript, mode)
if utilities.is_set(postscript) then
-- emit a maintenance message if user postscript is the default cs1 postscript
-- we catch the opposite case for cs2 in set_style
if mode == 'cs1' and postscript == cfg.presentation['ps_' .. mode] then
utilities.set_message ('maint_postscript');
end
else
postscript = cfg.presentation['ps_' .. mode];
end
return cfg.presentation['sep_' .. mode], postscript;
end
--[[--------------------------< S E T _ S T Y L E >-----------------------------
Sets the separator and postscript styles. Checks the |mode= first and the
#invoke CitationClass second. Removes the postscript if postscript == none.
]]
local function set_style (mode, postscript, cite_class)
local sep;
if 'cs2' == mode then
sep, postscript = set_cs_style (postscript, 'cs2');
elseif 'cs1' == mode then
sep, postscript = set_cs_style (postscript, 'cs1');
elseif 'citation' == cite_class then
sep, postscript = set_cs_style (postscript, 'cs2');
else
sep, postscript = set_cs_style (postscript, 'cs1');
end
if cfg.keywords_xlate[postscript:lower()] == 'none' then
-- emit a maintenance message if user postscript is the default cs2 postscript
-- we catch the opposite case for cs1 in set_cs_style
if 'cs2' == mode or 'citation' == cite_class then
utilities.set_message ('maint_postscript');
end
postscript = '';
end
return sep, postscript
end
--[=[-------------------------< I S _ P D F >-----------------------------------
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#') or url:match ('%.pdf#');
end
--[[--------------------------< S T Y L E _ F O R M A T >-----------------------
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
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
--[[---------------------< G E T _ D I S P L A Y _ N A M E S >------------------
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, param)
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 >= count then -- if |display-xxxxors= value greater than or equal to number of authors/editors
utilities.set_message ('err_disp_name', {param, max}); -- add error message
max = nil;
end
else -- not a valid keyword or number
utilities.set_message ('err_disp_name', {param, max}); -- add error message
max = nil; -- unset; as if |display-xxxxors= had not been set
end
end
return max, etal;
end
--[[----------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >---------------
Adds error if |page=, |pages=, |quote-page=, |quote-pages= has what appears to be
some form of p. or pp. abbreviation in the first characters of the parameter content.
check page for extraneous p, p., pp, pp., pg, pg. at start of parameter value:
good pattern: '^P[^%.P%l]' matches when page begins PX or P# but not Px
where x and X are letters and # is a digit
bad pattern: '^[Pp][PpGg]' matches when page begins pp, pP, Pp, PP, pg, pG, Pg, PG
]]
local function extra_text_in_page_check (val, name)
if not val:match (cfg.vol_iss_pg_patterns.good_ppattern) then
for _, pattern in ipairs (cfg.vol_iss_pg_patterns.bad_ppatterns) do -- spin through the selected sequence table of patterns
if val:match (pattern) then -- when a match, error so
utilities.set_message ('err_extra_text_pages', name); -- add error message
return; -- and done
end
end
end
end
--[[--------------------------< E X T R A _ T E X T _ I N _ V O L _ I S S _ C H E C K >------------------------
Adds error if |volume= or |issue= has what appears to be some form of redundant 'type' indicator.
For |volume=:
'V.', or 'Vol.' (with or without the dot) abbreviations or 'Volume' in the first characters of the parameter
content (all case insensitive). 'V' and 'v' (without the dot) are presumed to be roman numerals so
are allowed.
For |issue=:
'No.', 'I.', 'Iss.' (with or without the dot) abbreviations, or 'Issue' in the first characters of the
parameter content (all case insensitive).
Single character values ('v', 'i', 'n') allowed when not followed by separator character ('.', ':', '=', or
whitespace character) – param values are trimmed of whitespace by MediaWiki before delivered to the module.
<val> is |volume= or |issue= parameter value
<name> is |volume= or |issue= parameter name for error message
<selector> is 'v' for |volume=, 'i' for |issue=
sets error message on failure; returns nothing
]]
local function extra_text_in_vol_iss_check (val, name, selector)
if not utilities.is_set (val) then
return;
end
local patterns = 'v' == selector and cfg.vol_iss_pg_patterns.vpatterns or cfg.vol_iss_pg_patterns.ipatterns;
local handler = 'v' == selector and 'err_extra_text_volume' or 'err_extra_text_issue';
val = val:lower(); -- force parameter value to lower case
for _, pattern in ipairs (patterns) do -- spin through the selected sequence table of patterns
if val:match (pattern) then -- when a match, error so
utilities.set_message (handler, name); -- add error message
return; -- and done
end
end
end
--[=[-------------------------< G E T _ V _ N A M E _ T A B L E >----------------------------------------------
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 placeholder
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
--[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >--------------------------------
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 <v_name>
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, i);
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, i);
end
if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then
add_vanc_error (cfg.err_msg_supl['missing comma'], i); -- 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.initials, i); -- 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, i); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials
end
is_good_vanc_name (last, first, suffix, i); -- 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, '', nil, i);
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
--[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------
Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or
select one of |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;
|editorn= (and aliases) highest and |veditors= lowest (support for |editors= withdrawn)
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 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
utilities.set_message ('err_redundant_parameters', err_name .. '-name-list parameters'); -- 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
--[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------
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.
TODO: explain <invert>
]]
local function is_valid_parameter_value (value, name, possible, ret_val, invert)
if not utilities.is_set (value) then
return ret_val; -- an empty parameter is ok
end
if (not invert and utilities.in_array (value, possible)) then -- normal; <value> is in <possible> table
return cfg.keywords_xlate[value]; -- return translation of parameter keyword
elseif invert and not utilities.in_array (value, possible) then -- invert; <value> is not in <possible> table
return value; -- return <value> as it is
else
utilities.set_message ('err_invalid_param_val', {name, value}); -- not an allowed value so add error message
return ret_val;
end
end
--[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >----------------------------------------
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
--[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >----------------------------------------
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
-- same condition as in format_pages_sheets()
local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin);
local is_numeric_vol = volume and (volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$')); -- is only uppercase roman numerals or only digits?
local is_long_vol = volume and (4 < mw.ustring.len(volume)); -- is |volume= value longer than 4 characters?
if volume and (not is_numeric_vol and is_long_vol) then -- when not all digits or Roman numerals, is |volume= longer than 4 characters?
utilities.add_prop_cat ('long-vol'); -- yes, add properties cat
end
if is_journal then -- journal-style formatting
local vol = '';
if utilities.is_set (volume) then
if is_numeric_vol then -- |volume= value all digits or all uppercase Roman numerals?
vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, volume}); -- render in bold face
elseif is_long_vol then -- not all digits or Roman numerals; longer than 4 characters?
vol = utilities.substitute (cfg.messages['j-vol'], {sepc, utilities.hyphen_to_dash (volume)}); -- not bold
else -- four or fewer characters
vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, utilities.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
if 'podcast' == cite_class and utilities.is_set (issue) then
return wrap_msg ('issue', {sepc, issue}, lower);
end
-- all other types of citation
if utilities.is_set (volume) and utilities.is_set (issue) then
return wrap_msg ('vol-no', {sepc, utilities.hyphen_to_dash (volume), issue}, lower);
elseif utilities.is_set (volume) then
return wrap_msg ('vol', {sepc, utilities.hyphen_to_dash (volume)}, lower);
else
return wrap_msg ('issue', {sepc, issue}, lower);
end
end
--[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >-----------------------------------------
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
--[[--------------------------< I N S O U R C E _ L O C _ G E T >----------------------------------------------
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 an 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, page_orig, pages, pages_orig, 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, page_orig); -- emit error message when |page= value begins with what looks like p., pp., etc.
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 .. ' ', '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, pages_orig); -- emit error message when |page= value begins with what looks like p., pp., etc.
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 .. ' ', '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 .. ' ', '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
--[[--------------------------< I S _ U N I Q U E _ A R C H I V E _ U R L >------------------------------------
add error message when |archive-url= value is same as |url= or chapter-url= (or alias...) value
]]
local function is_unique_archive_url (archive, url, c_url, source, date)
if utilities.is_set (archive) then
if archive == url or archive == c_url then
utilities.set_message ('err_bad_url', {utilities.wrap_style ('parameter', source)}); -- add error message
return '', ''; -- unset |archive-url= and |archive-date= because same as |url= or |chapter-url=
end
end
return archive, date;
end
--[=[-------------------------< A R C H I V E _ U R L _ C H E C K >--------------------------------------------
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/<timestamp>... -- the old form
//web.archive.org/web/<timestamp>... -- 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 path then -- malformed in some way; pattern did not match
err_msg = cfg.err_msg_supl.timestamp;
elseif 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here
err_msg = cfg.err_msg_supl.timestamp;
if '*' ~= flag then
local replacement = timestamp:match ('^%d%d%d%d%d%d') or timestamp:match ('^%d%d%d%d'); -- get the first 6 (YYYYMM) or first 4 digits (YYYY)
if replacement then -- nil if there aren't at least 4 digits (year)
replacement = replacement .. string.rep ('0', 14 - replacement:len()); -- year or yearmo (4 or 6 digits) zero-fill to make 14-digit timestamp
url=url:gsub ('(//web%.archive%.org/[^%d]*)%d[^/]*', '%1' .. replacement .. '*', 1) -- for preview, modify ts to 14 digits plus splat for calendar display
end
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
utilities.set_message ('err_archive_url', {err_msg}); -- add error message and
if is_preview_mode then
return url, date; -- preview mode so return ArchiveURL and ArchiveDate
else
return '', ''; -- return empty strings for ArchiveURL and ArchiveDate
end
end
--[[--------------------------< P L A C E _ C H E C K >--------------------------------------------------------
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
--[[--------------------------< I S _ A R C H I V E D _ C O P Y >----------------------------------------------
compares |title= to 'Archived copy' (placeholder 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
--[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------
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 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 editor_etal;
local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors=
do -- to limit scope of selected
local selected = select_author_editor_source (A['Veditors'], nil, args, 'EditorList'); -- support for |editors= withdrawn
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=
end
end
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' == Chapter_origin then
Contribution = Chapter; -- get the name of the contribution
end
local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs
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 < #c then
if not utilities.is_set (Contribution) then -- |contributor= requires |contribution=
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=
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?
utilities.set_message ('err_contributor_ignored'); -- add contributor ignored error message
end
Contribution = nil; -- unset
end
local Title = A['Title'];
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' == Chapter_origin 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 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
utilities.set_message ('err_apostrophe_markup', {Periodical_origin});
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 TODO: make a function for this and similar?
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', Periodical_origin) .. ' and ' .. utilities.wrap_style ('parameter', 'mailinglist')});
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'];
-- 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
utilities.set_message ('err_missing_periodical', {config.CitationClass, p[config.CitationClass]});
end
end
local Volume;
local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical');
if 'citation' == config.CitationClass then
if utilities.is_set (Periodical) then
if not utilities.in_array (Periodical_origin, cfg.citation_no_volume_t) then -- {{citation}} does not render |volume= when these parameters are used
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
extra_text_in_vol_iss_check (Volume, A:ORIGIN ('Volume'), 'v');
local Issue;
if 'citation' == config.CitationClass then
if utilities.is_set (Periodical) and utilities.in_array (Periodical_origin, cfg.citation_issue_t) then -- {{citation}} may render |issue= when these parameters are used
Issue = utilities.hyphen_to_dash (A['Issue']);
end
elseif utilities.in_array (config.CitationClass, cfg.templates_using_issue) then -- conference & 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 = utilities.hyphen_to_dash (A['Issue']);
end
end
extra_text_in_vol_iss_check (Issue, A:ORIGIN ('Issue'), 'i');
local Page;
local Pages;
local At;
if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) then
Page = A['Page'];
Pages = utilities.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
utilities.set_message ('err_apostrophe_markup', {PublisherName_origin});
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
utilities.set_message ('err_parameter_ignored', {PublisherName_origin});
end
PublisherName = nil; -- ensure that this parameter is unset for the time being; will be used again after COinS
end
local URL = A['URL']; -- TODO: better way to do this for URL, ChapterURL, and MapURL?
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;
utilities.set_message ('err_param_access_requires_param', 'url');
end
local ChapterURL = A['ChapterURL'];
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;
utilities.set_message ('err_param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')});
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;
utilities.set_message ('err_param_access_requires_param', {'map-url'});
end
local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language
local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil);
-- 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, A:ORIGIN('Page'), Pages, A:ORIGIN('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
local URL_origin = A:ORIGIN('URL'); -- get name of parameter that holds URL
local ChapterURL_origin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL
local ScriptChapter = A['ScriptChapter'];
local ScriptChapter_origin = A:ORIGIN ('ScriptChapter');
local Format = A['Format'];
local ChapterFormat = A['ChapterFormat'];
local TransChapter = A['TransChapter'];
local TransChapter_origin = A:ORIGIN ('TransChapter');
local TransTitle = A['TransTitle'];
local ScriptTitle = A['ScriptTitle'];
--[[
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
utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('Encyclopedia')});
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 TODO: make a function for this and similar?
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', A:ORIGIN ('Encyclopedia')) .. ' and ' .. utilities.wrap_style ('parameter', Periodical_origin)});
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 = URL_origin;
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) or utilities.is_set (ScriptChapter) 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.
local ID = A['ID'];
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
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'id') .. ' and ' .. utilities.wrap_style ('parameter', 'number')});
end
end
end
-- Account for the oddity that is {{cite conference}}, before generation of COinS data.
local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode
local Conference = A['Conference'];
local BookTitle = A['BookTitle'];
local TransTitle_origin = A:ORIGIN ('TransTitle');
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
-- CS1/2 mode
local Mode = is_valid_parameter_value (A['Mode'], A:ORIGIN('Mode'), cfg.keywords_lists['mode'], '');
-- separator character and postscript
local sepc, PostScript = set_style (Mode:lower(), A['PostScript'], config.CitationClass);
-- controls capitalization of certain static text
local use_lowercase = ( sepc == ',' );
-- 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 --TODO: make a function for this and similar?
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'map') .. ' and ' .. utilities.wrap_style ('parameter', Chapter_origin)}); -- 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.
local Series = A['Series'];
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 TODO: make a function for this and similar?
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'season') .. ' and ' .. utilities.wrap_style ('parameter', 'seriesno')}); -- 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 = URL_origin;
ChapterFormat = Format;
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 = '';
Format = '';
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
local TitleType = A['TitleType'];
local Degree = A['Degree'];
if utilities.in_array (config.CitationClass, {'AV-media-notes', 'interview', 'mailinglist', 'map', 'podcast', 'pressrelease', 'report', 'speech', '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 = A['Date'];
local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging
local PublicationDate = A['PublicationDate'];
local Year = A['Year'];
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
]]
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 ArchiveURL;
local ArchiveDate;
local ArchiveFormat = A['ArchiveFormat'];
ArchiveURL, ArchiveDate = archive_url_check (A['ArchiveURL'], A['ArchiveDate'])
ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url');
ArchiveURL, ArchiveDate = is_unique_archive_url (ArchiveURL, URL, ChapterURL, A:ORIGIN('ArchiveURL'), ArchiveDate); -- add error message when URL or ChapterURL == ArchiveURL
local AccessDate = A['AccessDate'];
local LayDate = A['LayDate'];
local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification
local DoiBroken = A['DoiBroken'];
local Embargo = A['Embargo'];
local anchor_year; -- used in the CITEREF identifier
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;
validation.year_date_check (Year, A:ORIGIN ('Year'), Date, A:ORIGIN ('Date'), error_list);
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; not supported at en.wiki
if cfg.date_name_auto_xlate_enable and validation.date_name_xlate (date_parameters_list, cfg.date_digit_auto_xlate_enable ) then
utilities.set_message ('maint_date_auto_xlated'); -- add maint cat
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
utilities.set_message ('err_bad_date', {utilities.make_sep_list (#error_list, error_list)}); -- add this error message
end
end -- end of do
local ID_list = {}; -- sequence table of rendered identifiers
local ID_list_coins = {}; -- table of identifiers and their values from args; key is same as cfg.id_handlers's key
local Class = A['Class']; -- arxiv class identifier
local ID_support = {
{A['ASINTLD'], 'ASIN', 'err_asintld_missing_asin', A:ORIGIN ('ASINTLD')},
{DoiBroken, 'DOI', 'err_doibroken_missing_doi', A:ORIGIN ('DoiBroken')},
{Embargo, 'PMC', 'err_embargo_missing_pmc', A:ORIGIN ('Embargo')},
}
ID_list, ID_list_coins = identifiers.identifier_lists_get (args, {DoiBroken = DoiBroken, ASINTLD = A['ASINTLD'], Embargo = Embargo, Class = Class}, ID_support);
-- 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= & |citeseerx= required for their templates
utilities.set_message ('err_' .. config.CitationClass .. '_missing'); -- 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) then -- set when using an identifier-created URL
if utilities.is_set (AccessDate) then -- |access-date= requires |url=; identifier-created URL is not |url=
utilities.set_message ('err_accessdate_missing_url'); -- add an error message
AccessDate = ''; -- unset
end
if utilities.is_set (ArchiveURL) then -- |archive-url= requires |url=; identifier-created URL is not |url=
utilities.set_message ('err_archive_missing_url'); -- add an error message
ArchiveURL = ''; -- unset
end
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
utilities.set_message ('err_citation_missing_title', {'episode' == config.CitationClass and 'series' or 'title'});
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
-- COinS metadata (see <http://ocoins.info/>) 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 < #c then -- but if contributor list
coins_author = c; -- use that instead
end
local QuotePage = A['QuotePage'];
local QuotePages = utilities.hyphen_to_dash (A['QuotePages']);
-- 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 / accept-as-written markup
['Degree'] = Degree; -- cite thesis only
['Title'] = metadata.make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic / accept-as-written 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, QuotePage, QuotePages}, 7)), -- 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
local Editors;
local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list
local Contributors; -- assembled contributors name list
local contributor_etal;
local Translators; -- assembled translators name list
local translator_etal;
local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs
t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn=
local Interviewers;
local interviewers_list = {};
interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters
local interviewer_etal;
-- 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.
do
local last_first_list;
local control = {
format = NameListStyle, -- empty string or 'vanc'
maximum = nil, -- as if display-authors or display-editors not set
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, A:ORIGIN ('DisplayEditors'));
Editors, EditorCount = list_people (control, e, editor_etal);
if 1 == EditorCount and (true == editor_etal or 1 < #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, A:ORIGIN ('DisplayInterviewers'));
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, A:ORIGIN ('DisplayTranslators'));
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, A:ORIGIN ('DisplayContributors'));
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, A:ORIGIN ('DisplayAuthors'));
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
local ConferenceFormat = A['ConferenceFormat'];
local ConferenceURL = A['ConferenceURL'];
ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url');
Format = style_format (Format, URL, 'format', 'url');
-- 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=
utilities.set_message ('err_cite_web_url');
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;
utilities.set_message ('err_accessdate_missing_url');
AccessDate = '';
end
end
local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], '');
local OriginalURL
local OriginalURL_origin
local OriginalFormat
local 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
elseif utilities.is_set (UrlStatus) then -- if |url-status= is set when |archive-url= is not set
utilities.set_message ('maint_url_status'); -- add maint cat
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
utilities.set_message ('err_chapter_ignored', {chap_param}); -- 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 < #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 <Title>
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 -- <Title> 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 ('generic_titles', Title) then
utilities.set_message ('err_generic_title'); -- 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'); -- <bdi> 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'); -- <bdi> 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'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped
TransTitle = utilities.wrap_style ('trans-italic-title', TransTitle);
end
if utilities.is_set (TransTitle) then
if utilities.is_set (Title) then
TransTitle = " " .. TransTitle;
else
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
utilities.set_message ('err_wikilink_in_url'); -- 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 .. 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 .. ' ', '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;
else
Title = utilities.make_wikilink (TitleLink, Title) .. TransTitle;
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 .. ' ', '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;
else
Title = Title .. TransTitle;
end
end
else
Title = TransTitle;
end
if utilities.is_set (Place) then
Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " ";
end
local ConferenceURL_origin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL
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
local Position = '';
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 --TODO: make a function for this and similar?
utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'minutes') .. ' and ' .. utilities.wrap_style ('parameter', 'time')});
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
local Others = A['Others'];
if utilities.is_set (Others) and 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor=
if config.CitationClass == "AV-media-notes"
or config.CitationClass == "audio-visual" then -- special maint for AV/M which has a lot of 'false' positives right now
utilities.set_message ('maint_others_avm')
else
utilities.set_message ('maint_others');
end
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
local TitleNote = A['TitleNote'];
TitleNote = utilities.is_set (TitleNote) and (sepc .. " " .. TitleNote) or "";
if utilities.is_set (Edition) then
if Edition:match ('%f[%a][Ee]d%n?%.?$') or Edition:match ('%f[%a][Ee]dition$') then -- Ed, ed, Ed., ed., Edn, edn, Edn., edn.
utilities.set_message ('err_extra_text_edition'); -- add error message
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
local Agency = A['Agency'];
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);
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
local Docket = A['Docket'];
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
local Quote = A['Quote'];
local TransQuote = A['TransQuote'];
local ScriptQuote = A['ScriptQuote'];
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 <q>...</q> tags
if utilities.is_set (ScriptQuote) then
Quote = script_concatenate (Quote, ScriptQuote, 'script-quote'); -- <bdi> 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
extra_text_in_page_check (QuotePage, 'quote-page'); -- add to maint cat if |quote-page= value begins with what looks like p., pp., etc.
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
extra_text_in_page_check (QuotePages, 'quote-pages'); -- add to maint cat if |quote-pages= value begins with what looks like p., pp., etc.
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
-- We check length of PostScript here because it will have been nuked by
-- the quote parameters. We'd otherwise emit a message even if there wasn't
-- a displayed postscript.
-- TODO: Should the max size (1) be configurable?
-- TODO: Should we check a specific pattern?
if utilities.is_set(PostScript) and mw.ustring.len(PostScript) > 1 then
utilities.set_message ('maint_postscript')
end
local Archived;
if utilities.is_set (ArchiveURL) then
local arch_text;
if not utilities.is_set (ArchiveDate) then
utilities.set_message ('err_archive_missing_date');
ArchiveDate = ''; -- empty string for concatenation
end
if "live" == UrlStatus then
arch_text = cfg.messages['archived'];
if sepc ~= "." then arch_text = arch_text:lower() end
if utilities.is_set (ArchiveDate) then
Archived = sepc .. ' ' .. utilities.substitute ( cfg.messages['archived-live'],
{external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL'), nil) .. ArchiveFormat, ArchiveDate } );
else
Archived = '';
end
if not utilities.is_set (OriginalURL) then
utilities.set_message ('err_archive_missing_url');
Archived = ''; -- empty string for concatenation
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
if utilities.is_set (ArchiveDate) then
Archived = sepc .. " " .. utilities.substitute ( arch_text,
{ external_link( OriginalURL, cfg.messages['original'], OriginalURL_origin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); -- format already styled
else
Archived = ''; -- unset for concatenation
end
end
else -- OriginalUrl not set
arch_text = cfg.messages['archived-missing'];
if sepc ~= "." then arch_text = arch_text:lower() end
utilities.set_message ('err_archive_missing_url');
Archived = ''; -- empty string for concatenation
end
elseif utilities.is_set (ArchiveFormat) then
Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message
else
Archived = '';
end
local Lay = '';
local LaySource = A['LaySource'];
local LayURL = A['LayURL'];
local LayFormat = A['LayFormat'];
LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url');
if utilities.is_set (LayURL) then
if utilities.is_set (LayDate) then LayDate = " (" .. LayDate .. ")" end
if utilities.is_set (LaySource) then
LaySource = " – ''" .. 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
local TranscriptURL = A['TranscriptURL']
local TranscriptFormat = A['TranscriptFormat'];
TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl');
local Transcript = A['Transcript'];
local TranscriptURL_origin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL
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
local TransPeriodical = A['TransPeriodical'];
local TransPeriodical_origin = A:ORIGIN ('TransPeriodical');
-- 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
local Language = A['Language'];
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
--[[
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 = TitleType; -- move TitleType to TitleNote so that it renders ahead of |event=
TitleType = ''; -- and unset
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 & 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 > 0 then
ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc );
else
ID_list = ID;
end
local Via = A['Via'];
Via = utilities.is_set (Via) and wrap_msg ('via', Via) or '';
local idcommon;
if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media & 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;
local OrigDate = A['OrigDate'];
OrigDate = utilities.is_set (OrigDate) and wrap_msg ('origdate', OrigDate) or '';
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 <= 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 <= 1 then
Editors = Editors .. ", " .. cfg.messages['editor'];
else
Editors = Editors .. ", " .. cfg.messages['editors'];
end
else
if EditorCount <= 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 <cite> element
local options_t = {};
options_t.class = cite_class_attribute_make (config.CitationClass, Mode);
local Ref = is_valid_parameter_value (A['Ref'], A:ORIGIN('Ref'), cfg.keywords_lists['ref'], nil, true); -- nil when |ref=harv; A['Ref'] else
if 'none' ~= cfg.keywords_xlate[(Ref and Ref:lower()) or ''] then
local namelist_t = {}; -- 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 > 0 then -- if there is a contributor list
namelist_t = c; -- select it
elseif #a > 0 then -- or an author list
namelist_t = a;
elseif #e > 0 then -- or an editor list
namelist_t = e;
end
local citeref_id;
if #namelist_t > 0 then -- if there are names in namelist_t
citeref_id = make_citeref_id (namelist_t, year); -- go make the CITEREF anchor
if mw.uri.anchorEncode (citeref_id) == ((Ref and mw.uri.anchorEncode (Ref)) or '') then -- Ref may already be encoded (by {{sfnref}}) so citeref_id must be encoded before comparison
utilities.set_message ('maint_ref_duplicates_default');
end
else
citeref_id = ''; -- unset
end
options_t.id = Ref or citeref_id;
end
if string.len (text:gsub('%b<>', '')) <= 2 then -- remove html and html-like tags; then get length of what remains;
z.error_cats_t = {}; -- blank the categories list
z.error_msgs_t = {}; -- blank the error messages list
OCinSoutput = nil; -- blank the metadata string
text = ''; -- blank the the citation
utilities.set_message ('err_empty_citation'); -- set empty citation message and category
end
local render_t = {}; -- here we collect the final bits for concatenation into the rendered citation
if utilities.is_set (options_t.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags
table.insert (render_t, utilities.substitute (cfg.presentation['cite-id'], {mw.uri.anchorEncode(options_t.id), mw.text.nowiki(options_t.class), text})); -- when |ref= is set or when there is a namelist
else
table.insert (render_t, utilities.substitute (cfg.presentation['cite'], {mw.text.nowiki(options_t.class), text})); -- when |ref=none or when namelist_t empty and |ref= is missing or is empty
end
if OCinSoutput then -- blanked when citation is 'empty' so don't bother to add boilerplate metadata span
table.insert (render_t, utilities.substitute (cfg.presentation['ocins'], OCinSoutput)); -- format and append metadata to the citation
end
local template_name = ('citation' == config.CitationClass) and 'citation' or 'cite ' .. (cfg.citation_class_map_t[config.CitationClass] or config.CitationClass);
local template_link = '[[Template:' .. template_name .. '|' .. template_name .. ']]';
local msg_prefix = '<code class="cs1-code">{{' .. template_link .. '}}</code>: ';
if 0 ~= #z.error_msgs_t then
mw.addWarning (utilities.substitute (cfg.messages.warning_msg_e, template_link));
table.insert (render_t, ' '); -- insert a space between citation and its error messages
table.sort (z.error_msgs_t); -- sort the error messages list; sorting includes wrapping <span> and <code> tags; hidden-error sorts ahead of visible-error
local hidden = true; -- presume that the only error messages emited by this template are hidden
for _, v in ipairs (z.error_msgs_t) do -- spin through the list of error messages
if v:find ('cs1-visible-error', 1, true) then -- look for the visible error class name
hidden = false; -- found one; so don't hide the error message prefix
break; -- and done because no need to look further
end
end
z.error_msgs_t[1] = table.concat ({utilities.error_comment (msg_prefix, hidden), z.error_msgs_t[1]}); -- add error message prefix to first error message to prevent extraneous punctuation
table.insert (render_t, table.concat (z.error_msgs_t, '; ')); -- make a big string of error messages and add it to the rendering
end
if 0 ~= #z.maint_cats_t then
mw.addWarning (utilities.substitute (cfg.messages.warning_msg_m, template_link));
table.sort (z.maint_cats_t); -- sort the maintenance messages list
local maint_msgs_t = {}; -- here we collect all of the maint messages
if 0 == #z.error_msgs_t then -- if no error messages
table.insert (maint_msgs_t, msg_prefix); -- insert message prefix in maint message livery
end
for _, v in ipairs( z.maint_cats_t ) do -- append maintenance categories
table.insert (maint_msgs_t, -- assemble new maint message and add it to the maint_msgs_t table
table.concat ({v, ' (', utilities.substitute (cfg.messages[':cat wikilink'], v), ')'})
);
end
table.insert (render_t, utilities.substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs_t, ' '))); -- wrap the group of maint messages with proper presentation and save
end
if not no_tracking_cats then
for _, v in ipairs (z.error_cats_t) do -- append error categories
table.insert (render_t, utilities.substitute (cfg.messages['cat wikilink'], v));
end
for _, v in ipairs (z.maint_cats_t) do -- append maintenance categories
table.insert (render_t, utilities.substitute (cfg.messages['cat wikilink'], v));
end
for _, v in ipairs (z.prop_cats_t) do -- append properties categories
table.insert (render_t, utilities.substitute (cfg.messages['cat wikilink'], v));
end
end
return table.concat (render_t); -- make a big string and done
end
--[[--------------------------< V A L I D A T E >--------------------------------------------------------------
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 -- empty deprecated parameters are treated as unknowns
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
if 'tracked' == state then
local base_name = name:gsub ('%d', ''); -- strip enumerators from parameter names that have them to get the base name
utilities.add_prop_cat ('tracked-param', {base_name}, base_name); -- add a properties category; <base_name> modifies <key>
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
--[=[-------------------------< I N T E R _ W I K I _ C H E C K >----------------------------------------------
check <value> for inter-language interwiki-link markup. <prefix> must be a MediaWiki-recognized language
code. when these values have the form (without leading colon):
[[<prefix>:link|label]] return label as plain-text
[[<prefix>:link]] return <prefix>: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
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
--[[--------------------------< M I S S I N G _ P I P E _ C H E C K >------------------------------------------
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<>', ''); -- 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
utilities.set_message ('err_missing_pipe', parameter);
end
end
--[[--------------------------< H A S _ E X T R A N E O U S _ P U N C T >--------------------------------------
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
if value:match ('^=') then -- sometimes an extraneous '=' character appears ...
utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat
end
end
--[[--------------------------< H A S _ E X T R A N E O U S _ U R L >------------------------------------------
look for extraneous url parameter values; parameters listed in skip table are not checked
]]
local function has_extraneous_url (url_param_t)
local url_error_t = {};
check_for_url (url_param_t, url_error_t); -- extraneous url check
if 0 ~= #url_error_t then -- non-zero when there are errors
table.sort (url_error_t);
utilities.set_message ('err_param_has_ext_link', {utilities.make_sep_list (#url_error_t, url_error_t)}); -- add this error message
end
end
--[[--------------------------< C I T A T I O N >--------------------------------------------------------------
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 sandbox = '/sandbox' -- i18n: replace this rvalue with the name that your wiki uses to identify sandbox subpages
is_sandbox = nil ~= string.find (frame:getTitle(), sandbox, 1, true); -- is this invoke the sandbox module?
sandbox = is_sandbox and sandbox or ''; -- use i18n sandbox to load sandbox modules when this module is the sandox; live modules else
local pframe = frame:getParent()
local styles;
cfg = mw.loadData ('Module:Citation/CS1/Configuration' .. sandbox); -- load sandbox versions of support modules when {{#invoke:Citation/CS1/sandbox|...}}; live modules else
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';
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
is_preview_mode = not utilities.is_set (frame:preprocess ('{{REVISIONID}}'));
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; -- used as a flag
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
if type (k) ~= 'string' then -- exclude empty numbered parameters
if v:match("%S+") ~= nil then
error_text = utilities.set_message ('err_text_ignored', {v});
end
elseif validate (k:lower(), config.CitationClass) then
error_text = utilities.set_message ('err_parameter_ignored_suggest', {k, k:lower()}); -- 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 is_sandbox 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 = utilities.set_message ('err_parameter_ignored_suggest', {k, param}); -- set the suggestion error message
else
error_text = utilities.set_message ('err_parameter_ignored', {k}); -- 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 explicit suggestion?
if (suggestions.suggestions[ k:lower() ] ~= nil) and validate (suggestions.suggestions[ k:lower() ], config.CitationClass) then
utilities.set_message ('err_parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]});
else
utilities.set_message ('err_parameter_ignored', {k});
v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists)
end
end
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
utilities.set_message ('err_param_unknown_empty', {
1 == #empty_unknowns and '' or 's',
utilities.make_sep_list (#empty_unknowns, empty_unknowns)
});
end
local url_param_t = {};
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
if 'string' == type (k) and not cfg.url_skip[k] then -- when parameter k is not positional and not in url skip table
url_param_t[k] = v; -- make a parameter/value list for extraneous url check
end
end
has_extraneous_url (url_param_t); -- look for url in parameter values where a url does not belong
return table.concat ({
frame:extensionTag ('templatestyles', '', {src=styles}),
citation0( config, args)
});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {citation = citation};
ap25rq0kh3819w7lon63qbjh3bjokuz
Module:Citation/CS1/COinS
828
48828620
1067248994
1017041361
2022-01-22T14:11:14Z
Trappist the monk
10289486
update per [[Wikipedia:Village_pump_(proposals)#rfc:_shall_we_update_cs1/2?|RfC]];
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local has_accept_as_written, 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
--[[--------------------------< M A K E _ C O I N S _ T I T L E >----------------------------------------------
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)
title = has_accept_as_written (title);
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
--[[--------------------------< E S C A P E _ L U A _ M A G I C _ C H A R S >----------------------------------
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
--[[--------------------------< G E T _ C O I N S _ P A G E S >------------------------------------------------
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("&%w+;", "-" ); -- and replace HTML entities (– etc.) with hyphens; do we need to replace numerical entities like   and the like?
return pages;
end
--[=[-------------------------< 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 >------------------
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 initial
value. To replace multipe equations it is necessary 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 ('<annotation[^>]+>.+</annotation>') then -- if MathML math option
rendering = rendering:match ('<annotation[^>]+>(.+)</annotation>') -- 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
--[[--------------------------< C O I N S _ C L E A N U P >----------------------------------------------------
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 ('<span class="nowrap" style="padding%-left:0%.1em;">'(s?)</span>', "'%1"); -- replace {{'}} or {{'s}} with simple apostrophe or apostrophe-s
value = value:gsub (' ', ' '); -- replace 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 ('‍', ''); -- remove ‍ 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
--[[--------------------------< C O I N S >--------------------------------------------------------------------
COinS metadata (see <http://ocoins.info/>) 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.quarter"] = data.Quarter; -- single digits 1->first quarter, etc.
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
-- NB. Not currently supported are "info:ofi/fmt:kev:mtx:patent", "info:ofi/fmt:kev:mtx:dc", "info:ofi/fmt:kev:mtx:sch_svc", "info:ofi/fmt:kev:mtx:ctx"
-- 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 'url' == id then -- for urls that are assembled in ~/Identifiers; |asin= and |ol=
OCinSoutput["rft_id"] = table.concat ({data.ID_list[k], "#id-name=", cfg.id_handlers[k].label});
elseif id then -- when cfg.id_handlers[k].COinS is not nil so urls created here
OCinSoutput["rft_id"] = table.concat{ cfg.id_handlers[k].prefix, v, cfg.id_handlers[k].suffix or '', "#id-name=", cfg.id_handlers[k].label }; -- others; provide a URL and indicate identifier name as #fragment (human-readable, but transparent to browsers)
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 stripmarkers, non-printing or invisible characters
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
-- TODO: At present we do not report "et al.". Add anything special if this condition applies?
end
end
OCinSoutput.rft_id = data.URL;
OCinSoutput.rfr_id = table.concat{ "info:sid/", mw.site.server:match( "[^/]*$" ), ":", data.RawPage };
-- TODO: Add optional extra info:
-- rfr_dat=#REVISION<version> (referrer private data)
-- ctx_id=<data.RawPage>#<ref> (identifier for the context object)
-- ctx_tim=<ts> (timestamp in format yyyy-mm-ddThh:mm:ssTZD or yyyy-mm-dd)
-- ctx_enc=info:ofi/enc:UTF-8 (character encoding)
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, "&");
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
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 selected Module:Citation/CS1/Utilities module
is_set = utilities_page_ptr.is_set;
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
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
make_coins_title = make_coins_title,
get_coins_pages = get_coins_pages,
COinS = COinS,
set_selected_modules = set_selected_modules,
}
9vyk9pk52t1pp4siilcbluanw9m1ekz
Module:Citation/CS1/Configuration
828
39043527
1096144888
1096003156
2022-07-02T16:25:24Z
Trappist the monk
10289486
bump s2cid;
Scribunto
text/plain
local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------
List of namespaces 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', '/[^/]*[Ll]og', '/[Aa]rchive'}; -- list of Lua patterns found in page names of pages we should not categorize
--[[--------------------------< M E S S A G E S >--------------------------------------------------------------
Translation table
The following contains fixed text that may be output as part of a citation.
This is separated from the main body to aid in future translations of this
module.
]]
local messages = {
['agency'] = '$1 $2', -- $1 is sepc, $2 is agency
['archived-dead'] = 'Archived from $1 on $2',
['archived-live'] = '$1 from the original on $2',
['archived-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',
['mismatch'] = '<code class="cs1-code">|$1=</code> / <code class="cs1-code">|$2=</code> mismatch', -- $1 is year param name; $2 is date param name
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]: $1',
['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. $2', -- $1 is sepc; bold journal style volume is in presentation{}
['vol-no'] = '$1 Vol. $2, no. $3', -- sepc, volume, issue (alternatively insert $1 after $2, but then we'd also have to change capitalization)
['issue'] = '$1 No. $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. $2", -- $1 is sepc
['pp-prefix'] = "$1 pp. $2", -- $1 is sepc
['j-page(s)'] = ': $1', -- same for page and pages
['sheet'] = '$1 Sheet $2', -- $1 is sepc
['sheets'] = '$1 Sheets $2', -- $1 is sepc
['j-sheet'] = ': Sheet $1',
['j-sheets'] = ': Sheets $1',
['language'] = '(in $1)',
['via'] = " – via $1",
['event'] = 'Event occurs at',
['minutes'] = 'minutes in',
-- Determines the location of the help page
['help page link'] = 'Help:CS1 errors',
['help page label'] = 'help',
-- categories
['cat wikilink'] = '[[Category:$1]]', -- $1 is the category name
[':cat wikilink'] = '[[:Category:$1|link]]', -- category name as maintenance message wikilink; $1 is the category name
-- Internal errors (should only occur if configuration is bad)
['undefined_error'] = 'Called with an undefined error condition',
['unknown_ID_key'] = 'Unrecognized ID key: ', -- an ID key in id_handlers not found in ~/Identifiers func_map{}
['unknown_ID_access'] = 'Unrecognized ID access keyword: ', -- an ID access keyword in id_handlers not found in keywords_lists['id-access']{}
['unknown_argument_map'] = 'Argument map not defined for this variable',
['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty',
['warning_msg_e'] = '<span style="color:#d33">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code> templates have errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link
['warning_msg_m'] = '<span style="color:#3a3">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code> templates have maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link
}
--[[--------------------------< C I T A T I O N _ C L A S S _ M A P >------------------------------------------
this table maps the value assigned to |CitationClass= in the cs1|2 templates to the canonical template name when
the value assigned to |CitationClass= is different from the canonical template name. |CitationClass= values are
used as class attributes in the <cite> tag that encloses the citation so these names may not contain spaces while
the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the
template's documentation when an article is displayed in preivew mode.
Most cs1|2 template |CitationClass= values at en.wiki match their canonical template names so are not listed here.
]]
local citation_class_map_t = { -- TODO: if kept, these and all other config.CitationClass 'names' require some sort of i18n
['audio-visual'] = 'AV media', -- TODO: move to ~/Configuration
['AV-media-notes'] = 'AV media notes',
['encyclopaedia'] = 'encyclopedia',
['mailinglist'] = 'mailing list',
['pressrelease'] = 'press release'
}
--[=[-------------------------< E T _ A L _ P A T T E R N S >--------------------------------------------------
This table provides Lua patterns for the phrase "et al" and variants in name text
(author, editor, etc.). The main module uses these to identify and emit the 'etal' message.
]=]
local et_al_patterns = {
"[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.;,\"']*$", -- variations on the 'et al' theme
"[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.;,\"']*$", -- variations on the 'et alia', 'et alii' and 'et aliae' themes (false positive 'et aliie' unlikely to match)
"[;,]? *%f[%a]and [Oo]thers", -- an alternative to et al.
"%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form
"%(%( *[Ee][Tt]%.? *[Aa][Ll]%.? *%)%)", -- a double-bracketed form (to counter partial removal of ((...)) syntax)
"[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form
}
--[[--------------------------< P R E S E N T A T I O N >------------------------
Fixed presentation markup. Originally part of citation_config.messages it has
been moved into its own, more semantically correct place.
]]
local presentation =
{
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display
['hidden-error'] = '<span class="cs1-hidden-error citation-comment">$1</span>',
['visible-error'] = '<span class="cs1-visible-error citation-comment">$1</span>',
['hidden-maint'] = '<span class="cs1-maint citation-comment">$1</span>',
['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal CSS
['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like
['cite'] = '<cite class="$1">$2</cite>'; -- for use when citation does not have a namelist and |ref= not set so no id="..." attribute
['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when when |ref= is set or when citation has a namelist
['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc.
-- various access levels, for |access=, |doi-access=, |arxiv=, ...
-- narrow no-break space   may work better than nowrap CSS. Or not? Browser support?
['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon
['free'] = {class='cs1-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css
['registration'] = {class='cs1-lock-registration', title='Free registration required'},
['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'},
['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'},
['interwiki-icon'] = '<span class="$1" title="$2">$3</span>',
['class-wikisource'] = 'cs1-ws-icon',
['italic-title'] = "''$1''",
['kern-left'] = '<span class="cs1-kern-left"></span>$1', -- spacing to use when title contains leading single or double quote mark
['kern-right'] = '$1<span class="cs1-kern-right"></span>', -- spacing to use when title contains trailing single or double quote mark
['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span>
['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space)
['ocins'] = '<span title="$1" class="Z3988"></span>',
['parameter'] = '<code class="cs1-code">|$1=</code>',
['ps_cs1'] = '.'; -- CS1 style postscript (terminal) character
['ps_cs2'] = ''; -- CS2 style postscript (terminal) character (empty string)
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-title'] = '"$1"',
['sep_cs1'] = '.', -- CS1 element separator
['sep_cs2'] = ',', -- CS2 separator
['sep_nl'] = ';', -- CS1|2 style name-list separator between names is a semicolon
['sep_nl_and'] = ' and ', -- used as last nl sep when |name-list-style=and and list has 2 items
['sep_nl_end'] = '; and ', -- used as last nl sep when |name-list-style=and and list has 3+ names
['sep_name'] = ', ', -- CS1|2 style last/first separator is <comma><space>
['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma
['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space
['sep_list'] = ', ', -- used for |language= when list has 3+ items except for last sep which uses sep_list_end
['sep_list_pair'] = ' and ', -- used for |language= when list has 2 items
['sep_list_end'] = ', and ', -- used as last list sep for |language= when list has 3+ items
['trans-italic-title'] = "[''$1'']",
['trans-quoted-title'] = "[$1]", -- for |trans-title= and |trans-quote=
['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}
}
--[[--------------------------< A L I A S E S >---------------------------------
Aliases table for commonly passed parameters.
Parameter names on the right side in the assignments in this table must have been
defined in the Whitelist before they will be recognized as valid parameter names
]]
local aliases = {
['AccessDate'] = {'access-date', 'accessdate'}, -- Used by InternetArchiveBot
['Agency'] = 'agency',
['ArchiveDate'] = {'archive-date', 'archivedate'}, -- Used by InternetArchiveBot
['ArchiveFormat'] = 'archive-format',
['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- Used by InternetArchiveBot
['ASINTLD'] = 'asin-tld',
['At'] = 'at', -- Used by InternetArchiveBot
['Authors'] = {'authors', 'people', 'credits'},
['BookTitle'] = {'book-title', 'booktitle'},
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format',
'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url', 'chapterurl'}, -- Used by InternetArchiveBot
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access',
'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot
['Class'] = 'class', -- cite arxiv and arxiv identifier
['Collaboration'] = 'collaboration',
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = 'conference-format',
['ConferenceURL'] = 'conference-url', -- Used by InternetArchiveBot
['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only
['Degree'] = 'degree',
['DF'] = 'df',
['DisplayAuthors'] = {'display-authors', 'display-subjects'},
['DisplayContributors'] = 'display-contributors',
['DisplayEditors'] = 'display-editors',
['DisplayInterviewers'] = 'display-interviewers',
['DisplayTranslators'] = 'display-translators',
['Docket'] = 'docket',
['DoiBroken'] = 'doi-broken-date',
['Edition'] = 'edition',
['Embargo'] = 'pmc-embargo-date',
['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'dictionary'}, -- cite encyclopedia only
['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode?
['Format'] = 'format',
['ID'] = {'id', 'ID'},
['Inset'] = 'inset',
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'lang'},
['LayDate'] = 'lay-date',
['LayFormat'] = 'lay-format',
['LaySource'] = 'lay-source',
['LayURL'] = 'lay-url',
['MailingList'] = {'mailing-list', 'mailinglist'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
['MapFormat'] = 'map-format', -- cite map only
['MapURL'] = {'map-url', 'mapurl'}, -- cite map only -- Used by InternetArchiveBot
['MapUrlAccess'] = 'map-url-access', -- cite map only -- Used by InternetArchiveBot
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['NameListStyle'] = 'name-list-style',
['Network'] = 'network',
['Newsgroup'] = 'newsgroup', -- cite newsgroup only
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'no-tracking', 'template-doc-demo'},
['Number'] = 'number', -- this case only for cite techreport
['OrigDate'] = {'orig-date', 'orig-year', 'origyear'},
['Others'] = 'others',
['Page'] = {'page', 'p'}, -- Used by InternetArchiveBot
['Pages'] = {'pages', 'pp'}, -- Used by InternetArchiveBot
['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'},
['Place'] = {'place', 'location'},
['PostScript'] = 'postscript',
['PublicationDate'] = {'publication-date', 'publicationdate'},
['PublicationPlace'] = {'publication-place', 'publicationplace'},
['PublisherName'] = {'publisher', 'institution'},
['Quote'] = {'quote', 'quotation'},
['QuotePage'] = 'quote-page',
['QuotePages'] = 'quote-pages',
['Ref'] = 'ref',
['Scale'] = 'scale',
['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry',
'script-article', 'script-section'},
['ScriptMap'] = 'script-map',
['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper',
'script-periodical', 'script-website', 'script-work'},
['ScriptQuote'] = 'script-quote',
['ScriptTitle'] = 'script-title', -- Used by InternetArchiveBot
['Season'] = 'season',
['Sections'] = 'sections', -- cite map only
['Series'] = {'series', 'version'},
['SeriesLink'] = {'series-link', 'serieslink'},
['SeriesNumber'] = {'series-number', 'series-no'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['Time'] = 'time',
['TimeCaption'] = 'time-caption',
['Title'] = 'title', -- Used by InternetArchiveBot
['TitleLink'] = {'title-link', 'episode-link', 'episodelink'}, -- Used by InternetArchiveBot
['TitleNote'] = '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"},
['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask"},
['ContributorList-First'] = {'contributor-first#', 'contributor#-first',
'contributor-given#', 'contributor#-given'},
['ContributorList-Last'] = {'contributor-last#', 'contributor#-last',
'contributor-surname#', 'contributor#-surname', 'contributor#'},
['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'},
['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'},
['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"},
['EditorList-Last'] = {"editor-last#", "editor#-last", "editor-surname#",
"editor#-surname", "editor#"},
['EditorList-Link'] = {"editor-link#", "editor#-link"},
['EditorList-Mask'] = {"editor-mask#", "editor#-mask"},
['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first',
'interviewer-given#', 'interviewer#-given'},
['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last',
'interviewer-surname#', 'interviewer#-surname', 'interviewer#'},
['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'},
['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'},
['TranslatorList-First'] = {'translator-first#', 'translator#-first',
'translator-given#', 'translator#-given'},
['TranslatorList-Last'] = {'translator-last#', 'translator#-last',
'translator-surname#', 'translator#-surname', 'translator#'},
['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},
}
--[[--------------------------< P U N C T _ S K I P >---------------------------
builds a table of parameter names that the extraneous terminal punctuation check should not check.
]]
local punct_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value
'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters
'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators
'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', -- miscellaneous
'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- URL-holding parameters
}
local url_meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value
'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'ID', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- parameters allowed to hold urls
'Page', 'Pages', 'At', 'QuotePage', 'QuotePages', -- insource locators allowed to hold urls
}
local function build_skip_table (skip_t, meta_params)
for _, meta_param in ipairs (meta_params) do -- for each meta parameter key
local params = aliases[meta_param]; -- get the parameter or the table of parameters associated with the meta parameter name
if 'string' == type (params) then
skip_t[params] = 1; -- just a single parameter
else
for _, param in ipairs (params) do -- get the parameter name
skip_t[param] = 1; -- add the parameter name to the skip table
local count;
param, count = param:gsub ('#', ''); -- remove enumerator marker from enumerated parameters
if 0 ~= count then -- if removed
skip_t[param] = 1; -- add param name without enumerator marker
end
end
end
end
return skip_t;
end
local punct_skip = {};
local url_skip = {};
--[[-----------< S P E C I A L C A S E T R A N S L A T I O N S >------------
This table is primarily here to support internationalization. Translations in
this table are used, for example, when an error message, category name, etc.,
is extracted from the English alias key. There may be other cases where
this translation table may be useful.
]]
local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143';
local special_case_translation = {
['AuthorList'] = 'authors list', -- used to assemble maintenance category names
['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base 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',
-- Lua patterns to match pseudo-titles used by InternetArchiveBot and others as placeholder for unknown |title= value
['archived_copy'] = { -- used with CS1 maint: Archive[d] copy as title
['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki
['local'] = nil, -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language
},
-- Lua patterns to match generic titles; usually created by bots or reference filling tools
-- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language
-- generic titles and patterns in this table should be lowercase only
-- leave ['local'] nil except when there is a matching generic title in your language
-- boolean 'true' for plain-text searches; 'false' for pattern searches
['generic_titles'] = {
['accept'] = {
},
['reject'] = {
{['en'] = {'^wayback%s+machine$', false}, ['local'] = nil},
{['en'] = {'are you a robot', true}, ['local'] = nil},
{['en'] = {'hugedomains.com', true}, ['local'] = nil},
{['en'] = {'^[%(%[{<]?no +title[>}%]%)]?$', false}, ['local'] = nil},
{['en'] = {'page not found', true}, ['local'] = nil},
{['en'] = {'subscribe to read', true}, ['local'] = nil},
{['en'] = {'^[%(%[{<]?unknown[>}%]%)]?$', false}, ['local'] = nil},
{['en'] = {'website is for sale', true}, ['local'] = nil},
{['en'] = {'^404', false}, ['local'] = nil},
{['en'] = {'internet archive wayback machine', true}, ['local'] = nil},
{['en'] = {'log into facebook', true}, ['local'] = nil},
{['en'] = {'login • instagram', true}, ['local'] = nil},
{['en'] = {'redirecting...', true}, ['local'] = nil},
{['en'] = {'usurped title', true}, ['local'] = nil}, -- added by a GreenC bot
{['en'] = {'webcite query result', true}, ['local'] = nil},
{['en'] = {'wikiwix\'s cache', true}, ['local'] = nil},
}
},
-- boolean 'true' for plain-text searches, search string must be lowercase only
-- boolean 'false' for pattern searches
-- leave ['local'] nil except when there is a matching generic name in your language
['generic_names'] = {
['accept'] = {
{['en'] = {'%[%[[^|]*%(author%) *|[^%]]*%]%]', false}, ['local'] = nil},
},
['reject'] = {
{['en'] = {'about us', true}, ['local'] = nil},
{['en'] = {'%f[%a][Aa]dvisor%f[%A]', false}, ['local'] = nil},
{['en'] = {'%f[%a][Aa]uthor%f[%A]', false}, ['local'] = nil},
{['en'] = {'collaborator', true}, ['local'] = nil},
{['en'] = {'contributor', true}, ['local'] = nil},
{['en'] = {'contact us', true}, ['local'] = nil},
{['en'] = {'directory', true}, ['local'] = nil},
{['en'] = {'%f[%(%[][%(%[]%s*eds?%.?%s*[%)%]]?$', false}, ['local'] = nil},
{['en'] = {'[,%.%s]%f[e]eds?%.?$', false}, ['local'] = nil},
{['en'] = {'^eds?[%.,;]', false}, ['local'] = nil},
{['en'] = {'^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', false}, ['local'] = nil},
{['en'] = {'%f[%a][Ee]dited%f[%A]', false}, ['local'] = nil},
{['en'] = {'%f[%a][Ee]ditors?%f[%A]', false}, ['local'] = nil},
{['en'] = {'%f[%a]]Ee]mail%f[%A]', false}, ['local'] = nil},
{['en'] = {'facebook', true}, ['local'] = nil},
{['en'] = {'google', true}, ['local'] = nil},
{['en'] = {'home page', true}, ['local'] = nil},
{['en'] = {'instagram', true}, ['local'] = nil},
{['en'] = {'interviewer', true}, ['local'] = nil},
{['en'] = {'linkedIn', true}, ['local'] = nil},
{['en'] = {'^[Nn]ews$', false}, ['local'] = nil},
{['en'] = {'pinterest', true}, ['local'] = nil},
{['en'] = {'policy', true}, ['local'] = nil},
{['en'] = {'privacy', true}, ['local'] = nil},
{['en'] = {'translator', true}, ['local'] = nil},
{['en'] = {'tumblr', true}, ['local'] = nil},
{['en'] = {'twitter', true}, ['local'] = nil},
{['en'] = {'site name', true}, ['local'] = nil},
{['en'] = {'statement', true}, ['local'] = nil},
{['en'] = {'submitted', true}, ['local'] = nil},
{['en'] = {'super.?user', false}, ['local'] = nil},
{['en'] = {'%f['..is_Latn..'][Uu]ser%f[^'..is_Latn..']', false}, ['local'] = nil},
{['en'] = {'verfasser', true}, ['local'] = nil},
}
}
}
--[[--------------------------< D A T E _ N A M E S >----------------------------------------------------------
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 hemisphere 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_from_mediawiki is a boolean. When set to:
true – module will fetch local month names from MediaWiki for both date_names['local']['long'] and date_names['local']['short']
false – module will *not* fetch local month names from MediaWiki
Caveat lector: There is no guarantee that MediaWiki will provide short month names. At your wiki you can test
the results of the MediaWiki fetch in the debug console with this command (the result is alpha sorted):
=mw.dumpObject (p.date_names['local'])
While the module can fetch month names from MediaWiki, it cannot fetch the quarter, season, and named date names
from MediaWiki. Those must be translated manually.
]]
local local_date_names_from_mediawiki = true; -- when false, manual translation required for date_names['local']['long'] and date_names['local']['short']
-- when true, module fetches long and short month names from MediaWiki
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},
},
-- when local_date_names_from_mediawiki = false
['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_long'] = {}, -- used in date reformatting & translation; copy of date_names['local'].long where k/v are inverted: [1]='<local name>' etc.
['inv_local_short'] = {}, -- used in date reformatting & translation; copy of date_names['local'].short where k/v are inverted: [1]='<local name>' etc.
['inv_local_quarter'] = {}, -- used in date translation; copy of date_names['local'].quarter where k/v are inverted: [1]='<local name>' etc.
['inv_local_season'] = {}, -- used in date translation; copy of date_names['local'].season where k/v are inverted: [1]='<local name>' etc.
['inv_local_named'] = {}, -- used in date translation; copy of date_names['local'].named where k/v are inverted: [1]='<local name>' 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'] = {},
}
if local_date_names_from_mediawiki then -- if fetching local month names from MediaWiki is enabled
local long_t = {};
local short_t = {};
for i=1, 12 do -- loop 12x and
local name = lang_obj:formatDate('F', '2022-' .. i .. '-1'); -- get long month name for each i
long_t[name] = i; -- save it
name = lang_obj:formatDate('M', '2022-' .. i .. '-1'); -- get short month name for each i
short_t[name] = i; -- save it
end
date_names['local']['long'] = long_t; -- write the long table – overwrites manual translation
date_names['local']['short'] = short_t; -- write the short table – overwrites manual translation
end
-- create inverted date-name tables for reformatting and/or translation
for _, invert_t in pairs {{'long', 'inv_local_long'}, {'short', 'inv_local_short'}, {'quarter', 'inv_local_quarter'}, {'season', 'inv_local_season'}, {'named', 'inv_local_named'}} do
for name, i in pairs (date_names['local'][invert_t[1]]) do -- this table is ['name'] = i
date_names[invert_t[2]][i] = name; -- invert to get [i] = 'name' for conversions from ymd
end
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 title_object = mw.title.getCurrentTitle();
if title_object.namespace == 10 then -- not in template space so that unused templates appear in unused-template-reports;
return nil; -- auto-formatting does not work in Template space so don't set global_df
end
local content = title_object: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;
--[[-----------------< V O L U M E , I S S U E , P A G E S >------------------
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'}
--[[
These tables control when it is appropriate for {{citation}} to render |volume= and/or |issue=. The parameter
names in the tables constrain {{citation}} so that its renderings match the renderings of the equivalent cs1
templates. For example, {{cite web}} does not support |volume= so the equivalent {{citation |website=...}} must
not support |volume=.
]]
local citation_no_volume_t = { -- {{citation}} does not render |volume= when these parameters are used
'website', 'mailinglist', 'script-website',
}
local citation_issue_t = { -- {{citation}} may render |issue= when these parameters are used
'journal', 'magazine', 'newspaper', 'periodical', 'work',
'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work',
}
--[[
Patterns for finding extra text in |volume=, |issue=, |page=, |pages=
]]
local vol_iss_pg_patterns = {
good_ppattern = '^P[^%.PpGg]', -- OK to begin with uppercase P: P7 (page 7 of section P), but not p123 (page 123); TODO: this allows 'Pages' which it should not
bad_ppatterns = { -- patterns for |page= and |pages=
'^[Pp][PpGg]?%.?[ %d]',
'^[Pp][Pp]?%. ', -- from {{p.}} and {{pp.}} templates
'^[Pp]ages?',
'^[Pp]gs.?',
},
vpatterns = { -- patterns for |volume=
'^volumes?',
'^vols?[%.:=]?'
},
ipatterns = { -- patterns for |issue=
'^issues?',
'^iss[%.:=]?',
'^numbers?',
'^nos?%A', -- don't match 'november' or 'nostradamus'
'^nr[%.:=]?',
'^n[%.:= ]' -- might be a valid issue without separator (space char is sep char here)
}
}
--[[--------------------------< K E Y W O R D S >-------------------------------
These tables hold keywords for those parameters that have defined sets of acceptable keywords.
]]
--[[-------------------< K E Y W O R D S T A B L E >--------------------------
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', 'ampersand'}, -- |name-list-style=
['and'] = {'and', 'serial'}, -- |name-list-style=
['affirmative'] = {'yes', 'true', 'y'}, -- |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', 'deviated'}, -- |url-status= -- Used by InternetArchiveBot
['dmy'] = {'dmy'}, -- |df=
['dmy-all'] = {'dmy-all'}, -- |df=
['foreword'] = {'foreword'}, -- |contribution=
['free'] = {'free'}, -- |<id>-access= -- Used by InternetArchiveBot
['harv'] = {'harv'}, -- |ref=; this no longer supported; is_valid_parameter_value() called with <invert> = true
['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
}
--[[------------------------< X L A T E _ K E Y W O R D S >---------------------
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
--[[----------------< M A K E _ K E Y W O R D S _ L I S T >---------------------
this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter.
keywords_lists{}, is a table of tables from keywords{}
]]
local function make_keywords_list (keywords_lists)
local out_table = {}; -- output goes here
for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords
for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ...
table.insert (out_table, keyword); -- ... as plain text, to the output list
end
end
return out_table;
end
--[[----------------< K E Y W O R D S _ L I S T S >-----------------------------
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}),
['ref'] = make_keywords_list ({keywords.harv}), -- inverted check; |ref=harv no longer supported
['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}),
}
--[[---------------------< S T R I P M A R K E R S >----------------------------
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()
}
--[[------------< I N V I S I B L E _ C H A R A C T E R S >---------------------
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_defs = {
del = '\127', -- used to distinguish between stripmarker and del char
zwj = '\226\128\141', -- used with capture because zwj may be allowed
}
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'zero width joiner', '('.. invisible_defs.zwj .. ')'}, -- U+200D, E2 80 8D; capture because zwj may be allowed
{'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', '('.. invisible_defs.del .. ')'}, -- U+007F (DEL), 7F; must be done after stripmarker test; capture to distinguish isolated del chars not part of stripmarker
{'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()
]]
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]';
-- list of emoji that use zwj character (U+200D) to combine with another emoji
local emoji = { -- indexes are decimal forms of the hex values in U+xxxx
[127752] = true, -- U+1F308 🌈 rainbow
[127806] = true, -- U+1F33E 🌾 ear of rice
[127859] = true, -- U+1F373 🍳 cooking
[127891] = true, -- U+1F393 🎓 graduation cap
[127908] = true, -- U+1F3A4 🎤 microphone
[127912] = true, -- U+1F3A8 🎨 artist palette
[127979] = true, -- U+1F3EB 🏫 school
[127981] = true, -- U+1F3ED 🏭 factory
[128102] = true, -- U+1F466 👦 boy
[128103] = true, -- U+1F467 👧 girl
[128104] = true, -- U+1F468 👨 man
[128105] = true, -- U+1F469 👩 woman
[128139] = true, -- U+1F48B 💋 kiss mark
[128187] = true, -- U+1F4BB 💻 personal computer
[128188] = true, -- U+1F4BC 💼 brief case
[128295] = true, -- U+1F527 🔧 wrench
[128300] = true, -- U+1F52C 🔬 microscope
[128488] = true, -- U+1F5E8 🗨 left speech bubble
[128640] = true, -- U+1F680 🚀 rocket
[128658] = true, -- U+1F692 🚒 fire engine
[129309] = true, -- U+1F91D 🤝 handshake
[129455] = true, -- U+1F9AF 🦯 probing cane
[129456] = true, -- U+1F9B0 🦰 emoji component red hair
[129457] = true, -- U+1F9B1 🦱 emoji component curly hair
[129458] = true, -- U+1F9B2 🦲 emoji component bald
[129459] = true, -- U+1F9B3 🦳 emoji component white hair
[129466] = true, -- U+1F9BA 🦺 safety vest
[129468] = true, -- U+1F9BC 🦼 motorized wheelchair
[129469] = true, -- U+1F9BD 🦽 manual wheelchair
[129489] = true, -- U+1F9D1 🧑 adult
[9760] = true, -- U+2620 ☠ skull and crossbones
[9792] = true, -- U+2640 ♀ female sign
[9794] = true, -- U+2642 ♂ male sign
[9877] = true, -- U+2695 ⚕ staff of aesculapius
[9878] = true, -- U+2696 ⚖ scales
[9992] = true, -- U+2708 ✈ airplane
[10084] = true, -- U+2764 ❤ heavy black heart
}
--[[----------------------< L A N G U A G E S U P P O R T >-------------------
These tables and constants support various language-specific functionality.
]]
--local this_wiki_code = mw.getContentLanguage():getCode(); -- get this wiki's language code
local this_wiki_code = lang_obj: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 mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_code, 'all'); -- get a table of language tag/name pairs known to Wikimedia; used for interwiki tests
local mw_languages_by_name_t = {};
for k, v in pairs (mw_languages_by_tag_t) do -- build a 'reversed' table name/tag language pairs know to MediaWiki; used for |language=
v = mw.ustring.lower (v); -- lowercase for tag fetch; get name's proper case from mw_languages_by_tag_t[<tag>]
if mw_languages_by_name_t[v] then -- when name already in the table
if 2 == #k or 3 == #k then -- if tag does not have subtags
mw_languages_by_name_t[v] = k; -- prefer the shortest tag for this name
end
else -- here when name not in the table
mw_languages_by_name_t[v] = k; -- so add name and matching tag
end
end
local inter_wiki_map = {}; -- map of interwiki prefixes that are language-code prefixes
for k, v in pairs (mw.site.interwikiMap ('local')) do -- spin through the base interwiki map (limited to local)
if mw_languages_by_tag_t[v["prefix"]] then -- if the prefix matches a known language tag
inter_wiki_map[v["prefix"]] = true; -- add it to our local map
end
end
--[[--------------------< S C R I P T _ L A N G _ C O D E S >-------------------
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 = {
'ab', 'am', 'ar', 'be', 'bg', 'bn', 'bo', 'bs', 'dv', 'dz', 'el', 'fa', 'gu',
'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk',
'ml', 'mn', 'mr', 'my', 'ne', 'or', 'ota', 'ps', 'ru', 'sd', 'si', 'sr', 'syc',
'ta', 'te', 'tg', 'th', 'ti', 'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh'
};
--[[---------------< L A N G U A G E R E M A P P I N G >----------------------
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
['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=; names require proper capitalization; tags must be lowercase
['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
['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
['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
}
--[[---------------< P R O P E R T I E S _ C A T E G O R I E S >----------------
Properties categories. These are used for investigating qualities of citations.
]]
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
['jul-greg-uncertainty'] = 'CS1: Julian–Gregorian uncertainty', -- probably temporary cat to identify scope of template with dates 1 October 1582 – 1 January 1926
['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',
['long-vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 charachters
['script'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code
['tracked-param'] = 'CS1 tracked parameter: $1', -- $1 is base (enumerators removed) parameter name
['year-range-abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form
}
--[[-------------------< T I T L E _ T Y P E S >--------------------------------
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',
['speech'] = 'Speech',
['techreport'] = 'Technical report',
['thesis'] = 'Thesis',
}
--[[===================<< E R R O R M E S S A G I N G >>======================
]]
--[[----------< E R R O R M E S S A G E S U P P L I M E N T S >-------------
I18N for those messages that are 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
['invalid language code'] = 'invalid language code', -- |script-<param>=
['journal'] = 'journal', -- |bibcode=
['length'] = 'length', -- |isbn=, |bibcode=, |sbn=
['liveweb'] = 'liveweb', -- |archive-url=
['missing comma'] = 'missing comma', -- Vancouver
['missing prefix'] = 'missing prefix', -- |script-<param>=
['missing title part'] = 'missing title part', -- |script-<param>=
['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=
['unknown language code'] = 'unknown language code', -- |script-<param>=
['value'] = 'value', -- |bibcode=
['year'] = 'year', -- |bibcode=
}
--[[--------------< E R R O R _ C O N D I T I O N S >---------------------------
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 = '<code class="cs1-code">|access-date=</code> requires <code class="cs1-code">|url=</code>',
anchor = 'accessdate_missing_url',
category = 'CS1 errors: access-date without URL',
hidden = false
},
err_apostrophe_markup = {
message = 'Italic or bold markup not allowed in: <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'apostrophe_markup',
category = 'CS1 errors: markup',
hidden = false
},
err_archive_missing_date = {
message = '<code class="cs1-code">|archive-url=</code> requires <code class="cs1-code">|archive-date=</code>',
anchor = 'archive_missing_date',
category = 'CS1 errors: archive-url',
hidden = false
},
err_archive_missing_url = {
message = '<code class="cs1-code">|archive-url=</code> requires <code class="cs1-code">|url=</code>',
anchor = 'archive_missing_url',
category = 'CS1 errors: archive-url',
hidden = false
},
err_archive_url = {
message = '<code class="cs1-code">|archive-url=</code> is malformed: $1', -- $1 is error message detail
anchor = 'archive_url',
category = 'CS1 errors: archive-url',
hidden = false
},
err_arxiv_missing = {
message = '<code class="cs1-code">|arxiv=</code> required',
anchor = 'arxiv_missing',
category = 'CS1 errors: arXiv', -- same as bad arxiv
hidden = false
},
err_asintld_missing_asin = {
message = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|asin=</code>', -- $1 is parameter name
anchor = 'asintld_missing_asin',
category = 'CS1 errors: ASIN TLD',
hidden = false
},
err_bad_arxiv = {
message = 'Check <code class="cs1-code">|arxiv=</code> value',
anchor = 'bad_arxiv',
category = 'CS1 errors: arXiv',
hidden = false
},
err_bad_asin = {
message = 'Check <code class="cs1-code">|asin=</code> value',
anchor = 'bad_asin',
category ='CS1 errors: ASIN',
hidden = false
},
err_bad_asin_tld = {
message = 'Check <code class="cs1-code">|asin-tld=</code> value',
anchor = 'bad_asin_tld',
category ='CS1 errors: ASIN TLD',
hidden = false
},
err_bad_bibcode = {
message = 'Check <code class="cs1-code">|bibcode=</code> $1', -- $1 is error message detail
anchor = 'bad_bibcode',
category = 'CS1 errors: bibcode',
hidden = false
},
err_bad_biorxiv = {
message = 'Check <code class="cs1-code">|biorxiv=</code> value',
anchor = 'bad_biorxiv',
category = 'CS1 errors: bioRxiv',
hidden = false
},
err_bad_citeseerx = {
message = 'Check <code class="cs1-code">|citeseerx=</code> value',
anchor = 'bad_citeseerx',
category = 'CS1 errors: citeseerx',
hidden = false
},
err_bad_date = {
message = 'Check date values in: $1', -- $1 is a parameter name list
anchor = 'bad_date',
category = 'CS1 errors: dates',
hidden = false
},
err_bad_doi = {
message = 'Check <code class="cs1-code">|doi=</code> value',
anchor = 'bad_doi',
category = 'CS1 errors: DOI',
hidden = false
},
err_bad_hdl = {
message = 'Check <code class="cs1-code">|hdl=</code> value',
anchor = 'bad_hdl',
category = 'CS1 errors: HDL',
hidden = false
},
err_bad_isbn = {
message = 'Check <code class="cs1-code">|isbn=</code> value: $1', -- $1 is error message detail
anchor = 'bad_isbn',
category = 'CS1 errors: ISBN',
hidden = false
},
err_bad_ismn = {
message = 'Check <code class="cs1-code">|ismn=</code> value',
anchor = 'bad_ismn',
category = 'CS1 errors: ISMN',
hidden = false
},
err_bad_issn = {
message = 'Check <code class="cs1-code">|$1issn=</code> value', -- $1 is 'e' or '' for eissn or issn
anchor = 'bad_issn',
category = 'CS1 errors: ISSN',
hidden = false
},
err_bad_jfm = {
message = 'Check <code class="cs1-code">|jfm=</code> value',
anchor = 'bad_jfm',
category = 'CS1 errors: JFM',
hidden = false
},
err_bad_jstor = {
message = 'Check <code class="cs1-code">|jstor=</code> value',
anchor = 'bad_jstor',
category = 'CS1 errors: JSTOR',
hidden = false
},
err_bad_lccn = {
message = 'Check <code class="cs1-code">|lccn=</code> value',
anchor = 'bad_lccn',
category = 'CS1 errors: LCCN',
hidden = false
},
err_bad_mr = {
message = 'Check <code class="cs1-code">|mr=</code> value',
anchor = 'bad_mr',
category = 'CS1 errors: MR',
hidden = false
},
err_bad_oclc = {
message = 'Check <code class="cs1-code">|oclc=</code> value',
anchor = 'bad_oclc',
category = 'CS1 errors: OCLC',
hidden = false
},
err_bad_ol = {
message = 'Check <code class="cs1-code">|ol=</code> value',
anchor = 'bad_ol',
category = 'CS1 errors: OL',
hidden = false
},
err_bad_osti = {
message = 'Check <code class="cs1-code">|osti=</code> value',
anchor = 'bad_osti',
category = 'CS1 errors: OSTI',
hidden = false
},
err_bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link=
message = 'Check <code class="cs1-code">|$1=</code> value', -- $1 is parameter name
anchor = 'bad_paramlink',
category = 'CS1 errors: parameter link',
hidden = false
},
err_bad_pmc = {
message = 'Check <code class="cs1-code">|pmc=</code> value',
anchor = 'bad_pmc',
category = 'CS1 errors: PMC',
hidden = false
},
err_bad_pmid = {
message = 'Check <code class="cs1-code">|pmid=</code> value',
anchor = 'bad_pmid',
category = 'CS1 errors: PMID',
hidden = false
},
err_bad_rfc = {
message = 'Check <code class="cs1-code">|rfc=</code> value',
anchor = 'bad_rfc',
category = 'CS1 errors: RFC',
hidden = false
},
err_bad_s2cid = {
message = 'Check <code class="cs1-code">|s2cid=</code> value',
anchor = 'bad_s2cid',
category = 'CS1 errors: S2CID',
hidden = false
},
err_bad_sbn = {
message = 'Check <code class="cs1-code">|sbn=</code> value: $1', -- $1 is error message detail
anchor = 'bad_sbn',
category = 'CS1 errors: SBN',
hidden = false
},
err_bad_ssrn = {
message = 'Check <code class="cs1-code">|ssrn=</code> 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 = 'CS1 errors: URL',
hidden = false
},
err_bad_usenet_id = {
message = 'Check <code class="cs1-code">|message-id=</code> value',
anchor = 'bad_message_id',
category = 'CS1 errors: message-id',
hidden = false
},
err_bad_zbl = {
message = 'Check <code class="cs1-code">|zbl=</code> 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 = 'CS1 errors: bare URL',
hidden = false
},
err_biorxiv_missing = {
message = '<code class="cs1-code">|biorxiv=</code> required',
anchor = 'biorxiv_missing',
category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv
hidden = false
},
err_chapter_ignored = {
message = '<code class="cs1-code">|$1=</code> ignored', -- $1 is parameter name
anchor = 'chapter_ignored',
category = 'CS1 errors: chapter ignored',
hidden = false
},
err_citation_missing_title = {
message = 'Missing or empty <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'citation_missing_title',
category = 'CS1 errors: missing title',
hidden = false
},
err_citeseerx_missing = {
message = '<code class="cs1-code">|citeseerx=</code> 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 <code class="cs1-code">|url=</code>',
anchor = 'cite_web_url',
category = 'CS1 errors: requires URL',
hidden = false
},
err_class_ignored = {
message = '<code class="cs1-code">|class=</code> ignored',
anchor = 'class_ignored',
category = 'CS1 errors: class',
hidden = false
},
err_contributor_ignored = {
message = '<code class="cs1-code">|contributor=</code> ignored',
anchor = 'contributor_ignored',
category = 'CS1 errors: contributor',
hidden = false
},
err_contributor_missing_required_param = {
message = '<code class="cs1-code">|contributor=</code> requires <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'contributor_missing_required_param',
category = 'CS1 errors: contributor',
hidden = false
},
err_deprecated_params = {
message = 'Cite uses deprecated parameter <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'deprecated_params',
category = 'CS1 errors: deprecated parameters',
hidden = false
},
err_disp_name = {
message = 'Invalid <code class="cs1-code">|$1=$2</code>', -- $1 is parameter name; $2 is the assigned value
anchor = 'disp_name',
category = 'CS1 errors: display-names',
hidden = false,
},
err_doibroken_missing_doi = {
message = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|doi=</code>', -- $1 is parameter name
anchor = 'doibroken_missing_doi',
category = 'CS1 errors: DOI',
hidden = false
},
err_embargo_missing_pmc = {
message = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|pmc=</code>', -- $1 is parameter name
anchor = 'embargo_missing_pmc',
category = 'CS1 errors: PMC embargo',
hidden = false
},
err_empty_citation = {
message = 'Empty citation',
anchor = 'empty_citation',
category = 'CS1 errors: empty citation',
hidden = false
},
err_etal = {
message = 'Explicit use of et al. in: <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'explicit_et_al',
category = 'CS1 errors: explicit use of et al.',
hidden = false
},
err_extra_text_edition = {
message = '<code class="cs1-code">|edition=</code> has extra text',
anchor = 'extra_text_edition',
category = 'CS1 errors: extra text: edition',
hidden = false,
},
err_extra_text_issue = {
message = '<code class="cs1-code">|$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_issue',
category = 'CS1 errors: extra text: issue',
hidden = false,
},
err_extra_text_pages = {
message = '<code class="cs1-code">|$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_pages',
category = 'CS1 errors: extra text: pages',
hidden = false,
},
err_extra_text_volume = {
message = '<code class="cs1-code">|$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_volume',
category = 'CS1 errors: extra text: volume',
hidden = true,
},
err_first_missing_last = {
message = '<code class="cs1-code">|$1=</code> missing <code class="cs1-code">|$2=</code>', -- $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 = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|$2=</code>', -- $1 is format parameter $2 is url parameter
anchor = 'format_missing_url',
category = 'CS1 errors: format without URL',
hidden = false
},
err_generic_name = {
message = '<code class="cs1-code">|$1=</code> has generic name', -- $1 is parameter name
anchor = 'generic_name',
category = 'CS1 errors: generic name',
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 <code class="cs1-code">|$1=$2</code>', -- $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 <code class="cs1-code">|$1$2=</code>', -- $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 <code class="cs1-code">|$2=</code>', -- $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: <code class="cs1-code">|$1=</code>', -- $1 is parameter name
anchor = 'missing_pipe',
category = 'CS1 errors: missing pipe',
hidden = false
},
err_param_access_requires_param = {
message = '<code class="cs1-code">|$1-access=</code> requires <code class="cs1-code">|$1=</code>', -- $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 <code class="cs1-code">$1</code>', -- $1 is parameter name
anchor = 'param_has_ext_link',
category = 'CS1 errors: external links',
hidden = false
},
err_parameter_ignored = {
message = 'Unknown parameter <code class="cs1-code">|$1=</code> ignored', -- $1 is parameter name
anchor = 'parameter_ignored',
category = 'CS1 errors: unsupported parameter',
hidden = false
},
err_parameter_ignored_suggest = {
message = 'Unknown parameter <code class="cs1-code">|$1=</code> ignored (<code class="cs1-code">|$2=</code> suggested)', -- $1 is unknown parameter $2 is suggested parameter name
anchor = 'parameter_ignored_suggest',
category = 'CS1 errors: unsupported parameter',
hidden = false
},
err_redundant_parameters = {
message = 'More than one of $1 specified', -- $1 is error message detail
anchor = 'redundant_parameters',
category = 'CS1 errors: redundant parameter',
hidden = false
},
err_script_parameter = {
message = 'Invalid <code class="cs1-code">|$1=</code>: $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 = '<code class="cs1-code">|ssrn=</code> 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 = 'CS1 errors: unrecognized parameter',
hidden = false
},
err_trans_missing_title = {
message = '<code class="cs1-code">|trans-$1=</code> requires <code class="cs1-code">|$1=</code> or <code class="cs1-code">|script-$1=</code>', -- $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 = false
},
err_vancouver = {
message = 'Vancouver style error: $1 in name $2', -- $1 is error detail, $2 is the nth name
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
},
--[[--------------------------< M A I N T >-------------------------------------
maint messages do not have a message (message = nil); otherwise the structure
is the same as error messages
]]
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_auto_xlated = { -- date auto-translation not supported by en.wiki
message = nil,
anchor = 'date_auto_xlated',
category = 'CS1 maint: date auto-translated',
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_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 '<name>s list'; gets value from special_case_translation table
hidden = true,
},
maint_numeric_names = {
message = nil,
anchor = 'numeric_names',
category = 'CS1 maint: numeric names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table
hidden = true,
},
maint_others = {
message = nil,
anchor = 'others',
category = 'CS1 maint: others',
hidden = true,
},
maint_others_avm = {
message = nil,
anchor = 'others_avm',
category = 'CS1 maint: others in cite AV media (notes)',
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_postscript = {
message = nil,
anchor = 'postscript',
category = 'CS1 maint: postscript',
hidden = true,
},
maint_ref_duplicates_default = {
message = nil,
anchor = 'ref_default',
category = 'CS1 maint: ref duplicates default',
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_url_status = {
message = nil,
anchor = 'url_status',
category = 'CS1 maint: url-status',
hidden = true,
},
maint_zbl = {
message = nil,
anchor = 'zbl',
category = 'CS1 maint: Zbl',
hidden = true,
},
}
--[[--------------------------< I D _ H A N D L E R S >--------------------------------------------------------
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['<id>'].redirect when use_identifier_redirects is true
Wikidata-supplied article name for the local wiki from id_handlers['<id>'].q
local article name from id_handlers['<id>'].link
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:.... where '...' is the appropriate identifier label
for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn
for |asin= and |ol=, which require assembly, use the keyword: url
for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info', 'rft', or 'url' 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',
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',
prefix = '//www.amazon.',
COinS = 'url',
separator = ' ',
encode = false;
},
['BIBCODE'] = {
parameters = {'bibcode'},
link = 'Bibcode',
redirect = 'Bibcode (identifier)',
q = 'Q25754',
label = 'Bibcode',
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',
prefix = '//doi.org/',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['CITESEERX'] = {
parameters = {'citeseerx'},
link = 'CiteSeerX',
redirect = 'CiteSeerX (identifier)',
q = 'Q2715061',
label = 'CiteSeerX',
prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['DOI'] = { -- Used by InternetArchiveBot
parameters = { 'doi', 'DOI'},
link = 'Digital object identifier',
redirect = 'doi (identifier)',
q = 'Q25670',
label = 'doi',
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',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.eissn',
encode = false,
separator = ' ',
},
['HDL'] = {
parameters = { 'hdl', 'HDL' },
link = 'Handle System',
redirect = 'hdl (identifier)',
q = 'Q3126718',
label = 'hdl',
prefix = '//hdl.handle.net/',
COinS = 'info:hdl',
separator = ':',
encode = true,
custom_access = 'hdl-access',
},
['ISBN'] = { -- Used by InternetArchiveBot
parameters = {'isbn', 'ISBN'},
link = 'International Standard Book Number',
redirect = 'ISBN (identifier)',
q = 'Q33057',
label = 'ISBN',
prefix = 'Special:BookSources/',
COinS = 'rft.isbn',
separator = ' ',
},
['ISMN'] = {
parameters = {'ismn', 'ISMN'},
link = 'International Standard Music Number',
redirect = 'ISMN (identifier)',
q = 'Q1666938',
label = 'ISMN',
prefix = '', -- not currently used;
COinS = nil, -- nil because we can't use pre or rft or info:
separator = ' ',
},
['ISSN'] = {
parameters = {'issn', 'ISSN'},
link = 'International Standard Serial Number',
redirect = 'ISSN (identifier)',
q = 'Q131276',
label = 'ISSN',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.issn',
encode = false,
separator = ' ',
},
['JFM'] = {
parameters = {'jfm', 'JFM'},
link = 'Jahrbuch über die Fortschritte der Mathematik',
redirect = 'JFM (identifier)',
q = '',
label = 'JFM',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['JSTOR'] = {
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
redirect = 'JSTOR (identifier)',
q = 'Q1420342',
label = 'JSTOR',
prefix = '//www.jstor.org/stable/', -- protocol-relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
custom_access = 'jstor-access',
},
['LCCN'] = {
parameters = {'lccn', 'LCCN'},
link = 'Library of Congress Control Number',
redirect = 'LCCN (identifier)',
q = 'Q620946',
label = 'LCCN',
prefix = '//lccn.loc.gov/', -- protocol-relative tested 2015-12-28
COinS = 'info:lccn',
encode = false,
separator = ' ',
},
['MR'] = {
parameters = {'mr', 'MR'},
link = 'Mathematical Reviews',
redirect = 'MR (identifier)',
q = 'Q211172',
label = 'MR',
prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol-relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['OCLC'] = {
parameters = {'oclc', 'OCLC'},
link = 'OCLC',
redirect = 'OCLC (identifier)',
q = 'Q190593',
label = 'OCLC',
prefix = '//www.worldcat.org/oclc/',
COinS = 'info:oclcnum',
encode = true,
separator = ' ',
id_limit = 9999999999, -- 10-digits
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = 'Open Library',
redirect = 'OL (identifier)',
q = 'Q1201876',
label = 'OL',
prefix = '//openlibrary.org/',
COinS = 'url',
separator = ' ',
encode = true,
custom_access = 'ol-access',
},
['OSTI'] = {
parameters = {'osti', 'OSTI'},
link = 'Office of Scientific and Technical Information',
redirect = 'OSTI (identifier)',
q = 'Q2015776',
label = 'OSTI',
prefix = '//www.osti.gov/biblio/', -- protocol-relative tested 2018-09-12
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
id_limit = 23010000,
custom_access = 'osti-access',
},
['PMC'] = {
parameters = {'pmc', 'PMC'},
link = 'PubMed Central',
redirect = 'PMC (identifier)',
q = 'Q229883',
label = 'PMC',
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
suffix = '',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
id_limit = 9300000,
access = 'free', -- free to read
},
['PMID'] = {
parameters = {'pmid', 'PMID'},
link = 'PubMed Identifier',
redirect = 'PMID (identifier)',
q = 'Q2082879',
label = 'PMID',
prefix = '//pubmed.ncbi.nlm.nih.gov/',
COinS = 'info:pmid',
encode = false,
separator = ' ',
id_limit = 35900000,
},
['RFC'] = {
parameters = {'rfc', 'RFC'},
link = 'Request for Comments',
redirect = 'RFC (identifier)',
q = 'Q212971',
label = 'RFC',
prefix = '//tools.ietf.org/html/rfc',
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
id_limit = 9300,
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',
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 = ' ',
},
['SSRN'] = {
parameters = {'ssrn', 'SSRN'},
link = 'Social Science Research Network',
redirect = 'SSRN (identifier)',
q = 'Q7550801',
label = 'SSRN',
prefix = '//ssrn.com/abstract=', -- protocol-relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
id_limit = 4200000,
custom_access = 'ssrn-access',
},
['S2CID'] = {
parameters = {'s2cid', 'S2CID'},
link = 'Semantic Scholar',
redirect = 'S2CID (identifier)',
q = 'Q22908627',
label = 'S2CID',
prefix = 'https://api.semanticscholar.org/CorpusID:',
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
id_limit = 254000000,
custom_access = 's2cid-access',
},
['USENETID'] = {
parameters = {'message-id'},
link = 'Usenet',
redirect = 'Usenet (identifier)',
q = 'Q193162',
label = 'Usenet:',
prefix = 'news:',
encode = false,
COinS = 'pre', -- use prefix value
separator = ' ',
},
['ZBL'] = {
parameters = {'zbl', 'ZBL' },
link = 'Zentralblatt MATH',
redirect = 'Zbl (identifier)',
q = 'Q190269',
label = 'Zbl',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
}
--[[--------------------------< E X P O R T S >---------------------------------
]]
return {
use_identifier_redirects = true, -- when true use redirect name for identifier label links; always true at en.wiki
local_lang_cat_enable = false; -- when true categorizes pages where |language=<local wiki's language>; always false at en.wiki
date_name_auto_xlate_enable = false; -- when true translates English month-names to the local-wiki's language month names; always false at en.wiki
date_digit_auto_xlate_enable = false; -- when true translates Western date digit to the local-wiki's language digits (date_names['local_digits']); always false at en.wiki
global_df = get_date_format (), -- tables and variables created when this module is loaded
punct_skip = build_skip_table (punct_skip, punct_meta_params),
url_skip = build_skip_table (url_skip, url_meta_params),
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,
id_handlers = id_handlers,
keywords_lists = keywords_lists,
keywords_xlate = keywords_xlate,
stripmarkers=stripmarkers,
invisible_chars = invisible_chars,
invisible_defs = invisible_defs,
indic_script = indic_script,
emoji = emoji,
maint_cats = maint_cats,
messages = messages,
presentation = presentation,
prop_cats = prop_cats,
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,
vol_iss_pg_patterns = vol_iss_pg_patterns,
inter_wiki_map = inter_wiki_map,
mw_languages_by_tag_t = mw_languages_by_tag_t,
mw_languages_by_name_t = mw_languages_by_name_t,
citation_class_map_t = citation_class_map_t,
citation_issue_t = citation_issue_t,
citation_no_volume_t = citation_no_volume_t,
}
thb9i5vwi93a7ji0wet25dua5c4zuel
Module:Citation/CS1/Date validation
828
42164542
1096003150
1067249012
2022-07-01T17:45:21Z
Trappist the monk
10289486
sync from sandbox;
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local add_prop_cat, is_set, in_array, set_message, substitute, wrap_style; -- imported functions from selected Module:Citation/CS1/Utilities
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------< F I L E - S C O P E D E C L A R A T I O N S >--------------------------------
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()
--[=[-------------------------< I S _ V A L I D _ A C C E S S D A T E >----------------------------------------
returns true if:
Wikipedia start date <= accessdate < 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 <= access_ts and access_ts < tomorrow_ts then -- Wikipedia start date <= accessdate < tomorrow's date
return true;
else
return false; -- accessdate out of range
end
end
--[[--------------------------< G E T _ M O N T H _ N U M B E R >----------------------------------------------
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
--[[--------------------------< G E T _ S E A S O N _ N U M B E R >--------------------------------------------
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 <param> 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
hemisphere 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
--[[--------------------------< G E T _ Q U A R T E R _ N U M B E R >------------------------------------------
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 <param> 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
--[[--------------------------< G E T _ P R O P E R _ N A M E _ N U M B E R >----------------------------------
returns a non-zero number if date contains a recognized proper-name. Capitalization and spelling must be correct.
returns 0 when <param> 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
--[[--------------------------< G E T _ E L E M E N T _ N U M B E R <------------------------------------------
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
--[[--------------------------< I S _ V A L I D _ Y E A R >----------------------------------------------------
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.
Special case for |pmc-embargo-date=: years more than two years in the future are not acceptable
]]
local function is_valid_year (year, param)
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 number for the comparison;
if 'pmc-embargo-date' == param then -- special case for |pmc-embargo-date=
return year and (year <= tonumber(os.date("%Y"))+2) or false; -- years more than two years in the future are not accepted
end
return year and (year <= year_limit) or false;
end
--[[--------------------------< I S _ V A L I D _ D A T E >----------------------------------------------------
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, param)
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, param) then -- no farther into the future than next year except |pmc-embargo-date= no more than two years in the future
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 > 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) > month_length then
return false;
end
return true;
end
--[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >--------------------------
Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August.
This function looks in cfg.date_names{} to see if both month names are listed in the long subtable or both are
listed in the short subtable. When both have the same style (both are listed in the same table), returns true; false else
]]
local function is_valid_month_range_style (month1, month2)
if (cfg.date_names.en.long[month1] and cfg.date_names.en.long[month2]) or -- are both English names listed in the long subtable?
(cfg.date_names.en.short[month1] and cfg.date_names.en.short[month2]) or -- are both English names listed in the short subtable?
(cfg.date_names['local'].long[month1] and cfg.date_names['local'].long[month2]) or -- are both local names listed in the long subtable?
(cfg.date_names['local'].short[month1] and cfg.date_names['local'].short[month2]) then -- are both local names listed in the short subtable?
return true;
end
return false; -- names are mixed
end
--[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------
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 < range_end_number and -- range_start is a month; does range_start precede range_end?
is_valid_month_range_style (range_start, range_end) then -- do months have the same style?
return true; -- proper order and same style
end
return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month
end
--[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------
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=<value> 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 <= month) and (12 >= 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 < year) and (1925 >= 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 > tonumber(input.year) or 20 < tonumber(input.month) then -- Julian calendar or season so &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 < 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 < tonumber(input.month) then
tCOinS_date.rftchron = season[input.month]; -- proper-name dates
elseif 30 < 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
--[[--------------------------< P A T T E R N S >--------------------------------------------------------------
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
}
--[[--------------------------< I S _ V A L I D _ E M B A R G O _ D A T E >------------------------------------
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 (patterns['ymd'][1]) or -- ymd
v:match (patterns['Mdy'][1]) or -- dmy
v:match (patterns['dMy'][1]) 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
--[[--------------------------< C H E C K _ D A T E >----------------------------------------------------------
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 < tonumber(month) or 1 > tonumber(month) or 1582 > 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) >= 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) >= 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) <= 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) <= 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]);
month = get_season_number (month, param); -- <month> can only be winter or summer; also for metadata
if (month ~= cfg.date_names['en'].season['Winter']) and (month ~= cfg.date_names['en'].season['Summer']) then
return false; -- not Summer or Winter; abandon
end
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
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) >= 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) >= 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 > 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) >= 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, param); -- <param> for |pmc-embargo-date=
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
--[[--------------------------< D A T E S >--------------------------------------------------------------------
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 <error_list> 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 date; 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
--[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------
Compare the value provided in |year= with the year value(s) provided in |date=. This function sets a local 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)
the numeric value in <result> determines the 'output' if any from this function:
0 – adds error message to error_list sequence table
1 – adds maint cat
2 – does nothing
]]
local function year_date_check (year_string, year_origin, date_string, date_origin, error_list)
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 -- should never get here; this function called only when no other date errors
result = 0; -- no recognizable year in date
end
if 0 == result then -- year / date mismatch
table.insert (error_list, substitute (cfg.messages['mismatch'], {year_origin, date_origin})); -- add error message to error_list sequence table
elseif 1 == result then -- redundant year / date
set_message ('maint_date_year'); -- add a maint cat
end
end
--[[--------------------------< R E F O R M A T T E R >--------------------------------------------------------
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 -> d-dMy
},
['d-dMy'] = { -- date format is d-d>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 -> 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 -> 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 -> 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 -> 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 -> 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; when 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' == format_param then -- yMd not supported at en.wiki; when yMd is supported at your wiki, remove or comment-out this line
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 (all convertable date formats except ymd)
if t.y2 then -- for year range date formats
t.y2 = t.a; -- use the anchor year capture when reassembling the date
else -- here for single date formats (except ymd)
t.y = t.a; -- use the anchor year capture when reassembling the date
end
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_short'][tonumber(t.m)]; -- convert it to a month name
else
t.m = cfg.date_names['inv_local_long'][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
t.y = t.y:gsub ('%a', ''); -- strip CITREF disambiguator if present; anchor year already known so process can proceed; TODO: maint message?
if 1582 > 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_short'][t[mon]]) or cfg.date_names['inv_local_long'][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
--[[-------------------------< R E F O R M A T _ D A T E S >--------------------------------------------------
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
--[[--------------------------< D A T E _ H Y P H E N _ T O _ D A S H >----------------------------------------
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) and
not mw.ustring.match (param_val.val, patterns.ymd[1]) 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
return result; -- so we know if any hyphens were replaced
end
--[[-------------------------< D A T E _ N A M E _ X L A T E >------------------------------------------------
Attempts to translate English date names to local-language date 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;
local sources_t = {
{cfg.date_names.en.long, cfg.date_names.inv_local_long}, -- for translating long English month names to long local month names
{cfg.date_names.en.short, cfg.date_names.inv_local_short}, -- short month names
{cfg.date_names.en.quarter, cfg.date_names.inv_local_quarter}, -- quarter date names
{cfg.date_names.en.season, cfg.date_names.inv_local_season}, -- season date nam
{cfg.date_names.en.named, cfg.date_names.inv_local_named}, -- named dates
}
local function is_xlateable (month) -- local function to get local date name that replaces existing English-language date name
for _, date_names_t in ipairs (sources_t) do -- for each sequence table in date_names_t
if date_names_t[1][month] then -- if date name is English month (long or short), quarter, season or named and
if date_names_t[2][date_names_t[1][month]] then -- if there is a matching local date name
return date_names_t[2][date_names_t[1][month]]; -- return the local date name
end
end
end
end
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 date names in the date (single date or date range)
month = mw.text.trim (month); -- this because quarterly dates contain whitespace
xlate = is_xlateable (month); -- get translate <month>; returns translation or nil
-- if cfg.date_names.en.long[month] then -- long month dates
-- if cfg.date_names.inv_local_long[cfg.date_names.en.long[month]] then
-- xlate = cfg.date_names.inv_local_long[cfg.date_names.en.long[month]];
-- end
---- mode = 'F'; -- English name is long so use long local name
-- elseif cfg.date_names.en.short[month] then -- short month dates
-- if cfg.date_names.inv_local_short[cfg.date_names.en.short[month]] then
-- xlate = cfg.date_names.inv_local_short[cfg.date_names.en.short[month]];
-- end
---- mode = 'M'; -- English name is short so use short local name
-- elseif cfg.date_names.en.quarter[month] then -- quarter dates
-- if cfg.date_names.inv_local_quarter[cfg.date_names.en.quarter[month]] then
-- xlate = cfg.date_names.inv_local_quarter[cfg.date_names.en.quarter[month]];
-- end
-- elseif cfg.date_names.en.season[month] then -- season dates
-- if cfg.date_names.inv_local_season[cfg.date_names.en.season[month]] then
-- xlate = cfg.date_names.inv_local_season[cfg.date_names.en.season[month]];
-- end
-- elseif cfg.date_names.en.named[month] then -- named dates
-- if cfg.date_names.inv_local_named[cfg.date_names.en.named[month]] then
-- xlate = cfg.date_names.inv_local_named[cfg.date_names.en.named[month]];
-- end
-- else
-- xlate=nil; -- not an English month name; could be local language month name
---- mode = nil; -- not an English month name; could be local language month name or an English season name
-- end
if xlate then
-- 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
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
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;
substitute = utilities_page_ptr.substitute;
wrap_style = utilities_page_ptr.wrap_style;
cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
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
}
obboarlfkmx4zbge5gqjllttddlxljn
Module:Citation/CS1/Identifiers
828
48812124
1067249010
1017041362
2022-01-22T14:11:18Z
Trappist the monk
10289486
update per [[Wikipedia:Village_pump_(proposals)#rfc:_shall_we_update_cs1/2?|RfC]];
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
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
--[[--------------------------< P A G E S C O P E V A R I A B L E S >--------------------------------------
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=
--============================<< H E L P E R F U N C T I O N S >>============================================
--[[--------------------------< W I K I D A T A _ A R T I C L E _ N A M E _ G E T >----------------------------
as an aid to internationalizing identifier-label wikilinks, gets identifier article names from Wikidata.
returns :<lang code>:<article title> when <q> has an <article title> for <lang code>; 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
--[[--------------------------< L I N K _ L A B E L _ M A K E >------------------------------------------------
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
--[[--------------------------< E X T E R N A L _ L I N K _ I D >----------------------------------------------
Formats a wiki-style 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, 'PATH');
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 ' ',
ext_link
});
end
--[[--------------------------< I N T E R N A L _ L I N K _ I D >----------------------------------------------
Formats a wiki-style internal link
TODO: Does not currently need to support options.access, options.encode, auto-linking and COinS (as in external_link_id),
but may be needed in the future for :m:Interwiki_map custom-prefixes like :arxiv:, :bibcode:, :DOI:, :hdl:, :ISSN:,
:JSTOR:, :Openlibrary:, :PMID:, :RFC:.
]]
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 ' ', -- 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
--[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------
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) >= 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
--[=[-------------------------< I S _ V A L I D _ B I O R X I V _ D A T E >------------------------------------
returns true if:
2019-12-11T00:00Z <= biorxiv_date < 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_object.formatDate(). To get
around that call this function with date parts and create a YYYY-MM-DD format date.
]=]
local function is_valid_biorxiv_date (y, m, d)
local biorxiv_date = table.concat ({y, m, d}, '-'); -- make ymd 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 <= biorxiv_ts) and (biorxiv_ts < tomorrow_ts)) -- 2012-12-11T00:00Z <= biorxiv_date < tomorrow's date
end
--[[--------------------------< IS _ V A L I D _ I S X N >-----------------------------------------------------
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
--[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >-----------------------------------------------
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
--[[--------------------------< N O R M A L I Z E _ L C C N >--------------------------------------------------
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
--============================<< I D E N T I F I E R F U N C T I O N S >>====================================
--[[--------------------------< A R X I V >--------------------------------------------------------------------
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:<archive>.<class>/<date code><number><version>
where:
<archive> is a string of alpha characters - may be hyphenated; no other punctuation
<class> 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
<date code> 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
<number> is a three-digit number
<version> 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:<date code>.<number><version>
where:
<date code> 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
<number> is a four-digit number
<version> is a 1 or more digit number preceded with a lowercase v; no spaces
the third form, valid from January 2015 is:
arXiv:<date code>.<number><version>
where:
<date code> and <version> are as defined for 0704-1412
<number> is a five-digit number
]]
local function arxiv (options)
local id = options.id;
local class = options.Class; -- TODO: lowercase?
local handler = options.handler;
local year, month, version;
local err_msg = 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 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month
((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok?
err_msg = 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 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years)
((7 == year) and (4 > month)) then -- when year is 07, is month invalid (before April)?
err_msg = 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 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years)
err_msg = true; -- flag for error message
end
else
err_msg = true; -- not a recognized format; flag for error message
end
if err_msg then
options.coins_list_t['ARXIV'] = nil; -- when error, unset so not included in COinS
end
local err_msg_t = {};
if err_msg then
set_message ('err_bad_arxiv');
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});
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
set_message ('err_class_ignored');
end
end
return text;
end
--[[--------------------------< B I B C O D E >--------------------------------------------------------------------
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; &. )
9–18 must be letter, digit, or dot
19 must be a letter or dot
]]
local function bibcode (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
local err_type;
local err_msg = '';
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&%.][%w&%.][%w&%.][%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 > year) or (year > next_year) then
err_type = cfg.err_msg_supl.year; -- year out of bounds
end
if id:find('&%.') then
err_type = cfg.err_msg_supl.journal; -- journal abbreviation must not have '&.' (if it does it's missing a letter)
end
end
end
if is_set (err_type) then -- if there was an error detected
set_message ('err_bad_bibcode', {err_type});
options.coins_list_t['BIBCODE'] = nil; -- when error, unset so not included in COinS
end
return text;
end
--[[--------------------------< B I O R X I V >-----------------------------------------------------------------
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 -> 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 -> 10.1101/2019.12.11.123456v2
see https://www.biorxiv.org/about-biorxiv
]]
local function biorxiv (options)
local id = options.id;
local handler = options.handler;
local err_msg = 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_msg = nil; -- we found a match so unset the error message
break; -- and done
end
end -- err_cat remains set here when no match
if err_msg then
options.coins_list_t['BIORXIV'] = nil; -- when error, unset so not included in COinS
set_message ('err_bad_biorxiv'); -- and set the 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, access = handler.access});
end
--[[--------------------------< C I T E S E E R X >------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
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
set_message ('err_bad_citeseerx' );
options.coins_list_t['CITESEERX'] = nil; -- when error, unset so not included in COinS
end
return text;
end
--[[--------------------------< D O I >------------------------------------------------------------------------
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 (options)
local id = options.id;
local inactive = options.DoiBroken
local access = options.access;
local ignore_invalid = options.accept;
local handler = options.handler;
local err_flag;
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 < 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 = mw.ustring.match (id, '^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-5]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 60000+); accepts: 10000–59999
'^[^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
'[^%d%.]', -- any character that isn't a digit or a dot
}
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_flag = set_message ('err_bad_doi'); -- when found, mark this DOI as bad
break; -- and done
end
end
else
err_flag = set_message ('err_bad_doi'); -- invalid directory or malformed
end
else
set_message ('maint_doi_ignore');
end
if err_flag then
options.coins_list_t['DOI'] = nil; -- when error, unset so not included in COinS
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_flag 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;
end
--[[--------------------------< H D L >------------------------------------------------------------------------
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 (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
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
set_message ('err_bad_hdl' );
options.coins_list_t['HDL'] = nil; -- when error, unset so not included in COinS
end
return text;
end
--[[--------------------------< I S B N >----------------------------------------------------------------------
Determines whether an ISBN string is valid
]]
local function isbn (options)
local isbn_str = options.id;
local ignore_invalid = options.accept;
local handler = options.handler;
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
options.coins_list_t['ISBN'] = nil; -- when error, unset so not included in COinS
set_message ('err_bad_isbn', err_type); -- set an error message
return ISBN; -- return id text
end
end
return ISBN; -- return id text
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
if not is_valid_isxn (id, 10) then -- test isbn-10 for numerical validity
return return_result (false, cfg.err_msg_supl.check); -- fail if isbn-10 is not numerically valid
end
if id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not valid isbn group ids but are used by amazon as numeric identifiers (asin)
return return_result (false, cfg.err_msg_supl.group); -- fail if isbn-10 begins with 630/1
end
return return_result (true, cfg.err_msg_supl.check); -- pass if isbn-10 is numerically valid
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
--[[--------------------------< A S I N >----------------------------------------------------------------------
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....... and |asin=631....... are (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 (options)
local id = options.id;
local domain = options.ASINTLD;
local err_flag;
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_flag = 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 is_valid_isxn (id, 10) then -- see if ASIN value is or validates as ISBN-10
if not id:find ('^63[01]') then -- 630xxxxxxx and 631xxxxxxx are (apparently) not a valid isbn prefixes but are used by amazon as a numeric identifier
err_flag = set_message ('err_bad_asin'); -- ASIN has ISBN-10 form but begins with something other than 630/1 so probably an isbn
end
elseif not is_set (err_flag) then
err_flag = set_message ('err_bad_asin'); -- ASIN is not ISBN-10
end
elseif not id:match("^%u[%d%u]+$") then
err_flag = set_message ('err_bad_asin'); -- asin doesn't begin with uppercase alpha
end
end
if (not is_set (domain)) or in_array (domain, {'us'}) then -- default: United States
domain = "com";
elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom
domain = "co." .. domain;
elseif in_array (domain, {'z.cn'}) then -- China
domain = "cn";
elseif in_array (domain, {'au', 'br', 'mx', 'sg', 'tr'}) then -- Australia, Brazil, Mexico, Singapore, Turkey
domain = "com." .. domain;
elseif not in_array (domain, {'ae', 'ca', 'cn', 'de', 'es', 'fr', 'in', 'it', 'nl', 'pl', 'sa', 'se', 'co.jp', 'co.uk', 'com', 'com.au', 'com.br', 'com.mx', 'com.sg', 'com.tr'}) then -- Arabic Emirates, Canada, China, Germany, Spain, France, Indonesia, Italy, Netherlands, Poland, Saudi Arabia, Sweden (as of 2021-03 Austria (.at), Liechtenstein (.li) and Switzerland (.ch) still redirect to the German site (.de) with special settings, so don't maintain local ASINs for them)
err_flag = set_message ('err_bad_asin_tld'); -- unsupported asin-tld value
end
local handler = options.handler;
if not is_set (err_flag) then
options.coins_list_t['ASIN'] = handler.prefix .. domain .. "/dp/" .. id; -- asin for coins
else
options.coins_list_t['ASIN'] = nil; -- when error, unset so not included in COinS
end
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})
end
--[[--------------------------< I S M N >----------------------------------------------------------------------
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.
ismn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx)
or an identifier registered at info-uri.info (info:)
]]
local function ismn (options)
local id = options.id;
local handler = options.handler;
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
options.coins_list_t['ISMN'] = nil; -- when error, unset so not included in COinS; not really necessary here because ismn not made part of COinS
set_message ('err_bad_ismn'); -- create an error message if the ISMN is invalid
end
return text;
end
--[[--------------------------< I S S N >----------------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
local ignore_invalid = options.accept;
local issn_copy = id; -- save a copy of unadulterated ISSN; use this version for display if ISSN does not validate
local text;
local valid_issn = true;
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
options.coins_list_t['ISSN'] = nil; -- when error, unset so not included in COinS
set_message ('err_bad_issn', (options.hkey == 'EISSN') and 'e' or ''); -- create an error message if the ISSN is invalid
end
end
return text;
end
--[[--------------------------< J F M >-----------------------------------------------------------------------
A numerical identifier in the form nn.nnnn.nn
]]
local function jfm (options)
local id = options.id;
local handler = options.handler;
local id_num;
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 JFM 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
set_message ('err_bad_jfm' ); -- set an error message
options.coins_list_t['JFM'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< J S T O R >--------------------------------------------------------------------
Format a JSTOR with some error checking
]]
local function jstor (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
if id:find ('[Jj][Ss][Tt][Oo][Rr]') or id:find ('^https?://') or id:find ('%s') then
set_message ('err_bad_jstor'); -- set an error message
options.coins_list_t['JSTOR'] = nil; -- when error, unset so not included in COinS
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, access = access});
end
--[[--------------------------< L C C N >----------------------------------------------------------------------
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&metadataPrefix=reg&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 (options)
local lccn = options.id;
local handler = options.handler;
local err_flag; -- 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_flag = 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_flag = 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_flag = 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_flag = 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_flag = set_message ('err_bad_lccn'); -- no match, set an error message
end
else
err_flag = set_message ('err_bad_lccn'); -- wrong length, set an error message
end
if not is_set (err_flag) and nil ~= lccn:find ('%s') then
err_flag = set_message ('err_bad_lccn'); -- lccn contains a space, set an error message
end
if is_set (err_flag) then
options.coins_list_t['LCCN'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< M R >--------------------------------------------------------------------------
A seven digit number; if not seven digits, zero-fill leading digits to make seven digits.
]]
local function mr (options)
local id = options.id;
local handler = options.handler;
local id_num;
local id_len;
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 >= id_len) and (0 ~= id_len) then
id = string.rep ('0', 7-id_len) .. id_num; -- zero-fill leading digits
else
set_message ('err_bad_mr'); -- set an error message
options.coins_list_t['MR'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< O C L C >----------------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
local number;
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 < 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 < 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
set_message ('err_bad_oclc') -- add an error message if the id is malformed
options.coins_list_t['OCLC'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< O P E N L I B R A R Y >--------------------------------------------------------
Formats an OpenLibrary link, and checks for associated errors.
]]
local function openlibrary (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
local ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- strip optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W';
local err_flag;
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
err_flag = set_message ('err_bad_ol');
end
if not is_set (err_flag) then
options.coins_list_t['OL'] = handler.prefix .. prefix[code] .. ident; -- experiment for ol coins
else
options.coins_list_t['OL'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< O S T I >----------------------------------------------------------------------
Format OSTI and do simple error checking. OSTIs are sequential numbers beginning at 1 and counting up. This
code checks the OSTI to see that it contains only digits and is less than test_limit specified in the configuration;
the value in test_limit will need to be updated periodically as more OSTIs are issued.
NB. 1018 is the lowest OSTI number found in the wild (so far) and resolving OK on the OSTI site
]]
local function osti (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
if id:match("[^%d]") then -- if OSTI has anything but digits
set_message ('err_bad_osti'); -- set an error message
options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS
else -- OSTI is only digits
local id_num = tonumber (id); -- convert id to a number for range testing
if 1018 > id_num or handler.id_limit < id_num then -- if OSTI is outside test limit boundaries
set_message ('err_bad_osti'); -- set an error message
options.coins_list_t['OSTI'] = nil; -- when error, unset so not included in COinS
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, access = access});
end
--[[--------------------------< P M C >------------------------------------------------------------------------
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=<value> 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 (options)
local id = options.id;
local embargo = options.Embargo; -- TODO: lowercase?
local handler = options.handler;
local err_flag;
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 > id_num or handler.id_limit < id_num then -- if PMC is outside test limit boundaries
err_flag = 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_flag = 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,
});
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_flag and 'pmc' or nil -- do not auto-link when PMC has error
});
end
if err_flag then
options.coins_list_t['PMC'] = nil; -- when error, unset so not included in COinS
end
return text;
end
--[[--------------------------< P M I D >----------------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
if id:match("[^%d]") then -- if PMID has anything but digits
set_message ('err_bad_pmid'); -- set an error message
options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS
else -- PMID is only digits
local id_num = tonumber (id); -- convert id to a number for range testing
if 1 > id_num or handler.id_limit < id_num then -- if PMID is outside test limit boundaries
set_message ('err_bad_pmid'); -- set an error message
options.coins_list_t['PMID'] = nil; -- when error, unset so not included in COinS
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});
end
--[[--------------------------< R F C >------------------------------------------------------------------------
Format RFC and do simple error checking. RFCs are sequential numbers beginning at 1 and counting up. This
code checks the RFC to see that it contains only digits and is less than test_limit specified in the configuration;
the value in test_limit will need to be updated periodically as more RFCs are issued.
An index of all RFCs is here: https://tools.ietf.org/rfc/
]]
local function rfc (options)
local id = options.id;
local handler = options.handler;
if id:match("[^%d]") then -- if RFC has anything but digits
set_message ('err_bad_rfc'); -- set an error message
options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS
else -- RFC is only digits
local id_num = tonumber (id); -- convert id to a number for range testing
if 1 > id_num or handler.id_limit < id_num then -- if RFC is outside test limit boundaries
set_message ('err_bad_rfc'); -- set an error message
options.coins_list_t['RFC'] = nil; -- when error, unset so not included in COinS
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, access = handler.access});
end
--[[--------------------------< S 2 C I D >--------------------------------------------------------------------
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 (options)
local id = options.id;
local access = options.access;
local handler = options.handler;
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 < id_num then -- if S2CID is outside test limit boundaries
set_message ('err_bad_s2cid'); -- set an error message
options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS
end
else -- when id format incorrect
set_message ('err_bad_s2cid'); -- set an error message
options.coins_list_t['S2CID'] = nil; -- when error, unset so not included in COinS
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});
return text;
end
--[[--------------------------< S B N >------------------------------------------------------------------------
9-digit form of ISBN-10; uses same check-digit validation when SBN is prefixed with an additional '0' to make 10 digits
sbn value not made part of COinS metadata because we don't have a url or isn't a COinS-defined identifier (rft.xxx)
or an identifier registered at info-uri.info (info:)
]]
local function sbn (options)
local id = options.id;
local ignore_invalid = options.accept;
local handler = options.handler;
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
options.coins_list_t['SBN'] = nil; -- when error, unset so not included in COinS; not really necessary here because sbn not made part of COinS
set_message ('err_bad_sbn', {err_type}); -- display an error message
return SBN;
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
--[[--------------------------< S S R N >----------------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
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 > id_num or handler.id_limit < id_num then -- if SSRN is outside test limit boundaries
set_message ('err_bad_ssrn'); -- set an error message
options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS
end
else -- when id format incorrect
set_message ('err_bad_ssrn'); -- set an error message
options.coins_list_t['SSRN'] = nil; -- when error, unset so not included in COinS
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 = options.access});
return text;
end
--[[--------------------------< U S E N E T _ I D >------------------------------------------------------------
Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in
'<' and/or '>' angle brackets.
]]
local function usenet_id (options)
local id = options.id;
local handler = options.handler;
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('^[^<].*[^>]$') then -- doesn't have '@' or has one or first or last character is '< or '>'
set_message ('err_bad_usenet_id') -- add an error message if the message id is invalid
options.coins_list_t['USENETID'] = nil; -- when error, unset so not included in COinS
end
return text;
end
--[[--------------------------< Z B L >-----------------------------------------------------------------------
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 (options)
local id = options.id;
local handler = options.handler;
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?
set_message ('err_bad_zbl'); -- no, set an error message
options.coins_list_t['ZBL'] = nil; -- when error, unset so not included in COinS
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});
end
--============================<< I N T E R F A C E F U N C T I O N S >>==========================================
--[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------
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
--[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >--------------------------------------
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.
returns a table of k/v pairs where k is same as the identifier's key in cfg.id_handlers and v is the assigned (valid) keyword
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
set_message ('err_invalid_param_val', {access_param, access_level});
access_level = nil; -- invalid so unset
end
if not is_set (id_list[k]) then -- identifier access-level must have a matching identifier
set_message ('err_param_access_requires_param', {k:lower()}); -- 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
--[[--------------------------< B U I L D _ I D _ L I S T >----------------------------------------------------
render the identifiers into a sorted sequence table
<ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value
<options_t> is a table of various k/v option pairs provided in the call to new_build_id_list();
modified by this function and passed to all identifier rendering functions
<access_levels_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value (if valid)
returns a sequence table of sorted (by hkey - 'handler' key) rendered identifier strings
]]
local function build_id_list (ID_list_coins_t, options_t, access_levels_t)
local ID_list_t = {};
local accept;
local func_map = { --function map points to functions associated with hkey identifier
['ARXIV'] = arxiv,
['ASIN'] = asin,
['BIBCODE'] = bibcode,
['BIORXIV'] = biorxiv,
['CITESEERX'] = citeseerx,
['DOI'] = doi,
['EISSN'] = issn,
['HDL'] = hdl,
['ISBN'] = isbn,
['ISMN'] = ismn,
['ISSN'] = issn,
['JFM'] = jfm,
['JSTOR'] = jstor,
['LCCN'] = lccn,
['MR'] = mr,
['OCLC'] = oclc,
['OL'] = openlibrary,
['OSTI'] = osti,
['PMC'] = pmc,
['PMID'] = pmid,
['RFC'] = rfc,
['S2CID'] = s2cid,
['SBN'] = sbn,
['SSRN'] = ssrn,
['USENETID'] = usenet_id,
['ZBL'] = zbl,
}
for hkey, v in pairs (ID_list_coins_t) do
v, accept = has_accept_as_written (v); -- remove accept-as-written markup if present; accept is boolean true when markup removed; false else
-- every function gets the options table with value v and accept boolean
options_t.hkey = hkey; -- ~/Configuration handler key
options_t.id = v; -- add that identifier value to the options table
options_t.accept = accept; -- add the accept boolean flag
options_t.access = access_levels_t[hkey]; -- add the access level for those that have an |<identifier-access= parameter
options_t.handler = cfg.id_handlers[hkey];
options_t.coins_list_t = ID_list_coins_t; -- pointer to ID_list_coins_t; for |asin= and |ol=; also to keep erroneous values out of the citation's metadata
options_t.coins_list_t[hkey] = v; -- id value without accept-as-written markup for metadata
if options_t.handler.access and not in_array (options_t.handler.access, cfg.keywords_lists['id-access']) then
error (cfg.messages['unknown_ID_access'] .. options_t.handler.access); -- here when handler access key set to a value not listed in list of allowed id access keywords
end
if func_map[hkey] then
local id_text = func_map[hkey] (options_t); -- call the function to get identifier text and any error message
table.insert (ID_list_t, {hkey, id_text}); -- add identifier text to the output sequence table
else
error (cfg.messages['unknown_ID_key'] .. hkey); -- here when func_map doesn't have a function for hkey
end
end
local function comp (a, b) -- used by following table.sort()
return a[1]:lower() < b[1]:lower(); -- sort by hkey
end
table.sort (ID_list_t, comp); -- sequence table of tables sort
for k, v in ipairs (ID_list_t) do -- convert sequence table of tables to simple sequence table of strings
ID_list_t[k] = v[2]; -- v[2] is the identifier rendering from the call to the various functions in func_map{}
end
return ID_list_t;
end
--[[--------------------------< O P T I O N S _ C H E C K >----------------------------------------------------
check that certain option parameters have their associated identifier parameters with values
<ID_list_coins_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value
<ID_support_t> is a sequence table of tables created in citation0() where each subtable has four elements:
[1] is the support parameter's assigned value; empty string if not set
[2] is a text string same as key in cfg.id_handlers
[3] is cfg.error_conditions key used to create error message
[4] is original ID support parameter name used to create error message
returns nothing; on error emits an appropriate error message
]]
local function options_check (ID_list_coins_t, ID_support_t)
for _, v in ipairs (ID_support_t) do
if is_set (v[1]) and not ID_list_coins_t[v[2]] then -- when support parameter has a value but matching identifier parameter is missing or empty
set_message (v[3], (v[4])); -- emit the appropriate error message
end
end
end
--[[--------------------------< I D E N T I F I E R _ L I S T S _ G E T >--------------------------------------
Creates two identifier lists: a k/v table of identifiers and their values to be used locally and for use in the
COinS metadata, and a sequence table of the rendered identifier strings that will be included in the rendered
citation.
]]
local function identifier_lists_get (args_t, options_t, ID_support_t)
local ID_list_coins_t = extract_ids (args_t); -- get a table of identifiers and their values for use locally and for use in COinS
options_check (ID_list_coins_t, ID_support_t); -- ID support parameters must have matching identifier parameters
local ID_access_levels_t = extract_id_access_levels (args_t, ID_list_coins_t); -- get a table of identifier access levels
local ID_list_t = build_id_list (ID_list_coins_t, options_t, ID_access_levels_t); -- get a sequence table of rendered identifier strings
return ID_list_t, ID_list_coins_t; -- return the tables
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
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
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
auto_link_urls = auto_link_urls, -- table of identifier URLs to be used when auto-linking |title=
identifier_lists_get = identifier_lists_get, -- experiment to replace individual calls to build_id_list(), extract_ids, extract_id_access_levels
is_embargoed = is_embargoed;
set_selected_modules = set_selected_modules;
}
1s53aqur5zcnnjyu0azfrtjq6dyiwg4
Module:Citation/CS1/Utilities
828
48808487
1067249005
999303015
2022-01-22T14:11:16Z
Trappist the monk
10289486
update per [[Wikipedia:Village_pump_(proposals)#rfc:_shall_we_update_cs1/2?|RfC]];
Scribunto
text/plain
local z = {
error_cats_t = {}; -- for categorizing citations that contain errors
error_ids_t = {}; -- list of error identifiers; used to prevent duplication of certain errors; local to this module
error_msgs_t = {}; -- sequence table of error messages
maint_cats_t = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work
prop_cats_t = {}; -- for categorizing citations based on certain properties, language of source for instance
prop_keys_t = {}; -- for adding classes to the citation's <cite> tag
};
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
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
--[[--------------------------< I N _ A R R A Y >--------------------------------------------------------------
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
--[[--------------------------< H A S _ A C C E P T _ A S _ W R I T T E N >------------------------------------
When <str> is wholly wrapped in accept-as-written markup, return <str> without markup and true; return <str> and false else
with allow_empty = false, <str> must have at least one character inside the markup
with allow_empty = true, <str> 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 further 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)
if not is_set (str) then
return str, false;
end
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
--[[--------------------------< S U B S T I T U T E >----------------------------------------------------------
Populates numbered arguments in a message string using an argument table. <args> may be a single string or a
sequence table of multiple strings.
]]
local function substitute (msg, args)
return args and mw.message.newRawMessage (msg, args):plain() or msg;
end
--[[--------------------------< E R R O R _ C O M M E N T >----------------------------------------------------
Wraps error messages with CSS markup according to the state of hidden. <content> may be a single string or a
sequence table of multiple strings.
]]
local function error_comment (content, hidden)
return substitute (hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content);
end
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
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 is_set (str) then
return str;
end
local accept; -- boolean
str = str:gsub ("(%(%(.-%)%))", function(m) return m:gsub(",", ","):gsub(";", ";") end) -- replace commas and semicolons in accept-as-written markup with similar unicode characters so they'll be ignored during the split
str = str:gsub ('&[nm]dash;', {['–'] = '–', ['—'] = '—'}); -- replace — and – entities with their characters; semicolon mucks up the text.split
str = str:gsub ('-', '-'); -- replace HTML numeric entity with hyphen character
str = str:gsub (' ', ' '); -- replace 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
item, accept = has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of item
if not accept and 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
table.insert (out, item); -- add the (possibly modified) item to the output table
end
local temp_str = ''; -- concatenate the output table into a comma separated string
temp_str, accept = has_accept_as_written (table.concat (out, ', ')); -- remove accept-this-as-written markup when it wraps all of concatenated out
if accept then
temp_str = has_accept_as_written (str); -- when global markup removed, return original str; do it this way to suppress boolean second return value
return temp_str:gsub(",", ","):gsub(";", ";");
else
return temp_str:gsub(",", ","):gsub(";", ";"); -- else, return assembled temp_str
end
end
--[=[-------------------------< M A K E _ W I K I L I N K >----------------------------------------------------
Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only
link is provided (or link and display are the same), 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 not is_set (link) then return '' end
if is_set (display) and link ~= display then
return table.concat ({'[[', link, '|', display, ']]'});
else
return table.concat ({'[[', link, ']]'});
end
end
--[[--------------------------< S E T _ M E S S A G E >----------------------------------------------------------
Sets an error message using the ~/Configuration error_conditions{} table along with arguments supplied in the function
call, inserts the resulting message in z.error_msgs_t{} sequence table, and returns the error message.
<error_id> – key value for appropriate error handler in ~/Configuration error_conditions{} table
<arguments> – may be a single string or a sequence table of multiple strings to be subsititued into error_conditions[error_id].message
<raw> – boolean
true – causes this function to return the error message not wrapped in visible-error, hidden-error span tag;
returns error_conditions[error_id].hidden as a second return value
does not add message to z.error_msgs_t sequence table
false, nil – adds message wrapped in visible-error, hidden-error span tag to z.error_msgs_t
returns the error message wrapped in visible-error, hidden-error span tag; there is no second return value
<prefix> – string to be prepended to <message> -- TODO: remove support for these unused(?) arguments?
<suffix> – string to be appended to <message>
TODO: change z.error_cats_t and z.maint_cats_t to have the form cat_name = true? this to avoid dups without having to have an extra table
]]
local added_maint_cats = {} -- list of maintenance categories that have been added to z.maint_cats_t; 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_cats_t, 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.maint_cats_t, 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_t[error_id] = true;
if z.error_ids_t['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 true == raw then
return message, error_state.hidden; -- return message not wrapped in visible-error, hidden-error span tag
end
message = error_comment (message, error_state.hidden); -- wrap message in visible-error, hidden-error span tag
table.insert (z.error_msgs_t, message); -- add it to the messages sequence table
return message; -- and done; return value generally not used but is used as a flag in various functions of ~/Identifiers
end
--[[-------------------------< I S _ A L I A S _ U S E D >-----------------------------------------------------
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
--[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------
Adds a category to z.maint_cats_t 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.maint_cats_t.
]]
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.maint_cats_t, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table
end
end
--[[--------------------------< A D D _ P R O P _ C A T >--------------------------------------------------------
Adds a category to z.prop_cats_t 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.prop_cats_t
local function add_prop_cat (key, arguments, key_modifier)
local key_modified = key .. ((key_modifier and key_modifier) or ''); -- modify <key> with <key_modifier> if present and not nil
if not added_prop_cats [key_modified] then
added_prop_cats [key_modified] = true; -- note that we've added this category
table.insert (z.prop_cats_t, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table
table.insert (z.prop_keys_t, 'cs1-prop-' .. key); -- convert key to class for use in the citation's <cite> tag
end
end
--[[--------------------------< S A F E _ F O R _ I T A L I C S >----------------------------------------------
Protects a string that will be wrapped in wiki italic markup '' ... ''
Note: We cannot use <i> 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, <i> and '' tend to interact
poorly under Mediawiki's HTML tidy.
]]
local function safe_for_italics (str)
if not is_set (str) then return str end
if str:sub (1, 1) == "'" then str = "<span></span>" .. str; end
if str:sub (-1, -1) == "'" then str = str .. "<span></span>"; end
return str:gsub ('\n', ' '); -- Remove newlines as they break italics.
end
--[[--------------------------< W R A P _ S T Y L E >----------------------------------------------------------
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
--[[--------------------------< M A K E _ S E P _ L I S T >------------------------------------------------------------
make a separated list of items using provided separators.
<sep_list> - typically '<comma><space>'
<sep_list_pair> - typically '<space>and<space>'
<sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>'
defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end']
if <sep_list_end> is specified, <sep_list> and <sep_list_pair> 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 >= 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 < 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 <list> with final separator
end
return list;
end
--[[--------------------------< S E L E C T _ O N E >----------------------------------------------------------
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 |<param>1= is an alias of |<param>= 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 > 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));
set_message (error_condition, {make_sep_list (#error_list, error_list)});
end
return value, selected;
end
--[=[-------------------------< R E M O V E _ W I K I _ L I N K >----------------------------------------------
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
--[=[-------------------------< I S _ W I K I L I N K >--------------------------------------------------------
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
--[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >--------------------------------
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
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
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
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
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,
hyphen_to_dash = hyphen_to_dash,
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
}
kk801mqzkv4xrvmuck62gy23fyu6dl0
Module:Citation/CS1/Whitelist
828
39013723
1067249016
1025068254
2022-01-22T14:11:22Z
Trappist the monk
10289486
update per [[Wikipedia:Village_pump_(proposals)#rfc:_shall_we_update_cs1/2?|RfC]];
Scribunto
text/plain
--[[--------------------------< S U P P O R T E D P A R A M E T E R S >--------------------------------------
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
tracked - these parameters are valid and supported parameters tracked in an eponymous properties category
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,
['author-mask'] = true,
['authors'] = true,
['bibcode'] = true,
['bibcode-access'] = true,
['biorxiv'] = true, -- cite biorxiv; here because allowed in cite ... as identifier
['chapter'] = true,
['chapter-format'] = true,
['chapter-url'] = true,
['chapter-url-access'] = true,
['citeseerx'] = true, -- cite citeseerx; here because allowed in cite ... as identifier
['collaboration'] = true,
['contribution'] = true,
['contribution-format'] = 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,
['department'] = true,
['df'] = true,
['dictionary'] = true,
['display-authors'] = true,
['display-contributors'] = true,
['display-editors'] = true,
['display-interviewers'] = true,
['display-subjects'] = true,
['display-translators'] = 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,
['editor-link'] = true,
['editor-mask'] = true,
['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
['first'] = true,
['format'] = true,
['given'] = true,
['hdl'] = true,
['HDL'] = true,
['hdl-access'] = true,
['host'] = true, -- unique to certain templates?
['id'] = true,
['ID'] = true,
['institution'] = true, -- constrain to cite thesis?
['interviewer'] = true,
['interviewer-first'] = true,
['interviewer-given'] = true,
['interviewer-last'] = true,
['interviewer-surname'] = true,
['interviewer-link'] = true,
['interviewer-mask'] = true,
['isbn'] = true,
['ISBN'] = 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,
['lay-date'] = false,
['lay-format'] = false,
['lay-source'] = false,
['lay-url'] = false,
['lccn'] = true,
['LCCN'] = true,
['location'] = true,
['magazine'] = true,
['medium'] = true,
['minutes'] = true, -- constrain to cite AV media and podcast?
['mode'] = true,
['mr'] = true,
['MR'] = true,
['name-list-style'] = true,
['newspaper'] = 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,
['publication-date'] = 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,
['section'] = true,
['section-format'] = true,
['section-url'] = true,
['section-url-access'] = true,
['series'] = true,
['ssrn'] = true, -- cite ssrn; these three here because allowed in cite ... as identifier
['SSRN'] = true,
['ssrn-access'] = true,
['subject'] = true,
['subject-link'] = true,
['subject-mask'] = true,
['surname'] = true,
['s2cid'] = true,
['S2CID'] = true,
['s2cid-access'] = true,
['template-doc-demo'] = true,
['time'] = true, -- constrain to cite av media and podcast?
['time-caption'] = true, -- constrain to cite av media and podcast?
['title'] = 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,
['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,
['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,
['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,
}
--[[--------------------------< 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 >--------------------
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/tracked/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,
['ssrn-access'] = true,
},
}
--[[--------------------------< 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 >----------------------
cite arxiv, cite biorxiv, cite citeseerx, and cite ssrn templates are preprint templates so are allowed only a
limited subset of parameters allowed to all other cs1|2 templates. The limited subset is defined here.
Same conventions for true/false/tracked/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,
['authors'] = true,
['collaboration'] = true,
['date'] = true,
['df'] = true,
['display-authors'] = true,
['first'] = true,
['given'] = true,
['language'] = true,
['last'] = true,
['mode'] = true,
['name-list-style'] = 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,
['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,
['first#'] = true,
['given#'] = true,
['last#'] = true,
['surname#'] = true,
}
--[[--------------------------< U N I Q U E _ A R G U M E N T S >----------------------------------------------
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/tracked/nil as above.
]]
local unique_arguments = {
['audio-visual'] = {
['transcript'] = true,
['transcript-format'] = true,
['transcript-url'] = true,
},
conference = {
['book-title'] = true,
['conference'] = true,
['conference-format'] = true,
['conference-url'] = true,
['event'] = true,
},
episode = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episode-link'] = true, -- alias of |title-link=
['network'] = true,
['season'] = true,
['series-link'] = true,
['series-no'] = true,
['series-number'] = true,
['station'] = true,
['transcript'] = true,
['transcript-format'] = true,
['transcripturl'] = false,
['transcript-url'] = true,
},
mailinglist = {
['mailing-list'] = true,
},
map = {
['cartography'] = true,
['inset'] = true,
['map'] = true,
['map-format'] = 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,
},
report = {
['docket'] = true,
},
serial = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episode'] = true, -- cite serial only TODO: make available to cite episode?
['episode-link'] = true, -- alias of |title-link=
['network'] = true,
['series-link'] = true,
['station'] = true,
},
speech = {
['conference'] = true,
['conference-format'] = true,
['conference-url'] = true,
['event'] = true,
},
thesis = {
['degree'] = true,
['docket'] = true,
},
}
--[[--------------------------< T E M P L A T E _ L I S T _ G E T >--------------------------------------------
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
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
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
};
c31769ha0b0k636k736zgv3no6leh8l
Module:Citation/CS1/styles.css
828
57940169
1067248974
999302996
2022-01-22T14:11:09Z
Trappist the monk
10289486
update per [[Wikipedia:Village_pump_(proposals)#rfc:_shall_we_update_cs1/2?|RfC]];
sanitized-css
text/css
/* 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 <cite> and <q>,
unlike en.wp. On en.wp, keep these the same as [[MediaWiki:Common.css]].
The word-wrap and :target styles were moved here from Common.css.
On en.wp, keep these the same as [[Template:Citation/styles.css]].
*/
cite.citation {
font-style: inherit; /* Remove italics for <cite> */
/* Break long urls, etc., rather than overflowing box */
word-wrap: break-word;
}
.citation q {
quotes: '"' '"' "'" "'"; /* Straight quote marks for <q> */
}
/* Highlight linked elements (such as clicked references) in blue */
.citation:target {
/* ignore the linter - all browsers of interest implement this */
background-color: rgba(0, 127, 255, 0.133);
}
/* 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.
That's essentially 2 classes and 1 element.
the .id-lock-... selectors are for use by non-citation templates like
{{Catalog lookup link}} which do not have to handle PDF links
*/
.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;
}
/* 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 */
.cs1-code {
/* <code>...</code> 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;
padding: inherit;
}
.cs1-hidden-error {
display: none;
color: #d33;
}
.cs1-visible-error {
color: #d33;
}
.cs1-maint {
display: none;
color: #3a3;
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-format {
font-size: 95%;
}
/* kerning */
.cs1-kern-left {
padding-left: 0.2em;
}
.cs1-kern-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;
}
05swlrxxaulwkgtbbdmtf5atrgfwmuz
Module:Delink
828
38999128
1047355927
1045115757
2021-09-30T12:36:18Z
Gonnym
14984434
synced from sandbox: consistent spacing; cleaner code - if not (x == y) -> if x ~= y, etc; fix for question mark - can now delink [[What If...?]] style titles.
Scribunto
text/plain
-- 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
end
return s:match("%[%[|(.*)%]%]")
end
local function delinkPipeTrick(s)
-- 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
-- Return wikilink target |wikilinks=target
local function getDelinkedTarget(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 target_area
if result:match("|") then -- Find if we're dealing with a piped link.
target_area = result:match("^%[%[(.-)|.*%]%]")
else
target_area = result:match("^%[%[(.-)%]%]")
end
-- Check for bad characters.
if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then
return s
end
return target_area
end
local function getDelinkedLabel(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 target_area
if result:match("|") then -- Find if we're dealing with a piped link.
target_area = result:match("^%[%[(.-)|.*%]%]")
else
target_area = result:match("^%[%[(.-)%]%]")
end
-- Check for bad characters.
if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then
return s
end
-- Check for categories, interwikis, and files.
local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon.
local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace
if mw.language.isKnownLanguageTag(colon_prefix) 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 _ ,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('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ).
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
end
return s_decoded
end
local function delinkLinkClass(text, pattern, delinkFunction)
if type(text) ~= "string" then
error("Attempt to de-link non-string input.", 2)
end
if type(pattern) ~= "string" or 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 text ~= "" do
-- Replace text using one iteration of gsub.
text = mw.ustring.gsub(text, pattern, delinkFunction, 1)
-- Append the left-most character to the result string.
result = result .. mw.ustring.sub(text, 1, 1)
text = mw.ustring.sub(text, 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 args.comments ~= "no" then
text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments.
end
if args.wikilinks ~= "no" and args.wikilinks ~= "target" then
-- De-link wikilinks and return the label portion of the wikilink.
text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel)
elseif args.wikilinks == "target" then
-- De-link wikilinks and return the target portions of the wikilink.
text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget)
end
if args.urls ~= "no" then
text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs.
end
if 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
951n1j8ju9158tl4ivrmhzgbja8loo1
Module:EditAtWikidata
828
51464265
1076968612
915181788
2022-03-13T22:49:52Z
Johnuniq
6036800
update from [[Module:EditAtWikidata/sandbox]] per talk: tweaks + greatly reduce memory usage + class=noprint
Scribunto
text/plain
-- Module to display an icon with a tooltip such as "Edit this at Wikidata".
-- Icon is linked to the Wikidata entry for the article where this is placed.
-- This message is only displayed if a local_parameter is not supplied
-- i.e. when called from a template, it can be coded not to display the message.
-- The qid of a Wikidata entry can optionally be supplied for testing outside the article.
-- Usage:
-- {{#invoke:EditAtWikidata|showMessage|local_parameter}}
-- {{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}}
local p = {}
local i18n =
{
["message"] = "Edit this at Wikidata"
}
local function trimToNil(text)
-- Return trimmed non-empty text, or nil.
if type(text) == 'string' then
return text:match('(%S.-)%s*$')
end
end
function p._showMessage(args)
local local_parm = trimToNil(args[1])
if local_parm then return "" end
-- Parameter qid=x specifies the Wikidata ID for the article.
-- This is not normally used except for testing outside the article.
local qid = trimToNil(args.qid) or mw.wikibase.getEntityIdForCurrentPage()
if qid and mw.wikibase.entityExists(qid) then
-- Parameter pid=x uses x as an anchor in the link to the Wikidata entry.
local anchor = trimToNil(args.pid)
-- Parameter nbsp replaces the leading space with
local space = trimToNil(args.nbsp) and " " or " "
return
space ..
"[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px" ..
"|alt=" .. i18n.message ..
"|link=https://www.wikidata.org/wiki/" .. qid ..
(anchor and ("#" .. anchor) or "") ..
"|class=noprint" ..
"|" .. i18n.message ..
"]]"
end
return ""
end
function p.showMessage(frame)
return p._showMessage(frame.args)
end
return p
hod1hfo0n331jsuhscew67pebepcmju
Module:Error
828
38948927
750709040
636708920
2016-11-21T11:11:11Z
Materialscientist
7852030
Changed protection level for "[[Module:Error]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
Scribunto
text/plain
-- This module implements {{error}}.
local p = {}
local function _error(args)
local tag = mw.ustring.lower(tostring(args.tag))
-- Work out what html tag we should use.
if not (tag == 'p' or tag == 'span' or tag == 'div') then
tag = 'strong'
end
-- Generate the html.
return tostring(mw.html.create(tag)
:addClass('error')
:wikitext(tostring(args.message or args[1] or error('no message specified', 2)))
)
end
function p.error(frame)
local args
if type(frame.args) == 'table' then
-- We're being called via #invoke. The args are passed through to the module
-- from the template page, so use the args that were passed into the template.
args = frame.args
else
-- We're being called from another module or from the debug console, so assume
-- the args are passed in directly.
args = frame
end
-- if the message parameter is present but blank, change it to nil so that Lua will
-- consider it false.
if args.message == "" then
args.message = nil
end
return _error(args)
end
return p
swpvwjcdmj2mkkmx9f7rbsdrfsnmirh
Module:File link
828
42903140
948474149
948472509
2020-04-01T06:31:54Z
MusikAnimal
14882394
Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]])
Scribunto
text/plain
-- 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
bzc22v133v9z5yc4aisazripn6l94p8
Module:Footnotes
828
38969239
1044276984
1044096092
2021-09-14T12:03:42Z
Trappist the monk
10289486
Scribunto
text/plain
require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;
--[[--------------------------< A R G S _ D E F A U L T >------------------------------------------------------
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. ",
pages_sep = ", pp. ",
ref = '',
template = 'harv', -- if template name not provided in {{#invoke:}} use this
};
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
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 < tally then
msg = 'multiple targets (' .. tally .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = 0 == namespace and '[[Category:Harv and Sfn multiple-target errors]]' or ''; -- only categorize in article space
return '<span class="error harv-error" style="display: inline; font-size:100%"> ' .. args.template .. ' error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category;
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 '<span class="error harv-error" style="display: inline; font-size:100%"> ' .. args.template .. ' error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
return msg and '<span class="error harv-error" style="display: none; font-size:100%"> ' .. args.template .. ' error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ Y E A R >----------------------------------------------------------------
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
--[[--------------------------< C O R E >----------------------------------------------------------------------
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, ' & ', 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, ' & ', 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, ' ', ' & ', 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, ' & ', 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
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
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
This code copied from Module:Citation/CS1. The only modification is to require Module:Citation/CS1/Utilities
so that it has access to the functions is_set() and has_accept_as_written()
]]
local function hyphen_to_dash( str )
local utilities = require ('Module:Citation/CS1/Utilities'); -- only modification so that this function has access to is_set() and has_accept_as_written()
if not utilities.is_set (str) then
return str;
end
local accept; -- Boolean
str = str:gsub ('&[nm]dash;', {['–'] = '–', ['—'] = '—'}); -- replace — and – entities with their characters; semicolon mucks up the text.split
str = str:gsub ('-', '-'); -- replace HTML numeric entity with hyphen character
str = str:gsub (' ', ' '); -- replace 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
item, accept = utilities.has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of item
if not accept and 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
table.insert (out, item); -- add the (possibly modified) item to the output table
end
local temp_str = ''; -- concatenate the output table into a comma separated string
temp_str, accept = utilities.has_accept_as_written (table.concat (out, ', ')); -- remove accept-this-as-written markup when it wraps all of concatenated out
if accept then
temp_str = utilities.has_accept_as_written (str); -- when global markup removed, return original str; do it this way to suppress boolean second return value
return temp_str;
else
return temp_str; -- else, return assembled temp_str
end
end
--[[--------------------------< A R G S _ F E T C H >---------------------------------------------------------
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.pages = ('' ~= args.pages) and hyphen_to_dash (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
--[[--------------------------< H A R V A R D _ C I T A T I O N >----------------------------------------------
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
--[[--------------------------< S T R I P _ U R L >------------------------------------------------------------
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:
!#$&'()*+,/:;=?@[]
]]
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 ("[!#%$&'%(%)%*%+,/:;=%?@%[%]%.%%]", ''); -- 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
--[[--------------------------< S F N >------------------------------------------------------------------------
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
--[[--------------------------< S F N M >----------------------------------------------------------------------
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.pages = ('' ~= args.pages) and hyphen_to_dash (args.pages) 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'})]);
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
--[[--------------------------< S F N R E F >------------------------------------------------------------------
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
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvard_citation = harvard_citation,
sfn = sfn,
sfnm = sfnm,
sfnref = sfnref,
};
2x57eg4kn4kd2u38h6p4rteov6l4211
Module:Footnotes/anchor id list
828
63248705
1061266347
1061263258
2021-12-20T18:02:30Z
Trappist the monk
10289486
Scribunto
text/plain
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*',
'|%s*air%-?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 = {
'<nowiki>.-</nowiki>',
'<!%-%-.-%-%->',
'<pre>.-</pre>',
'<syntaxhighlight.->.-</syntaxhighlight>',
'<source.->.-</source>', -- 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 = {};
--[[--------------------------< A R T I C L E _ C O N T E N T _ G E T >----------------------------------------
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
--[[--------------------------< S F N R E F _ G E T >----------------------------------------------------------
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 > 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
--[[--------------------------< D A T E _ G E T >--------------------------------------------------------------
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 |<date alias>={{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 |<date alias>= 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
--[[--------------------------< V N A M E S _ G E T >----------------------------------------------------------
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
--[[--------------------------< N A M E S _ G E T >------------------------------------------------------------
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
--[[--------------------------< T E M P L A T E _ S T R I P >--------------------------------------------------
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 -> CITEREFLast1Last3YYYY (the harv and sfn render: 'Last1, & Last3 YYYY' with CITEREFLast1Last3YYYY).
]]
local function template_strip (template)
template = template:gsub ('^{{%s*', ''):gsub ('%s*}}$', '', 1); -- remove outer {{ and }} (cs1|2 template delimiters with trailing/leading whitespace)
template = template:gsub ('%b{}', ''); -- remove any templates from the cs1|2 template
return template;
end
--[[--------------------------< E S C A P E _ L U A _ M A G I C _ C H A R S >----------------------------------
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
--[=[-------------------------< W I K I L I N K _ S T R I P >--------------------------------------------------
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]] -> label
[[link]] -> 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
--[[--------------------------< T E M P L A T E _ N A M E _ G E T >--------------------------------------------
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
--[[--------------------------< T E M P L A T E _ P A R A M S _ G E T >----------------------------------------
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_t)
template = wikilink_strip (template); -- because piped wikilinks confuse code that builds params_t{} 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_t{} and because templates in name parameters are not allowed
local temp_t = mw.text.split (template, '%s*|%s*'); --split on the pipe
for _, param in ipairs (temp_t) do
if param:find ('=', 1, true) then -- a named parameter?
local k, v = param:match ('%s*([^=]-)%s*=%s*([^|}]+)');
if v then -- there must be a value
if '' ~= v and not v:match ('^%s$') then -- skip when value is empty string or only whitespace
params_t[k] = mw.text.trim (v); -- add trimmed value else
end
end
end
end
end
--[[--------------------------< C I T E R E F _ M A K E _ H A R V C >------------------------------------------
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
--[[--------------------------< A N C H O R _ I D _ M A K E _ W R A P P E R >----------------------------------
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=<text> - 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=<text> may match an anchor id override value in {{harv}} template |ref= parameter
end
return anchor_id; -- anchor_id text; nil else
end
--[[--------------------------< A N C H O R _ I D _ M A K E _ C S 1 2 >----------------------------------------
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=<text> - 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=<text> may match an anchor id override value in {{harv}} template |ref= parameter
end
return anchor_id; -- anchor_id text; nil else
end
--[[--------------------------< L I S T _ A D D >--------------------------------------------------------------
adds an <item> to <list> table; for anchor IDs, the boolean <encode> 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
--[[--------------------------< A N C H O R _ I D _ M A K E _ A N C H O R >------------------------------------
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
--[[--------------------------< T E M P L A T E _ L I S T _ A D D >--------------------------------------------
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
--[[--------------------------< A N C H O R _ I D _ L I S T _ M A K E >----------------------------------------
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
anchor_id = mw.uri.anchorEncode (anchor_id)
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
--[[--------------------------< E X P O R T E D _ T A B L E S >------------------------------------------------
]]
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
}
ibyy77ipwctiz76c90sit32pquvfgtt
Module:Footnotes/anchor id list/data
828
64016762
958410539
958285249
2020-05-23T17:06:22Z
Trappist the monk
10289486
Scribunto
text/plain
-- 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');
--[[--------------------------< C S 1 _ T E M P L A T E _ P A T T E R N S >------------------------------------
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', 'مرجع ويب', 'یادکرد وب', '웹 인용',
}
--[[--------------------------< C S 2 _ T E M P L A T E _ P A T T E R N S >------------------------------------
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',
}
--[[--------------------------< V C I T E _ T E M P L A T E _ P A T T E R N S >--------------------------------
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',
}
--[[--------------------------< H A R V C _ T E M P L A T E _ P A T T E R N S >--------------------------------
These are patterns for the harvc template and its redirects.
]]
local harvc_template_patterns = {
'[Hh]arvc', -- canonical
'[Cc]itec',
}
--[[--------------------------< C S 1 _ L I K E _ T E M P L A T E _ P A T T E R N S >--------------------------
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
}
--[[--------------------------< W I K I C I T E _ T E M P L A T E _ P A T T E R N S >--------------------------
These are patterns for the wikicite template and its redirects.
]]
local wikicite_template_patterns = {
'[Ww]ikicite', -- canonical
}
--[[--------------------------< A N C H O R _ T E M P L A T E _ P A T T E R N S >------------------------------
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',
}
--[[--------------------------< S F N _ W H I T E L I S T _ P A T T E R N S >----------------------------------
These are patterns for the anchor template and its redirects.
]]
local sfn_whitelist_patterns = {
'[Ss]fn whitelist', -- canonical
'[Hh]arv whitelist',
}
--[[--------------------------< K N O W N _ T E M P L A T E S >------------------------------------------------
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
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
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,
}
bht9pmjzuvuqajea0fn73uv88hds8sh
Module:Footnotes/whitelist
828
63517642
1092054708
1091746194
2022-06-07T23:35:34Z
Renata3
320236
+ CITEREFWalter1967
Scribunto
text/plain
--[[--------------------------< W R A P P E R _ T E M P L A T E _ D E F A U L T S >----------------------------
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
}
--[[--------------------------< 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 >--------------------
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'},
},
['New Cambridge Medieval History'] = {
['1'] = {'Fouracre', '2005'},
['2'] = {'McKitterick', '1995'},
['3'] = {'Reuter', '2000'},
['4a'] = {'LuscombeRiley-Smith', '2004'},
['4b'] = {'LuscombeRiley-Smith', '2004'},
['5'] = {'Abulafia', '1999'},
['6'] = {'Jones', '2000'},
['7'] = {'Allmand', '1998'},
['default'] = {'', '1995–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'},
},
}
--[[--------------------------< W R A P P E R _ T E M P L A T E S >--------------------------------------------
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'],
['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'],
['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'],
['New Cambridge Medieval History'] = wrapper_template_defaults_vol['New Cambridge Medieval History'], -- canonical
['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
}
--[[--------------------------< T E M P L A T E _ N A M E S >--------------------------------------------------
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', 'DNBfirst'},
['ME-ref'] = {'ME-ref', 'Me-ref'},
['ODB'] = {'ODB', 'Oxford Dictionary of Byzantium'},
['ODLA'] = {'ODLA', 'Oxford Dictionary of Late Antiquity'},
['NDB'] = {'Cite NDB', 'NDB'},
['Iranica'] = {'Encyclopædia Iranica Online', 'Encyclopædia Iranica', 'Encyclopaedia Iranica', 'Cite Encyclopædia Iranica Online'},
}
--[[--------------------------< S P E C I A L _ P A T T E R N S >----------------------------------------------
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}} & {{PastScape}}
'CITEREFHistoric_Environment_Scotland%u%u%u?%u?%d', -- {{Historic Environment Scotland}} %u can be BTL, GLD, HMPA, LB, SM
'CITEREFQHR%d+', -- {{Cite QHR}}
'CITEREF[%d%a_%pöüäß→]+_at_Bach_Digital', -- {{BDh}}
'CITEREF[BR]GBl_[12]%d%d%d%-?I?I?%/%d+', -- {{Cite Austrian gazette}}
'CITEREFStGBl_[12]%d%d%d%/%d+', -- {{Cite Austrian gazette}}
'CITEREFGBlÖ_[12]%d%d%d%/%d+', -- {{Cite Austrian gazette}}
}
--[[--------------------------< D N B _ S P E C I A L _ P A T T E R N S >--------------------------------------
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
}
--[[--------------------------< W H I T E L I S T >------------------------------------------------------------
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 = {
----------< # >----------
['CITEREF2013_Statistical_Yearbook_of_the_Republic_of_Croatia'] = {'Croatia Yearbook 2013'},
----------< A >----------
['CITEREFAGA_1884–1897'] = {'Schubert\'s compositions (references)'},
['CITEREFATOC2009'] = {'ATOCConnectingCommunitiesReportS10'},
['CITEREFAbaevBailey1985'] = template_names['Iranica'],
['CITEREFAbbas1988'] = template_names['Iranica'],
['CITEREFAbbas1989'] = template_names['Iranica'],
['CITEREFAbramowitzStegun1983'] = {'Abramowitz Stegun ref'},
['CITEREFActa_Lipsiensium1723'] = {'Bach\'s compositions (sources)'},
['CITEREFAdamsFranzosa2009'] = {'Adams Franzosa Introduction to Topology Pure and Applied'},
['CITEREFAdaschErnstKeim1978'] = {'Adasch Topological Vector Spaces'},
['CITEREFAffleck1978'] = {'Affleck-On Track'},
['CITEREFAhlgrimm1969'] = {'Bach\'s compositions (sources)'},
['CITEREFAhmadiNegahban2013'] = {'Encyclopaedia Islamica'},
['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'},
['CITEREFAleksidze2018'] = template_names['ODLA'],
['CITEREFAlexiou2010'] = {'Cite flatiron'},
['CITEREFAlgar1983'] = template_names['Iranica'],
['CITEREFAlgar1989'] = template_names['Iranica'],
['CITEREFAlgar1990'] = template_names['Iranica'],
['CITEREFAlgar2003'] = template_names['Iranica'],
['CITEREFAlizadeh1990'] = template_names['Iranica'],
['CITEREFAllamaniPanagiotopoulou1978'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFAllenBoddyBrownFry1970'] = {'RCTS-LocosLNER-8A'},
['CITEREFAllenBoddyBrownFry1971'] = {'RCTS-LocosLNER-8B'},
['CITEREFAllenBoddyBrownFry1983'] = {'RCTS-LocosLNER-8A'},
['CITEREFAmanat1998'] = template_names['Iranica'],
['CITEREFAmanat1999'] = template_names['Iranica'],
['CITEREFAmbartsumian2014'] = template_names['Iranica'],
['CITEREFAmerican_Railway_Association1922'] = {'1922 Locomotive Cyclopedia'},
['CITEREFAnderson1952'] = {'Naval Wars in the Levant 1559–1853'},
['CITEREFAndo2000'] = template_names['Iranica'],
['CITEREFAngelov2018'] = template_names['ODLA'],
['CITEREFAnwārEIr1985'] = template_names['Iranica'],
['CITEREFArkhangel'skiiPonomarev1984'] = {'Arkhangel\'skii Ponomarev Fundamentals of General Topology Problems and Exercises'},
['CITEREFArrey_von_Dommer1875'] = {'Cite ADB'},
['CITEREFAshraf2006'] = template_names['Iranica'],
['CITEREFAslanianBerberian2009'] = template_names['Iranica'],
['CITEREFAsmus1966'] = template_names['NDB'],
['CITEREFAsmussen1985'] = template_names['Iranica'],
['CITEREFAspreas1929'] = {'Great Military and Naval Encyclopaedia'},
['CITEREFAtkins2007'] = {'Shakespeare sonnets bibliography'},
['CITEREFAube2011'] = template_names['Iranica'],
['CITEREFAudiKondevWangHuang2017'] = {'NUBASE2016'},
['CITEREFAvdoyan2018'] = template_names['ODLA'],
['CITEREFAwdry1990'] = {'Awdry-RailCo', 'Carnarvonshire Railway'},
['CITEREFAzarnoosh2021'] = template_names['Iranica'],
['CITEREFRamelli2018'] = {'Oxford Dictionary of Late Antiquity'},['CITEREFA_History_of_the_Crusades'] = {'Setton-A History of the Crusades'},
----------< B >----------
['CITEREFBabinger1962'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['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)'},
['CITEREFBahramianHirtensteinGholami2013'] = {'Encyclopaedia Islamica'},
['CITEREFBalcer1990'] = template_names['Iranica'],
['CITEREFBaldwin1969'] = {'Setton-A History of the Crusades'},
['CITEREFBaldwin1985'] = {'Setton-A History of the Crusades'},
['CITEREFBaldwinKazhdan1991'] = template_names['ODB'],
['CITEREFBaldwinTalbot1991'] = template_names['ODB'],
['CITEREFBaltzer1916'] = {'Baltzer-Kolonialbahnen'},
['CITEREFBanach1932'] = {'Banach Théorie des Opérations Linéaires'},
['CITEREFBandy2021'] = template_names['Iranica'],
['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'},
['CITEREFBeattie1986'] = template_names['Iranica'],
['CITEREFBeißwenger1991'] = {'Bach\'s compositions (sources)'},
['CITEREFBek2001'] = {'Cite Grove'},
['CITEREFBelke1996'] = {'Tabula Imperii Byzantini'},
['CITEREFBelkeMersisch1990'] = {'Tabula Imperii Byzantini'},
['CITEREFBelkeRestle1984'] = {'Tabula Imperii Byzantini'},
['CITEREFBellini2008'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFBernardini2003'] = template_names['Iranica'],
['CITEREFBernhard_von_Poten1889'] = template_names['ADB'],
['CITEREFBernhard_von_Poten1898'] = template_names['ADB'],
['CITEREFBernjian2008'] = {'Encyclopaedia Islamica'},
['CITEREFBezilla1980'] = {'Bezilla-PRR-Electric-Traction'},
['CITEREFBianquis1998'] = {'The Cambridge History of Egypt', 'Cambridge History of Egypt'},
['CITEREFBickerman1983'] = template_names['Cam_Hist_Iran'],
['CITEREFBierstedt1988'] = {'Bierstedt An Introduction to Locally Convex Inductive Limits'},
['CITEREFBiran2009'] = template_names['Iranica'],
['CITEREFBirken1976'] = {'Die Provinzen des Osmanischen Reiches'},
['CITEREFBivar1983'] = template_names['Cam_Hist_Iran'],
['CITEREFBivar2003'] = template_names['Iranica'],
['CITEREFBlair2002'] = template_names['Iranica'],
['CITEREFBlair2021'] = template_names['Iranica'],
['CITEREFBlake1966'] = {'DisraeliRef'},
['CITEREFBlanken2019'] = {'Bach\'s compositions (sources)'},
['CITEREFBlankinship1994'] = {'The End of the Jihâd State', 'The End of the Jihad State'},
['CITEREFBlautSchulze2008'] = {'Bach\'s compositions (sources)'},
['CITEREFBloom2007'] = {'Cite Routledge Broadway', 'Cite Broadway Routledge', 'Cite Routledge Guide to Broadway', 'Routledge Guide to Broadway'},
['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'},
['CITEREFBonebakker1997'] = template_names['Iranica'],
['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'] = template_names['Cam_Hist_Iran'],
['CITEREFBosworth1975'] = template_names['Cam_Hist_Iran'],
['CITEREFBosworth1983'] = template_names['Iranica'],
['CITEREFBosworth1984'] = template_names['Iranica'],
['CITEREFBosworth1987'] = template_names['Iranica'],
['CITEREFBosworth1988'] = template_names['Iranica'],
['CITEREFBosworth1989'] = template_names['Iranica'],
['CITEREFBosworth1994'] = template_names['Iranica'],
['CITEREFBosworth1995'] = template_names['Iranica'],
['CITEREFBosworth1997'] = template_names['Iranica'],
['CITEREFBosworth1998'] = template_names['Iranica'],
['CITEREFBosworth2000'] = template_names['Iranica'],
['CITEREFBosworth2001'] = template_names['Iranica'],
['CITEREFBosworth2002'] = template_names['Iranica'],
['CITEREFBosworth2003'] = template_names['Iranica'],
['CITEREFBosworth2008'] = template_names['Iranica'],
['CITEREFBosworth2009'] = template_names['Iranica'],
['CITEREFBosworth2010'] = template_names['Iranica'],
['CITEREFBosworth2011'] = template_names['Iranica'],
['CITEREFBosworthCrane1984'] = template_names['Iranica'],
['CITEREFBottoMitchell2002'] = {'Cite ATT Broadway', 'Cite At This Theatre Broadway', 'Cite Broadway At This Theatre', 'Cite Broadway ATT'},
['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'},
['CITEREFBowen1928'] = {'The Life and Times of Ali ibn Isa'},
['CITEREFBowmanCameronGarnsey2005'] = {'Cambridge Ancient History'},
['CITEREFBoyce1983'] = template_names['Iranica'],
['CITEREFBoyce1986'] = template_names['Iranica'],
['CITEREFBoyce1989'] = template_names['Iranica'],
['CITEREFBoyce2000'] = template_names['Iranica'],
['CITEREFBoyce2009'] = template_names['Iranica'],
['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'] = {'DBI', 'ODB', 'Oxford Dictionary of Byzantium'},
['CITEREFBray2010'] = {'Bray-SDJR'},
['CITEREFBrett2010'] = {'New Cambridge History of Islam'},
['CITEREFBriant1985'] = template_names['Iranica'],
['CITEREFBrosius2000'] = template_names['Iranica'],
['CITEREFBrown2000'] = template_names['Iranica'],
['CITEREFBrown2008'] = {'The Cambridge History of the Byzantine Empire'},
['CITEREFBrunner1975'] = template_names['Cam_Hist_Iran'],
['CITEREFBrunner1983'] = template_names['Cam_Hist_Iran'],
['CITEREFBrunner1984'] = template_names['Iranica'],
['CITEREFBrunner1986'] = template_names['Iranica'],
['CITEREFBryan1886'] = {'Bryan (3rd edition)'},
['CITEREFBryan1889'] = {'Bryan (3rd edition)'},
['CITEREFBuhle1909'] = {'Bach\'s compositions (sources)'},
['CITEREFBulliet1984'] = template_names['Iranica'],
['CITEREFBulookbashiNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFBunbury1857'] = {'DGRG'},
['CITEREFBurant1987'] = {'Cite DCB'},
['CITEREFBurch1911'] = {'Burch Electric Traction'},
['CITEREFBurke1866'] = {'O\'Donnell family tree'},
['CITEREFBurn1985'] = template_names['Cam_Hist_Iran'],
['CITEREFBurrowsWallace1999'] = {'Cite gotham'},
['CITEREFBury1911'] = {'The Imperial Administrative System of the Ninth Century'},
['CITEREFBusse1975'] = template_names['Cam_Hist_Iran'],
['CITEREFBusse1982'] = template_names['Iranica'],
['CITEREFButcherNicholson2018'] = template_names['ODLA'],
['CITEREFButt1995'] = template_names['Butt_Stations'],
['CITEREFBöwering1995'] = template_names['Iranica'],
['CITEREFBürgelMottahedeh1988'] = template_names['Iranica'],
----------< C >----------
['CITEREFCIC1983'] = {'CIC1983bib'},
['CITEREFCalifornia1988'] = {'CA-Rail Passenger Development Plan-1988'},
['CITEREFCalmard1988'] = template_names['Iranica'],
['CITEREFCalmard1999'] = template_names['Iranica'],
['CITEREFCaltrans1984'] = {'Countrystudy'},
['CITEREFCameronWard-PerkinsWhitby2000'] = {'Cambridge Ancient History'},
['CITEREFCanepa2018'] = template_names['ODLA'],
['CITEREFCanny2008'] = {'O\'Donnell family tree'},
['CITEREFCappelCutlerKazhdan1991'] = template_names['ODB'],
['CITEREFCarl_von_Prantl1879'] = {'Cite ADB'},
['CITEREFCarlson2010'] = {'Dlmf'},
['CITEREFCaro1974'] = {'Cite Power Broker'},
['CITEREFCarpenter1977'] = template_names['ME-ref'],
['CITEREFCarpenter1981'] = template_names['ME-ref'],
['CITEREFCarra_de_VauxHodgson1965'] = {'EI2'},
['CITEREFCarter2006'] = {'Carter-RailwaysMotivePowerArgentina'},
['CITEREFCasserley1968'] = {'Casserley-joint'},
['CITEREFCasserleyJohnston1966'] = {'Casserley-LocoGrouping3'},
['CITEREFCasserleyJohnston1974'] = {'Casserley-LocoGrouping3', 'Casserley-LocoGrouping2', '0-7110-0554-0'},
['CITEREFCasway1984'] = {'O\'Donnell family tree'},
['CITEREFCavanna_Ciappina2001'] = {'DBI'},
['CITEREFCawley2001'] = {'Medieval Lands by Charles Cawley', 'MLCC'},
['CITEREFCawley2001'] = {'Medieval Lands by Charles Cawley'},
['CITEREFCawley2010'] = {'MLCC'},
['CITEREFCawley2011'] = {'MLCC'},
['CITEREFChaléardChanson-JabeurBéranger2006'] = {'Chaléard-Le cdf en Afrique'},
['CITEREFChambers1728'] = {'Cyclopaedia 1728'},
['CITEREFChasiotis1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFChaumont1985'] = template_names['Iranica'],
['CITEREFChaumont1986'] = template_names['Iranica'],
['CITEREFChaumont1987'] = template_names['Iranica'],
['CITEREFChaumont1990'] = template_names['Iranica'],
['CITEREFChaumontSchippmann1988'] = template_names['Iranica'],
['CITEREFCheyneBlack1899'] = {'Biblica', 'Cite Biblica'},
['CITEREFCheyneBlack1899–1903'] = {'Cite Biblica'},
['CITEREFCheyneBlack1901'] = {'Cite Biblica'},
['CITEREFCheyneBlack1902'] = {'Cite Biblica'},
['CITEREFCheyneBlack1903'] = {'Cite Biblica'},
['CITEREFChisholm1922'] = {'EB1922', 'Cite EB1922'},
['CITEREFChittick1997'] = template_names['Iranica'],
['CITEREFChkeidze2001'] = template_names['Iranica'],
['CITEREFChoniates1984'] = {'O City of Byzantium'},
['CITEREFChrista_Jost1999'] = template_names['NDB'],
['CITEREFChung1994'] = {'Country study'},
['CITEREFChurchmanHurst2001'] = {'Churchman & Hurst Railways of New Zealand'},
['CITEREFChurchman_&_Hurst2001'] = {'Churchman & Hurst Railways of New Zealand'},
['CITEREFChurella2013'] = {'Churella-PRR-1'},
['CITEREFClementsMcMahon2008'] = {'ClementsMcMahon-GSR Locomotives'},
['CITEREFClinker1978'] = {'Clinker-Stations'},
['CITEREFClinker1988'] = {'Clinker-Stations'},
['CITEREFCoates1990'] = {'Coates-Reading'},
['CITEREFColbyWilliams1916'] = {'New International Encyclopedia', 'NIE'},
['CITEREFColledgeWarlow2006'] = {'Colledge', 'Cite Colledge2006'},
['CITEREFColledgeWarlow2010'] = {'Cite Colledge2010'},
['CITEREFCollins2016'] = {'Cite Collins 2016'},
['CITEREFConolly1998'] = {'IanAllan-PreGroup-Atlas1998'},
['CITEREFConway1990'] = {'Conway A Course in Functional Analysis'},
['CITEREFCosentino2008'] = {'DBI'},
['CITEREFCoulthard-Clark2002'] = {'Australian Dictionary of Biography'},
['CITEREFCousin1910'] = {'A Short Biographical Dictionary of English Literature', 'Cite SBDEL'},
['CITEREFCox1967'] = {'Cox-Upper Darby'},
['CITEREFCox2011'] = {'Cox-Dixie'},
['CITEREFCrevier1993'] = {'Crevier 1993'},
['CITEREFCrockett2007'] = {'Australian Dictionary of Biography'},
['CITEREFCroke2018'] = template_names['ODLA'],
['CITEREFCrone1980'] = {'Slaves on Horses'},
['CITEREFCronin2011'] = template_names['Iranica'],
['CITEREFCroughtonKidnerYoung1982'] = {'Croughton-PrivateStations'},
['CITEREFCruickshanks1970'] = {'HistoryofParliament'},
['CITEREFCudahy2002'] = {'Cudahy-Hudson'},
['CITEREFCudahy2003'] = {'Cudahy-Subways'},
['CITEREFCurta2006'] = {'Southeastern Europe in the Middle Ages, 500–1250'},
----------< D >----------
['CITEREFDBI'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFDZS2015'] = {'Croatia Yearbook 2015'},
['CITEREFDadelsen1957'] = {'Bach\'s compositions (sources)'},
['CITEREFDaftary1990'] = {'Daftary-The Ismailis'},
['CITEREFDaftary2003'] = template_names['Iranica'],
['CITEREFDaftary2007'] = {'Daftary-The Ismailis'},
['CITEREFDaftary2015'] = template_names['Iranica'],
['CITEREFDaiber1988'] = template_names['Iranica'],
['CITEREFDandamayevShahbaziLecoq1986'] = template_names['Iranica'],
['CITEREFDaniel2000'] = template_names['Iranica'],
['CITEREFDaniel2010'] = {'New Cambridge History of Islam'},
['CITEREFDanielsDench1963'] = {'Daniels-NoMore'},
['CITEREFDanielsDench1973'] = {'Daniels-NoMore'},
['CITEREFDanner1975'] = template_names['Cam_Hist_Iran'],
['CITEREFDarleyCanepa2018'] = {'Oxford Dictionary of Late Antiquity'},
['CITEREFDaryaee2009'] = template_names['Iranica'],
['CITEREFDaryaee2018'] = template_names['ODLA'],
['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'},
['CITEREFDavud2018'] = {'Encyclopaedia Islamica'},
['CITEREFDavudNazerian2008'] = {'Encyclopaedia Islamica'},
['CITEREFDe_Negri1997'] = {'DBI'},
['CITEREFDemircan2010'] = {'TDV Encyclopedia of Islam'},
['CITEREFDeutsch1951'] = {'Schubert\'s compositions (references)'},
['CITEREFDeutsch1978'] = {'Schubert\'s compositions (references)'},
['CITEREFDeutsche_Autos,_Band_2,2001'] = {'Deutsche Autos-2'},
['CITEREFDeutsche_Autos,_Band_3,2001'] = {'Deutsche Autos-3'},
['CITEREFDeutsche_Autos,_Band_4,2001'] = {'Deutsche Autos-4'},
['CITEREFDeutsche_Autos,_Band_5,2001'] = {'Deutsche Autos-5'},
['CITEREFDeutsche_Autos,_Band_6,2001'] = {'Deutsche Autos-6'},
['CITEREFDewick2005'] = {'Dewick-Atlas'},
['CITEREFDiamonstein-Spielvogel2011'] = {'Cite landmarks'},
['CITEREFDickens2018'] = template_names['ODLA'],
['CITEREFDirksen1998'] = {'Bach\'s compositions (sources)'},
['CITEREFDirksen2010'] = {'Bach\'s compositions (sources)'},
['CITEREFDirksen2016'] = {'Bach\'s compositions (sources)'},
['CITEREFDixmier1984'] = {'Dixmier General Topology'},
['CITEREFDoerfer1989'] = template_names['Iranica'],
['CITEREFDoganis1930'] = {'Great Military and Naval Encyclopaedia'},
['CITEREFDoleckiMynard2016'] = {'Dolecki Mynard Convergence Foundations Of Topology'},
['CITEREFDolkart1998'] = {'Cite morningside'},
['CITEREFDonner1995'] = template_names['Iranica'],
['CITEREFDonohue2003'] = {'The Buwayhid Dynasty in Iraq'},
['CITEREFDorin1972'] = {'Dorin-North Western'},
['CITEREFDow1962'] = {'Dow-GC2'},
['CITEREFDow1965'] = {'Dow-GC3'},
['CITEREFDow1985'] = {'Dow-GC1'},
['CITEREFDowney2007'] = {'Downey-Chicago'},
['CITEREFDrechsler2005'] = template_names['Iranica'],
['CITEREFDrummond1964'] = {'HistoryofParliament'},
['CITEREFDrury1985'] = {'Drury Historical Guide 1985'},
['CITEREFDrury1993'] = {'Drury-North American Steam'},
['CITEREFDuchesne-Guillemin1994'] = template_names['Iranica'],
['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'},
['CITEREFDunlop1985'] = template_names['Iranica'],
['CITEREFDunn2013'] = {'Dunn-Comeng-5'},
['CITEREFDurand-Guédy2008'] = template_names['Iranica'],
['CITEREFDurand-Guédy2010'] = template_names['Iranica'],
['CITEREFDurand-Guédy2013'] = {'Encyclopaedia Islamica'},
['CITEREFDurham1998'] = {'California\'s Geographic Names'},
['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)'},
['CITEREFde_Blois2000'] = template_names['Iranica'],
['CITEREFde_Planhol1987'] = template_names['Iranica'],
['CITEREFde_Planhol1988'] = template_names['Iranica'],
----------< E >----------
['CITEREFEIr.1994'] = template_names['Iranica'],
['CITEREFEarle2018'] = {'Gymnosperm Database'},
['CITEREFEbata2019'] = {'BDh'},
['CITEREFEbata2020'] = {'BDh'},
['CITEREFEbrahimKhodaverdian2018'] = {'Encyclopaedia Islamica'},
['CITEREFEdwards1995'] = {'Edwards Functional Analysis Theory and Applications'},
['CITEREFEichberg1976'] = {'Bach\'s compositions (sources)'},
['CITEREFEilers1983'] = template_names ['Cam_Hist_Iran'],
['CITEREFEkbal1991'] = template_names['Iranica'],
['CITEREFEl-Hibri2010'] = {'New Cambridge History of Islam'},
['CITEREFEldredgeHorenstein2014'] = {'Cite concrete'},
['CITEREFElsholz1982'] = {'Schubert\'s compositions (references)'},
['CITEREFElwell-Sutton1984'] = template_names['Iranica'],
['CITEREFEppstein1966'] = {'Bach\'s compositions (sources)'},
['CITEREFEppstein1982'] = {'Bach\'s compositions (sources)'},
['CITEREFEquasis'] = {'Csr', 'Cite ship register'},
['CITEREFEuDaly2009'] = {'Complete Book of North American Railroading'},
['CITEREFEuDalySchaferJessupBoyd2009'] = {'Complete Book of North American Railroading'},
----------< F >----------
['CITEREFFacella2021'] = template_names['Iranica'],
['CITEREFFang1943'] = {'Cite ECCP'},
['CITEREFFarinella2001'] = {'DBI'},
['CITEREFFatehi-NezhadAzarnooshNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFFatehi-nezhadRahimi2008'] = {'Encyclopaedia Islamica'},
['CITEREFFeder1958'] = {'Bach\'s compositions (sources)'},
['CITEREFFederal_Writers'_Project1939'] = {'Cite fednyc'},
['CITEREFFelixMadelung1995'] = template_names['Iranica'],
['CITEREFFernandez1983'] = {'Fernandez1983'},
['CITEREFFesharaki2015'] = {'Encyclopaedia Islamica'},
['CITEREFFiaccadori1991'] = template_names['ODB'],
['CITEREFFikratUmar2008'] = template_names['Iranica'],
['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'},
['CITEREFFloor1992'] = template_names['Iranica'],
['CITEREFFloor2005'] = template_names['Iranica'],
['CITEREFFlora_of_North_America'] = {'EFloras'},
['CITEREFFlora_of_North_America2009'] = {'EFloras'},
['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'] = template_names['ODB'],
['CITEREFFoster1971'] = template_names['ME-ref'],
['CITEREFFoster1996'] = {'Foster-Field Guide'},
['CITEREFFrailey2010'] = {'Frailey-Twilight'},
['CITEREFFranke1994'] = {'Cite Cambridge History of China'},
['CITEREFFranz_Schnorr_von_Carolsfeld1883'] = {'Cite ADB'},
['CITEREFFriedrich_Wilhelm_Bautz1975'] = {'BBKL'},
['CITEREFFriedrich_Wilhelm_Bautz1990'] = {'BBKL'},
['CITEREFFry1964'] = {'RCTS-LocosLNER-7'},
['CITEREFFry1966'] = {'RCTS-LocosLNER-5'},
['CITEREFFrye1975'] = template_names['Cam_Hist_Iran'],
['CITEREFFrye1983'] = template_names['Cam_Hist_Iran'],
['CITEREFFrye2004'] = template_names['Iranica'],
['CITEREFFubini2012'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFFudenbergTirole1991'] = {'Cite Fudenberg Tirole 1991'},
['CITEREFFultonHarris1991'] = {'Fulton-Harris'},
----------< G >----------
['CITEREFGarakaniBrown2013'] = {'Encyclopaedia Islamica'},
['CITEREFGardner2005'] = {'MSW3 Microbiotheria'},
['CITEREFGardoni2015'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFGareyJohnson1979'] = {'Garey-Johnson'},
['CITEREFGarsoian2000'] = template_names['Iranica'],
['CITEREFGarsoian2004'] = template_names['Iranica'],
['CITEREFGarsoian2005'] = template_names['Iranica'],
['CITEREFGarth2003'] = template_names['ME-ref'],
['CITEREFGazette34205'] = {'London Gazette'},
['CITEREFGazette34339'] = {'London Gazette'},
['CITEREFGazette34390'] = {'London Gazette'},
['CITEREFGazette34427'] = {'London Gazette'},
['CITEREFGazette34558'] = {'London Gazette'},
['CITEREFGazette34870'] = {'London Gazette'},
['CITEREFGazette34978'] = {'London Gazette'},
['CITEREFGazette34989'] = {'London Gazette'},
['CITEREFGazette35037'] = {'London Gazette'},
['CITEREFGazette35107'] = {'London Gazette'},
['CITEREFGazette35134'] = {'London Gazette'},
['CITEREFGazette35284'] = {'London Gazette'},
['CITEREFGazette37560'] = {'London Gazette'},
['CITEREFGazette37590'] = {'London Gazette'},
['CITEREFGazette37598'] = {'London Gazette'},
['CITEREFGazette37610'] = {'London Gazette'},
['CITEREFGazette38020'] = {'London Gazette'},
['CITEREFGazette38611'] = {'London Gazette'},
['CITEREFGeanakoplos1959'] = {'Emperor Michael Palaeologus and the West'},
['CITEREFGeorg_von_Dadelsen1953'] = template_names['NDB'],
['CITEREFGhanoonparvar1989'] = template_names['Iranica'],
['CITEREFGhereghlou2009'] = template_names['Iranica'],
['CITEREFGhereghlou2016'] = template_names['Iranica'],
['CITEREFGhulamiyan2015'] = template_names['Iranica'],
['CITEREFGhulamiyan2015'] = {'Encyclopaedia Islamica'},
['CITEREFGiannasi1975'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFGibb1923'] = {'The Arab Conquests in Central Asia'},
['CITEREFGignoux1983'] = template_names['Iranica'],
['CITEREFGignoux1994'] = template_names['Iranica'],
['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'] = {'Cite NIE', 'New International Encyclopedia', 'NIE'},
['CITEREFGilmanPeckColby1916'] = {'New International Encyclopedia', 'NIE'},
['CITEREFGiunashvili2016'] = template_names['Iranica'],
['CITEREFGleaves1921'] = {'Gleaves'},
['CITEREFGlischinski1997'] = {'Glischinski-Santa Fe'},
['CITEREFGlöckner1983'] = {'Bach\'s compositions (sources)'},
['CITEREFGoldberg1981'] = {'Goldberg-Amtrak'},
['CITEREFGordon2001'] = {'Gordon-The Breaking of a Thousand Swords'},
['CITEREFGraham1974'] = {'Cite DCB'},
['CITEREFGrant1994'] = {'Grant-Death'},
['CITEREFGrant2010'] = {'Grant-Twilight'},
['CITEREFGrant2017'] = {'Grant-RailCo'},
['CITEREFGrassi2018'] = template_names['Iranica'],
['CITEREFGray1986'] = template_names['Cam_Hist_Iran'],
['CITEREFGreenlaw2007'] = {'Greenlaw-Via Rail'},
['CITEREFGregory1991'] = template_names['ODB'],
['CITEREFGregoryŠevčenko1991'] = template_names['ODB'],
['CITEREFGrete_Schemann1957'] = template_names['NDB'],
['CITEREFGrey2002'] = {'Australian Dictionary of Biography'},
['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'},
['CITEREFGriffith1991'] = template_names['ODB'],
['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'},
['CITEREFGrubb2005'] = {'MSW3 Artiodactyla'},
['CITEREFGuilland1967'] = {'Recherches sur les institutions byzantines'},
['CITEREFGulino2005'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFGunzburg1984'] = {'Gunzburg-History WAGR Steam'},
['CITEREFGurneyNabavi1993'] = template_names['Iranica'],
['CITEREFGutas1987'] = template_names['Iranica'],
['CITEREFGvakharia2001'] = template_names['Iranica'],
['CITEREFGüner1997'] = {'TDV Encyclopedia of Islam'},
----------< H >----------
['CITEREFHaarer2018'] = template_names['ODLA'],
['CITEREFHabibi2021'] = template_names['Iranica'],
['CITEREFHadidi2000'] = template_names['Iranica'],
['CITEREFHaji2008'] = template_names['Iranica'],
['CITEREFHaldon1999'] = {'Warfare, State and Society in the Byzantine World, 565–1204'},
['CITEREFHalliday1985'] = {'Halliday-AustWineCompend'},
['CITEREFHalliday2008'] = {'Halliday-JHWAtlasAust2008'},
['CITEREFHalliday2009'] = {'Halliday-AustWineEncyc'},
['CITEREFHalm1998'] = template_names['Iranica'],
['CITEREFHalpenny1990'] = {'Canadabio'},
['CITEREFHambly1990'] = template_names['Cam_Hist_Iran'],
['CITEREFHambly1991'] = template_names['Cam_Hist_Iran'],
['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'],
['CITEREFHanaway1988'] = template_names['Iranica'],
['CITEREFHanaway1989'] = template_names['Iranica'],
['CITEREFHanawayLewisohn2004'] = template_names['Iranica'],
['CITEREFHans_Heinrich_Borcherdt1955'] = template_names['NDB'],
['CITEREFHans_Knudsen1972'] = template_names['NDB'],
['CITEREFHansen1988'] = {'Book-Hansen-US Nuclear Weapons'},
['CITEREFHansman1991'] = template_names['Iranica'],
['CITEREFHartshorne1977'] = {'Hartshorne AG'},
['CITEREFHassanpour1989'] = template_names['Iranica'],
['CITEREFHassanpour1995'] = template_names['Iranica'],
['CITEREFHasumi2003'] = {'Hasumi-shiguehiko-ozu-2003'},
['CITEREFHaswell-Smith2004'] = {'Haswell-Smith'},
['CITEREFHaugic1908'] = {'Schaff-Herzog'},
['CITEREFHawting1987'] = {'The First Dynasty of Islam'},
['CITEREFHawting2000'] = {'The First Dynasty of Islam'},
['CITEREFHaynes2011'] = {'RubberBible92nd'},
['CITEREFHeinichen1728'] = {'Bach\'s compositions (sources)'},
['CITEREFHeinrich_Welti1890'] = {'Cite ADB'},
['CITEREFHelgen2005'] = {'MSW3 Scandentia'},
['CITEREFHellmann1965'] = {'Bach\'s compositions (sources)'},
['CITEREFHenrici1725'] = {'Bach\'s compositions (sources)'},
['CITEREFHenryOrsmond1928'] = {'Raiatea family tree'},
['CITEREFHermann_Palm1876'] = {'Cite ADB'},
['CITEREFHerr2000'] = {'Herr-LN'},
['CITEREFHeschel2007'] = {'Encyclopaedia Judaica', 'Cite EJ', 'Cite Encyclopaedia Judaica'},
['CITEREFHewsen1988'] = template_names['Iranica'],
['CITEREFHidyHidyScottHofsummer2004'] = {'Hidy-Great Northern'},
['CITEREFHildHellenkemper1990'] = {'Tabula Imperii Byzantini'},
['CITEREFHildHellenkemper1994'] = {'Tabula Imperii Byzantini'},
['CITEREFHildRestle1981'] = {'Tabula Imperii Byzantini'},
['CITEREFHillenbrand1986'] = template_names['Iranica'],
['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'},
['CITEREFHirsch1906'] = {'Cite JE1906'},
['CITEREFHistoric_Environment_Scotland'] = {'Canmore'},
['CITEREFHistoric_Environment_Scotland1972'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_Scotland1976'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_Scotland2020'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_Scotland:_Rusco_Tower2020'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_ScotlandLB33744'] = {'Historic Environment Scotland'},
['CITEREFHistoric_Environment_ScotlandLB50114'] = {'Historic Environment Scotland'},
['CITEREFHob.'] = {'Schubert\'s compositions (references)'},
['CITEREFHoffmanSmith2005'] = {'MSW3 Lagomorpha'},
['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'] = template_names['ODB'],
['CITEREFHollingsworthCutler1991'] = template_names['ODB'],
['CITEREFHolmgren2003'] = {'EFloras'},
['CITEREFHoltBiddle1986'] = {'Holt-NorthWest'},
['CITEREFHolton1989'] = {'Holton-Reading-1'},
['CITEREFHonigmann1935'] = {'Byzance et les Arabes'},
['CITEREFHopley1983'] = {'Australian Dictionary of Biography'},
['CITEREFHort1911'] = {'DCBL'},
['CITEREFHorváth1966'] = {'Horváth Topological Vector Spaces and Distributions Volume 1 1966'},
['CITEREFHosseini2017'] = template_names['Iranica'],
['CITEREFHounshell1984'] = {'Hounshell1984'},
['CITEREFHudson1997'] = {'Country study'},
['CITEREFHughes1990'] = {'Hughes-IndianLocos1'},
['CITEREFHughes1992'] = {'Hughes-IndianLocos2'},
['CITEREFHughes1994'] = {'Hughes-IndianLocos3'},
['CITEREFHughes1996'] = {'Hughes-IndianLocos4'},
['CITEREFHummel1943'] = {'Cite ECCP'},
['CITEREFHumphreys2018'] = template_names['ODLA'],
['CITEREFHunter-Crawley2018'] = template_names['ODLA'],
['CITEREFHunter2008'] = {'Country study'},
['CITEREFHutter2009'] = template_names['Iranica'],
['CITEREFHutterer2005'] = {'MSW3 Soricomorpha'},
['CITEREFHütter2012'] = {'Hütter-50bis53'},
['CITEREFHütter2015'] = {'Hütter-54bis59'},
['CITEREFHütter2021'] = {'Hütter-60bis91'},
----------< I >----------
['CITEREFIbn_Khallikan1843'] = {'Ibn Khallikan\'s Biographical Dictionary'},
['CITEREFImber2002'] = {'Imber-The Ottoman Empire, 1300–1650'},
['CITEREFInalcik1989'] = {'Setton-A History of the Crusades'},
['CITEREFIranica:_Bahrām'] = template_names['Iranica'],
['CITEREFIrvine2006'] = template_names['Iranica'],
['CITEREFIshino1998'] = {'Teishajo'},
['CITEREFIshkevariNejad2008'] = {'Encyclopaedia Islamica'},
['CITEREFIvey1919'] = {'Ivey-Marquette'},
----------< J >----------
['CITEREFJackson1908'] = {'Schaff-Herzog'},
['CITEREFJackson1988'] = template_names['Iranica'],
['CITEREFJackson1989'] = template_names['Iranica'],
['CITEREFJackson1995'] = {'Cite enc-nyc'},
['CITEREFJackson2010'] = {'Cite enc-nyc2'},
['CITEREFJacksonMelville2001'] = template_names['Iranica'],
['CITEREFJacobs1904'] = {'Cite Jewish Encyclopedia'},
['CITEREFJarchow1981'] = {'Jarchow Locally Convex Spaces'},
['CITEREFJavadiBurrill1988'] = template_names['Iranica'],
['CITEREFJohn_O'Donovan1856'] = {'Cite AFM'},
['CITEREFJohnstonWelshSchafer2001'] = {'Johnston-Streamliner'},
['CITEREFJones2011'] = {'Cite EPD'},
['CITEREFJordan2002'] = {'Jordan-WineWABest'},
['CITEREFJoshi1983'] = {'Joshi Introduction to General Topology'},
['CITEREFJoslen2003'] = {'Joslen-OOB'},
['CITEREFJowett1867'] = {'DGRBM', 'Cite DGRBM'},
['CITEREFJowett1989'] = {'Jowett-Atlas', 'Carnarvonshire Railway'},
['CITEREFJowett2000'] = {'Jowett-Nationalised'},
['CITEREFJullien2018'] = template_names['ODLA'],
['CITEREFJupp1986'] = {'HistoryofParliament'},
----------< K >----------
['CITEREFK.'] = {'Schubert\'s compositions (references)'},
['CITEREFKadinsky2016'] = {'Cite Hidden Waters NYC'},
['CITEREFKaegi1991'] = template_names['ODB'],
['CITEREFKamaly2006'] = template_names['Iranica'],
['CITEREFKamp1981'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFKang2008'] = {'Country study'},
['CITEREFKaramatiMelvin-Koushki2021'] = template_names['Iranica'],
['CITEREFKaramatiMelvin-Koushki2021'] = {'Encyclopaedia Islamica'},
['CITEREFKarimi-Hakkak1997'] = template_names['Iranica'],
['CITEREFKarimiMaghsoodi2013'] = {'Encyclopaedia Islamica'},
['CITEREFKarl_Frohnmeyer1953'] = template_names['NDB'],
['CITEREFKarnow1989'] = {'Cite-Karnow'},
['CITEREFKasheff2001'] = template_names['Iranica'],
['CITEREFKayvaniGholami2008'] = {'Encyclopaedia Islamica'},
['CITEREFKazhdan1991'] = template_names['ODB'],
['CITEREFKazhdanCutler1991'] = template_names['ODB'],
['CITEREFKazhdanJeffreys1991'] = template_names['ODB'],
['CITEREFKazhdanŠevčenko1991'] = template_names['ODB'],
['CITEREFKeall1987'] = template_names['Iranica'],
['CITEREFKeefe2006'] = {'Schubert\'s compositions (references)'},
['CITEREFKeller1937'] = {'Bach\'s compositions (sources)'},
['CITEREFKelly1988'] = {'Cite GEIL'},
['CITEREFKellyBurrage1920'] = {'Cite AMB1920'},
['CITEREFKennedy1998'] = {'The Cambridge History of Egypt', 'Cite Kennedy 1998', 'Cambridge History of Egypt'},
['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'},
['CITEREFKettenhofen1995'] = template_names['Iranica'],
['CITEREFKettenhofen2001'] = template_names['Iranica'],
['CITEREFKettenhofenBournoutianHewsen1998'] = template_names['Iranica'],
['CITEREFKhaleelulla1982'] = {'Khaleelulla Counterexamples in Topological Vector Spaces'},
['CITEREFKhaleghi-Motlagh1999'] = template_names['Iranica'],
['CITEREFKhaleghi-Motlagh2001'] = template_names['Iranica'],
['CITEREFKhan2012'] = {'Cite Banglapedia'},
['CITEREFKhatibiNegahban2013'] = {'Encyclopaedia Islamica'},
['CITEREFKim1994'] = {'Country study'},
['CITEREFKirnberger1774'] = {'Bach\'s compositions (sources)'},
['CITEREFKirnberger1780'] = {'Bach\'s compositions (sources)'},
['CITEREFKlein2006'] = {'Klein-UP-2'},
['CITEREFKlíma1988'] = template_names['Iranica'],
['CITEREFKobayashi1978'] = {'Bach\'s compositions (sources)'},
['CITEREFKoderHild1976'] = {'Tabula Imperii Byzantini'},
['CITEREFKoderSoustalKoder1998'] = {'Tabula Imperii Byzantini'},
['CITEREFKoeppel2015'] = {'Cite citygrid'},
['CITEREFKofos1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFKohler1902'] = {'Cite Jewish Encyclopedia'},
['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)'},
['CITEREFKurz1983'] = template_names['Cam_Hist_Iran'],
['CITEREFKuznik2008'] = {'Bach\'s compositions (sources)'},
['CITEREFKöthe1969'] = {'Köthe Topological Vector Spaces I'},
['CITEREFKöthe1979'] = {'Köthe Topological Vector Spaces II'},
['CITEREFKöthe1983'] = {'Köthe Topological Vector Spaces I'},
['CITEREFKülzer2008'] = {'Tabula Imperii Byzantini'},
['CITEREFKüçükaşcı2001'] = {'TDV Encyclopedia of Islam'},
----------< L >----------
['CITEREFLa_Porta2018'] = template_names['ODLA'],
['CITEREFLacourcière1974'] = {'Cite DCB'},
['CITEREFLadefogedMaddieson1996'] = {'SOWL'},
['CITEREFLandau-Tasseron2010'] = {'New Cambridge History of Islam'},
['CITEREFLandauCondit1996'] = {'Cite nysky'},
['CITEREFLandmann1907'] = {'Bach\'s compositions (sources)'},
['CITEREFLang1983'] = template_names['Cam_Hist_Iran'],
['CITEREFLangaroodiCooper2008'] = {'Encyclopaedia Islamica'},
['CITEREFLangaroodiCooper2015'] = template_names['Iranica'],
['CITEREFLangaroodiCooper2015'] = {'Encyclopaedia Islamica'},
['CITEREFLangaroodiNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFLangaroodiNegahban2015'] = template_names['Iranica'],
['CITEREFLangaroodiNegahban2015'] = {'Encyclopaedia Islamica'},
['CITEREFLangaroudi2001'] = template_names['Iranica'],
['CITEREFLatham1982–2021'] = template_names['Iranica'],
['CITEREFLazard1975'] = template_names['Cam_Hist_Iran'],
['CITEREFLaërtius1925'] = {'Cite Lives of the Eminent Philosophers', 'Cite LotEP'},
['CITEREFLeCoq1986'] = template_names['Iranica'],
['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'},
['CITEREFLeblanc1979'] = {'Cite DCB'},
['CITEREFLee1903'] = {'Cite DNBIE'},
['CITEREFLee2018'] = template_names['ODLA'],
['CITEREFLeisingerWollny1993'] = {'Bach\'s compositions (sources)'},
['CITEREFLerner1988'] = template_names['Iranica'],
['CITEREFLev1999'] = {'Saladin in Egypt'},
['CITEREFLevitan2001'] = {'Springer'},
['CITEREFLewin1925'] = {'Lewin-EarlyRail'},
['CITEREFLewis1969'] = {'Setton-A History of the Crusades'},
['CITEREFLewis1986'] = {'Lewis-Shortline-1986'},
['CITEREFLewis1991'] = {'Lewis-Shortline-1991'},
['CITEREFLewis1996'] = {'Lewis-Shortline-1996'},
['CITEREFLewis2001'] = template_names['Iranica'],
['CITEREFLiederNet_Archive'] = {'Schubert\'s compositions (references)'},
['CITEREFLieu1997'] = template_names['Iranica'],
['CITEREFLighthouses_of_Australia_Inc'] = {'Cite loa'},
['CITEREFLind1986'] = {'Lind-Limiteds'},
['CITEREFLittle1974'] = {'Cite DCB'},
['CITEREFLongnon1969'] = {'Setton-A History of the Crusades'},
['CITEREFLosensky2003'] = template_names['Iranica'],
['CITEREFLoverance2018'] = template_names['ODLA'],
['CITEREFLukonin1983'] = {'Cambridge History of Iran'},
['CITEREFLurje2010'] = template_names['Iranica'],
['CITEREFLuttrell1975'] = {'Setton-A History of the Crusades'},
['CITEREFLuttrell1987'] = {'DBI'},
['CITEREFLynch2004'] = {'Lynch-Penn Central'},
['CITEREFLynch2005'] = {'Lynch-New Haven passenger'},
['CITEREFLynch2018'] = template_names['ODLA'],
['CITEREFLéger1990'] = {'Cite DCB'},
['CITEREFle_Fleming1953'] = {'RCTS-LocosGWR-8'},
['CITEREFle_Fleming1960'] = {'RCTS-LocosGWR-8'},
----------< M >----------
['CITEREFMacDermot1927'] = {'Infobox GWR'},
['CITEREFMacDermot1931'] = {'Infobox GWR'},
['CITEREFMacEoin1988'] = template_names['Iranica'],
['CITEREFMacKenzie1992'] = template_names['Iranica'],
['CITEREFMadelung1975'] = template_names['Cam_Hist_Iran'],
['CITEREFMadelung1978'] = {'EI2'},
['CITEREFMadelung1983'] = template_names['Iranica'],
['CITEREFMadelung1984'] = template_names['Iranica'],
['CITEREFMadelung1988'] = template_names['Iranica'],
['CITEREFMadelung1993'] = template_names['Iranica'],
['CITEREFMadelung2003'] = template_names['Iranica'],
['CITEREFMadelungFelix1995'] = template_names['Iranica'],
['CITEREFMaeda2009'] = template_names['Iranica'],
['CITEREFMagdalino2002'] = {'The Empire of Manuel I Komnenos'},
['CITEREFMaiken1989'] = {'Maiken-Night Trains'},
['CITEREFMailer2004'] = {'Mailer-Omaha Road'},
['CITEREFMajidiNegahban'] = {'Encyclopaedia Islamica'},
['CITEREFMalandra2009'] = template_names['Iranica'],
['CITEREFManfred_Knedlik2007'] = {'BBKL'},
['CITEREFMarshak1994'] = template_names['Iranica'],
['CITEREFMarshak2002'] = template_names['Iranica'],
['CITEREFMarshall1823'] = {'Cite RNB1823'},
['CITEREFMarshall1824'] = {'Cite RNB1823'},
['CITEREFMarshall1825'] = {'Cite RNB1823'},
['CITEREFMarshall1827'] = {'Cite RNB1823'},
['CITEREFMarshall1828'] = {'Cite RNB1823'},
['CITEREFMarshall1829'] = {'Cite RNB1823'},
['CITEREFMarshall1830'] = {'Cite RNB1823'},
['CITEREFMarshall1831'] = {'Cite RNB1823'},
['CITEREFMarshall1832'] = {'Cite RNB1823'},
['CITEREFMarshall1833'] = {'Cite RNB1823'},
['CITEREFMarshall1835'] = {'Cite RNB1823'},
['CITEREFMarshall1972'] = {'Lancashire & 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'},
['CITEREFMasoud_Jalali-Moqaddam2015'] = {'Encyclopaedia Islamica'},
['CITEREFMatini1987'] = template_names['Iranica'],
['CITEREFMatthee2008'] = template_names['Iranica'],
['CITEREFMatthee2015'] = template_names['Iranica'],
['CITEREFMaul2005'] = {'Bach\'s compositions (sources)'},
['CITEREFMayGray2006'] = {'MayGray-WAGRPassCar'},
['CITEREFMazzaoui2002'] = template_names['Iranica'],
['CITEREFMcArthurMcArthur2003'] = {'Cite ogn', 'Cite Oregon Geographic Names'},
['CITEREFMcCaffrey1990'] = template_names['Iranica'],
['CITEREFMcCorduck2004'] = {'McCorduck 2004'},
['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)'},
['CITEREFMelville1997'] = template_names['Iranica'],
['CITEREFMelville2003'] = template_names['Iranica'],
['CITEREFMennell1892'] = {'Dictionary of Australasian Biography'},
['CITEREFMetcalfe2009'] = {'The Muslims of Medieval Italy'},
['CITEREFMiddleton1961'] = {'Middleton-Interurban'},
['CITEREFMiddleton2001'] = {'Middleton-Electrified-2nd'},
['CITEREFMiddleton2002'] = {'Middleton-PRR-Under-Wire'},
['CITEREFMiddletonSmerkDiehl2007'] = {'Encyclopedia of North American Railroads'},
['CITEREFMiles1975'] = template_names['Cam_Hist_Iran'],
['CITEREFMillar2011'] = {'NZR Steam Locomotive'},
['CITEREFMiller'] = {'Encyclopaedia Islamica'},
['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'},
['CITEREFMoore1875'] = {'Cite CEM'},
['CITEREFMorana1993'] = {'Bach\'s compositions (sources)'},
['CITEREFMorony2009'] = template_names['Iranica'],
['CITEREFMoschonas1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFMottahedeh1975'] = template_names['Cam_Hist_Iran'],
['CITEREFMozartHaydnHaydn2008'] = {'Schubert\'s compositions (references)'},
['CITEREFMunkres1974'] = {'Munkres Topology'},
['CITEREFMunkres2000'] = {'Munkres Topology'},
['CITEREFMurray2006'] = {'Murray-Illinois Central'},
['CITEREFMusserCarleton2005'] = {'MSW3 Muroidea'},
['CITEREFMüller,_Hans-Christian1966'] = template_names['NDB'],
----------< N >----------
['CITEREFNSA_II,_15'] = {'Schubert\'s compositions (references)'},
['CITEREFNSA_scores'] = {'Schubert\'s compositions (references)'},
['CITEREFNSA_website'] = {'Schubert\'s compositions (references)'},
['CITEREFNagel1990'] = template_names['Iranica'],
['CITEREFNariciBeckenstein2011'] = {'Narici Beckenstein Topological Vector Spaces'},
['CITEREFNavāʾī1988'] = template_names['Iranica'],
['CITEREFNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFNersessian2018'] = template_names['ODLA'],
['CITEREFNetzer1998'] = template_names['Iranica'],
['CITEREFNetzer2007'] = template_names['Iranica'],
['CITEREFNeukirch1999'] = {'Neukirch ANT'},
['CITEREFNeukirchSchmidtWingberg2000'] = {'Neukirch et al. CNF'},
['CITEREFNew_York_City_Landmarks_Preservation_CommissionDolkartPostal2009'] = {'Cite nycland'},
['CITEREFNewbould1999'] = {'Schubert\'s compositions (references)'},
['CITEREFNewman1994'] = template_names['Iranica'],
['CITEREFNicholsonCanepaDaryaee2018'] = template_names['ODLA'],
['CITEREFNicol1988'] = {'Byzantium and Venice: A Study in Diplomatic and Cultural Relations'},
['CITEREFNicol1992'] = {'The Immortal Emperor: The Life and Legend of Constantine Palaiologos, Last Emperor of the Romans'},
['CITEREFNicol1993'] = {'The Last Centuries of Byzantium, 1261–1453', 'The Last Centuries of Byzantium'},
['CITEREFNock1974'] = {'Nock-EustonGlasgow'},
----------< O >----------
['CITEREFO'Byrne1849'] = {'Cite NBD1849'},
['CITEREFO'ConnorRobertson1996'] = {'MacTutor Biography', 'MacTutor'},
['CITEREFO'ConnorRobertson2000'] = {'MacTutor Biography', 'MacTutor'},
['CITEREFO'Donoghue1897'] = {'Cite DNB'},
['CITEREFODB'] = template_names['ODB'],
['CITEREFODLA'] = template_names['ODLA'],
['CITEREFOberling1984'] = template_names['Iranica'],
['CITEREFOberling2008'] = template_names['Iranica'],
['CITEREFOberling2010'] = template_names['Iranica'],
['CITEREFOdisheli2018'] = template_names['ODLA'],
['CITEREFOfficial_Guide_of_the_Railways1950'] = {'Official Guide of the Railways'},
['CITEREFOgorek2012'] = {'Ogorek-South Shore'},
['CITEREFOikonomides1991'] = template_names['ODB'],
['CITEREFOikonomou1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFOlbrycht2021'] = template_names['Iranica'],
----------< P >----------
['CITEREFPLP'] = {'Prosopographisches Lexikon der Palaiologenzeit', 'PLP'},
['CITEREFPalmer1875'] = {'Cite ADB'},
['CITEREFPalmerStewart1965'] = {'Palmer & Stewart'},
['CITEREFPanainoAbdollahyBalland1990'] = template_names['Iranica'],
['CITEREFPandariHirtensteinNegahban2013'] = {'Encyclopaedia Islamica'},
['CITEREFParvin2003'] = template_names['Iranica'],
['CITEREFParvin2009'] = template_names['Iranica'],
['CITEREFPatience1996'] = {'Patience-SteamTwilight'},
['CITEREFPatton2005'] = {'MSW3 Geomyidae'},
['CITEREFPaul2000'] = template_names['Iranica'],
['CITEREFPaxtonBourne1985'] = {'Paxton-Bourne'},
['CITEREFPeacock2011'] = template_names['Iranica'],
['CITEREFPeck1898'] = {'HDCA'},
['CITEREFPerlis2001'] = {'Springer'},
['CITEREFPerreault2004'] = {'Bach\'s compositions (sources)'},
['CITEREFPerry1983'] = template_names['Cam_Hist_Iran'],
['CITEREFPerry1990'] = template_names['Cam_Hist_Iran'],
['CITEREFPerry1991'] = template_names['Cam_Hist_Iran'],
['CITEREFPetropoulosKoumarianou1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFPetrucci1982'] = {'DBI'},
['CITEREFPezeshk2017'] = {'Encyclopaedia Islamica'},
['CITEREFPezeshkKhaleeli2017'] = template_names['Iranica'],
['CITEREFPezeshkKhaleeli2017'] = {'Encyclopaedia Islamica'},
['CITEREFPfau2008'] = {'Bach\'s compositions (sources)'},
['CITEREFPinkepank1973'] = {'Pinkepank diesel spotters guide 2'},
['CITEREFPlantlist2016'] = {'Plantlist'},
['CITEREFPlaten1976'] = {'Bach\'s compositions (sources)'},
['CITEREFPloumidisAlexiou1974'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFPmbZ'] = {'Prosopographie der mittelbyzantinischen Zeit', 'PMBZ'},
['CITEREFPolemis1968'] = {'Polemis-The Doukai'},
['CITEREFPope2007'] = {'Encyclopaedia Judaica', 'Cite EJ', 'Cite Encyclopaedia Judaica'},
['CITEREFPopplewell'] = {'Popplewell-Gazetteer'},
['CITEREFPotts2018'] = template_names['ODLA'],
['CITEREFPottsCanepa2018'] = template_names['ODLA'],
['CITEREFPourshariati2017'] = {'Encyclopædia Iranica Online'},
['CITEREFPozza1992'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFPrawer1985'] = {'Setton-A History of the Crusades'},
['CITEREFPritsak1991'] = template_names['ODB'],
['CITEREFProsopographie_der_mittelbyz._Zeit'] = {'Prosopographie der mittelbyzantinischen Zeit'},
----------< Q >----------
['CITEREFQuick2009'] = {'Quick-Stations'},
['CITEREFQuick2019'] = {'Quick-stations-5'},
['CITEREFQuinn2003'] = template_names['Iranica'],
----------< R >----------
['CITEREFRaditsa1983'] = template_names['Cam_Hist_Iran'],
['CITEREFRahman1983'] = template_names['Iranica'],
['CITEREFRaja'i1987'] = template_names['Iranica'],
['CITEREFRamaer1974'] = {'Ramaer-SteamLocosEAR'},
['CITEREFRansome-Wallis1971'] = {'Ransome-Wallis 1'},
['CITEREFRateliff2007'] = template_names['ME-ref'],
['CITEREFRavegnano2000'] = {'DBI'},
['CITEREFReed1953'] = {'RCTS-LocosGWR-2'},
['CITEREFReed1975'] = {'Reed-Streamline era'},
['CITEREFReed1997'] = {'Schubert\'s compositions (references)'},
['CITEREFReinhard_Tenberg1990'] = {'BBKL'},
['CITEREFRettinghaus2020'] = {'BDh'},
['CITEREFReynolds1921'] = {'Cite Collier\'s', 'Collier\'s'},
['CITEREFReynoldsOroszi2000'] = {'Reynolds-BO'},
['CITEREFRezaHirtensteinGholami2021'] = {'Encyclopaedia Islamica'},
['CITEREFRezakhani2018'] = template_names['ODLA'],
['CITEREFRezvani2014'] = template_names['Iranica'],
['CITEREFRichter-Bernburg2003'] = template_names['Iranica'],
['CITEREFRichter2018'] = {'BDh'},
['CITEREFRigo2005'] = template_names['ODB'],
['CITEREFRipleyDana1863'] = {'New American Cyclopedia'},
['CITEREFRipleyDana1864'] = {'New American Cyclopedia'},
['CITEREFRipleyDana1879'] = {'Cite AmCyc'},
['CITEREFRistaino1988'] = {'Country study'},
['CITEREFRobert_Eitner1891'] = {'Cite ADB'},
['CITEREFRobertson1983'] = {'Robertson-OriginScot'},
['CITEREFRoe1916'] = {'Roe1916'},
['CITEREFRoe1937'] = {'Roe1937'},
['CITEREFRoemer1986'] = template_names['Cam_Hist_Iran'],
['CITEREFRoemer1989'] = template_names['Iranica'],
['CITEREFRoemer2004'] = template_names['Iranica'],
['CITEREFRolt1965'] = {'Rolt1965'},
['CITEREFRoltKichenside1982'] = {'Rolt-Red'},
['CITEREFRose1857'] = {'Cite Newgenbio'},
['CITEREFRosenfeld1974'] = template_names['NDB'],
['CITEREFRosenzweigBlackmar1992'] = {'Cite Central Park History', 'Cite Central Park history'},
['CITEREFRowledge1975'] = {'Rowledge-Engines of the LMS'},
['CITEREFRowledge1993'] = {'Rowledge-Irish Steam Register'},
['CITEREFRowlett'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowlett2007'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowlett2012'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowlett2013'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowlett2016'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowlett2017'] = {'Cite rowlett', 'Cite Rowlett'},
['CITEREFRowson1998'] = template_names['Iranica'],
['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'},
['CITEREFRussell1985'] = {'Setton-A History of the Crusades', 'Encyclopædia Iranica Online', 'Encyclopædia Iranica', 'Encyclopaedia Iranica', 'Cite Encyclopædia Iranica Online'},
['CITEREFRussell1986'] = template_names['Iranica'],
['CITEREFRussell1987'] = template_names['Iranica'],
['CITEREFRussellNorvig2003'] = {'Russell Norvig 2003'},
['CITEREFRybczynski2000'] = {'Rybczynski2000'},
['CITEREFRypka1968'] = template_names['Cam_Hist_Iran'],
----------< S >----------
['CITEREFSR_staff2013'] = {'Houston family tree'},
['CITEREFSadeghiTehrani2008'] = {'Encyclopaedia Islamica'},
['CITEREFSadıkoğlu1996'] = {'TDV Encyclopedia of Islam'},
['CITEREFSafa1987'] = template_names['Iranica'],
['CITEREFSafa1988'] = template_names['Iranica'],
['CITEREFSafa1989'] = template_names['Iranica'],
['CITEREFSafa1994'] = template_names['Iranica'],
['CITEREFSafa2003'] = template_names['Iranica'],
['CITEREFSajjadiAsatryanMelvin-Koushki'] = {'Encyclopaedia Islamica Online'},
['CITEREFSajjadiAsatryanMelvin-Koushki'] = {'Encyclopaedia Islamica'},
['CITEREFSajjadiAsatryanMelvin-Koushki2021'] = template_names['Iranica'],
['CITEREFSalbiev2021'] = template_names['Iranica'],
['CITEREFSalo2004'] = template_names['ME-ref'],
['CITEREFSamiʿiMelvin-Koushki2013'] = {'Encyclopaedia Islamica'},
['CITEREFSanders1998'] = {'The Cambridge History of Egypt', 'Cambridge History of Egypt'},
['CITEREFSanders2003'] = {'Sanders-Indiana'},
['CITEREFSanders2006'] = {'Sanders-Heartland'},
['CITEREFSanders2007'] = {'Sanders-Akron'},
['CITEREFSarikakis1974'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFSaunders2001'] = {'Saunders-Merging Lines'},
['CITEREFSaunders2013'] = {'Saunders-Giants of the Seas'},
['CITEREFSavadaShaw1992'] = {'Country study'},
['CITEREFSavoryKaramustafa1998'] = template_names['Iranica'],
['CITEREFScarce1986'] = template_names['Iranica'],
['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'},
['CITEREFSchindel2013'] = template_names['Iranica'],
['CITEREFSchippmann1986'] = template_names['Iranica'],
['CITEREFSchippmann1987'] = template_names['Iranica'],
['CITEREFSchlitter2005'] = {'MSW3 Tubulidentata'},
['CITEREFSchlumberger1983'] = template_names['Cam_Hist_Iran'],
['CITEREFSchmieder1950'] = {'Bach\'s compositions (sources)'},
['CITEREFSchmieder1990'] = {'Bach\'s compositions (sources)'},
['CITEREFSchmitt1986'] = template_names['Iranica'],
['CITEREFSchmitt1989'] = template_names['Iranica'],
['CITEREFSchmitt1993'] = template_names['Iranica'],
['CITEREFSchmitt1994'] = template_names['Iranica'],
['CITEREFSchmitt1995'] = template_names['Iranica'],
['CITEREFSchmitt2002'] = template_names['Iranica'],
['CITEREFSchmitt2004'] = template_names['Iranica'],
['CITEREFSchmitt2005'] = template_names['Iranica'],
['CITEREFSchmitt2018'] = template_names['Iranica'],
['CITEREFSchmittBailey1986'] = template_names['Iranica'],
['CITEREFSchmitz1870'] = {'Cite DGRBM'},
['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'},
['CITEREFSegal1982'] = template_names['Iranica'],
['CITEREFSellwood1983'] = template_names['Cam_Hist_Iran'],
['CITEREFSemmensGoldfinch2000'] = {'Book-Semmens-Goldfinch-How Steam Locomotives Really Work'},
['CITEREFSemsarZand2008'] = {'Encyclopaedia Islamica'},
['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'},
['CITEREFSettonHazard1975'] = {'Setton-A History of the Crusades'},
['CITEREFSfyroeras1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFShahbazi1986'] = template_names['Iranica'],
['CITEREFShahbazi1987'] = template_names['Iranica'],
['CITEREFShahbazi1988'] = template_names['Iranica'],
['CITEREFShahbazi1989'] = template_names['Iranica'],
['CITEREFShahbazi1991'] = template_names['Iranica'],
['CITEREFShahbazi1994'] = template_names['Iranica'],
['CITEREFShahbazi2002'] = template_names['Iranica'],
['CITEREFShahbazi2003'] = template_names['Iranica'],
['CITEREFShahbazi2004'] = template_names['Iranica'],
['CITEREFShahbazi2005'] = template_names['Iranica'],
['CITEREFShahbaziBosworth1990'] = template_names['Iranica'],
['CITEREFShahbaziRichter-Bernburg2002'] = template_names['Iranica'],
['CITEREFShaki1991'] = template_names['Iranica'],
['CITEREFShaughnessy1997'] = {'Shaughnessy-DH'},
['CITEREFShaw1978'] = {'Shaw-RailroadAccidents'},
['CITEREFShayegan2004'] = template_names['Iranica'],
['CITEREFShayesteh2013'] = template_names['Iranica'],
['CITEREFSheikhsofla2018'] = {'Encyclopaedia Islamica'},
['CITEREFShindo2004'] = {'Kaneto-shindo-shinario-jinsei'},
['CITEREFShoarian-SattariRezaeeNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFShoshani2005'] = {'MSW3 Shoshani'},
['CITEREFShtern2001'] = {'Springer', 'SpringerEOM'},
['CITEREFSiegele1957'] = {'Bach\'s compositions (sources)'},
['CITEREFSilanos2014'] = {'DBI', 'Dizionario Biografico degli Italiani'},
['CITEREFSilke2006'] = {'O\'Donnell family tree'},
['CITEREFSimmons2005'] = {'MSW3 Chiroptera'},
['CITEREFSimon1966'] = {'Simon-Wines Australia'},
['CITEREFSimonWarner2011'] = {'Amtrak By the Numbers'},
['CITEREFSinclair1911'] = {'DCBL'},
['CITEREFSinger1905'] = {'Jewish Encyclopedia'},
['CITEREFSix1934'] = {'Cite Six', 'Cite six'},
['CITEREFSkjærvø2018'] = template_names['ODLA'],
['CITEREFSkoulatos1980'] = {'Les personnages byzantins de l\'Alexiade'},
['CITEREFSloan1964'] = {'Sloan1964'},
['CITEREFSmith1854'] = {'Cite DGRG', 'DGRG'},
['CITEREFSmith1870'] = {'DGRBM', 'Cite DGRBM'},
['CITEREFSmith1873'] = {'DGRBM', 'Cite DGRBM'},
['CITEREFSmith1876'] = {'DGRBM', 'Cite DGRBM'},
['CITEREFSmith1880'] = {'DGRBM', 'Cite 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'],
['CITEREFSoucek1982'] = template_names['Iranica'],
['CITEREFSoucek1983'] = template_names['Iranica'],
['CITEREFSoustal1991'] = {'Tabula Imperii Byzantini'},
['CITEREFSoustalKoder1981'] = {'Tabula Imperii Byzantini'},
['CITEREFSpielhoff1991'] = {'Spielhoff-EL'},
['CITEREFSpitta1894'] = {'Bach\'s compositions (sources)'},
['CITEREFSpitta1899'] = {'Bach\'s compositions (sources)'},
['CITEREFSpringirth2016'] = {'Springirth-Philadelphia'},
['CITEREFSpuhler1986'] = template_names['Cam_Hist_Iran'],
['CITEREFSpuler1983'] = template_names['Iranica'],
['CITEREFSpuler1987'] = template_names['Iranica'],
['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'},
['CITEREFSternFishmanTilove2006'] = {'Cite New York 2000', 'Cite NY2000', 'Cite ny2000', 'Cite NY 2000', 'Cite ny 2000'},
['CITEREFSternGilmartinMassengale1983'] = {'Cite New York 1900', 'Cite NY1900'},
['CITEREFSternGilmartinMellins1987'] = {'Cite New York 1930', 'Cite NY 1930', 'Cite NY1930', 'Cite ny1930', 'Cite ny 1930'},
['CITEREFSternMellinsFishman1995'] = {'Cite New York 1960', 'Cite NY1960', 'Cite NY 1960', 'Cite ny1960', 'Cite ny 1960'},
['CITEREFSternMellinsFishman1999'] = {'Cite New York 1880', 'Cite NY1880', 'Cite NY 1880', 'Cite ny1880', 'Cite ny 1880'},
['CITEREFStewart1974'] = {'When Steam Was King'},
['CITEREFStrachey1981'] = template_names['ME-ref'],
['CITEREFStrickland1983'] = {'Strickland Locomotive Directory'},
['CITEREFStähelin1909'] = {'Schaff-Herzog'},
['CITEREFSuetin2001'] = {'Springer', 'SpringerEOM'},
['CITEREFSundermann1988'] = template_names['Iranica'],
['CITEREFSusanne_Schurr1992'] = {'BBKL'},
['CITEREFSusanne_Siebert1992'] = {'BBKL'},
['CITEREFSvolopoulos1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFSwartz1992'] = {'Swartz An Introduction to Functional Analysis'},
----------< T >----------
['CITEREFLondon_Gazette'] = {'London Gazette'},
['CITEREFTaber1977'] = {'Taber-DLW-19th'},
['CITEREFTaberTaber1980'] = {'Taber-DLW-20th-1'},
['CITEREFTaberTaber1981'] = {'Taber-DLW-20th-2'},
['CITEREFTafazzoli1999'] = template_names['Iranica'],
['CITEREFTafazzoli1999'] = {'Encyclopaedia Islamica'},
['CITEREFTafazzoli2000'] = template_names['Iranica'],
['CITEREFTalbot1991'] = template_names['ODB'],
['CITEREFTalbotKazhdan1991'] = template_names['ODB'],
['CITEREFTanındı2008'] = template_names['Iranica'],
['CITEREFTao2009'] = {'Cite Cambridge History of China'},
['CITEREFTer-Ghewondyan1976'] = {'The Arab Emirates in Bagratid Armenia'},
['CITEREFThe_London_Gazette1950'] = {'London Gazette'},
['CITEREFThe_London_Gazette_26_September_1919'] = {'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)'},
['CITEREFTougher2018'] = template_names['ODLA'],
['CITEREFToumanoff1986'] = template_names['Iranica'],
['CITEREFToumanoff2010'] = template_names['Iranica'],
['CITEREFToumanoffChaumont1987'] = template_names['Iranica'],
['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'},
['CITEREFTucker2009'] = {'Encyclopaedia Islamica'},
['CITEREFTurim1998'] = {'Turim-oshima'},
['CITEREFTuring1950'] = {'Turing 1950'},
----------< U >----------
['CITEREFUS-NHub_Music_Deposit_31_(Klavierbüchlein_für_W._F._Bach)_at_Bach_Digital'] = {'Bach\'s compositions (sources)'},
['CITEREFUtas2002'] = template_names['Iranica'],
['CITEREFUwe_Eckardt2001'] = {'BBKL'},
['CITEREFunknown_author1881'] = {'Cite ADB'},
['CITEREFunknown_author1882'] = {'Cite ADB'},
----------< V >----------
['CITEREFVakalopoulos1975'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFVan_Cleve1969'] = {'Setton-A History of the Crusades'},
['CITEREFVan_Hoorickx1971'] = {'Schubert\'s compositions (references)'},
['CITEREFVan_Hoorickx_1974–1976'] = {'Schubert\'s compositions (references)'},
['CITEREFVan_Lint2018'] = template_names['ODLA'],
['CITEREFVan_Riemsdijk,_Compound_Locomotives'] = {'Book-Van Riemsdijk-Compound Locomotives'},
['CITEREFVan_Tricht2011'] = {'The Latin Renovatio of Byzantium'},
['CITEREFVandenberghen1989'] = {'Vandenberghen-SNCB12.2'},
['CITEREFVarzos1984'] = {'Η Γενεαλογία των Κομνηνών', 'Varzos-Genealogy of the Komnenoi'},
['CITEREFVasiliev1935'] = {'Byzance et les Arabes'},
['CITEREFVasiliev1968'] = {'Byzance et les Arabes'},
['CITEREFVendler1997'] = {'Shakespeare sonnets bibliography'},
['CITEREFVenetis2012'] = template_names['Iranica'],
['CITEREFVenn1954'] = {'VennAC'},
['CITEREFVesel1999'] = template_names['Iranica'],
['CITEREFVetter1713'] = {'Bach\'s compositions (sources)'},
['CITEREFVevainaCanepa2018'] = template_names['ODLA'],
['CITEREFVeysey1958'] = {'Veysey-PE-1958'},
['CITEREFVischer1912'] = {'Schaff-Herzog'},
['CITEREFVogelsang2003'] = template_names['Iranica'],
['CITEREFVolkmer1991'] = {'Volkmer-Pennsy-Electric'},
['CITEREFvan_Leyden1956'] = {'Bach\'s compositions (sources)'},
['CITEREFvan_Lint2018'] = template_names['ODLA'],
['CITEREFvon_Prantl1879'] = {'Cite ADB'},
----------< W >----------
['CITEREFWagnerBäzoldZschechLüderitz1990'] = {'Wagner-EFA2.3.2'},
['CITEREFWalter_Asmus1966'] = template_names['NDB'],
['CITEREFWayner1972'] = {'Wayner - Car names, numbers, consists'},
['CITEREFWayner1973'] = {'Wayner-Spotter-2nd'},
['CITEREFWebb2018'] = template_names['ODLA'],
['CITEREFWeber2016'] = template_names['Iranica'],
['CITEREFWechsler1979'] = {'Cite Cambridge History of China'},
['CITEREFWegman2008'] = {'Wegman-Illustrated'},
['CITEREFWeibel1994'] = {'Weibel IHA'},
['CITEREFWeinrebHibbertKeayKeay2008'] = {'London encyclopedia'},
['CITEREFWeisbrod1991'] = {'Weisbrod-EFA1.5'},
['CITEREFWeisbrodMüllerPetznik1978'] = {'Weisbrod-EFA1.2'},
['CITEREFWeiskopf1987'] = template_names['Iranica'],
['CITEREFWeiskopf1989'] = template_names['Iranica'],
['CITEREFWeiskopf1990'] = template_names['Iranica'],
['CITEREFWeiskopf1993'] = template_names['Iranica'],
['CITEREFWellhausen1927'] = {'The Arab Kingdom and its Fall'},
['CITEREFWells1982'] = {'Accents of English'},
['CITEREFWells2008'] = {'Cite LPD'},
['CITEREFWelsh2006'] = {'Welsh-Broadway'},
['CITEREFWelsh2008'] = {'Welsh-UP'},
['CITEREFWerner_Raupp2001'] = {'BBKL'},
['CITEREFWestcott1911'] = {'DCBL'},
['CITEREFWestermayer,_Georg1882'] = {'Cite ADB'},
['CITEREFWham1997'] = {'Wham-Ayrshire'},
['CITEREFWharton1991'] = template_names['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öfer1986'] = template_names['Iranica'],
['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)'},
['CITEREFWilliams2014'] = template_names['Iranica'],
['CITEREFWillis1750'] = {'Cite Notitia Parliamentaria'},
['CITEREFWilson2017'] = {'Wilson-Guide'},
['CITEREFWilsonFiske1891'] = {'Appletons\'', 'Cite Appletons\'', 'Appletons'},
['CITEREFWilsonFiske1892'] = {'Appletons\'', 'Cite Appletons\'', 'Appletons'},
['CITEREFWilsonFiske1900'] = {'Appletons\'', 'Cite Appletons\'', 'Appletons'},
['CITEREFWiltshire2000'] = {'Lloyd-Margaret River'},
['CITEREFWinfieldLyon2004'] = {'Winfield'},
['CITEREFWinkler1883'] = template_names['ADB'],
['CITEREFWitakowski2018'] = template_names['ODLA'],
['CITEREFWolff1969'] = {'Setton-A History of the Crusades'},
['CITEREFWollny2015'] = {'Bach\'s compositions (sources)'},
['CITEREFWood1907'] = {'Cite Nuttall', 'Nuttall'},
['CITEREFWoodsKilpatrick2005'] = {'MSW3 Hystricognathi'},
['CITEREFWorden2008'] = {'Country study'},
['CITEREFWortley2010'] = {'John Skylitzes: A Synopsis of Byzantine History, 811–1057'},
['CITEREFWozencraft2005'] = {'MSW3 Carnivora'},
['CITEREFWright1979'] = {'Cite Cambridge History of China'},
['CITEREFWright2000'] = {'Bach\'s compositions (sources)'},
['CITEREFWägliJacobi2010'] = {'Schienennetz Schweiz'},
['CITEREFWürsch2013'] = template_names['Iranica'],
----------< X >----------
----------< Y >----------
['CITEREFYakubova2016'] = template_names['Iranica'],
['CITEREFYarshater1983'] = template_names['Iranica'],
['CITEREFYarshater1986'] = template_names['Cam_Hist_Iran'],
['CITEREFYarshater1988'] = template_names['Iranica'],
['CITEREFYarshater2018'] = template_names['Iranica'],
['CITEREFYarshater2021'] = template_names['Iranica'],
['CITEREFYazici2002'] = template_names['Iranica'],
['CITEREFYenne2005'] = {'Yenne-Chiefs'},
['CITEREFYildiz2004'] = template_names['Iranica'],
['CITEREFYonge1990'] = {'Quail-4'},
['CITEREFYonge1994'] = {'Quail-5'},
['CITEREFYonge2002'] = {'Quail-5'},
['CITEREFYonge2008'] = {'Quail-5'},
['CITEREFYonge2016'] = {'Quail-2-2016'},
['CITEREFYongePadgettSzwenk2013'] = {'Quail-4-Paper-3rdEd'},
['CITEREFYusofi1990'] = template_names['Iranica'],
----------< Z >----------
['CITEREFZahn1889–1893'] = {'Bach\'s compositions (sources)'},
['CITEREFZakeri2021'] = template_names['Iranica'],
['CITEREFZarrinkoubNegahban2008'] = {'Encyclopaedia Islamica'},
['CITEREFZarrinkub1975'] = template_names['Cam_Hist_Iran'],
['CITEREFZeiniWiesehöfer2018'] = template_names['ODLA'],
['CITEREFZekulich2000'] = {'Zekulich-WineWA'},
['CITEREFZimmermann2004'] = {'Zimmermann-Burlington'},
['CITEREFZimmermann2007'] = {'Zimmermann-GrandLuxe'},
['CITEREFZuccaric._1747'] = {'Bach\'s compositions (sources)'},
----------< UNSORTED >----------
['CITEREFGazette27462'] = {'London Gazette'},
['CITEREFCawley2012'] = {'Medieval Lands by Charles Cawley'},
['CITEREFCrone2003'] = {'Slaves on Horses'},
['CITEREFΙστορία_του_Ελληνικού_Έθνους'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFSpyropoulos1928'] = {'Great Military and Naval Encyclopaedia'},
['CITEREFPikros1977'] = {'Ιστορία του Ελληνικού Έθνους'},
['CITEREFÖz1993'] = {'TDV Encyclopedia of Islam'},
['CITEREFÖzgüdenli2008'] = template_names['Iranica'],
['CITEREFÖzaydın2002'] = {'TDV Encyclopedia of Islam'},
['CITEREFÖzaydın2006'] = {'TDV Encyclopedia of Islam'},
['CITEREFÖzkuyumcu2006'] = {'TDV Encyclopedia of Islam'},
['CITEREFÖztürk2013'] = {'TDV Encyclopedia of Islam'},
['CITEREFΜεγάλη_Στρατιωτικὴ_καὶ_Ναυτικὴ_Ἐγκυκλοπαιδεία'] = {'Great Military and Naval Encyclopaedia'},
['CITEREFŞeşen1988'] = {'TDV Encyclopedia of Islam'},
['CITEREFFranke1994'] = {'Cite Cambridge History of China', 'The Cambridge History of China'},
['CITEREFTao2009'] = {'Cite Cambridge History of China', 'The Cambridge History of China'},
['CITEREFWechsler1979'] = {'Cite Cambridge History of China', 'The Cambridge History of China'},
['CITEREFWright1979'] = {'Cite Cambridge History of China', 'The Cambridge History of China'},
['CITEREFHistoric_England_Benty_Grange'] = {'NHLE'},
['CITEREFWalter1967'] = {'DBI', 'Dizionario Biografico degli Italiani'},
}
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
return {
DNB_special_patterns = DNB_special_patterns,
DNB_template_names = template_names['DNB'],
special_patterns = special_patterns,
whitelist = whitelist,
wrapper_templates = wrapper_templates,
}
bf6l8v9s606i1svps8v8uxjmkt5x8x6
Module:Format link
828
69546539
1064575531
1064019022
2022-01-09T02:48:07Z
Hike395
11639
incorrect entry point
Scribunto
text/plain
--------------------------------------------------------------------------------
-- 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.
--------------------------------------------------------------------------------
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg
local mArguments -- lazily initialise [[Module:Arguments]]
local mError -- lazily initialise [[Module:Error]]
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
local function maybeItalicize(s, shouldItalicize)
-- Italicize s if s is a string and the shouldItalicize parameter is true.
if s and shouldItalicize then
return '<i>' .. s .. '</i>'
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
local function formatDisplay(parsed, options)
-- Formats a display string based on a parsed link table (matching the
-- output of parseLink) and an options table (matching the input options for
-- _formatLink).
local page = maybeItalicize(parsed.page, options.italicizePage)
local section = maybeItalicize(parsed.section, options.italicizeSection)
if (not section) then
return page
elseif (not page) then
return mw.ustring.format('§ %s', section)
else
return mw.ustring.format('%s § %s', page, section)
end
end
local function missingArgError(target)
mError = require('Module:Error')
return mError.error{message =
'Error: no link or target specified! ([[' .. target .. '#Errors|help]])'
}
end
--------------------------------------------------------------------------------
-- Main functions
--------------------------------------------------------------------------------
function p.formatLink(frame)
-- The formatLink export function, for use in templates.
yesno = require('Module:Yesno')
local args = getArgs(frame)
local link = args[1] or args.link
local target = args[3] or args.target
if not (link or target) then
return missingArgError('Template:Format link')
end
return p._formatLink{
link = link,
display = args[2] or args.display,
target = target,
italicizePage = yesno(args.italicizepage),
italicizeSection = yesno(args.italicizesection),
categorizeMissing = args.categorizemissing
}
end
function p._formatLink(options)
-- The formatLink export function, for use in modules.
checkType('_formatLink', 1, options, 'table')
local function check(key, expectedType) --for brevity
checkTypeForNamedArg(
'_formatLink', key, options[key], expectedType or 'string', true
)
end
check('link')
check('display')
check('target')
check('italicizePage', 'boolean')
check('italicizeSection', 'boolean')
check('categorizeMissing')
-- Normalize link and target and check that at least one is present
if options.link == '' then options.link = nil end
if options.target == '' then options.target = nil end
if not (options.link or options.target) then
return missingArgError('Module:Format link')
end
local parsed = parseLink(options.link)
local display = options.display or parsed.display
local catMissing = options.categorizeMissing
local category = ''
-- Find the display text
if not display then display = formatDisplay(parsed, options) end
-- Handle the target option if present
if options.target then
local parsedTarget = parseLink(options.target)
parsed.link = parsedTarget.link
parsed.page = parsedTarget.page
end
-- Test if page exists if a diagnostic category is specified
if catMissing and (mw.ustring.len(catMissing) > 0) then
local title = nil
if parsed.page then title = mw.title.new(parsed.page) end
if title and (not title.isExternal) and (not title.exists) then
category = mw.ustring.format('[[Category:%s]]', catMissing)
end
end
-- Format the result as a link
if parsed.link == display then
return mw.ustring.format('[[:%s]]%s', parsed.link, category)
else
return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category)
end
end
--------------------------------------------------------------------------------
-- Derived convenience functions
--------------------------------------------------------------------------------
function p.formatPages(options, pages)
-- Formats an array of pages using formatLink and the given options table,
-- and returns it as an array. Nil values are not allowed.
local ret = {}
for i, page in ipairs(pages) do
ret[i] = p._formatLink{
link = page,
categorizeMissing = options.categorizeMissing,
italicizePage = options.italicizePage,
italicizeSection = options.italicizeSection
}
end
return ret
end
return p
kqzzmt53imtxeq4z2wtd8gb4aoahnkl
Module:GetParameters
828
59375011
1048695890
1001657385
2021-10-07T13:22:34Z
Andrybak
23735172
drop misleading comment copy-pasted from [[Module:String]]
Scribunto
text/plain
local p = {}
--[[
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 p.getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,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 interpret boolean strings
]]
function p.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
function p.defined(frame)
local arg = mw.text.trim(frame.args[1])
--if arg == tostring(tonumber(arg)) then -- undesired result for '-0'
-- arg = tonumber(arg)
--end
--if mw.ustring.find(arg, '^%s*-?[1-9][0-9]*%s*$') ~= nil or arg == '0' then
-- arg = tonumber(arg)
--end
if mw.ustring.find(arg, '^-?[1-9][0-9]*$') ~= nil then
arg = tonumber(arg)
elseif arg == '0' then
arg = 0
end
return frame:getParent().args[arg] ~= nil
end
return p
03tz719zcckyx3el16h6xmmjd2dn09v
Module:Hatnote
828
42498502
1091749839
1063743122
2022-06-06T04:14:36Z
Nihiltres
236191
Fix for fragile conditional
Scribunto
text/plain
--------------------------------------------------------------------------------
-- 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 formatLink -- lazily initialise [[Module:Format link]] ._formatLink
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local curNs = mw.title.getCurrentTitle().namespace
p.missingTargetCat =
--Default missing target category, exported for use in related modules
((curNs == 0) or (curNs == 14)) and
'Articles with hatnote templates targeting a nonexistent page' or nil
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.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 = mw.ustring.format(
'[[%s:%s]]',
mw.site.namespaces[14].name,
category
)
else
category = ''
end
return mw.ustring.format(
'<strong class="error">Error: %s%s.</strong>%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 mw.ustring.format('%s (%s)', page, disambiguator)
end
--------------------------------------------------------------------------------
-- Hatnote
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
--------------------------------------------------------------------------------
function p.hatnote(frame)
local args = getArgs(frame)
local s = args[1]
if not s then
return p.makeWikitextError(
'no text specified',
'Template:Hatnote#Errors',
args.category
)
end
return p._hatnote(s, {
extraclasses = args.extraclasses,
selfref = args.selfref
})
end
function p._hatnote(s, options)
checkType('_hatnote', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local inline = options.inline
local hatnote = mw.html.create(inline == 1 and 'span' or 'div')
local extraclasses
if type(options.extraclasses) == 'string' then
extraclasses = options.extraclasses
end
hatnote
:attr('role', 'note')
:addClass(inline == 1 and 'hatnote-inline' or 'hatnote')
:addClass('navigation-not-searchable')
:addClass(extraclasses)
:addClass(options.selfref and 'selfref' or nil)
:wikitext(s)
return mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' }
} .. tostring(hatnote)
end
return p
3lp0p77brxpfdg1fgn1qvov8zvyjqlw
Module:Hatnote/styles.css
828
61325919
1033289096
1033184688
2021-07-12T19:22:27Z
Izno
2927383
per my talk page
sanitized-css
text/css
/* {{pp|small=y}} */
.hatnote {
font-style: italic;
}
/* Limit structure CSS to divs because of [[Module:Hatnote inline]] */
div.hatnote {
/* @noflip */
padding-left: 1.6em;
margin-bottom: 0.5em;
}
.hatnote i {
font-style: normal;
}
/* The templatestyles element inserts a link element before hatnotes.
* TODO: Remove link if/when WMF resolves T200206 */
.hatnote + link + .hatnote {
margin-top: -0.5em;
}
7znvdfdw9mn3ta8a2ioyp35gizwnv4c
Module:Hatnote list
828
50085079
1062173192
1062166786
2021-12-26T20:05:24Z
Nihiltres
236191
Undid revision 1062166786 by [[Special:Contributions/Matthiaspaul|Matthiaspaul]] ([[User talk:Matthiaspaul|talk]]); should be fixed now, and if not, please ping me with examples as I couldn't reproduce the original error
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Module:Hatnote list --
-- --
-- This module produces and formats lists for use in hatnotes. In particular, --
-- it implements the for-see list, i.e. lists of "For X, see Y" statements, --
-- as used in {{about}}, {{redirect}}, and their variants. Also introduced --
-- are andList & orList helpers for formatting lists with those conjunctions. --
--------------------------------------------------------------------------------
local mArguments --initialize lazily
local mFormatLink = require('Module:Format link')
local mHatnote = require('Module:Hatnote')
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
--------------------------------------------------------------------------------
-- List stringification helper functions
--
-- These functions are used for stringifying lists, usually page lists inside
-- the "Y" portion of "For X, see Y" for-see items.
--------------------------------------------------------------------------------
--default options table used across the list stringification functions
local stringifyListDefaultOptions = {
conjunction = "and",
separator = ",",
altSeparator = ";",
space = " ",
formatted = false
}
--Searches display text only
local function searchDisp(haystack, needle)
return string.find(
string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle
)
end
-- Stringifies a list generically; probably shouldn't be used directly
local function stringifyList(list, options)
-- Type-checks, defaults, and a shortcut
checkType("stringifyList", 1, list, "table")
if #list == 0 then return nil end
checkType("stringifyList", 2, options, "table", true)
options = options or {}
for k, v in pairs(stringifyListDefaultOptions) do
if options[k] == nil then options[k] = v end
end
local s = options.space
-- Format the list if requested
if options.formatted then
list = mFormatLink.formatPages(
{categorizeMissing = mHatnote.missingTargetCat}, list
)
end
-- Set the separator; if any item contains it, use the alternate separator
local separator = options.separator
for k, v in pairs(list) do
if searchDisp(v, separator) then
separator = options.altSeparator
break
end
end
-- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§"
local conjunction = s .. options.conjunction .. s
if #list == 2 and searchDisp(list[1], "§") or #list > 2 then
conjunction = separator .. conjunction
end
-- Return the formatted string
return mw.text.listToText(list, separator .. s, conjunction)
end
--DRY function
function p.conjList (conj, list, fmt)
return stringifyList(list, {conjunction = conj, formatted = fmt})
end
-- Stringifies lists with "and" or "or"
function p.andList (...) return p.conjList("and", ...) end
function p.orList (...) return p.conjList("or", ...) end
--------------------------------------------------------------------------------
-- For see
--
-- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the
-- {{about}} and {{redirect}} templates and their variants.
--------------------------------------------------------------------------------
--default options table used across the forSee family of functions
local forSeeDefaultOptions = {
andKeyword = 'and',
title = mw.title.getCurrentTitle().text,
otherText = 'other uses',
forSeeForm = 'For %s, see %s.',
}
--Collapses duplicate punctuation
local function punctuationCollapse (text)
local replacements = {
["%.%.$"] = ".",
["%?%.$"] = "?",
["%!%.$"] = "!",
["%.%]%]%.$"] = ".]]",
["%?%]%]%.$"] = "?]]",
["%!%]%]%.$"] = "!]]"
}
for k, v in pairs(replacements) do text = string.gsub(text, k, v) end
return text
end
-- Structures arguments into a table for stringification, & options
function p.forSeeArgsToTable (args, from, options)
-- Type-checks and defaults
checkType("forSeeArgsToTable", 1, args, 'table')
checkType("forSeeArgsToTable", 2, from, 'number', true)
from = from or 1
checkType("forSeeArgsToTable", 3, options, 'table', true)
options = options or {}
for k, v in pairs(forSeeDefaultOptions) do
if options[k] == nil then options[k] = v end
end
-- maxArg's gotten manually because getArgs() and table.maxn aren't friends
local maxArg = 0
for k, v in pairs(args) do
if type(k) == 'number' and k > maxArg then maxArg = k end
end
-- Structure the data out from the parameter list:
-- * forTable is the wrapper table, with forRow rows
-- * Rows are tables of a "use" string & a "pages" table of pagename strings
-- * Blanks are left empty for defaulting elsewhere, but can terminate list
local forTable = {}
local i = from
local terminated = false
-- If there is extra text, and no arguments are given, give nil value
-- to not produce default of "For other uses, see foo (disambiguation)"
if options.extratext and i > maxArg then return nil end
-- Loop to generate rows
repeat
-- New empty row
local forRow = {}
-- On blank use, assume list's ended & break at end of this loop
forRow.use = args[i]
if not args[i] then terminated = true end
-- New empty list of pages
forRow.pages = {}
-- Insert first pages item if present
table.insert(forRow.pages, args[i + 1])
-- If the param after next is "and", do inner loop to collect params
-- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3}
while args[i + 2] == options.andKeyword do
if args[i + 3] then
table.insert(forRow.pages, args[i + 3])
end
-- Increment to next "and"
i = i + 2
end
-- Increment to next use
i = i + 2
-- Append the row
table.insert(forTable, forRow)
until terminated or i > maxArg
return forTable
end
-- Stringifies a table as formatted by forSeeArgsToTable
function p.forSeeTableToString (forSeeTable, options)
-- Type-checks and defaults
checkType("forSeeTableToString", 1, forSeeTable, "table", true)
checkType("forSeeTableToString", 2, options, "table", true)
options = options or {}
for k, v in pairs(forSeeDefaultOptions) do
if options[k] == nil then options[k] = v end
end
-- Stringify each for-see item into a list
local strList = {}
if forSeeTable then
for k, v in pairs(forSeeTable) do
local useStr = v.use or options.otherText
local pagesStr =
p.andList(v.pages, true) or
mFormatLink._formatLink{
categorizeMissing = mHatnote.missingTargetCat,
link = mHatnote.disambiguate(options.title)
}
local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr)
forSeeStr = punctuationCollapse(forSeeStr)
table.insert(strList, forSeeStr)
end
end
if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end
-- Return the concatenated list
return table.concat(strList, ' ')
end
-- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps
-- but not blank/whitespace values. Ignores named args and args < "from".
function p._forSee (args, from, options)
local forSeeTable = p.forSeeArgsToTable(args, from, options)
return p.forSeeTableToString(forSeeTable, options)
end
-- As _forSee, but uses the frame.
function p.forSee (frame, from, options)
mArguments = require('Module:Arguments')
return p._forSee(mArguments.getArgs(frame), from, options)
end
return p
octqbcvqrobtndgnn8u78tg2tsemf14
Module:Icon
828
45181164
1071452463
1065849124
2022-02-12T18:06:28Z
Hike395
11639
auto detect calls from sandbox
Scribunto
text/plain
-- This module implements [[Template:Icon]].
require("Module:No globals")
local yesNo = require("Module:Yesno")
local getArgs = require("Module:Arguments").getArgs
local getPlain = nil
local p = {}
-- Determine whether we're being called from a sandbox
local sandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true) and '/sandbox' or ''
-- Implements [[Template:Icon]]
-- Returns the icon image corresponding to a string (like 'B')
function p._main(args, data)
local data_module = 'Module:Icon/data'..sandbox
data = data or mw.loadData(data_module)
local code = args.class or args[1]
local iconData
if code then
code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case
iconData = data[code]
end
if not iconData then
iconData = data._DEFAULT
end
return string.format(
'[[File:%s%s%s|%s|class=noviewer|alt=%s]]',
iconData.image,
iconData.tooltip and '|' .. iconData.tooltip or '',
iconData.link == false and '|link=' or '',
args.size or '16x16px',
iconData.alt or ''
)
end
-- Implements [[Template:Icon link]], a superset of [[Template:Icon]]
-- Returns an icon, plus a suitably formatted wikilink
function p._link(args, data)
args.size = args.size or args.iconsize
local icon = p._main(args, data)
-- If no link given in args[2], default back to [[Template:Icon]]
if not args[2] then
return icon
end
-- Strip wiki markup out of link
getPlain = getPlain or require("Module:Text").Text().getPlain
local link = getPlain(args[2])
local display = args[3] or args[2]
-- italicize display string, if requested
if yesNo(args.i) or yesNo(args.italic) or yesNo(args.italics) then
display = '<i>'..display..'</i>'
end
-- if display is link, just use standard wlink
if link == display then
return icon..' [['..link..']]'
end
return icon..' [['..link..'|'..display..']]'
end
function p.main(frame)
local args = getArgs(frame,{parentFirst=true})
return p._main(args)
end
function p.link(frame)
local args = getArgs(frame,{parentFirst=true})
return p._link(args)
end
return p
oedy9ta9fav8cqa69xr16gkuaqylbz1
Module:Icon/data
828
45181103
1093143076
1059465581
2022-06-14T20:47:26Z
Paine Ellsworth
9092818
per edit request on talk page - include image for Picture of the Day
Scribunto
text/plain
-- This module stores icon data for [[Module:Icon]].
--------------------------------------------------------------------------------
-- Icon data
--------------------------------------------------------------------------------
local data = {
fa = {
image = "Featured article star.svg",
tooltip = "Featured article",
link = true,
},
far = {
image = "Cscr-star piece.png",
tooltip = "Featured article review",
link = true,
},
farc = {
image = "Cscr-star piece.png",
tooltip = "Featured article removal candidate",
link = true,
},
ffa = {
aliases = {"dfa"},
image = "Featured article star - cross.svg",
tooltip = "Former featured article",
link = true,
},
fac = {
aliases = {"fan"},
image = "Cscr-candidate.svg",
tooltip = "Featured article candidate",
link = true,
},
ffac = {
aliases = {"nofa"},
image = "Featured article star - cross.svg",
tooltip = "Failed featured article candidate",
link = true,
},
fl = {
image = "Featured article star.svg",
tooltip = "Featured list",
link = true,
},
flrc = {
aliases = {"flr"},
image = "Cscr-star piece.png",
tooltip = "Featured list removal candidate",
link = true,
},
ffl = {
aliases = {"dfl"},
image = "Cscr-featured-strike.svg",
tooltip = "Former featured list",
link = true,
},
flc = {
aliases = {"fln"},
image = "Cscr-candidate.svg",
tooltip = "Featured list candidate",
link = true,
},
fflc = {
aliases = {"nofl"},
image = "Cscr-former.svg",
tooltip = "Failed featured list candidate",
link = true,
},
a = {
image = "Symbol a class.svg",
tooltip = "A-Class article",
link = true,
},
dac = {
aliases = {"daa"},
image = "Symbol unsupport A vote.svg",
tooltip = "Demoted A-Class article",
link = true,
},
acc = {
aliases = {"acn", "aac"},
image = "A candidate.svg",
tooltip = "A-Class article candidate",
link = true,
},
noac = {
aliases = {"faac"},
image = "Symbol unsupport A vote.svg",
tooltip = "Failed A-Class article candidate",
link = true,
},
ga = {
image = "Symbol support vote.svg",
tooltip = "Good article",
link = false,
},
gar = {
image = "GA Candidate Neutral vote(ChaosNil).svg",
tooltip = "Good article reassessment",
link = false,
},
dga = {
image = "Symbol unsupport vote.svg",
tooltip = "Delisted good article",
link = false,
},
gan = {
aliases = {"gac"},
image = "GA candidate.svg",
tooltip = "Good article nominee",
link = false,
},
ga2 = {
image = "Symbol neutral vote.svg",
tooltip = "Good article, 2nd opinion",
link = false,
},
gah = {
image = "Symbol wait.svg",
tooltip = "Good article on hold",
link = false,
},
fgan = {
aliases = {"noga", "gaf", "gf"},
image = "Symbol oppose vote.svg",
tooltip = "Failed good article nominee",
link = false,
},
fp = {
image = "Cscr-featured.svg",
tooltip = "Featured picture",
link = true,
},
fpc = {
aliases = {"fpn"},
image = "Cscr-candidate.svg",
tooltip = "Featured picture candidate",
link = true,
},
ffp = {
image = "Cscr-former.svg",
tooltip = "Former featured picture",
link = true,
},
vp = {
image = "ENWP VP Logo.svg",
tooltip = "Valued picture",
link = true,
},
vpc = {
image = "Valued pics 1.svg",
tooltip = "Valued picture candidate",
link = true,
},
fs = {
image = "Cscr-featured.svg",
tooltip = "Featured sound",
link = true,
},
ffs = {
image = "Cscr-former.svg",
tooltip = "Former featured sound",
link = true,
},
fsc = {
image = "Cscr-candidate.svg",
tooltip = "Featured sound candidate",
link = true,
},
fpo = {
image = "Linecons big-star.svg",
tooltip = "Before the featured portal process ceased in 2017, this had been designated as a featured portal.",
link = true,
},
fpor = {
image = "Cscr-star piece.png",
tooltip = "Featured portal review",
link = true,
},
ffpo = {
image = "Featured article star - cross.svg",
tooltip = "Former featured portal",
link = true,
},
fpoc = {
image = "Cscr-candidate.svg",
tooltip = "Featured portal candidate",
link = true,
},
ft = {
image = "Cscr-featuredtopic.svg",
tooltip = "Featured topic",
link = true,
},
ftrc = {
image = "Cscr-star piece.png",
tooltip = "Featured topic removal candidate",
link = true,
},
fft = {
aliases = {"dft"},
image = "DFT candidate_cluster.svg",
tooltip = "Former featured topic",
link = true,
},
ftc = {
aliases = {"ftn"},
image = "FT candidate cluster.svg",
tooltip = "Featured topic candidate",
link = false,
},
gt = {
image = "Support cluster.svg",
tooltip = "Good topic",
link = false,
},
gtrc = {
image = "Symbol unsupport vote.svg",
tooltip = "Good topic removal candidate",
link = false,
},
gtc = {
aliases = {"gtn"},
image = "GA candidate cluster.svg",
tooltip = "Good topic candidate",
link = false,
},
bplus = {
aliases = {"b+"},
image = "Symbol bplus class.svg",
tooltip = "Bplus-Class article",
link = true,
},
b = {
image = "Symbol b class.svg",
tooltip = "B-Class article",
link = true,
},
br = {
aliases = {"bcr"},
image = "Bclass-checklist.svg",
tooltip = "B-Class review",
link = true,
},
c = {
image = "Symbol c class.svg",
tooltip = "C-Class article",
link = true,
},
start = {
image = "Symbol start class.svg",
tooltip = "Start-Class article",
link = true,
},
stub = {
image = "Symbol stub class.svg",
tooltip = "Stub-Class article",
link = true,
},
list = {
aliases = {"comparison"},
image = "Symbol list class.svg",
tooltip = "List-Class article",
link = false,
},
no = {
image = "Crystal button cancel.svg",
tooltip = "Unknown-Class article",
link = true,
},
book = {
image = "Symbol book class2.svg",
tooltip = "Wikipedia book",
link = true,
},
category = {
aliases = {"cat", "categ"},
image = "Symbol category class.svg",
tooltip = "Category",
link = false,
},
disambiguation = {
aliases = {"dab", "disamb", "disambig"},
image = "Symbol dab class.svg",
tooltip = "Disambiguation page",
link = true,
},
image = {
aliases = {"file"},
image = "Symbol file class.svg",
tooltip = "File",
link = true,
},
needed = {
image = "Symbol needed class.svg",
tooltip = "Needed article",
link = false,
},
outline = {
image = "Global thinking.svg",
tooltip = "Outline",
link = false,
},
portal = {
image = "Symbol portal class.svg",
tooltip = "Portal",
link = true,
},
project = {
image = "Symbol project class.svg",
tooltip = "Project page",
link = false,
},
redirect = {
aliases = {"red", "redir"},
image = "Symbol redirect vote2.svg",
tooltip = "Redirect",
link = true,
},
template = {
aliases = {"temp", "templ"},
image = "Symbol template class.svg",
tooltip = "Template",
link = false,
},
essay = {
image = "Essay.svg",
tooltip = "Essay",
link = false,
},
na = {
image = "Symbol na class.svg",
tooltip = "Non-article page",
link = true,
},
aa = {
image = "Yes check.svg",
tooltip = "Audited article of limited subject matter",
link = false,
},
da = {
image = "Symbol oppose vote.svg",
tooltip = "Demoted article",
link = false,
},
dyk = {
image = "Symbol question.svg",
tooltip = "Did You Know?",
link = false,
},
dyk2 = {
image = "DYK questionmark icon.svg",
tooltip = "Did You Know?",
link = false,
},
pr = {
image = "Nuvola apps kedit.png",
tooltip = "Peer review",
link = true,
},
ppr = {
image = "Nuvola apps kedit.png",
tooltip = "Portal peer review",
link = true,
},
q = {
aliases = {"question"},
image = "Symbol question.svg",
tooltip = "Question",
link = false,
},
cleanup = {
image = "Edit-clear.svg",
tooltip = "Cleanup work",
link = false,
},
qi = {
image = "Quality images logo.svg",
tooltip = "Quality image on Wikimedia Commons",
link = false,
},
vi = {
image = "Valued image seal.svg",
tooltip = "Valued image on Wikimedia Commons",
link = false,
},
tfa = {
image = "Wikipedia-logo.svg",
tooltip = "Today's Featured Article",
link = true,
},
tfl = {
image = "Wikipedia-logo.svg",
tooltip = "Today's Featured List",
link = true,
},
itn = {
image = "Globe current.svg",
tooltip = "In The News",
link = true,
},
otd = {
image = "Nuvola apps date.svg",
tooltip = "On This Day",
link = true,
},
wikiproject = {
image = "People icon.svg",
tooltip = "WikiProject",
link = false,
},
goce = {
image = "Writing Magnifying.PNG",
tooltip = "Guild of Copy Editors",
link = true,
},
wikipedia = {
image = "Wikipedia-logo.svg",
tooltip = "Wikipedia page",
link = true,
},
commons = {
image = "Commons-logo.svg",
tooltip = "Commons page",
link = false,
},
wikiquote = {
image = "Wikiquote-logo.svg",
tooltip = "Wikiquote page",
link = false,
},
wikiversity = {
image = "Wikiversity logo 2017.svg",
tooltip = "Wikiversity page",
link = true,
},
wikibooks = {
image = "Wikibooks-logo.svg",
tooltip = "Wikibooks page",
link = true,
},
wikisource = {
image = "Wikisource-logo.svg",
tooltip = "Wikisource page",
link = true,
},
wiktionary = {
image = "Wiktionary-logo.svg",
tooltip = "Wiktionary page",
link = true,
},
wikinews = {
image = "Wikinews-logo.svg",
tooltip = "Wikinews page",
link = true,
},
wikispecies = {
image = "Wikispecies-logo.svg",
tooltip = "Wikispecies page",
link = true,
},
wikidata = {
image = "Wikidata-logo.svg",
tooltip = "Wikidata page",
link = false,
},
wikivoyage = {
image = "Wikivoyage-logo.svg",
tooltip = "Wikivoyage page",
link = true,
},
meta = {
image = "Wikimedia Community Logo.svg",
tooltip = "Meta-wiki page",
link = false,
},
four = {
image = "Four Award.svg",
tooltip = "Four Award",
link = false,
},
million = {
image = "Million award logo.svg",
tooltip = "Million Award",
link = true,
},
module = {
image = "Lua-logo-nolabel.svg",
tooltip = "Module",
link = false,
},
vital = {
image = "Círculos_Concéntricos.svg",
tooltip = "Vital article",
link = false,
},
potd = {
image = "Wikipedia-logo.svg",
tooltip = "Picture of the Day",
link = true,
},
_DEFAULT = {
image = "Symbol question.svg",
link = false,
}
}
--------------------------------------------------------------------------------
-- End icon data
--------------------------------------------------------------------------------
-- Make aliases work the same as normal keys, and remove the "aliases" subtables.
local ret= {}
for code, iconData in pairs(data) do
iconData.canonicalCode = code
if iconData.aliases then
for _, alias in ipairs(iconData.aliases) do
ret[alias] = iconData
end
iconData.aliases = nil
end
ret[code] = iconData
end
return ret
9ov9rtyq71ttl18igrgngo1btnp2h1o
Module:In lang
828
57138483
1062010108
1059934060
2021-12-25T16:14:34Z
Trappist the monk
10289486
Scribunto
text/plain
require ('Module:No globals');
--[[--------------------------< _ I N _ L A N G >--------------------------------------------------------------
implements {{in lang}}
Module entry point from another module
|link=yes - creates wikilinked language names
|template=<template name> - customizes error messages created by Module:lang
|list-cats=yes - documentation tool returns language-category names of cats populated by this template
<span class="languageicon">(in <language>)</span>
]]
local function _in_lang (args)
local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code
local list_cats = 'yes' == args['list-cats']; -- make a boolean
local list = {};
local cats = {};
local maint_msgs = {};
if not args[1] then
local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template)
return table.concat ({'<span style=\"color:#d33\">error: ', template, 'missing language tag</span>'});
end
local module = 'Module:Lang' .. (mw.getCurrentFrame():getTitle():match ('/sandbox') or ''); -- if this module is the sandbox,
local name_from_tag = require (module)._name_from_tag; -- use Module:Lang/sandbox; Module:Lang else
local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization
local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language code
for i, lang in ipairs (args) do
local code = args[i]:lower();
local t = {code, ['link'] = args['link'], ['template'] = args['template']}; -- build an 'args' table
lang = name_from_tag (t) -- get the language name
table.insert (list, lang) -- add this language or error message to the list
if not ({['ca-valencia'] = true, ['gsw-fr'] = true, ['pt-br'] = true})[code] then -- except for these exact IETF tags; TODO: a better way/place to do this?
code = code:match ('^%a%a%a?%f[^%a]'); -- strip off region, script, and variant tags so that they aren't used to make category names
end
if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym
if (0 == namespace) and not list_cats then -- when listing cats don't include this cat; TODO: right choice?
table.insert (cats, table.concat ({'[[Category:Lang and lang-xx code promoted to ISO 639-1|', code ..']]'}));
end
table.insert (maint_msgs, ' <span class="lang-comment" style="font-style:normal; display:none; color:#33aa33; margin-left:0.3em">')
table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]}));
table.insert (maint_msgs, '</span>;');
code = synonym_table[code]; -- use the synonym
end
if (0 == namespace) or list_cats then -- when in article space
if lang:find ('[Ee]rror') then -- add error category (message provided by Module:Lang)
if not list_cats then -- don't include this cat when listing cats; TODO: right choice?
table.insert (cats, '[[Category:in lang template errors]]');
end
elseif this_wiki_lang ~= code then -- categorize article only when code is not this wiki's language code
if lang:match ('%[%[.-|.-%]%]') then -- wikilinked individual language name
lang = lang:match ('%[%[.-|(.-)%]%]');
elseif lang:match ('%[%[.-%]%]') then -- wikilinked collective languages name
lang = lang:match ('%[%[(.-)%]%]');
end -- neither of these then plain-text language name
if lang:find ('languages') then -- add appropriate language-name category
table.insert (cats, table.concat ({'[[Category:Articles with ', lang, '-collective sources (', code, ')]]'}));
else
table.insert (cats, table.concat ({'[[Category:Articles with ', lang, '-language sources (', code, ')]]'}));
end
end
end
end
if list_cats then
local cats = table.concat (cats, ', '):gsub ('[%[%]]', ''); -- make a string of categories and then strip wikilink markup
return cats
end
local result = {'<span class="languageicon">('}; -- opening span and (
table.insert (result, 'yes' == args['cap'] and 'In ' or 'in '); -- add capitalized or uncapitalized 'in'
table.insert (result, mw.text.listToText (list, ', ', (2 < #list) and ', and ' or ' and ' )); -- and concatenate the language list
table.insert (result, ')</span>'); -- add closing ) and closing span
table.insert (result, table.concat (maint_msgs) or ''); -- add maint messages, if any
table.insert (result, table.concat (cats)); -- add categories
return table.concat (result); -- make a big string and done
end
--[[--------------------------< I N _ L A N G >----------------------------------------------------------------
implements {{in lang}}
Module entry point from an {{#invoke:lang/utilities/sanbox|in_lang|<code>|<code2>|<code3>|<code...>|link=yes|template=in lang|list-cats=yes}}
]]
local function in_lang (frame)
local args = require ('Module:Arguments').getArgs (frame);
return _in_lang (args);
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
in_lang = in_lang, -- module entry from {{#invoke:}}
_in_lang = _in_lang, -- module entry from another module
}
a6fuxq2ab54nahsafebn37ekx1bqu6z
Module:Infobox
828
38808424
1055523885
1055523835
2021-11-16T10:29:48Z
Fayenatic london
1639942
spacing
Scribunto
text/plain
local p = {}
local args = {}
local origArgs = {}
local root
local empty_row_categories = {}
local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]'
local has_rows = false
local function fixChildBoxes(sval, tt)
local function notempty( s ) return s and s:match( '%S' ) end
if notempty(sval) then
local marker = '<span class=special_infobox_marker>'
local s = sval
-- start moving templatestyles and categories inside of table rows
local slast = ''
while slast ~= s do
slast = s
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1')
end
-- end moving templatestyles and categories inside of table rows
s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1')
s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%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, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1')
s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%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*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%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] .. '</' .. tt .. '></tr>'
elseif k == #subcells then
local rowstyle = ' style="display:none"'
if notempty(subcells[k]) then rowstyle = '' end
s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' ..
subcells[k]
elseif notempty(subcells[k]) then
if (k % 2) == 0 then
s = s .. subcells[k]
else
s = s .. '<tr><' .. tt .. ' colspan=2>\n' ..
subcells[k] .. '</' .. tt .. '></tr>'
end
end
end
end
-- the next two lines add a newline at the end of lists for the PHP parser
-- [[Special:Diff/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
-- Cleans empty tables
local function cleanInfobox()
root = tostring(root)
if has_rows == false then
root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '')
end
end
-- Returns the union of the values of two tables, as a sequence.
local function union(t1, t2)
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
-- 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 function getArgNums(prefix)
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
-- Adds a row to the infobox, with either a header cell
-- or a label/data cell combination.
local function addRow(rowArgs)
if rowArgs.header and rowArgs.header ~= '_BLANK_' then
has_rows = true
root
:tag('tr')
:addClass(rowArgs.rowclass)
:cssText(rowArgs.rowstyle)
:tag('th')
:attr('colspan', '2')
:addClass('infobox-header')
:addClass(rowArgs.class)
:addClass(args.headerclass)
-- @deprecated next; target .infobox-<name> .infobox-header
:cssText(args.headerstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
if rowArgs.data then
root:wikitext(
'[[Category:Pages using infobox templates with ignored data cells]]'
)
end
elseif rowArgs.data and rowArgs.data:gsub(
category_in_empty_row_pattern, ''
):match('^%S') then
has_rows = true
local row = root:tag('tr')
row:addClass(rowArgs.rowclass)
row:cssText(rowArgs.rowstyle)
if rowArgs.label then
row
:tag('th')
:attr('scope', 'row')
:addClass('infobox-label')
-- @deprecated next; target .infobox-<name> .infobox-label
:cssText(args.labelstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(rowArgs.label)
:done()
end
local dataCell = row:tag('td')
dataCell
:attr('colspan', not rowArgs.label and '2' or nil)
:addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data')
:addClass(rowArgs.class)
-- @deprecated next; target .infobox-<name> .infobox(-full)-data
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
else
table.insert(empty_row_categories, rowArgs.data or '')
end
end
local function renderTitle()
if not args.title then return end
has_rows = true
root
:tag('caption')
:addClass('infobox-title')
:addClass(args.titleclass)
-- @deprecated next; target .infobox-<name> .infobox-title
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
has_rows = true
root
:tag('tr')
:tag('th')
:attr('colspan', '2')
:addClass('infobox-above')
:addClass(args.aboveclass)
-- @deprecated next; target .infobox-<name> .infobox-above
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
has_rows = true
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass('infobox-below')
:addClass(args.belowclass)
-- @deprecated next; target .infobox-<name> .infobox-below
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function addSubheaderRow(subheaderArgs)
if subheaderArgs.data and
subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then
has_rows = true
local row = root:tag('tr')
row:addClass(subheaderArgs.rowclass)
local dataCell = row:tag('td')
dataCell
:attr('colspan', '2')
:addClass('infobox-subheader')
:addClass(subheaderArgs.class)
:cssText(subheaderArgs.datastyle)
:cssText(subheaderArgs.rowcellstyle)
:wikitext(fixChildBoxes(subheaderArgs.data, 'td'))
else
table.insert(empty_row_categories, subheaderArgs.data or '')
end
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
addSubheaderRow({
data = args['subheader' .. tostring(num)],
-- @deprecated next; target .infobox-<name> .infobox-subheader
datastyle = args.subheaderstyle,
rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
end
local function addImageRow(imageArgs)
if imageArgs.data and
imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then
has_rows = true
local row = root:tag('tr')
row:addClass(imageArgs.rowclass)
local dataCell = row:tag('td')
dataCell
:attr('colspan', '2')
:addClass('infobox-image')
:addClass(imageArgs.class)
:cssText(imageArgs.datastyle)
:wikitext(fixChildBoxes(imageArgs.data, 'td'))
else
table.insert(empty_row_categories, imageArgs.data or '')
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')
:addClass('infobox-caption')
-- @deprecated next; target .infobox-<name> .infobox-caption
:cssText(args.captionstyle)
:wikitext(caption)
end
addImageRow({
data = tostring(data),
-- @deprecated next; target .infobox-<name> .infobox-image
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
end
-- When autoheaders are turned on, preprocesses the rows
local function preprocessRows()
if not args.autoheaders then return end
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(
category_in_empty_row_pattern, ''
):match('^%S') then
local data = args['data' .. tostring(num)]
if data:gsub(category_in_empty_row_pattern, ''):match('%S') then
lastheader = nil
end
end
end
if lastheader then
args['header' .. tostring(lastheader)] = nil
end
end
-- Gets the union of the header and data argument numbers,
-- and renders them all in order
local function renderRows()
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)],
-- @deprecated next; target .infobox-<name> rowclass
rowstyle = args['rowstyle' .. tostring(num)],
rowcellstyle = args['rowcellstyle' .. tostring(num)]
})
end
end
local function renderNavBar()
if not args.name then return end
has_rows = true
root
:tag('tr')
:tag('td')
:attr('colspan', '2')
:addClass('infobox-navbar')
:wikitext(require('Module:Navbar')._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
-- Categories in otherwise empty rows are collected in empty_row_categories.
-- This function adds them to the module output. It is not affected by
-- args.decat because this module should not prevent module-external categories
-- from rendering.
local function renderEmptyRowCategories()
for _, s in ipairs(empty_row_categories) do
root:wikitext(s)
end
end
-- Render tracking categories. args.decat == turns off tracking categories.
local function renderTrackingCategories()
if args.decat == 'yes' then return end
if args.child == 'yes' then
if args.title then
root:wikitext(
'[[Category:Pages using embedded infobox templates with the title parameter]]'
)
end
elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
root:wikitext('[[Category:Articles using infobox templates with no data rows]]')
end
end
--[=[
Loads the templatestyles for the infobox.
TODO: FINISH loading base templatestyles here rather than in
MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables.
See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :).
When we do this we should clean up the inline CSS below too.
Will have to do some bizarre conversion category like with sidebar.
]=]
local function loadTemplateStyles()
local frame = mw.getCurrentFrame()
-- See function description
local base_templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' }
}
local templatestyles = ''
if args['templatestyles'] then templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = args['templatestyles'] }
}
end
local child_templatestyles = ''
if args['child templatestyles'] then child_templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = args['child templatestyles'] }
}
end
local grandchild_templatestyles = ''
if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = args['grandchild templatestyles'] }
}
end
return table.concat({
base_templatestyles, -- see function description
templatestyles,
child_templatestyles,
grandchild_templatestyles
})
end
-- common functions between the child and non child cases
local function structure_infobox_common()
renderSubheaders()
renderImages()
preprocessRows()
renderRows()
renderBelowRow()
renderNavBar()
renderItalicTitle()
renderEmptyRowCategories()
renderTrackingCategories()
cleanInfobox()
end
-- Specify the overall layout of the infobox, with special settings if the
-- infobox is used as a 'child' inside another infobox.
local function _infobox()
if args.child ~= 'yes' then
root = mw.html.create('table')
root
:addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox')
:addClass(args.bodyclass)
-- @deprecated next; target .infobox-<name>
:cssText(args.bodystyle)
renderTitle()
renderAboveRow()
else
root = mw.html.create()
root
:wikitext(args.title)
end
structure_infobox_common()
return loadTemplateStyles() .. root
end
-- 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.
local function preprocessSingleArg(argName)
if origArgs[argName] and origArgs[argName] ~= '' then
args[argName] = origArgs[argName]
end
end
-- 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.
local function preprocessArgs(prefixTable, step)
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
-- Do another loop if any arguments are found, even blank ones.
moreArgumentsExist = true
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
-- 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.
local function parseDataParameters()
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'}
}, 50)
preprocessSingleArg('headerclass')
preprocessSingleArg('headerstyle')
preprocessSingleArg('labelstyle')
preprocessSingleArg('datastyle')
preprocessSingleArg('below')
preprocessSingleArg('belowclass')
preprocessSingleArg('belowstyle')
preprocessSingleArg('name')
-- different behaviour for italics if blank or absent
args['italic title'] = origArgs['italic title']
preprocessSingleArg('decat')
preprocessSingleArg('templatestyles')
preprocessSingleArg('child templatestyles')
preprocessSingleArg('grandchild templatestyles')
end
-- If called via #invoke, use the args passed into the invoking template.
-- Otherwise, for testing purposes, assume args are being passed directly in.
function p.infobox(frame)
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
parseDataParameters()
return _infobox()
end
-- For calling via #invoke within a template
function p.infoboxTemplate(frame)
origArgs = {}
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end
parseDataParameters()
return _infobox()
end
return p
0nrwbmsjupox6pg5hh6nvlk9r7dcw81
Module:Infobox/styles.css
828
68912159
1066479718
1063604326
2022-01-18T15:18:00Z
Jdlrobson
15999850
Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]]
sanitized-css
text/css
/* {{pp|small=y}} */
/*
* This TemplateStyles sheet deliberately does NOT include the full set of
* infobox styles. We are still working to migrate all of the manual
* infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]]
* DO NOT ADD THEM HERE
*/
/*
* not strictly certain these styles are necessary since the modules now
* exclusively output infobox-subbox or infobox, not both
* just replicating the module faithfully
*/
.infobox-subbox {
padding: 0;
border: none;
margin: -3px;
width: auto;
min-width: 100%;
font-size: 100%;
clear: none;
float: none;
background-color: transparent;
}
.infobox-3cols-child {
margin: auto;
}
.infobox .navbar {
font-size: 100%;
}
/* T281642 */
body.skin-minerva .infobox-header,
body.skin-minerva .infobox-subheader,
body.skin-minerva .infobox-above,
body.skin-minerva .infobox-title,
body.skin-minerva .infobox-image,
body.skin-minerva .infobox-full-data,
body.skin-minerva .infobox-below {
text-align: center;
}
r79dlpm7l4hm8tdp6d2jr4blcsyis2v
Module:InfoboxImage
828
38581924
1076941680
1053736536
2022-03-13T19:18:18Z
WOSlinker
3138265
add class param from sandbox as per edit request
Scribunto
text/plain
-- Inputs:
-- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link
-- page - page to display for multipage images (DjVu)
-- size - size to display the image
-- maxsize - maximum size for image
-- sizedefault - default size to display the image if size param is blank
-- alt - alt text for image
-- title - title text for image
-- border - set to yes if border
-- center - set to yes, if the image has to be centered
-- upright - upright image param
-- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it
-- link - page to visit when clicking on image
-- class - HTML classes to add to the image
-- Outputs:
-- Formatted image.
-- More details available at the "Module:InfoboxImage/doc" page
local i = {};
local placeholder_image = {
"Blue - Replace this image female.svg",
"Blue - Replace this image male.svg",
"Female no free image yet.png",
"Flag of None (square).svg",
"Flag of None.svg",
"Flag of.svg",
"Green - Replace this image female.svg",
"Green - Replace this image male.svg",
"Image is needed female.svg",
"Image is needed male.svg",
"Location map of None.svg",
"Male no free image yet.png",
"Missing flag.png",
"No flag.svg",
"No free portrait.svg",
"No portrait (female).svg",
"No portrait (male).svg",
"Red - Replace this image female.svg",
"Red - Replace this image male.svg",
"Replace this image female (blue).svg",
"Replace this image female.svg",
"Replace this image male (blue).svg",
"Replace this image male.svg",
"Silver - Replace this image female.svg",
"Silver - Replace this image male.svg",
"Replace this image.svg",
"Cricket no pic.png",
"CarersLogo.gif",
"Diagram Needed.svg",
"Example.jpg",
"Image placeholder.png",
"No male portrait.svg",
"Nocover-upload.png",
"NoDVDcover copy.png",
"Noribbon.svg",
"No portrait-BFD-test.svg",
"Placeholder barnstar ribbon.png",
"Project Trains no image.png",
"Image-request.png",
"Sin bandera.svg",
"Sin escudo.svg",
"Replace this image - temple.png",
"Replace this image butterfly.png",
"Replace this image.svg",
"Replace this image1.svg",
"Resolution angle.png",
"Image-No portrait-text-BFD-test.svg",
"Insert image here.svg",
"No image available.png",
"NO IMAGE YET square.png",
"NO IMAGE YET.png",
"No Photo Available.svg",
"No Screenshot.svg",
"No-image-available.jpg",
"Null.png",
"PictureNeeded.gif",
"Place holder.jpg",
"Unbenannt.JPG",
"UploadACopyrightFreeImage.svg",
"UploadAnImage.gif",
"UploadAnImage.svg",
"UploadAnImageShort.svg",
"CarersLogo.gif",
"Diagram Needed.svg",
"No male portrait.svg",
"NoDVDcover copy.png",
"Placeholder barnstar ribbon.png",
"Project Trains no image.png",
"Image-request.png",
"Noimage.gif",
}
function i.IsPlaceholder(image)
-- change underscores to spaces
image = mw.ustring.gsub(image, "_", " ");
assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil')
-- if image starts with [[ then remove that and anything after |
if mw.ustring.sub(image,1,2) == "[[" then
image = mw.ustring.sub(image,3);
image = mw.ustring.gsub(image, "([^|]*)|.*", "%1");
assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil')
end
-- Trim spaces
image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');
assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil")
-- remove prefix if exists
local allNames = mw.site.namespaces[6].aliases
allNames[#allNames + 1] = mw.site.namespaces[6].name
allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName
for i, name in ipairs(allNames) do
if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then
image = mw.ustring.sub(image, mw.ustring.len(name) + 2);
break
end
end
-- Trim spaces
image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');
-- capitalise first letter
image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2);
for i,j in pairs(placeholder_image) do
if image == j then
return true
end
end
return false
end
function i.InfoboxImage(frame)
local image = frame.args["image"];
if image == "" or image == nil then
return "";
end
if image == " " then
return image;
end
if frame.args["suppressplaceholder"] ~= "no" then
if i.IsPlaceholder(image) == true then
return "";
end
end
if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then
return "";
end
if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then
return "";
end
if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then
return "";
end
if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then
return "";
end
if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then
return "";
end
if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then
return "";
end
if mw.ustring.sub(image,1,2) == "[[" then
-- search for thumbnail images and add to tracking cat if found
local cat = "";
if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then
cat = "[[Category:Pages using infoboxes with thumbnail images]]";
end
return image .. cat;
elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then
return image;
elseif mw.ustring.sub(image,1,1) == "<" then
return image;
elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then
-- Found strip marker at begining, so pass don't process at all
return image;
elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then
-- Found strip marker at begining, so pass don't process at all
return image;
else
local result = "";
local page = frame.args["page"];
local size = frame.args["size"];
local maxsize = frame.args["maxsize"];
local sizedefault = frame.args["sizedefault"];
local alt = frame.args["alt"];
local link = frame.args["link"];
local title = frame.args["title"];
local border = frame.args["border"];
local upright = frame.args["upright"] or "";
local thumbtime = frame.args["thumbtime"] or "";
local center = frame.args["center"];
local class = frame.args["class"];
-- remove prefix if exists
local allNames = mw.site.namespaces[6].aliases
allNames[#allNames + 1] = mw.site.namespaces[6].name
allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName
for i, name in ipairs(allNames) do
if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then
image = mw.ustring.sub(image, mw.ustring.len(name) + 2);
break
end
end
if maxsize ~= "" and maxsize ~= nil then
-- if no sizedefault then set to maxsize
if sizedefault == "" or sizedefault == nil then
sizedefault = maxsize
end
-- check to see if size bigger than maxsize
if size ~= "" and size ~= nil then
local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0;
local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0;
if sizenumber>maxsizenumber and maxsizenumber>0 then
size = maxsize;
end
end
end
-- add px to size if just a number
if (tonumber(size) or 0) > 0 then
size = size .. "px";
end
-- add px to sizedefault if just a number
if (tonumber(sizedefault) or 0) > 0 then
sizedefault = sizedefault .. "px";
end
result = "[[File:" .. image;
if page ~= "" and page ~= nil then
result = result .. "|page=" .. page;
end
if size ~= "" and size ~= nil then
result = result .. "|" .. size;
elseif sizedefault ~= "" and sizedefault ~= nil then
result = result .. "|" .. sizedefault;
else
result = result .. "|frameless";
end
if center == "yes" then
result = result .. "|center"
end
if alt ~= "" and alt ~= nil then
result = result .. "|alt=" .. alt;
end
if link ~= "" and link ~= nil then
result = result .. "|link=" .. link;
end
if border == "yes" then
result = result .. "|border";
end
if upright == "yes" then
result = result .. "|upright";
elseif upright ~= "" then
result = result .. "|upright=" .. upright;
end
if thumbtime ~= "" then
result = result .. "|thumbtime=" .. thumbtime;
end
if class ~= nil and class ~= "" then
result = result .. "|class=" .. class;
end
-- if alt value is a keyword then do not use as a description
if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then
alt = nil;
end
if title ~= "" and title ~= nil then
-- does title param contain any templatestyles? If yes then set to blank.
if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then
title = nil;
end
end
if title ~= "" and title ~= nil then
result = result .. "|" .. title;
end
result = result .. "]]";
return result;
end
end
return i;
1qnfhbaitrn7lf4l4ypjcfzdf5a9lxe
Module:Labelled list hatnote
828
50971703
1092226360
1091675163
2022-06-08T23:33:35Z
Nihiltres
236191
Fixed iteration-and-removal bug
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Labelled list --
-- --
-- This module does the core work of creating a hatnote composed of a list --
-- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", --
-- for {{see also}} and similar templates. --
--------------------------------------------------------------------------------
local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mArguments --initialize lazily
local yesno --initialize lazily
local p = {}
-- Defaults global to this module
local defaults = {
label = 'See also', --Final fallback for label argument
labelForm = '%s: %s',
prefixes = {'label', 'label ', 'l'},
template = 'Module:Labelled list hatnote'
}
-- Localizable message strings
local msg = {
errorSuffix = '#Errors',
noInputWarning = 'no page names specified',
noOutputWarning =
"'''[[%s]] — no output: none of the target pages exist.'''"
}
-- Helper function that pre-combines display parameters into page arguments.
-- Also compresses sparse arrays, as a desirable side-effect.
function p.preprocessDisplays (args, prefixes)
-- Prefixes specify which parameters, in order, to check for display options
-- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1'
prefixes = prefixes or defaults.prefixes
local indices = {}
local sparsePages = {}
for k, v in pairs(args) do
if type(k) == 'number' then
indices[#indices + 1] = k
local display
for i = 1, #prefixes do
display = args[prefixes[i] .. k]
if display then break end
end
sparsePages[k] = display and
string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v
end
end
table.sort(indices)
local pages = {}
for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end
return pages
end
--Helper function to get a page target from a processed page string
--e.g. "Page|Label" → "Page" or "Target" → "Target"
local function getTarget(pagename)
local pipe = string.find(pagename, '|')
return string.sub(pagename, 0, pipe and pipe - 1 or nil)
end
-- Produces a labelled pages-list hatnote.
-- The main frame (template definition) takes 1 or 2 arguments, for a singular
-- and (optionally) plural label respectively:
-- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}}
-- The resulting template takes pagename & label parameters normally.
function p.labelledList (frame)
mArguments = require('Module:Arguments')
yesno = require('Module:Yesno')
local labels = {frame.args[1] or defaults.label}
labels[2] = frame.args[2] or labels[1]
labels[3] = frame.args[3] --no defaulting
labels[4] = frame.args[4] --no defaulting
local template = frame:getParent():getTitle()
local args = mArguments.getArgs(frame, {parentOnly = true})
local pages = p.preprocessDisplays(args)
local options = {
category = yesno(args.category),
extraclasses = frame.args.extraclasses,
ifexists = yesno(frame.args.ifexists),
namespace = frame.args.namespace or args.namespace,
selfref = yesno(frame.args.selfref or args.selfref),
template = template
}
return p._labelledList(pages, labels, options)
end
function p._labelledList (pages, labels, options)
if options.ifexists then
for k = #pages, 1, -1 do --iterate backwards to allow smooth removals
local v = pages[k]
local title = mw.title.new(getTarget(v), namespace)
if (v == '') or title == nil or not title.exists then
table.remove(pages, k)
end
end
end
labels = labels or {}
label = (#pages == 1 and labels[1] or labels[2]) or defaults.label
for k, v in pairs(pages) do
if mHatnote.findNamespaceId(v) ~= 0 then
label =
(
#pages == 1 and
(labels[3] or labels[1] or defaults.label) or
(labels[4] or labels[2] or defaults.label)
) or defaults.label
end
end
if #pages == 0 then
if options.ifexists then
mw.addWarning(
string.format(
msg.noOutputWarning, options.template or defaults.template
)
)
return ''
else
return mHatnote.makeWikitextError(
msg.noInputWarning,
(options.template or defaults.template) .. msg.errorSuffix,
options.category
)
end
end
local text = string.format(
options.labelForm or defaults.labelForm,
label,
mHatlist.andList(pages, true)
)
local hnOptions = {
extraclasses = options.extraclasses,
selfref = options.selfref
}
return mHatnote._hatnote(text, hnOptions)
end
return p
lgbn92zoszcjkbsmuwkrn9f0fvft89t
Module:Lang
828
55674518
1066529445
1063178193
2022-01-18T20:20:12Z
Trappist the monk
10289486
[[Template talk:Lang#Lang and title param]]
Scribunto
text/plain
--[=[
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 content_lang = mw.language.getContentLanguage();
local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag
local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction
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
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
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
--[[--------------------------< I N V E R T _ I T A L I C S >-------------------------------------------------
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[^\']", '''); -- 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
--[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------
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 > 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
--[=[--------------------------< V A L I D A T E _ C A T _ A R G S >----------------------------------------------------------
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
--[[--------------------------< I N _ A R R A Y >--------------------------------------------------------------
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
--[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------
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
--[[--------------------------< G E T _ I E T F _ P A R T S >--------------------------------------------------
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 -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0
if variant_table[variant]['prefixes'][1] and 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
--[[--------------------------< M A K E _ E R R O R _ M S G >--------------------------------------------------
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 ({'<span style=\"color:#d33\">Error: {{', template, '}}: '}));
table.insert (out, msg);
table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'}));
table.insert (out, '</span>');
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
--[=[-------------------------< M A K E _ W I K I L I N K >----------------------------------------------------
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
--[[--------------------------< D I V _ M A R K U P _ A D D >--------------------------------------------------
adds <i> and </i> tags to list-item text or to implied <p>..</p> 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 text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- 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]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences)
else
text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p
text = text:gsub ('\n', ''); -- strip newline characters
end
end
return text;
end
--[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------
makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where
<title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in
html markup. This because the lang= attibute applies to the content of its enclosing tag.
<tag> holds a string 'div' or 'span' used to choose the correct wrapping tag
]]
local function title_wrapper_make (title_text, content_text, tag)
local wrapper_t = {};
table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag
table.insert (wrapper_t, ' title=\"'); -- begin title attribute
table.insert (wrapper_t, title_text); -- add <title_text>
table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag
table.insert (wrapper_t, content_text); -- add <content_text>
table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag
return table.concat (wrapper_t); -- make a big string and done
end
--[[--------------------------< M A K E _ T E X T _ H T M L >--------------------------------------------------
Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or
<div> tags for block content
The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish
language text' is English:
<i lang="es" title="Spanish language text">casa</i>
should be:
<span title="Spanish language text"><i lang="es">casa</i></span>
or for <div>...</div>:
<div title="Spanish language text"><div lang="es"><spanish-language-text></div></div>
]]
local function make_text_html (code, text, tag, rtl, style, size, language)
local html_t = {};
local style_added = '';
local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div
if text:match ('^%*') then
table.insert (html_t, '*'); -- 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 <i> tags
end
else -- must be div so go
text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i>
end
table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag
code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia
table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute
if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki
table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages
elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki
table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages
end
if 'normal' == style then -- when |italic=no
table.insert (html_t, ' 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=<something>
if is_set (style_added) then
table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted
else
table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute
style_added = '\"'; -- remember that style attribute added and is not yet closed
end
end
table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag
table.insert (html_t, text); -- insert the text
table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag
if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div
local title_text;
if 'zxx' == code then -- special case for this tag 'no linguistic content'
title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text
elseif mw.ustring.find (language, 'languages', 1, true) then
title_text = table.concat ({language, ' collective text'}); -- for collective languages
else
title_text = table.concat ({language, '-language text'}); -- for individual languages
end
return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag);
else
return table.concat (html_t);
end
end
--[=[-------------------------< M A K E _ C A T E G O R Y >----------------------------------------------------
For individual language, <language>, returns:
[[Category:Articles containing <language>-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 <language> 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 mw.ustring.find (language_name, 'languages', 1, true) then
return table.concat ({'[[Category:Articles with text in ', language_name, ']]'});
end
table.insert (cat, '[[Category:Articles containing ');
if this_wiki_lang_tag == code then
table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language
else
table.insert (cat, language_name);
end
table.insert (cat, '-language text]]');
return table.concat (cat);
end
--[[--------------------------< M A K E _ T R A N S L I T >----------------------------------------------------
return translit <i lang=xx-Latn>...</i> 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 out_t = {};
local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards
local title_text = ''; -- tool tip text for title= attribute
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
title_text = language_name; -- write a generic tool tip
if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name)
title_text = title_text .. '-language'; -- skip this text (individual and macro languages only)
end
title_text = title_text .. ' 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_t[std] then -- and if standard is legitimate
if title_t[std][tscript] then -- and if script for that standard is legitimate
if script_table[tscript] then
title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip
else
title_text = title_text .. title_t[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
title_text = title_text .. title_t[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_t[std] then return ''; end -- invalid standard, setup for error message
if title_t[std][code] then -- if language code is in the table (transl may not provide a language code)
title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip
else -- code doesn't match
title_text = title_text .. title_t[std]['default']; -- so use the standard's default
end
else -- here if translit-script set but translit-std not set
if title_t['no_std'][tscript] then
title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set
elseif title_t['no_std'][code] then
title_text = title_text .. title_t['no_std'][code]; -- use language code
else
if is_set (tscript) then
title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip
elseif is_set (code) then
if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name)
title_text = title_text .. '-language'; -- skip this text (individual and macro languages only)
end
title_text = title_text .. ' transliteration'; -- finish the tool tip
else
title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?)
end
end
end
local close_tag;
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 (out_t, "<i lang=\""); -- so use <i> tag
close_tag = '</i>'; -- tag to be used when closing
else
table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it
close_tag = '</span>'; -- tag to be used when closing
end
table.insert (out_t, code);
table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script
else
table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transl}} only)
close_tag = '</span>';
end
table.insert (out_t, translit); -- add the translit text
table.insert (out_t, close_tag); -- and add the appropriate </i> or </span>
if '' == title_text then -- when there is no need for a tool-tip
return table.concat (out_t); -- make a string and done
else
return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don
end
end
--[[--------------------------< V A L I D A T E _ T E X T >----------------------------------------------------
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
--[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------
render mainenance messages and categories
]]
local function render_maint(nocat)
local maint = {};
if 0 < #maint_msgs then -- when there are maintenance messages
table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag
for _, msg in ipairs (maint_msgs) do
table.insert (maint, table.concat ({msg, ' '})); -- add message strings
end
table.insert (maint, '</span>'); -- close the span
end
if (0 < #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
--[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------
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
--[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------
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
--[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------
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 <p>..</p> 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 <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because
the stripmarker is replaced with text wrapped in <div>..</div> 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
--[[--------------------------< V A L I D A T E _ P R O T O >--------------------------------------------------
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
--[[--------------------------< L A N G U A G E _ N A M E _ G E T >--------------------------------------------
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];
elseif override_table[code] then -- not there so try basic language tag
name = override_table[code];
elseif lang_table[code] then -- shift to iana active tag/name table
name = lang_table[code];
elseif lang_dep_table[code] then -- try the iana deprecated tag/name table
name = lang_dep_table[code];
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
--[[--------------------------< _ L A N G >--------------------------------------------------------------------
entry point for {{lang}}
there should be no reason to set parameters in the {{lang}} {{#invoke:}}
<includeonly>{{#invoke:lang|lang}}</includeonly>
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' -> true, other values -> 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_tag ~= 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
--[[--------------------------< L A N G >----------------------------------------------------------------------
entry point for {{lang}}
there should be no reason to set parameters in the {{lang}} {{#invoke:}}
<includeonly>{{#invoke:lang|lang}}</includeonly>
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
--[[--------------------------< L A N G _ X X >----------------------------------------------------------------
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:
<includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly>
For italic style:
<includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly>
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' -> true, other values -> 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:<initial_style_state>
end
else
args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state>
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 mw.ustring.find (language_name, 'languages', 1, true) 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], 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, ('none' == args.label) and language_name or 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, '<small>');
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']];
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, ' </small>'); -- 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, '<small>');
if 'no' == args.link then
table.insert (out, '<abbr title="literal translation">lit.</abbr>');
else
table.insert (out, make_wikilink ('Literal translation', 'lit.'));
end
table.insert (out, " </small>");
end
table.insert (out, table.concat ({''', args.translation, '''})); -- 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
--[[--------------------------< L A N G _ X X _ A R G S _ G E T >----------------------------------------------
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
--[[--------------------------< L A N G _ X X _ I T A L I C >--------------------------------------------------
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
--[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------
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
--[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------
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
--[[--------------------------< _ L A N G _ X X _ I N H E R I T >----------------------------------------------
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
--[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------
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
--[[--------------------------< I S _ I E T F _ T A G >--------------------------------------------------------
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; also get parent frame
end
--[[--------------------------< I S _ I E T F _ T A G _ F R A M E >--------------------------------------------
Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent
(template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag>
is in the parent frame.
]]
local function is_ietf_tag_frame (frame)
return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame
end
--[[--------------------------< _ N A M E _ F R O M _ T A G >--------------------------------------------------
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 ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'});
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 mw.ustring.find (language_name, 'languages', 1, true) 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], 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
--[[--------------------------< N A M E _ F R O M _ T A G >----------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}}
return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame
end
--[[--------------------------< _ T A G _ F R O M _ N A M E >--------------------------------------------------
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 ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'});
end
--[[--------------------------< T A G _ F R O M _ N A M E >----------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}}
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
--[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------
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
--[[--------------------------< _ T R A N S L >----------------------------------------------------------------
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; -- transliterated 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 is 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];
elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables?
language_name = lang_table[args.code];
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];
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];
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
--[[--------------------------< T R A N S L >------------------------------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function transl (frame)
return _transl (getArgs(frame));
end
--[[--------------------------< C A T E G O R Y _ F R O M _ T A G >--------------------------------------------
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_t)
local subtags = {}; -- IETF subtags script, region, variant, and private
local raw_code = args_t[1]; -- save a copy of the input IETF subtag
local link = 'yes' == args_t.link; -- make a boolean
local label = args_t.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_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template)
return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'});
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 ('[%[%]]', '');
if link then
return table.concat ({'[[:', category_name, ']]'});
else
return category_name;
end
end
--[[--------------------------< C A T E G O R Y _ F R O M _ T A G >--------------------------------------------
Module entry point from an {{#invoke:}}
]]
local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}}
return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
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_ietf_tag_frame = is_ietf_tag_frame,
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,
};
mgev3ftqak0bv4awxcdz8bst4qxm16t
Module:Lang/ISO 639 synonyms
828
56040973
815286590
815266850
2017-12-13T23:10:47Z
Trappist the monk
10289486
Scribunto
text/plain
-- 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"
}
shzq5qyzo42nqfska6amwdq4g8lois9
Module:Lang/data
828
55691537
1070239132
1070147591
2022-02-06T12:46:45Z
Trappist the monk
10289486
Scribunto
text/plain
local lang_obj = mw.language.getContentLanguage();
local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag
--[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------
primary table of tables that decode:
lang -> language tags and names
script -> ISO 15924 script tags
region -> ISO 3166 region tags
variant -> iana registered variant tags
suppressed -> 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.
]]
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 and suppressed 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_t = {
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
}
--[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >--------------------------------
For internationalization; not used at en.wiki
The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal.
Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names
in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki
language list for the local language.
Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all.
When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens
add an appropriate entry to the override table below.
Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the
MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply
spelling differences:
bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho
bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym
dv: IANA: Dhivehi MW: Divehi
el: IANA: Modern Greek MW: Greek
ht: IANA: Haitian MW: Haitian Creole
ky: IANA: Kirghiz MW: Kyrgyz
li: IANA: Limburgan MW: Limburgish
or: IANA: Oriya MW: Odia
os: IANA: Ossetian MW: Ossetic
"pa: IANA: Panjabi MW: Punjabi
"ps: IANA: Pushto MW: Pashto
"to: IANA: Tonga MW: Tongan
"ug: IANA: Uighur MW: Uyghur
use the override table to override language names that are incorrect for your project
To see the list of names that MediaWiki has for your language, enter this in the Debug colsole:
=mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all'))
(replacing <tag> with the language tag for your language)
Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true.
]]
local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki
-- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all
if true == media_wiki_override_enable then
local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki
for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list
if lang_name_table_t.lang[tag] then -- if the tag is in the main list
lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki
end
end
end
--[[--------------------------< O V E R R I D E >--------------------------------------------------------------
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 = {
------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------
["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
["nl-be"] = "Flemish", -- match MediaWiki
["oc-provenc"] = "Provençal",
["ps"] = "Pashto", -- Pushto
["pt-br"] = "Brazilian Portuguese", -- match MediaWiki
["tw-asante"] = "Asante Twi",
-- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
["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
--<end do-not-edit except to comment out>--
------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >----------------------------------------------
["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash)
["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
["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title
["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash)
["frr"] = "North Frisian", -- Northern Frisian
["frs"] = "East Frisian Low Saxon", -- Eastern Frisian
["gsw-fr"] = "Alsatian", -- match MediaWiki
["haa"] = "Hän", -- Han; to match en.wiki article title
["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash)
["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title
["jam"] = "Jamaican Patois", -- Jamaican Creole English
["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo
["mhr"] = "Meadow Mari", -- Eastern Mari
["mid"] = "Modern Mandaic", -- Mandaic
['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope;
["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash)
["mla"] = "Tamambo", -- Malo
['mte'] = "Mono-Alu", -- Mono (Solomon Islands)
['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope;
["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title
["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title
["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash)
["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title
["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text
["nrf-gg"] = "Guernésiais", -- match MediaWiki
["nrf-je"] = "Jèrriais", -- match MediaWiki
["nzi"] = "Nzema", -- Nzima; to match en.wiki article title
["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash)
["orv"] = "Old East Slavic", -- Old Russian
["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article
["pie"] = "Piro Pueblo", -- Piro; 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()
["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article
["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title
["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
["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title
["zxx"] = "no linguistic content", -- capitalization
-- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages
--<begin do-not-edit except to comment out>--
["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, Classical Nepal Bhasa, Old 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
--<end do-not-edit except to comment out>--
------------------------------< P R I V A T E _ U S E _ T A G S >----------------------------------------------
["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages
["cel-x-proto"] = "Proto-Celtic", -- cel in IANA is Celtic languages
["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages
["gmw-x-ecg"] = "East Central German",
["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
["ine-x-proto"] = "Proto-Indo-European",
["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
["la-x-medieval"] = "Medieval Latin",
["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages
["sem-x-proto"] = "Proto-Semitic",
["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",
}
--[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------
for those rare occasions when article titles don't fit with the normal '<language name>-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
}
--[=[-------------------------< R T L _ S C R I P T S >--------------------------------------------------------
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',
};
--[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------
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',
},
['mlcts'] = {
['default'] = 'Myanmar Language Commission Transcription System',
},
['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',
},
['scientific'] = {
['default'] = 'scientific transliteration',
},
['ukrainian'] = {
['default'] = 'Ukrainian National system of romanization',
},
['ungegn'] = {
['default'] = 'United Nations Group of Experts on Geographical Names transliteration',
},
['wadegile'] = {
['default'] = 'Wade–Giles transliteration',
},
['wehr'] = {
['default'] = 'Hans Wehr transliteration',
},
};
return
{
this_wiki_lang_tag = this_wiki_lang_tag,
this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction
article_name = article_name,
lang_name_table = lang_name_table_t,
override = override,
rtl_scripts = rtl_scripts,
special_tags_table = special_tags_table,
translit_title_table = translit_title_table,
};
gcytnpe6x2x7bs1mj7bzccelzc10um7
Module:Language/data/iana languages
828
42493523
1075027454
1064553935
2022-03-03T13:58:01Z
Trappist the monk
10289486
update to 2022-03-02 data;
Scribunto
text/plain
-- File-Date: 2022-03-02
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"},
["ajs"] = {"Algerian Jewish Sign Language"},
["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"},
["aqk"] = {"Aninka"},
["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"},
["bid"] = {"Bidiyo"},
["bie"] = {"Bepour"},
["bif"] = {"Biafada"},
["big"] = {"Biangai"},
["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"},
["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"},
["bpc"] = {"Mbuk"},
["bpd"] = {"Banda-Banda"},
["bpe"] = {"Bauni"},
["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"] = {"Brao", "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"},
["cnq"] = {"Chung"},
["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"},
["csx"] = {"Cambodian Sign Language"},
["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"},
["cty"] = {"Moundadan Chetty"},
["ctz"] = {"Zacatepec Chatino"},
["cua"] = {"Cua"},
["cub"] = {"Cubeo"},
["cuc"] = {"Usila Chinantec"},
["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"},
["dkg"] = {"Kadung"},
["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"},
["dsz"] = {"Mardin Sign Language"},
["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"},
["egm"] = {"Benamanga"},
["ego"] = {"Eggon"},
["egx"] = {"Egyptian languages"},
["egy"] = {"Egyptian (Ancient)"},
["ehs"] = {"Miyakubo Sign Language"},
["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á"},
["emq"] = {"Eastern Minyag"},
["ems"] = {"Pacific Gulf Yupik"},
["emu"] = {"Eastern Muria"},
["emw"] = {"Emplawas"},
["emx"] = {"Erromintxela"},
["emy"] = {"Epigraphic Mayan"},
["emz"] = {"Mbessa"},
["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 (Edo 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", "Meänkieli"},
["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"},
["gii"] = {"Girirra"},
["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"},
["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"},
["glb"] = {"Belning"},
["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"},
["gov"] = {"Goo"},
["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"},
["gyz"] = {"Geji", "Gyaazi"},
["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"},
["hkh"] = {"Khah", "Poguli"},
["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"},
["imt"] = {"Imotong"},
["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"},
["jbm"] = {"Bijim"},
["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 (Kaduna State)"},
["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)"},
["jks"] = {"Amami Koniya Sign Language"},
["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"] = {"Jakattoe"},
["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-Bale Suri"},
["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)"},
["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"},
["lgo"] = {"Lango (South Sudan)"},
["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"},
["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"},
["lqr"] = {"Logir"},
["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"},
["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"},
["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"},
["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"},
["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"},
["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"},
["lxm"] = {"Lakurumau"},
["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)"},
["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"},
["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"},
["nqt"] = {"Nteng"},
["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"},
["nww"] = {"Ndwewe"},
["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"},
["ocm"] = {"Old Cham"},
["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"},
["oie"] = {"Okolie"},
["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"},
["okc"] = {"Kobo"},
["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)"},
["okz"] = {"Old Khmer"},
["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"},
["omy"] = {"Old Malay"},
["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"},
["osn"] = {"Old Sundanese"},
["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"},
["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"},
["phj"] = {"Pahari"},
["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"},
["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"] = {"Pangu", "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"] = {"Iranian Sign Language", "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"},
["pzh"] = {"Pazeh"},
["pzn"] = {"Jejara Naga", "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)"},
["rib"] = {"Bribri Sign Language"},
["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"},
["rnb"] = {"Brunca Sign Language"},
["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"},
["rsk"] = {"Ruthenian", "Rusyn"},
["rsl"] = {"Russian Sign Language"},
["rsm"] = {"Miriwoong Sign Language"},
["rsn"] = {"Rwandan 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"},
["rwl"] = {"Ruwila"},
["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"},
["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"},
["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"},
["sqx"] = {"Kufr Qassem Sign Language (KQSL)"},
["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"},
["suo"] = {"Bouni"},
["suq"] = {"Tirmaga-Chai Suri", "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"},
["tok"] = {"Toki Pona"},
["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"] = {"Sediq", "Seediq", "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"},
["tyy"] = {"Tiyaa"},
["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"},
["ugh"] = {"Kubachi"},
["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"},
["uni"] = {"Uni"},
["unk"] = {"Enawené-Nawé"},
["unm"] = {"Unami"},
["unn"] = {"Kurnai"},
["unr"] = {"Mundari"},
["unu"] = {"Unubahe"},
["unx"] = {"Munda"},
["unz"] = {"Unde Kaili"},
["uon"] = {"Kulon"},
["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"},
["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"},
["vkj"] = {"Kujarge"},
["vkk"] = {"Kaur"},
["vkl"] = {"Kulisusu"},
["vkm"] = {"Kamakan"},
["vkn"] = {"Koro Nulu"},
["vko"] = {"Kodeoha"},
["vkp"] = {"Korlai Creole Portuguese"},
["vkt"] = {"Tenggarong Kutai Malay"},
["vku"] = {"Kurrama"},
["vkz"] = {"Koro Zuba"},
["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"] = {"Wamesa", "Wondama"},
["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"},
["wdt"] = {"Wendat"},
["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"},
["wmg"] = {"Western Minyag"},
["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"},
["wrb"] = {"Waluwarra", "Warluwara"},
["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"},
["wyb"] = {"Wangaaybuwan-Ngiyambaa"},
["wyi"] = {"Woiwurrung"},
["wym"] = {"Wymysorys"},
["wyn"] = {"Wyandot"},
["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"},
["xdq"] = {"Kaitag"},
["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"},
["xhm"] = {"Middle Khmer (1400 to 1850 CE)"},
["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"] = {"Kachok", "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"] = {"Salawati", "Maden"},
["xmy"] = {"Mayaguduna"},
["xmz"] = {"Mori Bawah"},
["xna"] = {"Ancient North Arabian"},
["xnb"] = {"Kanakanabu"},
["xnd"] = {"Na-Dene languages"},
["xng"] = {"Middle Mongolian"},
["xnh"] = {"Kuanhua"},
["xni"] = {"Ngarigu"},
["xnj"] = {"Ngoni (Tanzania)"},
["xnk"] = {"Nganakarti"},
["xnm"] = {"Ngumbarl"},
["xnn"] = {"Northern Kankanay"},
["xno"] = {"Anglo-Norman"},
["xnq"] = {"Ngoni (Mozambique)"},
["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"},
["ysm"] = {"Myanmar 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"},
["zbu"] = {"Bu (Bauchi State)"},
["zbw"] = {"West Berawan"},
["zca"] = {"Coatecas Altas Zapotec"},
["zcd"] = {"Las Delicias 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"},
["zla"] = {"Zula"},
["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"},
["ajt"] = {"Judeo-Tunisian Arabic"},
["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"},
["bic"] = {"Bikaru"},
["bij"] = {"Vaghat-Ya-Bijim-Legeri"},
["bjd"] = {"Bandjigali"},
["bjq"] = {"Southern Betsimisaraka Malagasy"},
["bkb"] = {"Finallig"},
["blg"] = {"Balau"},
["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"},
["cug"] = {"Chungmboko", "Cung"},
["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"},
["gji"] = {"Geji"},
["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"},
["lak"] = {"Laka (Nigeria)"},
["lba"] = {"Lui"},
["leg"] = {"Lengua"},
["lii"] = {"Lingkhim"},
["llo"] = {"Khlor"},
["lmm"] = {"Lamam"},
["lmz"] = {"Lumbee"},
["lno"] = {"Lango (South Sudan)"},
["lsg"] = {"Lyons Sign Language"},
["meg"] = {"Mea"},
["mgx"] = {"Omati"},
["mhh"] = {"Maskoy Pidgin"},
["mja"] = {"Mahei"},
["mld"] = {"Malakhel"},
["mnt"] = {"Maykulan"},
["mof"] = {"Mohegan-Montauk-Narragansett"},
["mst"] = {"Cataelano Mandaya"},
["mvm"] = {"Muya"},
["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"},
["ngo"] = {"Ngoni"},
["nln"] = {"Durango Nahuatl"},
["nlr"] = {"Ngarla"},
["nns"] = {"Ningye"},
["nnx"] = {"Ngong"},
["noo"] = {"Nootka"},
["nts"] = {"Natagaimas"},
["nxu"] = {"Narau"},
["ome"] = {"Omejes"},
["oun"] = {"ǃOǃung"},
["pat"] = {"Papitalai"},
["pbz"] = {"Palu"},
["pcr"] = {"Panang"},
["pgy"] = {"Pongyong"},
["pii"] = {"Pini"},
["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"},
["smd"] = {"Sama"},
["snb"] = {"Sebuyau"},
["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"},
["uun"] = {"Kulon-Pazeh"},
["vki"] = {"Ija-Zuba"},
["wgw"] = {"Wagawaga"},
["wit"] = {"Wintu"},
["wiw"] = {"Wirangu"},
["wra"] = {"Warapu"},
["wrd"] = {"Warduji"},
["wya"] = {"Wyandot"},
["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,
}
3dw61n2xdw1ukq69wsfogug87txm1ss
Module:Language/data/iana regions
828
42494629
1075027465
1064553970
2022-03-03T13:58:05Z
Trappist the monk
10289486
update to 2022-03-02 data;
Scribunto
text/plain
-- File-Date: 2022-03-02
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"}
}
0v0v0ovapbarvggl2f4zbri8b1iyggi
Module:Language/data/iana scripts
828
42494561
1075027458
1064553960
2022-03-03T13:58:03Z
Trappist the monk
10289486
update to 2022-03-02 data;
Scribunto
text/plain
-- File-Date: 2022-03-02
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"},
["Kawi"] = {"Kawi"},
["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"},
["Nagm"] = {"Nag Mundari"},
["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"},
["Ougr"] = {"Old Uyghur"},
["Palm"] = {"Palmyrene"},
["Pauc"] = {"Pau Cin Hau"},
["Pcun"] = {"Proto-Cuneiform"},
["Pelm"] = {"Proto-Elamite"},
["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"},
["Psin"] = {"Proto-Sinaitic"},
["Ranj"] = {"Ranjana"},
["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"},
["Sunu"] = {"Sunuwar"},
["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"},
["Tnsa"] = {"Tangsa"},
["Toto"] = {"Toto"},
["Ugar"] = {"Ugaritic"},
["Vaii"] = {"Vai"},
["Visp"] = {"Visible Speech"},
["Vith"] = {"Vithkuqi"},
["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"}
}
c2tzwyywjd9wdj486idbwqkojq0zmcp
Module:Language/data/iana suppressed scripts
828
56104181
1075027471
1064553988
2022-03-03T13:58:08Z
Trappist the monk
10289486
update to 2022-03-02 data;
Scribunto
text/plain
-- File-Date: 2022-03-02
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"}
}
odkm1h8rz17ymkehfhi5w6fftyxme8p
Module:Language/data/iana variants
828
55716082
1075027469
1064553984
2022-03-03T13:58:07Z
Trappist the monk
10289486
update to 2022-03-02 data;
Scribunto
text/plain
-- File-Date: 2022-03-02
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"},
},
["arkaika"] = {
["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"},
["prefixes"] = {"eo"},
},
["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"] = {},
},
["gallo"] = {
["descriptions"] = {"Gallo"},
["prefixes"] = {"fr"},
},
["gascon"] = {
["descriptions"] = {"Gascon"},
["prefixes"] = {"oc"},
},
["grclass"] = {
["descriptions"] = {"Classical Occitan orthography"},
["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"},
},
["grital"] = {
["descriptions"] = {"Italian-inspired Occitan orthography"},
["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"},
},
["grmistr"] = {
["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"},
["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"},
},
["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"},
},
["synnejyl"] = {
["descriptions"] = {"Synnejysk", "South Jutish"},
["prefixes"] = {"da"},
},
["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"},
}
}
5hcrlvqkg553eym8ibp2qqayixappxt
Module:Listen
828
42944587
1096941951
1054261466
2022-07-07T17:12:31Z
Izno
2927383
we cookin with templatestyles now
Scribunto
text/plain
local mFileLink = require('Module:File link')
local mTableTools = require('Module:TableTools')
local mSideBox = require('Module:Side box')
local lang = mw.language.new('en')
local p = {}
local function formatLength(length)
-- Formats a duration in seconds in "(h:)mm:ss" (minutes are zero-padded
-- only if there are hours).
if not length or length == 0 then
return nil
end
-- Add 0.5 to offset the rounding down
local t = lang:getDurationIntervals(length + 0.5, { 'hours', 'minutes', 'seconds' })
local s = t.seconds and string.format('%02d', t.seconds) or '00'
local m = t.minutes or 0
local span = mw.html.create('span'):addClass('duration')
if t.hours then
span
:tag('span')
:addClass('h')
:wikitext(t.hours)
:done()
:wikitext(':')
m = string.format('%02d', m)
end
span
:tag('span')
:addClass('min')
:wikitext(m)
:done()
:wikitext(':')
:tag('span')
:addClass('s')
:wikitext(s)
:done()
return tostring(span)
end
local function renderRow(filename, title, play, alt, description, start, length, hasImage)
-- Renders the HTML for one file description row.
if not filename then
return nil
end
length = formatLength(length)
length = length and string.format(' (%s)', length) or ''
local root = mw.html.create('')
root:tag('div')
:addClass('haudio')
:newline()
:tag('div')
:addClass('listen-file-header')
:wikitext(string.format(
'[[:File:%s|%s]]%s',
filename,
title or '',
length
))
:done()
:newline()
:tag('div')
:wikitext(play ~= 'no' and mFileLink._main{
file = filename,
size = hasImage and '232px' or '215px',
alt = alt,
start = start
}
or nil
)
:done()
:newline()
:tag('div')
:addClass('description')
:wikitext(description)
:done()
:done()
return tostring(root)
end
local function renderTrackingCategories(isPlain, hasMissing, isEmpty, titleObj)
-- Renders all tracking categories produced by the template.
-- isPlain, hasMissing and isEmpty are passed through from p._main,
-- and the titleObj is only used for testing purposes.
local cats = {}
local currentTitle = titleObj or mw.title.getCurrentTitle()
if currentTitle.namespace == 0 then
-- We are in mainspace.
if not isEmpty then
cats[#cats + 1] = 'Articles with hAudio microformats'
end
if hasMissing then
cats[#cats + 1] = 'Articles with empty listen template'
end
end
if isPlain then
cats[#cats + 1] = 'Listen template using plain parameter'
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
function p._main(args)
-- Organise the arguments by number.
local isPlain = args.plain == 'yes'
local isEmbedded = args.embed and true
local hasImage = not isPlain and not isEmbedded and args.image ~= 'none'
local numArgs, missingFiles = {}, {}
do
local origNumArgs = mTableTools.numData(args)
origNumArgs[1] = origNumArgs.other -- Overwrite args.filename1 etc. with args.filename etc.
origNumArgs = mTableTools.compressSparseArray(origNumArgs)
for i, t in ipairs(origNumArgs) do
-- Check if the files exist.
local obj = t.filename and mw.title.makeTitle(-2, t.filename)
if obj and obj.exists then
if t.length == 'yes' or
-- Show length if the video height would be less than 150px
obj.file.width / obj.file.height > (hasImage and 1.547 or 1.434)
then
t.length = obj.file.length
else
t.length = nil
end
numArgs[#numArgs + 1] = t
else
missingFiles[#missingFiles + 1] = t.filename or i
end
end
end
-- Render warning
local hasMissing = #missingFiles ~= 0
local previewWarning = ''
if hasMissing then
for i, v in ipairs(missingFiles) do
missingFiles[i] = type(v) == 'string'
and string.format('missing file "%s"', v)
or string.format('empty filename #%s', v)
end
previewWarning = string.format(
'Page using [[Template:Listen]] with %s',
mw.text.listToText(missingFiles)
)
previewWarning = require('Module:If preview')._warning({previewWarning})
end
-- Exit early if none exist.
if #numArgs == 0 then
return previewWarning .. renderTrackingCategories(isPlain, hasMissing, true)
end
-- Build the arguments for {{side box}}
local sbArgs = {
metadata = 'no',
position = (isPlain or isEmbedded) and 'left' or args.pos,
style = args.style,
templatestyles = 'Module:Listen/styles.css'
}
-- Class arguments
do
local class = {
'listen',
'noprint'
}
if isPlain then
table.insert(class, 'listen-plain')
end
if isEmbedded then
table.insert(class, 'listen-embedded')
end
if not hasImage then
table.insert(class, 'listen-noimage')
end
if args.pos == 'left' and not isPlain and not isEmbedded then
table.insert(class, 'listen-left')
elseif args.pos == 'center' then
table.insert(class, 'listen-center')
end
sbArgs.class = table.concat(class, ' ')
end
-- Image
if not isPlain and not isEmbedded then
if args.image then
sbArgs.image = args.image
else
local images = {
speech = 'Audio-input-microphone.svg',
music = 'Gnome-mime-audio-openclipart.svg',
default = 'Gnome-mime-sound-openclipart.svg'
}
sbArgs.image = mFileLink._main{
file = args.type and images[args.type] or images.default,
size = '65x50px',
location = 'center',
link = '',
alt = ''
}
end
end
-- Text
do
local header
if args.header then
header = mw.html.create('div')
header:addClass('listen-header')
:wikitext(args.header)
header = tostring(header) .. '\n'
else
header = ''
end
local text = {}
for i, t in ipairs(numArgs) do
text[#text + 1] = renderRow(
t.filename, t.title, t.play, t.alt, t.description, t.start,
t.length, hasImage
)
if numArgs[i + 1] then
text[#text + 1] = '<hr/>'
end
end
sbArgs.text = header .. table.concat(text)
end
-- Below
if not isPlain and not isEmbedded and args.help ~= 'no' then
sbArgs.below = string.format(
'<hr/><i class="selfreference">Problems playing %s? See [[Help:Media|media help]].</i>',
#numArgs == 1 and 'this file' or 'these files'
)
end
-- Render the side box.
local sideBox = mSideBox._main(sbArgs)
-- Render the tracking categories.
local trackingCategories = renderTrackingCategories(isPlain, hasMissing)
return previewWarning .. sideBox .. trackingCategories
end
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
return p
pshu9hn2rm9f5n35bkb0qnl4u7oiy1b
Module:Listen/styles.css
828
71102604
1096940132
1096939727
2022-07-07T16:56:16Z
Izno
2927383
max width for tmh player
sanitized-css
text/css
/* {{pp|small=y}} */
.listen .side-box-text {
line-height: 1.1em;
}
.listen-plain {
border: none;
background: transparent;
}
.listen-embedded {
width: 100%;
margin: 0;
border-width: 1px 0 0 0;
background: transparent;
}
.listen-header {
padding: 2px;
}
.listen-embedded .listen-header {
padding: 2px 0;
}
.listen-file-header {
padding: 4px 0;
}
.listen .description {
padding-top: 2px;
}
.listen .mw-tmh-player {
max-width: 100%;
}
/* have to deal with Vector suboptimal */
@media (max-width: 719px) {
.listen {
clear: both;
}
}
@media (min-width: 720px) {
.listen:not(.listen-noimage) {
width: 320px;
}
/* left/right (core template takes care of right)/center mutually exclusive */
.listen-left {
/* TODO: Understand why this overflow is here. */
overflow: visible;
float: left;
}
.listen-center {
float: none;
margin-left: auto;
margin-right: auto;
}
}
8wj5f95mzuq4d8vsnr0wimpjcllnyau
Module:Namespace detect
828
39762919
602886406
601020017
2014-04-05T17:01:23Z
Mr. Stradivarius
4708675
use demopage instead of page as the main "page" parameter
Scribunto
text/plain
--[[
--------------------------------------------------------------------------------
-- --
-- NAMESPACE DETECT --
-- --
-- This module implements the {{namespace detect}} 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. The --
-- module can also use the corresponding subject namespace value if it is --
-- used on a talk page. Parameter names can be configured for different wikis --
-- by altering the values in the "cfg" table in --
-- Module:Namespace detect/config. --
-- --
--------------------------------------------------------------------------------
--]]
local data = mw.loadData('Module:Namespace detect/data')
local argKeys = data.argKeys
local cfg = data.cfg
local mappings = data.mappings
local yesno = require('Module:Yesno')
local mArguments -- Lazily initialise Module:Arguments
local mTableTools -- Lazily initilalise Module:TableTools
local ustringLower = mw.ustring.lower
local p = {}
local function fetchValue(t1, t2)
-- Fetches a value from the table t1 for the first key in array t2 where
-- a non-nil value of t1 exists.
for i, key in ipairs(t2) do
local value = t1[key]
if value ~= nil then
return value
end
end
return nil
end
local function equalsArrayValue(t, value)
-- Returns true if value equals a value in the array t. Otherwise
-- returns false.
for i, arrayValue in ipairs(t) do
if value == arrayValue then
return true
end
end
return false
end
function p.getPageObject(page)
-- Get the page object, passing the function through pcall in case of
-- errors, e.g. being over the expensive function count limit.
if page then
local success, pageObject = pcall(mw.title.new, page)
if success then
return pageObject
else
return nil
end
else
return mw.title.getCurrentTitle()
end
end
-- Provided for backward compatibility with other modules
function p.getParamMappings()
return mappings
end
local function getNamespace(args)
-- This function gets the namespace name from the page object.
local page = fetchValue(args, argKeys.demopage)
if page == '' then
page = nil
end
local demospace = fetchValue(args, argKeys.demospace)
if demospace == '' then
demospace = nil
end
local subjectns = fetchValue(args, argKeys.subjectns)
local ret
if demospace then
-- Handle "demospace = main" properly.
if equalsArrayValue(argKeys.main, ustringLower(demospace)) then
ret = mw.site.namespaces[0].name
else
ret = demospace
end
else
local pageObject = p.getPageObject(page)
if pageObject then
if pageObject.isTalkPage then
-- Get the subject namespace if the option is set,
-- otherwise use "talk".
if yesno(subjectns) then
ret = mw.site.namespaces[pageObject.namespace].subject.name
else
ret = 'talk'
end
else
ret = pageObject.nsText
end
else
return nil -- return nil if the page object doesn't exist.
end
end
ret = ret:gsub('_', ' ')
return ustringLower(ret)
end
function p._main(args)
-- Check the parameters stored in the mappings table for any matches.
local namespace = getNamespace(args) or 'other' -- "other" avoids nil table keys
local params = mappings[namespace] or {}
local ret = fetchValue(args, params)
--[[
-- If there were no matches, return parameters for other namespaces.
-- This happens if there was no text specified for the namespace that
-- was detected or if the demospace parameter is not a valid
-- namespace. Note that the parameter for the detected namespace must be
-- completely absent for this to happen, not merely blank.
--]]
if ret == nil then
ret = fetchValue(args, argKeys.other)
end
return ret
end
function p.main(frame)
mArguments = require('Module:Arguments')
local args = mArguments.getArgs(frame, {removeBlanks = false})
local ret = p._main(args)
return ret or ''
end
function p.table(frame)
--[[
-- Create a wikitable of all subject namespace parameters, for
-- documentation purposes. The talk parameter is optional, in case it
-- needs to be excluded in the documentation.
--]]
-- Load modules and initialise variables.
mTableTools = require('Module:TableTools')
local namespaces = mw.site.namespaces
local cfg = data.cfg
local useTalk = type(frame) == 'table'
and type(frame.args) == 'table'
and yesno(frame.args.talk) -- Whether to use the talk parameter.
-- Get the header names.
local function checkValue(value, default)
if type(value) == 'string' then
return value
else
return default
end
end
local nsHeader = checkValue(cfg.wikitableNamespaceHeader, 'Namespace')
local aliasesHeader = checkValue(cfg.wikitableAliasesHeader, 'Aliases')
-- Put the namespaces in order.
local mappingsOrdered = {}
for nsname, params in pairs(mappings) do
if useTalk or nsname ~= 'talk' then
local nsid = namespaces[nsname].id
-- Add 1, as the array must start with 1; nsid 0 would be lost otherwise.
nsid = nsid + 1
mappingsOrdered[nsid] = params
end
end
mappingsOrdered = mTableTools.compressSparseArray(mappingsOrdered)
-- Build the table.
local ret = '{| class="wikitable"'
.. '\n|-'
.. '\n! ' .. nsHeader
.. '\n! ' .. aliasesHeader
for i, params in ipairs(mappingsOrdered) do
for j, param in ipairs(params) do
if j == 1 then
ret = ret .. '\n|-'
.. '\n| <code>' .. param .. '</code>'
.. '\n| '
elseif j == 2 then
ret = ret .. '<code>' .. param .. '</code>'
else
ret = ret .. ', <code>' .. param .. '</code>'
end
end
end
ret = ret .. '\n|-'
.. '\n|}'
return ret
end
return p
j7kygz1y56jpz4doq0m2c6x1td5d8ar
Module:Namespace detect/config
828
42256703
948472518
948472515
2020-04-01T06:12:44Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
--------------------------------------------------------------------------------
-- 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.
1o6ozz56i8q0xgyl6xa41n2v7kelhli
Module:Namespace detect/data
828
42257476
948472520
948472519
2020-04-01T06:12:45Z
MusikAnimal
14882394
1 revision imported
Scribunto
text/plain
--------------------------------------------------------------------------------
-- 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()
}
ojp6d3pc8mql5nufaqdg576c9so3479
Module:Navbar
828
38827227
1054994468
1054938041
2021-11-13T05:33:43Z
Izno
2927383
remove unnecessary line
Scribunto
text/plain
local p = {}
local cfg = mw.loadData('Module:Navbar/configuration')
local function get_title_arg(is_collapsible, template)
local title_arg = 1
if is_collapsible then title_arg = 2 end
if template then title_arg = 'template' end
return title_arg
end
local function choose_links(template, args)
-- The show table indicates the default displayed items.
-- view, talk, edit, hist, move, watch
-- TODO: Move to configuration.
local show = {true, true, true, false, false, false}
if template then
show[2] = false
show[3] = 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}
-- TODO: Consider removing TableTools dependency.
for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do
local num = index[v]
if num then show[num] = true end
end
end
local remove_edit_link = args.noedit
if remove_edit_link then show[3] = false end
return show
end
local function add_link(link_description, ul, is_mini, font_style)
local l
if link_description.url then
l = {'[', '', ']'}
else
l = {'[[', '|', ']]'}
end
ul:tag('li')
:addClass('nv-' .. link_description.full)
:wikitext(l[1] .. link_description.link .. l[2])
:tag(is_mini and 'abbr' or 'span')
:attr('title', link_description.html_title)
:cssText(font_style)
:wikitext(is_mini and link_description.mini or link_description.full)
:done()
:wikitext(l[3])
:done()
end
local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style)
local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)
if not title then
error(cfg.invalid_title .. title_text)
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
-- TODO: Get link_descriptions and show into the configuration module.
-- link_descriptions should be easier...
local link_descriptions = {
{ ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template',
['link'] = title.fullText, ['url'] = false },
{ ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template',
['link'] = talkpage, ['url'] = false },
{ ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template',
['link'] = title:fullUrl('action=edit'), ['url'] = true },
{ ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template',
['link'] = title:fullUrl('action=history'), ['url'] = true },
{ ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template',
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true },
{ ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template',
['link'] = title:fullUrl('action=watch'), ['url'] = true }
}
local ul = mw.html.create('ul')
if has_brackets then
ul:addClass(cfg.classes.brackets)
:cssText(font_style)
end
for i, _ in ipairs(displayed_links) do
if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end
end
return ul:done()
end
function p._navbar(args)
-- TODO: We probably don't need both fontstyle and fontcolor...
local font_style = args.fontstyle
local font_color = args.fontcolor
local is_collapsible = args.collapsible
local is_mini = args.mini
local is_plain = args.plain
local collapsible_class = nil
if is_collapsible then
collapsible_class = cfg.classes.collapsible
if not is_plain then is_mini = 1 end
if font_color then
font_style = (font_style or '') .. '; color: ' .. font_color .. ';'
end
end
local navbar_style = args.style
local div = mw.html.create():tag('div')
div
:addClass(cfg.classes.navbar)
:addClass(cfg.classes.plainlinks)
:addClass(cfg.classes.horizontal_list)
:addClass(collapsible_class) -- we made the determination earlier
:cssText(navbar_style)
if is_mini then div:addClass(cfg.classes.mini) end
local box_text = (args.text or cfg.box_text) .. ' '
-- the concatenated space guarantees the box text is separated
if not (is_mini or is_plain) then
div
:tag('span')
:addClass(cfg.classes.box_text)
:cssText(font_style)
:wikitext(box_text)
end
local template = args.template
local displayed_links = choose_links(template, args)
local has_brackets = args.brackets
local title_arg = get_title_arg(is_collapsible, template)
local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style)
div:node(list)
if is_collapsible then
local title_text_class
if is_mini then
title_text_class = cfg.classes.collapsible_title_mini
else
title_text_class = cfg.classes.collapsible_title_full
end
div:done()
:tag('div')
:addClass(title_text_class)
:cssText(font_style)
:wikitext(args[1])
end
return mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = cfg.templatestyles }
} .. tostring(div:done())
end
function p.navbar(frame)
return p._navbar(require('Module:Arguments').getArgs(frame))
end
return p
jd5no8v1zi4m1e6lvbwo0a9t0kogdvi
Module:Navbar/configuration
828
66010105
1054995103
992950717
2021-11-13T05:39:10Z
Izno
2927383
well, since I edited the other one...
Scribunto
text/plain
return {
['templatestyles'] = 'Module:Navbar/styles.css',
['box_text'] = 'This box: ', -- default text box when not plain or mini
['title_namespace'] = 'Template', -- namespace to default to for title
['invalid_title'] = 'Invalid title ',
['classes'] = { -- set a line to nil if you don't want it
['navbar'] = 'navbar',
['plainlinks'] = 'plainlinks', -- plainlinks
['horizontal_list'] = 'hlist', -- horizontal list class
['mini'] = 'navbar-mini', -- class indicating small links in the navbar
['this_box'] = 'navbar-boxtext',
['brackets'] = 'navbar-brackets',
-- 'collapsible' is the key for a class to indicate the navbar is
-- setting up the collapsible element in addition to the normal
-- navbar.
['collapsible'] = 'navbar-collapse',
['collapsible_title_mini'] = 'navbar-ct-mini',
['collapsible_title_full'] = 'navbar-ct-full'
}
}
lydm72m86hfvyzj0u2lqfps9lz9gquk
Module:Navbar/styles.css
828
58923020
1063604349
1054937957
2022-01-03T23:12:15Z
Izno
2927383
navbar styles that were moved to parent templates
sanitized-css
text/css
/* {{pp|small=yes}} */
.navbar {
display: inline;
font-size: 88%;
font-weight: normal;
}
.navbar-collapse {
float: left;
text-align: left;
}
.navbar-boxtext {
word-spacing: 0;
}
.navbar ul {
display: inline-block;
white-space: nowrap;
line-height: inherit;
}
.navbar-brackets::before {
margin-right: -0.125em;
content: '[ ';
}
.navbar-brackets::after {
margin-left: -0.125em;
content: ' ]';
}
.navbar li {
word-spacing: -0.125em;
}
.navbar a > span,
.navbar a > abbr {
text-decoration: inherit;
}
.navbar-mini abbr {
font-variant: small-caps;
border-bottom: none;
text-decoration: none;
cursor: inherit;
}
.navbar-ct-full {
font-size: 114%;
margin: 0 7em;
}
.navbar-ct-mini {
font-size: 114%;
margin: 0 4em;
}
id9uhrgq1wqygbzuyhnoc90pmdlwwhd
Module:Navbox
828
38634746
1064341473
1057332100
2022-01-07T21:39:23Z
Izno
2927383
remove titlegroup per templatestyles section on talk page
Scribunto
text/plain
local p = {}
local navbar = require('Module:Navbar')._navbar
local cfg = mw.loadData('Module:Navbox/configuration')
local getArgs -- lazily initialized
local args
local format = string.format
local function striped(wikitext, border)
-- 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 = cfg.category.orphan
if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then
-- No change; striping occurs in outermost navbox.
return wikitext .. orphanCat
end
local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part
if args[cfg.arg.evenodd] then
if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then
first, second = second, first
else
first = args[cfg.arg.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(cfg.marker.regex, 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 == cfg.keyword.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(cfg.pattern.nowrap) then
line = format(cfg.nowrap_item, prefix, content)
end
table.insert(lines, line)
end
item = table.concat(lines, '\n')
end
if item:match('^[*:;#]') then
return '\n' .. item ..'\n'
end
return item
end
-- we will want this later when we want to add tstyles for hlist/plainlist
local function has_navbar()
return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off
and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain
and (
args[cfg.arg.name]
or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '')
~= cfg.pattern.navbox
)
end
local function renderNavBar(titleCell)
if has_navbar() then
titleCell:wikitext(navbar{
[cfg.navbar.name] = args[cfg.arg.name],
[cfg.navbar.mini] = 1,
[cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' ..
(args[cfg.arg.titlestyle] or '') ..
';background:none transparent;border:none;box-shadow:none;padding:0;'
})
end
end
local function renderTitleRow(tbl)
if not args[cfg.arg.title] then return end
local titleRow = tbl:tag('tr')
local titleCell = titleRow:tag('th'):attr('scope', 'col')
local titleColspan = 2
if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end
if args[cfg.arg.image] then titleColspan = titleColspan + 1 end
titleCell
:cssText(args[cfg.arg.basestyle])
:cssText(args[cfg.arg.titlestyle])
:addClass(cfg.class.navbox_title)
:attr('colspan', titleColspan)
renderNavBar(titleCell)
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args[cfg.arg.title]))
:addClass(args[cfg.arg.titleclass])
:css('font-size', '114%')
:css('margin', '0 4em')
:wikitext(processItem(args[cfg.arg.title]))
end
local function getAboveBelowColspan()
local ret = 2
if args[cfg.arg.imageleft] then ret = ret + 1 end
if args[cfg.arg.image] then ret = ret + 1 end
return ret
end
local function renderAboveRow(tbl)
if not args[cfg.arg.above] then return end
tbl:tag('tr')
:tag('td')
:addClass(cfg.class.navbox_abovebelow)
:addClass(args[cfg.arg.aboveclass])
:cssText(args[cfg.arg.basestyle])
:cssText(args[cfg.arg.abovestyle])
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:attr('id', args[cfg.arg.title] and nil or mw.uri.anchorEncode(args[cfg.arg.above]))
:wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems]))
end
local function renderBelowRow(tbl)
if not args[cfg.arg.below] then return end
tbl:tag('tr')
:tag('td')
:addClass(cfg.class.navbox_abovebelow)
:addClass(args[cfg.arg.belowclass])
:cssText(args[cfg.arg.basestyle])
:cssText(args[cfg.arg.belowstyle])
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems]))
end
local function renderListRow(tbl, index, listnum, listnums_size)
local row = tbl:tag('tr')
if index == 1 and args[cfg.arg.imageleft] then
row
:tag('td')
:addClass(cfg.class.noviewer)
:addClass(cfg.class.navbox_image)
:addClass(args[cfg.arg.imageclass])
:css('width', '1px') -- Minimize width
:css('padding', '0 2px 0 0')
:cssText(args[cfg.arg.imageleftstyle])
:attr('rowspan', listnums_size)
:tag('div')
:wikitext(processItem(args[cfg.arg.imageleft]))
end
local group_and_num = format(cfg.arg.group_and_num, listnum)
local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum)
if args[group_and_num] 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[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then
groupCell
:attr('id', mw.uri.anchorEncode(args[cfg.arg.group1]))
end
groupCell
:attr('scope', 'row')
:addClass(cfg.class.navbox_group)
:addClass(args[cfg.arg.groupclass])
:cssText(args[cfg.arg.basestyle])
-- If groupwidth not specified, minimize width
:css('width', args[cfg.arg.groupwidth] or '1%')
groupCell
:cssText(args[cfg.arg.groupstyle])
:cssText(args[groupstyle_and_num])
:wikitext(args[group_and_num])
end
local listCell = row:tag('td')
if args[group_and_num] then
listCell
:addClass(cfg.class.navbox_list_with_group)
else
listCell:attr('colspan', 2)
end
if not args[cfg.arg.groupwidth] then
listCell:css('width', '100%')
end
local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing
if index % 2 == 1 then
rowstyle = args[cfg.arg.oddstyle]
else
rowstyle = args[cfg.arg.evenstyle]
end
local list_and_num = format(cfg.arg.list_and_num, listnum)
local listText = args[list_and_num]
local oddEven = cfg.marker.oddeven
if listText:sub(1, 12) == '</div><table' then
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part
end
local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum)
local listclass_and_num = format(cfg.arg.listclass_and_num, listnum)
listCell
:css('padding', '0')
:cssText(args[cfg.arg.liststyle])
:cssText(rowstyle)
:cssText(args[liststyle_and_num])
:addClass(cfg.class.navbox_list)
:addClass(cfg.class.navbox_part .. oddEven)
:addClass(args[cfg.arg.listclass])
:addClass(args[listclass_and_num])
:tag('div')
:css('padding',
(index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em'
)
:wikitext(processItem(listText, args[cfg.arg.nowrapitems]))
if index == 1 and args[cfg.arg.image] then
row
:tag('td')
:addClass(cfg.class.noviewer)
:addClass(cfg.class.navbox_image)
:addClass(args[cfg.arg.imageclass])
:css('width', '1px') -- Minimize width
:css('padding', '0 0 0 2px')
:cssText(args[cfg.arg.imagestyle])
:attr('rowspan', listnums_size)
:tag('div')
:wikitext(processItem(args[cfg.arg.image]))
end
end
-- uses this now to make the needHlistCategory correct
-- to use later for when we add list styles via navbox
local function has_list_class(htmlclass)
local class_args = { -- rough order of probability of use
cfg.arg.bodyclass, cfg.arg.listclass, cfg.arg.aboveclass,
cfg.arg.belowclass, cfg.arg.titleclass, cfg.arg.navboxclass,
cfg.arg.groupclass, cfg.arg.imageclass
}
local patterns = {
'^' .. htmlclass .. '$',
'%s' .. htmlclass .. '$',
'^' .. htmlclass .. '%s',
'%s' .. htmlclass .. '%s'
}
for _, arg in ipairs(class_args) do
for _, pattern in ipairs(patterns) do
if mw.ustring.find(args[arg] or '', pattern) then
return true
end
end
end
return false
end
local function needsHorizontalLists(border)
if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then
return false
end
return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist)
end
local function hasBackgroundColors()
for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle,
cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do
if tostring(args[key]):find('background', 1, true) then
return true
end
end
return false
end
local function hasBorders()
for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle,
cfg.arg.abovestyle, cfg.arg.belowstyle}) do
if tostring(args[key]):find('border', 1, true) then
return true
end
end
return false
end
local function isIllegible()
local styleratio = require('Module:Color contrast')._styleratio
for key, style in pairs(args) do
if tostring(key):match(cfg.pattern.style) then
if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then
return true
end
end
end
return false
end
local function getTrackingCategories(border)
local cats = {}
if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end
if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end
if isIllegible() then table.insert(cats, cfg.category.illegible) end
if hasBorders() then table.insert(cats, cfg.category.borders) end
return cats
end
local function renderTrackingCategories(builder, border)
local title = mw.title.getCurrentTitle()
if title.namespace ~= 10 then return end -- not in template space
local subpage = title.subpageText
if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox
or subpage == cfg.keyword.subpage_testcases then return end
for _, cat in ipairs(getTrackingCategories(border)) do
builder:wikitext('[[Category:' .. cat .. ']]')
end
end
local function renderMainTable(border, listnums)
local tbl = mw.html.create('table')
:addClass(cfg.class.nowraplinks)
:addClass(args[cfg.arg.bodyclass])
local state = args[cfg.arg.state]
if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then
if state == cfg.keyword.state_collapsed then
state = cfg.class.collapsed
end
tbl
:addClass(cfg.class.collapsible)
:addClass(state or cfg.class.autocollapse)
end
tbl:css('border-spacing', 0)
if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then
tbl
:addClass(cfg.class.navbox_subgroup)
:cssText(args[cfg.arg.bodystyle])
:cssText(args[cfg.arg.style])
else -- regular navbox - bodystyle and style will be applied to the wrapper table
tbl
:addClass(cfg.class.navbox_inner)
:css('background', 'transparent')
:css('color', 'inherit')
end
tbl:cssText(args[cfg.arg.innerstyle])
renderTitleRow(tbl)
renderAboveRow(tbl)
local listnums_size = #listnums
for i, listnum in ipairs(listnums) do
renderListRow(tbl, i, listnum, listnums_size)
end
renderBelowRow(tbl)
return tbl
end
local function add_navbox_styles()
local frame = mw.getCurrentFrame()
-- This is a lambda so that it doesn't need the frame as a parameter
local function add_user_styles(templatestyles)
if templatestyles and templatestyles ~= '' then
return frame:extensionTag{
name = 'templatestyles', args = { src = templatestyles }
}
end
return ''
end
-- get templatestyles. load base from config so that Lua only needs to do
-- the work once of parser tag expansion
local base_templatestyles = cfg.templatestyles
local templatestyles = add_user_styles(args[cfg.arg.templatestyles])
local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles])
-- The 'navbox-styles' div exists for two reasons:
-- 1. To wrap the styles to work around T200206 more elegantly. Instead
-- of combinatorial rules, this ends up being linear number of CSS rules.
-- 2. To allow MobileFrontend to rip the styles out with 'nomobile' such that
-- they are not dumped into the mobile view.
return mw.html.create('div')
:addClass(cfg.class.navbox_styles)
:addClass(cfg.class.nomobile)
:wikitext(base_templatestyles .. templatestyles .. child_templatestyles)
:done()
end
function p._navbox(navboxArgs)
args = navboxArgs
local listnums = {}
for k, _ in pairs(args) do
if type(k) == 'string' then
local listnum = k:match(cfg.pattern.listnum)
if listnum then table.insert(listnums, tonumber(listnum)) end
end
end
table.sort(listnums)
local border = mw.text.trim(args[cfg.arg.border] or args[1] or '')
if border == cfg.keyword.border_child then
border = cfg.keyword.border_subgroup
end
-- render the main body of the navbox
local tbl = renderMainTable(border, listnums)
local res = mw.html.create()
-- render the appropriate wrapper for the navbox, based on the border param
if border == cfg.keyword.border_none then
res:node(add_navbox_styles())
local nav = res:tag('div')
:attr('role', 'navigation')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1]
and not args[cfg.arg.group2]) then
nav:attr(
'aria-labelledby',
mw.uri.anchorEncode(
args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]
)
)
else
nav:attr('aria-label', cfg.aria_label)
end
elseif border == cfg.keyword.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 </div> to avoid the padding being applied, and at the
-- end add a <div> to balance out the parent's </div>
res
:wikitext('</div>')
:node(tbl)
:wikitext('<div>')
else
res:node(add_navbox_styles())
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass(cfg.class.navbox)
:addClass(args[cfg.arg.navboxclass])
:cssText(args[cfg.arg.bodystyle])
:cssText(args[cfg.arg.style])
:css('padding', '3px')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args[cfg.arg.title] or args[cfg.arg.above]
or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then
nav:attr(
'aria-labelledby',
mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1])
)
else
nav:attr('aria-label', cfg.aria_label)
end
end
if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then
renderTrackingCategories(res, border)
end
return striped(tostring(res), border)
end
function p.navbox(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
args = getArgs(frame, {wrappers = {cfg.pattern.navbox}})
-- Read the arguments in the order they'll be output in, to make references
-- number in the right order.
local _
_ = args[cfg.arg.title]
_ = args[cfg.arg.above]
-- Limit this to 20 as covering 'most' cases (that's a SWAG) and because
-- iterator approach won't work here
for i = 1, 20 do
_ = args[format(cfg.arg.group_and_num, i)]
_ = args[format(cfg.arg.list_and_num, i)]
end
_ = args[cfg.arg.below]
return p._navbox(args)
end
return p
aps8opqyleqagctjqmi5zb3x6sq8mux
Module:Navbox/configuration
828
67685668
1064341544
1057330154
2022-01-07T21:39:52Z
Izno
2927383
remove titlegroup
Scribunto
text/plain
return {
aria_label = 'Navbox',
nowrap_item = '%s<span class="nowrap">%s</span>',
templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
},
-- do not localize marker table
marker = {
oddeven = '\127_ODDEVEN_\127',
restart = '\127_ODDEVEN0_\127',
regex = '\127_ODDEVEN(%d?)_\127'
},
category = {
orphan = '[[Category:Navbox orphans]]',
horizontal_lists = 'Navigational boxes without horizontal lists',
background_colors = 'Navboxes using background colours',
illegible = 'Potentially illegible navboxes',
borders = 'Navboxes using borders',
},
keyword = {
border_subgroup = 'subgroup',
border_child = 'child',
border_none = 'none',
evenodd_swap = 'swap',
navbar_off = 'off',
navbar_plain = 'plain',
nocat_false = 'false',
nowrapitems_yes = 'yes',
orphan_yes = 'yes',
state_collapsed = 'collapsed',
state_off = 'off',
state_plain = 'plain',
subpage_doc = 'doc',
subpage_sandbox = 'sandbox',
subpage_testcases = 'testcases',
tracking_no = 'no'
},
class = {
autocollapse = 'autocollapse',
collapsible = 'mw-collapsible',
collapsed = 'mw-collapsed',
-- Warning
navbox = 'navbox', -- WMF currently hides 'navbox' from mobile,
-- so you probably shouldn't change the navbox class.
navbox_abovebelow = 'navbox-abovebelow',
navbox_group = 'navbox-group',
navbox_image = 'navbox-image',
navbox_inner = 'navbox-inner',
navbox_list = 'navbox-list',
navbox_list_with_group = 'navbox-list-with-group',
navbox_part = 'navbox-', -- do not l10n
navbox_styles = 'navbox-styles',
navbox_subgroup = 'navbox-subgroup',
navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below
navbox_odd_part = 'odd', -- do not l10n
navbox_even_part = 'even', -- do not l10n
nomobile = 'nomobile',
nowraplinks = 'nowraplinks',
noviewer = 'noviewer' -- used to remove images from MediaViewer
},
pattern = {
listnum = '^list(%d+)$',
sandbox = '/sandbox$',
navbox = 'Template:Navbox',
nowrap = '^<span class="nowrap">',
style = 'style$',
navbox_title = '<th[^>]*"navbox%-title"',
hlist = 'hlist',
plainlist = 'plainlist'
},
arg = {
above = 'above',
aboveclass = 'aboveclass',
abovestyle = 'abovestyle',
basestyle = 'basestyle',
bodyclass = 'bodyclass',
bodystyle = 'bodystyle',
border = 'border',
below = 'below',
belowclass = 'belowclass',
belowstyle = 'belowstyle',
evenodd = 'evenodd',
evenstyle = 'evenstyle',
group1 = 'group1',
group2 = 'group2',
group_and_num = 'group%d',
groupstyle_and_num = 'group%dstyle',
groupclass = 'groupclass',
groupstyle = 'groupstyle',
groupwidth = 'groupwidth',
innerstyle = 'innerstyle',
image = 'image',
imageclass = 'imageclass',
imageleft = 'imageleft',
imageleftstyle = 'imageleftstyle',
imagesetyle = 'imagestyle',
list_and_num = 'list%d',
listclass_and_num = 'list%dclass',
liststyle_and_num = 'list%dstyle',
list1padding = 'list1padding',
listclass = 'listclass',
listpadding = 'listpadding',
liststyle = 'liststyle',
name = 'name',
navbar = 'navbar',
navboxclass = 'navboxclass',
nocat = 'nocat',
nowrapitems = 'nowrapitems',
oddstyle = 'oddstyle',
orphan = 'orphan',
state = 'state',
style = 'style',
templatestyles = 'templatestyles',
child_templatestyles = 'child templatestyles',
title = 'title',
titleclass = 'titleclass',
titlestyle = 'titlestyle',
tracking = 'tracking'
},
-- names of navbar arguments
navbar = {
name = 1,
fontstyle = 'fontstyle',
mini = 'mini'
}
}
8npf15277sgmgep5j2bnmes7i7ktuvo
Module:Navbox/styles.css
828
69272159
1061467846
1057682214
2021-12-21T22:10:10Z
Izno
2927383
remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page
sanitized-css
text/css
/* {{pp|small=y}} */
.navbox {
box-sizing: border-box;
border: 1px solid #a2a9b1;
width: 100%;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */
}
.navbox .navbox {
margin-top: 0; /* No top margin for nested navboxes */
}
.navbox + .navbox, /* TODO: remove first line after transclusions have updated */
.navbox + .navbox-styles + .navbox {
margin-top: -1px; /* Single pixel border between adjacent navboxes */
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox-group,
.navbox-title,
.navbox-abovebelow {
padding: 0.25em 1em;
line-height: 1.5em;
text-align: center;
}
.navbox-group {
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background-color: #fdfdfd;
}
.navbox-list {
line-height: 1.5em;
border-color: #fdfdfd; /* Must match background color */
}
.navbox-list-with-group {
text-align: left;
border-left-width: 2px;
border-left-style: solid;
}
/* cell spacing for navbox cells */
/* Borders above 2nd, 3rd, etc. rows */
/* TODO: figure out how to replace tr as structure;
* with div structure it should be just a matter of first-child */
tr + tr > .navbox-abovebelow,
tr + tr > .navbox-group,
tr + tr > .navbox-image,
tr + tr > .navbox-list {
border-top: 2px solid #fdfdfd; /* Must match background color */
}
.navbox-title {
background-color: #ccf; /* Level 1 color */
}
.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title {
background-color: #ddf; /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background-color: #e6e6ff; /* Level 3 color */
}
.navbox-even {
background-color: #f7f7f7;
}
.navbox-odd {
background-color: transparent;
}
/* TODO: figure out how to remove reliance on td as structure */
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
padding: 0.125em 0;
}
.navbox .navbar {
display: block;
font-size: 100%;
}
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
}
r3sdo030s2y37osfqh0rur7i26x9epy
Module:No globals
828
42567026
948473889
948472526
2020-04-01T06:28:55Z
MusikAnimal
14882394
Undid revision 948472525 by [[Special:Contributions/w>DiBabelYurikBot|w>DiBabelYurikBot]] ([[User talk:w>DiBabelYurikBot|talk]])
Scribunto
text/plain
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)
gggsv54pq7f94l3up48hr91qtxnskdm
Module:Ns has subpages
828
44657407
637438142
637436476
2014-12-10T06:37:29Z
Mr. Stradivarius
4708675
Protected Module:Ns has subpages: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
Scribunto
text/plain
-- This module implements [[Template:Ns has subpages]].
-- While the template is fairly simple, this information is made available to
-- Lua directly, so using a module means that we don't have to update the
-- template as new namespaces are added.
local p = {}
function p._main(ns, frame)
-- Get the current namespace if we were not passed one.
if not ns then
ns = mw.title.getCurrentTitle().namespace
end
-- Look up the namespace table from mw.site.namespaces. This should work
-- for a majority of cases.
local nsTable = mw.site.namespaces[ns]
-- Try using string matching to get the namespace from page names.
-- Do a quick and dirty bad title check to try and make sure we do the same
-- thing as {{NAMESPACE}} in most cases.
if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then
local nsStripped = ns:gsub('^[_%s]*:', '')
nsStripped = nsStripped:gsub(':.*$', '')
nsTable = mw.site.namespaces[nsStripped]
end
-- If we still have no match then try the {{NAMESPACE}} parser function,
-- which should catch the remainder of cases. Don't use a mw.title object,
-- as this would increment the expensive function count for each new page
-- tested.
if not nsTable then
frame = frame or mw.getCurrentFrame()
local nsProcessed = frame:callParserFunction('NAMESPACE', ns)
nsTable = nsProcessed and mw.site.namespaces[nsProcessed]
end
return nsTable and nsTable.hasSubpages
end
function p.main(frame)
local ns = frame:getParent().args[1]
if ns then
ns = ns:match('^%s*(.-)%s*$') -- trim whitespace
ns = tonumber(ns) or ns
end
local hasSubpages = p._main(ns, frame)
return hasSubpages and 'yes' or ''
end
return p
qb0b1z2vff7kifnw21v205d791esbiz
Module:Official website
828
49011003
1058036045
975989930
2021-12-01T02:12:57Z
Uzume
51070
update to use new mw.wikibase API changes
Scribunto
text/plain
local makeUrl = require('Module:URL')._url
local p = {}
-- Wrapper for pcall which returns nil on failure.
local function quickPcall(func)
local success, result = pcall(func)
if success then
return result
end
end
-- Gets the rank for a Wikidata property table. Returns 1, 0 or -1, in
-- order of rank.
local function getRank(prop)
local rank = prop.rank
if rank == 'preferred' then
return 1
elseif rank == 'normal' then
return 0
elseif rank == 'deprecated' then
return -1
else
-- No rank or undefined rank is treated as "normal".
return 0
end
end
-- Finds whether a Wikidata property is qualified as being in English.
local function isEnglish(prop)
local ret = quickPcall(function ()
for i, lang in ipairs(prop.qualifiers.P407) do
if lang.datavalue.value['numeric-id'] == 1860 then
return true
end
end
return false
end)
return ret == true
end
-- Fetches the official website URL from Wikidata.
local fetchWikidataUrl
fetchWikidataUrl = function()
-- Get objects for all official sites on Wikidata.
local websites = quickPcall(function ()
return mw.wikibase.getAllStatements(mw.wikibase.getEntityIdForCurrentPage(), 'P856')
end)
-- Clone the objects in case other code needs them in their original order.
websites = websites and mw.clone(websites) or {}
-- Add the table index to the objects in case it is needed in the sort.
for i, website in ipairs(websites) do
website._index = i
end
-- Sort the websites, first by highest rank, and then by websites in the
-- English language, then by the website's original position in the
-- property list. When we are done, get the URL from the highest-sorted
-- object.
table.sort(websites, function(ws1, ws2)
local r1 = getRank(ws1)
local r2 = getRank(ws2)
if r1 ~= r2 then
return r1 > r2
end
local e1 = isEnglish(ws1)
local e2 = isEnglish(ws2)
if e1 ~= e2 then
return e1
end
return ws1._index < ws2._index
end)
local url = quickPcall(function ()
return websites[1].mainsnak.datavalue.value
end)
-- Cache the result so that we only do the heavy lifting once per #invoke.
fetchWikidataUrl = function ()
return url
end
return url
end
-- Render the URL link, plus other visible output.
local function renderUrl(options)
if not options.url and not options.wikidataurl then
local qid = mw.wikibase.getEntityIdForCurrentPage()
local result = '<strong class="error">' ..
'No URL found. Please specify a URL here or add one to Wikidata.' ..
'</strong>'
if qid then
result = result.. ' [[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/' .. qid .. '#P856|Edit this at Wikidata]]'
end
return result
end
local ret = {}
ret[#ret + 1] = string.format(
'<span class="official-website">%s</span>',
makeUrl(options.url or options.wikidataurl, options.display)
)
if options.wikidataurl and not options.url then
local qid = mw.wikibase.getEntityIdForCurrentPage()
if qid then
ret[#ret + 1] = '[[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/' .. qid .. '#P856|Edit this at Wikidata]]'
end
end
if options.format == 'flash' then
ret[#ret + 1] = mw.getCurrentFrame():expandTemplate{
title = 'Color',
args = {'#505050', '(Requires [[Adobe Flash Player]])'}
}
end
if options.mobile then
ret[#ret + 1] = '(' .. makeUrl(options.mobile, 'Mobile') .. ')'
end
return table.concat(ret, ' ')
end
-- Render the tracking category.
local function renderTrackingCategory(url, wikidataurl)
if mw.title.getCurrentTitle().namespace ~= 0 then
return ''
end
local category
if not url and not wikidataurl then
category = 'Official website missing URL'
elseif not url and wikidataurl then
return ''
elseif url and wikidataurl then
if url:gsub('/%s*$', '') ~= wikidataurl:gsub('/%s*$', '') then
category = 'Official website different in Wikidata and Wikipedia'
end
else
category = 'Official website not in Wikidata'
end
return category and string.format('[[Category:%s]]', category) or ''
end
function p._main(args)
local url = args[1] or args.URL or args.url
local wikidataurl = fetchWikidataUrl()
local formattedUrl = renderUrl{
url = url,
wikidataurl = wikidataurl,
display = args[2] or args.name or 'Official website',
format = args.format,
mobile = args.mobile
}
return formattedUrl .. renderTrackingCategory(url, wikidataurl)
end
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Official website'
})
return p._main(args)
end
return p
iwfkl44ed9889us5r0zb4qiigqay9vq
Module:Pagelist
828
39912004
791536928
729809737
2017-07-20T22:11:20Z
Ahecht
2016996
Remove double colons per [[Wikipedia:Village pump (technical)#Links starting with .5B.5B:: no longer valid?]]
Scribunto
text/plain
local p = {}
local separators = {
dot = true,
pipe = true,
comma = true,
['tpt-languages'] = true
}
local function getSeparator(sep)
if type(sep) ~= 'string' then
return nil
end
if separators[sep] then
return mw.message.new(sep .. '-separator'):plain()
else
return sep
end
end
local function generateLink(page, nspace, delim, endDelim)
if not page then
return nil
end
local pagename = mw.title.new(page)
if not pagename then
-- Default to the args we were passed if our page
-- object was nil.
pagename = page
else
pagename = pagename.text
end
delim = delim or ''
endDelim = endDelim or delim
nspace = nspace or ''
if nspace == 'all' then
nspace = ''
pagename = page
end
local outStr = mw.ustring.gsub(
string.format(
'%s[[:%s:%s|%s]]%s',
delim, nspace, pagename, page, endDelim
),
':+',
':'
)
return outStr
end
function p._main(args)
local t = {}
local separator = getSeparator(args.separator)
local conjunction = getSeparator(args.conjunction)
for i, v in ipairs(args) do
table.insert(t, generateLink(
v, args.nspace, args.delim, args.edelim
))
end
return mw.text.listToText(t, separator, conjunction)
end
function p.main(frame)
local origArgs = require('Module:Arguments').getArgs(frame, {
trim = false,
removeBlanks = false,
wrappers = 'Template:Pagelist'
})
-- Process integer args. Allow for explicit positional arguments that are
-- specified out of order, e.g. {{br separated entries|3=entry3}}.
-- After processing, the args can be accessed accurately from ipairs.
local args = {}
for k, v in pairs(origArgs) do
if type(k) == 'number' and
k >= 1 and
math.floor(k) == k and
string.match(v, '%S') then -- Remove blank or whitespace values.
table.insert(args, k)
end
end
table.sort(args)
for i, v in ipairs(args) do
args[i] = origArgs[v]
-- Trim whitespace.
if type(args[i]) == 'string' then
args[i] = mw.text.trim(args[i])
end
end
-- Get old named args. We don't need to remove blank values
-- as for the nspace and edelim parameters the behaviour is different
-- depending on whether the parameters are blank or absent, and for
-- the delim parameter the default should be the blank string anyway.
args.delim = origArgs.delim
args.edelim = origArgs.edelim
args.nspace = origArgs.nspace
-- Get new named args, "separator" and "conjunction", and strip blank values.
if origArgs.separator and origArgs.separator ~= '' then
args.separator = origArgs.separator
end
if origArgs.conjunction and origArgs.conjunction ~= '' then
args.conjunction = origArgs.conjunction
end
return p._main(args)
end
return p
h2b0ocxr8n6rs95prujo29rxctvtdf4
Module:Pagetype
828
40875383
963271820
960206111
2020-06-18T21:22:08Z
RexxS
6112901
add caps parameter per talk request
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- PAGETYPE --
-- --
-- This is a meta-module intended to replace {{pagetype}} and similar --
-- templates. It automatically detects namespaces, and allows for a --
-- great deal of customisation. It can easily be ported to other --
-- wikis by changing the values in the [[Module:Pagetype/config]]. --
-- --
--------------------------------------------------------------------------------
-- Load config.
local cfg = mw.loadData('Module:Pagetype/config')
-- Load required modules.
local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local nsDetectModule = require('Module:Namespace detect')
local nsDetect = nsDetectModule._main
local getParamMappings = nsDetectModule.getParamMappings
local getPageObject = nsDetectModule.getPageObject
local p = {}
local function shallowCopy(t)
-- Makes a shallow copy of a table.
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
local function checkPagetypeInput(namespace, val)
-- Checks to see whether we need the default value for the given namespace,
-- and if so gets it from the pagetypes table.
-- The yesno function returns true/false for "yes", "no", etc., and returns
-- val for other input.
local ret = yesno(val, val)
if ret and type(ret) ~= 'string' then
ret = cfg.pagetypes[namespace]
end
return ret
end
local function getPagetypeFromClass(class, param, aliasTable, default)
-- Gets the pagetype from a class specified from the first positional
-- parameter.
param = yesno(param, param)
if param ~= false then -- No check if specifically disallowed.
for _, alias in ipairs(aliasTable) do
if class == alias then
if type(param) == 'string' then
return param
else
return default
end
end
end
end
end
local function getNsDetectValue(args)
-- Builds the arguments to pass to [[Module:Namespace detect]] and returns
-- the result.
-- Get the default values.
local ndArgs = {}
local defaultns = args[cfg.defaultns]
if defaultns == cfg.defaultnsAll then
ndArgs = shallowCopy(cfg.pagetypes)
else
local defaultnsArray
if defaultns == cfg.defaultnsExtended then
defaultnsArray = cfg.extendedNamespaces
elseif defaultns == cfg.defaultnsNone then
defaultnsArray = {}
else
defaultnsArray = cfg.defaultNamespaces
end
for _, namespace in ipairs(defaultnsArray) do
ndArgs[namespace] = cfg.pagetypes[namespace]
end
end
--[[
-- Add custom values passed in from the arguments. These overwrite the
-- defaults. The possible argument names are fetched from
-- Module:Namespace detect automatically in case new namespaces are
-- added. Although we accept namespace aliases as parameters, we only pass
-- the local namespace name as a parameter to Module:Namespace detect.
-- This means that the "image" parameter can overwrite defaults for the
-- File: namespace, which wouldn't work if we passed the parameters through
-- separately.
--]]
local mappings = getParamMappings()
for ns, paramAliases in pairs(mappings) do
-- Copy the aliases table, as # doesn't work with tables returned from
-- mw.loadData.
paramAliases = shallowCopy(paramAliases)
local paramName = paramAliases[1]
-- Iterate backwards along the array so that any values for the local
-- namespace names overwrite those for namespace aliases.
for i = #paramAliases, 1, -1 do
local paramAlias = paramAliases[i]
local ndArg = checkPagetypeInput(paramAlias, args[paramAlias])
if ndArg == false then
-- If any arguments are false, convert them to nil to protect
-- against breakage by future changes to
-- [[Module:Namespace detect]].
ndArgs[paramName] = nil
elseif ndArg then
ndArgs[paramName] = ndArg
end
end
end
-- Check for disambiguation-class and N/A-class pages in mainspace.
if ndArgs.main then
local class = args[1]
if type(class) == 'string' then
-- Put in lower case so e.g. "Dab" and "dab" will both match.
class = mw.ustring.lower(class)
end
local dab = getPagetypeFromClass(
class,
args[cfg.dab],
cfg.dabAliases,
cfg.dabDefault
)
if dab then
ndArgs.main = dab
else
local na = getPagetypeFromClass(
class,
args[cfg.na],
cfg.naAliases,
cfg.naDefault
)
if na then
ndArgs.main = na
end
end
end
-- If there is no talk value specified, use the corresponding subject
-- namespace for talk pages.
if not ndArgs.talk then
ndArgs.subjectns = true
end
-- Add the fallback value. This can also be customised, but it cannot be
-- disabled.
local other = args[cfg.other]
-- We will ignore true/false/nil results from yesno here, but using it
-- anyway for consistency.
other = yesno(other, other)
if type(other) == 'string' then
ndArgs.other = other
else
ndArgs.other = cfg.otherDefault
end
-- Allow custom page values.
ndArgs.page = args.page
return nsDetect(ndArgs)
end
local function detectRedirects(args)
local redirect = args[cfg.redirect]
-- The yesno function returns true/false for "yes", "no", etc., and returns
-- redirect for other input.
redirect = yesno(redirect, redirect)
if redirect == false then
-- Detect redirects unless they have been explicitly disallowed with
-- "redirect=no" or similar.
return
end
local pageObject = getPageObject(args.page)
-- If we are using subject namespaces elsewhere, do so here as well.
if pageObject
and not yesno(args.talk, true)
and args[cfg.defaultns] ~= cfg.defaultnsAll
then
pageObject = getPageObject(
pageObject.subjectNsText .. ':' .. pageObject.text
)
end
-- Allow custom values for redirects.
if pageObject and pageObject.isRedirect then
if type(redirect) == 'string' then
return redirect
else
return cfg.redirectDefault
end
end
end
function p._main(args)
local redirect = detectRedirects(args)
local pagetype = ""
if redirect then
pagetype = redirect
else
pagetype = getNsDetectValue(args)
end
if yesno(args.plural, false) then
if cfg.irregularPlurals[pagetype] then
pagetype = cfg.irregularPlurals[pagetype]
else
pagetype = pagetype .. cfg.plural -- often 's'
end
end
if yesno(args.caps, false) then
pagetype = mw.ustring.upper(mw.ustring.sub(pagetype, 1, 1)) ..
mw.ustring.sub(pagetype, 2)
end
return pagetype
end
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
return p
3uutklb10j89clizor7gnyrlkhbqg0d
Module:Pagetype/config
828
42396800
1032938598
1029747509
2021-07-10T15:47:32Z
Trialpears
35786750
Book namespace removal will happen within a few days
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Module:Pagetype configuration data --
-- This page holds localisation and configuration data for Module:Pagetype. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
-- This table holds the values to use for "main=true", "user=true", etc. Keys to
-- this table should be namespace parameters that can be used with
-- [[Module:Namespace detect]].
cfg.pagetypes = {
['main'] = 'article',
['user'] = 'user page',
['project'] = 'project page',
['wikipedia'] = 'project page',
['wp'] = 'project page',
['file'] = 'file',
['image'] = 'file',
['mediawiki'] = 'interface page',
['template'] = 'template',
['help'] = 'help page',
['category'] = 'category',
['portal'] = 'portal',
['draft'] = 'draft',
['timedtext'] = 'Timed Text page',
['module'] = 'module',
['topic'] = 'topic',
['gadget'] = 'gadget',
['gadget definition'] = 'gadget definition',
['talk'] = 'talk page',
['special'] = 'special page',
['media'] = 'file',
}
-- This table holds the names of the namespaces to be looked up from
-- cfg.pagetypes by default.
cfg.defaultNamespaces = {
'main',
'file',
'template',
'category',
'module'
}
-- This table holds the names of the namespaces to be looked up from
-- cfg.pagetypes if cfg.defaultnsExtended is set.
cfg.extendedNamespaces = {
'main',
'user',
'project',
'file',
'mediawiki',
'template',
'category',
'help',
'portal',
'module',
'draft'
}
-- The parameter name to set which default namespace values to be looked up from
-- cfg.pagetypes.
cfg.defaultns = 'defaultns'
-- The value of cfg.defaultns to set all namespaces, including talk.
cfg.defaultnsAll = 'all'
-- The value of cfg.defaultns to set the namespaces listed in
-- cfg.extendedNamespaces
cfg.defaultnsExtended = 'extended'
-- The value of cfg.defaultns to set no default namespaces.
cfg.defaultnsNone = 'none'
-- The parameter name to use for disambiguation pages page.
cfg.dab = 'dab'
-- This table holds the different possible aliases for disambiguation-class
-- pages. These should be lower-case.
cfg.dabAliases = {
'disambiguation',
'disambig',
'disamb',
'dab'
}
-- The default value for disambiguation pages.
cfg.dabDefault = 'page'
-- The parameter name to use for N/A-class page.
cfg.na = 'na'
-- This table holds the different possible aliases for N/A-class pages. These
-- should be lower-case.
cfg.naAliases = {'na', 'n/a'}
-- The default value for N/A-class pages.
cfg.naDefault = 'page'
-- The parameter name to use for redirects.
cfg.redirect = 'redirect'
-- The default value to use for redirects.
cfg.redirectDefault = 'redirect'
-- The parameter name for undefined namespaces.
cfg.other = 'other'
-- The value used if the module detects an undefined namespace.
cfg.otherDefault = 'page'
-- The usual suffix denoting a plural.
cfg.plural = 's'
-- This table holds plurals not formed by a simple suffix.
cfg.irregularPlurals = {
["category"] = "categories"
}
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line
qi8m5o0e66j9quw6kiawd2otsulzq9m
Module:ResolveEntityId
828
56477902
1074949613
1073901179
2022-03-03T02:11:37Z
Ahecht
2016996
Sync from sandbox. Follow Wikipedia redirects, remove _entityid() function. Feel free to revert if any more issues crop up.
Scribunto
text/plain
local p = {}
function p._id(idOrTitle, alt)
local function checkId(id)
if id and mw.wikibase.entityExists(id) then
local sitelink = mw.wikibase.getSitelink(id)
if sitelink then
return mw.wikibase.getEntityIdForTitle(sitelink) or mw.wikibase.getEntity(id).id
end
return mw.wikibase.getEntity(id).id
else
return alt
end
end
if type(idOrTitle) == 'string' then
idOrTitle = mw.ustring.upper(mw.ustring.sub(idOrTitle, 1, 1)) .. mw.ustring.sub(idOrTitle, 2)
if mw.wikibase.isValidEntityId(idOrTitle) then
-- idOrTitle is in the proper format for a Wikidata entity ID
return checkId(idOrTitle)
else
local eid = mw.wikibase.getEntityIdForTitle(idOrTitle)
if eid then
-- idOrTitle is a title that matches a Wikidata entity
local instanceOf = mw.wikibase.getBestStatements(eid, 'P31')[1] --instance of
if not instanceOf or instanceOf.mainsnak.datavalue.value.id ~= 'Q4167410' then
-- instance-of value is missing or is not "disambiguation"
return checkId(eid)
end
else
-- idOrTitle is a title, but no wikidata item exists for that title
local rtarget = mw.title.new(idOrTitle).redirectTarget
if rtarget then
-- title is a Wikipedia redirect
return p._id(rtarget.fullText, alt)
end
end
end
end
return alt
end
function p.entityid(frame)
return p._id(frame.args[1], frame.args[2])
end
return p
9l1sws0u0b0ltjr9lghqn47cx0xng74
Module:SDcat
828
64744418
973333723
973332619
2020-08-16T17:20:37Z
RexxS
6112901
if no connection to Wikidata, then do nothing
Scribunto
text/plain
--[[
SDcat
Module to check whether local short description matches that on Wikidata
--]]
local p = {}
-------------------------------------------------------------------------------
--[[
setCat has the qid of a Wikidata entity passed as |qid=
(it defaults to the associated qid of the current article if omitted)
and the local short description passed as |sd=
It returns a category if there is an associated Wikidata entity.
It returns one of the following tracking categories, as appropriate:
* Category:Short description matches Wikidata (case-insensitive)
* Category:Short description is different from Wikidata
* Category:Short description with empty Wikidata description
For testing purposes, a link prefix |lp= may be set to ":" to make the categories visible.
--]]
-- function exported for use in other modules
-- (local short description, Wikidata entity-ID, link prefix)
p._setCat = function(sdesc, itemID, lp)
if not mw.wikibase then return nil end
if itemID == "" then itemID = nil end
-- Wikidata description field
local wdesc = (mw.wikibase.getDescription(itemID) or ""):lower()
if wdesc == "" then
return "[[" .. lp .. "Category:Short description with empty Wikidata description]]"
elseif wdesc == sdesc then
return "[[" .. lp .. "Category:Short description matches Wikidata]]"
else
return "[[" .. lp .. "Category:Short description is different from Wikidata]]"
end
end
-- function exported for call from #invoke
p.setCat = function(frame)
local args
if frame.args.sd then
args = frame.args
else
args = frame:getParent().args
end
-- local short description
local sdesc = mw.text.trim(args.sd or ""):lower()
-- Wikidata entity-ID
local itemID = mw.text.trim(args.qid or "")
-- link prefix, strip quotes
local lp = mw.text.trim(args.lp or ""):gsub('"', '')
return p._setCat(sdesc, itemID, lp)
end
return p
cml06m2kvz7og9bi5f1xe6ylhi3d9a0
Module:Separated entries
828
46440383
874210307
847543373
2018-12-17T20:54:33Z
Amorymeltzer
141948
Changed protection level for "[[Module:Separated entries]]": [[WP:High-risk templates|High-risk Lua module]]: Over 2M transclusions ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
Scribunto
text/plain
-- This module takes positional parameters as input and concatenates them with
-- an optional separator. The final separator (the "conjunction") can be
-- specified independently, enabling natural-language lists like
-- "foo, bar, baz and qux". The starting parameter can also be specified.
local compressSparseArray = require('Module:TableTools').compressSparseArray
local p = {}
function p._main(args)
local separator = args.separator
-- Decode (convert to Unicode) HTML escape sequences, such as " " for space.
and mw.text.decode(args.separator) or ''
local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator
-- Discard values before the starting parameter.
local start = tonumber(args.start)
if start then
for i = 1, start - 1 do args[i] = nil end
end
-- Discard named parameters.
local values = compressSparseArray(args)
return mw.text.listToText(values, separator, conjunction)
end
local function makeInvokeFunction(separator, conjunction, first)
return function (frame)
local args = require('Module:Arguments').getArgs(frame)
args.separator = separator or args.separator
args.conjunction = conjunction or args.conjunction
args.first = first or args.first
return p._main(args)
end
end
p.main = makeInvokeFunction()
p.br = makeInvokeFunction('<br />')
p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain())
return p
r3n53qz4zycs3vxyo5ms9qjo1jm32bp
Module:Side box
828
42926982
1096940545
1033200411
2022-07-07T17:00:06Z
Izno
2927383
-mbox, templatestyled, table -> div
Scribunto
text/plain
local yesno = require('Module:Yesno')
local p = {}
local function makeData(args)
local data = {}
-- Main table classes
data.classes = {}
if yesno(args.metadata) ~= false then
table.insert(data.classes, 'metadata')
end
if args.position and args.position:lower() == 'left' then
table.insert(data.classes, 'side-box-left')
else
table.insert(data.classes, 'side-box-right')
end
if args.collapsible then
table.insert(data.classes, 'mw-collapsible')
if args.collapsible == "collapsed" then
table.insert(data.classes, 'mw-collapsed')
end
data.collapsible = true
end
table.insert(data.classes, args.class)
-- Image
if args.image and args.image ~= 'none' then
data.image = args.image
end
-- Copy over data that does not need adjusting
local argsToCopy = {
-- aria qualities
'role',
'labelledby',
-- Classes
'textclass',
-- Styles
'style',
'textstyle',
'templatestyles',
-- Above row
'above',
'abovestyle',
-- Body row
'text',
'imageright',
-- Below row
'below',
}
for i, key in ipairs(argsToCopy) do
data[key] = args[key]
end
return data
end
local function renderSidebox(data)
-- Renders the sidebox HTML.
-- Table root
local root = mw.html.create('div')
root:attr('role', data.role)
:attr('aria-labelledby', data.labelledby)
:addClass('side-box')
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
if data.style then
root:cssText(data.style)
end
-- The "above" row
if data.above then
local above = root:newline():tag('div')
above:addClass('side-box-abovebelow')
:newline()
:wikitext(data.above)
if data.textstyle then
above:cssText(data.textstyle)
end
if data.abovestyle then
above:cssText(data.abovestyle)
end
end
-- The body row
local body = root:newline():tag('div')
body:addClass('side-box-flex')
:addClass(data.collapsible and 'mw-collapsible-content')
:newline()
if data.image then
body:tag('div')
:addClass('side-box-image')
:wikitext(data.image)
end
local text = body:newline():tag('div')
text:addClass('side-box-text')
:addClass(data.textclass or 'plainlist')
if data.textstyle then
text:cssText(data.textstyle)
end
text:wikitext(data.text)
if data.imageright then
body:newline():tag('div')
:addClass('side-box-imageright')
:wikitext(data.imageright)
end
-- The below row
if data.below then
local below = root:newline():tag('div')
below
:addClass('side-box-abovebelow')
:wikitext(data.below)
if data.textstyle then
below:cssText(data.textstyle)
end
end
root:newline()
local frame = mw.getCurrentFrame()
local templatestyles = ''
if data.templatestyles then
templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = data.templatestyles }
}
end
return frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Side box/styles.css' }
} .. templatestyles .. tostring(root)
end
function p._main(args)
local data = makeData(args)
return renderSidebox(data)
end
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
return p
egcspx2irukqbdg26nexp0sq0xy7sp0
Module:Side box/styles.css
828
70885098
1097025294
1092089245
2022-07-08T05:47:00Z
Izno
2927383
give these a top/bottom margin in all cases, adjust min-width margin statements accordingly
sanitized-css
text/css
/* {{pp|small=y}} */
.side-box {
margin: 4px 0;
box-sizing: border-box;
border: 1px solid #aaa;
font-size: 88%;
line-height: 1.25em;
background-color: #f9f9f9;
}
.side-box-abovebelow,
.side-box-text {
padding: 0.25em 0.9em;
}
.side-box-image {
/* @noflip */
padding: 2px 0 2px 0.9em;
text-align: center;
}
.side-box-imageright {
/* @noflip */
padding: 2px 0.9em 2px 0;
text-align: center;
}
/* roughly the skin's sidebar + size of side box */
@media (min-width: 500px) {
.side-box-flex {
display: flex;
align-items: center;
}
.side-box-text {
flex: 1;
}
}
@media (min-width: 720px) {
.side-box {
width: 238px;
}
.side-box-right {
/* @noflip */
clear: right;
/* @noflip */
float: right;
/* @noflip */
margin-left: 1em;
}
/* derives from mbox classes, which do not float left in mbox-small-left
* so far as I can tell, that was a deliberate decision, since only .ambox
* supports mbox-left
*/
.side-box-left {
/* @noflip */
margin-right: 1em;
}
}
tgo3vjuu8j9tahz1x7359yicixmhme8
Module:String
828
38569505
970815276
924313232
2020-08-02T15:49:42Z
RexxS
6112901
separate annotations for str.match from those for str._match
Scribunto
text/plain
--[[
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 < 0 then
i = len + i + 1
end
if j < 0 then
j = len + j + 1
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' )
end
if j < 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) < 1 or math.abs(start) > 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 > 1 then
s = mw.ustring.sub( s, start )
end
local iterator = mw.ustring.gmatch(s, pattern)
if match_index > 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) > 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 >= "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 = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
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
cufmbepw7ml3gut4lchtqrhtj5r63cp
Module:String2
828
41360466
1087771622
1064289647
2022-05-14T12:03:50Z
GKFX
14918984
Copy changes by [[User:Tholme]] from [[Module:String2/sandbox]] per edit request.
Scribunto
text/plain
local p = {}
p.trim = function(frame)
return mw.text.trim(frame.args[1] or "")
end
p.sentence = function (frame)
-- {{lc:}} is strip-marker safe, string.lower is not.
frame.args[1] = frame:callParserFunction('lc', frame.args[1])
return p.ucfirst(frame)
end
p.ucfirst = function (frame )
local s = mw.text.trim( frame.args[1] or "" )
local s1 = ""
-- if it's a list chop off and (store as s1) everything up to the first <li>
local lipos = mw.ustring.find(s, "<li>" )
if lipos then
s1 = mw.ustring.sub(s, 1, lipos + 3)
s = mw.ustring.sub(s, lipos + 4)
end
-- s1 is either "" or the first part of the list markup, so we can continue
-- and prepend s1 to the returned string
local letterpos
if mw.ustring.find(s, "^%[%[[^|]+|[^%]]+%]%]") then
-- this is a piped wikilink, so we capitalise the text, not the pipe
local _
_, letterpos = mw.ustring.find(s, "|%W*%w") -- find the first letter after the pipe
else
letterpos = mw.ustring.find(s, '%w')
end
if letterpos then
local first = mw.ustring.sub(s, 1, letterpos - 1)
local letter = mw.ustring.sub(s, letterpos, letterpos)
local rest = mw.ustring.sub(s, letterpos + 1)
return s1 .. first .. mw.ustring.upper(letter) .. rest
else
return s1 .. s
end
end
p.title = function (frame )
-- http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html
-- recommended by The U.S. Government Printing Office Style Manual:
-- "Capitalize all words in titles of publications and documents,
-- except a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor."
local alwayslower = {['a'] = 1, ['an'] = 1, ['the'] = 1,
['and'] = 1, ['but'] = 1, ['or'] = 1, ['for'] = 1,
['nor'] = 1, ['on'] = 1, ['in'] = 1, ['at'] = 1, ['to'] = 1,
['from'] = 1, ['by'] = 1, ['of'] = 1, ['up'] = 1 }
local res = ''
local s = mw.text.trim( frame.args[1] or "" )
local words = mw.text.split( s, " ")
for i, s in ipairs(words) do
-- {{lc:}} is strip-marker safe, string.lower is not.
s = frame:callParserFunction('lc', s)
if i == 1 or alwayslower[s] ~= 1 then
s = mw.getContentLanguage():ucfirst(s)
end
words[i] = s
end
return table.concat(words, " ")
end
-- findlast finds the last item in a list
-- the first unnamed parameter is the list
-- the second, optional unnamed parameter is the list separator (default = comma space)
-- returns the whole list if separator not found
p.findlast = function(frame)
local s = mw.text.trim( frame.args[1] or "" )
local sep = frame.args[2] or ""
if sep == "" then sep = ", " end
local pattern = ".*" .. sep .. "(.*)"
local a, b, last = s:find(pattern)
if a then
return last
else
return s
end
end
-- stripZeros finds the first number and strips leading zeros (apart from units)
-- e.g "0940" -> "940"; "Year: 0023" -> "Year: 23"; "00.12" -> "0.12"
p.stripZeros = function(frame)
local s = mw.text.trim(frame.args[1] or "")
local n = tonumber( string.match( s, "%d+" ) ) or ""
s = string.gsub( s, "%d+", n, 1 )
return s
end
-- nowiki ensures that a string of text is treated by the MediaWiki software as just a string
-- it takes an unnamed parameter and trims whitespace, then removes any wikicode
p.nowiki = function(frame)
local str = mw.text.trim(frame.args[1] or "")
return mw.text.nowiki(str)
end
-- split splits text at boundaries specified by separator
-- and returns the chunk for the index idx (starting at 1)
-- #invoke:String2 |split |text |separator |index |true/false
-- #invoke:String2 |split |txt=text |sep=separator |idx=index |plain=true/false
-- if plain is false/no/0 then separator is treated as a Lua pattern - defaults to plain=true
p.split = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = args[1] or args.txt or ""
if txt == "" then return nil end
local sep = (args[2] or args.sep or ""):gsub('"', '')
local idx = tonumber(args[3] or args.idx) or 1
local plain = (args[4] or args.plain or "true"):sub(1,1)
plain = (plain ~= "f" and plain ~= "n" and plain ~= "0")
local splittbl = mw.text.split( txt, sep, plain )
if idx < 0 then idx = #splittbl + idx + 1 end
return splittbl[idx]
end
-- val2percent scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each number it finds into a percentage and returns the resultant string.
p.val2percent = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
local function v2p (x)
x = (tonumber(x) or 0) * 100
if x == math.floor(x) then x = math.floor(x) end
return x .. "%"
end
txt = txt:gsub("%d[%d%.]*", v2p) -- store just the string
return txt
end
-- one2a scans through a string, passed as either the first unnamed parameter or |txt=
-- it converts each occurrence of 'one ' into either 'a ' or 'an ' and returns the resultant string.
p.one2a = function(frame)
local args = frame.args
if not(args[1] or args.txt) then args = frame:getParent().args end
local txt = mw.text.trim(args[1] or args.txt or "")
if txt == "" then return nil end
txt = txt:gsub(" one ", " a "):gsub("^one", "a"):gsub("One ", "A "):gsub("a ([aeiou])", "an %1"):gsub("A ([aeiou])", "An %1")
return txt
end
-- findpagetext returns the position of a piece of text in a page
-- First positional parameter or |text is the search text
-- Optional parameter |title is the page title, defaults to current page
-- Optional parameter |plain is either true for plain search (default) or false for Lua pattern search
-- Optional parameter |nomatch is the return value when no match is found; default is nil
p._findpagetext = function(args)
-- process parameters
local nomatch = args.nomatch or ""
if nomatch == "" then nomatch = nil end
--
local text = mw.text.trim(args[1] or args.text or "")
if text == "" then return nil end
--
local title = args.title or ""
local titleobj
if title == "" then
titleobj = mw.title.getCurrentTitle()
else
titleobj = mw.title.new(title)
end
--
local plain = args.plain or ""
if plain:sub(1, 1) == "f" then plain = false else plain = true end
-- get the page content and look for 'text' - return position or nomatch
local content = titleobj and titleobj:getContent()
return content and mw.ustring.find(content, text, 1, plain) or nomatch
end
p.findpagetext = function(frame)
local args = frame.args
local pargs = frame:getParent().args
for k, v in pairs(pargs) do
args[k] = v
end
if not (args[1] or args.text) then return nil end
-- just the first value
return (p._findpagetext(args))
end
-- returns the decoded url. Inverse of parser function {{urlencode:val|TYPE}}
-- Type is:
-- QUERY decodes + to space (default)
-- PATH does no extra decoding
-- WIKI decodes _ to space
p._urldecode = function(url, type)
url = url or ""
type = (type == "PATH" or type == "WIKI") and type
return mw.uri.decode( url, type )
end
-- {{#invoke:String2|urldecode|url=url|type=type}}
p.urldecode = function(frame)
return mw.uri.decode( frame.args.url, frame.args.type )
end
-- what follows was merged from Module:StringFunc
-- helper functions
p._GetParameters = require('Module:GetParameters')
-- Argument list helper function, as per Module:String
p._getParameters = p._GetParameters.getParameters
-- Escape Pattern helper function so that all characters are treated as plain text, as per Module:String
function p._escapePattern( pattern_str)
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
end
-- Helper Function to interpret boolean strings, as per Module:String
p._getBoolean = p._GetParameters.getBoolean
--[[
Strip
This function Strips characters from string
Usage:
{{#invoke:String2|strip|source_string|characters_to_strip|plain_flag}}
Parameters
source: The string to strip
chars: The pattern or list of characters to strip from string, replaced with ''
plain: A flag indicating that the chars should be understood as plain text. defaults to true.
Leading and trailing whitespace is also automatically stripped from the string.
]]
function p.strip( frame )
local new_args = p._getParameters( frame.args, {'source', 'chars', 'plain'} )
local source_str = new_args['source'] or ''
local chars = new_args['chars'] or '' or 'characters'
source_str = mw.text.trim(source_str)
if source_str == '' or chars == '' then
return source_str
end
local l_plain = p._getBoolean( new_args['plain'] or true )
if l_plain then
chars = p._escapePattern( chars )
end
local result
result = mw.ustring.gsub(source_str, "["..chars.."]", '')
return result
end
--[[
Match any
Returns the index of the first given pattern to match the input. Patterns must be consecutively numbered.
Returns the empty string if nothing matches for use in {{#if:}}
Usage:
{{#invoke:String2|matchAll|source=123 abc|456|abc}} returns '2'.
Parameters:
source: the string to search
plain: A flag indicating that the patterns should be understood as plain text. defaults to true.
1, 2, 3, ...: the patterns to search for
]]
function p.matchAny(frame)
local source_str = frame.args['source'] or error('The source parameter is mandatory.')
local l_plain = p._getBoolean( frame.args['plain'] or true )
for i = 1, math.huge do
local pattern = frame.args[i]
if not pattern then return '' end
if mw.ustring.find(source_str, pattern, 1, l_plain) then
return tostring(i)
end
end
end
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
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
]]
function p.hyphen_to_dash( str, spacing )
if (str == nil or str == '') then
return str
end
local accept
str = mw.text.decode(str, true ) -- replace html entities with their characters; semicolon mucks up the text.split
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
item = mw.text.trim(item) -- trim whitespace
item, accept = item:gsub ('^%(%((.+)%)%)$', '%1')
if accept == 0 and 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
table.insert (out, item) -- add the (possibly modified) item to the output table
end
local temp_str = table.concat (out, ',' .. spacing) -- concatenate the output table into a comma separated string
temp_str, accept = temp_str:gsub ('^%(%((.+)%)%)$', '%1') -- remove accept-this-as-written markup when it wraps all of concatenated out
if accept ~= 0 then
temp_str = str:gsub ('^%(%((.+)%)%)$', '%1') -- when global markup removed, return original str; do it this way to suppress boolean second return value
end
return temp_str
end
function p.hyphen2dash( frame )
local str = frame.args[1] or ''
local spacing = frame.args[2] or ' ' -- space is part of the standard separator for normal spacing (but in conjunction with templates r/rp/ran we may need a narrower spacing
return p.hyphen_to_dash(str, spacing)
end
-- Similar to [[Module:String#endswith]]
function p.startswith(frame)
return (frame.args[1]:sub(1, frame.args[2]:len()) == frame.args[2]) and 'yes' or ''
end
return p
7novuiabacjj8enbp69666q0os29r7w
Module:TableTools
828
41371028
1069058368
1048120640
2022-01-31T13:08:18Z
MSGJ
42630
updates/fixes requested by [[User:Uzume]]
Scribunto
text/plain
------------------------------------------------------------------------------------
-- 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 >= 1 and floor(v) == v and v < 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 v ~= v
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)
checkType('shallowClone', 1, t, 'table')
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(arr)
checkType('removeDuplicates', 1, arr, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for _, v in ipairs(arr) 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 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 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 <= 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 _ in pairs(t) do
i = i + 1
end
return i
end
local function defaultKeySort(item1, item2)
-- "number" < "string", so numbers will be sorted before strings.
local type1, type2 = type(item1), type(item2)
if type1 ~= type2 then
return type1 < type2
elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then
return tostring(item1) < tostring(item2)
else
return item1 < item2
end
end
------------------------------------------------------------------------------------
-- keysToList
--
-- Returns an array 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 arr = {}
local index = 1
for k in pairs(t) do
arr[index] = k
index = index + 1
end
if keySort ~= false then
keySort = type(keySort) == 'function' and keySort or defaultKeySort
table.sort(arr, keySort)
end
return arr
end
------------------------------------------------------------------------------------
-- sortedPairs
--
-- 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 arr = p.keysToList(t, keySort, true)
local i = 0
return function ()
i = i + 1
local key = arr[i]
if key ~= nil then
return key, t[key]
else
return nil, nil
end
end
end
------------------------------------------------------------------------------------
-- isArray
--
-- Returns true if the given value is a table and all keys are consecutive
-- integers starting at 1.
------------------------------------------------------------------------------------
function p.isArray(v)
if type(v) ~= 'table' then
return false
end
local i = 0
for _ in pairs(v) do
i = i + 1
if v[i] == nil then
return false
end
end
return true
end
------------------------------------------------------------------------------------
-- isArrayLike
--
-- Returns true if the given value is iterable and all keys are consecutive
-- integers starting at 1.
------------------------------------------------------------------------------------
function p.isArrayLike(v)
if not pcall(pairs, v) then
return false
end
local i = 0
for _ in pairs(v) do
i = i + 1
if v[i] == nil then
return false
end
end
return true
end
------------------------------------------------------------------------------------
-- invert
--
-- Transposes the keys and values in an array. For example, {"a", "b", "c"} ->
-- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to
-- the index of the last duplicate) and NaN values are ignored.
------------------------------------------------------------------------------------
function p.invert(arr)
checkType("invert", 1, arr, "table")
local isNan = p.isNan
local map = {}
for i, v in ipairs(arr) do
if not isNan(v) then
map[v] = i
end
end
return map
end
------------------------------------------------------------------------------------
-- listToSet
--
-- Creates a set from the array part of the table. Indexing the set by any of the
-- values of the array returns true. For example, {"a", "b", "c"} ->
-- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them
-- never equal to any value (including other NaNs or even themselves).
------------------------------------------------------------------------------------
function p.listToSet(arr)
checkType("listToSet", 1, arr, "table")
local isNan = p.isNan
local set = {}
for _, v in ipairs(arr) do
if not isNan(v) then
set[v] = true
end
end
return set
end
------------------------------------------------------------------------------------
-- deepCopy
--
-- 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
------------------------------------------------------------------------------------
-- sparseConcat
--
-- Concatenates all values in the table that are indexed by a number, in order.
-- sparseConcat{a, nil, c, d} => "acd"
-- sparseConcat{nil, b, c, d} => "bcd"
------------------------------------------------------------------------------------
function p.sparseConcat(t, sep, i, j)
local arr = {}
local arr_i = 0
for _, v in p.sparseIpairs(t) do
arr_i = arr_i + 1
arr[arr_i] = v
end
return table.concat(arr, sep, i, j)
end
------------------------------------------------------------------------------------
-- length
--
-- 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
------------------------------------------------------------------------------------
-- inArray
--
-- Returns true if valueToFind is a member of the array, and false otherwise.
------------------------------------------------------------------------------------
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
0z6y1iz1ggzcjp1rhkrrhgprosuh475
Module:URL
828
38600887
998414802
907988365
2021-01-05T07:56:15Z
MSGJ
42630
fixes for pen icon
Scribunto
text/plain
--
-- This module implements {{URL}}
--
-- See unit tests at [[Module:URL/testcases]]
local p = {}
local function safeUri(s)
local success, uri = pcall(function()
return mw.uri.new(s)
end)
if success then
return uri
end
end
local function extractUrl(args)
for name, val in pairs(args) do
if name ~= 2 and name ~= "msg" then
local url = name .. "=" .. val;
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3')
local uri = safeUri(url);
if uri and uri.host then
return url
end
end
end
end
function p._url(url, text, msg)
url = mw.text.trim(url or '')
text = mw.text.trim(text or '')
local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N
if url == '' then
if text == '' then
if nomsg then
return nil
else
return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } }
end
else
return text
end
end
-- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL.
url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end)
-- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error
url = mw.ustring.gsub(url, '#$', '')
url = mw.ustring.gsub(url, '%?$', '')
-- If it's an HTTP[S] URL without the double slash, fix it.
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3')
-- Handle URLs from Wikidata of the format http://
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?)://', 'http%1://')
local uri = safeUri(url)
-- Handle URL's without a protocol and URL's that are protocol-relative,
-- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo
if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then
url = 'http://' .. url
uri = safeUri(url)
end
if text == '' then
if uri then
if uri.path == '/' then uri.path = '' end
local port = ''
if uri.port then port = ':' .. uri.port end
text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '')
-- Add <wbr> before _/.-# sequences
text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know.
text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1")
-- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now
text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1")
text = mw.ustring.gsub(text,"(_+)","<wbr/>%1")
else -- URL is badly-formed, so just display whatever was passed in
text = url
end
end
return mw.ustring.format('<span class="url">[%s %s]</span>', url, text)
end
--[[
The main entry point for calling from Template:URL.
--]]
function p.url(frame)
local templateArgs = frame.args
local parentArgs = frame:getParent().args
local url = templateArgs[1] or parentArgs[1]
local text = templateArgs[2] or parentArgs[2] or ''
local msg = templateArgs.msg or parentArgs.msg or ''
url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or ''
return p._url(url, text, msg)
end
--[[
The entry point for calling from the forked Template:URL2.
This function returns no message by default.
It strips out wiki-link markup, html tags, and everything after a space.
--]]
function p.url2(frame)
local templateArgs = frame.args
local parentArgs = frame:getParent().args
local url = templateArgs[1] or parentArgs[1]
local text = templateArgs[2] or parentArgs[2] or ''
-- default to no message
local msg = templateArgs.msg or parentArgs.msg or 'no'
url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or ''
-- if the url came from a Wikidata call, it might have a pen icon appended
-- we want to keep that and add it back at the end.
local u1, penicon = mw.ustring.match( url, "(.*)( <span class='penicon.*)" )
if penicon then url = u1 end
-- strip out html tags and [ ] from url
url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "")
-- truncate anything after a space
url = url:gsub("%%20", " "):gsub(" .*", "")
return (p._url(url, text, msg) or "") .. (penicon or "")
end
return p
mmtcfgkoaj98icy0uwzqcqtkbcrk02b
Module:Unicode data
828
57744930
1045659474
945547965
2021-09-21T18:56:34Z
Drmccreedy
1543097
Update for Unicode 14.0
Scribunto
text/plain
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 <= high do
mid = floor((low + high) / 2)
local range = ranges[mid]
if codepoint < range[1] then
high = mid - 1
elseif codepoint <= 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] <= codepoint and codepoint <= 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, "<control-%04X>" }, -- C0 control characters
{ 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters
{ 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A
{ 0x4E00, 0x9FFF, "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, "<surrogate-%04X>" },
{ 0xE000, 0xF8FF, "<private-use-%04X>" }, -- 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, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B
{ 0x2A700, 0x2B738, "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, "<private-use-%04X>" }, -- Plane 15 Private Use
{ 0x100000, 0x10FFFD, "<private-use-%04X>" } -- 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 < 0 or 0x10FFFF < 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 <= codepoint and (codepoint <= 0xFDEF
or floor(codepoint % 0x10000) >= 0xFFFE) then
return ("<noncharacter-%04X>"):format(codepoint)
end
if name_range_cache -- Check if previously used "name hook" applies to this code point.
and codepoint >= name_range_cache[1]
and codepoint <= 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 ("<reserved-%04X>"):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 >= 0x2000) and (cp <= 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 >= from then
table.insert(result, item)
end
end
return unpack(result)
end
local function compare_ranges(range1, range2)
return range1[1] < 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 > 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 < 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 <= codepoint and codepoint <= 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 <control-0000> from being
-- interpreted as HTML tags.
result = result:gsub("<", "<")
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
ow05ajlaszuscigi8a54dfk393ds43k
Module:Unsubst
828
40945493
1048913973
872090768
2021-10-08T18:22:16Z
Trappist the monk
10289486
sync from sandbox; see [[Module_talk:Unsubst#template_invocation_name_override|talk]];
Scribunto
text/plain
local checkType = require('libraryUtil').checkType
local p = {}
local BODY_PARAM = '$B'
local specialParams = {
['$params'] = 'parameter list',
['$aliases'] = 'parameter aliases',
['$flags'] = 'flags',
['$B'] = 'template content',
['$template-name'] = 'template invocation name override',
}
function p.main(frame, body)
-- If we are substing, this function returns a template invocation, and if
-- not, it returns the template body. The template body can be specified in
-- the body parameter, or in the template parameter defined in the
-- BODY_PARAM variable. This function can be called from Lua or from
-- #invoke.
-- Return the template body if we aren't substing.
if not mw.isSubsting() then
if body ~= nil then
return body
elseif frame.args[BODY_PARAM] ~= nil then
return frame.args[BODY_PARAM]
else
error(string.format(
"no template content specified (use parameter '%s' from #invoke)",
BODY_PARAM
), 2)
end
end
-- Sanity check for the frame object.
if type(frame) ~= 'table'
or type(frame.getParent) ~= 'function'
or not frame:getParent()
then
error(
"argument #1 to 'main' must be a frame object with a parent " ..
"frame available",
2
)
end
-- Find the invocation name.
local mTemplateInvocation = require('Module:Template invocation')
local name
if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then
name = frame.args['$template-name'] -- override whatever the template name is with this name
else
name = mTemplateInvocation.name(frame:getParent():getTitle())
end
-- Combine passed args with passed defaults
local args = {}
if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then
for k, v in pairs( frame:getParent().args ) do
args[k] = v
end
for k, v in pairs( frame.args ) do
if not specialParams[k] then
if v == '__DATE__' then
v = mw.getContentLanguage():formatDate( 'F Y' )
end
args[k] = v
end
end
else
for k, v in pairs( frame.args ) do
if not specialParams[k] then
if v == '__DATE__' then
v = mw.getContentLanguage():formatDate( 'F Y' )
end
args[k] = v
end
end
for k, v in pairs( frame:getParent().args ) do
args[k] = v
end
end
-- Trim parameters, if not specified otherwise
if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then
for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end
end
-- Pull information from parameter aliases
local aliases = {}
if frame.args['$aliases'] then
local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' )
for k, v in ipairs( list ) do
local tmp = mw.text.split( v, '%s*>%s*' )
aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2])
end
end
for k, v in pairs( aliases ) do
if args[k] and ( not args[v] or args[v] == '' ) then
args[v] = args[k]
end
args[k] = nil
end
-- Remove empty parameters, if specified
if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then
local tmp = 0
for k, v in ipairs( args ) do
if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then
tmp = k
else
break
end
end
for k, v in pairs( args ) do
if v == '' then
if not (type(k) == 'number' and k < tmp) then args[k] = nil end
end
end
end
-- Order parameters
if frame.args['$params'] then
local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {}
for k, v in ipairs(params) do
v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v
if args[v] then tmp[v], args[v] = args[v], nil end
end
for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end
args = tmp
end
return mTemplateInvocation.invocation(name, args)
end
p[''] = p.main -- For backwards compatibility
return p
eu3d3ip0gtd6n65iz4vmtpogb62rxdi
Module:Ustring
828
54019518
1054732251
1048762438
2021-11-11T19:53:02Z
Uzume
51070
remove new 's<n>' args from "tagargs"
Scribunto
text/plain
require('Module:No globals')
return setmetatable({}, {
__index = function(t, k)
local what = mw.ustring[k]
if type(what) ~= "function" then
return what
end
return function(frame)
local fargs = frame.args
local fargsused = { tag = true }
local args = {}
local str_i = 1
while fargs['s' .. str_i] do
fargsused['s' .. str_i] = true
args[str_i] = fargs['s' .. str_i]
str_i = str_i + 1
end
for i, v in ipairs(fargs) do
fargsused[i] = true
args[i + str_i - 1] = tonumber(v) or v:gsub("^\\", "", 1)
end
if not fargs.tag then
return (what(unpack(args))) -- Outside parens truncate to first result avoiding tail call
end
local tagargs = {}
for x, y in pairs(fargs) do
if not fargsused[x] then tagargs[x] = y end
end
return frame:extensionTag{name = fargs.tag, content = what(unpack(args)), args = tagargs}
end
end
})
43mk7f08s0ersn4iwx00lgtga7bopb7
Module:WLink
828
52075026
986222884
986222723
2020-10-30T15:03:05Z
Plastikspork
5075409
Import for [[Template:LDLBerlin]]
Scribunto
text/plain
local WLink = { suite = "WLink",
serial = "2016-10-05" };
--[=[
ansiPercent()
formatURL()
getArticleBase()
getBaseTitle()
getEscapedTitle()
getExtension()
getFile()
getFragment()
getLanguage()
getNamespace()
getPlain()
getProject()
getTarget()
getTargetPage()
getTitle()
getWeblink()
isBracketedLink()
isBracketedURL()
isCategorization()
isExternalLink()
isInterlanguage()
isInterwiki()
isMedia()
isTitledLink()
isValidLink()
isWikilink()
wikilink()
failsafe()
]=]
-- local globals
local URLutil = false;
local utilURL = function ()
-- Attach URLutil library module
-- Postcondition:
-- Returns table, with URLutil library
-- Throws error, if not available
if not URLutil then
local lucky, util = pcall( require, "Module:URLutil" );
if lucky then
if type( util ) == "table" then
URLutil = util.URLutil();
end
util = "library URLutil invalid";
end
if type( URLutil ) ~= "table" then
error( util, 0 );
end
end
return URLutil;
end -- utilURL()
local contentExtlink = function ( attempt )
-- Retrieve span of external link between brackets
-- Precondition:
-- attempt -- string, with presumable link
-- the first char is expected to be "["
-- Postcondition:
-- Returns string, number, number
-- string including whitespace
-- number with index of relevant "["
-- number with index after relevant "]"
-- false if nothing found
local r1 = false;
local r2 = false;
local r3 = attempt:find( "]", 2, true );
if r3 then
local s = attempt:sub( 2, r3 - 1 );
local i = s:find( "[", 1, true );
if i then
r1 = s:sub( i + 1 );
r2 = i;
else
r1 = s;
r2 = 1;
end
else
r3 = false;
end
return r1, r2, r3;
end -- contentExtlink()
local contentWikilink = function ( attempt )
-- Retrieve span of wikilink between brackets
-- Precondition:
-- attempt -- string, with presumable link
-- the first two chars are expected to be "[["
-- Postcondition:
-- Returns string, number, number
-- string including whitespace
-- number with index of relevant "[["
-- number with index after relevant "]]"
-- false if nothing found
local r1 = false;
local r2 = false;
local r3 = attempt:find( "]]", 3, true );
if r3 then
local s = attempt:sub( 3, r3 - 1 );
local i = s:find( "[[", 1, true );
if i then
r1 = s:sub( i + 2 );
r2 = i;
else
r1 = s;
r2 = 1;
end
end
return r1, r2, r3;
end -- contentWikilink()
local extractExtlink = function ( attempt )
-- Retrieve external link
-- Precondition:
-- attempt -- string, with presumable link
-- the first char is expected to be "["
-- Postcondition:
-- Returns string, string
-- first with target and title
-- second result false if not titled
-- false if nothing found
local r1 = false;
local r2 = false;
local s = contentExtlink( attempt );
if s then
local i = s:find( "%s", 1 );
if i then
r1 = s:sub( 1, i - 1 );
r2 = mw.text.trim( s:sub( i + 1 ) );
if r2 == "" then
r2 = false;
end
else
r1 = s;
end
if r1 then
r1 = mw.text.trim( r1 );
if r1 == "" or
not utilURL().isResourceURL( r1 ) then
r1 = false;
end
end
if not r1 then
r2 = false;
end
end
return r1, r2;
end -- extractExtlink()
local extractWikilink = function ( attempt )
-- Retrieve wikilink
-- Precondition:
-- attempt -- string, with presumable link
-- the first two chars are expected to be "[["
-- Postcondition:
-- Returns string, string
-- first with target
-- second result title, or false if not piped
-- false if nothing found
local r1 = false;
local r2 = false;
local s = contentWikilink( attempt );
if s then
local i = s:find( "|", 1, true );
if i then
r1 = s:sub( 1, i - 1 );
r2 = s:sub( i + 1 );
else
r1 = s;
end
r1 = mw.text.trim( r1 );
if r1 == "" then
r1 = false;
else
r1 = r1:gsub( "_", " " )
:gsub( " ", " " )
:gsub( " ", " " )
:gsub( " ", " " )
:gsub( " ", " " )
:gsub( " +", " " );
r1 = mw.text.decode( r1 );
end
end
return r1, r2;
end -- extractWikilink()
local prefix = function ( ask, ahead )
-- Interprete prefix of language or project type
-- Precondition:
-- ask -- string, with presumable prefix
-- ahead -- true, if first segment
-- Postcondition:
-- Returns string,string or nil
-- first string one of "lead", "lang", "project"
-- second string is formatted value
-- type is one of "lead", "lang", "project"
-- nil if nothing found
local r1, r2;
local prefixes = { b = true,
c = "commons",
d = true,
commons = true,
m = "meta",
mediawiki = "mw",
mw = true,
meta = true,
n = true,
q = true,
s = true,
simple = false,
v = true,
voy = true,
w = true,
wikibooks = "b",
wikidata = "d",
wikinews = "n",
wikipedia = "w",
wikiquote = "q",
wikisource = "s",
wikiversity = "v",
wikivoyage = "voy",
wikt = true,
wiktionary = "wikt"
};
local s = mw.text.trim( ask );
if s == "" then
if ahead then
r1 = "lead";
r2 = true;
end
else
local p;
s = s:lower();
p = prefixes[ s ];
if p == true then
r1 = "project";
r2 = s;
elseif p then
r1 = "project";
r2 = p;
elseif p == false then
r1 = "lang";
r2 = s;
elseif s:match( "^%l%l%l?$" )
and mw.language.isSupportedLanguage( s ) then
r1 = "lang";
r2 = s;
end
end
return r1, r2;
end -- prefix()
local target = function ( attempt, lonely )
-- Retrieve first target (wikilink or URL), or entire string
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- lonely -- remove fragment, if true
-- Postcondition:
-- Returns string, number
-- string, with detected link target, or entire
-- number, with number of brackets, if found, or 2
local r1, r2 = WLink.getTarget( attempt );
if not r1 then
r1 = mw.text.trim( attempt );
r2 = 2;
end
if lonely then
local i = r1:find( "#", 1, true );
if i == 1 then
r1 = "";
elseif i then
r1 = r1:sub( 1, i - 1 );
end
end
return r1, r2;
end -- target()
function WLink.ansiPercent( attempt, alter )
-- Convert string by ANSI encoding rather than UTF-8 encoding
-- Precondition:
-- attempt -- string, with presumable ANSI characters
-- alter -- string or nil, to use for spaces instead of %20
-- Postcondition:
-- Returns string, encoded
local k, s;
local r = attempt;
if alter then
r = r:gsub( " ", alter );
end
for i = mw.ustring.len( r ), 1, -1 do
k = mw.ustring.codepoint( r, i, i );
if k <= 32 or k > 126 then
if k > 255 then
s = mw.ustring.sub( r, i, i );
if k > 2047 then
s = string.format( "%%%2X%%%2X%%%2X",
s:byte( 1, 1 ),
s:byte( 2, 2 ),
s:byte( 3, 3 ) );
else
s = string.format( "%%%2X%%%2X",
s:byte( 1, 1 ),
s:byte( 2, 2 ) );
end
else
s = string.format( "%%%2X", k );
end
r = string.format( "%s%s%s",
mw.ustring.sub( r, 1, i - 1 ),
s,
mw.ustring.sub( r, i + 1 ) );
end
end -- for --i
r = mw.ustring.gsub(r, '^%*', '%%2A')
return r;
end -- WLink.ansiPercent()
function WLink.formatURL( adjust )
-- Create bracketed link, if not yet
-- Precondition:
-- adjust -- string, with URL or domain/path or bracketed link
-- Postcondition:
-- Returns string, with bracketed link
-- false on invalid format
local r;
if type( adjust ) == "string" then
if WLink.isBracketedLink( adjust ) then
r = adjust;
else
local url = mw.text.trim( adjust );
local host;
utilURL();
host = URLutil.getHost( adjust );
if not host then
url = "http://" .. adjust;
host = URLutil.getHost( url );
end
if host then
local path = URLutil.getRelativePath( url );
local show;
if path == "/" then
if not url:match( "/$" ) then
url = url .. "/";
end
show = host;
else
local i = path:find( "#" );
if i then
path = path:sub( 1, i - 1 );
end
show = host .. path;
end
r = string.format( "[%s %s]", url, show );
else
r = adjust;
end
end
else
r = false;
end
return r;
end -- WLink.formatURL()
function WLink.getArticleBase( attempt )
-- Retrieve generic article title, no fragment nor brackets
-- Precondition:
-- attempt -- string, with wikilink or page title
-- current page title, if missing
-- Postcondition:
-- Returns string, with identified lemma, or all
-- false on invalid format
local r;
if attempt then
local m;
r, m = target( attempt, true );
if m ~= 2 then
r = false;
end
else
r = mw.title.getCurrentTitle().text;
end
if r then
local sub = r:match( "^(.*%S) *%(.+%)$" );
if sub then
r = sub;
end
end
return r;
end -- WLink.getArticleBase()
function WLink.getBaseTitle( attempt )
-- Retrieve last segment in subpage, no fragment
-- Precondition:
-- attempt -- string, with wikilink or page title
-- Postcondition:
-- Returns string, with identified segment, or all
local r;
local s, m = target( attempt, true );
if m == 2 then
local sub = s:match( "/([^/]+)$" );
if sub then
r = sub;
else
r = s;
end
else
r = false;
end
return r;
end -- WLink.getBaseTitle()
function WLink.getEscapedTitle( attempt )
-- Retrieve escaped link title
-- Precondition:
-- attempt -- string, with presumable link title
-- Postcondition:
-- Returns string, with suitable link title
local s = mw.text.trim( attempt );
return s:gsub( "\n", " " )
:gsub( "%[", "[" )
:gsub( "%]", "]" )
:gsub( "|", "|" );
end -- WLink.getEscapedTitle()
function WLink.getExtension( attempt )
-- Retrieve media extension
-- Precondition:
-- attempt -- string, with wikilink (media link) or page title
-- if URL, PDF may be detected
-- Postcondition:
-- Returns string, with detected downcased media type
-- false if no extension found
local r = false;
local s, m = target( attempt );
if m == 2 then
s = s:match( "%.(%a+)$" );
if s then
r = s:lower();
end
elseif s:upper():match( "[%./](PDF)%W?" ) then
r = "pdf";
end
return r;
end -- WLink.getExtension()
function WLink.getFile( attempt )
-- Retrieve media page identifier
-- Precondition:
-- attempt -- string, with wikilink (media link) or page title
-- Postcondition:
-- Returns string, with detected file title
-- no namespace nor project
-- false if no file found
local r = false;
local s, m = target( attempt );
if m == 2 then
local slow = ":" .. s:lower();
local find = function ( a )
local seek = string.format( ":%s:().+%%.%%a+$",
a:lower() );
local join = slow:find( seek );
local ret;
if join then
ret = s:sub( join + #a + 1 );
end
return ret;
end;
r = find( "file" );
if not r then
local trsl = mw.site.namespaces[6];
r = find( trsl.name );
if not r then
trsl = trsl.aliases;
for k, v in pairs( trsl ) do
r = find( v );
if r then
break; -- for k, v
end
end -- for k, v
end
end
end
return r;
end -- WLink.getFile()
function WLink.getFragment( attempt )
-- Retrieve fragment
-- Precondition:
-- attempt -- string, with presumable fragment
-- Postcondition:
-- Returns string, with detected fragment
-- false if no address found
local r = false;
local s, m = target( attempt );
if s then
local i = s:find( "#", 1, true );
if i then
if i > 1 then
s = s:sub( i - 1 );
i = 2;
end
if s:find( "&#", 1, true ) then
s = mw.text.decode( s );
i = s:find( "#", 1, true );
if not i then
s = "";
i = 0;
end
end
s = s:sub( i + 1 );
r = mw.text.trim( s );
if r == "" then
r = false;
elseif m == 2 then
r = r:gsub( "%.(%x%x)", "%%%1" )
:gsub( "_", " " );
r = mw.uri.decode( r, "PATH" );
end
end
end
return r;
end -- WLink.getFragment()
function WLink.getLanguage( attempt )
-- Retrieve language project identifier
-- Precondition:
-- attempt -- string, with wikilink or page title
-- Postcondition:
-- Returns string, with detected downcased language identifier
-- false if no project language found
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and w.lang then
r = w.lang;
end
end
return r;
end -- WLink.getLanguage()
function WLink.getNamespace( attempt )
-- Retrieve namespace number
-- Precondition:
-- attempt -- string, with wikilink or page title
-- Postcondition:
-- Returns number, of detected namespace
-- false if no namespace found
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and not w.lang and not w.project and w.ns then
r = w.ns;
end
end
return r;
end -- WLink.getNamespace()
function WLink.getPlain( attempt )
-- Retrieve text with all links replaced by link titles
-- Precondition:
-- attempt -- string, with wikitext
-- Postcondition:
-- Returns string, with modified wikitext without links
local r = attempt;
local i = 1;
local j, k, n, lean, s, shift, space, suffix;
while ( true ) do
j = r:find( "[", i, true );
if j then
suffix = r:sub( j );
i = j + 1;
lean = ( r:byte( i, i ) == 91 );
if lean then
s, k, n = contentWikilink( suffix );
else
s, k, n = contentExtlink( suffix );
end
if s then
if k > 1 then
n = n - k;
i = j + k;
j = i - 1;
suffix = r:sub( j );
end
if lean then
s, shift = extractWikilink( suffix );
if s then
space = s:match( "^([^:]+):" );
if space then
space = mw.site.namespaces[ space ];
if space then
space = space.id;
end
end
if space == 6 or space == 14 then
shift = "";
elseif not shift then
shift = s;
end
else
s = "";
shift = "";
end
else
s, shift = extractExtlink( suffix );
if not s then
s = "";
end
if not shift then
shift = "";
end
i = i - 1;
end
if j > 1 then
s = r:sub( 1, j - 1 );
else
s = "";
end
r = string.format( "%s%s%s",
s, shift, r:sub( n + i ) );
i = i + #shift;
else
break; -- while true
end
else
break; -- while true
end
end -- while true
return r;
end -- WLink.getPlain()
function WLink.getProject( attempt )
-- Retrieve wikifarm project identifier
-- Precondition:
-- attempt -- string, with wikilink or page title
-- Postcondition:
-- Returns string, with detected downcased project identifier
-- false if no project identifier found
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and w.project then
r = w.project;
end
end
return r;
end -- WLink.getProject()
function WLink.getTarget( attempt )
-- Retrieve first target (wikilink or URL)
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns string, number
-- string, with first detected link target
-- number, with number of brackets, if found
-- false if nothing found
local r1 = false;
local r2 = false;
local i = attempt:find( "[", 1, true );
if i then
local m;
r1 = attempt:sub( i );
if r1:byte( 2, 2 ) == 91 then
m = 2;
r1 = extractWikilink( r1 );
else
m = 1;
r1 = extractExtlink( r1 );
end
if r1 then
r2 = m;
end
else
r1 = attempt:match( "%A?([hf]t?tps?://%S+)%s?" );
if r1 then
if utilURL().isResourceURL( r1 ) then
r2 = 0;
else
r1 = false;
end
else
r1 = false;
end
end
return r1, r2;
end -- WLink.getTarget()
function WLink.getTargetPage( attempt )
-- Retrieve first target page (page name or URL of page)
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns string, with first detected linked page
-- false if nothing found
local r1, r2 = WLink.getTarget( attempt );
if r1 then
local i = r1:find( "#", 1, true );
if i then
if i == 1 then
r1 = false;
else
r1 = mw.text.trim( r1:sub( 1, i - 1 ) );
end
end
end
return r1, r2;
end -- WLink.getTargetPage()
function WLink.getTitle( attempt )
-- Retrieve first link title (wikilink or URL), or wikilink target
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns string, with first detected link target
-- false if nothing found
local r = false;
local i = attempt:find( "[", 1, true );
if i then
local s1, s2;
r = attempt:sub( i );
if r:byte( 2, 2 ) == 91 then
s1, s2 = extractWikilink( r );
if s2 then
r = s2;
else
r = s1;
end
else
s1, r = extractExtlink( r );
end
end
return r;
end -- WLink.getTitle()
function WLink.getWeblink( attempt, anURLutil )
-- Retrieve bracketed link from resource URL
-- Precondition:
-- attempt -- string, with URL, or something different
-- anURLutil -- library module object, or nil
-- Postcondition:
-- Returns string, with first detected link target
-- false if nothing found
local second = ".ac.co.go.gv.or.";
local r;
if type( anURLutil ) == "table" then
URLutil = anURLutil;
else
utilURL();
end
if URLutil.isResourceURL( attempt ) then
local site = URLutil.getAuthority( attempt );
local show;
if #attempt == #site then
site = site .. "/";
end
show = URLutil.getTop3domain( "//" .. site );
if show then
local scan = "[%./](%a+)(%.%l%l%.)(%a+)$";
local search = "." .. show;
local s1, s2, s3 = search:match( scan );
if s2 then
if not second:find( s2, 1, true ) then
show = string.format( "%s.%s", s2, s3 );
end
else
show = false;
end
end
if not show then
show = URLutil.getTop2domain( "//" .. site );
if not show then
show = URLutil.getHost( "//" .. site );
end
end
r = string.format( "[%s %s]", attempt, show );
else
r = attempt;
end
return r;
end -- WLink.getWeblink()
function WLink.isBracketedLink( attempt )
-- Does attempt match a bracketed link?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local i = attempt:find( "[", 1, true );
if i then
local s = attempt:sub( i );
if s:byte( 2, 2 ) == 91 then
s = extractWikilink( s );
else
s = extractExtlink( s );
end
if s then
r = true;
end
end
return r;
end -- WLink.isBracketedLink()
function WLink.isBracketedURL( attempt )
-- Does attempt match a bracketed URL?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local s, r = WLink.getTarget( attempt );
return ( r == 1 );
end -- WLink.isBracketedURL()
function WLink.isCategorization( attempt )
-- Does attempt match a categorization?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and w.ns == 14
and not ( w.lead or w.lang or w.project )
and w.title ~= "" then
r = true;
end
end
return r;
end -- WLink.isCategorization()
function WLink.isExternalLink( attempt )
-- Does attempt match an external link?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local s, r = WLink.getTarget( attempt );
if r then
r = ( r < 2 );
end
return r;
end -- WLink.isExternalLink()
function WLink.isInterlanguage( attempt )
-- Does attempt match an interlanguage link?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and w.lang and not w.project and not w.lead
and w.title ~= "" then
r = true;
end
end
return r;
end -- WLink.isInterlanguage()
function WLink.isInterwiki( attempt )
-- Does attempt match an interwiki link within wikifarm?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and ( w.lang or w.project ) and w.title ~= "" then
r = true;
end
end
return r;
end -- WLink.isInterwiki()
function WLink.isMedia( attempt )
-- Does attempt match a media translusion?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local s, m = WLink.getTarget( attempt );
if m == 2 then
local w = WLink.wikilink( s );
if w and w.ns == 6
and not ( w.lead or w.lang or w.project )
and w.title ~= ""
and WLink.getExtension( w.title ) then
r = true;
end
end
return r;
end -- WLink.isMedia()
function WLink.isTitledLink( attempt )
-- Does attempt match a titled link?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local r = false;
local i = attempt:find( "[", 1, true );
if i then
local c, n;
local s = attempt:sub( i );
if s:byte( 2, 2 ) == 91 then
n = s:find( "%]%]", 5 );
c = "|";
else
n = s:find( "%]", 8 );
c = "%s%S";
end
if n then
local m = s:find( c, 2 );
if m and m + 1 < n and WLink.getTarget( attempt ) then
r = true;
end
end
end
return r;
end -- WLink.isTitledLink()
function WLink.isValidLink( attempt )
-- Does attempt match a link?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local s, r = WLink.getTarget( attempt );
if r then
r = true;
end
return r;
end -- WLink.isValidLink()
function WLink.isWikilink( attempt )
-- Does attempt match a wikilink?
-- Precondition:
-- attempt -- string, with presumable link somewhere
-- Postcondition:
-- Returns boolean
local s, m = WLink.getTarget( attempt );
return ( m == 2 );
end -- WLink.isWikilink()
function WLink.wikilink( attempt )
-- Retrieve wikilink components
-- Precondition:
-- attempt -- string, with presumable link
-- expected to be enclosed in "[[" "]]"
-- else wikilink
-- Postcondition:
-- Returns table or false
-- table of assignments with { type, value}
-- type is one of "lead",
-- "project", "lang",
-- "ns", "space", "title"
-- false if nothing found
local s = contentWikilink( attempt );
local got, n, r;
if not s then
s = attempt;
end
i = s:find( "|", 1, true );
if i then
s = s:sub( 1, i - 1 );
end
got = mw.text.split( s, ":" );
n = table.maxn( got );
if n == 1 then
r = { title = mw.text.trim( s ) };
else
local j, k, o, v;
r = { title = "" };
if n > 4 then
k = 4;
else
k = n - 1;
end
j = k;
for i = 1, j do
s = mw.text.trim( got[ i ] );
if s ~= "" then
o = mw.site.namespaces[ mw.text.trim( got[ i ] ) ];
if o then
r.ns = o.id;
r.space = o.name;
k = i + 1;
j = i - 1;
break; -- for i
end
end
end -- for i
for i = 1, j do
o, v = prefix( got[ i ], ( i == 1 ) );
if o then
if r[ o ] then
k = i;
break; -- for i
else
r[ o ] = v;
end
else
k = i;
break; -- for i
end
end -- for i
for i = k, n do
r.title = r.title .. got[ i ];
if i < n then
r.title = r.title .. ":";
end
end -- for i
end
if r.lead and
( r.project or not r.title or
( not r.lang and r.ns ~= 6 and r.ns ~= 14 ) ) then
r.lead = false;
end
return r;
end -- WLink.wikilink()
function WLink.failsafe( assert )
-- Retrieve versioning and check for compliance
-- Precondition:
-- assert -- string, with required version, or false
-- Postcondition:
-- Returns string with appropriate version, or false
local r;
if assert and assert > WLink.serial then
r = false;
else
r = WLink.serial;
end
return r
end -- WLink.failsafe()
local function Template( frame, action, leave, lone )
-- Run actual code from template transclusion
-- Precondition:
-- frame -- object
-- action -- string, with function name
-- leave -- true: keep whitespace around
-- lone -- true: permit call without parameters
-- Postcondition:
-- Return string; might be error message
local lucky = true;
local s = false;
local r = false;
local space;
for k, v in pairs( frame.args ) do
if k == 1 then
if leave then
s = v;
else
s = mw.text.trim( v );
end
elseif action == "ansiPercent" and k == "space" then
if v ~= "" then
space = v;
end
elseif k ~= "template" then
lucky = false;
if r then
r = r .. "|";
else
r = "Unknown parameter: ";
end
r = string.format( "%s%s=", r, k );
end
end -- for k, v
if lucky then
if s or lone then
lucky, r = pcall( WLink[ action ], s, space );
else
r = "Parameter missing";
lucky = false;
end
end
if lucky then
if type( r ) == "boolean" then
if r then
r = "1";
else
r = "";
end
end
else
r = string.format( "<span class=\"error\">%s</span>", r );
end
return r;
end -- Template()
-- Export
local p = { };
p.ansiPercent = function ( frame )
return Template( frame, "ansiPercent" );
end
p.formatURL = function ( frame )
return Template( frame, "formatURL" );
end
p.getArticleBase = function ( frame )
return Template( frame, "getArticleBase", false, true );
end
p.getBaseTitle = function ( frame )
return Template( frame, "getBaseTitle" );
end
p.getEscapedTitle = function ( frame )
return Template( frame, "getEscapedTitle" );
end
p.getExtension = function ( frame )
return Template( frame, "getExtension" );
end
p.getFile = function ( frame )
return Template( frame, "getFile" );
end
p.getFragment = function ( frame )
return Template( frame, "getFragment" );
end
p.getInterwiki = function ( frame )
return Template( frame, "getInterwiki" );
end
p.getLanguage = function ( frame )
return Template( frame, "getLanguage" );
end
p.getNamespace = function ( frame )
return tostring( Template( frame, "getNamespace" ) );
end
p.getPlain = function ( frame )
return Template( frame, "getPlain" );
end
p.getProject = function ( frame )
return Template( frame, "getProject" );
end
p.getTarget = function ( frame )
return Template( frame, "getTarget" );
end
p.getTargetPage = function ( frame )
return Template( frame, "getTargetPage" );
end
p.getTitle = function ( frame )
return Template( frame, "getTitle" );
end
p.getWeblink = function ( frame )
return Template( frame, "getWeblink" );
end
p.isBracketedLink = function ( frame )
return Template( frame, "isBracketedLink" );
end
p.isBracketedURL = function ( frame )
return Template( frame, "isBracketedURL" );
end
p.isCategorization = function ( frame )
return Template( frame, "isCategorization" );
end
p.isExternalLink = function ( frame )
return Template( frame, "isExternalLink" );
end
p.isInterlanguage = function ( frame )
return Template( frame, "isInterlanguage" );
end
p.isInterwiki = function ( frame )
return Template( frame, "isInterwiki" );
end
p.isMedia = function ( frame )
return Template( frame, "isMedia" );
end
p.isTitledLink = function ( frame )
return Template( frame, "isTitledLink" );
end
p.isValidLink = function ( frame )
return Template( frame, "isValidLink" );
end
p.isWeblink = function ( frame )
return Template( frame, "isWeblink" );
end
p.isWikilink = function ( frame )
return Template( frame, "isWikilink" );
end
p.failsafe = function ( frame )
local since = frame.args[ 1 ];
if since then
since = mw.text.trim( since );
if since == "" then
since = false;
end
end
return WLink.failsafe( since ) or "";
end
p.WLink = function ()
return WLink;
end
return p;
khcam6fvoqmge78bt0ettgz26jbcp1w
Module:Yesno
828
38665046
948473803
948472535
2020-04-01T06:27:55Z
MusikAnimal
14882394
Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]])
Scribunto
text/plain
-- 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
swdskn7svew8i9wuydn9uj5l3r2ghcs