Википедия rskwiki https://rsk.wikipedia.org/wiki/%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B8_%D0%B1%D0%BE%D0%BA MediaWiki 1.47.0-wmf.7 first-letter Медий Окреме Розгварка Хаснователь Розгварка зоз хасновательом Википедия Розгварка о Википедиї Файл Розгварка о файлу МедияВики Розгварка о МедияВикию Шаблон Розгварка о шаблону Помоц Розгварка о помоци Катеґория Розгварка о катеґориї TimedText TimedText talk Модул Разговор о модулу Event Event talk Ланц 0 234 19525 12280 2026-06-24T11:14:25Z Sveletanka 20 катеґория 19525 wikitext text/x-wiki '''Ланц''' (серб. ланац, слц. диял. lanc, lanec, láňec, укр. ланцюг, поль. łаńcuch, од мадяр. lánc) – тото слово ма у нашим язику два значеня: 1. прибор за капчанє: ланц на [[бициґла|бициґли]], ланц за статок и под. У технїки то шор злучених челїчних елементох зоз хторима ше преноши моц, вяже або виша терху итд. Ланц члєнковити: зложени є з єднаких, медзи собу повязаних шлєбодно рухомих карикох. Зависно од конструкциї, може витримац рижни обтерхованя. Єст ланци хтори шлєбодно рухоми у шицких напрямох и ланци хторим ставец нє оможлївює шлєбоду рушаня у єдним напряме; 2. мера за [[поверхносц]] жеми: парцела жеми од 1800 квадратни вати, 5750 квадратни [[метер]]и. Мера достала мено по ланцу хтори [[коваль]] кує зоз желєза, а хтори бул длугоки од 10 до 20 метери, зложени зоз длугших и кратших карикох. З нїм ше премерйовало жем, же би ше одредзело парцели и утвердзело власнїцтво над нїма. У [[Бачка|Бачкей]] длуго ланц споминани як мера за поверхносц (у [[Дюрдьов]]е ше и нєшка жем рахує на ланци), познєйше ше хаснує гольт (у [[Коцур]]е голт), а у новшим чаше и у урядових документох тоти велькосци ше виражує у гектарох. У народзе ше гвари же добра палєнка трима ланц (дробни ґомбульки), а тиж за дакого хто нємирни, нєдобри, нєстримани ше гвари же є як з ланца пущени. У науки о живих существох єст ткв. ланц костираня. == Литература == * Руско-сербски словнїк, Филозофски факултет, Одсек за русинистику, Нови Сад 2010, б. 358 * Словнїк руского народного язика I, А – Н, Филозофски факултет, Одсек за русинистику, Нови Сад 2017, б. 666 * Енциклопедия Нового Саду 12, КОС – ЛЕР, Нови Сад 1999, б. 270 == Вонкашнї вязи == * [https://sr.wikipedia.org/wiki/%D0%9B%D0%B0%D0%BD%D0%B0%D1%86_(%D0%BC%D0%B0%D1%88%D0%B8%D0%BD%D1%81%D0%BA%D0%B8_%D0%B5%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82) Ланац (машински елемент)] sr.wikipedia.org * [https://sr.wikipedia.org/wiki/%D0%9B%D0%B0%D0%BD%D0%B0%D1%86 Ланац] sr.wikipedia.org [[Катеґория:Мери за поверхносц жеми]] [[Катеґория:Архаизми]] s6rjjn0201hxylnr1vy9fgypog4ci08 Триола 0 2837 19523 19485 2026-06-24T08:53:59Z Sveletanka 20 додата катеґория 19523 wikitext text/x-wiki [[File:Triole 2 na 3.jpg|right|377x377px|Нотни приказ подзелєн дводїла на тродїл и наставанє неправилней тонскей групи — триола.]]'''Триола''' (франц. ''triolet'',анґл. ''triplets'', рсй. ''триоль'') то ритичне зявенє а настава так же єдну нотну вредносц подзелїме на три єднаки часци а нє на два.<ref> [https://archive.ph/20121222122138/http://slovari.yandex.ru/~%D0%BA%D0%BD%D0%B8%D0%B3%D0%B8/%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%B8%D0%B9%20%D0%BC%D1%83%D0%B7%D1%8B%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D1%81%D0%BB%D0%BE%D0%B2%D0%B0%D1%80%D1%8C/%D0%A2%D1%80%D0%B8%D0%BE%D0%BB%D1%8C/ Триола.] Архивировано из оригинала 22 декабря 2012 года. // Булучевский Ю., Фомин В. Краткий музыкальный словарь. — М.: Музыка, 2005. — б, 461</ref><ref>[https://archive.ph/20121222122138/http://slovari.yandex.ru/~%D0%BA%D0%BD%D0%B8%D0%B3%D0%B8/%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%B8%D0%B9%20%D0%BC%D1%83%D0%B7%D1%8B%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D1%81%D0%BB%D0%BE%D0%B2%D0%B0%D1%80%D1%8C/%D0%A2%D1%80%D0%B8%D0%BE%D0%BB%D1%8C/ Триоль.] Архивировано из оригинала 22 декабря 2012 года. // ''Булучевский Ю., Фомин В.'' Краткий музыкальный словарь. — М.: Музыка, 2005. — 461</ref> Триола [[File:Music-triplet.png|70x70px|Триола у штварцинох]] спада до ''нєправилней тонскей ґрупи'', прето же настава зоз дзелєньом нотней вредносци на '''3''' єднаки часци. '''Илустрация дзелєня нотней вредносци на триолу:''' :::: {| class="wikitable" border="1" cellpadding="3" cellspacing="24" style="align: center; margin:0.5em 0 0; border-style: solid; border:3px solid #999; border-right-width:2px; border-bottom-width:2px; border-collapse: collapse; font-size:120%;" |- style="background:#ffdead;" | '''Нотна вредносц''' | style="text-align:center;" | '''место на <big><span style="color:#8B0000;">2</big></span>''' | style="text-align:center;" | '''дзели ше </span>на <big><span style="color:#8B0000;">3</big> часци''' |- | style="background:#FAEBD7;" | Цала нота [[File:Whole note.gif|20px|]] | style="text-align:center;" | [[File:Half note.gif|30px|]][[File:Half note.gif|30]] | style="text-align:center;" | [[File:Halbe-Triole.png|65px]] |- | style="background:#f3fff3;" | Половка ноти [[File:Half note.gif|30px|]] | style="text-align:center;" | [[File:Quarter note.gif|30px|]][[File:Quarter note.gif|30px|]] | style="text-align:center;" | [[File:Music-triplet.png|80x80px|]] |- | style="background:#FAFAD2;" | Штврцина ноти[[File:Quarter note.gif|30px|]] | style="text-align:center;" | [[File:8thNote.svg|30px|]][[File:8thNote.svg|30px|]] | style="text-align:center;" | [[File:Achteltriole.png|100x100px]] |- | style="background:#FAFAD2;" | Осмина ноти [[File:8thNote.svg|30px|]] | style="text-align:center;" | [[File:Sixteenth note.gif|30px|]][[File:Sixteenth note.gif|30px|]] | style="text-align:center;" | [[File:Sixteenth Note Triplet Beam+2.png|60px|]] |} ▶ Кед нотну вредносц подзелїме на 5 часци — настава ''квинтола'', кед подзелїме на 6 — ''секстола'', на 7 — ''септола'' итд. == Способи записованя триоли == Триола ше записує <ref>Р. Лазић — В. Перичић, [https://klarinetknjige.wordpress.com/category/osnovi-teorije-muzike/ Основи теорије музике, Приступљено 25. 4. 2013.[непоуздан извор?]]</ref> зоз числом '''3''', на шлїдуюци способи: ♦ без нїчого [[File:Triola sa brojem.jpg|134x134px]][[File:Triplet semiquavers up.jpg|53x53px]] (нєт [[Лук (музика)|лук]], лєм число 3 над лєбо под нотами) ♦ зоз луком [[File:Polyrhythm.png|251x251px]] ♦ зоз угловасту заграду [[File:Achteltriole.png|69x69px]] == Комбинациї нотних вредносцох у триоли == Можлїви шлїдуюци комбинациї: ♦ Скапчани два [[Нота|ноти]] триоли до єдней ♦ Єдна нота триоли пунктирана (зоз точку) ♦ Єдна (або вецей) нота триоли подзелєна на менши нотни вредносци Приклад: Нотни и звучни {| class="wikitable" border="1" cellpadding="0" cellspacing="0" align="center" |- ! colspan="2" style="background:#FF9900;" |'''1. Скапчани два ноти триоли до єдней''' |- |[[File:Triola 1.jpg|центар|140px|]] |[[File:1. Triole.ogg|150px|]] |- ! colspan="2" style="background:#FF99CC;" |'''2. Єдна нота триоли пунктирана (зоз тачку)''' |- |[[File:Triola 2.jpg|центар|80px|]] |[[File:2. Punktirana triola.ogg|150px]] |- ! colspan="2" style="background:#FFFF00;" |'''3. Єдна (або вецей) ноти триоли подзелєни до менших нотних вредносцох''' |- |[[File:Triola 3.jpg|центар|150px|]] |[[File:3. Usitnjena triola.ogg|150px]]<nowiki>|</nowiki> |- |} Подобни можлїви комбинациї нотних вредносцох у триоли вельо векши як цо ту приказани.<ref>[https://klarinetknjige.wordpress.com/o-autorima/radivoj-lazic/ Радивој Лазић], [https://klarinetknjige.wordpress.com/literatura/339-2/ucim-klarinet-iv/ Школа за кларинет: Учим кларинет IV.] [https://web.archive.org/web/20121230142657/http://klarinetknjige.wordpress.com/literatura/339-2/ucim-klarinet-iv/ Архивирано] на веб-сајту [https://sr.wikipedia.org/wiki/Wayback_Machine Wayback Machine] (30. децембар 2012), Приступљено 25. 4. 2013.[непоуздан извор?]]</ref> == Даєдни комбинациї нотох и паузох у триоли == [[File:Triolen.png|center|thumb|360px|Приклад нотох и паузох у триоли]] [[File:Pauze i trola.ogg|right|thumb|250px|Звучанє комбинацойох нотох и паузох у триоли.]] Приказани лєм даєдни можлїви комбинациї триолох хтори у себе маю [[Пауза (музика)|паузи.]] Подобни ритмизовани можлївосци зоз паузами вельо векши и сучасни композиторе их барз комбиную зоз рижнима ритмичнима комбинациями. == Вонкашня вяза == * [https://www.youtube.com/watch?v=j7Ynq2UMZEo Triola - ritmička figura] youtube.com * [https://www.youtube.com/watch?v=9X2NEfEYbXg Триола-ритмична фиґура] {{Commonscat}} == Референци == [[Катеґория:Музика]] [[Катеґория:Теория музики]] [[Катеґория:Музични термини]] [[Катеґория:Музична нотация]] <references /> [[Катеґория:Нєправилни ритмични подзелєня]] [[Катеґория:Ритем (музика)]] 8zwjkh9lbn9anoabuckaabs4g6unfsb Квинтола 0 2869 19522 19501 2026-06-24T08:52:50Z Sveletanka 20 додата катеґория 19522 wikitext text/x-wiki [[File:Kwintool.png|right|thumb|139x139px|Квинтола]]'''Квинтола''' (франц. ''quintole''t, анґл. ''quintuplet'') настава так же ше єдна нотна вредносц подзели на пейц єднаки часци (место на штири).<ref>[https://www.youtube.com/shorts/STRQE5Oakks Kvintola]</ref> Квинтола ше означує: ♦ лєм зоз числом 5 (над або под ноти), [[File:Kwintool.png|71x71px]] ♦ зоз числом 5 и луком (над або под ноти), [[File:Chambers 1908 Music Quintuplet.png|126x126px]] ♦ зоз числом 5 и угласту заграду (над або под ноти). [[File:Hippopotamus rhythm.png|324x324px]] Квинтола спада до '''''нєправилней тонскей групи''''' прето же наства з дзелєньом нотней вредносци на '''5''' часци.<ref>[https://klarinetknjige.wordpress.com/o-autorima/radivoj-lazic/ Радивој Лазић], [https://klarinetknjige.wordpress.com/literatura/339-2/ucim-klarinet-iv/ Школа за кларинет: Учим кларинет IV][https://web.archive.org/web/20121230142657/http://klarinetknjige.wordpress.com/literatura/339-2/ucim-klarinet-iv/ Архивирано] на веб-сајту [https://sr.wikipedia.org/wiki/Wayback_Machine Wayback Machine] (30. децембар 2012), Приступљено 9. 4. 2013.[непоуздан извор?]</ref> Нотна вредносц ше место на 4 дзели на 5 часци. Илустрация наставаня квинтоли: {| border="1" cellpadding="3" cellspacing="24" class="wikitable" style="align:left; margin:0.5em 0 0; border-style:solid; border:3px solid #999; border-right-width:2px; border-bottom-width:2px; border-collapse:collapse; font-size:120%;" |- style="background:#ffdead;" | '''Нотна вредносц''' | style="text-align:center;"| '''место на <big><font color=#8B0000>4</big></font>''' | style="text-align:center;"| '''дзелї ше на <big><font color=#8B0000>5</big></font> часци''' |- | style="background:#FAEBD7;" | Цала нота [[File:Whole note.gif|30px]] | style="text-align:center;"| [[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]] | style="text-align:center;"| [[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]][[File:Quarter note.gif|25px]] |- | style="background:#f3fff3;" | Половка ноти [[File:Half note.gif|32px]] | style="text-align:center;"| [[File:Music-beam.svg|50px]][[File:Music-beam.svg|50px]] | style="text-align:center;"| [[File:Kwintool.png|100px]] |- | style="background:#FAFAD2;" | Шетврцина ноти [[File:Quarter note.gif|30px]] | style="text-align:center;"| [[File:Music-beam2.jpg|50px]][[File:Music-beam2.jpg|50px]] | style="text-align:center;"| [[File:Kvintola.jpg|center|50px|]][[File:Music-sixteenthnote.svg|30px]][[File:Music-sixteenthnote.svg|30px]][[File:Music-sixteenthnote.svg|30px]][[File:Music-sixteenthnote.svg|30px]][[File:Music-sixteenthnote.svg|30px]] |} ▶ Кед нотну вредносц подзелїме на 3 єднаки часци - настава [[триола]], кед подзелїме на 6 - секстола, на 7 - септола итд.<ref>[https://klarinetknjige.wordpress.com/o-autorima/radivoj-lazic/ Р. Лазић] - [https://sr.wikipedia.org/wiki/%D0%92%D0%BB%D0%B0%D1%81%D1%82%D0%B8%D0%BC%D0%B8%D1%80_%D0%9F%D0%B5%D1%80%D0%B8%D1%87%D0%B8%D1%9B В. Перичић] [https://klarinetknjige.wordpress.com/category/osnovi-teorije-muzike/ Основи теорије музике] Приступљено 9. 4. 2013.[непоуздан извор?]</ref> Нотни и звучни приклад квинтоли у композициї ''Пополаднє єдного фауна,'' (Клод Дебиси) [[File:Prelude to the Afternoon of a Faun dominant thirteenth chord.png|center|thumb|694x694px|[[File:Prelude to the Afternoon of a Faun dominant thirteenth chord.mid|Прелудиюм за Пополаднє єдного пауна]]]] == Вонкашнї вязи == * [https://www.youtube.com/shorts/V27YZanPHII Квинтола] Видео знїмок (русийски язик), youtube.com * [https://www.youtube.com/shorts/OKRo0XUPwgA Квинтола и Триола] Видео илустрация, youtube.com == Референци == <references /> [[Катеґория:Музика]] [[Катеґория:Теория музики]] [[Катеґория:Музични термини]] [[Катеґория:Нєправилни ритмични подзелєня]] [[Катеґория:Ритем (музика)]] 5wkrr5ej579voo6ehnws8dyfq8kwa3c Лак за нохци 0 3177 19505 19476 2026-06-23T17:07:05Z Saslavik 1716 Унєшени референци 19505 wikitext text/x-wiki [[Файл:Polished_purple_nails_with_nail_art_on.jpg|мини| Лаковани нохци]] [[Файл:Fingernägel-lackieren-IMG_2027.jpg|мини| Нохци на рукох пред и после наношеня червеного лаку за нохц]] [[Файл:Metti_(cropped).JPG|мини| Женски [[Прстен (накит)|ножни]] пальци украшени з лаком за нохци и [[Кана (боја)|каном]], а на другим пальцу ''metti'' (персцень за ножни пальци) за винчанє.]] '''Лак за нохци''' то лак хтори мож нанєсц на нохци рукох або ногох же би ше их украшело и защицело. Формула вецейраз ревидована же би ше злєпшало єй декоративни ефекти и онєможлївело пуканє або лупенє. Лак за нохци зложени з мишанїни орґанского полимера и даскельо других компонентох хтори му даваю єдинствену [[Фарба|фарбу]] и текстуру.<ref name="">{{Cite book|title=Chemical Composition Of Everyday Products|url=https://archive.org/details/chemicalcomposit0000toed_o6y5|last1=Toedt|first1=John|last2=Koza|first2=Darrell|last3=Cleef-Toedt|first3=Kathleen van|publisher=Greenwood Publishing Group|year=2005|isbn=978-0-313-32579-3|page=[https://archive.org/details/chemicalcomposit0000toed_o6y5/page/48 49]}}</ref> Лаки за нохци єст у шицких ниянсох фарбох и вони маю значну улогу у маникиру або педикиру. == Историят == Лак за нохци настал у Китаю и датирує зоз 3000. року п.н.е.<ref name="toedt49">{{Cite book|title=Chemical Composition Of Everyday Products|url=https://archive.org/details/chemicalcomposit0000toed_o6y5|last1=Toedt|first1=John|last2=Koza|first2=Darrell|last3=Cleef-Toedt|first3=Kathleen van|publisher=Greenwood Publishing Group|year=2005|isbn=978-0-313-32579-3|page=[https://archive.org/details/chemicalcomposit0000toed_o6y5/page/48 49]}}</ref> <ref name="sher119">{{Cite book|url=https://archive.org/details/forappearancesak00sher/page/119|title=For appearance' sake: The historical encyclopedia of good looks, beauty, and grooming|last1=Sherrow|first1=Victoria|publisher=Oryx Press|year=2001|isbn=978-1-57356-204-1|location=Phoenix|page=[https://archive.org/details/forappearancesak00sher/page/119 119]|url-access=registration}}</ref> Коло 600. року п.н.е. кральовска фамелия любела златну и стриберну фарбу. Медзитим, червена и чарна на концу заменєли тоти метални фарби. У Єгипту нїзши класи хасновали бляди фарби, а високе дружтво фарбело нохци на червенкаво-кафовкаво зоз кану.<ref>{{Cite book|title=Cosmetic Dermatology: Products and Procedures|last1=Draelos, Zoe Diana|publisher=John Wiley & Sons|year=2011|isbn=978-1-4443-5951-0|page=46}}</ref> <ref>{{Cite book|title=Milady's Standard Cosmetology|last1=Alpert, Arlene|last2=Altenburg, Margrit|last3=Bailey, Diane|publisher=Cengage Learning|year=2002|isbn=978-1-56253-879-8|page=8}}</ref> Мумификовани фараонє тиж мали нохци нафарбени з кану.<ref>{{Cite news|title=History of nail polish|last=Shah|first=Shikha|date=17 January 2014|work=The Times of India|id={{ProQuest|1477854392}}}}</ref> Офарбени лак за нохци ше зявел аж 1920-их рокох. Формули вчасних лакох за нохци креировани з помоцу основних состойкох як цо олєй лаванди, кармин, оксидни калай и олєй берґамоту. Частейше нохци лаковани з тонованима пудерами и кремами, а потим брушени док нє постаню блїщаци. Єдна файта продуктох за полированє хтору ше предавало у тим чаше була Ґрафова паста за нохци хиґло.<ref name=":0">{{Cite news|url=http://www.edwardianpromenade.com/beauty/on-how-to-be-lovely-2/|title=On How to Be Lovely|date=2010-04-15|work=Edwardian Promenade|access-date=2018-05-06|language=en-US}}</ref> == Состойки == [[Файл:Nitrocellulose-2D-skeletal.png|десно|мини| Нитроцелулоза то полимер хтори прави филм, а вон главни состойок векшини лакох за нохци.]] * Лак за нохци зложени зоз полимеру хтори прави филм, розложени у випарююцим орґанским розпущовачу. Звичайно то розпущенїна нитроцелулози у бутил ацетату або етил ацетату. Тота основна формулация преширена на шлїдуюце:<ref>{{Ullmann|title=Skin Cosmetics}}</ref> * Пластификатори даваю нєламаюци филми. Дибутил фталат и камфор типични пластификатори. * Фарби и пиґменти то злученїни хтори облапяю хромов оксид, хромов гидроксид, желєзни фероциянид, калайов диоксид, титанийов диоксид, желєзни оксид, кармин, ултрамарин и манґанвиолет.<ref name="Toedt">{{Cite book|title=Chemical Composition Of Everyday Products|url=https://archive.org/details/chemicalcomposit0000toed_o6y5|last1=Toedt|first1=John|last2=Koza|first2=Darrell|last3=Cleef-Toedt|first3=Kathleen van|publisher=Greenwood Publishing Group|year=2005|isbn=978-0-313-32579-3|page=[https://archive.org/details/chemicalcomposit0000toed_o6y5/page/50 50]}}</ref> * Опалесцентни пиґменти – блїщаци випатрунок у фарби можу дац лискуни, бизмут оксихлорид, природни бисери и алуминийов прах. * Адгезивни полимери обезпечую же би ше нитроцелулоза прилїпла на поверхносц нохца. Єден з модификаторох хтори ше хаснує то тосиламид-формалдехидна смола.<ref>{{cite web|author=|title=Tosylamide/Formaldehyde Resin|url=http://cosmeticsinfo.org/ingredient/tosylamideformaldehyde-resin-0|date=|access-date=25. 06. 2021|archive-date=07. 07. 2014|archive-url=https://web.archive.org/web/20140707100921/http://cosmeticsinfo.org/ingredient/tosylamideformaldehyde-resin-0|url-status=}}. cosmeticsinfo.org</ref> * Средства за згушньованє ше додава же би ше затримали блїщаци часточки у суспензиї док су у фляшки. Типичне средство за згушньованє то стеаралконий гекторит. * Ултралилово стабилизатори одпорни на пременки фарби кед сухи филм виложени [[Слунко|слунковей]] [[Шветлосц|шветлосци]]. Типични стабилизатор то бензофенон-1. == Файти == === Основне премасценє === Тота файта лаку бистра, млєчно офарбена або нєпревидна целовкаста формула лаку хтору ше хаснує пред наношеньом лаку.<ref> Molina, Christina (31. 3. 2014). „How to Actually Remove Glitter Nail Polish for Good”. Elle.com. Hearst Communications, Inc.. Приступљено 2. 4. 2014. </ref> Molina, Christina (31. 3. 2014). „How to Actually Remove Glitter Nail Polish for Good”. Elle.com. Hearst Communications, Inc.. Приступљено 2. 4. 2014."/> Його циль моцнєнє нохцох, реґенерация [[Влага|влаги]] у нохцох и помаганє лаку прилїпнуц ше за нохец. = Закончуюце премасценє = Тота файта лаку то бистра формула лаку у фарби хтору ше хаснує после наношеня лаку на нохци. Вона формує стварднуту бариєру хтора може зопрец здрапнуца и лупенє, а може тиж помогнуц же би ше основни офарбени лак швидко осушел. Лаку дава жадани випатрунок и помага же би ше лак длужей отримал.<ref name=":1">{{Cite news|url=https://www.goodhousekeeping.com/beauty/nails/a34522/why-base-coat-is-important/|title=The One Step You Should NEVER Skip in Your Mani|date=2015-09-21|work=Good Housekeeping|access-date=2018-05-06|language=en-US}}</ref> === Мат === Мат лак подобни як и звичайни лак, алє ше нє блїщи. Вон з часом постал барз популарни, бо го мож хасновац у апликацийох за нохци, дзе на нохцох мож креировац дизайни так же ше хаснує контраст блїщацих и мат [[Поверхносц|поверхносцох]]. == Мода == Лаки за нохци мож найсц у рижних фарбох и ниянсох. Коло твардих фарбох, лак за нохци розвил и велї други дизайни, як цо попукани, блїщаци, лупкасти, цифровани, иридесцентни и холоґрафски. Криштальове скло або другу декоративну уметносц ше тиж часто наноши на лак за нохци. Даєдни лаки ше рекламує за пошвидшанє роснуца нохцох, змоцньованє нохцох, онєможлївйованє ламаня нохцох, пуканє, та аж и застановенє окусованя нохцох == Дружтвени медиї == [[Файл:Nail_Polish.JPG|лево|мини| Колекция лакох за нохци]] Дружтвени медиї створели културу нохцох хтора оможлївює хасновательом же би дзелєли слики своїх нохцох. ''Women's Wear Daily'' пише же предаванє лакох у ЗАД 2012. досцигло рекордни 768 милиони америцки долари, цо 32% вецей у одношеню на 2011. рок.<ref name=":3">{{Cite web|url=http://style.time.com/2013/01/28/nail-polish-sales-hit-record-768-million-in-u-s/|title=Nail Polish Sales Hit Record $768 Million in U.S.|last=Sun|first=Feifei|date=2013-01-28|website=Time|access-date=2013-12-06}}</ref> У другей децениї 21. вику, як часц експлозиї уметносци нохцох, зявюю ше налїпки за нохци, шаблони, маґнетни лак,<ref>{{Cite web|url=http://www.self.com/story/the-science-behind-magnetic-na|title=The Science Behind Magnetic Nail Polish|last=Romanowski|first=Shannon|website=Self.com|access-date=22 June 2017}}</ref> [[Клайбас|клайбаси]], блїщаци закончуюци премасценя, блїскотки, кавияр за нохци (микро пацерки), лак за нохци хтори ше предава за хлопох, пахняци лак за нохци и лак за нохци хтори меня фарбу кед є на слунку. [[Файл:Wikidata_nail_polish_02.jpg|мини| Хлопи и жени зоз офарбенима нохцами на [[Wikimania|Викиманиї]], 2016]] Нє барз звичайне же би хлопи лаґовали нохци, а таки поступок мож тримац за потупйованє традиционалних родових нормох.<ref> Edwards, Nelta M. (октобар 2010). . „Using Nail Polish to Teach about Gender and Homophobia”. Teaching Sociology. 38 (4): 362—372. doi:10.1177/0092055X10378821.</ref> Хаснованє уключує превидни лак за защиту нохцох од ламаня або за даванє пестованей блїщацосци на нохцох.<ref>{{Cite news|url=https://www.nytimes.com/2013/06/13/fashion/manly-manicures-end-in-color.html|title=Manly Manicures End in Color|date=2013-06-12|work=The New York Times|access-date=2015-07-14}}</ref> Професионални бейзбол бавяче, окреме тоти цо лапаю лабду, можу на терену мац лак за нохци.<ref>{{Cite web|url=https://melmagazine.com/en-us/story/everything-we-know-about-baseball-manicures-and-nail-polish|title=Everything We Know about Baseball Manicures and Nail Polish|last=Graff|first=Jesse|websi == Знїмач лаку за нохци == Средство за знїманє лаку за нохци то орґански розпущовач у хторим тиж єст олєю, пахи и фарби. Найчастейши одстраньовач то ацетон. Вон тиж може одстранїц штучни нохци з акрилу або стварднутого ґелу. Ацетонитрил ше тиж хаснує як средство за одстраньованє лакох, алє є токсичнєйши, та є забранєни у Европи за хаснованє у козметики од 17. марца 2000.<ref>{{cite web|author=|title=Twenty-Fifth Commission Directive 2000/11/EC of 10 March 2000 adapting to technical progress Annex II to Council Directive 76/768/EEC on the approximation of laws of the Member States relating to cosmetic products.|url=http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF|date=|access-date=25. 06. 2021|archive-date=30. 05. 2013|archive-url=https://web.archive.org/web/20130530012749/http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF|url-status=}} ''[[Official Journal of the European Communities|OJEC]]'' L65 of 14 March 2000, pp. 22–25.</ref> == Здравствени проблеми == Оспорює ше здравствени ризики хтори повязани з лаком за нохци. Шанси же би вон нанєсол даяку чкоду хасновательом барз мали.<ref>{{Cite journal|last=Bender|first1=Michele|year=2004|title=Nail polish gets a healthy makeover|journal=Health|volume=18|issue=10|page=34}}</ref> З озбильнєйшим здравственим ризиком стретаю ше професионални технїчаре за нохци, хтори маникир окончую прейґ роботней поверхносци, познатей як столїк за нохци, на хторим ше клиєнтово руки находза директно под зону диханя технїчара. Прето видумани вентилацийни системи хтори можу зменшац виложеносц хемикалийом за найменєй 50%.<ref name="Marlow">{{Cite journal|last=Marlow|first1=David A.|last2=Looney|first2=Timothy|last3=Reutman|first3=Susan|date=September 2012|title=An Evaluation of Local Exhaust Ventilation Systems for Controlling Hazardous Exposures in Nail Salons (EPHB Report No. 005-164)|url=https://www.cdc.gov/niosh/surveyreports/pdfs/005-164.pdf|publisher=Department of Health and Human Services, Centers for Disease Control and Prevention, National Institute for Occupational Safety and Health|access-date=5 March 2013}}</ref> Даєдни удиховани и абсорбовани орґански розпущовачи хтори єст у салонох за нохци, як цо ґликол етри и дисулфид углєнїку, можу мац неґативни ефекти на репродуктивне здравє.<ref name="Reutman">{{Cite web|url=http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|title=Nail Salon Table Evaluation|last=Reutman|first=Susan|date=3 March 2009|website=National Institute for Occupational Safety and Health (NIOSH) Science Blog|publisher=Centers for Disease Control and Prevention|access-date=3 April 2014|archive-date=25. 05. 2014|archive-url=https://web.archive.org/web/20140525034821/http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|url-status=}}</ref> Формулациї лакох за нохци можу мац токсични состойки або таки цо уплївую на други здравствени проблеми. Єдна контроверзна ґрупа состойкох то фталати <ref name="Color">Cunningham, J. (2013) "Color cosmetics" in ''Chemistry and Technology of the Cosmetics and Toiletries Industry''. D. F. Williams and W. H. Schmitt (eds.). Springer. {{ISBN|978-94-010-7194-9}}.</ref> хтори можу спричинїц ендокрине поремеценє. Трошительни ґрупи примушели продуковательох зменшац або елиминовац потенциялно токсични состойки,<ref name="Torquay">{{Cite web|url=http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|title=Dangers of Nail Polish – Toxic Chemicals in your nail polish|date=1 April 2014|website=TorquayHeraldExpress.co.uk|publisher=Local World, Ltd.|archive-url=https://web.archive.org/web/20140405210446/http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|archive-date=5 April 2014|url-status=dead|access-date=2 April 2014|quote=With inviting names such as peaches and cream or Caramel Smoothie, you are led away from the potential dangers of these polishes, with some ingredients that are known cancer-causing chemicals and those toxic to the nervous system. The top three chemicals of concern are toluene, dibutyl phthalate (dbp) and formaldehyde – the so-called 'toxic trio'.}}</ref> а даскельо компаниї ше зложели же буду поступнє утарговац дибутил фталати.<ref name="NYT">{{Cite news|url=https://www.nytimes.com/2006/09/07/fashion/07nails.html?_r=0|title=Nail Polish Makers Yield on Disputed Chemical|last=Singer|first=Natasha|date=7 September 2006|work=The New York Times}}</ref> <ref>[http://www.cbsnews.com/news/phthalate-chemicals-in-nail-polish-hair-sprays-tied-to-raised-diabetes-risk-in-women/ Phthalate chemicals in nail polish, hair sprays tied to raised diabetes risk in women]. CBS News (2012-07-16). Retrieved on 2015-11-22.</ref> Нєт универзални стандарди безпечносци трошительох за лаки, гоч формалдехид елиминовани з даєдних маркох лакох, а други го и далєй хасную.<ref>{{Cite web|url=http://www.cosmeticsdesign.com/Formulation-Science/Nail-Polish-manufacturers-remove-potentially-harmful-chemicals|title=Nail Polish manufacturers remove potentially harmful chemicals|last=Simon|first=Pitman|date=30 August 2006|website=Cosmetic Design USA|publisher=William Reed Business Media}}</ref> === Предписаня и старанє о животним штредку === Сан Франциско у Америки принєсол варошску уредбу, явно идентификуюци установи хтори хасную лаки за нохци без „токсичного триа“: дибутил фталату, толуену и формалдехиду.<ref>{{Cite news|url=https://www.nytimes.com/2010/11/11/us/11nails.html?_r=1&|title=At Some Nail Salons, Feeling Pretty and Green|last=Brown|first=Patricia Leigh|date=10 November 2010|work=The New York Times}}</ref> Даєдни реґулаторни цела у Лос Андєлесу, лак за нохци тримаю за опасни одпад.<ref>{{Cite web|url=http://www.ladpw.org/epd/hhw/|title=What is Household Hazardous Waste (HHW)?|publisher=County of Los Angeles Department of Public Works|access-date=7 August 2013}}</ref> Велї жеми маю строги огранїченя за посиланє лакох за нохци по пошти.<ref>{{Cite web|url=http://www.royalmail.com/personal/help-and-support/Tell-me-about-Restricted-Goods|title=Restricted goods – personal customers: Things we can carry in UK post but with restrictions|publisher=Royal Mail|access-date=2013-12-06}}</ref> <ref>{{Cite web|url=https://www.usps.com/ship/hazardous-domestic-popup.htm|title=Restricted and Hazardous Materials|publisher=US Postal Service|access-date=2013-12-06}}</ref> „Отровни трио“ ше утаргує, алє ище вше єст компоненти лакох за нохци хтори би могли направиц проблеми за животни штредок. Висипованє фляшкох до жеми може спричинїц контаминацию под'жемней води.<ref>{{Cite news|url=http://www.footfiles.com/beauty/nail-design/article/stop-why-you-shouldnt-throw-old-nail-polish-in-the-trash|title=STOP: Why You Shouldn't Throw Old Nail Polish In The Trash|date=2016-07-31|access-date=2018-05-06|language=en}}</ref> <ref>{{Cite web|url=https://www.fda.gov/Cosmetics/ProductsIngredients/Products/ucm127068.htm|title=Nail Care Products|website=fda.gov|publisher=Food and Drug Administration}}</ref> Хром (III) оксид желєна и пруско белава фарба части у лакох за нохци и доказане же преходза през хемийне розкладанє, цо би могло мац чкодлїви уплїв на здравє. == Референци == [[Катеґория:Хемийни мишанїни]] [[Катеґория:Козметика]] hch8asnc9afh9tv0fffevjoycr5dnvd 19509 19505 2026-06-23T17:43:14Z Olirk55 19 Ушорена поновена (1) референца 19509 wikitext text/x-wiki [[Файл:Polished_purple_nails_with_nail_art_on.jpg|мини| Лаковани нохци]] [[Файл:Fingernägel-lackieren-IMG_2027.jpg|мини| Нохци на рукох пред и после наношеня червеного лаку за нохц]] [[Файл:Metti_(cropped).JPG|мини| Женски [[Прстен (накит)|ножни]] пальци украшени з лаком за нохци и [[Кана (боја)|каном]], а на другим пальцу ''metti'' (персцень за ножни пальци) за винчанє.]] '''Лак за нохци''' то лак хтори мож нанєсц на нохци рукох або ногох же би ше их украшело и защицело. Формула вецейраз ревидована же би ше злєпшало єй декоративни ефекти и онєможлївело пуканє або лупенє. Лак за нохци зложени з мишанїни орґанского полимера и даскельо других компонентох хтори му даваю єдинствену [[Фарба|фарбу]] и текстуру.<ref name=":2">Toedt, John; Koza, Darrell; Cleef-Toedt, Kathleen van (2005). [https://archive.org/details/chemicalcomposit0000toed_o6y5 Chemical Composition Of Everyday Products. Greenwood Publishing Group.] стр. 49. ISBN 978-0-313-32579-3.</ref> Лаки за нохци єст у шицких ниянсох фарбох и вони маю значну улогу у маникиру або педикиру. == Историят == Лак за нохци настал у Китаю и датирує зоз 3000. року п.н.е.<ref name=":2" /><ref>Sherrow, Victoria (2001). [https://archive.org/details/forappearancesak00sher/page/119 ''For appearance' sake: The historical encyclopedia of good looks, beauty, and grooming''.] Phoenix: Oryx Press. стр. [https://archive.org/details/forappearancesak00sher/page/119 119.]ISBN 978-1-57356-204-1.</ref> Коло 600. року п.н.е. кральовска фамелия любела златну и стриберну фарбу. Медзитим, червена и чарна на концу заменєли тоти метални фарби. У Єгипту нїзши класи хасновали бляди фарби, а високе дружтво фарбело нохци на червенкаво-кафовкаво зоз кану.<ref>{{Cite book|title=Cosmetic Dermatology: Products and Procedures|last1=Draelos, Zoe Diana|publisher=John Wiley & Sons|year=2011|isbn=978-1-4443-5951-0|page=46}}</ref> <ref>{{Cite book|title=Milady's Standard Cosmetology|last1=Alpert, Arlene|last2=Altenburg, Margrit|last3=Bailey, Diane|publisher=Cengage Learning|year=2002|isbn=978-1-56253-879-8|page=8}}</ref> Мумификовани фараонє тиж мали нохци нафарбени з кану.<ref>{{Cite news|title=History of nail polish|last=Shah|first=Shikha|date=17 January 2014|work=The Times of India|id={{ProQuest|1477854392}}}}</ref> Офарбени лак за нохци ше зявел аж 1920-их рокох. Формули вчасних лакох за нохци креировани з помоцу основних состойкох як цо олєй лаванди, кармин, оксидни калай и олєй берґамоту. Частейше нохци лаковани з тонованима пудерами и кремами, а потим брушени док нє постаню блїщаци. Єдна файта продуктох за полированє хтору ше предавало у тим чаше була Ґрафова паста за нохци хиґло.<ref name=":0">{{Cite news|url=http://www.edwardianpromenade.com/beauty/on-how-to-be-lovely-2/|title=On How to Be Lovely|date=2010-04-15|work=Edwardian Promenade|access-date=2018-05-06|language=en-US}}</ref> == Состойки == [[Файл:Nitrocellulose-2D-skeletal.png|десно|мини| Нитроцелулоза то полимер хтори прави филм, а вон главни состойок векшини лакох за нохци.]] * Лак за нохци зложени зоз полимеру хтори прави филм, розложени у випарююцим орґанским розпущовачу. Звичайно то розпущенїна нитроцелулози у бутил ацетату або етил ацетату. Тота основна формулация преширена на шлїдуюце:<ref>{{Ullmann|title=Skin Cosmetics}}</ref> * Пластификатори даваю нєламаюци филми. Дибутил фталат и камфор типични пластификатори. * Фарби и пиґменти то злученїни хтори облапяю хромов оксид, хромов гидроксид, желєзни фероциянид, калайов диоксид, титанийов диоксид, желєзни оксид, кармин, ултрамарин и манґанвиолет.<ref name="Toedt">{{Cite book|title=Chemical Composition Of Everyday Products|url=https://archive.org/details/chemicalcomposit0000toed_o6y5|last1=Toedt|first1=John|last2=Koza|first2=Darrell|last3=Cleef-Toedt|first3=Kathleen van|publisher=Greenwood Publishing Group|year=2005|isbn=978-0-313-32579-3|page=[https://archive.org/details/chemicalcomposit0000toed_o6y5/page/50 50]}}</ref> * Опалесцентни пиґменти – блїщаци випатрунок у фарби можу дац лискуни, бизмут оксихлорид, природни бисери и алуминийов прах. * Адгезивни полимери обезпечую же би ше нитроцелулоза прилїпла на поверхносц нохца. Єден з модификаторох хтори ше хаснує то тосиламид-формалдехидна смола.<ref>{{cite web|author=|title=Tosylamide/Formaldehyde Resin|url=http://cosmeticsinfo.org/ingredient/tosylamideformaldehyde-resin-0|date=|access-date=25. 06. 2021|archive-date=07. 07. 2014|archive-url=https://web.archive.org/web/20140707100921/http://cosmeticsinfo.org/ingredient/tosylamideformaldehyde-resin-0|url-status=}}. cosmeticsinfo.org</ref> * Средства за згушньованє ше додава же би ше затримали блїщаци часточки у суспензиї док су у фляшки. Типичне средство за згушньованє то стеаралконий гекторит. * Ултралилово стабилизатори одпорни на пременки фарби кед сухи филм виложени [[Слунко|слунковей]] [[Шветлосц|шветлосци]]. Типични стабилизатор то бензофенон-1. == Файти == === Основне премасценє === Тота файта лаку бистра, млєчно офарбена або нєпревидна целовкаста формула лаку хтору ше хаснує пред наношеньом лаку.<ref> Molina, Christina (31. 3. 2014). „How to Actually Remove Glitter Nail Polish for Good”. Elle.com. Hearst Communications, Inc.. Приступљено 2. 4. 2014. </ref> Molina, Christina (31. 3. 2014). „How to Actually Remove Glitter Nail Polish for Good”. Elle.com. Hearst Communications, Inc.. Приступљено 2. 4. 2014."/> Його циль моцнєнє нохцох, реґенерация [[Влага|влаги]] у нохцох и помаганє лаку прилїпнуц ше за нохец. = Закончуюце премасценє = Тота файта лаку то бистра формула лаку у фарби хтору ше хаснує после наношеня лаку на нохци. Вона формує стварднуту бариєру хтора може зопрец здрапнуца и лупенє, а може тиж помогнуц же би ше основни офарбени лак швидко осушел. Лаку дава жадани випатрунок и помага же би ше лак длужей отримал.<ref name=":1">{{Cite news|url=https://www.goodhousekeeping.com/beauty/nails/a34522/why-base-coat-is-important/|title=The One Step You Should NEVER Skip in Your Mani|date=2015-09-21|work=Good Housekeeping|access-date=2018-05-06|language=en-US}}</ref> === Мат === Мат лак подобни як и звичайни лак, алє ше нє блїщи. Вон з часом постал барз популарни, бо го мож хасновац у апликацийох за нохци, дзе на нохцох мож креировац дизайни так же ше хаснує контраст блїщацих и мат [[Поверхносц|поверхносцох]]. == Мода == Лаки за нохци мож найсц у рижних фарбох и ниянсох. Коло твардих фарбох, лак за нохци розвил и велї други дизайни, як цо попукани, блїщаци, лупкасти, цифровани, иридесцентни и холоґрафски. Криштальове скло або другу декоративну уметносц ше тиж часто наноши на лак за нохци. Даєдни лаки ше рекламує за пошвидшанє роснуца нохцох, змоцньованє нохцох, онєможлївйованє ламаня нохцох, пуканє, та аж и застановенє окусованя нохцох == Дружтвени медиї == [[Файл:Nail_Polish.JPG|лево|мини| Колекция лакох за нохци]] Дружтвени медиї створели културу нохцох хтора оможлївює хасновательом же би дзелєли слики своїх нохцох. ''Women's Wear Daily'' пише же предаванє лакох у ЗАД 2012. досцигло рекордни 768 милиони америцки долари, цо 32% вецей у одношеню на 2011. рок.<ref name=":3">{{Cite web|url=http://style.time.com/2013/01/28/nail-polish-sales-hit-record-768-million-in-u-s/|title=Nail Polish Sales Hit Record $768 Million in U.S.|last=Sun|first=Feifei|date=2013-01-28|website=Time|access-date=2013-12-06}}</ref> У другей децениї 21. вику, як часц експлозиї уметносци нохцох, зявюю ше налїпки за нохци, шаблони, маґнетни лак,<ref>{{Cite web|url=http://www.self.com/story/the-science-behind-magnetic-na|title=The Science Behind Magnetic Nail Polish|last=Romanowski|first=Shannon|website=Self.com|access-date=22 June 2017}}</ref> [[Клайбас|клайбаси]], блїщаци закончуюци премасценя, блїскотки, кавияр за нохци (микро пацерки), лак за нохци хтори ше предава за хлопох, пахняци лак за нохци и лак за нохци хтори меня фарбу кед є на слунку. [[Файл:Wikidata_nail_polish_02.jpg|мини| Хлопи и жени зоз офарбенима нохцами на [[Wikimania|Викиманиї]], 2016]] Нє барз звичайне же би хлопи лаґовали нохци, а таки поступок мож тримац за потупйованє традиционалних родових нормох.<ref> Edwards, Nelta M. (октобар 2010). . „Using Nail Polish to Teach about Gender and Homophobia”. Teaching Sociology. 38 (4): 362—372. doi:10.1177/0092055X10378821.</ref> Хаснованє уключує превидни лак за защиту нохцох од ламаня або за даванє пестованей блїщацосци на нохцох.<ref>{{Cite news|url=https://www.nytimes.com/2013/06/13/fashion/manly-manicures-end-in-color.html|title=Manly Manicures End in Color|date=2013-06-12|work=The New York Times|access-date=2015-07-14}}</ref> Професионални бейзбол бавяче, окреме тоти цо лапаю лабду, можу на терену мац лак за нохци.<ref><nowiki>{{Cite web|url=</nowiki>https://melmagazine.com/en-us/story/everything-we-know-about-baseball-manicures-and-nail-polish|title=Everything We Know about Baseball Manicures and Nail Polish|last=Graff|first=Jesse|websi ==Знїмач лаку за нохци== Средство за знїманє лаку за нохци то орґански розпущовач у хторим тиж єст олєю, пахи и фарби. Найчастейши одстраньовач то ацетон. Вон тиж може одстранїц штучни нохци з акрилу або стварднутого ґелу. Ацетонитрил ше тиж хаснує як средство за одстраньованє лакох, алє є токсичнєйши, та є забранєни у Европи за хаснованє у козметики од 17. марца 2000.<nowiki><ref></nowiki>{{cite web|author=|title=Twenty-Fifth Commission Directive 2000/11/EC of 10 March 2000 adapting to technical progress Annex II to Council Directive 76/768/EEC on the approximation of laws of the Member States relating to cosmetic products.|url=http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF|date=|access-date=25. 06. 2021|archive-date=30. 05. 2013|archive-url=https://web.archive.org/web/20130530012749/http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF|url-status=}} ''[[Official Journal of the European Communities|OJEC]]'' L65 of 14 March 2000, pp. 22–25.</ref> == Здравствени проблеми == Оспорює ше здравствени ризики хтори повязани з лаком за нохци. Шанси же би вон нанєсол даяку чкоду хасновательом барз мали.<ref>{{Cite journal|last=Bender|first1=Michele|year=2004|title=Nail polish gets a healthy makeover|journal=Health|volume=18|issue=10|page=34}}</ref> З озбильнєйшим здравственим ризиком стретаю ше професионални технїчаре за нохци, хтори маникир окончую прейґ роботней поверхносци, познатей як столїк за нохци, на хторим ше клиєнтово руки находза директно под зону диханя технїчара. Прето видумани вентилацийни системи хтори можу зменшац виложеносц хемикалийом за найменєй 50%.<ref name="Marlow">{{Cite journal|last=Marlow|first1=David A.|last2=Looney|first2=Timothy|last3=Reutman|first3=Susan|date=September 2012|title=An Evaluation of Local Exhaust Ventilation Systems for Controlling Hazardous Exposures in Nail Salons (EPHB Report No. 005-164)|url=https://www.cdc.gov/niosh/surveyreports/pdfs/005-164.pdf|publisher=Department of Health and Human Services, Centers for Disease Control and Prevention, National Institute for Occupational Safety and Health|access-date=5 March 2013}}</ref> Даєдни удиховани и абсорбовани орґански розпущовачи хтори єст у салонох за нохци, як цо ґликол етри и дисулфид углєнїку, можу мац неґативни ефекти на репродуктивне здравє.<ref name="Reutman">{{Cite web|url=http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|title=Nail Salon Table Evaluation|last=Reutman|first=Susan|date=3 March 2009|website=National Institute for Occupational Safety and Health (NIOSH) Science Blog|publisher=Centers for Disease Control and Prevention|access-date=3 April 2014|archive-date=25. 05. 2014|archive-url=https://web.archive.org/web/20140525034821/http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|url-status=}}</ref> Формулациї лакох за нохци можу мац токсични состойки або таки цо уплївую на други здравствени проблеми. Єдна контроверзна ґрупа состойкох то фталати <ref name="Color">Cunningham, J. (2013) "Color cosmetics" in ''Chemistry and Technology of the Cosmetics and Toiletries Industry''. D. F. Williams and W. H. Schmitt (eds.). Springer. {{ISBN|978-94-010-7194-9}}.</ref> хтори можу спричинїц ендокрине поремеценє. Трошительни ґрупи примушели продуковательох зменшац або елиминовац потенциялно токсични состойки,<ref name="Torquay">{{Cite web|url=http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|title=Dangers of Nail Polish – Toxic Chemicals in your nail polish|date=1 April 2014|website=TorquayHeraldExpress.co.uk|publisher=Local World, Ltd.|archive-url=https://web.archive.org/web/20140405210446/http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|archive-date=5 April 2014|url-status=dead|access-date=2 April 2014|quote=With inviting names such as peaches and cream or Caramel Smoothie, you are led away from the potential dangers of these polishes, with some ingredients that are known cancer-causing chemicals and those toxic to the nervous system. The top three chemicals of concern are toluene, dibutyl phthalate (dbp) and formaldehyde – the so-called 'toxic trio'.}}</ref> а даскельо компаниї ше зложели же буду поступнє утарговац дибутил фталати.<ref name="NYT">{{Cite news|url=https://www.nytimes.com/2006/09/07/fashion/07nails.html?_r=0|title=Nail Polish Makers Yield on Disputed Chemical|last=Singer|first=Natasha|date=7 September 2006|work=The New York Times}}</ref> <ref>[http://www.cbsnews.com/news/phthalate-chemicals-in-nail-polish-hair-sprays-tied-to-raised-diabetes-risk-in-women/ Phthalate chemicals in nail polish, hair sprays tied to raised diabetes risk in women]. CBS News (2012-07-16). Retrieved on 2015-11-22.</ref> Нєт универзални стандарди безпечносци трошительох за лаки, гоч формалдехид елиминовани з даєдних маркох лакох, а други го и далєй хасную.<ref>{{Cite web|url=http://www.cosmeticsdesign.com/Formulation-Science/Nail-Polish-manufacturers-remove-potentially-harmful-chemicals|title=Nail Polish manufacturers remove potentially harmful chemicals|last=Simon|first=Pitman|date=30 August 2006|website=Cosmetic Design USA|publisher=William Reed Business Media}}</ref> === Предписаня и старанє о животним штредку === Сан Франциско у Америки принєсол варошску уредбу, явно идентификуюци установи хтори хасную лаки за нохци без „токсичного триа“: дибутил фталату, толуену и формалдехиду.<ref>{{Cite news|url=https://www.nytimes.com/2010/11/11/us/11nails.html?_r=1&|title=At Some Nail Salons, Feeling Pretty and Green|last=Brown|first=Patricia Leigh|date=10 November 2010|work=The New York Times}}</ref> Даєдни реґулаторни цела у Лос Андєлесу, лак за нохци тримаю за опасни одпад.<ref>{{Cite web|url=http://www.ladpw.org/epd/hhw/|title=What is Household Hazardous Waste (HHW)?|publisher=County of Los Angeles Department of Public Works|access-date=7 August 2013}}</ref> Велї жеми маю строги огранїченя за посиланє лакох за нохци по пошти.<ref>{{Cite web|url=http://www.royalmail.com/personal/help-and-support/Tell-me-about-Restricted-Goods|title=Restricted goods – personal customers: Things we can carry in UK post but with restrictions|publisher=Royal Mail|access-date=2013-12-06}}</ref> <ref>{{Cite web|url=https://www.usps.com/ship/hazardous-domestic-popup.htm|title=Restricted and Hazardous Materials|publisher=US Postal Service|access-date=2013-12-06}}</ref> „Отровни трио“ ше утаргує, алє ище вше єст компоненти лакох за нохци хтори би могли направиц проблеми за животни штредок. Висипованє фляшкох до жеми може спричинїц контаминацию под'жемней води.<ref>{{Cite news|url=http://www.footfiles.com/beauty/nail-design/article/stop-why-you-shouldnt-throw-old-nail-polish-in-the-trash|title=STOP: Why You Shouldn't Throw Old Nail Polish In The Trash|date=2016-07-31|access-date=2018-05-06|language=en}}</ref> <ref>{{Cite web|url=https://www.fda.gov/Cosmetics/ProductsIngredients/Products/ucm127068.htm|title=Nail Care Products|website=fda.gov|publisher=Food and Drug Administration}}</ref> Хром (III) оксид желєна и пруско белава фарба части у лакох за нохци и доказане же преходза през хемийне розкладанє, цо би могло мац чкодлїви уплїв на здравє. == Референци == [[Катеґория:Хемийни мишанїни]] [[Катеґория:Козметика]] e8zd2ajnjjesqrdlffi25icustds8yl 19519 19509 2026-06-23T21:10:02Z Saslavik 1716 19519 wikitext text/x-wiki [[Файл:Polished_purple_nails_with_nail_art_on.jpg|мини| Лаковани нохци]] [[Файл:Fingernägel-lackieren-IMG_2027.jpg|мини| Нохци на рукох пред и после наношеня червеного лаку за нохц]] [[Файл:Metti_(cropped).JPG|мини| Женски [[Прстен (накит)|ножни]] пальци украшени з лаком за нохци и [[Кана (боја)|каном]], а на другим пальцу ''metti'' (персцень за ножни пальци) за винчанє.]] '''Лак за нохци''' то лак хтори мож нанєсц на нохци рукох або ногох же би ше их украшело и защицело. Формула вецейраз ревидована же би ше злєпшало єй декоративни ефекти и онєможлївело пуканє або лупенє. Лак за нохци зложени з мишанїни орґанского полимера и даскельо других компонентох хтори му даваю єдинствену [[Фарба|фарбу]] и текстуру.<ref name=":2">Toedt, John; Koza, Darrell; Cleef-Toedt, Kathleen van (2005). [https://archive.org/details/chemicalcomposit0000toed_o6y5 Chemical Composition Of Everyday Products. Greenwood Publishing Group.] стр. 49. ISBN 978-0-313-32579-3.</ref> Лаки за нохци єст у шицких ниянсох фарбох и вони маю значну улогу у маникиру або педикиру. == Историят == Лак за нохци настал у Китаю и датирує зоз 3000. року п.н.е.<ref name=":2" /><ref>Sherrow, Victoria (2001). [https://archive.org/details/forappearancesak00sher/page/119 ''For appearance' sake: The historical encyclopedia of good looks, beauty, and grooming''.] Phoenix: Oryx Press. стр. [https://archive.org/details/forappearancesak00sher/page/119 119.]ISBN 978-1-57356-204-1.</ref> Коло 600. року п.н.е. кральовска фамелия любела златну и стриберну фарбу. Медзитим, червена и чарна на концу заменєли тоти метални фарби. У Єгипту нїзши класи хасновали бляди фарби, а високе дружтво фарбело нохци на червенкаво-кафовкаво зоз кану.<ref>Alpert, Arlene; Altenburg, Margrit; Bailey, Diane (2002). Milady's Standard Cosmetology. Cengage Learning. стр. 8. ISBN 978-1-56253-879-8.</ref> Мумификовани фараонє тиж мали нохци нафарбени з кану.<ref>{{Cite news|title=History of nail polish|last=Shah|first=Shikha|date=17 January 2014|work=The Times of India|id={{ProQuest|1477854392}}}}</ref> Офарбени лак за нохци ше зявел аж 1920-их рокох. Формули вчасних лакох за нохци креировани з помоцу основних состойкох як цо олєй лаванди, кармин, оксидни калай и олєй берґамоту. Частейше нохци лаковани з тонованима пудерами и кремами, а потим брушени док нє постаню блїщаци. Єдна файта продуктох за полированє хтору ше предавало у тим чаше була Ґрафова паста за нохци хиґло.<ref> Shah, Shikha (17. 1. 2014). „History of nail polish”. The Times of India. ProQuest 1477854392.</ref> == Состойки == [[Файл:Nitrocellulose-2D-skeletal.png|десно|мини| Нитроцелулоза то полимер хтори прави филм, а вон главни состойок векшини лакох за нохци.]] * Лак за нохци зложени зоз полимеру хтори прави филм, розложени у випарююцим орґанским розпущовачу. Звичайно то розпущенїна нитроцелулози у бутил ацетату або етил ацетату. Тота основна формулация преширена на шлїдуюце:<ref>{{Ullmann|title=Skin Cosmetics}}</ref> * Пластификатори даваю нєламаюци филми. Дибутил фталат и камфор типични пластификатори. * Фарби и пиґменти то злученїни хтори облапяю хромов оксид, хромов гидроксид, желєзни фероциянид, калайов диоксид, титанийов диоксид, желєзни оксид, кармин, ултрамарин и манґанвиолет.<ref name="Toedt">{{Cite book|title=Chemical Composition Of Everyday Products|url=https://archive.org/details/chemicalcomposit0000toed_o6y5|last1=Toedt|first1=John|last2=Koza|first2=Darrell|last3=Cleef-Toedt|first3=Kathleen van|publisher=Greenwood Publishing Group|year=2005|isbn=978-0-313-32579-3|page=[https://archive.org/details/chemicalcomposit0000toed_o6y5/page/50 50]}}</ref> * Опалесцентни пиґменти – блїщаци випатрунок у фарби можу дац лискуни, бизмут оксихлорид, природни бисери и алуминийов прах. * Адгезивни полимери обезпечую же би ше нитроцелулоза прилїпла на поверхносц нохца. Єден з модификаторох хтори ше хаснує то тосиламид-формалдехидна смола.<ref> „Tosylamide/Formaldehyde Resin”. Архивирано из оригинала 07. 07. 2014. г. Приступљено 25. 06. 2021.. cosmeticsinfo.org </ref> * Средства за згушньованє ше додава же би ше затримали блїщаци часточки у суспензиї док су у фляшки. Типичне средство за згушньованє то стеаралконий гекторит. * Ултралилово стабилизатори одпорни на пременки фарби кед сухи филм виложени [[Слунко|слунковей]] [[Шветлосц|шветлосци]]. Типични стабилизатор то бензофенон-1. == Файти == === Основне премасценє === Тота файта лаку бистра, млєчно офарбена або нєпревидна целовкаста формула лаку хтору ше хаснує пред наношеньом лаку.<ref>Molina, Christina (31. 3. 2014). „How to Actually Remove Glitter Nail Polish for Good”. Elle.com. Hearst Communications, Inc.. Приступљено 2. 4. 2014. </ref> Його циль моцнєнє нохцох, реґенерация [[Влага|влаги]] у нохцох и помаганє лаку прилїпнуц ше за нохец. = Закончуюце премасценє = Тота файта лаку то бистра формула лаку у фарби хтору ше хаснує после наношеня лаку на нохци. Вона формує стварднуту бариєру хтора може зопрец здрапнуца и лупенє, а може тиж помогнуц же би ше основни офарбени лак швидко осушел. Лаку дава жадани випатрунок и помага же би ше лак длужей отримал.<ref name=":1">{{Cite news|url=https://www.goodhousekeeping.com/beauty/nails/a34522/why-base-coat-is-important/|title=The One Step You Should NEVER Skip in Your Mani|date=2015-09-21|work=Good Housekeeping|access-date=2018-05-06|language=en-US}}</ref> === Мат === Мат лак подобни як и звичайни лак, алє ше нє блїщи. Вон з часом постал барз популарни, бо го мож хасновац у апликацийох за нохци, дзе на нохцох мож креировац дизайни так же ше хаснує контраст блїщацих и мат [[Поверхносц|поверхносцох]]. == Мода == Лаки за нохци мож найсц у рижних фарбох и ниянсох. Коло твардих фарбох, лак за нохци розвил и велї други дизайни, як цо попукани, блїщаци, лупкасти, цифровани, иридесцентни и холоґрафски. Криштальове скло або другу декоративну уметносц ше тиж часто наноши на лак за нохци. Даєдни лаки ше рекламує за пошвидшанє роснуца нохцох, змоцньованє нохцох, онєможлївйованє ламаня нохцох, пуканє, та аж и застановенє окусованя нохцох == Дружтвени медиї == [[Файл:Nail_Polish.JPG|лево|мини| Колекция лакох за нохци]] Дружтвени медиї створели културу нохцох хтора оможлївює хасновательом же би дзелєли слики своїх нохцох. ''Women's Wear Daily'' пише же предаванє лакох у ЗАД 2012. досцигло рекордни 768 милиони америцки долари, цо 32% вецей у одношеню на 2011. рок.<ref name=":3">{{Cite web|url=http://style.time.com/2013/01/28/nail-polish-sales-hit-record-768-million-in-u-s/|title=Nail Polish Sales Hit Record $768 Million in U.S.|last=Sun|first=Feifei|date=2013-01-28|website=Time|access-date=2013-12-06}}</ref> У другей децениї 21. вику, як часц експлозиї уметносци нохцох, зявюю ше налїпки за нохци, шаблони, маґнетни лак,<ref>{{Cite web|url=http://www.self.com/story/the-science-behind-magnetic-na|title=The Science Behind Magnetic Nail Polish|last=Romanowski|first=Shannon|website=Self.com|access-date=22 June 2017}}</ref> [[Клайбас|клайбаси]], блїщаци закончуюци премасценя, блїскотки, кавияр за нохци (микро пацерки), лак за нохци хтори ше предава за хлопох, пахняци лак за нохци и лак за нохци хтори меня фарбу кед є на слунку. [[Файл:Wikidata_nail_polish_02.jpg|мини| Хлопи и жени зоз офарбенима нохцами на [[Wikimania|Викиманиї]], 2016]] Нє барз звичайне же би хлопи лаґовали нохци, а таки поступок мож тримац за потупйованє традиционалних родових нормох.<ref> Edwards, Nelta M. (октобар 2010). . „Using Nail Polish to Teach about Gender and Homophobia”. Teaching Sociology. 38 (4): 362—372. doi:10.1177/0092055X10378821.</ref> Хаснованє уключує превидни лак за защиту нохцох од ламаня або за даванє пестованей блїщацосци на нохцох.<ref>{{Cite news|url=https://www.nytimes.com/2013/06/13/fashion/manly-manicures-end-in-color.html|title=Manly Manicures End in Color|date=2013-06-12|work=The New York Times|access-date=2015-07-14}}</ref> Професионални бейзбол бавяче, окреме тоти цо лапаю лабду, можу на терену мац лак за нохци.<ref>Jesse Graff. "Everything We Know about Baseball Manicures and Nail Polish". Mel Magazine.</ref> ==Знїмач лаку за нохци== Средство за знїманє лаку за нохци то орґански розпущовач у хторим тиж єст олєю, пахи и фарби. Найчастейши одстраньовач то ацетон. Вон тиж може одстранїц штучни нохци з акрилу або стварднутого ґелу. Ацетонитрил ше тиж хаснує як средство за одстраньованє лакох, алє є токсичнєйши, та є забранєни у Европи за хаснованє у козметики од 17. марца 2000.<nowiki><ref>{{Cite web |title=Twenty-Fifth Commission Directive 2000/11/EC... |url=http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF |archive-url=https://web.archive.org/web/20130530012749/http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2000:065:0022:0025:EN:PDF |archive-date=30.05.2013 |access-date=25.06.2021 }}</ref> == Здравствени проблеми == Оспорює ше здравствени ризики хтори повязани з лаком за нохци. Шанси же би вон нанєсол даяку чкоду хасновательом барз мали.<ref>{{Cite journal|last=Bender|first1=Michele|year=2004|title=Nail polish gets a healthy makeover|journal=Health|volume=18|issue=10|page=34}}</ref> З озбильнєйшим здравственим ризиком стретаю ше професионални технїчаре за нохци, хтори маникир окончую прейґ роботней поверхносци, познатей як столїк за нохци, на хторим ше клиєнтово руки находза директно под зону диханя технїчара. Прето видумани вентилацийни системи хтори можу зменшац виложеносц хемикалийом за найменєй 50%.<ref name="Marlow">{{Cite journal|last=Marlow|first1=David A.|last2=Looney|first2=Timothy|last3=Reutman|first3=Susan|date=September 2012|title=An Evaluation of Local Exhaust Ventilation Systems for Controlling Hazardous Exposures in Nail Salons (EPHB Report No. 005-164)|url=https://www.cdc.gov/niosh/surveyreports/pdfs/005-164.pdf|publisher=Department of Health and Human Services, Centers for Disease Control and Prevention, National Institute for Occupational Safety and Health|access-date=5 March 2013}}</ref> Даєдни удиховани и абсорбовани орґански розпущовачи хтори єст у салонох за нохци, як цо ґликол етри и дисулфид углєнїку, можу мац неґативни ефекти на репродуктивне здравє.<ref name="Reutman">{{Cite web|url=http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|title=Nail Salon Table Evaluation|last=Reutman|first=Susan|date=3 March 2009|website=National Institute for Occupational Safety and Health (NIOSH) Science Blog|publisher=Centers for Disease Control and Prevention|access-date=3 April 2014|archive-date=25. 05. 2014|archive-url=https://web.archive.org/web/20140525034821/http://blogs.cdc.gov/niosh-science-blog/2009/03/10/salon/|url-status=}}</ref> Формулациї лакох за нохци можу мац токсични состойки або таки цо уплївую на други здравствени проблеми. Єдна контроверзна ґрупа состойкох то фталати <ref name="Color">Cunningham, J. (2013) "Color cosmetics" in ''Chemistry and Technology of the Cosmetics and Toiletries Industry''. D. F. Williams and W. H. Schmitt (eds.). Springer. {{ISBN|978-94-010-7194-9}}.</ref> хтори можу спричинїц ендокрине поремеценє. Трошительни ґрупи примушели продуковательох зменшац або елиминовац потенциялно токсични состойки,<ref name="Torquay">{{Cite web|url=http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|title=Dangers of Nail Polish – Toxic Chemicals in your nail polish|date=1 April 2014|website=TorquayHeraldExpress.co.uk|publisher=Local World, Ltd.|archive-url=https://web.archive.org/web/20140405210446/http://www.torquayheraldexpress.co.uk/Dangers-Nail-Polish-Toxic-Chemicals-nail-polish/story-20892980-detail/story.html|archive-date=5 April 2014|url-status=dead|access-date=2 April 2014|quote=With inviting names such as peaches and cream or Caramel Smoothie, you are led away from the potential dangers of these polishes, with some ingredients that are known cancer-causing chemicals and those toxic to the nervous system. The top three chemicals of concern are toluene, dibutyl phthalate (dbp) and formaldehyde – the so-called 'toxic trio'.}}</ref> а даскельо компаниї ше зложели же буду поступнє утарговац дибутил фталати.<ref name="NYT">{{Cite news|url=https://www.nytimes.com/2006/09/07/fashion/07nails.html?_r=0|title=Nail Polish Makers Yield on Disputed Chemical|last=Singer|first=Natasha|date=7 September 2006|work=The New York Times}}</ref> <ref>[http://www.cbsnews.com/news/phthalate-chemicals-in-nail-polish-hair-sprays-tied-to-raised-diabetes-risk-in-women/ Phthalate chemicals in nail polish, hair sprays tied to raised diabetes risk in women]. CBS News (2012-07-16). Retrieved on 2015-11-22.</ref> Нєт универзални стандарди безпечносци трошительох за лаки, гоч формалдехид елиминовани з даєдних маркох лакох, а други го и далєй хасную.<ref>{{Cite web|url=http://www.cosmeticsdesign.com/Formulation-Science/Nail-Polish-manufacturers-remove-potentially-harmful-chemicals|title=Nail Polish manufacturers remove potentially harmful chemicals|last=Simon|first=Pitman|date=30 August 2006|website=Cosmetic Design USA|publisher=William Reed Business Media}}</ref> === Предписаня и старанє о животним штредку === Сан Франциско у Америки принєсол варошску уредбу, явно идентификуюци установи хтори хасную лаки за нохци без „токсичного триа“: дибутил фталату, толуену и формалдехиду.<ref>{{Cite news|url=https://www.nytimes.com/2010/11/11/us/11nails.html?_r=1&|title=At Some Nail Salons, Feeling Pretty and Green|last=Brown|first=Patricia Leigh|date=10 November 2010|work=The New York Times}}</ref> Даєдни реґулаторни цела у Лос Андєлесу, лак за нохци тримаю за опасни одпад.<ref>{{Cite web|url=http://www.ladpw.org/epd/hhw/|title=What is Household Hazardous Waste (HHW)?|publisher=County of Los Angeles Department of Public Works|access-date=7 August 2013}}</ref> Велї жеми маю строги огранїченя за посиланє лакох за нохци по пошти.<ref>{{Cite web|url=http://www.royalmail.com/personal/help-and-support/Tell-me-about-Restricted-Goods|title=Restricted goods – personal customers: Things we can carry in UK post but with restrictions|publisher=Royal Mail|access-date=2013-12-06}}</ref> <ref>{{Cite web|url=https://www.usps.com/ship/hazardous-domestic-popup.htm|title=Restricted and Hazardous Materials|publisher=US Postal Service|access-date=2013-12-06}}</ref> „Отровни трио“ ше утаргує, алє ище вше єст компоненти лакох за нохци хтори би могли направиц проблеми за животни штредок. Висипованє фляшкох до жеми може спричинїц контаминацию под'жемней води.<ref>{{Cite news|url=http://www.footfiles.com/beauty/nail-design/article/stop-why-you-shouldnt-throw-old-nail-polish-in-the-trash|title=STOP: Why You Shouldn't Throw Old Nail Polish In The Trash|date=2016-07-31|access-date=2018-05-06|language=en}}</ref> <ref>{{Cite web|url=https://www.fda.gov/Cosmetics/ProductsIngredients/Products/ucm127068.htm|title=Nail Care Products|website=fda.gov|publisher=Food and Drug Administration}}</ref> Хром (III) оксид желєна и пруско белава фарба части у лакох за нохци и доказане же преходза през хемийне розкладанє, цо би могло мац чкодлїви уплїв на здравє. == Референци == [[Катеґория:Хемийни мишанїни]] [[Катеґория:Козметика]] 6tqvzwavjukln2b37o06169ny4s1u57 Дуола 0 3182 19521 19499 2026-06-24T08:52:06Z Sveletanka 20 виправка катеґориї 19521 wikitext text/x-wiki [[File:Duool.png|thumb|161x161px|Дуола]]'''Дуола''' (франц: ''duolet'') то у [[Подзелєнє музики|музики]] окремна ритмичка ґрупация [[Тон|тонох]]/[[Нота|нотох]] хтора ше состої од двох нотох єднакого тирваня як и три ноти. Односно граю ше два ноти у [[Такт (музика)|такту]] и у чаше у хторим би требали буц одграни три ноти. Дуола ше найчастейше означує зоз луком над нотами и числом '''2''' (два). == Приклад дуоли рижних нотних комбинацийох == [[File:Musical notes-duola.png|right|thumb|Илустрация дуоли спрам ноти хтора тирва три (дуркнуца) |164x164px]] [[File:YB0121 Duolet contenu.png|center|572x572px]] Дуола окрмне ритмичне ґрупаованє нотох, прето же два ноти представяю еквивалентносц наспрам трох нотох истей файти. При виводзеню дуоли настава упечаток же ше граю помалши, гоч припадаю истому такту зоз исту метричну меру. == Еквивалентносц дуоли спрам нотних тирваньох == [[File:YB0120 Duolet equivalence.png|center|thumb|473x473px]] == Литература == * [https://ru.wikisource.org/wiki/%D0%AD%D0%A1%D0%91%D0%95/%D0%94%D1%83%D0%BE%D0%BB%D1%8C Дуоль] // [https://ru.wikipedia.org/wiki/%D0%AD%D0%BD%D1%86%D0%B8%D0%BA%D0%BB%D0%BE%D0%BF%D0%B5%D0%B4%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D1%81%D0%BB%D0%BE%D0%B2%D0%B0%D1%80%D1%8C_%D0%91%D1%80%D0%BE%D0%BA%D0%B3%D0%B0%D1%83%D0%B7%D0%B0_%D0%B8_%D0%95%D1%84%D1%80%D0%BE%D0%BD%D0%B0 Энциклопедический словарь Брокгауза и Ефрона]: в 86 т. (82 т. и 4 доп.). — СПб., 1890—1907. * Jerzy Habela: Słowniczek muzyczny. Warszawa: PWM, 1968. ISBN 83-01-11390-1. (на язику: польским) == Вонкашнї вязи== * Марко Тајчевић [https://www.slideserve.com/tyler-moses/osnovna-teorija-muzike Основна теорија муѕике] * [https://www.youtube.com/watch?v=Fob_UwVo3N8 Duola] Youtube.com (Solfedjo 6. razred) [[Катеґория:Музика]] [[Катеґория:Теория музики]] [[Катеґория:Музични термини]] [[Катеґория:Ритем (музика)]] nyravdrnynlb6orvtmekzuzzo1scsae Катеґория:Ритем 14 3183 19524 19504 2026-06-24T09:09:22Z Sveletanka 20 19524 wikitext text/x-wiki [[Катеґория:Теория музики]] [[Катеґория:Музични термини]] 1fwm3ri1k5zqpc0k0f408juuh25maha Шаблон:Citation/identifier 10 3184 19506 2026-06-23T17:19:31Z Saslavik 1716 Нова страница: {{#switch:{{{identifier}}} |arxiv=[[arXiv]]:[http://arxiv.org/abs/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |asin=[[Amazon Standard Identification Number|ASIN]]&nbsp;[//www.amazon.<!-- -->{{#switch: {{{input2|}}} |ca=ca |cn=cn |de=de |ed=es |fr=fr |it=it |jp=co.jp |co.jp=co.jp |uk=co.uk |co.uk=co.uk |#default=com }}/dp/{{{input1|}}} {{#… 19506 wikitext text/x-wiki {{#switch:{{{identifier}}} |arxiv=[[arXiv]]:[http://arxiv.org/abs/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |asin=[[Amazon Standard Identification Number|ASIN]]&nbsp;[//www.amazon.<!-- -->{{#switch: {{{input2|}}} |ca=ca |cn=cn |de=de |ed=es |fr=fr |it=it |jp=co.jp |co.jp=co.jp |uk=co.uk |co.uk=co.uk |#default=com }}/dp/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |bibcode=[[Bibcode]] [http://adsabs.harvard.edu/abs/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |doi={{#ifeq:{{str left|{{{input1|}}}|3}}|10. |{{#if:{{{input2|}}} |[[Digitalni identifikator objekta|doi]]:{{{input1|}}} (inactive {{{input2|}}}) <!-- -->{{#ifeq:{{NAMESPACE}}|{{ns:0}} |[[Category:Pages with DOIs inactive since {{#time: Y | {{{input2|}}} }}]] | }} |[[Digitalni identifikator objekta|doi]]:[http://dx.doi.org/{{urlencode:{{{input1|}}}}} {{#tag:nowiki|{{{input1|}}}}}] }} |{{citation error|nocat={{{input3|}}}|cat=Pages with DOI errors|Bad DOI specified}} }} |isbn={{ISBN|{{{input1|}}}}} |issn=[[Međunarodni standardni serijski broj|ISSN]]&nbsp;[//www.worldcat.org/issn/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |jfm=[[Jahrbuch über die Fortschritte der Mathematik|JFM]]&nbsp;[http://www.zentralblatt-math.org/zmath/en/search/?q{{=}}an:{{{input1|}}}&format{{=}}complete {{#tag:nowiki|{{{input1|}}}}}] |jstor=[[JSTOR]]&nbsp;[http://www.jstor.org/stable/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |lccn=[[Library of Congress Control Number|LCCN]]&nbsp;[http://lccn.loc.gov/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |mr=[[Mathematical Reviews|MR]]&nbsp;[http://www.ams.org/mathscinet-getitem?mr{{=}}{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |oclc=[[OCLC]]&nbsp;[//www.worldcat.org/oclc/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |ol={{#if:{{str endswith|{{{input1|}}}|A}} |[[Open Library|OL]][http://openlibrary.org/authors/OL{{urlencode:{{{input1|}}}}} {{{input1|}}}] |{{#if:{{str endswith|{{{input1|}}}|M}} |[[Open Library|OL]][http://openlibrary.org/books/OL{{urlencode:{{{input1|}}}}} {{{input1|}}}] |{{#if:{{str endswith|{{{input1|}}}|W}} |[[Open Library|OL]][http://openlibrary.org/works/OL{{urlencode:{{{input1|}}}}} {{{input1|}}}] |<includeonly>[[Category:Pages with OL errors]]<span class="error">Error: Bad OL specified!</span></includeonly> }} }} }} |osti=[[Office of Scientific and Technical Information|OSTI]]&nbsp;[http://www.osti.gov/energycitations/product.biblio.jsp?osti_id{{=}}{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |pmc=[[PubMed Central|PMC]]&nbsp;[//www.ncbi.nlm.nih.gov/pmc/articles/PMC{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |pmid=[[PubMed Identifier|PMID]]&nbsp;[//www.ncbi.nlm.nih.gov/pubmed/{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |rfc=[[Request for Comments|RFC]]&nbsp;[//tools.ietf.org/html/rfc{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |ssrn=[[Social Science Research Network|SSRN]]&nbsp;[http://ssrn.com/abstract{{=}}{{{input1|}}} {{#tag:nowiki|{{{input1|}}}}}] |zbl=[[Zentralblatt MATH|Zbl]]&nbsp;[http://www.zentralblatt-math.org/zmath/en/search/?q{{=}}an:{{{input1|}}}&format{{=}}complete {{#tag:nowiki|{{{input1|}}}}}] }}<noinclude> {{documentation}} </noinclude> 4bg2c00wakw5zt0gn0hak8ihw84bgjx Шаблон:Cite news 10 3185 19507 2026-06-23T17:23:03Z Saslavik 1716 Нова страница: <includeonly>{{#invoke:citation/CS1|citation |CitationClass=news }}</includeonly><noinclude> {{documentation}} </noinclude> 19507 wikitext text/x-wiki <includeonly>{{#invoke:citation/CS1|citation |CitationClass=news }}</includeonly><noinclude> {{documentation}} </noinclude> pbjnspfej5gxihr9izxrzkow3f1uf3i Шаблон:Cite journal 10 3186 19508 2026-06-23T17:24:16Z Saslavik 1716 Нова страница: <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=journal }}</includeonly><noinclude> {{documentation}} </noinclude> 19508 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=journal }}</includeonly><noinclude> {{documentation}} </noinclude> 9fcytsszanq7xbwi3p28zsneear9938 Модул:Citation/CS1 828 3187 19510 2026-06-23T17:52:27Z Saslavik 1716 Нова страница: local cs1 ={}; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local dates, year_date_check, reformat_dates, date_hyphen_to_dash, -- functions in Module:Citation/CS1/Date_validation date_ndash_to_dash, remove_trailing_dot, translate_english_months, date_name_xlate local is_set, in_array, substitute, error_comment, set_error, select_one, -- functions in Module:Citation/CS1/… 19510 Scribunto text/plain local cs1 ={}; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local dates, year_date_check, reformat_dates, date_hyphen_to_dash, -- functions in Module:Citation/CS1/Date_validation date_ndash_to_dash, remove_trailing_dot, translate_english_months, date_name_xlate local is_set, in_array, substitute, error_comment, set_error, select_one, -- functions in Module:Citation/CS1/Utilities add_maint_cat, wrap_style, safe_for_italics, is_wikilink, make_wikilink, strip_apostrophe_markup; local z ={}; -- tables in Module:Citation/CS1/Utilities local extract_ids, extract_id_access_levels, build_id_list, is_embargoed; -- functions in Module:Citation/CS1/Identifiers local make_coins_title, get_coins_pages, COinS; -- 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; thatare created here and used here ]] local added_deprecated_cat; -- boolean flag so that the category is added only once local added_prop_cats = {}; -- list of property categories that have been added to z.properties_cats local added_vanc_errs; -- boolean flag so we only emit one Vancouver error / category local Frame; -- holds the module's frame table --[[--------------------------< 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 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 _ P R O P _ C A T >-------------------------------------------------------- Adds a category to z.properties_cats using names from the configuration file with additional text if any. added_prop_cats is a table declared in page scope variables above ]] local function add_prop_cat (key, arguments) if not added_prop_cats [key] then added_prop_cats [key] = true; -- note that we've added this category table.insert( z.properties_cats, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table 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) if not added_vanc_errs then added_vanc_errs = true; -- note that we've added this category table.insert( z.message_tail, { set_error( 'vancouver', {source}, true ) } ); end 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 rfc952 (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 incase 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 TLD 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 ('^[%a%d]') then -- first character must be letter or digit return false; end -- Do most common case first if domain:match ('%f[%a%d][%a%d][%a%d%-]+[%a%d]%.%a%a+$') then -- three or more character hostname.hostname or hostname.tld return true; elseif domain:match ('%f[%a%d][%a%d][%a%d%-]+[%a%d]%.xn%-%-[%a%d]+$') then -- internationalized domain name with ACE prefix return true; elseif domain:match ('%f[%a%d][%a%d]%.org$') then -- one character .org hostname return true; elseif domain:match ('%f[%a][qxz]%.com$') then -- assigned one character .com hostname (x.com times out 2015-12-10) return true; elseif domain:match ('%f[%a][iq]%.net$') then -- assigned one character .net hostname (q.net registered but not active 2015-12-10) return true; elseif domain:match ('%f[%a%d][%a%d]%.%a%a$') then -- one character hostname and cctld (2 chars) return true; elseif domain:match ('%f[%a%d][%a%d][%a%d]%.%a%a+$') then -- two character hostname and tld return true; elseif domain:match ('^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?') then -- IPv4 address return true; else return false; end 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 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. 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 authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing; if 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 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 wikilinked but not when |<param>-link= has a value. This function emits an error message when that condition exists ]] local function link_title_ok (link, lorig, title, torig) local orig; if 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 end end if is_set (orig) then table.insert( z.message_tail, { set_error( 'bad_paramlink', orig)}); -- url or wikilink in |title= with |title-link=; end 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) local error_message = ''; for k, v in pairs (parameter_list) do -- for each parameter in the list if is_parameter_ext_wikilink (v) then -- look at the value; if there is a url add an error message if is_set(error_message) then -- once we've added the first portion of the error message ... error_message=error_message .. ", "; -- ... add a comma space separator end error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter end end if is_set (error_message) then -- done looping, if there is an error message, display it table.insert( z.message_tail, { set_error( 'param_has_ext_link', {error_message}, true ) } ); 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 table.insert( z.message_tail, { set_error( 'wikilink_in_url', {}, true ) } ); end return str:gsub( '[%[%]\n]', { ['['] = '&#91;', [']'] = '&#93;', ['\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 error_str = ""; local domain; local path; local base_url; if not is_set( label ) then label = URL; if is_set( source ) then error_str = set_error( 'bare_url_missing_title', { wrap_style ('parameter', source) }, false, " " ); else error( cfg.messages["bare_url_no_origin"] ); end end if not check_url( URL ) then error_str = set_error( 'bad_url', {wrap_style ('parameter', source)}, false, " " ) .. error_str; end domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the url into scheme plus domain and path if path then -- if there is a path portion path = path:gsub ('[%[%]]', {['[']='%5b',[']']='%5d'}); -- replace '[' and ']' with their percent encoded values URL=domain..path; -- and reassemble end if is_set (access) then -- access level (subscription, registration, limited) local label_head = ''; local label_tail; local markup = ''; -- can't start a span inside italic markup and end it outside the italic markup label = safe_for_url (label); -- replace square brackets and newlines (is this necessary? already done above?) if label:match ("(.*)%s+(.+)('''?)$") then -- for italicized titles (cite book, etc) label_head, label_tail, markup = label:match ("(.*)%s+(.+)('''?)$"); -- split the label at the right-most space; separate the markup elseif label:match ("(.*)%s+(.+)$") then -- for upright titles (journal, news, magazine, etc) label_head, label_tail = label:match ("(.*)%s+(.+)$"); -- split the label at the right-most space; no markup elseif label:match ("(.+)('''?)$") then -- single word label with markup label_tail, markup = label:match ("(.+)('''?)$"); -- save label text as label tail; separate the markup else label_tail = label; end base_url = table.concat ( { '<span class="plainlinks">[', -- opening css URL, -- the url ' ', -- the required space label_head, -- all but the last word of the label ' <span class="nowrap">', -- nowrap css for the last word and the signal icon label_tail, -- last (or only) word of the label inside the span '<span style="padding-left:0.15em">', -- signal spacing css cfg.presentation[access], -- the appropriate icon '</span></span>', -- close signal spacing and nowrap spans markup, -- insert italic markup if any ']</span>' -- close the plain links span }); else base_url = table.concat({ "[", URL, " ", safe_for_url( label ), "]" }); -- no signal markup end return table.concat({ base_url, error_str }); 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 table.insert( z.message_tail, { set_error( 'deprecated_params', {name}, true ) } ); -- 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 wikimarkup) are not kerned. Replaces unicode quotemarks with typewriter quote marks regardless of the need for kerning. /For sr.wiki, [„”] / [’’] and [""] / [''] are quotations used for Serbian and English, respectively (title can hold English language content etc.), so it is hard to figure out whether or not to replace anything and what quotations to replace by what quotations; this is why this part is commented out./ Call this function for chapter titles, for website titles, etc; not for book titles. ]] local function kern_quotes (str) local cap=''; local cap2=''; -- TODO: move this elswhere so that all title-holding elements get these quote marks replaced? -- str= mw.ustring.gsub (str, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark) -- str= mw.ustring.gsub (str, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark) cap, cap2 = mw.ustring.match (str, "^([„])([^\'].+)"); -- match leading double low-9 quotation but not double apostrophe if is_set (cap) then str = substitute (cfg.presentation['kern-left'], {cap, cap2}); end cap, cap2 = mw.ustring.match (str, "^(.+[^\'])([\"\'”“’])$") -- match trailing quotation, or apostrophe, or right double quotation, or left double quotation, or right single quotation but not double apostrophe if is_set (cap) then str = substitute (cfg.presentation['kern-right'], {cap, cap2}); 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 ISO639-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 ISO639-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= and |script-chapter= TODO: error messages when prefix is invalid ISO639-1 code; when script_value has prefix but no script; ]] local function format_script_value (script_value) local lang=''; -- initialize to empty string local name; if script_value:match('^%l%l%s*:') then -- if first 3 non-space characters are script language prefix lang = script_value:match('^(%l%l)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script if not is_set (lang) then return ''; -- script_value was just the prefix so return empty string end -- if we get this far we have prefix and script if lang:lower() == 'bs' then name = 'бошњачки' else name = mw.language.fetchLanguageName( lang:lower(), "sr"); -- get language name so that we can use it to categorize end if is_set (name) then -- is prefix a proper ISO 639-1 language code? script_value = script_value:gsub ('^%l%l%s*:%s*', ''); -- strip prefix from script -- is prefix one of these language codes? if in_array (lang, cfg.script_lang_codes) then add_prop_cat ('script_with_name', {name, lang}) else add_prop_cat ('script') end lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute else lang = ''; -- invalid so set lang to empty string end end script_value = 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) if is_set (script) then script = format_script_value (script); -- <bdi> tags, lang atribute, categorization, etc; returns empty string on error if 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 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 substitute( msg, str ); -- including template text else return substitute( cfg.messages[key], str ); end 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 (scriptchapter, chapter, transchapter, chapterurl, chapter_url_source, no_quotes) local chapter_error = ''; if not 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 = wrap_style ('quoted-title', chapter); end end chapter = script_concatenate (chapter, scriptchapter) -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped if is_set (transchapter) then transchapter = wrap_style ('trans-quoted-title', transchapter); if is_set (chapter) then chapter = chapter .. ' ' .. transchapter; else -- here when transchapter without chapter or script-chapter chapter = transchapter; -- chapter_error = ' ' .. set_error ('trans_missing_title', {'chapter'}); end end if is_set (chapterurl) then chapter = external_link (chapterurl, chapter, chapter_url_source, nil); -- adds bare_url_missing_title error if appropriate end return chapter .. chapter_error; 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 nonprintable 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(). Detects but ignores the character pattern that results from the transclusion of {{'}} templates. Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the parameter value. ]] local function has_invisible_chars (param, v) local position = ''; -- position of invisible char or starting position of stripmarker local dummy; -- end of matching string; not used but required to hold end position when a capture is returned local capture; -- used by stripmarker detection to hold name of the stripmarker local i=1; local stripmarker, apostrophe; capture = string.match (v, '[%w%p ]*'); -- Test for values that are simple ASCII text and bypass other tests if true if capture == v then -- if same there are no unicode characters return; end while cfg.invisible_chars[i] do local char=cfg.invisible_chars[i][1] -- the character or group name local pattern=cfg.invisible_chars[i][2] -- the pattern used to find it position, dummy, capture = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern if position then if 'nowiki' == capture or 'math' == capture then -- nowiki, math stripmarker (not an error condition) stripmarker = true; -- set a flag elseif true == stripmarker and 'delete' == char then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker position = nil; -- unset else local err_msg; if capture then err_msg = capture .. ' ' .. char; else err_msg = char .. ' ' .. 'character'; end table.insert( z.message_tail, { set_error( 'invisible_char', {err_msg, wrap_style ('parameter', param), position}, true ) } ); -- add error message return; -- and done with this parameter end end i=i+1; -- bump our index end end --[[--------------------------< 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] = select_one( args, list, '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'] ); end -- Empty strings, not nil; if v == nil then v = cfg.defaults[k] or ''; origin[k] = ''; end tbl = rawset( tbl, k, v ); return v; end, }); 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 ) local function validate( name, cite_class ) local name = tostring( name ); local state; if in_array (cite_class, {'arxiv', 'biorxiv', 'citeseerx'}) then -- limited parameter sets allowed for these templates state = whitelist.limited_basic_arguments[ name ]; if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end if 'arxiv' == cite_class then -- basic parameters unique to these templates state = whitelist.arxiv_basic_arguments[name]; end if 'biorxiv' == cite_class then state = whitelist.biorxiv_basic_arguments[name]; end if 'citeseerx' == cite_class then state = whitelist.citeseerx_basic_arguments[name]; end if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end -- limited enumerated parameters list name = name:gsub( "%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) state = whitelist.limited_numbered_arguments[ name ]; if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end return false; -- not supported because not found or name is set to nil end -- end limited parameter-set templates state = whitelist.basic_arguments[ name ]; -- all other templates; all normal parameters allowed if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end -- all enumerated parameters allowed name = name:gsub( "%d+", "#" ); -- replace digit(s) with # (last25 becomes last# state = whitelist.numbered_arguments[ name ]; if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end return false; -- not supported because not found or name is set to nil end --[[--------------------------< N O W R A P _ D A T E >-------------------------------------------------------- !!! DON'T UPDATE MATCH STRINGS ONLY HERE BUT ALSO IN Модул:Citation/CS1/Date validation, AND BOTH AT THE SAME TIME !!! When date is ISO "yyyy-mm-dd", format wrap in nowrap span as: <span ...>yyyy-mm-dd</span>. When date is "[d]d. [m]m. yyyy", format wrap in nowrap span as: <span ...>[d]d. [m]m. yyyy</span>. When date is "(d)d. month yyyy", format wrap in nowrap span as: <span ...>(d)d. month</span> yyyy. When date is ..., format ... Currently included date formats (as numbered in /Date validation; or is used as reference for ' or mw.ustring.match(date,"...")') to get nowrapped in: * nowrap1 (first and only match i.e. whole match): 01 or 02 or 05+06 or 17+18 or 19+20 or 27 or 28 or 29+30 or 31+32 * nowrap2 (first capture only, second not): 03 or 04 or 07+08 or 09+10 or 23+24 or 25+26 * nowrap3 (both first and second captures): 11 or 12 or 13 or 14 or 21 or 22 * nowrap4 (first, second and third captures, fourth not; six-part-and-with-non-numbered-month-name intervals): 15 or 16 Only not included date format is 33rd which is year alone and needs no [no]wrapping. !!! DON'T UPDATE MATCH STRINGS ONLY HERE BUT ALSO IN Модул:Citation/CS1/Date validation, AND BOTH AT THE SAME TIME !!! ]] local function nowrap_date (date) local cap=''; local cap2=''; local cap3=''; local cap4=''; if date:match("^%d%d%d%d%-%d%d%-%d%d$") or mw.ustring.match(date,"^%d?%d%. +%d?%d%. +%d%d%d%d%.?%a?$") or mw.ustring.match(date,"^%d?%d?[%-–—/]%d?%d?%. +%d?%d%. +[1-9]%d%d%d%.?$") or mw.ustring.match(date,"^%a+ +[1-9]%d%d%d[%-–—/]%d%d%.?%a?$") or mw.ustring.match(date,"^%a+ +[1-9]%d%d%d[%-–—/][1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a+ +%d%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a%a%a%. +%d%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d%d%d?[%-–—/][1-9]%d%d%d?%.?%a?$") or mw.ustring.match(date,"^[1-9]%d%d%d[%-–—/]%d%d%.?%a?$") then date = substitute (cfg.presentation['nowrap1'], date); elseif mw.ustring.match(date,"^[1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d?[%-–—/][1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d?[%-–—/][1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a+[%-–—/]%a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a%a%a%.[%-–—/]%a%a%a%. +[1-9]%d%d%d%.?%a?$") then cap, cap2 = mw.ustring.match (date, "^(.*) (%d%d%d%d%.?%a?)$"); date = substitute (cfg.presentation['nowrap2'], {cap, cap2}); elseif mw.ustring.match(date,"^%d%d?%. +%d?%d%.? [%-–—] %d%d?%. +%d?%d%. +[1-9]%d%d%d%.?$") or mw.ustring.match(date,"^[1-9]%d?%. +%a+ [%-–—] [1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d?%. +%a%a%a%. [%-–—] [1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%d%d?%. +%d?%d%. +[1-9]%d%d%d%.? [%-–—] %d%d?%. +%d?%d%. +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a+ +[1-9]%d%d%d%.?% [%-–—] %a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^%a%a%a%. +[1-9]%d%d%d%.?% [%-–—] %a%a%a%. +[1-9]%d%d%d%.?%a?$") then cap, cap2 = mw.ustring.match (date, "^(.* [%-–—]) (.* %d%d%d%d%.?%a?)$"); date = substitute (cfg.presentation['nowrap3'], {cap, cap2}); elseif mw.ustring.match(date,"^[1-9]%d?%. +%a+ +[1-9]%d%d%d%.? [%-–—] [1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") or mw.ustring.match(date,"^[1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.? [%-–—] [1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then cap, cap2, cap3, cap4 = mw.ustring.match (date, "^(.*) (%d%d%d%d%.? [%-–—]) (.*) (%d%d%d%d%.?%a?)$"); date = substitute (cfg.presentation['nowrap4'], {cap, cap2, cap3, cap4}); 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 is_set(title_type) then if "none" == 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 --[[--------------------------< H Y P H E N _ T O _ D A S H >-------------------------------------------------- Converts a hyphen to a dash (emdash) ]] local function hyphen_to_dash( str ) if not is_set(str) or str:match( "[%[%]{}<>]" ) ~= nil then return str; end return mw.ustring.gsub(str, '[%-–]', '—' ); 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 ) --[[ Note: we use string functions here, rather than ustring functions. This has considerably faster performance and should work correctly as long as the duplicate_char is strict ASCII. The strings in tbl may be ASCII or UTF8. ]] 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 comp:sub(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 th -- preceding segment: 'First element' .. 'sepc next element' .. etc? trim = false; end_chr = str:sub(-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 = str:sub(1,-2); -- remove it elseif end_chr == "'" then -- if it might be wikimarkup if str:sub(-3,-1) == duplicate_char .. "''" then -- if last three chars of str are sepc'' str = str:sub(1, -4) .. "''"; -- remove them and add back '' elseif str:sub(-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 str:sub(-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 wikimarkup if str:sub(-3,-1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink trim = true; elseif str:sub(-2,-1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link trim = true; elseif str:sub(-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 str:sub(-2,-1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space> str = str:sub(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 dup2:match( "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it value = value:gsub( "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows html markup else value = value:sub( 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 2–9. Puncutation not allowed. ]] local function is_suffix (suffix) if in_array (suffix, {'Jr', 'Sr', '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 converted to the corresponding Latin character. When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters. These things are not currently possible in this module so are left to the editor to do. This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets [http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A [http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF [http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F [http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F |lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) |firstn= also allowed to contain hyphens, spaces, apostrophes, and periods This original test: if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then was written ouside 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) local first, suffix = first:match ('(.-),?%s*([%dJS][%drndth]+)%.?$') or first; -- if first has something that looks like a generational suffix, get it if is_set (suffix) then if not is_suffix (suffix) then add_vanc_error ('suffix'); return false; -- not a name with an appropriate suffix end end if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%'%.]*$") then add_vanc_error ('non-Latin character'); 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-format=vanc. Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/. Vancouver style requires family rank designations (Jr, II, III, etc) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/. This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials. This function uses ustring functions because firstname initials may be any of the unicode Latin characters accepted by is_good_vanc_name (). ]] local function reduce_to_initials(first) local name, suffix = mw.ustring.match(first, "^(%u+) ([%dJS][%drndth]+)$"); if not name then -- if not initials and a suffix name = mw.ustring.match(first, "^(%u+)$"); -- is it just intials? 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 ('suffix'); -- one or two initials with invalid suffix so error message return first; -- and return first unmolested end else return first; -- one or two initials without suffix; nothing to do end end end -- if here then name has 3 or more uppercase letters so treat them as a word local initials, names = {}, {}; -- tables to hold name parts and initials local i = 1; -- counter for number of initials names = mw.text.split (first, '[%s,]+'); -- split into a table of names and possible suffix while names[i] do -- loop through the table if 1 < 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 intial 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 (e.g. authors / editors) ]] local function list_people(control, people, etal) local sep; local namesep; local format = control.format local maximum = control.maximum local lastauthoramp = control.lastauthoramp; local text = {} if 'vanc' == format then -- Vancouver-like author/editor name styling? sep = ','; -- name-list separator between authors is a comma namesep = ' '; -- last/first separator is a space elseif 'mla' == control.mode then sep = ','; -- name-list separator between authors is a comma namesep = ', ' -- last/first separator is <comma><space> else sep = ';' -- name-list separator between authors is a semicolon namesep = ', ' -- last/first separator is <comma><space> end if sep:sub(-1,-1) ~= " " then sep = sep .. " " end if is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for authors for i,person in ipairs(people) do if is_set(person.last) then local mask = person.mask local one local sep_one = sep; if is_set (maximum) and i > maximum then etal = true; break; elseif (mask ~= nil) then local n = tonumber(mask) if (n ~= nil) then one = string.rep("&mdash;",n) else one = mask; sep_one = " "; end else one = person.last local first = person.first if is_set(first) then if 'mla' == control.mode then if i == 1 then -- for mla one = one .. namesep .. first; -- first name last, first else -- all other names one = first .. ' ' .. one; -- first last end else if ( "vanc" == format ) then -- if vancouver format one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) if not person.corporate and is_good_vanc_name (one, first) then -- and name is all Latin characters; corporate authors not tested first = reduce_to_initials(first) -- attempt to convert first name(s) to initials end end one = one .. namesep .. first; end end if is_set(person.link) and person.link ~= control.page_name then one = "[[" .. person.link .. "|" .. one .. "]]" -- link author/editor if this page is not the author's/editor's page end end table.insert( text, '-{' .. one .. '}-' ) table.insert( text, sep_one ) end end local count = #text / 2; -- (number of names + number of separators) divided by 2 if count > 0 then if count > 1 and is_set(lastauthoramp) and not etal then if 'mla' == control.mode then text[#text-2] = " и "; -- replace last separator with ', and ' text else text[#text-2] = " & "; -- replace last separator with ampersand text end end text[#text] = nil; -- erase the last separator end local result = table.concat(text) -- construct list if etal and 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 go a last-first list and etal so add et al. end return result, count end --[[--------------------------< A N C H O R _ 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 anchor_id (namelist, year) local names={}; -- a table for the one to four names and year for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names names[i] = v.last if i == 4 then break end -- if four then done end table.insert (names, year); -- add the year at the end local id = table.concat(names); -- concatenate names and year for CITEREF id if 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 --[[--------------------------< N A M E _ H A S _ E T A L >---------------------------------------------------- Evaluates the content of author and editor name parameters for variations on the theme of et al. If found, the et al. is removed, a flag is set to true and the function returns the modified name and the flag. This function never sets the flag to false but returns it's previous state because it may have been set by previous passes through this function or by the parameters |display-authors=etal or |display-editors=etal ]] local function name_has_etal (name, etal, nocat) if is_set (name) then -- name can be nil in which case just return local etal_pattern = "[;,]? *[\"']*%f[%a][Ee][Tt] *[Aa][Ll][%.\"']*$" -- variations on the 'et al' theme local others_pattern = "[;,]? *%f[%a]and [Oo]thers"; -- and alternate to et al. local C1_pattern = "[;,]? *%f[%a]и [Оо]стали"; -- and 1st variant Cyrillic local C2_pattern = "[;,]? *%f[%a]и [Дд]руги"; -- and 2nd variant Cyrillic local C3_pattern = "[;,]? *%f[%a]и [Дд]р%.?"; -- and 3rd variant Cyrillic local L1_pattern = "[;,]? *%f[%a]i [Oo]stali"; -- and 1st variant Latin local L2_pattern = "[;,]? *%f[%a]i [Dd]rugi"; -- and 2nd variant Latin local L3_pattern = "[;,]? *%f[%a]i [Dd]r%.?"; -- and 3rd variant Latin if mw.ustring.match (name, etal_pattern) then -- variants on et al. name = mw.ustring.gsub(name, etal_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, others_pattern) then -- if not 'et al.', then 'and others'? name = mw.ustring.gsub(name, others_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, C1_pattern) then -- if not 'et al.' nor 'and others', then 'и остали'? name = mw.ustring.gsub(name, C1_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, C2_pattern) then -- if not 'et al.' nor 'and others' nor 'и остали', then 'и други'? name = mw.ustring.gsub(name, C2_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, C3_pattern) then -- if not 'et al.' nor 'and others' nor 'и остали' nor 'и други', then 'и др'? name = mw.ustring.gsub(name, C3_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, L1_pattern) then -- if not 'et al.' nor 'and others' nor 'и остали' nor 'и други' nor 'и др', then 'i ostali'? name = mw.ustring.gsub(name, L1_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, L2_pattern) then -- if not 'et al.' nor 'and others' nor 'и остали' nor 'и други' nor 'и др' nor 'i ostali', then 'i drugi'? name = mw.ustring.gsub(name, L2_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif mw.ustring.match (name, L3_pattern) then -- if not 'et al.' nor 'and others' nor 'и остали' nor 'и други' nor 'и др' nor 'i ostali' nor 'i drugi', then 'i dr'? name = mw.ustring.gsub(name, L3_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end end end return name, etal; -- end --[[--------------------------< N A M E _ H A S _ E D _ M A R K U P >------------------------------------------ Evaluates the content of author and editor parameters for extranious editor annotations: ed, ed., eds, (Ed.), etc. These annotation do not belong in author parameters and are redundant in editor parameters. If found, the function adds the editor markup maintenance category. ]] local function name_has_ed_markup (name, list_name) local _, pattern; local patterns = { -- these patterns match annotations at end of name '%f[%(%[][%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]?$', -- (ed) or (eds): leading '(', case insensitive 'ed', optional 's', '.' and/or ')' '%f[%(%[][%(%[]%s*[УуUu][РрRr][ЕеEe]?[ДдDd]?[НнNn]?%.?%s*[%)%]]?$', -- (ур/ur) or (уредн/uredn): leading '(', case insensitive 'ур/ur', optional 'едн/edn', '.' and/or ')' '[,%.%s]%f[e]eds?%.?$', -- ed or eds: without '('or ')'; case sensitive (ED could be initials Ed could be name) '[,%.%s]%f[у]уре?д?н?%.?$', -- ур or уредн: without '('or ')'; case sensitive (УР could be initials Ур could be name) '[,%.%s]%f[u]ure?d?n?%.?$', -- ur or uredn: without '('or ')'; case sensitive (UR could be initials Ur could be name) '%f[%(%[][%(%[]%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?%s*[%)%]]?$', -- (editor) or (editors): leading '(', case insensitive, optional '.' and/or ')' '%f[%(%[][%(%[]%s*[УуUu][РрRr][ЕеEe][ДдDd][НнNn][ИиIi][КкЦцKkCc][ИиIi]?%.?%s*[%)%]]?$', -- (уредник/urednik) or (уредници/urednici): leading '(', case insensitive, optional '.' and/or ')' '[,%.%s]%f[Ee][Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors: without '('or ')'; case insensitive '[,%.%s]%f[УуUu][РрRr][ЕеEe][ДдDd][НнNn][ИиIi][КкЦцKkCc][ИиIi]?%.?$', -- уредник/urednik or уредници/urednici: without '('or ')'; case insensitive -- these patterns match annotations at beginning of name '^eds?[%.,;]', -- ed. or eds.: lower case only, optional 's', requires '.' '^уре?д?н?[%.,;]', -- ур. or уредн.: lower case only, optional 's', requires '.' '^ure?d?n?[%.,;]', -- ur. or uredn.: lower case only, optional 's', requires '.' '^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', -- (ed) or (eds): also sqare brackets, case insensitive, optional 's', '.' '^[%(%[]%s*[УуUu][РрRr][ЕеEe]?[ДдDd]?[НнNn]?%.?%s*[%)%]]', -- (ур/ur) or (уредн/uredn): also sqare brackets, case insensitive, optional 's', '.' '^[%(%[]?%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%A', -- (editor or (editors: also sq brackets, case insensitive, optional brackets, 's' '^[%(%[]?%s*[УуUu][РрRr][ЕеEe][ДдDd][НнNn][ИиIi][КкЦцKkCc][ИиIi]?%A', -- (уредник/urednik or (уредници/urednici: also sq brackets, case insensitive, optional brackets, 's' '^[%(%[]?%s*[Ee][Dd][Ii][Tt][Ee][Dd]%A', -- (edited: also sq brackets, case insensitive, optional brackets '^[%(%[]?%s*[УуUu][РрRr][ЕеEe][ДдDd][ИиIi][ОоЛлOoLl][АаAa]?%:?%A', -- (уреди[о|ла]/uredi[o|la]: also sq brackets, case insensitive, optional brackets } if is_set (name) then for _, pattern in ipairs (patterns) do -- spin through patterns table and if mw.ustring.match (name,pattern) then add_maint_cat ('extra_text_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template break; end end end return name; -- and done end --[[--------------------------< N A M E _ H A S _ M U L T _ N A M E S >---------------------------------------- Evaluates the content of author and editor (surnames only) parameters for multiple names. Multiple names are indicated if there is more than one comma and or semicolon. If found, the function adds the multiple name (author or editor) maintenance category. ]] local function name_has_mult_names (name, list_name) local count, _; if is_set (name) then _, count = name:gsub ('[;,]', ''); -- count the number of separator-like characters if 1 < count then -- param could be |author= or |editor= so one separator character is acceptable add_maint_cat ('mult_names', cfg.special_case_translation [list_name]); -- more than one separator indicates multiple names so add a maint cat for this template end end return name; -- and done 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) if is_set (last) then if last:match ('^%(%(.*%)%)$') then -- if wrapped in doubled parentheses, accept as written last = last:match ('^%(%((.*)%)%)$'); -- strip parens else last = name_has_mult_names (last, list_name); -- check for multiple names in the parameter (last only) last = name_has_ed_markup (last, list_name); -- check for extraneous 'editor' annotation end end if is_set (first) then if first:match ('^%(%(.*%)%)$') then -- if wrapped in doubled parentheses, accept as written first = first:match ('^%(%((.*)%)%)$'); -- strip parens else first = name_has_ed_markup (first, list_name); -- check for extraneous 'editor' annotation 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, the page is added to a maintenance category. ]] local function extract_names(args, list_name) local names = {}; -- table of names local last; -- individual name components local first; local link; local mask; local i = 1; -- loop counter/indexer local n = 1; -- output table indexer local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors) local etal=false; -- return value set to true when we find some form of et al. in an author parameter local err_msg_list_name = list_name:match ("(%w+)List") .. 's list'; -- modify AuthorList or EditorList for use in error messages if necessary while true do last = select_one( args, cfg.aliases[list_name .. '-Last'], 'redundant_parameters', i ); -- search through args for name components beginning at 1 first = select_one( args, cfg.aliases[list_name .. '-First'], 'redundant_parameters', i ); link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i ); mask = select_one( args, cfg.aliases[list_name .. '-Mask'], 'redundant_parameters', i ); last, etal = name_has_etal (last, etal, false); -- find and remove variations on et al. first, etal = name_has_etal (first, etal, false); -- find and remove variations on et al. last, first= name_checks (last, first, list_name); -- multiple names, extraneous annotation, etc checks if first and not last then -- if there is a firstn without a matching lastn table.insert( z.message_tail, { set_error( 'first_missing_last', {err_msg_list_name, i}, true ) } ); -- add this error message elseif not first and not last then -- if both firstn and lastn aren't found, are we done? count = count + 1; -- number of times we haven't found last and first if 2 <= 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 link_title_ok (link, list_name:match ("(%w+)List"):lower() .. '-link' .. i, last, list_name:match ("(%w+)List"):lower() .. '-last' .. i); -- check for improper wikimarkup names[n] = {last = last, first = first, link = link, mask = mask, corporate=false}; -- add this name to our names list (corporate for |vauthors= only) n = n + 1; -- point to next location in the names table if 1 == count then -- if the previous name was missing table.insert( z.message_tail, { set_error( 'missing_name', {err_msg_list_name, i-1}, true ) } ); -- add this error message end count = 0; -- reset the counter, we're looking for two consecutive missing names end i = i + 1; -- point to next args location end return names, etal; -- all done, return our list of names end --[[--------------------------< G E T _ I S O 6 3 9 _ C O D E >------------------------------------------------ Validates language names provided in |language= parameter if not an ISO639-1 or 639-2 code. Returns the language name and associated two- or three-character code. Because case of the source may be incorrect or different from the case that WikiMedia uses, the name comparisons are done in lower case and when a match is found, the Wikimedia version (assumed to be correct) is returned along with the code. When there is no match, we return the original language name string. mw.language.fetchLanguageNames(<local wiki language>, 'all') return a list of languages that in some cases may include extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support code 'cbk' or name 'Chavacano'. Names but that are included in the list will be found if that name is provided in the |language= parameter. For example, if |language=Chavacano de Zamboanga, that name will be found with the associated code 'cbk-zam'. When names are found and the associated code is not two or three characters, this function returns only the Wikimedia language name. Adapted from code taken from Module:Check ISO 639-1. ]] local function get_iso639_code (lang, this_wiki_code) if 'bangla' == lang:lower() or 'бангла' == mw.ustring.lower(lang) or 'bengali' == lang:lower() or 'бенгали' == mw.ustring.lower(lang) then -- special case related to Wikimedia remap of code 'bn' at mw:Extension:CLDR return 'бенгалски', 'bn'; -- make sure rendered version is properly capitalized end if 'english' == lang:lower() or 'енглески' == mw.ustring.lower(lang) or 'енглеском' == mw.ustring.lower(lang) or 'en' == lang:lower() or 'ен' == mw.ustring.lower(lang) then -- special case return 'енглески', 'en'; -- make sure rendered version is properly capitalized end if 'russian' == lang:lower() or 'руски' == mw.ustring.lower(lang) or 'руском' == mw.ustring.lower(lang) or 'ru' == lang:lower() or 'ру' == mw.ustring.lower(lang) then -- special case return 'руски', 'ru'; -- make sure rendered version is properly capitalized end if 'serbian' == lang:lower() or 'српски' == mw.ustring.lower(lang) or 'српском' == mw.ustring.lower(lang) or 'sr' == lang:lower() or 'ср' == mw.ustring.lower(lang) then -- special case return 'српски', 'sr'; -- make sure rendered version is properly capitalized end local languages = mw.language.fetchLanguageNames(this_wiki_code, 'all') -- get a list of language names known to Wikimedia -- ('all' is required for North Ndebele, South Ndebele, and Ojibwa) local langlc = mw.ustring.lower(lang); -- lower case version for comparisons for code, name in pairs(languages) do -- scan the list to see if we can find our language if langlc == mw.ustring.lower(name) then if 2 ~= code:len() and 3 ~= code:len() then -- two- or three-character codes only; extensions not supported return name; -- so return the name but not the code end return name, code; -- found it, return name to ensure proper capitalization and the the code end end return lang; -- not valid language; return language in original case and nil for the code 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 bit 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. ]] local function language_parameter (lang) local code; -- the two- or three-character language code local code2; local name; -- the language name local language_list = {}; -- table of language names to be rendered local names_table = {}; -- table made from the value assigned to |language= local this_wiki = mw.getContentLanguage(); -- get a language object for this wiki local this_wiki_code = this_wiki:getCode() -- get this wiki's language code local this_wiki_name = mw.language.fetchLanguageName(this_wiki_code, this_wiki_code); -- get this wiki's language name names_table = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list for _, lang in ipairs (names_table) do -- reuse lang if lang:match ('^%a%a%-') then -- strip ietf language tags from code; TODO: is there a need to support 3-char with tag? lang = lang:match ('(%a%a)%-') -- keep only 639-1 code portion to lang; TODO: do something with 3166 alpha 2 country code? end if 2 == lang:len() or 3 == lang:len() then -- if two-or three-character code if lang:lower() == 'bs' then name = 'бошњачки' else name = mw.language.fetchLanguageName( lang:lower(), this_wiki_code); -- get language name if |language= is a proper code end end if is_set (name) then -- if |language= specified a valid code code = lang:lower(); -- save it else name, code = get_iso639_code (lang, this_wiki_code); -- attempt to get code from name (assign name here so that we are sure of proper capitalization) code2 = code; end if is_set (code) then -- only 2- or 3-character codes if 'bn' == code then name = 'бенгалски' end; -- override wikimedia when code is 'bn' if 'en' == code then name = 'енглески' end; -- override wikimedia when code is 'en' if 'ru' == code then name = 'руски' end; -- override wikimedia when code is 'ru' if 'sr' == code then name = 'српски' end; -- override wikimedia when code is 'sr' if this_wiki_code ~= code then -- when the language is not the same as this wiki's language if 2 == code:len() then -- and is a two-character code add_prop_cat ('foreign_lang_source', {name, code}) -- categorize it else -- or is a recognized language (but has a three-character code) add_prop_cat ('foreign_lang_source_2', {code}) -- categorize it differently TODO: support mutliple three-character code categories per cs1|2 template end end else add_maint_cat ('unknown_lang'); -- add maint category if not already added end table.insert (language_list, name); name = ''; -- so we can reuse it end code = #language_list -- reuse code as number of languages in the list if 2 >= code then name = table.concat (language_list, ' и ') -- insert '<space>и<space>' between two language names elseif 2 < code then language_list[code] = 'и ' .. language_list[code]; -- prepend last name with 'и<space>' language_list[code-1] = language_list[code-1] .. ' '; -- append penultimate name with '<space>' name = table.concat (language_list, ', ',1,code-1) -- and concatenate with '<comma><space>' separators till penultimate name name = name .. table.concat (language_list, ', ',code) -- add concatenation with '<space>' separator for the last name end if this_wiki_name == name or this_wiki_code == code2 then return ''; -- if one language and that language is this wiki's return an empty string (no annotation) end return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)' --[[ TODO: should only return blank or name rather than full list so we can clean up the bunched parenthetical elements Language, Type, Format ]] end --[[--------------------------< S E T _ C S 1 _ S T Y L E >---------------------------------------------------- Set style settings for CS1 citation templates. Returns separator and postscript settings ]] local function set_cs1_style (ps, ref) if not is_set (ps) then -- unless explicitely set to something ps = '.'; -- terminate the rendered citation with a period end if not is_set (ref) then -- if |ref= is not set ref = "harv"; -- set default |ref=harv end return '.', ps, ref; -- separator is a full stop end --[[--------------------------< S E T _ C S 2 _ S T Y L E >---------------------------------------------------- Set style settings for CS2 citation templates. Returns separator, postscript, ref settings ]] local function set_cs2_style (ps, ref) if not is_set (ps) then -- if |postscript= has not been set, set cs2 default ps = ''; -- make sure it isn't nil end if not is_set (ref) then -- if |ref= is not set ref = "harv"; -- set default |ref=harv end return ',', ps, ref; -- separator is a comma end --[[--------------------------< G E T _ S E T T I N G S _ F R O M _ C I T E _ C L A S S >---------------------- When |mode= is not set or when its value is invalid, use config.CitationClass and parameter values to establish rendered style. ]] local function get_settings_from_cite_class (ps, ref, cite_class) local sep; if (cite_class == "citation") then -- for citation templates (CS2) sep, ps, ref = set_cs2_style (ps, ref); else -- not a citation template so CS1 sep, ps, ref = set_cs1_style (ps, ref); end return sep, ps, ref -- return them all end --[[--------------------------< S E T _ S T Y L E >------------------------------------------------------------ Establish basic style settings to be used when rendering the citation. Uses |mode= if set and valid or uses config.CitationClass from the template's #invoke: to establish style. ]] local function set_style (mode, ps, ref, cite_class) local sep; if 'cs2' == mode then -- if this template is to be rendered in CS2 (citation) style sep, ps, ref = set_cs2_style (ps, ref); elseif 'cs1' == mode then -- if this template is to be rendered in CS1 (cite xxx) style sep, ps, ref = set_cs1_style (ps, ref); elseif 'mla' == mode then -- if this template is to be rendered in mla style use cs1 for bot cs1 & cs2 templates sep, ps, ref = set_cs1_style (ps, ref); else -- anything but cs1 or cs2 sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass end if 'none' == ps:lower() then -- if assigned value is 'none' then ps = ''; -- set to empty string end return sep, ps, ref 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 extension, else false ]=] local function is_pdf (url) return 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 is_set (format) then format = wrap_style ('format', format); -- add leading space, parenthases, resize if not is_set (url) then format = format .. set_error( '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 = 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 _ A U T H O R S _ E D I T O R 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_authors_editors (max, count, list_name, etal) if 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 add_maint_cat ('disp_auth_ed', cfg.special_case_translation [list_name]); end else -- not a valid keyword or number table.insert( z.message_tail, { set_error( 'invalid_param_val', {'display-' .. list_name, max}, true ) } ); -- 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 page to Category:CS1 maint: extra text if |page= or |pages= has what appears to be some form of p. or pp. abbreviation in the first characters of the parameter content. check Page and Pages for extraneous p, p., pp, and pp. at start of parameter value: good pattern: '^P[^%.P%l]' matches when |page(s)= begins PX or P# but not Px where x and X are letters and # is a digit bad pattern: '^[Pp][Pp]' matches matches when |page(s)= begins pp or pP or Pp or PP ]] local function extra_text_in_page_check (page) -- local good_pattern = '^P[^%.P%l]'; local good_pattern = '^P[^%.Pp]'; -- ok to begin with uppercase P: P7 (pg 7 of section P) but not p123 (page 123) TODO: add Gg for PG or Pg? local good_patternC = '^стр[^%.]'; local good_patternL = '^str[^%.]'; -- local bad_pattern = '^[Pp][Pp]'; local bad_pattern = '^[Pp]?[Pp]%.?[ %d]'; local bad_patternC = '^с[Тт][Рр]%.?[ %d]'; local bad_patternL = '^s[Tt][Rr]%.?[ %d]'; if not page:match (good_pattern) and (page:match (bad_pattern) or page:match ('^[Pp]ages?') or mw.ustring.match (page, bad_patternC) or mw.ustring.match (page, '^[Сс]траниц[ае]') or page:match (bad_patternL) or page:match ('^[Ss]tranic[ae]')) then add_maint_cat ('extra_text'); elseif not mw.ustring.match (page, good_patternC) and (page:match (bad_pattern) or page:match ('^[Pp]ages?') or mw.ustring.match (page, bad_patternC) or mw.ustring.match (page, '^[Сс]траниц[ае]') or page:match (bad_patternL) or page:match ('^[Ss]tranic[ae]')) then add_maint_cat ('extra_text'); elseif page:match (good_patternL) and (page:match (bad_pattern) or page:match ('^[Pp]ages?') or mw.ustring.match (page, bad_patternC) or mw.ustring.match (page, '^[Сс]траниц[ае]') or page:match (bad_patternL) or page:match ('^[Ss]tranic[ae]')) then add_maint_cat ('extra_text'); end -- if Page:match ('^[Pp]?[Pp]%.?[ %d]') or Page:match ('^[Pp]ages?[ %d]') or -- Pages:match ('^[Pp]?[Pp]%.?[ %d]') or Pages:match ('^[Pp]ages?[ %d]') then -- add_maint_cat ('extra_text'); -- end end --[[--------------------------< G E T _ V _ N A M E _ T A B L E >---------------------------------------------- split apart a |vautthors= 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 parnetheses were included in the rendered citation and in the metadata. |vauthors=Jones AB, White EB, ((Black, Brown, and Co.)) This code is experimental and may not be retained. ]] local function get_v_name_table (vparam, output_table) local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas 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 parens 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 parens 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 else table.insert (output_table, name_table[i]); -- add this name 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 paranethese ((corporate name)) to suppress the format tests. Supports generational suffixes Jr, 2nd, 3rd, 4th–6th. This function sets the vancouver error when a reqired 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 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) if vparam:find ('%[%[') or vparam:find ('%]%]') then -- no wikilinking vauthors names add_vanc_error ('wikilink'); end v_name_table = get_v_name_table (vparam, v_name_table); -- names are separated by commas for i, v_name in ipairs(v_name_table) do if v_name:match ('^%(%(.+%)%)$') then -- corporate authors are wrapped in doubled parentheses to supress vanc formatting and error detection first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor last = v_name:match ('^%(%((.+)%)%)$') -- remove doubled parntheses 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 ('punctuation'); end local lastfirstTable = {} lastfirstTable = mw.text.split(v_name, "%s") first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be author intials if is_suffix (first) then -- if a valid suffix suffix = first -- save it as a suffix and first = table.remove(lastfirstTable); -- get what should be the initials from the table end -- no suffix error message here because letter combination may be result of Romanization; check for digits? last = table.concat(lastfirstTable, " ") -- returns a string that is the concatenation of all other names that are not initials if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then add_vanc_error ('missing comma'); -- matches last II last; the case when a comma is missing end if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test add_vanc_error ('name'); -- matches a space between two intiials end else first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this? end if 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 ('initials'); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials end is_good_vanc_name (last, first); -- check first and last before restoring the suffix which may have a non-Latin digit if is_set (suffix) then first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials suffix = ''; -- unset so we don't add this suffix to all subsequent names end else if not corporate then is_good_vanc_name (last, ''); end end -- this from extract_names () link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i ); mask = select_one( args, cfg.aliases[list_name .. '-Mask'], '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 |editors=, |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list. Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest and similarly, |editorn= (and aliases) highest and |editors= lowest When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better way to do this, I just haven't discovered what that way is. Emits an error message when more than one xxxxor name source is provided. In this function, vxxxxors = vauthors or veditors; xxxxors = authors or editors as appropriate. ]] local function select_author_editor_source (vxxxxors, xxxxors, args, list_name) local lastfirst = false; if select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice incase we have a |first1= without a |last1=; this ... select_one( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors= select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or select_one( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then lastfirst=true; end if (is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions (is_set (vxxxxors) and is_set (xxxxors)) or (true == lastfirst and is_set (xxxxors)) then local err_name; if 'AuthorList' == list_name then -- figure out which name should be used in error message err_name = 'author'; else err_name = 'editor'; end table.insert( z.message_tail, { set_error( 'redundant_parameters', {err_name .. '-name-list parameters'}, true ) } ); -- add error message end if true == lastfirst then return 1 end; -- return a number indicating which author name source to use if is_set (vxxxxors) then return 2 end; if 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, no, etc). When the parameter value has not been assigned a value (missing or empty in the source template) the function returns true. If the parameter value is one of the list of allowed values returns true; else, emits an error message and returns false. ]] local function is_valid_parameter_value (value, name, possible, cite_class) -- begin hack to limit |mode=mla to a specific set of templates if ('mode' == name) and ('mla' == value) and not in_array (cite_class, {'book', 'journal', 'news'}) then table.insert( z.message_tail, { set_error( 'invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message return false end -- end hack if not is_set (value) then return true; -- an empty parameter is ok elseif in_array(value:lower(), possible) then return true; else table.insert( z.message_tail, { set_error( 'invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message return false 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 terninate 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, mode) if not is_set (volume) and not is_set (issue) then return ''; end if ('mla' == mode) and ('journal' == cite_class) then -- same as cs1 for magazines lower = true; -- mla 8th edition; force these to lower case if is_set (volume) and is_set (issue) then return wrap_msg ('vol-no', {sepc, volume, issue}, lower); elseif is_set (volume) then return wrap_msg ('vol', {sepc, volume}, lower); else return ''; end end if 'magazine' == cite_class or (in_array (cite_class, {'citation', 'map'}) and 'magazine' == origin) then if is_set (volume) and is_set (issue) then return wrap_msg ('vol-no', {sepc, volume, issue}, lower); elseif is_set (volume) then return wrap_msg ('vol', {sepc, volume}, lower); else return wrap_msg ('issue', {sepc, issue}, lower); end end local vol = ''; if is_set (volume) then if (4 < mw.ustring.len(volume)) then vol = substitute (cfg.messages['j-vol'], {sepc, volume}); else vol = substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); end end if is_set (issue) then return vol .. substitute (cfg.messages['j-issue'], issue); end return vol; end --[[-------------------------< N O R M A L I Z E _ P A G E _ L I S T >----------------------------------------- not currently used normalizes a comma, ampersand, and/or space separated list to be '<value>, <value>, ..., <value>' returns list unchanged if there are no commas else strips whitespace and then reformats the list ]] --[[ local function normalize_page_list (list) if not list:find ('[,& ]') then return list end -- if list is not delimited with commas, ampersands, or spaces; done list = mw.text.split (list, '[,&%s]+'); -- make a table of values list = table.concat (list, ', '); -- and now make a normalized list return list; 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, mode) if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators if 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 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 (in_array (cite_class, {'citation', 'map'}) and 'journal' == origin); if is_journal and 'mla' == mode then is_journal = false; -- mla always uses p & pp end if is_set (page) then if is_journal then return substitute (cfg.messages['j-page(s)'], page), '', '', ''; elseif not nopp then return substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', ''; else return substitute (cfg.messages['nopp'], {sepc, page}), '', '', ''; end elseif is_set(pages) then if is_journal then return 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 '', substitute (cfg.messages['p-prefix'], {sepc, pages}), '', ''; elseif not nopp then return '', substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', ''; else return '', substitute (cfg.messages['nopp'], {sepc, pages}), '', ''; end end return '', '', '', ''; -- return empty strings 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 funct 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.or 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 = 'save command'; url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL elseif url:match('//liveweb%.archive%.org/') then err_msg = 'liveweb'; else path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the url parts for evaluation if not is_set(timestamp) or 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here err_msg = 'timestamp'; if '*' ~= flag then url=url:gsub ('(//web%.archive%.org/[^%d]*%d?%d?%d?%d?%d?%d?)[^/]*', '%1*', 1) -- for preview, modify ts to be yearmo* max (0-6 digits plus splat) end elseif is_set(path) and 'web/' ~= path then -- older archive urls do not have the extra 'web/' path element err_msg = 'path'; elseif is_set (flag) and not is_set (path) then -- flag not allowed with the old form url (without the 'web/' path element) err_msg = 'flag'; elseif 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 = 'flag'; else return url, date; -- return archiveURL and ArchiveDate end end -- if here, something not right so table.insert( z.message_tail, { set_error( 'archive_url', {err_msg}, true ) } ); -- add error message and if is_set (Frame:preprocess('{{REVISIONID}}')) then return '', ''; -- return empty strings for archiveURL and ArchiveDate else return url, date; -- preview mode so return archiveURL and ArchiveDate end end --[[--------------------------< 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: {{cite ... |title=Title access-date=2016-03-17}} cs1|2 shares some parameter names with xml/html atributes: 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 (value) local capture; value = value:gsub ('%b<>', ''); -- remove xml/html tags because attributes: class=, title=, etc capture = mw.ustring.match (value, '%s+(%a[%a%d]+)%s*=') or mw.ustring.match (value, '^(%a[%a%d]+)%s*='); -- find and categorize parameters with possible missing pipes if capture and validate (capture) then -- if the capture is a valid parameter name add_maint_cat ('missing_pipe'); 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. -- set default parameter values defined by |mode= parameter. If |mode= is empty or omitted, use CitationClass to set these values local Mode = A['Mode']; if not is_valid_parameter_value (Mode, 'mode', cfg.keywords['mode'], config.CitationClass) then Mode = ''; end local author_etal; local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors= local Authors; local NameListFormat = A['NameListFormat']; 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 NameListFormat = 'vanc'; -- override whatever |name-list-format= 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= add_maint_cat ('authors'); -- because use of this parameter is discouraged; what to do about the aliases is a TODO: end end if is_set (Collaboration) then author_etal = true; -- so that |display-authors=etal not required end end local Others = A['Others']; local editor_etal; local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors= local Editors; do -- to limit scope of selected local selected = select_author_editor_source (A['Veditors'], A['Editors'], args, 'EditorList'); if 1 == selected then e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn= elseif 2 == selected then NameListFormat = 'vanc'; -- override whatever |name-list-format= might be e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn= elseif 3 == selected then Editors = A['Editors']; -- use content of |editors= add_maint_cat ('editors'); -- but add a maint cat because use of this parameter is discouraged end end local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs local Translators; -- assembled translators name list t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn= local interviewers_list = {}; local Interviewers = A['Interviewers'] if is_set (Interviewers) then -- add a maint cat if the |interviewers= is used add_maint_cat ('interviewers'); -- because use of this parameter is discouraged else interviewers_list = extract_names (args, 'InterviewerList'); -- else, process preferred interviewers parameters end local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs local Contributors; -- assembled contributors name list local Contribution = A['Contribution']; if in_array(config.CitationClass, {"book","citation"}) and not 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 is_set (Contribution) then -- |contributor= requires |contribution= table.insert( z.message_tail, { set_error( 'contributor_missing_required_param', 'contribution')}); -- add missing contribution error message c = {}; -- blank the contributors' table; it is used as a flag later end if 0 == #a then -- |contributor= requires |author= table.insert( z.message_tail, { set_error( '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 select_one (args, cfg.aliases['ContributorList-Last'], 'redundant_parameters', 1 ) then -- are there contributor name list parameters? table.insert( z.message_tail, { set_error( 'contributor_ignored')}); -- add contributor ignored error message end Contribution = nil; -- unset end if not is_valid_parameter_value (NameListFormat, 'name-list-format', cfg.keywords['name-list-format']) then -- only accepted value for this parameter is 'vanc' NameListFormat = ''; -- anything else, set to empty string end local Year = A['Year']; local PublicationDate = A['PublicationDate']; local OrigYear = A['OrigYear']; local Date = A['Date']; local LayDate = A['LayDate']; ------------------------------------------------- Get title data local Title = A['Title']; local ScriptTitle = A['ScriptTitle']; local BookTitle = A['BookTitle']; local Conference = A['Conference']; local TransTitle = A['TransTitle']; local TitleNote = A['TitleNote']; local TitleLink = A['TitleLink']; link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wikimarkup in |title-link= or wikimarkup in |title= when |title-link= is set local Chapter = A['Chapter']; local ScriptChapter = A['ScriptChapter']; local ScriptChapterOrigin = A:ORIGIN ('ScriptChapter'); local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode local TransChapter = A['TransChapter']; local TitleType = A['TitleType']; local Degree = A['Degree']; local Docket = A['Docket']; local ArchiveFormat = A['ArchiveFormat']; local ArchiveDate; local ArchiveURL; ArchiveURL, ArchiveDate = archive_url_check (A['ArchiveURL'], A['ArchiveDate']) local UrlStatus = A['UrlStatus']; if 'url-status' == A:ORIGIN ('UrlStatus') then -- interim: TODO: this line goes away if not is_valid_parameter_value (UrlStatus, 'url-status', cfg.keywords ['url-status']) then -- set in config.defaults to 'dead' UrlStatus = ''; -- anything else, set to empty string end -- interim: TODO: this line goes away elseif is_set (A:ORIGIN ('UrlStatus')) then -- interim: while both |dead-url= and |url-status= allowed use separate keyword lists; TODO: remove this section if not is_valid_parameter_value (UrlStatus, A:ORIGIN ('UrlStatus'), cfg.keywords ['deadurl']) then -- interim: assume |dead-url=; use those keywords; TODO: this line goes away UrlStatus = ''; -- anything else, set to empty string; interim: TODO: this line goes away end -- interim: TODO: this line goes away end -- interim: TODO: this line goes away if in_array (UrlStatus, {'yes', 'true', 'y'}) then -- TODO: remove this whole thing when |dead-url=[yes|no] parameters removed from articles UrlStatus = 'dead'; elseif 'no' == UrlStatus then UrlStatus = 'live'; end local DeadURL = A['DeadURL'] -- TODO: to be removed, e.g. in 2020 if not is_valid_parameter_value (DeadURL, 'dead-url', cfg.keywords ['deadurl']) then -- set in config.defaults to 'yes' DeadURL = ''; -- anything else, set to empty string end local URL = A['URL'] local URLorigin = A:ORIGIN('URL'); -- get name of parameter that holds URL local ChapterURL = A['ChapterURL']; local ChapterURLorigin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL local ConferenceFormat = A['ConferenceFormat']; local ConferenceURL = A['ConferenceURL']; local ConferenceURLorigin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL local Periodical = A['Periodical']; local Periodical_origin = A:ORIGIN('Periodical'); -- get the name of the periodical parameter local Series = A['Series']; local Volume; local Issue; local Page; local Pages; local At; if in_array (config.CitationClass, cfg.templates_using_volume) then Volume = A['Volume']; end -- conference & map books do not support issue if in_array (config.CitationClass, cfg.templates_using_issue) and not (in_array (config.CitationClass, {'conference', 'map'}) and not is_set (Periodical))then Issue = A['Issue']; end local Position = ''; if not in_array (config.CitationClass, cfg.templates_not_using_page) then Page = A['Page']; Pages = hyphen_to_dash( A['Pages'] ); At = A['At']; end local Edition = A['Edition']; local PublicationPlace = A['PublicationPlace'] local Place = A['Place']; local PublisherName = A['PublisherName']; local RegistrationRequired = A['RegistrationRequired']; if not is_valid_parameter_value (RegistrationRequired, 'registration', cfg.keywords ['yes_true_y']) then RegistrationRequired=nil; end local SubscriptionRequired = A['SubscriptionRequired']; if not is_valid_parameter_value (SubscriptionRequired, 'subscription', cfg.keywords ['yes_true_y']) then SubscriptionRequired=nil; end local UrlAccess = A['UrlAccess']; if not is_valid_parameter_value (UrlAccess, 'url-access', cfg.keywords ['url-access']) then UrlAccess = nil; end if not is_set(URL) and is_set(UrlAccess) then UrlAccess = nil; table.insert( z.message_tail, { set_error( 'param_access_requires_param', {'url'}, true ) } ); end if is_set (UrlAccess) and is_set (SubscriptionRequired) then -- while not aliases, these are much the same so if both are set table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'url-access') .. ' and ' .. wrap_style ('parameter', 'subscription')}, true ) } ); -- add error message SubscriptionRequired = nil; -- unset; prefer |access= over |subscription= end if is_set (UrlAccess) and is_set (RegistrationRequired) then -- these are not the same but contradictory so if both are set table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'url-access') .. ' and ' .. wrap_style ('parameter', 'registration')}, true ) } ); -- add error message RegistrationRequired = nil; -- unset; prefer |access= over |registration= end local Via = A['Via']; local AccessDate = A['AccessDate']; local Agency = A['Agency']; local Language = A['Language']; local Format = A['Format']; local ChapterFormat = A['ChapterFormat']; local DoiBroken = A['DoiBroken']; local ID = A['ID']; local ASINTLD = A['ASINTLD']; local IgnoreISBN = A['IgnoreISBN']; if not is_valid_parameter_value (IgnoreISBN, 'ignore-isbn-error', cfg.keywords ['yes_true_y']) then IgnoreISBN = nil; -- anything else, set to empty string end local Embargo = A['Embargo']; local Class = A['Class']; -- arxiv class identifier local ID_list = extract_ids( args ); local ID_access_levels = extract_id_access_levels( args, ID_list ); local Quote = A['Quote']; local LayFormat = A['LayFormat']; local LayURL = A['LayURL']; local LaySource = A['LaySource']; local Transcript = A['Transcript']; local TranscriptFormat = A['TranscriptFormat']; local TranscriptURL = A['TranscriptURL'] local TranscriptURLorigin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL local LastAuthorAmp = A['LastAuthorAmp']; if not is_valid_parameter_value (LastAuthorAmp, 'last-author-amp', cfg.keywords ['yes_true_y']) then LastAuthorAmp = nil; -- set to empty string end if 'mla' == Mode then LastAuthorAmp = 'yes'; -- replaces last author/editor separator with ' and ' text end local no_tracking_cats = A['NoTracking']; if not is_valid_parameter_value (no_tracking_cats, 'no-tracking', cfg.keywords ['yes_true_y']) then no_tracking_cats = nil; -- set to empty string end --local variables that are not cs1 parameters local use_lowercase; -- controls capitalization of certain static text local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language local anchor_year; -- used in the CITEREF identifier local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification local DF = A['DF']; -- date format set in cs1|2 template -- if not is_valid_parameter_value (DF, 'df', cfg.keywords['date-format']) then -- validate reformatting keyword DF = ''; -- not needed, set to empty string -- end local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma local PostScript; local Ref; sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], A['Ref'], config.CitationClass); use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text --check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories if not is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page if 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 mw.ustring.match (this_page.text, 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) select_one( args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets', 'страница', 'странице', 'стр', 'на', 'лист', 'листови', 'stranica', 'stranice', 'str', 'na', 'list', 'listovi'}, 'redundant_parameters' ); -- this is a dummy call simply to get the error message and category local NoPP = A['NoPP'] if is_set (NoPP) and is_valid_parameter_value (NoPP, 'nopp', cfg.keywords ['yes_true_y']) then NoPP = true; else NoPP = nil; -- unset, used as a flag later end if is_set(Page) then if is_set(Pages) or is_set(At) then Pages = ''; -- unset the others At = ''; end extra_text_in_page_check (Page); -- add this page to maint cat if |page= value begins with what looks like p. or pp. elseif is_set(Pages) then if is_set(At) then At = ''; -- unset end extra_text_in_page_check (Pages); -- add this page to maint cat if |pages= value begins with what looks like p. or pp. end -- both |publication-place= and |place= (|location=) allowed if different if not is_set(PublicationPlace) and is_set(Place) then PublicationPlace = Place; -- promote |place= (|location=) to |publication-place end if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same --[[ Parameter remapping for cite encyclopedia: When the citation has these parameters: |encyclopedia and |title then map |title to |article and |encyclopedia to |title |encyclopedia and |article then map |encyclopedia to |title |encyclopedia then map |encyclopedia to |title |trans_title maps to |trans_chapter when |title is re-mapped |url maps to |chapterurl when |title is remapped All other combinations of |encyclopedia, |title, and |article are not modified ]] local Encyclopedia = A['Encyclopedia']; if ( config.CitationClass == "encyclopaedia" ) or ( config.CitationClass == "citation" and is_set (Encyclopedia)) then -- test code for citation if is_set (Periodical) then -- Periodical is set when |encyclopedia is set if is_set(Title) or is_set (ScriptTitle) then if not is_set(Chapter) then Chapter = Title; -- |encyclopedia and |title are set so map |title to |article and |encyclopedia to |title ScriptChapter = ScriptTitle; ScriptChapterOrigin = 'title'; TransChapter = TransTitle; ChapterURL = URL; ChapterUrlAccess = UrlAccess; if not is_set (ChapterURL) and is_set (TitleLink) then Chapter = make_wikilink (TitleLink, Chapter); end Title = Periodical; ChapterFormat = Format; Periodical = ''; -- redundant so unset TransTitle = ''; URL = ''; Format = ''; TitleLink = ''; ScriptTitle = ''; end elseif is_set (Chapter) then -- |title not set Title = Periodical; -- |encyclopedia set and |article set so map |encyclopedia to |title Periodical = ''; -- redundant so unset end end end -- Special case for cite techreport. if (config.CitationClass == "techreport") then -- special case for cite techreport if is_set(A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue' if not is_set(ID) then -- can we use ID for the "number"? ID = A['Number']; -- yes, use it else -- ID has a value so emit error message table.insert( z.message_tail, { set_error('redundant_parameters', {wrap_style ('parameter', 'id') .. ' and ' .. wrap_style ('parameter', 'number')}, true )}); end end end -- special case for cite mailing list if (config.CitationClass == "mailinglist") then Periodical = A ['MailingList']; elseif 'mailinglist' == A:ORIGIN('Periodical') then Periodical = ''; -- unset because mailing list is only used for cite mailing list end -- Account for the oddity that is {{cite conference}}, before generation of COinS data. if 'conference' == config.CitationClass then if is_set(BookTitle) then Chapter = Title; -- ChapterLink = TitleLink; -- |chapterlink= is deprecated ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURLorigin = URLorigin; URLorigin = ''; ChapterFormat = Format; TransChapter = TransTitle; Title = BookTitle; Format = ''; -- TitleLink = ''; TransTitle = ''; URL = ''; end elseif 'speech' ~= config.CitationClass then Conference = ''; -- not cite conference or cite speech so make sure this is empty string end -- cite map oddities local Cartography = ""; local Scale = ""; local Sheet = A['Sheet'] or ''; local Sheets = A['Sheets'] or ''; if config.CitationClass == "map" then Chapter = A['Map']; ChapterURL = A['MapURL']; TransChapter = A['TransMap']; ChapterURLorigin = A:ORIGIN('MapURL'); ChapterFormat = A['MapFormat']; Cartography = A['Cartography']; if is_set( Cartography ) then Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase); end Scale = A['Scale']; if is_set( Scale ) then Scale = sepc .. " " .. Scale; end end -- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data. if 'episode' == config.CitationClass or 'serial' == config.CitationClass then local AirDate = A['AirDate']; local SeriesLink = A['SeriesLink']; link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wikimarkup in |series-link= or wikimarkup in |series= when |series-link= is set local Network = A['Network']; local Station = A['Station']; local s, n = {}, {}; -- do common parameters first if is_set(Network) then table.insert(n, Network); end if is_set(Station) then table.insert(n, Station); end ID = table.concat(n, sepc .. ' '); if not is_set (Date) and is_set (AirDate) then -- promote airdate to date Date = AirDate; end if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}} local Season = A['Season']; local SeriesNumber = A['SeriesNumber']; if is_set (Season) and is_set (SeriesNumber) then -- these are mutually exclusive so if both are set table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'season') .. ' and ' .. wrap_style ('parameter', 'seriesno')}, true ) } ); -- add error message SeriesNumber = ''; -- unset; prefer |season= over |seriesno= end -- assemble a table of parts concatenated later into Series if is_set(Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end if is_set(SeriesNumber) then table.insert(s, wrap_msg ('series', SeriesNumber, use_lowercase)); end if 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; ChapterLink = TitleLink; -- alias episodelink TransChapter = TransTitle; ChapterURL = URL; ChapterURLorigin = A:ORIGIN('URL'); Title = Series; -- promote series to title TitleLink = SeriesLink; Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number if is_set (ChapterLink) and not is_set (ChapterURL) then -- link but not URL Chapter = '[[' .. ChapterLink .. '|' .. Chapter .. ']]'; -- ok to wikilink elseif is_set (ChapterLink) and is_set (ChapterURL) then -- if both are set, URL links episode; Series = '[[' .. ChapterLink .. '|' .. Series .. ']]'; -- series links with ChapterLink (episodelink -> TitleLink -> ChapterLink) ugly end URL = ''; -- unset TransTitle = ''; ScriptTitle = ''; else -- now oddities that are cite serial Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday? if is_set (Series) and is_set (SeriesLink) then Series = '[[' .. SeriesLink .. '|' .. Series .. ']]'; end Series = wrap_style ('italic-title', Series); -- series is italicized end end -- end of {{cite episode}} stuff -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, before generation of COinS data. do if in_array (config.CitationClass, {'arxiv', 'biorxiv', 'citeseerx'}) then if not is_set (ID_list[config.CitationClass:upper()]) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv= & |citeseerx= required for their templates table.insert( z.message_tail, { set_error( config.CitationClass .. '_missing', {}, true ) } ); -- add error message end if 'arxiv' == config.CitationClass then Periodical = 'arXiv'; -- set to arXiv for COinS; after that, must be set to empty string end if 'biorxiv' == config.CitationClass then Periodical = 'bioRxiv'; -- set to bioRxiv for COinS; after that, must be set to empty string end if 'citeseerx' == config.CitationClass then Periodical = 'CiteSeerX'; -- set to CiteSeerX for COinS; after that, must be set to empty string end end end -- handle type parameter for those CS1 citations that have default values if in_array(config.CitationClass, {"AV-media-notes", "interview", "mailinglist", "map", "podcast", "pressrelease", "report", "techreport", "thesis"}) then TitleType = set_titletype (config.CitationClass, TitleType); if is_set(Degree) and "Thesis" == TitleType then -- special case for cite thesis TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower(); end end if is_set(TitleType) then -- if type parameter is specified TitleType = 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. if not 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 is_set (Date) and is_set(PublicationDate) then -- use PublicationDate when |date= and |year= are not set Date = PublicationDate; -- promote PublicationDate to Date PublicationDate = ''; -- unset, no longer needed end end if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation --[[ Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where we get the date used in the metadata. Date validation supporting code is in Module:Citation/CS1/Date_validation ]] do -- create defined block to contain local variables error_message, date_parameters_list, mismatch local error_message = ''; -- AirDate has been promoted to Date so not necessary to check it local date_parameters_list = {['access-date']=AccessDate, ['archive-date']=ArchiveDate, ['date']=Date, ['doi-broken-date']=DoiBroken, ['embargo']=Embargo, ['lay-date']=LayDate, ['publication-date']=PublicationDate, ['year']=Year}; anchor_year, Embargo, error_message = dates(date_parameters_list, COinS_date); if is_set (Year) and is_set (Date) then -- both |date= and |year= not normally needed; local mismatch = year_date_check (Year, Date) if 0 == mismatch then -- |year= does not match a year-value in |date= if is_set (error_message) then -- if there is already an error message error_message = error_message .. ', '; -- tack on this additional message end error_message = error_message .. '&#124;year= / &#124;date= mismatch'; elseif 1 == mismatch then -- |year= matches year-value in |date= add_maint_cat ('date_year'); end end local modified = false; -- flag if true == remove_trailing_dot (date_parameters_list) then -- remove all trailing dots so there is no ".)" or ".." [not important if validation failed] modified = true; -- add_maint_cat ('date_format'); -- no need for maint cat as date alone is actually incorrect with no trailing dot; ".)" or ".." is incorrect too, however end if true == date_ndash_to_dash (date_parameters_list) then -- convert ndashes to dashes where appropriate [not important if validation failed] modified = true; -- add_maint_cat ('date_format'); -- no need for maint cat as date is reformated to be in one of the valid Serbian forms end if not is_set(error_message) then -- error free dates only if is_set (DF) then -- if we need to reformat dates modified = reformat_dates (date_parameters_list, DF, false); -- reformat to DF format, use long month names if appropriate end if true == date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate modified = true; add_maint_cat ('date_format'); -- hyphens were converted so add maint category end if true == translate_english_months (date_parameters_list) then -- translate all English months and seasons names into Serbian format modified = true; add_maint_cat ('date_format'); -- add maint cat because of possible errors during formatting and because of bots end else table.insert( z.message_tail, { set_error( 'bad_date', {error_message}, true ) } ); -- add this error message end if modified then -- if the date_parameters_list values were modified AccessDate = date_parameters_list['access-date']; -- overwrite date holding parameters with modified values ArchiveDate = date_parameters_list['archive-date']; Date = date_parameters_list['date']; DoiBroken = date_parameters_list['doi-broken-date']; LayDate = date_parameters_list['lay-date']; PublicationDate = date_parameters_list['publication-date']; end end -- end of do -- Account for the oddity that is {{cite journal}} with |pmc= set and |url= not set. Do this after date check but before COInS. -- Here we unset Embargo if PMC not embargoed (|embargo= not set in the citation) or if the embargo time has expired. Otherwise, holds embargo date Embargo = is_embargoed (Embargo); -- if config.CitationClass == "journal" and not is_set(URL) and is_set(ID_list['PMC']) then if not is_set (Embargo) then -- if not embargoed or embargo has expired URL=cfg.id_handlers['PMC'].prefix .. ID_list['PMC']; -- set url to be the same as the PMC external link if not embargoed URLorigin = cfg.id_handlers['PMC'].parameters[1]; -- set URLorigin to parameter name for use in error message if citation is missing a |title= if is_set(AccessDate) then -- access date requires |url=; pmc created url is not |url= table.insert( z.message_tail, { set_error( 'accessdate_missing_url', {}, true ) } ); AccessDate = ''; -- 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 is_set(Title) and not is_set(TransTitle) and not is_set(ScriptTitle) then if 'episode' == config.CitationClass then -- special case for cite episode; TODO: is there a better way to do this? table.insert( z.message_tail, { set_error( 'citation_missing_title', {'series'}, true ) } ); else table.insert( z.message_tail, { set_error( 'citation_missing_title', {'title'}, true ) } ); end end if 'none' == Title and in_array (config.CitationClass, {'journal', 'citation'}) and is_set (Periodical) and 'journal' == A:ORIGIN('Periodical') then -- special case for journal cites Title = ''; -- set title to empty string add_maint_cat ('untitled'); end check_for_url ({ -- add error message when any of these parameters contains a URL ['title']=Title, [A:ORIGIN('Chapter')]=Chapter, [A:ORIGIN('Periodical')]=Periodical, [A:ORIGIN('PublisherName')] = PublisherName }); -- 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 is_set (Encyclopedia)) then if is_set (Chapter) and is_set (Title) and 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 -- this is the function call to COinS() local OCinSoutput = COinS({ ['Periodical'] = Periodical, ['Encyclopedia'] = Encyclopedia, ['Chapter'] = make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic wikimarkup ['Degree'] = Degree; -- cite thesis only ['Title'] = make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic wikimarkup ['PublicationPlace'] = PublicationPlace, ['Date'] = COinS_date.rftdate, -- COinS_date has correctly formatted date if Date is valid; ['Season'] = COinS_date.rftssn, ['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'] = get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At}, 5)), -- pages stripped of external links ['Edition'] = Edition, ['PublisherName'] = PublisherName, ['URL'] = first_set ({ChapterURL, URL}, 2), ['Authors'] = coins_author, ['ID_list'] = ID_list, ['RawPage'] = this_page.prefixedText, }, config.CitationClass); -- Account for the oddities that are {{cite arxiv}}, AFTER generation of COinS data. -- if 'arxiv' == config.CitationClass then -- we have set rft.jtitle in COinS to arXiv, now unset so it isn't displayed if in_array (config.CitationClass, {'arxiv', 'biorxiv', 'citeseerx'}) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, or CiteSeerX 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 then if is_set (PublisherName) then PublisherName = substitute (cfg.messages['newsgroup'], external_link( 'news:' .. PublisherName, PublisherName, A:ORIGIN('PublisherName'), nil )); end end -- Now perform various field substitutions. -- We also add leading spaces and surrounding markup and punctuation to the -- various parts of the citation, but only when they are non-nil. local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list do local last_first_list; local control = { format = NameListFormat, -- empty string or 'vanc' maximum = nil, -- as if display-authors or display-editors not set lastauthoramp = LastAuthorAmp, page_name = this_page.text, -- get current page name so that we don't wikilink to it via editorlinkn mode = Mode }; do -- do editor name list first because the now unsupported coauthors used to modify control table control.maximum , editor_etal = get_display_authors_editors (A['DisplayEditors'], #e, 'editors', editor_etal); last_first_list, EditorCount = list_people(control, e, editor_etal); if is_set (Editors) then if editor_etal then Editors = Editors .. ' ' .. cfg.messages['et al']; -- add et al. to editors parameter beause |display-editors=etal EditorCount = 2; -- with et al., |editors= is multiple names; spoof to display (eds.) annotation else EditorCount = 2; -- we don't know but assume |editors= is multiple names; spoof to display (eds.) annotation end else Editors = last_first_list; -- either an author name list or an empty string end 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 = #interviewers_list; -- number of interviewerss Interviewers = list_people(control, interviewers_list, false); -- et al not currently supported end do -- now do translators control.maximum = #t; -- number of translators Translators = list_people(control, t, false); -- et al not currently supported end do -- now do contributors control.maximum = #c; -- number of contributors Contributors = list_people(control, c, false); -- et al not currently supported end do -- now do authors control.maximum , author_etal = get_display_authors_editors (A['DisplayAuthors'], #a, 'authors', author_etal); last_first_list = list_people(control, a, author_etal); if is_set (Authors) then Authors, author_etal = name_has_etal (Authors, author_etal, false); -- 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 is_set (Authors) and is_set (Collaboration) then Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al. end end -- apply |[xx-]format= styling; at the end, these parameters hold correctly styled format annotation, -- an error message if the associated url is not set, or an empty string for concatenation ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url'); ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url'); Format = style_format (Format, URL, 'format', 'url'); LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url'); TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl'); -- special case for chapter format so no error message or cat when chapter not supported if not (in_array(config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx'}) or ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia))) then ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url'); end if not is_set(URL) then if in_array(config.CitationClass, {"web","podcast", "mailinglist"}) then -- |url= required for cite web, cite podcast, and cite mailinglist table.insert( z.message_tail, { set_error( 'cite_web_url', {}, true ) } ); end -- do we have |accessdate= without either |url= or |chapter-url=? if is_set(AccessDate) and not is_set(ChapterURL)then -- ChapterURL may be set when URL is not set; table.insert( z.message_tail, { set_error( 'accessdate_missing_url', {}, true ) } ); AccessDate = ''; end end local OriginalURL, OriginalURLorigin, OriginalFormat, OriginalAccess; UrlStatus = UrlStatus:lower(); -- used later when assembling archived text if is_set( ArchiveURL ) then if is_set (ChapterURL) then -- URL not set so if chapter-url is set apply archive url to it OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text OriginalURLorigin = ChapterURLorigin; -- name of chapter-url parameter for error messages OriginalFormat = ChapterFormat; -- and original |format= if 'live' ~= UrlStatus then ChapterURL = ArchiveURL -- swap-in the archive's url ChapterURLorigin = 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 is_set (URL) then OriginalURL = URL; -- save copy of original source URL OriginalURLorigin = URLorigin; -- 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 URLorigin = A:ORIGIN('ArchiveURL') -- name of archive url parameter for error messages Format = ArchiveFormat or ''; -- swap in archive's format UrlAccess = nil; -- restricted access levels do not make sense for archived urls end end end if in_array(config.CitationClass, {'web','news','journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx'}) or -- if any of the 'periodical' cites except encyclopedia ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia)) then local chap_param; if is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters chap_param = A:ORIGIN ('Chapter') elseif is_set (TransChapter) then chap_param = A:ORIGIN ('TransChapter') elseif is_set (ChapterURL) then chap_param = A:ORIGIN ('ChapterURL') elseif is_set (ScriptChapter) then chap_param = A:ORIGIN ('ScriptChapter') else is_set (ChapterFormat) chap_param = A:ORIGIN ('ChapterFormat') end if is_set (chap_param) then -- if we found one table.insert( z.message_tail, { set_error( 'chapter_ignored', {chap_param}, true ) } ); -- add error message Chapter = ''; -- and set them to empty string to be safe with concatenation TransChapter = ''; ChapterURL = ''; ScriptChapter = ''; ChapterFormat = ''; end else -- otherwise, format chapter / article title local no_quotes = false; -- default assume that we will be quoting the chapter parameter value if is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s) if in_array (Contribution:lower(), cfg.keywords.contribution) then -- and a generic contribution title no_quotes = true; -- then render it unquoted end end Chapter = format_chapter_title (ScriptChapter, Chapter, TransChapter, ChapterURL, ChapterURLorigin, no_quotes); -- Contribution is also in Chapter if is_set (Chapter) then Chapter = Chapter .. ChapterFormat ; if 'map' == config.CitationClass and is_set (TitleType) then Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title end Chapter = Chapter.. sepc .. ' '; elseif 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. if is_set(TitleLink) and is_set(Title) then Title = "[[" .. TitleLink .. "|" .. Title .. "]]" end if in_array(config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx'}) or ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia)) or ('map' == config.CitationClass and is_set (Periodical)) 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 = wrap_style ('quoted-title', Title); Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle= wrap_style ('trans-quoted-title', TransTitle ); elseif 'report' == config.CitationClass then -- no styling for cite report Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle= wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title else Title = wrap_style ('italic-title', Title); Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle = wrap_style ('trans-italic-title', TransTitle); end local TransError = ""; if is_set(TransTitle) then if is_set(Title) then TransTitle = " " .. TransTitle; else TransError = " " .. set_error( 'trans_missing_title', {'title'} ); end end if is_set(Title) then if not is_set(TitleLink) and is_set(URL) then Title = external_link( URL, Title, URLorigin, UrlAccess ) .. TransTitle .. TransError .. Format; -- this experiment hidden 2016-04-10; see Help_talk:Citation_Style_1#Recycled_urls -- local temp_title = external_link( URL, Title, URLorigin ) .. TransError .. Format; -- do this so we get error message even if url is usurped no archive -- if in_array (DeadURL, {'unfit no archive', 'usurped no archive'}) then -- when url links to inappropriate location and there is no archive of original source available -- local err_msg -- if temp_title:match ('%[%S+%s+(.+)%](<.+)') then -- if there is an error message -- Title, err_msg = temp_title:match ('%[%S+%s+(.+)%](<.+)'); -- strip off external link; TODO: find a better to do this -- Title = Title .. (err_msg or ''); -- end -- else -- Title = temp_title; -- end URL = ''; -- unset these because no longer needed Format = ""; else Title = Title .. TransTitle .. TransError; end end if is_set(Place) then Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " "; end if is_set (Conference) then if is_set (ConferenceURL) then Conference = external_link( ConferenceURL, Conference, ConferenceURLorigin, nil ); end Conference = sepc .. " " .. Conference .. ConferenceFormat; elseif is_set(ConferenceURL) then Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURLorigin, nil ); end if not is_set(Position) then local Minutes = A['Minutes']; local Time = A['Time']; if is_set(Minutes) then if is_set (Time) then table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'minutes') .. ' and ' .. wrap_style ('parameter', 'time')}, true ) } ); end Position = " " .. Minutes .. " " .. cfg.messages['minutes']; else if is_set(Time) then local TimeCaption = A['TimeCaption'] if not 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, Mode); At = is_set(At) and (sepc .. " " .. At) or ""; Position = is_set(Position) and (sepc .. " " .. Position) or ""; if config.CitationClass == 'map' then local Section = A['Section']; local Sections = A['Sections']; local Inset = A['Inset']; if is_set( Inset ) then Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase); end if is_set( Sections ) then Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase); elseif is_set( Section ) then Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase); end At = At .. Inset .. Section; end if is_set (Language) then Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc else Language=""; -- language not specified so make sure this is an empty string; --[[ TODO: need to extract the wrap_msg from language_parameter so that we can solve parentheses bunching problem with Format/Language/TitleType ]] end Others = is_set(Others) and (sepc .. " " .. Others) or ""; if is_set (Translators) then if 'mla' == Mode then Others = sepc .. ' Trans. ' .. Translators .. Others; else Others = sepc .. ' ' .. wrap_msg ('translated', Translators, use_lowercase) .. Others; end end if is_set (Interviewers) then Others = sepc .. ' ' .. wrap_msg ('interview', Interviewers, use_lowercase) .. Others; end TitleNote = is_set(TitleNote) and (sepc .. " " .. TitleNote) or ""; if is_set (Edition) then if Edition:match ('%f[%a][Ee]d%.?$') or Edition:match ('%f[%a][Ee]dition$') or mw.ustring.match (Edition, '%f[%a][Ии]зд%.?$') or mw.ustring.match (Edition, '%f[%a][Ии]здање$') or mw.ustring.match (Edition, '%f[%a][Ii]zd%.?$') or mw.ustring.match (Edition, '%f[%a][Ii]zdanje$') then add_maint_cat ('extra_text', 'edition'); end if 'mla' == Mode then Edition = '. ' .. Edition .. ' изд.'; else Edition = " " .. wrap_msg ('edition', Edition); end else Edition = ''; end Series = is_set(Series) and (sepc .. " " .. Series) or ""; if 'mla' == Mode then -- not in brackets for mla OrigYear = is_set(OrigYear) and (". " .. OrigYear) or ""; else OrigYear = is_set(OrigYear) and (" [" .. OrigYear .. "]") or ""; end Agency = is_set(Agency) and (sepc .. " " .. Agency) or ""; Volume = format_volume_issue (Volume, Issue, config.CitationClass, Periodical_origin, sepc, use_lowercase, Mode); ------------------------------------ totally unrelated data if is_set(Via) then Via = " " .. wrap_msg ('via', Via); end --[[ Subscription implies paywall; Registration does not. If both are used in a citation, the subscription required link note is displayed. There are no error messages for this condition. ]] if is_set (SubscriptionRequired) then SubscriptionRequired = sepc .. " " .. cfg.messages['subscription']; -- subscription required message elseif is_set (RegistrationRequired) then SubscriptionRequired = sepc .. " " .. cfg.messages['registration']; -- registration required message else SubscriptionRequired = ''; -- either or both might be set to something other than yes true y end if is_set(AccessDate) then local retrv_text = " " .. cfg.messages['retrieved'] AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format if 'mla' == Mode then -- retrieved text not used in mla AccessDate = ' ' .. AccessDate; else if (sepc ~= ".") then retrv_text = retrv_text:lower() end -- if mode is cs2, lower case AccessDate = substitute (retrv_text, AccessDate); -- add retrieved text end AccessDate = substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates end if is_set(ID) then ID = sepc .." ".. ID; end if "thesis" == config.CitationClass and is_set(Docket) then ID = sepc .." Docket ".. Docket .. ID; end if "report" == config.CitationClass and is_set(Docket) then -- for cite report when |docket= is set ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set end ID_list = build_id_list( ID_list, {IdAccessLevels=ID_access_levels, DoiBroken = DoiBroken, ASINTLD = ASINTLD, IgnoreISBN = IgnoreISBN, Embargo=Embargo, Class = Class} ); if is_set(URL) then URL = " " .. external_link( URL, nil, URLorigin, UrlAccess ); end if is_set(Quote) then if mw.ustring.sub(Quote,1,1) == '»' and mw.ustring.sub(Quote, -1,-1) == '«' then -- if first and last characters of quote are quote marks Quote = mw.ustring.sub(Quote, 2,-2); -- strip them off end Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set end local Archived if is_set(ArchiveURL) then if not is_set(ArchiveDate) then ArchiveDate = set_error('archive_missing_date'); end if "live" == UrlStatus then local arch_text = cfg.messages['archived']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. substitute( cfg.messages['archived-not-dead'], { external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL'), nil ) .. ArchiveFormat, ArchiveDate } ); if not is_set(OriginalURL) then Archived = Archived .. " " .. set_error('archive_missing_url'); end elseif is_set(OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown' local arch_text = cfg.messages['archived-dead']; if sepc ~= "." then arch_text = arch_text:lower() end if in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then Archived = sepc .. " " .. 'Архивирано из оригинала ' .. ArchiveDate .. '. г.'; -- format already styled if 'bot: unknown' == UrlStatus then add_maint_cat ('bot:_unknown'); -- and add a category if not already added else add_maint_cat ('unfit'); -- and add a category if not already added end else -- UrlStatus is empty, 'yes', 'true', or 'y' Archived = sepc .. " " .. substitute( arch_text, { external_link( OriginalURL, cfg.messages['original'], OriginalURLorigin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); -- format already styled end else local arch_text = cfg.messages['archived-missing']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. substitute( arch_text, { set_error('archive_missing_url'), ArchiveDate } ); end elseif is_set (ArchiveFormat) then Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message else Archived = "" end local Lay = ''; if is_set(LayURL) then if is_set(LayDate) then LayDate = " (" .. LayDate .. ")" end if is_set(LaySource) then LaySource = " &ndash; ''" .. 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 is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url= Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message end if is_set(Transcript) then if is_set(TranscriptURL) then Transcript = external_link( TranscriptURL, Transcript, TranscriptURLorigin, nil ); end Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat; elseif is_set(TranscriptURL) then Transcript = external_link( TranscriptURL, nil, TranscriptURLorigin, nil ); end local Publisher; if is_set(PublicationDate) then PublicationDate = wrap_msg ('published', PublicationDate); end if is_set(PublisherName) then if is_set(PublicationPlace) then Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate; else Publisher = sepc .. " " .. PublisherName .. PublicationDate; end elseif is_set(PublicationPlace) then Publisher= sepc .. " " .. PublicationPlace .. PublicationDate; else Publisher = PublicationDate; end -- Several of the above rely upon detecting this as nil, so do it last. if is_set(Periodical) then if is_set(Title) or is_set(TitleNote) then Periodical = sepc .. " " .. wrap_style ('italic-title', Periodical) else Periodical = wrap_style ('italic-title', Periodical) end end --[[ Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided). ]] if "speech" == config.CitationClass then -- cite speech only TitleNote = " (Говор)"; -- annotate the citation if is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter if 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 Agency = Agency and ('-{' .. Agency .. '}-') Cartography = Cartography and ('-{' .. Cartography .. '}-') Conference = Conference and ('-{' .. Conference .. '}-') Others = Others and ('-{' .. Others .. '}-') Periodical = Periodical and ('-{' .. Periodical .. '}-') Publisher = Publisher and ('-{' .. Publisher .. '}-') Series = Series and ('-{' .. Series .. '}-') Title = Title and ('-{' .. Title .. '}-') TitleNote = TitleNote and ('-{' .. TitleNote .. '}-') if in_array(config.CitationClass, {"journal","citation"}) and is_set(Periodical) then if is_set(Others) then Others = Others .. sepc .. " " end if 'mla' == Mode then tcommon = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency, Volume}, sepc ); else tcommon = safe_join( {Others, Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency, Volume}, sepc ); end elseif in_array(config.CitationClass, {"book","citation"}) and not is_set(Periodical) then -- special cases for book cites if 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 if 'mla' == Mode then tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Volume, Edition, Publisher, Agency}, sepc ); else tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc ); end elseif 'mla' == Mode then tcommon = safe_join( {TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, 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 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 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, Transcript, Language, Edition, Publisher}, sepc ); elseif ('news' == config.CitationClass) and ('mla' == Mode) then -- special case for cite news in MLA mode tcommon = safe_join( {Periodical, Format, TitleType, Series, Language, Edition, Agency}, sepc ); elseif ('web' == config.CitationClass) and ('mla' == Mode) then -- special case for cite web in MLA mode tcommon = safe_join( {Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency}, 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 idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, SubscriptionRequired, Lay, Quote }, sepc ); idcommon = idcommon and ('-{' .. idcommon .. '}-'); local text; local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; if is_set(Date) then if ('mla' == Mode) then if in_array (config.CitationClass, {'book', 'news', 'web'}) then Date = ', ' .. Date; -- origyear follows title in mla elseif 'journal' == config.CitationClass then Date = ', (' .. Date .. ')'; end elseif is_set (Authors) or is_set (Editors) then -- date follows authors or editors when authors not set Date = " (" .. Date ..")" .. OrigYear .. sepc .. " "; -- in paranetheses 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 .. OrigYear; -- Date does not begin with sepc else Date = sepc .. " " .. Date .. OrigYear; -- Date begins with sepc end end end if is_set(Authors) then if (not is_set (Date)) or ('mla' == Mode) 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 is_set(Editors) then local in_text = " "; local post_text = ""; if is_set(Chapter) and 0 == #c and 'mla' ~= Mode then in_text = in_text .. cfg.messages['in'] .. " " if (sepc ~= '.') then in_text = in_text:lower() end -- lowercase for cs2 elseif is_set(Chapter) and 'mla' == Mode then if EditorCount <= 1 then in_text = '. ур. '; else in_text = '. ур. '; end else if EditorCount <= 1 then post_text = ", " .. cfg.messages['editor']; else post_text = ", " .. cfg.messages['editors']; end end Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space end if 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 is_set (Editors) and is_set (Date) and ('mla' ~= Mode) 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 is_set (Date)) or ('mla' == Mode) 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 if 'mla' == Mode then text = safe_join( {Contributors, Chapter, tcommon, OrigYear, Authors, Place, Others, Editors, tcommon2, Date, pgtext, idcommon }, sepc ); else text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc ); end elseif 'mla' == Mode then tcommon = tcommon .. Date; -- hack to avoid duplicate separators text = safe_join( {Authors, Chapter, Title, OrigYear, Others, Editors, Edition, Place, tcommon, pgtext, idcommon }, sepc ); else text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc ); end elseif is_set(Editors) then if 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 if 'mla' == Mode then if in_array(config.CitationClass, {'journal', 'news', 'web'}) and is_set(Periodical) then text = safe_join( {Editors, Title, Place, tcommon, pgtext, Date, idcommon}, sepc ); else text = safe_join( {Editors, Chapter, Title, Place, tcommon, Date, pgtext, idcommon}, sepc ); end else text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc ); end elseif 'mla' == Mode then if in_array(config.CitationClass, {'journal', 'news', 'web'}) and is_set(Periodical) then text = safe_join( {Title, Place, tcommon, pgtext, Date, idcommon}, sepc ); else text = safe_join( {Chapter, Title, Place, tcommon, Date, pgtext, idcommon}, sepc ); end else if in_array(config.CitationClass, {"journal","citation"}) and 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 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 = {}; if is_set(config.CitationClass) and config.CitationClass ~= "citation" then options.class = config.CitationClass; options.class = "citation " .. config.CitationClass; -- class=citation required for blue highlight when used with |ref= else options.class = "citation"; end if is_set(Ref) and Ref:lower() ~= "none" then -- set reference anchor if appropriate local id = Ref if ('harv' == Ref ) then local namelist = {}; -- holds selected contributor, author, editor name list local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation if #c > 0 then -- if there is a contributor list namelist = c; -- select it elseif #a > 0 then -- or an author list namelist = a; elseif #e > 0 then -- or an editor list namelist = e; end if #namelist > 0 then -- if there are names in namelist id = anchor_id (namelist, year); -- go make the CITEREF anchor else id = ''; -- unset end end options.id = id; end if string.len(text:gsub("<span[^>/]*>(.-)</span>", "%1"):gsub("%b<>","")) <= 2 then -- remove <span> tags and other html-like markup; then get length of what remains z.error_categories = {}; text = set_error('empty_citation'); z.message_tail = {}; end if is_set(options.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags text = substitute (cfg.presentation['cite-id'], {mw.uri.anchorEncode(options.id), mw.text.nowiki(options.class), text}); -- when |ref= is set else text = substitute (cfg.presentation['cite'], {mw.text.nowiki(options.class), text}); -- all other cases end text = text .. substitute (cfg.presentation['ocins'], {OCinSoutput}); -- append metadata to the citation if #z.message_tail ~= 0 then text = text .. " "; for i,v in ipairs( z.message_tail ) do if is_set(v[1]) then if i == #z.message_tail then text = text .. error_comment( v[1], v[2] ); else text = text .. error_comment( v[1] .. "; ", v[2] ); end end end end if #z.maintenance_cats ~= 0 then text = text .. '<span class="citation-comment" style="display:none; color:#33aa33; margin-left:0.3em">'; for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories text = text .. v .. ' ([[:Категорија:' .. v ..'|веза]])'; end text = text .. '</span>'; -- maintenance mesages (really just the names of the categories for now) end no_tracking_cats = no_tracking_cats:lower(); if in_array(no_tracking_cats, {"", "no", "false", "n"}) then for _, v in ipairs( z.error_categories ) do text = text .. '[[Категорија:' .. v ..']]'; end for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories text = text .. '[[Категорија:' .. v ..']]'; end for _, v in ipairs( z.properties_cats ) do -- append maintenance categories text = text .. '[[Категорија:' .. v ..']]'; end end if args.coauthors and args.coauthors ~= '' then text = text .. '[[Категорија:CS1 coauthors]]' end return text end --[[--------------------------< C S 1 . C I T A T I O N >------------------------------------------------------ This is used by templates such as {{cite book}} to create the actual citation text. ]] function cs1.citation(frame) Frame = frame; -- save a copy incase we need to display an error message in preview mode local pframe = frame:getParent() local validation, utilities, identifiers, metadata, styles; if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); -- load sandbox versions of support modules whitelist = mw.loadData ('Module:Citation/CS1/Whitelist/sandbox'); utilities = require ('Module:Citation/CS1/Utilities/sandbox'); validation = require ('Module:Citation/CS1/Date_validation/sandbox'); identifiers = require ('Module:Citation/CS1/Identifiers/sandbox'); metadata = require ('Module:Citation/CS1/COinS/sandbox'); styles = 'Module:Citation/CS1/sandbox/styles.css'; else -- otherwise cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load live versions of support modules whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); utilities = require ('Module:Citation/CS1/Utilities'); validation = require ('Module:Citation/CS1/Date_validation'); identifiers = require ('Module:Citation/CS1/Identifiers'); metadata = require ('Module:Citation/CS1/COinS'); styles = 'Module:Citation/CS1/styles.css'; end utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the 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 (utilities); -- so that functions in Date validataion can see 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 dates = validation.dates; -- imported functions from Module:Citation/CS1/Date validation year_date_check = validation.year_date_check; reformat_dates = validation.reformat_dates; date_ndash_to_dash = validation.date_ndash_to_dash; -- remove_trailing_dot = validation.remove_trailing_dot; -- date_hyphen_to_dash = validation.date_hyphen_to_dash; date_name_xlate = validation.date_name_xlate; translate_english_months = validation.translate_english_months; is_set = utilities.is_set; -- imported functions from Module:Citation/CS1/Utilities in_array = utilities.in_array; substitute = utilities.substitute; error_comment = utilities.error_comment; set_error = utilities.set_error; select_one = utilities.select_one; add_maint_cat = utilities.add_maint_cat; wrap_style = utilities.wrap_style; safe_for_italics = utilities.safe_for_italics; is_wikilink = utilities.is_wikilink; make_wikilink = utilities.make_wikilink; strip_apostrophe_markup = utilities.strip_apostrophe_markup; z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities extract_ids = identifiers.extract_ids; -- imported functions from Module:Citation/CS1/Identifiers build_id_list = identifiers.build_id_list; is_embargoed = identifiers.is_embargoed; extract_id_access_levels = identifiers.extract_id_access_levels; make_coins_title = metadata.make_coins_title; -- imported functions from Module:Citation/CS1/COinS get_coins_pages = metadata.get_coins_pages; COinS = metadata.COinS; local args = {}; -- table where we store all of the template's arguments local suggestions = {}; -- table where we store suggestions if we need to loadData them local error_text, error_state; local config = {}; -- table to store parameters from the module {{#invoke:}} for k, v in pairs( frame.args ) do config[k] = v; -- args[k] = v; -- debug tool that allows us to render a citation from module {{#invoke:}} end local capture; -- the single supported capture when matching unknown parameters using patterns for k, v in pairs( pframe.args ) do if v ~= '' then if not validate( k, config.CitationClass ) then error_text = ""; if type( k ) ~= 'string' then -- Exclude empty numbered parameters if v:match("%S+") ~= nil then error_text, error_state = set_error( 'text_ignored', {v}, true ); end elseif validate( k:lower(), config.CitationClass ) then error_text, error_state = set_error( 'parameter_ignored_suggest', {k, k:lower()}, true ); else if nil == suggestions.suggestions then -- if this table is nil then we need to load it if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions/sandbox' ); -- use the sandbox version else suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions' ); -- use the live version end end for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter capture = mw.ustring.match (k, pattern); -- the whole match if no caputre in pattern else the capture if a match if capture then -- if the pattern matches param = substitute( param, capture ); -- add the capture to the suggested parameter (typically the enumerator) error_text, error_state = set_error( 'parameter_ignored_suggest', {k, param}, true ); -- set the error message end end if not is_set (error_text) then -- couldn't match with a pattern, is there an expicit suggestion? if suggestions.suggestions[ k:lower() ] ~= nil then error_text, error_state = set_error( 'parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}, true ); else error_text, error_state = set_error( 'parameter_ignored', {k}, true ); v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists) end end end if error_text ~= '' then table.insert( z.message_tail, {error_text, error_state} ); end end missing_pipe_check (v); -- do we think that there is a parameter that is missing a pipe? args[k] = v; elseif args[k] ~= nil or (k == 'postscript') then args[k] = v; end end for k, v in pairs( args ) do if 'string' == type (k) then -- don't evaluate positional parameters has_invisible_chars (k, v); end end return citation0( config, args) end return cs1; 41oomyvzfv3ubfb6s2fdvrc0q7szop1 Модул:Citation/CS1/Configuration 828 3188 19511 2026-06-23T18:17:32Z Saslavik 1716 Нова страница: local citation_config = {}; -- омогућава да се унутар <code>...</code> тагова спречи боја, ивице и пединг. <code> css је одређен овде: -- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 local code_style="color:inherit; border:inherit; padding:inherit;"; --[[--------------------------< Н Е К А Т Е Г О Р И С… 19511 Scribunto text/plain local citation_config = {}; -- омогућава да се унутар <code>...</code> тагова спречи боја, ивице и пединг. <code> css је одређен овде: -- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 local code_style="color:inherit; border:inherit; padding:inherit;"; --[[--------------------------< Н Е К А Т Е Г О Р И С А Н И И М Е Н С К И П Р О С Т О Р И >------------------------------ Списак именских простора који су изузети од приказивања грешака у категоријама. Исто као и notracking = true (подразумевано) Напомена: Именски простори би требало да користе доњу црту уместо размака. ]] local uncategorized_namespaces = { -- en.wikipedia 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', 'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft', 'Draft_talk', 'Education_Program_talk', 'Module_talk', 'MediaWiki_talk', -- sr.wikipedia 'Корисник', 'Разговор', 'Разговор са корисником', 'Разговор о Википедији', 'Разговор о датотеци', 'Разговор о шаблону', 'Разговор о помоћи', 'Разговор о категорији', 'Разговор о порталу', 'Разговор о књизи', 'Скица', 'Разговор о скици', 'Разговор о едукационом програму', 'Разговор о модулу', 'Разговор о Медијавикију' }; local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[Пп]есак', '/[Тт]ест'}; -- Списак Луа наставака на имену странице која не треба да се категоризује --[[--------------------------< П О Р У К Е >-------------------------------------------------------------- Табела за превод Следећа табела садржи фиксирани текст који ће се приказати у референци. Одвојена је од главног тела како би се олакшао будући превод овог модула. ]] local messages = { ['archived-dead'] = 'Архивирано из $1 на датум $2', ['archived-not-dead'] = '$1 из оригинала на датум $2', ['archived-missing'] = 'Архивирано из оригинала$1 на датум $2', ['archived'] = 'Архивирано', ['by'] = 'Од стране', -- доприноси за ауторске радове: увод, предговор, поговор ['cartography'] = 'Картографија: $1', ['editor'] = 'ур.', ['editors'] = 'ур.', ['edition'] = '($1 изд.)', ['episode'] = 'Епизода $1', ['et al'] = '-{et&nbsp;al}-.', ['in'] = 'Ур.:', -- уређивани радови (НЕ мењати у 'на' за језике) ['inactive'] = 'неактивно', ['inset'] = '$1 прилог', ['interview'] = 'Интервју са $1', ['lay summary'] = 'Генерални сажетак', ['newsgroup'] = '[[:en:Usenet newsgroup|Дискусиона група]]:&nbsp;$1', ['original'] = 'оригинала', ['published'] = ' (објављено $1)', ['retrieved'] = 'Приступљено $1', ['season'] = 'Сезона $1', ['section'] = '§ $1', ['sections'] = '§§ $1', ['series'] = 'Серија $1', ['translated'] = 'Превод: $1', ['type'] = ' ($1)', -- за тип наслова ['written'] = 'Написано на $1', ['vol'] = '$1 св.&nbsp;$2', -- $1 се одређује; подебљано "св." у новинарском стилу је у делу presentation{} ['vol-no'] = '$1 св.&nbsp;$2 бр.&nbsp;$3', -- одређ., свезак, издање ['issue'] = '$1 бр.&nbsp;$2', -- $1 се одређује ['j-vol'] = '$1 $2', -- одређ., свезак; подебљано "св." у новинарском стилу је у делу presentation{} ['j-issue'] = ' ($1)', ['nopp'] = '$1 $2'; -- страница/странице без префикса; $1 се одређује ['p-prefix'] = "$1 стр.&nbsp;$2", -- $1 се одређује ['pp-prefix'] = "$1 стр.&nbsp;$2", -- $1 се одређује ['j-page(s)'] = ': $1', -- исто за једну страницу и више страница ['sheet'] = '$1 лист.&nbsp;$2', -- $1 се одређује ['sheets'] = '$1 лист.&nbsp;$2', -- $1 се одређује ['j-sheet'] = ': лист.&nbsp;$1', ['j-sheets'] = ': лист.&nbsp;$1', ['subscription'] = '<span style="font-size:90%; color:#555">[Претплата неопходна (<span title="Сајт захтева новчану претплату за приступ овој страници." style="border-bottom:1px dotted;cursor:help">помоћ</span>)]</span>' .. '[[Категорија:Странице с изворима за чији приступ је неопходна претплата]]', ['registration']='<span style="font-size:90%; color:#555">[Регистрација неопходна (<span title="Сајт захтева регистрацију за приступ овој страници." style="border-bottom:1px dotted;cursor:help">помоћ</span>)]</span>' .. '[[Категорија:Странице с изворима за чији приступ је неопходна регистрација]]', ['language'] = '(на језику: $1)', ['via'] = " &mdash; преко $1", ['event'] = 'Корисна информација се налази на:', ['minutes'] = 'мин', ['parameter-separator'] = ', ', ['parameter-final-separator'] = ' и ', ['parameter-pair-separator'] = ' и ', -- Одређивање локације странице за помоћ ['help page link'] = 'Помоћ:CS1 грешке', ['help page label'] = 'помоћ', -- Унутрашње грешке (требало би да се појављују само ако је конфигурација лоша) ['undefined_error'] = 'Шаблон је позван са недефинисаном грешком', ['unknown_manual_ID'] = 'Мануелни ID мод није препознат', ['unknown_ID_mode'] = 'ID мод није препознат', ['unknown_argument_map'] = 'Мапа аргумената није дефинисана за ову варијаблу', ['bare_url_no_origin'] = '„Чисти” URL је пронађен, али индикатор порекла је нил или празан', } --[[--------------------------< П Р Е З Е Н Т А Ц И Ј А >------------------------------------------------------ Означавање фиксне презентације. Првобитно део citation_config.messages; премештено у своју, семантички више тачно место. ]] local presentation = { -- Испис грешке -- .error класа је одређена на https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538 -- .citation-comment класа је одређена на :en:Help:CS1_errors#Controlling_error_message_display ['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', ['visible-error'] = '<span style="font-size:100%" class="error citation-comment">$1</span>', ['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- да би се уредницима омогућило сакривање датума приступања помоћу њиховог личног CSS-а ['bdi'] = '<bdi$1>$2</bdi>', -- двосмерна изолација коришћена са |script-title= и слично ['cite'] = '<cite class="$1">$2</cite>'; -- |ref= није постављен па нема id="..." атрибута ['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- за употребу када је |ref= постављен ['format'] = ' <span style="font-size:85%;">($1)</span>', -- за |format=, |chapter-format= итд. -- разни нивои приступа, за |приступ=, |дои-приступ=, |аркајв=, ... -- уски неломљиви размак &#8239; може да ради боље него nowrap css, или не? подршка за прегледаче? ['access-signal'] = '<span class="plainlinks">$1&#8239;$2</span>', -- спољашња веза са одговарајућом иконом катанца ['free'] = '[[File:Lock-green.svg|9px|link=|alt=Слободан приступ|Слободан приступ]]', ['registration'] = '[[File:Lock-blue-alt-2.svg|9px|link=|alt=Неопходна слободна регистрација|Неопходна слободна регистрација]]', ['limited'] = '[[File:Lock-blue-alt-2.svg|9px|link=|alt=Слободан приступ ограничен дужином пробне верзије, иначе неопходна претплата|Слободан приступ ограничен дужином пробне верзије, иначе неопходна претплата]]', ['subscription'] = '[[File:Lock-red-alt.svg|9px|link=|alt=Неопходна новчана претплата|Неопходна новчана претплата]]', ['italic-title'] = "''$1''", ['kern-left'] = '<span style="padding-left:0.2em;">$1</span>$2', -- размицање у случају када наслов садржи водећи (на почетку) једноструки или двоструки знак навода ['kern-right'] = '$1<span style="padding-right:0.2em;">$2</span>', -- размицање у случају када наслов садржи пратећи (на крају) једноструки или двоструки знак навода ['nowrap1'] = '<span class="nowrap">$1</span>', -- за спречавање преламања датума (потпуно) ['nowrap2'] = '<span class="nowrap">$1</span> $2', -- за спречавање преламања датума (делимично); обратити пажњу на белину/размаке ['nowrap3'] = '<span class="nowrap">$1</span> <span class="nowrap">$2</span>', -- за спречавање преламања датума (делимично); обратити пажњу на белину/размаке ['nowrap4'] = '<span class="nowrap">$1</span> <span class="nowrap">$2</span> <span class="nowrap">$3</span> $4', -- за спречавање преламања датума (делимично); обратити пажњу на белину/размаке ['ocins'] = '<span title="$1" class="Z3988"><span style="display:none;">&nbsp;</span></span>', -- Напомена: Употреба display-а: none у COinS span-у квари неке clients-е ['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>', ['quoted-text'] = '»$1«', -- за садржај |quote= параметра ['quoted-title'] = '„$1”', ['trans-italic-title'] = "&#91;''$1''&#93;", ['trans-quoted-title'] = "&#91;$1&#93;", ['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; за подебљане journal изворе; за друге изворе ['vol'] је у делу messages{} } --[[--------------------------< П С Е У Д О Н И М И >---------------------------------------------------------------- Табела псеудонима, односно алтернативних назива најчешће коришћене параметре ]] local aliases = { ['AccessDate'] = {'access-date', 'accessdate', 'приступ-датум', 'приступдатум', 'pristup-datum', 'pristupdatum'}, ['Agency'] = {'agency', 'агенција', 'agencija'}, ['AirDate'] = {'air-date', 'airdate', 'објава-датум', 'објавадатум', 'objava-datum', 'objavadatum'}, ['ArchiveDate'] = {'archive-date', 'archivedate', 'архивирање-датум', 'архивирањедатум', 'arhiviranje-datum', 'arhiviranjedatum'}, ['ArchiveFormat'] = {'archive-format', 'archiveformat', 'архивирање-формат', 'архивирањеформат', 'arhiviranje-format', 'arhiviranjeformat'}, ['ArchiveURL'] = {'archive-url', 'archiveurl', 'архивирање-урл', 'архивирањеурл', 'архивирање-url', 'архивирањеurl', 'архивирање-УРЛ', 'архивирањеУРЛ', 'архивирање-URL', 'архивирањеURL', 'arhiviranje-url', 'arhiviranjeurl', 'arhiviranje-URL', 'arhiviranjeURL'}, ['ASINTLD'] = {'ASIN-TLD', 'asin-tld', 'АСИН-ТЛД', 'асин-тлд'}, ['At'] = {'at', 'на', 'na'}, ['Authors'] = {'authors', 'people', 'host', 'credits', 'аутори', 'људи', 'домаћин', 'заслуге', 'autori', 'ljudi', 'domaćin', 'zasluge'}, ['BookTitle'] = {'book-title', 'booktitle', 'књига-наслов', 'књиганаслов', 'knjiga-naslov', 'knjiganaslov'}, ['Cartography'] = {'cartography', 'картографија', 'kartografija'}, ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section', 'поглавље', 'допринос', 'унос', 'чланак', 'одељак', 'poglavlje', 'doprinos', 'unos', 'članak', 'odeljak'}, ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'section-format', 'поглавље-формат', 'допринос-формат', 'одељак-формат', 'poglavlje-format', 'doprinos-format', 'odeljak-format'}; ['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl', 'поглавље-урл', 'поглављеурл', 'допринос-урл', 'доприносурл', 'одељак-урл', 'одељакурл', 'поглавље-url', 'поглављеurl', 'допринос-url', 'доприносurl', 'одељак-url', 'одељакurl', 'поглавље-УРЛ', 'поглављеУРЛ', 'допринос-УРЛ', 'доприносУРЛ', 'одељак-УРЛ', 'одељакУРЛ', 'поглавље-URL', 'поглављеURL', 'допринос-URL', 'доприносURL', 'одељак-URL', 'одељакURL', 'poglavlje-url', 'poglavljeurl', 'doprinos-url', 'doprinosurl', 'odeljak-url', 'odeljakurl', 'poglavlje-URL', 'poglavljeURL', 'doprinos-URL', 'doprinosURL', 'odeljak-URL', 'odeljakURL'}, ['Class'] = {'class', 'класа', 'klasa'}, -- cite arxiv и arxiv идентификатори ['Collaboration'] = {'collaboration', 'сарадња', 'колаборација', 'saradnja', 'kolaboracija'}, ['Conference'] = {'conference', 'event', 'конференција', 'догађај', 'konferencija', 'događaj'}, ['ConferenceFormat'] = {'conference-format', 'event-format', 'conferenceformat', 'eventformat', 'конференција-формат', 'догађај-формат', 'конференцијаформат', 'догађајформат', 'konferencija-format', 'događaj-format', 'konferencijaformat', 'događajformat'}, ['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl', 'конференција-урл', 'конференцијаурл', 'догађај-урл', 'догађајурл', 'конференција-УРЛ', 'конференцијаУРЛ', 'догађај-УРЛ', 'догађајУРЛ', 'конференција-URL', 'конференцијаURL', 'догађај-URL', 'догађајURL', 'konferencija-url', 'konferencijaurl', 'događaj-url', 'događajurl', 'konferencija-URL', 'konferencijaURL', 'događaj-URL', 'događajURL'}, ['Contribution'] = {'contribution', 'допринос', 'doprinos'}, -- увод, предговор, поговор итд.; неопходно када је параметар |contributor= употребљен ['Date'] = {'date', 'датум', 'datum'}, ['DeadURL'] = {'dead-url', 'deadurl', 'мртав-урл', 'мртавурл', 'мртви-урл', 'мртвиурл', 'мртав-url', 'мртавurl', 'мртви-url', 'мртвиurl', 'мртав-УРЛ', 'мртавУРЛ', 'мртви-УРЛ', 'мртвиУРЛ', 'мртав-URL', 'мртавURL', 'мртви-URL', 'мртвиURL', 'mrtav-url', 'mrtavurl', 'mrtvi-url', 'mrtviurl', 'mrtav-URL', 'mrtavURL', 'mrtvi-URL', 'mrtviURL'}, ['Degree'] = {'degree', 'степен', 'stepen'}, ['DF'] = {'df', 'раз', 'разл', 'raz', 'razl'}, -- не знам где се користи параметар DF ['DisplayAuthors'] = {'display-authors', 'displayauthors', 'аутори-приказ', 'ауториприказ', 'autori-prikaz', 'autoriprikaz'}, ['DisplayEditors'] = {'display-editors', 'displayeditors', 'уредници-приказ', 'уреднициприказ', 'urednici-prikaz', 'uredniciprikaz'}, ['Docket'] = {'docket', 'етикета', 'etiketa'}, ['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date', 'doi_brokendate', 'doi_inactivedate', 'дои-покварен', 'дои-покварен-датум', 'дои-неактиван-датум', 'дои_покварендатум', 'дои_неактивандатум', 'doi-pokvaren', 'doi-pokvaren-datum', 'doi-neaktivan-datum', 'doi_pokvarendatum', 'doi_neaktivandatum'}, ['Edition'] = {'edition', 'издање', 'izdanje'}, ['Editors'] = {'editors', 'уредници', 'urednici'}, ['Embargo'] = {'embargo', 'ембарго', 'embargo'}, ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'енциклопедија', 'enciklopedija'}, -- користи се само од стране citation ['Episode'] = {'episode', 'епизода', 'epizoda'}, -- cite serial треба направити; омогућити cite episode? ['Format'] = {'format', 'формат', 'format'}, ['ID'] = {'id', 'ID', 'ид', 'ИД'}, ['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror', 'грешка-исбн-игнорисати', 'грешкаисбнигнорисати', 'greška-isbn-ignorisati', 'greškaisbnignorisati'}, ['Inset'] = {'inset', 'прилог', 'prilog'}, ['Issue'] = {'issue', 'number', 'издање', 'број', 'izdanje', 'broj'}, ['Interviewers'] = {'interviewers', 'интервјуери', 'анкетари', 'intervjueri', 'anketari'}, ['Language'] = {'language', 'in', 'језик', 'jezik'}, ['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp', 'последњи-аутор-амп', 'последњиауторамп', 'poslednji-autor-amp', 'poslednjiautoramp'}, ['LayDate'] = {'lay-date', 'laydate', 'главни-датум', 'главнидатум', 'glavni-datum', 'glavnidatum'}, ['LayFormat'] = {'lay-format', 'layformat', 'главни-формат', 'главниформат', 'glavni-format', 'glavniformat'}, ['LaySource'] = {'lay-source', 'laysource', 'главни-извор', 'главниизвор', 'glavni-izvor', 'glavniizvor'}, ['LayURL'] = {'lay-url', 'layurl', 'lay-summary', 'laysummary', 'главни-урл', 'главниурл', 'главни-url', 'главниurl', 'главни-УРЛ', 'главниУРЛ', 'главни-URL', 'главниURL', 'главни-сажетак', 'главнисажетак', 'glavni-url', 'glavniurl', 'glavni-URL', 'glavniURL', 'glavni-sažetak', 'glavnisažetak'}, ['MailingList'] = {'mailinglist', 'mailing-list', 'листаадреса', 'листа-адреса', 'listaadresa', 'lista-adresa'}, -- само за cite mailing list ['Map'] = {'map', 'мапа', 'mapa'}, -- само за cite map ['MapFormat'] = {'map-format', 'mapformat', 'мапа-формат', 'мапаформат', 'mapa-format', 'mapaformat'}, -- само за cite map ['MapURL'] = {'map-url', 'mapurl', 'мапа-урл', 'мапаурл', 'мапа-url', 'мапаurl', 'мапа-УРЛ', 'мапаУРЛ', 'мапа-URL', 'мапаURL', 'mapa-url', 'mapaurl', 'mapa-URL', 'mapaURL'}, -- само за cite map ['MessageID'] = {'message-id', 'messageid', 'message-ID', 'messageID', 'порука-ид', 'порукаид', 'порука-ИД', 'порукаИД', 'порука-id', 'порукаid', 'порука-ID', 'порукаID', 'poruka-id', 'porukaid', 'poruka-ID', 'porukaID'}, ['Minutes'] = {'minutes', 'минуте', 'minute'}, ['Mode'] = {'mode', 'мод', 'mod'}, ['NameListFormat'] = {'name-list-format', 'namelistformat', 'листа-имена-формат', 'листаименаформат', 'lista-imena-format', 'listaimenaformat'}, ['Network'] = {'network', 'мрежа', 'mreža'}, ['NoPP'] = {'no-pp', 'nopp', 'не-pp', 'неpp', 'ne-pp', 'nepp'}, ['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat', 'no-tracking', 'notracking', 'шаблон-док-демо', 'шаблон док демо', 'не-кат', 'некат', 'не-праћење', 'непраћење', 'šablon-dok-demo', 'šablon dok demo', 'ne-kat', 'nekat', 'ne-praćenje', 'nepraćenje'}, ['Number'] = {'number', 'број', 'broj'}, -- само за cite techreport ['OrigYear'] = {'orig-year', 'origyear', 'порекло-година', 'пореклогодина', 'poreklo-godina', 'poreklogodina'}, ['Others'] = {'others', 'други', 'остали', 'drugi', 'ostali'}, ['Page'] = {'p', 'page', 'п', 'страница', 'stranica'}, ['Pages'] = {'pp', 'pages', 'пп', 'стр', 'странице', 'str', 'stranice'}, ['Periodical'] = {'journal', 'newspaper', 'magazine', 'work', 'website', 'periodical', 'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist', 'журнал', 'новине', 'магазин', 'рад', 'веб-сајт', 'часопис', 'месечник', 'енциклопедија', 'речник', 'адресалиста', 'žurnal', 'novine', 'magazin', 'rad', 'veb-sajt', 'časopis', 'mesečnik', 'enciklopedija', 'rečnik', 'adresalista'}, ['Place'] = {'place', 'location', 'место', 'локација', 'mesto', 'lokacija'}, ['PostScript'] = {'postscript', 'ps', 'PS', 'постскриптум', 'пс', 'ПС', 'postskriptum'}, ['PublicationDate'] = {'publicationdate', 'publication-date', 'публикацијадатум', 'публикација-датум', 'издавањедатум', 'издавање-датум', 'објављивањедатум', 'објављивање-датум', 'publikacijadatum', 'publikacija-datum', 'izdavanjedatum', 'izdavanje-datum', 'objavljivanjedatum', 'objavljivanje-datum'}, ['PublicationPlace'] = {'publication-place', 'publicationplace', 'publication-location', 'publicationlocation', 'публикацијаместо', 'публикација-место', 'издавањеместо', 'издавање-место', 'објављивањеместо', 'објављивање-место', 'публикацијалокација', 'публикација-локација', 'издавањелокација', 'издавање-локација', 'објављивањелокација', 'објављивање-локација', 'publikacijamesto', 'publikacija-mesto', 'izdavanjemesto', 'izdavanje-mesto', 'objavljivanjemesto', 'objavljivanje-mesto', 'publikacijalokacija', 'publikacija-lokacija', 'izdavanjelokacija', 'izdavanje-lokacija', 'objavljivanjelokacija', 'objavljivanje-lokacija'}, ['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup', 'издавач', 'дистрибутер', 'институција', 'дискусионагрупа', 'izdavač', 'distributer', 'institucija', 'diskusionagrupa'}, ['Quote'] = {'quote', 'quotation', 'навод', 'цитат', 'navod', 'citat'}, ['Ref'] = {'ref', 'реф'}, ['RegistrationRequired'] = {'registration', 'регистрација', 'registracija'}, ['Scale'] = {'scale', 'скала', 'skala'}, ['ScriptChapter'] = {'script-chapter', 'писмо-поглавље', 'поглавље-писмо', 'pismo-poglavlje', 'poglavlje-pismo'}, ['ScriptTitle'] = {'script-title', 'писмо-наслов', 'наслов-писмо', 'pismo-naslov', 'naslov-pismo'}, ['Section'] = {'section', 'одељак', 'odeljak'}, ['Season'] = {'season', 'сезона', 'sezona'}, ['Sections'] = {'sections', 'одељци', 'odeljci'}, -- само за cite map ['Series'] = {'series', 'version', 'серија', 'верзија', 'serija', 'verzija'}, ['SeriesSeparator'] = {'series-separator', 'seriesseparator', 'серија-сепаратор', 'серијасепаратор', 'serija-separator', 'serijaseparator'}, ['SeriesLink'] = {'series-link', 'serieslink', 'серија-линк', 'серијалинк', 'серија-веза', 'серијавеза', 'serija-link', 'serijalink', 'serija-veza', 'serijaveza'}, ['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno', 'серија-број', 'серија-бр', 'серијаброј', 'серијабр', 'serija-broj', 'serija-br', 'serijabroj', 'serijabr'}, ['Sheet'] = {'sheet', 'лист', 'list'}, -- само за cite map ['Sheets'] = {'sheets', 'листови', 'listovi'}, -- само за cite map ['Station'] = {'station', 'станица', 'stanica'}, ['SubscriptionRequired'] = {'subscription', 'претплата', 'pretplata'}, ['Time'] = {'time', 'време', 'vreme'}, ['TimeCaption'] = {'time-caption', 'timecaption', 'време-опис', 'времеопис', 'vreme-opis', 'vremeopis'}, ['Title'] = {'title', 'наслов', 'назив', 'naslov', 'naziv'}, ['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink', 'наслов-линк', 'епизода-линк', 'насловлинк', 'епизодалинк', 'наслов-веза', 'епизода-веза', 'насловвеза', 'епизодавеза', 'назив-линк', 'назив-веза', 'називлинк', 'називвеза', 'naslov-link', 'epizoda-link', 'naslovlink', 'epizodalink', 'naslov-veza', 'epizoda-veza', 'naslovveza', 'epizodaveza', 'naziv-link', 'naziv-veza', 'nazivlink', 'nazivveza'}, ['TitleNote'] = {'department', 'одељење', 'odeljenje'}, ['TitleType'] = {'type', 'medium', 'тип', 'медијум', 'tip', 'medijum'}, ['TransChapter'] = {'trans-chapter', 'trans_chapter', 'прев-поглавље', 'прев_поглавље', 'prev-poglavlje', 'prev_poglavlje'}, ['TransMap'] = {'trans-map', 'прев-мапа', 'prev-mapa'}, -- само за cite map ['Transcript'] = {'transcript', 'транскрипт', 'transkript'}, ['TranscriptFormat'] = {'transcript-format', 'transcriptformat', 'транскрипт-формат', 'транскриптформат', 'transkript-format', 'transkriptformat'}, ['TranscriptURL'] = {'transcript-url', 'transcripturl', 'транскрипт-урл', 'транскриптурл', 'транскрипт-url', 'транскриптurl', 'транскрипт-УРЛ', 'транскриптУРЛ', 'транскрипт-URL', 'транскриптURL', 'transkript-url', 'transkripturl', 'transkript-URL', 'transkriptURL'}, ['TransTitle'] = {'trans-title', 'trans_title', 'прев-наслов', 'прев_наслов', 'прев-назив', 'прев_назив', 'prev-naslov', 'prev_naslov', 'prev-naziv', 'prev_naziv'}, ['URL'] = {'url', 'URL', 'урл', 'УРЛ'}, ['UrlAccess'] = {'url-access', 'URL-access', 'урл-приступ', 'УРЛ-приступ', 'url-pristup', 'URL-pristup'}, ['Vauthors'] = {'vauthors', 'ваутори', 'vautori'}, ['Veditors'] = {'veditors', 'вуредници', 'vurednici'}, ['Via'] = {'via', 'преко', 'preko'}, ['Volume'] = {'volume', 'свезак', 'svezak'}, ['Year'] = {'year', 'година', 'godina'}, ['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first", "име#", "дато#", "аутор-име#", "аутор#-име", "ime#", "dato#", "autor-ime#", "autor#-ime"}, ['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#", "презиме#", "аутор#", "аутор-презиме#", "аутор#-презиме", "субјект#", "prezime#", "autor#", "autor-prezime#", "autor#-prezime", "subjekt#"}, ['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link", "ауторлинк#", "аутор-линк#", "аутор#-линк", "субјектлинк#", "аутор#линк", "субјект-линк#", "субјект#-линк", "субјект#линк", "autorlink#", "autor-link#", "autor#-link", "subjektlink#", "autor#link", "subjekt-link#", "subjekt#-link", "subjekt#link"}, ['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask", "аутор-маска#", "аутормаска#", "аутор#маска", "аутор#-маска", "autor-maska#", "autormaska#", "autor#maska", "autor#-maska"}, ['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given', 'сарадник-име#', 'сарадник#-име', 'saradnik-ime#', 'saradnik#-ime'}, ['ContributorList-Last'] = {'contributor#', 'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname', 'сарадник#', 'сарадник-презиме#', 'сарадник#-презиме', 'saradnik#', 'saradnik-prezime#', 'saradnik#-prezime'}, ['ContributorList-Link'] = {'contributor-link#', 'contributor#-link', 'сарадник-линк#', 'сарадник#-линк', 'saradnik-link#', 'saradnik#-link'}, ['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask', 'сарадник-маска#', 'сарадник#-маска', 'saradnik-maska#', 'saradnik#-maska'}, ['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given", "уредник-име#", "уредник#-име", "уредник-дато#", "уредник#-дато", "urednik-ime#", "urednik#-ime", "urednik-dato#", "urednik#-dato"}, ['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname", "уредник#", "уредник-презиме#", "уредник#-презиме", "urednik#", "urednik-prezime#", "urednik#-prezime"}, ['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link", "уредник-линк#", "уредник#-линк", "уредниклинк#", "уредник#линк", "urednik-link#", "urednik#-link", "uredniklink#", "urednik#link"}, ['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask", "уредник-маска#", "уредник#-маска", "уредникмаска#", "уредник#маска", "urednik-maska#", "urednik#-maska", "urednikmaska#", "urednik#maska"}, ['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first', 'интервјуер-име#', 'интервјуер#-име', 'анкетар-име#', 'анкетар#-име', 'intervjuer-ime#', 'intervjuer#-ime', 'anketar-ime#', 'anketar#-ime'}, ['InterviewerList-Last'] = {'interviewer#', 'interviewer-last#', 'interviewer#-last', 'интервјуер#', 'интервјуер-презиме#', 'интервјуер#-презиме', 'анкетар#', 'анкетар-презиме#', 'анкетар#-презиме', 'intervjuer#', 'intervjuer-prezime#', 'intervjuer#-prezime', 'anketar#', 'anketar-prezime#', 'anketar#-prezime'}, ['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link', 'интервјуер-линк#', 'интервјуер#-линк', 'анкетар-линк#', 'анкетар#-линк', 'intervjuer-link#', 'intervjuer#-link', 'anketar-link#', 'anketar#-link'}, ['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask', 'интервјуер-маска#', 'интервјуер#-маска', 'анкетар-маска#', 'анкетар#-маска', 'intervjuer-maska#', 'intervjuer#-maska', 'anketar-maska#', 'anketar#-maska'}, ['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given', 'преводилац-име#', 'преводилац#-име', 'prevodilac-ime#', 'prevodilac#-ime'}, ['TranslatorList-Last'] = {'translator#', 'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname', 'преводилац#', 'преводилац-презиме#', 'преводилац#-презиме', 'prevodilac#', 'prevodilac-prezime#', 'prevodilac#-prezime'}, ['TranslatorList-Link'] = {'translator-link#', 'translator#-link', 'преводилац-линк#', 'преводилац#-линк', 'prevodilac-link#', 'prevodilac#-link'}, ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask', 'преводилац-маска#', 'преводилац#-маска', 'prevodilac-maska#', 'prevodilac#-maska'}, } --[[--------------------------< П Р Е В О Д И З А С П Е Ц И Ј А Л Н Е С Л У Ч А Ј Е В Е >---------------------------- Ова табела је овде понајвише због подршке за интернационализацију. Преводи у овој табели се користе, на пример, када се порука о грешци, име категорије и сл. извлачи из псеудонимског кључа на енглеском. Могуће је да постоје и други случајеви где ови преводи могу да буду од користи. ]] local special_case_translation = { ['AuthorList'] = "списак аутора", -- за вишеструка имена / категорије за одржавање ['ContributorList'] = "списак сарадника", ['EditorList'] = "списак уредника", ['InterviewerList'] = "списак анкетара", ['TranslatorList'] = "списак преводилаца", ['authors'] = "аутори", -- користи се у get_display_authors_editors() ['editors'] = "уредници", } --[[--------------------------< П О Д Р А З У М Е В А Н Е В Р Е Д Н О С Т И >-------------------------------------------------------------- Подразумеване вредности параметара сачувати ово? само једна подразумевана вредност? ]] local defaults = { ['DeadURL'] = 'yes', } --[[--------------------------< С В Е З А К , И З Д А Њ Е , С Т Р А Н И Ц А >---------------------------------------- Ове табеле садржавају класне вредности за наводе (по позиву шаблона) те идентификују оне шаблоне који подржавају |volume=, |issue= и |page(s)= параметре. Cite conference и cite map захтевају додатну квалификацију која је обрађена у главном модулу. ]] 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'} local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'} --[[--------------------------< К Љ У Ч Н Е Р Е Ч И >-------------------------------------------------------------- Ова табела садржава кључне речи за оне параметре који имају дефинисане сетове прихватљивих кључних речи. ]] local keywords = { ['yes_true_y'] = {'yes', 'true', 'y', 'да', 'д', 'da', 'd'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription -- ['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped', 'да', 'д', 'не', 'н', 'da', 'd', 'ne', 'n', 'unfit no archive', 'usurped no archive', 'неподобно за архивирање', 'архива није узурпирана', 'nepodobno za arhiviranje', 'arhiva nije uzurpirana'}, -- hidden 2016-04-10; see Help_talk:Citation_Style_1#Recycled_urls ['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped', 'bot: unknown', 'да', 'д', 'не', 'н', 'неподобно', 'узурпирано', 'бот: непознато', 'da', 'd', 'ne', 'n', 'nepodobno', 'uzurpirano', 'bot: nepoznato'}, ['mode'] = {'cs1', 'cs2', 'mla', 'цс1', 'цс2', 'мла', 'ЦС1', 'ЦС2', 'МЛА', 'CS1', 'CS2', 'MLA'}, ['name-list-format'] = {'vanc', 'ванц'}, ['contribution'] = {'afterword', 'foreword', 'introduction', 'preface', 'поговор', 'предговор', 'увод', 'pogovor', 'predgovor', 'uvod'}, -- генерички наслови доприноса који се приказују без наводника, и то за chapter ['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all', 'ДМГ', 'ДМГ-све', 'МДГ', 'МДГ-све', 'ГМД', 'ГМД-све', 'DMG', 'DMG-sve', 'MDG', 'MDG-sve', 'GMD', 'GMD-sve'}, ['url-access'] = {'subscription', 'limited', 'registration', 'претплата', 'ограничен', 'ограничено', 'регистрација', 'pretplata', 'ograničen', 'ograničeno', 'registracija'}, -- ниво приступа URL-а (неопходна претплата, ограничен приступ, неопходна слободна регистрација), слободно за читање је подразумевано ['id-access'] = {'free', 'слободан', 'слободно', 'slobodan', 'slobodno'}, -- ниво приступа идентификатора (слободно за читање), неопходна претплата (или нема комплетног текста) је подразумевано } --[[--------------------------< С Т Р И П М А Р К Е Р И >------------------------------------------------------ Дефиниције уобичајених узорака за стрипмаркере тако да их се не мора ловити ако (када) Медијавики промени њихов облик. ]] local stripmarkers = { ['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- снимање враћа име стрипмаркера ['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- математички стрипмаркери који се користе у coins_cleanup() и coins_replace_math_stripmarker() } --[[--------------------------< Н Е В И Д Љ И В И К А Р А К Т Е Р И >-------------------------------------- Ова табела садржава карактере који се неће штампати тј. који су невидљиви, а који су индексирани по имену или по Уникод групи. Вредности су децималне репрезентације УТФ-8 кодова. Табела је организована као табела табела зато што Луа упарује кључне речи и враћа податке табеле у арбитрарном редоследу. Овде желимо да обрадимо табело од врха до дна зато што се уноси на врху табеле такође налазе у интервалима одређеним уносима на дну табеле. Ова листа садржава узорке за шаблоне попут {{'}} који не представљају грешку али укључују карактере који су невидљиви. Овакви шаблони морају бити препознати од стране функција које користе листу. Такође, овде је шаблон који препознаје стрипмаркере који почињу и завршавају са карактерима за брисање. „nowiki” стрипмаркер није грешка али неки други јесу зато што вредности параметара који их укључују постају део метаподатака шаблона пре замене стрипмаркера. ]] local invisible_chars = { {'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD {'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D {'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B {'hair space', '\226\128\138'}, -- U+200A, E2 80 8A {'soft hyphen', '\194\173'}, -- U+00AD, C2 AD {'horizontal tab', '\009'}, -- U+0009 (HT), 09 {'line feed', '\010'}, -- U+000A (LF), 0A {'carriage return', '\013'}, -- U+000D (CR), 0D {'stripmarker', stripmarkers.any}, -- стрипмаркер; може а и не мора да буде грешка; снимање враћа тип стрипмаркера {'delete', '\127'}, -- U+007F (DEL), 7F; мора бити урађено након стрипмаркер теста {'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (осим 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 } --[[--------------------------< L A N G U A G E S >------------------------------------------------------------ This table is used to hold ISO 639-1 two-character language codes that apply only to |script-title= and |script-chapter= ]] local script_lang_codes = { 'am', 'ar', 'be', 'bg', 'bn', 'bs', 'dv', 'el', -- ISO 639-1 codes only for |script-title= and |script-chapter= 'fa', 'he', 'hy', 'ja', 'ka', 'kn', 'ko', 'ku', 'mk', 'ml', 'mr', 'my', 'ps', 'ru', 'sd', 'th', -- sr, sr-ec and sr-el have been removed as on sr.wikipedia Cyrillic script is generally allowed to be italicized 'uk', 'ug', 'ur', 'yi', 'zh' }; --[[--------------------------< К А Т Е Г О Р И Ј Е З А О Д Р Ж А В А Њ Е >---------------------------------- Овде именујемо категорије за одржавање које ће да буду коришћене у порукама обавештења о одржавању. ]] local maint_cats = { ['ASIN'] = 'CS1 одржавање: ASIN користи ISBN', ['authors'] = 'CS1 одржавање: Употреба параметра аутори', ['bot:_unknown'] = 'CS1 одржавање: BOT: статус параметра оригинални-URL непознат', ['date_format'] = 'CS1 одржавање: Формат датума', ['date_year'] = 'CS1 одржавање: Датум и година', ['disp_auth_ed'] = 'CS1 одржавање: $1-приказ', -- $1 је authors или editors; узима вредност из табеле special_case_translation ['editors'] = 'CS1 одржавање: Употреба параметра уредници', ['embargo'] = 'CS1 одржавање: PMC ембарго истекао', ['english'] = 'CS1 одржавање: Одређен српски језик', ['etal'] = 'CS1 одржавање: Експлицитна употреба et al.', ['extra_text'] = 'CS1 одржавање: Текст вишка', ['extra_text_names'] = 'CS1 одржавање: Текст вишка: $1', -- $1 је <name>s list; узима вредност из табеле special_case_translation table ['ignore_isbn_err'] = 'CS1 одржавање: Игнорисане ISBN грешке', ['interviewers'] = 'CS1 одржавање: Употреба параметра анкетари', ['missing_pipe'] = 'CS1 одржавање: Недостаје усправна црта', ['mult_names'] = 'CS1 одржавање: Вишеструка имена: $1', -- $1 је списак <име>; узима вредност из табеле special_case_translation ['pmc_format'] = 'CS1 одржавање: Формат PMC-а', ['unfit'] = 'CS1 одржавање: Неподобан URL', ['unknown_lang'] = 'CS1 одржавање: Непрепознат језик', ['untitled'] = 'CS1 одржавање: Часопис без наслова', } --[[--------------------------< К А Т Е Г О Р И Ј Е З А С В О Ј С Т В А >------------------------------------ Овде именујемо категорије за својства ]] local prop_cats = { ['foreign_lang_source'] = 'CS1 извори на $1 језику ($2)', -- |language= категорије; $1 је име језика, $2 је ISO639-1 код ['foreign_lang_source_2'] = 'CS1 извори на страним језицима (ISO 639-2)|$1', -- |language= категорије; категорија за ISO639-2 језике; $1 је ISO 639-2 код ['script'] = 'CS1 наслови на писмима страних језика', -- када језик одређен са |script-title=xx: нема своју сопствену категорију ['script_with_name'] = 'CS1 наслови на писму $1 језика ($2)', -- |script-title=xx: има одговарајућу категорију; $1 је име језика, $2 је ISO639-1 код } --[[--------------------------< Т И П О В И Н А С Л О В А >-------------------------------------------------------- Овде мапирамо CitationClass шаблона на TitleType (подразумеване вредности за |type= параметар) ]] local title_types = { ['AV-media-notes'] = 'Медијске белешке', ['interview'] = 'Интервју', ['mailinglist'] = 'Листа адреса', ['map'] = 'Мапа', ['podcast'] = 'Подкест', ['pressrelease'] = 'Саопштење', ['report'] = 'Извештај', ['techreport'] = 'Технички извештај', ['thesis'] = 'Теза', } --[[--------------------------< У С Л О В И З А Г Р Е Ш К Е >---------------------------------------------- Табела услова за грешке Следећа табела садржава листу ID-ова за различите услове грешака дефинисаних у коду. За сваки ID, одређујемо текстну поруку за приказ, категорију грешке која ће да буде додана, те да ли порука за грешку треба да буде обрађена као скривени коментар. Измене анкора захтевају идентичне измене за одговарајући анкор у :en:Help:CS1 errors ]] local error_conditions = { accessdate_missing_url = { message = '<code style="'..code_style..'">&#124;access-date=</code> захтева <code style="'..code_style..'">&#124;url=</code>', anchor = 'accessdate_missing_url', category = 'Странице са изворима и датумом приступања без URL-а', hidden = true }, archive_missing_date = { message = '<code style="'..code_style..'">&#124;archive-url=</code> захтева <code style="'..code_style..'">&#124;archive-date=</code>', anchor = 'archive_missing_date', category = 'Странице са изворима и грешком у параметру архивираног URL-а', hidden = false }, archive_missing_url = { message = '<code style="'..code_style..'">&#124;archive-url=</code> захтева <code style="'..code_style..'">&#124;url=</code>', anchor = 'archive_missing_url', category = 'Странице са изворима и грешком у параметру архивираног URL-а', hidden = false }, archive_url = { message = '<code style="'..code_style..'">&#124;archive-url=</code> је неисправан: $1', anchor = 'archive_url', category = 'Странице са изворима и грешком у параметру архивираног URL-а', hidden = false }, arxiv_missing = { message = '<code style="'..code_style..'">&#124;arxiv=</code> неопходан', anchor = 'arxiv_missing', category = 'CS1 грешке: arXiv', -- исто као и bad arxiv hidden = false }, arxiv_params_not_supported = { message = 'Неподржани параметри у cite arXiv-у', anchor = 'arxiv_params_not_supported', category = 'CS1 грешке: arXiv', -- исто као и bad arxiv hidden = false }, bad_arxiv = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;arxiv=</code>', anchor = 'bad_arxiv', category = 'CS1 грешке: arXiv', hidden = false }, bad_asin = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;asin=</code>', anchor = 'bad_asin', category ='CS1 грешке: ASIN', hidden = false }, bad_bibcode = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;bibcode=</code> $1', anchor = 'bad_bibcode', category = 'CS1 грешке: bibcode', hidden = false }, bad_biorxiv = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;biorxiv=</code> $1', anchor = 'bad_biorxiv', category = 'CS1 грешке: bioRxiv', hidden = false }, bad_citeseerx = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;citeseerx=</code> $1', anchor = 'bad_citeseerx', category = 'CS1 грешке: citeseerx', hidden = false }, bad_date = { message = 'Проверите вредност парамет(а)ра за датум: <code style="'..code_style..'">$1</code>', anchor = 'bad_date', category = 'CS1 грешке: датуми', hidden = false }, bad_doi = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;doi=</code>', anchor = 'bad_doi', category = 'CS1 грешке: DOI', hidden = false }, bad_hdl = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;hdl=</code>', anchor = 'bad_hdl', category = 'CS1 грешке: HDL', hidden = false }, bad_isbn = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;isbn=</code>: $1', anchor = 'bad_isbn', category = 'CS1 грешке: ISBN', hidden = false }, bad_ismn = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;ismn=</code>', anchor = 'bad_ismn', category = 'CS1 грешке: ISMN', hidden = false }, bad_issn = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;$1issn=</code>', anchor = 'bad_issn', category = 'CS1 грешке: ISSN', hidden = false }, bad_lccn = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;lccn=</code>', anchor = 'bad_lccn', category = 'CS1 грешке: LCCN', hidden = false }, bad_message_id = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;message-id=</code>', anchor = 'bad_message_id', category = 'CS1 грешке: message-id', hidden = false }, bad_ol = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;ol=</code>', anchor = 'bad_ol', category = 'CS1 грешке: OL', hidden = false }, bad_paramlink = { -- за |title-link=, |author/editor/translator-link=, |series-link=, |episode-link= message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;$1=</code>', anchor = 'bad_paramlink', category = 'CS1 грешке: параметар за везу', hidden = false }, bad_pmc = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;pmc=</code>', anchor = 'bad_pmc', category = 'CS1 грешке: PMC', hidden = false }, bad_pmid = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;pmid=</code>', anchor = 'bad_pmid', category = 'CS1 грешке: PMID', hidden = false }, bad_oclc = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;oclc=</code>', anchor = 'bad_oclc', category = 'CS1 грешке: OCLC', hidden = false }, bad_ssrn = { message = 'Проверите вредност параметра <code style="'..code_style..'">&#124;ssrn=</code>', anchor = 'bad_ssrn', category = 'CS1 грешке: SSRN', hidden = false }, bad_url = { message = 'Проверите вредност параметра $1', anchor = 'bad_url', category = 'Странице са грешкама у URL-у', hidden = false }, bare_url_missing_title = { message = '$1 захтева наслов', anchor = 'bare_url_missing_title', category = 'Странице са изворима и URL-ом без наслова', hidden = false }, chapter_ignored = { message = '<code style="'..code_style..'">&#124;$1=</code> игнорисан', anchor = 'chapter_ignored', category = 'CS1 грешке: поглавље игнорисано', hidden = false }, citation_missing_title = { message = 'Недостаје или је празан параметар <code style="'..code_style..'">&#124;$1=</code>', anchor = 'citation_missing_title', category = 'Странице са изворима без наслова', hidden = false }, cite_web_url = { -- ова грешка се примењује на cite web и cite podcast message = 'Недостаје или је празан параметар <code style="'..code_style..'">&#124;url=</code>', anchor = 'cite_web_url', category = 'Странице са изворима са веба без URL-а', hidden = false }, contributor_ignored = { message = '<code style="'..code_style..'">&#124;contributor=</code> игнорисан</code>', anchor = 'contributor_ignored', category = 'CS1 грешке: сарадник', hidden = false }, contributor_missing_required_param = { message = '<code style="'..code_style..'">&#124;contributor=</code> захтева <code style="'..code_style..'">&#124;$1=</code>', anchor = 'contributor_missing_required_param', category = 'CS1 грешке: сарадник', hidden = false }, deprecated_params = { message = 'Користи се застарели параметар <code style="'..code_style..'">&#124;$1=</code>', anchor = 'deprecated_params', category = 'CS1 грешке: застарели параметри', hidden = false }, empty_citation = { message = 'Празан шаблон за навођење извора', anchor = 'empty_citation', category = 'Странице са празним шаблонима за навођење извора', hidden = false }, first_missing_last = { message = '<code style="'..code_style..'">&#124;first$2=</code> захтева <code style="'..code_style..'">&#124;last$2=</code> у $1', anchor = 'first_missing_last', category = 'CS1 грешке: недостаје аутор или уредник', hidden = false }, format_missing_url = { message = '<code style="'..code_style..'">&#124;$1=</code> захтева <code style="'..code_style..'">&#124;$2=</code>', anchor = 'format_missing_url', category = 'Странице са изворима и форматом без URL-а', hidden = false }, invalid_param_val = { message = 'Невалидан унос <code style="'..code_style..'">&#124;$1=$2</code>', anchor = 'invalid_param_val', category = 'CS1 грешке: невалидна вредност параметра', hidden = false }, invisible_char = { message = '$1 у $2 на позицији $3', anchor = 'invisible_char', category = 'CS1 грешке: невидљиви карактери', hidden = false }, missing_name = { message = 'Недостаје <code style="'..code_style..'">&#124;last$2=</code> у $1', anchor = 'missing_name', category = 'CS1 грешке: недостаје аутор или уредник', hidden = false }, param_access_requires_param = { message = '<code style="'..code_style..'">&#124;$1-приступ=</code> захтева <code style="'..code_style..'">&#124;$1=</code>', anchor = 'param_access_requires_param', category = 'CS1 грешке: параметар-приступ', hidden = false }, param_has_ext_link = { message = 'Спољашња веза у <code style="'..code_style..'">$1</code>', anchor = 'param_has_ext_link', category = 'CS1 грешке: спољашње везе', hidden = false }, parameter_ignored = { message = 'Непознати параметар <code style="'..code_style..'">&#124;$1=</code> игнорисан', anchor = 'parameter_ignored', category = 'Странице са изворима и параметрима који нису подржани', hidden = false }, parameter_ignored_suggest = { message = 'Непознати параметар <code style="'..code_style..'">&#124;$1=</code> игнорисан &#91;<code style="'..code_style..'">&#124;$2=</code> се препоручује&#93;', anchor = 'parameter_ignored_suggest', category = 'Странице са изворима и параметрима који нису подржани', hidden = false }, redundant_parameters = { message = 'Пронађени су сувишни параметри: $1', anchor = 'redundant_parameters', category = 'Странице са изворима и сувишно наведеним параметрима', hidden = false }, text_ignored = { message = 'Текст „$1” игнорисан', anchor = 'text_ignored', category = 'Странице са изворима и неименованим параметрима', hidden = false }, trans_missing_title = { message = '<code style="'..code_style..'">&#124;trans-$1=</code> захтева <code style="'..code_style..'">&#124;$1=</code>', anchor = 'trans_missing_title', category = 'CS1 грешке: превод наслова', hidden = false }, vancouver = { message = 'Грешка у ванкуверском стилу: $1', anchor = 'vancouver', category = 'CS1 грешке: ванкуверски стил', hidden = false }, wikilink_in_url = { message = 'Сукоб URL—викивеза', -- користи се mdash anchor = 'wikilink_in_url', category = 'CS1 грешке: сукоб URL—викивеза', -- користи се mdash hidden = false }, } --[[--------------------------< И Д Х Е Н Д Л Е Р И >-------------------------------------------------------- Следећа табела садржава листу вредности за различите дефинисане идентификаторе. За сваки идентификатор одређујемо одређен број информација потребним да се изврши правилна обрада идентификатора у референци. parameters: листа псеудонима параметара за овај идентификатор link: име чланка на Википедији label: алтернативно име да се примени на линк mode: 'manual' када постоји одређена функција у коду да се обради идентификатор; 'external' за идентификаторе који воде на страницу ван Википедије prefix: први део URL-а који ће бити спојен са другим делом који обично садржава идентификатор encode: true ако URL треба да буде постотно декодиран; у осталим случајевима false COinS: идентификаторски линк или кључна реч која ће се користити у COinS-у: за идентификаторе регистроване на info-uri.info користити кључну реч: info:.... за идентификаторе који имају COinS кључне речи, користити кључну реч: rft.isbn, rft.issn, rft.eissn за остале направити URL користећи вредност у префиксу, користити кључну реч: pre (није проверено; било који текст осим 'info' или 'rft' овде ради) поставити на nil да би се идентификатор оставио ван COinS-а separator: карактер или текст између ознаке и идентификатора у обрађеном цитату access: користити овај параметар за постављање нивоа приступа за све случајеве овог идентификатора; вредност мора да буде валидан ниво приступа за идентификатор (в. ['id-access'] у овом коду) custom_access: да се омогући измењени ниво приступа за идентификатор; поставити овај параметар на параметар који би требало да га контролише (обично 'id-access') ]] local id_handlers = { ['ARXIV'] = { parameters = {'arxiv', 'eprint', 'аркајв', 'епринт'}, link = 'arXiv', label = 'arXiv', mode = 'manual', prefix = '//arxiv.org/abs/', -- Протокол тестиран на 4. 9. 2013. г. encode = false, COinS = 'info:arxiv', separator = ':', access = 'free', -- слободно за читање }, ['ASIN'] = { parameters = {'asin', 'ASIN', 'асин', 'АСИН'}, link = ':en:Amazon Standard Identification Number', label = 'ASIN', mode = 'manual', prefix = '//www.amazon.', COinS = nil, -- нема COinS-а за овај ID (треба размислити о увођењу због |asin-tld=) separator = '&nbsp;', encode = false; }, ['BIBCODE'] = { parameters = {'bibcode', 'бибкод'}, link = 'Bibcode', label = 'Bibcode', -- mode = 'external', mode = 'manual', prefix = 'http://adsabs.harvard.edu/abs/', encode = false, COinS = 'info:bibcode', separator = ':', custom_access = 'bibcode-access', }, ['BIORXIV'] = { parameters = {'biorxiv', 'бајоаркајв', 'bajoarkajv'}, link = ':en:bioRxiv', label = 'bioRxiv', mode = 'manual', prefix = '//doi.org/10.1101/', COinS = 'pre', -- користи се prefix вредност access = 'free', -- слободно за читање encode = true, separator = '&nbsp;', }, ['CITESEERX'] = { parameters = {'citeseerx', 'сајтсиркс', 'sajtsirks'}, link = ':en:CiteSeerX', label = 'CiteSeerX', mode = 'manual', -- приручник за прилагођену валидацију за „doi” prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=', COinS = 'pre', -- користи се prefix вредност access = 'free', -- слободно за читање encode = true, separator = '&nbsp;', }, ['DOI'] = { parameters = {'doi', 'DOI', 'дои', 'ДОИ'}, link = 'Digitalni identifikator objekta', label = 'doi', mode = 'manual', prefix = '//doi.org/', COinS = 'info:doi', separator = ':', encode = true, custom_access = 'doi-access', }, ['EISSN'] = { parameters = {'eissn', 'EISSN', 'еиссн', 'ЕИССН'}, link = ':en:International_Standard_Serial_Number#Electronic_ISSN', label = 'eISSN', mode = 'manual', prefix = '//www.worldcat.org/issn/', COinS = 'rft.eissn', encode = false, separator = '&nbsp;', }, ['HDL'] = { parameters = {'hdl', 'HDL', 'хдл', 'ХДЛ'}, link = ':en:Handle System', label = 'hdl', mode = 'manual', prefix = '//hdl.handle.net/', COinS = 'info:hdl', separator = ':', encode = true, custom_access = 'hdl-access', }, ['ISBN'] = { parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13', 'исбн', 'ИСБН', 'исбн13', 'ИСБН13'}, link = 'Međunarodni standardni broj knjige', label = 'ISBN', mode = 'manual', prefix = 'Посебно:BookSources/', COinS = 'rft.isbn', separator = '&nbsp;', }, ['ISMN'] = { parameters = {'ismn', 'ISMN','исмн', 'ИСМН'}, link = ':en:International Standard Music Number', label = 'ISMN', mode = 'manual', prefix = '', -- тренутно се не користи; COinS = 'nil', -- nil јер не можемо користити pre или rft или info: separator = '&nbsp;', }, ['ISSN'] = { parameters = {'issn', 'ISSN', 'иссн', 'ИССН'}, link = 'Međunarodni standardni serijski broj', label = 'ISSN', mode = 'manual', prefix = '//www.worldcat.org/issn/', COinS = 'rft.issn', encode = false, separator = '&nbsp;', }, ['JFM'] = { parameters = {'jfm', 'JFM', 'јфм', 'ЈФМ'}, link = ':en:Jahrbuch über die Fortschritte der Mathematik', label = 'JFM', mode = 'external', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', }, ['JSTOR'] = { parameters = {'jstor', 'JSTOR', 'џејстор', 'јстор', 'ЈСТОР', 'džejstor'}, link = 'JSTOR', label = 'JSTOR', mode = 'external', prefix = '//www.jstor.org/stable/', -- Протокол тестиран на 4. 9. 2013. г. COinS = 'pre', -- користи се prefix вредност encode = false, separator = '&nbsp;', custom_access = 'jstor-access', }, ['LCCN'] = { parameters = {'LCCN', 'lccn', 'ЛЦЦН', 'лццн'}, link = 'Kontrolni broj Kongresne biblioteke', label = 'LCCN', mode = 'manual', prefix = '//lccn.loc.gov/', -- Протокол тестиран на 28. 12. 2015. г. COinS = 'info:lccn', -- користи се prefix вредност encode = false, separator = '&nbsp;', }, ['MR'] = { parameters = {'MR', 'mr', 'МР', 'мр'}, link = ':en:Mathematical Reviews', label = 'MR', mode = 'external', prefix = '//www.ams.org/mathscinet-getitem?mr=', -- Протокол тестиран на 4. 9. 2013. г. COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', }, ['OCLC'] = { parameters = {'OCLC', 'oclc', 'ОЦЛЦ', 'оцлц'}, link = 'OCLC', label = 'OCLC', mode = 'external', prefix = '//www.worldcat.org/oclc/', COinS = 'info:oclcnum', encode = true, separator = '&nbsp;', }, ['OL'] = { parameters = {'ol', 'OL', 'ол', 'ОЛ'}, link = ':en:Open Library', label = 'OL', mode = 'external', prefix = '//openlibrary.org/', COinS = nil, -- нема COinS-а за овај ID (треба размислити о увођењу због /authors/books/works/OL) separator = '&nbsp;', encode = true, custom_access = 'ol-access', }, ['OSTI'] = { parameters = {'OSTI', 'osti', 'ОСТИ', 'ости'}, link = ':en:Office of Scientific and Technical Information', label = 'OSTI', mode = 'external', prefix = '//www.osti.gov/energycitations/product.biblio.jsp?osti_id=', -- Протокол тестиран на 4. 9. 2013. г. COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', custom_access = 'osti-access', }, ['PMC'] = { parameters = {'PMC', 'pmc', 'ПМЦ', 'пмц'}, link = 'PubMed Central', label = 'PMC', mode = 'manual', prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC', suffix = " ", COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', access = 'free', -- слободно за читање }, ['PMID'] = { parameters = {'PMID', 'pmid', 'ПМИД', 'пмид'}, link = 'PMID', label = 'PMID', mode = 'manual', prefix = '//www.ncbi.nlm.nih.gov/pubmed/', COinS = 'info:pmid', encode = false, separator = '&nbsp;', }, ['RFC'] = { parameters = {'RFC', 'rfc', 'РФЦ', 'рфц'}, link = ':en:Request for Comments', label = 'RFC', mode = 'external', prefix = '//tools.ietf.org/html/rfc', COinS = 'pre', -- користи се prefix вредност encode = false, separator = '&nbsp;', access = 'free', -- слободно за читање }, ['SSRN'] = { parameters = {'SSRN', 'ssrn', 'ССРН', 'ссрн'}, link = ':en:Social Science Research Network', label = 'SSRN', mode = 'manual', prefix = '//ssrn.com/abstract=', -- Протокол тестиран на 4. 9. 2013. г. COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', access = 'free', -- увек слободан за читање }, ['USENETID'] = { parameters = {'message-id', 'messageid', 'message-ID', 'messageID', 'порука-ид', 'порукаид', 'порука-ИД', 'порукаИД', 'порука-id', 'порукаid', 'порука-ID', 'порукаID', 'poruka-id', 'porukaid', 'poruka-ID', 'porukaID'}, link = ':en:Usenet', label = 'Usenet:', mode = 'manual', prefix = 'news:', encode = false, COinS = 'pre', -- користи се prefix вредност separator = '&nbsp;', }, ['ZBL'] = { parameters = {'ZBL', 'zbl', 'ЗБЛ', 'збл'}, link = ':en:Zentralblatt MATH', label = 'Zbl', mode = 'external', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- користи се prefix вредност encode = true, separator = '&nbsp;', }, } return { aliases = aliases, special_case_translation = special_case_translation, defaults = defaults, error_conditions = error_conditions, id_handlers = id_handlers, keywords = keywords, stripmarkers=stripmarkers, invisible_chars = invisible_chars, maint_cats = maint_cats, messages = messages, presentation = presentation, prop_cats = prop_cats, script_lang_codes = script_lang_codes, 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, } mbjfckob96gpp8vxw60f7cdfydzdai1 Модул:Citation/CS1/Configuration/Whitelist 828 3189 19512 2026-06-23T18:26:07Z Saslavik 1716 Нова страница: --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['ARXIV'] = nil… 19512 Scribunto text/plain --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['ARXIV'] = nil, -- not an initialization ['Author'] = nil, -- non-standard capitalization ['authorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['author-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['began'] = nil, -- module handles date ranges; cite episode and cite series ['BIBCODE'] = nil, -- not an initialization ['callsign'] = nil, -- cite interview removed ['call-sign'] = nil, -- cite interview removed ['знакпозив'] = nil, -- cite interview removed ['знак-позив'] = nil, -- cite interview removed ['znakpoziv'] = nil, -- cite interview removed ['znak-poziv'] = nil, -- cite interview removed ['chapterlink'] = nil, -- if ever necessary to link to a chapter article, |chapter= can be wikilinked ['chapter-link'] = nil, -- ['city'] = nil, -- cite interview removed ['coauthor'] = nil, -- redundant to |authorn=; not made part of metadata ['coauthors'] = nil, -- redundant to |authorn=; not made part of metadata ['град'] = nil, -- cite interview removed ['коаутор'] = nil, -- redundant to |authorn=; not made part of metadata ['коаутори'] = nil, -- redundant to |authorn=; not made part of metadata ['grad'] = nil, -- cite interview removed ['koautor'] = nil, -- redundant to |authorn=; not made part of metadata ['koautori'] = nil, -- redundant to |authorn=; not made part of metadata ['cointerviewers'] = nil, -- unique alias of others used by old cite interview ['day'] = nil, -- deprecated in {{citation/core}} and somehow undeprecated in Module:Citation/CS1 and now finally removed ['director'] = nil, -- unique alias of author used by old cite DVD-notes ['DoiBroken'] = nil, -- not used, non-standard captialization ['Editor'] = nil, -- non-standard capitalization ['editorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorSurname'] = nil, -- non-standard capitalization ['editor-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorGiven'] = nil, -- non-standard capitalization ['editor-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['editor-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['Embargo'] = nil, -- not used, non-standard capitalization ['ended'] = nil, -- module handles date ranges; cite episode and cite series ['month'] = nil, -- functionality supported by |date= ['name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['notestitle'] = nil, -- unique alias of chapter used by old cite AV media notes ['PPrefix'] = nil, -- non-standard capitalization ['PPPrefix'] = nil, -- not used, non-standard capitalization ['pp-prefix'] = nil, -- not used, not documented ['p-prefix'] = nil, -- not used, not documented ['program'] = nil, -- cite interview removed ['програм'] = nil, -- cite interview removed ['program'] = nil, -- cite interview removed ['publisherid'] = nil, -- unique alias of id used by old cite AV media notes and old cite DVD-notes ['Ref'] = nil, -- non-standard capitalization ['separator'] = nil, -- this functionality now provided by |mode= ['titleyear'] = nil, -- unique alias of origyear used by old cite DVD-notes ['Author#'] = nil, -- non-standard capitalization ['authors#'] = nil, -- no need for multiple lists of author names ['Editor#'] = nil, -- non-standard capitalization ['editors#'] = nil, -- no need for multiple lists of editor names ['EditorGiven#'] = nil, -- non-standard capitalization ['EditorSurname#'] = nil, -- non-standard capitalization ]] --[[--------------------------< 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 nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local whitelist = {} local basic_arguments = { ['accessdate'] = true, ['access-date'] = true, ['agency'] = true, ['airdate'] = true, ['air-date'] = true, ['archivedate'] = true, ['archive-date'] = true, ['archive-format'] = true, ['archiveurl'] = true, ['archive-url'] = true, ['article'] = true, ['arxiv'] = true, ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['ASIN-TLD'] = true, ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-last'] = true, ['authorlink'] = true, ['author-link'] = true, ['authormask'] = true, ['author-mask'] = true, ['authors'] = true, ['bibcode'] = true, ['bibcode-access'] = true, ['biorxiv'] = true, ['booktitle'] = true, ['book-title'] = true, ['cartography'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapterurl'] = true, ['chapter-url'] = true, ['citeseerx'] = true, ['class'] = true, -- cite arxiv and arxiv identifiers ['collaboration'] = true, ['conference'] = true, ['conference-format'] = true, ['conferenceurl'] = true, ['conference-url'] = true, ['contribution'] = true, ['contribution-format'] = true, ['contributionurl'] = true, ['contribution-url'] = true, ['contributor'] = true, ['contributor-first'] = true, ['contributor-last'] = true, ['contributor-given'] = true, ['contributor-surname'] = true, ['contributor-link'] = true, ['contributor-mask'] = true, ['credits'] = true, -- cite episode, cite serial ['date'] = true, ['deadurl'] = true, ['dead-url'] = true, ['degree'] = true, ['department'] = true, ['df'] = true, ['dictionary'] = true, ['displayauthors'] = true, ['display-authors'] = true, ['displayeditors'] = true, ['display-editors'] = true, ['docket'] = true, ['doi'] = true, ['DOI'] = true, ['doi-access'] = true, ['doi-broken'] = true, ['doi_brokendate'] = true, -- @TODO deprecate underscore version? ['doi-broken-date'] = true, ['doi_inactivedate'] = true, -- @TODO deprecate underscore version? ['doi-inactive-date'] = true, ['edition'] = true, ['editor'] = true, ['editor-first'] = true, ['editor-given'] = true, ['editor-last'] = true, ['editorlink'] = true, ['editor-link'] = true, ['editormask'] = true, ['editor-mask'] = true, ['editors'] = true, ['editor-surname'] = true, ['eissn'] = true, ['EISSN'] = true, ['embargo'] = true, ['encyclopaedia'] = true, ['encyclopedia'] = true, ['entry'] = true, ['episode'] = true, -- cite serial only TODO: make available to cite episode? ['episodelink'] = true, -- cite episode and cite serial ['episode-link'] = true, -- cite episode and cite serial ['eprint'] = true, -- cite arxiv and arxiv identifiers ['event'] = true, ['event-format'] = true, ['eventurl'] = true, ['event-url'] = true, ['first'] = true, ['format'] = true, ['given'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-access'] = true, ['host'] = true, ['id'] = true, ['ID'] = true, ['ignoreisbnerror'] = true, ['ignore-isbn-error'] = true, ['in'] = true, ['inset'] = true, ['institution'] = true, ['interviewer'] = true, ['interviewer-first'] = true, ['interviewer-last'] = true, ['interviewerlink'] = true, ['interviewer-link'] = true, ['interviewermask'] = true, ['interviewer-mask'] = true, ['interviewers'] = true, ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['issue'] = true, ['jfm'] = true, ['JFM'] = true, ['journal'] = true, ['jstor'] = true, ['JSTOR'] = true, ['jstor-access'] = true, ['language'] = true, ['last'] = true, ['lastauthoramp'] = true, ['last-author-amp'] = true, ['laydate'] = true, ['lay-date'] = true, ['laysource'] = true, ['lay-source'] = true, ['laysummary'] = true, ['lay-summary'] = true, ['lay-format'] = true, ['layurl'] = true, ['lay-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['location'] = true, ['magazine'] = true, ['mailinglist'] = true, -- cite mailing list only ['mailing-list'] = true, -- cite mailing list only ['map'] = true, -- cite map only ['map-format'] = true, -- cite map only ['mapurl'] = true, -- cite map only ['map-url'] = true, -- cite map only ['medium'] = true, ['message-id'] = true, -- cite newsgroup ['minutes'] = true, ['mode'] = true, ['mr'] = true, ['MR'] = true, ['name-list-format'] = true, ['network'] = true, ['newsgroup'] = true, ['newspaper'] = true, ['nocat'] = true, ['no-cat'] = true, ['nopp'] = true, ['no-pp'] = true, ['notracking'] = true, ['no-tracking'] = true, ['number'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-access'] = 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, ['pmid'] = true, ['PMID'] = true, ['postscript'] = true, ['pp'] = true, ['publicationdate'] = true, ['publication-date'] = true, ['publicationplace'] = true, ['publication-place'] = true, ['publisher'] = true, ['quotation'] = true, ['quote'] = true, ['ref'] = true, ['registration'] = true, ['rfc'] = true, ['RFC'] = true, ['scale'] = true, ['script-chapter'] = true, ['script-title'] = true, ['season'] = true, ['section'] = true, ['section-format'] = true, ['sections'] = true, -- cite map only ['sectionurl'] = true, ['section-url'] = true, ['series'] = true, ['serieslink'] = true, ['series-link'] = true, ['seriesno'] = true, ['series-no'] = true, ['seriesnumber'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, -- cite map only ['sheets'] = true, -- cite map only ['ssrn'] = true, ['SSRN'] = true, ['station'] = true, ['subject'] = true, ['subjectlink'] = true, ['subject-link'] = true, ['subscription'] = true, ['surname'] = true, ['template doc demo'] = true, ['template-doc-demo'] = true, ['time'] = true, ['timecaption'] = true, ['time-caption'] = true, ['title'] = true, ['titlelink'] = true, ['title-link'] = true, ['trans_chapter'] = true, ['trans-chapter'] = true, ['trans-map'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcripturl'] = true, ['transcript-url'] = true, ['trans_title'] = true, ['trans-title'] = true, ['translator'] = true, ['translator-first'] = true, ['translator-last'] = true, ['translator-given'] = true, ['translator-surname'] = true, ['translator-link'] = true, ['translator-mask'] = true, ['type'] = true, ['url'] = true, ['URL'] = true, ['url-access'] = 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, ['s2cid'] = true, -- s2cid ['S2CID'] = true, ['s2cid-access'] = true, --СРПСКИ (ПРЕВОД): ['приступдатум'] = true, ['приступ-датум'] = true, ['агенција'] = true, ['објавадатум'] = true, ['објава-датум'] = true, ['архивирањедатум'] = true, ['архивирање-датум'] = true, ['архивирање-формат'] = true, ['архивирањеурл'] = true, ['архивирање-урл'] = true, ['чланак'] = true, ['аркајв'] = true, ['асин'] = true, ['АСИН'] = true, ['асин-тлд'] = true, ['АСИН-ТЛД'] = true, ['на'] = true, ['аутор'] = true, ['аутор-име'] = true, ['аутор-презиме'] = true, ['ауторлинк'] = true, ['аутор-линк'] = true, ['аутормаска'] = true, ['аутор-маска'] = true, ['аутори'] = true, ['бибкод'] = true, ['БИБКОД'] = false, ['бибкод-приступ'] = true, ['бајоаркајв'] = true, ['књиганаслов'] = true, ['књига-наслов'] = true, ['картографија'] = true, ['поглавље'] = true, ['поглавље-формат'] = true, ['поглављеурл'] = true, ['поглавље-урл'] = true, ['сајтсиркс'] = true, ['класа'] = true, -- cite arxiv and arxiv identifiers ['сарадња'] = true, ['колаборација'] = true, ['конференција'] = true, ['конференција-формат'] = true, ['конференцијаурл'] = true, ['конференција-урл'] = true, ['допринос'] = true, ['допринос-формат'] = true, ['доприносурл'] = true, ['допринос-урл'] = true, ['сарадник'] = true, ['сарадник-име'] = true, ['сарадник-презиме'] = true, ['сарадник-линк'] = true, ['сарадник-маска'] = true, ['заслуге'] = true, -- cite episode, cite serial ['датум'] = true, ['мртавурл'] = true, ['мртав-урл'] = true, ['степен'] = true, ['одељење'] = true, ['раз'] = true, ['разл'] = true, ['речник'] = true, ['ауториприказ'] = true, ['аутори-приказ'] = true, ['уреднициприказ'] = true, ['уредници-приказ'] = true, ['етикета'] = true, ['дои'] = true, ['ДОИ'] = true, ['дои-приступ'] = true, ['дои-покварен'] = true, ['дои_покварендатум'] = true, -- @TODO deprecate underscore version? ['дои-покварен-датум'] = true, ['дои_неактивандатум'] = true, -- @TODO deprecate underscore version? ['дои-неактиван-датум'] = true, ['издање'] = true, ['уредник'] = true, ['уредник-име'] = true, ['уредник-дато'] = true, ['уредник-презиме'] = true, ['уредниклинк'] = true, ['уредник-линк'] = true, ['уредникмаска'] = true, ['уредник-маска'] = true, ['уредници'] = true, ['уредник-презиме'] = true, ['еиссн'] = true, ['ЕИССН'] = true, ['ембарго'] = true, ['енциклопедија'] = true, ['енциклопедија'] = true, ['унос'] = true, ['епизода'] = true, -- cite serial only TODO: make available to cite episode? ['епизодалинк'] = true, -- cite episode and cite serial ['епизода-линк'] = true, -- cite episode and cite serial ['епринт'] = true, -- cite arxiv and arxiv identifiers ['догађај'] = true, ['догађај-формат'] = true, ['догађајурл'] = true, ['догађај-урл'] = true, ['име'] = true, ['формат'] = true, ['дато'] = true, ['хдл'] = true, ['ХДЛ'] = true, ['хдл-приступ'] = true, ['домаћин'] = true, ['ид'] = true, ['ИД'] = true, ['грешкаисбнигнорисати'] = true, ['грешка-исбн-игнорисати'] = true, ['на'] = true, ['прилог'] = true, ['институција'] = true, ['анкетар'] = true, ['анкетар-име'] = true, ['анкетар-презиме'] = true, ['анкетарлинк'] = true, ['анкетар-линк'] = true, ['анкетармаска'] = true, ['анкетар-маска'] = true, ['анкетари'] = true, ['исбн'] = true, ['ИСБН'] = true, ['исбн13'] = true, ['ИСБН13'] = true, ['исмн'] = true, ['ИСМН'] = true, ['иссн'] = true, ['ИССН'] = true, ['издање'] = true, ['јфм'] = true, ['ЈФМ'] = true, ['журнал'] = true, ['џејстор'] = true, ['јстор'] = true, ['ЈСТОР'] = true, ['џејстор-приступ'] = true, ['јстор-приступ'] = true, ['ЈСТОР-приступ'] = true, ['језик'] = true, ['презиме'] = true, ['последњиауторамп'] = true, ['последњи-аутор-амп'] = true, ['главнидатум'] = true, ['главни-датум'] = true, ['главниизвор'] = true, ['главни-извор'] = true, ['главнисажетак'] = true, ['главни-сажетак'] = true, ['главни-формат'] = true, ['главниурл'] = true, ['главни-урл'] = true, ['лццн'] = true, ['ЛЦЦН'] = true, ['локација'] = true, ['магазин'] = true, ['листаадреса'] = true, -- cite mailing list only ['листа-адреса'] = true, -- cite mailing list only ['мапа'] = true, -- cite map only ['мапа-формат'] = true, -- cite map only ['мапаурл'] = true, -- cite map only ['мапа-урл'] = true, -- cite map only ['медијум'] = true, ['порука-ид'] = true, -- cite newsgroup ['минуте'] = true, ['мод'] = true, ['мр'] = true, ['МР'] = true, ['листа-имена-формат'] = true, ['мрежа'] = true, ['дискусионагрупа'] = true, ['новине'] = true, ['некат'] = true, ['не-кат'] = true, ['непп'] = true, ['не-пп'] = true, ['непраћење'] = true, ['не-праћење'] = true, ['број'] = true, ['оцлц'] = true, ['ОЦЛЦ'] = true, ['ол'] = true, ['ОЛ'] = true, ['ол-приступ'] = true, ['пореклогодина'] = true, ['порекло-година'] = true, ['ости'] = true, ['ОСТИ'] = true, ['ости-приступ'] = true, ['други'] = true, ['п'] = true, ['страница'] = true, ['странице'] = true, ['људи'] = true, ['часопис'] = true, ['место'] = true, ['пмц'] = true, ['ПМЦ'] = true, ['пмид'] = true, ['ПМИД'] = true, ['постскриптум'] = true, ['пп'] = true, ['издавањедатум'] = true, ['издавање-датум'] = true, ['издавањеместо'] = true, ['издавање-место'] = true, ['издавач'] = true, ['цитат'] = true, ['навод'] = true, ['реф'] = true, ['регистрација'] = true, ['рфц'] = true, ['РФЦ'] = true, ['скала'] = true, ['писмо-поглавље'] = true, ['поглавље-писмо'] = true, ['писмо-наслов'] = true, ['наслов-писмо'] = true, ['сезона'] = true, ['одељак'] = true, ['одељак-формат'] = true, ['одељци'] = true, -- cite map only ['одељакурл'] = true, ['одељак-урл'] = true, ['серија'] = true, ['серијалинк'] = true, ['серија-линк'] = true, ['серијабр'] = true, ['серија-бр'] = true, ['серијаброј'] = true, ['серија-број'] = true, ['серија-сепаратор'] = true, ['лист'] = true, -- cite map only ['листови'] = true, -- cite map only ['ссрн'] = true, ['ССРН'] = true, ['станица'] = true, ['субјект'] = true, ['субјектлинк'] = true, ['субјект-линк'] = true, ['претплата'] = true, ['презиме'] = true, ['шаблон док демо'] = true, ['шаблон-док-демо'] = true, ['време'] = true, ['времеопис'] = true, ['време-опис'] = true, ['наслов'] = true, ['насловлинк'] = true, ['наслов-линк'] = true, ['транс_поглавље'] = true, ['транс-поглавље'] = true, ['транс-мапа'] = true, ['транскрипт'] = true, ['транскрипт-формат'] = true, ['транскриптурл'] = true, ['транскрипт-урл'] = true, ['прев_наслов'] = true, ['прев-наслов'] = true, ['преводилац'] = true, ['преводилац-име'] = true, ['преводилац-презиме'] = true, ['преводилац-линк'] = true, ['преводилац-маска'] = true, ['тип'] = true, ['урл'] = true, ['УРЛ'] = true, ['урл-приступ'] = true, ['УРЛ-приступ'] = true, ['ваутори'] = true, ['вуредници'] = true, ['верзија'] = true, ['преко'] = true, ['издање'] = true, ['веб-сајт'] = true, ['рад'] = true, ['година'] = true, ['збл'] = true, ['ЗБЛ'] = true, ['с2цид'] = true, -- s2cid ['С2ЦИД'] = true, ['с2цид-приступ'] = true, --SRPSKI (PREVOD): ['pristupdatum'] = true, ['pristup-datum'] = true, ['agencija'] = true, ['objavadatum'] = true, ['objava-datum'] = true, ['arhiviranjedatum'] = true, ['arhiviranje-datum'] = true, ['arhiviranje-format'] = true, ['arhiviranjeurl'] = true, ['arhiviranje-url'] = true, ['članak'] = true, ['arkajv'] = true, ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['ASIN-TLD'] = true, ['na'] = true, ['autor'] = true, ['autor-ime'] = true, ['autor-prezime'] = true, ['autorlink'] = true, ['autor-link'] = true, ['autormaska'] = true, ['autor-maska'] = true, ['autori'] = true, ['bibkod'] = true, ['BIBKOD'] = false, ['bibkod-pristup'] = true, ['bajoarkajv'] = true, ['knjiganaslov'] = true, ['knjiga-naslov'] = true, ['kartografija'] = true, ['poglavlje'] = true, ['poglavlje-format'] = true, ['poglavljeurl'] = true, ['poglavlje-url'] = true, ['sajtsirks'] = true, ['klasa'] = true, -- cite arxiv and arxiv identifiers ['saradnja'] = true, ['kolaboracija'] = true, ['konferencija'] = true, ['konferencija-format'] = true, ['konferencijaurl'] = true, ['konferencija-url'] = true, ['doprinos'] = true, ['doprinos-format'] = true, ['doprinosurl'] = true, ['doprinos-url'] = true, ['saradnik'] = true, ['saradnik-ime'] = true, ['saradnik-prezime'] = true, ['saradnik-link'] = true, ['saradnik-maska'] = true, ['zasluge'] = true, -- cite episode, cite serial ['datum'] = true, ['mrtavurl'] = true, ['mrtav-url'] = true, ['stepen'] = true, ['odeljenje'] = true, ['raz'] = true, ['razl'] = true, ['rečnik'] = true, ['autoriprikaz'] = true, ['autori-prikaz'] = true, ['uredniciprikaz'] = true, ['urednici-prikaz'] = true, ['etiketa'] = true, ['doi'] = true, ['DOI'] = true, ['doi-pristup'] = true, ['doi-pokvaren'] = true, ['doi_pokvarendatum'] = true, -- @TODO deprecate underscore version? ['doi-pokvaren-datum'] = true, ['doi_neaktivandatum'] = true, -- @TODO deprecate underscore version? ['doi-neaktivan-datum'] = true, ['izdanje'] = true, ['urednik'] = true, ['urednik-ime'] = true, ['urednik-dato'] = true, ['urednik-prezime'] = true, ['uredniklink'] = true, ['urednik-link'] = true, ['urednikmaska'] = true, ['urednik-maska'] = true, ['urednici'] = true, ['urednik-prezime'] = true, ['eissn'] = true, ['EISSN'] = true, ['embargo'] = true, ['enciklopedija'] = true, ['enciklopedija'] = true, ['unos'] = true, ['epizoda'] = true, -- cite serial only TODO: make available to cite episode? ['epizodalink'] = true, -- cite episode and cite serial ['epizoda-link'] = true, -- cite episode and cite serial ['eprint'] = true, -- cite arxiv and arxiv identifiers ['događaj'] = true, ['događaj-format'] = true, ['događajurl'] = true, ['događaj-url'] = true, ['ime'] = true, ['format'] = true, ['dato'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-pristup'] = true, ['domaćin'] = true, ['id'] = true, ['ID'] = true, ['greškaisbnignorisati'] = true, ['greška-isbn-ignorisati'] = true, ['na'] = true, ['prilog'] = true, ['institucija'] = true, ['anketar'] = true, ['anketar-ime'] = true, ['anketar-prezime'] = true, ['anketarlink'] = true, ['anketar-link'] = true, ['anketarmaska'] = true, ['anketar-maska'] = true, ['anketari'] = true, ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['izdanje'] = true, ['jfm'] = true, ['JFM'] = true, ['žurnal'] = true, ['džejstor'] = true, ['jstor'] = true, ['JSTOR'] = true, ['džejstor-pristup'] = true, ['jstor-pristup'] = true, ['JSTOR-pristup'] = true, ['jezik'] = true, ['prezime'] = true, ['poslednjiautoramp'] = true, ['poslednji-autor-amp'] = true, ['glavnidatum'] = true, ['glavni-datum'] = true, ['glavniizvor'] = true, ['glavni-izvor'] = true, ['glavnisažetak'] = true, ['glavni-sažetak'] = true, ['glavni-format'] = true, ['glavniurl'] = true, ['glavni-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['lokacija'] = true, ['magazin'] = true, ['listaadresa'] = true, -- cite mailing list only ['lista-adresa'] = true, -- cite mailing list only ['mapa'] = true, -- cite map only ['mapa-format'] = true, -- cite map only ['mapaurl'] = true, -- cite map only ['mapa-url'] = true, -- cite map only ['medijum'] = true, ['poruka-id'] = true, -- cite newsgroup ['minute'] = true, ['mod'] = true, ['mr'] = true, ['MR'] = true, ['lista-imena-format'] = true, ['mreža'] = true, ['diskusionagrupa'] = true, ['novine'] = true, ['nekat'] = true, ['ne-kat'] = true, ['nepp'] = true, ['ne-pp'] = true, ['nepraćenje'] = true, ['ne-praćenje'] = true, ['broj'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-pristup'] = true, ['poreklogodina'] = true, ['poreklo-godina'] = true, ['osti'] = true, ['OSTI'] = true, ['osti-pristup'] = true, ['drugi'] = true, ['p'] = true, ['stranica'] = true, ['stranice'] = true, ['ljudi'] = true, ['časopis'] = true, ['mesto'] = true, ['pmc'] = true, ['PMC'] = true, ['pmid'] = true, ['PMID'] = true, ['postskriptum'] = true, ['pp'] = true, ['izdavanjedatum'] = true, ['izdavanje-datum'] = true, ['izdavanjemesto'] = true, ['izdavanje-mesto'] = true, ['izdavač'] = true, ['citat'] = true, ['navod'] = true, ['ref'] = true, ['registracija'] = true, ['rfc'] = true, ['RFC'] = true, ['skala'] = true, ['pismo-poglavlje'] = true, ['poglavlje-pismo'] = true, ['pismo-naslov'] = true, ['naslov-pismo'] = true, ['sezona'] = true, ['odeljak'] = true, ['odeljak-format'] = true, ['odeljci'] = true, -- cite map only ['odeljakurl'] = true, ['odeljak-url'] = true, ['serija'] = true, ['serijalink'] = true, ['serija-link'] = true, ['serijabr'] = true, ['serija-br'] = true, ['serijabroj'] = true, ['serija-broj'] = true, ['serija-separator'] = true, ['list'] = true, -- cite map only ['listovi'] = true, -- cite map only ['ssrn'] = true, ['SSRN'] = true, ['stanica'] = true, ['subjekt'] = true, ['subjektlink'] = true, ['subjekt-link'] = true, ['pretplata'] = true, ['prezime'] = true, ['šablon dok demo'] = true, ['šablon-dok-demo'] = true, ['vreme'] = true, ['vremeopis'] = true, ['vreme-opis'] = true, ['naslov'] = true, ['naslovlink'] = true, ['naslov-link'] = true, ['trans_poglavlje'] = true, ['trans-poglavlje'] = true, ['trans-mapa'] = true, ['transkript'] = true, ['transkript-format'] = true, ['transkripturl'] = true, ['transkript-url'] = true, ['prev_naslov'] = true, ['prev-naslov'] = true, ['prevodilac'] = true, ['prevodilac-ime'] = true, ['prevodilac-prezime'] = true, ['prevodilac-link'] = true, ['prevodilac-maska'] = true, ['tip'] = true, ['url'] = true, ['URL'] = true, ['url-pristup'] = true, ['URL-pristup'] = true, ['vautori'] = true, ['vurednici'] = true, ['verzija'] = true, ['preko'] = true, ['izdanje'] = true, ['veb-sajt'] = true, ['rad'] = true, ['godina'] = true, ['zbl'] = true, ['ZBL'] = true, ['s2cid'] = true, -- s2cid ['S2CID'] = true, ['s2cid-pristup'] = true, } local numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-link#'] = true, ['author#link'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author-mask#'] = true, ['author#mask'] = true, ['author#-mask'] = true, ['authormask#'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor#-first'] = true, ['contributor-last#'] = true, ['contributor#-last'] = true, ['contributor-given#'] = true, ['contributor#-given'] = 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-link#'] = true, ['editor#link'] = true, ['editor#-link'] = true, ['editorlink#'] = true, ['editor-mask#'] = true, ['editor#mask'] = true, ['editor#-mask'] = true, ['editormask#'] = true, ['editor#-surname'] = true, ['editor-surname#'] = true, ['first#'] = true, ['given#'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer#-first'] = true, ['interviewer-last#'] = true, ['interviewer#-last'] = true, ['interviewer-link#'] = true, ['interviewer#-link'] = true, ['interviewer-mask#'] = true, ['interviewer#-mask'] = true, ['last#'] = true, ['subject#'] = true, ['subject-link#'] = true, ['subject#link'] = true, ['subject#-link'] = true, ['subjectlink#'] = true, ['surname#'] = true, ['translator#'] = true, ['translator-first#'] = true, ['translator#-first'] = true, ['translator-last#'] = true, ['translator#-last'] = true, ['translator-given#'] = true, ['translator#-given'] = true, ['translator-surname#'] = true, ['translator#-surname'] = true, ['translator-link#'] = true, ['translator#-link'] = true, ['translator-mask#'] = true, ['translator#-mask'] = true, --СРПСКИ (ПРЕВОД): ['аутор#'] = true, ['аутор-име#'] = true, ['аутор#-име'] = true, ['аутор-презиме#'] = true, ['аутор#-презиме'] = true, ['аутор-линк#'] = true, ['аутор#линк'] = true, ['аутор#-линк'] = true, ['ауторлинк#'] = true, ['аутор-маска#'] = true, ['аутор#маска'] = true, ['аутор#-маска'] = true, ['аутормаска#'] = true, ['сарадник#'] = true, ['сарадник-име#'] = true, ['сарадник#-име'] = true, ['сарадник-презиме#'] = true, ['сарадник#-презиме'] = true, ['сарадник-линк#'] = true, ['сарадник#-линк'] = true, ['сарадник-маска#'] = true, ['сарадник#-маска'] = true, ['уредник#'] = true, ['уредник-име#'] = true, ['уредник#-име'] = true, ['уредник#-дато'] = true, ['уредник-дато#'] = true, ['уредник-презиме#'] = true, ['уредник#-презиме'] = true, ['уредник-линк#'] = true, ['уредник#линк'] = true, ['уредник#-линк'] = true, ['уредниклинк#'] = true, ['уредник-маска#'] = true, ['уредник#маска'] = true, ['уредник#-маска'] = true, ['уредникмаска#'] = true, ['уредник#-презиме'] = true, ['уредник-презиме#'] = true, ['име#'] = true, ['дато#'] = true, ['анкетар#'] = true, ['анкетар-име#'] = true, ['анкетар#-име'] = true, ['анкетар-презиме#'] = true, ['анкетар#-презиме'] = true, ['анкетар-линк#'] = true, ['анкетар#-линк'] = true, ['анкетар-маска#'] = true, ['анкетар#-маска'] = true, ['презиме#'] = true, ['субјект#'] = true, ['субјект-линк#'] = true, ['субјект#линк'] = true, ['субјект#-линк'] = true, ['субјектлинк#'] = true, ['презиме#'] = true, ['преводилац#'] = true, ['преводилац-име#'] = true, ['преводилац#-име'] = true, ['преводилац-презиме#'] = true, ['преводилац#-презиме'] = true, ['преводилац-линк#'] = true, ['преводилац#-линк'] = true, ['преводилац-маска#'] = true, ['преводилац#-маска'] = true, --SRPSKI (PREVOD): ['autor#'] = true, ['autor-ime#'] = true, ['autor#-ime'] = true, ['autor-prezime#'] = true, ['autor#-prezime'] = true, ['autor-link#'] = true, ['autor#link'] = true, ['autor#-link'] = true, ['autorlink#'] = true, ['autor-maska#'] = true, ['autor#maska'] = true, ['autor#-maska'] = true, ['autormaska#'] = true, ['saradnik#'] = true, ['saradnik-ime#'] = true, ['saradnik#-ime'] = true, ['saradnik-prezime#'] = true, ['saradnik#-prezime'] = true, ['saradnik-link#'] = true, ['saradnik#-link'] = true, ['saradnik-maska#'] = true, ['saradnik#-maska'] = true, ['urednik#'] = true, ['urednik-ime#'] = true, ['urednik#-ime'] = true, ['urednik#-dato'] = true, ['urednik-dato#'] = true, ['urednik-prezime#'] = true, ['urednik#-prezime'] = true, ['urednik-link#'] = true, ['urednik#link'] = true, ['urednik#-link'] = true, ['uredniklink#'] = true, ['urednik-maska#'] = true, ['urednik#maska'] = true, ['urednik#-maska'] = true, ['urednikmaska#'] = true, ['urednik#-prezime'] = true, ['urednik-prezime#'] = true, ['ime#'] = true, ['dato#'] = true, ['anketar#'] = true, ['anketar-ime#'] = true, ['anketar#-ime'] = true, ['anketar-prezime#'] = true, ['anketar#-prezime'] = true, ['anketar-link#'] = true, ['anketar#-link'] = true, ['anketar-maska#'] = true, ['anketar#-maska'] = true, ['prezime#'] = true, ['subjekt#'] = true, ['subjekt-link#'] = true, ['subjekt#link'] = true, ['subjekt#-link'] = true, ['subjektlink#'] = true, ['prezime#'] = true, ['prevodilac#'] = true, ['prevodilac-ime#'] = true, ['prevodilac#-ime'] = true, ['prevodilac-prezime#'] = true, ['prevodilac#-prezime'] = true, ['prevodilac-link#'] = true, ['prevodilac#-link'] = true, ['prevodilac-maska#'] = true, ['prevodilac#-maska'] = true, --СРПСКИ (ДОДАТНО): ['стр'] = true, ['назив'] = true, --SRPSKI (DODATNO): ['str'] = true, ['naziv'] = true, } --[[--------------------------< C I T E A R X I V S U P P O R T E D P A R A M E T E R S >---------------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite arxiv template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] --[[ This is a list of parameters that once were but now are no longer supported: ['ARXIV'] = nil, -- not an initialization ['version'] = nil, -- this is the cite arxiv parameter; |version= still supported by other cs1|2 templates ]] local arxiv_basic_arguments = { ['arxiv'] = true, ['class'] = true, -- cite arxiv and arxiv identifiers ['eprint'] = true, -- cite arxiv and arxiv identifiers --СРПСКИ (ПРЕВОД): ['аркајв'] = true, ['класа'] = true, -- cite arxiv and arxiv identifiers ['епринт'] = true, -- cite arxiv and arxiv identifiers --SRPSKI (PREVOD): ['arkajv'] = true, ['klasa'] = true, -- cite arxiv and arxiv identifiers ['eprint'] = true, -- cite arxiv and arxiv identifiers } --[[--------------------------< C I T E B I O R X I V S U P P O R T E D P A R A M E T E R S >------------ This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite biorxiv template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local biorxiv_basic_arguments = { ['biorxiv'] = true, --СРПСКИ (ПРЕВОД): ['бајоаркајв'] = true, --SRPSKI (PREVOD): ['bajoarkajv'] = true, } --[[--------------------------< C I T E C I T E S E E R X S U P P O R T E D P A R A M E T E R S >-------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite citeseerx template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local citeseerx_basic_arguments = { ['citeseerx'] = true, --СРПСКИ (ПРЕВОД): ['сајтсиркс'] = true, --SRPSKI (PREVOD): ['sajtsirks'] = 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 >---------------------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite arxiv, cite biorxiv, or cite citeseerx templates. These parameters are common to all three templates Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local limited_basic_arguments = { ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-last'] = true, ['authorlink'] = true, ['author-link'] = true, ['authormask'] = true, ['author-mask'] = true, ['authors'] = true, ['collaboration'] = true, ['date'] = true, ['df'] = true, ['display-authors'] = true, ['first'] = true, ['given'] = true, ['language'] = true, ['last'] = true, ['lastauthoramp'] = true, ['last-author-amp'] = true, ['mode'] = true, ['name-list-format'] = true, ['nocat'] = true, ['no-cat'] = true, ['notracking'] = 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, ['template-doc-demo'] = true, ['title'] = true, ['url'] = true, ['URL'] = true, ['vauthors'] = true, ['year'] = true, --СРПСКИ (ПРЕВОД): ['на'] = true, ['аутор'] = true, ['аутор-име'] = true, ['аутор-презиме'] = true, ['ауторлинк'] = true, ['аутор-линк'] = true, ['аутормаска'] = true, ['аутор-маска'] = true, ['аутори'] = true, ['сарадња'] = true, ['колаборација'] = true, ['датум'] = true, ['раз'] = true, ['разл'] = true, ['аутори-приказ'] = true, ['име'] = true, ['дато'] = true, ['језик'] = true, ['презиме'] = true, ['последњиауторамп'] = true, ['последњи-аутор-амп'] = true, ['мод'] = true, ['листа-имена-формат'] = true, ['некат'] = true, ['не-кат'] = true, ['непраћење'] = true, ['не-праћење'] = true, ['п'] = true, ['страница'] = true, ['странице'] = true, ['постскриптум'] = true, ['стр'] = true, ['цитат'] = true, ['навод'] = true, ['реф'] = true, ['презиме'] = true, ['шаблон док демо'] = true, ['шаблон-док-демо'] = true, ['наслов'] = true, ['назив'] = true, ['урл'] = true, ['УРЛ'] = true, ['ваутори'] = true, ['година'] = true, --SRPSKI (PREVOD): ['na'] = true, ['autor'] = true, ['autor-ime'] = true, ['autor-prezime'] = true, ['autorlink'] = true, ['autor-link'] = true, ['autormaska'] = true, ['autor-maska'] = true, ['autori'] = true, ['saradnja'] = true, ['kolaboracija'] = true, ['datum'] = true, ['raz'] = true, ['razl'] = true, ['autori-prikaz'] = true, ['ime'] = true, ['dato'] = true, ['jezik'] = true, ['prezime'] = true, ['poslednjiautoramp'] = true, ['poslednji-autor-amp'] = true, ['mod'] = true, ['lista-imena-format'] = true, ['nekat'] = true, ['ne-kat'] = true, ['nepraćenje'] = true, ['ne-praćenje'] = true, ['p'] = true, ['stranica'] = true, ['stranice'] = true, ['postskriptum'] = true, ['str'] = true, ['citat'] = true, ['navod'] = true, ['ref'] = true, ['prezime'] = true, ['šablon dok demo'] = true, ['šablon-dok-demo'] = true, ['naslov'] = true, ['naziv'] = true, ['url'] = true, ['URL'] = true, ['vautori'] = true, ['godina'] = true, } local limited_numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-link#'] = true, ['author#link'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author-mask#'] = true, ['author#mask'] = true, ['author#-mask'] = true, ['authormask#'] = true, ['first#'] = true, ['given#'] = true, ['last#'] = true, ['surname#'] = true, --СРПСКИ (ПРЕВОД): ['аутор#'] = true, ['аутор-име#'] = true, ['аутор#-име'] = true, ['аутор-презиме#'] = true, ['аутор#-презиме'] = true, ['аутор-линк#'] = true, ['аутор#линк'] = true, ['аутор#-линк'] = true, ['ауторлинк#'] = true, ['аутор-маска#'] = true, ['аутор#маска'] = true, ['аутор#-маска'] = true, ['аутормаска#'] = true, ['име#'] = true, ['дато#'] = true, ['презиме#'] = true, ['презиме#'] = true, --SRPSKI (PREVOD): ['autor#'] = true, ['autor-ime#'] = true, ['autor#-ime'] = true, ['autor-prezime#'] = true, ['autor#-prezime'] = true, ['autor-link#'] = true, ['autor#link'] = true, ['autor#-link'] = true, ['autorlink#'] = true, ['autor-maska#'] = true, ['autor#maska'] = true, ['autor#-maska'] = true, ['autormaska#'] = true, ['ime#'] = true, ['dato#'] = true, ['prezime#'] = true, ['prezime#'] = true, } return { basic_arguments = basic_arguments, numbered_arguments = numbered_arguments, limited_basic_arguments = limited_basic_arguments, limited_numbered_arguments = limited_numbered_arguments, arxiv_basic_arguments = arxiv_basic_arguments, biorxiv_basic_arguments = biorxiv_basic_arguments, citeseerx_basic_arguments = citeseerx_basic_arguments }; 8027wb2goufzenqz0f3ibcg17waga8n Модул:Citation/CS1/Whitelist 828 3190 19513 2026-06-23T18:34:09Z Saslavik 1716 Нова страница: --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['ARXIV'] = nil… 19513 Scribunto text/plain --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['ARXIV'] = nil, -- not an initialization ['Author'] = nil, -- non-standard capitalization ['authorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['author-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['began'] = nil, -- module handles date ranges; cite episode and cite series ['BIBCODE'] = nil, -- not an initialization ['callsign'] = nil, -- cite interview removed ['call-sign'] = nil, -- cite interview removed ['знакпозив'] = nil, -- cite interview removed ['знак-позив'] = nil, -- cite interview removed ['znakpoziv'] = nil, -- cite interview removed ['znak-poziv'] = nil, -- cite interview removed ['chapterlink'] = nil, -- if ever necessary to link to a chapter article, |chapter= can be wikilinked ['chapter-link'] = nil, -- ['city'] = nil, -- cite interview removed ['coauthor'] = nil, -- redundant to |authorn=; not made part of metadata ['coauthors'] = nil, -- redundant to |authorn=; not made part of metadata ['град'] = nil, -- cite interview removed ['коаутор'] = nil, -- redundant to |authorn=; not made part of metadata ['коаутори'] = nil, -- redundant to |authorn=; not made part of metadata ['grad'] = nil, -- cite interview removed ['koautor'] = nil, -- redundant to |authorn=; not made part of metadata ['koautori'] = nil, -- redundant to |authorn=; not made part of metadata ['cointerviewers'] = nil, -- unique alias of others used by old cite interview ['day'] = nil, -- deprecated in {{citation/core}} and somehow undeprecated in Module:Citation/CS1 and now finally removed ['director'] = nil, -- unique alias of author used by old cite DVD-notes ['DoiBroken'] = nil, -- not used, non-standard captialization ['Editor'] = nil, -- non-standard capitalization ['editorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorSurname'] = nil, -- non-standard capitalization ['editor-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorGiven'] = nil, -- non-standard capitalization ['editor-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['editor-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['Embargo'] = nil, -- not used, non-standard capitalization ['ended'] = nil, -- module handles date ranges; cite episode and cite series ['month'] = nil, -- functionality supported by |date= ['name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['notestitle'] = nil, -- unique alias of chapter used by old cite AV media notes ['PPrefix'] = nil, -- non-standard capitalization ['PPPrefix'] = nil, -- not used, non-standard capitalization ['pp-prefix'] = nil, -- not used, not documented ['p-prefix'] = nil, -- not used, not documented ['program'] = nil, -- cite interview removed ['програм'] = nil, -- cite interview removed ['program'] = nil, -- cite interview removed ['publisherid'] = nil, -- unique alias of id used by old cite AV media notes and old cite DVD-notes ['Ref'] = nil, -- non-standard capitalization ['separator'] = nil, -- this functionality now provided by |mode= ['titleyear'] = nil, -- unique alias of origyear used by old cite DVD-notes ['Author#'] = nil, -- non-standard capitalization ['authors#'] = nil, -- no need for multiple lists of author names ['Editor#'] = nil, -- non-standard capitalization ['editors#'] = nil, -- no need for multiple lists of editor names ['EditorGiven#'] = nil, -- non-standard capitalization ['EditorSurname#'] = nil, -- non-standard capitalization ]] --[[--------------------------< 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 nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local whitelist = {} local basic_arguments = { ['accessdate'] = true, ['access-date'] = true, ['agency'] = true, ['airdate'] = true, ['air-date'] = true, ['archivedate'] = true, ['archive-date'] = true, ['archive-format'] = true, ['archiveurl'] = true, ['archive-url'] = true, ['article'] = true, ['arxiv'] = true, ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['ASIN-TLD'] = true, ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-last'] = true, ['authorlink'] = true, ['author-link'] = true, ['authormask'] = true, ['author-mask'] = true, ['authors'] = true, ['bibcode'] = true, ['bibcode-access'] = true, ['biorxiv'] = true, ['booktitle'] = true, ['book-title'] = true, ['cartography'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapterurl'] = true, ['chapter-url'] = true, ['citeseerx'] = true, ['class'] = true, -- cite arxiv and arxiv identifiers ['collaboration'] = true, ['conference'] = true, ['conference-format'] = true, ['conferenceurl'] = true, ['conference-url'] = true, ['contribution'] = true, ['contribution-format'] = true, ['contributionurl'] = true, ['contribution-url'] = true, ['contributor'] = true, ['contributor-first'] = true, ['contributor-last'] = true, ['contributor-given'] = true, ['contributor-surname'] = true, ['contributor-link'] = true, ['contributor-mask'] = true, ['credits'] = true, -- cite episode, cite serial ['date'] = true, ['deadurl'] = true, ['dead-url'] = true, ['degree'] = true, ['department'] = true, ['df'] = true, ['dictionary'] = true, ['displayauthors'] = true, ['display-authors'] = true, ['displayeditors'] = true, ['display-editors'] = true, ['docket'] = true, ['doi'] = true, ['DOI'] = true, ['doi-access'] = true, ['doi-broken'] = true, ['doi_brokendate'] = true, -- @TODO deprecate underscore version? ['doi-broken-date'] = true, ['doi_inactivedate'] = true, -- @TODO deprecate underscore version? ['doi-inactive-date'] = true, ['edition'] = true, ['editor'] = true, ['editor-first'] = true, ['editor-given'] = true, ['editor-last'] = true, ['editorlink'] = true, ['editor-link'] = true, ['editormask'] = true, ['editor-mask'] = true, ['editors'] = true, ['editor-surname'] = true, ['eissn'] = true, ['EISSN'] = true, ['embargo'] = true, ['encyclopaedia'] = true, ['encyclopedia'] = true, ['entry'] = true, ['episode'] = true, -- cite serial only TODO: make available to cite episode? ['episodelink'] = true, -- cite episode and cite serial ['episode-link'] = true, -- cite episode and cite serial ['eprint'] = true, -- cite arxiv and arxiv identifiers ['event'] = true, ['event-format'] = true, ['eventurl'] = true, ['event-url'] = true, ['first'] = true, ['format'] = true, ['given'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-access'] = true, ['host'] = true, ['id'] = true, ['ID'] = true, ['ignoreisbnerror'] = true, ['ignore-isbn-error'] = true, ['in'] = true, ['inset'] = true, ['institution'] = true, ['interviewer'] = true, ['interviewer-first'] = true, ['interviewer-last'] = true, ['interviewerlink'] = true, ['interviewer-link'] = true, ['interviewermask'] = true, ['interviewer-mask'] = true, ['interviewers'] = true, ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['issue'] = true, ['jfm'] = true, ['JFM'] = true, ['journal'] = true, ['jstor'] = true, ['JSTOR'] = true, ['jstor-access'] = true, ['language'] = true, ['last'] = true, ['lastauthoramp'] = true, ['last-author-amp'] = true, ['laydate'] = true, ['lay-date'] = true, ['laysource'] = true, ['lay-source'] = true, ['laysummary'] = true, ['lay-summary'] = true, ['lay-format'] = true, ['layurl'] = true, ['lay-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['location'] = true, ['magazine'] = true, ['mailinglist'] = true, -- cite mailing list only ['mailing-list'] = true, -- cite mailing list only ['map'] = true, -- cite map only ['map-format'] = true, -- cite map only ['mapurl'] = true, -- cite map only ['map-url'] = true, -- cite map only ['medium'] = true, ['message-id'] = true, -- cite newsgroup ['minutes'] = true, ['mode'] = true, ['mr'] = true, ['MR'] = true, ['name-list-format'] = true, ['network'] = true, ['newsgroup'] = true, ['newspaper'] = true, ['nocat'] = true, ['no-cat'] = true, ['nopp'] = true, ['no-pp'] = true, ['notracking'] = true, ['no-tracking'] = true, ['number'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-access'] = 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, ['pmid'] = true, ['PMID'] = true, ['postscript'] = true, ['pp'] = true, ['publicationdate'] = true, ['publication-date'] = true, ['publicationplace'] = true, ['publication-place'] = true, ['publisher'] = true, ['quotation'] = true, ['quote'] = true, ['ref'] = true, ['registration'] = true, ['rfc'] = true, ['RFC'] = true, ['scale'] = true, ['script-chapter'] = true, ['script-title'] = true, ['season'] = true, ['section'] = true, ['section-format'] = true, ['sections'] = true, -- cite map only ['sectionurl'] = true, ['section-url'] = true, ['series'] = true, ['serieslink'] = true, ['series-link'] = true, ['seriesno'] = true, ['series-no'] = true, ['seriesnumber'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, -- cite map only ['sheets'] = true, -- cite map only ['ssrn'] = true, ['SSRN'] = true, ['station'] = true, ['subject'] = true, ['subjectlink'] = true, ['subject-link'] = true, ['subscription'] = true, ['surname'] = true, ['template doc demo'] = true, ['template-doc-demo'] = true, ['time'] = true, ['timecaption'] = true, ['time-caption'] = true, ['title'] = true, ['titlelink'] = true, ['title-link'] = true, ['trans_chapter'] = true, ['trans-chapter'] = true, ['trans-map'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcripturl'] = true, ['transcript-url'] = true, ['trans_title'] = true, ['trans-title'] = true, ['translator'] = true, ['translator-first'] = true, ['translator-last'] = true, ['translator-given'] = true, ['translator-surname'] = true, ['translator-link'] = true, ['translator-mask'] = true, ['type'] = true, ['url'] = true, ['URL'] = true, ['url-access'] = 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, ['s2cid'] = true, -- s2cid ['S2CID'] = true, ['s2cid-access'] = true, --СРПСКИ (ПРЕВОД): ['приступдатум'] = true, ['приступ-датум'] = true, ['агенција'] = true, ['објавадатум'] = true, ['објава-датум'] = true, ['архивирањедатум'] = true, ['архивирање-датум'] = true, ['архивирање-формат'] = true, ['архивирањеурл'] = true, ['архивирање-урл'] = true, ['чланак'] = true, ['аркајв'] = true, ['асин'] = true, ['АСИН'] = true, ['асин-тлд'] = true, ['АСИН-ТЛД'] = true, ['на'] = true, ['аутор'] = true, ['аутор-име'] = true, ['аутор-презиме'] = true, ['ауторлинк'] = true, ['аутор-линк'] = true, ['аутормаска'] = true, ['аутор-маска'] = true, ['аутори'] = true, ['бибкод'] = true, ['БИБКОД'] = false, ['бибкод-приступ'] = true, ['бајоаркајв'] = true, ['књиганаслов'] = true, ['књига-наслов'] = true, ['картографија'] = true, ['поглавље'] = true, ['поглавље-формат'] = true, ['поглављеурл'] = true, ['поглавље-урл'] = true, ['сајтсиркс'] = true, ['класа'] = true, -- cite arxiv and arxiv identifiers ['сарадња'] = true, ['колаборација'] = true, ['конференција'] = true, ['конференција-формат'] = true, ['конференцијаурл'] = true, ['конференција-урл'] = true, ['допринос'] = true, ['допринос-формат'] = true, ['доприносурл'] = true, ['допринос-урл'] = true, ['сарадник'] = true, ['сарадник-име'] = true, ['сарадник-презиме'] = true, ['сарадник-линк'] = true, ['сарадник-маска'] = true, ['заслуге'] = true, -- cite episode, cite serial ['датум'] = true, ['мртавурл'] = true, ['мртав-урл'] = true, ['степен'] = true, ['одељење'] = true, ['раз'] = true, ['разл'] = true, ['речник'] = true, ['ауториприказ'] = true, ['аутори-приказ'] = true, ['уреднициприказ'] = true, ['уредници-приказ'] = true, ['етикета'] = true, ['дои'] = true, ['ДОИ'] = true, ['дои-приступ'] = true, ['дои-покварен'] = true, ['дои_покварендатум'] = true, -- @TODO deprecate underscore version? ['дои-покварен-датум'] = true, ['дои_неактивандатум'] = true, -- @TODO deprecate underscore version? ['дои-неактиван-датум'] = true, ['издање'] = true, ['уредник'] = true, ['уредник-име'] = true, ['уредник-дато'] = true, ['уредник-презиме'] = true, ['уредниклинк'] = true, ['уредник-линк'] = true, ['уредникмаска'] = true, ['уредник-маска'] = true, ['уредници'] = true, ['уредник-презиме'] = true, ['еиссн'] = true, ['ЕИССН'] = true, ['ембарго'] = true, ['енциклопедија'] = true, ['енциклопедија'] = true, ['унос'] = true, ['епизода'] = true, -- cite serial only TODO: make available to cite episode? ['епизодалинк'] = true, -- cite episode and cite serial ['епизода-линк'] = true, -- cite episode and cite serial ['епринт'] = true, -- cite arxiv and arxiv identifiers ['догађај'] = true, ['догађај-формат'] = true, ['догађајурл'] = true, ['догађај-урл'] = true, ['име'] = true, ['формат'] = true, ['дато'] = true, ['хдл'] = true, ['ХДЛ'] = true, ['хдл-приступ'] = true, ['домаћин'] = true, ['ид'] = true, ['ИД'] = true, ['грешкаисбнигнорисати'] = true, ['грешка-исбн-игнорисати'] = true, ['на'] = true, ['прилог'] = true, ['институција'] = true, ['анкетар'] = true, ['анкетар-име'] = true, ['анкетар-презиме'] = true, ['анкетарлинк'] = true, ['анкетар-линк'] = true, ['анкетармаска'] = true, ['анкетар-маска'] = true, ['анкетари'] = true, ['исбн'] = true, ['ИСБН'] = true, ['исбн13'] = true, ['ИСБН13'] = true, ['исмн'] = true, ['ИСМН'] = true, ['иссн'] = true, ['ИССН'] = true, ['издање'] = true, ['јфм'] = true, ['ЈФМ'] = true, ['журнал'] = true, ['џејстор'] = true, ['јстор'] = true, ['ЈСТОР'] = true, ['џејстор-приступ'] = true, ['јстор-приступ'] = true, ['ЈСТОР-приступ'] = true, ['језик'] = true, ['презиме'] = true, ['последњиауторамп'] = true, ['последњи-аутор-амп'] = true, ['главнидатум'] = true, ['главни-датум'] = true, ['главниизвор'] = true, ['главни-извор'] = true, ['главнисажетак'] = true, ['главни-сажетак'] = true, ['главни-формат'] = true, ['главниурл'] = true, ['главни-урл'] = true, ['лццн'] = true, ['ЛЦЦН'] = true, ['локација'] = true, ['магазин'] = true, ['листаадреса'] = true, -- cite mailing list only ['листа-адреса'] = true, -- cite mailing list only ['мапа'] = true, -- cite map only ['мапа-формат'] = true, -- cite map only ['мапаурл'] = true, -- cite map only ['мапа-урл'] = true, -- cite map only ['медијум'] = true, ['порука-ид'] = true, -- cite newsgroup ['минуте'] = true, ['мод'] = true, ['мр'] = true, ['МР'] = true, ['листа-имена-формат'] = true, ['мрежа'] = true, ['дискусионагрупа'] = true, ['новине'] = true, ['некат'] = true, ['не-кат'] = true, ['непп'] = true, ['не-пп'] = true, ['непраћење'] = true, ['не-праћење'] = true, ['број'] = true, ['оцлц'] = true, ['ОЦЛЦ'] = true, ['ол'] = true, ['ОЛ'] = true, ['ол-приступ'] = true, ['пореклогодина'] = true, ['порекло-година'] = true, ['ости'] = true, ['ОСТИ'] = true, ['ости-приступ'] = true, ['други'] = true, ['п'] = true, ['страница'] = true, ['странице'] = true, ['људи'] = true, ['часопис'] = true, ['место'] = true, ['пмц'] = true, ['ПМЦ'] = true, ['пмид'] = true, ['ПМИД'] = true, ['постскриптум'] = true, ['пп'] = true, ['издавањедатум'] = true, ['издавање-датум'] = true, ['издавањеместо'] = true, ['издавање-место'] = true, ['издавач'] = true, ['цитат'] = true, ['навод'] = true, ['реф'] = true, ['регистрација'] = true, ['рфц'] = true, ['РФЦ'] = true, ['скала'] = true, ['писмо-поглавље'] = true, ['поглавље-писмо'] = true, ['писмо-наслов'] = true, ['наслов-писмо'] = true, ['сезона'] = true, ['одељак'] = true, ['одељак-формат'] = true, ['одељци'] = true, -- cite map only ['одељакурл'] = true, ['одељак-урл'] = true, ['серија'] = true, ['серијалинк'] = true, ['серија-линк'] = true, ['серијабр'] = true, ['серија-бр'] = true, ['серијаброј'] = true, ['серија-број'] = true, ['серија-сепаратор'] = true, ['лист'] = true, -- cite map only ['листови'] = true, -- cite map only ['ссрн'] = true, ['ССРН'] = true, ['станица'] = true, ['субјект'] = true, ['субјектлинк'] = true, ['субјект-линк'] = true, ['претплата'] = true, ['презиме'] = true, ['шаблон док демо'] = true, ['шаблон-док-демо'] = true, ['време'] = true, ['времеопис'] = true, ['време-опис'] = true, ['наслов'] = true, ['насловлинк'] = true, ['наслов-линк'] = true, ['транс_поглавље'] = true, ['транс-поглавље'] = true, ['транс-мапа'] = true, ['транскрипт'] = true, ['транскрипт-формат'] = true, ['транскриптурл'] = true, ['транскрипт-урл'] = true, ['прев_наслов'] = true, ['прев-наслов'] = true, ['преводилац'] = true, ['преводилац-име'] = true, ['преводилац-презиме'] = true, ['преводилац-линк'] = true, ['преводилац-маска'] = true, ['тип'] = true, ['урл'] = true, ['УРЛ'] = true, ['урл-приступ'] = true, ['УРЛ-приступ'] = true, ['ваутори'] = true, ['вуредници'] = true, ['верзија'] = true, ['преко'] = true, ['издање'] = true, ['веб-сајт'] = true, ['рад'] = true, ['година'] = true, ['збл'] = true, ['ЗБЛ'] = true, ['с2цид'] = true, -- s2cid ['С2ЦИД'] = true, ['с2цид-приступ'] = true, --SRPSKI (PREVOD): ['pristupdatum'] = true, ['pristup-datum'] = true, ['agencija'] = true, ['objavadatum'] = true, ['objava-datum'] = true, ['arhiviranjedatum'] = true, ['arhiviranje-datum'] = true, ['arhiviranje-format'] = true, ['arhiviranjeurl'] = true, ['arhiviranje-url'] = true, ['članak'] = true, ['arkajv'] = true, ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['ASIN-TLD'] = true, ['na'] = true, ['autor'] = true, ['autor-ime'] = true, ['autor-prezime'] = true, ['autorlink'] = true, ['autor-link'] = true, ['autormaska'] = true, ['autor-maska'] = true, ['autori'] = true, ['bibkod'] = true, ['BIBKOD'] = false, ['bibkod-pristup'] = true, ['bajoarkajv'] = true, ['knjiganaslov'] = true, ['knjiga-naslov'] = true, ['kartografija'] = true, ['poglavlje'] = true, ['poglavlje-format'] = true, ['poglavljeurl'] = true, ['poglavlje-url'] = true, ['sajtsirks'] = true, ['klasa'] = true, -- cite arxiv and arxiv identifiers ['saradnja'] = true, ['kolaboracija'] = true, ['konferencija'] = true, ['konferencija-format'] = true, ['konferencijaurl'] = true, ['konferencija-url'] = true, ['doprinos'] = true, ['doprinos-format'] = true, ['doprinosurl'] = true, ['doprinos-url'] = true, ['saradnik'] = true, ['saradnik-ime'] = true, ['saradnik-prezime'] = true, ['saradnik-link'] = true, ['saradnik-maska'] = true, ['zasluge'] = true, -- cite episode, cite serial ['datum'] = true, ['mrtavurl'] = true, ['mrtav-url'] = true, ['stepen'] = true, ['odeljenje'] = true, ['raz'] = true, ['razl'] = true, ['rečnik'] = true, ['autoriprikaz'] = true, ['autori-prikaz'] = true, ['uredniciprikaz'] = true, ['urednici-prikaz'] = true, ['etiketa'] = true, ['doi'] = true, ['DOI'] = true, ['doi-pristup'] = true, ['doi-pokvaren'] = true, ['doi_pokvarendatum'] = true, -- @TODO deprecate underscore version? ['doi-pokvaren-datum'] = true, ['doi_neaktivandatum'] = true, -- @TODO deprecate underscore version? ['doi-neaktivan-datum'] = true, ['izdanje'] = true, ['urednik'] = true, ['urednik-ime'] = true, ['urednik-dato'] = true, ['urednik-prezime'] = true, ['uredniklink'] = true, ['urednik-link'] = true, ['urednikmaska'] = true, ['urednik-maska'] = true, ['urednici'] = true, ['urednik-prezime'] = true, ['eissn'] = true, ['EISSN'] = true, ['embargo'] = true, ['enciklopedija'] = true, ['enciklopedija'] = true, ['unos'] = true, ['epizoda'] = true, -- cite serial only TODO: make available to cite episode? ['epizodalink'] = true, -- cite episode and cite serial ['epizoda-link'] = true, -- cite episode and cite serial ['eprint'] = true, -- cite arxiv and arxiv identifiers ['događaj'] = true, ['događaj-format'] = true, ['događajurl'] = true, ['događaj-url'] = true, ['ime'] = true, ['format'] = true, ['dato'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-pristup'] = true, ['domaćin'] = true, ['id'] = true, ['ID'] = true, ['greškaisbnignorisati'] = true, ['greška-isbn-ignorisati'] = true, ['na'] = true, ['prilog'] = true, ['institucija'] = true, ['anketar'] = true, ['anketar-ime'] = true, ['anketar-prezime'] = true, ['anketarlink'] = true, ['anketar-link'] = true, ['anketarmaska'] = true, ['anketar-maska'] = true, ['anketari'] = true, ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['izdanje'] = true, ['jfm'] = true, ['JFM'] = true, ['žurnal'] = true, ['džejstor'] = true, ['jstor'] = true, ['JSTOR'] = true, ['džejstor-pristup'] = true, ['jstor-pristup'] = true, ['JSTOR-pristup'] = true, ['jezik'] = true, ['prezime'] = true, ['poslednjiautoramp'] = true, ['poslednji-autor-amp'] = true, ['glavnidatum'] = true, ['glavni-datum'] = true, ['glavniizvor'] = true, ['glavni-izvor'] = true, ['glavnisažetak'] = true, ['glavni-sažetak'] = true, ['glavni-format'] = true, ['glavniurl'] = true, ['glavni-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['lokacija'] = true, ['magazin'] = true, ['listaadresa'] = true, -- cite mailing list only ['lista-adresa'] = true, -- cite mailing list only ['mapa'] = true, -- cite map only ['mapa-format'] = true, -- cite map only ['mapaurl'] = true, -- cite map only ['mapa-url'] = true, -- cite map only ['medijum'] = true, ['poruka-id'] = true, -- cite newsgroup ['minute'] = true, ['mod'] = true, ['mr'] = true, ['MR'] = true, ['lista-imena-format'] = true, ['mreža'] = true, ['diskusionagrupa'] = true, ['novine'] = true, ['nekat'] = true, ['ne-kat'] = true, ['nepp'] = true, ['ne-pp'] = true, ['nepraćenje'] = true, ['ne-praćenje'] = true, ['broj'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-pristup'] = true, ['poreklogodina'] = true, ['poreklo-godina'] = true, ['osti'] = true, ['OSTI'] = true, ['osti-pristup'] = true, ['drugi'] = true, ['p'] = true, ['stranica'] = true, ['stranice'] = true, ['ljudi'] = true, ['časopis'] = true, ['mesto'] = true, ['pmc'] = true, ['PMC'] = true, ['pmid'] = true, ['PMID'] = true, ['postskriptum'] = true, ['pp'] = true, ['izdavanjedatum'] = true, ['izdavanje-datum'] = true, ['izdavanjemesto'] = true, ['izdavanje-mesto'] = true, ['izdavač'] = true, ['citat'] = true, ['navod'] = true, ['ref'] = true, ['registracija'] = true, ['rfc'] = true, ['RFC'] = true, ['skala'] = true, ['pismo-poglavlje'] = true, ['poglavlje-pismo'] = true, ['pismo-naslov'] = true, ['naslov-pismo'] = true, ['sezona'] = true, ['odeljak'] = true, ['odeljak-format'] = true, ['odeljci'] = true, -- cite map only ['odeljakurl'] = true, ['odeljak-url'] = true, ['serija'] = true, ['serijalink'] = true, ['serija-link'] = true, ['serijabr'] = true, ['serija-br'] = true, ['serijabroj'] = true, ['serija-broj'] = true, ['serija-separator'] = true, ['list'] = true, -- cite map only ['listovi'] = true, -- cite map only ['ssrn'] = true, ['SSRN'] = true, ['stanica'] = true, ['subjekt'] = true, ['subjektlink'] = true, ['subjekt-link'] = true, ['pretplata'] = true, ['prezime'] = true, ['šablon dok demo'] = true, ['šablon-dok-demo'] = true, ['vreme'] = true, ['vremeopis'] = true, ['vreme-opis'] = true, ['naslov'] = true, ['naslovlink'] = true, ['naslov-link'] = true, ['trans_poglavlje'] = true, ['trans-poglavlje'] = true, ['trans-mapa'] = true, ['transkript'] = true, ['transkript-format'] = true, ['transkripturl'] = true, ['transkript-url'] = true, ['prev_naslov'] = true, ['prev-naslov'] = true, ['prevodilac'] = true, ['prevodilac-ime'] = true, ['prevodilac-prezime'] = true, ['prevodilac-link'] = true, ['prevodilac-maska'] = true, ['tip'] = true, ['url'] = true, ['URL'] = true, ['url-pristup'] = true, ['URL-pristup'] = true, ['vautori'] = true, ['vurednici'] = true, ['verzija'] = true, ['preko'] = true, ['izdanje'] = true, ['veb-sajt'] = true, ['rad'] = true, ['godina'] = true, ['zbl'] = true, ['ZBL'] = true, ['s2cid'] = true, -- s2cid ['S2CID'] = true, ['s2cid-pristup'] = true, } local numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-link#'] = true, ['author#link'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author-mask#'] = true, ['author#mask'] = true, ['author#-mask'] = true, ['authormask#'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor#-first'] = true, ['contributor-last#'] = true, ['contributor#-last'] = true, ['contributor-given#'] = true, ['contributor#-given'] = 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-link#'] = true, ['editor#link'] = true, ['editor#-link'] = true, ['editorlink#'] = true, ['editor-mask#'] = true, ['editor#mask'] = true, ['editor#-mask'] = true, ['editormask#'] = true, ['editor#-surname'] = true, ['editor-surname#'] = true, ['first#'] = true, ['given#'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer#-first'] = true, ['interviewer-last#'] = true, ['interviewer#-last'] = true, ['interviewer-link#'] = true, ['interviewer#-link'] = true, ['interviewer-mask#'] = true, ['interviewer#-mask'] = true, ['last#'] = true, ['subject#'] = true, ['subject-link#'] = true, ['subject#link'] = true, ['subject#-link'] = true, ['subjectlink#'] = true, ['surname#'] = true, ['translator#'] = true, ['translator-first#'] = true, ['translator#-first'] = true, ['translator-last#'] = true, ['translator#-last'] = true, ['translator-given#'] = true, ['translator#-given'] = true, ['translator-surname#'] = true, ['translator#-surname'] = true, ['translator-link#'] = true, ['translator#-link'] = true, ['translator-mask#'] = true, ['translator#-mask'] = true, --СРПСКИ (ПРЕВОД): ['аутор#'] = true, ['аутор-име#'] = true, ['аутор#-име'] = true, ['аутор-презиме#'] = true, ['аутор#-презиме'] = true, ['аутор-линк#'] = true, ['аутор#линк'] = true, ['аутор#-линк'] = true, ['ауторлинк#'] = true, ['аутор-маска#'] = true, ['аутор#маска'] = true, ['аутор#-маска'] = true, ['аутормаска#'] = true, ['сарадник#'] = true, ['сарадник-име#'] = true, ['сарадник#-име'] = true, ['сарадник-презиме#'] = true, ['сарадник#-презиме'] = true, ['сарадник-линк#'] = true, ['сарадник#-линк'] = true, ['сарадник-маска#'] = true, ['сарадник#-маска'] = true, ['уредник#'] = true, ['уредник-име#'] = true, ['уредник#-име'] = true, ['уредник#-дато'] = true, ['уредник-дато#'] = true, ['уредник-презиме#'] = true, ['уредник#-презиме'] = true, ['уредник-линк#'] = true, ['уредник#линк'] = true, ['уредник#-линк'] = true, ['уредниклинк#'] = true, ['уредник-маска#'] = true, ['уредник#маска'] = true, ['уредник#-маска'] = true, ['уредникмаска#'] = true, ['уредник#-презиме'] = true, ['уредник-презиме#'] = true, ['име#'] = true, ['дато#'] = true, ['анкетар#'] = true, ['анкетар-име#'] = true, ['анкетар#-име'] = true, ['анкетар-презиме#'] = true, ['анкетар#-презиме'] = true, ['анкетар-линк#'] = true, ['анкетар#-линк'] = true, ['анкетар-маска#'] = true, ['анкетар#-маска'] = true, ['презиме#'] = true, ['субјект#'] = true, ['субјект-линк#'] = true, ['субјект#линк'] = true, ['субјект#-линк'] = true, ['субјектлинк#'] = true, ['презиме#'] = true, ['преводилац#'] = true, ['преводилац-име#'] = true, ['преводилац#-име'] = true, ['преводилац-презиме#'] = true, ['преводилац#-презиме'] = true, ['преводилац-линк#'] = true, ['преводилац#-линк'] = true, ['преводилац-маска#'] = true, ['преводилац#-маска'] = true, --SRPSKI (PREVOD): ['autor#'] = true, ['autor-ime#'] = true, ['autor#-ime'] = true, ['autor-prezime#'] = true, ['autor#-prezime'] = true, ['autor-link#'] = true, ['autor#link'] = true, ['autor#-link'] = true, ['autorlink#'] = true, ['autor-maska#'] = true, ['autor#maska'] = true, ['autor#-maska'] = true, ['autormaska#'] = true, ['saradnik#'] = true, ['saradnik-ime#'] = true, ['saradnik#-ime'] = true, ['saradnik-prezime#'] = true, ['saradnik#-prezime'] = true, ['saradnik-link#'] = true, ['saradnik#-link'] = true, ['saradnik-maska#'] = true, ['saradnik#-maska'] = true, ['urednik#'] = true, ['urednik-ime#'] = true, ['urednik#-ime'] = true, ['urednik#-dato'] = true, ['urednik-dato#'] = true, ['urednik-prezime#'] = true, ['urednik#-prezime'] = true, ['urednik-link#'] = true, ['urednik#link'] = true, ['urednik#-link'] = true, ['uredniklink#'] = true, ['urednik-maska#'] = true, ['urednik#maska'] = true, ['urednik#-maska'] = true, ['urednikmaska#'] = true, ['urednik#-prezime'] = true, ['urednik-prezime#'] = true, ['ime#'] = true, ['dato#'] = true, ['anketar#'] = true, ['anketar-ime#'] = true, ['anketar#-ime'] = true, ['anketar-prezime#'] = true, ['anketar#-prezime'] = true, ['anketar-link#'] = true, ['anketar#-link'] = true, ['anketar-maska#'] = true, ['anketar#-maska'] = true, ['prezime#'] = true, ['subjekt#'] = true, ['subjekt-link#'] = true, ['subjekt#link'] = true, ['subjekt#-link'] = true, ['subjektlink#'] = true, ['prezime#'] = true, ['prevodilac#'] = true, ['prevodilac-ime#'] = true, ['prevodilac#-ime'] = true, ['prevodilac-prezime#'] = true, ['prevodilac#-prezime'] = true, ['prevodilac-link#'] = true, ['prevodilac#-link'] = true, ['prevodilac-maska#'] = true, ['prevodilac#-maska'] = true, --СРПСКИ (ДОДАТНО): ['стр'] = true, ['назив'] = true, --SRPSKI (DODATNO): ['str'] = true, ['naziv'] = true, } --[[--------------------------< C I T E A R X I V S U P P O R T E D P A R A M E T E R S >---------------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite arxiv template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] --[[ This is a list of parameters that once were but now are no longer supported: ['ARXIV'] = nil, -- not an initialization ['version'] = nil, -- this is the cite arxiv parameter; |version= still supported by other cs1|2 templates ]] local arxiv_basic_arguments = { ['arxiv'] = true, ['class'] = true, -- cite arxiv and arxiv identifiers ['eprint'] = true, -- cite arxiv and arxiv identifiers --СРПСКИ (ПРЕВОД): ['аркајв'] = true, ['класа'] = true, -- cite arxiv and arxiv identifiers ['епринт'] = true, -- cite arxiv and arxiv identifiers --SRPSKI (PREVOD): ['arkajv'] = true, ['klasa'] = true, -- cite arxiv and arxiv identifiers ['eprint'] = true, -- cite arxiv and arxiv identifiers } --[[--------------------------< C I T E B I O R X I V S U P P O R T E D P A R A M E T E R S >------------ This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite biorxiv template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local biorxiv_basic_arguments = { ['biorxiv'] = true, --СРПСКИ (ПРЕВОД): ['бајоаркајв'] = true, --SRPSKI (PREVOD): ['bajoarkajv'] = true, } --[[--------------------------< C I T E C I T E S E E R X S U P P O R T E D P A R A M E T E R S >-------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite citeseerx template. This method might be expanded to other templates being considered. Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local citeseerx_basic_arguments = { ['citeseerx'] = true, --СРПСКИ (ПРЕВОД): ['сајтсиркс'] = true, --SRPSKI (PREVOD): ['sajtsirks'] = 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 >---------------------- This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the parameters provided in a cite arxiv, cite biorxiv, or cite citeseerx templates. These parameters are common to all three templates Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local limited_basic_arguments = { ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-last'] = true, ['authorlink'] = true, ['author-link'] = true, ['authormask'] = true, ['author-mask'] = true, ['authors'] = true, ['collaboration'] = true, ['date'] = true, ['df'] = true, ['display-authors'] = true, ['first'] = true, ['given'] = true, ['language'] = true, ['last'] = true, ['lastauthoramp'] = true, ['last-author-amp'] = true, ['mode'] = true, ['name-list-format'] = true, ['nocat'] = true, ['no-cat'] = true, ['notracking'] = 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, ['template-doc-demo'] = true, ['title'] = true, ['url'] = true, ['URL'] = true, ['vauthors'] = true, ['year'] = true, --СРПСКИ (ПРЕВОД): ['на'] = true, ['аутор'] = true, ['аутор-име'] = true, ['аутор-презиме'] = true, ['ауторлинк'] = true, ['аутор-линк'] = true, ['аутормаска'] = true, ['аутор-маска'] = true, ['аутори'] = true, ['сарадња'] = true, ['колаборација'] = true, ['датум'] = true, ['раз'] = true, ['разл'] = true, ['аутори-приказ'] = true, ['име'] = true, ['дато'] = true, ['језик'] = true, ['презиме'] = true, ['последњиауторамп'] = true, ['последњи-аутор-амп'] = true, ['мод'] = true, ['листа-имена-формат'] = true, ['некат'] = true, ['не-кат'] = true, ['непраћење'] = true, ['не-праћење'] = true, ['п'] = true, ['страница'] = true, ['странице'] = true, ['постскриптум'] = true, ['стр'] = true, ['цитат'] = true, ['навод'] = true, ['реф'] = true, ['презиме'] = true, ['шаблон док демо'] = true, ['шаблон-док-демо'] = true, ['наслов'] = true, ['назив'] = true, ['урл'] = true, ['УРЛ'] = true, ['ваутори'] = true, ['година'] = true, --SRPSKI (PREVOD): ['na'] = true, ['autor'] = true, ['autor-ime'] = true, ['autor-prezime'] = true, ['autorlink'] = true, ['autor-link'] = true, ['autormaska'] = true, ['autor-maska'] = true, ['autori'] = true, ['saradnja'] = true, ['kolaboracija'] = true, ['datum'] = true, ['raz'] = true, ['razl'] = true, ['autori-prikaz'] = true, ['ime'] = true, ['dato'] = true, ['jezik'] = true, ['prezime'] = true, ['poslednjiautoramp'] = true, ['poslednji-autor-amp'] = true, ['mod'] = true, ['lista-imena-format'] = true, ['nekat'] = true, ['ne-kat'] = true, ['nepraćenje'] = true, ['ne-praćenje'] = true, ['p'] = true, ['stranica'] = true, ['stranice'] = true, ['postskriptum'] = true, ['str'] = true, ['citat'] = true, ['navod'] = true, ['ref'] = true, ['prezime'] = true, ['šablon dok demo'] = true, ['šablon-dok-demo'] = true, ['naslov'] = true, ['naziv'] = true, ['url'] = true, ['URL'] = true, ['vautori'] = true, ['godina'] = true, } local limited_numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-link#'] = true, ['author#link'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author-mask#'] = true, ['author#mask'] = true, ['author#-mask'] = true, ['authormask#'] = true, ['first#'] = true, ['given#'] = true, ['last#'] = true, ['surname#'] = true, --СРПСКИ (ПРЕВОД): ['аутор#'] = true, ['аутор-име#'] = true, ['аутор#-име'] = true, ['аутор-презиме#'] = true, ['аутор#-презиме'] = true, ['аутор-линк#'] = true, ['аутор#линк'] = true, ['аутор#-линк'] = true, ['ауторлинк#'] = true, ['аутор-маска#'] = true, ['аутор#маска'] = true, ['аутор#-маска'] = true, ['аутормаска#'] = true, ['име#'] = true, ['дато#'] = true, ['презиме#'] = true, ['презиме#'] = true, --SRPSKI (PREVOD): ['autor#'] = true, ['autor-ime#'] = true, ['autor#-ime'] = true, ['autor-prezime#'] = true, ['autor#-prezime'] = true, ['autor-link#'] = true, ['autor#link'] = true, ['autor#-link'] = true, ['autorlink#'] = true, ['autor-maska#'] = true, ['autor#maska'] = true, ['autor#-maska'] = true, ['autormaska#'] = true, ['ime#'] = true, ['dato#'] = true, ['prezime#'] = true, ['prezime#'] = true, } return { basic_arguments = basic_arguments, numbered_arguments = numbered_arguments, limited_basic_arguments = limited_basic_arguments, limited_numbered_arguments = limited_numbered_arguments, arxiv_basic_arguments = arxiv_basic_arguments, biorxiv_basic_arguments = biorxiv_basic_arguments, citeseerx_basic_arguments = citeseerx_basic_arguments }; 8027wb2goufzenqz0f3ibcg17waga8n Модул:Модул:Citation/CS1/Utilities 828 3191 19514 2026-06-23T18:40:43Z Saslavik 1716 Нова страница: local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; ----------------------------< F O R W A R D D E C L A R A T I O N S >--------… 19514 wikitext text/x-wiki local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< 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 --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. ]] local function substitute( msg, args ) return args and mw.message.newRawMessage( msg, args ):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with css markup according to the state of hidden. ]] local function error_comment( content, hidden ) return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content ); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when bot 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 --[[--------------------------< S E T _ E R R O R >-------------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. ]] local function set_error( 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'] ); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set( error_state.category ) then table.insert( z.error_categories, error_state.category ); end local message = substitute( error_state.message, arguments ); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids[ error_id ] = true; if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) and z.error_ids['citation_missing_title'] then return '', false;'' end message = table.concat({ prefix, message, suffix }); if raw == true then return message, error_state.hidden; end return error_comment( message, error_state.hidden ); end --[[-------------------------< 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 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.maintenance_cats using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats. ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< 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 ''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, ''and ''tend to interact'' poorly under Mediawiki's HTML tidy.'''' '''']]'''' ''''local function safe_for_italics( str ) if not is_set(str) then return str; else if str:sub(1,1) == "'" then str = "" .. str; end if str:sub(-1,-1) == "'" then str = str .. ""; end'''' '''' -- Remove newlines as they break italics. return str:gsub( '\n', ' ' ); end 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 --[[--------------------------< 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() local error_str = ""; for _, k in ipairs( error_list ) do if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end error_str = error_str .. wrap_style ('parameter', k); end if #error_list > 1 then error_str = error_str .. cfg.messages['parameter-final-separator']; else error_str = error_str .. cfg.messages['parameter-pair-separator']; end error_str = error_str .. wrap_style ('parameter', selected); table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } ); 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 white space 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 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 white space and pipes from L and D ([[L|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]] L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate link D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] wl_type = 1; end if not is_set (D) then -- no wikilink markup D = str; -- return the string as D wl_type = 0; -- but say that it is not a wikilink end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters L = L and mw.text.trim (L, '%s|'); 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 { is_set = is_set, -- exported functions in_array = in_array, substitute = substitute, error_comment = error_comment, set_error = set_error, select_one = select_one, add_maint_cat = add_maint_cat, wrap_style = wrap_style, safe_for_italics = safe_for_italics, remove_wiki_link = remove_wiki_link, is_wikilink = is_wikilink, make_wikilink = make_wikilink, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, z = z, -- exported table } '''' 8tdx7revfs8jad3ucnai1vq1c6cnezr 19516 19514 2026-06-23T19:51:17Z Saslavik 1716 Saslavik преместио је страницу [[Модул;Citation/CS1/Utilities]] на [[Модул:Модул:Citation/CS1/Utilities]]: Типографија 19514 wikitext text/x-wiki local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< 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 --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. ]] local function substitute( msg, args ) return args and mw.message.newRawMessage( msg, args ):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with css markup according to the state of hidden. ]] local function error_comment( content, hidden ) return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content ); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when bot 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 --[[--------------------------< S E T _ E R R O R >-------------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. ]] local function set_error( 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'] ); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set( error_state.category ) then table.insert( z.error_categories, error_state.category ); end local message = substitute( error_state.message, arguments ); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids[ error_id ] = true; if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) and z.error_ids['citation_missing_title'] then return '', false;'' end message = table.concat({ prefix, message, suffix }); if raw == true then return message, error_state.hidden; end return error_comment( message, error_state.hidden ); end --[[-------------------------< 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 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.maintenance_cats using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats. ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< 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 ''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, ''and ''tend to interact'' poorly under Mediawiki's HTML tidy.'''' '''']]'''' ''''local function safe_for_italics( str ) if not is_set(str) then return str; else if str:sub(1,1) == "'" then str = "" .. str; end if str:sub(-1,-1) == "'" then str = str .. ""; end'''' '''' -- Remove newlines as they break italics. return str:gsub( '\n', ' ' ); end 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 --[[--------------------------< 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() local error_str = ""; for _, k in ipairs( error_list ) do if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end error_str = error_str .. wrap_style ('parameter', k); end if #error_list > 1 then error_str = error_str .. cfg.messages['parameter-final-separator']; else error_str = error_str .. cfg.messages['parameter-pair-separator']; end error_str = error_str .. wrap_style ('parameter', selected); table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } ); 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 white space 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 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 white space and pipes from L and D ([[L|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]] L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate link D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] wl_type = 1; end if not is_set (D) then -- no wikilink markup D = str; -- return the string as D wl_type = 0; -- but say that it is not a wikilink end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters L = L and mw.text.trim (L, '%s|'); 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 { is_set = is_set, -- exported functions in_array = in_array, substitute = substitute, error_comment = error_comment, set_error = set_error, select_one = select_one, add_maint_cat = add_maint_cat, wrap_style = wrap_style, safe_for_italics = safe_for_italics, remove_wiki_link = remove_wiki_link, is_wikilink = is_wikilink, make_wikilink = make_wikilink, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, z = z, -- exported table } '''' 8tdx7revfs8jad3ucnai1vq1c6cnezr Модул:Citation/CS1/Utilities 828 3192 19515 2026-06-23T18:45:04Z Saslavik 1716 Нова страница: local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-… 19515 Scribunto text/plain local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< 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 --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. ]] local function substitute( msg, args ) return args and mw.message.newRawMessage( msg, args ):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with css markup according to the state of hidden. ]] local function error_comment( content, hidden ) return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content ); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when bot 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 --[[--------------------------< S E T _ E R R O R >-------------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. ]] local function set_error( 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'] ); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set( error_state.category ) then table.insert( z.error_categories, error_state.category ); end local message = substitute( error_state.message, arguments ); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids[ error_id ] = true; if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) and z.error_ids['citation_missing_title'] then return '', false; end message = table.concat({ prefix, message, suffix }); if raw == true then return message, error_state.hidden; end return error_comment( message, error_state.hidden ); end --[[-------------------------< 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 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.maintenance_cats using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats. ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< 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; else if str:sub(1,1) == "'" then str = "<span></span>" .. str; end if str:sub(-1,-1) == "'" then str = str .. "<span></span>"; end -- Remove newlines as they break italics. return str:gsub( '\n', ' ' ); end 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 --[[--------------------------< 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() local error_str = ""; for _, k in ipairs( error_list ) do if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end error_str = error_str .. wrap_style ('parameter', k); end if #error_list > 1 then error_str = error_str .. cfg.messages['parameter-final-separator']; else error_str = error_str .. cfg.messages['parameter-pair-separator']; end error_str = error_str .. wrap_style ('parameter', selected); table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } ); 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 white space 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 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 white space 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]] L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate link D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] wl_type = 1; end if not is_set (D) then -- no wikilink markup D = str; -- return the string as D wl_type = 0; -- but say that it is not a wikilink end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters L = L and mw.text.trim (L, '%s|'); 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 { is_set = is_set, -- exported functions in_array = in_array, substitute = substitute, error_comment = error_comment, set_error = set_error, select_one = select_one, add_maint_cat = add_maint_cat, wrap_style = wrap_style, safe_for_italics = safe_for_italics, remove_wiki_link = remove_wiki_link, is_wikilink = is_wikilink, make_wikilink = make_wikilink, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, z = z, -- exported table } 3ip0nyncv5q3w1ip0l9y5jzifvqvcf6 Модул;Citation/CS1/Utilities 0 3193 19517 2026-06-23T19:51:17Z Saslavik 1716 Saslavik преместио је страницу [[Модул;Citation/CS1/Utilities]] на [[Модул:Модул:Citation/CS1/Utilities]]: Типографија 19517 wikitext text/x-wiki #Преусмери [[Модул:Модул:Citation/CS1/Utilities]] 90m63b6azdf5tvzlicu5i4ko01xpyc1 Модул:Citation/CS1/Date validation 828 3194 19518 2026-06-23T19:55:55Z Saslavik 1716 Нова страница: local p = {} --[[--------------------------< N O T E >---------------------------------------- It was neccessary to move these lists below out of their corresponding functions (e.g. "get_month_number()" etc.) in order to fix error »Lua error in Module:Citation/CS1/Date_validation at line "xyz": attempt to index global '"name_of_the_list"' (a nil value).«. ]] --------------------------< D E F I N E _ M O N T H _ N A M E S _ L I S T S >------------------------… 19518 Scribunto text/plain local p = {} --[[--------------------------< N O T E >---------------------------------------- It was neccessary to move these lists below out of their corresponding functions (e.g. "get_month_number()" etc.) in order to fix error »Lua error in Module:Citation/CS1/Date_validation at line "xyz": attempt to index global '"name_of_the_list"' (a nil value).«. ]] --------------------------< D E F I N E _ M O N T H _ N A M E S _ L I S T S >---------------------------------------- -- long month names of varying lengths; not shortened versions; divided by scripts into Cyrillic and Latin + English local long_cyrillic_months = {['јануар']=1, ['фебруар']=2, ['март']=3, ['април']=4, ['мај']=5, ['јун']=6, ['јуни']=6, ['јул']=7, ['јули']=7, ['август']=8, ['септембар']=9, ['октобар']=10, ['новембар']=11, ['децембар']=12}; local long_latin_months = {['januar']=1, ['februar']=2, ['mart']=3, ['april']=4, ['maj']=5, ['jun']=6, ['juni']=6, ['jul']=7, ['juli']=7, ['avgust']=8, ['septembar']=9, ['oktobar']=10, ['novembar']=11, ['decembar']=12}; local long_english_months = {['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 month names all three characters; these do not use terminal period; divided by scripts into Cyrillic and Latin + English local short_cyrillic_months = {['мај']=5, ['јун']=6, ['јул']=7}; local short_latin_months = {['maj']=5, ['jun']=6, ['jul']=7}; local short_english_months = {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12}; -- short month names all three characters; these require terminal period; divided by scripts into Cyrillic and Latin local dot_cyrillic_months = {['јан']=1, ['феб']=2, ['мар']=3, ['апр']=4, ['авг']=8, ['сеп']=9, ['окт']=10, ['нов']=11, ['дец']=12}; local dot_latin_months = {['jan']=1, ['feb']=2, ['mar']=3, ['apr']=4, ['avg']=8, ['sep']=9, ['okt']=10, ['nov']=11, ['dec']=12}; --------------------------< D E F I N E _ S E A S O N _ N A M E S _ L I S T S >---------------------------------------- -- season ekavian names; make sure these numbers do not overlap month numbers; divided by scripts into Cyrillic and Latin + English local season_cyrillic_ekavian_list = {['зима']=21, ['пролеће']=22, ['лето']=23, ['јесен']=24}; local season_latin_ekavian_list = {['zima']=21, ['proleće']=22, ['leto']=23, ['jesen']=24}; local season_english_list = {['Winter']=21, ['Spring']=22, ['Summer']=23, ['Fall']=24, ['Autumn']=24}; -- season ijekavian names; make sure these numbers do not overlap month numbers; divided by scripts into Cyrillic and Latin local season_cyrillic_ijekavian_list = {['зима']=21, ['прољеће']=22, ['љето']=23, ['јесен']=24}; local season_latin_ijekavian_list = {['zima']=21, ['proljeće']=22, ['ljeto']=23, ['jesen']=24}; --------------------------< D E F I N E _ O T H E R _ A C C E P T A B L E _ N A M E S _ L I S T S >---------------------------------------- -- proper names; make sure these numbers do not overlap month or season numbers; divided by scripts into Cyrillic and Latin + English local name_cyrillic_list = {['Божић']=31} local name_latin_list = {['Božić']=31} local name_english_list = {['Christmas']=31} --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local is_set, in_array; -- imported function from selected Module:Citation/CS1/Utilities --[=[--------------------------< 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 |accessdate= 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-Engish 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. For the time being, to use this function, supply it with YYYY-MM-DD format dates. See [[bs:Modul:Citation/CS1/Date validation/igralište]] for one possible solution. ]=] local function is_valid_accessdate (accessdate) local lang = mw.getContentLanguage(); local good1, good2; local access_ts, tomorrow_ts; -- to hold unix time stamps representing the dates good1, access_ts = pcall( lang.formatDate, lang, 'U', accessdate ); -- convert accessdate value to unix timestamp good2, tomorrow_ts = pcall( lang.formatDate, lang, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then access_ts = tonumber (access_ts); -- convert to numbers for the comparison tomorrow_ts = tonumber (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 јануар, 5 for мај or maj, etc. Capitalization and spelling must be correct. If not a valid month, returns 0. ]] local function get_month_number (month) return long_cyrillic_months[month] or -- if month is the long-Cyrillic-form name long_latin_months[month] or -- if month is the long-Latin-form name short_cyrillic_months[month] or -- if month is non-dotted short-Cyrillic-form name short_latin_months[month] or -- if month is non-dotted short-Latin-form name 0; -- misspelled, improper case, or not a month name end --[[--------------------------< G E T _ E N G L I S H _ M O N T H _ N U M B E R >---------------------------------------------- Returns a number according to the month in a date: 1 for January, 5 for May, etc. Capitalization and spelling must be correct. If not a valid month, returns 0. ]] local function get_english_month_number (month) return long_english_months[month] or -- if month is the long-English-form name short_english_months[month] or -- if month is short-English-form name 0; -- misspelled, improper case, or not a month name end --[[--------------------------< G E T _ D O T _ M O N T H _ N U M B E R >-------------------------------------- Returns a number according to the short dotted month in a date: 1 for јан., 4 for апр. or apr., etc. This function is specially made for short months that must be followed with a dot. The short months мај, јун, јул, maj, jun, and jul are omitted here because these month names are not followed with a dot, and will not be allowed for use in any short-dotted-months-ranges. If not a valid month, returns 0. ]] local function get_dot_month_number (month) return dot_cyrillic_months[month] or -- if month is dotted short-Cyrillic-form name dot_latin_months[month] or -- if month is dotted short-Latin-form name 0; -- misspelled, improper case, or not a month name end --[[--------------------------< 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 |embargo= is set, the editor intended to embargo a pmc but |embargo= does not hold a single date. ]] local function is_valid_embargo_date (v) if v:match ('^%d%d%d%d%-%d%d%-%d%d$') or -- ymd mw.ustring.match (v, '^%d%d?%.?%s+%a+%s+%d%d%d%d$') or -- dmy mw.ustring.match (v, '^%a+%s+%d%d?%s*,%s*%d%d%d%d$') then -- mdy return true, v; end return false, '9999'; -- if here not good date so return false and set embargo date to long time in future end --[[--------------------------< 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: 1 for зима or zima, etc. Capitalization and spelling must be correct. If not a valid season, returns 0. Divided by scripts into Cyrillic and Latin, and by pronunciation into ekavian and ijekavian. ]] local year_limit; local function get_season_number (season) return season_cyrillic_ekavian_list[season] or -- if season is a valid Cyrillic ekavian name return its number season_latin_ekavian_list[season] or -- if season is a valid Latin ekavian name return its number season_cyrillic_ijekavian_list[season] or -- if season is a valid Cyrillic ijekavian name return its number season_latin_ijekavian_list[season] or -- if season is a valid Latin ijekavian name return its number 0; -- misspelled, improper case, or not a season name end --[[--------------------------< G E T _ E N G L I S H _ S E A S O N _ N U M B E R >-------------------------------------------- Returns a number according to the sequence of seasons in a year: 1 for Winter, etc. Capitalization and spelling must be correct. If not a valid season, returns 0. ]] local year_limit; local function get_english_season_number (season) return season_english_list[season] or -- if season is a valid English name return its number 0; -- misspelled, improper case, or not a season name end --[[--------------------------< I S _ P R O P E R _ N A M E >-------------------------------------------------- Returns a non-zero number if date contains a recognized proper name. Capitalization and spelling must be correct. Divided by scripts into Cyrillic and Latin. ]] local function is_proper_name (name) return name_cyrillic_list[name] or -- if name is a valid Cyrillic name return its number name_english_list[name] or -- if name is a valid English name return its number name_latin_list[name] or -- if name is a valid Latin name return its number 0; -- misspelled, improper case, or not a proper name end --[[--------------------------< I S _ V A L I D _ M O N T H _ O R _ S E A S O N >------------------------------ Returns true if month or season is valid (properly spelled, capitalized, abbreviated, (non-)dotted, etc.). ]] local function is_valid_month_or_season (month_season) if 0 == get_month_number (month_season) then -- if month text isn't one of the long months or short non-dotted months, might be a short dotted month or season if 0 == get_english_month_number (month_season) then -- not a long month or a short non-dotted month, is it a English month? if 0 == get_dot_month_number (month_season) then -- not a long month or a short non-dotted month, is it a short dotted month? if 0 == get_season_number (month_season) then -- not a short dotted month i.e. not a month, is it a season? if 0 == get_english_season_number (month_season) then -- not a short dotted month i.e. not a month, is it an English season? return false; -- return false; not a month or one of the seasons end -- return false; not a month or one of the seasons end end end end return true; 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. ]] local year_limit; local function is_valid_year(year) if not is_set(year_limit) then year_limit = tonumber(os.date("%Y"))+1; -- save a copy so we only have to fetch it once end return tonumber(year) <= year_limit; -- false if year is in the future more than one year 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) local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local month_length; if not is_valid_year(year) then -- no farther into the future than next year return false; end month = tonumber(month); -- required for YYYY-MM-DD dates if (2==month) then -- if February month_length = 28; -- then 28 days unless if 1582 > tonumber(year) then -- Julian calendar if 0==(year%4) then month_length = 29; 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: "јануар—март" or "јан.—мар." but not "фебруар—мар." or "апр.—август" etc. These are special tests for long Cyrillic months, long Latin months, short Cyrillic months, short Latin months, dot Cyrillic months, and dot Latin months. Returns true when style (depending on whether Cyrillic or Latin, whether long or short, whether dotted or non-dotted) for both months is the same. ]] local function is_valid_month_range_style (month1, month2) if long_cyrillic_months[month1] and long_cyrillic_months[month2] then return true; -- both are long Cyrillic month names elseif long_english_months[month1] and long_english_months[month2] then return true; -- both are long English month names elseif long_latin_months[month1] and long_latin_months[month2] then return true; -- both are long Latin month names elseif short_cyrillic_months[month1] and short_cyrillic_months[month2] then return true; -- both are non-dotted short Cyrillic month names elseif short_english_months[month1] and short_english_months[month2] then return true; -- both are [non-dotted] short English month names elseif short_latin_months[month1] and short_latin_months[month2] then return true; -- both are non-dotted short Latin month names elseif dot_cyrillic_months[month1] and dot_cyrillic_months[month2] then return true; -- both are dotted short Cyrillic month names elseif dot_latin_months[month1] and dot_latin_months[month2] then return true; -- both are dotted short Latin month names else return false; -- months are mixed form so return false end end --[[--------------------------< I S _ V A L I D _ S E A S O N _ R A N G E _ S T Y L E >-------------------------- Seasons in a range are expected to have the same style: "пролеће—лето" or "ljeto—jesen" but not "прољеће—лето" or "ljeto—јесен" etc. These are special tests for Cyrillic ekavian seasons, Cyrillic ijekavian seasons, Latin ekavian seasons and Latin ijekavian seasons. Returns true when style (depending on whether Cyrillic or Latin, whether ekavian or ijekavian) for both seasons is the same. ]] local function is_valid_season_range_style (season1, season2) if season_cyrillic_ekavian_list[season1] and season_cyrillic_ekavian_list[season2] then return true; -- both are Cyrillic ekavian season names elseif season_english_list[season1] and season_english_list[season2] then return true; -- both are English season names elseif season_cyrillic_ijekavian_list[season1] and season_cyrillic_ijekavian_list[season2] then return true; -- both are Cyrillic ijekavian season names elseif season_latin_ekavian_list[season1] and season_latin_ekavian_list[season2] then return true; -- both are Latin ekavian season names elseif season_latin_ijekavian_list[season1] and season_latin_ijekavian_list[season2] then return true; -- both are Latin ijekavian season names else return false; -- seasons are mixed form so return false end 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 long months or short non-dotted months, or seasons to see if both are valid members of a long month or short non-dotted month, or season pair. Month pairs are expected to be left to right, earliest to latest in time. Similarly, seasons are also left to right, earliest to latest in time. There is an oddity with seasons: Winter is assigned a value of 21, Spring 22, Summer 23, Fall/Autumn 24. Because Winter can follow Fall/Autumn at the end of a calender year, a special test is made to see if "|date=јесен-зима yyyy" (24-21) is the date. ]] local function is_valid_month_season_range(range_start, range_end) local range_start_number = get_month_number (range_start); local range_end_number; if 0 == range_start_number then -- is this a month range? local range_start_number = get_season_number (range_start); -- not a month; is it a season? get start season number range_end_number = get_season_number (range_end); -- get end season number if 0 ~= range_start_number then -- is start of range a season? if range_start_number < range_end_number and 21 ~= range_start_number then -- range_start is a season except Winter if is_valid_season_range_style (range_start, range_end) then -- do seasons have the same style? return true; -- return true when range_end is also a season and follows start season, and both season names are of same style; else false end end if (24 == range_start_number and 21 == range_end_number) or (23 == range_start_number and 21 == range_end_number) or (22 == range_start_number and 21 == range_end_number) then -- special cases when season range is Fall-Winter or Autumn-Winter, or Summer-Winter, or Spring-Winter if is_valid_season_range_style (range_start, range_end) then -- do seasons have the same style? return true; end end end return false; -- range_start is not a month or a season; or range_start is a season and range_end is not; or improper season sequence; or seasons are not of same style end range_end_number = get_month_number (range_end); -- get end month number if range_start_number < range_end_number then -- range_start is a month; does range_start precede range_end? if is_valid_month_range_style (range_start, range_end) then -- do months have the same style? return true; -- proper order and same style end end return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month end --[[--------------------------< I S _ V A L I D _ E N G L I S H _ M O N T H _ S E A S O N _ R A N G E >------------------------ Check a pair of long months or short English months, or seasons to see if both are valid members of a long month or short month, or season pair. Month pairs are expected to be left to right, earliest to latest in time. Similarly, seasons are also left to right, earliest to latest in time. There is an oddity with seasons: Winter is assigned a value of 21, Spring 22, Summer 23, Fall/Autumn 24. Because Winter can follow Fall/Autumn at the end of a calender year, a special test is made to see if "|date=Fall–Winter yyyy" (24-21) is the date. ]] local function is_valid_english_month_season_range(range_start, range_end) local range_start_number = get_english_month_number (range_start); local range_end_number; if 0 == range_start_number then -- is this a month range? local range_start_number = get_english_season_number (range_start); -- not a month; is it a season? get start season number range_end_number = get_english_season_number (range_end); -- get end season number if 0 ~= range_start_number then -- is start of range a season? if range_start_number < range_end_number and 21 ~= range_start_number then -- range_start is a season except Winter if is_valid_season_range_style (range_start, range_end) then -- do seasons have the same style? return true; -- return true when range_end is also a season and follows start season, and both season names are of same style; else false end end if (24 == range_start_number and 21 == range_end_number) or (23 == range_start_number and 21 == range_end_number) or (22 == range_start_number and 21 == range_end_number) then -- special cases when season range is Fall-Winter or Autumn-Winter, or Summer-Winter, or Spring-Winter if is_valid_season_range_style (range_start, range_end) then -- do seasons have the same style? return true; end end end return false; -- range_start is not a month or a season; or range_start is a season and range_end is not; or improper season sequence; or seasons are not of same style end range_end_number = get_english_month_number (range_end); -- get end month number if range_start_number < range_end_number then -- range_start is a month; does range_start precede range_end? if is_valid_month_range_style (range_start, range_end) then -- do months have the same style? return true; -- proper order and same style end end return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month end --[[--------------------------< I S _ V A L I D _ D O T _ M O N T H _ R A N G E >------------------------ Check a pair of dot-months to see if both are valid members of a dot-month pair. Dot-month pairs are expected to be left to right, earliest to latest in time. ]] local function is_valid_dot_month_range(range_start, range_end) local range_start_number = get_dot_month_number (range_start); if 0 == range_start_number then -- is this a dot-month range? return false; -- range_start is not a dot-month end local range_end_number = get_dot_month_number (range_end); -- get end dot-month number if range_start_number < range_end_number then -- range_start is a dot-month; does range_start precede range_end? if is_valid_month_range_style (range_start, range_end) then -- do dot-months have the same style (either Cyrillic or Latin)? return true; -- proper order and same style end end return false; -- range_start dot-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; 31– proper name dates day, day2 – 0 if not provided, 1-31 for days the output table receives: rftdate: an IS8601 formatted date rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and propername dates) rftssn: one of four season keywords: winter, spring, summer, fall (lowercase) ]] local function make_COinS_date (input, tCOinS_date) local date; -- one date or first date in a range local date2 = ''; -- end of range date 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 propername date local season = {[21]='winter', [22]='spring', [23]='summer', [24]='fall', [31]='Christmas'}; -- seasons lowercase, no autumn; proper names use title case if 0 == input.month2 then -- single season date if 30 <tonumber(input.month) then tCOinS_date.rftchron = season[input.month]; -- proper name dates 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); --use hyphen in metadata 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 (uses hyphen separator) 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 --[[--------------------------< C H E C K _ D A T E >---------------------------------------------------------- !!! DON'T UPDATE MATCH STRINGS ONLY HERE BUT ALSO IN Модул:Citation/CS1, AND BOTH AT THE SAME TIME !!! Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. !!! NOTE !!! Allowed range separators are mdash (primar), ndash and hyphen. Any ndash or hyphen is automatically converted to mdash. Additionally, checks 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 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 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, accessdate, embargo, archivedate, etc.) 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() !!! DON'T UPDATE MATCH STRINGS ONLY HERE BUT ALSO IN Модул:Citation/CS1, AND BOTH AT THE SAME TIME !!! ]] local function check_date (date_string, tCOinS_date, test_accessdate) 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 mw.ustring.match(date_string, "^%d%d%d%d%-%d%d%-%d%d$") then -- 01. yyyy-mm-dd year, month, day=mw.ustring.match(date_string, "(%d%d%d%d)%-(%d%d)%-(%d%d)"); 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, "^%d?%d%. *%d?%d%. *%d%d%d%d?%.?%a?$") then -- 02. [d]d. [m]m. yyyy day, month, year=mw.ustring.match(date_string, "(%d?%d)%. *(%d?%d)%. *(%d%d%d%d?)%.?%a?"); if 12 < tonumber(month) or 1 > tonumber(month) or 0 == day then return false; end -- return false if month number not valid or day is zero anchor_year = year; elseif mw.ustring.match(date_string, "^[1-9]%d?%. +%a+ +[1-9]%d%d%d?%.?%a?$") then -- 03. (d)d. month yyyy day, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d*)%.%s*(%a+)%s*((%d%d%d%d?)%.?%a?)"); 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, "^[1-9]%d? +%a+ +[1-9]%d%d%d?%a?$") then -- 03. (d)d month yyyy /English/ day, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d*)%s*(%a+)%s*((%d%d%d%d?)%a?)"); month = get_english_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, "^%a+ +[1-9]%d?, +[1-9]%d%d%d?%a?$") then -- 03. month (d)d, yyyy /English md/ month, day, anchor_year, year=mw.ustring.match(date_string, "(%a+)%s*(%d%d?),%s*((%d%d%d%d?)%a?)"); month = get_english_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, "^[1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d?%.?%a?$") then -- 04. (d)d. mon. yyyy day, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d*)%.%s*(%a%a%a)%.%s*((%d%d%d%d?)%.?%a?)"); month = get_dot_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the nine dot-months elseif mw.ustring.match(date_string, "^%d?%d[%-–—]%d%d?%. +%d?%d%. +[1-9]%d%d%d?%.?$") then -- 05. [d]d—[d]d. [m]m. yyyy day, day2, month, year=mw.ustring.match(date_string, "(%d%d?)[%-–—](%d%d?)%. +(%d?%d)%. +(%d%d%d%d?)%.?"); 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; if 12 < tonumber(month) or 1 > tonumber(month) or 0 == day then return false; end -- return false if month number not valid or day is zero anchor_year = year; elseif mw.ustring.match(date_string, "^%d?%d/%d%d?%. +%d?%d%. +[1-9]%d%d%d?%.?%a?$") then -- 06. [d]d/[d]d. [m]m. yyyy day, day2, month, year=mw.ustring.match(date_string, "(%d%d?)/(%d%d?)%. +(%d?%d)%. +(%d%d%d%d?)%.?"); if 1 ~= tonumber(day2) - tonumber(day) then return false; end -- date range order is left to right: earlier to later and CONSECUTIVE; dates may not be the same; if 12 < tonumber(month) or 1 > tonumber(month) or 0 == day then return false; end -- return false if month number not valid or day is zero anchor_year = year; elseif mw.ustring.match(date_string, "^[1-9]%d?[%-–—][1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") then -- 07. (d)d—(d)d. month yyyy day, day2, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)[%-–—](%d%d?)%. +(%a+) +((%d%d%d%d)%.?%a?)"); 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 elseif mw.ustring.match(date_string, "^[1-9]%d?[%-–][1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- 07. (d)d–(d)d month yyyy /English/ day, day2, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)[%-–](%d%d?) +(%a+) +((%d%d%d%d)%a?)"); 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_english_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 elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d?[%-–][1-9]%d?, +[1-9]%d%d%d%a?$") then -- 07. month (d)d–(d)d, yyyy /English md/ month, day, day2, anchor_year, year=mw.ustring.match(date_string, "(%a+) +(%d%d?)[%-–](%d%d?), +((%d%d%d%d)%a?)"); 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_english_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 elseif mw.ustring.match(date_string, "^[1-9]%d?/[1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") then -- 08. (d)d/(d)d. month yyyy day, day2, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)/(%d%d?)%. +(%a+) +((%d%d%d%d)%.?%a?)"); if 1 ~= tonumber(day2) - tonumber(day) then return false; end -- date range order is left to right: earlier to later and CONSECUTIVE; 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 elseif mw.ustring.match(date_string, "^[1-9]%d?[%-–—][1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 09. (d)d—(d)d. mon. yyyy day, day2, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)[%-–—](%d%d?)%. +(%a%a%a)%. +((%d%d%d%d)%.?%a?)"); 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_dot_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the nine dot-months month2=month; -- for metadata elseif mw.ustring.match(date_string, "^[1-9]%d?/[1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 10. (d)d/(d)d. mon. yyyy day, day2, month, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)/(%d%d?)%. +(%a%a%a)%. +((%d%d%d%d)%.?%a?)"); if 1 ~= tonumber(day2) - tonumber(day) then return false; end -- date range order is left to right: earlier to later and CONSECUTIVE; dates may not be the same; month = get_dot_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the nine dot-months month2=month; -- for metadata elseif mw.ustring.match(date_string, "^%d%d?%. +%d?%d%.? [%-–—] %d%d?%. +%d?%d%. +[1-9]%d%d%d%.?$") then -- 11. [d]d. [m]m. — [d]d. [m]m. yyyy day, month, day2, month2, year=mw.ustring.match(date_string, "(%d%d?)%. +(%d?%d)%.? [%-–—] (%d%d?)%. +(%d?%d)%. +(%d%d%d%d)%.?"); 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, "^[1-9]%d?%. +%a+ [%-–—] [1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") then -- 12. (d)d. month — (d)d. month yyyy day, month, day2, month2, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)%. +(%a+) [%-–—] (%d%d?)%. +(%a+) +((%d%d%d%d)%.?%a?)"); 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, "^[1-9]%d? +%a+ [%-–] [1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- 12. (d)d month – (d)d month yyyy /English/ day, month, day2, month2, anchor_year, year=mw.ustring.match(date_string, "(%d%d?) +(%a+) [%-–] (%d%d?) +(%a+) +((%d%d%d%d)%a?)"); if (not is_valid_english_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_english_month_number (month); -- for metadata month2 = get_english_month_number (month2); year2=year; elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d? [%-–] %a+ +[1-9]%d?, +[1-9]%d%d%d%a?$") then -- 12. month (d)d – month (d)d, yyyy /English md/ month, day, month2, day2, anchor_year, year=mw.ustring.match(date_string, "(%a+) +(%d%d?) [%-–] (%a+) +(%d%d?), +((%d%d%d%d)%a?)"); if (not is_valid_english_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_english_month_number (month); -- for metadata month2 = get_english_month_number (month2); year2=year; elseif mw.ustring.match(date_string, "^[1-9]%d?%. +%a%a%a%. [%-–—] [1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 13. (d)d. mon. — (d)d. mon. yyyy day, month, day2, month2, anchor_year, year=mw.ustring.match(date_string, "(%d%d?)%. +(%a%a%a)%. [%-–—] (%d%d?)%. +(%a%a%a)%. +((%d%d%d%d)%.?%a?)"); if (not is_valid_dot_month_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_dot_month_number (month); -- for metadata month2 = get_dot_month_number (month2); year2=year; elseif mw.ustring.match(date_string, "^%d%d?%. +%d?%d%. +[1-9]%d%d%d%.? [%-–—] %d%d?%. +%d?%d%. +[1-9]%d%d%d%.?%a?$") then -- 14. [d]d. [m]m. yyyy. — [d]d. [m]m. yyyy day, month, year, day2, month2, year2=mw.ustring.match(date_string, "(%d%d?)%. +(%d?%d)%. +(%d%d%d%d?)%.? [%-–—] (%d%d?)%. +(%d?%d)%. +(%d%d%d%d?)%.?"); 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); elseif mw.ustring.match(date_string, "^[1-9]%d?%. +%a+ +[1-9]%d%d%d%.? [%-–—] [1-9]%d?%. +%a+ +[1-9]%d%d%d%.?%a?$") then -- 15. (d)d. month yyyy — (d)d. month yyyy day, month, year, day2, month2, anchor_year, year2=mw.ustring.match(date_string, "(%d%d?)%. +(%a+) +(%d%d%d%d)%.? [%-–—] (%d%d?)%. +(%a+) +((%d%d%d%d)%.?%a?)"); 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); elseif mw.ustring.match(date_string, "^[1-9]%d? +%a+ +[1-9]%d%d%d [%-–] [1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- 15. (d)d month yyyy – (d)d month yyyy /English/ day, month, year, day2, month2, anchor_year, year2=mw.ustring.match(date_string, "(%d%d?) +(%a+) +(%d%d%d%d) [%-–] (%d%d?) +(%a+) +((%d%d%d%d)%a?)"); 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_english_month_number (month); -- for metadata month2 = get_english_month_number (month2); elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d?, +[1-9]%d%d%d [%-–] %a+ +[1-9]%d?, +[1-9]%d%d%d%a?$") then -- 15. month (d)d, yyyy – month (d)d, yyyy /English md/ month, day, year, month2, day2, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d?), +(%d%d%d%d) [%-–] (%a+) +(%d%d?), +((%d%d%d%d)%a?)"); 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_english_month_number (month); -- for metadata month2 = get_english_month_number (month2); elseif mw.ustring.match(date_string, "^[1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.? [%-–—] [1-9]%d?%. +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 16. (d)d. mon. yyyy — (d)d. mon. yyyy day, month, year, day2, month2, anchor_year, year2=mw.ustring.match(date_string, "(%d%d?)%. +(%a%a%a)%. +(%d%d%d%d)%.? [%-–—] (%d%d?)%. +(%a%a%a)%. +((%d%d%d%d)%.?%a?)"); 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_dot_month_number (month); -- for metadata month2 = get_dot_month_number (month2); elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d[%-–—]%d%d%.?%a?$") then -- 17. special case "Summer/Winter year—year" (YYYY-YY) {лето\зима\leto\zima\љето\ljeto yyyy—yy} local century; month, year, century, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +((%d%d)%d%d)[%-–—]((%d%d)%.?%a?)"); if ('лето' ~= month and 'зима' ~= month) and ('leto' ~= month and 'zima' ~= month) and ('љето' ~= month and 'зима' ~= month) and ('ljeto' ~= month and 'zima' ~= month) then return false end; -- 'month' can only be Summer or Winter 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 consecutive 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); elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d[%-–]%d%d%a?$") then -- 17. special case "Summer/Winter year—year" (YYYY-YY) {Summer\Winter yyyy–yy} /English/ local century; month, year, century, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +((%d%d)%d%d)[%-–]((%d%d)%a?)"); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Summer or Winter 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 consecutive 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_english_season_number (month); elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d/%d%d%.?%a?$") then -- 18. special case "Summer/Winter year/year" (YYYY-YY); years separated by '/' {лето\зима\leto\zima\љето\ljeto yyyy/yy} local century; month, year, century, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +((%d%d)%d%d)/((%d%d)%.?%a?)"); if ('лето' ~= month and 'зима' ~= month) and ('leto' ~= month and 'zima' ~= month) and ('љето' ~= month and 'зима' ~= month) and ('ljeto' ~= month and 'zima' ~= month) then return false end; -- 'month' can only be Summer or Winter 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 consecutive 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); elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d[%-–—][1-9]%d%d%d%.?%a?$") then -- 19. special case "Summer/Winter year—year" (YYYY-YYYY) {лето\зима\leto\zima\љето\ljeto yyyy—yyyy} month, year, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d%d%d)[%-–—]((%d%d%d%d)%.?%a?)"); if ('лето' ~= month and 'зима' ~= month) and ('leto' ~= month and 'zima' ~= month) and ('љето' ~= month and 'зима' ~= month) and ('ljeto' ~= month and 'zima' ~= month) then return false end; -- 'month' can only be Summer or Winter anchor_year=year..'—'..anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be consecutive 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); -- for metadata elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d[%-–][1-9]%d%d%d%a?$") then -- 19. special case "Summer/Winter year–year" (YYYY-YYYY) {Summer\Winter yyyy–yyyy} /English/ month, year, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d%d%d)[%-–]((%d%d%d%d)%a?)"); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Summer or Winter anchor_year=year..'—'..anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be consecutive 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_english_season_number (month); -- for metadata elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d/[1-9]%d%d%d%.?%a?$") then -- 20. special case "Summer/Winter year/year" (YYYY-YYYY); years separated by '/' {лето\зима\leto\zima\љето\ljeto yyyy/yyyy} month, year, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d%d%d)/((%d%d%d%d)%.?%a?)"); if ('лето' ~= month and 'зима' ~= month) and ('leto' ~= month and 'zima' ~= month) and ('љето' ~= month and 'зима' ~= month) and ('ljeto' ~= month and 'zima' ~= month) then return false end; -- 'month' can only be Summer or Winter anchor_year=year..'/'..anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be consecutive 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); -- for metadata elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d%.? +[%-–—] +%a+ +[1-9]%d%d%d%.?%a?$") then -- 21. month\season yyyy — month\season yyyy month, year, month2, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d%d%d)%.? +[%-–—] +(%a+) +((%d%d%d%d)%.?%a?)"); 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) and 0 ~= get_season_number(month2) then -- both must be or season year, not mixed month = get_season_number(month); month2 = get_season_number(month2); else return false; end elseif mw.ustring.match(date_string, "^%a+ +[1-9]%d%d%d +[%-–] +%a+ +[1-9]%d%d%d%a?$") then -- 21. month\season yyyy – month\season yyyy [English] month, year, month2, anchor_year, year2=mw.ustring.match(date_string, "(%a+) +(%d%d%d%d) +[%-–] +(%a+) +((%d%d%d%d)%a?)"); 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_english_month_number(month) and 0 ~= get_english_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_english_month_number(month); month2 = get_english_month_number(month2); elseif 0 ~= get_english_season_number(month) and 0 ~= get_english_season_number(month2) then -- both must be or season year, not mixed month = get_english_season_number(month); month2 = get_english_season_number(month2); else return false; end elseif mw.ustring.match(date_string, "^%a%a%a%. +[1-9]%d%d%d%.? +[%-–—] +%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 22. mon. yyyy — mon. yyyy month, year, month2, anchor_year, year2=mw.ustring.match(date_string, "(%a%a%a)%. +(%d%d%d%d)%.? +[%-–—] +(%a%a%a)%. +((%d%d%d%d)%.?%a?)"); 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_dot_month_number (month) and 0 ~= get_dot_month_number (month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_dot_month_number (month); month2 = get_dot_month_number (month2); -- both must be months, not mixed; 'dot-seasons' don't exist else return false; end elseif mw.ustring.match(date_string, "^%a+[%-–—]%a+ +[1-9]%d%d%d%.?%a?$") then -- 23. month\season—month\season yyyy month, month2, anchor_year, year=mw.ustring.match(date_string, "(%a+)[%-–—](%a+)%s*((%d%d%d%d)%.?%a?)"); if (not is_valid_month_season_range(month, month2)) 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); else month = get_season_number(month); month2 = get_season_number(month2); end year2=year; elseif mw.ustring.match(date_string, "^%a+[%-–]%a+ +[1-9]%d%d%d%a?$") then -- 23. month\season—month\season yyyy /English/ month, month2, anchor_year, year=mw.ustring.match(date_string, "(%a+)[%-–](%a+)%s*((%d%d%d%d)%a?)"); if (not is_valid_english_month_season_range(month, month2)) or (not is_valid_year(year)) then return false; end if 0 ~= get_english_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_english_month_number(month); month2 = get_english_month_number(month2); else month = get_english_season_number(month); month2 = get_english_season_number(month2); end year2=year; elseif mw.ustring.match(date_string, "^%a+/%a+ +[1-9]%d%d%d%.?%a?$") then -- 24. month\season/month\season yyyy month, month2, anchor_year, year=mw.ustring.match(date_string, "(%a+)/(%a+)%s*((%d%d%d%d)%.?%a?)"); if (not is_valid_month_season_range(month, month2)) 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 if 1 ~= get_month_number(month2) - get_month_number(month) then return false; end -- must be consecutive months month = get_month_number(month); month2 = get_month_number(month2); else if 1 ~= get_season_number(month2) - get_season_number(month) then return false; end -- must be consecutive seasons month = get_season_number(month); month2 = get_season_number(month2); end year2=year; elseif mw.ustring.match(date_string, "^%a%a%a%.[%-–—]%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 25. mon.—mon. yyyy month, month2, anchor_year, year=mw.ustring.match(date_string, "(%a%a%a)%.[%-–—](%a%a%a)%.%s*((%d%d%d%d)%.?%a?)"); if (not is_valid_dot_month_range(month, month2)) or (not is_valid_year(year)) then return false; end if 0 ~= get_dot_month_number (month) then -- determined to be a valid range so just check this one to know if month or season month = get_dot_month_number (month); month2 = get_dot_month_number (month2); end year2=year; elseif mw.ustring.match(date_string, "^%a%a%a%./%a%a%a%. +[1-9]%d%d%d%.?%a?$") then -- 26. mon./mon. yyyy month, month2, anchor_year, year=mw.ustring.match(date_string, "(%a%a%a)%./(%a%a%a)%.%s*((%d%d%d%d)%.?%a?)"); if (not is_valid_dot_month_range(month, month2)) or (not is_valid_year(year)) then return false; end if 0 ~= get_dot_month_number (month) then -- determined to be a valid range so just check this one to know if month or season if 1 ~= get_dot_month_number (month2) - get_dot_month_number (month) then return false; end -- must be consecutive dot-months month = get_dot_month_number (month); month2 = get_dot_month_number (month2); end year2=year; elseif mw.ustring.match(date_string, "^%a+%. +%d%d%d%d%.?%a?$") then --disabling long months of length three to be followed by dot return false elseif mw.ustring.match(date_string, "^%a+ +%d%d%d%d%.?%a?$") then -- 27. month\season yyyy month, anchor_year, year=mw.ustring.match(date_string, "(%a+)%s*((%d%d%d%d)%.?%a?)"); if not is_valid_year(year) then return false; end if not is_valid_month_or_season (month) and 0 == is_proper_name (month) 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); elseif 0 ~= get_season_number(month) then month = get_season_number(month); else month = is_proper_name (month); -- must be proper name; not supported in COinS end elseif mw.ustring.match(date_string, "^%d?%d%. +%d%d%d%d%.?%a?$") then -- 27. (m)m. yyyy month, anchor_year, year=mw.ustring.match(date_string, "(%d?%d)%.%s*((%d%d%d%d)%.?%a?)"); if not is_valid_year(year) or 12 < tonumber(month) or 1 > tonumber(month) then return false; end elseif mw.ustring.match(date_string, "^%a+ +%d%d%d%d%a?$") then -- 27. month\season yyyy /English/ month, anchor_year, year=mw.ustring.match(date_string, "(%a+)%s*((%d%d%d%d)%a?)"); if not is_valid_year(year) then return false; end if not is_valid_month_or_season (month) and 0 == is_proper_name (month) then return false; end if 0 ~= get_english_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_english_month_number(month); elseif 0 ~= get_english_season_number(month) then month = get_english_season_number(month); else month = is_proper_name (month); -- must be proper name; not supported in COinS end elseif mw.ustring.match(date_string, "^%a%a%a%. +%d%d%d%d%.?%a?$") then -- 28. mon. yyyy month, anchor_year, year=mw.ustring.match(date_string, "(%a%a%a)%.%s*((%d%d%d%d)%.?%a?)"); if not is_valid_year(year) then return false; end if not is_valid_month_or_season (month) and 0 == is_proper_name (month) then return false; end if 0 ~= get_dot_month_number (month) then -- check this one to know if month or season (it is dot-month, we know, but it's not important because it can stay here as same as it is above, just deleted checking for seasons; don't delete "else" for "month = is_proper_name (month);" part) month = get_dot_month_number (month); else month = is_proper_name (month); -- must be proper name; not supported in COinS end elseif mw.ustring.match(date_string, "^[1-9]%d%d%d?[%-–—][1-9]%d%d%d?%.?%a?$") then -- 29. (y)yyy—(y)yyy year, anchor_year, year2=mw.ustring.match(date_string, "(%d%d%d%d?)[%-–—]((%d%d%d%d?)%.?%a?)"); 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, "^[1-9]%d%d%d?/[1-9]%d%d%d?%.?%a?$") then -- 30. (y)yyy/(y)yyy year, anchor_year, year2=mw.ustring.match(date_string, "(%d%d%d%d?)/((%d%d%d%d?)%.?%a?)"); anchor_year=year..'/'..anchor_year; -- assemble anchor year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- left to right, earlier to later, not the same, CONSECUTIVE 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, "^[1-9]%d%d%d[%-–—]%d%d%.?%a?$") then -- 31. yyyy—yy local century; year, century, anchor_year, year2=mw.ustring.match(date_string, "((%d%d)%d%d)[%-–—]((%d%d)%.?%a?)"); anchor_year=year..'—'..anchor_year; -- assemble anchor year from both years 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) or 1 ~= tonumber(year2) - tonumber(year) 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, "^[1-9]%d%d%d/%d%d%.?%a?$") then -- 32. yyyy/yy local century; year, century, anchor_year, year2=mw.ustring.match(date_string, "((%d%d)%d%d)/((%d%d)%.?%a?)"); anchor_year=year..'/'..anchor_year; -- assemble anchor year from both years 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 1 ~= tonumber(year2) - tonumber(year) 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, "^[1-9]%d%d%d?%.?%a?$") then -- 33. (y)yyy anchor_year, year=mw.ustring.match(date_string, "((%d%d%d%d?)%.?%a?)"); 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 test_accessdate then -- test accessdate here because we have numerical date parts if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2 then -- none of these; accessdate must not be a range if not is_valid_accessdate (year..'-'..month..'-'..day) then return false; -- return false when accessdate out of bounds end else return false; -- return false when accessdate is a range of two dates end end local result=true; -- check whole dates for validity; assume true because not all dates will go through this test if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date) result=is_valid_date(year,month,day); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range) result=is_valid_date(year,month,day); result=result and is_valid_date(year,month,day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range) result=is_valid_date(year,month,day); result=result and is_valid_date(year,month2,day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range) result=is_valid_date(year,month,day); result=result and is_valid_date(year2,month2,day2); end if false == result then return false; end if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values make_COinS_date ({year=year, month=month, day=day, year2=year2, month2=month2, day2=day2}, tCOinS_date); -- make an ISO 8601 date string for COinS end return true, anchor_year; -- format is good and date string represents a real date end --[[--------------------------< 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) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "н. д.", "б. д.", "Н. Д.", "Б. Д.", "НД", "БД" (without quotes; abbr. no date, нема датума, без датума; both scripts). 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, a single error message is created as the dates are tested. In this part, we are also checking for "c. year", "cca. year" or "cca year" (without quotes; abbr. circa), so it can be enabled for use. "cca year" is the most optimal Serbian abbreviation form. ]] local function dates(date_parameters_list, tCOinS_date) 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 error_message = ""; 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) then -- if the parameter has a value if mw.ustring.match(v, "^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 = mw.ustring.match(v, "c%. ([1-9]%d%d%d?)%.?%a?"); -- get the year portion so it can be tested if 'date'==k then anchor_year, COinS_date = mw.ustring.match(v, "((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 mw.ustring.match(v, "^cca%.? [1-9]%d%d%d?%.?%a?$") then -- special case for "cca(.) year" or with or without CITEREF disambiguator - only |date= and |year= local year = mw.ustring.match(v, "cca%.? ([1-9]%d%d%d?)%.?%a?"); -- get the year portion so it can be tested if 'date'==k then anchor_year, COinS_date = mw.ustring.match(v, "((cca%.? [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 mw.ustring.match(v, "^н%. ?д%.%a?$") then --if |date=н. д. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((н%. ?д%.)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^б%. ?д%.%a?$") then --if |date=б. д. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((б%. ?д%.)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^Н%. ?Д%.%a?$") then --if |date=Н. Д. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((Н%. ?Д%.)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^Б%. ?Д%.%a?$") then --if |date=Б. Д. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((Б%. ?Д%.)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^НД%a?$") then --if |date=НД with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((НД)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^БД%a?$") then --if |date=БД with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((БД)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^n%.d%.%a?$") then --if |date=n.d. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((n%.d%.)%a?)"); --no error when date parameter is set to no date elseif mw.ustring.match(v, "^nd%a?$") then --if |date=nd with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, mw.ustring.match(v, "((nd)%a?)"); --no error when date parameter is set to no date else good_date, anchor_year, COinS_date = check_date (v, tCOinS_date); -- go test the date end elseif 'year'==k then -- if the parameter is |year= it should hold only a year value if mw.ustring.match(v, "^[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, mw.ustring.match(v, "((%d+)%.?%a?)"); end elseif 'access-date'==k then -- if the parameter is |date= good_date = check_date (v, nil, true); -- go test the date; nil is a placeholder; true is the test_accessdate flag elseif 'embargo'==k then -- if the parameter is |embargo= good_date = check_date (v); -- 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); -- is |embargo= date a single dmy, mdy, or ymd formatted date? yes:returns embargo; no: returns 9999 end else -- any other date-holding parameter good_date = check_date (v); -- go test the date end if false==good_date then -- assemble one error message so we don't add the tracking category multiple times if is_set(error_message) then -- once we've added the first portion of the error message ... error_message=error_message .. ", "; -- ... add a comma space separator end error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter end end end return anchor_year, embargo_date, error_message; -- 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 returns a numeric value: 0 - year value does not match the year value in date 1 - (default) year value matches the year value in date or one of the year values when date contains two years 2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx) ]] local function year_date_check (year_string, date_string) local year; local date1; local date2; local result = 1; -- result of the test; assume that the test passes year = mw.ustring.match(year_string, '(%d%d%d%d?)%.?'); if mw.ustring.match(date_string, '%d%d%d%d%-%d%d%-%d%d') and mw.ustring.match(year_string, '%d%d%d%d%.?%a') then --special case where both date and year are required YYYY-MM-DD and YYYYx date1 = mw.ustring.match(date_string, '(%d%d%d%d)%.?'); year = mw.ustring.match(year_string, '(%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 mw.ustring.match(date_string, "%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 = mw.ustring.match(date_string, "(%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 mw.ustring.match(date_string, "%d%d%d%d?%.?") then -- any of the standard formats of date with one year date1 = mw.ustring.match(date_string, "(%d%d%d%d?)%.?"); if year ~= date1 then result = 0; end else result = 0; -- no recognizable year in date end return result; end --[[-------------------------< R E F O R M A T T A B L E S >------------------------------------------------ These table are used exclusively for reformatting dates ]] local source_patterns = { -- this table holds patterns that match allowed date formats used to extract date components ['dmy'] = '(%d%d?)%.?%s+(%a+)%s+(%d%d%d%d)%.?', ['mdy'] = '(%a+)%s+(%d%d?),%s+(%d%d%d%d)', ['ymd'] = '(%d%d%d%d)%-(%d%d)-(%d%d)', } local short_formats = { -- this table holds format strings used by os.date() for short month names ['dmy'] = '%e %b %Y', ['mdy'] = '%b %e, %Y', ['ymd'] = '%F', } local long_formats = { -- this table holds format strings used by os.date() for long month names ['dmy'] = '%e %B %Y', ['mdy'] = '%B %e, %Y', ['ymd'] = '%F', } --[[-------------------------< G E T _ D M Y _ D A T E _ P A R T S >------------------------------------------ extracts year, month and day from DMY formatted date, places them in the source_date table, and returns. ]] local function get_dmy_date_parts (date, source_date) source_date.day, source_date.month, source_date.year = mw.ustring.match (date, source_patterns['dmy']); -- get date components as strings source_date.month = get_month_number (source_date.month) or get_english_month_number (source_date.month); -- get month number end --[[-------------------------< G E T _ M D Y _ D A T E _ P A R T S >------------------------------------------ extracts year, month and day from MDY formatted date, places them in the source_date table, and returns. ]] local function get_mdy_date_parts (date, source_date) source_date.month, source_date.day, source_date.year = mw.ustring.match (date, source_patterns['mdy']); -- get date components as strings source_date.month = get_english_month_number (source_date.month); -- get month number end --[[-------------------------< G E T _ Y M D _ D A T E _ P A R T S >------------------------------------------ extracts year, month and day from YMD formatted date, places them in the source_date table, and returns. ]] local function get_ymd_date_parts (date, source_date) source_date.year, source_date.month, source_date.day = mw.ustring.match (date, source_patterns['ymd']); -- get date components as strings end --[[-------------------------< R E F O R M A T _ D A T E S >-------------------------------------------------- Reformats existing dates into the format specified by format and short. Format is one of several keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The all version includes access- and archive-dates; otherwise these dates are not reformatted. On sr.wiki will not use any mdy format (mdy, mdy-all). Date ranges, season dates, proper name dates are not currently supported. ]] local function reformat_dates (date_parameters_list, format, short) local all = false; -- set to false to skip access- and archive-dates local format_str; local source_date = {}; if mw.ustring.match(format,'%a+%-all') then format = mw.ustring.match(format,'(%a+)%-all'); -- extract the format all = true; -- set to true to format access- and archive-dates 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) then -- if the parameter has a value if not all and in_array (param_name, {'access-date', 'archive-date'}) then -- if access- or archive-date and format not xxx-all param_val = ''; -- set to empty string so we don't process this date end for source, pattern in pairs(source_patterns) do if mw.ustring.match(param_val,pattern) then if 'ymd' == source then get_ymd_date_parts (param_val, source_date); -- get the date parts into the source_date table elseif 'dmy' == source then get_dmy_date_parts (param_val, source_date); -- get the date parts into the source_date table elseif 'mdy' == source then get_mdy_date_parts (param_val, source_date); -- get the date parts into the source_date table end if 'ymd' == format and 1582 > tonumber(source_date.year) then -- ymd format dates not allowed before 1582 return false; -- abandon reformatting end if short then format_str = short_formats[format]; else format_str = long_formats[format]; end -- convert date and save; date_parameters_list[param_name] = mw.text.trim (os.date (format_str, os.time(source_date))); -- strip leading space when single digit day and %e is first format end end end end return true; -- declare success 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 mdash. 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 not param_val:match ('%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates param_val, n = mw.ustring.gsub (param_val, '[%-]', '—'); -- replace any hyphen with mdash if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end end return result; -- so we know if end --[[--------------------------< D A T E _ N D A S H _ T O _ D A S H >---------------------------------------- Loops through the list of date-holding parameters and converts any ndash to mdash. Called even if the cs1|2 template has date error(s) because user might use English month ranges etc. or might not. Not called only if ISO date format, as ISO date format does not have a ndash. Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false. ]] local function date_ndash_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 not param_val:match ('%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates param_val, n = mw.ustring.gsub (param_val, '[–]', '—'); -- replace any hyphen with mdash if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end end return result; -- so we know if end --[[--------------------------< R E M O V E _ T R A I L I N G _ D O T >---------------------------------------- Loops through the list of date-holding parameters and removes any trailing dot that may or may not be entered after year number. Generally speaking, date (alone) is incorrect without a traling dot but two dots or dot and right bracket are incorrect too. While references used to display with templates, it was not possible to allow correct "1. 1. 2016." but only "1. 1. 2016" (example) in order not to have date displayed as "(1. 1. 2016.)" but as correct "(1. 1. 2016)", or not as "1. 1. 2016.." but as "1. 1. 2016." Called even if the cs1|2 template has date error(s) because user might specify dot (to comply alone-date writing norm) or might not (because he knows it should/will not get displayed because ".)" or ".." is incorrect). Not called only if ISO date format, as ISO date format does not have a trailing dot. Modifies the date_parameters_list and returns true if trailing dots are replaced, else returns false. ]] local function remove_trailing_dot (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 not param_val:match ('%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates as ISO "2005-05-05." does not exist param_val, n = mw.ustring.gsub (param_val, '%.$', ''); -- replace any trailing dot with empty string if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end end return result; -- so we know if end --[[--------------------------< R E P L A C E _ E N G L I S H _ M O N T H S _ W I T H _ S E R B I A N >---------------------------------------- Loops through the list of date-holding parameters and translates any English month that may or may not be entered by user into Serbian format. Not called if the cs1|2 template has any date errors. Modifies the date_parameters_list and returns true if months are translated, else returns false. ]] local function translate_english_months (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 not param_val:match ('%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates as ISO dates do not contain text param_val, n = mw.ustring.gsub (param_val, 'January', '1.'); -- replace for long month 1 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'February', '2.'); -- replace for long month 2 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'March', '3.'); -- replace for long month 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'April', '4.'); -- replace for long month 4 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'May', '5.'); -- replace for long month 5 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'June', '6.'); -- replace for long month 6 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'July', '7.'); -- replace for long month 7 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'August', '8.'); -- replace for long month 8 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'September', '9.'); -- replace for long month 9 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'October', '10.'); -- replace for long month 10 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'November', '11.'); -- replace for long month 11 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'December', '12.'); -- replace for long month 12 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Jan', '1.'); -- replace for short month 1 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Feb', '2.'); -- replace for short month 2 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Mar', '3.'); -- replace for short month 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Apr', '4.'); -- replace for short month 4 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'May', '5.'); -- replace for short month 5 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Jun', '6.'); -- replace for short month 6 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Jul', '7.'); -- replace for short month 7 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Aug', '8.'); -- replace for short month 8 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Sep', '9.'); -- replace for short month 9 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Oct', '10.'); -- replace for short month 10 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Nov', '11.'); -- replace for short month 11 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Dec', '12.'); -- replace for short month 12 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Winter', 'зима'); -- replace for season 4 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Spring', 'пролеће'); -- replace for season 1 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Summer', 'лето'); -- replace for season 2 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Fall', 'јесен'); -- replace for season 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Autumn', 'јесен'); -- replace for season 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, 'Christmas', 'Божић'); -- replace for only proper name if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '(%d%d?%.) (%d%d?) — (%d%d?%.) (%d%d?), (%d%d%d%d?)', '%2. %1 — %4. %3 %5'); -- reformat 1a if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '(%d%d?%.) (%d%d?), (%d%d%d%d?)', '%2. %1 %3'); -- reformat 1b if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '(%d%d?) (%d%d?%.) — (%d%d?) (%d%d?%.) (%d%d%d%d?)', '%1. %2 — %3. %4 %5'); -- reformat 2a if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '(%d%d?) (%d%d?%.) (%d%d%d%d?)', '%1. %2 %3'); -- reformat 2b if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '(%d%d?%.) (%d%d?—%d%d?), (%d%d%d%d?)', '%2. %1 %3'); -- reformat 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end if mw.ustring.match (param_val, '^%d%d?%. %d%d%d%d$') then -- for those that are number-month and year param_val, n = mw.ustring.gsub (param_val, '^1%. (%d%d%d%d)', 'јануар %1'); -- replace for month 1 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^2%. (%d%d%d%d)', 'фебруар %1'); -- replace for month 2 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^3%. (%d%d%d%d)', 'март %1'); -- replace for month 3 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^4%. (%d%d%d%d)', 'април %1'); -- replace for month 4 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^5%. (%d%d%d%d)', 'мај %1'); -- replace for month 5 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^6%. (%d%d%d%d)', 'јун %1'); -- replace for month 6 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^7%. (%d%d%d%d)', 'јул %1'); -- replace for month 7 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^8%. (%d%d%d%d)', 'август %1'); -- replace for month 8 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^9%. (%d%d%d%d)', 'септембар %1'); -- replace for month 9 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^10%. (%d%d%d%d)', 'октобар %1'); -- replace for month 10 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^11%. (%d%d%d%d)', 'новембар %1'); -- replace for month 11 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end param_val, n = mw.ustring.gsub (param_val, '^12%. (%d%d%d%d)', 'децембар %1'); -- replace for month 12 if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end if mw.ustring.match (param_val, '%d%d?%.%d%d?%. %d%d%d%d') then -- for those that are number-day, number-month without space before and year param_val, n = mw.ustring.gsub (param_val, '(%d%d?%.)(%d%d?%. %d%d%d%d)', '%1 %2'); -- replace if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end if mw.ustring.match (param_val, '%d%d?%. %d%d?%.%d%d%d%d') then -- for those that are number-day, number-month and year without space before param_val, n = mw.ustring.gsub (param_val, '(%d%d?%. %d%d?%.)(%d%d%d%d)', '%1 %2'); -- replace if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end if mw.ustring.match (param_val, '%d%d?%.%d%d?%.%d%d%d%d') then -- for those that are number-day, number-month without space before and year without space before param_val, n = mw.ustring.gsub (param_val, '(%d%d?%.)(%d%d?%.)(%d%d%d%d)', '%1 %2 %3'); -- replace if 0 ~= n then date_parameters_list[param_name] = param_val; -- update the list result = true; end end end return result; -- so we know if 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 (utilities_page_ptr) is_set = utilities_page_ptr.is_set; -- import functions from select Module:Citation/CS1/Utilities module in_array = utilities_page_ptr.in_array; -- import functions from select Module:Citation/CS1/Utilities module end 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_ndash_to_dash = date_ndash_to_dash, remove_trailing_dot = remove_trailing_dot, translate_english_months = translate_english_months, set_selected_modules = set_selected_modules } pq3pujq78s1mzfchyrk9l0zzkfu6j3f Катеґория:Ритем (музика) 14 3195 19520 2026-06-24T08:51:14Z Sveletanka 20 катеґория 19520 wikitext text/x-wiki [[Катеґория:Ритем]] 9comz49qlm4c0ecgydxmrw20t9gy2mu