Wikipidia bdrwiki https://bdr.wikipedia.org/wiki/Tekokon_Laman MediaWiki 1.43.0-wmf.18 first-letter Media Khas Perbincangan Pengguna Perbincangan pengguna Wikipidia Wikipidia Betutur Fail Perbincangan fail MediaWiki Perbincangan MediaWiki Templat Perbincangan templat Bantuan Perbincangan bantuan Kategori Perbincangan kategori TimedText TimedText talk Modul Perbincangan modul Tekokon Laman 0 1 4803 4802 2024-08-20T05:20:23Z Zahirulnukman 5 update 4803 wikitext text/x-wiki {{Tekokon Laman/Header}} {| style="border-spacing: 8px; margin: 0 -8px;" | style="width: 55%; border: 1px solid #cedff2; vertical-align:top; -moz-border-radius:10px;" | {| width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; -moz-border-radius:10px;" ! style="background-color: #CEDBEF; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px; -moz-border-radius: 10px;" | [[Fail:Nuvola apps kweather.png|20px|]] '''Pesorong kam!''' |- |style="font: 95% Verdana;" id="FeaturedArticle" | [[Fail:Tudung duang di Pusat Kebudayaan Rumpun Bajau Sama.jpg|center|250 px|]]<br><div class="center">Betiru un '''<big> {{NUMBEROFARTICLES}}</big>''' rencana diam tuturan Bajau Sama. Pitu kam tabang kok nulis mitu.<br><br>Nulis teturan bau? Tekon '''Buat'''<br></div> <inputbox> type=create width=28 preload=Template:Standard content for new page editintro=Template:Instructions prefix= buttonlabel=Buat </inputbox> <br> |- |- ! style="background-color: #EFF3CE; border: 1px solid #DDDDA4; text-align: left; padding-left: 7px; -moz-border-radius: 10px;" | [[Fail:Nuvola actions help.svg|22px|]] '''International Section''' |- | style="font: 95% Verdana;" id="Didyouknow" | '''⁠Onan iyono Wikipedia Bajau Sama''' :'''Bajau Sama''' antawa '''Bajau Pantai Barat''' iyono kumpulan jomo yang asal ni tekule’ ta [[Sabah]], [[Malaysia]] ta pulau [[Borneo]]. '''This is Bajau Sama Wikipedia.''' :'''Bajau Sama''' or '''West Coast Bajau''' is an indigenous language spoken at Sabah, Malaysia in the Borneo island. |- |} <!--- | style="border:1px solid #cedff2; background-color:#ffffff; vertical-align:top; -moz-border-radius:10px"| {| width="100%" cellpadding="2" cellspacing="3" style="vertical-align:top; background-color:#ffffff; -moz-border-radius:10px;" |- ! style="background-color: #E6FFBF; border: 1px solid #CCFF80; text-align: left; padding-left: 7px; -moz-border-radius:10px" | <div style="float:left;">[[Fail:Postscript-viewer-blue.svg|22px|]] '''⁠Iyan Isi Mediam tu'''</div> |- | style="font: 95% Verdana;" id="Category" | {{Tekokon Laman/Isi}} |- |} ---> |} {{Tekokon Laman/Wikipediasister}} del35pxvfq4ryvq2jifzzftruxt900k MediaWiki:Sitesupport-url 8 2 2 2024-08-06T14:17:13Z Maintenance script 1 Setting sidebar link 2 wikitext text/x-wiki https://donate.wikimedia.org/?utm_source=donate&utm_medium=sidebar&utm_campaign=bdr.wikipedia.org&uselang=bdr gq2fd5gytvojphcmht6dyvnutzysjjp Pengguna:Meno25 2 3 3 2024-08-06T14:32:36Z Meno25 4 Creating 3 wikitext text/x-wiki * You can contact me using [[:en:User:Meno25|my English Wikipedia user page]]. dkcm1o6xzt064h826be7vtnj9rp8l6j Perbincangan pengguna:Meno25 3 4 4 2024-08-06T14:33:07Z Meno25 4 talk 4 wikitext text/x-wiki Please leave messages at [[en:User talk:Meno25]]. 3q2l91ok1d3l9wavvtmiq6ao6h5326r Pengguna:MenoBot 2 5 5 2024-08-06T14:36:05Z MenoBot 6 Creating 5 wikitext text/x-wiki This is an interwiki bot operated by [[User:Meno25|Meno25]]. [[ace:Ureuëng Nguy:MenoBot]] [[kbd:ЦӀыхухэт:MenoBot]] [[af:Gebruiker:MenoBot]] [[als:Benutzer:MenoBot]] [[am:አባል:MenoBot]] [[ang:User:MenoBot]] [[ab:Алахәыла:MenoBot]] [[ar:مستخدم:MenoBot]] [[an:Usuario:MenoBot]] [[arc:ܡܦܠܚܢܐ:MenoBot]] [[roa-rup:User:MenoBot]] [[frp:Utilisator:MenoBot]] [[as:সদস্য:MenoBot]] [[ast:Usuariu:MenoBot]] [[gn:Puruhára:MenoBot]] [[av:Участник:MenoBot]] [[ay:Usuario:MenoBot]] [[az:İstifadəçi:MenoBot]] [[bm:Utilisateur:MenoBot]] [[bn:ব্যবহারকারী:MenoBot]] [[bjn:Pamakai:MenoBot]] [[zh-min-nan:User:MenoBot]] [[map-bms:Panganggo:MenoBot]] [[ba:Ҡатнашыусы:MenoBot]] [[be:Удзельнік:MenoBot]] [[be-x-old:Удзельнік:MenoBot]] [[bh:प्रयोगकर्ता:MenoBot]] [[bcl:Paragamit:MenoBot]] [[bi:User:MenoBot]] [[bg:Потребител:MenoBot]] [[bar:Nutza:MenoBot]] [[bo:User:MenoBot]] [[bs:Korisnik:MenoBot]] [[br:Implijer:MenoBot]] [[bxr:Участник:MenoBot]] [[ca:Usuari:MenoBot]] [[cv:Хутшăнакан:MenoBot]] [[ceb:Gumagamit:MenoBot]] [[cs:Wikipedista:MenoBot]] [[ch:Muna'sesetbi:MenoBot]] [[cbk-zam:Usuario:MenoBot]] [[ny:User:MenoBot]] [[sn:User:MenoBot]] [[tum:User:MenoBot]] [[co:User:MenoBot]] [[cy:Defnyddiwr:MenoBot]] [[da:Bruger:MenoBot]] [[pdc:Yuuser:MenoBot]] [[de:Benutzer:MenoBot]] [[dv:މެމްބަރު:MenoBot]] [[nv:Choyoołʼįįhí:MenoBot]] [[dsb:Wužywaŕ:MenoBot]] [[dz:User:MenoBot]] [[et:Kasutaja:MenoBot]] [[el:Χρήστης:MenoBot]] [[eml:Utente:MenoBot]] [[en:User:MenoBot]] [[myv:Теиця:MenoBot]] [[es:Usuario:MenoBot]] [[eo:Uzanto:MenoBot]] [[ext:User:MenoBot]] [[eu:Lankide:MenoBot]] [[ee:User:MenoBot]] [[fa:کاربر:MenoBot]] [[hif:sadasya:MenoBot]] [[fo:Brúkari:MenoBot]] [[fr:Utilisateur:MenoBot]] [[fy:Meidogger:MenoBot]] [[ff:Utilisateur:MenoBot]] [[fur:Utent:MenoBot]] [[ga:Úsáideoir:MenoBot]] [[gv:Ymmydeyr:MenoBot]] [[gag:Kullanıcı:MenoBot]] [[gd:Cleachdaiche:MenoBot]] [[gl:Usuario:MenoBot]] [[gan:用戶:MenoBot]] [[ki:User:MenoBot]] [[glk:کاربر:MenoBot]] [[gu:સભ્ય:MenoBot]] [[got:𐌽𐌹𐌿𐍄𐌰𐌽𐌳𐍃:MenoBot]] [[hak:User:MenoBot]] [[xal:Демнч:MenoBot]] [[ko:사용자:MenoBot]] [[ha:User:MenoBot]] [[haw:Mea hoʻohana:MenoBot]] [[hy:Մասնակից:MenoBot]] [[hi:सदस्य:MenoBot]] [[hsb:Wužiwar:MenoBot]] [[hr:Suradnik:MenoBot]] [[io:Uzanto:MenoBot]] [[ig:Ọbanife:MenoBot]] [[ilo:Agar-aramat:MenoBot]] [[bpy:আতাকুরা:MenoBot]] [[id:Pengguna:MenoBot]] [[ia:Usator:MenoBot]] [[ie:Usator:MenoBot]] [[iu:User:MenoBot]] [[ik:User:MenoBot]] [[os:Архайæг:MenoBot]] [[xh:User:MenoBot]] [[zu:User:MenoBot]] [[is:Notandi:MenoBot]] [[it:Utente:MenoBot]] [[he:משתמש:MenoBot]] [[jv:Panganggo:MenoBot]] [[kl:Atuisoq:MenoBot]] [[kn:ಸದಸ್ಯ:MenoBot]] [[pam:User:MenoBot]] [[krc:Къошулуучу:MenoBot]] [[ka:მომხმარებელი:MenoBot]] [[ks:رُکُن:MenoBot]] [[csb:Brëkòwnik:MenoBot]] [[kk:Қатысушы:MenoBot]] [[kw:Devnydhyer:MenoBot]] [[rw:User:MenoBot]] [[rn:User:MenoBot]] [[sw:Mtumiaji:MenoBot]] [[kv:Пырысь:MenoBot]] [[kg:User:MenoBot]] [[ht:Itilizatè:MenoBot]] [[ku:Bikarhêner:MenoBot]] [[ky:Колдонуучу:MenoBot]] [[mrj:Сирӹшӹ:MenoBot]] [[lad:Usador:MenoBot]] [[lbe:Гьуртту хьума:MenoBot]] [[lez:Участник:MenoBot]] [[lo:ຜູ້ໃຊ້:MenoBot]] [[ltg:Lītuotuojs:MenoBot]] [[la:Usor:MenoBot]] [[lv:Lietotājs:MenoBot]] [[lb:Benotzer:MenoBot]] [[lt:Naudotojas:MenoBot]] [[lij:Utente:MenoBot]] [[li:Gebroeker:MenoBot]] [[ln:Utilisateur:MenoBot]] [[jbo:User:MenoBot]] [[lg:User:MenoBot]] [[lmo:Druvadur:MenoBot]] [[hu:Szerkesztő:MenoBot]] [[mk:Корисник:MenoBot]] [[mg:Mpikambana:MenoBot]] [[ml:ഉപയോക്താവ്:MenoBot]] [[mt:Utent:MenoBot]] [[mi:User:MenoBot]] [[mr:सदस्य:MenoBot]] [[xmf:მომხმარებელი:MenoBot]] [[arz:مستخدم:MenoBot]] [[mzn:کارور:MenoBot]] [[ms:Pengguna:MenoBot]] [[min:Pengguna:MenoBot]] [[cdo:User:MenoBot]] [[mwl:Outelizador:MenoBot]] [[mdf:Тиись:MenoBot]] [[mn:Хэрэглэгч:MenoBot]] [[my:User:MenoBot]] [[nah:Tlatequitiltilīlli:MenoBot]] [[na:User:MenoBot]] [[fj:User:MenoBot]] [[nl:Gebruiker:MenoBot]] [[nds-nl:Gebruker:MenoBot]] [[cr:User:MenoBot]] [[ne:प्रयोगकर्ता:MenoBot]] [[new:छ्येलेमि:MenoBot]] [[ja:利用者:MenoBot]] [[nap:Utente:MenoBot]] [[ce:Декъашхо:MenoBot]] [[frr:Benutzer:MenoBot]] [[pih:User:MenoBot]] [[no:Bruker:MenoBot]] [[nn:Brukar:MenoBot]] [[nrm:User:MenoBot]] [[nov:User:MenoBot]] [[oc:Utilizaire:MenoBot]] [[mhr:Пайдаланыше:MenoBot]] [[or:ବ୍ୟବହାରକାରୀ:MenoBot]] [[om:User:MenoBot]] [[uz:Foydalanuvchi:MenoBot]] [[pa:ਵਰਤੌਂਕਾਰ:MenoBot]] [[pi:अवयव:MenoBot]] [[pfl:Benudzer:MenoBot]] [[pag:User:MenoBot]] [[pnb:User:MenoBot]] [[pap:User:MenoBot]] [[ps:کارن:MenoBot]] [[koi:Участник:MenoBot]] [[km:អ្នកប្រើប្រាស់:MenoBot]] [[pcd:Utilisateur:MenoBot]] [[pms:Utent:MenoBot]] [[tpi:Yusa:MenoBot]] [[nds:Bruker:MenoBot]] [[pl:Wikipedysta:MenoBot]] [[pnt:Χρήστες:MenoBot]] [[pt:Usuário(a):MenoBot]] [[kaa:Paydalanıwshı:MenoBot]] [[crh:Qullanıcı:MenoBot]] [[ty:Utilisateur:MenoBot]] [[ksh:Metmaacher:MenoBot]] [[ro:Utilizator:MenoBot]] [[rmy:Jeno:MenoBot]] [[rm:Utilisader:MenoBot]] [[qu:Ruraq:MenoBot]] [[rue:Хоснователь:MenoBot]] [[ru:Участник:MenoBot]] [[sah:Кыттааччы:MenoBot]] [[se:Geavaheaddji:MenoBot]] [[sm:User:MenoBot]] [[sa:योजकः:MenoBot]] [[sg:Utilisateur:MenoBot]] [[sc:Usuàriu:MenoBot]] [[sco:User:MenoBot]] [[stq:Benutser:MenoBot]] [[st:User:MenoBot]] [[nso:Mošomi:MenoBot]] [[tn:User:MenoBot]] [[sq:Përdoruesi:MenoBot]] [[scn:Utenti:MenoBot]] [[si:පරිශීලක:MenoBot]] [[simple:User:MenoBot]] [[sd:يوزر:MenoBot]] [[ss:User:MenoBot]] [[sk:Redaktor:MenoBot]] [[sl:Uporabnik:MenoBot]] [[cu:Польꙃєватєл҄ь:MenoBot]] [[szl:Używacz:MenoBot]] [[so:User:MenoBot]] [[ckb:بەکارھێنەر:MenoBot]] [[srn:Masyin:MenoBot]] [[sr:Корисник:MenoBot]] [[sh:Korisnik:MenoBot]] [[su:Pamaké:MenoBot]] [[fi:Käyttäjä:MenoBot]] [[tl:Tagagamit:MenoBot]] [[ta:பயனர்:MenoBot]] [[kab:Amseqdac:MenoBot]] [[roa-tara:User:MenoBot]] [[tt:Кулланучы:MenoBot]] [[te:వాడుకరి:MenoBot]] [[tet:Uza-na'in:MenoBot]] [[th:ผู้ใช้:MenoBot]] [[ti:User:MenoBot]] [[tg:Корбар:MenoBot]] [[to:User:MenoBot]] [[chr:User:MenoBot]] [[chy:User:MenoBot]] [[ve:User:MenoBot]] [[tr:Kullanıcı:MenoBot]] [[tk:Ulanyjy:MenoBot]] [[tw:User:MenoBot]] [[udm:Викиавтор:MenoBot]] [[bug:Pengguna:MenoBot]] [[uk:Користувач:MenoBot]] [[ur:صارف:MenoBot]] [[ug:ئىشلەتكۈچى:MenoBot]] [[za:用户:MenoBot]] [[vec:Utente:MenoBot]] [[vep:Kävutai:MenoBot]] [[vi:Thành viên:MenoBot]] [[vo:Geban:MenoBot]] [[fiu-vro:Pruukja:MenoBot]] [[wa:Uzeu:MenoBot]] [[zh-classical:User:MenoBot]] [[vls:Gebruker:MenoBot]] [[war:Gumaramit:MenoBot]] [[wo:Jëfandikukat:MenoBot]] [[wuu:用户:MenoBot]] [[ts:User:MenoBot]] [[yi:באַניצער:MenoBot]] [[yo:Oníṣe:MenoBot]] [[zh-yue:User:MenoBot]] [[diq:Karber:MenoBot]] [[zea:Gebruker:MenoBot]] [[bat-smg:Nauduotuos:MenoBot]] [[zh:User:MenoBot]] 1a4phrju1anhpdtfgyce48wqn6h45cn Perbincangan pengguna:MenoBot 3 6 6 2024-08-06T14:36:27Z MenoBot 6 talk 6 wikitext text/x-wiki Please leave comments in English at [[:en:User talk:Meno25]]. 5s08lno63fyjy199utyypwti04u4y28 Pengguna:Ultron90 2 7 7 2024-08-06T14:41:01Z Ultron90 9 Mencipta laman baru dengan kandungan 'Salam :)' 7 wikitext text/x-wiki Salam :) dflbknuw9u4g52cjsrqscv9h2fahi3i Pengguna:Koavf 2 8 9 8 2024-08-06T16:37:33Z Koavf 15 9 wikitext text/x-wiki {{#babel:bdr-0|en|es-2|de-1|pt-1}} [https://en.wikipedia.org/wiki/User:Koavf !!!!] bcpzqpxk10px0u6dnlchdq4mte15043 Templat:; 10 11 15 14 2024-08-09T09:19:28Z Jon Harald Søby 58 1 semakan diimportkan 14 wikitext text/x-wiki &#59;<noinclude> {{Documentation}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> jv515gqjn3e60s98b0od6potfps8h7b Templat:Abbr 10 12 625 17 2024-08-09T09:20:20Z Jon Harald Søby 58 1 semakan diimportkan 16 wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> b6zvtcrye54kh0akzk3y1jq9lxg4lm6 Templat:About 10 13 19 18 2024-08-09T09:19:29Z Jon Harald Søby 58 1 semakan diimportkan 18 wikitext text/x-wiki {{#invoke:About|about}}<noinclude> {{Documentation}} </noinclude> 3k7qesxebaj6v5qaflzspkxthka0gut Templat:Allow wrap 10 14 627 21 2024-08-09T09:20:20Z Jon Harald Søby 58 1 semakan diimportkan 20 wikitext text/x-wiki #REDIRECT [[Templat:Wrap]] g1l2sopscvb8jiqf8m2dufibi643jkd Templat:Anglicise rank 10 15 629 23 2024-08-09T09:20:20Z Jon Harald Søby 58 1 semakan diimportkan 22 wikitext text/x-wiki <noinclude><!--Note that #titleparts: is used to replace underscores by spaces before other processing. --></noinclude><includeonly>{{#ifeq:{{str_left|{{lc:{{{1}}}}}|8}}|unranked|(unranked)|{{#switch:{{lc:{{#titleparts:{{{1}}}|1}} }}<!-- --Special cases, alphabetic order--> |alliance=''Alliance'' |basic shell type=''Basic shell type'' |branch=''Branch'' |clade|cladus=''Clade'' |form taxon=''Form taxon'' |grade|gradus=''Grade'' |informal|informal group=''Informal group'' |morphotype=''Morphotype'' |node=''Node'' |plesion=''Plesion'' |plesion-group=''Plesion-group'' |possible clade=''Clade?'' |realm=''Realm'' |species complex=''Species complex'' |species group=''Species group'' |species subgroup=''Species subgroup'' |stem group=''Stem group'' |total group=''Total group'' <!--Virus ranks below species--> |serotype=Serotype |strain=Strain |virus=Virus |virus group=Group <!--Linnaean taxonomy, alphabetic order--> |classis=Class |cohort=Cohort |divisio=Division |domain=Domain |epifamilia=Epifamily |familia=Family |forma=Form |genus=Genus |grandordo|grandordo-mb<!--McKenna & Bell version-->=Grandorder |hyperfamilia=Hyperfamily |infraclassis=Infraclass |infralegio|infralegion=Infralegion |infraordo=Infraorder |infraphylum=Infraphylum |infraregnum=Infrakingdom |infratribus=Infratribe |legio|legion=Legion |magnordo=Magnorder |micrordo=Microrder |microphylum=Microphylum |mirordo|mirordo-mb<!--McKenna & Bell version-->=Mirorder |nanordo=Nanorder |nanophylum=Nanophylum |ordo=Order |parafamilia=Parafamily |parvclassis=Parvclass |parvordo=Parvorder |phylum=Phylum |regnum=Kingdom |sectio=Section |series=Series |species=Species |subclassis=Subclass |subcohort=Subcohort |subdivisio=Subdivision |subfamilia=Subfamily |subgenus=Subgenus |sublegio|sublegion=Sublegion |subordo=Suborder |subphylum=Subphylum |subregnum=Subkingdom |subsectio=Subsection |subseries=Subseries |subspecies=Subspecies |subterclassis=Subterclass<!--used in WoRMS--> |subtribus=Subtribe |superclassis=Superclass |supercohort=Supercohort |superdivisio=Superdivision |superdomain=Superdomain |superfamilia=Superfamily |superlegio|superlegion=Superlegion |superordo=Superorder |superphylum=Superphylum |superregnum=Superkingdom |supersectio=Supersection |supertribus=Supertribe |tribus=Tribe |varietas=Variety |zoodivisio=Division |zoosectio=Section |zoosubdivisio=Subdivision |zoosubsectio=Subsection <!--trace fossil taxonomy, alphabetic order--> |ichnoclassis=Ichnoclass |ichnocohort=Ichnocohort |ichnodivisio=Ichnodivision |ichnofamilia=Ichnofamily |ichnogenus=Ichnogenus |ichnograndordo|ichnograndordo-mb<!--McKenna & Bell version-->=Ichnograndorder |ichnoinfraclassis=Ichnoinfraclass |ichnoinfradivisio=Ichnoinfradivision |ichnoinfraordo=Ichnoinfraorder |ichnolegio|ichnolegion=Ichnolegion |ichnomagnordo=Ichnomagnorder |ichnomicrordo=Ichnomicrorder |ichnoordo=Ichnoorder |ichnoparvordo=Ichnoparvorder |ichnospecies=Ichnospecies |ichnostem-group=Ichnostem-Group |ichnosubclassis=Ichnosubclass |ichnosubdivisio=Ichnosubdivision |ichnosubfamilia=Ichnosubfamily |ichnosublegio|ichnosublegion=Ichnosublegion |ichnosubordo=Ichnosuborder |ichnosuperclassis=Ichnosuperclass |ichnosupercohort=Ichnosupercohort |ichnosuperfamilia=Ichnosuperfamily |ichnosuperordo=Ichnosuperorder <!--fossilized egg taxonomy, alphabetic order--> |ooclassis=Ooclass |oocohort=Oocohort |oofamilia=Oofamily |oogenus=Oogenus |oomagnordo=Oomagnorder |oordo=Oorder |oospecies=Oospecies |oosubclassis=Oosubclass |oosubgenus=Oosubgenus |oosubspecies=Oosubspecies |oosupercohort=Oosupercohort |oosuperordo=Oosuperorder <!--default is to capitalize first letter and then put calling page in error category--> |#default={{#ifeq:{{{check|no}}}|yes|<span style="background-color:#F99">}}{{ucfirst:{{#titleparts:{{{1}}}|1}}}}{{#ifeq:{{{check|no}}}|yes|</span>{{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Taxonomy|[[Kategori:Taxonomy templates using unrecognized rank parameters]]}}}} }}{{#ifeq:{{{check|no}}}|yes|{{#ifeq:{{lcfirst:{{{1}}}}}|{{{1}}}||{{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Taxonomy|[[Kategori:Taxonomy templates using capitalized rank parameters]]}}}}}}}}</includeonly><noinclude>{{documentation}} {{INTERWIKI|Q6679263}} </noinclude> rbh2bojjwidi1zrztceolr7ut3pjlc4 Templat:Auto short description 10 16 25 24 2024-08-09T09:19:29Z Jon Harald Søby 58 1 semakan diimportkan 24 wikitext text/x-wiki {{Ombox | type = notice | text = This template {{#if:{{{sometimes|}}}|sometimes{{sp}}}}adds an automatically generated '''[[Wikipedia:Short description|short description]]'''{{#if:{{{category|}}}|{{sp}}({{{category}}})|}}{{#if:{{{indirect|}}}|{{sp}}via an embedded template}}{{#if:{{{conditions|}}}|{{space}}{{{conditions}}}}}. If the automatic short description is not optimal, replace it by adding {{tl|Short description}} at the top of the article. }}<includeonly>{{Subpage other|<!-- do not categorise -->|[[Kategori:Templates that generate short descriptions{{#if:{{{category|}}}|{{sp}}for {{{category}}}|}}]]}}</includeonly><noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 10rv2n2szow731d7ws8hcsjda7s488i Templat:Automatic taxobox 10 17 27 26 2024-08-09T09:19:29Z Jon Harald Søby 58 1 semakan diimportkan 26 wikitext text/x-wiki <includeonly><nowiki/>{{#invoke:Automated taxobox|automaticTaxobox}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using automatic taxobox with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Automatic taxobox]] with unknown parameter "_VALUE_"|ignoreblank=y | authority | binomial | binomial_authority | binomial_text | classification_status | color_as | display_parents | diversity | diversity_link | diversity_ref | extinct | fossil_range | genus_text | grandparent_authority | greatgrandparent_authority | greatgreatgrandparent_authority | image2 | image2_alt | image2_caption | image2_upright | image | image_alt | image_caption | image_upright | italic_title | name | oldest_fossil | parent_authority | range_map2 | range_map2_alt | range_map2_caption | range_map2_upright | range_map | range_map_alt | range_map_caption | range_map_upright | species_text | status2 | status2_ref | status2_system | status | status_ref | status_system | subdivision | subdivision_ranks | subdivision_ref | synonyms | synonyms_ref | taxon | trend | type_genus | type_genus_authority | type_species | type_species_authority | type_strain | type_strain_ref | youngest_fossil}}<noinclude> {{documentation}}</noinclude> meeeq5sg2x2w7dsh60f4uj9mox7ag26 Templat:Birth date and age 10 18 4772 632 2024-08-19T17:08:26Z Rombituon 59 4772 wikitext text/x-wiki <includeonly>{{{{{♥|safesubst:}}}#invoke:age|birth_date_and_age}}{{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Birth date and age]] with unknown parameter "_VALUE_"|unknown={{main other|[[Category:Pages using birth date and age template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|1|2|3|day|month|year|df|mf}}{{#ifeq: {{NAMESPACENUMBER}} | 0 | {{#if: {{#invoke:wd|label|raw}} | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}} | {{#if: {{#invoke:wd|properties|raw|P569}} | | [[Category:Date of birth not in Wikidata]] }} }} | [[Category:Articles without Wikidata item]] }} }}</includeonly><noinclude>{{documentation}}</noinclude> a0pyxjpy9sf2d4e6jiwi9hktjdnwilq Templat:Both 10 19 635 32 2024-08-09T09:21:19Z Jon Harald Søby 58 2 semakan diimportkan 31 wikitext text/x-wiki {{SAFESUBST:<noinclude />#if:{{{1|}}}|{{SAFESUBST:<noinclude />#if:{{{2|}}}|1}}}}<noinclude> {{Documentation}} {{INTERWIKI|Q5863317}} </noinclude> dptm0hkown51zuxohyl3wa8ceyg51n3 Templat:Br separated entries 10 20 638 34 2024-08-09T09:21:19Z Jon Harald Søby 58 2 semakan diimportkan 33 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br}}<noinclude> {{documentation}} </noinclude> 3qzqyo0vc2bkjx7dik52fp751jwcnq3 Templat:CO2 10 21 36 35 2024-08-09T09:19:30Z Jon Harald Søby 58 1 semakan diimportkan 35 wikitext text/x-wiki {{#if:{{{link|}}}|[<noinclude/>[Carbon dioxide{{!}}}}CO<sub style="font-size: 80%;vertical-align: -0.35em">2</sub>{{#if:{{{link|}}}|]]}}<noinclude><!-- Styles are copied from Module:Chem2/styles.css. -->{{Documentation}}</noinclude> juqf32n58mlrywjm9p7zwnhki9grn4r Templat:Category link 10 22 38 37 2024-08-09T09:19:31Z Jon Harald Søby 58 1 semakan diimportkan 37 wikitext text/x-wiki {{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Stub types for deletion |[[:Category:{{{1}}}|Cat:{{{1}}}]] | [[:Category:{{{1}}}|{{{2|Category:{{{1}}}}}}]]{{#ifeq:{{Yesno|{{{count|no}}}}}|yes|<small> {{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|<span style="font-weight: bold; color: #DD0000;">}}(&thinsp;{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}}}&thinsp;){{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|</span>}}</small>}}}}<noinclude> {{Documentation}} </noinclude> npwya2pxpmrb7ss01243bg1cub9s7jq Templat:Center 10 23 641 40 2024-08-09T09:21:19Z Jon Harald Søby 58 2 semakan diimportkan 39 wikitext text/x-wiki <includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;{{#if: {{{style|}}} | {{{style}}};}}">{{{1|[[Kategori:Pages using center with no arguments]]}}}</div></includeonly>{{#invoke:Check for unknown parameters|check|unknown=[[Kategori:Pages using center with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Templat:Center]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | style }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 4bdfc2x8q9x25ravc1perkgeku56841 Templat:Citation 10 24 42 41 2024-08-09T09:19:31Z Jon Harald Søby 58 1 semakan diimportkan 41 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=citation }}</includeonly><noinclude> {{Documentation}} </noinclude> mcoe5nzpodofs7c9el95mfevaw3qeo2 Templat:Cite AV media 10 25 44 43 2024-08-09T09:19:31Z Jon Harald Søby 58 1 semakan diimportkan 43 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1 | citation |CitationClass=audio-visual }}</includeonly><noinclude>{{Documentation}} </noinclude> mra1mmln5vlg7jqjrft4nv2zofjbcnf Templat:Cite CIA World Factbook 10 26 643 48 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 45 wikitext text/x-wiki {{#invoke:Template wrapper|wrap|_template=cite web|_exclude=country,section,year |url = {{#invoke:CIA World Factbook|country|country={{if empty|{{{2|}}}|{{{country|}}}}}|section={{{section|}}}}} |title = {{if empty|{{{2|}}}|{{{country|}}}|The World Factbook}}{{#if:{{{section|}}}|{{#if:{{{2|}}}{{{country|}}}|&nbsp;§&nbsp;{{{section}}}}}}} |work = {{#if:{{{2|}}}{{{country|}}}|[[The World Factbook]]}} |publisher = [[Central Intelligence Agency]] |edition = {{#if:{{{url|}}}{{{archive-url|}}}{{{archiveurl|}}}||{{CURRENTYEAR}}}} }}{{#invoke:CIA World Factbook|archive|year={{{year|}}}|date={{if empty|{{{date|}}}|{{{access-date|}}}|{{{accessdate|}}}}}|archive={{{archive-url|}}}{{{archiveurl|}}}}}<noinclude> {{Documentation}} </noinclude> 6grjdfxwqht4fq365p4ryjk6jbo4z0a Templat:Cite act 10 27 50 49 2024-08-09T09:19:32Z Jon Harald Søby 58 1 semakan diimportkan 49 wikitext text/x-wiki <includeonly>{{#invoke:Template wrapper|wrap |_template =Cite book |_exclude = {{#if: {{{odf|}}} || date, }} title, df, type, article, article-type, articletype, number, trans-title, script-title, chapter-url, year, index, legislature, odf, | chapter = {{{title|}}} | trans-chapter = {{{trans-title|}}} | script-chapter = {{{script-title|}}} | publisher = {{{legislature|}}} | title = {{#if: {{{article|}}} | {{{article-type|{{{articletype|Article}}}}}} {{{article|}}}, }} {{{type|Act}}} {{#if: {{{index|{{{number|}}}}}} | No. {{{index|{{{number|}}}}}} }} {{#if: {{{odf|}}} || of {{#ifeq: {{{date|}}}|{{#time:j F Y|{{{date|}}}}}|{{{date|}}}| {{#ifeq:{{{date|}}}|{{#time:F j, Y|{{{date|}}}}}|{{{date|}}}| {{#ifeq:{{{date|}}}|{{#time:F Y|{{{date|}}}}}|{{{date|}}}| {{#ifeq:{{{date|{{{year}}}}}}|{{#time:Y|{{{date|{{{year}}}}}}}}|{{{date|{{{year}}}}}}| <span class="error">'''Error: the <code>date</code> or <code>year</code> parameters are either empty or in an invalid format, please use a valid year for <code>year</code>, and use DMY, MDY, MY, or Y date formats for <code>date</code>'''</span> }} }} }} }} }} }}</includeonly><noinclude> {{Documentation}} </noinclude> 1yz9mwhur35tueowunr1w2ene53dvtr Templat:Cite book 10 28 4484 645 2024-08-12T10:25:35Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q92570]] 4484 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=book }}</includeonly><noinclude> {{Documentation}} {{collapse top|TemplateData}} {{Cite book/TemplateData}} {{collapse bottom}} </noinclude> 81a8srgxl1d8eiu27jgjpkb0hns9l98 Templat:Cite book/TemplateData 10 29 55 54 2024-08-09T09:19:32Z Jon Harald Søby 58 1 semakan diimportkan 54 wikitext text/x-wiki <noinclude>{{Pp|small=yes}}</noinclude>{{TemplateData header}} {{#invoke:Cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}} <templatedata> { "description": "This template formats a citation to a book using the provided bibliographic information (such as author and title) as well as various formatting options.", "params": { "url": { "label": "URL", "description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the  protocol relative scheme \"//...\"", "type": "url", "aliases": [ "URL" ], "example": "https://books.google.com/books?id=..." }, "title": { "label": "Title", "description": "The title of the book; displays in italics", "type": "string", "required": true }, "last": { "label": "Last name", "description": "The surname of the author; don't wikilink, use 'author-link' instead; can suffix with a numeral to add additional authors", "aliases": [ "last1", "author", "author1", "author1-last", "author-last", "surname1", "author-last1", "subject1", "surname", "author-last", "subject" ], "suggested": true, "type": "string" }, "first": { "label": "First name", "description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'author-link' instead; can suffix with a numeral to add additional authors", "aliases": [ "given", "author-first", "first1", "given1", "author-first1", "author1-first" ], "suggested": true, "type": "string" }, "last2": { "label": "Last name 2", "description": "The surname of the second author; don't wikilink, use 'author-link2' instead; can suffix with a numeral to add additional authors", "aliases": [ "author2", "surname2", "author-last2", "author2-last", "subject2" ], "type": "string" }, "first2": { "label": "First name 2", "description": "Given or first name, middle names, or initials of the second author; don't wikilink, use 'author-link2' instead; can suffix with a numeral to add additional authors", "aliases": [ "given2", "author-first2", "author2-first" ], "type": "string" }, "last3": { "label": "Last name 3", "description": "The surname of the third author; don't wikilink, use 'author-link3' instead.", "aliases": [ "author3", "surname3", "author-last3", "author3-last", "subject3" ], "type": "string" }, "first3": { "label": "First name 3", "description": "Given or first name, middle names, or initials of the third author; don't wikilink.", "aliases": [ "given3", "author-first3", "author3-first" ], "type": "string" }, "last4": { "label": "Last name 4", "description": "The surname of the fourth author; don't wikilink, use 'author-link4' instead.", "aliases": [ "author4", "surname4", "author-last4", "author4-last", "subject4" ], "type": "string" }, "first4": { "label": "First name 4", "description": "Given or first name, middle names, or initials of the fourth author; don't wikilink.", "aliases": [ "given4", "author-first4", "author4-first" ], "type": "string" }, "last5": { "label": "Last name 5", "description": "The surname of the fifth author; don't wikilink, use 'author-link5' instead.", "aliases": [ "author5", "surname5", "author-last5", "author5-last", "subject5" ], "type": "string" }, "first5": { "label": "First name 5", "description": "Given or first name, middle names, or initials of the fifth author; don't wikilink.", "aliases": [ "given5", "author-first5", "author5-first" ], "type": "string" }, "last6": { "label": "Last name 6", "description": "The surname of the sixth author; don't wikilink, use 'author-link6' instead.", "aliases": [ "author6", "surname6", "author-last6", "author6-last", "subject6" ], "type": "string" }, "first6": { "label": "First name 6", "description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.", "aliases": [ "given6", "author-first6", "author6-first" ], "type": "string" }, "last7": { "label": "Last name 7", "description": "The surname of the seventh author; don't wikilink, use 'author-link7' instead.", "aliases": [ "author7", "surname7", "author-last7", "author7-last", "subject7" ], "type": "string" }, "first7": { "label": "First name 7", "description": "Given or first name, middle names, or initials of the seventh author; don't wikilink.", "aliases": [ "given7", "author-first7", "author7-first" ], "type": "string" }, "last8": { "label": "Last name 8", "description": "The surname of the eighth author; don't wikilink, use 'author-link8' instead.", "aliases": [ "author8", "surname8", "author-last8", "author8-last", "subject8" ], "type": "string" }, "first8": { "label": "First name 8", "description": "Given or first name, middle names, or initials of the eighth author; don't wikilink.", "aliases": [ "given8", "author-first8", "author8-first" ], "type": "string" }, "last9": { "label": "Last name 9", "description": "The surname of the ninth author; don't wikilink, use 'author-link9' instead. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.", "aliases": [ "author9", "surname9", "author-last9", "author9-last", "subject9" ], "type": "string" }, "first9": { "label": "First name 9", "description": "Given or first name, middle names, or initials of the ninth author; don't wikilink.", "aliases": [ "given9", "author-first9", "author9-first" ], "type": "string" }, "date": { "label": "Date", "description": "Full date of the source; do not wikilink", "type": "date", "suggested": true }, "work": { "label": "Work", "description": "Name of the work in which the cited book text is found", "type": "string", "aliases": [ "journal", "website", "newspaper", "magazine" ] }, "publisher": { "label": "Publisher", "description": "Name of the publisher; displays after title", "type": "string", "suggested": true, "aliases": [ "institution" ], "example": "[[HarperCollins]]" }, "others": { "label": "Others", "description": "Used to record other contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'", "type": "string" }, "year": { "label": "Year of publication", "description": "Year of the source being referenced; use 'date' instead, if month and day are also known", "type": "string", "suggested": true }, "isbn": { "label": "ISBN", "description": "International Standard Book Number; use the 13-digit ISBN where possible", "type": "string", "suggested": true, "aliases": [ "ISBN" ] }, "editor-last": { "label": "Editor last name", "description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors", "type": "string", "aliases": [ "editor", "editor-surname", "editor-last1", "editor-surname1", "editor1", "editor1-last", "editor1-surname" ] }, "editor-first": { "label": "Editor first name", "description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors", "type": "string", "aliases": [ "editor-given", "editor-first1", "editor-given1", "editor1-first", "editor1-given" ] }, "editor-link": { "label": "Link for editor", "description": "Title of existing Wikipedia article about the editor", "type": "wiki-page-name", "aliases": [ "editor-link1", "editor1-link" ] }, "editor-mask": { "label": "Editor mask", "description": "Replaces the name of the first editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor1-mask", "editor-mask1" ] }, "edition": { "label": "Edition", "description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed by ' ed.'", "type": "line", "example": "2nd", "suggested": true }, "series": { "label": "Series identifier", "description": "Series identifier when the source is part of a series, such as a book series or a journal", "aliases": [ "version" ], "type": "string" }, "volume": { "label": "Volume", "description": "For one publication published in several volumes", "type": "string" }, "location": { "label": "Location of publication", "description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place", "aliases": [ "place" ], "type": "string", "suggested": true }, "publication-place": { "label": "Place of publication", "description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'", "type": "string" }, "publication-date": { "label": "Publication date", "description": "Date of publication when different from the date the work was written; do not wikilink", "type": "date", "suggested": true }, "page": { "label": "Page", "description": "The number of a single page in the source that supports the content; displays after 'p.'; use either page= or pages=, but not both", "type": "string", "aliases": [ "p" ] }, "pages": { "label": "Page(s) cited", "description": "A range of pages in the source that support the content (not an indication of the number of pages in the source); displays after 'pp.'; use either page= or pages=, but not both", "type": "string", "suggested": true, "aliases": [ "pp" ], "example": "5–11" }, "at": { "label": "At", "description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient", "type": "string" }, "language": { "label": "Language", "description": "The language in which the source is written. Do not use the full language name; use ISO 639-1. Do not use icons or templates", "type": "string", "suggested": true }, "script-title": { "label": "Script title", "description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Bengali, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...", "type": "string" }, "trans-title": { "label": "Translated title", "description": "An English language title, if the source cited is in a foreign language; 'language' is recommended", "type": "string", "suggested": true }, "chapter": { "label": "Chapter", "description": "The chapter heading of the source; may be wikilinked or with 'chapter-url' but not both. For the contribution alias, see contributor-last", "type": "string", "aliases": [ "contribution", "entry", "article", "section" ] }, "trans-chapter": { "label": "Translated chapter", "description": "An English language chapter heading, if the source cited is in a foreign language; 'language' is recommended", "type": "string" }, "type": { "label": "Type", "description": "Additional information about the media type of the source; format in sentence case", "type": "string", "aliases": [ "medium" ] }, "format": { "label": "Format", "description": "Format of the work referred to by 'url'; examples: PDF, DOC, XLS; do not specify HTML", "type": "string" }, "asin": { "label": "ASIN", "description": "Amazon Standard Identification Number; 10 characters", "type": "string", "aliases": [ "ASIN" ] }, "asin-tld": { "label": "ASIN TLD", "description": "ASIN top-level domain for Amazon sites other than the US", "type": "string" }, "bibcode": { "label": "Bibcode", "description": "Bibliographic Reference Code (REFCODE); 19 characters", "type": "string" }, "biorxiv": { "label": "biorXiv", "description": "biorXiv identifier; 6 digits", "type": "line" }, "citeseerx": { "label": "CiteSeerX", "description": "CiteSeerX identifier; found after the 'doi=' query parameter", "type": "line" }, "doi": { "label": "DOI", "description": "Digital Object Identifier; begins with '10.'", "type": "string", "aliases": [ "DOI" ] }, "issn": { "label": "ISSN", "description": "International Standard Serial Number; 8 characters; may be split into two groups of four using a hyphen", "type": "string", "aliases": [ "ISSN" ] }, "jfm": { "label": "jfm code", "description": "Jahrbuch über die Fortschritte der Mathematik classification code", "type": "string" }, "jstor": { "label": "JSTOR", "description": "JSTOR identifier", "type": "string", "aliases": [ "JSTOR" ] }, "lccn": { "label": "LCCN", "description": "Library of Congress Control Number", "type": "string", "aliases": [ "LCCN" ] }, "mr": { "label": "MR", "description": "Mathematical Reviews identifier", "type": "string", "aliases": [ "MR" ] }, "oclc": { "label": "OCLC", "description": "Online Computer Library Center number", "type": "string", "aliases": [ "OCLC" ] }, "ol": { "label": "OL", "description": "Open Library identifier; do not include \"OL\" at beginning of identifier", "type": "string", "aliases": [ "OL" ] }, "osti": { "label": "OSTI", "description": "Office of Scientific and Technical Information identifier", "type": "string", "aliases": [ "OSTI" ] }, "pmc": { "label": "PMC", "description": "PubMed Center article number", "type": "string" }, "pmid": { "label": "PMID", "description": "PubMed Unique Identifier", "type": "string", "aliases": [ "PMID" ] }, "rfc": { "label": "RFC", "description": "Request for Comments number", "type": "string" }, "ssrn": { "label": "SSRN", "description": "Social Science Research Network", "type": "string" }, "zbl": { "label": "Zbl", "description": "Zentralblatt MATH journal identifier", "type": "string" }, "id": { "label": "id", "description": "A unique identifier used where none of the specialized ones are applicable", "type": "string", "aliases": [ "ID" ] }, "quote": { "label": "Quote", "description": "Relevant text quoted from the source; displays last, enclosed in quotes; needs to include terminating punctuation", "type": "string", "aliases": [ "quotation" ] }, "ref": { "label": "Ref", "description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates", "type": "string" }, "mode": { "label": "Mode", "description": "Sets separator and terminal punctuation to the style named in the assigned value; allowable values are: 'cs1' or 'cs2'", "type": "string", "suggestedvalues": [ "cs1", "cs2" ] }, "postscript": { "label": "Postscript", "description": "The closing punctuation for the citation; ignored if 'quote' is defined; to suppress use reserved keyword 'none'", "type": "string", "default": "." }, "author-mask": { "label": "Author mask", "description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author1-mask", "author-mask1" ] }, "author-mask2": { "label": "Author mask 2", "description": "Replaces the name of the second author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author2-mask" ] }, "author-mask3": { "label": "Author mask 3", "description": "Replaces the name of the third author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author3-mask" ] }, "author-mask4": { "label": "Author mask 4", "description": "Replaces the name of the fourth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author4-mask" ] }, "author-mask5": { "label": "Author mask 5", "description": "Replaces the name of the fifth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author5-mask" ] }, "author-mask6": { "label": "Author mask 6", "description": "Replaces the name of the sixth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author6-mask" ] }, "author-mask7": { "label": "Author mask 7", "description": "Replaces the name of the seventh author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author7-mask" ] }, "author-mask8": { "label": "Author mask 8", "description": "Replaces the name of the eighth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author8-mask" ] }, "author-mask9": { "label": "Author mask 9", "description": "Replaces the name of the ninth author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string", "aliases": [ "author9-mask" ] }, "display-authors": { "label": "Display authors", "description": "number of authors to display before 'et al.' is used", "type": "number" }, "author-link": { "label": "Author link", "description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors", "type": "wiki-page-name", "aliases": [ "author-link1", "author1-link", "subject-link", "subject-link1", "subject1-link" ] }, "author-link2": { "label": "Author link 2", "description": "Title of existing Wikipedia article about the second author; can suffix with a numeral to add additional authors", "type": "wiki-page-name", "aliases": [ "author2-link", "subject-link2", "subject2-link" ] }, "author-link3": { "label": "Author link 3", "description": "Title of existing Wikipedia article about the third author.", "type": "wiki-page-name", "aliases": [ "author3-link", "subject-link3", "subject3-link" ] }, "author-link4": { "label": "Author link 4", "description": "Title of existing Wikipedia article about the fourth author.", "type": "wiki-page-name", "aliases": [ "author4-link", "subject-link4", "subject4-link" ] }, "author-link5": { "label": "Author link 5", "description": "Title of existing Wikipedia article about the fifth author.", "type": "wiki-page-name", "aliases": [ "author5-link", "subject-link5", "subject5-link" ] }, "author-link6": { "label": "Author link 6", "description": "Title of existing Wikipedia article about the sixth author.", "type": "wiki-page-name", "aliases": [ "author6-link", "subject-link6", "subject6-link" ] }, "author-link7": { "label": "Author link 7", "description": "Title of existing Wikipedia article about the seventh author.", "type": "wiki-page-name", "aliases": [ "author7-link", "subject-link7", "subject7-link" ] }, "author-link8": { "label": "Author link 8", "description": "Title of existing Wikipedia article about the eighth author.", "type": "wiki-page-name", "aliases": [ "author8-link", "subject-link8", "subject8-link" ] }, "author-link9": { "label": "Author link 9", "description": "Title of existing Wikipedia article about the ninth author.", "type": "wiki-page-name", "aliases": [ "author9-link", "subject-link9", "subject9-link" ] }, "access-date": { "label": "URL access date", "description": "The full date when the original URL was accessed; do not wikilink", "type": "date" }, "orig-date": { "label": "Original date", "description": "Original date of publication; provide specifics", "type": "string" }, "editor-last2": { "label": "Last name of second editor", "description": "The surname of the second editor; don't wikilink, use 'editor2-link'", "type": "string", "aliases": [ "editor-surname2", "editor2", "editor2-last", "editor2-surname" ] }, "editor-first2": { "label": "First name of second editor", "description": "Given or first name, middle names, or initials of the second editor; don't wikilink, use 'editor2-link'", "type": "string", "aliases": [ "editor-given2", "editor2-first", "editor2-given" ] }, "editor-link2": { "label": "Link for second editor", "description": "Title of existing Wikipedia article about the second editor", "type": "wiki-page-name", "aliases": [ "editor2-link" ] }, "editor-mask2": { "label": "Mask for second editor", "description": "Replaces the name of the second editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor2-mask" ] }, "editor-last3": { "label": "Last name of third editor", "description": "The surname of the third editor; don't wikilink, use 'editor3-link'", "type": "string", "aliases": [ "editor-surname3", "editor3", "editor3-last", "editor3-surname" ] }, "editor-first3": { "label": "First name of third editor", "description": "Given or first name, middle names, or initials of the third editor; don't wikilink, use 'editor3-link'", "type": "string", "aliases": [ "editor-given3", "editor3-first", "editor3-given" ] }, "editor-link3": { "label": "Link for third editor", "description": "Title of existing Wikipedia article about the third editor", "type": "wiki-page-name", "aliases": [ "editor3-link" ] }, "editor-mask3": { "label": "Mask for third editor", "description": "Replaces the name of the third editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor3-mask" ] }, "editor-last4": { "label": "Last name of fourth editor", "description": "The surname of the fourth editor; don't wikilink, use 'editor4-link'", "type": "string", "aliases": [ "editor-surname4", "editor4", "editor4-last", "editor4-surname" ] }, "editor-first4": { "label": "First name of fourth editor", "description": "Given or first name, middle names, or initials of the fourth editor; don't wikilink, use 'editor4-link'", "type": "string", "aliases": [ "editor-given4", "editor4-first", "editor4-given" ] }, "editor-link4": { "label": "Link for fourth editor", "description": "Title of existing Wikipedia article about the fourth editor", "type": "wiki-page-name", "aliases": [ "editor4-link" ] }, "editor-mask4": { "label": "Mask for fourth editor", "description": "Replaces the name of the fourth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor4-mask" ] }, "editor-last5": { "label": "Last name of fifth editor", "description": "The surname of the fifth editor; don't wikilink, use 'editor5-link'", "type": "string", "aliases": [ "editor-surname5", "editor5", "editor5-last", "editor5-surname" ] }, "editor-first5": { "label": "First name of fifth editor", "description": "Given or first name, middle names, or initials of the fifth editor; don't wikilink, use 'editor5-link'", "type": "string", "aliases": [ "editor-given5", "editor5-first", "editor5-given" ] }, "editor-link5": { "label": "Link for fifth editor", "description": "Title of existing Wikipedia article about the fifth editor", "type": "wiki-page-name", "aliases": [ "editor5-link" ] }, "editor-mask5": { "label": "Mask for fifth editor", "description": "Replaces the name of the fifth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor5-mask" ] }, "editor-last6": { "label": "Last name of sixth editor", "description": "The surname of the sixth editor; don't wikilink, use 'editor6-link'", "type": "string", "aliases": [ "editor-surname6", "editor6", "editor6-last", "editor6-surname" ] }, "editor-first6": { "label": "First name of sixth editor", "description": "Given or first name, middle names, or initials of the sixth editor; don't wikilink, use 'editor6-link'", "type": "string", "aliases": [ "editor-given6", "editor6-first", "editor6-given" ] }, "editor-link6": { "label": "Link for sixth editor", "description": "Title of existing Wikipedia article about the sixth editor", "type": "wiki-page-name", "aliases": [ "editor6-link" ] }, "editor-mask6": { "label": "Mask for sixth editor", "description": "Replaces the name of the sixth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor6-mask" ] }, "editor-last7": { "label": "Last name of seventh editor", "description": "The surname of the seventh editor; don't wikilink, use 'editor7-link'", "type": "string", "aliases": [ "editor-surname7", "editor7", "editor7-last", "editor7-surname" ] }, "editor-first7": { "label": "First name of seventh editor", "description": "Given or first name, middle names, or initials of the seventh editor; don't wikilink, use 'editor7-link'", "type": "string", "aliases": [ "editor-given7", "editor7-first", "editor7-given" ] }, "editor-link7": { "label": "Link for seventh editor", "description": "Title of existing Wikipedia article about the seventh editor", "type": "wiki-page-name", "aliases": [ "editor7-link" ] }, "editor-mask7": { "label": "Mask for seventh editor", "description": "Replaces the name of the seventh editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor7-mask" ] }, "editor-last8": { "label": "Last name of eighth editor", "description": "The surname of the eighth editor; don't wikilink, use 'editor8-link'", "type": "string", "aliases": [ "editor-surname8", "editor8", "editor8-last", "editor8-surname" ] }, "editor-first8": { "label": "First name of eighth editor", "description": "Given or first name, middle names, or initials of the eighth editor; don't wikilink, use 'editor8-link'", "type": "string", "aliases": [ "editor-given8", "editor8-first", "editor8-given" ] }, "editor-link8": { "label": "Link for eighth editor", "description": "Title of existing Wikipedia article about the eighth editor", "type": "wiki-page-name", "aliases": [ "editor8-link" ] }, "editor-mask8": { "label": "Mask for eighth editor", "description": "Replaces the name of the eighth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor8-mask" ] }, "editor-last9": { "label": "Last name of ninth editor", "description": "The surname of the ninth editor; don't wikilink, use 'editor9-link'", "type": "string", "aliases": [ "editor-surname9", "editor9", "editor9-last", "editor9-surname" ] }, "editor-first9": { "label": "First name of ninth editor", "description": "Given or first name, middle names, or initials of the ninth editor; don't wikilink, use 'editor9-link'", "type": "string", "aliases": [ "editor-given9", "editor9-first", "editor9-given" ] }, "editor-link9": { "label": "Link for ninth editor", "description": "Title of existing Wikipedia article about the ninth editor", "type": "wiki-page-name", "aliases": [ "editor9-link" ] }, "editor-mask9": { "label": "Mask for ninth editor", "description": "Replaces the name of the ninth editor with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing editor separator; for example, 'with' instead", "type": "string", "aliases": [ "editor9-mask" ] }, "chapter-url": { "label": "Chapter URL", "description": "The URL of the online location where the text of the chapter can be found", "aliases": [ "contribution-url", "section-url" ], "type": "url" }, "doi-broken-date": { "label": "DOI broken date", "description": "The date that the DOI was determined to be broken", "type": "date" }, "archive-url": { "label": "Archive URL", "description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archivedate'", "type": "url" }, "archive-date": { "label": "Archive date", "description": "Date when the original URL was archived; do not wikilink", "type": "string" }, "url-status": { "label": "URL status", "description": "If set to 'live', the title display is adjusted; useful for when the URL is archived preemptively but still live. Set to \"dead\" or 'usurped' for broken links. Entering 'unfit' or 'usurped' makes the original link not appear at all.", "type": "string", "default": "dead", "suggestedvalues": [ "dead", "live", "unfit", "usurped" ] }, "name-list-style": { "label": "Name list style", "description": "Set to 'amp' or 'and' to change the separator between the last two names of the name list to ' & ' or ' and ', respectively. Set to 'vanc' to display name lists in Vancouver style.", "type": "string", "suggestedvalues": [ "amp", "and", "vanc" ] }, "via": { "description": "Aggregate or database provider, when different from the Publisher. Typically used for Ebooks.", "example": "[[Open Edition]], [[JSTOR]]", "type": "string" }, "url-access": { "label": "URL access level", "description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')", "type": "string", "suggestedvalues": [ "registration", "subscription", "limited" ] }, "bibcode-access": { "label": "Bibcode access level", "description": "If the full text is available from ADS via this Bibcode, type 'free'.", "type": "string", "autovalue": "free" }, "doi-access": { "label": "DOI access level", "description": "If the full text is free to read via the DOI, type 'free'.", "type": "string", "autovalue": "free" }, "hdl-access": { "label": "HDL access level", "description": "If the full text is free to read via the HDL, type 'free'.", "type": "string", "autovalue": "free" }, "jstor-access": { "label": "Jstor access level", "description": "If the full text is free to read on Jstor, type 'free'.", "type": "string", "autovalue": "free" }, "ol-access": { "label": "OpenLibrary access level", "description": "If the full text is free to read on OpenLibrary, type 'free'.", "type": "string", "autovalue": "free" }, "osti-access": { "label": "OSTI access level", "description": "If the full text is free to read on OSTI, type 'free'.", "type": "string", "autovalue": "free" }, "ismn": { "aliases": [ "ISMN" ], "label": "ISMN", "description": "International Standard Music Number; Use the ISMN actually printed on or in the work. Hyphens or spaces in the ISMN are optional.", "type": "string", "example": "979-0-9016791-7-7" }, "eissn": { "aliases": [ "EISSN" ], "label": "EISSN", "description": "International Standard Serial Number for the electronic media of a serial publication; eight characters may be split into two groups of four using a hyphen, but not an en dash or a space.", "example": "2009-0048", "type": "string" }, "translator-last": { "label": "Translator last name", "description": "The surname of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.", "aliases": [ "translator", "translator-last1", "translator1", "translator1-last" ], "type": "string" }, "translator-first": { "label": "Translator first name", "description": "Given or first name, middle names, or initials of the translator; don't wikilink, use 'translator-link'; can suffix with a numeral to add additional translators.", "aliases": [ "translator1-first", "translator-first1" ], "type": "string" }, "translator-link": { "label": "Translator link", "description": "Title of existing Wikipedia article about the translator; can suffix with a numeral to add additional translators.", "type": "wiki-page-name", "aliases": [ "translator-link1", "translator1-link" ] }, "translator-last2": { "label": "Translator last name 2", "description": "The surname of the second translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator2", "translator2-last" ], "type": "string" }, "translator-first2": { "label": "Translator first name 2", "description": "Given or first name, middle names, or initials of the second translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator2-first" ], "type": "string" }, "translator-last3": { "label": "Translator last name 3", "description": "The surname of the third translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator3", "translator3-last" ], "type": "string" }, "translator-first3": { "label": "Translator first name 3", "description": "Given or first name, middle names, or initials of the third translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator3-first" ], "type": "string" }, "translator-last4": { "label": "Translator last name 4", "description": "The surname of the fourth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator4", "translator4-last" ], "type": "string" }, "translator-first4": { "label": "Translator first name 4", "description": "Given or first name, middle names, or initials of the fourth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator4-first" ], "type": "string" }, "translator-last5": { "label": "Translator last name 5", "description": "The surname of the fifth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator5", "translator5-last" ], "type": "string" }, "translator-first5": { "label": "Translator first name 5", "description": "Given or first name, middle names, or initials of the fifth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator5-first" ], "type": "string" }, "translator-last6": { "label": "Translator last name 6", "description": "The surname of the sixth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator6", "translator6-last" ], "type": "string" }, "translator-first6": { "label": "Translator first name 6", "description": "Given or first name, middle names, or initials of the sixth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator6-first" ], "type": "string" }, "translator-last7": { "label": "Translator last name 7", "description": "The surname of the seventh translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator7", "translator7-last" ], "type": "string" }, "translator-first7": { "label": "Translator first name 7", "description": "Given or first name, middle names, or initials of the seventh translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator7-first" ], "type": "string" }, "translator-last8": { "label": "Translator last name 8", "description": "The surname of the eighth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator8", "translator8-last" ], "type": "string" }, "translator-first8": { "label": "Translator first name 8", "description": "Given or first name, middle names, or initials of the eighth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator8-first" ], "type": "string" }, "translator-last9": { "label": "Translator last name 9", "description": "The surname of the ninth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator9", "translator9-last" ], "type": "string" }, "translator-first9": { "label": "Translator first name 9", "description": "Given or first name, middle names, or initials of the ninth translator; don't wikilink, use 'translator-link'.", "aliases": [ "translator9-first" ], "type": "string" }, "translator-link2": { "label": "Translator link 2", "description": "Title of existing Wikipedia article about the second translator.", "type": "wiki-page-name", "aliases": [ "translator2-link" ] }, "translator-link3": { "label": "Translator link 3", "description": "Title of existing Wikipedia article about the third translator.", "type": "wiki-page-name", "aliases": [ "translator3-link" ] }, "translator-link4": { "label": "Translator link 4", "description": "Title of existing Wikipedia article about the fourth translator.", "type": "wiki-page-name", "aliases": [ "translator4-link" ] }, "translator-link5": { "label": "Translator link 5", "description": "Title of existing Wikipedia article about the fifth translator.", "type": "wiki-page-name", "aliases": [ "translator5-link" ] }, "translator-link6": { "label": "Translator link 6", "description": "Title of existing Wikipedia article about the sixth translator.", "type": "wiki-page-name", "aliases": [ "translator6-link" ] }, "translator-link7": { "label": "Translator link 7", "description": "Title of existing Wikipedia article about the seventh translator.", "type": "wiki-page-name", "aliases": [ "translator7-link" ] }, "translator-link8": { "label": "Translator link 8", "description": "Title of existing Wikipedia article about the eighth translator.", "type": "wiki-page-name", "aliases": [ "translator8-link" ] }, "translator-link9": { "label": "Translator link 9", "description": "Title of existing Wikipedia article about the ninth translator.", "type": "wiki-page-name", "aliases": [ "translator9-link" ] }, "vauthors": { "label": "Vancouver style author list", "description": "If using Vancouver style, comma separated list of author names; enclose corporate or institutional author names in doubled parentheses", "example": "Smythe JB, ((Megabux Corporation))", "type": "string" }, "issue": { "label": "Issue", "description": "Issue number. This parameter is not supported by and should generally not be used with cite book. Consider that a different cite template may be more appropriate, such as cite magazine or cite journal. See Help:Citation_Style_1#Pages.", "type": "string", "aliases": [ "number" ], "example": "3" }, "display-editors": { "label": "Display Editors", "description": "Controls the number of editor names that are displayed when a citation is published. To change the displayed number of editors, set display-editors to the desired number. For example, |display-editors=2 will display only the first two editors in a citation. By default, all editors are displayed. |display-editors=etal displays all editors in the list followed by et al.", "type": "string" }, "authors": { "label": "Authors list", "description": "List of authors as a free form list. This parameter is deprecated, use \"lastn\" or \"firstn\" (preferred) or \"authorn\" or \"vauthors\". Warning: do not use if last or any of its aliases are used.", "type": "string", "deprecated": true }, "veditors": { "label": "Vancouver style editor list", "description": "Comma separated list of editor names in Vancouver style; enclose corporate or institutional names in doubled parentheses", "example": "Smythe JB, ((Megabux Corporation))", "type": "string" }, "chapter-format": { "aliases": [ "contribution-format", "section-format" ], "label": "Format of Chapter URL", "type": "string", "description": "Format of the work referred to by chapter-url; displayed in parentheses after chapter. HTML is implied and should not be specified.", "example": "PDF, DOC, or XLS" }, "agency": { "label": "Agency", "description": "Unusual in cite book. Use if an agency is needed in addition to publisher, etc.", "type": "string" }, "title-link": { "label": "Title link", "description": "Title of existing Wikipedia article about the source named in title – do not use a web address; do not wikilink.", "type": "wiki-page-name" }, "collaboration": { "label": "Collaboration", "description": "Name of a group of authors or collaborators; requires author, last, or vauthors which list one or more primary authors; follows author name-list; appends 'et al.' to author name-list.", "type": "string" }, "script-chapter": { "label": "Script Chapter", "description": "Chapter heading for languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc); follows transliteration defined in chapter. Should be prefixed with an ISO 639-1 two-character code to help browsers properly display the script", "example": "ja:東京タワー", "type": "string" }, "department": { "label": "Department", "description": "Unusual in cite book." }, "hdl": { "aliases": [ "HDL" ], "label": "Handle System identifier", "description": "Handle System identifier for digital objects and other resources on the Internet", "type": "string" }, "archive-format": { "label": "Archive Format", "description": "Format of the Archive", "type": "string" }, "df": { "label": "Date format", "description": "Sets rendered dates to the specified format", "type": "string" } }, "maps": { "citoid": { "edition": "edition", "title": "title", "bookTitle": "title", "publicationTitle": "title", "url": "url", "publisher": "publisher", "date": "date", "place": "location", "ISSN": [ "issn" ], "ISBN": [ "isbn" ], "oclc": "oclc", "PMCID": "pmc", "PMID": "pmid", "pages": "pages", "volume": "volume", "series": "series", "DOI": "doi", "language": "language", "translator": [ [ "translator-first", "translator-last" ], [ "translator-first2", "translator-last2" ], [ "translator-first3", "translator-last3" ], [ "translator-first3", "translator-last3" ], [ "translator-first4", "translator-last4" ], [ "translator-first5", "translator-last5" ], [ "translator-first6", "translator-last6" ], [ "translator-first7", "translator-last7" ], [ "translator-first8", "translator-last8" ], [ "translator-first9", "translator-last9" ] ], "contributor": "others", "author": [ [ "first", "last" ], [ "first2", "last2" ], [ "first3", "last3" ], [ "first4", "last4" ], [ "first5", "last5" ], [ "first6", "last6" ], [ "first7", "last7" ], [ "first8", "last8" ], [ "first9", "last9" ] ], "editor": [ [ "editor-first", "editor-last" ], [ "editor-first2", "editor-last2" ], [ "editor-first3", "editor-last3" ], [ "editor-first4", "editor-last4" ], [ "editor-first5", "editor-last5" ], [ "editor-first6", "editor-last6" ], [ "editor-first7", "editor-last7" ], [ "editor-first8", "editor-last8" ], [ "editor-first9", "editor-last9" ] ] } }, "paramOrder": [ "last", "first", "url", "title", "title-link", "vauthors", "last2", "first2", "last3", "first3", "last4", "first4", "last5", "first5", "last6", "first6", "last7", "first7", "last8", "first8", "last9", "first9", "collaboration", "date", "work", "publisher", "others", "year", "isbn", "editor-last", "editor-first", "editor-link", "editor-mask", "veditors", "edition", "series", "volume", "location", "publication-place", "publication-date", "page", "pages", "at", "language", "translator-last", "translator-first", "script-title", "trans-title", "chapter", "script-chapter", "trans-chapter", "type", "format", "asin", "asin-tld", "bibcode", "biorxiv", "citeseerx", "doi", "eissn", "hdl", "ismn", "issn", "jfm", "jstor", "lccn", "mr", "oclc", "ol", "osti", "pmc", "pmid", "rfc", "ssrn", "zbl", "id", "quote", "ref", "mode", "postscript", "author-mask", "author-mask2", "author-mask3", "author-mask4", "author-mask5", "author-mask6", "author-mask7", "author-mask8", "author-mask9", "display-authors", "author-link", "author-link2", "author-link3", "author-link4", "author-link5", "author-link6", "author-link7", "author-link8", "author-link9", "access-date", "orig-date", "editor-last2", "editor-first2", "editor-link2", "editor-mask2", "editor-last3", "editor-first3", "editor-link3", "editor-mask3", "editor-last4", "editor-first4", "editor-link4", "editor-mask4", "editor-last5", "editor-first5", "editor-link5", "editor-mask5", "editor-last6", "editor-first6", "editor-link6", "editor-mask6", "editor-last7", "editor-first7", "editor-link7", "editor-mask7", "editor-last8", "editor-first8", "editor-link8", "editor-mask8", "editor-last9", "editor-first9", "editor-link9", "editor-mask9", "display-editors", "translator-last2", "translator-first2", "translator-last3", "translator-first3", "translator-last4", "translator-first4", "translator-last5", "translator-first5", "translator-last6", "translator-first6", "translator-last7", "translator-first7", "translator-last8", "translator-first8", "translator-last9", "translator-first9", "translator-link", "translator-link2", "translator-link3", "translator-link4", "translator-link5", "translator-link6", "translator-link7", "translator-link8", "translator-link9", "chapter-url", "chapter-format", "doi-broken-date", "url-access", "archive-url", "archive-format", "archive-date", "url-status", "name-list-style", "via", "bibcode-access", "doi-access", "hdl-access", "jstor-access", "ol-access", "osti-access", "issue", "authors", "agency", "department", "df" ], "format": "{{_ |_=_}}" } </templatedata> emuofzusopamvuexen90uknnhtxlsuk Templat:Cite encyclopedia 10 30 57 56 2024-08-09T09:19:33Z Jon Harald Søby 58 1 semakan diimportkan 56 wikitext text/x-wiki <includeonly>{{#invoke:citation/CS1|citation |CitationClass=encyclopaedia }}</includeonly><noinclude> {{Documentation}} [[Kategori:Lua-based templates]] </noinclude> h8p2opy7m4j8l4rdauhig8mlteo94ho Templat:Cite magazine 10 31 59 58 2024-08-09T09:19:33Z Jon Harald Søby 58 1 semakan diimportkan 58 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=magazine }}</includeonly><noinclude> {{Documentation}} </noinclude> d4mdw24ejdhjb9tepy60ykvhqhz44nq Templat:Cite news 10 32 647 62 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 60 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=news }}</includeonly><noinclude> {{documentation}} </noinclude> d862zpl5j404zy49a2snqjxf9fm3v00 Templat:Cite news/doc 10 33 64 63 2024-08-09T09:19:33Z Jon Harald Søby 58 1 semakan diimportkan 63 wikitext text/x-wiki <noinclude>{{pp-template}}</noinclude> {{Documentation subpage}} {{High-risk|1020075+}} {{csdoc|lua}} {{csdoc|cs1}} {{csdoc|lead|news articles in print, video, audio or web}} ==Usage== {{csdoc|usage}} {{csdoc|usage common}} ;To cite a news article with a credited author <syntaxhighlight lang="wikitext" inline>{{cite news |last= |first= |date= |title= |url= |work= |location= |access-date=}}</syntaxhighlight> <br /> ;To cite a news article with no credited author <syntaxhighlight lang="wikitext" inline>{{cite news |author=<!--not stated--> |date= |title= |url= |work= |location= |access-date=}}</syntaxhighlight> <br /> ;To cite an online news article that has been archived <syntaxhighlight lang="wikitext" inline>{{cite news |last= |first= |date= |title= |url= |url-status= |work= |location= |archive-url= |archive-date= |access-date=}}</syntaxhighlight> <br /> ;To cite a news article written in a foreign language <syntaxhighlight lang="wikitext" inline>{{cite news |last= |first= |date= |title= |trans-title= |url= |language= |work= |location= |access-date=}}</syntaxhighlight> ;To cite and quote an archived news article clipped with an information aggregation service requiring a subscription <syntaxhighlight lang="wikitext" inline>{{cite news |last1= |first1= |last2= |first2= |date= |title= |trans-title= |url= |url-status= |language= |work= |location= |archive-url= |archive-date= |access-date= |via= |quote=}}</syntaxhighlight> {{end}} {{csdoc|usage full}} :<syntaxhighlight lang="wikitext" inline>{{cite news |last1= |first1= |author-link1= |last2= |first2= |author-link2= |last3= |first3= |author-link3= |last4= |first4= |author-link4= |last5= |first5= |author-link5= |display-authors= |author-mask= |name-list-style= |date= |year= |orig-date= |title= |script-title= |trans-title= |url= |url-status= |format= |editor1-last= |editor1-first= |editor1-link= |editor2-last= |editor2-first= |editor2-link= |editor3-last= |editor3-first= |editor3-link= |editor4-last= |editor4-first= |editor4-link= |editor5-last= |editor5-first= |editor5-link= |display-editors= |department= |work= |type= |series= |language= |volume= |issue= |others= |edition= |location= |publisher= |publication-date= |agency= |page= |pages= |at= |no-pp= |arxiv= |asin= |bibcode= |doi= |doi-broken-date= |isbn= |issn= |jfm= |jstor= |lccn= |mr= |oclc= |ol= |osti= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |archive-url= |archive-date= |access-date= |via= |url-access= |quote= |postscript= |ref=}}</syntaxhighlight> {{end}} {{csdoc|usage vertical common}} ;To cite a news article with a credited author <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | last = | first = | date = | title = | url = | work = | location = | access-date = }} </syntaxhighlight> ;To cite a news article with no credited author <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | author =<!--not stated--> | title = | url = | work = | location = | date = | access-date = }} </syntaxhighlight> ;To cite an online news article that has been archived <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | last = | first = | date = | title = | url = | url-status = | work = | location = | archive-url = | archive-date = | access-date = }} </syntaxhighlight> ;To cite a news article written in a foreign language <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | last = | first = | date = | title = | trans-title = | url = | language = | work = | location = | access-date = }} </syntaxhighlight> ;To cite and quote a clipped and archived news article on an information aggregation service requiring a subscription <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | last1 = | first1 = | last2 = | first2 = | date = | title = | trans-title = | url = | url-status = | format = | language = | work = | location = | archive-url = | archive-date = | access-date = | via = | url-access = | quote = }} </syntaxhighlight> {{end}} {{csdoc|usage vertical}} <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> {{cite news | last1 = | first1 = | author-link1 = | last2 = | first2 = | author-link2 = | last3 = | first3 = | author-link3 = | last4 = | first4 = | author-link4 = | last5 = | first5 = | author-link5 = | display-authors = | author-mask = | name-list-style = | date = | year = | orig-date = | title = | script-title = | trans-title = | url = | url-status = | format = | editor1-last = | editor1-first = | editor1-link = | editor2-last = | editor2-first = | editor2-link = | editor3-last = | editor3-first = | editor3-link = | editor4-last = | editor4-first = | editor4-link = | editor5-last = | editor5-first = | editor5-link = | display-editors = | department = | work = | type = | series = | language = | volume = | issue = | others = | edition = | location = | publisher = | publication-date = | agency = | page = | pages = | at = | no-pp = | arxiv = | asin = | bibcode = | doi = | doi-broken-date = | isbn = | issn = | jfm = | jstor = | lccn = | mr = | oclc = | ol = | osti = | pmc = | pmid = | rfc = | ssrn = | zbl = | id = | archive-url = | archive-date = | access-date = | via = | quote = | postscript = | ref = }} </syntaxhighlight> {{csdoc|usage vertical mid}} <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </syntaxhighlight> {{csdoc|usage vertical mid}} <syntaxhighlight lang="wikitext" style="margin:0px; border:none;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </syntaxhighlight> {{csdoc|usage vertical end}} ===Choosing between {{tlf|Cite web}} and {{tlf|Cite news}}=== {{anchor|Consistency}} Before 2014, editors needed to decide whether to use {{tl|Cite web}} or {{tlf|Cite news}} based on their features. In 2014, however, ''most of'' the differences between the two templates were eliminated. As of {{diff|Module:Citation/CS1|732205428|723907342|29 July 2016}}, {{tlf|Cite web}} and {{tlf|Cite news}} have the following differences: *{{tlf|Cite news}} can be used for [[WP:OFFLINE|offline]] (paper) sources whereas {{tlf|Cite web}} generates a missing URL error when no URL is provided *{{tlf|Cite news}} accepts {{para|issue}} and {{para|volume}} parameters while {{tlf|Cite web}} does not (See {{section link|1=Help talk:Citation Style 1/Archive 10|2=&#x7C;volume=, &#x7C;issue=, &#x7C;page(s)= and cite magazine}}.) But given the same set of valid parameters, their output is exactly the same: <!-- ATTENTION! The following example only serves to demonstrate parameter rending results. Whether you must include all these parameters in actual articles is not a concern here. --> {| | '''Cite web''': || {{cite web |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015|ref=none}} |- | '''Cite news''': || {{cite news |url=http://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle|publisher=Hearst Corporation |access-date=May 26, 2015|ref=none}} |} ==Examples== ; A news article with a credited author : <code><nowiki>{{cite news |last=Wolford |first=Ben |date=2013-10-16 |title=Citrus Canker Lawsuit Headed Back to Trial |url=http://www.sun-sentinel.com/news/palm-beach/fl-citrus-canker-ruling-20131016,0,7602285.story |work=South Florida Sun-Sentinel |access-date=2013-10-17|ref=none}}</nowiki></code> : Displays as: * {{cite news |last=Wolford |first=Ben |date=2013-10-16 |title=Citrus Canker Lawsuit Headed Back to Trial |url=http://www.sun-sentinel.com/news/palm-beach/fl-citrus-canker-ruling-20131016,0,7602285.story |work=South Florida Sun-Sentinel |access-date=2013-10-17|ref=none}} ; A news article released by a news agency and having no credited author : <code><nowiki>{{cite news |author=<!--not stated--> |title=Bellingham Police Arrest WWU Student in Melee |url=http://blogs.seattletimes.com/today/2013/10/bellingham-police-arrest-wwu-student-in-melee/ |work=The Seattle Times |agency=Associated Press |date=2013-10-17 |access-date=2013-10-17|ref=none}}</nowiki></code> : Displays as: * {{cite news |author=<!--not stated--> |title=Bellingham Police Arrest WWU Student in Melee |url=http://blogs.seattletimes.com/today/2013/10/bellingham-police-arrest-wwu-student-in-melee/ |work=The Seattle Times |agency=Associated Press |date=2013-10-17 |access-date=2013-10-17|ref=none}} ; A news article that has been archived : <code><nowiki>{{cite news |last=Pank |first=Philip |date=2013-10-18 |title=Families Accuse Network Rail of Cover-Up |url=http://www.thetimes.co.uk/tto/business/industries/transport/article3897709.ece |url-status=dead |work=The Times |location=London |archive-url=https://www.webcitation.org/6KS5scqfE |archive-date=2013-10-18 |access-date=2013-10-18|ref=none}}</nowiki></code> : Displays as: * {{cite news |last=Pank |first=Philip |date=2013-10-18 |title=Families Accuse Network Rail of Cover-Up |url=http://www.thetimes.co.uk/tto/business/industries/transport/article3897709.ece |url-status=dead |work=The Times |location=London |archive-url=https://www.webcitation.org/6KS5scqfE |archive-date=2013-10-18 |access-date=2013-10-18|ref=none}} ; A news article written in a foreign language : <code><nowiki>{{cite news |last=Bourmaud |first=François-Xavier |date=2013-10-17 |title=Hollande dans le bourbier de l'affaire Leonarda |trans-title=Hollande in the quagmire of the Leonarda case |url=http://www.lefigaro.fr/politique/2013/10/17/01002-20131017ARTFIG00575-hollande-dans-le-bourbier-de-l-affaire-leonarda.php |language=French |work=Le Figaro |location=Paris |access-date=2013-10-17|ref=none}}</nowiki></code> : Displays as: * {{cite news |last=Bourmaud |first=François-Xavier |date=2013-10-17 |title=Hollande dans le Bourbier de L'affaire Leonarda |trans-title=Holland in the Quagmire of the Leonarda Case |url=http://www.lefigaro.fr/politique/2013/10/17/01002-20131017ARTFIG00575-hollande-dans-le-bourbier-de-l-affaire-leonarda.php |language=French |work=Le Figaro |location=Paris |access-date=2013-10-17|ref=none}} ; A clipped and archived news article that you quote, found on an information aggregation service requiring a subscription : <code><nowiki>{{cite news |url=https://www.newspapers.com/clip/30201172/daily_news/ |title=Czechs honor Yuri |date=30 April 1961 |newspaper=Daily News|access-date=2 April 2019|archive-url=https://web.archive.org/web/20190402233429/https://www.newspapers.com/clip/30201172/daily_news/|archive-date=2 April 2019|url-status=live |agency=Reuters |location=New York |page=35 |via=Newspapers.com |quote=Czech President [[Antonin Novotny]] today made visiting Soviet spaceman Yuri Gagarin a 'Hero of Socialist Labor'.|ref=none}}</nowiki></code> : Displays as: * {{cite news |url=https://www.newspapers.com/clip/30201172/daily_news/ |title=Czechs honor Yuri |date=30 April 1961 |newspaper=Daily News|access-date=2 April 2019|archive-url=https://web.archive.org/web/20190402233429/https://www.newspapers.com/clip/30201172/daily_news/|archive-date=2 April 2019|url-status=live |agency=Reuters |location=New York |page=35 |via=Newspapers.com |quote=Czech President [[Antonin Novotny]] today made visiting Soviet spaceman Yuri Gagarin a 'Hero of Socialist Labor'.|ref=none}} ==Parameters== ===Syntax=== {{csdoc|syntax}} {{csdoc|sep_period}} ===COinS=== {{csdoc|coins}} ===What's new=== {{csdoc|whats new}} ===Deprecated=== {{csdoc|deprecated}} ===Description=== ====Authors==== {{csdoc|author|others=yes}} ====Title==== {{csdoc|title|title_format=work}} {{csdoc|language}} ====Periodical (work, newspaper, website)==== {{csdoc|journal|department=yes}} ====Publisher==== {{csdoc|publisher}} {{csdoc|agency}} ====Date==== {{csdoc|date}} ====Edition, volume==== {{csdoc|edition}} {{csdoc|volume}} ====In-source locations==== {{csdoc|pages}} ===={{Anchor|url}}URL==== {{csdoc|url}} ====Anchor==== {{distinguish|#Identifiers}} {{csdoc|ref}} ====Identifiers==== {{distinguish|#Anchor}} {{csdoc|id1}} {{csdoc|id2}} ====Quote==== {{csdoc|quote}} ====Editors==== {{csdoc|editor}} ====Lay summary==== {{csdoc|lay}} ====Display options==== {{csdoc|display}} ====Subscription or registration required==== {{csdoc|registration}} ==TemplateData== {{TemplateData header}} {{#invoke:Cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}} <templatedata> { "description": "This template formats a citation to a news article in print, video, audio or web using the provided source information (e.g. author, publication, date) and various formatting options.", "params": { "url": { "label": "URL", "description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the&nbsp;protocol relative scheme \"//...\"", "type": "url", "suggested": true, "aliases": [ "URL" ], "example": "https://www.nytimes.com/..." }, "title": { "label": "Source title", "description": "The title of the article as it appears in the source; displays in quotes", "type": "string", "required": true }, "last": { "label": "Last name", "description": "The surname of the author; don't wikilink, use 'author-link'.", "aliases": [ "last1", "author", "author1", "authors" ], "suggested": true, "type": "line" }, "first": { "label": "First name", "description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'author-link'.", "aliases": [ "first1" ], "suggested": true, "type": "line" }, "date": { "label": "Source date", "description": "Full date of the source; do not wikilink", "type": "date", "suggested": true }, "publisher": { "label": "Publisher", "description": "Name of the parent institution or company that publishes the newspaper, magazine, or periodical; displays after name of the publication", "type": "string", "aliases": [ "institution" ], "example": "[[Gannett]]" }, "last2": { "label": "Last name 2", "description": "The surname of the second author; don't wikilink, use 'author-link2'.", "aliases": [ "author2" ] }, "first2": { "label": "First name 2", "description": "Given or first name, middle names, or initials of the second author; don't wikilink." }, "others": { "label": "Others", "description": "Used to record other contributions to the work, such as 'Illustrated by John Smith' or 'Translated by John Smith'", "type": "string" }, "year": { "label": "Year of publication", "description": "Year of the source being referenced; use 'date' instead, if month and day are also known", "type": "string" }, "editor-last": { "label": "Editor last name", "description": "The surname of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-last', 'editor', and 'editors'", "aliases": [ "editor-last1", "editor1-last", "editor-surname", "editor-surname1", "editor1-surname", "editor", "editor1" ] }, "editor-first": { "label": "Editor first name", "description": "Given or first name, middle names, or initials of the editor; don't wikilink, use 'editor-link'; can suffix with a numeral to add additional editors; alias of 'editor1-first'", "aliases": [ "editor-first1", "editor1-first", "editor-given", "editor-given1", "editor1-given" ] }, "editor-link": { "label": "Editor link", "description": "Title of existing Wikipedia article about the editor; can suffix with a numeral to add additional editors; alias of 'editor1-link'", "type": "wiki-page-name", "aliases": [ "editor-link1" ] }, "issue": { "label": "Issue", "description": "Issue identifier when the source is part of a series that is published periodically. Usually a number. Do not prepend with no. ", "type": "line", "aliases": [ "number" ], "example": "4" }, "department": { "label": "Department", "description": "Department within the periodical", "type": "string" }, "location": { "label": "Location of publication", "description": "Geographical place of publication; usually not wikilinked; omit when the publication name includes place; alias of 'place'", "type": "string", "aliases": [ "place" ] }, "publication-place": { "label": "Place of publication", "description": "Publication place shows after title; if 'place' or 'location' are also given, they are displayed before the title prefixed with 'written at'", "type": "string" }, "publication-date": { "label": "Publication date", "description": "Date of publication when different from the date the work was written; do not wikilink", "type": "date", "autovalue": "" }, "agency": { "label": "Agency", "description": "The news agency (wire service) that provided the content; examples: Associated Press, Reuters, Agence France-Presse", "type": "string" }, "edition": { "label": "Edition", "description": "When the publication has more than one edition; for example: '2nd', 'Revised' etc.; suffixed with ' ed.'", "type": "string" }, "volume": { "label": "Volume", "description": "For one publication published in several volumes. Usually a number. Do not prepend with vol. or v. ", "type": "string", "example": "3" }, "page": { "label": "Page", "description": "Page in the source that supports the content; displays after 'p.'", "type": "string" }, "pages": { "label": "Pages", "description": "Pages in the source that support the content (not an indication of the number of pages in the source); displays after 'pp.'", "type": "string", "example": "2–3", "suggested": true }, "no-pp": { "label": "No pp", "description": "Set to 'y' to suppress the 'p.' or 'pp.' display with 'page' or 'pages' when inappropriate (such as 'Front cover')", "type": "boolean", "autovalue": "y" }, "at": { "label": "At", "description": "May be used instead of 'page' or 'pages' where a page number is inappropriate or insufficient", "type": "string" }, "language": { "label": "Language", "description": "The language in which the source is written, if not English; use a two-letter language code or the full language name. Do not use icons or templates", "type": "string" }, "script-title": { "label": "Script title", "description": "For titles in languages that do not use a Latin-based alphabet (Arabic, Chinese, Cyrillic, Greek, Hebrew, Japanese, Korean, Vietnamese, etc). Prefix with two-character ISO639-1 language code followed by a colon. For Japanese use: |script-title=ja:...", "type": "string" }, "trans-title": { "label": "Translated title", "description": "An English language title, if the source cited is in a foreign language; 'language' is recommended", "type": "string" }, "type": { "label": "Type", "description": "Additional information about the media type of the source; format in sentence case", "type": "string" }, "format": { "label": "Format", "description": "Format of the work referred to by 'url'; examples: PDF, DOC, XLS; do not specify HTML", "type": "string" }, "arxiv": { "label": "arXiv identifier", "description": "An identifier for arXive electronic preprints of scientific papers", "type": "string" }, "asin": { "label": "ASIN", "description": "Amazon Standard Identification Number; 10 characters", "type": "string" }, "asin-tld": { "label": "ASIN TLD", "description": "ASIN top-level domain for Amazon sites other than the US", "type": "string" }, "bibcode": { "label": "Bibcode", "description": "Bibliographic Reference Code (REFCODE); 19 characters", "type": "string" }, "doi": { "label": "DOI", "description": "Digital Object Identifier; begins with '10.'", "type": "string" }, "doi-broken-date": { "label": "DOI broken date", "description": "The date that the DOI was determined to be broken", "type": "date" }, "isbn": { "label": "ISBN", "description": "International Standard Book Number; use the 13-digit ISBN where possible", "type": "string", "aliases": [ "ISBN" ] }, "issn": { "label": "ISSN", "description": "International Standard Serial Number; 8 characters; may be split into two groups of four using a hyphen", "type": "string", "aliases": [ "ISSN" ] }, "jfm": { "label": "jfm code", "description": "Jahrbuch über die Fortschritte der Mathematik classification code", "type": "string" }, "jstor": { "label": "JSTOR", "description": "JSTOR identifier", "type": "string" }, "lccn": { "label": "LCCN", "description": "Library of Congress Control Number", "type": "string" }, "mr": { "label": "MR", "description": "Mathematical Reviews identifier", "type": "string" }, "oclc": { "label": "OCLC", "description": "Online Computer Library Center number", "type": "string" }, "ol": { "label": "OL", "description": "Open Library identifier", "type": "string" }, "osti": { "label": "OSTI", "description": "Office of Scientific and Technical Information identifier", "type": "string" }, "pmc": { "label": "PMC", "description": "PubMed Center article number", "type": "string" }, "pmid": { "label": "PMID", "description": "PubMed Unique Identifier", "type": "string" }, "rfc": { "label": "RFC", "description": "Request for Comments number", "type": "string" }, "ssrn": { "label": "SSRN", "description": "Social Science Research Network", "type": "string" }, "zbl": { "label": "Zbl", "description": "Zentralblatt MATH journal identifier", "type": "string" }, "id": { "label": "id", "description": "A unique identifier used where none of the specialized ones are applicable", "type": "string" }, "quote": { "label": "Quote", "description": "Relevant text quoted from the source; displays last, enclosed in quotes; needs to include terminating punctuation", "type": "string" }, "ref": { "label": "Ref", "description": "An anchor identifier; can be made the target of wikilinks to full references; special value 'harv' generates an anchor suitable for the harv and sfn templates", "type": "string" }, "postscript": { "label": "Postscript", "description": "The closing punctuation for the citation; ignored if 'quote' is defined; to suppress use reserved keyword 'none'", "type": "string", "default": "." }, "last3": { "label": "Last name 3", "description": "The surname of the third author; don't wikilink, use 'author-link3'.", "aliases": [ "author3" ] }, "first3": { "label": "First name 3", "description": "Given or first name, middle names, or initials of the third author; don't wikilink." }, "last4": { "label": "Last name 4", "description": "The surname of the fourth author; don't wikilink, use 'author-link4'.", "aliases": [ "author4" ] }, "first4": { "label": "First name 4", "description": "Given or first name, middle names, or initials of the fourth author; don't wikilink." }, "last5": { "label": "Last name 5", "description": "The surname of the fifth author; don't wikilink, use 'author-link5'.", "aliases": [ "author5" ] }, "first5": { "label": "First name 5", "description": "Given or first name, middle names, or initials of the fifth author; don't wikilink." }, "last6": { "label": "Last name 6", "description": "The surname of the sixth author; don't wikilink, use 'author-link6'.", "aliases": [ "author6" ] }, "first6": { "label": "First name 6", "description": "Given or first name, middle names, or initials of the sixth author; don't wikilink." }, "last7": { "label": "Last name 7", "description": "The surname of the seventh author; don't wikilink, use 'author-link7'.", "aliases": [ "author7" ] }, "first7": { "label": "First name 7", "description": "Given or first name, middle names, or initials of the seventh author; don't wikilink." }, "last8": { "label": "Last name 8", "description": "The surname of the eighth author; don't wikilink, use 'author-link8'.", "aliases": [ "author8" ] }, "first8": { "label": "First name 8", "description": "Given or first name, middle names, or initials of the eighth author; don't wikilink." }, "last9": { "label": "Last name 9", "description": "The surname of the ninth author; don't wikilink, use 'author-link9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.", "aliases": [ "author9" ] }, "first9": { "label": "First name 9", "description": "Given or first name, middle names, or initials of the ninth author; don't wikilink." }, "author-mask": { "label": "Author mask", "description": "Replaces the name of the first author with em dashes or text; set to a numeric value 'n' to set the dash 'n' em spaces wide; set to a text value to display the text without a trailing author separator; for example, 'with' instead", "type": "string" }, "display-authors": { "label": "Display authors", "description": "number of authors to display before 'et al.' is used;", "type": "number" }, "author-link": { "label": "Author link", "description": "Title of existing Wikipedia article about the author; can suffix with a numeral to add additional authors", "type": "wiki-page-name", "aliases": [ "author-link1", "author1-link" ] }, "author-link2": { "label": "Author link 2", "description": "Title of existing Wikipedia article about the second author. (Up to nine authors can be listed, 3-9 are toward the end of the parameter list)", "type": "wiki-page-name", "aliases": [ "author2-link" ] }, "archive-url": { "label": "Archive URL", "description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'", "type": "string", "suggested": true, "aliases": [ "archiveurl" ] }, "archive-date": { "label": "Archive date", "description": "Date when the original URL was archived; do not wikilink", "type": "string", "suggested": true, "aliases": [ "archivedate" ] }, "author-link3": { "label": "Author link 3", "description": "Title of existing Wikipedia article about the third author.", "type": "wiki-page-name", "aliases": [ "author3-link" ] }, "author-link4": { "label": "Author link 4", "description": "Title of existing Wikipedia article about the fourth author.", "type": "wiki-page-name", "aliases": [ "author4-link" ] }, "author-link5": { "label": "Author link 5", "description": "Title of existing Wikipedia article about the fifth author.", "type": "wiki-page-name", "aliases": [ "author5-link" ] }, "author-link6": { "label": "Author link 6", "description": "Title of existing Wikipedia article about the sixth author.", "type": "wiki-page-name", "aliases": [ "author6-link" ] }, "author-link7": { "label": "Author link 7", "description": "Title of existing Wikipedia article about the seventh author.", "type": "wiki-page-name", "aliases": [ "author7-link" ] }, "author-link8": { "label": "Author link 8", "description": "Title of existing Wikipedia article about the eighth author.", "type": "wiki-page-name", "aliases": [ "author8-link" ] }, "author-link9": { "label": "Author link 9", "description": "Title of existing Wikipedia article about the ninth author.", "type": "wiki-page-name", "aliases": [ "author9-link" ] }, "name-list-style": { "label": "Name list style", "description": "Set to 'amp' or 'and' to change the separator between the last two names of the name list to ' & ' or ' and ', respectively. Set to 'vanc' to display name lists in Vancouver style.", "type": "string" }, "access-date": { "label": "URL access date", "description": "The full date when the original URL was accessed; do not wikilink", "type": "date", "suggested": true, "aliases": [ "accessdate" ] }, "orig-date": { "label": "Original date", "description": "Original date of publication; provide specifics", "type": "string" }, "via": { "label": "via", "description": "Identify the aggregator of the resource that provided the digital version (usually a database provider), when it differs from the publisher (e.g., for The Wikipedia Library)", "example": "[[EBSCOHost]], [[Proquest]], [[Newspapers.com]]", "type": "string" }, "url-access": { "label": "URL access level", "description": "Classification of the access restrictions on the URL ('registration', 'subscription' or 'limited')", "type": "string", "suggestedvalues": [ "registration", "subscription", "limited" ] }, "bibcode-access": { "label": "Bibcode access level", "description": "If the full text is available from ADS via this Bibcode, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "doi-access": { "label": "DOI access level", "description": "If the full text is free to read via the DOI, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "hdl-access": { "label": "HDL access level", "description": "If the full text is free to read via the HDL, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "jstor-access": { "label": "Jstor access level", "description": "If the full text is free to read on Jstor, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "ol-access": { "label": "OpenLibrary access level", "description": "If the full text is free to read on OpenLibrary, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "osti-access": { "label": "OSTI access level", "description": "If the full text is free to read on OSTI, type 'free'.", "type": "string", "suggestedvalues": [ "free" ] }, "url-status": { "label": "URL status", "description": "If set to 'live', the title display is adjusted; useful for when the URL is archived preemptively but still live. Set to 'dead' if the original URL is broken. If the original URL is 'live' but no longer supports the article text, set to 'deviated'. Set to 'unfit' or 'usurped' if the original URL is no longer suitable (spam, advertising, etc.) which will make the original link not appear at all.", "example": "'dead' or 'live'", "default": "'dead' if an Archive URL is entered", "type": "string", "suggested": true, "suggestedvalues": [ "dead", "live", "usurped", "unfit", "deviated" ] }, "work": { "aliases": [ "journal", "magazine", "periodical", "newspaper", "website" ], "label": "Name of publication", "description": "Name of the newspaper, magazine or periodical; displays after title", "example": "[[The Wall Street Journal]]", "type": "string", "suggested": true } }, "maps": { "proveit": { "main": "title", "textarea": [ "quote" ] }, "citoid": { "title": "title", "url": "url", "publisher": "publisher", "publicationTitle": "work", "date": "date", "accessDate": "access-date", "location": "location", "ISSN": [ "issn" ], "ISBN": [ "isbn" ], "PMCID": "pmc", "PMID": "pmid", "pages": "pages", "volume": "volume", "issue": "issue", "DOI": "doi", "oclc": "oclc", "language": "language", "contributor": "others", "author": [ [ "first", "last" ], [ "first2", "last2" ], [ "first3", "last3" ], [ "first4", "last4" ], [ "first5", "last5" ], [ "first6", "last6" ], [ "first7", "last7" ], [ "first8", "last8" ], [ "first9", "last9" ] ], "editor": [ [ "editor-first", "editor-last" ] ] } }, "format": "{{_ |_=_}}", "paramOrder": [ "last", "first", "author-link", "last2", "first2", "author-link2", "last3", "first3", "author-link3", "last4", "first4", "author-link4", "last5", "first5", "author-link5", "last6", "first6", "author-link6", "last7", "first7", "author-link7", "last8", "first8", "author-link8", "last9", "first9", "author-link9", "display-authors", "author-mask", "name-list-style", "others", "date", "year", "orig-date", "title", "script-title", "language", "trans-title", "edition", "volume", "page", "pages", "no-pp", "at", "work", "publisher", "agency", "issue", "department", "location", "publication-place", "publication-date", "editor-last", "editor-first", "editor-link", "type", "format", "url", "url-status", "url-access", "access-date", "archive-url", "archive-date", "arxiv", "asin", "asin-tld", "bibcode", "doi", "doi-broken-date", "isbn", "issn", "jfm", "jstor", "lccn", "mr", "oclc", "ol", "osti", "pmc", "pmid", "rfc", "ssrn", "zbl", "id", "quote", "ref", "postscript", "via", "bibcode-access", "doi-access", "hdl-access", "jstor-access", "ol-access", "osti-access" ] } </templatedata> ==See also== {{Citation Style 1}} {{Wikipedia referencing}} {{UF-COinS}} <includeonly>{{Sandbox other|| [[Kategori:Citation Style 1 templates]] }}</includeonly> 2tjt4yhwnfkpu8pb929cfvbcj80v03v Templat:Cite newspaper 10 34 66 65 2024-08-09T09:19:33Z Jon Harald Søby 58 1 semakan diimportkan 65 wikitext text/x-wiki #Redirect [[Templat:Cite news]] 1ei16s25b82ek3p1pwhzawdxppty3ic Templat:Cite press release 10 35 68 67 2024-08-09T09:19:33Z Jon Harald Søby 58 1 semakan diimportkan 67 wikitext text/x-wiki <includeonly>{{#invoke:Citation/CS1|citation |CitationClass=pressrelease |type={{{type|Press release}}} }}</includeonly><noinclude> {{Documentation}} </noinclude> 0m5jj6lom6gejhyugd6jzfpnvc1504s Templat:Cite web 10 36 649 72 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 71 wikitext text/x-wiki <includeonly>{{ #if: {{#if: {{{url|}}} | {{#if: {{{title|}}} |1}}}} ||Error on call to [[Templat:Cite web]]: Parameters '''url''' and '''title''' must be specified }}{{ #if: {{{archiveurl|}}}{{{archivedate|}}} | {{#if: {{#if: {{{archiveurl|}}}| {{#if: {{{archivedate|}}} |1}}}} ||Error on call to [[Templat:cite web]]: Parameters '''archiveurl''' and '''archivedate''' must be both specified or both omitted }} }}{{#if: {{{author|}}}{{{last|}}} | {{#if: {{{authorlink|}}} | [[{{{authorlink}}}|{{#if: {{{last|}}} | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }} | {{{author}}} }}]] | {{#if: {{{last|}}} | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }} | {{{author}}} }} }} }}{{#if: {{{author|}}}{{{last|}}} | {{#if: {{{coauthors|}}}| <nowiki>;</nowiki>&#32;{{{coauthors}}} }} }}{{#if: {{{author|}}}{{{last|}}}| {{#if: {{{date|}}} | &#32;({{#formatdate:{{{date}}}}}) | {{#if: {{{year|}}} | {{#if: {{{month|}}} | &#32;({{{month}}} {{{year}}}) | &#32;({{{year}}}) }} }} |}} }}{{#if: {{{last|}}}{{{author|}}} | .&#32;}}{{#if: {{{archiveurl|}}} | {{#if: {{{archiveurl|}}} | {{#if: {{{title|}}} | [{{{archiveurl}}} {{{title}}}] }}}} | {{#if: {{{url|}}} | {{#if: {{{title|}}} | [{{{url}}} {{{title}}}] }}}} }}{{#if: {{{doi|}}} | . [[:d:Special:GoToLinkedPage/enwiki/Q25670|DOI]]:[https://doi.org/{{urlencode:{{{doi}}}}} {{#tag:nowiki|{{{doi}}}}}] }}{{#if: {{{language|}}} | &#32;(in {{{language}}}) }}{{#if: {{{format|}}} | &#32;({{{format|}}}) }}{{#if: {{{work|}}} | .&#32;''{{{work}}}'' }}{{#if: {{{pages|}}} | &#32;{{{pages}}} }}{{#if: {{{publisher|{{{website|}}}}}} | .&#32;{{{publisher|{{{website}}}}}}{{#if: {{{author|}}}{{{last|}}} | | {{#if: {{{date|}}}{{{year|}}}{{{month|}}} || }} }} }}{{#if: {{{author|}}}{{{last|}}} ||{{#if: {{{date|}}} | &#32;({{#if:{{{year|}}}{{{month|}}}|{{{date}}}|{{#formatdate:{{{date}}}}}}}) | {{#if: {{{year|}}} | {{#if: {{{month|}}} | &#32;({{{month}}} {{{year}}}) | &#32;({{{year}}}) }} }} }} }}.{{#if: {{{archivedate|}}} | &#32;Archived from [{{{url}}} the original] on {{#formatdate:{{{archivedate}}}}}. }}{{#if: {{{accessdate|}}} | &#32;Retrieved on {{{accessdate}}}{{#if: {{{accessyear|}}} | , {{{accessyear}}} }}. }}{{#if: {{{accessmonthday|}}} | &#32;Retrieved on {{{accessmonthday}}}, {{{accessyear}}}. }}</includeonly><noinclude> {{Cite web/doc}} </noinclude> s5hgbn4zwkgul2o01googe70czl0jjf Templat:Cite web/doc 10 37 74 73 2024-08-09T09:19:34Z Jon Harald Søby 58 1 semakan diimportkan 73 wikitext text/x-wiki {{Documentation subpage}}<includeonly>:''This template documentation is [[w:Wikipedia:Template doc page pattern|transcluded]] from [[{{FULLPAGENAME}}/doc]]'' [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]</span>]</includeonly> <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> This template is used to [[w:WP:CITE|cite sources]] in Wikiquote. It is specifically for web sites which are not news sources. This template replaces deprecated [[w:template:web reference]]. It provides lower case parameters only. == Usage == ;Vertical format <pre> {{cite web | url = | title = | author = | authorlink = | last = | first = | coauthors = | date = | year = | month = | language = | format = | work = | pages = | publisher = | archiveurl = | archivedate = | accessdate = | accessmonthday = | accessyear = }} </pre> ;Horizontal format <pre style="overflow:auto;"> {{cite web |url= |title= |author= |authorlink= |last= |first= |coauthors= |date= |year= |month= |language= |format= |work= |pages= |publisher= |archiveurl= |archivedate= |accessdate= |accessmonthday= |accessyear= }} </pre> === Required parameters === * '''url''': URL of online item. * '''title''': Title of online item. * One of the two date format parameters: ** '''accessdate''': Full date when item was accessed, in [[w:ISO 8601|ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17''. Must not be wikilinked; it will be linked automatically. ** '''accessmonthday''' and '''accessyear''': Month and day when item was accessed, e.g. May 10, and year when item was accessed, e.g. 2005. Will not be wikilinked. === Optional parameters === * '''author''': Author ** '''authorlink''' works either with '''author''' or with '''last''' & '''first''' to link to the appropriate wikipedia article. Does not work with URLs. ** '''last''' works with '''first''' to produce <code>last, first</code> ** '''coauthors''': allows additional authors * '''date''': Full date of publication, preferably in [[w:ISO 8601|ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17''. May be wikilinked. ** OR: '''year''': Year of publication, and '''month''': Name of the month of publication. If you also have the day, use ''date'' instead. Must not be wikilinked. * '''language''': language of publication * '''format''': Format, e.g. PDF. HTML implied if not specified. * '''work''': If this item is part of a larger work, name of that work. * '''pages''': Pages, if any, especially if pdf format * '''publisher''': Publisher, if any. * '''archiveurl''': URL of the archive location of the item (requires '''archivedate''') * '''archivedate''': Date when the item was archived (requires '''archiveurl'''), in [[w:ISO 8601|ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17''. Must not be wikilinked; it will be linked automatically. ==See also== * [[w:Wikipedia:Citing sources]]: Style guide * [[w:Wikipedia:Citation templates]]: Related templates * [[w:Wikipedia:WikiProject Wikicite]] * [[Templat:Cite book]] * [[Templat:Cite news]] == Examples == ;Some standard use cases * <nowiki>{{cite web |author=Doe, John |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com/ |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com |accessdate=2005-07-06}}</span> * <nowiki>{{cite web |author=Doe, John |title=My Favorite Things Part II |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com/ |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com |accessdate=2005-07-06}}</span> * <nowiki>{{cite web |author=Doe, John |title=My Favorite Things Part II |date=[[2005-04-30]] |url=http://www.example.com/ |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |date=[[2005-04-30]] |url=http://www.example.com |accessdate=2005-07-06}}</span> * <nowiki>{{cite web |author=Doe, John |title=My Favorite Things Part II |url=http://www.example.com/ |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |url=http://www.example.com |accessdate=2005-07-06}}</span> * <nowiki>{{cite web |title=My Favorite Things Part II |url=http://www.example.com/ |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |title=My Favorite Things Part II |url=http://www.example.com |accessdate=2005-07-06}}</span> * <nowiki>{{cite web |url=http://www.nfl.com/fans/ |title=Digest of Rules |publisher=National Football League |accessdate=2005-07-06}}</nowiki><br/>→ <span style="background:white">{{cite web |url=http://www.nfl.com/fans/ |title=Digest of Rules |publisher=National Football League |accessdate=2005-07-06}}</span> ;No parameters * <nowiki>{{cite web}}</nowiki><br/>→ <span style="background:white">{{cite web}}</span> ;accessdate in ISO YYYY-MM-DD format * <nowiki>{{cite web | author=Doe, John | title=My Favorite Things Part II | publisher=Open Publishing | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2005-07-06 }}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com |accessdate=2005-07-06}}</span> ;Using format * <nowiki>{{cite web | title=List of psychotropic substances under international control | publisher = International Narcotics Control Board | url=http://www.incb.org/pdf/e/list/green.pdf | format = PDF | accessdate=2005-07-06 }}</nowiki><br/>→ <span style="background:white">{{cite web |title=List of psychotropic substances under international control |publisher=International Narcotics Control Board |url=http://www.incb.org/pdf/e/list/green.pdf |format=PDF |accessdate=2005-07-06}}</span> ;language * <nowiki>{{cite web | author=Doe, John | title=My Favorite Things Part II | publisher=Open Publishing | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2005-07-06 | language=English }}</nowiki><br/>→ <span style="background:white">{{cite web |author=Doe, John |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com |accessdate=2005-07-06 |language=English}}</span> ;coauthors * <nowiki>{{cite web | first=John | last=Doe | coauthors=Peter Smith, Jim Smythe | title=My Favorite Things Part II | publisher=Open Publishing | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2006-05-16 }}</nowiki><br/>→ <span style="background:white">{{cite web |first=John |last=Doe |coauthors=Peter Smith, Jim Smythe |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com/ |accessdate=2006-05-16}}</span> ;No author * <nowiki>{{cite web | title=My Favorite Things Part II | publisher=Open Publishing | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2006-05-16 }}</nowiki><br/>→ <span style="background:white">{{cite web |title=My Favorite Things Part II |publisher=Open Publishing |date=[[2005-04-30]] |work=Encyclopedia of Things |url=http://www.example.com/ |accessdate=2006-05-16}}</span> ;No author, no publisher * <nowiki>{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2005-07-06 }}</nowiki><br/>→ <span style="background:white">{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | work=Encyclopedia of Things | url=http://www.example.com/ | accessdate=2005-07-06 }}</span> * <nowiki>{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | url=http://www.example.com/ | accessdate=2005-07-06 }}</nowiki><br/>→ <span style="background:white">{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | url=http://www.example.com/ | accessdate=2005-07-06 }}</span> * <nowiki>{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | url=http://www.example.com/ | accessdate=2005-07-06 | language=English }}</nowiki><br/>→ <span style="background:white">{{cite web | title=My Favorite Things Part II | date=[[2005-04-30]] | url=http://www.example.com/ | accessdate=2005-07-06 | language=English }}</span> * <nowiki>{{cite web | title=List of psychotropic substances under international control | date=[[2005-04-30]] | url=http://www.incb.org/pdf/e/list/green.pdf | format = PDF | accessdate=2005-07-06 | language=English }}</nowiki><br/>→ <span style="background:white">{{cite web | title=List of psychotropic substances under international control | date=[[2005-04-30]] | url=http://www.incb.org/pdf/e/list/green.pdf | format = PDF | accessdate=2005-07-06 | language=English }}</span> ; Using archiveurl and archivedate to refer to items that went away but are available from an archive site * <nowiki>{{cite web | title=List of psychotropic substances under international control | date=[[2005-04-30]] | url=http://www.incb.org/pdf/e/list/green.pdf | format = PDF | accessdate=2005-07-06 | language=English | archiveurl=http://www.archive.org/2005-09-11/www.incb.org/pdf/e/list/green.pdf | archivedate=2005-09-11 }}</nowiki><br/>→ <span style="background:white">{{cite web | title=List of psychotropic substances under international control | date=[[2005-04-30]] | url=http://www.incb.org/pdf/e/list/green.pdf | format = PDF | accessdate=2005-07-06 | language=English | archiveurl=http://www.archive.org/2005-09-11/www.incb.org/pdf/e/list/green.pdf | archivedate=2005-09-11 }}</span> * <nowiki> {{cite web |url=http://joanjettbadrep.com/cgi-bin/fullStory.cgi?archive=currnews&story=20060405-01shore.htm |title=Interview with Maggie Downs |date=[[2006-03-31]] |publisher=The Desert Sun |archiveurl=http://72.14.207.104/search?q=cache:JAxf4v-pQmgJ:joanjettbadrep.com/cgi-bin/fullStory.cgi%3Farchive%3Dcurrnews%26story%3D20060405-01shore.htm |archivedate=2006-04-26 }} }}</nowiki><br/>→ <span style="background:white">{{cite web |url=http://joanjettbadrep.com/cgi-bin/fullStory.cgi?archive=currnews&story=20060405-01shore.htm |title=Interview with Maggie Downs |date=[[2006-03-31]] |publisher=The Desert Sun |archiveurl=http://72.14.207.104/search?q=cache:JAxf4v-pQmgJ:joanjettbadrep.com/cgi-bin/fullStory.cgi%3Farchive%3Dcurrnews%26story%3D20060405-01shore.htm |archivedate=2006-04-26}}</span> <includeonly> <!-- ADD CATEGORIES BELOW THIS LINE --> [[Kategori:Citation templates]] [[Kategori:Templates using ParserFunctions]] <!-- ADD INTERWIKIS BELOW THIS LINE --> </includeonly> hfobgtwpq1sdqbtv4vcfvp6uvcp5oda Templat:Collapse bottom 10 38 651 77 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 75 wikitext text/x-wiki <includeonly>|}</div></includeonly><noinclude> {{Documentation|Template:Collapse top/doc}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> brg0xxydzz07jqyt62vdk8nb02zd0ob Templat:Collapse top 10 39 653 80 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 78 wikitext text/x-wiki <div style="margin-left:{{{indent|0}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section --> {| <!-- Template:Collapse top --> class="mw-collapsible mw-archivedtalk {{<includeonly>safesubst:</includeonly>#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{<includeonly>safesubst:</includeonly>#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;" |- ! style="background: {{{bg|#{{main other|F0F2F5|CCFFCC}}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}|left|{{<includeonly>safesubst:</includeonly>#if:{{{align|}}}|left|center}}}}; {{<includeonly>safesubst:</includeonly>#if:{{{fc|}}}|color: {{{fc}}};|}}" | <div style="font-size:115%;{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}||margin:0 4em}}">{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> {{<includeonly>safesubst:</includeonly>#if:{{{warning|{{{2|}}}}}} |{{<includeonly>safesubst:</includeonly>!}}- {{<includeonly>safesubst:</includeonly>!}} style="text-align:center; font-style:italic;" {{<includeonly>safesubst:</includeonly>!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }} |- | style="border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|White}}};" {{<includeonly>safesubst:</includeonly>!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} </noinclude> 49fq0ozglbg48cdwvts7z3qhbx0gu8j Templat:Collapsible list 10 40 655 83 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 81 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Collapsible list|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> d8e74eqy9latmrq7vpz0zd6w79t141k Templat:Color 10 41 657 86 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 84 wikitext text/x-wiki <span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> s66u50lzf1g4d955nh4mw43vypr0i16 Templat:Colored link 10 42 88 87 2024-08-09T09:19:35Z Jon Harald Søby 58 1 semakan diimportkan 87 wikitext text/x-wiki [[:{{{2}}}|<span style="color: {{{1}}}; text-decoration: inherit;">{{{3|{{{2}}}}}}</span>]]<noinclude> {{Documentation}}<!-- Add categories to the /doc subpage, not here! --> </noinclude> jvt0lvk1mb9n1873pv7pz8vybu3s8jm Templat:Colored link/doc 10 43 90 89 2024-08-09T09:19:35Z Jon Harald Søby 58 1 semakan diimportkan 89 wikitext text/x-wiki {{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> == Usage == {{Warning|'''Links in prose should never be manually colored.''' ([[MOS:LINKCOLOR]])}} This template takes three parameters: the color of the link, the article being linked to, and optional text to display as a [[WP:piped link|piped link]]. {{tlc|colored link|2=olive|3=Page name to link|4=Alternative text}} → {{colored link|olive|Page name to link|Alternative text}} == See also == * {{Tl|Aqua}} → {{Aqua|Main page}} * {{Tl|Black}} → {{Black|Main page}} * {{Tl|Blue}} → {{Blue|Main page}} * {{Tl|Brown}} → {{Brown|Main page}} * {{Tl|Cyan}} → {{Cyan|Main page}} * {{Tl|Fuchsia}} → {{Fuchsia|Main page}} * {{Tl|Gold (color)}} → {{Gold (color)|Main page}} * {{Tl|Gray}} → {{Gray|Main page}} * {{Tl|Green}} → {{Green|Main page}} * {{Tl|Lime}} → {{Lime|Main page}} * {{Tl|LinkBlue}} → {{LinkBlue|Main page}} * {{Tl|Magenta}} → {{Magenta|Main page}} * {{Tl|Maroon}} → {{Maroon|Main page}} * {{Tl|Navy (color)}} → {{Navy (color)|Main page}} * {{Tl|Olive}} → {{Olive|Main page}} * {{Tl|Orange}} → {{Orange|Main page}} * {{Tl|Pink}} → {{Pink|Main page}} * {{Tl|Purple}} → {{Purple|Main page}} * {{Tl|Red}} → {{Red|Main page}} * {{Tl|Teal}} → {{Teal|Main page}} * {{Tl|White}} → {{White|Main page}} * {{Tl|Yellow}} → {{Yellow|Main page}} <includeonly>{{Sandbox other|| <!-- Categories go here, and interwikis go in Wikidata --> [[Kategori:Text color templates]] [[Kategori:Internal link templates]] }}</includeonly> ot85dis2bz2lpqcsz08gqjk2kb9lpj9 Templat:Comma separated entries 10 44 660 92 2024-08-09T09:21:20Z Jon Harald Søby 58 2 semakan diimportkan 91 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|comma}}<noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 1l9mcrr3qyudp0wvjifpe0rs9wt9m9q Templat:Convert 10 45 662 95 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 93 wikitext text/x-wiki <includeonly>{{{{{♥|safesubst:}}}#invoke:Convert|convert}}</includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 1oijl33u0d0tlkc26d3cj2hizbnj2ql Templat:Convinfobox 10 46 664 98 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 96 wikitext text/x-wiki {{Convinfobox/{{#if:{{{1|}}}|pri}}{{#if:{{{3|}}}|sec}}{{#if:{{{6|}}}|{{#if:{{{5|}}}|ter}}3|2}}|{{{1}}}|{{{2}}}|{{{3}}}|{{{4}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|sp={{{sp|}}}|lk={{{lk|off}}}|abbr={{{abbr|on}}}|disp={{{disp|}}}|adj={{{adj|}}}|sigfig={{{sigfig|}}}}}<noinclude>{{documentation}}</noinclude> ptv5mtijw6lckdqo3xwe2sl43rchzsa Templat:Convinfobox/2 10 47 100 99 2024-08-09T09:19:36Z Jon Harald Søby 58 1 semakan diimportkan 99 wikitext text/x-wiki <noinclude>empty [[Kategori:Subtemplates of Template Convinfobox]] </noinclude> coq36420alpp9wghmiestn136q2l2zm Templat:Convinfobox/3 10 48 102 101 2024-08-09T09:19:36Z Jon Harald Søby 58 1 semakan diimportkan 101 wikitext text/x-wiki <noinclude>empty [[Kategori:Subtemplates of Template Convinfobox]] </noinclude> coq36420alpp9wghmiestn136q2l2zm Templat:Convinfobox/pri2 10 49 105 104 2024-08-09T09:19:36Z Jon Harald Søby 58 2 semakan diimportkan 103 wikitext text/x-wiki <includeonly>{{convert|{{{1}}}|{{{2}}}|{{{4}}}|{{{5|}}}|sp={{{sp|}}}|lk={{{lk|off}}}|abbr={{{abbr|on}}}|disp={{{disp|}}}|adj={{{adj|}}}|sigfig={{{sigfig|}}}}}</includeonly><noinclude> [[Kategori:Subtemplates of Template Convinfobox]] </noinclude> iiy5oa311zsbj3pp7ehnh16k8hwf7ou Templat:Convinfobox/prisec2 10 50 107 106 2024-08-09T09:19:37Z Jon Harald Søby 58 1 semakan diimportkan 106 wikitext text/x-wiki #REDIRECT [[Templat:Convinfobox/pri2]] bwt73elbt4srhmqrt0tcwpcykcrizjc Templat:Coord 10 51 666 110 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 108 wikitext text/x-wiki <includeonly>{{#invoke:Coordinates|coord}}</includeonly><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 0o7lasvhdxe29mlczlsmvzkvka0kscy Templat:Count 10 52 668 113 2024-08-09T09:21:20Z Jon Harald Søby 58 1 semakan diimportkan 111 wikitext text/x-wiki {{safesubst<noinclude/>:#ifexpr:{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}>0|{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}|{{{base|0}}}}}<noinclude>{{Documentation}}</noinclude> jf7l3yzyl6z34h9yhdpzzq88i6vuvuo Templat:Country2nationality 10 53 115 114 2024-08-09T09:19:37Z Jon Harald Søby 58 1 semakan diimportkan 114 wikitext text/x-wiki <includeonly>{{safesubst<noinclude/>:#ifeq:{{safesubst<noinclude/>:#invoke:String|len|s={{safesubst<noinclude/>:ISO 3166 code|{{{1}}}}}}}|2|{{safesubst<noinclude/>:Iso2nationality| {{safesubst<noinclude/>:ISO 3166 code|{{{1}}}}} }}| {{safesubst<noinclude/>:#if:{{{1|}}}| {{safesubst<noinclude/>:#switch: {{{1}}} | England = English | Scotland = Scottish | Wales = Welsh | Catalonia = Catalan | Kosovo = Kosovan }}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> ihcfle7c788vo3t6qb3ks1uhqu4uy32 Templat:Country data 10 54 117 116 2024-08-09T09:19:37Z Jon Harald Søby 58 1 semakan diimportkan 116 wikitext text/x-wiki #Redirect [[Templat:Flag data]] k31tauuvd2xo4p4x8onr5aeknqjowbc Templat:Create taxonomy 10 55 119 118 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 118 wikitext text/x-wiki <includeonly> |- |{{#ifeq:{{#titleparts:{{PAGENAME}}||2}}|{{UnstripNoWiki|{{{1}}}}}|You're currently creating:|<span style="color: Red;">{{{msg|Unrecognized taxon}}}</span> (<span class=plainlinks><!-- Link for manual creation, assisted by WP editintros: -->[{{Create taxonomy/link|{{UnstripNoWiki|{{{1}}}}}}} fix]</span>):}} |[[{{UnstripNoWiki|{{{1}}}}}]]{{Namespace detect|main=[[Kategori:Automatic taxobox cleanup]]|template=[[Kategori:Automatic taxobox cleanup]]|other=}} |- </includeonly><noinclude>{{documentation}}</noinclude> cz91ja3ezd4p1wx99s016cqzzgoa553 Templat:Create taxonomy/link 10 56 121 120 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 120 wikitext text/x-wiki <includeonly>https://incubator.wikimedia.org/w/index.php?action=edit&title=Template:Taxonomy/{{urlencode:{{ucfirst:{{{1}}}}}}}&preload=Template:Taxonomy/{{Taxonomy preload|{{{1}}}}}</includeonly><noinclude>{{documentation}}</noinclude> 1a6nde0bcwq8zymyozrqgzyw340qcfj Templat:DMCA 10 57 123 122 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 122 wikitext text/x-wiki #REDIRECT [[Templat:Dated maintenance category (articles)]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 21lr3dsxhv8k8ivlehr4q4etytrvw7i Templat:Dated maintenance category 10 58 125 124 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 124 wikitext text/x-wiki <nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!-- -->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}} |{{#if:{{{3|}}} |[[Kategori:{{{1}}} {{{2}}} {{{3}}}]]<!-- -->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}} |<!-- -->|[[Kategori:Articles with invalid date parameter in template]]<!-- -->}} |[[Kategori:{{#if:{{{5|}}} |{{{5}}}<!-- -->|{{{1}}}<!-- -->}}]]<!-- -->}}{{#if:{{{4|}}} |[[Kategori:{{{4}}}]]}}<!-- -->}}<!-- -->}}<noinclude> {{Documentation}} </noinclude> bjdzlytix6zaemuy3x6atfkxq7af9hh Templat:Dated maintenance category (articles) 10 59 127 126 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 126 wikitext text/x-wiki {{Dated maintenance category |onlyarticles=yes |1={{{1|}}} |2={{{2|}}} |3={{{3|}}} |4={{{4|}}} |5={{{5|}}} }}<noinclude> {{Documentation|Template:Dated maintenance category/doc}} </noinclude> keuw7v8a0vreykdlda37lkff9d7woa9 Templat:Dead link 10 60 129 128 2024-08-09T09:19:38Z Jon Harald Søby 58 1 semakan diimportkan 128 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Dead link}} begin-->{{Fix | special = <sup class="noprint Inline-Template"><span style="white-space: nowrap;">&#91;<i>{{#if: {{{url|}}}|[https://web.archive.org/web/*/{{{url|}}} <span title="{{{title|}}}{{#if:{{{date|}}}|&nbsp;tagged {{{date}}}}}">dead linkghh</span>]|[[Wikipedia:Link rot|<span title="{{{title|}}}{{#if:{{{date|}}}|&nbsp;Dead link tagged {{{date}}}}}">{{#if:{{{fix-attempted|}}}|permanent dead link|dead link}}</span>]]}}</i>&#93;</span></sup> | date = {{{date|}}} | cat = {{main other|[[Kategori:All articles with dead external links]]}} | cat-date = Category:Articles with dead external links | cat2 = {{main other|{{#if:{{{fix-attempted|}}}|[[Kategori:Articles with permanently dead external links]]}}}} }}<!--{{Dead link}} end--> }}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE; INTERWIKIS GO TO WIKIDATA, THANK YOU! --> </noinclude> 5ke1j7zapi15535xw5zeobrlfrsb0wj Templat:Decrease 10 61 670 132 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 130 wikitext text/x-wiki [[Fail:Decrease2.svg|{{{size|11px}}}|alt={{{1|Decrease}}}|link=|{{{1|Decrease}}}]]<noinclude> {{Documentation}} </noinclude> 0food7mynw6snuopicx6qvg7fhp7wtf Templat:Delink 10 62 134 133 2024-08-09T09:19:39Z Jon Harald Søby 58 1 semakan diimportkan 133 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Delink|delink}}<noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> qil9elcwdkfc0i47y5a08g6vwsr871t Templat:Documentation 10 63 4485 672 2024-08-12T10:25:38Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4608595]] 4485 wikitext text/x-wiki {{#invoke:Documentation|main|_content={{ {{#invoke:Documentation|contentTitle}}}}}}<noinclude> <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> stf6qdqvm1cnx0b5hzlv3yxzgvz2ce5 Templat:Documentation subpage 10 64 140 139 2024-08-09T09:19:39Z Jon Harald Søby 58 1 semakan diimportkan 139 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[Fail:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Kategori:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Kategori:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 2uy78vuzecblamxm8yvj2fomnvltlst Templat:Don't edit this line link target 10 65 142 141 2024-08-09T09:19:39Z Jon Harald Søby 58 1 semakan diimportkan 141 wikitext text/x-wiki {{{link|}}}<noinclude>{{documentation|Template:Don't edit this line/doc/variant}}</noinclude> g09voc0qmk9gut26033atiaa4spemp5 Templat:Don't edit this line link text 10 66 144 143 2024-08-09T09:19:39Z Jon Harald Søby 58 1 semakan diimportkan 143 wikitext text/x-wiki {{{1|{{{link|}}}}}}<noinclude>{{documentation|Template:Don't edit this line/doc/variant}}</noinclude> 145zvuvgghbx8px2c4da2e0wb9t47kw Templat:Don't edit this line parent 10 67 146 145 2024-08-09T09:19:40Z Jon Harald Søby 58 1 semakan diimportkan 145 wikitext text/x-wiki {{{parent|}}}<noinclude>{{documentation|Template:Don't edit this line/doc/variant}}</noinclude> bsudgxbi9z35s87y4j7d4giphaakqux Templat:Don't edit this line rank 10 68 148 147 2024-08-09T09:19:40Z Jon Harald Søby 58 1 semakan diimportkan 147 wikitext text/x-wiki {{lcfirst:{{{rank|}}}}}<noinclude>{{Documentation|Template:Don't edit this line/doc/variant}}</noinclude> 5ivtvfbhndywe3gx5cxgduvl7aet3xr Templat:Efn 10 69 150 149 2024-08-09T09:19:40Z Jon Harald Søby 58 1 semakan diimportkan 149 wikitext text/x-wiki <includeonly>{{#if:{{{name|}}} |{{#tag:ref|{{{1|{{{reference|{{{content|{{{text|}}}}}}}}}}}}|name={{{name|}}}|group={{#switch: {{{group|}}} | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group|}}} | #default = lower-alpha }} }} |{{#tag:ref|{{{1|{{{reference|{{{content|{{{text|}}}}}}}}}}}}|group={{#switch: {{{group|}}} | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group|}}} | #default = lower-alpha }} }} }}</includeonly><noinclude> {{Documentation}} </noinclude> 0hufqw4wssr72tbruimmb8kxgl3af22 Templat:Endangered Languages Project 10 70 153 152 2024-08-09T09:19:40Z Jon Harald Søby 58 2 semakan diimportkan 152 wikitext text/x-wiki {{#invoke:Endangered Languages Project |make_entry |elpname={{{ELPname|}}} |elpcode={{{ELP|}}} |qid={{{qid|}}} }}<noinclude> {{documentation}} {{INTERWIKI|Q105966158}} </noinclude> d43bw5q6djjtqug8qxiotmidbkzejc0 Templat:Ethnologue18 10 71 155 154 2024-08-09T09:19:40Z Jon Harald Søby 58 1 semakan diimportkan 154 wikitext text/x-wiki {{#if: {{{1|}}} |[https://www.ethnologue.com/18/language/{{{1|}}}/ {{{2|{{PAGENAME}}}}}] at ''[[Ethnologue]]'' (18th ed., 2015) {{subscription required}} |{{cite book|editor=Lewis, M. Paul|editor2=Gary F. Simons|editor3=Charles D. Fennig|year=2015|title=Ethnologue: Languages of the World|edition=18th|location=Dallas, Texas|publisher=SIL International|url=https://www.ethnologue.com/18/ |url-access=subscription}} }}<includeonly>[[Kategori:Language articles citing Ethnologue 18]]</includeonly><noinclude> {{Documentation}} {{INTERWIKI|Q19979487}} </noinclude> 172or2xy24lx5xn29zcv1nmq5s1xtkx Templat:FULLPAGENAME 10 72 157 156 2024-08-09T09:19:41Z Jon Harald Søby 58 1 semakan diimportkan 156 wikitext text/x-wiki <noinclude>{{Transclusionless}}</noinclude><includeonly>{{FULLPAGENAME:{{{1}}}}}[[Kategori:Pages which use a template in place of a magic word|D{{PAGENAME}}]]</includeonly> <noinclude>{{Documentation}}</noinclude> 68mwpmw5ihetq4j0gke9fl218ipbc8z Templat:FULLROOTPAGENAME 10 73 159 158 2024-08-09T09:19:41Z Jon Harald Søby 58 1 semakan diimportkan 158 wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> tk494gglkhfogc40do2k58d4bbttx9o Templat:Featured article 10 74 161 160 2024-08-09T09:19:41Z Jon Harald Søby 58 1 semakan diimportkan 160 wikitext text/x-wiki {{Main other|{{Top icon | imagename = cscr-featured.svg | wikilink = Wikipedia:Featured articles | alt = Featured article | description = This is a featured article. Click here for more information. | id = featured-star | maincat = [[Kategori:Featured articles]] }}|<includeonly>{{Error|[[Templat:Featured article]] is only for [[Wikipedia:Featured articles]].}}</includeonly> }}<noinclude>{{Documentation}}</noinclude> 09wi53x6u3pbrnt8orta8ut9k1jgvc9 Templat:First word 10 75 163 162 2024-08-09T09:19:41Z Jon Harald Søby 58 1 semakan diimportkan 162 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|match|s={{{1}}}|^[^{{{sep|%s}}}]*}}<noinclude> {{Documentation}}</noinclude> 97hous4y7xkt2etee8wx4y3u6lm5qwz Templat:Fix comma category 10 76 676 166 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 164 wikitext text/x-wiki {{#invoke:String|replace|{{{1}}}|%[%[Category:(.-)from (.-) 2,(.-)%]%]|[[Kategori:%1 from %2 2%3]]|plain=false}}<noinclude>{{Documentation}}</noinclude> 01mv683tvhbv1vjdrjjx7uea1oqlrft Templat:Flag 10 77 168 167 2024-08-09T09:19:41Z Jon Harald Søby 58 1 semakan diimportkan 167 wikitext text/x-wiki {{Country data {{{1|}}}|Flag/core|name={{{name|{{{1|}}}}}}|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude>{{Documentation}}</noinclude> euj3n6opd9g6apzz5peledzasr7xjba Templat:Flag/core 10 78 170 169 2024-08-09T09:19:42Z Jon Harald Søby 58 1 semakan diimportkan 169 wikitext text/x-wiki <span class="flagicon">[[Fail:{{{flag alias-{{{variant}}}|{{#if:{{{flag alias|}}}|{{{flag alias}}}|Flag placeholder.svg}}}}}|{{#if:{{{size|}}}|{{{size}}}|{{{size flag alias-{{{variant}}}|{{#if:{{{variant|}}}|23x15px|{{{size flag alias|23x15px}}}}}}}}}}|{{{border-{{{variant}}}|{{{border|border}}}}}} |alt=|link=]]&nbsp;{{#switch:{{{flag alias}}}|Flag of Switzerland.svg|Flag of the Vatican City.svg|Flag of Switzerland (Pantone).svg|Flag of Vatican City State - 2023 version.svg=&nbsp;}}{{#ifeq:{{{alias}}}|Nepal|&nbsp;&nbsp;}}</span>[[{{{alias}}}|{{{name}}}]]<noinclude>{{Wp/iba/Documentation}}</noinclude> mhkskv7uf3k9xc4uzscim6pm476veu6 Templat:Flag data 10 79 172 171 2024-08-09T09:19:42Z Jon Harald Søby 58 1 semakan diimportkan 171 wikitext text/x-wiki {{{{{1}}} | alias = | flag alias = Flag placeholder.svg | name = {{{name|}}} | size = {{{size|}}} | border= | altlink = {{{altlink|}}} }}<noinclude> {{Documentation}} </noinclude> c2ufvb2hzz7ppnfa68gpc3wnlwe714p Templat:Flatlist 10 80 174 173 2024-08-09T09:19:42Z Jon Harald Søby 58 1 semakan diimportkan 173 wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{Documentation}} </noinclude> 7qqe7u2isbic3c69uc32hkkbgwtsd27 Templat:Greater color contrast ratio 10 81 678 177 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 175 wikitext text/x-wiki <includeonly>{{safesubst:#invoke:Color contrast|greatercontrast}}</includeonly><noinclude> {{documentation}} </noinclude> rf2pxg07x3v7fq91j9zzu6nj4e8wbrh Templat:Hid 10 82 680 180 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 178 wikitext text/x-wiki <includeonly>{{#if:{{{1|}}}|<span data-sort-value="{{#invoke:Sortkey|encode|{{{1}}}}}"{{#if:{{{test|}}}|style="color:cyan;display:inline"}}>{{#if:{{{test|}}}|{{{1}}}}}</span>}}</includeonly><noinclude> {{Documentation}} </noinclude> 42m48m6k5a8qpaub6ca9dxxlfvhw3w6 Templat:Hlist 10 83 682 183 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 181 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:List|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> lo7yg7qnv5ewgub4aqo4u4wpvxhnp8v Templat:Hlist/styles.css 10 84 185 184 2024-08-09T09:19:43Z Jon Harald Søby 58 1 semakan diimportkan 184 sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[Perbincangan MediaWiki:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } ktzon12qgbroczozks5ib5vlqidrfpv Templat:ISO 3166 code 10 85 187 186 2024-08-09T09:19:43Z Jon Harald Søby 58 1 semakan diimportkan 186 wikitext text/x-wiki {{safesubst<noinclude/>:#invoke:ISO 3166|code|{{{1}}}|{{{2|}}}}}<noinclude> {{Documentation|content={{ISO 3166 conversion template doc}}}} </noinclude> 0tb3gpyqby5gfydd96tbrl3l0h6uqng Templat:If empty 10 86 685 189 2024-08-09T09:21:21Z Jon Harald Søby 58 2 semakan diimportkan 188 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> dl9p9t1ge8vz1f67zrvu4lp7md161es Templat:If preview 10 87 191 190 2024-08-09T09:19:43Z Jon Harald Søby 58 1 semakan diimportkan 190 wikitext text/x-wiki {{#invoke:If preview|pmain}}<noinclude> {{documentation}} </noinclude> 6qwpfcorqpypnh51aqp5gq1jcqx6mrn Templat:Ifsubst 10 88 687 194 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 192 wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 6n9xrkgwrhqddknwc59l4tya8074m0o Templat:In lang 10 89 689 197 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 195 wikitext text/x-wiki {{#invoke:In lang|in_lang|template=in lang<noinclude>|{{CONTENTLANGUAGE}}</noinclude>}}<noinclude> {{documentation}} </noinclude> szbgb2lf6rekweszdnzzmouvi00fwpl Templat:Increase 10 90 691 200 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 198 wikitext text/x-wiki [[Fail:Increase2.svg|{{{size|11px}}}|alt={{{1|Increase}}}|link=|{{{1|Increase}}}]]<noinclude> {{documentation}} </noinclude> 027svg73yz88dflswksyk44yns0vd06 Templat:IncreaseNegative 10 91 693 203 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 201 wikitext text/x-wiki [[Fail:Increase Negative.svg|{{{size|11px}}}|alt={{{1|Negative increase}}}|link=|{{{1|Negative increase}}}]]<noinclude> {{documentation}} </noinclude> sgwdc191vzwj1woaeex4p0cb94u4enc Templat:IncreaseNeutral 10 92 695 206 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 204 wikitext text/x-wiki [[Fail:Increase Neutral.svg|{{{size|11px}}}|alt={{{1|Neutral increase}}}|link=|{{{1|Neutral increase}}}]]<noinclude> {{documentation}} </noinclude> 6s8xxo8e2xfu08ovhcco0avbl3aqbx4 Templat:Infobox 10 93 697 209 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 208 wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Kategori:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> [[en:Template:Infobox]] [[ms:Templat:Infobox]] [[zh:Template:Infobox]] </noinclude> 2nr84p7865x5aj2hcctuj7a4nzs3f8r Templat:Infobox anatomy 10 94 211 210 2024-08-09T09:19:45Z Jon Harald Søby 58 1 semakan diimportkan 210 wikitext text/x-wiki {{Infobox | abovestyle = background-color:{{#switch:{{lc:{{{Type|{{{type|}}}}}}}} | artery = pink | bone = whitesmoke | brain = lemonchiffon | cell = beige | embryology = thistle | ligament = <nowiki>#</nowiki>E0E0E0 | lymph = lightgreen | micro = beige | muscle = antiquewhite | nerve = lemonchiffon | neuron = lemonchiffon | vein = lightblue | #default = dimgray; color: white }} | headerstyle = background-color: #efefef | labelstyle = padding-right:0.25em | captionstyle = | above = {{{Name|{{{name|<noinclude>Anatomical structure</noinclude>}}}}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{Image|{{{image|}}}}}}|size={{{Width|{{{image_size|}}}}}}|sizedefault=frameless|upright=1.14|alt={{{Alt|{{{alt|}}}}}}}} | caption = {{{Caption|{{{caption|}}}}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{Image2|{{{image2|}}}}}}|size={{{Width2|{{{Width|{{{image_size|{{{image2_size|}}}}}}}}}}}}|sizedefault=frameless|upright=1.14|alt={{{Alt2|{{{alt2|}}}}}}}} | caption2 = {{{Caption2|{{{caption2|}}}}}} | header1 = {{#if:{{{Latin|}}}{{{Greek|}}}{{{Part_of|{{{part_of|{{{PartOf|{{{is_part_of|{{{IsPartOf|}}}}}}}}}}}}}}}{{{CarnegieStage|}}}{{{days|{{{Days|}}}}}}{{{system|{{{System|}}}}}}{{{components|{{{Components|}}}}}}{{{location|{{{Location|}}}}}}{{{Function|{{{function|}}}}}}{{{neurotransmitter|}}}{{{morphology|}}}{{{afferents|}}}{{{efferents|}}}{{{Origins|{{{Origin|{{{origins|{{{origin|}}}}}}}}}}}}{{{Insertions|{{{Insertion|{{{insertions|{{{insertion|}}}}}}}}}}}}{{{Articulations|{{{Articulation|{{{articulations|}}}}}}}}}{{{Supplies|}}}{{{DrainsFrom|{{{Drainsfrom|}}}}}}{{{BranchFrom|{{{Branchfrom|}}}}}}{{{DrainsTo|{{{Drainsto|}}}}}} {{{BranchTo|{{{Branchto|}}}}}}{{{Artery|{{{artery|}}}}}}{{{vein|{{{Vein|}}}}}}{{{nerve|{{{Nerve|}}}}}}{{{lymph|{{{Lymph|}}}}}}{{{source|{{{Source|}}}}}}{{{Action|{{{action|}}}}}}{{{Antagonist|}}}{{{precursor|{{{Precursor|}}}}}}{{{gives_rise_to|{{{GivesRiseTo|}}}}}}|Details}} | label4 = {{#if:{{{synonym|{{{Synonym|}}}}}}|Synonym|Synonyms}}<!-- singular/plural --> | data4 = {{if empty|{{{Synonym|{{{synonym|}}}}}}|{{{synonyms|{{{Synonyms|}}}}}}}} | label5 = Pronunciation | data5 = {{{Pronunciation|{{{pronunciation|}}}}}} <!-- Embryology --> | label6 = [[Carnegie stages|Carnegie stage]]<!-- embryology --> | data6 = {{#if: {{{CarnegieStage|}}}|[http://genex.hgu.mrc.ac.uk/Databases/HumanAnatomy/new/carnegie{{{CarnegieStage}}}.shtml {{{CarnegieStage}}}]}} | label7 = Days<!-- embryology --> | data7 = {{{days|{{{Days|}}}}}} | label8 = [[Embryology|Precursor]] | data8 = {{{precursor|{{{Precursor|}}}}}} | label9 = [[Embryology|Gives rise to]]<!-- embryology --> | data9 = {{{gives_rise_to|{{{GivesRiseTo|}}}}}} <!-- Location and system --> | label10 = Part of<!-- brain --> | data10 = {{{Part_of|{{{part_of|{{{PartOf|{{{is_part_of|{{{IsPartOf|}}}}}}}}}}}}}}} | label11 = [[Organ system|System]] | data11 = {{{system|{{{System|}}}}}} | label12 = Location<!-- neuron, cell --> | data12 = {{{location|{{{Location|}}}}}} | label13 = [[Decussate|Decussation]] <!-- tract--> | data13 = {{{Decussation|}}} | label14 = Parts<!-- brain --> | data14 = {{{components|{{{Components|}}}}}} | label15 = Shape | data15 = {{{morphology|}}} <!-- Origins (where from) --> | label16 = From<!-- ligament, tract --> | data16 = {{{From|}}} | label17 = {{#switch:{{lc:{{{Type|{{{type|}}}}}}}}| | muscle = [[Anatomical terms of muscle#Insertion_and_origin|Origin]] | #default = Origins<!-- bone --> }} | data17 = {{{Origins|{{{Origin|{{{origins|{{{origin|}}}}}}}}}}}} | label18 = Drains from<!-- vein, lymph --> | data18 = {{{DrainsFrom|{{{Drainsfrom|}}}}}} | label19 = Source | data19 = {{{Source|{{{source|}}}}}} | label20 = {{#switch:{{lc:{{{Type|{{{type|}}}}}}}} |artery=Source<!-- artery --> |#default=From<!-- nerve --> }} | data20 = {{#if:{{{Source|{{{source|}}}}}}|<!-- duplicates source -->|{{{BranchFrom|{{{Branchfrom|}}}}}}}} <!-- Destination --> | label21 = To<!-- ligament, tract --> | data21 = {{{To|}}} | label22 = {{#switch:{{lc:{{{Type|{{{type|}}}}}}}}| | muscle = [[Anatomical terms of muscle#Insertion_and_origin|Insertion]] | #default = Insertions<!-- bone --> }} | data22 = {{{Insertions|{{{Insertion|{{{insertions|{{{insertion|}}}}}}}}}}}} | label23 = Articulations<!-- bone --> | data23 = {{{Articulations|{{{Articulation|{{{articulations|}}}}}}}}} | label24 = Drains to | data24 = {{{DrainsTo|{{{Drainsto|}}}}}} | label25 = {{#switch:{{lc:{{{Type|{{{type|}}}}}}}} |artery=Branches<!-- artery --> |#default=To<!-- nerve --> }} | data25 = {{{BranchTo|{{{Branchto|}}}}}} <!-- Supporting structures (arteries, nerves, ...--> | label26 = [[Artery]] | data26 = {{{Blood|{{{blood|{{{artery|{{{Artery|}}}}}}}}}}}} | label27 = [[Vein]] | data27 = {{{vein|{{{Vein|}}}}}} | label28 = [[Nerve]] | data28 = {{{nerve|{{{Nerve|}}}}}} | label30 = [[Lymph]] | data30 = {{{lymph|{{{Lymph|}}}}}} <!-- Function --> | label31 = Function<!-- neuron, cell --> | data31 = {{{Function|{{{function|}}}}}} | label32 = Supplies<!-- artery --> | data32 = {{{Supplies|}}} | label33 = Innervates<!-- nerve --> | data33 = {{{Innervates|}}} | label34 = [[Anatomical terms of motion|Actions]]<!-- muscle --> | data34 = {{{Action|{{{action|}}}}}} | label35 = [[Antagonist (muscle)|Antagonist]]<!-- muscle --> | data35 = {{{Antagonist|}}} | label36 = Neurotransmitter<!-- neuron --> | data36= {{{neurotransmitter|}}} | label37 = Presynaptic connections<!-- neuron --> | data37 = {{{afferents|}}} | label38 = Postsynaptic connections<!-- neuron --> | data38 = {{{efferents|}}} | label39 = [[Nerve fiber|Fiber type]]<!-- nerve --> | data39 = {{{FiberType|}}} | header40 = {{#if:{{{Latin|}}}{{{Greek|}}}{{{acronym|{{{Acronym|}}}}}}{{#property:P486}}{{#property:P4394}}{{#property:P696}}{{#property:P1323}}{{#property:P1693}}{{#property:P1694}}{{#property:P1402}}|Identifiers}} | label41 = [[Latin]] | data41 = {{#if:{{{Latin|}}}|''{{{Latin}}}''}} | label42 = [[Ancient Greek|Greek]] | data42 = {{#if:{{{Greek|}}}|''{{{Greek}}}''}} | label43 = Acronym(s)<!-- brain --> | data43 = {{{acronym|{{{Acronym|}}}}}} <!-- MeSH --> | label44 = [[Medical Subject Headings|MeSH]] | data44 = {{#if: {{#property:P486}} |{{Wikidata|properties|P486|sep=,_|format=\[https://meshb.nlm.nih.gov/record/ui?ui=%p %p\]}}|}} | label46 = [[NeuroNames]]<!-- brain --> | data46 = {{#if: {{#property:P4394}} |{{Wikidata|properties|P4394|sep=,_|format=\[http://braininfo.rprc.washington.edu/centraldirectory.aspx?ID=%p %p\]}}|}} | label47 = [[NeuroLex]] ID<!-- brain, neuron --> | data47 = {{#if: {{#property:P696}} |{{Wikidata|properties|P696|sep=,_|format=\[http://uri.neuinfo.org/nif/nifstd/%p %p\]}}|}} | label49 = [[Terminologia Anatomica|TA98]] | data49 = {{main other |{{#if:{{#property:P1323}} |{{#invoke:Wikidata|getTAValue}}}} |{{#if:{{{TA98|{{#property:P1323}}}}}|{{TA98|{{{TA98|{{#property:P1323}}}}}}}}} }} | label50= [[Terminologia Anatomica|TA2]] | data50 = {{#if:{{#property:P7173}} | {{wikidata|properties|P7173|format=\[https://ta2viewer.openanatomy.org/?id=%p %p\][%s]}} }} | label51 = [[Terminologia Histologica|TH]] | data51 = {{#if:{{{TH|{{#property:P1694}}}}} | {{TerminologiaHistologica|{{{TH|{{#property:P1694}} }}} }} }} | label52 = [[Terminologia Embryologica|TE]] | data52 = {{#if:{{{TE|{{#property:P1693}}}}} | {{TerminologiaEmbryologica|{{{TE|{{#property:P1693}} }}} }} }} | label53 = [[Foundational Model of Anatomy|FMA]] | data53 = {{#if:{{{FMA|{{#property:P1402}}}}}| {{FMA|{{{FMA|{{#property:P1402}}}}}|noprefix=1}}}} | belowstyle = | below = {{#switch:{{lc:{{{Type|{{{type|}}}}}}}} | artery = [[Anatomical terminology]] | bone = [[Anatomical terms of bone]] | brain = [[Anatomical terms of neuroanatomy]] | cell = [[Anatomical terms of microanatomy]] | embryology = [[Anatomical terminology]] | ligament = [[Anatomical terminology]] | lymph = [[Anatomical terminology]] | micro = [[Anatomical terms of microanatomy]] | muscle = [[Anatomical terms of muscle]] | nerve = [[Anatomical terms of neuroanatomy]] | neuron = [[Anatomical terms of neuroanatomy]] | vein = [[Anatomical terminology]] | #default = [[Anatomical terminology]] }}<div style="text-align: right;"><small class="noprint">&#91;[[d:{{#invoke:Wikidata|pageId}}|edit on Wikidata]]]</small></div> }}{{main other|{{#invoke:Check for unknown parameters|check|unknown=[[Kategori:Anatomy infobox template using unsupported parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Templat:Infobox anatomy]] with unknown parameter "_VALUE_"|ignoreblank=y| acronym | Acronym | action | Action | afferents | Alt | alt | alt2 | Alt2 | Antagonist | artery | Artery | Articulation | articulations | Articulations | blood | Blood | Branchfrom | BranchFrom | Branchto | BranchTo | Caption | caption | caption2 | Caption2 | CarnegieStage | components | Components | days | Days | Decussation | DrainsFrom | Drainsfrom | Drainsto | DrainsTo | efferents | FiberType | FMA | From | function | Function | gives_rise_to | GivesRiseTo | Greek | Image | image | image_size | Image2 | image2 | image2_size | Innervates | Insertion | insertion | insertions | Insertions | is_part_of | IsPartOf | Latin | Location | location | Lymph | lymph | morphology | Name | name | nerve | Nerve | neurotransmitter | Origin | origin | origins | Origins | part_of | Part_of | PartOf | precursor | Precursor | pronunciation | Pronunciation | Source | source | Supplies | synonym | Synonym | Synonyms | synonyms | System | system | TA98 | TE | TH | To | type | Type | Vein | vein | Width | Width2 }}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 12txnawiaecbujawxjsuxyr2bt96vax Templat:Infobox athlete 10 95 213 212 2024-08-09T09:19:45Z Jon Harald Søby 58 1 semakan diimportkan 212 wikitext text/x-wiki {{#invoke:Infobox|infoboxTemplate | child = {{{child|{{{embed|}}}}}} | bodyclass = vcard | headerstyle = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||background:{{#if:{{{headercolor|}}}|{{{headercolor}}}; {{#if:{{{textcolor|}}}|color:{{{textcolor}}}}}|#CCCC99}};}} | title = {{#ifeq:{{{child|{{{embed|}}}}}}|yes|{{#ifeq:{{{embed_header_large|}}}|yes|<div style="text-align: center; font-size: 125%; line-height: 1.2em; font-weight: bold;">{{#if:{{{embed-header|}}}|{{{embed-header}}}|Sports career}}</div>|{{#if:{{{embed-header|}}}|'''{{{embed-header}}}'''|'''Sports career'''}}}}|{{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}</div>}}<div class="fn">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}</div>{{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal; display:inline;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}</div>}}}} | titlestyle = font-size:125%; | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{Min|300|{{#if:{{#ifexpr:{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|300|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}}x200px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}} | header1 = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{#if:{{{native_name|}}}{{{native_name_lang|}}}{{{birth_name|}}}{{{birthname|}}}{{{full_name|}}}{{{fullname|}}}{{{nickname|}}}{{{national_team|}}}{{{nationality|}}}{{{citizenship|}}}{{{birth_date|}}}{{{birth_place|}}}{{{death_date|}}}{{{death_place|}}}{{{resting_place|}}}{{{resting place|}}}{{{restingplace|}}}{{{resting_place_coordinates|}}}{{{resting place coordinates|}}}{{{restingplacecoordinates|}}}{{{monuments|}}}{{{hometown|}}}{{{education|}}}{{{alma_mater|}}}{{{alma mater|}}}{{{occupation|}}}{{{years_active|}}}{{{years active|}}}{{{yearsactive|}}}{{{employer|}}}{{{agent|}}}{{{height_cm|}}}{{{height_ft|}}}{{{height_in|}}}{{{height|}}}{{{weight_kg|}}}{{{weight_lb|}}}{{{weight_st|}}}{{{weight|}}}{{{spouse|}}}{{{life_partner|}}}{{{children|}}}{{{parents|}}}{{{father|}}}{{{mother|}}}{{{relations|}}}{{{relatives|}}}{{{other_interests|}}}{{{other-interests|}}}{{{website|}}}|Personal information}}}} | label2 = Native&nbsp;name | data2 = {{#if:{{{native_name|}}}|<span class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</span> }} | label3 = Birth&nbsp;name | data3 = {{If empty|{{{birth_name|}}}|{{{birthname|}}}}} | class3 = nickname | label4 = Full&nbsp;name | data4 = {{If empty|{{{full_name|}}}|{{{fullname|}}}}} | class4 = nickname | label5 = <span class="nowrap">Nickname{{Pluralize from text|{{{nickname|}}}|likely=(s)|plural=s}}</span> | data5 = {{{nickname|}}} | class5 = nickname | label6 = {{#if:{{{national_team|}}}|National&nbsp;team|Nationality}} | data6 = {{#if:{{{national_team|}}}|{{{national_team}}}|{{{nationality|}}}}} | class6 = category | label8 = Citizenship | data8 = {{{citizenship|}}} | class8 = category | label9 = Born | data9 = {{Br separated entries|{{{birth_date|}}}|{{#if:{{{birth_place|}}}|<span class="birthplace">{{{birth_place|}}}</span>}}}} | label10 = Died | data10 = {{Br separated entries|{{{death_date|}}}|{{#if:{{{death_place|}}}|<span class="deathplace">{{{death_place|}}}</span>}}}} | label11 = Resting&nbsp;place | data11 = {{Br separated entries|{{If empty|{{{resting_place|}}}|{{{resting place|}}}|{{{restingplace|}}}}} |{{If empty|{{{resting_place_coordinates|}}}|{{{resting place coordinates|}}}|{{{restingplacecoordinates|}}}}} }} | class11 = label | label12 = Monument{{Pluralize from text|{{{monuments|}}}|likely=(s)|plural=s}} | data12 = {{{monuments|}}} | label14 = Home&nbsp;town | data14 = {{{hometown|}}} | label15 = Education | data15 = {{{education|}}} | label16 = ''[[Alma&nbsp;mater]]'' | data16 = {{If empty|{{{alma_mater|}}}|{{{alma mater|}}}}} | label17 = Occupation{{Pluralize from text|{{{occupation|}}}|likely=(s)|plural=s}} | data17 = {{{occupation|}}} | class17 = role | label18 = Years&nbsp;active | data18 = {{If empty|{{{years_active|}}}|{{{years active|}}}|{{{yearsactive|}}}}} | label19 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data19 = {{{employer|}}} | class19 = org | label20 = Agent | data20 = {{{agent|}}} | class20 = agent | label21 = Height | data21 = {{Convinfobox|{{{height_cm|}}}|cm|{{{height_ft|}}}|ft|{{{height_in|}}}|in|{{#if:{{{height_in|}}}|0}}}}{{#if:{{{height|}}}|{{Infobox person/height|{{{height}}}}}}} | label22 = Weight | data22 = {{Convinfobox|{{{weight_kg|}}}|kg|{{{weight_st|}}}|st|{{{weight_lb|}}}|lb|{{#if:{{{weight_kg|}}}|0}}}}{{#if:{{{weight|}}}|{{Infobox person/weight|{{{weight}}}}}}} | label23 = <span class="nowrap">Spouse{{Pluralize from text|{{{spouse|}}}|likely=(s)|plural=s}}</span> | data23 = {{{spouse|}}} | label24 = [[Life partner|Life <span class="nowrap">partner{{Pluralize from text|{{{life_partner|}}}|likely=(s)|plural=s}}</span>]] | data24 = {{{life_partner|}}} | label25 = Children | data25 = {{{children|}}} | label26 = Parent{{#if:{{{parents|}}}|{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{Count|{{{father|}}}|{{{mother|}}}}} > 1|s}}}} | data26 = {{#if:{{{parents|}}}|{{{parents}}}|{{Unbulleted list|{{#if:{{{father|}}}|{{{father}}} (father)}}|{{#if:{{{mother|}}}|{{{mother}}} (mother)}}}}}} | label27 = Relative{{Pluralize from text|{{If empty|{{{relations|}}}|{{{relatives|}}}}}|likely=(s)|plural=s}} | data27 = {{If empty|{{{relations|}}}|{{{relatives|}}}}} | label28 = Other interests | data28 = {{If empty|{{{other_interests|}}}|{{{other-interests|}}}}} | label29 = Website | data29 = {{{website|}}} | data30 = {{{module|}}}{{{misc|}}} | header31 = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{#if:{{{country|}}}{{{sport|}}}{{{position|}}}{{{shoots|}}}{{{catches|}}}{{{disability|}}}{{{disability_class|}}}{{{weight_class|}}}{{{rank|}}}{{{event|}}}{{{universityteam|}}}{{{collegeteam|}}}{{{league|}}}{{{club|}}}{{{team|}}}{{{turnedpro|}}}{{{partner|}}}{{{former_partner|}}}{{{formerpartner|}}}{{{coach|}}}{{{retired|}}}{{{coaching|}}}|Sport}}}} | label34 = Country | data34 = {{{country|}}} | label35 = Sport | data35 = {{{sport|}}} | label36 = Position | data36 = {{{position|}}} | label37 = Shoots | data37 = {{{shoots|}}} | label38 = Catches | data38 = {{{catches|}}} | label39 = Disability | data39 = {{{disability|}}} | label40 = {{#if:{{{disability_class_type|}}}|{{{disability_class_type}}}|[[Disability sport classification|Disability&nbsp;class]]}} | data40 = {{{disability_class|}}} | label41 = {{#if:{{{weight_class_type|}}}|{{{weight_class_type}}}|Weight&nbsp;class}} | data41 = {{{weight_class|}}} | label42 = {{#if:{{{rank_type|}}}|{{{rank_type}}}|Rank}} | data42 = {{{rank|}}} | label43 = {{#if:{{{event_type|}}}|{{{event_type}}}|<span class="nowrap">Event{{Pluralize from text|{{{event|}}}|likely=(s)|plural=s}}</span>}} | data43 = {{{event|}}} | label44 = {{#if:{{{universityteam|}}}|University|College}} team | data44 = {{#if:{{{universityteam|}}}|{{{universityteam}}}|{{{collegeteam|}}}}} | label45 = {{#if:{{{league_type|}}}|{{{league_type}}}|League}} | data45 = {{{league|}}} | class45 = org | label46 = Club | data46 = {{{club|}}} | class46 = org | label47 = Team | data47 = {{{team|}}} | class47 = org | label48 = {{#if:{{{turnedpro_type|}}}|{{{turnedpro_type}}}|Turned pro}} | data48 = {{{turnedpro|}}} | label49 = Partner{{Pluralize from text|{{{partner|}}}|likely=(s)|plural=s}} | data49 = {{{partner|}}} | label50 = Former <span class="nowrap">partner{{Pluralize from text|{{If empty|{{{former_partner|}}}|{{{formerpartner|}}}}}|likely=(s)|plural=s}}</span> | data50 = {{If empty|{{{former_partner|}}}|{{{formerpartner|}}}}} | label51 = Coached by | data51 = {{{coach|}}} | class51 = agent | label52 = Retired | data52 = {{{retired|}}} | label53 = Now coaching | data53 = {{{coaching|}}} | data54 = {{{module2|}}}{{{misc2|}}} | rowstyle54 = display: none; speak: none; | header55 = {{#if:{{{worlds|}}}{{{regionals|}}}{{{nationals|}}}{{{olympics|}}}{{{paralympics|}}}{{{commonwealth|}}}{{{highestranking|}}}{{{pb|}}}|{{#ifeq:{{{child|{{{embed|}}}}}}|yes|Sports achievements and titles|Achievements and titles}}}} | label58 = {{#if:{{{worlds_type|}}}|{{{worlds_type|}}}|World finals}} | data58 = {{{worlds|}}} | label59 = {{#if:{{{regionals_type|}}}|{{{regionals_type|}}}|Regional finals}} | data59 = {{{regionals|}}} | label60 = {{#if:{{{nationals_type|}}}|{{{nationals_type|}}}|National finals}} | data60 = {{{nationals|}}} | label56 = {{#if:{{{olympics_type|}}}|{{{olympics_type|}}}|[[Olympic Games|Olympic finals]]}} | data56 = {{{olympics|}}} | label57 = {{#if:{{{paralympics_type|}}}|{{{paralympics_type|}}}|[[Paralympic Games|Paralympic finals]]}} | data57 = {{{paralympics|}}} | label61 = {{#if:{{{commonwealth_type|}}}|{{{commonwealth_type|}}}|[[Commonwealth Games|Commonwealth finals]]}} | data61 = {{{commonwealth|}}} | label62 = Highest world ranking | data62 = {{{highestranking|}}} | label63 = Personal <span class="nowrap">best{{Pluralize from text|{{{pb|}}}|likely=(s)|plural=s}}</span> | data63 = {{{pb|}}} | header64 = {{Infobox medal templates | title = {{{medaltemplates-title|}}} | medals = {{{medaltemplates|}}} | expand = {{#ifeq:{{lc:{{{show-medals}}}}}|no||yes}} }} | data65 = {{{module3|}}}{{{misc3|}}} | belowstyle = color:darkslategray; | below = {{#if:{{{updated|}}}|Updated on {{{updated}}}.}} }}<includeonly>{{#if:{{{textcolor|}}}|[[Kategori:Pages using infobox sportsperson with textcolor]] }}{{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}} }} }}</includeonly>{{#invoke:Check for unknown parameters | check | ignoreblank = y | unknown = {{Main other|[[Kategori:Pages using {{If empty|{{{template_name|}}}|Infobox sportsperson}} with unknown parameters|_VALUE_{{PAGENAME}}]]}} | preview = Page using [[Templat:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox sportsperson}}]] with unknown parameter "_VALUE_" | child | embed | embed-header | embed_header_large | headercolor | textcolor | honorific_prefix | honorific prefix | honorific-prefix | pre-nominals | name | honorific_suffix | honorific suffix | honorific-suffix | post-nominals | image | image caption | image size | image_caption | image_size | image_upright | imagesize | landscape | alt | caption | native_name | native_name_lang | birth_name | birthname | full_name | fullname | nickname | national_team | nationality | citizenship | birth_date | birth_place | death_date | death_place | resting_place | resting place | restingplace | resting_place_coordinates | resting place coordinates | restingplacecoordinates | monuments | hometown | education | alma_mater | alma mater | occupation | years_active | years active | yearsactive | employer | agent | height_cm | height_ft | height_in | height | weight_kg | weight_lb | weight_st | weight | spouse | life_partner | children | parents | father | mother | relations | relatives| other_interests | other-interests | website | module | misc | country | sport | position | shoots | catches | disability | disability_class | disability_class_type | weight_class | rank_type | rank | event | universityteam | collegeteam | league | club | team | turnedpro | partner | former_partner | formerpartner | coach | retired | coaching | weight_class_type | event_type | league_type | turnedpro_type | module2 | misc2 | worlds_type | worlds | regionals_type | regionals | nationals_type | nationals | olympics_type | olympics | paralympics_type | paralympics | commonwealth_type | commonwealth | highestranking | pb | medaltemplates-title | medaltemplates | show-medals | module3 | misc3 | updated | nocat_wdimage | template_name }}{{#invoke:Check for clobbered parameters|check | template = [[Templat:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox sportsperson}}]] | cat = {{Main other|Category:Pages using {{If empty|{{{template_name|}}}|infobox sportsperson}} with conflicting parameters}} | child; embed | honorific prefix; honorific_prefix; honorific-prefix; pre-nominals | honorific suffix; honorific_suffix; honorific-suffix; post-nominals | image size; image_size; imagesize | image caption; caption; image_caption | birth_name; birthname | full_name; fullname | national_team; nationality | resting_place; resting place; restingplace | resting_place_coordinates; resting place coordinates; restingplacecoordinates | alma_mater; alma mater | years_active; years active; yearsactive | height; height_cm; height_ft | weight; weight_kg; weight_lb | parents; father | parents; mother | relations; relatives | module; misc | universityteam; collegeteam | former_partner; formerpartner | module2; misc2 | module3; misc3 }}<noinclude> {{Documentation}} <!--PLEASE PUT CATEGORIES IN [[Templat:Infobox sportsperson/doc]].--> </noinclude> tupd6qn8s8ahokk9yzfkage6ht4m6aa Templat:Infobox badminton player 10 96 215 214 2024-08-09T09:19:45Z Jon Harald Søby 58 1 semakan diimportkan 214 wikitext text/x-wiki {{short description|Badminton player|noreplace}}{{Infobox | bodyclass = vcard | aboveclass = fn | above = {{{name|<includeonly>{{PAGENAMEBASE}}</includeonly>}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{#invoke:WikidataIB|examine|P18}}}}}|size={{{image_size|{{{size|}}}}}}|sizedefault=frameless|upright=1|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{caption|{{#invoke:WikidataIB |getDescription|qid=}}}}} | headerstyle = background:#e2f0e8; | header1 = <includeonly>Personal information</includeonly> | class2 = nickname | label2 = Nickname(s) | data2 = {{{nickname|}}} | label3 = Full&nbsp;name | data3 = {{{full_name|}}} | label4 = Birth&nbsp;name | data4 = {{{birth_name|}}} | label5 = Country | data5 = {{{country|}}} | label6 = Born | data6 = {{br separated entries|{{{birth_date|}}}|{{{birth_place|}}}}} | label7 = Died | data7 = {{br separated entries|{{{death_date|}}}|{{{death_place|}}}}} | label8 = Residence | data8 = {{{residence|}}} | label9 = Height | data9 = {{#if: {{{height|}}} | {{Infobox person/height|{{{height}}}}} }} | label10 = Weight | data10 = {{#if: {{{weight|}}} | {{Infobox person/weight|{{{weight}}}}} }} | label11 = Years active | data11 = {{{years_active|}}} | label12 = Retired | data12 = {{{retired|}}} | label13 = Handedness | data13 = {{{handedness|}}} | label14 = Coach | data14 = {{{coach|}}} | header15 = {{#if: {{{career_record|}}} {{{titles|}}} {{{played|}}} {{{highest_ranking|}}} {{{date_of_highest_ranking|}}} {{{highest_ranking_date|}}} {{{current_ranking|}}} {{{date_of_current_ranking|}}} {{{current_ranking_date|}}} | <!--use header15 if any of these defined-->{{{event|}}} }} | label16 = Event | data16 = {{#if: {{{career_record|}}} {{{titles|}}} {{{played|}}} {{{highest_ranking|}}} {{{date_of_highest_ranking|}}} {{{highest_ranking_date|}}} {{{current_ranking|}}} {{{date_of_current_ranking|}}} {{{current_ranking_date|}}} | <!--using header15 if any of these defined, else use label/data16--> | {{{event|}}} }} | label17 = Career record | data17 = {{{career_record|}}} | label18 = Career title(s) | data18 = {{{titles|}}} | label19 = Tournaments played | data19 = {{{played|}}} | label20 = Highest ranking | data20 = {{{highest_ranking|}}}{{#if:{{{date_of_highest_ranking|{{{highest_ranking_date|}}}}}}|&nbsp;({{{date_of_highest_ranking|{{{highest_ranking_date}}}}}})}} | label21 = Current ranking | data21 = {{{current_ranking|}}}{{#if:{{{date_of_current_ranking|{{{current_ranking_date|}}}}}}|&nbsp;({{{date_of_current_ranking|{{{current_ranking_date}}}}}})}} | header22 = {{Infobox medal templates | medals = {{{medals| {{{medaltemplates| {{{medal_templates| }}} }}} }}} | expand = {{#ifeq: {{lc: {{{medals-expand| {{{show-medals| }}} }}} }}|no||yes}} | title = {{{medals-title| }}} }} | data23 = {{#if:{{{bwf_id|}}}|[https://bwf.tournamentsoftware.com/player-profile/{{{bwf_id}}} BWF profile]}} | data24 = {{{module|}}} | below = {{#if:{{{updated|}}}|Updated on {{{updated}}}.}} }}{{#invoke:Check for unknown parameters|check|ignoreblank=y |unknown={{main other|[[Kategori:Pages using infobox badminton player with unknown parameters|_VALUE_{{PAGENAME}}]]}} |preview=Page using [[Templat:Infobox badminton player]] with unknown parameter "_VALUE_" | name | image | image_size | size | alt | caption | nickname | full_name | birth_name | country | birth_date | birth_place | death_date | death_place | residence | height | weight | years_active | retired | handedness | coach | career_record | titles | played | highest_ranking | date_of_highest_ranking | highest_ranking_date | current_ranking | date_of_current_ranking | current_ranking_date | event | medals | medaltemplates | medal_templates | medals-expand | show-medals | medals-title | bwf_id | module | updated }}<noinclude>{{Documentation}}</noinclude> m6wjbj5u1jjdz3czrc90s11m6z2pv2z Templat:Infobox company 10 97 217 216 2024-08-09T09:19:46Z Jon Harald Søby 58 1 semakan diimportkan 216 wikitext text/x-wiki {{Infobox | bodyclass = vcard | child = {{lc:{{{embed}}}}} | decat = yes | titleclass = fn org | title = {{#ifeq:{{lc:{{{embed}}}}} | yes | '''Company''' | {{#if:{{{name|}}} | {{{name}}} | {{#if:{{{company_name|}}}|{{{company_name}}}|<includeonly>{{PAGENAMEBASE}}</includeonly>}} }} }} | imageclass = logo | imagestyle = | image = {{#invoke:InfoboxImage |InfoboxImage |image={{#ifeq:{{lc:{{{embed}}}}} | yes | {{{logo|{{{company_logo|}}}}}} |{{#invoke:WikidataIB |getValue |rank=best |P154 |name=logo |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=no |noicon=yes |maxvals=1 |{{{logo|{{{company_logo|}}}}}} }} }} |size={{{logo_size|}}} |sizedefault=frameless |upright={{{logo_upright|1}}} |alt={{{logo_alt|{{{alt|}}}}}} }} | caption = {{{logo_caption|}}} | image2 = {{#invoke:InfoboxImage |InfoboxImage |image={{{image|}}} |size={{{image_size|}}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{image_alt|}}} }} | caption2 = {{{image_caption|}}} | labelstyle = padding-right: 0.5em;<!-- to ensure gap between (long/unwrapped) label and subsequent data on same line --> | datastyle = line-height: 1.35em; | label1 = {{longitem|[[Trade name]]}} | data1 = {{{trade_name|{{{trading_name|}}}}}} | label2 = {{longitem|Native name}} | data2 = {{#if:{{{native_name|}}} | {{#if:{{{native_name_lang|}}} | {{lang|{{{native_name_lang}}}|{{{native_name}}} }} | {{{native_name}}} }} }} | label3 = {{longitem|[[Romanization|Romanized]] name}} | data3 = {{{romanized_name|}}} | label4 = Formerly | class4 = nickname | data4 = {{{former_names|{{{former_name|}}}}}} | label5 = Type | class5 = category | data5 = {{{type|{{{company_type|}}}}}} | label6 = {{longitem|[[Ticker symbol|Traded as]]}} | data6 = {{{traded_as|}}} | label7 = [[International Securities Identification Number|ISIN]] | data7 = {{#invoke:WikidataIB |getValue |rank=best |P946 |name=ISIN |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{ISIN|}}} }} | label8 = Industry | class8 = category | data8 = {{#invoke:WikidataIB |getValue |rank=best |P452 |name=industry |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{industry|}}} }} | label9 = Genre | class9 = category | data9 = {{{genre|}}} | label10 = Predecessor{{#if:{{{predecessors|}}}|s}} | data10 = {{#invoke:WikidataIB |getValue |rank=best |P155 |name=predecessor |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{predecessors|{{{predecessor|}}}}}} }} | label11 = Founded | data11 = {{#invoke:WikidataIB |getValue |rank=best |P571 |name=founded |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{founded|{{{foundation|}}}}}} }} | label12 = Founder{{#if:{{{founders|}}}|s}} | class12 = agent | data12 = {{#invoke:WikidataIB |getValue |rank=best |P112 |name=founder |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{founders|{{{founder|}}}}}} }} | label13 = Defunct | data13 = {{#invoke:WikidataIB |getValue |rank=best |P576 |name=defunct |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{defunct|{{{dissolved|}}}}}} }} | label14 = Fate | data14 = {{{fate|}}} | label15 = Successor{{#if:{{{successors|}}}|s}} | data15 = {{#invoke:WikidataIB |getValue |rank=best |P156 |name=successor |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes |{{{successors|{{{successor|}}}}}} }} | label16 = Headquarters | class16 = {{#if:{{{hq_location|{{{location|}}}}}} | label | adr}} | data16 = {{#if:{{{hq_location|{{{location|}}}}}}{{{hq_location_city|{{{location_city|}}}}}}{{{hq_location_country|{{{location_country|}}}}}} | {{Comma separated entries | 1 = {{{hq_location|{{{location|}}}}}} | 2 = {{#if:{{{hq_location_city|}}}{{{location_city|}}} |<div style="display: inline;" class="locality">{{#if:{{{hq_location_city|}}}{{{location_city|}}} | {{{hq_location_city|{{{location_city|}}}}}} | }}</div>}} | 3 = {{#if:{{{hq_location_country|}}}{{{location_country|}}} |<div style="display: inline;" class="country-name">{{#if:{{{hq_location_country|}}}{{{location_country|}}} | {{{hq_location_country|{{{location_country|}}}}}} | }}</div>}} }} | {{#if:{{#invoke:WikidataIB |getValue |rank=best |P159 |name=hq_location_city |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }}{{#invoke:WikidataIB |getValue |rank=best |P17 |name=hq_location_country |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }} | {{Comma separated entries | 1 = {{#if:{{#invoke:WikidataIB |getValue |rank=best |P159 |name=hq_location_city |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }} |<div style="display: inline;" class="locality">{{#invoke:WikidataIB |getValue |rank=best |P159 |name=headquarters location |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }}</div>}} | 2 = {{#if:{{#invoke:WikidataIB |getValue |rank=best |P17 |name=countrry |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }} |<div style="display: inline;" class="country-name">{{#invoke:WikidataIB |getValue |rank=best |P17 |name=hq_location_country |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 }}</div>}} }} }} }} | label18 = {{longitem|Number of locations}} | data18 = {{#if:{{{num_locations|{{{locations|}}}}}} | {{{num_locations|{{{locations|}}}}}}{{#if:{{{num_locations_year|}}} | &nbsp;({{{num_locations_year}}}) }} }} | label19 = {{longitem|Area{{#if:{{{areas_served|}}}|s}} served}} | data19 = {{{areas_served|{{{area_served|}}}}}} | label20 = {{longitem|Key people}} | class20 = agent | data20 = {{{key_people|}}} | label21 = Products | data21 = {{{products|}}} | label22 = {{longitem|Production output}} | data22 = {{#if:{{{production|}}} | {{{production|}}}{{#if:{{{production_year|}}} | &nbsp;({{{production_year}}}) }} }} | label23 = Brands | data23 = {{{brands|}}} | label24 = Services | class24 = category | data24 = {{{services|}}} | label25 = Revenue | data25 = {{#invoke:WikidataIB |getValue |rank=best |P2139 |name=revenue |qual=P585 |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 |{{{revenue|}}}{{#if:{{{revenue_year|}}} | &nbsp;({{{revenue_year}}}) }} }} | label26 = {{longitem|[[Earnings before interest and taxes|Operating income]]}} | data26 = {{#invoke:WikidataIB |getValue |rank=best |P3362 |name=operating_income |qual=P585 |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 |{{{operating_income|}}}{{#if:{{{income_year|}}} | &nbsp;({{{income_year}}}) }} }} | label27 = {{longitem|[[Net income]]}} | data27 = {{#invoke:WikidataIB |getValue |rank=best |P2295 |name=net_income |qual=P585 |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 |{{{net_income|{{{profit|}}}}}}{{#if:{{{net_income_year|{{{profit_year|}}}}}} | &nbsp;({{{net_income_year|{{{profit_year|}}}}}}) }} }} | label28 = [[Assets under management|AUM]] | data28 = {{{aum|}}} | label29 = {{nowrap|[[Asset|Total assets]]}} | data29 = {{#invoke:WikidataIB |getValue |rank=best |P2403 |name=assets |qual=P585 |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 |{{{assets|}}}{{#if:{{{assets_year|}}} | &nbsp;({{{assets_year}}}) }} }} | label30 = {{nowrap|[[Equity (finance)|Total equity]]}} | data30 = {{#if:{{{equity|}}} | {{{equity}}}{{#if:{{{equity_year|}}} | &nbsp;({{{equity_year}}})}} }} | label31 = Owner{{#if:{{{owners|}}}|s}} | data31 = {{{owners|{{{owner|}}}}}} | label32 = Members | data32 = {{#if:{{{members|}}} | {{{members}}}{{#if:{{{members_year|}}} | &nbsp;({{{members_year}}})}} }} | label33 = {{longitem|Number of employees}} | data33 = {{#invoke:WikidataIB |getValue |rank=best |P1128 |name=num_employees |qual=P585 |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |maxvals=1 |{{{num_employees|}}}{{#if:{{{num_employees_year|}}} | &nbsp;({{{num_employees_year}}}) }} }} | label34 = [[Parent company|Parent]] | data34 = {{#ifeq:{{{owners|}}}{{{owner|}}}{{{parent|}}} || {{#invoke:WikidataIB |getValue |rank=best |P749 |name=parent |qid={{{qid|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |suppressfields={{{suppressfields|}}} |onlysourced=yes |noicon={{{noicon|no}}} |sep="<br />" |sorted=yes }} | {{{parent|}}} }} | label35 = [[Division (business)|Divisions]] | data35 = {{{divisions|}}} | label36 = [[Subsidiary|Subsidiaries]] | data36 = {{{subsid|}}} | data38 = {{{module|}}} | label39 = [[Basel III|Capital ratio]] | data39 = {{{ratio|}}} | label40 = Rating | data40 = {{{rating|}}} | label41 = Website | data41 = {{#if:{{{website|{{{homepage|}}}}}} |{{{website|{{{homepage|}}}}}} |{{#invoke:WikidataIB |url2 |url={{#invoke:WikidataIB |getValue |rank=best |P856 |name=website |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced=yes |maxvals=1}} }} }} | belowstyle = line-height: 1.35em; | below = {{#if:{{{footnotes|}}} | '''Footnotes{{\}}references'''{{break}}{{{footnotes}}} }} }}<!-- Tracking categories: -->{{main other|{{#if:{{{trading_name|}}}|[[Kategori:Pages using infobox company using trading name]] }}{{#ifeq:{{{logo|{{{company_logo|{{wikidata|property|raw|P154}}}}}}}}|{{{logo|{{{company_logo|}}}}}}||[[Kategori:Pages using infobox company with a logo from wikidata]] }}{{#if:{{{image|}}}|{{#ifeq:{{#invoke:string|replace|{{{image|}}}| |_}}|{{#invoke:string|replace|{{{logo|{{{company_logo|{{wikidata|property|raw|P154}}}}}}}}| |_}}|[[Kategori:Pages using infobox company with a duplicate image]]|}}|}} }}<!-- -->{{#invoke:Check for clobbered parameters|check|nested=1|template=Infobox company|cat={{main other|Category:Pages using infobox company with ignored parameters}} |name; company_name|logo; company_logo|logo_alt; alt|trade_name; trading_name|former_names; former_name|type; company_type|predecessors; predecessor|successors; successor|foundation; founded|founders; founder|defunct; dissolved|hq_location; location|hq_location_city; location_city|hq_location_country; location_country|num_locations; locations|areas_served; area_served|net_income; profit|net_income_year; profit_year|owners; owner |homepage; website }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox company with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox company]] with unknown parameter "_VALUE_" | ignoreblank=y | alt | area_served | areas_served | assets | assets_year | aum | brands | company_logo | company_name | company_type | defunct | dissolved | divisions | embed | equity | equity_year | fate | footnotes | former_name | former_names | foundation | founded | founder | founders | genre | homepage | hq_location | hq_location_city | hq_location_country | image | image_alt | image_caption | image_size | image_upright | income_year | industry | ISIN | key_people | location | location_city | location_country | locations | logo | logo_alt | logo_caption | logo_size | logo_upright | members | members_year | module | name | native_name | native_name_lang | net_income | net_income_year | num_employees | num_employees_year | num_locations | num_locations_year | operating_income | owner | owners | parent | predecessor | predecessors | production | production_year | products | profit | profit_year | rating | ratio | revenue | revenue_year | romanized_name | services | subsid | successor | successors | traded_as | trade_name | trading_name | type | website| qid | fetchwikidata | suppressfields | noicon | nocat | demo | categories }}<noinclude> {{Documentation}} </noinclude> 7rt7krzr9zjoa089dddwsht6k29fx08 Templat:Infobox country 10 98 219 218 2024-08-09T09:19:46Z Jon Harald Søby 58 1 semakan diimportkan 218 wikitext text/x-wiki {{infobox |templatestyles = Template:Infobox country/styles.css | bodyclass = ib-country vcard | aboveclass = adr | above = {{#if:{{{conventional_long_name|}}}{{{native_name|}}}{{{name|}}} | {{#if:{{{conventional_long_name|}}} |<div class="fn org country-name">{{{conventional_long_name|}}}</div> }}{{#if:{{{native_name|}}}{{{name|}}} |<div class="ib-country-names"><!-- -->{{br separated entries |{{{native_name|}}} |{{#if:{{{name|}}} |<div class="ib-country-name-style fn org country-name">{{{name|}}}</div> }}}}</div> }}<!-- -->{{#ifeq:{{{micronation|}}}|yes |<span class="fn org">[[Micronation]]</span> }} }} | subheader = {{#if:{{{life_span|}}} | {{{life_span}}} | {{#if:{{{year_start|}}}|{{{year_start}}}{{#if:{{{year_end|}}}|–{{{year_end}}} }} }} }} | image1 = {{#if:{{{image_coat|}}}{{{image_symbol|}}}{{{image_flag|}}}{{{image_flag2|}}} |{{infobox country/imagetable |image1a = {{#invoke:InfoboxImage|InfoboxImage|suppressplaceholder={{main other||no}}|image={{{image_flag|}}}|sizedefault=125px|size={{{flag_width|{{{flag_size|}}}}}}|maxsize=250|border={{yesno |{{{flag_border|}}}|yes=yes|blank=yes}}|alt={{{alt_flag|{{{flag_alt|}}}}}}|title=Flag of {{{common_name|{{{name|{{{linking_name|{{PAGENAME}}}}}}}}}}}}} |image1b = {{#invoke:InfoboxImage|InfoboxImage|suppressplaceholder={{main other||no}}|image={{{image_flag2|}}}|sizedefault=125px|size={{{flag_width|}}}|maxsize=250|border={{yesno |{{{flag2_border|}}}|yes=yes|blank=yes}}|alt={{{alt_flag2|{{{flag_alt2|}}}}}}}} |caption1= {{#ifexist:{{if empty |{{{flag_type_article|}}} |{{{flag|}}} | {{if empty |{{{flag_type|}}} |Flag}} of {{if empty |{{{linking_name|}}} |{{{common_name|}}} |{{{name|}}} |{{PAGENAME}} }} }} |[[{{if empty |{{{flag_type_article|}}} |{{{flag|}}} |{{if empty |{{{flag_type|}}} |Flag}} of {{if empty |{{{linking_name|}}} |{{{common_name|}}} |{{{name|}}} |{{PAGENAME}} }} }}|{{if empty |{{{flag_caption|}}} |{{{flag_type|}}} |Flag}}]] |{{if empty |{{{flag_caption|}}} |{{{flag_type|}}} |Flag}} }} |image2 = {{#invoke:InfoboxImage|InfoboxImage|suppressplaceholder={{main other||no}}|image={{if empty|{{{image_coat|}}}|{{{image_symbol|}}}}} |size={{{symbol_width|{{{coa_size|}}}}}}|sizedefault=85px|alt={{#if:{{{image_coat|}}}|{{{alt_coat|{{{coat_alt|}}}}}}|{{{alt_symbol|}}}}}|title={{{symbol_type|Coat of arms}}} of {{{common_name|{{{name|{{{linking_name|{{PAGENAME}}}}}}}}}}}}} |caption2= {{#ifexist:{{if empty |{{{symbol_type_article|}}} |{{{symbol|}}} |{{if empty |{{{symbol_type|}}} |Coat of arms}} of {{if empty |{{{linking_name|}}} |{{{common_name|}}} |{{{name|}}} |{{PAGENAME}} }} }} |[[{{if empty |{{{symbol_type_article|}}} |{{{symbol|}}} |{{if empty |{{{symbol_type|}}} |Coat of arms}} of {{if empty |{{{linking_name|}}} |{{{common_name|}}} |{{{name|}}} |{{PAGENAME}} }} }} | {{if empty |{{{symbol_type|}}} |Coat of arms}}]] |{{if empty |{{{symbol_type|}}} |Coat of arms}} }} }} }} | data1 = {{#if:{{{national_motto|}}}{{{motto|}}} |'''Motto:&nbsp;'''{{if empty|{{{motto|}}}|{{{national_motto|}}}}}<!-- -->{{#if:{{{englishmotto|}}}|<div>{{{englishmotto}}}</div> }} }} | class2 = anthem | data2 = {{#if:{{{national_anthem|}}}{{{anthem|}}} |'''Anthem:'''&nbsp;{{if empty|{{{national_anthem|}}}|{{{anthem|}}}}} }}{{#if:{{{anthems|}}} |'''Anthems:'''&nbsp;{{{anthems}}} }}{{#if:{{{royal_anthem|}}} | <div class="ib-country-anthem">'''[[Royal anthem]]:'''&nbsp;{{{royal_anthem}}}</div> }}{{#if:{{{flag_anthem|}}} | <div class="ib-country-anthem">'''[[Flag anthem]]:'''&nbsp;{{{flag_anthem}}}</div> }}{{#if:{{{national_march|}}} | <div class="ib-country-anthem">'''National march:'''&nbsp;{{{national_march}}}</div> }}{{#if:{{{territorial_anthem|}}} | <div class="ib-country-anthem">'''Territorial anthem:'''&nbsp;{{{territorial_anthem}}}</div> }}{{#if:{{{regional_anthem|}}} | <div class="ib-country-anthem">'''Regional anthem:'''&nbsp;{{{regional_anthem}}}</div> }}{{#if:{{{state_anthem|}}} | <div class="ib-country-anthem">'''State anthem:'''&nbsp;{{{state_anthem}}}</div> }}{{#if:{{{march|}}} | <div class="ib-country-anthem">'''March:'''&nbsp;{{{march}}}</div> }} | data3 = {{#if:{{{other_symbol|}}}{{{text_symbol|}}} |{{#if:{{{other_symbol_type|}}}{{{text_symbol_type|}}} | '''{{if empty|{{{other_symbol_type|}}}|{{{text_symbol_type|}}}}}'''<br/>}}<!-- -->{{if empty|{{{other_symbol|}}}|{{{text_symbol|}}}}} }} | data4 = {{#if:{{{image_map|}}} |{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map|}}}|size={{{map_width|{{{image_map_size|}}}}}}|upright=1.15|alt={{{alt_map|{{{image_map_alt|}}}}}}|title={{{map_caption|{{{image_map_caption|Location of {{{common_name|{{{name|{{{linking_name|{{PAGENAME}} }}} }}} }}} }}} }}} }}<!-- -->{{#if:{{{map_caption|{{{image_map_caption|}}}}}}|<div class="ib-country-map-caption">{{{map_caption|{{{image_map_caption|}}}}}}</div>}} }} | data5 = {{#if:{{{image_map2|}}} |{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map2|}}}|size={{{map2_width|{{{image_map2_size|}}}}}}|upright=1.15|alt={{{alt_map2|{{{image_map2_alt|}}}}}}|title={{{map_caption2|{{{image_map2_caption|Location of {{{common_name|{{{name|{{{linking_name|{{PAGENAME}} }}} }}} }}} }}} }}} }}<!-- -->{{#if:{{{map_caption2|{{{image_map2_caption|}}}}}}|<div class="ib-country-map-caption">{{{map_caption2|{{{image_map2_caption|}}}}}}</div>}} }} | label6 = Status | data6 = {{#if:{{{status|}}}|{{Infobox country/status text|status={{{status|}}}|status_text={{{status_text|}}}|empire={{{empire|}}}|year_end={{{year_end|}}}|year_exile_start={{{year_exile_start|}}}|year_exile_end={{{year_exile_end|}}} }} }} | label7 = Location | data7 = {{{loctext|}}} | label8 = {{#if:{{{capital_type|}}} | {{{capital_type}}} | Capital }}{{#ifeq: {{#ifeq:{{{largest_city|}}}{{{largest_settlement|}}}|capital |capital<!-- -->|{{#switch:{{{capital}}} | [[{{{largest_city|}}}{{{largest_settlement|}}}]] = capital | {{{largest_city|}}}{{{largest_settlement|}}} = capital | not capital }}<!-- -->}}|capital <!-- (#ifeq:)-->|<!------------------------------------------ capital is largest_city/_settlement: ------------------------------------------- --><div class="ib-country-largest">and {{{largest_settlement_type|largest city}}}</div> }} | data8 = {{#if:{{{capital|}}}|{{{capital}}}{{#if:{{{coordinates|}}}|<br/>{{#invoke:Coordinates|coordinsert|{{{coordinates}}}|type:city}}}} }} | rowclass9 = {{#if:{{{capital|}}}|mergedrow}} | label9 = Capital-in-exile | data9 = {{#ifexist:{{{capital_exile|}}}|[[{{{capital_exile|}}}]]|{{{capital_exile|}}}}} | rowclass10 = {{#if:{{{capital|}}}|mergedrow}} | label10 = {{#if:{{{admin_center_type|}}}| {{{admin_center_type}}} | Administrative&nbsp;center }} | data10 = {{#switch:{{{admin_center|}}} |capital | = |[[{{{capital|}}}]] = |{{{capital|}}} = |#default = {{{admin_center}}}{{#if:{{{capital|}}}||{{#if:{{{coordinates|}}}|<br/>{{#invoke:Coordinates|coordinsert|{{{coordinates}}}|type:city}}}} }} }} | rowclass11 = {{#if:{{{capital|}}}{{{admin_center|}}}|mergedbottomrow}} | label11 = Largest {{{largest_settlement_type|city}}} | data11 = {{#ifeq: {{#ifeq:{{{largest_city|}}}{{{largest_settlement|}}}|capital |capital<!-- -->|{{#switch:{{{capital}}} | [[{{{largest_city|}}}{{{largest_settlement|}}}]] = capital | {{{largest_city|}}}{{{largest_settlement|}}} = capital | not capital }}<!-- -->}}|capital <!-- (#ifeq:)-->|<!-- nothing already appears above --> | {{if empty| {{{largest_city|}}} | {{{largest_settlement|}}} }} }} | rowclass12 = mergedtoprow | label12 = Official&nbsp;languages | data12 = {{{official_languages|}}} | rowclass13 = mergedrow | label13 = <span class="ib-country-lang">{{#if:{{{recognized_languages|}}}|Recognized|Recognised}}&nbsp;languages</span> | data13 = {{if empty| {{{recognized_languages|}}} | {{{recognised_languages|}}} }} | rowclass14 = mergedrow | label14 = <span class="ib-country-lang">{{#if:{{{recognized_national_languages|}}}|Recognized|Recognised}} national&nbsp;languages</span> | data14 = {{if empty| {{{recognized_national_languages|}}} | {{{recognised_national_languages|}}} | {{{national_languages|}}} }} | rowclass15 = mergedrow | label15 = <span class="ib-country-lang">{{#if:{{{recognized_regional_languages|}}}|Recognized|Recognised}} regional&nbsp;languages</span> | data15 = {{if empty| {{{recognized_regional_languages|}}} | {{{recognised_regional_languages|}}} | {{{regional_languages|}}} }} | label16 = Common&nbsp;languages | data16 = {{{common_languages|}}} | rowclass17 = {{#ifeq:{{{languages2_sub|}}}|yes |{{#ifeq:{{{languages_sub|}}}|yes |mergedrow}} |{{#ifeq:{{{languages_sub|}}}|yes |mergedbottomrow}} }} | label17 ={{#ifeq:{{{languages_sub|}}}|yes |<div class="ib-country-lang">{{if empty| {{{languages_type|}}} | Other&nbsp;languages }}</div> |{{if empty| {{{languages_type|}}} | Other&nbsp;languages }} }} | data17 = {{{languages|}}} | rowclass18 = {{#ifeq:{{{languages2_sub|}}}|yes |mergedbottomrow}} | label18 = {{#ifeq:{{{languages2_sub|}}}|yes |<div class="ib-country-lang">{{if empty|{{{languages2_type|}}} | Other&nbsp;languages }}</div> |{{if empty|{{{languages2_type|}}} | Other&nbsp;languages }} }} | data18 = {{{languages2|}}} | label19 = [[Ethnic group|Ethnic&nbsp;groups]] <!-- -->{{#if:{{{ethnic_groups_year|}}} |<div class="ib-country-ethnic"> ({{{ethnic_groups_year}}}){{{ethnic_groups_ref|}}}</div>|<div class="ib-country-ethnic">{{{ethnic_groups_ref|}}}</div>}} | data19 = {{{ethnic_groups|}}} | label20 = Religion <!-- -->{{#if:{{{religion_year|}}} |<div class="ib-country-religion"> ({{{religion_year}}}){{{religion_ref|}}}</div>|<div class="ib-country-religion">{{{religion_ref|}}}</div>}} | data20 = {{{religion|}}} | label21 = [[Demonym|Demonym(s)]] | data21 = {{#if:{{{demonym|}}} |{{#ifexist:{{{demonym}}} people | [[{{{demonym}}} people|{{{demonym}}}]] | {{{demonym}}} }} }} | label22 = Type | data22 = {{{org_type|}}} | label23 = {{if empty|{{{membership_type|}}} | Membership }} | data23 = {{{membership|}}} | label24 = {{#if:{{{government_type|}}} | {{#if:{{{politics_link|}}} | [[{{{politics_link}}}|{{#ifeq:{{{micronation|}}}|yes|Organizational structure|Government}}]]<!-- -->| {{#ifexist:Politics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Politics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|{{#ifeq:{{{micronation|}}}|yes|Organizational structure|Government}}]]<!-- -->| {{#ifeq:{{{micronation|}}}|yes|Organizational structure|Government}}<!-- -->}}<!-- -->}}<!-- -->}} | data24 = {{{government_type|}}} | header25 = {{#if:{{{government_type|}}} || {{#if:{{{leader_title1|}}}{{{leader_name1|}}} | {{#if:{{{name|}}}{{{membership|}}} | <!--template being used for geopolitical org:-->Leaders | <!--template being used for country/territory: -->Government }} }} }} | rowclass26 = mergedrow | data26 = {{#if:{{{leader_name1|}}}|{{Infobox country/multirow|{{{leader_title1|}}} |{{{leader_name1|}}} |{{{leader_title2|}}} |{{{leader_name2|}}} |{{{leader_title3|}}} |{{{leader_name3|}}} |{{{leader_title4|}}} |{{{leader_name4|}}} |{{{leader_title5|}}} |{{{leader_name5|}}} |{{{leader_title6|}}} |{{{leader_name6|}}} |{{{leader_title7|}}} |{{{leader_name7|}}} |{{{leader_title8|}}} |{{{leader_name8|}}} |{{{leader_title9|}}} |{{{leader_name9|}}} |{{{leader_title10|}}} |{{{leader_name10|}}} |{{{leader_title11|}}} |{{{leader_name11|}}} |{{{leader_title12|}}} |{{{leader_name12|}}} |{{{leader_title13|}}} |{{{leader_name13|}}} |{{{leader_title14|}}} |{{{leader_name14|}}} |{{{leader_title15|}}} |{{{leader_name15|}}} }} }} | rowclass27 = mergedrow | label27 = {{#if:{{{title_leader|}}}| {{{title_leader}}} }} | data27 = {{#if:{{{title_leader|}}}|&nbsp;}} | rowclass28 = mergedrow | data28 = {{#if:{{{year_leader1|}}} | {{Infobox country/multirow|{{{year_leader1|}}} |{{{leader1|}}} |{{{year_leader2|}}} |{{{leader2|}}} |{{{year_leader3|}}} |{{{leader3|}}} |{{{year_leader4|}}} |{{{leader4|}}} |{{{year_leader5|}}} |{{{leader5|}}} |{{{year_leader6|}}} |{{{leader6|}}} |{{{year_leader7|}}} |{{{leader7|}}} |{{{year_leader8|}}} |{{{leader8|}}} |{{{year_leader9|}}} |{{{leader9|}}} |{{{year_leader10|}}} |{{{leader10|}}} |{{{year_leader11|}}} |{{{leader11|}}}|{{{year_leader12|}}} |{{{leader12|}}}|{{{year_leader13|}}} |{{{leader13|}}}|{{{year_leader14|}}} |{{{leader14|}}}|{{{year_leader15|}}} |{{{leader15|}}} }} }} | rowclass29 = mergedrow | label29 = {{#if:{{{title_representative|}}}| {{{title_representative}}} }} | data29 = {{#if:{{{title_representative|}}}|&nbsp;}} | rowclass30 = mergedrow | data30 = {{#if:{{{year_representative1|}}}|{{Infobox country/multirow|{{{year_representative1|}}} |{{{representative1|}}} |{{{year_representative2|}}} |{{{representative2|}}} |{{{year_representative3|}}} |{{{representative3|}}} |{{{year_representative4|}}} |{{{representative4|}}} |{{{year_representative5|}}} |{{{representative5|}}}|{{{year_representative6|}}} |{{{representative6|}}}|{{{year_representative7|}}} |{{{representative7|}}}|{{{year_representative8|}}} |{{{representative8|}}} }} }} | rowclass31 = mergedrow | label31 = {{#if:{{{title_deputy|}}}|{{{title_deputy}}} }} | data31 = {{#if:{{{title_deputy|}}}|&nbsp;}} | rowclass32 = mergedrow | data32 = {{#if:{{{year_deputy1|}}}|{{Infobox country/multirow|{{{year_deputy1|}}} |{{{deputy1|}}} |{{{year_deputy2|}}} |{{{deputy2|}}} |{{{year_deputy3|}}} |{{{deputy3|}}} |{{{year_deputy4|}}} |{{{deputy4|}}} |{{{year_deputy5|}}} |{{{deputy5|}}} |{{{year_deputy6|}}} |{{{deputy6|}}}|{{{year_deputy7|}}} |{{{deputy7|}}}|{{{year_deputy8|}}} |{{{deputy8|}}}|{{{year_deputy9|}}} |{{{deputy9|}}}|{{{year_deputy10|}}} |{{{deputy10|}}}|{{{year_deputy11|}}} |{{{deputy11|}}}|{{{year_deputy12|}}} |{{{deputy12|}}}|{{{year_deputy13|}}} |{{{deputy13|}}}|{{{year_deputy14|}}} |{{{deputy14|}}}|{{{year_deputy15|}}} |{{{deputy15|}}} }} }} | label40 = Legislature | data40 = {{{legislature|}}} | rowclass41 = mergedrow | label41 = <div class="ib-country-fake-li">•&nbsp;{{#if:{{{type_house1|}}}|{{{type_house1}}}|[[Upper house]]}}</div> | data41 = {{{upper_house|{{{house1|}}}}}} | rowclass42 = mergedbottomrow | label42 = <div class="ib-country-fake-li">•&nbsp;{{#if:{{{type_house2|}}}|{{{type_house2}}}|[[Lower house]]}}</div> | data42 = {{{lower_house|{{{house2|}}}}}} | rowclass43 = {{#if:{{{established_event1|}}} |mergedtoprow}} | header43 = {{#if:{{{established_event1|}}}{{{sovereignty_type|}}} |{{#if:{{{sovereignty_type|}}} | {{{sovereignty_type}}}<!-- -->{{#if:{{{sovereignty_note|}}} |&nbsp;<div class="ib-country-sovereignty">{{{sovereignty_note}}}</div>}} | {{#if:{{{established|}}}| | Establishment }} }} }} | label44 = Establishment | data44 = {{#if:{{{sovereignty_type|}}} | |{{{established|}}} }} | label45 = {{#if:{{{era|}}}|Historical era|History}} | data45 = {{#if:{{{era|}}} |{{#ifexist:{{{era|}}}|[[{{{era}}}]]|{{{era}}}}} | {{#if:{{{date_start|}}}{{{year_start|}}}|&nbsp;}}}} | rowclass46 = {{#if:{{{established_event1|}}} |mergedrow |mergedbottomrow}} | data46 = {{#if:{{{established_date1|}}}|{{Infobox country/multirow |{{{established_event1|}}} |{{{established_date1||}}} |{{{established_event2|}}} |{{{established_date2||}}} |{{{established_event3|}}} |{{{established_date3|}}} |{{{established_event4|}}} |{{{established_date4|}}} |{{{established_event5|}}} |{{{established_date5|}}} |{{{established_event6|}}} |{{{established_date6|}}} |{{{established_event7|}}} |{{{established_date7|}}} |{{{established_event8|}}} |{{{established_date8|}}} |{{{established_event9|}}} |{{{established_date9|}}} |{{{established_event10|}}} |{{{established_date10|}}} |{{{established_event11|}}} |{{{established_date11|}}} |{{{established_event12|}}} |{{{established_date12|}}} |{{{established_event13|}}} |{{{established_date13|}}} |{{{established_event14|}}} |{{{established_date14|}}} |{{{established_event15|}}} |{{{established_date15|}}} |{{{established_event16|}}} |{{{established_date16|}}} |{{{established_event17|}}} |{{{established_date17|}}} |{{{established_event18|}}} |{{{established_date18|}}} |{{{established_event19|}}} |{{{established_date19|}}} |{{{established_event20|}}} |{{{established_date20|}}} }} }} | rowclass47 = {{#if:{{{date_start|}}}{{{year_start|}}} |mergedrow |mergedbottomrow}} | data47 = {{#if:{{{date_start|}}}{{{year_start|}}}|{{Infobox country/multirow |{{{event_pre|}}} |{{{date_pre|}}} |{{if empty|{{{event_start|}}}|Established}} |{{{date_start|}}} {{{year_start|}}} |{{{event1|}}} |{{{date_event1|}}} |{{{event2|}}} |{{{date_event2|}}} |{{{event3|}}} |{{{date_event3|}}} |{{{event4|}}} |{{{date_event4|}}} |{{{event5|}}} |{{{date_event5|}}} |{{{event6|}}} |{{{date_event6|}}}|{{{event7|}}} |{{{date_event7|}}}|{{{event8|}}} |{{{date_event8|}}}|{{{event9|}}} |{{{date_event9|}}}|{{{event10|}}} |{{{date_event10|}}} |{{if empty|{{{event_end|}}}|Disestablished}} |{{{date_end|}}} {{{year_end|}}} |{{{event_post|}}} |{{{date_post|}}} }} }} | rowclass60 = mergedtoprow | header60 = {{#if:{{{area_km2|}}}{{{area_ha|}}}{{{area_sq_mi|}}}{{{area_acre|}}}{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}}{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}} | {{#if:{{{area_link|}}} | [[{{{area_link}}}|Area {{#ifeq:{{{micronation|}}}|yes|claimed|}}]] | {{#ifexist:Geography of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Geography of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Area {{#ifeq:{{{micronation|}}}|yes|claimed|}}]] | Area {{#ifeq:{{{micronation|}}}|yes|claimed|}}<!-- -->}}<!-- -->}} }} | rowclass61 = {{#if:{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}}{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{FR_metropole|}}}{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label61 = <div class="ib-country-fake-li">•&nbsp;{{{area_label|Total}}}{{{FR_foot4|}}}</div> | data61 = {{#if:{{{area_km2|}}}{{{area_ha|}}}{{{area_sq_mi|}}}{{{area_acre|}}} |{{#if:{{{area_km2|}}}{{{area_sq_mi|}}} |{{convinfobox|{{{area_km2|}}}|km2|{{{area_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_ha|}}}{{{area_acre|}}} |{{convinfobox|{{{area_ha|}}}|ha|{{{area_acre|}}}|acre|abbr=on}} }} }}{{{area_footnote|}}}{{#if:{{{area_rank|}}} |&#32;([[List of countries and dependencies by area|{{{area_rank}}}]]) }} }} | rowclass62 = {{#if:{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{FR_metropole|}}}{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label62 = <div class="ib-country-fake-li">•&nbsp;Land</div> | data62 = {{#if:{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}} |{{#if:{{{area_land_km2|}}}{{{area_land_sq_mi|}}} |{{convinfobox|{{{area_land_km2|}}}|km2|{{{area_land_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_land_ha|}}}{{{area_land_acre|}}} |{{convinfobox|{{{area_land_ha|}}}|ha|{{{area_land_acre|}}}|acre|abbr=on}} }} }}{{{area_land_footnote|}}} }} | rowclass63 = {{#if:{{{FR_metropole|}}}{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label63 = <div class="ib-country-fake-li">•&nbsp;Water</div> | data63 = {{#if:{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}} |{{#if:{{{area_water_km2|}}}{{{area_water_sq_mi|}}} |{{convinfobox|{{{area_water_km2|}}}|km2|{{{area_water_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_water_ha|}}}{{{area_water_acre|}}} |{{convinfobox|{{{area_water_ha|}}}|ha|{{{area_water_acre|}}}|acre|abbr=on}} }} }}{{{area_water_footnote|}}} }} | rowclass64 = {{#if:{{{FR_metropole|}}}{{{area_label2|}}}{{{area_label3|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label64 = <div class="ib-country-fake-li">•&nbsp;Water&nbsp;(%)</div> | data64 = {{{percent_water|}}} | rowclass65 = {{#if:{{{FR_metropole|}}}{{{area_label3|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label65 = <div class="ib-country-fake-li">•&nbsp;{{{area_label2|}}}</div> | data65 = {{#if:{{{area_label2|}}}| {{{area_data2|}}} }} | rowclass66 = {{#if:{{{FR_metropole|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label66 = <div class="ib-country-fake-li">•&nbsp;{{{area_label3|}}}</div> | data66 = {{#if:{{{area_label3|}}}| {{{area_data3|}}} }} | rowclass67 = {{#if:{{{FR_metropole|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label67 = {{{stat_year1|}}}{{{ref_area1|}}} | data67 = {{#if: {{{stat_area1|}}} | {{convinfobox|{{{stat_area1|}}}|km2||sqmi}} }} | rowclass68 = {{#if:{{{FR_metropole|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label68 = {{{stat_year2|}}}{{{ref_area2|}}} | data68 = {{#if: {{{stat_area2|}}} | {{convinfobox|{{{stat_area2|}}}|km2||sqmi}} }} | rowclass69 = {{#if:{{{FR_metropole|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label69 = {{{stat_year3|}}}{{{ref_area3|}}} | data69 = {{#if: {{{stat_area3|}}} | {{convinfobox|{{{stat_area3|}}}|km2||sqmi}} }} | rowclass70 = {{#if:{{{FR_metropole|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label70 = {{{stat_year4|}}}{{{ref_area4|}}} | data70 = {{#if: {{{stat_area4|}}} | {{convinfobox|{{{stat_area4|}}}|km2||sqmi}} }} | rowclass71 = {{#if:{{{FR_metropole|}}}|mergedrow|mergedbottomrow}} | label71 = {{{stat_year5|}}}{{{ref_area5|}}} | data71 = {{#if: {{{stat_area5|}}} | {{convinfobox|{{{stat_area5|}}}|km2||sqmi}} }} | rowclass72 = mergedrow | label72 = <div class="ib-country-fake-li">•&nbsp;{{{FR_metropole}}}</div> | data72 = {{#if:{{{FR_metropole|}}}| <nowiki /> }} | rowclass73 = mergedrow | label73 = <div class="ib-country-fake-li2">•&nbsp;[[Institut Géographique National|IGN]]{{{FR_foot2|}}}</div> | data73 = {{#if:{{{FR_metropole|}}} |{{#if:{{{FR_IGN_area_km2|}}}{{{FR_IGN_area_sq_mi|}}} |{{convinfobox|{{{FR_IGN_area_km2|}}}|km2|{{{FR_IGN_area_sq_mi|}}}|sqmi|abbr=on}}{{#if:{{{FR_IGN_area_rank|}}}|&#32;([[List of countries and dependencies by area|{{{FR_IGN_area_rank|}}}]])}} }} }} | rowclass89 = mergedbottomrow | label89 = <div class="ib-country-fake-li2">•&nbsp;[[Cadastre]]{{{FR_foot3|}}}</div> | data89 = {{#if:{{{FR_metropole|}}} |{{#if:{{{FR_cadastre_area_km2|}}}{{{FR_cadastre_area_sq_mi|}}} | {{convinfobox|{{{FR_cadastre_area_km2|}}}|km2|{{{FR_cadastre_area_sq_mi|}}}|sqmi|abbr=on}}{{#if:{{{FR_cadastre_area_rank|}}}|&#32;([[List of countries and dependencies by area|{{{FR_cadastre_area_rank|}}}]])}} }} }} | rowclass90 = mergedtoprow | header90 = {{#if:{{{population_estimate|}}}{{{population_census|}}}{{{FR_metropole_population|}}}{{{stat_pop1|}}}{{{stat_pop2|}}}{{{stat_pop3|}}}{{{stat_pop4|}}}{{{stat_pop5|}}} |{{#if:{{{population_link|}}} | {{#ifeq:{{{population_link}}}|no|Population|[[{{{population_link}}}|Population]]}}<!-- -->| {{#ifexist:Demographics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Demographics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Population]]<!-- -->| Population<!-- -->}}<!-- -->}} }} | rowclass91 = mergedrow | label91 = <div class="ib-country-fake-li">•&nbsp;{{#if:{{{population_estimate_year|}}} |{{{population_estimate_year}}} estimate|Estimate}}</div> | data91 = {{#if:{{{population_estimate|}}} |{{{population_estimate}}}<!-- -->{{#if:{{{population_estimate_rank|}}} |&#32;([[List of countries and dependencies by population|{{{population_estimate_rank}}}]])}} }} | rowclass92 = mergedrow | label92= <div class="ib-country-fake-li">•&nbsp;{{{population_label2|}}}</div> | data92= {{#if:{{{population_label2|}}}|{{{population_data2|}}}}} | rowclass93= mergedrow | label93= <div class="ib-country-fake-li">•&nbsp;{{{population_label3|}}}</div> | data93= {{#if:{{{population_label3|}}}|{{{population_data3|}}}}} | rowclass94= mergedrow | data94= {{#if:{{{stat_pop1|}}}{{{stat_pop2|}}}{{{stat_pop3|}}}{{{stat_pop4|}}}{{{stat_pop5|}}}|{{infobox country/multirow|{{{stat_year1|}}}{{{ref_pop1|}}} |{{{stat_pop1|}}}|{{{stat_year2|}}}{{{ref_pop2|}}} |{{{stat_pop2|}}}|{{{stat_year3|}}}{{{ref_pop3|}}} |{{{stat_pop3|}}}|{{{stat_year4|}}}{{{ref_pop4|}}} |{{{stat_pop4|}}}|{{{stat_year5|}}}{{{ref_pop5|}}} |{{{stat_pop5|}}} }} }} | rowclass95= mergedrow | label95= <div class="ib-country-fake-li">•&nbsp;{{#if:{{{population_census_year|}}} |{{{population_census_year}}}&nbsp;census|Census}}</div> | data95= {{#if:{{{population_census|}}} |{{{population_census}}}<!-- -->{{#if:{{{population_census_rank|}}} |&#32;([[List of countries and dependencies by population|{{{population_census_rank}}}]])}} }} | rowclass96= mergedrow | label96 = {{#if:{{{FR_metropole_population|}}}|{{#if:{{{FR_total_population_estimate_year|}}}|{{nobold|1=&nbsp;({{{FR_total_population_estimate_year}}})}}}}}} | data96 = {{#if:{{{FR_metropole_population|}}}|{{#if:{{{FR_total_population_estimate_year|}}}|<nowiki />}}}} | rowclass97 = mergedrow | label97= <div class="ib-country-fake-li">•&nbsp;Total{{{FR_foot|}}}</div> | data97= {{#if:{{{FR_metropole_population|}}}|{{#if:{{{FR_total_population_estimate|}}} |{{{FR_total_population_estimate}}}{{#if:{{{FR_total_population_estimate_rank|}}}|&#32;([[List of countries by population in 2005|{{{FR_total_population_estimate_rank}}}]])}} }} }} | rowclass98 = mergedrow | label98= <div class="ib-country-fake-li">•&nbsp;{{{FR_metropole}}}</div> | data98= {{#if:{{{FR_metropole_population|}}}|{{{FR_metropole_population}}}{{#if:{{{FR_metropole_population_estimate_rank|}}} |&#32;([[List of countries by population in 2005|{{{FR_metropole_population_estimate_rank}}}]])}} }} | rowclass99 = mergedbottomrow | label99= <div class="ib-country-fake-li">•&nbsp;Density{{{FR_foot5|}}}</div> | data99= {{#if:{{{population_density_km2|}}}{{{population_density_sq_mi|}}} | {{convinfobox|{{{population_density_km2|}}}|/km2|{{{population_density_sq_mi|}}}|/sqmi|1|abbr=on}}{{{pop_den_footnote|}}}<!-- -->{{#if:{{{population_density_rank|}}} |&#32;([[List of countries and dependencies by population density|{{{population_density_rank}}}]])}} }} | rowclass100 = {{#if:{{{population_estimate|}}}{{{population_census|}}}{{{FR_metropole_population|}}}|mergedbottomrow|mergedtoprow}} | label100 = Membership | data100= {{{nummembers|}}} | rowclass101= mergedtoprow | label101= {{#ifeq:{{{micronation|}}}|yes|Claimed|}} [[Gross domestic product|GDP]]&nbsp;{{nobold|([[Purchasing power parity|PPP]])}} | data101= {{#if:{{{GDP_PPP|}}}{{{GDP_PPP_per_capita|}}} |{{#if:{{{GDP_PPP_year|}}} |{{{GDP_PPP_year}}}&nbsp;}}estimate }} | rowclass102= mergedrow | label102= <div class="ib-country-fake-li">•&nbsp;Total</div> | data102= {{#if:{{{GDP_PPP|}}} |{{{GDP_PPP}}}<!-- -->{{#if:{{{GDP_PPP_rank|}}} |&#32;([[List of countries by GDP (PPP)|{{{GDP_PPP_rank}}}]])}} }} | rowclass103= mergedbottomrow | label103= <div class="ib-country-fake-li">•&nbsp;Per capita</div> | data103= {{#if:{{{GDP_PPP_per_capita|}}} |{{{GDP_PPP_per_capita}}}<!-- -->{{#if:{{{GDP_PPP_per_capita_rank|}}} |&#32;([[List of countries by GDP (PPP) per capita|{{{GDP_PPP_per_capita_rank}}}]])}} }} | rowclass104= mergedtoprow | label104= {{#ifeq:{{{micronation|}}}|yes|Claimed|}} [[Gross domestic product|GDP]]&nbsp;{{nobold|(nominal)}} | data104= {{#if:{{{GDP_nominal|}}}{{{GDP_nominal_per_capita|}}} |{{#if:{{{GDP_nominal_year|}}} |{{{GDP_nominal_year}}}&nbsp;}}estimate }} | rowclass105= mergedrow | label105= <div class="ib-country-fake-li">•&nbsp;Total</div> | data105= {{#if:{{{GDP_nominal|}}} |{{{GDP_nominal}}}<!-- -->{{#if:{{{GDP_nominal_rank|}}} |&#32;([[List of countries by GDP (nominal)|{{{GDP_nominal_rank}}}]])}} }} | rowclass106= mergedbottomrow | label106= <div class="ib-country-fake-li">•&nbsp;Per capita</div> | data106= {{#if:{{{GDP_nominal_per_capita|}}} | {{{GDP_nominal_per_capita}}}<!-- -->{{#if:{{{GDP_nominal_per_capita_rank|}}} |&#32;([[List of countries by GDP (nominal) per capita|{{{GDP_nominal_per_capita_rank}}}]])}} }} | label107= [[Gini_coefficient|Gini]]{{#if:{{{Gini_year|}}} |&nbsp;{{nobold|1=({{{Gini_year}}})}}}} | data107= {{#if:{{{Gini|}}} | {{#switch:{{{Gini_change|}}} |increase = {{increaseNegative}}&nbsp;<!-- -->|decrease = {{decreasePositive}}&nbsp;<!-- -->|steady = {{steady}}&nbsp;<!-- -->}}{{{Gini}}}{{{Gini_ref|}}}<br/><!-- ---------Evaluate and add Gini category:---------- -->{{nowrap|1=<!-- -->{{#iferror:<!-- -->{{#ifexpr:{{{Gini}}}>100 <!-- -->| {{error|Error: Gini value above 100}}<!--Handled by outer #iferror, not visible to users--><!-- -->| {{#ifexpr:{{{Gini}}}>=60 |{{color|red|very high}}<!-- -->| {{#ifexpr:{{{Gini}}}>=46 <!-- -->| {{color|darkred|high}}<!-- -->| {{#ifexpr:{{{Gini}}}>=30 <!-- -->| {{color|orange|medium}}<!-- -->| {{#ifexpr:{{{Gini}}}>=0 <!-- -->| {{color|forestgreen|low}}<!-- -->| {{error|Error:Gini value below 0}}<!--Handled by outer #iferror, not visible to users--><!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->| {{error|Error: Invalid Gini value}}{{#ifeq: {{NAMESPACE}} | {{ns:0}} | [[Kategori:Country articles requiring maintenance]] }}<!-- -->}}<!-- -->}}<!-- -----------Add Gini_rank (if supplied):---------- -->{{#if:{{{Gini_rank|}}} |&nbsp;·&nbsp;[[List of countries by income equality|{{{Gini_rank}}}]]<!-- -->}}<!-- -->}} | label108= [[Human Development Index|HDI]]{{#if:{{{HDI_year|}}} |&nbsp;{{nobold|1=({{{HDI_year}}})}}}} | data108= {{#if:{{{HDI|}}} | {{#switch:{{{HDI_change|}}} |increase = {{increase}}&nbsp;<!-- -->|decrease = {{decrease}}&nbsp;<!-- -->|steady = {{steady}}&nbsp;<!-- -->}}{{{HDI}}}{{{HDI_ref|}}}<br/><!-- ---------Evaluate and add HDI category:--------- -->{{nowrap|1=<!-- -->{{#iferror:<!-- -->{{#ifexpr:{{{HDI}}}>1 <!-- -->| {{error|Error: HDI value greater than 1}}<!--Handled by outer #iferror, not visible to users--><!-- -->| {{#ifexpr:{{{HDI}}}>0.799 <!-- -->| {{color|darkgreen|very high}}<!-- -->| {{#ifexpr:{{{HDI}}}>0.699 <!-- -->| {{color|forestgreen|high}}<!-- -->| {{#ifexpr:{{{HDI}}}>0.549 <!-- -->| {{color|orange|medium}}<!-- -->| {{#ifexpr:{{{HDI}}}>=0.000<!-- -->| {{color|red|low}}<!-- -->| {{error|Error: HDI value less than 0}}<!--Handled by outer #iferror, not visible to users--><!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->| {{error|Error: Invalid HDI value}}{{#ifeq: {{NAMESPACE}} | {{ns:0}} | [[Kategori:Country articles requiring maintenance]] }}<!-- -->}}<!-- -->}}<!-- ----------Add HDI_rank (if supplied):----------- -->{{#if:{{{HDI_rank|}}} |&nbsp;·&nbsp;[[List of countries by Human Development Index|{{{HDI_rank}}}]]<!-- -->}}<!-- -->}} | label109= {{#ifeq:{{{micronation|}}}|yes|Purported currency|Currency}} | data109= {{#if:{{{currency|}}} | {{{currency}}} {{#if:{{{currency_code|}}} |([[ISO 4217|{{{currency_code}}}]])}} }} | rowclass119= {{#if:{{{utc_offset_DST|}}}{{{DST_note|}}} |mergedtoprow}} | label119= Time zone | data119= {{#if:{{{utc_offset|}}} |{{nowrap|[[Coordinated Universal Time|UTC]]{{{utc_offset}}}}} {{#if:{{{time_zone|}}}|({{{time_zone}}})}} |{{{time_zone|}}} }} | rowclass120= {{#if:{{{DST_note|}}} |mergedrow |mergedbottomrow}} | label120= <div class="ib-country-fake-li">•&nbsp;Summer&nbsp;([[Daylight saving time|DST]])</div> | data120= {{#if:{{{utc_offset_DST|}}} |{{nowrap|[[Coordinated Universal Time|UTC]]{{{utc_offset_DST}}}}} {{#if:{{{time_zone_DST|}}}|({{{time_zone_DST}}})|{{#if:{{{DST|}}}|({{{DST}}})}}}} |{{#if:{{{time_zone_DST|}}}|{{{time_zone_DST}}}|{{{DST|}}}}} }} | rowclass121= mergedbottomrow | label121= <nowiki /> | data121= {{{DST_note|}}} | label122 = [[Antipodes]] | data122= {{{antipodes|}}} | label123 = Date format | data123= {{{date_format|}}} | label125= [[Left- and right-hand traffic|Driving side]] | data125= {{#if:{{{drives_on|}}} | {{lcfirst:{{{drives_on}}}}} }} | label126= {{#if:{{{calling_code|}}} |{{#ifexist:Telephone numbers in {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Telephone numbers in {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Calling code]] | Calling code }} }} | data126= {{{calling_code|}}} | label127= [[ISO 3166|ISO 3166 code]] | data127= {{#switch:{{{iso3166code|}}} |omit = <!--(do nothing)--> | = <!--if iso3166code is not supplied: -->{{#if:{{{common_name|}}} | {{#if:{{ISO 3166 code|{{{common_name}}}|nocat=true}} | [[ISO 3166-2:{{ISO 3166 code|{{{common_name}}}}}|{{ISO 3166 code|{{{common_name}}}}}]] }} }} |#default = [[ISO 3166-2:{{uc:{{{iso3166code}}}}}|{{uc:{{{iso3166code}}}}}]] }} | label128= [[Country code top-level domain|Internet TLD]] | data128= {{{cctld|}}} | data129 = {{#if:{{{official_website|}}} |<div class="ib-country-website">'''Website'''<br/>{{{official_website}}}</div> }} | data130= {{#if:{{{image_map3|{{{location_map|}}}}}} | {{#invoke:InfoboxImage|InfoboxImage|image={{{image_map3|{{{location_map|}}}}}}|size={{{map3_width|}}}|upright=1.15|alt={{{alt_map3|}}}|title=Location of {{{common_name|{{{name|{{{linking_name|{{PAGENAME}} }}} }}} }}} }}<!-- -->{{#if:{{{map_caption3|}}}|<div class="ib-country-map-caption3">{{{map_caption3|}}}</div>}} }} | data134 = {{#if:{{{p1|}}}{{{s1|}}} |{{Infobox country/formernext|flag_p1={{{flag_p1|}}}|image_p1={{{image_p1|}}}|p1={{{p1|}}}|border_p1={{{border_p1|}}}|flag_p2={{{flag_p2|}}}|image_p2={{{image_p2|}}}|p2={{{p2|}}}|border_p2={{{border_p2|}}}|flag_p3={{{flag_p3|}}}|image_p3={{{image_p3|}}}|p3={{{p3|}}}|border_p3={{{border_p3|}}}|flag_p4={{{flag_p4|}}}|image_p4={{{image_p4|}}}|p4={{{p4|}}}|border_p4={{{border_p4|}}}|flag_p5={{{flag_p5|}}}|image_p5={{{image_p5|}}}|p5={{{p5|}}}|border_p5={{{border_p5|}}}|flag_p6={{{flag_p6|}}}|image_p6={{{image_p6|}}}|p6={{{p6|}}}|border_p6={{{border_p6|}}}|flag_p7={{{flag_p7|}}}|image_p7={{{image_p7|}}}|p7={{{p7|}}}|border_p7={{{border_p7|}}}|flag_p8={{{flag_p8|}}}|image_p8={{{image_p8|}}}|p8={{{p8|}}}|border_p8={{{border_p8|}}}|flag_p9={{{flag_p9|}}}|image_p9={{{image_p9|}}}|p9={{{p9|}}}|border_p9={{{border_p9|}}}|flag_p10={{{flag_p10|}}}|image_p10={{{image_p10|}}}|p10={{{p10|}}}|border_p10={{{border_p10|}}}|flag_p11={{{flag_p11|}}}|image_p11={{{image_p11|}}}|p11={{{p11|}}}|border_p11={{{border_p11|}}}|flag_p12={{{flag_p12|}}}|image_p12={{{image_p12|}}}|p12={{{p12|}}}|border_p12={{{border_p12|}}}|flag_p13={{{flag_p13|}}}|image_p13={{{image_p13|}}}|p13={{{p13|}}}|border_p13={{{border_p13|}}}|flag_p14={{{flag_p14|}}}|image_p14={{{image_p14|}}}|p14={{{p14|}}}|border_p14={{{border_p14|}}}|flag_p15={{{flag_p15|}}}|image_p15={{{image_p15|}}}|p15={{{p15|}}}|border_p15={{{border_p15|}}}|flag_p16={{{flag_p16|}}}|image_p16={{{image_p16|}}}|p16={{{p16|}}}|border_p16={{{border_p16|}}}|flag_p17={{{flag_p17|}}}|image_p17={{{image_p17|}}}|p17={{{p17|}}}|border_p17={{{border_p17|}}}|flag_p18={{{flag_p18|}}}|image_p18={{{image_p18|}}}|p18={{{p18|}}}|border_p18={{{border_p18|}}}|flag_p19={{{flag_p19|}}}|image_p19={{{image_p19|}}}|p19={{{p19|}}}|border_p19={{{border_p19|}}}|flag_p20={{{flag_p20|}}}|image_p20={{{image_p20|}}}|p20={{{p20|}}}|border_p20={{{border_p20|}}}|flag_p21={{{flag_p21|}}}|image_p21={{{image_p21|}}}|p21={{{p21|}}}|border_p21={{{border_p21|}}}|flag_p22={{{flag_p22|}}}|image_p22={{{image_p22|}}}|p22={{{p22|}}}|border_p22={{{border_p22|}}}|flag_s1={{{flag_s1|}}}|image_s1={{{image_s1|}}}|s1={{{s1|}}}|border_s1={{{border_s1|}}}|flag_s2={{{flag_s2|}}}|image_s2={{{image_s2|}}}|s2={{{s2|}}}|border_s2={{{border_s2|}}}|flag_s3={{{flag_s3|}}}|image_s3={{{image_s3|}}}|s3={{{s3|}}}|border_s3={{{border_s3|}}}|flag_s4={{{flag_s4|}}}|image_s4={{{image_s4|}}}|s4={{{s4|}}}|border_s4={{{border_s4|}}}|flag_s5={{{flag_s5|}}}|image_s5={{{image_s5|}}}|s5={{{s5|}}}|border_s5={{{border_s5|}}}|flag_s6={{{flag_s6|}}}|image_s6={{{image_s6|}}}|s6={{{s6|}}}|border_s6={{{border_s6|}}}|flag_s7={{{flag_s7|}}}|image_s7={{{image_s7|}}}|s7={{{s7|}}}|border_s7={{{border_s7|}}}|flag_s8={{{flag_s8|}}}|image_s8={{{image_s8|}}}|s8={{{s8|}}}|border_s8={{{border_s8|}}}|flag_s9={{{flag_s9|}}}|image_s9={{{image_s9|}}}|s9={{{s9|}}}|border_s9={{{border_s9|}}}|flag_s10={{{flag_s10|}}}|image_s10={{{image_s10|}}}|s10={{{s10|}}}|border_s10={{{border_s10|}}}|flag_s11={{{flag_s11|}}}|image_s11={{{image_s11|}}}|s11={{{s11|}}}|border_s11={{{border_s11|}}}|flag_s12={{{flag_s12|}}}|image_s12={{{image_s12|}}}|s12={{{s12|}}}|border_s12={{{border_s12|}}}|flag_s13={{{flag_s13|}}}|image_s13={{{image_s13|}}}|s13={{{s13|}}}|border_s13={{{border_s13|}}}|flag_s14={{{flag_s14|}}}|image_s14={{{image_s14|}}}|s14={{{s14|}}}|border_s14={{{border_s14|}}}|flag_s15={{{flag_s15|}}}|image_s15={{{image_s15|}}}|s15={{{s15|}}}|border_s15={{{border_s15|}}}|flag_s16={{{flag_s16|}}}|image_s16={{{image_s16|}}}|s16={{{s16|}}}|border_s16={{{border_s16|}}}|flag_s17={{{flag_s17|}}}|image_s17={{{image_s17|}}}|s17={{{s17|}}}|border_s17={{{border_s17|}}}|flag_s18={{{flag_s18|}}}|image_s18={{{image_s18|}}}|s18={{{s18|}}}|border_s18={{{border_s18|}}}|flag_s19={{{flag_s19|}}}|image_s19={{{image_s19|}}}|s19={{{s19|}}}|border_s19={{{border_s19|}}}|flag_s20={{{flag_s20|}}}|image_s20={{{image_s20|}}}|s20={{{s20|}}}|border_s20={{{border_s20|}}}|flag_s21={{{flag_s21|}}}|image_s21={{{image_s21|}}}|s21={{{s21|}}}|border_s21={{{border_s21|}}}|flag_s22={{{flag_s22|}}}|image_s22={{{image_s22|}}}|s22={{{s22|}}}|border_s22={{{border_s22|}}}}} }} | label135 = Today part of | data135 = {{{today|}}} | data136 = {{#if:{{{footnote_a|}}}{{{footnote_b|}}}{{{footnote_c|}}}{{{footnote_d|}}}{{{footnote_e|}}}{{{footnote_f|}}}{{{footnote_g|}}}{{{footnote_h|}}} |<div class="ib-country-fn"><ol class="ib-country-fn-alpha"> {{#if:{{{footnote_a|}}}|<li value=1>{{{footnote_a|}}}</li> }}{{#if:{{{footnote_b|}}}|<li value=2>{{{footnote_b|}}}</li> }}{{#if:{{{footnote_c|}}}|<li value=3>{{{footnote_c|}}}</li> }}{{#if:{{{footnote_d|}}}|<li value=4>{{{footnote_d|}}}</li> }}{{#if:{{{footnote_e|}}}|<li value=5>{{{footnote_e|}}}</li> }}{{#if:{{{footnote_f|}}}|<li value=6>{{{footnote_f|}}}</li> }}{{#if:{{{footnote_g|}}}|<li value=7>{{{footnote_g|}}}</li> }}{{#if:{{{footnote_h|}}}|<li value=8>{{{footnote_h|}}}</li>}} </ol></div>}} | data137 = {{#if:{{{footnote1|}}}{{{footnote2|}}}{{{footnote3|}}}{{{footnote4|}}}{{{footnote5|}}}{{{footnote6|}}}{{{footnote7|}}}{{{footnote8|}}} |<div class="ib-country-fn"><ol class="ib-country-fn-num"> {{#if:{{{footnote1|}}}|<li value=1>{{{footnote1|}}}</li> }}{{#if:{{{footnote2|}}}|<li value=2>{{{footnote2|}}}</li> }}{{#if:{{{footnote3|}}}|<li value=3>{{{footnote3|}}}</li> }}{{#if:{{{footnote4|}}}|<li value=4>{{{footnote4|}}}</li> }}{{#if:{{{footnote5|}}}|<li value=5>{{{footnote5|}}}</li> }}{{#if:{{{footnote6|}}}|<li value=6>{{{footnote6|}}}</li> }}{{#if:{{{footnote7|}}}|<li value=7>{{{footnote7|}}}</li> }}{{#if:{{{footnote8|}}}|<li value=8>{{{footnote8|}}}</li>}} </ol></div>}} | data138 = {{#if:{{{footnotes|}}}|<div class="ib-country-fn">{{{footnotes}}}{{#if:{{{footnotes2|}}}|<br>{{{footnotes2}}}}}</div>}} | belowclass = mergedtoprow noprint | below = {{#if:{{{navbar|}}}| {{navbar|{{{navbar|}}}}} }} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox country with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox country]] with unknown parameter "_VALUE_"|ignoreblank=y| admin_center_type | admin_center | alt_coat | alt_flag | alt_flag2 | alt_map | alt_map2 | alt_map3 | alt_symbol | anthem | anthems | antipodes | area_acre | area_data2 | area_data3 | area_footnote | area_ha | area_km2 | area_label | area_label2 | area_label3 | area_land_acre | area_land_footnote | area_land_ha | area_land_km2 | area_land_sq_mi | area_link | area_rank | area_sq_mi | area_water_acre | area_water_footnote | area_water_ha | area_water_km2 | area_water_sq_mi | regexp1 = border_[ps][%d]+ | calling_code | capital_exile | capital_type | capital | cctld | coa_size | coat_alt | common_languages | common_name | conventional_long_name | coordinates | currency_code | currency | date_end | regexp2 = date_event[%d]+ | date_format | date_post | date_pre | date_start | demonym | regexp3 = deputy[%d]+ | drives_on | DST_note | DST | empire | englishmotto | era | regexp4 = established_date[%d]+ | regexp5 = established_event[%d]+ | established | ethnic_groups_ref | ethnic_groups_year | ethnic_groups | event_end | event_post | event_pre | event_start | regexp6 = event[%d]+ | flag| flag_alt | flag_alt2 | flag_border | flag_caption | flag_caption | regexp7 = flag_[ps][%d]+ | flag_size | flag_type | flag_type_article | flag_width | flag2_border | regexp8 = footnote_[a-h] | regexp9 = footnote[%d]+ | footnotes | footnotes2 | FR_cadastre_area_km2 | FR_cadastre_area_rank | FR_cadastre_area_sq_mi | FR_foot | FR_foot2 | FR_foot3 | FR_foot4 | FR_foot5 | FR_IGN_area_km2 | FR_IGN_area_rank | FR_IGN_area_sq_mi | FR_metropole_population_estimate_rank | FR_metropole_population | FR_metropole | FR_total_population_estimate_rank | FR_total_population_estimate_year | FR_total_population_estimate | GDP_nominal_per_capita_rank | GDP_nominal_per_capita | GDP_nominal_rank | GDP_nominal_year | GDP_nominal | GDP_PPP_per_capita_rank | GDP_PPP_per_capita | GDP_PPP_rank | GDP_PPP_year | GDP_PPP | Gini_change | Gini_rank | Gini_ref | Gini_year | Gini | government_type | HDI_change | HDI_rank | HDI_ref | HDI_year | HDI | house1 | house2 | image_coat | image_flag | image_flag2 | image_map_alt | image_map_caption | image_map_size | image_map | image_map2_alt | image_map2_caption | image_map2_size | image_map2 | image_map3 | regexp10 = image_[ps][%d]+ | image_symbol | iso3166code | languages_sub | languages_type | languages | languages2_sub | languages2_type | languages2 | largest_city | largest_settlement_type | largest_settlement | regexp11 = leader_name[%d]+ | regexp12 = leader_title[%d]+ | regexp13 = leader[%d]+ | legislature | life_span | linking_name | location_map | loctext | lower_house | map_caption | map_caption2 | map_caption3 | map_width | map2_width | map3_width | membership_type | membership | micronation | motto | name | national_anthem | national_languages | national_motto | native_name | navbar | nummembers | official_languages | official_website | org_type | other_symbol_type | other_symbol | regexp14 = [ps][%d]+ | patron_saint | patron_saints | percent_water | politics_link | pop_den_footnote | population_census_rank | population_census_year | population_census | population_data2 | population_data3 | population_density_km2 | population_density_rank | population_density_sq_mi | population_estimate_rank | population_estimate_year | population_estimate | population_label2 | population_label3 | population_link | recognised_languages | recognised_national_languages | recognised_regional_languages | recognized_languages | recognized_national_languages | regexp15 = ref_area[%d]+ | regexp16 = ref_pop[%d]+ | regional_languages | recognized_regional_languages | religion_ref | religion_year | religion | regexp17 = representative[%d]+ | royal_anthem | flag_anthem | march | national_march | regional_anthem | territorial_anthem | state_anthem | sovereignty_note | sovereignty_type | regexp18 = stat_area[%d]+ | regexp19 = stat_pop[%d]+ | regexp20 = stat_year[%d]+ | status_text | status | symbol| symbol_type_article | symbol_type | symbol_width | text_symbol_type | text_symbol | time_zone_DST | time_zone | title_deputy | title_leader | title_representative | today | type_house1 | type_house2 | upper_house | utc_offset_DST | utc_offset | regexp21 = year_deputy[%d]+ | year_end | year_exile_end | year_exile_start | regexp22 = year_leader[%d]+ | regexp23 = year_representative[%d]+ | year_start}}{{main other| {{#if:{{both|{{{image_coat|}}}|{{{image_symbol|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{alt_coat|}}}|{{{alt_symbol|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{motto|}}}|{{{national_motto|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{national_anthem|}}}|{{{anthem|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{other_symbol|}}}|{{{text_symbol|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{other_symbol_type|}}}|{{{text_symbol_type|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{largest_city|}}}|{{{largest_settlement|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{recognized_languages|}}}|{{{recognised_languages|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{recognized_national_languages|}}}|{{{recognised_national_languages|}}}}}{{both|{{{recognized_regional_languages|}}}|{{{recognised_regional_languages|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{{official_languages|}}}||{{#if:{{{recognized_languages|}}}{{{recognised_languages|}}}{{{recognized_national_languages|}}}{{{recognised_national_languages|}}}{{{recognized_regional_languages|}}}{{{recognised_regional_languages|}}}|[[Kategori:Pages using infobox country with syntax problems]]}} }}{{#if:{{both|{{{area_km2|}}}|{{{area_ha|}}}}}{{both|{{{area_land_km2|}}}|{{{area_land_ha|}}}}}{{both|{{{area_water_km2|}}}|{{{area_water_ha|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{both|{{{DST|}}}|{{{time_zone_DST|}}}}}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{{time_zone|}}}{{{utc_offset|}}}||{{#if:{{{time_zone_DST|}}}{{{utc_offset_DST|}}}|[[Kategori:Pages using infobox country with syntax problems]]}} }}{{#if:{{both|{{{sovereignty_type|}}}|{{{established|}}} }}|[[Kategori:Pages using infobox country with syntax problems]] }}{{#if:{{{languages|}}}|{{#if:{{{languages_type|}}}||[[Kategori:Pages using infobox country with syntax problems]]}} }}{{#if:{{{languages2|}}}|{{#if:{{{languages2_type|}}}||[[Kategori:Pages using infobox country with syntax problems]]}} }}{{#if:{{{flag_type|}}}|[[Kategori:Pages using infobox country or infobox former country with the flag caption or type parameters|T{{PAGENAME}}]] }}{{#if:{{{flag_caption|}}}|[[Kategori:Pages using infobox country or infobox former country with the flag caption or type parameters|C{{PAGENAME}}]] }}{{#if:{{{symbol_type|}}}|[[Kategori:Pages using infobox country or infobox former country with the symbol caption or type parameters|T{{PAGENAME}}]] }}{{#if:{{{symbol_caption|}}}|[[Kategori:Pages using infobox country or infobox former country with the symbol caption or type parameters|C{{PAGENAME}}]] }}}}<!-- Tracking categories from merge with {{infobox former country}}. After all cats are empty/have been checked, these can be removed. -->{{#if:{{{status_text|}}}|{{#ifeq:{{ucfirst:{{{status|}}}}}|Colony|{{main other|[[Kategori:Former country articles using status text with Colony or Exile]]}}|{{#ifeq:{{ucfirst:{{{status|}}}}}|Exile|{{main other|[[Kategori:Former country articles using status text with Colony or Exile]]}}}}}} }}<!--End of former country tracking cats--><noinclude> {{Documentation}} </noinclude> a8kfwe84iasf2sosuig361zb4w6tanz Templat:Infobox country/imagetable 10 99 699 222 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 220 wikitext text/x-wiki {{#if:{{both|{{{image1a|}}}{{{image1b|}}}|{{{image2|}}}}}| <div class="noresize" style="display:table; width:100%;"> <div style="display:table-cell; vertical-align:middle; padding-left:5px;"> {{#if:{{{image1a|}}}|<div style="padding-bottom:3px;">{{{image1a|}}}</div>}}{{#if:{{{image1b|}}}|<div style="padding: 2px 0px 3px;">{{{image1b|}}}</div>}} <div>{{{caption1|}}}</div> </div> <div style="display:table-cell; vertical-align:middle; padding: 0px 5px;"> <div style="padding-bottom:3px;">{{{image2|}}}</div> <div>{{{caption2|}}}</div> </div> </div> <!--else:-->| {{#if:{{{image1a|}}}{{{image1b|}}}| <div class="noresize" style="display:table; width:100%;"> {{#if:{{{image1a|}}}|<div style="display:table-cell; vertical-align:middle; padding: 0px 5px 3px;">{{{image1a|}}}</div>}}{{#if:{{{image1b|}}}|<div style="display:table-cell; vertical-align:middle; padding: 0px 5px 3px 0px;">{{{image1b|}}}</div>}} </div> <div>{{{caption1}}}</div> }} {{#if:{{{image2|}}}| <div style="padding: 0px 5px;"> <div style="padding-bottom:3px;">{{{image2|}}}</div> <div>{{{caption2}}}</div> </div> }} }}<noinclude> {{documentation|content= This subtemplate is used to simplify the code of {{tl|infobox country}}. It should not be used directly. }}</noinclude> 7jku97bp0p0ivlcwa8rhbezp1oxmfyz Templat:Infobox country/multirow 10 100 224 223 2024-08-09T09:19:46Z Jon Harald Søby 58 1 semakan diimportkan 223 wikitext text/x-wiki {{infobox | child = yes | decat=yes | rowclass25 = mergedrow | label25 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{1|}}}</div> | data25 = {{{2|}}} | rowclass26 = mergedrow | label26 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{3|}}}</div> | data26 = {{{4|}}} | rowclass27 = mergedrow | label27 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{5|}}}</div> | data27 = {{{6|}}} | rowclass28 = mergedrow | label28 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{7|}}}</div> | data28 = {{{8|}}} | rowclass29 = mergedrow | label29 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{9|}}}</div> | data29 = {{{10|}}} | rowclass30 = mergedrow | label30 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{11|}}}</div> | data30 = {{{12|}}} | rowclass31 = mergedrow | label31 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{13|}}}</div> | data31 = {{{14|}}} | rowclass32 = mergedrow | label32 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{15|}}}</div> | data32 = {{{16|}}} | rowclass33 = mergedrow | label33 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{17|}}}</div> | data33 = {{{18|}}} | rowclass34 = mergedrow | label34 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{19|}}}</div> | data34 = {{{20|}}} | rowclass35 = mergedrow | label35 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{21|}}}</div> | data35 = {{{22|}}} | rowclass36 = mergedrow | label36 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{23|}}}</div> | data36 = {{{24|}}} | rowclass37 = mergedrow | label37 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{25|}}}</div> | data37 = {{{26|}}} | rowclass38 = mergedrow | label38 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{27|}}}</div> | data38 = {{{28|}}} | rowclass39 = mergedrow | label39 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{29|}}}</div> | data39 = {{{30|}}} | rowclass40 = mergedrow | label40 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{31|}}}</div> | data40 = {{{32|}}} | rowclass41 = mergedrow | label41 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{33|}}}</div> | data41 = {{{34|}}} | rowclass42 = mergedrow | label42 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{35|}}}</div> | data42 = {{{36|}}} | rowclass43 = mergedrow | label43 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{37|}}}</div> | data43 = {{{38|}}} | rowclass44 = mergedrow | label44 = <div style="text-indent:-0.9em;margin-left:1.2em;font-weight:normal;">•&nbsp;{{{39|}}}</div> | data44 = {{{40|}}} }}<noinclude> {{documentation|content= This subtemplate is used to simplify the code of {{tl|infobox country}}. It should not be used directly. It can currently take up to 20 rows. }}</noinclude> 9nsijr8p7u3pbw2kdy8euantlx7mohk Templat:Infobox ethnic group 10 101 226 225 2024-08-09T09:19:46Z Jon Harald Søby 58 1 semakan diimportkan 225 wikitext text/x-wiki {{#invoke:Infobox|infoboxTemplate | bodyclass = vcard | titleclass = fn org | title = {{#if:{{{group|}}}|{{{group}}}|<includeonly>{{PAGENAMEBASE}}</includeonly>}} | aboveclass = nickname | abovestyle = font-size:115%; font-weight:normal; | above = {{#if:{{{native_name|}}} |<div {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}} | image1 = {{#invoke:InfoboxImage|InfoboxImage |upright={{{flag_upright|}}}|image={{{flag|}}}|alt={{{flag_alt|}}}|border={{#ifeq:no|{{{flag_border|}}}||yes}}}} | caption1 = {{{flag_caption|}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage |upright={{{image_upright|}}}|alt={{{image_alt|}}}|image={{#if:{{{rawimage|}}}|{{{rawimage}}}|{{{image|}}} }} }} | caption2 = {{{image_caption|{{{caption|}}}}}} | headerstyle = background-color:#b0c4de; | labelstyle = font-weight:normal; | header1 = {{#if:{{{total|}}}{{{total1|}}}{{{population|}}}{{{pop|}}} |Total population}} | data2 = {{{total|{{{population|{{{pop|}}}}}}}}}{{{total_ref|}}} {{#if:{{{genealogy|}}}{{{total_year|}}}{{{total_source|}}}|({{comma separated entries | {{{total_year|}}} | {{#switch:{{{total_source|}}} |census = census |estimate|est = est.}} | {{{genealogy|}}} }})}} {{#if:{{{genealogy|}}} |&#32;{{{genealogy|}}} (including those of [[Genealogy|ancestral descent]])}} | label3 = {{{total1_year|}}} {{#switch:{{{total1_source|}}} |census = (census) |estimate|est = (est.) }} | data3 = {{{total1|}}}{{{total1_ref|}}} | label4 = {{{total2_year|}}} {{#switch:{{{total2_source|}}} |census = (census) |estimate|est = (est.) }} | data4 = {{{total2|}}}{{{total2_ref|}}} | label5 = {{{total3_year|}}} {{#switch:{{{total3_source|}}} |census = (census) |estimate|est = (est.) }} | data5 = {{{total3|}}}{{{total3_ref|}}} | header6 = {{#if:{{{popplace|}}}{{{regions|}}}{{{region1|}}} |Regions with significant populations}} | data7 = {{{popplace|}}}{{{regions|}}} | header8 = {{{tablehdr|}}} | data9 = {{{pop_embed|}}} | label11 = {{{region1|}}} | data11 = {{{pop1|}}}{{{ref1|}}} | label12 = {{{region2|}}} | data12 = {{{pop2|}}}{{{ref2|}}} | label13 = {{{region3|}}} | data13 = {{{pop3|}}}{{{ref3|}}} | label14 = {{{region4|}}} | data14 = {{{pop4|}}}{{{ref4|}}} | label15 = {{{region5|}}} | data15 = {{{pop5|}}}{{{ref5|}}} | label16 = {{{region6|}}} | data16 = {{{pop6|}}}{{{ref6|}}} | label17 = {{{region7|}}} | data17 = {{{pop7|}}}{{{ref7|}}} | label18 = {{{region8|}}} | data18 = {{{pop8|}}}{{{ref8|}}} | label19 = {{{region9|}}} | data19 = {{{pop9|}}}{{{ref9|}}} | label20 = {{{region10|}}} | data20 = {{{pop10|}}}{{{ref10|}}} | label21 = {{{region11|}}} | data21 = {{{pop11|}}}{{{ref11|}}} | label22 = {{{region12|}}} | data22 = {{{pop12|}}}{{{ref12|}}} | label23 = {{{region13|}}} | data23 = {{{pop13|}}}{{{ref13|}}} | label24 = {{{region14|}}} | data24 = {{{pop14|}}}{{{ref14|}}} | label25 = {{{region15|}}} | data25 = {{{pop15|}}}{{{ref15|}}} | label26 = {{{region16|}}} | data26 = {{{pop16|}}}{{{ref16|}}} | label27 = {{{region17|}}} | data27 = {{{pop17|}}}{{{ref17|}}} | label28 = {{{region18|}}} | data28 = {{{pop18|}}}{{{ref18|}}} | label29 = {{{region19|}}} | data29 = {{{pop19|}}}{{{ref19|}}} | label30 = {{{region20|}}} | data30 = {{{pop20|}}}{{{ref20|}}} | label31 = {{{region21|}}} | data31 = {{{pop21|}}}{{{ref21|}}} | label32 = {{{region22|}}} | data32 = {{{pop22|}}}{{{ref22|}}} | label33 = {{{region23|}}} | data33 = {{{pop23|}}}{{{ref23|}}} | label34 = {{{region24|}}} | data34 = {{{pop24|}}}{{{ref24|}}} | label35 = {{{region25|}}} | data35 = {{{pop25|}}}{{{ref25|}}} | label36 = {{{region26|}}} | data36 = {{{pop26|}}}{{{ref26|}}} | label37 = {{{region27|}}} | data37 = {{{pop27|}}}{{{ref27|}}} | label38 = {{{region28|}}} | data38 = {{{pop28|}}}{{{ref28|}}} | label39 = {{{region29|}}} | data39 = {{{pop29|}}}{{{ref29|}}} | label40 = {{{region30|}}} | data40 = {{{pop30|}}}{{{ref30|}}} | label41 = {{{region31|}}} | data41 = {{{pop31|}}}{{{ref31|}}} | label42 = {{{region32|}}} | data42 = {{{pop32|}}}{{{ref32|}}} | label43 = {{{region33|}}} | data43 = {{{pop33|}}}{{{ref33|}}} | label44 = {{{region34|}}} | data44 = {{{pop34|}}}{{{ref34|}}} | label45 = {{{region35|}}} | data45 = {{{pop35|}}}{{{ref35|}}} | label46 = {{{region36|}}} | data46 = {{{pop36|}}}{{{ref36|}}} | label47 = {{{region37|}}} | data47 = {{{pop37|}}}{{{ref37|}}} | label48 = {{{region38|}}} | data48 = {{{pop38|}}}{{{ref38|}}} | label49 = {{{region39|}}} | data49 = {{{pop39|}}}{{{ref39|}}} | label50 = {{{region40|}}} | data50 = {{{pop40|}}}{{{ref40|}}} | label51 = {{{region41|}}} | data51 = {{{pop41|}}}{{{ref41|}}} | label52 = {{{region42|}}} | data52 = {{{pop42|}}}{{{ref42|}}} | label53 = {{{region43|}}} | data53 = {{{pop43|}}}{{{ref43|}}} | label54 = {{{region44|}}} | data54 = {{{pop44|}}}{{{ref44|}}} | label55 = {{{region45|}}} | data55 = {{{pop45|}}}{{{ref45|}}} | label56 = {{{region46|}}} | data56 = {{{pop46|}}}{{{ref46|}}} | label57 = {{{region47|}}} | data57 = {{{pop47|}}}{{{ref47|}}} | label58 = {{{region48|}}} | data58 = {{{pop48|}}}{{{ref48|}}} | label59 = {{{region49|}}} | data59 = {{{pop49|}}}{{{ref49|}}} | label60 = {{{region50|}}} | data60 = {{{pop50|}}}{{{ref50|}}} | header61 = {{#if:{{{langs|}}}{{{languages|}}} |Languages}} | data62 = {{{langs|}}}{{{languages|}}} | header63 = {{#if:{{{rels|}}}{{{religions|}}} |Religion}} | data64 = {{{rels|}}}{{{religions|}}} | header65 = {{#if:{{{related_groups|}}}{{{related|}}}{{{related-c|}}} |Related ethnic groups}} | data66 = {{{related-c|}}}{{#if:{{{related_groups|}}}{{{related|}}} |{{{related_groups|}}}{{{related|}}} {{main other |[[Kategori:"Related ethnic groups" needing confirmation]]}} }} | belowstyle = padding-top:0.5em;text-align:left; | below = {{#if:{{{footnotes|}}} |<hr/>{{{footnotes}}} }} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|1=[[Kategori:Pages using infobox ethnic group with unsupported parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox ethnic group]] with unknown parameter "_VALUE_"|ignoreblank=y | caption | flag |flag_alt | flag_border | flag_caption | flag_upright | footnotes | genealogy | group | image |image_alt | image_caption | image_upright | langs | languages | native_name | native_name_lang | pop | pop_embed | pop1 | pop10 | pop11 | pop12 | pop13 | pop14 | pop15 | pop16 | pop17 | pop18 | pop19 | pop2 | pop20 | pop21 | pop22 | pop23 | pop24 | pop25 | pop26 | pop27 | pop28 | pop29 | pop3 | pop30 | pop31 | pop32 | pop33 | pop34 | pop35 | pop36 | pop37 | pop38 | pop39 | pop4 | pop40 | pop41 | pop42 | pop43 | pop44 | pop45 | pop46 | pop47 | pop48 | pop49 | pop5 | pop50 | pop6 | pop7 | pop8 | pop9 | popplace | population | rawimage | ref1 | ref10 | ref11 | ref12 | ref13 | ref14 | ref15 | ref16 | ref17 | ref18 | ref19 | ref2 | ref20 | ref21 | ref22 | ref23 | ref24 | ref25 | ref26 | ref27 | ref28 | ref29 | ref3 | ref30 | ref31 | ref32 | ref33 | ref34 | ref35 | ref36 | ref37 | ref38 | ref39 | ref4 | ref40 | ref41 | ref42 | ref43 | ref44 | ref45 | ref46 | ref47 | ref48 | ref49 | ref5 | ref50 | ref6 | ref7 | ref8 | ref9 | region1 | region10 | region11 | region12 | region13 | region14 | region15 | region16 | region17 | region18 | region19 | region2 | region20 | region21 | region22 | region23 | region24 | region25 | region26 | region27 | region28 | region29 | region3 | region30 | region31 | region32 | region33 | region34 | region35 | region36 | region37 | region38 | region39 | region4 | region40 | region41 | region42 | region43 | region44 | region45 | region46 | region47 | region48 | region49 | region5 | region50 | region6 | region7 | region8 | region9 | regions | related | related_groups | related-c | religions | rels | tablehdr | total | total_ref | total_source | total_year | total1 | total1_ref | total1_source | total1_year | total2 | total2_ref | total2_source | total2_year | total3 | total3_ref | total3_source | total3_year }}{{main other| {{#ifeq:{{{image|♦}}}{{{rawimage|♦}}}{{{image_caption|♦}}}{{{caption|♦}}}|♦♦♦♦||[[Kategori:Articles using infobox ethnic group with image parameters|{{#if:{{{image|}}}{{{rawimage|}}}{{{image_caption|}}}{{{caption|}}}|{{#ifexpr:{{#invoke:String|find|{{{image|}}}{{{rawimage|}}}{{{image_caption|}}}{{{caption|}}}|<div}}>0|ID|IR}}|Β}}{{PAGENAME}}]]}} {{#ifeq:{{{flag|♦}}}{{{flag_caption|♦}}}|♦♦||[[Kategori:Articles using infobox ethnic group with image parameters|{{#if:{{{flag|}}}{{{flag_caption|}}}|F|ψ}}{{PAGENAME}}]]}} {{#ifexpr:{{#ifeq:{{{total|a}}}|{{{total|b}}}|1|0}}+{{#ifeq:{{{population|a}}}|{{{population|b}}}|1|0}}+{{#ifeq:{{{pop|a}}}|{{{pop|b}}}|1|0}} > 1|[[Kategori:Articles using Template:Infobox ethnic group with deprecated parameters|¶]]}} }}<noinclude> {{Documentation}} </noinclude> bw2c7gv0v506mx5f03ob4nbc4bkhbgf Templat:Infobox government agency 10 102 228 227 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 227 wikitext text/x-wiki {{infobox | child = {{{child|}}} | subbox = {{{subbox|}}} | italic title = {{{italic title|no}}} | titlestyle = font-size: 125%; | title = {{{name|{{{agency_name|{{PAGENAMEBASE}}}}}}}} | subheader = {{Br separated entries | 1 = {{{native_name|{{{nativename|}}}}}} | 2 = {{{native_name_a|{{{nativename_a|}}}}}} | 3 = {{{native_name_r|{{{nativename_r|}}}}}} }} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{seal|}}}|size={{{seal_size|{{{seal_width|}}}}}}| alt={{{seal_alt|}}}|sizedefault=frameless}} | caption = {{{seal_caption|}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{logo|}}}|size={{{logo_size|{{{logo_width|}}}}}}| alt={{{logo_alt|}}}|sizedefault=frameless}} | caption2 = {{{logo_caption|}}} | headerstyle = background-color: #efefef | data1 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{picture|}}}}}}|size={{{image_size|{{{picture_width|}}}}}}|alt={{{image_alt|}}}|sizedefault=frameless}}{{#if: {{{image_caption|{{{picture_caption|}}}}}} | {{break}}{{{image_caption|{{{picture_caption}}}}}} }} | header2 = {{#if: {{{formed|}}}{{{preceding1|}}}{{{dissolved|}}}{{{superseding|}}}{{{jurisdiction|}}}{{{headquarters|}}}{{{motto|}}}{{{employees|}}}{{{budget|}}}{{{minister1_name|}}}{{{chief1_name|}}}{{{parent_agency|}}}{{{child1_agency|}}}{{{keydocument1|}}}{{{website|}}}{{{footnotes|}}}{{{map|}}}{{{map_caption|}}} | {{ucfirst: {{#if:{{{type|}}}|{{{type}}}|Agency }} }} overview }} | label3 = Formed | data3 = {{{formed|}}} | label4 = {{#if:{{{preceding1|}}} | {{#if:{{{preceding2|}}}|Preceding agencies|Preceding {{{type|agency}}} }} }} | data4 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{{preceding1|}}} | 2 = {{{preceding2|}}} | 3 = {{{preceding3|}}} | 4 = {{{preceding4|}}} | 5 = {{{preceding5|}}} | 6 = {{{preceding6|}}} }} | label5 = Dissolved | data5 = {{{dissolved|}}} | label6 = {{#if:{{{superseding|{{{superseding1|}}}}}} | {{#if:{{{superseding2|}}}|Superseding agencies|Superseding {{{service|agency}}} }} }} | data6 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{{superseding|{{{superseding1|}}}}}} | 2 = {{{superseding2|}}} | 3 = {{{superseding3|}}} | 4 = {{{superseding4|}}} | 5 = {{{superseding5|}}} | 6 = {{{superseding6|}}} }} | label7 = Type | data7 = {{{agency_type|}}} | class7 = category | label8 = Jurisdiction | data8 = {{{jurisdiction|}}} | label9 = Status | data9 = {{{status|}}} | label10 = Headquarters | data10 = {{{headquarters|}}}{{#if: {{{coordinates|}}}|{{break}}{{{coordinates|}}} }} | label11 = Motto | data11 = {{{motto|}}} | label12 = Employees | data12 = {{{employees|}}} | label13 = Annual budget | data13 = {{{budget|}}} | label14 = {{#if:{{{minister2_name|}}}|{{#if:{{{minister_type|}}}|{{{minister_type}}}|Ministers}} responsible|{{#if:{{{minister_type|}}}|{{{minister_type}}}|Minister}} responsible}} | data14 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{#if:{{{minister1_name|}}}|{{{minister1_name|}}}{{#if:{{{minister1_pfo|}}}|, {{{minister1_pfo}}}}}|{{#if:{{{minister1_pfo|}}}|{{{minister1_pfo}}}}}}} | 2 = {{#if:{{{minister2_name|}}}|{{{minister2_name|}}}{{#if:{{{minister2_pfo|}}}|, {{{minister2_pfo}}}}}|{{#if:{{{minister2_pfo|}}}|{{{minister2_pfo}}}}}}} | 3 = {{#if:{{{minister3_name|}}}|{{{minister3_name|}}}{{#if:{{{minister3_pfo|}}}|, {{{minister3_pfo}}}}}|{{#if:{{{minister3_pfo|}}}|{{{minister3_pfo}}}}}}} | 4 = {{#if:{{{minister4_name|}}}|{{{minister4_name|}}}{{#if:{{{minister4_pfo|}}}|, {{{minister4_pfo}}}}}|{{#if:{{{minister4_pfo|}}}|{{{minister4_pfo}}}}}}} | 5 = {{#if:{{{minister5_name|}}}|{{{minister5_name|}}}{{#if:{{{minister5_pfo|}}}|, {{{minister5_pfo}}}}}|{{#if:{{{minister5_pfo|}}}|{{{minister5_pfo}}}}}}} | 6 = {{#if:{{{minister6_name|}}}|{{{minister6_name|}}}{{#if:{{{minister6_pfo|}}}|, {{{minister6_pfo}}}}}|{{#if:{{{minister6_pfo|}}}|{{{minister6_pfo}}}}}}} | 7 = {{#if:{{{minister7_name|}}}|{{{minister7_name|}}}{{#if:{{{minister7_pfo|}}}|, {{{minister7_pfo}}}}}|{{#if:{{{minister7_pfo|}}}|{{{minister7_pfo}}}}}}} | 8 = {{#if:{{{minister8_name|}}}|{{{minister8_name|}}}{{#if:{{{minister8_pfo|}}}|, {{{minister8_pfo}}}}}|{{#if:{{{minister8_pfo|}}}|{{{minister8_pfo}}}}}}} }} | label15 = {{#if:{{{deputyminister2_name|}}}|{{#if:{{{deputyminister_type|}}}|{{{deputyminister_type}}}|Deputy Ministers}} responsible|{{#if:{{{deputyminister_type|}}}|{{{deputyminister_type}}}|Deputy Minister}} responsible}} | data15 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{#if:{{{deputyminister1_name|}}}|{{{deputyminister1_name|}}}{{#if:{{{deputyminister1_pfo|}}}|, {{{deputyminister1_pfo}}}}}|{{#if:{{{deputyminister1_pfo|}}}|{{{deputyminister1_pfo}}}}}}} | 2 = {{#if:{{{deputyminister2_name|}}}|{{{deputyminister2_name|}}}{{#if:{{{deputyminister2_pfo|}}}|, {{{deputyminister2_pfo}}}}}|{{#if:{{{deputyminister2_pfo|}}}|{{{deputyminister2_pfo}}}}}}} | 3 = {{#if:{{{deputyminister3_name|}}}|{{{deputyminister3_name|}}}{{#if:{{{deputyminister3_pfo|}}}|, {{{deputyminister3_pfo}}}}}|{{#if:{{{deputyminister3_pfo|}}}|{{{deputyminister3_pfo}}}}}}} | 4 = {{#if:{{{deputyminister4_name|}}}|{{{deputyminister4_name|}}}{{#if:{{{deputyminister4_pfo|}}}|, {{{deputyminister4_pfo}}}}}|{{#if:{{{deputyminister4_pfo|}}}|{{{deputyminister4_pfo}}}}}}} | 5 = {{#if:{{{deputyminister5_name|}}}|{{{deputyminister5_name|}}}{{#if:{{{deputyminister5_pfo|}}}|, {{{deputyminister5_pfo}}}}}|{{#if:{{{deputyminister5_pfo|}}}|{{{deputyminister5_pfo}}}}}}} | 6 = {{#if:{{{deputyminister6_name|}}}|{{{deputyminister6_name|}}}{{#if:{{{deputyminister6_pfo|}}}|, {{{deputyminister6_pfo}}}}}|{{#if:{{{deputyminister6_pfo|}}}|{{{deputyminister6_pfo}}}}}}} | 7 = {{#if:{{{deputyminister7_name|}}}|{{{deputyminister7_name|}}}{{#if:{{{deputyminister7_pfo|}}}|, {{{deputyminister7_pfo}}}}}|{{#if:{{{deputyminister7_pfo|}}}|{{{deputyminister7_pfo}}}}}}} | 8 = {{#if:{{{deputyminister8_name|}}}|{{{deputyminister8_name|}}}{{#if:{{{deputyminister8_pfo|}}}|, {{{deputyminister8_pfo}}}}}|{{#if:{{{deputyminister8_pfo|}}}|{{{deputyminister8_pfo}}}}}}} }} | label16 = {{ucfirst: {{#if:{{{type|}}}|{{{type}}}|Agency}}}} executive{{#if:{{{chief2_name|}}}|s}} | data16 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{#if:{{{chief1_name|}}}|{{{chief1_name|}}}{{#if:{{{chief1_position|}}}|, {{{chief1_position}}}}}|{{#if:{{{chief1_position|}}}|{{{chief1_position}}}}}}} | 2 = {{#if:{{{chief2_name|}}}|{{{chief2_name|}}}{{#if:{{{chief2_position|}}}|, {{{chief2_position}}}}}|{{#if:{{{chief2_position|}}}|{{{chief2_position}}}}}}} | 3 = {{#if:{{{chief3_name|}}}|{{{chief3_name|}}}{{#if:{{{chief3_position|}}}|, {{{chief3_position}}}}}|{{#if:{{{chief3_position|}}}|{{{chief3_position}}}}}}} | 4 = {{#if:{{{chief4_name|}}}|{{{chief4_name|}}}{{#if:{{{chief4_position|}}}|, {{{chief4_position}}}}}|{{#if:{{{chief4_position|}}}|{{{chief4_position}}}}}}} | 5 = {{#if:{{{chief5_name|}}}|{{{chief5_name|}}}{{#if:{{{chief5_position|}}}|, {{{chief5_position}}}}}|{{#if:{{{chief5_position|}}}|{{{chief5_position}}}}}}} | 6 = {{#if:{{{chief6_name|}}}|{{{chief6_name|}}}{{#if:{{{chief6_position|}}}|, {{{chief6_position}}}}}|{{#if:{{{chief6_position|}}}|{{{chief6_position}}}}}}} | 7 = {{#if:{{{chief7_name|}}}|{{{chief7_name|}}}{{#if:{{{chief7_position|}}}|, {{{chief7_position}}}}}|{{#if:{{{chief7_position|}}}|{{{chief7_position}}}}}}} | 8 = {{#if:{{{chief8_name|}}}|{{{chief8_name|}}}{{#if:{{{chief8_position|}}}|, {{{chief8_position}}}}}|{{#if:{{{chief8_position|}}}|{{{chief8_position}}}}}}} | 9 = {{#if:{{{chief9_name|}}}|{{{chief9_name|}}}{{#if:{{{chief9_position|}}}|, {{{chief9_position}}}}}|{{#if:{{{chief9_position|}}}|{{{chief9_position}}}}}}} }} | label17 = Parent department | data17 = {{{parent_department|}}} | label18 = Parent {{#if:{{{parent_agency_type|}}}|{{{parent_agency_type}}}|{{#if:{{{type|}}}|{{{type}}}|agency}}}} | data18 = {{{parent_agency|}}} | label19 = {{#if:{{{child2_agency|}}}|Child agencies|Child {{#if:{{{type|}}}|{{{type}}}|agency}}}} | data19 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{{child1_agency|}}} | 2 = {{{child2_agency|}}} | 3 = {{{child3_agency|}}} | 4 = {{{child4_agency|}}} | 5 = {{{child5_agency|}}} | 6 = {{{child6_agency|}}} | 7 = {{{child7_agency|}}} | 8 = {{{child8_agency|}}} | 9 = {{{child9_agency|}}} | 10 = {{{child10_agency|}}} | 11 = {{{child11_agency|}}} | 12 = {{{child12_agency|}}} | 13 = {{{child13_agency|}}} | 14 = {{{child14_agency|}}} | 15 = {{{child15_agency|}}} | 16 = {{{child16_agency|}}} | 17 = {{{child17_agency|}}} | 18 = {{{child18_agency|}}} | 19 = {{{child19_agency|}}} | 20 = {{{child20_agency|}}} | 21 = {{{child21_agency|}}} | 22 = {{{child22_agency|}}} | 23 = {{{child23_agency|}}} | 24 = {{{child24_agency|}}} | 25 = {{{child25_agency|}}} }} | label20 = {{#if:{{{keydocument2|}}}|Key documents|Key document}} | data20 = {{Unbulleted list|item_style=text-indent: -1em; padding-left: 1em; | 1 = {{{keydocument1|}}} | 2 = {{{keydocument2|}}} | 3 = {{{keydocument3|}}} | 4 = {{{keydocument4|}}} | 5 = {{{keydocument5|}}} | 6 = {{{keydocument6|}}} }} | label21 = Website | data21 = {{{website|}}} | label22 = Agency ID | data22 = {{{agency_id|}}} | header23 = {{#if:{{{map|}}}|{{Infobox|child=yes|decat=yes | title = Map | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{map|}}}|alt={{{map_alt}}}|size={{{map_size|{{{map_width|}}}}}}|sizedefault=frameless}} | caption = {{{map_caption|}}} }}}} | image3 = {{#if:{{{pushpin_map|{{{map_type|}}}}}}|{{Location map|{{{pushpin_map|{{{map_type|}}}}}} |alt = {{{pushpin_map_alt|{{{map_alt|}}}}}} |coordinates = {{{coordinates|}}} |float = center |mark = {{{map_dot_mark|Red pog.svg}}} |marksize= 7 |label = {{{pushpin_label|{{{map dot label|{{{map_dot_label|}}}}}}}}} |relief = {{{pushpin_relief|{{{relief|}}}}}} |border = none |caption = <!--leave blank--> |width = {{{pushpin_mapsize|{{{map_size|}}}}}} }} |<!-- else if map_type is blank -->{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map|}}}|size={{{map_size|}}}|sizedefault=frameless|alt={{{map_alt|}}}}}<!-- end if map_type -->}} | caption3 = {{#if:{{{pushpin_map|{{{map_type|}}}}}} |{{{pushpin_map_caption|{{{map_caption|Location within {{#invoke:Location map|data|{{{pushpin_map|{{{map_type}}}}}}|name}}}}}}}} |{{#if:{{{image_map|}}} |{{{map_caption|}}} }}}} | header24 = {{#if:{{{footnotes|}}}|Footnotes}} | data25 = {{{footnotes|}}} | data26 = {{{embed|}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox government agency with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox government agency]] with unknown parameter "_VALUE_"|ignoreblank=y| agency_id | agency_name | agency_type | budget | chief1_name | chief1_position | chief2_name | chief2_position | chief3_name | chief3_position | chief4_name | chief4_position | chief5_name | chief5_position | chief6_name | chief6_position | chief7_name | chief7_position | chief8_name | chief8_position | chief9_name | chief9_position | child | child1_agency | child10_agency | child11_agency | child12_agency | child13_agency | child14_agency | child15_agency | child16_agency | child17_agency | child18_agency | child19_agency | child2_agency | child20_agency | child21_agency | child22_agency | child23_agency | child24_agency | child25_agency | child3_agency | child4_agency | child5_agency | child6_agency | child7_agency | child8_agency | child9_agency | coordinates | deputyminister_type | deputyminister1_name | deputyminister1_pfo | deputyminister2_name | deputyminister2_pfo | deputyminister3_name | deputyminister3_pfo | deputyminister4_name | deputyminister4_pfo | deputyminister5_name | deputyminister5_pfo | deputyminister6_name | deputyminister6_pfo | deputyminister7_name | deputyminister7_pfo | deputyminister8_name | deputyminister8_pfo | dissolved | embed | employees | footnotes | formed | headquarters | image | image_caption |image_alt | image_map | image_size | italic title | jurisdiction | keydocument1 | keydocument2 | keydocument3 | keydocument4 | keydocument5 | keydocument6 | logo | logo_caption |logo_alt| logo_size | logo_width | map | map_alt | map_caption | map_dot_label | map_dot_mark | map_size | map_type | map_width | minister_type | minister1_name | minister1_pfo | minister2_name | minister2_pfo | minister3_name | minister3_pfo | minister4_name | minister4_pfo | minister5_name | minister5_pfo | minister6_name | minister6_pfo | minister7_name | minister7_pfo | minister8_name | minister8_pfo | motto | name | native_name | native_name_a | native_name_r | nativename | nativename_a | nativename_r | parent_agency | parent_agency_type | parent_department | picture | picture_caption | picture_width | preceding1 | preceding2 | preceding3 | preceding4 | preceding5 | preceding6 | region_code | seal |seal_alt | seal_caption | seal_size | seal_width | service | status | subbox | superseding | superseding1 | superseding2 | superseding3 | superseding4 | superseding5 | superseding6 | type | website }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 0f6h7gb8gsbuzq2ro2ajy0y8xd6gns7 Templat:Infobox holiday 10 103 230 229 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 229 wikitext text/x-wiki {{Infobox | abovestyle = background-color: {{#switch:{{lc:{{{type|}}} }} | islam|islamic = lightgreen | judaism|juda|jewish|jew = lightskyblue | buddhism|buddhist|buddha = palegoldenrod | christian|christ|christianity = lavender | asian festival|asian = rosybrown | secular = darkgray | national|international|local|group = #ddccff | historical|cultural|patriotic|ethnic = lightsalmon | pagan = darkkhaki | commercial = yellow | hindu|hinduism = orange | shinto|shintoism = #FF5F5F | default = lightsteelblue | transparent }} | aboveclass = hd | headerstyle = background-color: {{#switch:{{lc:{{{type|}}} }} | islam|islamic = lightgreen | judaism|juda|jewish|jew = lightskyblue | buddhism|buddhist|buddha = palegoldenrod | christian|christ|christianity = lavender | asian festival|asian = rosybrown | secular = darkgray | national|international|local|group = #ddccff | historical|cultural|patriotic|ethnic = lightsalmon | pagan = darkkhaki | commercial = yellow | hindu|hinduism = orange | shinto|shintoism = #FF5F5F | default = lightsteelblue | transparent }} | bodyclass = vevent | above = {{{holiday_name|<includeonly>{{PAGENAMEBASE}}</includeonly>}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|{{{imagesize|}}}}}}|sizedefault=frameless|upright=1.1|alt={{{alt|}}}}} | caption = {{{caption|}}} | captionstyle = caption | label1 = Official name | data1 = {{{official_name|}}} | label2 = Also called | data2 = {{{nickname|}}} | label3 = Observed&nbsp;by | data3 = {{{observedby|}}} | label4 = Liturgical color | data4 = {{{litcolor|}}} | label5 = Type | data5 = {{{longtype|{{ucfirst:{{{type|}}}}}}}} | class6 = summary | label6 = Significance | data6 = {{{significance|}}} | label7 = Celebrations | data7 = {{{celebrations|}}} | label8 = Observances | data8 = {{{observances|}}} | label10 = Begins | data10 = {{{begins|}}} | label11 = Ends | data11 = {{{ends|}}} | label12 = Date | data12 = {{#if:{{{date|}}}|{{#ifexist:{{{date}}}|[[{{{date}}}]]|{{{date}}}}} |{{#if:{{{week_ordinal|}}}|{{ucfirst:{{{week_ordinal|}}}}} {{ucfirst:{{{weekday|}}}}} in {{ucfirst:{{{month|}}}}}|<!-- -->{{#if:{{#property:P837}}|{{#invoke:Wikidata|getRawValue|P837|FETCH_WIKIDATA}}<!-- -->{{Infobox holiday/wd}}<!-- -->}}<!-- -->}}}} | label13 = {{#time:Y|last year}}&nbsp;date | data13 = {{Infobox holiday/date|year={{#time:Y|last year}}|date_default={{{date{{#time:Y|last year}}|♦}}}|date={{{date|}}}|week_ordinal={{{week_ordinal|}}}|weekday={{{weekday|}}}|month={{{month|}}} }} | label14 = {{#time:Y}}&nbsp;date | data14 = {{Infobox holiday/date|year={{#time:Y}}|date_default={{{date{{#time:Y}}|♦}}}|date={{{date|}}}|week_ordinal={{{week_ordinal|}}}|weekday={{{weekday|}}}|month={{{month|}}} }}<!-- -->{{#ifeq:{{{date2007|}}}{{{date2008|}}}{{{date2009|}}}{{{date2010|}}}{{{date2011|}}}{{{date2012|}}}{{{date2013|}}}||| {{#ifeq:{{{date2014|}}}{{{week_ordinal|}}}||{{Edit||2=<span style="color:#FF0000">date missing (please add)</span>|editintro=Template:Infobox_holiday/MoveableHolidays_editintro}}<!-- -->{{#ifeq:{{NAMESPACEE}}||[[Kategori:Moveable holidays (2014 date missing)]]}}<!-- -->|}} }}<!-- --> | label15 = {{#time:Y|next year}}&nbsp;date | data15 = {{Infobox holiday/date|year={{#time:Y|next year}}|date_default={{{date{{#time:Y|next year}}|♦}}}|date={{{date|}}}|week_ordinal={{{week_ordinal|}}}|weekday={{{weekday|}}}|month={{{month|}}} }} | label16 = {{#time:Y|+2 years}}&nbsp;date | data16 = {{Infobox holiday/date|year={{#time:Y|+2 years}}|date_default={{{date{{#time:Y|+2 years}}|♦}}}|date={{{date|}}}|week_ordinal={{{week_ordinal|}}}|weekday={{{weekday|}}}|month={{{month|}}} }} | label17 = Next&nbsp;time | data17 = {{#if:{{{date|}}}|{{#ifeq:{{lc:{{{scheduling|}}}}}|same day each year|<!-- -->{{#ifexpr:{{#time: U }}<{{#time: U|{{{date}}}, {{CURRENTYEAR}}}} |{{start-date|{{#time:Y-m-d|{{{date}}} {{CURRENTYEAR}}}}| {{#time:{{#if:{{{mdy|}}}|F j, Y|j F Y}}|{{{date}}} {{CURRENTYEAR}} }} }} |{{start-date|{{#time:Y-m-d|{{{date}}} {{NEXTYEAR}}}}| {{#time:{{#if:{{{mdy|}}}|F j, Y|j F Y}}|{{{date}}} {{NEXTYEAR}} }} }} }}|}}}} | label18 = Duration | data18 = {{#ifeq:{{{duration|}}}|1 day||}} | label19 = Frequency | data19 = {{#if:{{{frequency|}}}|{{#ifexist:Category:Holidays and observances by frequency ({{{frequency}}})|[[:Category:Holidays and observances by frequency ({{lc:{{{frequency}}}}})|{{{frequency}}}]]|{{{frequency}}} }} }} | label20 = First&nbsp;time | data20 = {{{firsttime|}}} | label21 = Last&nbsp;time | data21 = {{{lasttime|}}} | label22 = Started&nbsp;by | data22 = {{{startedby|}}} | label23 = Related&nbsp;to | data23 = {{{relatedto|}}} }}<!-- maintenance stuff --><!-- -->{{Main other|<!-- -->{{#if:{{{scheduling|}}}|{{#ifexist:Category:Holidays and observances by scheduling ({{lc:{{{scheduling}}}}})|[[Kategori:Holidays and observances by scheduling ({{lc:{{{scheduling}}}}})]]|}}}}<!-- -->{{#ifeq:{{{significance|}}}||[[Kategori:Infobox holiday with missing field]]}}<!-- --> }}<!-- -->{{#switch:{{{date|}}}|January 1|January 2|January 3|January 4|January 5|January 6|January 7|January 8|January 9|January 10|January 11|January 12|January 13|January 14|January 15|January 16|January 17|January 18|January 19|January 20|January 21|January 22|January 23|January 24|January 25|January 26|January 27|January 28|January 29|January 30|January 31|February 1|February 2|February 3|February 4|February 5|February 6|February 7|February 8|February 9|February 10|February 11|February 12|February 13|February 14|February 15|February 16|February 17|February 18|February 19|February 20|February 21|February 22|February 23|February 24|February 25|February 26|February 27|February 28|February 29|February 30|February 31|March 1|March 2|March 3|March 4|March 5|March 6|March 7|March 8|March 9|March 10|March 11|March 12|March 13|March 14|March 15|March 16|March 17|March 18|March 19|March 20|March 21|March 22|March 23|March 24|March 25|March 26|March 27|March 28|March 29|March 30|March 31|April 1|April 2|April 3|April 4|April 5|April 6|April 7|April 8|April 9|April 10|April 11|April 12|April 13|April 14|April 15|April 16|April 17|April 18|April 19|April 20|April 21|April 22|April 23|April 24|April 25|April 26|April 27|April 28|April 29|April 30|April 31|May 1|May 2|May 3|May 4|May 5|May 6|May 7|May 8|May 9|May 10|May 11|May 12|May 13|May 14|May 15|May 16|May 17|May 18|May 19|May 20|May 21|May 22|May 23|May 24|May 25|May 26|May 27|May 28|May 29|May 30|May 31|June 1|June 2|June 3|June 4|June 5|June 6|June 7|June 8|June 9|June 10|June 11|June 12|June 13|June 14|June 15|June 16|June 17|June 18|June 19|June 20|June 21|June 22|June 23|June 24|June 25|June 26|June 27|June 28|June 29|June 30|June 31|July 1|July 2|July 3|July 4|July 5|July 6|July 7|July 8|July 9|July 10|July 11|July 12|July 13|July 14|July 15|July 16|July 17|July 18|July 19|July 20|July 21|July 22|July 23|July 24|July 25|July 26|July 27|July 28|July 29|July 30|July 31|August 1|August 2|August 3|August 4|August 5|August 6|August 7|August 8|August 9|August 10|August 11|August 12|August 13|August 14|August 15|August 16|August 17|August 18|August 19|August 20|August 21|August 22|August 23|August 24|August 25|August 26|August 27|August 28|August 29|August 30|August 31|September 1|September 2|September 3|September 4|September 5|September 6|September 7|September 8|September 9|September 10|September 11|September 12|September 13|September 14|September 15|September 16|September 17|September 18|September 19|September 20|September 21|September 22|September 23|September 24|September 25|September 26|September 27|September 28|September 29|September 30|September 31|October 1|October 2|October 3|October 4|October 5|October 6|October 7|October 8|October 9|October 10|October 11|October 12|October 13|October 14|October 15|October 16|October 17|October 18|October 19|October 20|October 21|October 22|October 23|October 24|October 25|October 26|October 27|October 28|October 29|October 30|October 31|November 1|November 2|November 3|November 4|November 5|November 6|November 7|November 8|November 9|November 10|November 11|November 12|November 13|November 14|November 15|November 16|November 17|November 18|November 19|November 20|November 21|November 22|November 23|November 24|November 25|November 26|November 27|November 28|November 29|November 30|November 31|December 1|December 2|December 3|December 4|December 5|December 6|December 7|December 8|December 9|December 10|December 11|December 12|December 13|December 14|December 15|December 16|December 17|December 18|December 19|December 20|December 21|December 22|December 23|December 24|December 25|December 26|December 27|December 28|December 29|December 30|December 31=[[Kategori:Infobox holiday fixed day]]|{{#switch:{{{date|}}}|1 January|2 January|3 January|4 January|5 January|6 January|7 January|8 January|9 January|10 January|11 January|12 January|13 January|14 January|15 January|16 January|17 January|18 January|19 January|20 January|21 January|22 January|23 January|24 January|25 January|26 January|27 January|28 January|29 January|30 January|31 January|1 February|2 February|3 February|4 February|5 February|6 February|7 February|8 February|9 February|10 February|11 February|12 February|13 February|14 February|15 February|16 February|17 February|18 February|19 February|20 February|21 February|22 February|23 February|24 February|25 February|26 February|27 February|28 February|29 February|30 February|31 February|1 March|2 March|3 March|4 March|5 March|6 March|7 March|8 March|9 March|10 March|11 March|12 March|13 March|14 March|15 March|16 March|17 March|18 March|19 March|20 March|21 March|22 March|23 March|24 March|25 March|26 March|27 March|28 March|29 March|30 March|31 March|1 April|2 April|3 April|4 April|5 April|6 April|7 April|8 April|9 April|10 April|11 April|12 April|13 April|14 April|15 April|16 April|17 April|18 April|19 April|20 April|21 April|22 April|23 April|24 April|25 April|26 April|27 April|28 April|29 April|30 April|31 April|1 May|2 May|3 May|4 May|5 May|6 May|7 May|8 May|9 May|10 May|11 May|12 May|13 May|14 May|15 May|16 May|17 May|18 May|19 May|20 May|21 May|22 May|23 May|24 May|25 May|26 May|27 May|28 May|29 May|30 May|31 May|1 June|2 June|3 June|4 June|5 June|6 June|7 June|8 June|9 June|10 June|11 June|12 June|13 June|14 June|15 June|16 June|17 June|18 June|19 June|20 June|21 June|22 June|23 June|24 June|25 June|26 June|27 June|28 June|29 June|30 June|31 June|1 July|2 July|3 July|4 July|5 July|6 July|7 July|8 July|9 July|10 July|11 July|12 July|13 July|14 July|15 July|16 July|17 July|18 July|19 July|20 July|21 July|22 July|23 July|24 July|25 July|26 July|27 July|28 July|29 July|30 July|31 July|1 August|2 August|3 August|4 August|5 August|6 August|7 August|8 August|9 August|10 August|11 August|12 August|13 August|14 August|15 August|16 August|17 August|18 August|19 August|20 August|21 August|22 August|23 August|24 August|25 August|26 August|27 August|28 August|29 August|30 August|31 August|1 September|2 September|3 September|4 September|5 September|6 September|7 September|8 September|9 September|10 September|11 September|12 September|13 September|14 September|15 September|16 September|17 September|18 September|19 September|20 September|21 September|22 September|23 September|24 September|25 September|26 September|27 September|28 September|29 September|30 September|31 September|1 October|2 October|3 October|4 October|5 October|6 October|7 October|8 October|9 October|10 October|11 October|12 October|13 October|14 October|15 October|16 October|17 October|18 October|19 October|20 October|21 October|22 October|23 October|24 October|25 October|26 October|27 October|28 October|29 October|30 October|31 October|1 November|2 November|3 November|4 November|5 November|6 November|7 November|8 November|9 November|10 November|11 November|12 November|13 November|14 November|15 November|16 November|17 November|18 November|19 November|20 November|21 November|22 November|23 November|24 November|25 November|26 November|27 November|28 November|29 November|30 November|31 November|1 December|2 December|3 December|4 December|5 December|6 December|7 December|8 December|9 December|10 December|11 December|12 December|13 December|14 December|15 December|16 December|17 December|18 December|19 December|20 December|21 December|22 December|23 December|24 December|25 December|26 December|27 December|28 December|29 December|30 December|31 December=[[Kategori:Infobox holiday fixed day (2)]]|[[Kategori:Infobox holiday (other)]]}}}}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Kategori:Pages using infobox holiday with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox holiday]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | begins | caption | celebrations | date | date2007 | date2008 | date2009 | date2010 | date2011 | date2012 | date2013 | date2014 | date2015 | date2016 | date2017 | date2018 | date2019 | date2020 | date2021 | date2022 | date2023 | date2024 | date2025 | date{{CURRENTYEAR}} | date2026 | date2027 | date2028 | date2029 | date2030 | duration | ends | firsttime | frequency | holiday_name | image | image_size | imagesize | lasttime | litcolor | longtype | mdy | month | nickname | observances | observedby | official_name | relatedto | scheduling | significance | startedby | type | week_ordinal | weekday }}<!-- maintenance stuff ends here --><noinclude>{{Documentation}}<!-- Add categories to the /doc subpage, not here! --> </noinclude> 0ftdc8hbjiqgw0g04sjkzknabfkc21n Templat:Infobox holiday/date 10 104 232 231 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 231 wikitext text/x-wiki {{#ifeq:{{{test|}}}|y|<tr><td>|}}{{#switch:{{{date|}}} <!-- January --> |Auckland Anniversary Day |Monday closest to 29 January |Monday before February 2 |Monday before 2 February=[[{{Weekday before date|{{{year}}}|February|2|Monday|j F}}]] <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday before date|{{{year}}}|February|2|Monday|Y-m-d}}</span>)</span> |Third Monday in January=January {{Weekday in month|{{{year}}}|1|Monday|Third}} <!-- March --> |Week of March 8={{Weekday before date|{{{year}}}|March|9|Monday|F j}}–{{Weekday after date|{{{year}}}|March|7|Sunday|j}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday before date|{{{year}}}|March|9|Monday|Y-m-d}}</span> - <span class="dtend"> {{Weekday after date|{{{year}}}|March|7|Sunday|Y-m-d}}</span>)</span> <!-- Easter related --> |Clean Monday |48 days before Orthodox [[Easter]] |48 days before Orthodox Easter= {{#invoke:Easter|Calculate|{{{year}}}|day=-48|method=Eastern|format=[[j xg]]}} <span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|{{{year}}}|day=-48|method=Eastern|format=Y-m-d}}</span>)</span> |Shrove Tuesday |Tuesday in seventh week before [[Easter]], day before Ash Wednesday={{#invoke:Easter|Calculate|{{{year}}}|day=-47|format=F j}} |People's Sunday |first Sunday of [[Lent]]= {{#invoke:Easter|Calculate|{{{year}}}|day=-42|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|{{{year}}}|day=-42|format=Y-m-d}}</span>)</span> |Easter Sunday - 7 d={{#invoke:Easter|Calculate|{{{year}}}|day=-7|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=-7|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday - 2 d={{#invoke:Easter|Calculate|{{{year}}}|day=-2|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=-2|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday |Easter |[[Easter Sunday]]={{#invoke:Easter|Calculate|{{{year}}}|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday + 1 d={{#invoke:Easter|Calculate|{{{year}}}|day=1|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=1|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday + 39 d={{#invoke:Easter|Calculate|{{{year}}}|day=39|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=39|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday + 40 d={{#invoke:Easter|Calculate|{{{year}}}|day=40|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=40|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday + 49 d={{#invoke:Easter|Calculate|{{{year}}}|day=49|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=49|{{{year}}}|format=Y-m-d}}</span>)</span> |Easter Sunday + 50 d |Pentecost Monday |Azores Day={{#invoke:Easter|Calculate|{{{year}}}|day=+50|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|{{{year}}}|day=+50|format=Y-m-d}}</span>)</span> |Easter Sunday + 60 d={{#invoke:Easter|Calculate|{{{year}}}|day=60|format=[[j F]]}}<span style="display:none">&nbsp;(<span class="dtstart">{{#invoke:Easter|Calculate|day=60|{{{year}}}|format=Y-m-d}}</span>)</span> <!-- April --> |first Thursday after April 18 |first Thursday after 18 April=[[{{Weekday after date|{{{year}}}|April|18|Thursday|j F}}]] |Fourth Monday in April=April {{Weekday in month|{{{year}}}|4|Monday|Fourth}} |Last Monday in April=April {{Weekday in month|{{{year}}}|4|Monday|Last}} <!-- May --> |Friday before Mother's Day (second Sunday in May) |National Public Gardens Day={{Weekday after date|{{{year}}}|May|5|Friday|F j}} |Victory Day (Scotland) |last Monday before or on 24 May=[[{{Weekday before date|{{{year}}}|May|25|Monday|j F}}]] |Second Saturday in May=May {{Weekday in month|{{{year}}}|5|Saturday|Second}} |Monday preceding 25 May |Monday preceding May 25=[[{{Weekday before date|{{{year}}}|May|25|Monday|F j}}]] |Monday on or before 25th of May |Monday before 26 May |Monday before May 26=[[{{Weekday before date|{{{year}}}|May|26|Monday|j F}}]] |Last Monday in May=May {{Weekday in month|{{{year}}}|5|Monday|Last}} <!-- June --> |First Saturday of June=June {{Weekday in month|{{{year}}}|6|Saturday|First}} <!-- July --> |Tynwald Day |[[5 July]] (if this is a Saturday or Sunday: the following Monday) |5 July (if this is a Saturday or Sunday: the following Monday)={{#ifeq:{{#time:N|{{{year}}}-07-05}}|6|[[7 July]]| {{#ifeq:{{#time:N|{{{year}}}-07-05}}|7|[[6 July]]|[[5 July]]}}}} |National Day of Commemoration (Ireland) |Sunday nearest to 11 July=[[{{Weekday before date|{{{year}}}|July|15|Sunday|j F}}]] <!-- September --> |Thursday after 1st Sunday in September={{Weekday after date|{{{year}}}|September|4|Thursday|[[j F]]}} |3rd Sunday in September={{Weekday in month|{{{year}}}|September|Sunday|3}} September |Second Sunday in September={{#time:[[j F]]|{{Date on following weekday|{{{year}}}|September|6|Sunday}}}} |nearest weekday to 17 September |nearest weekday to September 17={{#ifeq:{{WEEKDAYNUMBER|{{JD|{{{year}}}|9|17}}}}|{{WEEKDAYNUMBER|Saturday}}|{{#time: l, F j|{{JULIANDAY.TIMESTAMP |{{JD|{{{year}}}|9|16}}}}}} (observed)|{{#ifeq:{{WEEKDAYNUMBER|{{JD|{{{year}}}|9|17}}}}|{{WEEKDAYNUMBER|Sunday}}|{{#time: l, F j|{{JULIANDAY.TIMESTAMP |{{JD|{{{year}}}|9|18}}}}}} (observed)|{{#time: l, F j|{{JULIANDAY.TIMESTAMP |{{JD|{{{year}}}|9|17}}}}}}}}}} |Monday after 3rd Sunday in September={{Weekday after date|{{{year}}}|September|15|Monday|[[j F]]}} <!-- November --> |Black Friday (shopping) |Day after [[Thanksgiving (United States)|U.S. Thanksgiving]] |Day after U.S. Thanksgiving={{Weekday after date|{{{year}}}|November|22|Friday|F j}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday after date|{{{year}}}|November|22|Friday|Y-m-d}}</span>)</span> |Small Business Saturday |Saturday after [[Thanksgiving (United States)|U.S. Thanksgiving]] |Saturday after U.S. Thanksgiving={{Weekday after date|{{{year}}}|November|23|Saturday|F j}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday after date|{{{year}}}|November|23|Saturday|Y-m-d}}</span>)</span> |Cyber Monday |Monday after [[Thanksgiving (United States)|U.S. Thanksgiving]] |Monday after U.S. Thanksgiving={{Weekday after date|{{{year}}}|November|25|Monday|F j}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday after date|{{{year}}}|November|25|Monday|Y-m-d}}</span>)</span> |Giving Tuesday |Tuesday after [[Thanksgiving (United States)|U.S. Thanksgiving]] |Tuesday after U.S. Thanksgiving={{Weekday after date|{{{year}}}|November|26|Tuesday|F j}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday after date|{{{year}}}|November|26|Tuesday|Y-m-d}}</span>)</span> |Second Sunday before [[Advent Sunday]] |Second Sunday before the First Advent=[[{{Weekday before date|{{{year}}}|November|20|Sunday|j F}}]] <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday before date|{{{year}}}|November|20|Sunday|Y-m-d}}</span>)</span> |Second Wednesday before the First Advent=[[{{Weekday before date|{{{year}}}|November|23|Wednesday|j F}}]] <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday before date|{{{year}}}|November|23|Wednesday|Y-m-d}}</span>)</span> <!-- December --> |First Advent Sunday |Sunday before December 4 |Fourth Sunday before [[Christmas|Christmas Day]] |Fourth Sunday before Christmas Day=[[{{Weekday before date|{{{year}}}|December|4|Sunday|j F}}]] |15 December (if a Sunday, on Monday 16 December) |15 December <br/>(If a Sunday, on Monday 16 December) |Koninkrijksdag={{#ifeq:{{#time:N|{{{year}}}-12-15}}|7|[[16 December]]|[[15 December]]}} |the Friday before [[Christmas]] |Friday before Christmas |the Friday before Christmas={{Weekday before date|{{{year}}}|December|25|Friday|F j}} |Last Saturday before [[Christmas]] |last Saturday before Christmas |Last Saturday before Christmas=[[{{Weekday before date|{{{year}}}|December|25|Saturday|j F}}]] |Sunday after Christmas={{Weekday after date|{{{year}}}|December|25|Sunday}} <span style="display:none">&nbsp;(<span class="dtstart">{{Weekday after date|{{{year}}}|December|25|Sunday}}</span>)</span> |#default={{#if:{{{date_default|}}} |{{#ifeq:{{{date_default|}}}|♦ |{{#if:{{{week_ordinal|}}}|{{#if:{{{bold|}}}|<b>}}{{{month}}} {{weekday in month|{{{week_ordinal}}}|{{{weekday}}}|{{{month}}}|{{{year}}}}} {{#if:{{{bold|}}}|</b>}} <span style="display:none">&nbsp;(<span class="dtstart">{{#time:Y-m-d|{{weekday in month|{{{week_ordinal}}}|{{{weekday}}}|{{{month}}}|{{{year}}} }}. {{{month}}} {{{year}}} }}</span>)</span>}} |{{{date_default}}} }} }} }}{{#ifeq:{{{test|}}}|y|<td>year: {{{year|}}}<td>date rule: {{{date|}}}<td>week_ordinal = {{{week_ordinal|}}}<td>weekday = {{{weekday|}}}<td>month = {{{month|}}}</tr>}}<noinclude> {{Documentation|content= This subtemplate is used by {{tl|infobox holiday}} to generate the date for holidays in future years. It should not be used directly. }}</noinclude> f51h89w2obduzzm0mfudmfu2t5sixth Templat:Infobox islands 10 105 234 233 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 233 wikitext text/x-wiki {{Infobox | child = {{{embed|}}} | bodyclass = ib-islands vcard | templatestyles = Template:Infobox islands/styles.css | titleclass = fn org | title = {{#ifeq:{{{embed|}}}|yes|{{#if:{{{name|}}}|<div class="ib-islands-title-embed">{{{name|}}}</div>|}}|{{{name|{{PAGENAMEBASE}}}}}}} | above = {{#ifeq:{{{disputed|}}}|yes|{{#if:{{{type|}}}|[[Territorial dispute|Disputed {{{type}}}]]|[[Territorial dispute|Disputed island]]}}{{#ifeq:{{{plural}}}|yes|s<br>|<br>}}}}<!-- -->{{#if:{{{local_name|}}}<!-- -->|<div class="nickname">{{{local_name}}}</div><!-- -->|{{#if:{{{native_name|}}}<!-- -->|<div class="ib-islands-native">{{#if:{{{native_name_link|}}}|[[{{{native_name_link|}}}|Native name]]|Native name}}: <div class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang|}}}}}">{{{native_name|}}}</div></div><!-- -->}}<!-- -->}}<!-- -->{{#if:{{{nickname|}}}{{{sobriquet|}}}|<div class="ib-islands-nick">Nickname: {{if empty|{{{nickname|}}}|{{{sobriquet|}}}}}</div>}} | autoheaders = y | image = {{#invoke:InfoboxImage|InfoboxImage|image={{if empty|{{{image|}}}|{{{image_name|}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1.16|alt={{{image_alt|}}}}} | caption = {{{image_caption|}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{if empty|{{{image_map|}}}|{{{map_image|}}}}}|size={{if empty|{{{image_map_size|}}}|{{{map_size|}}}}}|sizedefault=frameless|upright=1.16|alt={{if empty|{{{image_map_alt|}}}|{{{map_alt|}}}}}}} | caption2 = {{if empty|{{{image_map_caption|}}}|{{{map_image_caption|}}}|{{{map_caption|}}}}} | image3 = {{#if:{{{pushpin_map|}}}{{{map|}}}| {{Location map|{{if empty|{{{pushpin_map|}}}|{{{map|}}}}} | float = center | border = infobox | alt = {{if empty|{{{pushpin_map_alt|}}}| {{#if:{{{image_map|}}}{{{map_image|}}}||{{{map_alt|}}}}} }} | width = {{if empty|{{{pushpin_map_width|}}}|{{{map_width|}}}}} | default_width = 260 | caption = {{if empty|{{{pushpin_map_caption|}}}| {{#if:{{{image_map|}}}{{{map_image|}}}||{{{map_caption|}}}}} }} | mark = {{if empty|{{{pushpin_mark|}}}|{{{pushpin_map_mark|}}}|{{{map_mark|}}}}} | marksize = {{if empty|{{{pushpin_mark_width|}}}|{{{pushpin_map_mark_width|}}}|{{{map_mark_width|}}}}} | relief = {{if empty|{{{pushpin_relief|}}}|{{{pushpin_map_relief|}}}|{{{map_relief|}}}}} | label = {{if empty|{{if empty|{{{pushpin_label|}}}|{{{pushpin_map_label|}}}|{{{label|}}}}}|{{{name|}}}}} | position = {{if empty|{{{pushpin_label_position|}}}|{{{pushpin_map_label_position|}}}|{{{label_position|}}}}} | coordinates = {{{coordinates|}}} }}}} | image4 = {{#invoke:Infobox mapframe|auto|onByDefault={{#if:{{{pushpin_map|}}}{{{map|}}}|no|yes}}|mapframe-zoom={{{mapframe-zoom|7}}}|mapframe-marker=island| mapframe-marker-color=#a8bdec|mapframe-width=250|mapframe-frame-width=250| mapframe-wikidata = {{{mapframe-wikidata|yes}}}}} | caption4 = {{#invoke:Infobox mapframe|autocaption|onByDefault={{#if:{{{pushpin_map|}}}{{{map|}}}|no|yes}}}} | label1 = Other names | data1 = {{{other_names|}}} | label2 = Etymology | data2 = {{{etymology|}}} | header3 = {{#ifeq:{{{embed|}}}|yes||Geography}} | label4 = Location | data4 = {{{location|}}} | label5 = Coordinates | data5 = {{#if:{{{coordinates|}}}|{{#invoke:Coordinates|coordinsert|{{{coordinates}}}|type:isle}}}} | label6 = [[Ordnance Survey National Grid|OS grid reference]] | data6 = {{#if:{{{grid_reference|}}}| {{gbmappingsmall|{{{grid_reference|}}}|25|{{{grid_reference|}}}|name={{{name|{{PAGENAMEBASE}}}}} }} }} | label7 = [[Island#Types_of_islands|Type]] | data7 = {{{island_type|}}} | label8 = Archipelago | class8 = note | data8 = {{{archipelago|}}} | label9 = {{nowrap|Adjacent to}} | data9 = {{{waterbody|}}} | label10 = Total islands | data10 = {{{total_islands|}}} | label11 = Major islands | data11 = {{{major_islands|}}} | label12 = Area | data12 = {{Infobox islands/area| km2 = {{{area_km2|}}} | sqmi = {{{area_sqmi|}}} | m2 = {{{area_m2|}}} | sqft = {{{area_sqft|}}} | ha = {{{area_ha|}}} | acre = {{{area_acre|}}} }}{{{area_footnotes|}}} | label13 = [[List of islands by area|Area rank]] | data13 = {{{rank|}}} | label14 = Length | data14 = {{Infobox islands/length | km = {{{length_km|}}} | mi = {{{length_mi|}}} | m = {{{length_m|}}} | ft = {{{length_ft|}}} }}{{{length_footnotes|}}} | label15 = Width | data15 = {{#if:{{both|{{{width_min_km|}}}|{{{width_max_km|}}}}}<!-- -->{{both|{{{width_min_mi|}}}|{{{width_max_mi|}}}}}<!-- -->{{both|{{{width_min_m|}}}|{{{width_max_m|}}}}}<!-- -->{{both|{{{width_min_ft|}}}|{{{width_max_ft|}}}}}<!-- -->|{{convert<!-- -->|{{if empty|{{{width_min_km|}}}|{{{width_min_mi|}}}|{{{width_min_m|}}}|{{{width_min_ft|}}}}}<!-- -->|-<!-- -->|{{if empty|{{{width_max_km|}}}|{{{width_max_mi|}}}|{{{width_max_m|}}}|{{{width_max_ft|}}}}}<!-- -->|{{#if:{{both|{{{width_min_km|}}}|{{{width_max_km|}}}}}<!-- -->|km<!-- -->|{{#if:{{both|{{{width_min_mi|}}}|{{{width_max_mi|}}}}}<!-- -->|mi<!-- -->|{{#if:{{both|{{{width_min_m|}}}|{{{width_max_m|}}}}}<!-- -->|m<!-- -->|{{#if:{{both|{{{width_min_ft|}}}|{{{width_max_ft|}}}}}<!-- -->|ft}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->|abbr=on}}<!-- -->|{{Infobox islands/length | km = {{{width_km|}}} | mi = {{{width_mi|}}} | m = {{{width_m|}}} | ft = {{{width_ft|}}} }}<!-- -->}}{{{width_footnotes|}}} | label16 = Coastline | data16 = {{Infobox islands/length | km = {{{coastline_km|}}} | mi = {{{coastline_mi|}}} | m = {{{coastline_m|}}} | ft = {{{coastline_ft|}}} }}{{{coastline_footnotes|}}} | label17 = Highest&nbsp;elevation | data17 = {{Infobox islands/length | m = {{{elevation_m|}}} | ft = {{{elevation_ft|}}} }}{{{elevation_footnotes|}}} | label18 = Highest&nbsp;point | data18 = {{{highest_mount|}}} <!-- end geography --> | header22 = Administration | data23 = {{#switch:{{{country|}}}|= |None|none={{#if:{{{treaty_system|}}}||<div>'''{{{country}}}'''</div>}} |#default=<div>'''{{{country}}}'''</div> }} | data24 = {{#if:{{{treaty_system|}}}|Administered under the {{{treaty_system|}}}}} | header25 = _BLANK_ | label26 = {{{country_admin_divisions_title|}}} | data26 = {{{country_admin_divisions|}}} | label27 = {{{country_admin_divisions_title_1|}}} | data27 = {{{country_admin_divisions_1|}}} | label28 = {{{country_admin_divisions_title_2|}}} | data28 = {{{country_admin_divisions_2|}}} | label29 = {{{country_admin_divisions_title_3|}}} | data29 = {{{country_admin_divisions_3|}}} | label30 = {{{country_admin_divisions_title_4|}}} | data30 = {{{country_admin_divisions_4|}}} | label31 = Capital city | data31 = {{#if: {{{country_capital_and_largest_city|}}}||{{{country_capital|}}}}} | label32 = Largest {{if empty|{{{country_largest_city_type|}}}|{{{country largest city type|}}}|settlement}} | data32 = {{#if: {{{country_capital_and_largest_city|}}}||{{#if: {{{country_largest_city|}}}|{{{country_largest_city|}}}{{#if: {{{country_largest_city_population|}}}|&#32;(pop.&#160;{{{country_largest_city_population|}}})}}}}}} | label33 = Capital and largest {{if empty|{{{country_largest_city_type|}}}|{{{country largest city type|}}}|{{{country_capital_type|}}}|{{{country capital type|}}}|city}} | data33 = {{#if: {{{country_capital_and_largest_city|}}}|{{{country_capital_and_largest_city|}}}{{#if: {{{country_largest_city_population|}}}|&#32;(pop.&#160;{{{country_largest_city_population|}}})}}}} | label34 = {{{country_leader_title|}}} | data34 = {{{country_leader_name|}}} | label35 = Area covered | data35 = {{Infobox islands/area| km2 = {{{country_area_km2|}}} | sqmi = {{{country_area_sqmi|}}} | m2 = {{{country_area_m2|}}} | sqft = {{{country_area_sqft|}}} | ha = {{{country_area_ha|}}} | acre = {{{country_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country_area|}}} | header36 = {{#ifeq:{{{disputed|}}}|yes|Claimed by}} | data37 = {{#if:{{{country1|}}}|{{#ifeq:{{{disputed|}}}|yes|<div class="ib-islands-country2">|<div class="ib-islands-country">}}{{{country1|}}}</div>}} | label38 = {{{country1_admin_divisions_title|}}} | data38 = {{{country1_admin_divisions|}}} | label39 = {{{country1_admin_divisions_title_1|}}} | data39 = {{{country1_admin_divisions_1|}}} | label40 = {{{country1_admin_divisions_title_2|}}} | data40 = {{{country1_admin_divisions_2|}}} | label41 = Capital {{#ifeq: {{{country1_capital_type|{{{country 1 capital type|city}}}}}}|city|city}} | data41 = {{#if: {{{country1_capital_and_largest_city|}}}||{{{country1_capital|}}}}} | label42 = Largest {{if empty|{{{country1_largest_city_type|}}}|{{{country 1 largest city type|}}}|settlement}} | data42 = {{#if: {{{country1_capital_and_largest_city|}}}||{{#if: {{{country1_largest_city|}}}|{{{country1_largest_city|}}}{{#if: {{{country1_largest_city_population|}}}|&#32;(pop.&#160;{{{country1_largest_city_population|}}})}}}}}} | label43 = Capital and largest {{if empty|{{{country1_largest_city_type|}}}|{{{country 1 largest city type|}}}|{{{country1_capital_type|}}}|{{{country 1 capital type|}}}|city}} | data43 = {{#if: {{{country1_capital_and_largest_city|}}}|{{{country1_capital_and_largest_city|}}}{{#if: {{{country1_largest_city_population|}}}|&#32;(pop.&#160;{{{country1_largest_city_population|}}})}}}} | label44 = {{{country1_leader_title|}}} | data44 = {{{country1_leader_name|}}} | label45 = Area covered | data45 = {{Infobox islands/area| km2 = {{{country1_area_km2|}}} | sqmi = {{{country1_area_sqmi|}}} | m2 = {{{country1_area_m2|}}} | sqft = {{{country1_area_sqft|}}} | ha = {{{country1_area_ha|}}} | acre = {{{country1_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country1_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country1_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country1_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country1_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country1_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country1_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country1_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country1_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country1_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country1_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country1_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country1_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country1_area|}}} | data54 = {{#if:{{{country2|}}}|<div class="ib-islands-country">{{{country2|}}}</div>}} | label55 = {{{country2_admin_divisions_title|}}} | data55 = {{{country2_admin_divisions|}}} | label56 = {{{country2_admin_divisions_title_1|}}} | data56 = {{{country2_admin_divisions_1|}}} | label57 = Capital {{#ifeq: {{{country2_capital_type|{{{country 2 capital type|city}}}}}}|city|city}} | data57 = {{#if: {{{country2_capital_and_largest_city|}}}||{{{country2_capital|}}}}} | label58 = Largest {{if empty|{{{country2_largest_city_type|}}}|{{{country 2 largest city type|}}}|settlement}} | data58 = {{#if: {{{country2_capital_and_largest_city|}}}||{{#if: {{{country2_largest_city|}}}|{{{country2_largest_city|}}}{{#if: {{{country2_largest_city_population|}}}|&#32;(pop.&#160;{{{country2_largest_city_population|}}})}}}}}} | label59 = Capital and largest {{if empty|{{{country2_largest_city_type|}}}|{{{country 2 largest city type|}}}|{{{country2_capital_type|}}}|{{{country 2 capital type|}}}|city}} | data59 = {{#if: {{{country2_capital_and_largest_city|}}}|{{{country2_capital_and_largest_city|}}}{{#if: {{{country2_largest_city_population|}}}|&#32;(pop.&#160;{{{country2_largest_city_population|}}})}}}} | label60 = {{{country2_leader_title|}}} | data60 = {{{country2_leader_name|}}} | label61 = Area covered | data61 = {{Infobox islands/area| km2 = {{{country2_area_km2|}}} | sqmi = {{{country2_area_sqmi|}}} | m2 = {{{country2_area_m2|}}} | sqft = {{{country2_area_sqft|}}} | ha = {{{country2_area_ha|}}} | acre = {{{country2_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country2_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country2_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country2_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country2_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country2_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country2_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country2_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country2_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country2_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country2_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country2_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country2_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country2_area|}}} | data62 = {{#if:{{{country3|}}}|<div class="ib-islands-country">{{{country3|}}}</div>}} | label63 = {{{country3_admin_divisions_title|}}} | data63 = {{{country3_admin_divisions|}}} | label64 = {{{country3_admin_divisions_title_1|}}} | data64 = {{{country3_admin_divisions_1|}}} | label65 = Capital {{#ifeq: {{{country3_capital_type|{{{country 3 capital type|city}}}}}}|city|city}} | data65 = {{#if: {{{country3_capital_and_largest_city|}}}||{{{country3_capital|}}}}} | label66 = Largest {{if empty|{{{country3_largest_city_type|}}}|{{{country 3 largest city type|}}}|settlement}} | data66 = {{#if: {{{country3_capital_and_largest_city|}}}||{{#if: {{{country3_largest_city|}}}|{{{country3_largest_city|}}}{{#if: {{{country3_largest_city_population|}}}|&#32;(pop.&#160;{{{country3_largest_city_population|}}})}}}}}} | label67 = Capital and largest {{if empty|{{{country3_largest_city_type|}}}|{{{country 3 largest city type|}}}|{{{country3_capital_type|}}}|{{{country 3 capital type|}}}|city}} | data67 = {{#if: {{{country3_capital_and_largest_city|}}}|{{{country3_capital_and_largest_city|}}}{{#if: {{{country3_largest_city_population|}}}|&#32;(pop.&#160;{{{country3_largest_city_population|}}})}}}} | label68 = {{{country3_leader_title|}}} | data68 = {{{country3_leader_name|}}} | label69 = Area covered | data69 = {{Infobox islands/area| km2 = {{{country3_area_km2|}}} | sqmi = {{{country3_area_sqmi|}}} | m2 = {{{country3_area_m2|}}} | sqft = {{{country3_area_sqft|}}} | ha = {{{country3_area_ha|}}} | acre = {{{country3_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country3_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country3_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country3_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country3_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country3_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country3_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country3_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country3_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country3_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country3_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country3_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country3_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country3_area|}}} | data70 = {{#if:{{{country4|}}}|<div class="ib-islands-country">{{{country4|}}}</div>}} | label71 = {{{country4_admin_divisions_title|}}} | data71 = {{{country4_admin_divisions|}}} | label72 = {{{country4_admin_divisions_title_1|}}} | data72 = {{{country4_admin_divisions_1|}}} | label73 = Capital {{#ifeq: {{{country4_capital_type|{{{country 4 capital type|city}}}}}}|city|city}} | data73 = {{#if: {{{country4_capital_and_largest_city|}}}||{{{country4_capital|}}}}} | label74 = Largest {{if empty|{{{country4_largest_city_type|}}}|{{{country 4 largest city type|}}}|settlement}} | data74 = {{#if: {{{country4_capital_and_largest_city|}}}||{{#if: {{{country4_largest_city|}}}|{{{country4_largest_city|}}}{{#if: {{{country4_largest_city_population|}}}|&#32;(pop.&#160;{{{country4_largest_city_population|}}})}}}}}} | label75 = Capital and largest {{if empty|{{{country4_largest_city_type|}}}|{{{country 4 largest city type|}}}|{{{country4_capital_type|}}}|{{{country 4 capital type|}}}|city}} | data75 = {{#if: {{{country4_capital_and_largest_city|}}}|{{{country4_capital_and_largest_city|}}}{{#if: {{{country4_largest_city_population|}}}|&#32;(pop.&#160;{{{country4_largest_city_population|}}})}}}} | label76 = {{{country4_leader_title|}}} | data76 = {{{country4_leader_name|}}} | label77 = Area covered | data77 = {{Infobox islands/area| km2 = {{{country4_area_km2|}}} | sqmi = {{{country4_area_sqmi|}}} | m2 = {{{country4_area_m2|}}} | sqft = {{{country4_area_sqft|}}} | ha = {{{country4_area_ha|}}} | acre = {{{country4_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country4_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country4_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country4_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country4_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country4_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country4_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country4_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country4_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country4_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country4_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country4_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country4_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country4_area|}}} | data78 = {{#if:{{{country5|}}}|<div class="ib-islands-country">{{{country5|}}}</div>}} | label79 = {{{country5_admin_divisions_title|}}} | data79 = {{{country5_admin_divisions|}}} | label80 = {{{country5_admin_divisions_title_1|}}} | data80 = {{{country5_admin_divisions_1|}}} | label81 = Capital {{#ifeq: {{{country5_capital_type|{{{country 5 capital type|city}}}}}}|city|city}} | data81 = {{#if: {{{country5_capital_and_largest_city|}}}||{{{country5_capital|}}}}} | label82 = Largest {{if empty|{{{country5_largest_city_type|}}}|{{{country 5 largest city type|}}}|settlement}} | data82 = {{#if: {{{country5_capital_and_largest_city|}}}||{{#if: {{{country5_largest_city|}}}|{{{country5_largest_city|}}}{{#if: {{{country5_largest_city_population|}}}|&#32;(pop.&#160;{{{country5_largest_city_population|}}})}}}}}} | label83 = Capital and largest {{if empty|{{{country5_largest_city_type|}}}|{{{country 5 largest city type|}}}|{{{country5_capital_type|}}}|{{{country 5 capital type|}}}|city}} | data83 = {{#if: {{{country5_capital_and_largest_city|}}}|{{{country5_capital_and_largest_city|}}}{{#if: {{{country5_largest_city_population|}}}|&#32;(pop.&#160;{{{country5_largest_city_population|}}})}}}} | label84 = {{{country5_leader_title|}}} | data84 = {{{country5_leader_name|}}} | label85 = Area covered | data85 = {{Infobox islands/area| km2 = {{{country5_area_km2|}}} | sqmi = {{{country5_area_sqmi|}}} | m2 = {{{country5_area_m2|}}} | sqft = {{{country5_area_sqft|}}} | ha = {{{country5_area_ha|}}} | acre = {{{country5_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country5_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country5_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country5_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country5_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country5_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country5_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country5_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country5_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country5_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country5_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country5_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country5_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country5_area|}}} | data86 = {{#if:{{{country6|}}}|<div class="ib-islands-country">{{{country6|}}}</div>}} | label87 = {{{country6_admin_divisions_title|}}} | data87 = {{{country6_admin_divisions|}}} | label88 = {{{country6_admin_divisions_title_1|}}} | data88 = {{{country6_admin_divisions_1|}}} | label89 = Capital {{#ifeq: {{{country6_capital_type|{{{country 6 capital type|city}}}}}}|city|city}} | data89 = {{#if: {{{country6_capital_and_largest_city|}}}||{{{country6_capital|}}}}} | label90 = Largest {{if empty|{{{country6_largest_city_type|}}}|{{{country 6 largest city type|}}}|settlement}} | data90 = {{#if: {{{country6_capital_and_largest_city|}}}||{{#if: {{{country6_largest_city|}}}|{{{country6_largest_city|}}}{{#if: {{{country6_largest_city_population|}}}|&#32;(pop.&#160;{{{country6_largest_city_population|}}})}}}}}} | label91 = Capital and largest {{if empty|{{{country6_largest_city_type|}}}|{{{country 6 largest city type|}}}|{{{country6_capital_type|}}}|{{{country 6 capital type|}}}|city}} | data91 = {{#if: {{{country6_capital_and_largest_city|}}}|{{{country6_capital_and_largest_city|}}}{{#if: {{{country6_largest_city_population|}}}|&#32;(pop.&#160;{{{country6_largest_city_population|}}})}}}} | label92 = {{{country6_leader_title|}}} | data92 = {{{country6_leader_name|}}} | label93 = Area covered | data93 = {{Infobox islands/area| km2 = {{{country6_area_km2|}}} | sqmi = {{{country6_area_sqmi|}}} | m2 = {{{country6_area_m2|}}} | sqft = {{{country6_area_sqft|}}} | ha = {{{country6_area_ha|}}} | acre = {{{country6_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country6_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country6_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country6_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country6_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country6_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country6_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country6_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country6_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country6_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country6_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country6_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country6_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country6_area|}}} | data94 = {{#if:{{{country7|}}}|<div class="ib-islands-country">{{{country7|}}}</div>}} | label95 = {{{country7_admin_divisions_title|}}} | data95 = {{{country7_admin_divisions|}}} | label96 = {{{country7_admin_divisions_title_1|}}} | data96 = {{{country7_admin_divisions_1|}}} | label97 = Capital {{#ifeq: {{{country7_capital_type|{{{country 7 capital type|city}}}}}}|city|city}} | data97 = {{#if: {{{country7_capital_and_largest_city|}}}||{{{country7_capital|}}}}} | label98 = Largest {{if empty|{{{country7_largest_city_type|}}}|{{{country 7 largest city type|}}}|settlement}} | data98 = {{#if: {{{country7_capital_and_largest_city|}}}||{{#if: {{{country7_largest_city|}}}|{{{country7_largest_city|}}}{{#if: {{{country7_largest_city_population|}}}|&#32;(pop.&#160;{{{country7_largest_city_population|}}})}}}}}} | label99 = Capital and largest {{if empty|{{{country7_largest_city_type|}}}|{{{country 7 largest city type|}}}|{{{country7_capital_type|}}}|{{{country 7 capital type|}}}|city}} | data99 = {{#if: {{{country7_capital_and_largest_city|}}}|{{{country7_capital_and_largest_city|}}}{{#if: {{{country7_largest_city_population|}}}|&#32;(pop.&#160;{{{country7_largest_city_population|}}})}}}} | label100 = {{{country7_leader_title|}}} | data100 = {{{country7_leader_name|}}} | label101 = Area covered | data101 = {{Infobox islands/area| km2 = {{{country7_area_km2|}}} | sqmi = {{{country7_area_sqmi|}}} | m2 = {{{country7_area_m2|}}} | sqft = {{{country7_area_sqft|}}} | ha = {{{country7_area_ha|}}} | acre = {{{country7_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country7_area_km2|}}} | {{{area_km2|}}} }} | {{vpct | {{{country7_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country7_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{vpct | {{{country7_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country7_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country7_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country7_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country7_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country7_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country7_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country7_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country7_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country7_area|}}} | data102 = {{#if:{{{country8|}}}|<div class="ib-islands-country">{{{country8|}}}</div>}} | label103 = {{{country8_admin_divisions_title|}}} | data103 = {{{country8_admin_divisions|}}} | label104 = {{{country8_admin_divisions_title_1|}}} | data104 = {{{country8_admin_divisions_1|}}} | label105 = Capital {{#ifeq: {{{country8_capital_type|{{{country 8 capital type|city}}}}}}|city|city}} | data105 = {{#if: {{{country8_capital_and_largest_city|}}}||{{{country8_capital|}}}}} | label106 = Largest {{if empty|{{{country8_largest_city_type|}}}|{{{country 8 largest city type|}}}|settlement}} | data106 = {{#if: {{{country8_capital_and_largest_city|}}}||{{#if: {{{country8_largest_city|}}}|{{{country8_largest_city|}}}{{#if: {{{country8_largest_city_population|}}}|&#32;(pop.&#160;{{{country8_largest_city_population|}}})}}}}}} | label107 = Capital and largest {{if empty|{{{country8_largest_city_type|}}}|{{{country 8 largest city type|}}}|{{{country8_capital_type|}}}|{{{country 8 capital type|}}}|city}} | data107 = {{#if: {{{country8_capital_and_largest_city|}}}|{{{country8_capital_and_largest_city|}}}{{#if: {{{country8_largest_city_population|}}}|&#32;(pop.&#160;{{{country8_largest_city_population|}}})}}}} | label108 = {{{country8_leader_title|}}} | data108 = {{{country8_leader_name|}}} | label109 = Area covered | data109 = {{Infobox islands/area| km2 = {{{country8_area_km2|}}} | sqmi = {{{country8_area_sqmi|}}} | m2 = {{{country8_area_m2|}}} | sqft = {{{country8_area_sqft|}}} | ha = {{{country8_area_ha|}}} | acre = {{{country8_area_acre|}}} | pct = {{#ifexpr: {{both|{{{country8_area_km2|}}} | {{{area_km2|}}} }} | {{pct | {{{country8_area_km2|}}} | {{{area_km2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country8_area_sqmi|}}} | {{{area_sqmi|}}} }} | {{pct | {{{country8_area_sqmi|}}} | {{{area_sqmi|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country8_area_m2|}}} | {{{area_m2|}}} }} | {{pct | {{{country8_area_m2|}}} | {{{area_m2|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country8_area_sqft|}}} | {{{area_sqft|}}} }} | {{pct | {{{country8_area_sqft|}}} | {{{area_sqft|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country8_area_ha|}}} | {{{area_ha|}}} }} | {{pct | {{{country8_area_ha|}}} | {{{area_ha|}}} | 1 |%=}} | {{#ifexpr: {{both|{{{country8_area_acre|}}} | {{{area_acre|}}} }} | {{pct | {{{country8_area_acre|}}} | {{{area_acre|}}} | 1 |%=}} | }} }} }} }} }} }} }}{{{country8_area|}}} <!-- end administration --> | header110 = Demographics | label111 = Demonym | data111 = {{{demonym|}}} | label112 = Population | data112 = {{{population|}}} {{#if:{{{population_as_of|}}}|({{{population_as_of|}}})}}{{{population_footnotes|}}} | label113 = [[List of islands by population|Population rank]] | data113 = {{#if:{{{population_rank|}}}|{{{population_rank|}}} {{#if:{{{population_rank_max|}}}|out of {{{population_rank_max|}}} }} }} | label114 = Pop. density | data114 = {{Infobox islands/density| km2 = {{{density_km2|}}}| sqmi = {{{density_sqmi|}}} }}{{{density_footnotes|}}} | label115 = [[List of islands by population density|Pop. density rank]] | data115 = {{{density_rank|}}} | label116 = Languages | data116 = {{{languages|}}} | label117 = Ethnic groups | data117 = {{{ethnic_groups|}}} <!-- end demographics --> | header118 = Additional information <!-- ***Time Zones*** --> | label119 = {{#if:{{both|{{if empty|{{{timezone1|}}}|{{{timezone|}}}}}|{{{timezone2|}}}}}|[[Time zone]]s|[[Time zone]]}} | data119 = {{#if:{{{timezone1|}}}{{{timezone|}}}| {{unbulleted list | 1= {{vif empty|{{{timezone1|}}}|{{{timezone}}}}} {{#if:{{{utc_offset1|}}}{{{utc_offset|}}}|([[UTC{{if empty|{{{utc_offset1|}}}|{{{utc_offset}}}}}]])}} | 2= {{#if:{{{timezone2|}}}|{{{timezone2}}} {{#if:{{{utc_offset2|}}}|([[UTC{{{utc_offset2}}}]])}} }} }}}} | label120 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data120 = {{#if:{{{timezone1|}}}{{{timezone|}}}| {{unbulleted list | 1= {{#if:{{{timezone1_DST|}}}{{{timezone_DST|}}}|{{if empty|{{{timezone1_DST|}}}|{{{timezone_DST|}}}}} ([[UTC{{if empty|{{{utc_offset1_DST|}}}|{{{utc_offset_DST|}}}}}]])}} | 2= {{#if:{{{timezone1_DST|}}}{{{timezone_DST|}}}|{{#if:{{{timezone2_DST|}}}|{{{timezone2_DST}}} ([[UTC{{{utc_offset2_DST|}}}]])}} }} }}}} <!-- ***Area codes*** --> | label121 = {{if empty|{{{postal_code_type|}}}|Postal code}} | data121 = {{{postal_code|}}} | label122 = {{if empty|{{{area_code_type|}}}|[[Telephone numbering plan|Area code(s)]]}} | data122 = {{{area_code|}}} | label123 = [[Vehicle registration plate|Vehicle registration]] | data123 = {{{registration_plate|}}} | label124 = {{if empty|{{{iso_code_type|}}}|[[ISO 3166-2|ISO code]]}} | data124 = {{{iso_code|}}} | label125 = Official website | data125 = {{{website|}}} | data126 = {{{additional_info|}}} | header127 = <nowiki /> | data128 = {{{misc|}}} {{{module|}}} | below = {{{footnotes|}}} }}{{Main other|{{#ifeq:{{ucfirst:{{{country_admin_divisions_title|}}}}}|Country|[[Kategori:Pages using infobox islands with unknown parameters|χ{{PAGENAME}}]] }}{{#if:{{{additional_info|}}}|[[Kategori:Articles using infobox islands with additional info|{{#ifexpr:{{str find|{{{additional_info|}}}|Source}} >= 0 |σ}}{{#ifexpr:{{str find|{{{additional_info|}}}|anguage}} >= 0 |ψ}}{{#ifexpr:{{str find|{{{additional_info|}}}|National Geospatial}} >= 0 |ν}}{{#ifexpr:{{str find|{{{additional_info|}}}|Administered}} >= 0 |α}}{{#ifexpr:{{str find|{{{additional_info|}}}|ISO}} >= 0 |ι}}{{#ifexpr:{{str find|{{{additional_info|}}}|Literacy}} >= 0 |λ}}{{#ifexpr:{{str find|{{{additional_info|}}}|temperature}} >= 0 |τ}}{{PAGENAME}}]] }} }}{{#if:{{{embed|}}}|[[Kategori:Pages using infobox islands with the embed parameter]]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox islands with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox islands]] with unknown parameter "_VALUE_"|ignoreblank=y| additional_info | archipelago | area_acre | area_code | area_code_type | area_footnotes | area_ha | area_km2 | area_m2 | area_sqft | area_sqmi | coastline_footnotes | coastline_ft | coastline_km | coastline_m | coastline_mi | coordinates | country | country 1 capital type | country 1 largest city type | country 2 capital type | country 2 largest city type | country 3 capital type | country 3 largest city type | country 4 capital type | country 4 largest city type | country 5 capital type | country 5 largest city type | country 6 capital type | country 6 largest city type | country 7 capital type | country 7 largest city type | country 8 capital type | country 8 largest city type | country capital type | country largest city type | country_admin_divisions | country_admin_divisions_1 | country_admin_divisions_2 | country_admin_divisions_3 | country_admin_divisions_4 | country_admin_divisions_title | country_admin_divisions_title_1 | country_admin_divisions_title_2 | country_admin_divisions_title_3 | country_admin_divisions_title_4 | country_area | country_area_acre | country_area_ha | country_area_km2 | country_area_m2 | country_area_sqft | country_area_sqmi | country_capital | country_capital_and_largest_city | country_capital_type | country_largest_city | country_largest_city_population | country_largest_city_type | country_leader_name | country_leader_title | country1 | country1_admin_divisions | country1_admin_divisions_1 | country1_admin_divisions_2 | country1_admin_divisions_title | country1_admin_divisions_title_1 | country1_admin_divisions_title_2 | country1_area | country1_area_acre | country1_area_ha | country1_area_km2 | country1_area_m2 | country1_area_sqft | country1_area_sqmi | country1_capital | country1_capital_and_largest_city | country1_capital_type | country1_largest_city | country1_largest_city_population | country1_largest_city_type | country1_leader_name | country1_leader_title | country2 | country2_admin_divisions | country2_admin_divisions_1 | country2_admin_divisions_title | country2_admin_divisions_title_1 | country2_area | country2_area_acre | country2_area_ha | country2_area_km2 | country2_area_m2 | country2_area_sqft | country2_area_sqmi | country2_capital | country2_capital_and_largest_city | country2_capital_type | country2_largest_city | country2_largest_city_population | country2_largest_city_type | country2_leader_name | country2_leader_title | country3 | country3_admin_divisions | country3_admin_divisions_1 | country3_admin_divisions_title | country3_admin_divisions_title_1 | country3_area | country3_area_acre | country3_area_ha | country3_area_km2 | country3_area_m2 | country3_area_sqft | country3_area_sqmi | country3_capital | country3_capital_and_largest_city | country3_capital_type | country3_largest_city | country3_largest_city_population | country3_largest_city_type | country3_leader_name | country3_leader_title | country4 | country4_admin_divisions | country4_admin_divisions_1 | country4_admin_divisions_title | country4_admin_divisions_title_1 | country4_area | country4_area_acre | country4_area_ha | country4_area_km2 | country4_area_m2 | country4_area_sqft | country4_area_sqmi | country4_capital | country4_capital_and_largest_city | country4_capital_type | country4_largest_city | country4_largest_city_population | country4_largest_city_type | country4_leader_name | country4_leader_title | country5 | country5_admin_divisions | country5_admin_divisions_1 | country5_admin_divisions_title | country5_admin_divisions_title_1 | country5_area | country5_area_acre | country5_area_ha | country5_area_km2 | country5_area_m2 | country5_area_sqft | country5_area_sqmi | country5_capital | country5_capital_and_largest_city | country5_capital_type | country5_largest_city | country5_largest_city_population | country5_largest_city_type | country5_leader_name | country5_leader_title | country6 | country6_admin_divisions | country6_admin_divisions_1 | country6_admin_divisions_title | country6_admin_divisions_title_1 | country6_area | country6_area_acre | country6_area_ha | country6_area_km2 | country6_area_m2 | country6_area_sqft | country6_area_sqmi | country6_capital | country6_capital_and_largest_city | country6_capital_type | country6_largest_city | country6_largest_city_population | country6_largest_city_type | country6_leader_name | country6_leader_title | country7 | country7_admin_divisions | country7_admin_divisions_1 | country7_admin_divisions_title | country7_admin_divisions_title_1 | country7_area | country7_area_acre | country7_area_ha | country7_area_km2 | country7_area_m2 | country7_area_sqft | country7_area_sqmi | country7_capital | country7_capital_and_largest_city | country7_capital_type | country7_largest_city | country7_largest_city_population | country7_largest_city_type | country7_leader_name | country7_leader_title | country8 | country8_admin_divisions | country8_admin_divisions_1 | country8_admin_divisions_title | country8_admin_divisions_title_1 | country8_area | country8_area_acre | country8_area_ha | country8_area_km2 | country8_area_m2 | country8_area_sqft | country8_area_sqmi | country8_capital | country8_capital_and_largest_city | country8_capital_type | country8_largest_city | country8_largest_city_population | country8_largest_city_type | country8_leader_name | country8_leader_title | demonym | density_footnotes | density_km2 | density_rank | density_sqmi | disputed | elevation_footnotes | elevation_ft | elevation_m | embed | ethnic_groups | etymology | footnotes | grid_reference | highest_mount | image | image_alt | image_caption | image_map | image_map_alt | image_map_size | image_map_caption | image_name | image_size | island_type | iso_code | iso_code_type | label | label_position | languages | length_footnotes | length_ft | length_km | length_m | length_mi | local_name | location | major_islands | map | map_alt | map_caption | map_image | map_image_caption | map_mark | map_mark_width | map_relief | map_size | map_width | misc | module | name | native_name | native_name_lang | native_name_link | nickname | other_names | plural | population | population_as_of | population_footnotes | population_rank | population_rank_max | postal_code | postal_code_type | pushpin_label | pushpin_label_position | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_map_label | pushpin_map_label_position | pushpin_map_mark | pushpin_map_mark_width | pushpin_map_relief | pushpin_map_width | pushpin_mark | pushpin_mark_width | pushpin_relief | rank | registration_plate | sobriquet | timezone | timezone_DST | timezone1 | timezone1_DST | timezone2 | timezone2_DST | total_islands | treaty_system | type | utc_offset | utc_offset_DST | utc_offset1 | utc_offset1_DST | utc_offset2 | utc_offset2_DST | waterbody | website | width_footnotes | width_ft | width_km | width_m | width_max_ft | width_max_km | width_max_m | width_max_mi | width_mi | width_min_ft | width_min_km | width_min_m | width_min_mi | mapframe | mapframe-area_km2 | mapframe-area_mi2 | mapframe-caption | mapframe-coord | mapframe-coordinates | mapframe-custom | mapframe-frame-coord | mapframe-frame-coordinates | mapframe-frame-height | mapframe-frame-width | mapframe-geomask | mapframe-geomask-fill | mapframe-geomask-fill-opacity | mapframe-geomask-stroke-color | mapframe-geomask-stroke-colour | mapframe-geomask-stroke-width | mapframe-height | mapframe-id | mapframe-length_km | mapframe-length_mi | mapframe-marker | mapframe-marker-color | mapframe-marker-colour | mapframe-point | mapframe-shape | mapframe-shape-fill | mapframe-shape-fill-opacity | mapframe-stroke-color | mapframe-stroke-colour | mapframe-stroke-width | mapframe-switcher | mapframe-width | mapframe-wikidata | mapframe-zoom }}{{#invoke:Check for clobbered parameters|check | template = Infobox islands | cat = {{main other|Category:Pages using infobox islands with conflicting parameters}} |local_name; native_name |nickname; sobriquet |image; image_name |image_map; map_image |image_map_caption; map_image_caption; map_caption |pushpin_map; map |pushpin_map_alt; map_alt |pushpin_map_width; map_width |pushpin_mark; pushpin_map_mark; map_mark |pushpin_mark_width; pushpin_map_mark_width; map_mark_width |pushpin_relief; pushpin_map_relief; map_relief |pushpin_label; pushpin_map_label; label |pushpin_label_position; pushpin_map_label_position; label_position |country_capital_type; country capital type |country_largest_city_type; country largest city type |country1_capital_type; country 1 capital type |country2_capital_type; country 2 capital type |country3_capital_type; country 3 capital type |country4_capital_type; country 4 capital type |country5_capital_type; country 5 capital type |country6_capital_type; country 6 capital type |country7_capital_type; country 7 capital type |country8_capital_type; country 8 capital type |width_min_km; width_min_mi; width_min_m; width_min_ft |width_max_km; width_max_mi; width_max_m; width_max_ft |timezone1; timezone |utc_offset1; utc_offset |timezone1_DST; timezone_DST |utc_offset1_DST; utc_offset_DST<!-- |area_km2; area_sqmi; area_m2; area_sqft; area_ha; area_acre |width_km; width_mi; width_m; width_ft |length_km; length_mi; length_m; length_ft |coastline_km; coastline_mi; coastline_m; coastline_ft |elevation_m; elevation_ft |country_area_km2; country_area_sqmi; country_area_m2; country_area_sqft; country_area_ha; country_area_acre |country1_area_km2; country1_area_sqmi; country1_area_m2; country1_area_sqft; country1_area_ha; country1_area_acre |country2_area_km2; country2_area_sqmi; country2_area_m2; country2_area_sqft; country2_area_ha; country2_area_acre |country3_area_km2; country3_area_sqmi; country3_area_m2; country3_area_sqft; country3_area_ha; country3_area_acre |country4_area_km2; country4_area_sqmi; country4_area_m2; country4_area_sqft; country4_area_ha; country4_area_acre |country5_area_km2; country5_area_sqmi; country5_area_m2; country5_area_sqft; country5_area_ha; country5_area_acre |country6_area_km2; country6_area_sqmi; country6_area_m2; country6_area_sqft; country6_area_ha; country6_area_acre |country7_area_km2; country7_area_sqmi; country7_area_m2; country7_area_sqft; country7_area_ha; country7_area_acre |country8_area_km2; country8_area_sqmi; country8_area_m2; country8_area_sqft; country8_area_ha; country8_area_acre |density_km2; density_sqmi--> }}{{main other|{{#if:{{both|{{{pushpin_map|}}}{{{map|}}}|{{{image_map|}}}{{{map_image|}}}}}|{{#if:{{{pushpin_map_caption|}}}||{{#if:{{{map_caption|}}}|[[Kategori:Pages using infobox islands with an ambiguous map caption]]|}}}}| }}{{#if:{{both|{{{pushpin_map|}}}{{{map|}}}|{{{image_map|}}}{{{map_image|}}}}}|{{#if:{{{pushpin_map_alt|}}}||{{#if:{{{map_alt|}}}|[[Kategori:Pages using infobox islands with an ambiguous map alt]]|}}}}| }}}}<noinclude> {{Documentation}} <!-- categories links go in /doc, not here --> </noinclude> p7znd7f3kh946k6jvto6eo056662sa8 Templat:Infobox islands/area 10 106 236 235 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 235 wikitext text/x-wiki {{#if:{{both|{{{km2|}}}|{{{sqmi|}}}}} |<!-- sqmi and km2 -->{{formatnum:{{{km2}}}}}&nbsp;km<sup>2</sup> ({{formatnum:{{{sqmi}}}}}&nbsp;sq&nbsp;mi) |{{#if:{{{km2|}}}{{{sqmi|}}} |{{convinfobox|{{{km2|}}}|km2|{{{sqmi|}}}|sqmi|disp={{#if:{{{pct|}}}|x|b}}|{{#if:{{{pct|}}}|&#32;(}}}}{{#if:{{{pct|}}}|&#59;&#160;{{{pct}}}%)}} |{{#if:{{both|{{{ha|}}}|{{{acre|}}}}} |<!-- acre and ha (and no sqmi and no km2) -->{{formatnum:{{{ha}}}}}&nbsp;ha ({{formatnum:{{{acre}}}}}&nbsp;acres) |{{#if:{{{ha|}}}{{{acre|}}} |{{convinfobox|{{{ha|}}}|ha|{{{acre|}}}|acre|disp={{#if:{{{pct|}}}|x|b}}|{{#if:{{{pct|}}}|&#32;(}}}}{{#if:{{{pct|}}}|&#59;&#160;{{{pct}}}%)}} |{{#if:{{both|{{{sqft|}}}|{{{m2|}}}}} |<!-- sqft and m2 (and no sqmi, no km2, no ha, no acre) -->{{formatnum:{{{m2}}}}}&nbsp;m<sup>2</sup> ({{formatnum:{{{sqft}}}}}&nbsp;sq&nbsp;ft) |{{#if:{{{sqft|}}}{{{m2|}}} |{{convinfobox|{{{m2|}}}|m2|{{{sqft|}}}|sqft|disp={{#if:{{{pct|}}}|x|b}}|{{#if:{{{pct|}}}|&#32;(}}}}{{#if:{{{pct|}}}|&#59;&#160;{{{pct}}}%)}} }} }} }} }} }} }}<noinclude>{{Documentation}}</noinclude> mmpqny6i3zas1pqbsdkx3d0ywbjekrg Templat:Infobox islands/density 10 107 238 237 2024-08-09T09:19:47Z Jon Harald Søby 58 1 semakan diimportkan 237 wikitext text/x-wiki {{#if:{{{km2|}}} |{{#if:{{{sqmi|}}}<!-- sqmi and km2 --> |{{formatnum:{{{km2}}}}}/km<sup>2</sup> ({{formatnum:{{{sqmi}}}}}/sq&nbsp;mi) |{{formatnum:{{{km2}}}}}/km<sup>2</sup> ({{#expr: ({{formatnum:{{{km2}}}|R}})*2.58998811 round ({{precision|{{formatnum:{{{km2}}}|R}}}}-0)}}/sq&nbsp;mi) }} |{{#if:{{{sqmi|}}}<!-- sqmi and no km2 --> |{{formatnum:{{{sqmi}}}}}/sq&nbsp;mi ({{#expr: ({{formatnum:{{{sqmi}}}|R}})/2.58998811 round ({{precision|{{formatnum:{{{sqmi}}}|R}}}}+1)}}/km<sup>2</sup>) |{{#if:{{{m2|}}} |{{#if:{{{sqft|}}}<!-- sqft and m2 (and no sqmi and no km2) --> |{{formatnum:{{{m2}}}}}/m<sup>2</sup> ({{formatnum:{{{sqft}}}}}/sq&nbsp;ft) |{{formatnum:{{{m2}}}}}/m<sup>2</sup> ({{#expr: ({{formatnum:{{{m2}}}|R}})/10.7639104 round ({{precision|{{formatnum:{{{m2}}}|R}}}}+1)}}/sq&nbsp;ft) }} |{{#if:{{{sqft|}}}<!-- sqft and no m2 (and no sqmi and no km2 --> |{{formatnum:{{{sqft}}}}}/sq&nbsp;ft ({{#expr: ({{formatnum:{{{sqft}}}|R}})*10.7639104 round ({{precision|{{formatnum:{{{sqft}}}|R}}}}-0)}}/m<sup>2</sup>) }} }} }} }}<noinclude>{{Documentation}}</noinclude> l3bfkrxxxb6br3gkd9aecc4hban05sq Templat:Infobox islands/length 10 108 240 239 2024-08-09T09:19:48Z Jon Harald Søby 58 1 semakan diimportkan 239 wikitext text/x-wiki {{#if:{{{km|}}} |{{#if:{{{mi|}}}<!-- mi and km --> |{{formatnum:{{{km}}}}}&nbsp;km ({{formatnum:{{{mi}}}}}&nbsp;mi) |{{formatnum:{{{km}}}}}&nbsp;km ({{#expr: ({{formatnum:{{{km}}}|R}})/1.609344 round ({{precision|{{formatnum:{{{km}}}|R}}}}+1)}}&nbsp;mi) }} |{{#if:{{{mi|}}}<!-- mi and no km --> |{{formatnum:{{{mi}}}}}&nbsp;mi ({{#expr: ({{formatnum:{{{mi}}}|R}})*1.609344 round ({{precision|{{formatnum:{{{mi}}}|R}}}}-0)}}&nbsp;km) |{{#if:{{{m|}}} |{{#if:{{{ft|}}}<!-- ft and m (and no mi and no km) --> |{{formatnum:{{{m}}}}}&nbsp;m ({{formatnum:{{{ft}}}}}&nbsp;ft) |{{formatnum:{{{m}}}}}&nbsp;m ({{#expr: ({{formatnum:{{{m}}}|R}})*3.2808399 round ({{precision|{{formatnum:{{{m}}}|R}}}}-0)}}&nbsp;ft) }} |{{#if:{{{ft|}}}<!-- ft and no m (and no mi and no km --> |{{formatnum:{{{ft}}}}}&nbsp;ft ({{#expr: ({{formatnum:{{{ft}}}|R}})/3.2808399 round ({{precision|{{formatnum:{{{ft}}}|R}}}}+1)}}&nbsp;m) }} }} }} }}<noinclude>{{Documentation}}</noinclude> h2gbzvxnnlkx2qwodwqiub5fwei11ta Templat:Infobox language 10 109 254 253 2024-08-09T09:19:49Z Jon Harald Søby 58 13 semakan diimportkan 251 wikitext text/x-wiki {{Infobox | bodyclass = vevent | bodystyle = {{#if:{{{boxsize|}}}|width: {{{boxsize}}};}} | abovestyle = font-size:125%; color: {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}} }}|#114057|1}}|white|{{{fontcolor|black}}} }}; background-color: {{#if:{{{creator|}}}{{{setting|}}}|#114057|{{#if:{{{signers|}}}|silver|{{Infobox language/family-color|{{{familycolor|Default}}} }} }} }}; | above = <includeonly>{{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{PAGENAMEBASE}}}}}}}</includeonly> | aboveclass = above | subheaderstyle = font-size:110%; color: {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}} }}|#114057|1}}|white|{{{fontcolor|black}}} }}; background-color: {{#if:{{{creator|}}}{{{setting|}}}|#114057|{{#if:{{{signers|}}}|silver|{{Infobox language/family-color|{{{familycolor|Default}}} }} }} }}; | subheader1 = {{{altname|}}} | subheader2 = {{{nativename|}}} | subheader3 = {{#if:{{{acceptance|}}}|({{{acceptance|}}})}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{#if:{{{imagescale|}}}|{{{imagescale|}}}|0.9}}|alt={{{imagealt|}}}}} | captionstyle = padding:0.35em 0.35em 0.25em;line-height:1.25em; | caption = {{{imagecaption|}}} | headerstyle = color: {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}}|white|{{{fontcolor|black}}}}}; background-color: {{#if:{{{signers|}}}|silver|{{#if:{{{creator|}}}{{{setting|}}}|#114057|{{Infobox language/family-color|{{{familycolor|Default}}}}}}}}}; <!---------------------------------------------------------> | labelstyle = white-space:nowrap;padding-right:0.65em<!--(to ensure gap between any long/nonwrapped label and subsequent data on same line-->; | datastyle = line-height:1.3em; | label1 = Pronunciation | data1 = {{#if:{{{pronunciation|}}}| {{{pronunciation|''to be added''}}}}} | label2 = {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} | Created&nbsp;by | Native&nbsp;to }} | data2 = {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} |{{{creator|–}}} |{{{states|{{{state|}}}}}} }} | label3 = Date | data3 = {{{created|}}} | label4 = {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} |Setting and usage |{{#if:{{{region|}}}|Region}} }} | data4 = {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} |{{{setting|}}} |{{{region|}}} }} | label6 = Ethnicity | data6 = {{{ethnicity|}}} | label7 = {{#if:{{{extinct|}}} |[[Extinct language|Extinct]] |{{#if:{{{era|}}} |Era |{{#if:{{{creator|{{{speakers_label|}}}}}} |{{{speakers_label|Users}}} |{{Longitem|Native speakers}} }} }} }} | data7 =<!-- -->{{#if:{{{extinct|}}}|{{#ifeq:{{{extinct}}}|?|(date missing)[[Kategori:Language articles with unknown extinction date]]|{{{extinct}}}}}<!-- extinct input used -->|{{#if:{{{era|}}}|{{{era}}}<!-- era input used -->|<!-- no era, check for sign/spoken -->{{#if:{{{signers|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}} }}|silver|1}}<!-- check for signers/silver -->|<!-- SIGN language (silver) -->{{#if:{{{signers|}}}{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{signers|{{{speakers|–}}}}}} |{{#ifeq:{{{signers|{{{speakers}}}}}}|?|<!-- -->|{{#ifeq:{{{signers|{{{speakers}}}}}}|none|''None'' |{{#if:{{{date|}}}|{{{signers|{{{speakers|–}}}}}}&nbsp;({{{dateprefix|}}}{{{date}}}) |{{{signers|{{{speakers|–}}}}}}{{main other|[[Kategori:Language articles with speaker number undated]]}}}} }} }} }} }}<!--(end if:date, ifeq:date=na, if:signers. end of SIGN) -->|<!-- SPOKEN language (not silver) -->{{#if:{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{speakers|–}}} |{{#ifeq: {{{date}}}|no date|(undated figure of {{{speakers}}})|<!-- The following changes the display depending on the age of the data. Limit set to 25 years, as a population can double in that time. -->{{#if:{{{date|}}}|{{#iferror:{{#expr: {{padleft:|4|{{{date}}}|}} }}||{{#ifexpr:(({{CURRENTYEAR}} - {{padleft:|4|{{{date}}}|}}) < 25)<!-- -->|<!-- regular-->{{{speakers|–}}}&nbsp;({{{dateprefix|}}}{{{date}}})<!-- -->|<!-- old (25+) -->({{{speakers}}} cited {{{dateprefix|}}}{{{date}}}){{main other|{{#ifeq:{{{ref}}}|e19|[[Kategori:Language articles with old Ethnologue 19 speaker data]]|{{#ifeq:{{{ref}}}|e18|[[Kategori:Language articles with old Ethnologue 18 speaker data]]|[[Kategori:Language articles with old speaker data]]}}}}}}}}}}<!--(end ifexpr:25+, iferror:) -->|{{#ifeq:{{{speakers}}}|?|<!-- -->|{{#ifeq:{{{speakers}}}|none|''None'' |<!-- no date input -->{{{speakers|–}}}{{main other|[[Kategori:Language articles with speaker number undated]]}}}} }} }}<!--(end if:date, before the 25+ expr check) -->}}<!--(end ifeq:date=no date) -->}}<!--(end ifeq:date=na) -->|<!--(no speakers number to be shown)-->}}}}<!--(end if:speakers (in 2nd param of silver-check), if:silver. end of SPOKEN) -->}} }}<!--(end if:era, if:extinct. No open #if:s left) If there is a ref, and there is any input for this row (data7), then we add the reference: -->{{#if:{{{ref|}}}|{{#if:{{{extinct|}}}{{{era|}}}{{{signers|}}}{{{speakers|}}}{{{date|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|silver|sign_language}}|{{Infobox language/ref|{{{ref}}}|iso3={{{iso3|}}}|refname={{{refname|}}}|name={{{name|{{PAGENAME}}}}}|lc1={{{lc1|}}}|ld1={{Delink|{{{ld1}}}}}|lc2={{{lc2|}}}|ld2={{Delink|{{{ld2}}}}}|lc3={{{lc3|}}}|ld3={{Delink|{{{ld3}}}}}|lc4={{{lc4|}}}|ld4={{Delink|{{{ld4}}}}}|lc5={{{lc5|}}}|ld5={{Delink|{{{ld5}}}}}|lc6={{{lc6|}}}|ld6={{Delink|{{{ld6}}}}}|lc7={{{lc7|}}}|ld7={{Delink|{{{ld7}}}}}}}}}}}<!-- Add speakers2 after the ref: -->{{#if:{{{speakers2|}}}|<br />{{{speakers2|}}} }} | label8 = {{#if:{{{revived|}}} |[[Language revitalization|Revival]]{{#if:{{{revived-category|{{{revived-cat|}}}}}}|{{#ifeq:{{{revived-category|{{{revived-cat}}}}}}|nocat|<!--suppress-->|[[Kategori:{{{revived-category|{{{revived-cat}}}}}}]]|[[Kategori:Language revival]]}} }} }} | data8 = {{{revived|}}} | label9 = {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} |Purpose |{{Longitem|{{Allow wrap|[[Language family]]}}}} }} | data9 = {{#ifeq: {{lc:{{{family}}}}}|na||<div style="text-align:left;">{{{family|{{{fam1|{{#if:{{{signers|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|silver|1}} |''Unknown''{{main other|[[Kategori:Languages without classification]]}} |{{#if:{{{creator|}}}{{{setting|}}} |[[Constructed language]] |{{Infobox language/genetic|{{{familycolor|Default}}}}} }} }}}}} <ul style="line-height:100%; margin-left:1.35em;padding-left:0"><li> {{#ifeq:{{{familycolor|}}}|unclassified||{{#ifeq:{{{familycolor|}}}|Unclassified||{{#ifeq:{{{familycolor|}}}|isolate||{{#ifeq:{{{familycolor|}}}|Isolate||{{#if:{{{fam2|}}} | {{{fam2}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam3|}}} | {{{fam3}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam4|}}} | {{{fam4}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam5|}}} | {{{fam5}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam6|}}} | {{{fam6}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam7|}}} | {{{fam7}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam8|}}} | {{{fam8}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam9|}}} | {{{fam9}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam10|}}} | {{{fam10}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam11|}}} | {{{fam11}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam12|}}} | {{{fam12}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam13|}}} | {{{fam13}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam14|}}} | {{{fam14}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>{{#if:{{{fam15|}}} | {{{fam15}}}<ul style="line-height:100%;margin-left:0.45em;padding-left:0;"><li>'''{{{name|{{PAGENAME}}}}}'''</li></ul> | '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }}</li></ul>| '''{{{name|{{PAGENAME}}}}}''' }} }}}}}}}}</li></ul>}}}</div>}} | label10 = {{Longitem|{{#if:{{{ancestor2|}}}|Early forms|Early form}}}} | data10 = {{#if:{{{protoname|}}}{{{ancestor|}}}|<div style="text-align:left;">{{{protoname|{{{ancestor|}}}}}} {{#if:{{{ancestor2|}}}|<ul style="line-height:100%; margin-left:1.35em; padding-left:0"><li>{{{ancestor2}}} {{#if:{{{ancestor3|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor3}}} {{#if:{{{ancestor4|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor4}}} {{#if:{{{ancestor5|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor5}}} {{#if:{{{ancestor6|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor6}}} {{#if:{{{ancestor7|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor7}}} {{#if:{{{ancestor8|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor8}}} {{#if:{{{ancestor9|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor9}}} {{#if:{{{ancestor10|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor10}}} {{#if:{{{ancestor11|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor11}}} {{#if:{{{ancestor12|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor12}}} {{#if:{{{ancestor13|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor13}}} {{#if:{{{ancestor14|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor14}}} {{#if:{{{ancestor15|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor15}}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </div>}} | label11 = {{Longitem|Standard forms}} | data11 = {{#if:{{{standards|}}}|{{{standards}}} |{{#if:{{{stand1|}}}|{{plainlist| *{{{stand1|}}}{{#if:{{{stand2|}}}| *{{{stand2|}}}|}}{{#if:{{{stand3|}}}| *{{{stand3|}}}|}}{{#if:{{{stand4|}}}| *{{{stand4|}}}|}}{{#if:{{{stand5|}}}| *{{{stand5|}}}|}}{{#if:{{{stand6|}}}| *{{{stand6|}}}}}}}}}}} | label12 = Dialects | data12 = {{#if:{{{dialects|}}}|{{{dialects}}} |{{#if:{{{dia1|}}}| {{#if:{{{dia1|}}}|*{{{dia1}}}}} {{#if:{{{dia2|}}}|*{{{dia2}}}}} {{#if:{{{dia3|}}}|*{{{dia3}}}}} {{#if:{{{dia4|}}}|*{{{dia4}}}}} {{#if:{{{dia5|}}}|*{{{dia5}}}}} {{#if:{{{dia6|}}}|*{{{dia6}}}}} {{#if:{{{dia7|}}}|*{{{dia7}}}}} {{#if:{{{dia8|}}}|*{{{dia8}}}}} {{#if:{{{dia9|}}}|*{{{dia9}}}}} {{#if:{{{dia10|}}}|*{{{dia10}}}}} {{#if:{{{dia11|}}}|*{{{dia11}}}}} {{#if:{{{dia12|}}}|*{{{dia12}}}}} {{#if:{{{dia13|}}}|*{{{dia13}}}}} {{#if:{{{dia14|}}}|*{{{dia14}}}}} {{#if:{{{dia15|}}}|*{{{dia15}}}}} {{#if:{{{dia16|}}}|*{{{dia16}}}}} {{#if:{{{dia17|}}}|*{{{dia17}}}}} {{#if:{{{dia18|}}}|*{{{dia18}}}}} {{#if:{{{dia19|}}}|*{{{dia19}}}}} {{#if:{{{dia20|}}}|*{{{dia20}}}}} }}}} | rowclass12 = {{#if:{{{dialects|}}}||{{#if:{{{dia1|}}}|{{{listclass|{{{liststyle|plainlist}}}}}}}}}} | label13 = {{Longitem|{{allow wrap|[[Writing system]]}}}} | data13 = {{#switch: {{lc:{{{script|}}}}} | latin | [[latin]] | latin alphabet | [[latin alphabet]] | [[latin alphabet|latin]] = [[Latin script|Latin]] | #default = {{{script|}}} }} | label14 = {{Longitem|{{allow wrap|[[Manually coded language|Signed forms]]}}}} | data14 = {{#if:{{{sign|}}}|{{{sign}}}}} | label15 = Sources | data15 = {{{posteriori|}}} <!---------------------------------------------------------> | header16 = {{#if:{{{nation|}}}{{{official|}}}{{{minority|}}}{{{agency|}}}{{{development_body|}}}|Official status}} | label17 = {{Longitem|Official language&nbsp;in}} | data17 = {{{nation|{{{official|}}}}}} | label18 = {{Longitem|class=nowrap|Recognised minority<br />language&nbsp;in}} | data18 = {{#if:{{{minority|}}} |<div style="<!--label17 above almost always linewraps, so:-->vertical-align:middle;">{{{minority}}}</div>}} | label19 = [[List of language regulators|Regulated&nbsp;by]] | data19 = {{{agency|{{#ifexpr:{{#if:{{{agency|}}}|1|0}} and {{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|Default}}}}}|#114057|1}}|1|0}} | ''None'' <!-- | {{#if:{{{nation|}}}|''No official regulation''}} [this ends up claiming that languages have no regulation just because no-one bothered to add the regulator --> }}}}} | label20 = Development body | data20 = {{{development_body|}}} <!---------------------------------------------------------> | header21 = Language codes | label22 = {{Nowrap|[[ISO 639-1]]}} | data22 = {{#if:{{{iso1|}}}|<code>{{#ifeq:{{str len|{{{iso1|}}}}}| 2 | {{ISO 639-1|{{{iso1}}}}} | {{{iso1}}} }}</code> {{{iso1comment|}}}}} | label23 = {{Nowrap|[[ISO 639-2]]}} | data23 = {{#if:{{{iso2|}}}{{{iso2b|}}}{{{iso2t|}}} |<code>{{#if:{{{iso2b|}}}{{{iso2t|}}} |{{#ifeq:{{str len|{{{iso2b|}}}}}| 3 | {{ISO 639-2|{{{iso2b}}}}} | {{{iso2b}}} }}&nbsp;(B) |{{#if:{{{signers|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|silver|1}} |{{{iso2|sgn}}} |{{ #if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}} |{{{iso2|art}}} |{{#ifeq:{{str len|{{{iso2|}}}}}| 3 | {{ISO 639-2|{{{iso2}}}}} | {{{iso2}}} }}}}}}}}</code> {{{iso2comment|}}}{{ #if:{{{iso2b|}}}{{{iso2t|}}} |<br /><code>{{#ifeq:{{str len|{{{iso2t|}}}}}| 3 | {{ISO 639-2|{{{iso2t}}}}} | {{{iso2t}}} }}&nbsp;(T)</code>}} }} | label24 = {{Nowrap|[[ISO 639-3]]}} | data24 = {{#if:{{{iso3|}}} |{{#ifeq:{{lc:{{{iso3|}}}}}|none|{{#if:{{{iso3comment|}}}|{{{iso3comment}}}|''None'' (<code>mis</code>)}}|<code>{{#ifeq:{{str len|{{{iso3}}}}}| 3 | [[ISO639-3:{{{iso3}}}|{{{iso3}}}]] | {{{iso3}}} }}</code> {{#if:{{{lc1|}}}| – inclusive code<!--not all are 'macrolanguages': Hittite, for example-->}} {{{iso3comment|}}}}}|{{#if:{{{lc1|}}}| |–}}}}{{#ifexpr:{{#if:{{{lc1|}}}|1|0}} and {{#if:{{{lc2|}}}|1|0}}|{{#if:{{{iso3|}}}|<br />Individual codes|{{#if:{{{lc3|}}}|Variously|Either}}}}:{{Infobox language/codelist |{{{lc1|}}}|{{{ld1|}}}}}{{Infobox language/codelist |{{{lc2|}}}|{{{ld2|}}}}}{{Infobox language/codelist |{{{lc3|}}}|{{{ld3|}}}}}{{Infobox language/codelist |{{{lc4|}}}|{{{ld4|}}}}}{{Infobox language/codelist |{{{lc5|}}}|{{{ld5|}}}}}{{Infobox language/codelist |{{{lc6|}}}|{{{ld6|}}}}}{{Infobox language/codelist |{{{lc7|}}}|{{{ld7|}}}}}{{Infobox language/codelist |{{{lc8|}}}|{{{ld8|}}}}}{{Infobox language/codelist |{{{lc9|}}}|{{{ld9|}}}}}{{Infobox language/codelist |{{{lc10|}}}|{{{ld10|}}}}}{{Infobox language/codelist |{{{lc11|}}}|{{{ld11|}}}}}{{Infobox language/codelist |{{{lc12|}}}|{{{ld12|}}}}}{{Infobox language/codelist |{{{lc13|}}}|{{{ld13|}}}}}{{Infobox language/codelist |{{{lc14|}}}|{{{ld14|}}}}}{{Infobox language/codelist |{{{lc15|}}}|{{{ld15|}}}}}{{Infobox language/codelist |{{{lc16|}}}|{{{ld16|}}}}}{{Infobox language/codelist |{{{lc17|}}}|{{{ld17|}}}}}{{Infobox language/codelist |{{{lc18|}}}|{{{ld18|}}}}}{{Infobox language/codelist |{{{lc19|}}}|{{{ld19|}}}}}{{Infobox language/codelist |{{{lc20|}}}|{{{ld20|}}}}}{{Infobox language/codelist |{{{lc21|}}}|{{{ld21|}}}}}{{Infobox language/codelist |{{{lc22|}}}|{{{ld22|}}}}}{{Infobox language/codelist |{{{lc23|}}}|{{{ld23|}}}}}{{Infobox language/codelist |{{{lc24|}}}|{{{ld24|}}}}}{{Infobox language/codelist |{{{lc25|}}}|{{{ld25|}}}}}{{Infobox language/codelist |{{{lc26|}}}|{{{ld26|}}}}}{{Infobox language/codelist |{{{lc27|}}}|{{{ld27|}}}}}{{Infobox language/codelist |{{{lc28|}}}|{{{ld28|}}}}}{{Infobox language/codelist |{{{lc29|}}}|{{{ld29|}}}}}{{Infobox language/codelist |{{{lc30|}}}|{{{ld30|}}} }} |{{#if:{{{lc1|}}}|{{#if:{{{iso3|}}}|<br />Individual code:}}{{Infobox language/codelist|code={{{lc1}}}|2={{{ld1|}}} }} }} }} | label25 = {{Nowrap|[[ISO 639-6]]}}<!-- NOTE: ISO 639-6 was withdrawn in 2014.--> | data25 = {{#if:{{{iso6|}}}|<code>{{{iso6}}}</code>[[Kategori:Languages with ISO6 code]]}} | label26 = {{Longitem|[[Linguist List]]}} | data26 = {{Infobox language/linguistlist|1={{{linglist|}}} |2={{{lingname|}}}}} | label27 = &nbsp; | data27 = {{Infobox language/linguistlist|1={{{linglist2|}}}|2={{{lingname2|}}}}} | label28 = &nbsp; | data28 = {{Infobox language/linguistlist|1={{{linglist3|}}}|2={{{lingname3|}}}}} | label29 = &nbsp; | data29 = {{Infobox language/linguistlist|1={{{linglist4|}}}|2={{{lingname4|}}}}} | label30 = &nbsp; | data30 = {{Infobox language/linguistlist|1={{{linglist5|}}}|2={{{lingname5|}}}}} | label31 = &nbsp; | data31 = {{Infobox language/linguistlist|1={{{linglist6|}}}|2={{{lingname6|}}}}} | label32 = ''[[Glottolog]]'' | data32 = {{#if:{{{glotto|}}}|{{#ifeq:{{lc:{{{glotto|}}}}}|none|''None''[[Kategori:Languages without Glottolog code]]|{{#ifeq:{{lc:{{{glotto|}}}}}|spurious|(insufficiently attested or not a distinct language){{main other|[[Kategori:Languages rejected by Glottolog]]}}|<code>{{glottolink|{{{glotto}}}}}</code>{{#if:{{{glottoname|}}}|&nbsp; {{{glottoname}}}}}}}}}}}<!-- -->{{#if:{{{glotto2|}}}|{{#if:{{{glotto|}}}|<br />|<!--no break when more than one box on a page-->}}<code>{{glottolink|{{{glotto2}}}}}</code>{{#if:{{{glottoname2|}}}|&nbsp; {{{glottoname2}}}}}}}<!-- -->{{#if:{{{glotto3|}}}|{{#if:{{{glotto2|}}}|<br />|<!--no break-->}}<code>{{glottolink|{{{glotto3}}}}}</code>{{#if:{{{glottoname3|}}}|&nbsp; {{{glottoname3}}}}}}}<!-- -->{{#if:{{{glotto4|}}}|{{#if:{{{glotto3|}}}|<br />|<!--no break-->}}<code>{{glottolink|{{{glotto4}}}}}</code>{{#if:{{{glottoname4|}}}|&nbsp; {{{glottoname4}}}}}}}<!-- -->{{#if:{{{glotto5|}}}|{{#if:{{{glotto4|}}}|<br />|<!--no break-->}}<code>{{glottolink|{{{glotto5}}}}}</code>{{#if:{{{glottoname5|}}}|&nbsp; {{{glottoname5}}}}}}} | label33 = [[Australian Institute of Aboriginal and Torres Strait Islander Studies|AIATSIS]]{{#if:{{{aiatsis|}}}|{{#tag:ref|{{AIATSIS|{{{aiatsis|}}}|{{{aiatsisname|{{{name}}}}}}|{{{aiatsis2|}}}}}|name="AIATSIS"}}}} | data33 = {{#if:{{{aiatsis|}}}|<code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis}}} {{{aiatsis}}}]</code>{{#if:{{{aiatsisname|}}}|&nbsp;{{{aiatsisname}}}}} }}{{#if:{{{aiatsis2|}}}|, <code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis2}}} {{{aiatsis2}}}]</code>{{#if:{{{aiatsisname2|}}}|&nbsp;{{{aiatsisname2}}}}} }}{{#if:{{{aiatsis3|}}}|, <code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis3}}} {{{aiatsis3}}}]</code>{{#if:{{{aiatsisname3|}}}|&nbsp;{{{aiatsisname3}}}}} }}{{#if:{{{aiatsis4|}}}|, <code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis4}}} {{{aiatsis4}}}]</code>{{#if:{{{aiatsisname4|}}}|&nbsp;{{{aiatsisname4}}}}} }}{{#if:{{{aiatsis5|}}}|, <code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis5}}} {{{aiatsis5}}}]</code>{{#if:{{{aiatsisname5|}}}|&nbsp;{{{aiatsisname5}}}}} }}{{#if:{{{aiatsis6|}}}|, <code>[https://collection.aiatsis.gov.au/austlang/language/{{{aiatsis6}}} {{{aiatsis6}}}]</code>{{#if:{{{aiatsisname6|}}}|&nbsp;{{{aiatsisname6}}}}} }} | label34 = {{Longitem|{{allow wrap|[[Guthrie classification of Bantu languages|Guthrie code]]}}}} | data34 = {{#if:{{{guthrie|}}}|<code>{{{guthrie}}}</code><ref name="Guthrie">Jouni Filip Maho, 2009. [https://web.archive.org/web/20180203191542/http://goto.glocalnet.net/mahopapers/nuglonline.pdf New Updated Guthrie List Online]</ref>}} | label35 = [[Endangered Languages Project|ELP]] | data35 = {{#ifeq: {{lc: {{{ELP|}}} }} | none | | {{Endangered Languages Project |ELP={{{ELP|}}} |ELPname={{{ELPname|}}} |qid={{{qid|}}} }} }} | label36 = &nbsp;<!--keeps ELP entries aligned--> | data36 = {{#if:{{{ELP2|}}}|[https://www.endangeredlanguages.com/lang/{{{ELP2}}} {{{ELPname2}}}]{{#tag:ref|[https://www.endangeredlanguages.com/lang/{{{ELP2|}}} Endangered Languages Project data for {{{ELPname2}}}].|name="ELP2"}}[[Kategori:Language articles with manual ELP links]]}} | label37 = &nbsp; | data37 = {{#if:{{{ELP3|}}}|[https://www.endangeredlanguages.com/lang/{{{ELP3}}} {{{ELPname3}}}]{{#tag:ref|[https://www.endangeredlanguages.com/lang/{{{ELP3|}}} Endangered Languages Project data for {{{ELPname3}}}].|name="ELP3"}}[[Kategori:Language articles with manual ELP links]]}} | label38 = &nbsp; | data38 = {{#if:{{{ELP4|}}}|[https://www.endangeredlanguages.com/lang/{{{ELP4}}} {{{ELPname4}}}]{{#tag:ref|[https://www.endangeredlanguages.com/lang/{{{ELP4|}}} Endangered Languages Project data for {{{ELPname4}}}].|name="ELP4"}}[[Kategori:Language articles with manual ELP links]]}} | label39 = &nbsp; | data39 = {{#if:{{{ELP5|}}}|[https://www.endangeredlanguages.com/lang/{{{ELP5}}} {{{ELPname5}}}]{{#tag:ref|[https://www.endangeredlanguages.com/lang/{{{ELP5|}}} Endangered Languages Project data for {{{ELPname5}}}].|name="ELP5"}}[[Kategori:Language articles with manual ELP links]]}} | label40 = &nbsp; | data40 = {{#if:{{{ELP6|}}}|[https://www.endangeredlanguages.com/lang/{{{ELP6}}} {{{ELPname6}}}]{{#tag:ref|[https://www.endangeredlanguages.com/lang/{{{ELP6|}}} Endangered Languages Project data for {{{ELPname6}}}].|name="ELP6"}}[[Kategori:Language articles with manual ELP links]]}} | label41 = [[Glottopedia]] | data41 = {{#if:{{{glottopedia|}}}|<code>[http://www.glottopedia.org/index.php/{{{glottopedia}}} {{{glottopedia}}}]</code>{{#tag:ref|[http://www.glottopedia.org/index.php/{{{glottopedia}}} Glottopedia article on {{PAGENAMEBASE}}].|name="Glottopedia"}}}} | label42 = [[Linguasphere Observatory|Linguasphere]] | data42 = {{#if:{{{lingua|}}}|<code>{{{lingua}}}</code>{{{lingua_ref|}}}}} | label43 = [[IETF language tag|IETF]] | data43 = {{#if:{{{ietf|}}}|<code>{{{ietf}}}</code>{{Main other|[[Kategori:Language articles with IETF language tag]]}}}} | data44 = {{#if:{{{map|}}} |{{#invoke:InfoboxImage|InfoboxImage|image={{{map}}}|upright={{#if:{{{mapscale|}}}|{{{mapscale|}}}|1.45}}|alt={{{mapalt|}}}}}{{#if:{{{mapcaption|}}}|<div style="text-align:left;">{{{mapcaption}}}</div>}}| }} | data45 = {{#if:{{{map2|}}} | {{#invoke:InfoboxImage|InfoboxImage|image={{{map2}}}|upright={{#if:{{{mapscale|}}}|{{{mapscale|}}}|1.45}}|alt={{{mapalt2|}}}}}{{#if:{{{mapcaption2|}}}|<div style="text-align:left;">{{{mapcaption2}}}</div>}} }} | data46 = {{#if:{{Both| {{{pushpin_map|}}} | {{{coordinates|}}}{{{coords|}}} }}| {{location map|{{{pushpin_map|}}} |coordinates = {{if empty|{{{coordinates|}}}|{{{coords|}}}}} |border = infobox |alt = {{{pushpin_map_alt|Approximate location where {{{name|the language}}} is spoken}}} |caption = {{{pushpin_map_caption|}}} |float = center |width = {{{pushpin_mapsize|}}} |default_width = 250 |AlternativeMap = {{{pushpin_image|}}} |label = {{#ifeq: {{lc: {{{pushpin_label_position|}}} }} | none | | {{if empty|{{{pushpin_label|}}}|{{{name|}}}|{{PAGENAMEBASE}} }} }} |marksize =6 |position = {{{pushpin_label_position|}}} }} }} | data47 = {{#if:{{if empty|{{{coordinates|}}}|{{{coords|}}}}} |Coordinates: {{#invoke:Coordinates|coordinsert|{{{coordinates|{{{coords|}}}}}}|type:landmark}}| }} | data48 = {{{module|}}} <!---------------------------------------------------------> | belowclass = noprint selfref | belowstyle = background-color:#E7E7FF;padding:0.3em 0.5em;text-align:left;line-height:1.3; | below = {{#ifeq:{{lc:{{{notice|{{{notice2|}}}}}}}}|ipa |'''This article contains [[International Phonetic Alphabet|IPA]] phonetic symbols.''' Without proper [[Bantuan:IPA#Rendering issues|rendering support]], you may see [[Specials (Unicode block)#Replacement character|question marks, boxes, or other symbols]] instead of [[Unicode]] characters. For an introductory guide on IPA symbols, see [[Bantuan:IPA]]. }} }}<!-- ---- Adding tracking categories ---- Note 1: Above in this code, already tracking [[Kategori:...]]'s may be added. Note 2: All categories are using {{main other|[[Cat:...]}}. -->{{main other|<!-- -->{{#if:{{Infobox language/family-color|{{{familycolor|}}}}}{{{signers|}}}{{{creator|}}}||[[Kategori:Languages without family color codes]]}}<!-- -->{{#if:{{{extinct|}}}{{{era|}}}{{{signers|}}}{{{speakers|}}}{{{creator|}}}{{{setting|}}}||<!-- no main input for data7 -->[[Kategori:Language articles without speaker estimate]]}}<!-- -->{{#ifeq:{{{speakers|}}}|?|{{#if:{{{iso3|}}}{{{lc1|}}}|{{#ifeq:{{{iso3|}}}|none|<!-- ok -->|{{#ifeq:{{{ref|}}}|e18|<!-- ok -->|[[Kategori:Language articles with unknown population not citing Ethnologue 18]]}}}}}}}}<!-- -->{{#ifeq:{{lc:{{{iso3|}}}}}|none|{{#if:{{{creator|}}}{{{setting|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|#114057|1}}|[[Kategori:Conlangs without ISO 639-3 code]]}}}}<!-- -->{{#if:{{{date|}}}|{{#iferror: {{#expr: {{padleft:|4|{{{date}}}|}} }} |<!-- -->{{#switch: {{lc:{{{date}}}}} | na = [[Kategori:Language articles with NA population dates]] | no date = [[Kategori:Language articles with 'no date' set]] | #default = [[Kategori:Language articles with invalid population dates]]<!-- -->}}|<!-- no error -->}}|<!-- no date -->}}<!-- -->{{#if:{{{iso3|}}}|<!--ok-->|{{#if:{{{lc1|}}}|<!--ok-->|<!-- -->{{#switch: {{lc:{{{isoexception}}}}} | dialect = [[Kategori:Dialects of languages with ISO 639-3 code]] | historical = [[Kategori:Historical forms of languages with ISO codes]] | protolanguage = [[Kategori:Protolanguages without ISO codes]] | talkpage = |}}}}}}<!-- -->{{#ifeq:{{{iso3|}}}|none|{{#if:{{{glotto|}}}|<!--ok-->|{{#if:{{{linglist|}}}|<!--ok-->|{{#if:{{{lingua|}}}|<!--ok-->|{{#if:{{{aiatsis|}}}|<!--ok-->|{{#if:{{{guthrie|}}}|<!--ok-->|{{#if:{{{creator|}}}|<!--ok-->|{{#if:{{{created|}}}|<!--ok-->|[[Kategori:Languages without ISO 639-3 code]]}}}}}}}}}}}}}}}}<!-- -->{{#if:{{{iso3|}}}{{{lc1|}}}{{{glotto|}}}{{{glotto2|}}}{{{glotto3|}}}{{{glotto4|}}}{{{glotto5|}}}{{{linglist|}}}{{{lingua|}}}{{{aiatsis|}}}{{{guthrie|}}}{{{isoexception|}}}|<!--ok-->|[[Kategori:Language articles without language codes]]}}<!-- -->{{#if:{{{lc1|}}}|{{#if:{{{lc2|}}}|<!--ok-->|[[Kategori:Languages which need ISO 639-3 comment]]}}}}<!-- -->{{#ifeq:{{{iso3|}}}|none|{{#ifeq:{{{ref|}}}|e18|[[Kategori:Nonexistent E18 links]]}}}}<!-- -->{{#ifeq:{{{iso3|}}}|none|{{#if:{{{linglist|}}}|{{#ifeq:{{{isoexception|}}}|dialect|[[Kategori:Dialects with Linguist List code]]|[[Kategori:Languages without ISO 639-3 code but with Linguist List code]]}}}}<!-- -->{{#ifeq:{{{glotto|}}}|none|<!--ok-->||{{#if:{{{glotto|}}}|[[Kategori:Languages without ISO 639-3 code but with Glottolog code]]}}}}<!-- -->{{#if:{{{lingua|}}}|[[Kategori:Languages without ISO 639-3 code but with Linguasphere code]]}}<!-- -->{{#if:{{{aiatsis|}}}|[[Kategori:Languages without ISO 639-3 code but with AIATSIS code]]}}<!-- -->{{#if:{{{guthrie|}}}|[[Kategori:Languages without ISO 639-3 code but with Guthrie code]]}}}}<!-- -->{{#if:{{{iso3|}}}|<!--okay-->|{{#if:{{{lc1|}}}|<!--ok-->|{{#if:{{{linglist|}}}|{{#ifeq:{{{isoexception|}}}|dialect|[[Kategori:Dialects with Linguist List code]]|[[Kategori:Languages without ISO 639-3 code but with Linguist List code]]}}}}<!-- -->{{#ifeq:{{{glotto|}}}|none|<!--ok-->|{{#if:{{{glotto|}}}|[[Kategori:Languages without ISO 639-3 code but with Glottolog code]]}}}}<!-- -->{{#if:{{{lingua|}}}|[[Kategori:Languages without ISO 639-3 code but with Linguasphere code]]}}<!-- -->{{#if:{{{aiatsis|}}}|[[Kategori:Languages without ISO 639-3 code but with AIATSIS code]]}}<!-- -->{{#if:{{{guthrie|}}}|[[Kategori:Languages without ISO 639-3 code but with Guthrie code]]}}}}}}<!-- -->{{#if:{{{glotto|}}}|{{#if:{{{glottorefname|}}}{{{glottoname|}}}|<!--ok--> |{{#switch: {{lc:{{{glotto}}}}} |none = |spurious = |#default = [[Kategori:Articles with unnamed Glottolog code]]}}}}}}<!-- -->{{#if:{{{glotto2|}}}|{{#if:{{{glottoname2|}}}{{{glottorefname2|}}}|<!--ok-->|[[Kategori:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto3|}}}|{{#if:{{{glottoname3|}}}{{{glottorefname3|}}}|<!--ok-->|[[Kategori:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto4|}}}|{{#if:{{{glottoname4|}}}{{{glottorefname4|}}}|<!--ok-->|[[Kategori:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto5|}}}|{{#if:{{{glottoname5|}}}{{{glottorefname5|}}}|<!--ok-->|[[Kategori:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#ifeq:{{Chr|{{{map|}}}|1}}|[|[[Kategori:Ill-formatted infobox-language images]]|<!--ok-->}}<!-- -->{{#ifeq:{{Chr|{{{map2|}}}|1}}|[|[[Kategori:Ill-formatted infobox-language images]]|<!--ok-->}}<!-- -->{{#ifeq:{{Chr|{{{image|}}}|1}}|[|[[Kategori:Ill-formatted infobox-language images]]|<!--ok-->}}<!-- -->{{#if:{{{iso2|}}}{{{iso2b|}}}{{{iso2t|}}}|[[Kategori:Languages with ISO 639-2 code]]|<!--ok-->}}<!-- -->{{#if:{{{iso1|}}}|[[Kategori:Languages with ISO 639-1 code]]|<!--ok-->}}<!-- -->{{#if:{{{speakers|}}}|{{#ifeq:{{{speakers|}}}|?|{{#if:{{{ref|}}}|[[Kategori:Language articles with speakers set to 'unknown' despite a reference]]|{{#ifeq:{{{isoexception|}}}|dialect|[[Kategori:Dialect articles with speakers set to 'unknown']]|[[Kategori:Language articles with speakers set to 'unknown']]}}}}|{{#ifeq:{{{speakers|}}}|none|{{#ifeq:{{lc:{{{familycolor|}}}}}|pidgin|<!--ok: pidgins don't have native speakers-->|[[Kategori:Language articles with speakers set to 'none']]}}|{{#if:{{{ref|}}}|<!--ok-->|[[Kategori:Language articles without reference field]]}}}}}}}}<!-- -->{{#if:{{{extinct|}}}{{{era|}}}|{{#if:{{{ref|}}}|<!--ok-->|{{#ifeq:{{{extinct}}}|?|<!--ok-->|[[Kategori:Language articles with unreferenced extinction date]]}}}}}}<!-- -->{{#if:{{{boxsize|}}}|[[Kategori:Language infoboxes with set boxsize]]}}<!-- -->{{#if:{{{glotto|}}}{{{glotto2|}}}{{{glotto3|}}}{{{glotto4|}}}{{{glotto5|}}}|<!--ok-->|[[Kategori:Language articles missing Glottolog code]]}}<!-- -->{{#ifeq:{{{iso3|}}}|none|{{#ifeq:{{{glotto|}}}|none|[[Kategori:Languages with neither ISO nor Glottolog code]]}}}}<!-- -->{{#ifeq:{{{iso3|}}}|none||{{#if:{{{iso3|}}}{{{lc1|}}}|{{#if:{{{ref|}}}|{{#switch: {{{ref}}} | e26 = | e25 = | e24 = | e23 = | e22 = | e21 = | e20 = | e19 = | e18 = | e17 = | e16 = | e15 = | e14 = | e13 = | e12 = | e11 = | e10 = | e09 = | e08 = | ne2007 = [[Kategori:Articles citing Nationalencyklopedin]] | ne2010 = [[Kategori:Articles citing Nationalencyklopedin]] | inali = [[Kategori:Articles citing INALI]] | linglist = [[Kategori:Articles citing Linguist List]] | aiatsis= [[Kategori:Articles citing AIATSIS]] | guthrie = [[Kategori:Articles citing Maho/Guthrie]] | &nbsp; = [[Kategori:Articles opting out of population reference]] | {{#if:{{{extinct|}}}{{{era|}}}|[[Kategori:Extinct ISO language articles citing sources other than Ethnologue]]|[[Kategori:ISO language articles citing sources other than Ethnologue]]}}}}}}}}}}<!-- -->{{#invoke:Check for unknown parameters | check | ignoreblank = y | unknown = [[Kategori:Language articles with unsupported infobox fields|_VALUE_]] | preview = Page using [[Templat:Infobox language]] with unknown parameter "_VALUE_" | acceptance | agency | aiatsis | aiatsis2 | aiatsis3 | aiatsis4 | aiatsis5 | aiatsis6 | aiatsisname | aiatsisname2 | aiatsisname3 | aiatsisname4 | aiatsisname5 | aiatsisname6 | altname | ancestor | ancestor2 | ancestor3 | ancestor4 | ancestor5 | ancestor6 | ancestor7 | ancestor8 | ancestor9 | ancestor10 | ancestor11 | ancestor12 | ancestor13 | ancestor14 | ancestor15 | boxsize | coordinates | coords | created | creator | date | dateprefix | development_body | dia1 | dia2 | dia3 | dia4 | dia5 | dia6 | dia7 | dia8 | dia9 | dia10 | dia11 | dia12 | dia13 | dia14 | dia15 | dia16 | dia17 | dia18 | dia19 | dia20 | dialects | ELP | ELPname | ELP2 | ELPname2 | ELP3 | ELPname3 | ELP4 | ELPname4 | ELP5 | ELPname5 | ELP6 | ELPname6 | era | ethnicity | extinct | fam1 | fam2 | fam3 | fam4 | fam5 | fam6 | fam7 | fam8 | fam9 | fam10 | fam11 | fam12 | fam13 | fam14 | fam15 | family | familycolor | fontcolor | glotto | glotto2 | glotto3 | glotto4 | glotto5 | glottofoot | glottoname | glottoname2 | glottoname3 | glottoname4 | glottoname5 | glottorefname | glottorefname2 | glottorefname3 | glottorefname4 | glottorefname5 | glottopedia | guthrie | ietf | image | imagealt | imagecaption | imagescale | iso1 | iso1comment | iso2 | iso2b | iso2comment | iso2t | iso3 | iso3comment | iso6 | isoexception | lc1 | lc2 | lc3 | lc4 | lc5 | lc6 | lc7 | lc8 | lc9 | lc10 | lc11 | lc12 | lc13 | lc14 | lc15 | lc16 | lc17 | lc18 | lc19 | lc20 | lc21 | lc22 | lc23 | lc24 | lc25 | lc26 | lc27 | lc28 | lc29 | lc30 | ld1 | ld2 | ld3 | ld4 | ld5 | ld6 | ld7 | ld8 | ld9 | ld10 | ld11 | ld12 | ld13 | ld14 | ld15 | ld16 | ld17 | ld18 | ld19 | ld20 | ld21 | ld22 | ld23 | ld24 | ld25 | ld26 | ld27 | ld28 | ld29 | ld30 | linglist | linglist2 | linglist3 | linglist4 | linglist5 | linglist6 | lingname | lingname2 | lingname3 | lingname4 | lingname5 | lingname6 | lingua | lingua_ref | listclass | map | map2 | mapalt | mapalt2 | mapcaption | mapcaption2 | mapscale | minority | module | name | nation | nativename | notice | notice2 | posteriori | pronunciation | protoname | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_mapsize | pushpin_image | pushpin_label | pushpin_label_position | ref | refname | region | revived | revived-cat | revived-category | script | setting | sign | signers | speakers | speakers2 | speakers_label | stand1 | stand2 | stand3 | stand4 | stand5 | stand6 | standards | state | states }}<!-- Close wrapping {{main other}} for the categories: -->}}<noinclude> {{Documentation}} {{INTERWIKI|Q7217946}} </noinclude> gg3d16rlswtzxx3nc00r9dzi3l5hmi6 Templat:Infobox language/doc 10 110 257 256 2024-08-09T09:19:49Z Jon Harald Søby 58 2 semakan diimportkan 255 wikitext text/x-wiki {{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> {{High-use}} {{Intricate template}} {{Lua|Module:InfoboxImage|Module:Check for unknown parameters}} This template is for use in articles about '''[[language]]s or [[dialect]]s'''. It provides a common standard for displaying data about a language. == Usage == === Syntax === {{Parameter names example | familycolor=unclassified | name | altname | nativename | acceptance | image | imagescale | imagealt | imagecaption | pronunciation | states | region | ethnicity | extinct | era | speakers | date | dateprefix | ref | refname | speakers2 | revived | revived-category | family | fam1 | fam2 | protoname | ancestor | ancestor2 | standards | stand1 | stand2 | dialects | dia1 | dia2 | script | sign | posteriori | nation | minority | agency | development_body | iso1 | iso1comment | iso2 | iso2comment | iso3 | iso3comment | lc1 | ld1 | lc2 | ld2 | iso6 | linglist | lingname | linglist2 | lingname2 | glotto | glottorefname | glotto2 | glottorefname2 | aiatsis | aiatsisname | aiatsis2 | aiatsisname2 | ELP | guthrie | glottopedia | lingua | lingua_ref | ietf | map | mapscale | mapalt | mapcaption | map2 | mapalt2 | mapcaption2 | coordinates | module | notice=IPA }} <syntaxhighlight lang="wikitext" style="overflow:auto;"> {{Infobox language | name = | altname = | nativename = | acceptance = | image = | imagescale = | imagealt = | imagecaption = | pronunciation = | states = <!-- or state --> | region = | creator = | created = | setting = | ethnicity = | extinct = | era = | speakers = | date = | dateprefix = | ref = <!-- up to e26 (or current edition) if reference is Ethnologue --> | refname = | speakers2 = | revived = | revived-category = <!-- or revived-cat --> | familycolor = | family = | fam1 = | fam2 = | fam3 = <!-- up to fam15 --> | protoname = | ancestor = | ancestor2 = <!-- up to ancestor8 --> | standards = | stand1 = | stand2 = <!-- up to stand6 --> | dialects = | listclass = | dia1 = | dia2 = <!-- up to dia20 --> | script = | sign = | posteriori = | nation = | minority = | agency = | development_body = | iso1 = | iso1comment = | iso2 = | iso2b = | iso2t = | iso2comment = | iso3 = | iso3comment = | lc1 = | ld1 = | lc2 = <!-- up to lc30 --> | ld2 = <!-- up to ld30 --> | iso6 = | isoexception = | linglist = | lingname = | linglist2 = <!-- up to linglist6 --> | lingname2 = <!-- up to lingname6 --> | glotto = | glottorefname = | glotto2 = <!-- up to glotto5 --> | glottorefname2 = <!-- up to glottorefname5 --> | aiatsis = | aiatsisname = | aiatsis2 = <!-- up to aiatsis6 --> | aiatsisname2 = <!-- up to aiatsisname6 --> | guthrie = | ELP = | ELPname = | ELP2 = <!-- up to ELP6 --> | ELPname2 = <!-- up to ELPname6 --> | glottopedia = | lingua = | lingua_ref = | ietf = | map = | mapscale = | mapalt = | mapcaption = | map2 = | mapalt2 = | mapcaption2 = | pushpin_map = | pushpin_image = | pushpin_map_alt = | pushpin_map_caption = | pushpin_mapsize = | pushpin_label = | pushpin_label_position = | coordinates = <!-- use {{Coord}} --> | module = | notice = IPA }} </syntaxhighlight> '''References in infobox''' {{Reflist}} {{Clear}} == Parameters == {{Infobox language/quilt|right}} The required parameters are: ; name : name of language ; familycolor : appropriate language family. Possible values are listed in the colored chart to the right (or above, depending on your browser). Please do not use other names, because they will not be recognized, and the table will be colored grey. : In most cases, 'familycolor' will trigger a default entry for the 'fam1' field, so that field is not necessary (you can continue with 'fam2'), but you can override this by entering something under 'fam1'. : Areal colors (American, Khoisan, Altaic, etc.) represent areal codings, and are *not* claims that the language belongs to that family. When these are used, the '''fam1''' parameter must be set to the widely accepted language family. : If 'isolate' or 'unclassified' is used, the fam1–xx tree will not display. In order to allow levels of classification, as with dialects of a language isolate, enter "grey"/"gray" instead. Other parameters are listed below, they can be incorporated anywhere between the first and last lines, and in any order. ; altname : additional name of the language [not every one, but one a reader would be likely to look for] ; nativename : native name, or a second alternative name [most cases as of 2012 not actually the native name] (if nativename is to be used, and altname parameter MUST be defined) ; pronunciation : pronunciation of the native name of the language in [[International Phonetic Alphabet|IPA]] → remember to enclose the transcription in an IPA template such as {{tl|IPA-all}} ; acceptance : questionable acceptance/status of the language: unattested, spurious, etc. ; states : countries in which it is mainly spoken. You do not have to define both this and '''region'''. Do not use flag icons ([[WP:INFOBOXFLAG]]). Direct links to country articles are generally not useful, and distract from useful links. Consider 'Languages of [country]' or '[ethnicity] in [country]' links instead. ; state : alias for '''states''' ; region : geographic region in which it is mainly spoken. You do not have to define both this and '''states'''; use this parameter for a single statement about geographic distribution. It is not for the broader region where the states are located, but rather the regions within the country, or across countries, where it is spoken. (That is, do not add SE Asia if we state it's in Laos, or West Africa if we state it's in Mali.) ; ethnicity : people for whom this is the ethnically native language; also good for the ethnic population if different from the number of speakers (although the names chosen for the articles on the people and on the language will generally be the same, it may be appropriate to pipe in the native name of the people here) ; era : era of use of a historical language, such as one that developed into something else; 'speakers' will not display ; extinct : date of extinction, or information about extinction; 'speakers' will not display ; revived : Date and/or population of attempted revival of extinct language ; revived-category : (or '''revived-cat''') optional name (without "Category:") of appropriate subcategory of [[:Category:Language revival]] (which is used by default if {{para|revived}} has a value); can be given as {{para|revived-category|nocat}} to suppress the categorization entirely, when the language has a separate article about its revival that is already in the category (e.g. [[Cornish revival]] is in [[:Category:Celtic language revival]], so {{para|revived-cat=nocat}} is used in the infobox at [[Cornish language]]). '''dia1''' : ... ; dia20 : primary dialects ; dialects : whatever you want to say; dia1–xx will not display ; listclass : class for the dia1–xx list: <code>plainlist</code> (default), <code>hlist</code> (horizontal) or <code>flatlist</code> (bulleted) ; stand1 : a standardized register ; stand2 : a second standardized register : ... ; stand6 : sixth standardized register ; standards : whatever you want to say ; script : writing system(s) used for the language by literate speakers, in the form ''script (instantiation)'', such as "[[Latin script|Latin]] ([[English alphabet]])"<br />(Common variants of "Latin (alphabet)" redirect to [[Latin script]]. For the [[Latin alphabet]] itself, add an element such as <code>&amp;nbsp;</code>.) ; sign : signed forms (manually coded language) ; nation : list of countries in which it is an official language ; minority : list of countries in which it is a recognized/protected minority language. This is intended for legal protection and similar ''de jure'' recognition, not simply being listed on a census and other ''de facto'' recognition. ; agency : regulatory body or language academy for the language ; development_body : development body for the language ; boxsize : overrides default width of infobox, currently set at 22em. Format must include units ("12em" or "123px"). : Useful when an article has various infoboxes aligned in a column. (Box will automatically expand to fix map wider than default box width.) ; fontcolor : color of font against 'familycolor' ← the font color is usually black, use this to change it if it is difficult to read ; module : Used for embedding other infoboxes into this one. === Number of speakers === ; speakers : the number of native speakers of the language. If unknown, enter {{angle bracket|?}} and do not enter NA for the date (this causes the article to be listed in the [[:Category:Language articles with speakers set to 'unknown']], a hidden [[WP:PROJCATS|maintenance category]]). If no native speakers, enter {{angle bracket|none}}. Otherwise, if no date is supplied, ''missing date'' will be displayed. Use <code><nowiki>{{sigfig|...|2}}</nowiki></code> to round to 2 [[significant figures]] while retaining the exact figure from the reference. ; date : the date of publication of the estimate of the number of speakers. : Used for calculations for obsolete data, so needs to start with a 4-digit year (see next parameter). Exception: If {{angle bracket|NA}} is entered, nothing will display. If {{angle bracket|no date}} is entered, "no date" will display. Do not enter a date parameter at all if speakers is set to {{angle bracket|none}}. : Articles with old dates (currently ≥ 30 years) appear in [[:Category:Language articles with old speaker data]]. ; dateprefix : any text wanted inside the parentheses before the date; a space ({{code|&nbsp;}}) must be explicitly included at the end ; ref : reference for the speaker data; placed after the date, if any. This can be any [[WP:CITEFOOT|inline citation]] or a predefined code such as e19, linglist, ne2010, etc. For more details, see the documentation at [[Templat:Infobox language/ref]]. : If {{angle bracket|e26}} is entered, this will automatically generate a reference to the ''Ethnologue'' 26 article that bears the ISO 639-3 code entered at 'iso3'. : To link to the auto-generated reference from elsewhere in the article, use <code><nowiki><ref name=e26/></nowiki></code>. : {{angle bracket|e25}} and <code><nowiki><ref name=e25/></nowiki></code> or {{angle bracket|e24}} and <code><nowiki><ref name=e24/></nowiki></code> etc. can be used to reference earlier editions, for example for languages which are no longer supported by Ethnologue, or to give an idea of how old undated population figures are. : {{angle bracket|linglist}} and <code><nowiki><ref name=linglist/></nowiki></code> can be used to ref the ''MultiTree'' entry at the Linguist List. : {{angle bracket|ne2007/ne2010}} and <code><nowiki><ref name=NE100/></nowiki></code> can be used to ref the Swedish national encyclopedia, which we use for many of the world's top 100 languages : {{angle bracket|inali}} and <code><nowiki><ref name=INALI/></nowiki></code> can be used to ref Mexico's [[Instituto Nacional de Lenguas Indígenas]] : Similarly, aiatsis can be used to link to the <code><nowiki><ref name=AIATSIS/></nowiki></code> ref generated by the infobox for the AIATSIS entry for Australian languages. (For Maho's edition of the Guthrie list for Bantu languages, <code><nowiki><ref name=Guthrie/></nowiki></code> needs to be added manually, as they do not provide population data.) ; refname : Name used in reference generated by certain 'ref' parameter values such as e19. It defaults to the value of the 'name' parameter or PAGENAME. ; speakers2 : a 2nd line for speaker data, such as 2nd estimate, 2nd country, L2 speakers, etc, appearing after the date. : If this is a second line of L1 speakers, it should be arranged so that, if there are two dates cited, the oldest appears in the date parameter, for automated update calculations. Data from different countries should not be added together if they are not comparable: say if one is from 1973 and another from 2006, or if one is rounded to the nearest million and another is on the order of 10,000. ; speakers_label : The infobox label for the number of speakers is "Native speakers" by default. Set this parameter to <code>|speakers_label = Speakers</code> to change it to "Speakers" or <code>|speakers_label = Signers</code> to change it to "Signers" for [[sign language]]s. === Genetic classification === You can use the language template to show the [[language family|genetic classification]] of a language as a descending staircase of language families, from the broadest to the most specific. ; fam1 : the broadest possible widely accepted [[language family]] of which the language is a part. If this would be exactly the same as you have defined for '''familycolor''', it may be omitted. ; fam2 : a more specific sub-family : ... ; fam15 : most specific sub group If you would prefer to enter some other information in this box (for example, ''disputed''), use this parameter instead: ; family : whatever you want to say; fam1–xx will not display. This can be set to "na" to avoid specifying a family relationship at all, an for a geographical group that has no single origin. The template can also display a staircase of ancestral forms: ; ancestor : ancestral or reconstructed form, if it has an article or has been assigned an ISO code ; ancestor2 : ... ; ancestor8 : intermediate ancestral forms ; protoname : alias for '''ancestor''' === ISO language codes === ; iso1 : the [[ISO 639-1]] code for the language ; iso1comment : for comments to not interfere with the link ; iso2 : the [[ISO 639-2]] code for the language (not for its family); creates a link to the ISO page. If a language has two ISO 639-2 codes, use the following two separate fields instead. ; iso2b : the [[ISO 639-2]] bibliographic code (for languages with two ISO 639-2 codes) ; iso2t : the [[ISO 639-2]] terminological code (for languages with two ISO 639-2 codes) ; iso2comment : for comments to not interfere with the link(s) ; iso3 : the [[ISO 639-3]] code for the language; creates a link to the ISO page. See below for the situation where multiple ISO 639-3 codes apply. : Field will display even if left empty, unless 'lc1' etc. is used. : If there is no ISO 639-3 code, set {{para|iso3|none}} to return the text ''none'' and add the article to [[:Category:Languages without iso3 codes]] (if '''iso3comment''' is also used, that will display in place of ''none'') : Leave empty for a dialect that has no iso3 code, but the language it belongs to does; in this case, also use {{para|isoexception|dialect}}. : Leave empty for a historical variety that has no iso3 code, but its modern version does; in this case, also use {{para|isoexception|historical}}. : Leave blank for a protolanguage, and use {{para|isoexception|protolanguage}}. : Use 'linglist' if the language has an iso3 code, but this is maintained at Linguist List instead of at SIL. Add the code itself under |linglist=. (This is not necessary if the SIL page provides its own link to the Linguist List page.) ; iso3comment : allows a comment in the ISO field that will not interfere with the link ; isoexception : a maintenance field to organize cleanup categories for missing ISO codes. Excludes article from the [[:Category:Language articles without language codes]] if set to any of the following values: :: '''dialect''' (used for a dialect that does not itself have an ISO code, although the language it belongs to does; adds article to the [[:Category:Dialects of languages with ISO 639-3 code]]) :: '''historical''' (used for a historical language that does not itself have an ISO code, although its modern version does; adds article to the [[:Category:Historical forms of languages with ISO codes]]) :: '''protolanguage''' (used for protolanguages without ISO codes; adds article to the [[:Category:Protolanguages without ISO codes]]) :: '''talkpage''' (used on talk pages and in archives so that they don't show up in tracking categories) Some languages have a number of [[ISO 639-3]] codes, one for each dialect of that language. If you try putting all of these codes in the usual '''iso3 =''' parameter, it will get quite messy. Instead, use the following parameters: ; lc1 : ISO code of the first dialect (the 'iso3' field will not display if empty and this is included) ; ld1 : name of the first language dialect; plain text only; do not include references in this field<!--They cause Linter "wikilink inside external link errors--> ; lc2 : ISO code of the second dialect ; ld2 : name of the second language dialect : ... ; lc30 : ISO code of the 30–th dialect ; ld30 : name of the 30–th dialect ; iso6 : the ISO 639-6 code for the language. Lc entries will be automatically linked to the ''Ethnologue'' site. Wikipedia articles on the dialects may be linked from the ld entries. For languages with an [[ISO 639-3 macrolanguage]] code and several individual codes, use '''iso3''' for the macrolanguage and '''lc''n''''', '''ld''n''''' for the individual codes. === Other language codes === ; linglist : this parameter is deprecated due to unreliable data, with the exception of some long-extinct languages. For ISO 639-3 codes of extinct languages whose descriptions are maintained at [[Linguist List]], enter the code under 'iso3' and the reader will be redirected from the ISO page. ; lingua : the [[Linguasphere]] code for the language '''glotto'''<br /> '''glotto2''' : ... ; glotto5 : the [[Glottolog]] code for the language. Enter "none" if Glottolog does not have a code for the language, "spurious" if Glottolog uses that term. [future: also "unattested"] ; glottorefname ; glottorefname2 : ... ; glottorefname5 : the Glottolog name(s) for the language (optional). Substitute '''glottoname''' etc. if the name needs to be displayed in the info box. ; guthrie : the [[Guthrie classification of Bantu languages|Guthrie]] code for Bantu languages. Generates a reference which can be accessed via name="Guthrie". ; aiatsis : the [[AIATSIS]] code for Australian languages. Generates a reference which can be accessed via name="AIATSIS". Site includes population data we can use. '''aiatsis2''' : ... ; aiatsis6 : additional AIATSIS codes '''aiatsisname2''' : ... ; aiatsisname6 : the AIATSIS name, if different from the entry at |name=, or note to appear after code ; ELP : URL suffix of the language article on the [[Endangered Languages Project]] site. Manual override of a default module linking to the ELP article per WikiData settings. Either way generates a reference that can be accessed via name="ELP". Entering "none" prevents the default link (e.g. when there is more than one info box in the WP article). The ELP site includes population data we can use. ; ELPname : name that will display for the ELP link and ref. : ... ; ELP4 : additional ELP links, or manual addition (rather than replacement) to the automated module link. Useful when changing WikiData might corrupt articles on other-language wikis (e.g. when the two wikis don't define the language with the same scope). '''ELPname4''' ; glottopedia : [[Glottopedia]]. Generates a reference which can be accessed via name="Glottopedia". ; ietf : [[IETF language tag]] === Constructed languages === This template is appropriate to use for [[constructed language]]s. The following parameters can be used: ; creator : name of language creator ; created : year of first creation ; setting : the use or setting for the language ; posteriori : natural-language sources Using these parameters, or setting '''familycolor=Conlang''', automatically sets the colored bars of the infobox to {{code|{{Infobox language/family-color|Conlang}}}} background with white fonts, and removes the '''states''' and '''region''' parameters from use ('''nation''' is also disabled). If the '''iso2''' parameter is left undefined, it is treated as being '''iso2=art'''. For conlangs, the '''family''' or '''fam''n''''' parameters are used to describe the hierarchy of purpose of the language, whereas '''posteriori''' is used to describe the ''a posteriori'' sources on which the conlang draws. === Maps and images === {{anchor|Images in the template}} You should not put large images at the top of the language template: they just make it very messy. You can place a small image at the top of the template using the following parameters: ; image : image at top of info box. Use format "image name.png", without "File:/Image:" or brackets. ; imagescale : override default size of image display (currently set to "upright=0.9", producing 200px display in a non-customized account). Use fractions or multiples: "2" for twice user-default, "0.5" for half. "1.45" will cause the image to fill the width of the infobox. ; imagealt : alt text for the image ; imagecaption : caption to appear under the image ; imageheader : brief header for the image ('logo', 'map', 'script', etc). This is placed in the left-hand column, and so needs to be short. If you have a larger image or two, such as a map, you can place them at the bottom of the template, spanning both columns, with the following parameter: ; map : image at bottom of info box. Use format "image name.png", without "File:/Image:" or brackets. ; mapscale : override default size of map display (currently set to "upright=1.45", producing 320px and filling the width of the infobox in a non-customized account). Use fractions or multiples: "2" for twice user-default, "0.5" for half. Affects both maps. ; mapalt : alt text for the map ; mapcaption : caption to appear under map ; map2 : a second map ; mapalt2 : alt text for the second map ; mapcaption2 : caption to appear under both maps The [[WP:EIS|usual image markup]] applies for both images. [[Alt text]] is for visually impaired readers, and the [[WP:CAPTION|caption]] is for all readers; typically they should have little in common (see [[WP:ALT]]). For languages spoken in smaller areas, where the location of the language can be reasonably approximated by a point on the map, then a pushpin map can be added: ; coordinates : latitude and longitude; use {{tl|coord}} ; pushpin_map : The name of a location map as per [[Templat:Location map]] (e.g. ''Indonesia'' or ''Russia''). The coordinate fields (from {{para|coordinates}}) position a pushpin coordinate marker and label on the map '''automatically'''. To show multiple pushpin maps, provide a list of maps separated by #, e.g., ''California#USA'' ; pushpin_image : (optional) Allows the use of an alternative map; the image must have the same edge coordinates as the location map template.<br/>''Equivalent to <code>AlternativeMap</code> parameter in [[Templat:Location map]].'' ; pushpin_mapsize : (optional) Must be entered as only a number—'''do not use px'''. The default value is 250. ''Equivalent to <code>width</code> parameter in [[Templat:Location map]].'' ; pushpin_map_alt : (optional) Alt text for pushpin map; used by [[screen reader]]s, see [[WP:ALT]]. ''Equivalent to <code>alt</code> parameter in [[Templat:Location map]].'' ; pushpin_map_caption : (optional) Fill out if a different caption from ''map_caption'' is desired. ''Equivalent to <code>caption</code> parameter in [[Templat:Location map]].'' ; pushpin_label : (optional) The text of the label to display next to the identifying mark; a [[Wiki markup|wikilink]] can be used. If not specified, the label will be the text assigned to the ''name'' parameter, and if the ''name'' parameter is not specified, the article title. (if {{para|pushpin_label_position|none}}, no label is displayed).<br/>''Equivalent to <code>label</code> parameter in [[Templat:Location map]].'' ; pushpin_label_position : (optional) The position of the label on the pushpin map relative to the pushpin coordinate marker. Valid options are {left, right, top, bottom, none}. If this field is not specified, the default value is ''right''.<br/>''Equivalent to <code>position</code> parameter in [[Templat:Location map]].'' === Footer notice === A notice or notices may be placed at the bottom of the infobox: ; notice=ipa : places a notice about the [[Unicode]] fonts used for displaying [[International Phonetic Alphabet|IPA]] == Examples == === Example 1 === {{Infobox language | name = English | pronunciation = {{IPAc-en|ˈ|ɪ|ŋ|ɡ|l|ɪ|ʃ}}<ref>[http://www.oxfordadvancedlearnersdictionary.com/dictionary/english_2 English Adjective] – Oxford Advanced Learner's Dictionary – Oxford University Press ©2010.</ref> | region = (see [[#Geographical distribution|below]]) | speakers = 360&nbsp;million | date = 2010 | dateprefix = cited&nbsp; | ref = <ref name=NE>[[Nationalencyklopedin]] "Världens 100 största språk 2010" The World's 100 Largest Languages in 2010</ref> | speakers2 = [[Second language|L2]]: 375&nbsp;million and 750 million [[English as a foreign or second language|EFL]]<ref name=BritishCouncilEnglish>{{cite web |url=http://www.britishcouncil.org/learning-elt-future.pdf |title=Future of English|accessdate=24 August 2011 |publisher=The British Council}} (page 10)</ref> | familycolor = Indo-European | fam2 = [[Germanic languages|Germanic]] | fam3 = [[West Germanic languages|West Germanic]] | fam4 = [[Anglo-Frisian languages|Anglo–Frisian]] | fam5 = [[Anglic languages|Anglic]] | script = [[English alphabet]] ([[Latin script]]) | sign = [[Manually coded English]] | nation = {{plainlist| * [[List of countries where English is an official language#Sovereign states|54 countries]] * [[List of countries where English is an official language#Non-sovereign entities|27 non-sovereign entities]] * [[United Nations]] * [[European Union]] * [[Commonwealth of Nations]] * [[Council of Europe]] * [[International Olympic Committee|IOC]] * [[NATO]] * [[North American Free Trade Agreement|NAFTA]] * [[Organization of American States|OAS]] * [[Organisation for Economic Co-operation and Development|OECD]] * [[Organisation of Islamic Cooperation|OIC]] * [[Pacific Islands Forum|PIF]] * [[UKUSA Agreement]]}} | iso1 = en | iso2 = eng | iso3 = eng | glotto = stan1293 | lingua = 52-ABA | map = Anglospeak.svg | mapcaption = {{legend|#0000ff|Countries where English is the native language of the majority of the population}} {{legend|#8ddada|Countries where English is an official but not primary language}} | notice = IPA }} <syntaxhighlight lang="wikitext" style="overflow:auto;"> {{Infobox language | name = English | pronunciation = {{IPAc-en|ˈ|ɪ|ŋ|ɡ|l|ɪ|ʃ}}<ref>[http://www.oxfordadvancedlearnersdictionary.com/dictionary/english_2 English Adjective] – Oxford Advanced Learner's Dictionary – Oxford University Press ©2010.</ref> | region = (see [[#Geographical distribution|below]]) | speakers = 360&nbsp;million | date = 2010 | dateprefix = cited&nbsp; | ref = <ref name=NE>[[Nationalencyklopedin]] "Världens 100 största språk 2010" The World's 100 Largest Languages in 2010</ref> | speakers2 = [[Second language|L2]]: 375&nbsp;million and 750 million [[English as a foreign or second language|EFL]]<ref name=BritishCouncilEnglish>{{cite web |url=http://www.britishcouncil.org/learning-elt-future.pdf |title=Future of English|accessdate=24 August 2011 |publisher=The British Council}} (page 10)</ref> | familycolor = Indo-European | fam2 = [[Germanic languages|Germanic]] | fam3 = [[West Germanic languages|West Germanic]] | fam4 = [[Anglo-Frisian languages|Anglo–Frisian]] | fam5 = [[Anglic languages|Anglic]] | script = [[English alphabet]] ([[Latin script]]) | sign = [[Manually coded English]] | nation = {{plainlist| * [[List of countries where English is an official language#Sovereign states|54 countries]] * [[List of countries where English is an official language#Non-sovereign entities|27 non-sovereign entities]] * [[United Nations]] * [[European Union]] * [[Commonwealth of Nations]] * [[Council of Europe]] * [[International Olympic Committee|IOC]] * [[NATO]] * [[North American Free Trade Agreement|NAFTA]] * [[Organization of American States|OAS]] * [[Organisation for Economic Co-operation and Development|OECD]] * [[Organisation of Islamic Cooperation|OIC]] * [[Pacific Islands Forum|PIF]] * [[UKUSA Agreement]]}} | iso1 = en | iso2 = eng | iso3 = eng | glotto = stan1293 | lingua = 52-ABA | map = Anglospeak.svg | mapcaption = {{legend|#0000ff|Countries where English is the native language of the majority of the population}} {{legend|#8ddada|Countries where English is an official but not primary language}} | notice = IPA }} </syntaxhighlight> '''References in infobox''' {{Reflist}} {{Clear}} === Example 2 === {{Infobox language | name = Persian | altname = Fārsi | nativename = {{lang|fa|فارسی}} | image = Farsi.svg | imagescale = 0.5 | imagecaption = ''Fārsi'' written in Persian ([[Nastaʿlīq script]]) | pronunciation = {{IPA-fa|fyɒːɾˈsiː|}} | states = {{hlist|style=line-height:1.3em; | [[Languages of Iran|Iran]] | [[Languages of Afghanistan|Afghanistan]]&nbsp;(as [[Dari language|Dari]]) | [[Languages of Tajikistan|Tajikistan]]&nbsp;(as [[Tajik language|Tajik]]) | [[Languages of Uzbekistan|Uzbekistan]] (as Tajik) | [[Languages of Iraq|Iraq]] | [[Languages of Russia|Russia]] }} | speakers = 45 million (2007) – 60 million | date = 2009 | ref = | speakers2 = (110 million total speakers) | familycolor = Indo-European | fam2 = [[Indo-Iranian languages|Indo-Iranian]] | fam3 = [[Iranian languages|Iranian]] | fam4 = [[Western Iranian languages|Western Iranian]] | fam5 = Southwestern Iranian | ancestor = [[Old Persian]] | ancestor2 = [[Middle Persian]] | stand1 = [[Western Persian]] | stand2 = [[Dari language|Dari]] | stand3 = [[Tajik language|Tajik]] | listclass = hlist | dia1 = [[Western Persian]] | dia2 = [[Dari language|Dari]] | dia3 = [[Tajik language|Central Asian Persian (Tajik)]] | dia4 = [[Bukhori dialect|Bukhori]] | dia5 = [[Pahlavani dialect|Pahlavani]] | dia6 = [[Hazaragi dialect|Hazaragi]] | dia7 = [[Aimaq dialect|Aimaq]] | dia8 = [[Judeo-Persian]] | dia9 = [[Dehwari dialect|Dehwari]] | dia10 = [[Judeo-Tat]] | dia11 = [[Tat language (Caucasus)|Caucasian Tat]] | dia12 = [[Armeno-Tat]] | script = {{startplainlist}} * [[Persian alphabet]] ([[Iran]] and [[Afghanistan]]) * [[Tajik alphabet]] ([[Tajikistan]]) * {{hlist |[[Hebrew alphabet|Hebrew]] | [[Persian Braille]]}} {{endplainlist}} | nation = [[Iran]] (as Persian)<br />[[Afghanistan]] (as [[Dari language|Dari]])<br />[[Tajikistan]] (as [[Tajik language|Tajik]]) | agency = {{longlink|[[Academy of Persian Language and Literature]]&nbsp;([[Iran]])}} | iso1 = fa | iso2b = per | iso2t = fas | iso3 = fas | lc1 = pes | ld1 = [[Western Persian]] | lc2 = prs | ld2 = [[Dari language]] (Afghan Persian) | lc3 = tgk | ld3 = [[Tajik language|Tajiki]]<!--This and the following codes aren't part of the macrolanguage per SIL--> | lc4 = aiq | ld4 = [[Aimaq dialect]] | lc5 = bhh | ld5 = [[Bukhori dialect]] | lc7 = haz | ld7 = [[Hazaragi dialect]] | lc8 = jpr | ld8 = [[Judeo-Persian]] | lc9 = phv | ld9 = [[Pahlavani language|Pahlavani]] | lc10 = deh | ld10 = [[Dehwari language|Dehwari]] | lc11 = jdt | ld11 = [[Judeo-Tat]] | lc12 = ttt | ld12 = [[Tat language (Caucasus)|Caucasian Tat]] | glotto = fars1254 | glottoname = Farsic – Caucasian Tat | lingua = {{longitem|58-AAC (Wider Persian)<br />&nbsp;> 58-AAC-c (Central Persian)}} | map = Persian Language Location Map.svg{{!}}border | mapcaption = Areas with significant numbers of Persian speakers (including dialects) | map2 = Iran, Afghanistan and Tajikistan.svg{{!}}border | mapcaption2 = {{legend|red|Countries where Persian is an official language}} | notice = IPA }} <syntaxhighlight lang="wikitext" style="overflow:auto;"> {{Infobox language | name = Persian | altname = Fārsi | nativename = {{lang|fa|فارسی}} | image = Farsi.svg | imagescale = 0.5 | imagecaption = ''Fārsi'' written in Persian ([[Nastaʿlīq script]]) | pronunciation = {{IPA-fa|fyɒːɾˈsiː|}} | states = {{hlist|style=line-height:1.3em; | [[Languages of Iran|Iran]] | [[Languages of Afghanistan|Afghanistan]]&nbsp;(as [[Dari language|Dari]]) | [[Languages of Tajikistan|Tajikistan]]&nbsp;(as [[Tajik language|Tajik]]) | [[Languages of Uzbekistan|Uzbekistan]] (as Tajik) | [[Languages of Iraq|Iraq]] | [[Languages of Russia|Russia]] }} | speakers = 45 million (2007) – 60 million | date = 2009 | ref = | speakers2 = (110 million total speakers) | familycolor = Indo-European | fam2 = [[Indo-Iranian languages|Indo-Iranian]] | fam3 = [[Iranian languages|Iranian]] | fam4 = [[Western Iranian languages|Western Iranian]] | fam5 = Southwestern Iranian | ancestor = [[Old Persian]] | ancestor2 = [[Middle Persian]] | stand1 = [[Western Persian]] | stand2 = [[Dari language|Dari]] | stand3 = [[Tajik language|Tajik]] | listclass = hlist | dia1 = [[Western Persian]] | dia2 = [[Dari language|Dari]] | dia3 = [[Tajik language|Central Asian Persian (Tajik)]] | dia4 = [[Bukhori dialect|Bukhori]] | dia5 = [[Pahlavani dialect|Pahlavani]] | dia6 = [[Hazaragi dialect|Hazaragi]] | dia7 = [[Aimaq dialect|Aimaq]] | dia8 = [[Judeo-Persian]] | dia9 = [[Dehwari dialect|Dehwari]] | dia10 = [[Judeo-Tat]] | dia11 = [[Tat language (Caucasus)|Caucasian Tat]] | dia12 = [[Armeno-Tat]] | script = {{startplainlist}} * [[Persian alphabet]] ([[Iran]] and [[Afghanistan]]) * [[Tajik alphabet]] ([[Tajikistan]]) * {{hlist |[[Hebrew alphabet|Hebrew]] | [[Persian Braille]]}} {{endplainlist}} | nation = [[Iran]] (as Persian)<br />[[Afghanistan]] (as [[Dari language|Dari]])<br />[[Tajikistan]] (as [[Tajik language|Tajik]]) | agency = {{longlink|[[Academy of Persian Language and Literature]]&nbsp;([[Iran]])}} | iso1 = fa | iso2b = per | iso2t = fas | iso3 = fas | lc1 = pes | ld1 = [[Western Persian]] | lc2 = prs | ld2 = [[Dari language]] (Afghan Persian) | lc3 = tgk | ld3 = [[Tajik language|Tajiki]]<!--This and the following codes aren't part of the macrolanguage per SIL--> | lc4 = aiq | ld4 = [[Aimaq dialect]] | lc5 = bhh | ld5 = [[Bukhori dialect]] | lc7 = haz | ld7 = [[Hazaragi dialect]] | lc8 = jpr | ld8 = [[Judeo-Persian]] | lc9 = phv | ld9 = [[Pahlavani language|Pahlavani]] | lc10 = deh | ld10 = [[Dehwari language|Dehwari]] | lc11 = jdt | ld11 = [[Judeo-Tat]] | lc12 = ttt | ld12 = [[Tat language (Caucasus)|Caucasian Tat]] | glotto = fars1254 | glottoname = Farsic – Caucasian Tat | lingua = {{longitem|58-AAC (Wider Persian)<br />&nbsp;> 58-AAC-c (Central Persian)}} | map = Persian Language Location Map.svg{{!}}border | mapcaption = Areas with significant numbers of Persian speakers (including dialects) | map2 = Iran, Afghanistan and Tajikistan.svg{{!}}border | mapcaption2 = {{legend|red|Countries where Persian is an official language}} | notice = IPA }} </syntaxhighlight> '''References in infobox''' {{Reflist}} {{Clear}} == Error-tracking categories == With 8,000 articles, manual review is insufficient. The following automating tracking categories should catch some of the more common errors. They also produce lists of articles that should be reviewed occasionally, because they lack population data or the data is dated. '''ISO support''' * {{Category link with count|Languages without ISO 639-3 code}} – [iso3=] is set to 'none', as it is not (yet) included in ISO. May have other codes. ** {{Category link with count|Conlangs without ISO 639-3 code}} – subcat: most conlangs do not qualify for ISO ** {{Category link with count|Nonexistent E17 links}} – setting [iso3=none] and [ref=e17] generates an invalid reference * {{Category link with count|Language articles without language codes}} – no language code listed, but not specifically excluded from ISO with [iso3=none] ** {{Category link with count|Languages without ISO 639-3 code but with Linguist List code}} *** subcat {{Category link with count|Dialects with Linguist List code}} – LingList codes some dialects with sub-ISO codes as "xxx-yyy" ** {{Category link with count|Languages without ISO 639-3 code but with Linguasphere code}} ** {{Category link with count|Languages without ISO 639-3 code but with AIATSIS code}} ** {{Category link with count|Languages without ISO 639-3 code but with Guthrie code}} ** {{Category link with count|Dialects of languages with ISO 639-3 code}} – a normal exception, triggered by isoexception=dialect ** {{Category link with count|Historical forms of languages with ISO codes}} – a normal exception, triggered by isoexception=historical ** {{Category link with count|Protolanguages without ISO codes}} – a normal exception, triggered by isoexception=protolanguage * {{Category link with count|Languages which need ISO 639-3 comment}} – triggered by [lc1=] without [lc2=] (once used as a way to provide comments; occasionally still appropriate with [iso3=] when a second but redundant ISO code is included) * {{Category link with count|Languages with ISO 639-2 code}} – sometimes the 639-3 code is mistakenly copied into the <code>iso2</code> field * {{Category link with count|Languages with ISO 639-1 code}} '''Speaker and date issues''' * {{Category link with count|Language articles without speaker estimate}} – no entry under [speakers=], and not extinct, a sign language, or a conlang * {{Category link with count|Language articles with invalid population dates}} – entry error at [date=] (anything other than a 4-digit number at start) * {{Category link with count|Language articles with speaker number undated}} – no entry at [date=] ** {{Category link with count|Language articles with 'no date' set}} – [date=no date], used when the source lacks a date ** {{Category link with count|Language articles with NA population dates}} – [date=NA], used when a date does not apply * {{Category link with count|Language articles with old speaker data}} – currently set to > 25 years * {{Category link with count|Language articles without reference field}} '''Classification''' * {{Category link with count|Language articles with spurious family}} – generally because [fam1=] is autofilled from [familycolor] to 'American', 'Australian', 'Papuan', 'Khoisan', 'Caucasian', 'Andamanese', or 'Paleosiberian' * {{Category link with count|Languages without family color codes}} – no or invalid familycolor * {{Category link with count|Languages without classification}} – family displayed as 'unknown' (sometimes triggered by SLs or conlangs) '''Other''' * {{Category link with count|Language articles needing infoboxes}} – manual cat: switch off (to "no") if you judge the article does not need one * {{Category link with count|Ill-formatted infobox-language images}} – images need to be stripped of external file formatting * {{Category link with count|Language articles with unsupported infobox fields}} – detects any parameter not in the list, incl. for now anything over dia20 * {{Category link with count|Articles citing AIATSIS}} * {{Category link with count|Articles citing INALI}} * {{Category link with count|Articles citing Linguist List}} * {{Category link with count|Articles citing Maho/Guthrie}} – category exists in template but has not been created * {{Category link with count|Articles citing Nationalencyklopedin}} * {{Category link with count|Articles opting out of population reference}} * {{Category link with count|Articles with unnamed Glottolog code}} * {{Category link with count|Dialect articles with speakers set to 'unknown'}} * {{Category link with count|Extinct ISO language articles citing sources other than Ethnologue}} * {{Category link with count|ISO language articles citing sources other than Ethnologue}} * {{Category link with count|Language articles missing Glottolog code}} * {{Category link with count|Language articles with IETF language tag}} * {{Category link with count|Language articles with old Ethnologue 18 speaker data}} * {{Category link with count|Language articles with speakers set to 'none'}} * {{Category link with count|Language articles with speakers set to 'unknown'}} * {{Category link with count|Language articles with unknown extinction date}} * {{Category link with count|Language articles with unknown population not citing Ethnologue 18}} * {{Category link with count|Language articles with unreferenced extinction date}} * {{Category link with count|Languages rejected by Glottolog}} * {{Category link with count|Languages with neither ISO nor Glottolog code}} * {{Category link with count|Languages without Glottolog code}} * {{Category link with count|Languages without ISO 639-3 code but with Glottolog code}} * {{Category link with count|Nonexistent E18 links}} == Sub-templates == # [[:Template:Infobox language/codelist]] # [[:Template:Infobox language/family-color]] # [[:Template:Infobox language/genetic]] # [[:Template:Infobox language/linguistlist]] # [[:Template:Infobox language/ref]] # [[:Template:Infobox language/quilt]] == See also == * [[:Template:Infobox proto-language]] * [[:Template:Infobox language family]] == TemplateData == {{collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}} {{TemplateData header|noheader=1}} <templatedata> { "description": "Display data about a language in a standard format", "format": "{{_\n| ________________ = _\n}}\n", "params": { "name": { "label": "Name", "description": "The English name of the language", "type": "string", "required": true }, "altname": { "label": "Alternative name", "description": "An alternative or additional English name of the language", "type": "string", "required": false }, "nativename": { "label": "Native name", "description": "The native name of the language", "type": "string", "required": false }, "pronunciation": { "label": "Pronunciation", "description": "The IPA pronunciation of the native name of the language", "type": "string", "required": false }, "states": { "label": "States", "description": "States or countries in which the language is mainly spoken", "type": "string", "required": false, "aliases": [ "state" ] }, "region": { "label": "Region", "description": "The geographic region(s) in which the language is mainly spoken", "type": "string", "required": false }, "ethnicity": { "label": "Ethnicity", "description": "The ethnic group(s) whose native language this is", "type": "string", "required": false }, "speakers": { "label": "Speakers", "description": "The number of native speakers/signers of the language (will be rounded to 2 significant figures)", "type": "number", "required": false }, "extinct": { "label": "Extinction", "description": "The date of the language's extinction or other information about extinction", "type": "string", "required": false }, "revived": { "label": "Revival", "description": "Date and/or population of attempted revival of extinct language", "type": "string", "required": false }, "revived-category": { "description": "optional name of appropriate subcategory of [[:Category:Language revival]] (which is used by default if {{para|revived}} has a value); or <code>nocat</code> to suppress categorization", "type": "string", "required": false }, "era": { "label": "Era", "description": "The era of a historical language's use", "type": "string", "required": false }, "date": { "label": "Date", "description": "The date of the stated estimate of the number of speakers, starting with a 4-digit year", "type": "string", "required": false }, "dateprefix": { "label": "Date prefix", "description": "Additional information about the date of estimation of the number of speakers, placed in parentheses before the date", "type": "string", "required": false }, "ref": { "label": "Reference", "description": "A reference for the number of speakers, placed after the date, if any. This can be any inline citation or a predefined code such as e19, linglist, ne2010, etc. For more details, see the documentation at Template:Infobox language/ref.", "type": "string", "required": false }, "refname": { "label": "Reference name", "description": "Name used in reference generated by certain 'ref' parameter values such as e19. It defaults to the value of the 'name' parameter or PAGENAME.", "type": "string", "required": false }, "speakers2": { "label": "Speakers 2", "description": "A second line giving more information about the number of speakers, such as a second estimate", "type": "string", "required": false }, "speakers_label": { "label": "Label for the 'speakers' field", "description": "A label which can overwrite the 'Native speakers' label", "type": "string", "required": false }, "familycolor": { "label": "Language Family Color", "description": "The appropriate language family for the purposes of determining the background color, chosen from a fixed set given in the documentation", "type": "string", "required": true }, "fam1": { "label": "Language Family", "description": "The broadest accepted language family the language belongs to", "type": "string", "required": false }, "fam2": { "label": "Language Family 2", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam3": { "label": "Language Family 3", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam4": { "label": "Language Family 4", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam5": { "label": "Language Family 5", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam6": { "label": "Language Family 6", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam7": { "label": "Language Family 7", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam8": { "label": "Language Family 8", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam9": { "label": "Language Family 9", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam10": { "label": "Language Family 10", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam11": { "label": "Language Family 11", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam12": { "label": "Language Family 12", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam13": { "label": "Language Family 13", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam14": { "label": "Language Family 14", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "fam15": { "label": "Language Family 15", "description": "A more specific sub-language family that the language belongs to", "type": "string", "required": false }, "family": { "label": "Family", "description": "Overrides all other family parameters, displays whatever you want", "type": "string", "required": false }, "ancestor": { "label": "Ancestor", "description": "An ancestral or reconstructed form of the language", "type": "string", "required": false }, "ancestor2": { "label": "Ancestor 2", "description": "An ancestral or reconstructed form of the language", "type": "string", "required": false }, "ancestor3": { "label": "Ancestor 3", "description": "An ancestral or reconstructed form of the language", "type": "string", "required": false }, "creator": { "label": "Creator", "description": "For constructed languages, the name of the creator", "type": "string", "required": false }, "created": { "label": "Creation date", "description": "Creation date for constructed languages", "type": "string", "required": false }, "setting": { "label": "Setting", "description": "The fictional setting or other usage of a constructed language", "type": "string", "required": false }, "posteriori": { "label": "Posteriori", "description": "Natural languages used as sources for a constructed language", "type": "string", "required": false }, "dia1": { "label": "Dialect", "description": "A primary dialect of the language", "type": "string", "required": false }, "dia2": { "label": "Dialect 2", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia3": { "label": "Dialect 3", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia4": { "label": "Dialect 4", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia5": { "label": "Dialect 5", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia6": { "label": "Dialect 6", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia7": { "label": "Dialect 7", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia8": { "label": "Dialect 8", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia9": { "label": "Dialect 9", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia10": { "label": "Dialect 10", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia11": { "label": "Dialect 11", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia12": { "label": "Dialect 12", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia13": { "label": "Dialect 13", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia14": { "label": "Dialect 14", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia15": { "label": "Dialect 15", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia16": { "label": "Dialect 16", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia17": { "label": "Dialect 17", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia18": { "label": "Dialect 18", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia19": { "label": "Dialect 19", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dia20": { "label": "Dialect 20", "description": "Another primary dialect of the language", "type": "string", "required": false }, "dialects": { "label": "Dialects", "description": "Overrides all other dialect parameters, just displays the argument", "type": "string", "required": false }, "stand1": { "label": "Standardized Register", "description": "A standardized register of the language", "type": "string", "required": false }, "stand2": { "label": "Standardized Register 2", "description": "Another standardized register of the language", "type": "string", "required": false }, "stand3": { "label": "Standardized Register 3", "description": "Another standardized register of the language", "type": "string", "required": false }, "stand4": { "label": "Standardized Register 4", "description": "Another standardized register of the language", "type": "string", "required": false }, "stand5": { "label": "Standardized Register 5", "description": "Another standardized register of the language", "type": "string", "required": false }, "stand6": { "label": "Standardized Register 6", "description": "Another standardized register of the language", "type": "string", "required": false }, "standards": { "label": "Standardized Registers", "description": "Overrides all other standardized register parameters, displays the argument", "type": "string", "required": false }, "script": { "label": "Script", "description": "The writing system(s) that literate speakers use for the language", "type": "string", "required": false }, "nation": { "label": "Nations", "description": "A list of countries in which it is an official language", "type": "string", "required": false }, "minority": { "label": "Minority Status", "description": "A list of countries in which it is a recognized minority language", "type": "string", "required": false }, "agency": { "label": "Agency", "description": "The regulatory body or language academy for the language", "type": "string", "required": false }, "iso1": { "label": "ISO 639-1", "description": "The ISO 639-1 code for the language", "type": "string", "required": false }, "iso1comment": { "label": "ISO 639-1 Comment", "description": "Any comments about the ISO 639-1 code, so as not to interfere with the link", "type": "string", "required": false }, "iso2": { "label": "ISO 639-2", "description": "The ISO 639-2 code for the language (but not the language family)", "type": "string", "required": false }, "iso2b": { "label": "ISO 639-2 Bibliographic", "description": "The ISO 639-2 bibliographic code for the language", "type": "string", "required": false }, "iso2t": { "label": "ISO 639-2 Terminological", "description": "The ISO 639-2 terminological code for the language", "type": "string", "required": false }, "iso2comment": { "label": "ISO 639-2 Comment", "description": "Any comments about the ISO 639-2 code(s), so as not to interfere with the link(s)", "type": "string", "required": false }, "iso3": { "label": "ISO 639-3", "description": "The ISO 639-3 code for the language, can be 'none' or 'linglist'", "type": "string", "required": false }, "iso3comment": { "label": "ISO 639-3 Comment", "description": "Any comments about the ISO 639-3 code, so as not to interfere with the link", "type": "string", "required": false }, "isoexception": { "label": "ISO Exception", "description": "Used for cleanup categories, excludes from the general 'missing language code' category if set to 'dialect', 'historical', 'protolanguage', or 'talkpage'", "type": "string", "required": false }, "lc1": { "label": "Dialect ISO 639", "description": "The ISO 639 code of the first dialect", "type": "string", "required": false }, "ld1": { "label": "Dialect Name", "description": "The name of the first dialect", "type": "string", "required": false }, "lc2": { "label": "Dialect ISO 639 2", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld2": { "label": "Dialect Name 2", "description": "The name of another dialect", "type": "string", "required": false }, "lc3": { "label": "Dialect ISO 639 3", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld3": { "label": "Dialect Name 3", "description": "The name of another dialect", "type": "string", "required": false }, "lc4": { "label": "Dialect ISO 639 4", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld4": { "label": "Dialect Name 4", "description": "The name of another dialect", "type": "string", "required": false }, "lc5": { "label": "Dialect ISO 639 5", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld5": { "label": "Dialect Name 5", "description": "The name of another dialect", "type": "string", "required": false }, "lc6": { "label": "Dialect ISO 639 6", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld6": { "label": "Dialect Name 6", "description": "The name of another dialect", "type": "string", "required": false }, "lc7": { "label": "Dialect ISO 639 7", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld7": { "label": "Dialect Name 7", "description": "The name of another dialect", "type": "string", "required": false }, "lc8": { "label": "Dialect ISO 639 8", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld8": { "label": "Dialect Name 8", "description": "The name of another dialect", "type": "string", "required": false }, "lc9": { "label": "Dialect ISO 639 9", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld9": { "label": "Dialect Name 9", "description": "The name of another dialect", "type": "string", "required": false }, "lc10": { "label": "Dialect ISO 639 10", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld10": { "label": "Dialect Name 10", "description": "The name of another dialect", "type": "string", "required": false }, "lc11": { "label": "Dialect ISO 639 11", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld11": { "label": "Dialect Name 11", "description": "The name of another dialect", "type": "string", "required": false }, "lc12": { "label": "Dialect ISO 639 12", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld12": { "label": "Dialect Name 12", "description": "The name of another dialect", "type": "string", "required": false }, "lc13": { "label": "Dialect ISO 639 13", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld13": { "label": "Dialect Name 13", "description": "The name of another dialect", "type": "string", "required": false }, "lc14": { "label": "Dialect ISO 639 14", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld14": { "label": "Dialect Name 14", "description": "The name of another dialect", "type": "string", "required": false }, "lc15": { "label": "Dialect ISO 639 15", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld15": { "label": "Dialect Name 15", "description": "The name of another dialect", "type": "string", "required": false }, "lc16": { "label": "Dialect ISO 639 16", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld16": { "label": "Dialect Name 16", "description": "The name of another dialect", "type": "string", "required": false }, "lc17": { "label": "Dialect ISO 639 17", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld17": { "label": "Dialect Name 17", "description": "The name of another dialect", "type": "string", "required": false }, "lc18": { "label": "Dialect ISO 639 18", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld18": { "label": "Dialect Name 18", "description": "The name of another dialect", "type": "string", "required": false }, "lc19": { "label": "Dialect ISO 639 19", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld19": { "label": "Dialect Name 19", "description": "The name of another dialect", "type": "string", "required": false }, "lc20": { "label": "Dialect ISO 639 20", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld20": { "label": "Dialect Name 20", "description": "The name of another dialect", "type": "string", "required": false }, "lc21": { "label": "Dialect ISO 639 21", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld21": { "label": "Dialect Name 21", "description": "The name of another dialect", "type": "string", "required": false }, "lc22": { "label": "Dialect ISO 639 22", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld22": { "label": "Dialect Name 22", "description": "The name of another dialect", "type": "string", "required": false }, "lc23": { "label": "Dialect ISO 639 23", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld23": { "label": "Dialect Name 23", "description": "The name of another dialect", "type": "string", "required": false }, "lc24": { "label": "Dialect ISO 639 24", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld24": { "label": "Dialect Name 24", "description": "The name of another dialect", "type": "string", "required": false }, "lc25": { "label": "Dialect ISO 639 25", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld25": { "label": "Dialect Name 25", "description": "The name of another dialect", "type": "string", "required": false }, "lc26": { "label": "Dialect ISO 639 26", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld26": { "label": "Dialect Name 26", "description": "The name of another dialect", "type": "string", "required": false }, "lc27": { "label": "Dialect ISO 639 27", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld27": { "label": "Dialect Name 27", "description": "The name of another dialect", "type": "string", "required": false }, "lc28": { "label": "Dialect ISO 639 28", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld28": { "label": "Dialect Name 28", "description": "The name of another dialect", "type": "string", "required": false }, "lc29": { "label": "Dialect ISO 639 29", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld29": { "label": "Dialect Name 29", "description": "The name of another dialect", "type": "string", "required": false }, "lc30": { "label": "Dialect ISO 639 30", "description": "The ISO 639 code of another dialect", "type": "string", "required": false }, "ld30": { "label": "Dialect Name 30", "description": "The name of another dialect", "type": "string", "required": false }, "iso6": { "label": "ISO 639-6", "description": "The ISO 639-6 code for the language", "type": "string", "required": false }, "linglist": { "label": "Linguist List", "description": "The Linguist List ISO 639-3 private or local code or other substitute, range qaa-qtz or numerals only", "type": "string", "required": false }, "lingname": { "label": "Linguist List Comment", "description": "Any comments on the Linguist List code", "type": "string", "required": false }, "linglist2": { "label": "Linguist List 2", "description": "An additional Linguist List code", "type": "string", "required": false }, "lingname2": { "label": "Linguist List Comment 2", "description": "An additional comment on the Linguist List code", "type": "string", "required": false }, "linglist3": { "label": "Linguist List 3", "description": "An additional Linguist List code", "type": "string", "required": false }, "lingname3": { "label": "Linguist List Comment 3", "description": "An additional comment on the Linguist List code", "type": "string", "required": false }, "lingua": { "label": "Linguasphere", "description": "The Linguasphere code for the language", "type": "string", "required": false }, "guthrie": { "label": "Guthrie", "description": "The Guthrie code for Bantu languages", "type": "string", "required": false }, "aiatsis": { "label": "AIATSIS", "description": "The AIATSIS code for Australian languages", "type": "string", "required": false }, "aiatsisname": { "label": "AIATSIS Comment", "description": "Any comments on the AIATSIS code", "type": "string", "required": false }, "aiatsis2": { "label": "AIATSIS 2", "description": "An additional AIATSIS code", "type": "string", "required": false }, "aiatsisname2": { "label": "AIATSIS Comment 2", "description": "An additional comment on the AIATSIS code", "type": "string", "required": false }, "aiatsis3": { "label": "AIATSIS 3", "description": "An additional AIATSIS code", "type": "string", "required": false }, "aiatsisname3": { "label": "AIATSIS Comment 3", "description": "An additional comment on the AIATSIS code", "type": "string", "required": false }, "aiatsis4": { "label": "AIATSIS 4", "description": "An additional AIATSIS code", "type": "string", "required": false }, "aiatsisname4": { "label": "AIATSIS Comment 4", "description": "An additional comment on the AIATSIS code", "type": "string", "required": false }, "aiatsis5": { "label": "AIATSIS 5", "description": "An additional AIATSIS code", "type": "string", "required": false }, "aiatsisname5": { "label": "AIATSIS Comment 5", "description": "An additional comment on the AIATSIS code", "type": "string", "required": false }, "aiatsis6": { "label": "AIATSIS 6", "description": "An additional AIATSIS code", "type": "string", "required": false }, "aiatsisname6": { "label": "AIATSIS Comment 6", "description": "An additional comment on the AIATSIS code", "type": "string", "required": false }, "ietf": { "label": "IETF", "description": "IETF language tag", "type": "string", "required": false }, "image": { "label": "Image", "description": "The image to display at the top of the infobox, in the format 'image name.png' without 'File:' or brackets", "type": "string", "required": false }, "imagesize": { "label": "Image Size", "description": "Overrides the default image size, using units of 'px' or 'em'", "type": "string", "required": false }, "imagealt": { "label": "Image Alt Text", "description": "The alt (hover) text for the image", "type": "string", "required": false }, "imagecaption": { "label": "Image Caption", "description": "A caption to display under the image", "type": "string", "required": false }, "imageheader": { "label": "Image Header", "description": "A brief header for the image to display in the left hand column", "type": "string", "required": false }, "map": { "label": "Map", "description": "The image to display at the bottom of the infobox, in the format 'image name.png' without 'File:' or brackets", "type": "string", "required": false }, "mapsize": { "label": "Map Size", "description": "Overrides the default image size for the map, using units of 'px' or 'em'", "type": "string", "required": false }, "mapalt": { "label": "Map Alt Text", "description": "The alt (hover) text for the map", "type": "string", "required": false }, "mapcaption": { "label": "Map Caption", "description": "A caption to display under the map", "type": "string", "required": false }, "map2": { "label": "Map 2", "description": "A second map to display at the bottom of the infobox, in the format 'image name.png' without 'File:' or brackets", "type": "string", "required": false }, "mapalt2": { "label": "Map Alt Text 2", "description": "The alt (hover) text the second map", "type": "string", "required": false }, "mapcaption2": { "label": "Map Caption 2", "description": "A caption to display under both maps", "type": "string", "required": false }, "pushpin_map": { "label": "Pushpin map", "description": "The name of a location map (e.g. 'Indonesia' or 'Russia'). The coordinates information (from the coordinates parameter) position a pushpin coordinate marker and label on the map 'automatically'. Example see: Padang, Indonesia", "type": "string", "example": "Indonesia" }, "pushpin_image": { "label": "Pushpin image", "type": "wiki-file-name", "description": "Image to use for the pushpin map" }, "pushpin_mapsize": { "label": "Pushpin map size", "description": "Must be entered as only a number—do not use px. The default value is 250.", "type": "number", "example": "200" }, "pushpin_map_alt": { "label": "Pushpin map alt text", "description": "Alt (hover) text for the pushpin map", "type": "string" }, "pushpin_map_caption": { "label": "Pushpin map caption", "description": "Fill out if a different caption from ''map_caption'' is desired.", "type": "string", "example": "Map showing the location of Biak language in Indonesia" }, "pushpin_label": { "label": "Pushpin label", "type": "line", "description": "Label of the pushpin" }, "pushpin_label_position": { "label": "Pushpin label position", "description": "The position of the label on the pushpin map relative to the pushpin coordinate marker. Valid options are {left, right, top, bottom, none}. If this field is not specified, the default value is ''right''.", "type": "string", "example": "left", "default": "right" }, "coordinates": { "label": "Coordinates", "description": "Latitude and longitude. Use {{Coord}}. See the documentation for {{Coord}} for more details on usage.", "type": "wiki-template-name", "example": "{{coord|41|50|15|N|87|40|55|W}}" }, "boxsize": { "label": "Infobox Size", "description": "Overrides the default width of the infobox, using units of 'px' or 'em' (it automatically expands to fit images wider than the default width)", "type": "string", "required": false }, "notice": { "label": "IPA Notice", "description": "Set to 'IPA' or 'ipa' to display a notice that the article contains special IPA phonetic symbols", "type": "string", "required": false }, "sign": { "label": "Signed form", "description": "The name of the sign language used for this language", "example": "Signed Arabic (national forms)", "type": "string" }, "protoname": { "label": "Protolanguage name", "description": "Name of the proto-language of the language", "example": "[[Proto-Arabic language]]", "type": "line" } } } </templatedata> {{collapse bottom}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Kategori:Language infobox templates|Language]] [[Kategori:Templates that add a tracking category]] [[Kategori:Templates that generate named references]] [[Kategori:Infobox templates using Wikidata|Language]] [[Kategori:Infobox templates with module parameter|Language]] }}</includeonly> bxxo5dp2wf7kr5w5sze3xsnc4mdtl6e Templat:Infobox language/family-color 10 111 264 263 2024-08-09T09:19:50Z Jon Harald Søby 58 6 semakan diimportkan 263 wikitext text/x-wiki {{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afrasiatic | afroasiatic = /**/#faecc8 | algic | algonkian = lightskyblue | altaic = yellowgreen | american | american (areal) = /**/#c0dde6 | andamanese = /**/#c99fee | australian | australian (areal) = /**/#eba9ee | austroasiatic | austro-asiatic = lightcoral | austronesian = pink | caucasian | caucasian (areal) = lightgreen | conlang | artificial | constructed | constructed language = /**/#114057 | creole | mixed | pidgin | creole/pidgin/mixed = tan | dravidian = mediumspringgreen | eskimo-aleut | eskimo–aleut | eskaleut = lightcyan | hmong-mien | miao-yao | hmong–mien | miao–yao = /**/#f2ceee | indo-european = /**/#c9ffd9 | isolate | language isolate | gray | grey | #dddddd = /**/#dddddd | khoisan | khoisan (areal) = goldenrod | na-dene | na-dené | dene-yeniseian | dené-yeniseian | na–dene | na–dené | dene–yeniseian | dené–yeniseian = /**/#99ddff | niger-congo | niger–congo = /**/#ffddaa | nilo-saharan | nilo-saharan? = gold | palaeosiberian | palaeo-siberian | paleosiberian | paleo-siberian | palaeosiberian (areal) = darkseagreen | papuan | papuan (areal) = /**/#fd79da | sign | sign language = silver | sino-tibetan = salmon | kra-dai | kadai | kradai | tai-kadai | kra–dai | tai–kadai = lavender | uralic = lime | uto-aztecan | utoaztecan = /**/#80bfff | unclassified | superfamily = white | #default =<!--blank--> }}<noinclude> {{documentation}} {{INTERWIKI|Q6959978}} </noinclude> 0evepei9ujmzp54xrrj99julc22mtbf Templat:Infobox language/family-color/doc 10 112 266 265 2024-08-09T09:19:50Z Jon Harald Søby 58 1 semakan diimportkan 265 wikitext text/x-wiki {{Documentation subpage}} <!-- Categories and interwikis go at the bottom of this page. --> === Usage === This is a subtemplate of {{tlx|Infobox language}}. It returns a background color name (e.g. {{code|pink}} or {{code|#c0dde6}}) for any language family name entered. Family names and their background colors are shown in the quilt table below. If no language family name is entered, or the input name is not recognised, a "" (blank) will be returned (resulting in a "transparent" background color), and the page will be added to [[:Category:Languages without family color codes]]. ===Color overview=== {{Infobox language/quilt}} {{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afrasiatic | afroasiatic = yellow | algic | algonkian = lightskyblue | altaic = yellowgreen | american | american (areal) = /**/#c0dde6 | andamanese = /**/#c99fee | australian | australian (areal) = /**/#eba9ee | austroasiatic | austro-asiatic = lightcoral | austronesian = pink | caucasian | caucasian (areal) = lightgreen | conlang | artificial | constructed | constructed language = black | creole | mixed | pidgin | creole/pidgin/mixed = tan | dravidian = mediumspringgreen | eskimo-aleut | eskimo–aleut | eskaleut = lightcyan | hmong-mien | miao-yao | hmong–mien | miao–yao = /**/#f2ceee | indo-european = lawngreen | isolate | language isolate | gray | grey | #dddddd = /**/#dddddd | khoisan | khoisan (areal) = goldenrod | na-dene | na-dené | dene-yeniseian | dené-yeniseian | na–dene | na–dené | dene–yeniseian | dené–yeniseian = /**/#99ddff | niger-congo | niger–congo = orange | nilo-saharan | nilo-saharan? = gold | palaeosiberian | palaeo-siberian | paleosiberian | paleo-siberian | palaeosiberian (areal) = darkseagreen | papuan | papuan (areal) = /**/#fd79da | sign | sign language = silver | sino-tibetan = tomato | kra-dai | kadai | kradai | tai-kadai | kra–dai | tai–kadai = lavender | uralic = limegreen | uto-aztecan | utoaztecan = /**/#80bfff | unclassified | superfamily = white | #default =<!--blank--> }} ===See also=== * {{tlx|Infobox language family}} * [[:Category:Languages without family color codes]] <includeonly>{{Sandbox other|| }}</includeonly> lowxs5uip6628j5rr2pb4tjff9m37sa Templat:Infobox language/family color 10 113 268 267 2024-08-09T09:19:50Z Jon Harald Søby 58 1 semakan diimportkan 267 wikitext text/x-wiki #REDIRECT [[Templat:Infobox language/family-color]] 2pizs949tvqpc9nk2ej8s91oms9fuxm Templat:Infobox language/genetic 10 114 272 271 2024-08-09T09:19:50Z Jon Harald Søby 58 3 semakan diimportkan 271 wikitext text/x-wiki {{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afroasiatic = [[Afroasiatic languages|Afro-Asiatic]] | niger-congo | niger–congo = [[Niger–Congo languages|Niger–Congo]]? | nilo-saharan = [[Nilo-Saharan languages|Nilo-Saharan]]? | khoisan = (specify language family under 'fam1')[[Kategori:Language articles with spurious family]] | indo-european = [[Indo-European languages|Indo-European]] | caucasian = (specify language family under 'fam1')[[Kategori:Language articles with spurious family]] | altaic = [[Altaic languages|Altaic]]? | uralic = [[Uralic languages|Uralic]] | dravidian = [[Dravidian languages|Dravidian]] | paleosiberian | paleo-siberian | palaeosiberian | palaeo-siberian = (specify language family under 'fam1')[[Kategori:Language articles with spurious family]] | austronesian = [[Austronesian languages|Austronesian]] | austro-asiatic | austroasiatic = [[Austroasiatic languages|Austroasiatic]] | sino-tibetan = [[Sino-Tibetan languages|Sino-Tibetan]] | hmong-mien | hmong–mien = [[Hmong–Mien languages|Hmong–Mien]] | andamanese = (specify language family under 'fam1' or 'family')[[Kategori:Language articles with spurious family]] | australian = (specify language family under 'fam1' or 'family')[[Kategori:Language articles with spurious family]] | papuan = (specify language family under 'fam1')[[Kategori:Language articles with spurious family]] | tai-kadai | tai–kadai | kadai | kradai | kra-dai | kra–dai = [[Kra–Dai languages|Kra–Dai]] | american = (specify language family under 'fam1' or 'family')[[Kategori:Language articles with spurious family]] | na-dene | na-dené | dene-yeniseian | dené-yeniseian | dene–yeniseian | dené–yeniseian = [[Dené–Yeniseian languages|Dené–Yeniseian]]? | eskimo-aleut | eskimo–aleut = [[Eskimo–Aleut languages|Eskimo–Aleut]] | uto-aztecan = [[Uto-Aztecan languages|Uto-Aztecan]] | creole = [[Creole language|Creole]] | pidgin = [[Pidgin]] | mixed = [[Mixed language|Mixed]] | isolate | language isolate = [[language isolate]] | sign | sign language = [[sign language]] | conlang | constructed language = [[constructed language]] | unclassified = [[Unclassified language|unclassified]] | = {{Main other|[[Kategori:Languages without family color codes]]}} | #default = {{{1}}}{{main other|[[Kategori:Languages without family color codes]]}} }}<noinclude> {{Documentation}} {{INTERWIKI|Q13530092}} </noinclude> q2sb72ca3p8k10mr68wysyq4052wskt Templat:Infobox language/genetic/doc 10 115 274 273 2024-08-09T09:19:50Z Jon Harald Søby 58 1 semakan diimportkan 273 wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> ===Usage=== ===Colors=== {{Infobox language/quilt}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Kategori:Templates that add a tracking category]] }}</includeonly> 43zeqmy8r8r7exy964lixyywpt2evux Templat:Infobox language/language family color table 10 116 278 277 2024-08-09T09:19:51Z Jon Harald Søby 58 3 semakan diimportkan 277 wikitext text/x-wiki {|style="text-align:center; margin:0;" <!-- Colour codes for language families and groups: [[Wikipedia:WikiProject Languages]] --> |colspan="1" style="background-color:{{Infobox language/family-color|Afro-Asiatic}}"|{{Infobox language/genetic|Afro-Asiatic}} |colspan="2" style="background-color:{{Infobox language/family-color|Nilo-Saharan}}"|{{Infobox language/genetic|Nilo-Saharan}} |colspan="1" style="background-color:{{Infobox language/family-color|Niger-Congo}}"|{{Infobox language/genetic |Niger-Congo}} |colspan="2" style="background-color:{{Infobox language/family-color|Khoisan}}"|[[Khoisan languages|Khoisan (areal)]] |- |colspan="1" style="background-color:{{Infobox language/family-color|Indo-European}}"|{{Infobox language/genetic|Indo-European}} |colspan="1" style="background-color:{{Infobox language/family-color|Caucasian}}"|[[Languages of the Caucasus|Caucasian (areal)]] |colspan="1" style="background-color:{{Infobox language/family-color|Uralic}}"|{{Infobox language/genetic|Uralic}} |colspan="1" style="background-color:{{Infobox language/family-color|Dravidian}}"|{{Infobox language/genetic|Dravidian}} |colspan="1" style="background-color:{{Infobox language/family-color|Altaic}}"|[[Altaic languages|Altaic (areal)]] |colspan="1" style="background-color:{{Infobox language/family-color|Paleosiberian}}"|[[Paleosiberian languages|Paleosiberian (areal)]] |- |colspan="2" style="background-color:{{Infobox language/family-color|Sino-Tibetan}}"|{{Infobox language/genetic|Sino-Tibetan}} |colspan="1" style="background-color:{{Infobox language/family-color|Hmong-Mien}}"|{{Infobox language/genetic|Hmong-Mien}} |colspan="2" style="background-color:{{Infobox language/family-color|Kra-Dai}}"|{{Infobox language/genetic|Kra-Dai}} |colspan="1" style="background-color:{{Infobox language/family-color|Austro-Asiatic}}"|{{Infobox language/genetic|Austro-Asiatic}} |- |colspan="2" style="background-color:{{Infobox language/family-color|Austronesian}}"|{{Infobox language/genetic|Austronesian}} |colspan="1" style="background-color:{{Infobox language/family-color|Papuan}}"|[[Papuan languages|Papuan (areal)]] |colspan="2" style="background-color:{{Infobox language/family-color|Australian}}"|[[Australian Aboriginal languages|Australian (areal)]] |colspan="1" style="background-color:{{Infobox language/family-color|Andamanese}}"|[[Andamanese languages|Andamanese (areal)]] |- |colspan="1" style="background-color:{{Infobox language/family-color|Eskimo-Aleut}}"|{{Infobox language/genetic|Eskimo-Aleut}} |colspan="1" style="background-color:{{Infobox language/family-color|Algic}}"|[[Algic languages|Algic]] |colspan="1" style="background-color:{{Infobox language/family-color|Uto-Aztecan}}"|{{Infobox language/genetic|Uto-Aztecan}} |colspan="2" style="background-color:{{Infobox language/family-color|Na-Dené}}"|[[Na-Dene languages|Na-Dené]] (and [[Dené–Yeniseian languages|Dené–Yeniseian]]?) |colspan="1" style="background-color:{{Infobox language/family-color|American}}"|[[Indigenous languages of the Americas|American (areal)]] |- |colspan="2" style="background-color:{{Infobox language/family-color|Creole}}"|{{Infobox language/genetic|Creole}}/{{Infobox language/genetic|Pidgin}}/{{Infobox language/genetic|Mixed}} |colspan="1" style="background-color:{{Infobox language/family-color|Isolate}}"|[[Language isolate]] |colspan="1" style="background-color:{{Infobox language/family-color|Sign}}"|[[Sign language]] |colspan="1" style="background-color:{{Infobox language/family-color|Conlang}}; color:white"|{{Colored link|white|Constructed language}} |colspan="1" style="background-color:{{Infobox language/family-color|unclassified}}"|[[Unclassified language|Unclassified]] |}<noinclude>{{documentation}} {{INTERWIKI|Q13219878}} </noinclude> hioztdhcub931gsceyf4svhvkhhckn3 Templat:Infobox language/linguistlist 10 117 281 280 2024-08-09T09:19:51Z Jon Harald Søby 58 2 semakan diimportkan 279 wikitext text/x-wiki {{#if:{{{1|}}} |<code>[http://multitree.org/codes/{{{1|}}} {{{1|}}}]</code>[[Kategori:Languages with Linglist code]] {{{2|{{{lingname|}}}}}}}}<noinclude> {{documentation}} </noinclude> k1c9rryxoked8856mm57xxllsfvbn2g Templat:Infobox language/quilt 10 118 283 282 2024-08-09T09:19:51Z Jon Harald Søby 58 1 semakan diimportkan 282 wikitext text/x-wiki {{infobox | title = Background colors used on Wikipedia for various language families and groups | bodyclass = metadata | data1 = {{Infobox language/language family color table}} | label10 = See also | data10 = {{main other||[[Wikipedia:WikiProject Languages]]}} }}<noinclude> {{documentation}} </noinclude> foq8rhzona5nhlwrogekkq5ptlegksc Templat:Infobox legislature 10 119 285 284 2024-08-09T09:19:51Z Jon Harald Søby 58 1 semakan diimportkan 284 wikitext text/x-wiki {{Infobox | bodyclass = vcard | abovestyle = font-size: 125%; {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | above = <includeonly><div style="display:inline" class="fn org">{{{name}}}</div> {{#if:{{{native_name|}}}|<br /><div style="display:inline" class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>{{#if:{{{transcription_name|}}}|<br /><div style="display:inline" class="nickname">{{{transcription_name}}}</div>}}}}</includeonly> | subheader = {{{legislature|}}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{coa_pic|{{{coa-pic|}}}}}} |size={{{coa_res|{{{coa-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{coa_alt|{{{coa-alt|Coat of arms or logo}}}}}} }} | caption = {{{coa_caption|}}} | image2 = {{#invoke:InfoboxImage |InfoboxImage |image={{{logo|{{{logo_pic|{{{logo-pic|}}}}}}}}} |size={{{logo_res|{{{logo-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{logo_alt|{{{logo-alt|Logo}}}}}} }} | caption2 = {{{logo_caption|}}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | labelstyle = {{{labelstyle|}}} | header1 = {{#if:{{{house_type|}}}{{{houses|}}}{{{term_limits|}}}|Type}} | label2 = Type | data2 = {{#if:{{{house_type|}}} |<div style="padding:0.1em 0;line-height:1.3em;<!--(modified longitem)-->"><div style="display:inline" class="category">{{#ifexist:{{{house_type}}}|[[{{{house_type}}}]]|{{{house_type}}}}}</div> {{#if:{{{body|}}} |of the [[{{{body}}}]]}} {{#if:{{{jurisdiction|}}} |of [[{{{jurisdiction}}}]]}}</div>}} | label3 = {{#if:{{{houses|}}}|Houses|Chambers}} | data3 = {{#if:{{{houses|}}}|{{{houses}}}|{{{chambers|}}}}} | label4 = {{#if:{{{pres-in-parl|}}}{{{crown-in-parl|}}}|[[King-in-Parliament|Sovereign]]|}} | data4 = {{#if:{{{pres-in-parl|}}}|{{{pres-in-parl}}}|{{{crown-in-parl|}}}}} | label5 = {{longitem|Term limits}} | data5 = {{{term_limits|}}} | header6 = {{#if:{{{foundation|}}}{{{disbanded|}}}{{{preceded_by|}}}{{{succeeded_by|}}}{{{new_session|}}}|History}} | label7 = {{#if:{{{foundation|}}}|Founded|Established}} | data7 = {{#if:{{{foundation|}}}|{{{foundation}}}|{{{established|}}}}} | label8 = Disbanded | data8 = {{{disbanded|}}} | label9 = Preceded&nbsp;by | data9 = {{{preceded_by|}}} | label10 = Succeeded&nbsp;by | data10 = {{{succeeded_by|}}} | label11 = {{longitem|New session started}} | data11 = {{{new_session|}}} | header14 = {{#if:{{{leader1|}}}{{{leader2|}}}{{{leader3|}}}{{{leader4|}}}{{{leader5|}}}{{{leader6|}}}{{{leader7|}}}{{{leader8|}}}|Leadership}} | label15 = {{longitem|{{{leader1_type|}}}}} | data15 = {{#if:{{{leader1|}}} |{{longitem|style=line-height:1.3em|{{{leader1|}}}{{#if:{{{party1|}}}|{{#ifeq:{{Str index|{{{party1|}}}|1}}|(||,}}&#32;{{{party1|}}}}} {{#if:{{{election1|}}}|<br/>since {{{election1|}}}|{{#if:{{{leader1_term|}}}|<br/>{{{leader1_term}}}}} }} }} }} | label16 = {{longitem|style=line-height:1.3em|{{{leader2_type|}}}}} | data16 = {{#if:{{{leader2|}}} |{{longitem|style=line-height:1.3em|{{{leader2|}}}{{#if:{{{party2|}}}|{{#ifeq:{{Str index|{{{party2|}}}|1}}|(||,}}&#32;{{{party2|}}}}} {{#if:{{{election2|}}}|<br/>since {{{election2|}}}|{{#if:{{{leader2_term|}}}|<br/>{{{leader2_term}}}}} }} }} }} | label17 = {{longitem|style=line-height:1.3em|{{{leader3_type|}}}}} | data17 = {{#if:{{{leader3|}}} |{{longitem|style=line-height:1.3em|{{{leader3|}}}{{#if:{{{party3|}}}|{{#ifeq:{{Str index|{{{party3|}}}|1}}|(||,}}&#32;{{{party3|}}}}} {{#if:{{{election3|}}}|<br/>since {{{election3|}}}|{{#if:{{{leader3_term|}}}|<br/>{{{leader3_term}}}}} }} }} }} | label18 = {{longitem|style=line-height:1.3em|{{{leader4_type|}}}}} | data18 = {{#if:{{{leader4|}}} |{{longitem|style=line-height:1.3em|{{{leader4|}}}{{#if:{{{party4|}}}|{{#ifeq:{{Str index|{{{party4|}}}|1}}|(||,}}&#32;{{{party4|}}}}} {{#if:{{{election4|}}}|<br/>since {{{election4|}}}|{{#if:{{{leader4_term|}}}|<br/>{{{leader4_term}}}}} }} }} }} | label19 = {{longitem|style=line-height:1.3em|{{{leader5_type|}}}}} | data19 = {{#if:{{{leader5|}}} |{{longitem|style=line-height:1.3em|{{{leader5|}}}{{#if:{{{party5|}}}|{{#ifeq:{{Str index|{{{party5|}}}|1}}|(||,}}&#32;{{{party5|}}}}} {{#if:{{{election5|}}}|<br/>since {{{election5|}}}|{{#if:{{{leader5_term|}}}|<br/>{{{leader5_term}}}}} }} }} }} | label20 = {{longitem|style=line-height:1.3em|{{{leader6_type|}}}}} | data20 = {{#if:{{{leader6|}}} |{{longitem|style=line-height:1.3em|{{{leader6|}}}{{#if:{{{party6|}}}|{{#ifeq:{{Str index|{{{party6|}}}|1}}|(||,}}&#32;{{{party6|}}}}} {{#if:{{{election6|}}}|<br/>since {{{election6|}}}|{{#if:{{{leader6_term|}}}|<br/>{{{leader6_term}}}}} }} }} }} | label21 = {{longitem|style=line-height:1.3em|{{{leader7_type|}}}}} | data21 = {{#if:{{{leader7|}}} |{{longitem|style=line-height:1.3em|{{{leader7|}}}{{#if:{{{party7|}}}|{{#ifeq:{{Str index|{{{party7|}}}|1}}|(||,}}&#32;{{{party7|}}}}} {{#if:{{{election7|}}}|<br/>since {{{election7|}}}|{{#if:{{{leader7_term|}}}|<br/>{{{leader7_term}}}}} }} }} }} | label22 = {{longitem|style=line-height:1.3em|{{{leader8_type|}}}}} | data22 = {{#if:{{{leader8|}}} |{{longitem|style=line-height:1.3em|{{{leader8|}}}{{#if:{{{party8|}}}|{{#ifeq:{{Str index|{{{party8|}}}|1}}|(||,}}&#32;{{{party8|}}}}} {{#if:{{{election8|}}}|<br/>since {{{election8|}}}|{{#if:{{{leader8_term|}}}|<br/>{{{leader8_term}}}}} }} }} }} | label23 = {{longitem|style=line-height:1.3em|{{{leader9_type|}}}}} | data23 = {{#if:{{{leader9|}}} |{{longitem|style=line-height:1.3em|{{{leader9|}}}{{#if:{{{party9|}}}|{{#ifeq:{{Str index|{{{party9|}}}|1}}|(||,}}&#32;{{{party9|}}}}} {{#if:{{{election9|}}}|<br/>since {{{election9|}}}|{{#if:{{{leader9_term|}}}|<br/>{{{leader9_term}}}}} }} }} }} | label24 = {{longitem|style=line-height:1.3em|{{{leader10_type|}}}}} | data24 = {{#if:{{{leader10|}}} |{{longitem|style=line-height:1.3em|{{{leader10|}}}{{#if:{{{party10|}}}|{{#ifeq:{{Str index|{{{party10|}}}|1}}|(||,}}&#32;{{{party10|}}}}} {{#if:{{{election10|}}}|<br/>since {{{election10|}}}|{{#if:{{{leader10_term|}}}|<br/>{{{leader10_term}}}}} }} }} }} | header25 = {{#if:{{{structure1|}}}{{{political_groups1|}}}{{{structure2|}}}{{{political_groups2|}}}{{{committees1|}}}{{{committees2|}}}{{{joint_committees|}}}{{{term_length|}}}{{{authority|}}}{{{salary|}}} {{{seats1|}}}{{{seats2|}}}{{{seats3|}}}{{{seats4|}}}{{{seats5|}}}{{{seats6|}}}{{{seats7|}}}{{{seats8|}}}|Structure}} | label26 = Seats | data26 = {{#if:{{{members|}}}|{{{members}}}|{{{seats|}}}}} | data27 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure1|}}}|size={{{structure1_res|}}}|sizedefault=120px|alt={{{structure1_alt|}}}}} | label28 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} political groups|Political groups}}}} | data28 = {{{political_groups1|}}} | data29 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure2|}}}|size={{{structure2_res|}}}|sizedefault=120px|alt={{{structure2_alt|}}}}} | label30 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} political groups|Political groups}}}} | data30 = {{{political_groups2|}}} | label31 = {{#if:{{{house1|}}}|{{{house1}}} committees|Committees}} | data31 = {{{committees1|}}} | label32 = {{#if:{{{house2|}}}|{{{house2}}} committees|Committees}} | data32 = {{{committees2|}}} | label33 = {{longitem|Joint committees}} | data33 = {{{joint_committees|}}} | label34 = {{longitem|Length of term}} | data34 = {{{term_length|}}} | label35 = Authority | data35 = {{{authority|}}} | label36 = Salary | data36 = {{{salary|}}} | label37 = {{longitem|{{{seats1_title|}}}}} | data37 = {{{seats1|}}} | label38 = {{longitem|{{{seats2_title|}}}}} | data38 = {{{seats2|}}} | label39 = {{longitem|{{{seats3_title|}}}}} | data39 = {{{seats3|}}} | label40 = {{longitem|{{{seats4_title|}}}}} | data40 = {{{seats4|}}} | label41 = {{longitem|{{{seats5_title|}}}}} | data41 = {{{seats5|}}} | label42 = {{longitem|{{{seats6_title|}}}}} | data42 = {{{seats6|}}} | label43 = {{longitem|{{{seats7_title|}}}}} | data43 = {{{seats7|}}} | label44 = {{longitem|{{{seats8_title|}}}}} | data44 = {{{seats8|}}} | label45 = {{longitem|{{{seats9_title|}}}}} | data45 = {{{seats9|}}} | label46 = {{longitem|{{{seats10_title|}}}}} | data46 = {{{seats10|}}} | header47 = {{#if:{{{voting_system1|}}}{{{voting_system2|}}}{{{first_election1|}}}{{{first_election2|}}}{{{first_election3|}}}{{{last_election1|}}}{{{last_election2|}}}{{{last_election3|}}}{{{next_election1|}}}{{{next_election2|}}}{{{next_election3|}}}{{{redistricting|}}}|Elections}} | label48 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data48 = {{{voting_system1|}}} | label49 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data49 = {{{voting_system2|}}} | label50 = {{longitem|{{#if:{{{house1|}}}|First {{{house1}}} election|First election}}}} | data50 = {{{first_election1|}}} | label51 = {{longitem|{{#if:{{{house2|}}}|First {{{house2}}} election|First election}}}} | data51 = {{{first_election2|}}} | label52 = {{longitem|First general election}} | data52 = {{{first_election3|}}} | label53 = {{longitem|{{#if:{{{house1|}}}|Last {{{house1}}} election|Last election}}}} | data53 = {{{last_election1|}}} | label54 = {{longitem|{{#if:{{{house2|}}}|Last {{{house2}}} election|Last election}}}} | data54 = {{{last_election2|}}} | label55 = {{longitem|Last general election}} | data55 = {{{last_election3|}}} | label56 = {{longitem|{{#if:{{{house1|}}}|Next {{{house1}}} election|Next election}}}} | data56 = {{{next_election1|}}} | label57 = {{longitem|{{#if:{{{house2|}}}|Next {{{house2}}} election|Next election}}}} | data57 = {{{next_election2|}}} | label58 = {{longitem|Next general election}} | data58 = {{{next_election3|}}} | label59 = Redistricting | data59 = {{{redistricting|}}} | header60 = {{#if:{{{motto|}}}|Motto}} | data61 = {{{motto|}}} | header62 = {{#if:{{{session_room|}}}{{{meeting_place|}}}|Meeting place}} | data63 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room|}}}|size={{{session_res|}}}|alt={{{session_alt|}}}}} | data64 = {{{meeting_place|}}} | class64 = label | data65 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room2|}}}|size={{{session_res2|}}}|alt={{{session_alt2|}}}}} | data66 = {{{meeting_place2|}}} | class66 = label | data67 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room3|}}}|size={{{session_res3|}}}|alt={{{session_alt3|}}}}} | data68 = {{{meeting_place3|}}} | class68 = label | header69 = {{#if:{{{website|}}}|Website}} | data70 = {{{website|}}} | header71 = {{#if:{{{constitution|}}}|Constitution}} | data72 = {{{constitution|}}} | header73 = {{#if:{{{rules|}}}|Rules}} | data74 = {{{rules|}}} | header75 = {{#if:{{{footnotes|}}}|Footnotes}} | data76 = {{{footnotes|}}} }}{{Main other|{{#if:{{{background_color|}}}{{{text_color|}}}|[[Kategori:Infobox legislature with background color]]}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|}}|preview=Page using [[Templat:Infobox legislature]] with unknown parameter "_VALUE_"|ignoreblank=y| authority | background_color | body | categories | chambers | coa_alt | coa_caption | coa_pic | coa_res | coa-alt | coa-pic | coa-res | committees1 | committees2 | constitution | demo | disbanded | election1 | election2 | election3 | election4 | election5 | election6 | election7 | election8 | election9 | election10 | established | first_election1 | first_election2 | first_election3 | footnotes | foundation | house_type | house1 | house2 | houses | joint_committees | jurisdiction | labelstyle | last_election1 | last_election2 | last_election3 | leader1 | leader1_type | leader2 | leader2_type | leader3 | leader3_type | leader4 | leader4_type | leader5 | leader5_type | leader6 | leader6_type | leader7 | leader7_type | leader8 | leader8_type | leader9 | leader9_type | leader10 | leader10_type | legislature | logo | logo_alt | logo_caption | logo_pic | logo_res | logo-alt | logo-pic | logo-res | meeting_place | meeting_place2 | meeting_place3 | members | motto | name | native_name | native_name_lang | new_session | next_election1 | next_election2 | next_election3 | nocat | party1 | party2 | party3 | party4 | party5 | party6 | party7 | party8 | party9 | party10 | political_groups1 | political_groups2 | preceded_by | redistricting | rules | salary | seats | seats1 | seats1_title | seats2 | seats2_title | seats3 | seats3_title | seats4 | seats4_title | seats5 | seats5_title | seats6 | seats6_title | seats7 | seats7_title | seats8 | seats8_title | session_alt | session_alt2 | session_alt3 | session_res | session_res2 | session_res3 | session_room | session_room2 | session_room3 | structure1 | structure1_alt | structure1_res | structure2 | structure2_alt | structure2_res | succeeded_by | term_length | term_limits | text_color | transcription_name | voting_system1 | voting_system2 | website }}<noinclude> {{documentation}}<!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> kcy18e8p6qnjeksh6xpukuvtu2fugn9 Templat:Infobox martial artist 10 120 287 286 2024-08-09T09:19:51Z Jon Harald Søby 58 1 semakan diimportkan 286 wikitext text/x-wiki {{Infobox | child = {{{child|{{{embed|}}}}}} | subbox = {{{subbox|}}} | bodyclass = vcard | headerstyle = background-color:{{{color|{{{colour|#efefef}}}}}} | above = {{#if:{{{child|}}}{{{embed|}}}{{{subbox|}}}||<includeonly><span class="fn">{{{name|{{PAGENAMEBASE}}}}}</span></includeonly>}} | abovestyle = background-color:{{{color|{{{colour|#efefef}}}}}} | title = {{#ifeq:{{{child|}}}{{{embed|}}}{{{subbox|}}}|yes|'''Martial arts career'''}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{child|}}}{{{embed|}}}{{{subbox|}}}||{{{image|{{#invoke:Wikidata|claim|P18}}}}}|size={{{image_size|{{{imagesize|}}}}}}|sizedefault=frameless|upright=1|alt={{{alt|}}}|suppressplaceholder=yes}}}} | caption = {{{caption|{{#invoke:Wikidata |getImageLegend|FETCH_WIKIDATA}}}}} | label1 = Born | data1 = {{Br separated entries|{{{birth_name|{{{birthname|}}}}}}|{{{birth_date|}}}|{{{birth_place|}}}}} | label2 = Died | data2 = {{Br separated entries|{{{death_date|}}}|{{{death_place|}}}|{{{death_cause|{{{deathcause|}}}}}}}} | label3 = Native name | data3 = {{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<span class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</span> }} }} | label4 = Other names | data4 = {{{other_names|}}} | class4 = nickname | label5 = Nickname | data5 = {{{nickname|}}} | class5 = nickname | label6 = Residence | data6 = {{{residence|}}} | label7 = Nationality | data7 = {{{nationality|}}} | label8 = Height | data8 = {{#if:{{{height_ft|}}} |{{Convert|{{{height_ft}}}|ft|{{#if:{{{height_in|}}}|{{{height_in}}}|0}}|in|cm|0|abbr=on}}{{{height_footnote|}}} |{{#if:{{{height_cm|}}} |{{Convert|{{{height_cm}}}|cm|ftin|0|abbr=on}}{{{height_footnote|}}} |{{#if:{{{height_m|}}} |{{Convert|{{{height_m}}}|m|ftin|0|abbr=on}}{{{height_footnote|}}} |{{#if:{{{height|}}}|{{Infobox person/height|{{{height}}}}}}}{{{height_footnote|}}} }} }} }} | label9 = Weight | data9 = {{#if:{{{weight_lb|{{{weightlb|}}}}}} |{{Convert|{{{weight_lb|{{{weightlb}}}}}}|lb|kg stlb|0|abbr=on}}{{{weight_footnote|}}} |{{#if:{{{weight_kg|{{{weightkg|}}}}}} |{{WCp/bdr/Convert|{{{weight_kg|{{{weightkg}}}}}}|kg|lb stlb|0|abbr=on}}{{{weight_footnote|}}} |{{#if:{{{weight|}}}|{{Infobox person/weight|kg-stlb=y|lb-stlb=y|{{{weight}}}}}}}{{{weight_footnote|}}} }} }} | label10 = Division | data10 = {{{weight_class|{{{weightclass|}}}}}} | label11 = Reach | data11 = {{#if:{{{reach_in|{{{reachin|}}}}}} |{{Convert|{{{reach_in|{{{reachin}}}}}}|in|cm|0|abbr=on}}{{{reach_footnote|}}} |{{#if:{{{reach_cm|{{{reachcm|}}}}}} |{{Convert|{{{reach_cm|{{{reachcm}}}}}}|cm|in|1|abbr=on}}{{{reach_footnote|}}} |{{#if:{{{reach|}}}|{{Infobox person/length|{{{reach}}}}}}}{{{reach_footnote|}}} }} }} | label12 = Style | data12 = {{Br separated entries||{{{martial_art|}}}|{{{style|}}}}} | label13 = Stance | data13 = {{#if:{{{stance|}}}|{{#switch:{{lc:{{{stance}}}}} |r|right|orthodox = [[Orthodox stance|Orthodox]] |l|left|southpaw = [[Southpaw stance|Southpaw]] | = <span style="color:red;">Unknown Value: {{{stance}}}</span> }} }} | label14 = Fighting out of | data14 = {{{fighting_out_of|{{{fightingoutof|}}}}}} | label15 = Team | data15 = {{{team|}}} | class15 = org | label16 = Teacher(s) | data16 = {{{teacher|}}} | label17 = Trainer | data17 = {{{trainer|}}} | class17 = agent | label18 = Rank | data18 = {{{rank|}}} | label19 = Wrestling | data19 = {{{wrestling|}}} | label20 = Years active | data20 = {{{years_active|{{{yearsactive|}}}}}} | data21 = {{Infobox martial artist/record |color = {{{color|{{{colour|#efefef}}}}}} |type = [[Professional boxing]] record |win = {{{box_win|{{{boxingwins|}}}}}} |kowin = {{{box_kowin|{{{boxingkowins|}}}}}} |loss = {{{box_loss|{{{boxinglosses|}}}}}} |koloss = {{{box_koloss|{{{boxingkolosses|}}}}}} |draw = {{{box_draw|{{{boxingdraws|}}}}}} |nc = {{{box_nc|{{{boxingncs|}}}}}} |win_ref = {{{box_win_ref|}}} |kowin_ref = {{{box_kowin_ref|}}} |loss_ref = {{{box_loss_ref|}}} |koloss_ref = {{{box_koloss_ref|}}} |draw_ref = {{{box_draw_ref|}}} |nc_ref = {{{box_nc_ref|}}} }} | data22 = {{Infobox martial artist/record |color = {{{color|{{{colour|#efefef}}}}}} |type = [[Kickboxing]] record |win = {{{kickbox_win|{{{kickboxingwins|}}}}}} |kowin = {{{kickbox_kowin|{{{kickboxingkowins|}}}}}} |loss = {{{kickbox_loss|{{{kickboxinglosses|}}}}}} |koloss = {{{kickbox_koloss|{{{kickboxingkolosses|}}}}}} |draw = {{{kickbox_draw|{{{kickboxingdraws|}}}}}} |nc = {{{kickbox_nc|{{{kickboxingncs|}}}}}} }} | data23 = {{#ifexpr:0{{{mma_win|{{{mmawins|{{#expr:0{{{mma_kowin|{{{mmakowins|}}}}}} + 0{{{mma_subwin|{{{mmasubwins|}}}}}} + 0{{{mma_decwin|{{{mmadecwins|}}}}}} + 0{{{mma_otherwin|{{{mmaotherwins|}}}}}} + 0{{{mma_dqwin|{{{mmadqwins|}}}}}}}}}}}}}} + 0{{{mma_loss|{{{mmalosses|{{#expr:0{{{mma_koloss|{{{mmakolosses|}}}}}} + 0{{{mma_subloss|{{{mmasublosses|}}}}}} + 0{{{mma_decloss|{{{mmadeclosses|}}}}}} + 0{{{mma_dqloss|{{{mmadqlosses|}}}}}}}}}}}}}} > 0|{{Infobox martial artist/record |color = {{{color|{{{colour|#efefef}}}}}} |type = {{#if:{{{mma_label|{{{mmalabel|}}}}}}|{{{mma_label|{{{mmalabel}}}}}}|[[Mixed martial arts]] record}} |win = {{{mma_win|{{{mmawins|{{#expr:0{{{mma_kowin|{{{mmakowins|}}}}}} + 0{{{mma_subwin|{{{mmasubwins|}}}}}} + 0{{{mma_decwin|{{{mmadecwins|}}}}}} + 0{{{mma_otherwin|{{{mmaotherwins|}}}}}} + 0{{{mma_dqwin|{{{mmadqwins|}}}}}}}}}}}}}} |kowin = {{{mma_kowin|{{{mmakowins|}}}}}} |subwin = {{{mma_subwin|{{{mmasubwins|}}}}}} |decwin = {{{mma_decwin|{{{mmadecwins|}}}}}} |dqwin = {{{mma_dqwin|{{{mmadqwins|}}}}}} |otherwin= {{{mma_otherwin|{{{mmaotherwins|}}}}}} |loss = {{{mma_loss|{{{mmalosses|{{#expr:0{{{mma_koloss|{{{mmakolosses|}}}}}} + 0{{{mma_subloss|{{{mmasublosses|}}}}}} + 0{{{mma_decloss|{{{mmadeclosses|}}}}}} + 0{{{mma_otherloss|{{{mmaotherlosses|}}}}}} + 0{{{mma_dqloss|{{{mmadqlosses|}}}}}}}}}}}}}} |koloss = {{{mma_koloss|{{{mmakolosses|}}}}}} |subloss = {{{mma_subloss|{{{mmasublosses|}}}}}} |decloss = {{{mma_decloss|{{{mmadeclosses|}}}}}} |dqloss = {{{mma_dqloss|{{{mmadqlosses|}}}}}} |otherloss={{{mma_otherloss|{{{mmaotherlosses|}}}}}} |draw = {{{mma_draw|{{{mmadraws|}}}}}} |nc = {{{mma_nc|{{{mmancs|}}}}}} }} }} | data24 = {{Infobox martial artist/record |color = {{{color|{{{colour|#efefef}}}}}} |type = {{#if:{{{am_label|{{{amlabel|}}}}}}|{{{am_label|{{{amlabel}}}}}}|[[Amateur sports|Amateur]] record}} |win = {{{am_win|{{{amwins|}}}}}} |kowin = {{{am_kowin|{{{amkowins|}}}}}} |subwin = {{{am_subwin|{{{amsubwins|}}}}}} |decwin = {{{am_decwin|{{{amdecwins|}}}}}} |loss = {{{am_loss|{{{amlosses|}}}}}} |koloss = {{{am_koloss|{{{amkolosses|}}}}}} |subloss = {{{am_subloss|{{{amsublosses|}}}}}} |decloss = {{{am_decloss|{{{amdeclosses|}}}}}} |draw = {{{am_draw|{{{amdraws|}}}}}} |nc = {{{am_nc|{{{amncs|}}}}}} }} | header25 = {{#if:{{both|{{{box_win|{{{boxingwins|}}}}}}{{{box_loss|{{{boxinglosses|}}}}}}{{{box_draw|{{{boxingdraws|}}}}}}{{{box_nc|{{{boxingncs|}}}}}}{{{mma_win|{{{mmawins|}}}}}}{{{mma_loss|{{{mmalosses|}}}}}}{{{kickbox_win|{{{kickboxingwins|}}}}}}{{{kickbox_loss|{{{kickboxinglosses|}}}}}}{{{kickbox_draw|{{{kickboxingdraws|}}}}}}{{{kickbox_nc|{{{kickboxingncs|}}}}}}{{{mma_draw|{{{mmadraws|}}}}}}{{{mma_nc|{{{mmancs|}}}}}}{{{am_win|{{{amwins|}}}}}}{{{am_loss|{{{amlosses|}}}}}}{{{am_draw|{{{amdraws|}}}}}}{{{am_nc|{{{amncs|}}}}}}|{{{occupation|}}}{{{university|}}}{{{spouse|}}}{{{relatives|}}}{{{students|}}}{{{club|}}}{{{school|}}}{{{url|}}}{{{boxrec|}}}{{{sherdog|}}}}}|Other information}} | label26 = Occupation | data26 = {{{occupation|}}} | class26 = role | label27 = University | data27 = {{{university|}}} | label28 = Spouse | data28 = {{{spouse|}}} | label29 = Children | data29 = {{{children|}}} | label30 = Notable relatives | data30 = {{{relatives|}}} | label31 = Notable students | data31 = {{{students|}}} | label32 = Notable club(s) | data32 = {{{club|}}} | label33 = Notable school(s) | data33 = {{{school|}}} | label34 = Website | data34 = {{{url|{{{website|}}}}}} | data35 = {{#if:{{{boxrec|}}}|[http://boxrec.com/en/boxer/{{{boxrec}}} Boxing record] from [[BoxRec]]}} | data36 = {{#if:{{{sherdog|}}}|[http://www.sherdog.com/fightfinder/fightfinder.asp?fighterID={{{sherdog|}}} Mixed martial arts record] from [[Sherdog]]}} | header37 = {{#if:{{{medaltemplates|}}}|{{Infobox medal templates |medals = {{{medaltemplates|}}} |expand = {{#ifeq:{{lc:{{{show-medals}}}}}|no||yes}} }}}} | data65 = {{{misc|{{{module|}}}}}} | data66 = {{{misc2|{{{module2|}}}}}} | below = {{#if:{{{footnotes|}}}|<span style="font-size: smaller;">{{{footnotes}}}</span><br />}}{{#if:{{{updated|}}}|<div style="text-align: center;"><span style="font-weight: lighter; margin: 1em; color: #555;">Last updated on: {{{updated}}}</span></div>}} }}{{#invoke:Check for unknown parameters | check | unknown = {{Main other|[[Kategori:Pages using infobox martial artist with unknown parameters|_VALUE_{{PAGENAME}}]]}} | preview = Page using [[Templat:Infobox martial artist]] with unknown parameter "_VALUE_" | ignoreblank = y | alt | am_decloss | am_decwin | am_draw | am_koloss | am_kowin | am_label | am_loss | am_nc | am_subloss | am_subwin | am_win | amdeclosses | amdecwins | amdraws | amkolosses | amkowins | amlabel | amlosses | amncs | amsublosses | amsubwins | amwins | birth_date | birth_name | birth_place | birthname | box_draw | box_koloss | box_kowin | box_loss | box_nc | box_win | box_win_ref | box_kowin_ref | box_loss_ref | box_koloss_ref | box_draw_ref | box_nc_ref | boxingdraws | boxingkolosses | boxingkowins | boxinglosses | boxingncs | boxingwins | boxrec | caption | child | children | club | color | colour | death_cause | death_date | death_place | deathcause | embed | ethnicity | fighting_out_of | fightingoutof | footnotes | height | height_cm | height_footnote | height_ft | height_in | height_m | image | image_size | imagesize | kickbox_draw | kickbox_koloss | kickbox_kowin | kickbox_loss | kickbox_nc | kickbox_win | kickboxingdraws | kickboxingkolosses | kickboxingkowins | kickboxinglosses | kickboxingncs | kickboxingwins | martial_art | medaltemplates | misc | misc2 | mma_decloss | mma_decwin | mma_dqloss | mma_dqwin | mma_draw | mma_koloss | mma_kowin | mma_label | mma_loss | mma_nc | mma_otherloss | mma_otherwin | mma_subloss | mma_subwin | mma_win | mmadeclosses | mmadecwins | mmadqlosses | mmadqwins | mmadraws | mmakolosses | mmakowins | mmalabel | mmalosses | mmancs | mmaotherlosses | mmaotherwins | mmasublosses | mmasubwins | mmawins | module | module2 | name | nationality | native_name | native_name_lang | nickname | occupation | other_names | rank | reach | reach_cm | reach_footnote | reach_in | reachcm | reachin | relatives | residence | school | sherdog | show-medals | spouse | stance | students | style | subbox | teacher | team | trainer | university | updated | url | website | weight | weight_class | weight_footnote | weight_kg | weight_lb | weightclass | weightkg | weightlb | wrestling | years_active | yearsactive }}{{#if: {{{boxrec|}}} | {{WikidataCheck |property=P1967 |value={{#invoke:String|replace|source={{{boxrec|}}}|pattern=^0*|plain=false}} |category=Pages using infobox martial artist with boxrec parameter |namespaces=0 |nocatsame=1}} }}{{#if: {{{sherdog|}}} | {{WikidataCheck |property=P2818 |value={{{sherdog|}}} |category=Pages using infobox martial artist with sherdog parameter |namespaces=0 |nocatsame=1}} }}<noinclude> {{Documentation}}<!-- place categories on /doc sub-page, interwikis in Wikidata --> </noinclude> 38anedrtzhdlwy1zqdy6g8cn5yba6yj Templat:Infobox martial artist/record 10 121 289 288 2024-08-09T09:19:52Z Jon Harald Søby 58 1 semakan diimportkan 288 wikitext text/x-wiki {{#if:{{{win|}}}{{{kowin|}}}{{{loss|}}}{{{koloss|}}}{{{draw|}}}{{{nc|}}}<!-- -->|{{Infobox|child=yes | labelstyle = font-weight: normal | headerstyle = background-color:{{{color|{{{colour|#efefef}}}}}} | header2 = {{{type|}}} | label4 = '''Total''' | data4 = {{#if:{{{win|}}}{{{loss|}}}{{{draw|}}}{{{nc|}}}|{{#expr:{{#if:{{{win|}}}|{{{win}}}|0}} + {{#if:{{{loss|}}}|{{{loss}}}|0}} + {{#if:{{{draw|}}}|{{{draw}}}|0}} + {{#if:{{{nc|}}}|{{{nc}}}|0}}}}}} | label5 = '''Wins''' | data5 = {{#if:{{{win|}}}<!-- -->|{{{win}}}{{{win_ref|}}}<!-- -->|{{#if:{{{kowin|}}}{{{subwin|}}}{{{decwin|}}}{{{dqwin|}}}|&nbsp;<!-- -->}}<!-- -->}} | label6 = By&nbsp;knockout | data6 = {{{kowin|}}}{{{kowin_ref|}}} | label7 = By&nbsp;submission | data7 = {{{subwin|}}} | label8 = By&nbsp;decision | data8 = {{{decwin|}}} | label9 = By&nbsp;disqualification | data9 = {{{dqwin|}}} | label10 = Unknown | data10 = {{{otherwin|}}} | label11 = '''Losses''' | data11 = {{#if:{{{loss|}}}<!-- -->|{{{loss}}}{{{loss_ref|}}}<!-- -->|{{#if:{{{koloss|}}}{{{subloss|}}}{{{decloss|}}}{{{dqloss|}}}|&nbsp;<!-- -->}}<!-- -->}} | label12 = By&nbsp;knockout | data12 = {{{koloss|}}}{{{koloss_ref|}}} | label13 = By&nbsp;submission | data13 = {{{subloss|}}} | label14 = By&nbsp;decision | data14 = {{{decloss|}}} | label15 = By&nbsp;disqualification | data15 = {{{dqloss|}}} | label16 = Unknown | data16 = {{{otherloss|}}} | label17 = '''Draws''' | data17 = {{{draw|}}}{{{draw_ref|}}} | label18 = '''No&nbsp;contests''' | data18 = {{{nc|}}}{{{nc_ref|}}} }}<!-- end if -->}}<noinclude> {{Documentation|content = This subtemplate is used to create the record subsections of {{Tl|Infobox martial artist}}. It should not be used directly. }}</noinclude> dhpd8yv4e0z6fxomc7phcqoidat34cw Templat:Infobox medal templates 10 122 291 290 2024-08-09T09:19:52Z Jon Harald Søby 58 1 semakan diimportkan 290 wikitext text/x-wiki {{#if:{{{medals|}}}|<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="text-align:center; font-size:95%"> <div style="line-height:1.6em; background-color:#ccf; font-size:105%; {{{titlestyle|background-color:transparent;}}}"><!-- --><div style="margin:0 4em;">{{#if:{{{title|}}}|{{{title}}}|Medal record}}</div><!-- --></div> <div class="mw-collapsible-content" style="font-size:105%"><templatestyles src="infobox/mobileviewfix.css"/> {{{!}} style="width:100%; background-color:#f9f9f9; color:#000000; font-weight:normal" {{!}} colspan="2" style="padding:0" {{!}} {{{medals}}} {{!}}} </div></div> }}{{#if:{{#invoke:String2|startswith|1={{{medal_templates|}}} |2={{{!}} }}|[[Kategori:Infobox medal templates requiring repair]]|}}<noinclude>{{Documentation}}</noinclude> mr1pjs5szc02k33zlsy1rwyafw554ws Templat:Infobox musical artist 10 123 293 292 2024-08-09T09:19:52Z Jon Harald Søby 58 1 semakan diimportkan 292 wikitext text/x-wiki {{infobox | child = {{lc:{{{embed|}}}}} | bodyclass = vcard plainlist | headerstyle = background-color: {{Infobox musical artist/color}} | autoheaders = y | title = {{#ifeq:{{lc:{{{embed|}}}}}|yes|'''Musical career'''}} | decat = yes <!-- remove from template:infobox tracking categories --> | abovestyle = background-color: {{Infobox musical artist/color}}; font-size: 125%; | above = {{#ifeq:{{lc:{{{embed|}}}}}|yes||{{#if:{{{name|{{PAGENAMEBASE}}}}}|{{#if:{{{honorific_prefix|}}}|<div class="honorific-prefix" style="font-size: 78%; font-weight: normal;">{{{honorific_prefix|}}}</div>}}<div class="{{Infobox musical artist/hCard class|{{{background|}}}}}">{{{name|{{PAGENAMEBASE}}}}}</div>{{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang|}}}">}}{{{native_name|}}}{{#if:{{{native_name_lang|}}}|</div>}}}}{{#if:{{{honorific_suffix|}}}|<div class="honorific-suffix" style="font-size: 78%; font-weight: normal;">{{{honorific_suffix|}}}</div>}} |{{BASEPAGENAME}}}}}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image_size|}}}}}|300|{{{image_size|}}}}}}}x200px|{{{image_size|}}}}} |sizedefault=frameless |upright={{{image_upright|1}}} |title={{{alt|{{{caption|}}}}}} |alt={{{alt|}}} |suppressplaceholder=yes}} | caption = {{{caption|}}} | header1 = {{#if:{{{image|}}}|Background information}} | class3 = nickname | label3 = {{nowrap|Birth name}} | data3 = {{{birth_name|}}} | class4 = nickname | label4 = {{nowrap|Also known as}} | data4 = {{{alias|}}} | label5 = Born | data5 = {{br separated entries|{{{birth_date|}}}|{{{birth_place|}}}}} | label6 = Origin | data6 = {{{origin|}}} | label7 = Died | data7 = {{br separated entries|{{{death_date|}}}|{{{death_place|}}}}} | label8 = Genres | data8 = {{{genre|}}} | class9 = role | label9 = {{#if:{{{occupations|}}}|Occupations|Occupation(s)}} | data9 = {{if empty|{{{occupations|}}}|{{{occupation|}}}}} | class10 = note | label10 = {{#if:{{{instruments|}}}|Instruments|Instrument(s)}} | data10 = {{{instruments|{{{instrument|}}}}}} | label11 = Discography | data11 = {{{discography|}}} | label12 = {{nowrap|Years active}} | data12 = {{{years_active|}}} | label13 = Labels | data13 = {{{label|}}} | label14 = Member of | data14 = {{{current_member_of|}}} | label15 = Formerly of | data15 = {{{past_member_of|}}} | label16 = Spinoffs | data16 = {{{spinoffs|}}} | label17 = Spinoff of | data17 = {{{spinoff_of|}}} | label18 = <span class="nowrap">Spouse(s)</span> | data18 = {{{spouse|}}} | label19 = <span class="nowrap">Partner(s)</span> | data19 = {{{partner|}}} | header20 = {{#ifeq:{{lc:{{{embed|}}}}}|yes||<nowiki />}} | label21 = Members | data21 = {{{current_members|}}} | header22 = {{#ifeq:{{lc:{{{embed|}}}}}|yes||<nowiki />}} | label23 = {{nowrap|Past members}} | data23 = {{{past_members|}}} | header30 = {{#ifeq:{{lc:{{{embed|}}}}}|yes||<nowiki />}} | label31 = Website | data31 = {{{website|}}} | label40 = <nowiki /> | data41 = {{{module|}}} | data42 = {{{module2|}}} | data43 = {{{module3|}}} }}<includeonly>{{#if:{{{current_members|}}}{{{past_members|}}}||{{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Mm]usical [Aa]rtists?}}<!-- Is infobox in lead: -->{{#invoke:Is infobox in lead|main|[Ii]nfobox [Ss]inger}}{{#invoke:Is infobox in lead|main|[Ii]nfobox [Mm]usician}}{{#invoke:Is infobox in lead|main|[Ii]nfobox [Ii]nstrumentalist}}|true|{{short description|Musical artist|noreplace}}}}}}<!-- hCards: -->{{main other|1=[[Kategori:Articles with hCards]]}}<!-- Unknown parameters: -->{{#invoke:Check for unknown parameters | check | unknown={{main other|1=[[Kategori:Pages using Template:Infobox musical artist with unknown parameters|_VALUE_]]}}| preview = Page using [[Templat:Infobox musical artist]] with unknown parameter "_VALUE_"| ignoreblank=y <!-- whitelist 29 Jun 2022 [38x param name]: -->| alias | alt | associated_acts | background | birth_date | birth_name | birth_place | caption | current_member_of | current_members | death_date | death_place | discography | embed | genre | honorific_prefix | honorific_suffix | image_size | image_upright | image | instrument | instruments | label | landscape | module2 | module3 | module | name | native_name_lang | native_name | occupations | occupation | origin | partner | past_member_of | past_members | spinoff_of | spinoffs | spouse | website | years_active}}<!-- Associated_acts tracking: -->{{main other|1={{#if:{{{associated_acts|}}}|[[Kategori:Pages using infobox musical artist with associated acts]]}}}}</includeonly><!-- Documentation: --><noinclude>{{documentation}}</noinclude> dk5zx9txiiy4qynfbs5q9ol1d8npa59 Templat:Infobox musical artist/color 10 124 295 294 2024-08-09T09:19:52Z Jon Harald Søby 58 1 semakan diimportkan 294 wikitext text/x-wiki <includeonly>{{#switch: {{{1|}}} <!--| solo_singer = &#35;f0e68c <!-- khaki --> <!--| non_vocal_instrumentalist = &#35;f4bf92 <!-- unnamed pale orange --> <!--| non_performing_personnel = &#35;bfe0bf <!-- unnamed pale green --> <!--| group_or_band = &#35;b0c4de <!-- lightsteelblue --> <!--| classical_ensemble = &#35;b0e0e6 <!-- PowderBlue --> <!--| temporary = &#35;d3d3d3 <!-- LightGrey --> | &#35;b0c4de }}</includeonly><noinclude> {{documentation}} </noinclude> kcgyulc67wbtjbcj6u63cebetyf5gpb Templat:Infobox musical composition 10 125 297 296 2024-08-09T09:19:52Z Jon Harald Søby 58 1 semakan diimportkan 296 wikitext text/x-wiki {{Infobox | bodyclass = vevent haudio | autoheaders = y | headerstyle = background-color: #eee; | aboveclass = summary album | above = {{If empty |{{{name|}}} |{{{title|}}} |<includeonly>{{PAGENAMEBASE}}</includeonly>}} | subheaderstyle = font-weight:bold; | subheader = {{#if: {{{bwv|}}} | <div class="summary">[[Bach-Werke-Verzeichnis|BWV]] {{{bwv}}}</div> | {{{subtitle|}}} }} | subheader2 = {{{type|}}} {{#if: {{{composer|}}} | by {{{composer}}} | {{#if: {{{bwv|}}} | by [[Johann Sebastian Bach|J. S. Bach]] }}}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{{image_size|}}} |upright={{{image_upright|1}}} |border={{#ifeq: {{lc:{{{border|}}}}} | yes | yes }} |alt={{{alt|}}} }} | caption = {{{caption|{{{image_caption|}}}}}} | label2 = English | data2 = {{{translation|}}} | label3 = Native name | data3 = {{#if:{{{native_name|}}} |{{#if: {{{native_name_lang|}}} |<!-- if both are present, then call [[Templat:Lang]], defaulting italics off, as was the case before now --> {{lang|{{{native_name_lang|}}}|{{{native_name}}}}} | {{{native_name}}} }} }} | label5 = Full title | data5 = {{{full_title|}}} | label7 = Other name | data7 = {{{other_name|}}} | label8 = Key | data8 = {{{key|}}} | label18 = Catalogue | data18 = {{{catalogue|}}} | label19 = [[Opus_number|Opus]] | data19 = {{{opus|}}} | label21 = Year | data21 = {{{year|}}} | class23 = category | label23 = Period | data23 = {{{period|}}} | label24 = Genre | data24 = {{{genre|}}} | class25 = category | label25 = Style | data25 = {{{style|}}} | label26 = Form | data26 = {{{form|}}} | label27 = Related | data27 = {{{related|}}} | label28 = Occasion | data28 = {{{occasion|}}} | label29 = Written | data29 = {{{written|}}} | label30 = Commissioned by | data30 = {{{client|}}} | label31 = Text | data31 = {{{text|}}} | class38 = attendee vcard fn | label38 = [[Bach cantata#Text of Bach's sacred cantatas|Cantata text]] | data38 = {{{cantata|{{{text_poet|}}}}}} | label39 = Bible text | data39 = {{{bible|}}} | class40 = attendee vcard fn | label40 = Chorale | data40 = {{{chorale|}}} | label43 = Language | data43 = {{{language|}}} | label44 = Based on | data44 = {{{based_on|}}} | label45 = Meter | data45 = {{{meter|}}} | label46 = Melody | data46 = {{{melody|}}} | label47 = Time | data47 = {{{time|}}} | label48 = Composed | data48 = {{{composed|}}} | label49 = Dedication | data49 = {{{dedication|}}} | label50 = Performed | data50 = {{{performed|}}} | label51 = Published | data51 = {{{published|}}} | label52 = Publisher | data52 = {{{publisher|}}} | label53 = Recorded | data53 = {{{first_recording|}}} | label54 = Duration | data54 = {{{duration|}}} | label65 = Movements | data65 = {{{movements|}}} | label66 = Scoring | data66 = {{{scoring|}}} | label78 = Vocal | data78 = {{{vocal|}}} | label79 = Instrumental | data79 = {{{instrumental|}}} | header91 = Premiere | label92 = Date | data92 = {{{premiere_date|}}} | class93 = location | label93 = Location | data93 = {{{premiere_location|}}} | label94 = Conductor | data94 = {{{premiere_conductor|}}} | label95 = Performers | data95 = {{{premiere_performers|}}} | header96 = _BLANK_ | data97 = {{{misc|}}} }}<!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox musical composition with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox musical composition]] with unknown parameter "_VALUE_".|showblankpositional=1| alt | based_on | bible | border | bwv | cantata | caption | catalogue | chorale | client | composed | composer | comment | dedication | duration | first_recording | full_title | form | genre | image | image_caption | image_size | image_upright | instrumental | key | language | melody | meter | misc | movements | name | native_name | native_name_lang | occasion | opus | other_name | performed | period | published | publisher | premiere_conductor | premiere_date | premiere_location | premiere_performers | related | scoring | style | subtitle | text | text_poet | time | title | translation | type | vocal | written | year }}<!-- --><!-- End tracking --><noinclude> {{Documentation}} </noinclude> db285y4lqq381d255vcvxyph7qrfttn Templat:Infobox officeholder 10 126 299 298 2024-08-09T09:19:53Z Jon Harald Søby 58 1 semakan diimportkan 298 wikitext text/x-wiki {{#invoke:Infobox|infoboxTemplate | bodyclass = vcard {{{bodyclass|}}} | bodystyle = {{#if:{{{mainwidth|}}}|width: {{{mainwidth}}}}} | child = {{lc:{{{embed}}}}} | abovestyle = font-size: 100%; | above = {{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|}}}}}}}}}|<div class="honorific-prefix" style="font-weight: normal;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix}}}}}}}}}</div>}}<!-- --><div class="fn" style="font-size:125%;">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}</div><!-- -->{{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|}}}}}}}}}|<div class="honorific-suffix" style="font-weight: normal;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix}}}}}}}}}</div>}} | subheaderstyle = font-size:125%; font-weight:bold; | subheader = {{#ifeq:{{lc:{{{embed}}}}}|yes||{{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}}}}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{width|{{{imagesize|{{{image_size|}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}} | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{image name|}}}|size={{{width|{{{imagesize|{{{image_size|}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{image_name_alt|}}}|suppressplaceholder=yes}} | image3 = {{#invoke:InfoboxImage|InfoboxImage|image={{{smallimage|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{smallimage_alt|}}}|suppressplaceholder=yes}} | captionstyle = line-height:normal;padding-top:0.2em; | caption{{#if:{{{smallimage|}}}|3|{{#if:{{{image name|}}}|2}}}} = {{{caption|}}} | headerstyle = {{#ifeq:{{lc:{{{embed}}}}}|yes|background:#eee|background:lavender}} | data1 = {{#if:{{{speaker|}}}| {{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname2|}}} | 1namedata = {{{1namedata2|}}} | 2blankname = {{{2blankname2|}}} | 2namedata = {{{2namedata2|}}} | 3blankname = {{{3blankname2|}}} | 3namedata = {{{3namedata2|}}} | 4blankname = {{{4blankname2|}}} | 4namedata = {{{4namedata2|}}} | 5blankname = {{{5blankname2|}}} | 5namedata = {{{5namedata2|}}} | alongside = {{{alongside2|}}} | ambassador_from = {{{ambassador_from2|}}} | appointer = {{#if: {{{appointer2|}}} | {{{appointer2}}} | {{{appointed2|}}} }} | assembly = {{{assembly2|}}} | assuming = {{{assuming2|}}} | chancellor = {{{chancellor2|}}} | co-leader = {{{co-leader2|}}} | constituency_{{#if:{{{constituency_AM2|}}}|AM|MP}} = {{#if: {{{constituency_AM2|}}} | {{{constituency_AM2}}} | {{{constituency_MP2|}}} }} | constituency = {{{constituency2|}}} | convocation = {{{convocation2|}}} | country = {{{country2|}}} | deputy = {{{deputy2|}}} | district = {{{district2|}}} | firstminister = {{{firstminister2|}}} | governor-general = {{{governor-general2|}}} | governor_general = {{{governor_general2|}}} | governor = {{{governor2|}}} | jr/sr = {{{jr/sr2|}}} | jr/sr and state = {{{jr/sr and state2|}}} | leader = {{{leader2|}}} | legislature = {{{legislature2|}}} | lieutenant_governor = {{{lieutenant_governor2|}}} | lieutenant = {{{lieutenant2|}}} | majority_leader = {{#if: {{{majorityleader2|}}} | {{{majorityleader2}}} | {{{majority_leader2|}}} }} | minister_from = {{{minister_from2|}}} | minority_floor_leader = {{{minority_floor_leader2|}}} | majority_floor_leader = {{{majority_floor_leader2|}}} | majority = {{{majority2|}}} | minister = {{{minister2|}}} | minority_leader = {{#if: {{{minorityleader2|}}} | {{{minorityleader2}}} | {{{minority_leader2|}}} }} | monarch = {{{monarch2|}}} | nominator = {{{nominator2|}}} | office = {{{office2|}}} | order = {{{order2|}}} | parliament = {{{parliament2|}}} | parliamentarygroup = {{{parliamentarygroup2|}}} | predecessor = {{{predecessor2|}}} | preceding = {{{preceding2|}}} | preceded = {{{preceded2|}}} | premier = {{{premier2|}}} | president = {{{president2|}}} | primeminister = {{{primeminister2|}}} | riding = {{{riding2|}}} | speaker = {{{speaker|}}} | speaker_office = {{{speaker_office|}}} | state_assembly = {{{state_assembly|}}} | state_delegate = {{{state_delegate|}}} | state_house = {{{state_house|}}} | state_legislature = {{{state_legislature|}}} | state_senate = {{{state_senate|}}} | state = {{{state|}}} | subterm = {{nobold|{{{subterm|}}}}} | suboffice = {{{suboffice|}}} | succeeded = {{{succeeded2|}}} | succeeding = {{{succeeding2|}}} | successor = {{{successor2|}}} | taoiseach = {{{taoiseach2|}}} | termlabel = {{{term_label2|{{{termlabel2|In office}}}}}} | termend = {{#if:{{{termend2|}}}|{{{termend2}}}|{{{term_end2|}}}}} | termstart = {{#if:{{{termstart2|}}}|{{{termstart2}}}|{{{term_start2|}}}}} | term = {{{term2|}}} | title = {{{title2|}}} | vicegovernor = {{{vicegovernor2|}}} | vicepresident = {{{vicepresident2|}}} | vicepremier = {{{vicepremier2|}}} | viceprimeminister = {{{viceprimeminister2|}}} | party = {{{party|}}} | prior_term = {{{prior_term|}}} }}}}}}<!-- -->{{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname|}}} | 1namedata = {{{1namedata|}}} | 2blankname = {{{2blankname|}}} | 2namedata = {{{2namedata|}}} | 3blankname = {{{3blankname|}}} | 3namedata = {{{3namedata|}}} | 4blankname = {{{4blankname|}}} | 4namedata = {{{4namedata|}}} | 5blankname = {{{5blankname|}}} | 5namedata = {{{5namedata|}}} | alongside = {{{alongside|}}} | ambassador_from = {{{ambassador_from|}}} | appointer = {{#if: {{{appointer|}}} | {{{appointer}}} | {{{appointed|}}} }} | assembly = {{{assembly|}}} | assuming = {{{assuming|}}} | candidate = {{{candidate|}}} | chancellor = {{{chancellor|}}} | co-leader = {{{co-leader|}}} | constituency_{{#if:{{{constituency_AM|}}}|AM|MP}} = {{#if: {{{constituency_AM|}}} | {{{constituency_AM}}} | {{{constituency_MP|}}} }} | constituency = {{{constituency|}}} | convocation = {{{convocation|}}} | country = {{{country|}}} | deputy = {{{deputy|}}} | district = {{{district|}}} | election_date = {{{election_date|}}} | firstminister = {{{firstminister|}}} | governor-general = {{{governor-general|}}} | governor_general = {{{governor_general|}}} | governor = {{{governor|}}} | incumbent = {{{incumbent|}}} | jr/sr = {{{jr/sr|}}} | jr/sr and state = {{{jr/sr and state|}}} | leader = {{{leader|}}} | legislature = {{{legislature|}}} | lieutenant_governor = {{{lieutenant_governor|}}} | lieutenant = {{{lieutenant|}}} | majority_leader = {{#if: {{{majorityleader|}}} | {{{majorityleader}}} | {{{majority_leader|}}} }} | majority = {{{majority|}}} | minister = {{{minister|}}} | minister_from = {{{minister_from|}}} | minority_floor_leader = {{{minority_floor_leader|}}} | majority_floor_leader = {{{majority_floor_leader|}}} | minority_leader = {{#if: {{{minorityleader|}}} | {{{minorityleader}}} | {{{minority_leader|}}} }} | monarch = {{{monarch|}}} | nominator = {{{nominator|}}} | nominee = {{{nominee|}}} | office = {{{office|}}} | opponent = {{{opponent|}}} | order = {{{order|}}} | parliament = {{{parliament|}}} | parliamentarygroup = {{{parliamentarygroup|}}} | party_election = {{{party_election|}}} | predecessor = {{{predecessor|}}} | preceding = {{{preceding|}}} | preceded = {{{preceded|}}} | premier = {{{premier|}}} | president = {{{president|}}} | primeminister = {{{primeminister|}}} | riding = {{{riding|}}} | runningmate = {{{runningmate|}}} | state_assembly = {{{state_assembly|}}} | state_delegate = {{{state_delegate|}}} | state_house = {{{state_house|}}} | state_legislature = {{{state_legislature|}}} | state_senate = {{{state_senate|}}} | state = {{{state|}}} | status = {{{status|}}} | suboffice = {{{suboffice|}}} | subterm = {{nobold|{{{subterm|}}}}} | succeeded = {{{succeeded|}}} | succeeding = {{{succeeding|}}} | successor = {{{successor|}}} | taoiseach = {{{taoiseach|}}} | termlabel = {{{term_label|{{{termlabel|In office}}}}}} | termend = {{#if: {{{termend|}}} | {{{termend}}} | {{{term_end|}}} }} | termstart = {{#if: {{{termstart|}}} | {{{termstart}}} | {{{term_start|}}} }} | term = {{{term|}}} | title = {{{title|}}} | vicegovernor = {{{vicegovernor|}}} | vicepresident = {{{vicepresident|}}} | vicepremier = {{{vicepremier|}}} | viceprimeminister = {{{viceprimeminister|}}} | party = {{{party|}}} | prior_term = {{{prior_term|}}} }}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname1|}}} | 1namedata = {{{1namedata1|}}} | 2blankname = {{{2blankname1|}}} | 2namedata = {{{2namedata1|}}} | 3blankname = {{{3blankname1|}}} | 3namedata = {{{3namedata1|}}} | 4blankname = {{{4blankname1|}}} | 4namedata = {{{4namedata1|}}} | 5blankname = {{{5blankname1|}}} | 5namedata = {{{5namedata1|}}} | alongside = {{{alongside1|}}} | ambassador_from = {{{ambassador_from1|}}} | appointer = {{#if: {{{appointer1|}}} | {{{appointer1}}} | {{{appointed1|}}} }} | assembly = {{{assembly1|}}} | assuming = {{{assuming1|}}} | chancellor = {{{chancellor1|}}} | co-leader = {{{co-leader1|}}} | constituency_{{#if:{{{constituency_AM1|}}}|AM|MP}} = {{#if: {{{constituency_AM1|}}} | {{{constituency_AM1}}} | {{{constituency_MP1|}}} }} | constituency = {{{constituency1|}}} | convocation = {{{convocation1|}}} | country = {{{country1|}}} | deputy = {{{deputy1|}}} | district = {{{district1|}}} | firstminister = {{{firstminister1|}}} | governor-general = {{{governor-general1|}}} | governor_general = {{{governor_general1|}}} | governor = {{{governor1|}}} | jr/sr = {{{jr/sr1|}}} | jr/sr and state = {{{jr/sr and state1|}}} | leader = {{{leader1|}}} | legislature = {{{legislature1|}}} | lieutenant_governor = {{{lieutenant_governor1|}}} | lieutenant = {{{lieutenant1|}}} | minority_floor_leader = {{{minority_floor_leader1|}}} | minister_from = {{{minister_from1|}}} | majority_floor_leader = {{{majority_floor_leader1|}}} | majority_leader = {{#if: {{{majorityleader1|}}} | {{{majorityleader1}}} | {{{majority_leader1|}}} }} | majority = {{{majority1|}}} | minister = {{{minister1|}}} | minority_leader = {{#if: {{{minorityleader1|}}} | {{{minorityleader1}}} | {{{minority_leader1|}}} }} | monarch = {{{monarch1|}}} | nominator = {{{nominator1|}}} | office = {{{office1|}}} | order = {{{order1|}}} | parliament = {{{parliament1|}}} | parliamentarygroup = {{{parliamentarygroup1|}}} | predecessor = {{{predecessor1|}}} | preceding = {{{preceding1|}}} | preceded = {{{preceded1|}}} | premier = {{{premier1|}}} | president = {{{president1|}}} | primeminister = {{{primeminister1|}}} | riding = {{{riding1|}}} | state_assembly = {{{state_assembly1|}}} | state_delegate = {{{state_delegate1|}}} | state_house = {{{state_house1|}}} | state_legislature = {{{state_legislature1|}}} | state_senate = {{{state_senate1|}}} | state = {{{state1|}}} | status = {{{status1|}}} | subterm = {{nobold|{{{subterm1|}}}}} | suboffice = {{{suboffice1|}}} | succeeded = {{{succeeded1|}}} | succeeding = {{{succeeding1|}}} | successor = {{{successor1|}}} | taoiseach = {{{taoiseach1|}}} | termlabel = {{{term_label1|{{{termlabel1|In office}}}}}} | termend = {{#if:{{{termend1|}}}|{{{termend1}}}|{{{term_end1|}}}}} | termstart = {{#if:{{{termstart1|}}}|{{{termstart1}}}|{{{term_start1|}}}}} | term = {{{term1|}}} | title = {{{title1|}}} | vicegovernor = {{{vicegovernor1|}}} | vicepresident = {{{vicepresident1|}}} | vicepremier = {{{vicepremier1|}}} | viceprimeminister = {{{viceprimeminister1|}}} | party = {{{party|}}} | prior_term = {{{prior_term1|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{#if:{{{speaker|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname2|}}} | 1namedata = {{{1namedata2|}}} | 2blankname = {{{2blankname2|}}} | 2namedata = {{{2namedata2|}}} | 3blankname = {{{3blankname2|}}} | 3namedata = {{{3namedata2|}}} | 4blankname = {{{4blankname2|}}} | 4namedata = {{{4namedata2|}}} | 5blankname = {{{5blankname2|}}} | 5namedata = {{{5namedata2|}}} | alongside = {{{alongside2|}}} | ambassador_from = {{{ambassador_from2|}}} | appointer = {{#if: {{{appointer2|}}} | {{{appointer2}}} | {{{appointed2|}}} }} | assembly = {{{assembly2|}}} | assuming = {{{assuming2|}}} | chancellor = {{{chancellor2|}}} | co-leader = {{{co-leader2|}}} | constituency_{{#if:{{{constituency_AM2|}}}|AM|MP}} = {{#if: {{{constituency_AM2|}}} | {{{constituency_AM2}}} | {{{constituency_MP2|}}} }} | constituency = {{{constituency2|}}} | convocation = {{{convocation2|}}} | country = {{{country2|}}} | deputy = {{{deputy2|}}} | district = {{{district2|}}} | firstminister = {{{firstminister2|}}} | governor-general = {{{governor-general2|}}} | governor_general = {{{governor_general2|}}} | governor = {{{governor2|}}} | jr/sr = {{{jr/sr2|}}} | jr/sr and state = {{{jr/sr and state2|}}} | leader = {{{leader2|}}} | legislature = {{{legislature2|}}} | lieutenant_governor = {{{lieutenant_governor2|}}} | lieutenant = {{{lieutenant2|}}} | majority_leader = {{#if: {{{majorityleader2|}}} | {{{majorityleader2}}} | {{{majority_leader2|}}} }} | minister_from = {{{minister_from2|}}} | minority_floor_leader = {{{minority_floor_leader2|}}} | majority_floor_leader = {{{majority_floor_leader2|}}} | majority = {{{majority2|}}} | minister = {{{minister2|}}} | minority_leader = {{#if: {{{minorityleader2|}}} | {{{minorityleader2}}} | {{{minority_leader2|}}} }} | monarch = {{{monarch2|}}} | nominator = {{{nominator2|}}} | office = {{{office2|}}} | order = {{{order2|}}} | parliament = {{{parliament2|}}} | parliamentarygroup = {{{parliamentarygroup2|}}} | predecessor = {{{predecessor2|}}} | preceding = {{{preceding2|}}} | preceded = {{{preceded2|}}} | premier = {{{premier2|}}} | president = {{{president2|}}} | primeminister = {{{primeminister2|}}} | riding = {{{riding2|}}} | state_assembly = {{{state_assembly2|}}} | state_delegate = {{{state_delegate2|}}} | state_house = {{{state_house2|}}} | state_legislature = {{{state_legislature2|}}} | state_senate = {{{state_senate2|}}} | state = {{{state2|}}} | status = {{{status2|}}} | subterm = {{nobold|{{{subterm2|}}}}} | suboffice = {{{suboffice2|}}} | succeeded = {{{succeeded2|}}} | succeeding = {{{succeeding2|}}} | successor = {{{successor2|}}} | taoiseach = {{{taoiseach2|}}} | termlabel = {{{term_label2|{{{termlabel2|In office}}}}}} | termend = {{#if:{{{termend2|}}}|{{{termend2}}}|{{{term_end2|}}}}} | termstart = {{#if:{{{termstart2|}}}|{{{termstart2}}}|{{{term_start2|}}}}} | term = {{{term2|}}} | title = {{{title2|}}} | vicegovernor = {{{vicegovernor2|}}} | vicepresident = {{{vicepresident2|}}} | vicepremier = {{{vicepremier2|}}} | viceprimeminister = {{{viceprimeminister2|}}} | party = {{{party|}}} | prior_term = {{{prior_term2|}}} }}}}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname3|}}} | 1namedata = {{{1namedata3|}}} | 2blankname = {{{2blankname3|}}} | 2namedata = {{{2namedata3|}}} | 3blankname = {{{3blankname3|}}} | 3namedata = {{{3namedata3|}}} | 4blankname = {{{4blankname3|}}} | 4namedata = {{{4namedata3|}}} | 5blankname = {{{5blankname3|}}} | 5namedata = {{{5namedata3|}}} | alongside = {{{alongside3|}}} | ambassador_from = {{{ambassador_from3|}}} | appointer = {{#if: {{{appointer3|}}} | {{{appointer3}}} | {{{appointed3|}}} }} | assembly = {{{assembly3|}}} | assuming = {{{assuming3|}}} | chancellor = {{{chancellor3|}}} | co-leader = {{{co-leader3|}}} | constituency_{{#if:{{{constituency_AM3|}}}|AM|MP}} = {{#if: {{{constituency_AM3|}}} | {{{constituency_AM3}}} | {{{constituency_MP3|}}} }} | constituency = {{{constituency3|}}} | convocation = {{{convocation3|}}} | country = {{{country3|}}} | deputy = {{{deputy3|}}} | district = {{{district3|}}} | firstminister = {{{firstminister3|}}} | governor-general = {{{governor-general3|}}} | governor_general = {{{governor_general3|}}} | governor = {{{governor3|}}} | jr/sr = {{{jr/sr3|}}} | jr/sr and state = {{{jr/sr and state3|}}} | leader = {{{leader3|}}} | legislature = {{{legislature3|}}} | lieutenant_governor = {{{lieutenant_governor3|}}} | lieutenant = {{{lieutenant3|}}} | minority_floor_leader = {{{minority_floor_leader3|}}} | minister_from = {{{minister_from3|}}} | majority_floor_leader = {{{majority_floor_leader3|}}} | majority_leader = {{#if: {{{majorityleader3|}}} | {{{majorityleader3}}} | {{{majority_leader3|}}} }} | majority = {{{majority3|}}} | minister = {{{minister3|}}} | minority_leader = {{#if: {{{minorityleader3|}}} | {{{minorityleader3}}} | {{{minority_leader3|}}} }} | monarch = {{{monarch3|}}} | nominator = {{{nominator3|}}} | office = {{{office3|}}} | order = {{{order3|}}} | parliament = {{{parliament3|}}} | parliamentarygroup = {{{parliamentarygroup3|}}} | predecessor = {{{predecessor3|}}} | preceding = {{{preceding3|}}} | preceded = {{{preceded3|}}} | premier = {{{premier3|}}} | president = {{{president3|}}} | primeminister = {{{primeminister3|}}} | riding = {{{riding3|}}} | state_assembly = {{{state_assembly3|}}} | state_delegate = {{{state_delegate3|}}} | state_house = {{{state_house3|}}} | state_legislature = {{{state_legislature3|}}} | state_senate = {{{state_senate3|}}} | state = {{{state3|}}} | status = {{{status3|}}} | subterm = {{nobold|{{{subterm3|}}}}} | suboffice = {{{suboffice3|}}} | succeeded = {{{succeeded3|}}} | succeeding = {{{succeeding3|}}} | successor = {{{successor3|}}} | taoiseach = {{{taoiseach3|}}} | termlabel = {{{term_label3|{{{termlabel3|In office}}}}}} | termend = {{#if:{{{termend3|}}}|{{{termend3}}}|{{{term_end3|}}}}} | termstart = {{#if:{{{termstart3|}}}|{{{termstart3}}}|{{{term_start3|}}}}} | term = {{{term3|}}} | title = {{{title3|}}} | vicegovernor = {{{vicegovernor3|}}} | vicepresident = {{{vicepresident3|}}} | vicepremier = {{{vicepremier3|}}} | viceprimeminister = {{{viceprimeminister3|}}} | party = {{{party|}}} | prior_term = {{{prior_term3|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname4|}}} | 1namedata = {{{1namedata4|}}} | 2blankname = {{{2blankname4|}}} | 2namedata = {{{2namedata4|}}} | 3blankname = {{{3blankname4|}}} | 3namedata = {{{3namedata4|}}} | 4blankname = {{{4blankname4|}}} | 4namedata = {{{4namedata4|}}} | 5blankname = {{{5blankname4|}}} | 5namedata = {{{5namedata4|}}} | alongside = {{{alongside4|}}} | ambassador_from = {{{ambassador_from4|}}} | appointer = {{#if: {{{appointer4|}}} | {{{appointer4}}} | {{{appointed4|}}} }} | assembly = {{{assembly4|}}} | assuming = {{{assuming4|}}} | chancellor = {{{chancellor4|}}} | co-leader = {{{co-leader4|}}} | constituency_{{#if:{{{constituency_AM4|}}}|AM|MP}} = {{#if: {{{constituency_AM4|}}} | {{{constituency_AM4}}} | {{{constituency_MP4|}}} }} | constituency = {{{constituency4|}}} | convocation = {{{convocation4|}}} | country = {{{country4|}}} | deputy = {{{deputy4|}}} | district = {{{district4|}}} | firstminister = {{{firstminister4|}}} | governor-general = {{{governor-general4|}}} | governor_general = {{{governor_general4|}}} | governor = {{{governor4|}}} | jr/sr = {{{jr/sr4|}}} | jr/sr and state = {{{jr/sr and state4|}}} | leader = {{{leader4|}}} | legislature = {{{legislature4|}}} | lieutenant_governor = {{{lieutenant_governor4|}}} | lieutenant = {{{lieutenant4|}}} | minister_from = {{{minister_from4|}}} | minority_floor_leader = {{{minority_floor_leader4|}}} | majority_floor_leader = {{{majority_floor_leader4|}}} | majority_leader = {{#if: {{{majorityleader4|}}} | {{{majorityleader4}}} | {{{majority_leader4|}}} }} | majority = {{{majority4|}}} | minister = {{{minister4|}}} | minority_leader = {{#if: {{{minorityleader4|}}} | {{{minorityleader4}}} | {{{minority_leader4|}}} }} | monarch = {{{monarch4|}}} | nominator = {{{nominator4|}}} | office = {{{office4|}}} | order = {{{order4|}}} | parliament = {{{parliament4|}}} | parliamentarygroup = {{{parliamentarygroup4|}}} | predecessor = {{{predecessor4|}}} | preceding = {{{preceding4|}}} | preceded = {{{preceded4|}}} | premier = {{{premier4|}}} | president = {{{president4|}}} | primeminister = {{{primeminister4|}}} | riding = {{{riding4|}}} | state_assembly = {{{state_assembly4|}}} | state_delegate = {{{state_delegate4|}}} | state_house = {{{state_house4|}}} | state_legislature = {{{state_legislature4|}}} | state_senate = {{{state_senate4|}}} | state = {{{state4|}}} | status = {{{status4|}}} | subterm = {{nobold|{{{subterm4|}}}}} | suboffice = {{{suboffice4|}}} | succeeded = {{{succeeded4|}}} | succeeding = {{{succeeding4|}}} | successor = {{{successor4|}}} | taoiseach = {{{taoiseach4|}}} | termlabel = {{{term_label4|{{{termlabel4|In office}}}}}} | termend = {{#if:{{{termend4|}}}|{{{termend4}}}|{{{term_end4|}}}}} | termstart = {{#if:{{{termstart4|}}}|{{{termstart4}}}|{{{term_start4|}}}}} | term = {{{term4|}}} | title = {{{title4|}}} | vicegovernor = {{{vicegovernor4|}}} | vicepresident = {{{vicepresident4|}}} | vicepremier = {{{vicepremier4|}}} | viceprimeminister = {{{viceprimeminister4|}}} | party = {{{party|}}} | prior_term = {{{prior_term4|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname5|}}} | 1namedata = {{{1namedata5|}}} | 2blankname = {{{2blankname5|}}} | 2namedata = {{{2namedata5|}}} | 3blankname = {{{3blankname5|}}} | 3namedata = {{{3namedata5|}}} | 4blankname = {{{4blankname5|}}} | 4namedata = {{{4namedata5|}}} | 5blankname = {{{5blankname5|}}} | 5namedata = {{{5namedata5|}}} | alongside = {{{alongside5|}}} | ambassador_from = {{{ambassador_from5|}}} | appointer = {{#if: {{{appointer5|}}} | {{{appointer5}}} | {{{appointed5|}}} }} | assembly = {{{assembly5|}}} | assuming = {{{assuming5|}}} | chancellor = {{{chancellor5|}}} | co-leader = {{{co-leader5|}}} | constituency_{{#if:{{{constituency_AM5|}}}|AM|MP}} = {{#if: {{{constituency_AM5|}}} | {{{constituency_AM5}}} | {{{constituency_MP5|}}} }} | constituency = {{{constituency5|}}} | convocation = {{{convocation5|}}} | country = {{{country5|}}} | deputy = {{{deputy5|}}} | district = {{{district5|}}} | firstminister = {{{firstminister5|}}} | governor-general = {{{governor-general5|}}} | governor_general = {{{governor_general5|}}} | governor = {{{governor5|}}} | jr/sr = {{{jr/sr5|}}} | jr/sr and state = {{{jr/sr and state5|}}} | leader = {{{leader5|}}} | legislature = {{{legislature5|}}} | lieutenant_governor = {{{lieutenant_governor5|}}} | lieutenant = {{{lieutenant5|}}} | minister_from = {{{minister_from5|}}} | minority_floor_leader = {{{minority_floor_leader5|}}} | majority_floor_leader = {{{majority_floor_leader5|}}} | majority_leader = {{#if: {{{majorityleader5|}}} | {{{majorityleader5}}} | {{{majority_leader5|}}} }} | majority = {{{majority5|}}} | minister = {{{minister5|}}} | minority_leader = {{#if: {{{minorityleader5|}}} | {{{minorityleader5}}} | {{{minority_leader5|}}} }} | monarch = {{{monarch5|}}} | nominator = {{{nominator5|}}} | office = {{{office5|}}} | order = {{{order5|}}} | parliament = {{{parliament5|}}} | parliamentarygroup = {{{parliamentarygroup5|}}} | predecessor = {{{predecessor5|}}} | preceding = {{{preceding5|}}} | preceded = {{{preceded5|}}} | premier = {{{premier5|}}} | president = {{{president5|}}} | primeminister = {{{primeminister5|}}} | riding = {{{riding5|}}} | state_assembly = {{{state_assembly5|}}} | state_delegate = {{{state_delegate5|}}} | state_house = {{{state_house5|}}} | state_legislature = {{{state_legislature5|}}} | state_senate = {{{state_senate5|}}} | state = {{{state5|}}} | status = {{{status5|}}} | subterm = {{nobold|{{{subterm5|}}}}} | suboffice = {{{suboffice5|}}} | succeeded = {{{succeeded5|}}} | succeeding = {{{succeeding5|}}} | successor = {{{successor5|}}} | taoiseach = {{{taoiseach5|}}} | termlabel = {{{term_label5|{{{termlabel5|In office}}}}}} | termend = {{#if:{{{termend5|}}}|{{{termend5}}}|{{{term_end5|}}}}} | termstart = {{#if:{{{termstart5|}}}|{{{termstart5}}}|{{{term_start5|}}}}} | term = {{{term5|}}} | title = {{{title5|}}} | vicegovernor = {{{vicegovernor5|}}} | vicepresident = {{{vicepresident5|}}} | vicepremier = {{{vicepremier5|}}} | viceprimeminister = {{{viceprimeminister5|}}} | party = {{{party|}}} | prior_term = {{{prior_term5|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname6|}}} | 1namedata = {{{1namedata6|}}} | 2blankname = {{{2blankname6|}}} | 2namedata = {{{2namedata6|}}} | 3blankname = {{{3blankname6|}}} | 3namedata = {{{3namedata6|}}} | 4blankname = {{{4blankname6|}}} | 4namedata = {{{4namedata6|}}} | 5blankname = {{{5blankname6|}}} | 5namedata = {{{5namedata6|}}} | alongside = {{{alongside6|}}} | ambassador_from = {{{ambassador_from6|}}} | appointer = {{#if: {{{appointer6|}}} | {{{appointer6}}} | {{{appointed6|}}} }} | assembly = {{{assembly6|}}} | assuming = {{{assuming6|}}} | chancellor = {{{chancellor6|}}} | co-leader = {{{co-leader6|}}} | constituency_{{#if:{{{constituency_AM6|}}}|AM|MP}} = {{#if: {{{constituency_AM6|}}} | {{{constituency_AM6}}} | {{{constituency_MP6|}}} }} | constituency = {{{constituency6|}}} | convocation = {{{convocation6|}}} | country = {{{country6|}}} | deputy = {{{deputy6|}}} | district = {{{district6|}}} | firstminister = {{{firstminister6|}}} | governor-general = {{{governor-general6|}}} | governor_general = {{{governor_general6|}}} | governor = {{{governor6|}}} | jr/sr = {{{jr/sr6|}}} | jr/sr and state = {{{jr/sr and state6|}}} | leader = {{{leader6|}}} | legislature = {{{legislature6|}}} | lieutenant_governor = {{{lieutenant_governor6|}}} | lieutenant = {{{lieutenant6|}}} | minority_floor_leader = {{{minority_floor_leader6|}}} | minister_from = {{{minister_from6|}}} | majority_floor_leader = {{{majority_floor_leader6|}}} | majority_leader = {{#if: {{{majorityleader6|}}} | {{{majorityleader6}}} | {{{majority_leader6|}}} }} | majority = {{{majority6|}}} | minister = {{{minister6|}}} | minority_leader = {{#if: {{{minorityleader6|}}} | {{{minorityleader6}}} | {{{minority_leader6|}}} }} | monarch = {{{monarch6|}}} | nominator = {{{nominator6|}}} | office = {{{office6|}}} | order = {{{order6|}}} | parliament = {{{parliament6|}}} | parliamentarygroup = {{{parliamentarygroup6|}}} | predecessor = {{{predecessor6|}}} | preceding = {{{preceding6|}}} | preceded = {{{preceded6|}}} | premier = {{{premier6|}}} | president = {{{president6|}}} | primeminister = {{{primeminister6|}}} | riding = {{{riding6|}}} | state_assembly = {{{state_assembly6|}}} | state_delegate = {{{state_delegate6|}}} | state_house = {{{state_house6|}}} | state_legislature = {{{state_legislature6|}}} | state_senate = {{{state_senate6|}}} | state = {{{state6|}}} | status = {{{status6|}}} | subterm = {{nobold|{{{subterm6|}}}}} | suboffice = {{{suboffice6|}}} | succeeded = {{{succeeded6|}}} | succeeding = {{{succeeding6|}}} | successor = {{{successor6|}}} | taoiseach = {{{taoiseach6|}}} | termlabel = {{{term_label6|{{{termlabel6|In office}}}}}} | termend = {{#if:{{{termend6|}}}|{{{termend6}}}|{{{term_end6|}}}}} | termstart = {{#if:{{{termstart6|}}}|{{{termstart6}}}|{{{term_start6|}}}}} | term = {{{term6|}}} | title = {{{title6|}}} | vicegovernor = {{{vicegovernor6|}}} | vicepresident = {{{vicepresident6|}}} | vicepremier = {{{vicepremier6|}}} | viceprimeminister = {{{viceprimeminister6|}}} | party = {{{party|}}} | prior_term = {{{prior_term6|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname7|}}} | 1namedata = {{{1namedata7|}}} | 2blankname = {{{2blankname7|}}} | 2namedata = {{{2namedata7|}}} | 3blankname = {{{3blankname7|}}} | 3namedata = {{{3namedata7|}}} | 4blankname = {{{4blankname7|}}} | 4namedata = {{{4namedata7|}}} | 5blankname = {{{5blankname7|}}} | 5namedata = {{{5namedata7|}}} | alongside = {{{alongside7|}}} | ambassador_from = {{{ambassador_from7|}}} | appointer = {{#if: {{{appointer7|}}} | {{{appointer7}}} | {{{appointed7|}}} }} | assembly = {{{assembly7|}}} | assuming = {{{assuming7|}}} | chancellor = {{{chancellor7|}}} | co-leader = {{{co-leader7|}}} | constituency_{{#if:{{{constituency_AM7|}}}|AM|MP}} = {{#if: {{{constituency_AM7|}}} | {{{constituency_AM7}}} | {{{constituency_MP7|}}} }} | constituency = {{{constituency7|}}} | convocation = {{{convocation7|}}} | country = {{{country7|}}} | deputy = {{{deputy7|}}} | district = {{{district7|}}} | firstminister = {{{firstminister7|}}} | governor-general = {{{governor-general7|}}} | governor_general = {{{governor_general7|}}} | governor = {{{governor7|}}} | jr/sr = {{{jr/sr7|}}} | jr/sr and state = {{{jr/sr and state7|}}} | leader = {{{leader7|}}} | legislature = {{{legislature7|}}} | lieutenant_governor = {{{lieutenant_governor7|}}} | lieutenant = {{{lieutenant7|}}} | minister_from = {{{minister_from7|}}} | minority_floor_leader = {{{minority_floor_leader7|}}} | majority_floor_leader = {{{majority_floor_leader7|}}} | majority_leader = {{#if: {{{majorityleader7|}}} | {{{majorityleader7}}} | {{{majority_leader7|}}} }} | majority = {{{majority7|}}} | minister = {{{minister7|}}} | minority_leader = {{#if: {{{minorityleader7|}}} | {{{minorityleader7}}} | {{{minority_leader7|}}} }} | monarch = {{{monarch7|}}} | nominator = {{{nominator7|}}} | office = {{{office7|}}} | order = {{{order7|}}} | parliament = {{{parliament7|}}} | parliamentarygroup = {{{parliamentarygroup7|}}} | predecessor = {{{predecessor7|}}} | preceding = {{{preceding7|}}} | preceded = {{{preceded7|}}} | premier = {{{premier7|}}} | president = {{{president7|}}} | primeminister = {{{primeminister7|}}} | riding = {{{riding7|}}} | state_assembly = {{{state_assembly7|}}} | state_delegate = {{{state_delegate7|}}} | state_house = {{{state_house7|}}} | state_legislature = {{{state_legislature7|}}} | state_senate = {{{state_senate7|}}} | state = {{{state7|}}} | status = {{{status7|}}} | subterm = {{nobold|{{{subterm7|}}}}} | suboffice = {{{suboffice7|}}} | succeeded = {{{succeeded7|}}} | succeeding = {{{succeeding7|}}} | successor = {{{successor7|}}} | taoiseach = {{{taoiseach7|}}} | termlabel = {{{term_label7|{{{termlabel7|In office}}}}}} | termend = {{#if:{{{termend7|}}}|{{{termend7}}}|{{{term_end7|}}}}} | termstart = {{#if:{{{termstart7|}}}|{{{termstart7}}}|{{{term_start7|}}}}} | term = {{{term7|}}} | title = {{{title7|}}} | vicegovernor = {{{vicegovernor7|}}} | vicepresident = {{{vicepresident7|}}} | vicepremier = {{{vicepremier7|}}} | viceprimeminister = {{{viceprimeminister7|}}} | party = {{{party|}}} | prior_term = {{{prior_term7|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname8|}}} | 1namedata = {{{1namedata8|}}} | 2blankname = {{{2blankname8|}}} | 2namedata = {{{2namedata8|}}} | 3blankname = {{{3blankname8|}}} | 3namedata = {{{3namedata8|}}} | 4blankname = {{{4blankname8|}}} | 4namedata = {{{4namedata8|}}} | 5blankname = {{{5blankname8|}}} | 5namedata = {{{5namedata8|}}} | alongside = {{{alongside8|}}} | ambassador_from = {{{ambassador_from8|}}} | appointer = {{#if: {{{appointer8|}}} | {{{appointer8}}} | {{{appointed8|}}} }} | assembly = {{{assembly8|}}} | assuming = {{{assuming8|}}} | chancellor = {{{chancellor8|}}} | co-leader = {{{co-leader8|}}} | constituency_{{#if:{{{constituency_AM8|}}}|AM|MP}} = {{#if: {{{constituency_AM8|}}} | {{{constituency_AM8}}} | {{{constituency_MP8|}}} }} | constituency = {{{constituency8|}}} | convocation = {{{convocation8|}}} | country = {{{country8|}}} | deputy = {{{deputy8|}}} | district = {{{district8|}}} | firstminister = {{{firstminister8|}}} | governor-general = {{{governor-general8|}}} | governor_general = {{{governor_general8|}}} | governor = {{{governor8|}}} | jr/sr = {{{jr/sr8|}}} | jr/sr and state = {{{jr/sr and state8|}}} | leader = {{{leader8|}}} | legislature = {{{legislature8|}}} | lieutenant_governor = {{{lieutenant_governor8|}}} | lieutenant = {{{lieutenant8|}}} | minister_from = {{{minister_from8|}}} | minority_floor_leader = {{{minority_floor_leader8|}}} | majority_floor_leader = {{{majority_floor_leader8|}}} | majority_leader = {{#if: {{{majorityleader8|}}} | {{{majorityleader8}}} | {{{majority_leader8|}}} }} | majority = {{{majority8|}}} | minister = {{{minister8|}}} | minority_leader = {{#if: {{{minorityleader8|}}} | {{{minorityleader8}}} | {{{minority_leader8|}}} }} | monarch = {{{monarch8|}}} | nominator = {{{nominator8|}}} | office = {{{office8|}}} | order = {{{order8|}}} | parliament = {{{parliament8|}}} | parliamentarygroup = {{{parliamentarygroup8|}}} | predecessor = {{{predecessor8|}}} | preceding = {{{preceding8|}}} | preceded = {{{preceded8|}}} | premier = {{{premier8|}}} | president = {{{president8|}}} | primeminister = {{{primeminister8|}}} | riding = {{{riding8|}}} | state_assembly = {{{state_assembly8|}}} | state_delegate = {{{state_delegate8|}}} | state_house = {{{state_house8|}}} | state_legislature = {{{state_legislature8|}}} | state_senate = {{{state_senate8|}}} | state = {{{state8|}}} | status = {{{status8|}}} | subterm = {{nobold|{{{subterm8|}}}}} | suboffice = {{{suboffice8|}}} | succeeded = {{{succeeded8|}}} | succeeding = {{{succeeding8|}}} | successor = {{{successor8|}}} | taoiseach = {{{taoiseach8|}}} | termlabel = {{{term_label8|{{{termlabel8|In office}}}}}} | termend = {{#if:{{{termend8|}}}|{{{termend8}}}|{{{term_end8|}}}}} | termstart = {{#if:{{{termstart8|}}}|{{{termstart8}}}|{{{term_start8|}}}}} | term = {{{term8|}}} | title = {{{title8|}}} | vicegovernor = {{{vicegovernor8|}}} | vicepresident = {{{vicepresident8|}}} | vicepremier = {{{vicepremier8|}}} | viceprimeminister = {{{viceprimeminister8|}}} | party = {{{party|}}} | prior_term = {{{prior_term8|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname9|}}} | 1namedata = {{{1namedata9|}}} | 2blankname = {{{2blankname9|}}} | 2namedata = {{{2namedata9|}}} | 3blankname = {{{3blankname9|}}} | 3namedata = {{{3namedata9|}}} | 4blankname = {{{4blankname9|}}} | 4namedata = {{{4namedata9|}}} | 5blankname = {{{5blankname9|}}} | 5namedata = {{{5namedata9|}}} | alongside = {{{alongside9|}}} | ambassador_from = {{{ambassador_from9|}}} | appointer = {{#if: {{{appointer9|}}} | {{{appointer9}}} | {{{appointed9|}}} }} | assembly = {{{assembly9|}}} | assuming = {{{assuming9|}}} | chancellor = {{{chancellor9|}}} | co-leader = {{{co-leader9|}}} | constituency_{{#if:{{{constituency_AM9|}}}|AM|MP}} = {{#if: {{{constituency_AM9|}}} | {{{constituency_AM9}}} | {{{constituency_MP9|}}} }} | constituency = {{{constituency9|}}} | convocation = {{{convocation9|}}} | country = {{{country9|}}} | deputy = {{{deputy9|}}} | district = {{{district9|}}} | firstminister = {{{firstminister9|}}} | governor-general = {{{governor-general9|}}} | governor_general = {{{governor_general9|}}} | governor = {{{governor9|}}} | jr/sr = {{{jr/sr9|}}} | jr/sr and state = {{{jr/sr and state9|}}} | leader = {{{leader9|}}} | legislature = {{{legislature9|}}} | lieutenant_governor = {{{lieutenant_governor9|}}} | lieutenant = {{{lieutenant9|}}} | minister_from = {{{minister_from9|}}} | minority_floor_leader = {{{minority_floor_leader9|}}} | majority_floor_leader = {{{majority_floor_leader9|}}} | majority_leader = {{#if: {{{majorityleader9|}}} | {{{majorityleader9}}} | {{{majority_leader9|}}} }} | majority = {{{majority9|}}} | minister = {{{minister9|}}} | minority_leader = {{#if: {{{minorityleader9|}}} | {{{minorityleader9}}} | {{{minority_leader9|}}} }} | monarch = {{{monarch9|}}} | nominator = {{{nominator9|}}} | office = {{{office9|}}} | order = {{{order9|}}} | parliament = {{{parliament9|}}} | parliamentarygroup = {{{parliamentarygroup9|}}} | predecessor = {{{predecessor9|}}} | preceding = {{{preceding9|}}} | preceded = {{{preceded9|}}} | premier = {{{premier9|}}} | president = {{{president9|}}} | primeminister = {{{primeminister9|}}} | riding = {{{riding9|}}} | state_assembly = {{{state_assembly9|}}} | state_delegate = {{{state_delegate9|}}} | state_house = {{{state_house9|}}} | state_legislature = {{{state_legislature9|}}} | state_senate = {{{state_senate9|}}} | state = {{{state9|}}} | status = {{{status9|}}} | subterm = {{nobold|{{{subterm9|}}}}} | suboffice = {{{suboffice9|}}} | succeeded = {{{succeeded9|}}} | succeeding = {{{succeeding9|}}} | successor = {{{successor9|}}} | taoiseach = {{{taoiseach9|}}} | termlabel = {{{term_label9|{{{termlabel9|In office}}}}}} | termend = {{#if:{{{termend9|}}}|{{{termend9}}}|{{{term_end9|}}}}} | termstart = {{#if:{{{termstart9|}}}|{{{termstart9}}}|{{{term_start9|}}}}} | term = {{{term9|}}} | title = {{{title9|}}} | vicegovernor = {{{vicegovernor9|}}} | vicepresident = {{{vicepresident9|}}} | vicepremier = {{{vicepremier9|}}} | viceprimeminister = {{{viceprimeminister9|}}} | party = {{{party|}}} | prior_term = {{{prior_term9|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname10|}}} | 1namedata = {{{1namedata10|}}} | 2blankname = {{{2blankname10|}}} | 2namedata = {{{2namedata10|}}} | 3blankname = {{{3blankname10|}}} | 3namedata = {{{3namedata10|}}} | 4blankname = {{{4blankname10|}}} | 4namedata = {{{4namedata10|}}} | 5blankname = {{{5blankname10|}}} | 5namedata = {{{5namedata10|}}} | alongside = {{{alongside10|}}} | ambassador_from = {{{ambassador_from10|}}} | appointer = {{#if: {{{appointer10|}}} | {{{appointer10}}} | {{{appointed10|}}} }} | assembly = {{{assembly10|}}} | assuming = {{{assuming10|}}} | chancellor = {{{chancellor10|}}} | co-leader = {{{co-leader10|}}} | constituency_{{#if:{{{constituency_AM10|}}}|AM|MP}} = {{#if: {{{constituency_AM10|}}} | {{{constituency_AM10}}} | {{{constituency_MP10|}}} }} | constituency = {{{constituency10|}}} | convocation = {{{convocation10|}}} | country = {{{country10|}}} | deputy = {{{deputy10|}}} | district = {{{district10|}}} | firstminister = {{{firstminister10|}}} | governor-general = {{{governor-general10|}}} | governor_general = {{{governor_general10|}}} | governor = {{{governor10|}}} | jr/sr = {{{jr/sr10|}}} | jr/sr and state = {{{jr/sr and state10|}}} | leader = {{{leader10|}}} | legislature = {{{legislature10|}}} | lieutenant_governor = {{{lieutenant_governor10|}}} | lieutenant = {{{lieutenant10|}}} | minister_from = {{{minister_from10|}}} | minority_floor_leader = {{{minority_floor_leader10|}}} | majority_floor_leader = {{{majority_floor_leader10|}}} | majority_leader = {{#if: {{{majorityleader10|}}} | {{{majorityleader10}}} | {{{majority_leader10|}}} }} | majority = {{{majority10|}}} | minister = {{{minister10|}}} | minority_leader = {{#if: {{{minorityleader10|}}} | {{{minorityleader10}}} | {{{minority_leader10|}}} }} | monarch = {{{monarch10|}}} | nominator = {{{nominator10|}}} | office = {{{office10|}}} | order = {{{order10|}}} | parliament = {{{parliament10|}}} | parliamentarygroup = {{{parliamentarygroup10|}}} | predecessor = {{{predecessor10|}}} | preceding = {{{preceding10|}}} | preceded = {{{preceded10|}}} | premier = {{{premier10|}}} | president = {{{president10|}}} | primeminister = {{{primeminister10|}}} | riding = {{{riding10|}}} | state_assembly = {{{state_assembly10|}}} | state_delegate = {{{state_delegate10|}}} | state_house = {{{state_house10|}}} | state_legislature = {{{state_legislature10|}}} | state_senate = {{{state_senate10|}}} | state = {{{state10|}}} | status = {{{status10|}}} | subterm = {{nobold|{{{subterm10|}}}}} | suboffice = {{{suboffice10|}}} | succeeded = {{{succeeded10|}}} | succeeding = {{{succeeding10|}}} | successor = {{{successor10|}}} | taoiseach = {{{taoiseach10|}}} | termlabel = {{{term_label10|{{{termlabel10|In office}}}}}} | termend = {{#if:{{{termend10|}}}|{{{termend10}}}|{{{term_end10|}}}}} | termstart = {{#if:{{{termstart10|}}}|{{{termstart10}}}|{{{term_start10|}}}}} | term = {{{term10|}}} | title = {{{title10|}}} | vicegovernor = {{{vicegovernor10|}}} | vicepresident = {{{vicepresident10|}}} | vicepremier = {{{vicepremier10|}}} | viceprimeminister = {{{viceprimeminister10|}}} | party = {{{party|}}} | prior_term = {{{prior_term10|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname11|}}} | 1namedata = {{{1namedata11|}}} | 2blankname = {{{2blankname11|}}} | 2namedata = {{{2namedata11|}}} | 3blankname = {{{3blankname11|}}} | 3namedata = {{{3namedata11|}}} | 4blankname = {{{4blankname11|}}} | 4namedata = {{{4namedata11|}}} | 5blankname = {{{5blankname11|}}} | 5namedata = {{{5namedata11|}}} | alongside = {{{alongside11|}}} | ambassador_from = {{{ambassador_from11|}}} | appointer = {{#if: {{{appointer11|}}} | {{{appointer11}}} | {{{appointed11|}}} }} | assembly = {{{assembly11|}}} | assuming = {{{assuming11|}}} | chancellor = {{{chancellor11|}}} | co-leader = {{{co-leader11|}}} | constituency_{{#if:{{{constituency_AM11|}}}|AM|MP}} = {{#if: {{{constituency_AM11|}}} | {{{constituency_AM11}}} | {{{constituency_MP11|}}} }} | constituency = {{{constituency11|}}} | convocation = {{{convocation11|}}} | country = {{{country11|}}} | deputy = {{{deputy11|}}} | district = {{{district11|}}} | firstminister = {{{firstminister11|}}} | governor-general = {{{governor-general11|}}} | governor_general = {{{governor_general11|}}} | governor = {{{governor11|}}} | jr/sr = {{{jr/sr11|}}} | jr/sr and state = {{{jr/sr and state11|}}} | leader = {{{leader11|}}} | legislature = {{{legislature11|}}} | lieutenant_governor = {{{lieutenant_governor11|}}} | lieutenant = {{{lieutenant11|}}} | minister_from = {{{minister_from11|}}} | minority_floor_leader = {{{minority_floor_leader11|}}} | majority_floor_leader = {{{majority_floor_leader11|}}} | majority_leader = {{#if: {{{majorityleader11|}}} | {{{majorityleader11}}} | {{{majority_leader11|}}} }} | majority = {{{majority11|}}} | minister = {{{minister11|}}} | minority_leader = {{#if: {{{minorityleader11|}}} | {{{minorityleader11}}} | {{{minority_leader11|}}} }} | monarch = {{{monarch11|}}} | nominator = {{{nominator11|}}} | office = {{{office11|}}} | order = {{{order11|}}} | parliament = {{{parliament11|}}} | parliamentarygroup = {{{parliamentarygroup11|}}} | predecessor = {{{predecessor11|}}} | preceding = {{{preceding11|}}} | preceded = {{{preceded11|}}} | premier = {{{premier11|}}} | president = {{{president11|}}} | primeminister = {{{primeminister11|}}} | riding = {{{riding11|}}} | state_assembly = {{{state_assembly11|}}} | state_delegate = {{{state_delegate11|}}} | state_house = {{{state_house11|}}} | state_legislature = {{{state_legislature11|}}} | state_senate = {{{state_senate11|}}} | state = {{{state11|}}} | status = {{{status11|}}} | subterm = {{nobold|{{{subterm11|}}}}} | suboffice = {{{suboffice11|}}} | succeeded = {{{succeeded11|}}} | succeeding = {{{succeeding11|}}} | successor = {{{successor11|}}} | taoiseach = {{{taoiseach11|}}} | termlabel = {{{term_label11|{{{termlabel11|In office}}}}}} | termend = {{#if:{{{termend11|}}}|{{{termend11}}}|{{{term_end11|}}}}} | termstart = {{#if:{{{termstart11|}}}|{{{termstart11}}}|{{{term_start11|}}}}} | term = {{{term11|}}} | title = {{{title11|}}} | vicegovernor = {{{vicegovernor11|}}} | vicepresident = {{{vicepresident11|}}} | vicepremier = {{{vicepremier11|}}} | viceprimeminister = {{{viceprimeminister11|}}} | party = {{{party|}}} | prior_term = {{{prior_term11|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname12|}}} | 1namedata = {{{1namedata12|}}} | 2blankname = {{{2blankname12|}}} | 2namedata = {{{2namedata12|}}} | 3blankname = {{{3blankname12|}}} | 3namedata = {{{3namedata12|}}} | 4blankname = {{{4blankname12|}}} | 4namedata = {{{4namedata12|}}} | 5blankname = {{{5blankname12|}}} | 5namedata = {{{5namedata12|}}} | alongside = {{{alongside12|}}} | ambassador_from = {{{ambassador_from12|}}} | appointer = {{#if: {{{appointer12|}}} | {{{appointer12}}} | {{{appointed12|}}} }} | assembly = {{{assembly12|}}} | assuming = {{{assuming12|}}} | chancellor = {{{chancellor12|}}} | co-leader = {{{co-leader12|}}} | constituency_{{#if:{{{constituency_AM12|}}}|AM|MP}} = {{#if: {{{constituency_AM12|}}} | {{{constituency_AM12}}} | {{{constituency_MP12|}}} }} | constituency = {{{constituency12|}}} | convocation = {{{convocation12|}}} | country = {{{country12|}}} | deputy = {{{deputy12|}}} | district = {{{district12|}}} | firstminister = {{{firstminister12|}}} | governor-general = {{{governor-general12|}}} | governor_general = {{{governor_general12|}}} | governor = {{{governor12|}}} | jr/sr = {{{jr/sr12|}}} | jr/sr and state = {{{jr/sr and state12|}}} | leader = {{{leader12|}}} | legislature = {{{legislature12|}}} | lieutenant_governor = {{{lieutenant_governor12|}}} | lieutenant = {{{lieutenant12|}}} | minister_from = {{{minister_from12|}}} | minority_floor_leader = {{{minority_floor_leader12|}}} | majority_floor_leader = {{{majority_floor_leader12|}}} | majority_leader = {{#if: {{{majorityleader12|}}} | {{{majorityleader12}}} | {{{majority_leader12|}}} }} | majority = {{{majority12|}}} | minister = {{{minister12|}}} | minority_leader = {{#if: {{{minorityleader12|}}} | {{{minorityleader12}}} | {{{minority_leader12|}}} }} | monarch = {{{monarch12|}}} | nominator = {{{nominator12|}}} | office = {{{office12|}}} | order = {{{order12|}}} | parliament = {{{parliament12|}}} | parliamentarygroup = {{{parliamentarygroup12|}}} | predecessor = {{{predecessor12|}}} | preceding = {{{preceding12|}}} | preceded = {{{preceded12|}}} | premier = {{{premier12|}}} | president = {{{president12|}}} | primeminister = {{{primeminister12|}}} | riding = {{{riding12|}}} | state_assembly = {{{state_assembly12|}}} | state_delegate = {{{state_delegate12|}}} | state_house = {{{state_house12|}}} | state_legislature = {{{state_legislature12|}}} | state_senate = {{{state_senate12|}}} | state = {{{state12|}}} | status = {{{status12|}}} | subterm = {{nobold|{{{subterm12|}}}}} | suboffice = {{{suboffice12|}}} | succeeded = {{{succeeded12|}}} | succeeding = {{{succeeding12|}}} | successor = {{{successor12|}}} | taoiseach = {{{taoiseach12|}}} | termlabel = {{{term_label12|{{{termlabel12|In office}}}}}} | termend = {{#if:{{{termend12|}}}|{{{termend12}}}|{{{term_end12|}}}}} | termstart = {{#if:{{{termstart12|}}}|{{{termstart12}}}|{{{term_start12|}}}}} | term = {{{term12|}}} | title = {{{title12|}}} | vicegovernor = {{{vicegovernor12|}}} | vicepresident = {{{vicepresident12|}}} | vicepremier = {{{vicepremier12|}}} | viceprimeminister = {{{viceprimeminister12|}}} | party = {{{party|}}} | prior_term = {{{prior_term12|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname13|}}} | 1namedata = {{{1namedata13|}}} | 2blankname = {{{2blankname13|}}} | 2namedata = {{{2namedata13|}}} | 3blankname = {{{3blankname13|}}} | 3namedata = {{{3namedata13|}}} | 4blankname = {{{4blankname13|}}} | 4namedata = {{{4namedata13|}}} | 5blankname = {{{5blankname13|}}} | 5namedata = {{{5namedata13|}}} | alongside = {{{alongside13|}}} | ambassador_from = {{{ambassador_from13|}}} | appointer = {{#if: {{{appointer13|}}} | {{{appointer13}}} | {{{appointed13|}}} }} | assembly = {{{assembly13|}}} | assuming = {{{assuming13|}}} | chancellor = {{{chancellor13|}}} | co-leader = {{{co-leader13|}}} | constituency_{{#if:{{{constituency_AM13|}}}|AM|MP}} = {{#if: {{{constituency_AM13|}}} | {{{constituency_AM13}}} | {{{constituency_MP13|}}} }} | constituency = {{{constituency13|}}} | convocation = {{{convocation13|}}} | country = {{{country13|}}} | deputy = {{{deputy13|}}} | district = {{{district13|}}} | firstminister = {{{firstminister13|}}} | governor-general = {{{governor-general13|}}} | governor_general = {{{governor_general13|}}} | governor = {{{governor13|}}} | jr/sr = {{{jr/sr13|}}} | jr/sr and state = {{{jr/sr and state13|}}} | leader = {{{leader13|}}} | legislature = {{{legislature13|}}} | lieutenant_governor = {{{lieutenant_governor13|}}} | lieutenant = {{{lieutenant13|}}} | minister_from = {{{minister_from13|}}} | minority_floor_leader = {{{minority_floor_leader13|}}} | majority_floor_leader = {{{majority_floor_leader13|}}} | majority_leader = {{#if: {{{majorityleader13|}}} | {{{majorityleader13}}} | {{{majority_leader13|}}} }} | majority = {{{majority13|}}} | minister = {{{minister13|}}} | minority_leader = {{#if: {{{minorityleader13|}}} | {{{minorityleader13}}} | {{{minority_leader13|}}} }} | monarch = {{{monarch13|}}} | nominator = {{{nominator13|}}} | office = {{{office13|}}} | order = {{{order13|}}} | parliament = {{{parliament13|}}} | parliamentarygroup = {{{parliamentarygroup13|}}} | predecessor = {{{predecessor13|}}} | preceding = {{{preceding13|}}} | preceded = {{{preceded13|}}} | premier = {{{premier13|}}} | president = {{{president13|}}} | primeminister = {{{primeminister13|}}} | riding = {{{riding13|}}} | state_assembly = {{{state_assembly13|}}} | state_delegate = {{{state_delegate13|}}} | state_house = {{{state_house13|}}} | state_legislature = {{{state_legislature13|}}} | state_senate = {{{state_senate13|}}} | state = {{{state13|}}} | status = {{{status13|}}} | subterm = {{nobold|{{{subterm13|}}}}} | suboffice = {{{suboffice13|}}} | succeeded = {{{succeeded13|}}} | succeeding = {{{succeeding13|}}} | successor = {{{successor13|}}} | taoiseach = {{{taoiseach13|}}} | termlabel = {{{term_label13|{{{termlabel13|In office}}}}}} | termend = {{#if:{{{termend13|}}}|{{{termend13}}}|{{{term_end13|}}}}} | termstart = {{#if:{{{termstart13|}}}|{{{termstart13}}}|{{{term_start13|}}}}} | term = {{{term13|}}} | title = {{{title13|}}} | vicegovernor = {{{vicegovernor13|}}} | vicepresident = {{{vicepresident13|}}} | vicepremier = {{{vicepremier13|}}} | viceprimeminister = {{{viceprimeminister13|}}} | party = {{{party|}}} | prior_term = {{{prior_term13|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname14|}}} | 1namedata = {{{1namedata14|}}} | 2blankname = {{{2blankname14|}}} | 2namedata = {{{2namedata14|}}} | 3blankname = {{{3blankname14|}}} | 3namedata = {{{3namedata14|}}} | 4blankname = {{{4blankname14|}}} | 4namedata = {{{4namedata14|}}} | 5blankname = {{{5blankname14|}}} | 5namedata = {{{5namedata14|}}} | alongside = {{{alongside14|}}} | ambassador_from = {{{ambassador_from14|}}} | appointer = {{#if: {{{appointer14|}}} | {{{appointer14}}} | {{{appointed14|}}} }} | assembly = {{{assembly14|}}} | assuming = {{{assuming14|}}} | chancellor = {{{chancellor14|}}} | co-leader = {{{co-leader14|}}} | constituency_{{#if:{{{constituency_AM14|}}}|AM|MP}} = {{#if: {{{constituency_AM14|}}} | {{{constituency_AM14}}} | {{{constituency_MP14|}}} }} | constituency = {{{constituency14|}}} | convocation = {{{convocation14|}}} | country = {{{country14|}}} | deputy = {{{deputy14|}}} | district = {{{district14|}}} | firstminister = {{{firstminister14|}}} | governor-general = {{{governor-general14|}}} | governor_general = {{{governor_general14|}}} | governor = {{{governor14|}}} | jr/sr = {{{jr/sr14|}}} | jr/sr and state = {{{jr/sr and state14|}}} | leader = {{{leader14|}}} | legislature = {{{legislature14|}}} | lieutenant_governor = {{{lieutenant_governor14|}}} | lieutenant = {{{lieutenant14|}}} | minister_from = {{{minister_from14|}}} | minority_floor_leader = {{{minority_floor_leader14|}}} | majority_floor_leader = {{{majority_floor_leader14|}}} | majority_leader = {{#if: {{{majorityleader14|}}} | {{{majorityleader14}}} | {{{majority_leader14|}}} }} | majority = {{{majority14|}}} | minister = {{{minister14|}}} | minority_leader = {{#if: {{{minorityleader14|}}} | {{{minorityleader14}}} | {{{minority_leader14|}}} }} | monarch = {{{monarch14|}}} | nominator = {{{nominator14|}}} | office = {{{office14|}}} | order = {{{order14|}}} | parliament = {{{parliament14|}}} | parliamentarygroup = {{{parliamentarygroup14|}}} | predecessor = {{{predecessor14|}}} | preceding = {{{preceding14|}}} | preceded = {{{preceded14|}}} | premier = {{{premier14|}}} | president = {{{president14|}}} | primeminister = {{{primeminister14|}}} | riding = {{{riding14|}}} | state_assembly = {{{state_assembly14|}}} | state_delegate = {{{state_delegate14|}}} | state_house = {{{state_house14|}}} | state_legislature = {{{state_legislature14|}}} | state_senate = {{{state_senate14|}}} | state = {{{state14|}}} | status = {{{status14|}}} | subterm = {{nobold|{{{subterm14|}}}}} | suboffice = {{{suboffice14|}}} | succeeded = {{{succeeded14|}}} | succeeding = {{{succeeding14|}}} | successor = {{{successor14|}}} | taoiseach = {{{taoiseach14|}}} | termlabel = {{{term_label14|{{{termlabel14|In office}}}}}} | termend = {{#if:{{{termend14|}}}|{{{termend14}}}|{{{term_end14|}}}}} | termstart = {{#if:{{{termstart14|}}}|{{{termstart14}}}|{{{term_start14|}}}}} | term = {{{term14|}}} | title = {{{title14|}}} | vicegovernor = {{{vicegovernor14|}}} | vicepresident = {{{vicepresident14|}}} | vicepremier = {{{vicepremier14|}}} | viceprimeminister = {{{viceprimeminister14|}}} | party = {{{party|}}} | prior_term = {{{prior_term14|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname15|}}} | 1namedata = {{{1namedata15|}}} | 2blankname = {{{2blankname15|}}} | 2namedata = {{{2namedata15|}}} | 3blankname = {{{3blankname15|}}} | 3namedata = {{{3namedata15|}}} | 4blankname = {{{4blankname15|}}} | 4namedata = {{{4namedata15|}}} | 5blankname = {{{5blankname15|}}} | 5namedata = {{{5namedata15|}}} | alongside = {{{alongside15|}}} | ambassador_from = {{{ambassador_from15|}}} | appointer = {{#if: {{{appointer15|}}} | {{{appointer15}}} | {{{appointed15|}}} }} | assembly = {{{assembly15|}}} | assuming = {{{assuming15|}}} | chancellor = {{{chancellor15|}}} | co-leader = {{{co-leader15|}}} | constituency_{{#if:{{{constituency_AM15|}}}|AM|MP}} = {{#if: {{{constituency_AM15|}}} | {{{constituency_AM15}}} | {{{constituency_MP15|}}} }} | constituency = {{{constituency15|}}} | convocation = {{{convocation15|}}} | country = {{{country15|}}} | deputy = {{{deputy15|}}} | district = {{{district15|}}} | firstminister = {{{firstminister15|}}} | governor-general = {{{governor-general15|}}} | governor_general = {{{governor_general15|}}} | governor = {{{governor15|}}} | jr/sr = {{{jr/sr15|}}} | jr/sr and state = {{{jr/sr and state15|}}} | leader = {{{leader15|}}} | legislature = {{{legislature15|}}} | lieutenant_governor = {{{lieutenant_governor15|}}} | lieutenant = {{{lieutenant15|}}} | minister_from = {{{minister_from15|}}} | minority_floor_leader = {{{minority_floor_leader15|}}} | majority_floor_leader = {{{majority_floor_leader15|}}} | majority_leader = {{#if: {{{majorityleader15|}}} | {{{majorityleader15}}} | {{{majority_leader15|}}} }} | majority = {{{majority15|}}} | minister = {{{minister15|}}} | minority_leader = {{#if: {{{minorityleader15|}}} | {{{minorityleader15}}} | {{{minority_leader15|}}} }} | monarch = {{{monarch15|}}} | nominator = {{{nominator15|}}} | office = {{{office15|}}} | order = {{{order15|}}} | parliament = {{{parliament15|}}} | parliamentarygroup = {{{parliamentarygroup15|}}} | predecessor = {{{predecessor15|}}} | preceding = {{{preceding15|}}} | preceded = {{{preceded15|}}} | premier = {{{premier15|}}} | president = {{{president15|}}} | primeminister = {{{primeminister15|}}} | riding = {{{riding15|}}} | state_assembly = {{{state_assembly15|}}} | state_delegate = {{{state_delegate15|}}} | state_house = {{{state_house15|}}} | state_legislature = {{{state_legislature15|}}} | state_senate = {{{state_senate15|}}} | state = {{{state15|}}} | status = {{{status15|}}} | subterm = {{nobold|{{{subterm15|}}}}} | suboffice = {{{suboffice15|}}} | succeeded = {{{succeeded15|}}} | succeeding = {{{succeeding15|}}} | successor = {{{successor15|}}} | taoiseach = {{{taoiseach15|}}} | termlabel = {{{term_label15|{{{termlabel15|In office}}}}}} | termend = {{#if:{{{termend15|}}}|{{{termend15}}}|{{{term_end15|}}}}} | termstart = {{#if:{{{termstart15|}}}|{{{termstart15}}}|{{{term_start15|}}}}} | term = {{{term15|}}} | title = {{{title15|}}} | vicegovernor = {{{vicegovernor15|}}} | vicepresident = {{{vicepresident15|}}} | vicepremier = {{{vicepremier15|}}} | viceprimeminister = {{{viceprimeminister15|}}} | party = {{{party|}}} | prior_term = {{{prior_term15|}}} }}}}<!-- -->{{#if:{{{nominee|}}}{{{candidate|}}}|| {{Infobox officeholder/office|color={{#ifeq:{{lc:{{{embed}}}}}|yes|#eee|lavender}} | 1blankname = {{{1blankname16|}}} | 1namedata = {{{1namedata16|}}} | 2blankname = {{{2blankname16|}}} | 2namedata = {{{2namedata16|}}} | 3blankname = {{{3blankname16|}}} | 3namedata = {{{3namedata16|}}} | 4blankname = {{{4blankname16|}}} | 4namedata = {{{4namedata16|}}} | 5blankname = {{{5blankname16|}}} | 5namedata = {{{5namedata16|}}} | alongside = {{{alongside16|}}} | ambassador_from = {{{ambassador_from16|}}} | appointer = {{#if: {{{appointer16|}}} | {{{appointer16}}} | {{{appointed16|}}} }} | assembly = {{{assembly16|}}} | assuming = {{{assuming16|}}} | chancellor = {{{chancellor16|}}} | co-leader = {{{co-leader16|}}} | constituency_{{#if:{{{constituency_AM16|}}}|AM|MP}} = {{#if: {{{constituency_AM16|}}} | {{{constituency_AM16}}} | {{{constituency_MP16|}}} }} | constituency = {{{constituency16|}}} | convocation = {{{convocation16|}}} | country = {{{country16|}}} | deputy = {{{deputy16|}}} | district = {{{district16|}}} | firstminister = {{{firstminister16|}}} | governor-general = {{{governor-general16|}}} | governor_general = {{{governor_general16|}}} | governor = {{{governor16|}}} | jr/sr = {{{jr/sr16|}}} | jr/sr and state = {{{jr/sr and state16|}}} | leader = {{{leader16|}}} | legislature = {{{legislature16|}}} | lieutenant_governor = {{{lieutenant_governor16|}}} | lieutenant = {{{lieutenant16|}}} | minister_from = {{{minister_from16|}}} | minority_floor_leader = {{{minority_floor_leader16|}}} | majority_floor_leader = {{{majority_floor_leader16|}}} | majority_leader = {{#if: {{{majorityleader16|}}} | {{{majorityleader16}}} | {{{majority_leader16|}}} }} | majority = {{{majority16|}}} | minister = {{{minister16|}}} | minority_leader = {{#if: {{{minorityleader16|}}} | {{{minorityleader16}}} | {{{minority_leader16|}}} }} | monarch = {{{monarch16|}}} | nominator = {{{nominator16|}}} | office = {{{office16|}}} | order = {{{order16|}}} | parliament = {{{parliament16|}}} | parliamentarygroup = {{{parliamentarygroup16|}}} | predecessor = {{{predecessor16|}}} | preceding = {{{preceding16|}}} | preceded = {{{preceded16|}}} | premier = {{{premier16|}}} | president = {{{president16|}}} | primeminister = {{{primeminister16|}}} | riding = {{{riding16|}}} | state_assembly = {{{state_assembly16|}}} | state_delegate = {{{state_delegate16|}}} | state_house = {{{state_house16|}}} | state_legislature = {{{state_legislature16|}}} | state_senate = {{{state_senate16|}}} | state = {{{state16|}}} | status = {{{status16|}}} | subterm = {{nobold|{{{subterm16|}}}}} | suboffice = {{{suboffice16|}}} | succeeded = {{{succeeded16|}}} | succeeding = {{{succeeding16|}}} | successor = {{{successor16|}}} | taoiseach = {{{taoiseach16|}}} | termlabel = {{{term_label16|{{{termlabel16|In office}}}}}} | termend = {{#if:{{{termend16|}}}|{{{termend16}}}|{{{term_end16|}}}}} | termstart = {{#if:{{{termstart16|}}}|{{{termstart16}}}|{{{term_start16|}}}}} | term = {{{term16|}}} | title = {{{title16|}}} | vicegovernor = {{{vicegovernor16|}}} | vicepresident = {{{vicepresident16|}}} | vicepremier = {{{vicepremier16|}}} | viceprimeminister = {{{viceprimeminister16|}}} | party = {{{party|}}} | prior_term = {{{prior_term16|}}} }}}} | data2 = {{{module0|}}} <!----------Personal data----------> | header3 = {{#if:{{{pronunciation|}}}{{{birth_name|{{{birthname|}}}}}}{{{birth_date|}}}{{{birth_place|}}}{{{death_date|}}}{{{death_place|}}}{{{resting_place|{{{restingplace|}}}}}}{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}{{{citizenship|}}}{{{nationality|}}}{{{party|}}}{{{otherparty|}}}{{{spouse|}}}{{{spouses|}}}{{{partner|}}}{{{relations|}}}{{{children|}}}{{{parents|}}}{{{mother|}}}{{{father|}}}{{{relatives|}}}{{{residence|}}}{{{education|}}}{{{alma_mater|}}}{{{occupation|}}}{{{profession|}}}{{{known_for|}}}{{{salary|}}}{{{cabinet|}}}{{{committees|}}}{{{portfolio|}}}{{{awards|}}}{{{data1|}}}{{{data2|}}}{{{data3|}}}{{{data4|}}}{{{data5|}}}|Personal details}} | label4 = Pronunciation | data4 = {{{pronunciation|}}} | label5 = Born | data5 = {{br separated entries |1 = {{#if:{{{birth_name|{{{birthname|}}}}}}|<div style="display:inline" class="nickname">{{{birth_name|{{{birthname}}}}}}</div>}} |2 = {{{birth_date|}}} |3 = {{{birth_place|}}} }} | label6 = Died | data6 = {{br separated entries|{{{death_date|}}}|{{{death_place|}}}}} | label7 = {{#ifexpr: {{strfind short| {{{death_cause|}}}|Assassination}} | Manner |{{#if:{{{death_manner|}}}|Manner|Cause}} }}&nbsp;of&nbsp;death | data7 = {{#if:{{{death_manner|}}}|{{{death_manner|}}}|{{{death_cause|}}}}} | label8 = Resting place | class8 = label | data8 = {{br separated entries|{{{resting_place|{{{restingplace|}}}}}}|{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}}} | label9 = Citizenship | data9 = {{{citizenship|}}} | label10 = Nationality | data10 = {{#switch:{{Delink|{{{nationality|}}}}} | {{#ifeq:{{Country2nationality|{{Find country|{{Delink|{{{birth_place|}}}}}}}}}|{{Delink|{{{nationality|}}}}}|{{Delink|{{{nationality|}}}}}}} = | {{#ifeq:{{Find country|{{{birth_place|}}}}}|England|British}} = | #default = {{{nationality|}}} }} | label11 = Political party | data11 = {{#switch:{{{party|}}} | = | [[United States Democratic Party|Democrat]] | [[Democratic Party (United States)|Democratic]] | [[Democratic Party (United States)|Democrat]] = [[Democratic Party (United States)|Democratic]] | [[Republican Party (United States)|Republican]] | [[United States Republican Party]] | [[United States Republican Party|Republican]] | [[Republican Party (United States)|Republican Party]] = [[Republican Party (United States)|Republican]] | [[Conservative Party (UK)|Conservative Party]] | [[Conservative Party (UK)|Conservative]] = [[Conservative Party (UK)|Conservative]] | [[Labour Party (UK)|Labour Party]] | [[Labour Party (UK)|Labour]] = [[Labour Party (UK)|Labour]] | [[Conservative Party of Canada|Conservative Party]] | [[Conservative Party of Canada|Conservative]] = [[Conservative Party of Canada|Conservative]] | [[Liberal Party of Canada|Liberal Party]] | [[Liberal Party of Canada|Liberal]] = [[Liberal Party of Canada|Liberal]] | KMT | Kuomintang | [[KMT]] | [[Kuomintang|KMT]] | [[Kuomintang]] | Kuomintang (KMT) | [[Kuomintang]] (KMT) = [[Kuomintang]] | DPP | [[Democratic Progressive Party|DPP]] | [[Democratic Progressive Party]] = [[Democratic Progressive Party]] | #default = {{{party|}}} }} | label12 = Other political<br />affiliations | data12 = {{{otherparty|}}} | label13 = Height | data13 = {{#if:{{{height|}}}|{{infobox person/height|{{{height|}}}}}}} | label14 = Spouse{{#if:{{{spouses|}}}|s|{{Pluralize from text|{{{spouse|{{{spouse(s)|}}}}}}|likely=(s)|plural=s}}}} | data14 = {{{spouse|{{{spouses|{{{spouse(s)|}}}}}}}}} | label15 = Domestic partner{{Pluralize from text|{{{partner|}}}|likely=(s)|plural=s}} | data15 = {{{partner|}}} | label16 = Relations | data16 = {{{relations|}}} | label17 = Children | data17 = {{{children|}}} | label18 = Parent{{#if:{{{parents|}}}|{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|s}}}} | data18 = {{#if:{{{parents|}}}|{{{parents}}}|{{Unbulleted list|{{#if:{{{father|}}}|{{{father}}} (father)}}|{{#if:{{{mother|}}}|{{{mother}}} (mother)}}}}}} | label19 = Relatives | data19 = {{{relatives|}}} | label20 = Residence{{Pluralize from text|{{{residence|}}}|likely=(s)|plural=s}} | class20 = {{#if:{{{death_date|}}}{{{death_place|}}}||label}} | data20 = {{{residence|}}} | label21 = Education | data21 = {{{education|}}} | label22 = [[Alma mater]] | data22 = {{{alma_mater|}}} | label23 = Occupation | data23 = {{{occupation|}}} | label24 = Profession | data24 = {{{profession|}}} | label25 = Known for | data25 = {{{known_for|}}} | label26 = Salary | data26 = {{{salary|}}} | label27 = Cabinet | data27 = {{{cabinet|}}} | label28 = Committees | data28 = {{{committees|}}} | label29 = Portfolio | data29 = {{{portfolio|}}} | label30 = {{#if:{{{mawards|}}}|Civilian awards|Awards}} | data30 = {{{awards|}}} | label31 = {{{blank1}}} | data31 = {{{data1|}}} | label32 = {{{blank2}}} | data32 = {{{data2|}}} | label33 = {{{blank3}}} | data33 = {{{data3|}}} | label34 = {{{blank4}}} | data34 = {{{data4|}}} | label35 = {{{blank5}}} | data35 = {{{data5|}}} | label36 = Signature | data36 = {{#if:{{{signature|}}}|[[Fail:{{{signature}}}|{{#if:{{{signature_size|}}}|{{{signature_size}}}|128x80px}}|alt={{{signature_alt|}}}|{{PAGENAME}}'s signature]]}} | label37 = Website | data37 = {{{website|}}} | label38 = Nickname{{Pluralize from text|{{{nickname|}}}|likely=(s)|plural=s}} | data38 = {{{nickname|}}} | header39 = {{#if:{{{allegiance|}}}{{{branch|}}}{{{serviceyears|}}}{{{rank|}}}{{{unit|}}}{{{commands|}}}{{{battles|}}}{{{military_blank1|}}}|Military service}} | label40 = Allegiance | data40 = {{{allegiance|}}} | label41 = {{#if:{{{branch_label|}}}|{{{branch_label|}}}|Branch/service}} | data41 = {{{branch|}}} | label42 = {{#if:{{{serviceyears_label|}}}|{{{serviceyears_label|}}}|Years&nbsp;of service}} | data42 = {{{serviceyears|}}} | label43 = {{#if:{{{rank_label|}}}|{{{rank_label|}}}|Rank}} | data43 = {{{rank|}}} | label44 = {{#if:{{{unit_label|}}}|{{{unit_label|}}}|Unit}} | data44 = {{{unit|}}} | label45 = Commands | data45 = {{{commands|}}} | label46 = {{#if:{{{battles_label|}}}|{{{battles_label|}}}|Battles/wars}} | data46 = {{{battles|}}} | label47 = {{#if:{{{awards|}}}|Military awards|Awards}} | data47 = {{{mawards|}}} | label48 = {{{military_blank1}}} | data48 = {{{military_data1|}}} | label49 = {{{military_blank2}}} | data49 = {{{military_data2|}}} | label50 = {{{military_blank3}}} | data50 = {{{military_data3|}}} | label51 = {{{military_blank4}}} | data51 = {{{military_data4|}}} | label52 = {{{military_blank5}}} | data52 = {{{military_data5|}}} | data53 = {{{module|}}} | data54 = {{{module2|}}} | data55 = {{{module3|}}} | data56 = {{{module4|}}} | data57 = {{{module5|}}} | data58 = {{{footnotes|}}} | belowstyle = border-top: 1px solid right; font-size: 95% | below = <div>{{#if:{{{date|}}}| As of {{{date}}}{{#if:{{{year|}}}|, {{{year}}}}}}}</div>{{#if:{{{source|}}}|Source: [{{{source}}}]}} }}{{#if:{{{pronunciation|}}}|{{#ifeq:{{{nocat|{{{demo|{{#ifeq:{{{categories|}}}|no|yes}}}}}}}}|yes||[[Kategori:Biography template using pronunciation]]}} }}{{#if:{{{1blankname0|}}}{{{1namedata0|}}}{{{2blankname0|}}}{{{2namedata0|}}}{{{3blankname0|}}}{{{3namedata0|}}}{{{4blankname0|}}}{{{4namedata0|}}}{{{5blankname0|}}}{{{5namedata0|}}}{{{alongside0|}}}{{{ambassador_from0|}}}{{{appointer0|}}}{{{assembly0|}}}{{{assuming0|}}}{{{chancellor0|}}}{{{co-leader0|}}}{{{constituency_AM0|}}}{{{constituency0|}}}{{{country0|}}}{{{deputy0|}}}{{{district0|}}}{{{firstminister0|}}}{{{governor-general0|}}}{{{governor0|}}}{{{jr/sr0|}}}{{{jr/sr and state0|}}}{{{leader0|}}}{{{legislature0|}}}{{{lieutenant_governor0|}}}{{{lieutenant0|}}}{{{minister_from0|}}}{{{minority_floor_leader0|}}}{{{majority_floor_leader0|}}}{{{majorityleader0|}}}{{{majority0|}}}{{{minister0|}}}{{{minorityleader0|}}}{{{monarch0|}}}{{{nominator0|}}}{{{office0|}}}{{{order0|}}}{{{parliament0|}}}{{{predecessor0|}}}{{{preceding0|}}}{{{preceded0|}}}{{{premier0|}}}{{{president0|}}}{{{primeminister0|}}}{{{riding0|}}}{{{state_assembly0|}}}{{{state_delegate0|}}}{{{state_house0|}}}{{{state_legislature0|}}}{{{state_senate0|}}}{{{state0|}}}{{{suboffice0|}}}{{{subterm0|}}}{{{succeeded0|}}}{{{succeeding0|}}}{{{successor0|}}}{{{taoiseach0|}}}{{{termend0|}}}{{{termstart0|}}}{{{term0|}}}{{{title0|}}}{{{vicegovernor0|}}}{{{vicepresident0|}}}{{{vicepremier0|}}}{{{viceprimeminister0|}}}{{{prior_term0|}}}{{{appointe0|}}}{{{constituency_0|}}}|{{#ifeq:{{{nocat|{{{demo|{{#ifeq:{{{categories|}}}|no|yes}}}}}}}}|yes||[[Kategori:Pages using infobox officeholder with office0]]}} }}{{#if:{{{speaker|}}}|{{#if:{{{nominee|}}}{{{candidate|}}}||{{#ifeq:{{{nocat|{{{demo|{{#ifeq:{{{categories|}}}|no|yes}}}}}}}}|yes||[[Kategori:Pages using infobox officeholder with speaker]]}}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|{{#ifeq:{{{nocat|{{{demo|{{#ifeq:{{{categories|}}}|no|yes}}}}}}}}|yes||[[Kategori:Pages using infobox officeholder with unknown parameters|_VALUE_{{PAGENAME}}]]}}}}|preview=Page using [[Templat:Infobox officeholder]] with unknown parameter "_VALUE_"|ignoreblank=y| regexp1 = 1blankname[%d]* | regexp2 = 1namedata[%d]* | regexp3 = 2blankname[%d]* | regexp4 = 2namedata[%d]* | regexp5 = 3blankname[%d]* | regexp6 = 3namedata[%d]* | regexp7 = 4blankname[%d]* | regexp8 = 4namedata[%d]* | regexp9 = 5blankname[%d]* | regexp10 = 5namedata[%d]* | allegiance | alma_mater | regexp11 = alongside[%d]* | alt | regexp12 = ambassador_from[%d]* | regexp13 = appointed[%d]* | regexp14 = appointer[%d]* | regexp15 = assembly[%d]* | awards | battles | battles_label | birth_date | birth_name | birth_place | birthname | regexp16 = blank[%d]* | bodyclass | branch | branch_label | cabinet | candidate | caption | categories | regexp17 = chancellor[%d]* | children | citizenship | regexp18 = co%-leader[%d]* | commands | committees | regexp19 = constituency[%d]* | regexp20 = constituency_AM[%d]* | regexp21 = constituency_MP[%d]* | regexp22 = convocation[%d]* | regexp23 = country[%d]* | regexp24 = data[%d]* | date | death_cause | death_date | death_manner | death_place | demo | regexp25 = deputy[%d]* | regexp26 = district[%d]* | education | election_date | embed | father | regexp28 = firstminister[%d]* | footnotes | regexp29 = governor[%d]* | regexp30 = governor_general[%d]* | regexp31 = governor%-general[%d]* | height | honorific_prefix | honorific-prefix | honorific_suffix | honorific-suffix | image | image name | image_name_alt | image_size | imagesize | image_upright | incumbent | regexp32 = jr/sr[%d]* | regexp33 = jr/sr and state[%d]* | known_for | regexp34 = leader[%d]* | regexp35 = legislature[%d]* | regexp36 = lieutenant[%d]* | regexp37 = lieutenant_governor[%d]* | mainwidth | regexp38 = majority[%d]* | regexp39 = majority_floor_leader[%d]* | regexp40 = majority_leader[%d]* | regexp41 = majorityleader[%d]* | mawards | regexp42 = military_blank[%d]* | regexp43 = military_data[%d]* | regexp44 = minister[%d]* | regexp45 = minister_from[%d]* | regexp46 = minority_floor_leader[%d]* | regexp47 = minority_leader[%d]* | regexp48 = minorityleader[%d]* | regexp49 = module[%d]* | regexp50 = monarch[%d]* | mother | name | nationality | native_name | native_name_lang | nickname | nocat | regexp51 = nominator[%d]* | nominee | occupation | regexp52 = office[%d]* | opponent | regexp53 = order[%d]* | otherparty | parents | regexp54 = parliament[%d]* | regexp55 = parliamentarygroup[%d]* | partner | party | party_election | portfolio | regexp56 = preceded[%d]* | regexp57 = preceding[%d]* | regexp58 = predecessor[%d]* | regexp59 = premier[%d]* | regexp60 = president[%d]* | regexp61 = primeminister[%d]* | regexp62 = prior_term[%d]* | profession | pronunciation | rank | rank_label | relations | relatives | residence | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | regexp63 = riding[%d]* | runningmate | salary | serviceyears | serviceyears_label | signature | signature_alt | signature_size | smallimage | smallimage_alt | source | speaker | speaker_office | spouse | spouses | regexp64 = state[%d]* | regexp65 = state_assembly[%d]* | regexp66 = state_delegate[%d]* | regexp67 = state_house[%d]* | regexp68 = state_legislature[%d]* | regexp69 = state_senate[%d]* | regexp70 = status[%d]* | regexp71 = suboffice[%d]* | regexp72 = subterm[%d]* | regexp73 = succeeded[%d]* | regexp74 = succeeding[%d]* | regexp75 = successor[%d]* | regexp76 = taoiseach[%d]* | regexp77 = term[%d]* | regexp78 = term_end[%d]* | regexp79 = term_label[%d]* | regexp80 = term_start[%d]* | regexp81 = termend[%d]* | regexp82 = termlabel[%d]* | regexp83 = termstart[%d]* | regexp84 = title[%d]* | unit | unit_label | regexp85 = vicegovernor[%d]* | regexp86 = vicepremier[%d]* | regexp87 = vicepresident[%d]* | regexp88 = viceprimeminister[%d]* | regexp89 = assuming[%d]* | website | width | year }}<noinclude> {{Documentation}} </noinclude> 8o5y5d8i8u07rkzcqaihuvuvoh6xv72 Templat:Infobox officeholder/office 10 127 301 300 2024-08-09T09:19:53Z Jon Harald Søby 58 1 semakan diimportkan 300 wikitext text/x-wiki {{#if:{{{speaker|}}}{{{state_legislature|}}}{{{state_assembly|}}}{{{speaker_office|}}}{{{state_delegate|}}}{{{state_house|}}}{{{prior_term|}}}{{{nominee|}}}{{{candidate|}}}{{{termstart|}}}{{{election_date|}}}{{{majority_leader|}}}{{{minority_floor_leader|}}}{{{minority_leader|}}}{{{majority_floor_leader|}}}{{{jr/sr|}}}{{{succeeding|}}}{{{assuming|}}}{{{state|}}}{{{jr/sr and state|}}}{{{state_senate|}}}{{{district|}}}{{{ambassador_from|}}}{{{minister_from|}}}{{{order|}}}{{{office|}}}{{{title|}}}{{{country|}}}{{{constituency_AM|}}}{{{constituency_MP|}}}{{{parliament|}}}{{{assembly|}}}{{{constituency_|}}}{{{riding|}}}{{{term|}}}{{{termend|}}}{{{alongside|}}}{{{co-leader|}}} |{{#invoke:Infobox|infoboxTemplate|child=yes|decat=yes | headerstyle = background:{{{color|lavender}}};line-height:normal;padding:0.2em; | datastyle = border-bottom:none <!--------Speaker of the House---------> | header1 = {{#if:{{{speaker|}}}| {{{speaker}}} {{#if:{{{state_legislature|}}} |[[Speaker of the {{{state_legislature}}} Legislature]] |{{#if:{{{state_assembly|}}} |[[Speaker of the {{{state_assembly|}}} {{#ifeq:{{{state_assembly|}}}|Nevada||{{#ifeq:{{{state_assembly|}}}|New Jersey|General|State}}}} Assembly]] |{{#if:{{{speaker_office|}}}|{{{speaker_office}}}|[[Speaker of the {{#if:{{{state_delegate|}}} |{{{state_delegate}}}|{{#if:{{{state_house|}}} |{{{state_house}}}|United States}}}} House of {{#if:{{{state_delegate|}}}|Delegates|Representatives}}|Speaker of the {{#if:{{{state_delegate|}}} |{{{state_delegate}}}|{{#if:{{{state_house|}}} |{{{state_house}}}|U.S.}}}} House of {{#if:{{{state_delegate|}}}|Delegates|Representatives}}]]}} }} }}{{#if:{{{prior_term|}}}| <br />{{{prior_term}}}}} }} <!--------Office---------> | header2 = {{#if:{{{nominee|}}}{{{candidate|}}}| {{#if:{{{party_election|}}}{{{party|}}} |{{#if:{{{party_election|}}}|{{{party_election}}}|{{{party}}}}} {{#if:{{{nominee|}}}|nominee for<br>{{{nominee}}}|candidate for<br>{{{candidate}}}}} |{{#if:{{{nominee|}}}|Nominee for<br>{{{nominee}}}|Candidate for<br>{{{candidate}}}}} }} }} | data3 = {{#if:{{{nominee|}}}{{{candidate|}}}| {{#if:{{{termstart|}}}{{{election_date|}}} | <span class="nowrap">'''Election date'''</span><br />{{#if:{{{election_date|}}}|{{{election_date}}}|{{{termstart}}}}} }} }} | header4 = {{#if:{{{majority_leader|}}}{{{minority_floor_leader|}}}{{{minority_leader|}}}{{{majority_floor_leader|}}}|| {{#if:{{{jr/sr|}}}|[[United States Senate|<!--Changed code to eliminate "Junior/Senior" distinction for U.S. Senators per [[Perbincangan templat:Infobox Officeholder/Archive 9#Senior/Junior U.S. Senators]]{{{jr/sr}}}-->United States Senator{{#if:{{{succeeding|}}}{{{assuming|}}}|-elect}}]]<br />from {{{state}}} }} }} | header5 = {{#if:{{{majority_leader|}}}{{{minority_floor_leader|}}}{{{minority_leader|}}}{{{majority_floor_leader|}}}|| {{{jr/sr and state|}}} }} | header6 = {{#if:{{{majority_leader|}}}{{{minority_floor_leader|}}}{{{minority_leader|}}}{{{majority_floor_leader|}}}|| {{#if:{{{state_senate|}}}|Member{{#if:{{{succeeding|}}}{{{assuming|}}}|-elect}} of the <span style="display: inline-block;">[[{{{state_senate}}} Senate]]</span><br />from the {{{district}}} district{{#if:{{{prior_term|}}}| <br />{{{prior_term}}}}} }} }} | header7 = {{#if:{{{majority_leader|}}}{{{minority_floor_leader|}}}{{{minority_leader|}}}{{{majority_floor_leader|}}}|| {{#if:{{{state_legislature|}}}|Member{{#if:{{{succeeding|}}}{{{assuming|}}}|-elect}} of the <span style="display: inline-block;">[[{{{state_legislature}}} Legislature]]</span><br />from the {{{district}}} district }} }} | header8 = {{#if:{{{ambassador_from|}}}{{{minister_from|}}}|| {{#if:{{{order|}}} |{{{order}}}{{#if:{{{office|}}} |&#32;[[{{{office}}}]]}}{{#if:{{{state|}}} |&#32;[[{{{state}}}]]}}{{#if:{{{title|}}} |&#32;{{{title}}}}} |{{{office|}}} }} }} | header9 = {{#if:{{{ambassador_from|}}}{{{minister_from|}}}|| {{#if:{{{order|}}} ||{{{title|}}} }} }} <!--------Ambassador---------> | header10 = {{#if:{{both|{{{ambassador_from|}}}{{{minister_from|}}}|{{{country|}}}}} |{{#if:{{{order|}}}|{{{order}}}}} {{#if:{{{minister_from|}}} |[[{{{minister_from}}} Ambassador to {{CountryPrefixThe|{{{country}}}}}|{{{minister_from}}} Minister to <span class="nowrap">{{CountryPrefixThe|{{{country}}}}}</span>]] |[[{{{ambassador_from}}} Ambassador to {{CountryPrefixThe|{{{country}}}}}|{{{ambassador_from}}} Ambassador to <span class="nowrap">{{CountryPrefixThe|{{{country}}}}}</span>]] }} [[Kategori:Pages using infobox officeholder with ambassador from or minister from]] }} <!--------MP---------> | header11 = {{#if:{{{constituency_AM|}}}{{{constituency_MP|}}}| {{#switch:{{{parliament|}}} |Australian = Member of the <span style="display: inline-block;">[[Australian House of Representatives|Australian Parliament]]</span> |European = [[Member of the European&nbsp;Parliament]] |Scottish = [[Member of the Scottish&nbsp;Parliament]] |Sri Lanka|Sri Lankan = [[Member of Parliament (Sri Lanka)|Member of Parliament]] |United Kingdom|UK = [[Member of Parliament (United Kingdom)|Member of Parliament]] |#default = {{#if:{{{constituency_AM|}}}|{{#if:{{{assembly|}}}|Member of the <span style="display: inline-block;">[[{{{assembly}}} Assembly]]</span>|Assembly Member}}|Member of {{#if:{{{parliament|}}}|the <span style="display: inline-block;">[[{{{parliament}}} Parliament]]</span>|Parliament}}}}}}<br />for {{#ifeq:{{Title disambig text|{{{constituency_MP|}}}}}|UK Parliament constituency |{{{constituency_MP|}}} |{{#if:{{#switch:{{{parliament|}}} |United Kingdom|UK| = {{Linkless exists|{{delink|{{{constituency_MP|}}}}} (UK Parliament constituency)}} }} |{{#if:{{Constlk|{{delink|{{{constituency_MP|}}}}}}} |{{Constlk|{{delink|{{{constituency_MP|}}}}}}} |{{{constituency_{{#if:{{{constituency_AM|}}}|AM|MP}}}}}}} |{{{constituency_{{#if:{{{constituency_AM|}}}|AM|MP}}}}}}} }}{{#if:{{{prior_term|}}}| <div style="font-weight:normal;">{{{prior_term}}}</div>}} }} | header12 = {{#if:{{{riding|}}}|{{#if:{{{constituency_AM|}}}|{{#if:{{{assembly|}}}|Member of the <span style="display: inline-block;">[[{{{assembly}}} Assembly]]</span>|Assembly Member}}| {{#switch:{{{parliament|}}} |Canadian = [[Member of Parliament (Canada)|Member of Parliament]] |#default = Member of {{#if:{{{parliament|}}}|the <span style="display: inline-block;">[[{{{parliament}}} Parliament]]</span>|Parliament}}}}}}<br />for {{{riding}}} }} <!--------Majority Leader (State Senate)---------> | header13 = {{#if:{{{majority_leader|}}}|{{{majority_leader}}} {{#if:{{{state_senate|}}}|[[Majority Leader of the {{{state_senate}}} Senate]]|[[United States Senate Majority Leader]]}} }} <!--------Majority Floor Leader (State Senate)---------> | header14 = {{#if:{{{majority_floor_leader|}}}|{{{majority_floor_leader}}} [[Majority Floor Leader of the {{{state_senate}}} Senate]] }} <!--------Minority Leader (State Senate)---------> | header15 = {{#if:{{{minority_leader|}}}|{{{minority_leader}}} [[Minority Leader of the {{{state_senate}}} Senate]] }} <!--------Minority Floor Leader (State Senate)---------> | header16 = {{#if:{{{minority_floor_leader|}}}|{{{minority_floor_leader}}} [[Minority Floor Leader of the {{{state_senate}}} Senate]] }} <!--------Congressman---------> | header17 = {{#if:{{{state_legislature|}}}{{{state_senate|}}}{{{jr/sr|}}}{{{jr/sr and state|}}}|| {{#if:{{#if:{{{state|}}}|{{{constituency|}}}}}{{{district|}}}{{{state_house|}}}|{{#if:{{{state_assembly|}}} |Member{{#if:{{{succeeding|}}}{{{assuming|}}}|-elect}} of the <span style="display: inline-block;">[[{{{state_assembly|}}} {{#ifeq:{{{state_assembly|}}}|Nevada||{{#ifeq:{{{state_assembly|}}}|New Jersey|General|State}}}} Assembly]]</span><br />from the |Member{{#if:{{{succeeding|}}}{{{assuming|}}}|-elect}} of the <span style="display: inline-block;">[[{{#if:{{{state_house|}}} |{{{state_house}}}|{{#if:{{{state_delegate|}}}|{{{state_delegate}}}|United States }}}} {{#if:{{{state_delegate|}}}|House of Delegates|House of Representatives}}|{{#if:{{{state_house|}}} |{{{state_house}}}|{{#if:{{{state_delegate|}}}|{{{state_delegate}}}|U.S.}}}}&#32;{{#if:{{{state_delegate|}}}|House&#32;of&#32;Delegates|{{#if:{{{state_house|}}}| }}House&#32;of&#32;Representatives}}]]</span>{{#if:{{{district|}}}{{{state|}}}{{{state_delegate|}}}{{{state_house|}}}|<br />from {{#if:{{{state_delegate|}}}|the |{{#if:{{{state_house|}}}|{{#if:{{{district|}}}|the|{{{state|}}}}}|{{{state|}}}{{#if:{{{district|}}}|'s}}}}}} }}}} {{#if:{{{district|}}}|{{{district}}} district|{{#if:{{{state_house|}}}|{{{constituency|}}}}}}}{{#if:{{{prior_term|}}}| <br />{{{prior_term}}}}} }} }} <!--------Convocation---------> | header18 = {{#if:{{{convocation|}}}|{{{convocation}}}}} <!--------Term---------> | data19 = {{#if:{{{termend|}}}{{{succeeding|}}}{{{assuming|}}}| {{#if:{{{status|}}} | <div style="width:100%; margin:0; background-color: {{{color|lavender}}}">'''{{{status}}}'''</div>|}}| }} | data20 = {{#if:{{{nominee|}}}{{{candidate|}}}|| {{#if:{{{succeeding|}}}{{{assuming|}}} | <span class="nowrap">'''Assuming office'''</span><br />{{{termstart}}}{{#if:{{{term|}}}{{{termend|}}}|[[Kategori:Pages using infobox officeholder with succeeding and term or termend]]}} | {{#if: {{{term|}}} | <span class="nowrap">'''{{{termlabel|In office}}}'''</span><br />{{{term}}} }} }} }} | data21 = {{#if:{{{nominee|}}}{{{candidate|}}}|| {{#if:{{{succeeding|}}}{{{assuming|}}} | |{{#if:{{{termstart|}}} | {{#if:{{{termend|}}} |<!--then: term has start and end:--><span class="nowrap">'''{{{termlabel|In office}}}'''</span><br />{{en dash range|{{{termstart}}}|{{{termend}}}}}{{#if:{{{alongside|}}}{{{co-leader|}}}|<div style="line-height:normal; padding-top:0.2em; padding-bottom:0.1em">{{#if:{{{alongside|}}}|Serving|Co-leading}}&#32;with&#32;{{#if:{{{alongside|}}}|{{{alongside}}}|{{{co-leader}}}}}</div>}} |{{#if:{{{status|}}}|<div style="width:100%; margin:0; background-color: {{{color|lavender}}}">'''{{{status}}}'''</div>|<!--else: term is ongoing--><div style="width:100%; margin:0; background-color: {{{color|lavender}}}">'''[[Incumbent]]'''</div>}} }} }} }} }} | data22 = {{#if:{{{nominee|}}}{{{candidate|}}}|| {{#if:{{{succeeding|}}}{{{assuming|}}} | |{{#if:{{{termstart|}}} |{{#if:{{{termend|}}} |<!--then nothing else; term has ended--> |<!--else term is ongoing:--><span class="nowrap">'''{{#if:{{{termlabel|}}}|{{str rep|1={{{termlabel}}}|2=In office|3=Assumed office}}|Assumed office}}'''</span>&#32;<br />{{{termstart}}}{{#if:{{{alongside|}}}{{{co-leader|}}}|<div style="line-height:normal; padding-top:0.2em; padding-bottom:0.1em">{{#if:{{{alongside|}}}|Serving|Co-leader}}&#32;with&#32;{{#if:{{{alongside|}}}|{{{alongside}}}|{{{co-leader}}}}}</div>}} }} }} }} }} }} }}<!-- end infobox1 / start infobox2 -->{{#if:{{{monarch|}}}{{{president|}}}{{{governor-general|}}}{{{governor_general|}}}{{{primeminister|}}}{{{chancellor|}}}{{{minister|}}}{{{taoiseach|}}}{{{firstminister|}}}{{{chiefminister|}}}{{{premier|}}}{{{governor|}}}{{{lieutenant_governor|}}}{{{vicepresident|}}}{{{vicegovernor|}}}{{{viceprimeminister|}}}{{{vicepremier|}}}{{{deputy|}}}{{{leader|}}}{{{lieutenant|}}}{{{nominator|}}}{{{appointer|}}}{{{opponent|}}}{{{incumbent|}}}{{{succeeding|}}}{{{assuming|}}}{{{preceding|}}}{{{predecessor|}}}{{{preceded|}}}{{{successor|}}}{{{succeeded|}}}{{{parliamentarygroup|}}}{{{constituency|}}}{{{majority|}}}{{{suboffice|}}}{{{1namedata|}}}{{{2namedata|}}}{{{3namedata|}}}{{{4namedata|}}}{{{5namedata|}}}{{{runningmate|}}}| {{#invoke:Infobox|infoboxTemplate|child=yes | labelstyle = text-align:left | label1 = <span class="nowrap">Nominated by</span> | data1 = {{{nominator|}}} | label2 = <span class="nowrap">Appointed by</span> | data2 = {{{appointer|}}} <!--------President, Prime Minister, Governor---------> | label3 = Monarch{{#if:{{detect singular|{{{monarch|}}}}}||s}} | data3 = {{{monarch|}}} | label4 = President | data4 = {{{president|}}} | label5 = {{#if:{{{governor_general|}}}|Governor{{#if:{{detect singular|{{{governor_general}}}}}||s}} General|Governor{{#if:{{detect singular|{{{governor-general}}}}}||s}}-General}} | data5 = {{#if:{{{governor_general|}}}|{{{governor_general}}}|{{{governor-general|}}}}} | label6 = <span class="nowrap">Prime Minister</span> | data6 = {{{primeminister|}}} | label7 = Chancellor | data7 = {{{chancellor|}}} | label8 = Minister | data8 = {{{minister|}}} | label9 = Taoiseach | data9 = {{{taoiseach|}}} | label10 = <span class="nowrap">First Minister</span> | data10 = {{{firstminister|}}} | label11 = <span class="nowrap">Chief Minister</span> | data11 = {{{chiefminister|}}} | label12 = Premier | data12 = {{{premier|}}} | label13 = Governor | data13 = {{{governor|}}} | label14 = Lieutenant Governor | data14 = {{{lieutenant_governor|}}} <!--------Vice president/s, Vice Prime Minister/s, Deputy/ies, Lieutenant/s---------> | label15 = <span class="nowrap">{{#if:{{{office|}}}|{{#ifeq:{{isValidPageName|Vice {{{office}}}}}|valid|[[Vice {{{office}}}|Vice President]]|Vice President}}|Vice President}}</span> | data15 = {{{vicepresident|}}} | label16 = <span class="nowrap">{{#if:{{{office|}}}|{{#ifeq:{{isValidPageName|Vice {{{office}}}}}|valid|[[Vice {{{office}}}|Vice Governor]]|Vice Governor}}|Vice Governor}}</span> | data16 = {{{vicegovernor|}}} | label17 = <span class="nowrap">{{#if:{{{office|}}}|[[Vice {{{office}}}|Vice PM]]|Vice [[Prime Minister|PM]]}}</span> | data17 = {{{viceprimeminister|}}} | label18 = <span class="nowrap">{{#if:{{{office|}}}|{{#ifeq:{{isValidPageName|Vice {{{office}}}}}|valid|[[Vice {{{office}}}|Vice Premier]]|Vice Premier}}|Vice Premier}}</span> | data18 = {{{vicepremier|}}} | label19 = {{#if:{{{office|}}}|{{#ifeq:{{isValidPageName|Deputy {{{office}}}}}|valid|[[Deputy {{{office}}}|Deputy]]|Deputy}}|Deputy}} | data19 = {{{deputy|}}} | label20 = Leader | data20 = {{{leader|}}} | label21 = {{#if:{{{office|}}}|[[Lieutenant {{{office}}}|Lieutenant]]|Lieutenant}} | data21 = {{{lieutenant|}}} | label22 = {{nowrap|{{{subterm|}}}}} | data22 = {{{suboffice|}}} <!--------Blank fields---------> | label23 = {{{1blankname|}}} | data23 = {{{1namedata|}}} | label24 = {{{2blankname|}}} | data24 = {{{2namedata|}}} | label25 = {{{3blankname|}}} | data25 = {{{3namedata|}}} | label26 = {{{4blankname|}}} | data26 = {{{4namedata|}}} | label27 = {{{5blankname|}}} | data27 = {{{5namedata|}}} <!--------Predecessor/successor---------> | label28 = <span class="nowrap">Running mate</span> | data28 = {{{runningmate|}}} | label29 = Opponent{{Pluralize from text|{{{opponent|}}}|likely=(s)|plural=s}} | data29 = {{{opponent|}}} | label30 = Incumbent | data30 = {{{incumbent|}}} | label31 = {{#if:{{{succeeding|}}}|Succeeding|Preceding}} | data31 = {{#if:{{{succeeding|}}}|{{{succeeding|}}}|{{{preceding|}}}}} | label32 = <span class="nowrap">Preceded by</span> | data32 = {{#if:{{{succeeding|}}}||{{#if:{{{predecessor|}}}|{{{predecessor}}}|{{{preceded|}}}}}}} | label33 = <span class="nowrap">Succeeded by</span> | data33 = {{#if:{{{succeeding|}}}||{{#switch:{{#if:{{{successor|}}}|{{{successor}}}|{{{succeeded|}}}}} | Incumbent | '''Incumbent''' | ''Incumbent'' | [[Incumbent]] | incumbent | '''incumbent''' | ''incumbent'' | [[incumbent]] = | #default = {{#if:{{{successor|}}}|{{{successor}}}|{{{succeeded|}}}}} }}}} <!--------Constituency/Majority---------> | label34 = [[Parliamentary group]] | data34 = {{{parliamentarygroup|}}} | label35 = Constituency | data35 = {{#if:{{{state_house|}}}||{{{constituency|}}}}} | label36 = Majority | data36 = {{{majority|}}} }} }}<noinclude>{{documentation}}</noinclude> d1hymk0mr1q54afk2jih9n355qrymvt Templat:Infobox pageant titleholder 10 128 303 302 2024-08-09T09:19:53Z Jon Harald Søby 58 1 semakan diimportkan 302 wikitext text/x-wiki {{#invoke:Template wrapper|wrap|_template=Infobox person | _alias-map=photo:image,domestic partner:partner,module:module2 | _exclude=title,years_active,years active,haircolour,hair_colour,haircolor,hair_color, eyecolour,eye_colour,eyecolor,eye_color,agency,films,competitions,nationalcompetition | template_name=infobox pageant titleholder | name = <includeonly>{{PAGENAMEBASE}}</includeonly> | module = {{#if:{{{title|}}}{{{years_active|}}}{{{years active|}}}{{{haircolour|}}}{{{hair_colour|}}}{{{haircolor|}}}{{{hair_color|}}}{{{eyecolour|}}}{{{eye_colour|}}}{{{eyecolor|}}}{{{eye_color|}}}{{{agency|}}}{{{films|}}}{{{competitions|}}}{{{nationalcompetition|}}} |{{Infobox|child=yes|decat=yes | title = '''<span class="role">[[Beauty pageant]]</span> titleholder''' | label1 = Title | data1 = {{{title|}}} | label2 = No. of films | data2 = {{{films|}}} | label3 = Agency | data3 = {{{agency|}}} | class3 = agent | label4 = Years active | data4 = {{If empty|{{{years_active|}}}|{{{years active|}}}}} | label5 = Hair colo{{#if:{{{haircolour|}}}{{{hair_colour|}}}|u}}r | data5 = {{If empty|{{{haircolour|}}}|{{{hair_colour|}}}|{{{haircolor|}}}|{{{hair_color|}}}}} | label6 = Eye colo{{#if:{{{eyecolour|{{{eye_colour|}}}}}}|u}}r | data6 = {{If empty|{{{eyecolour|}}}|{{{eye_colour|}}}|{{{eyecolor|}}}|{{{eye_color|}}}}} | label7 = <span class="nowrap">Major<br />competition(s)</span> | data7 = {{If empty|{{{competitions|}}}|{{{nationalcompetition|}}}}} }}}} }}{{#invoke:Check for clobbered parameters|check |template=[[Templat:Infobox pageant titleholder]] |cat={{Main other|[[Kategori:Pages using infobox pageant titleholder with conflicting parameters]]}} |photo;image |domestic partner;partner |module;module2 |years_active;years active |haircolour;hair_colour;haircolor;hair_color |eyecolour;eye_colour;eyecolor;eye_color |competitions;nationalcompetition}}<noinclude> {{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS --> </noinclude> g2qjy9nc2jez82spgl0zhs8xtynxjnx Templat:Infobox person 10 129 312 311 2024-08-09T09:19:54Z Jon Harald Søby 58 8 semakan diimportkan 311 wikitext text/x-wiki {{Infobox|child={{{child|{{{embed|}}}}}} | bodyclass = biography vcard | above = {{Br separated entries | 1 = {{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal; display:inline;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}</div>}} | 2 = <div class="fn" style="display:inline">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}</div> | 3 = {{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal; display:inline;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}</div>}} }} | abovestyle = {{{abovestyle|}}} | subheaderstyle = font-size:125%; font-weight:bold; | subheader = {{#switch:{{{child|{{{embed|}}}}}}|yes=<!--empty when this infobox is embedded-->|#default={{#if:{{{native_name|}}}|<div class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}} }} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|300|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}}x200px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}} | label2 = Taatan | data2 = {{{pronunciation|}}} | label10 = Penenakan | data10 = {{Br separated entries|1={{#if:{{{birth_name|{{{birthname|}}}}}}|<div style="display:inline" class="nickname">{{{birth_name|{{{birthname|}}}}}}</div>}}|2={{{birth_date|}}}|3={{#if:{{{birth_place|}}}|<div style="display:inline" class="birthplace">{{{birth_place|}}}</div>}}}} | label11 = Binapti{{#if:{{{baptized|}}}|s|s}} | data11 = {{#if:{{{birth_date|}}}||{{{baptized|{{{baptised|}}}}}}}} | label12 = Disappeared | data12 = {{Br separated entries|1={{{disappeared_date|}}}|2={{{disappeared_place|}}}}} | label13 = Status | data13 = {{{status|{{{disappeared_status|}}}}}} | label14 = Ngemban | data14 = {{Br separated entries|1={{{death_date|}}}|2={{#if:{{{death_place|}}}|<div style="display:inline" class="deathplace">{{{death_place|}}}</div>}}}} | label15 = Punsa'&nbsp;ngemban | data15 = {{{death cause|{{{death_cause|}}}}}} | label16 = Body discovered | data16 = {{{body discovered|{{{body_discovered|}}}}}} | label17 = {{#if:{{{burial_place|}}}|Burial place|Resting place}} | data17 = {{#if:{{{burial_place|}}}|{{Br separated entries|1={{{burial_place|}}}|2={{{burial_coordinates|}}}}}|{{Br separated entries|1={{{resting place|{{{resting_place|{{{restingplace|}}}}}}}}}|2={{{resting place coordinates|{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}}}}}}}} | class17 = label | label18 = Monuments | data18 = {{{monuments|}}} <!-- removed per discussion at https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_person&oldid=932429196#Residence_parameter | label19 = Residence | data19 = {{{residence|}}} | class19 = {{#if:{{{death_date|}}}{{{death_place|}}}||label}} --> | label20 = Nationality | data20 = {{{nationality|}}} | class20 = category | label21 = Oron&nbsp;lain | data21 = {{{other names|{{{other_names|{{{othername|{{{nickname|{{{alias|}}}}}}}}}}}}}}} | class21 = nickname | label22 = Siglum | data22 = {{{siglum|}}} | label23 = Citizenship | data23 = {{{citizenship|}}} | class23 = category | label24 = Education | data24 = {{{education|}}} | label25 = Alma&nbsp;mater | data25 = {{{alma mater|{{{alma_mater|}}}}}} | label26 = Kerejoon | data26 = {{{occupation|}}} | class26 = role | label27 = Taun&nbsp;iktip | data27 = {{{years active|{{{years_active|{{{yearsactive|}}}}}}}}} | label28 = Jaman | data28 = {{{era|}}} | class28 = category | label29 = Employer | data29 = {{{employer|}}} | class29 = org | label30 = {{#if:{{{organisation|}}}|Organisation|Organization}} | data30 = {{{organisation|{{{organization|{{{organizations|}}}}}}}}} | class30 = org | label31 = Agent | data31 = {{{agent|}}} | class31 = agent | label32 = Tekilo&nbsp;ko' | data32 = {{{known for|{{{known_for|{{{known|}}}}}}}}} | label33 = <div style="white-space:nowrap;">{{#if:{{{works|}}}|Works|{{#if:{{{credits|}}}|Notable credit(s)|{{#if:{{{label_name|}}}|Label(s)|Notable work}}}}}}</div> | data33 = {{#if:{{{works|}}}|{{{works|}}}|{{#if:{{{credits|}}}|{{{credits}}}|{{#if:{{{label_name|}}}|{{{label_name}}}|{{{notable works|{{{notable_works|}}}}}}}}}}}} | label34 = Style | data34 = {{{style|}}} | class34 = category | label39 = Net&nbsp;worth | data39 = {{{net worth|{{{net_worth|{{{networth|}}}}}}}}} | label40 = Langa | data40 = {{#if:{{{height_m|{{{height_cm|}}}}}}{{{height_ft|}}}{{{height_in|}}} | {{convinfobox|{{{height_m|{{{height_cm|}}}}}}|{{#if:{{{height_m|}}}|m|cm}}|{{{height_ft|}}}|ft|{{{height_in|}}}|in}}}}{{#if:{{{height|}}} | {{infobox person/height|{{{height|}}}}}}} | label42 = Television | data42 = {{{television|}}} | label43 = {{#if:{{{office|}}}|Office|Title}} | data43 = {{{office|{{{title|}}}}}} | class43 = title | label44 = Term | data44 = {{{term|}}} | label45 = Predecessor | data45 = {{{predecessor|}}} | label46 = Successor | data46 = {{{successor|}}} | label47 = Political party | data47 = {{{party|}}} | class47 = org | label48 = Movement | data48 = {{{movement|}}} | class48 = category | label49 = <span class="nowrap">Opponent(s)</span> | data49 = {{{opponents|}}} | label50 = Board member&nbsp;of | data50 = {{{boards|}}} | label51 = Criminal charge(s) | data51 = {{{criminal_charges|{{{criminal charge|{{{criminal_charge|}}}}}}}}} | label52 = Criminal penalty | data52 = {{{criminal penalty|{{{criminal_penalty|}}}}}} | label53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}}|Judicial status|Criminal status}} | data53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}} | {{{judicial status|{{{judicial_status}}}}}} | {{{criminal status|{{{criminal_status|}}}}}}}} | class53 = category | label54 = <span class="nowrap">Spouse(s)</span> | data54 = {{{spouse|{{{spouses|{{{spouse(s)|}}}}}}}}} | label55 = <span class="nowrap">Partner(s)</span> | data55 = {{{partner|{{{domesticpartner|{{{domestic_partner|{{{partners|{{{partner(s)|}}}}}}}}}}}}}}} | label56 = Peranak | data56 = {{{children|}}} | label57 = Beliau | data57 = {{#if:{{{parents|}}}|{{{parents}}}|{{Unbulleted list|{{#if:{{{father|}}}|{{{father}}} (emma')}}|{{#if:{{{mother|}}}|{{{mother}}} (iyang)}}}}}} | label58 = Denakan | data58 = {{{relations|{{{relatives|}}}}}} | label59 = Keluarga | data59 = {{{family|}}} | label60 = Call sign | data60 = {{{callsign|}}} | label61 = Awards | data61 = {{{awards|}}} | label62 = {{#if:{{{honours|}}}|Honours|Honors}} | data62 = {{{honours|{{{honors|}}}}}} | data64 = {{{misc|{{{module|}}}}}} | data65 = {{{misc2|{{{module2|}}}}}} | data66 = {{{misc3|{{{module3|}}}}}} | data67 = {{{misc4|{{{module4|}}}}}} | data68 = {{{misc5|{{{module5|}}}}}} | data69 = {{{misc6|{{{module6|}}}}}} | label70 = Website | data70 = {{{website|{{{homepage|{{{URL|{{{url|}}}}}}}}}}}} | header71 = {{#if:{{{signature|}}}|Signature}} | data72 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|sizedefault=150px|alt={{{signature alt|{{{signature_alt|}}}}}}}} | header73 = {{#if:{{{footnotes|}}}|Notes}} | data74 = {{#if:{{{footnotes|}}}|<div style="text-align: left;">{{{footnotes}}}</div>}} }}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox person with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Templat:Infobox person]] with unknown parameter "_VALUE_"|ignoreblank=y | abovestyle | agent | alias | alma mater | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | birthname | boards | body discovered | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal charge | criminal penalty | criminal status | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death cause | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | honors | honours | image | image caption | image size | image_caption | image_size | image_upright | imagesize | judicial status | judicial_status | known | known for | known_for | label_name | landscape | misc | misc2 | misc3 | misc4 | misc5 | misc6 | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | nationality | native_name | native_name_lang | net worth | net_worth | networth | nickname | nocat_wdimage | notable works | notable_works | occupation | office | opponents | organisation | organization | organizations | other names | other_names | othername | parents | partner | partner | partner(s) | party | predecessor | pre-nominals | post-nominals | pronunciation | relations | relatives | resting place | resting place coordinates | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | siglum | signature | signature alt | signature_alt | signature_size | spouse | spouses | spouse(s) | status | style | successor | television | term | title | URL | url | website | works | years active | years_active | yearsactive | home_town}}<!-- -->{{#invoke:Check for deprecated parameters|check |category=[[Kategori:Pages using Infobox person with deprecated parameter _VALUE_|_VALUE_]] |ignoreblank=yes | home_town = }}<!-- -->{{Main other| {{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|[[Kategori:Infobox person using numbered parameter]]}}<!-- -->{{#if:{{{box_width|}}}|[[Kategori:Infobox person using boxwidth parameter]]}}<!-- -->{{#if:{{{death_date|}}}{{{death_place|}}}|{{#if:{{{net worth|{{{net_worth|{{{networth|}}}}}}}}}|[[Kategori:Infobox person using certain parameters when dead]]}}}}<!-- -->{{#if:{{{influences|}}}{{{influenced|}}}|[[Kategori:Infobox person using influence]]}}<!-- -->{{#if:{{{ethnicity|}}}|[[Kategori:Infobox person using ethnicity]]}}<!-- -->{{#if:{{{religion|}}}|[[Kategori:Infobox person using religion]]}}<!-- -->{{#if:{{{denomination|}}}|[[Kategori:Infobox person using denomination]]}}<!-- -->{{#if:{{{residence|}}}|[[Kategori:Infobox person using residence]]}}<!-- -->{{#if:{{{home_town|}}}|[[Kategori:Infobox person using home town]]}}<!-- -->{{#if:{{{pronunciation|}}}|[[Kategori:Biography template using pronunciation]]}}<!-- -->{{#if:{{{signature|}}}|[[Kategori:Biography with signature]]}}<!-- -->[[Kategori:Articles with hCards]] }}<!-- -->{{#invoke:Check for clobbered parameters|check | nested = 1 | template = Infobox person | cat = {{main other|Category:Pages using infobox person with conflicting parameters}} | child = embed | honorific prefix; honorific_prefix; honorific-prefix; pre-nominals | honorific suffix; honorific_suffix; honorific-suffix; post-nominals | image size; image_size; imagesize | image caption; caption; image_caption | birth_name; birthname | baptized; baptised | status; disappeared_status | death cause; death_cause | body discovered; body_discovered | resting place; resting_place; restingplace | resting place coordinates; resting_place_coordinates; restingplacecoordinates | other names; other_names; othername; nickname; alias | alma mater; alma_mater | years active; years_active; yearsactive | organisation; organization; organizations | known for= known_for; known | {{#if:{{{works|}}}|works;}} {{#if:{{{credits|}}}|credits;}} {{#if:{{{label_name|}}}|label_name;}} notable works; notable_works | net worth; net_worth; networth | height_m; height_cm | office; title | criminal_charges; criminal charge; criminal_charge | criminal penalty; criminal_penalty | judicial status; judicial_status | criminal status; criminal_status | spouse; spouses; spouse(s) | partner; domesticpartner; domestic_partner; partners; partner(s) | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{father|}}}||NULL_}}father | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{mother|}}}||NULL_}}mother | relations; relatives | honours; honors | misc; module | misc2; module2 | misc3; module3 | misc4; module4 | misc5; module5 | misc6; module6 | website; homepage; URL; url }}<includeonly>{{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}}}}}}</includeonly><noinclude> {{documentation}}</noinclude> aab460coo6a1qtkjrhd5vic6uydgpz6 Templat:Infobox political division 10 130 314 313 2024-08-09T09:19:54Z Jon Harald Søby 58 1 semakan diimportkan 313 wikitext text/x-wiki <includeonly>{{main other|{{#invoke:Settlement short description|main}}|}}{{Infobox | child = {{yesno|{{{embed|}}}}} | templatestyles = Template:Infobox political division/styles.css | bodyclass = ib-pol-div vcard | {{#ifeq:{{yesno|{{{embed|}}}}}|yes|title|above}} = {{#ifeq:{{yesno|{{{embed|}}}}}|yes| |<div class="fn org">{{if empty|{{{name|}}}|{{{official_name|}}}|{{PAGENAMEBASE}}}}</div> }}{{#if:{{{native_name|}}}|<div class="ib-pol-div-native nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}}{{#if:{{{other_name|}}}|<div class="ib-pol-div-other nickname">{{{other_name}}}</div>}} <!--** names, type, and transliterations ** --> | subheader = {{#if:{{both|{{if empty|{{{name|}}}|{{{official_name|}}}|{{PAGENAMEBASE}}}}{{#ifeq:{{yesno|{{{embed|}}}}}|yes|1}}|{{{settlement_type|{{{type|}}}}}}}}|<div class="category">{{{settlement_type|{{{type}}}}}}</div>}} | rowclass1 = mergedtoprow ib-pol-div-official-below | data1 = {{#if:{{{name|}}}|{{{official_name|}}}}} <!-- ***Transliteration language 1*** --> | rowclass2 = mergedtoprow | header2 = {{#if:{{{translit_lang1|}}}|{{{translit_lang1}}}&nbsp;transcription(s)}} | rowclass3 = {{#if:{{{translit_lang1_type1|}}}|mergedrow|mergedbottomrow}} | label3 = &nbsp;•&nbsp;{{{translit_lang1_type}}} | data3 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type|}}}|{{{translit_lang1_info|}}}}}}} | rowclass4 = {{#if:{{{translit_lang1_type2|}}}|mergedrow|mergedbottomrow}} | label4 = &nbsp;•&nbsp;{{{translit_lang1_type1}}} | data4 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type1|}}}|{{{translit_lang1_info1|}}}}}}} | rowclass5 = {{#if:{{{translit_lang1_type3|}}}|mergedrow|mergedbottomrow}} | label5 =&nbsp;•&nbsp;{{{translit_lang1_type2}}} | data5 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type2|}}}|{{{translit_lang1_info2|}}}}}}} | rowclass6 = {{#if:{{{translit_lang1_type4|}}}|mergedrow|mergedbottomrow}} | label6 = &nbsp;•&nbsp;{{{translit_lang1_type3}}} | data6 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type3|}}}|{{{translit_lang1_info3|}}}}}}} | rowclass7 = {{#if:{{{translit_lang1_type5|}}}|mergedrow|mergedbottomrow}} | label7 = &nbsp;•&nbsp;{{{translit_lang1_type4}}} | data7 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type4|}}}|{{{translit_lang1_info4|}}}}}}} | rowclass8 = {{#if:{{{translit_lang1_type6|}}}|mergedrow|mergedbottomrow}} | label8 = &nbsp;•&nbsp;{{{translit_lang1_type5}}} | data8 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type5|}}}|{{{translit_lang1_info5|}}}}}}} | rowclass9 = mergedbottomrow | label9 = &nbsp;•&nbsp;{{{translit_lang1_type6}}} | data9 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type6|}}}|{{{translit_lang1_info6|}}}}}}} <!-- ***Transliteration language 2*** --> | rowclass10 = mergedtoprow | header10 = {{#if:{{{translit_lang2|}}}|{{{translit_lang2}}}&nbsp;transcription(s)}} | rowclass11 = {{#if:{{{translit_lang2_type1|}}}|mergedrow|mergedbottomrow}} | label11 = &nbsp;•&nbsp;{{{translit_lang2_type}}} | data11 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type|}}}|{{{translit_lang2_info|}}}}}}} | rowclass12 = {{#if:{{{translit_lang2_type2|}}}|mergedrow|mergedbottomrow}} | label12 = &nbsp;•&nbsp;{{{translit_lang2_type1}}} | data12 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type1|}}}|{{{translit_lang2_info1|}}}}}}} | rowclass13 = {{#if:{{{translit_lang2_type3|}}}|mergedrow|mergedbottomrow}} | label13 =&nbsp;•&nbsp;{{{translit_lang2_type2}}} | data13 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type2|}}}|{{{translit_lang2_info2|}}}}}}} | rowclass14 = {{#if:{{{translit_lang2_type4|}}}|mergedrow|mergedbottomrow}} | label14 = &nbsp;•&nbsp;{{{translit_lang2_type3}}} | data14 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type3|}}}|{{{translit_lang2_info3|}}}}}}} | rowclass15 = {{#if:{{{translit_lang2_type5|}}}|mergedrow|mergedbottomrow}} | label15 = &nbsp;•&nbsp;{{{translit_lang2_type4}}} | data15 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type4|}}}|{{{translit_lang2_info4|}}}}}}} | rowclass16 = {{#if:{{{translit_lang2_type6|}}}|mergedrow|mergedbottomrow}} | label16 = &nbsp;•&nbsp;{{{translit_lang2_type5}}} | data16 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type5|}}}|{{{translit_lang2_info5|}}}}}}} | rowclass17 = mergedbottomrow | label17 = &nbsp;•&nbsp;{{{translit_lang2_type6}}} | data17 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type6|}}}|{{{translit_lang2_info6|}}}}}}} <!-- end ** names, type, and transliterations ** --> <!-- ***Skyline Image*** --> | rowclass18 = mergedtoprow | data18 = {{#if:{{{image_skyline|}}}{{{image|}}}|<!-- -->{{#invoke:InfoboxImage|InfoboxImage<!-- -->|image={{if empty|{{{image_skyline|}}}|{{{image|}}}}}<!-- -->|size={{if empty|{{{image_size|}}}|{{{imagesize|}}}}}|sizedefault=250px<!-- -->|alt={{if empty|{{{image_alt|}}}|{{{alt|}}}}}<!-- -->|title={{if empty|{{{image_caption|}}}|{{{caption|}}}|{{{image_alt|}}}|{{{alt|}}}}}}}<!-- -->{{#if:{{{image_caption|}}}{{{caption|}}}|<div class="ib-pol-div-caption">{{if empty|{{{image_caption|}}}|{{{caption|}}}}}</div>}} }} <!-- ***Flag, Seal, Shield and Coat of arms*** --> | rowclass19 = mergedtoprow | class19 = maptable | data19 = {{#if:{{{image_flag|}}}{{{image_seal|}}}{{{image_shield|}}}{{{image_blank_emblem|}}}{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}} |{{Infobox settlement/columns | 1 = {{#if:{{{image_flag|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_flag}}}|size={{{flag_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100px}}|border={{yesno |{{{flag_border|}}}|yes=yes|blank=yes}}|alt={{{flag_alt|}}}|title=Flag of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<br />{{Infobox settlement/link|type={{#if:{{{flag_type|}}}|{{{flag_type}}}|Flag}}|link={{{flag_link|}}}|name={{{official_name}}}}}}} | 2 = {{#if:{{{image_seal|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_seal|}}}|size={{{seal_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100px}}|alt={{{seal_alt|}}}|title=Official seal of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<br />{{Infobox settlement/link|type={{#if:{{{seal_type|}}}|{{{seal_type}}}|Seal}}|link={{{seal_link|}}}|name={{{official_name}}}}}}} | 3 = {{#if:{{{image_shield|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_shield|}}}||size={{{shield_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100px}}|alt={{{shield_alt|}}}|title=Coat of arms of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<br />{{Infobox settlement/link|type=Coat of arms|link={{{shield_link|}}}|name={{{official_name}}}}}}} | 4 = {{#if:{{{image_blank_emblem|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_blank_emblem|}}}|size={{{blank_emblem_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100px}}|alt={{{blank_emblem_alt|}}}|title=Official logo of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<br />{{Infobox settlement/link|type={{#if:{{{blank_emblem_type|}}}|{{{blank_emblem_type}}}}}|link={{{blank_emblem_link|}}}|name={{{official_name}}}}}}} | 5 = {{#if:{{{image_map|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map}}}|size={{{mapsize|}}}|sizedefault=100px|alt={{{map_alt|}}}|title={{{map_caption|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption|}}}|<div class="ib-pol-div-caption">{{{map_caption}}}}}</div>}} | 0 = {{#if:{{{pushpin_map_narrow|}}}|{{#if:{{both| {{{pushpin_map|}}} | {{{coordinates|}}} }}| {{location map|{{{pushpin_map|}}} |border = infobox |alt = {{{pushpin_map_alt|}}} |caption ={{#if:{{{pushpin_map_caption_notsmall|}}}|{{{pushpin_map_caption_notsmall|}}}|{{#if:{{{pushpin_map_caption|}}}|{{{pushpin_map_caption}}}|{{#if:{{{map_caption|}}}|{{{map_caption}}}}}}}}} |float = center |width = {{#if:{{{pushpin_mapsize|}}}|{{{pushpin_mapsize}}}|150}} |default_width = 250 |relief= {{{pushpin_relief|}}} |AlternativeMap = {{{pushpin_image|}}} |overlay_image = {{{pushpin_overlay|}}} |coordinates = {{{coordinates|}}} |label = {{#ifeq: {{lc: {{{pushpin_label_position|}}} }} | none | | {{#if:{{{pushpin_label|}}}|{{{pushpin_label}}}|{{#if:{{{name|}}}|{{{name}}}|{{{official_name|}}}}}}} }} |marksize =6 |outside = {{{pushpin_outside|}}}<!-- pin is outside the map --> |position = {{{pushpin_label_position|}}} }} }} }} }} }} <!-- ***Etymology*** --> | rowclass20 = mergedtoprow | data20 = {{#if:{{{etymology|}}}|'''Etymology''': {{{etymology}}} }} <!-- ***Nickname*** --> | rowclass21 = {{#if:{{{etymology|}}}|mergedrow|mergedtoprow}} | data21 = {{#if:{{{nickname|}}}|{{#if:{{{nickname_link|}}}|[[{{{nickname_link|}}}|'''Nickname(s)''':]]|'''Nickname(s)''':}}|{{#if:{{{nicknames|}}}|{{#if:{{{nickname_link|}}}|[[{{{nickname_link|}}}|'''Nicknames''':]]|'''Nicknames''':}}}}}}{{#if:{{{nickname|}}}{{{nicknames|}}}|&nbsp;<div class="ib-pol-div-nick nickname">{{if empty|{{{nickname|}}}|{{{nicknames|}}}}}</div>}} <!-- ***Motto*** --> | rowclass22 = {{#if:{{{etymology|}}}{{{nickname|}}}{{{nicknames|}}}|mergedrow|mergedtoprow}} | data22 = {{#if:{{{motto|}}}|{{#if:{{{motto_link|}}}|[[{{{motto_link|}}}|'''Motto''':]]|'''Motto''':}}|{{#if:{{{mottoes|}}}|{{#if:{{{motto_link|}}}|[[{{{motto_link|}}}|'''Mottoes''':]]|'''Mottoes''':}}}}}}{{#if:{{{motto|}}}{{{mottoes|}}}|&nbsp;<div class="ib-pol-div-motto nickname">{{if empty|{{{motto|}}}|{{{mottoes|}}}}}</div>}} <!-- ***Anthem*** --> | rowclass23 = {{#if:{{{etymology|}}}{{{nickname|}}}{{{nicknames|}}}{{{motto|}}}{{{mottoes|}}}|mergedrow|mergedtoprow}} | data23 = {{#if:{{{anthem|}}}|{{#if:{{{anthem_link|}}}|[[{{{anthem_link|}}}|'''Anthem''':]]|'''Anthem''':}} {{{anthem}}}}} <!-- ***Song*** --> | rowclass24 = {{#if:{{{etymology|}}}{{{nickname|}}}{{{nicknames|}}}{{{motto|}}}{{{mottoes|}}}{{{anthem|}}}|mergedrow|mergedtoprow}} | data24 = {{#if:{{{song|}}}|{{#if:{{{song_type|}}}|{{{song_type}}}:|'''Song''':}} {{{song}}}}} <!-- ***Map*** --> | rowclass25 = mergedtoprow | data25 = {{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}||{{#if:{{{image_map|}}} |{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map}}}|size={{{mapsize|}}}|sizedefault=250px|alt={{{map_alt|}}}|title={{{map_caption|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption|}}}|<div class="ib-pol-div-caption">{{{map_caption}}}</div>}} }}}} | rowclass26 = mergedrow | data26 = {{#if:{{{image_map2|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map2}}}|size={{{mapsize2|}}}|sizedefault=250px|alt={{{map_alt2|}}}|title={{{map_caption2|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption2|}}}|<div class="ib-pol-div-caption">{{{map_caption2}}}</div>}} }} <!-- ***Pushpin Map*** --> | rowclass27 = mergedtoprow | data27 = {{#if:{{{pushpin_map_narrow|}}}||{{#if:{{both| {{{pushpin_map|}}} | {{{coordinates|}}} }}| {{location map|{{{pushpin_map|}}} |border = infobox |alt = {{{pushpin_map_alt|}}} |caption ={{#if:{{{pushpin_map_caption_notsmall|}}}|{{{pushpin_map_caption_notsmall|}}}|{{#if:{{{pushpin_map_caption|}}}|{{{pushpin_map_caption}}}|{{#if:{{{map_caption|}}}|{{{map_caption}}}}}}}}} |float = center |width = {{{pushpin_mapsize|}}} |default_width = 250 |relief= {{{pushpin_relief|}}} |AlternativeMap = {{{pushpin_image|}}} |overlay_image = {{{pushpin_overlay|}}} |coordinates = {{{coordinates|}}} |label = {{#ifeq: {{lc: {{{pushpin_label_position|}}} }} | none | | {{#if:{{{pushpin_label|}}}|{{{pushpin_label}}}|{{#if:{{{name|}}}|{{{name}}}|{{{official_name|}}}}}}} }} |marksize =6 |outside = {{{pushpin_outside|}}}<!-- pin is outside the map --> |position = {{{pushpin_label_position|}}} }} }} }} | rowclass28 = {{#if:{{{image_map|}}}{{{image_map2|}}}{{{pushpin_map|}}}|mergedbottomrow|mergedrow}} | label28 = {{if empty|{{{grid_name|}}}|Grid&nbsp;position}} | data28 = {{{grid_position|}}} <!-- ***Subdivisions*** --> | rowclass29 = {{#if:{{{subdivision_type1|}}}{{{subdivision_type2|}}}{{{subdivision_type3|}}}{{{subdivision_type4|}}}{{{subdivision_type5|}}}{{{subdivision_type6|}}}|mergedtoprow|}} | label29 = {{{subdivision_type}}} | data29 = {{#if:{{{subdivision_type|}}}|{{{subdivision_name|}}} }} | rowclass30 = mergedrow | label30 = {{{subdivision_type1}}} | data30 = {{#if:{{{subdivision_type1|}}}|{{{subdivision_name1|}}} }} | rowclass31 = mergedrow | label31 = {{{subdivision_type2}}} | data31 = {{#if:{{{subdivision_type2|}}}|{{{subdivision_name2|}}} }} | rowclass32 = mergedrow | label32 = {{{subdivision_type3}}} | data32 = {{#if:{{{subdivision_type3|}}}|{{{subdivision_name3|}}} }} | rowclass33 = mergedrow | label33 = {{{subdivision_type4}}} | data33 = {{#if:{{{subdivision_type4|}}}|{{{subdivision_name4|}}} }} | rowclass34 = mergedrow | label34 = {{{subdivision_type5}}} | data34 = {{#if:{{{subdivision_type5|}}}|{{{subdivision_name5|}}} }} | rowclass35 = mergedrow | label35 = {{{subdivision_type6}}} | data35 = {{#if:{{{subdivision_type6|}}}|{{{subdivision_name6|}}} }} <!--***Established*** --> | rowclass36 = {{#if:{{{established_title1|}}}{{{established_title2|}}}{{{established_title3|}}}{{{established_title4|}}}{{{established_title5|}}}{{{established_title6|}}}|mergedtoprow|}} | label36 = {{{established_title}}} | data36 = {{#if:{{{established_title|}}}|{{{established_date|}}} }} | rowclass37 = mergedrow | label37 = {{{established_title1}}} | data37 = {{#if:{{{established_title1|}}}|{{{established_date1|}}} }} | rowclass38 = mergedrow | label38 = {{{established_title2}}} | data38 = {{#if:{{{established_title2|}}}|{{{established_date2|}}} }} | rowclass39 = mergedrow | label39 = {{{established_title3}}} | data39 = {{#if:{{{established_title3|}}}|{{{established_date3|}}} }} | rowclass40 = mergedrow | label40 = {{{established_title4}}} | data40 = {{#if:{{{established_title4|}}}|{{{established_date4|}}} }} | rowclass41 = mergedrow | label41 = {{{established_title5}}} | data41 = {{#if:{{{established_title5|}}}|{{{established_date5|}}} }} | rowclass42 = mergedrow | label42 = {{{established_title6}}} | data42 = {{#if:{{{established_title6|}}}|{{{established_date6|}}} }} | rowclass43 = mergedrow | label43 = {{{established_title7}}} | data43 = {{#if:{{{established_title7|}}}|{{{established_date7|}}} }} | rowclass44 = mergedrow | label44 = {{{extinct_title}}} | data44 = {{#if:{{{extinct_title|}}}|{{{extinct_date|}}} }} | rowclass45 = mergedrow | label45 = Founded by | data45 = {{{founder|}}} | rowclass46 = mergedrow | label46 = [[Namesake|Named for]] | data46 = {{{named_for|}}} <!-- ***Seat of government and largest city*** --> | rowclass47 = {{#if:{{{admin_center|}}}{{{largest_settlement|}}}|mergedtoprow}} | label47 = {{#if:{{{capital_type|}}} | {{{capital_type}}} | Capital }}{{#ifeq: {{#ifeq:{{{largest_city|}}}{{{largest_settlement|}}}|capital |capital<!-- -->|{{#switch:{{{capital}}} | [[{{{largest_city|}}}{{{largest_settlement|}}}]] = capital | {{{largest_city|}}}{{{largest_settlement|}}} = capital | not capital }}<!-- -->}}|capital <!-- (#ifeq:)-->|<!------------------------------------------ capital is largest_city/_settlement: ------------------------------------------- --><div class="ib-pol-div-largest">and {{{largest_settlement_type|largest city}}}</div> }} | data47 = {{#if:{{{capital|}}}|{{{capital}}}{{#if:{{{coordinates|}}}|<br/>{{#invoke:Coordinates|coordinsert|{{{coordinates}}}|type:city}}}} }} | rowclass48 = {{#if:{{{capital|}}}|mergedrow}} | label48 = {{#if:{{{admin_center_type|}}}| {{{admin_center_type}}} | Administrative&nbsp;center }} | data48 = {{#switch:{{{admin_center|}}} |capital | = |[[{{{capital|}}}]] = |{{{capital|}}} = |#default = {{{admin_center}}}{{#if:{{{capital|}}}||{{#if:{{{coordinates|}}}|<br/>{{#invoke:Coordinates|coordinsert|{{{coordinates}}}|type:city}}}} }} }} | rowclass49 = {{#if:{{{capital|}}}{{{admin_center|}}}|mergedbottomrow}} | label49 = Largest {{{largest_settlement_type|city}}} | data49 = {{#ifeq: {{#ifeq:{{{largest_city|}}}{{{largest_settlement|}}}|capital |capital<!-- -->|{{#switch:{{{capital}}} | [[{{{largest_city|}}}{{{largest_settlement|}}}]] = capital | {{{largest_city|}}}{{{largest_settlement|}}} = capital | not capital }}<!-- -->}}|capital <!-- (#ifeq:)-->|<!-- nothing already appears above --> | {{if empty| {{{largest_city|}}} | {{{largest_settlement|}}} }} }} | label50 = {{#if:{{{official_languages_type|}}} | {{{official_languages_type}}} | Official languages }} | data50 = {{{official_languages|}}} | rowclass51 = mergedrow | label51 = {{nobold|1={{#if:{{{recognized_languages|}}}|Recognized|Recognised}}&nbsp;languages}} | data51 = {{if empty| {{{recognized_languages|}}} | {{{recognised_languages|}}} }} | rowclass52 = mergedrow | label52 = {{nobold|1={{#if:{{{recognized_national_languages|}}}|Recognized|Recognised}} national&nbsp;languages}} | data52 = {{if empty| {{{recognized_national_languages|}}} | {{{recognised_national_languages|}}} | {{{national_languages|}}} }} | rowclass53 = mergedrow | label53 = {{nobold|1={{#if:{{{recognized_regional_languages|}}}|Recognized|Recognised}} regional&nbsp;languages}} | data53 = {{if empty| {{{recognized_regional_languages|}}} | {{{recognised_regional_languages|}}} | {{{regional_languages|}}} }} | label54 = Common&nbsp;languages | data54 = {{{common_languages|}}} | rowclass55 = {{#ifeq:{{{languages2_sub|}}}|yes |{{#ifeq:{{{languages_sub|}}}|yes |mergedrow}} |{{#ifeq:{{{languages_sub|}}}|yes |mergedbottomrow}} }} | label55 ={{#ifeq:{{{languages_sub|}}}|yes |<div class="ib-pol-div-lang">{{if empty| {{{languages_type|}}} | Other&nbsp;languages }}</div> |{{if empty| {{{languages_type|}}} | Other&nbsp;languages }} }} | data55 = {{{languages|}}} | rowclass56 = {{#ifeq:{{{languages2_sub|}}}|yes |mergedbottomrow}} | label56 = {{#ifeq:{{{languages2_sub|}}}|yes |<div class="ib-pol-div-lang">{{if empty|{{{languages2_type|}}} | Other&nbsp;languages }}</div> |{{if empty|{{{languages2_type|}}} | Other&nbsp;languages }} }} | data56 = {{{languages2|}}} | label57 = [[Ethnic group|Ethnic&nbsp;groups]] <!-- -->{{#if:{{{ethnic_groups_year|}}} |<div class="ib-pol-div-ethnic"> ({{{ethnic_groups_year}}}){{{ethnic_groups_ref|}}}</div>|<div class="ib-pol-div-ethnic">{{{ethnic_groups_ref|}}}</div>}} | data57 = {{{ethnic_groups|}}} | label58 = Religion <!-- -->{{#if:{{{religion_year|}}} |<div class="ib-pol-div-religion"> ({{{religion_year}}}){{{religion_ref|}}}</div>|<div class="ib-pol-div-religion">{{{religion_ref|}}}</div>}} | data58 = {{{religion|}}} | label59 = [[Demonym|Demonym(s)]] | data59 = {{#if:{{{demonym|}}} |{{#ifexist:{{{demonym}}} people | [[{{{demonym}}} people|{{{demonym}}}]] | {{{demonym}}} }} }} <!-- ***Government type and Leader*** --> | label60 = {{#if:{{{government_type|}}} | {{#if:{{{politics_link|}}} | [[{{{politics_link}}}|Government]]<!-- -->| {{#ifexist:Politics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Politics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Government]]<!-- -->| Government<!-- -->}}<!-- -->}}<!-- -->}} | data60 = {{{government_type|}}} <!-- ***Government*** --> | header61 = {{#if:{{{government_type|}}} || {{#if:{{{leader_title1|}}}{{{leader_name1|}}} | Government }} }} | rowclass62 = mergedrow | data62 = {{#if:{{{leader_name1|}}}|{{Infobox country/multirow|{{{leader_title1|}}} |{{{leader_name1|}}} |{{{leader_title2|}}} |{{{leader_name2|}}} |{{{leader_title3|}}} |{{{leader_name3|}}} |{{{leader_title4|}}} |{{{leader_name4|}}} |{{{leader_title5|}}} |{{{leader_name5|}}} |{{{leader_title6|}}} |{{{leader_name6|}}} |{{{leader_title7|}}} |{{{leader_name7|}}} |{{{leader_title8|}}} |{{{leader_name8|}}} |{{{leader_title9|}}} |{{{leader_name9|}}} |{{{leader_title10|}}} |{{{leader_name10|}}} |{{{leader_title11|}}} |{{{leader_name11|}}} |{{{leader_title12|}}} |{{{leader_name12|}}} |{{{leader_title13|}}} |{{{leader_name13|}}} |{{{leader_title14|}}} |{{{leader_name14|}}} |{{{leader_title15|}}} |{{{leader_name15|}}} }} }} | label63 = Legislature | data63 = {{{legislature|}}} | rowclass64 = mergedrow | label64 = <div class="ib-pol-div-fake-li">•&nbsp;{{#if:{{{type_house1|}}}|{{{type_house1}}}|[[Upper house]]}}</div> | data64 = {{{upper_house|{{{house1|}}}}}} | rowclass65 = mergedbottomrow | label65 = <div class="ib-pol-div-fake-li">•&nbsp;{{#if:{{{type_house2|}}}|{{{type_house2}}}|[[Lower house]]}}</div> | data65 = {{{lower_house|{{{house2|}}}}}} | label66 = {{#if:{{{judiciary_link|}}} | [[{{{judiciary_link}}}|Judiciary]]<!-- -->| {{#ifexist:Judiciary of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Judiciary of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Judiciary]]<!-- -->| Judiciary<!-- -->}}<!-- -->}} | data66 = {{{judiciary|}}} <!-- ***Representation in federal/national government*** --> | header67 = {{#if:{{{national_representation_type1|}}} | {{#if:{{{national_representation|}}} | {{{national_representation}}} | National&nbsp;representation }} }} | rowclass68 = {{#if:{{{national_representation2|}}}|mergedrow|mergedbottomrow}} | label68 = <div class="ib-pol-div-fake-li">•&nbsp;{{{national_representation_type1}}}</div> | data68 = {{#if:{{{national_representation_type1|}}}|{{{national_representation1|}}} }} | rowclass69 = mergedbottomrow | label69 = <div class="ib-pol-div-fake-li">•&nbsp;{{{national_representation_type2}}}</div> | data69 = {{#if:{{{national_representation_type2|}}}|{{{national_representation2|}}} }} <!-- ***Geographical characteristics*** --> <!-- ***Area*** --> | rowclass70 = mergedtoprow | header70 = {{#if:{{{area_km2|}}}{{{area_ha|}}}{{{area_sq_mi|}}}{{{area_acre|}}}{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}}{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}} | {{#if:{{{area_link|}}} | [[{{{area_link}}}|Area]] | {{#ifexist:Geography of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Geography of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Area]] | Area <!-- -->}}<!-- -->}} }} | rowclass71 = {{#if:{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}}{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label71 = <div class="ib-pol-div-fake-li">•&nbsp;{{{area_label|Total}}}{{{FR_foot4|}}}</div> | data71 = {{#if:{{{area_km2|}}}{{{area_ha|}}}{{{area_sq_mi|}}}{{{area_acre|}}} |{{#if:{{{area_km2|}}}{{{area_sq_mi|}}} |{{convinfobox|{{{area_km2|}}}|km2|{{{area_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_ha|}}}{{{area_acre|}}} |{{convinfobox|{{{area_ha|}}}|ha|{{{area_acre|}}}|acre|abbr=on}} }} }}{{{area_footnote|}}}{{#if:{{{area_rank|}}} |&#32;([[{{#if:{{{area_rank_link|}}}|{{{area_rank_link|}}}|List of countries and dependencies by area}}|{{{area_rank}}}]]) }} }} | rowclass72 = {{#if:{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}}{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label72 = <div class="ib-pol-div-fake-li">•&nbsp;Land</div> | data72 = {{#if:{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_sq_mi|}}}{{{area_land_acre|}}} |{{#if:{{{area_land_km2|}}}{{{area_land_sq_mi|}}} |{{convinfobox|{{{area_land_km2|}}}|km2|{{{area_land_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_land_ha|}}}{{{area_land_acre|}}} |{{convinfobox|{{{area_land_ha|}}}|ha|{{{area_land_acre|}}}|acre|abbr=on}} }} }}{{{area_land_footnote|}}} }} | rowclass73 = {{#if:{{{area_label2|}}}{{{area_label3|}}}{{{percent_water|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label73 = <div class="ib-pol-div-fake-li">•&nbsp;Water</div> | data73 = {{#if:{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_sq_mi|}}}{{{area_water_acre|}}} |{{#if:{{{area_water_km2|}}}{{{area_water_sq_mi|}}} |{{convinfobox|{{{area_water_km2|}}}|km2|{{{area_water_sq_mi|}}}|sqmi|abbr=on}} |{{#if:{{{area_water_ha|}}}{{{area_water_acre|}}} |{{convinfobox|{{{area_water_ha|}}}|ha|{{{area_water_acre|}}}|acre|abbr=on}} }} }}{{{area_water_footnote|}}} }} | rowclass74 = {{#if:{{{area_label2|}}}{{{area_label3|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label74 = <div class="ib-pol-div-fake-li">•&nbsp;Water&nbsp;(%)</div> | data74 = {{{percent_water|}}} | rowclass75 = {{#if:{{{area_label3|}}}{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label75 = <div class="ib-pol-div-fake-li">•&nbsp;{{{area_label2|}}}</div> | data75 = {{#if:{{{area_label2|}}}| {{{area_data2|}}} }} | rowclass76 = {{#if:{{{stat_area1|}}}{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label76 = <div class="ib-pol-div-fake-li">•&nbsp;{{{area_label3|}}}</div> | data76 = {{#if:{{{area_label3|}}}| {{{area_data3|}}} }} | rowclass77 = {{#if:{{{stat_area2|}}}{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label77 = {{{stat_year1|}}}{{{ref_area1|}}} | data77 = {{#if: {{{stat_area1|}}} | {{convinfobox|{{{stat_area1|}}}|km2||sqmi}} }} | rowclass78 = {{#if:{{{stat_area3|}}}{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label78 = {{{stat_year2|}}}{{{ref_area2|}}} | data78 = {{#if: {{{stat_area2|}}} | {{convinfobox|{{{stat_area2|}}}|km2||sqmi}} }} | rowclass79 = {{#if:{{{stat_area4|}}}{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label79 = {{{stat_year3|}}}{{{ref_area3|}}} | data79 = {{#if: {{{stat_area3|}}} | {{convinfobox|{{{stat_area3|}}}|km2||sqmi}} }} | rowclass80 = {{#if:{{{stat_area5|}}}|mergedrow|mergedbottomrow}} | label80 = {{{stat_year4|}}}{{{ref_area4|}}} | data80 = {{#if: {{{stat_area4|}}} | {{convinfobox|{{{stat_area4|}}}|km2||sqmi}} }} | rowclass81 = mergedbottomrow | label81 = {{{stat_year5|}}}{{{ref_area5|}}} | data81 = {{#if: {{{stat_area5|}}} | {{convinfobox|{{{stat_area5|}}}|km2||sqmi}} }} <!-- ***Dimensions*** --> | rowclass82 = mergedtoprow | header82 = {{#if:{{{length_km|}}}{{{length_mi|}}}{{{width_km|}}}{{{width_mi|}}}|Dimensions<div class="ib-settlement-fn">{{{dimensions_footnotes|}}}</div>}} | rowclass83 = mergedrow | label83 = <div class="ib-pol-div-fake-li">•&nbsp;Length</div> | data83 = {{#if:{{{length_km|}}}{{{length_mi|}}} |{{convinfobox|{{{length_km|}}}|km|{{{length_mi|}}}|mi|abbr=on}} }} | rowclass84 = mergedbottomrow | label84 = <div class="ib-pol-div-fake-li">•&nbsp;Width</div> | data84 = {{#if:{{{width_km|}}}{{{width_mi|}}} |{{convinfobox|{{{width_km|}}}|km|{{{width_mi|}}}|mi|abbr=on}} }} <!-- ***Elevation*** --> | rowclass85 = {{#if:{{{elevation_max_m|}}}{{{elevation_max_ft|}}}|mergedtoprow|}} | label85 = {{#if:{{{elevation_link|}}}|[[{{{elevation_link|}}}|Elevation]]|Elevation}}<div class="ib-pol-div-elevation">{{{elevation_footnotes|}}}{{#if:{{{elevation_point|}}}|&#32;({{{elevation_point}}})}}</div> | data85 = {{#if:{{{elevation_m|}}}{{{elevation_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_m|}}} |ft ={{{elevation_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} | rowclass86 = {{#if:{{{elevation_m|}}}{{{elevation_ft|}}}|mergedrow|{{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}}|mergedtoprow|}}}} | label86 = Highest&nbsp;elevation<div class="ib-pol-div-elevation">{{{elevation_max_footnotes|}}}{{#if:{{{elevation_max_point|}}}|&#32;({{{elevation_max_point}}})}}</div> | data86 = {{#if:{{{elevation_max_m|}}}{{{elevation_max_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_max_m|}}} |ft ={{{elevation_max_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} <!-- ***Elevation max rank*** --> | rowclass87 = {{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}}|mergedrow|mergedbottomrow}} | label87 = &nbsp;•&nbsp;Rank | data87 = {{#if:{{{elevation_max_m|}}}{{{elevation_max_ft|}}}| {{{elevation_max_rank|}}} }} | rowclass88 = {{#if:{{{elevation_min_rank|}}}|mergedrow|mergedbottomrow}} | label88 = Lowest&nbsp;elevation<div class="ib-pol-div-elevation">{{{elevation_min_footnotes|}}}{{#if:{{{elevation_min_point|}}}|&#32;({{{elevation_min_point}}})}}</div> | data88 = {{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_min_m|}}} |ft ={{{elevation_min_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} <!-- ***Elevation min rank*** --> | rowclass89 = mergedbottomrow | label89 = &nbsp;•&nbsp;Rank | data89 = {{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}}|{{{elevation_min_rank|}}}}} <!-- ***Population*** --> <!-- ***Demographics 1*** --> | rowclass90 = mergedtoprow | header90 = {{#if:{{{population_estimate|}}}{{{population_census|}}}{{{stat_pop1|}}}{{{stat_pop2|}}}{{{stat_pop3|}}}{{{stat_pop4|}}}{{{stat_pop5|}}} |{{#if:{{{population_link|}}} | {{#ifeq:{{{population_link}}}|no|Population|[[{{{population_link}}}|Population]]}}<!-- -->| {{#ifexist:Demographics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Demographics of {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Population]]<!-- -->| Population<!-- -->}}<!-- -->}} }} | rowclass91 = mergedrow | label91 = <div class="ib-pol-div-fake-li">•&nbsp;{{#if:{{{population_estimate_year|}}} |{{{population_estimate_year}}} estimate|Estimate}}</div> | data91 = {{#if:{{{population_estimate|}}} |{{{population_estimate}}}<!-- -->{{#if:{{{population_estimate_rank|}}} |&#32;([[{{#if:{{{population_rank_link|}}}|{{{population_rank_link|}}}|List of countries and dependencies by population}}|{{{population_estimate_rank}}}]])}} }} | rowclass92 = mergedrow | label92= <div class="ib-pol-div-fake-li">•&nbsp;{{{population_label2|}}}</div> | data92= {{#if:{{{population_label2|}}}|{{{population_data2|}}}}} | rowclass93= mergedrow | label93= <div class="ib-pol-div-fake-li">•&nbsp;{{{population_label3|}}}</div> | data93= {{#if:{{{population_label3|}}}|{{{population_data3|}}}}} | rowclass94= mergedrow | data94= {{#if:{{{stat_pop1|}}}{{{stat_pop2|}}}{{{stat_pop3|}}}{{{stat_pop4|}}}{{{stat_pop5|}}}|{{infobox country/multirow|{{{stat_year1|}}}{{{ref_pop1|}}} |{{{stat_pop1|}}}|{{{stat_year2|}}}{{{ref_pop2|}}} |{{{stat_pop2|}}}|{{{stat_year3|}}}{{{ref_pop3|}}} |{{{stat_pop3|}}}|{{{stat_year4|}}}{{{ref_pop4|}}} |{{{stat_pop4|}}}|{{{stat_year5|}}}{{{ref_pop5|}}} |{{{stat_pop5|}}} }} }} | rowclass95= mergedrow | label95= <div class="ib-pol-div-fake-li">•&nbsp;{{#if:{{{population_census_year|}}} |{{{population_census_year}}}&nbsp;census|Census}}</div> | data95= {{#if:{{{population_census|}}} |{{{population_census}}}<!-- -->{{#if:{{{population_census_rank|}}} |&#32;([[{{#if:{{{population_rank_link|}}}|{{{population_rank_link|}}}|List of countries and dependencies by population}}|{{{population_census_rank}}}]])}} }} | rowclass96 = mergedbottomrow | label96= <div class="ib-pol-div-fake-li">•&nbsp;Density{{{FR_foot5|}}}</div> | data96= {{#if:{{{population_density_km2|}}}{{{population_density_sq_mi|}}} | {{convinfobox|{{{population_density_km2|}}}|/km2|{{{population_density_sq_mi|}}}|/sqmi|1|abbr=on}}{{{pop_den_footnote|}}}<!-- -->{{#if:{{{population_density_rank|}}} |&#32;([[{{#if:{{{population_density_rank_link|}}}|{{{population_density_rank_link|}}}|List of countries and dependencies by population density}}|{{{population_density_rank}}}]])}} }} | rowclass107= mergedtoprow | label107= [[Gross value added|GVA]] | data107= {{#if:{{{GVA|}}}{{{GVA_per_capita|}}} |{{#if:{{{GVA_year|}}} |{{{GVA_year}}}&nbsp;}}estimate }} | rowclass108= mergedrow | label108= <div class="ib-pol-div-fake-li">•&nbsp;Total</div> | data108= {{#if:{{{GVA|}}} |{{{GVA}}}<!-- -->{{#if:{{{GVA_rank|}}} |&#32;({{{GVA_rank}}})}} }} | rowclass109= mergedbottomrow | label109= <div class="ib-pol-div-fake-li">•&nbsp;Per capita</div> | data109= {{#if:{{{GVA_per_capita|}}} | {{{GVA_per_capita}}}<!-- -->{{#if:{{{GVA_per_capita_rank|}}} |&#32;({{{GVA_per_capita_rank}}})}} }} | rowclass110= mergedtoprow | label110= {{#if:{{{GDP_PPP_type|}}}|{{{GDP_PPP_type}}}|[[Gross domestic product|GDP]]&nbsp;{{nobold|([[Purchasing power parity|PPP]])}}}} | data110= {{#if:{{{GDP_PPP|}}}{{{GDP_PPP_per_capita|}}} |{{#if:{{{GDP_PPP_year|}}} |{{{GDP_PPP_year}}}&nbsp;}}estimate }} | rowclass111= mergedrow | label111= <div class="ib-pol-div-fake-li">•&nbsp;Total</div> | data111= {{#if:{{{GDP_PPP|}}} |{{{GDP_PPP}}}<!-- -->{{#if:{{{GDP_PPP_rank|}}} |&#32;([[{{#if:{{{GDP_PPP_rank_link|}}}|{{{GDP_PPP_rank_link|}}}|List of countries by GDP (PPP)}}|{{{GDP_PPP_rank}}}]])}} }} | rowclass112= mergedbottomrow | label112= <div class="ib-pol-div-fake-li">•&nbsp;Per capita</div> | data112= {{#if:{{{GDP_PPP_per_capita|}}} |{{{GDP_PPP_per_capita}}}<!-- -->{{#if:{{{GDP_PPP_per_capita_rank|}}} |&#32;([[{{#if:{{{GDP_PPP_per_capita_rank_link|}}}|{{{GDP_PPP_per_capita_rank_link|}}}|List of countries by GDP (PPP) per capita}}|{{{GDP_PPP_per_capita_rank}}}]])}} }} | rowclass113= mergedtoprow | label113= {{#if:{{{GDP_nominal_type|}}}|{{{GDP_nominal_type}}}|[[Gross domestic product|GDP]]&nbsp;{{nobold|(nominal)}}}} | data113= {{#if:{{{GDP_nominal|}}}{{{GDP_nominal_per_capita|}}} |{{#if:{{{GDP_nominal_year|}}} |{{{GDP_nominal_year}}}&nbsp;}}estimate }} | rowclass114= mergedrow | label114= <div class="ib-pol-div-fake-li">•&nbsp;Total</div> | data114= {{#if:{{{GDP_nominal|}}} |{{{GDP_nominal}}}<!-- -->{{#if:{{{GDP_nominal_rank|}}} |&#32;([[{{#if:{{{GDP_nominal_rank_link|}}}|{{{GDP_nominal_rank_link|}}}|List of countries by GDP (nominal)}}|{{{GDP_nominal_rank}}}]])}} }} | rowclass115= mergedbottomrow | label115= <div class="ib-pol-div-fake-li">•&nbsp;Per capita</div> | data115= {{#if:{{{GDP_nominal_per_capita|}}} | {{{GDP_nominal_per_capita}}}<!-- -->{{#if:{{{GDP_nominal_per_capita_rank|}}} |&#32;([[{{#if:{{{GDP_nominal_per_capita_rank_link|}}}|{{{GDP_nominal_per_capita_rank_link|}}}|List of countries by GDP (nominal) per capita}}|{{{GDP_nominal_per_capita_rank}}}]])}} }} | label116= [[Gini_coefficient|Gini]]{{#if:{{{Gini_year|}}} |&nbsp;{{nobold|1=({{{Gini_year}}})}}}} | data116= {{#if:{{{Gini|}}} | {{#switch:{{{Gini_change|}}} |increase = {{increaseNegative}}&nbsp;<!-- -->|decrease = {{decreasePositive}}&nbsp;<!-- -->|steady = {{steady}}&nbsp;<!-- -->}}{{{Gini}}}{{{Gini_ref|}}}<br/><!-- ---------Evaluate and add Gini category:---------- -->{{nowrap|1=<!-- -->{{#iferror:<!-- -->{{#ifexpr:{{{Gini}}}>100 <!-- -->| {{error|Error: Gini value above 100}}<!--Handled by outer #iferror, not visible to users--><!-- -->| {{#ifexpr:{{{Gini}}}>=60 |{{color|red|very high}}<!-- -->| {{#ifexpr:{{{Gini}}}>=46 <!-- -->| {{color|darkred|high}}<!-- -->| {{#ifexpr:{{{Gini}}}>=30 <!-- -->| {{color|orange|medium}}<!-- -->| {{#ifexpr:{{{Gini}}}>=0 <!-- -->| {{color|forestgreen|low}}<!-- -->| {{error|Error:Gini value below 0}}<!--Handled by outer #iferror, not visible to users--><!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->| {{error|Error: Invalid Gini value}}<!-- -->}}<!-- -->}}<!-- -----------Add Gini_rank (if supplied):---------- -->{{#if:{{{Gini_rank|}}} |&nbsp;·&nbsp;[[{{#if:{{{Gini_rank_link|}}}|{{{Gini_rank_link|}}}|List of countries by income equality}}|{{{Gini_rank}}}]]<!-- -->}}<!-- -->}} | label117= [[Human Development Index|HDI]]{{#if:{{{HDI_year|}}} |&nbsp;{{nobold|1=({{{HDI_year}}})}}}} | data117= {{#if:{{{HDI|}}} | {{#switch:{{{HDI_change|}}} |increase = {{increase}}&nbsp;<!-- -->|decrease = {{decrease}}&nbsp;<!-- -->|steady = {{steady}}&nbsp;<!-- -->}}{{{HDI}}}{{{HDI_ref|}}}<br/><!-- ---------Evaluate and add HDI category:--------- -->{{nowrap|1=<!-- -->{{#iferror:<!-- -->{{#ifexpr:{{{HDI}}}>1 <!-- -->| {{error|Error: HDI value greater than 1}}<!--Handled by outer #iferror, not visible to users--><!-- -->| {{#ifexpr:{{{HDI}}}>0.799 <!-- -->| {{color|darkgreen|very high}}<!-- -->| {{#ifexpr:{{{HDI}}}>0.699 <!-- -->| {{color|forestgreen|high}}<!-- -->| {{#ifexpr:{{{HDI}}}>0.549 <!-- -->| {{color|orange|medium}}<!-- -->| {{#ifexpr:{{{HDI}}}>=0.000<!-- -->| {{color|red|low}}<!-- -->| {{error|Error: HDI value less than 0}}<!--Handled by outer #iferror, not visible to users--><!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->| {{error|Error: Invalid HDI value}}<!-- -->}}<!-- -->}}<!-- ----------Add HDI_rank (if supplied):----------- -->{{#if:{{{HDI_rank|}}} |&nbsp;·&nbsp;[[{{#if:{{{HDI_rank_link|}}}|{{{HDI_rank_link|}}}|List of countries by Human Development Index}}|{{{HDI_rank}}}]]<!-- -->}}<!-- -->}} | label118= Currency | data118= {{#if:{{{currency|}}} | {{{currency}}} {{#if:{{{currency_code|}}} |([[ISO 4217|{{{currency_code}}}]])}} }} <!-- ***Time Zones*** --> | rowclass119 = {{#if:{{{timezone1_DST|{{{timezone_DST|}}}}}}|mergedrow|mergedbottomrow}} | header119 = {{#if:{{{timezone1_location|}}}|{{#if:{{{timezone2|}}}|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]s|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]}}|}} | rowclass120 = {{#if:{{{timezone1_location|}}}|mergedrow|mergedtoprow}} | label120 = {{#if:{{{timezone1_location|}}}|{{{timezone1_location}}}|{{#if:{{{timezone2_location|}}}|{{{timezone2_location}}}|{{#if:{{{timezone2|}}}|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]s|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]}}}}}} | data120 = {{#if:{{{utc_offset1|{{{utc_offset|}}} }}} |[[UTC{{{utc_offset1|{{{utc_offset}}}}}}]] {{#if:{{{timezone1|{{{timezone|}}}}}}|({{{timezone1|{{{timezone}}}}}})}} |{{{timezone1|{{{timezone|}}}}}}{{#if:{{{utc_offset_list|}}}|{{{utc_offset_list}}} {{#if:{{{timezone1|{{{timezone|}}}}}}|({{{timezone1|{{{timezone}}}}}})}}}} }} | rowclass121 = mergedbottomrow | label121 = <div class="ib-pol-div-fake-li">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</div> | data121 = {{#if:{{{utc_offset1_DST|{{{utc_offset_DST|}}}}}} |[[UTC{{{utc_offset1_DST|{{{utc_offset_DST|}}}}}}]] {{#if:{{{timezone1_DST|{{{timezone_DST|}}}}}}|({{{timezone1_DST|{{{timezone_DST}}}}}})}} |{{{timezone1_DST|{{{timezone_DST|}}}}}}{{#if:{{{utc_offset_list_DST|}}}|{{{utc_offset_list_DST}}}}} }} <!-- ***Date format*** --> | label130 = Date format | data130= {{{date_format|}}} <!-- ***Electricity*** --> | label131 = [[Mains electricity]] | data131= {{{electricity|}}} <!-- ***Driving side*** --> | label132= [[Left- and right-hand traffic|Driving side]] | data132= {{#if:{{{drives_on|}}} | {{lcfirst:{{{drives_on}}}}} }} <!-- ***Calling Code(s)*** --> | rowclass133 = {{#if:{{{iso_code|}}}{{{postal_code|}}}{{{postal2_code|}}}|mergedtoprow|}} | label133= {{#if:{{{calling_code|}}} |{{#ifexist:Telephone numbers in {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}} | [[Telephone numbers in {{{linking_name|{{{common_name|{{{name|{{PAGENAME}}}}}}}}}}}|Calling code]] | Calling code }} }} | data133= {{{calling_code|}}} <!-- ***Postal Code(s)*** --> | rowclass134 = {{#if:{{{calling_code|}}}|mergedrow|{{#if:{{{postal2_code|}}}{{{iso_code|}}}|mergedtoprow|}}}} | label134 = {{{postal_code_type}}} | data134 = {{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|<div class="postal-code">{{{postal_code}}}</div>}}}} | rowclass135 = {{#if:{{{iso_code|}}}|mergedrow|{{#if:{{{postal_code|}}}|mergedbottomrow|}}}} | label135 = {{{postal2_code_type}}} | data135 = {{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|<div class="postal-code">{{{postal2_code}}}</div>}} }} }} <!-- ISO Code--> | rowclass136 = {{#if:{{{calling_code|}}}{{{postal_code|}}}{{{postal2_code|}}}|mergedbottomrow|}} | label136= [[ISO 3166|ISO 3166 code]] | data136= {{{iso_code|}}} <!-- ccTLD--> | label137= [[Country code top-level domain|Internet TLD]] | data137= {{{cctld|}}} <!-- ***Blank Fields (two sections)*** --> | rowclass139 = mergedtoprow | label139 = {{{blank_name_sec1|{{{blank_name|}}}}}} | data139 = {{#if:{{{blank_name_sec1|{{{blank_name|}}}}}}|{{{blank_info_sec1|{{{blank_info|}}}}}}}} | rowclass140 = mergedrow | label140 = {{{blank1_name_sec1|{{{blank1_name|}}}}}} | data140 = {{#if:{{{blank1_name_sec1|{{{blank1_name|}}}}}}|{{{blank1_info_sec1|{{{blank1_info|}}}}}}}} | rowclass141 = mergedrow | label141 = {{{blank2_name_sec1|{{{blank2_name|}}}}}} | data141 = {{#if:{{{blank2_name_sec1|{{{blank2_name|}}}}}}|{{{blank2_info_sec1|{{{blank2_info|}}}}}}}} | rowclass142 = mergedrow | label142 = {{{blank3_name_sec1|{{{blank3_name|}}}}}} | data142 = {{#if:{{{blank3_name_sec1|{{{blank3_name|}}}}}}|{{{blank3_info_sec1|{{{blank3_info|}}}}}}}} | rowclass143 = mergedrow | label143 = {{{blank4_name_sec1|{{{blank4_name|}}}}}} | data143 = {{#if:{{{blank4_name_sec1|{{{blank4_name|}}}}}}|{{{blank4_info_sec1|{{{blank4_info|}}}}}}}} | rowclass144 = mergedrow | label144 = {{{blank5_name_sec1|{{{blank5_name|}}}}}} | data144 = {{#if:{{{blank5_name_sec1|{{{blank5_name|}}}}}}|{{{blank5_info_sec1|{{{blank5_info|}}}}}}}} | rowclass145 = mergedrow | label145 = {{{blank6_name_sec1|{{{blank6_name|}}}}}} | data145 = {{#if:{{{blank6_name_sec1|{{{blank6_name|}}}}}}|{{{blank6_info_sec1|{{{blank6_info|}}}}}}}} | rowclass146 = mergedbottomrow | label146 = {{{blank7_name_sec1|{{{blank7_name|}}}}}} | data146 = {{#if:{{{blank7_name_sec1|{{{blank7_name|}}}}}}|{{{blank7_info_sec1|{{{blank7_info|}}}}}}}} | rowclass147 = mergedtoprow | label147 = {{{blank_name_sec2}}} | data147 = {{#if:{{{blank_name_sec2|}}}|{{{blank_info_sec2|}}}}} | rowclass148 = mergedrow | label148 = {{{blank1_name_sec2}}} | data148 = {{#if:{{{blank1_name_sec2|}}}|{{{blank1_info_sec2|}}}}} | rowclass149 = mergedrow | label149 = {{{blank2_name_sec2}}} | data149 = {{#if:{{{blank2_name_sec2|}}}|{{{blank2_info_sec2|}}}}} | rowclass150 = mergedrow | label150 = {{{blank3_name_sec2}}} | data150 = {{#if:{{{blank3_name_sec2|}}}|{{{blank3_info_sec2|}}}}} | rowclass151 = mergedrow | label151 = {{{blank4_name_sec2}}} | data151 = {{#if:{{{blank4_name_sec2|}}}|{{{blank4_info_sec2|}}}}} | rowclass152 = mergedrow | label152 = {{{blank5_name_sec2}}} | data152 = {{#if:{{{blank5_name_sec2|}}}|{{{blank5_info_sec2|}}}}} | rowclass153 = mergedrow | label153 = {{{blank6_name_sec2}}} | data153 = {{#if:{{{blank6_name_sec2|}}}|{{{blank6_info_sec2|}}}}} | rowclass154 = mergedbottomrow | label154 = {{{blank7_name_sec2}}} | data154 = {{#if:{{{blank7_name_sec2|}}}|{{{blank7_info_sec2|}}}}} <!-- ***Website*** --> | label155 = Website | data155 = {{#if:{{{website|}}}|{{{website}}}}} <!-- ***Footnotes*** --> | belowrowclass = mergedtoprow | below = {{{footnotes|}}} }}{{#switch:{{{coordinates_region|}}}|CA-X|US-X|IN-X=[[Kategori:Pages using infobox political division with imprecise region codes]] }}{{#if:{{{image_dot_map|}}}{{{dot_mapsize|}}}{{{dot_map_base_alt|}}}{{{dot_map_alt|}}}{{{dot_map_caption|}}}{{{dot_x|}}}{{{dot_y|}}}|[[Kategori:Pages using infobox political division with a dot map]] }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox political division with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox political division]] with unknown parameter "_VALUE_"|ignoreblank=y | admin_center | admin_center_type | alt | anthem | anthem_link | area_label | area_data2 | area_label2 | area_data3 | area_label3 | area_km2 | area_sq_mi | area_footnotes | area_land_acre | area_land_ha | area_land_km2 | area_land_sq_mi | area_magnitude | area_metro_acre | area_metro_footnotes | area_metro_ha | area_metro_km2 | area_metro_sq_mi | area_note | area_rank | area_rank_link | area_rural_acre | area_rural_footnotes | area_rural_ha | area_rural_km2 | area_rural_sq_mi | area_total_acre | area_total_ha | area_total_km2 | area_total_sq_mi | area_urban_acre | area_urban_footnotes | area_urban_ha | area_urban_km2 | area_urban_sq_mi | area_water_acre | area_water_ha | area_water_km2 | area_water_percent | area_water_sq_mi | blank_emblem_link | blank_emblem_size | blank_emblem_type | blank_info | blank_info_sec1 | blank_info_sec2 | blank_name | blank_name_sec1 | blank_name_sec2 | blank1_info | blank1_info_sec1 | blank1_info_sec2 | blank1_name | blank1_name_sec1 | blank1_name_sec2 | blank2_info | blank2_info_sec1 | blank2_info_sec2 | blank2_name | blank2_name_sec1 | blank2_name_sec2 | blank3_info | blank3_info_sec1 | blank3_info_sec2 | blank3_name | blank3_name_sec1 | blank3_name_sec2 | blank4_info | blank4_info_sec1 | blank4_info_sec2 | blank4_name | blank4_name_sec1 | blank4_name_sec2 | blank5_info | blank5_info_sec1 | blank5_info_sec2 | blank5_name | blank5_name_sec1 | blank5_name_sec2 | blank6_info | blank6_info_sec1 | blank6_info_sec2 | blank6_name | blank6_name_sec1 | blank6_name_sec2 | blank7_info | blank7_info_sec1 | blank7_info_sec2 | blank7_name | blank7_name_sec1 | blank7_name_sec2 | calling_code | capital | capital_type | caption | cctld | common_languages | coor_pinpoint | coor_type | coordinates | coordinates_footnotes | currency | currency_code | date_format | demonym | drives_on | electricity | elevation_footnotes | elevation_ft | elevation_link | elevation_m | elevation_max_footnotes | elevation_max_ft | elevation_max_m | elevation_max_point | elevation_max_rank | elevation_min_footnotes | elevation_min_ft | elevation_min_m | elevation_min_point | elevation_min_rank | elevation_point | embed | established_date | established_date1 | established_date2 | established_date3 | established_date4 | established_date5 | established_date6 | established_date7 | established_title | established_title1 | established_title2 | established_title3 | established_title4 | established_title5 | established_title6 | established_title7 | ethnic_groups_ref | ethnic_groups_year | ethnic_groups | etymology | extinct_date | extinct_title | flag_alt | flag_border | flag_link | flag_size | flag_type | footnotes | founder | GDP_nominal_per_capita_rank | GDP_nominal_per_capita_rank_link | GDP_nominal_per_capita | GDP_nominal_rank | GDP_nominal_rank_link | GDP_nominal_year | GDP_nominal | GDP_nominal_type | GDP_PPP_per_capita_rank | GDP_PPP_per_capita | GDP_PPP_rank | GDP_PPP_year | GDP_PPP | GVA_per_capita_rank | GVA_per_capita | GVA_rank | GVA_year | GVA | Gini_change | Gini_rank | Gini_rank_link | Gini_ref | Gini_year | Gini | governing_body | government_footnotes | government_type | grid_name | grid_position | HDI_change | HDI_rank | HDI_rank_link | HDI_ref | HDI_year | HDI | image | image_alt | image_blank_emblem | image_caption | image_flag | image_map | image_map2 | image_seal | image_shield | image_size | image_skyline | imagesize | iso_code | judiciary | judiciary_link | languages_sub | languages_type | languages | languages2_sub | languages2_type | languages2 | largest_city | largest_settlement_type | largest_settlement | leader_name | leader_name1 | leader_name2 | leader_name3 | leader_name4 | leader_name5 | leader_name6 | leader_party | leader_title | leader_title1 | leader_title2 | leader_title3 | leader_title4 | leader_title5 | leader_title6 | legislature | length_km | length_mi | linking_name | lower_house | map_alt | map_alt2 | map_caption | map_caption2 | mapsize | mapsize2 | motto | motto_link | mottoes | name | named_for | national_languages | national_representation | national_representation1 | national_representation2 | national_representation_type1 | national_representation_type2 | native_name | native_name_lang | nickname | nickname_link | nicknames | official_languages | official_languages_type | official_name | other_name | percent_water | politics_link | pop_den_footnote | population_census_rank | population_census_year | population_census | population_data2 | population_data3 | population_density_km2 | population_density_rank | population_density_rank_link | population_density_sq_mi | population_estimate_rank | population_estimate_year | population_estimate | population_rank_link | population_label2 | population_label3 | population_link | postal_code | postal_code_type | postal2_code | postal2_code_type | pushpin_image | pushpin_label | pushpin_label_position | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_map_caption_notsmall | pushpin_map_narrow | pushpin_mapsize | pushpin_outside | pushpin_overlay | pushpin_relief | recognised_languages | recognised_national_languages | recognised_regional_languages | recognized_languages | recognized_national_languages | regional_languages | registration_plate | registration_plate_type | religion_ref | religion_year | religion | seal_alt | seal_link | seal_size | seal_type | seat | seat_type | seat1 | seat1_type | seat2 | seat2_type | settlement_type | shield_alt | shield_link | shield_size | short_description | song | song_type | subdivision_name | subdivision_name1 | subdivision_name2 | subdivision_name3 | subdivision_name4 | subdivision_name5 | subdivision_name6 | subdivision_type | subdivision_type1 | subdivision_type2 | subdivision_type3 | subdivision_type4 | subdivision_type5 | subdivision_type6 | timezone | timezone_DST | timezone_link | timezone1 | timezone1_DST | timezone1_location | timezone2 | timezone2_DST | timezone2_location | total_type | translit_lang1 | translit_lang1_info | translit_lang1_info1 | translit_lang1_info2 | translit_lang1_info3 | translit_lang1_info4 | translit_lang1_info5 | translit_lang1_info6 | translit_lang1_type | translit_lang1_type1 | translit_lang1_type2 | translit_lang1_type3 | translit_lang1_type4 | translit_lang1_type5 | translit_lang1_type6 | translit_lang2 | translit_lang2_info | translit_lang2_info1 | translit_lang2_info2 | translit_lang2_info3 | translit_lang2_info4 | translit_lang2_info5 | translit_lang2_info6 | translit_lang2_type | translit_lang2_type1 | translit_lang2_type2 | translit_lang2_type3 | translit_lang2_type4 | translit_lang2_type5 | translit_lang2_type6 | type | unit_pref | upper_house | utc_offset | utc_offset_DST | utc_offset1 | utc_offset1_DST | utc_offset2 | utc_offset2_DST | utc_offset_list | utc_offset_list_DST | website | width_km | width_mi }}{{#if:{{{image|}}}|[[Kategori:Pages using infobox political division with the image parameter|{{#if:{{{image_skyline|}}}|!}}{{PAGENAME}}]]}}{{#if:{{{coordinates_wikidata|}}}{{{wikidata|}}} |[[Kategori:Pages using infobox political division with the wikidata parameter]] }}</includeonly><noinclude> {{Documentation}} <!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> rbh4jcgmemaa5f4s37ewa48ldpfrwxf Templat:Infobox river 10 131 316 315 2024-08-09T09:19:54Z Jon Harald Søby 58 1 semakan diimportkan 315 wikitext text/x-wiki {{main other|{{#if:{{Has short description}} |<!--Do nothing--> |{{#invoke:Type in location|main|River|{{comma separated entries |1= {{Plain text|{{strip tags|{{replace|{{{subdivision_name2|}}}|</li>|, </li>}}}}}} |2= {{Plain text|{{strip tags|{{replace|{{{subdivision_name1|}}}|</li>|, </li>}}}}}} }}}}}}}}{{Infobox | child = {{{embed|}}} | abovestyle = background-color: #CEDEFF; | above = {{{name|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}{{#if:{{{other_name|{{{name_other|}}}}}}|<br /><div class="nickname" style="display:inline;font-size:78%">{{{other_name|{{{name_other|}}}}}}</div>}} | autoheaders= y | headerstyle= background-color: #CEDEFF; | image = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:WikidataIB |getValue|rank=best|P18 |name=image |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced=no |noicon=yes |maxvals=1 |{{{image|}}}}}|size={{#if:{{{image_size|}}}|{{{image_size|}}}|250px}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{image_alt|}}}|suppressplaceholder=yes}} | caption = {{#if:{{{image|}}}|{{{image_caption|}}}|{{{image_caption|{{#invoke:WikidataIB|getValue|P18|qual=P2096|qualsonly=y|fwd=ALL}}}}}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{{map|}}}|size={{{map_size|}}}|sizedefault=frameless|alt={{{map_alt|}}}}} | caption2 = {{{map_caption|}}} | image3 = {{#if:{{both|{{{pushpin_map|}}}|{{{mouth_coordinates|}}}{{#property:P625}}}}|{{location map|{{{pushpin_map}}} |border =infobox |alt ={{{pushpin_map_alt|}}} |float =center |width ={{{pushpin_map_size|}}} |coordinates ={{{mouth_coordinates|}}} |relief ={{#ifeq: {{{pushpin_map_relief|}}}| 0 || {{if empty|{{{pushpin_map_relief|}}}|1}}}} |caption ={{{pushpin_map_caption|}}} }} }} | label1 = Etymology | data1 = {{{etymology|{{{name_etymology|}}}}}} | class2 = nickname | label2 = Nickname(s) | data2 = {{{nickname|}}} | class3 = nickname | label3 = Native name | data3 = {{native name checker|{{{native_name|{{{name_native|}}}}}}}} | header5 = Location | label6 = {{{subdivision_type1|{{{country_type|Country}}}}}} | rowstyle6 = {{Infobox river/row-style}} | data6 = {{{subdivision_name1|{{{country|}}}}}} | label7 = {{{subdivision_type2|{{{state_type|State}}}}}} | rowstyle7 = {{Infobox river/row-style}} | data7 = {{{subdivision_name2|{{{state|}}}}}} | label8 = {{{subdivision_type3|{{{region_type|Region}}}}}} | rowstyle8 = {{Infobox river/row-style}} | data8 = {{{subdivision_name3|{{{region|}}}}}} | label9 = {{{subdivision_type4|{{{district_type|District}}}}}} | rowstyle9 = {{Infobox river/row-style}} | data9 = {{{subdivision_name4|{{{district|}}}}}} | label10 = {{{subdivision_type5|{{{municipality_type|Municipality}}}}}} | rowstyle10 = {{Infobox river/row-style}} | data10 = {{{subdivision_name5|{{{municipality|}}}}}} | header15 = Physical&nbsp;characteristics | rowstyle16 = display:none; | data16 = {{Infobox river/source|source={{{source1|}}}|loc={{{source1_location|}}}|elev={{{source1_elevation|}}}|coord={{{source1_coordinates|}}}|len={{{source1_length|}}}|coord_ref={{{source1_coord_ref|}}}}} | rowstyle17 = display:none; | data17 = {{Infobox river/source|2nd source|source={{{source2|}}}|loc={{{source2_location|}}}|elev={{{source2_elevation|}}}|coord={{{source2_coordinates|}}}|len={{{source2_length|}}}|coord_ref={{{source2_coord_ref|}}}}} | rowstyle18 = display:none; | data18 = {{Infobox river/source|3rd source|source={{{source3|}}}|loc={{{source3_location|}}}|elev={{{source3_elevation|}}}|coord={{{source3_coordinates|}}}|len={{{source3_length|}}}|coord_ref={{{source3_coord_ref|}}}}} | rowstyle19 = display:none; | data19 = {{Infobox river/source|4th source|source={{{source4|}}}|loc={{{source4_location|}}}|elev={{{source4_elevation|}}}|coord={{{source4_coordinates|}}}|len={{{source4_length|}}}|coord_ref={{{source4_coord_ref|}}}}} | rowstyle20 = display:none; | data20 = {{Infobox river/source|5th source|source={{{source5|}}}|loc={{{source5_location|}}}|elev={{{source5_elevation|}}}|coord={{{source5_coordinates|}}}|len={{{source5_length|}}}|coord_ref={{{source5_coord_ref|}}}}} | rowstyle21 = display:none; | data21 = {{Infobox river/source|Source confluence|source={{{source_confluence|}}}|loc={{{source_confluence_location|}}}|elev={{{source_confluence_elevation|}}}|coord={{{source_confluence_coordinates|}}}|coord_ref={{{source_confluence_coord_ref|}}}}} | label22 = [[River mouth|Mouth]] | data22 = {{#if:{{{mouth|}}}|{{{mouth}}}|{{#if:{{{mouth_location|}}}{{{mouth_coordinates|}}}{{{mouth_elevation|}}}|&nbsp;}}}} | label23 = <div style="display:inline;font-weight:normal">&nbsp;&bull;&nbsp;location</div> | rowstyle23 = {{Infobox river/row-style}} | data23 = {{{mouth_location|}}} | label24 = <div style="display:inline;font-weight:normal">&nbsp;&bull;&nbsp;coordinates</div> | rowstyle24 = {{Infobox river/row-style}} | data24 = {{#if:{{{mouth_coordinates|}}}|{{#invoke:Coordinates|coordinsert|{{{mouth_coordinates}}}|type:river}}{{{mouth_coord_ref|}}}}} | label25 = <div style="display:inline;font-weight:normal">&nbsp;&bull;&nbsp;elevation</div> | rowstyle25 = {{Infobox river/row-style}} | data25 = {{Infobox river/calcunit|free={{{mouth_elevation|}}}|met_unit=m|imp_unit=ft}} | label30 = Length | rowstyle30 = {{Infobox river/row-style}} | data30 = {{Infobox river/calcunit|free={{{length|}}}}} | label31 = Basin size | data31 = {{{basin_size|}}}{{#if:{{{basin_size|}}}|{{#if:{{Isnumeric|{{{basin_size}}}}}|{{main other|&nbsp;{{error|units?}}}}}} }} | label32 = Width | rowstyle32 = {{Infobox river/row-style}} | data32 = {{#if:{{{width_min|}}}{{{width_avg|}}}{{{width_max|}}}|&nbsp;}} | label33 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;minimum</span> | rowstyle33 = {{Infobox river/row-style}} | data33 = {{Infobox river/calcunit|free={{{width_min|}}}|met_unit=m|imp_unit=yd}} | label34 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;average</span> | rowstyle34 = {{Infobox river/row-style}} | data34 = {{Infobox river/calcunit|free={{{width_avg|}}}|met_unit=m|imp_unit=yd}} | label35 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;maximum</span> | rowstyle35 = {{Infobox river/row-style}} | data35 = {{Infobox river/calcunit|free={{{width_max|}}}|met_unit=m|imp_unit=yd}} | label36 = Depth | data36 = {{#if:{{{depth_min|}}}{{{depth_avg|}}}{{{depth_max|}}}|&nbsp;}} | label37 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;minimum</span> | rowstyle37 = {{Infobox river/row-style}} | data37 = {{{depth_min|}}} | label38 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;average</span> | rowstyle38 = {{Infobox river/row-style}} | data38 = {{{depth_avg|}}} | label39 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;maximum</span> | rowstyle39 = {{Infobox river/row-style}} | data39 = {{{depth_max|}}} | rowstyle50 = display:none; | data50 = {{Infobox river/discharge|loc={{{discharge1_location|}}} |min={{Infobox river/calcunit|free={{{discharge1_min|}}}|met_unit=m3/s|imp_unit=cuft/s}} |avg={{Infobox river/calcunit|free={{{discharge1_avg|}}}|met_unit=m3/s|imp_unit=cuft/s}} |max={{Infobox river/calcunit|free={{{discharge1_max|}}}|met_unit=m3/s|imp_unit=cuft/s}} }} | rowstyle51 = display:none; | data51 = {{Infobox river/discharge|loc={{{discharge2_location|}}}|min={{{discharge2_min|}}}|avg={{{discharge2_avg|}}}|max={{{discharge2_max|}}}}} | rowstyle52 = display:none; | data52 = {{Infobox river/discharge|loc={{{discharge3_location|}}}|min={{{discharge3_min|}}}|avg={{{discharge3_avg|}}}|max={{{discharge3_max|}}}}} | rowstyle53 = display:none; | data53 = {{Infobox river/discharge|loc={{{discharge4_location|}}}|min={{{discharge4_min|}}}|avg={{{discharge4_avg|}}}|max={{{discharge4_max|}}}}} | rowstyle54 = display:none; | data54 = {{Infobox river/discharge|loc={{{discharge5_location|}}}|min={{{discharge5_min|}}}|avg={{{discharge5_avg|}}}|max={{{discharge5_max|}}}}} | header55 = Basin&nbsp;features | label56 = Progression | data56 = {{{progression|}}} | label57 = {{nowrap|[[Drainage basin|River system]]}} | data57 = {{{river_system|{{{parent|}}}}}} | label58 = Landmarks | data58 = {{{basin_landmarks|{{{landmark|}}}}}} | label59 = Cities | data59 = {{{cities|{{{city|}}}}}} | label60 = Population | data60 = {{{basin_population|}}} | label61 = Tributaries | data61 = {{#if:{{{tributaries_left|}}}{{{tributaries_right|}}}|&nbsp;}} | rowstyle61 = {{Infobox river/row-style}} | label62 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;left</span> | rowstyle62 = {{Infobox river/row-style}} | data62 = {{{tributaries_left|}}} | label63 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;right</span> | rowstyle63 = {{Infobox river/row-style}} | data63 = {{{tributaries_right|}}} | label64 = Waterbodies | data64 = {{{waterbodies|}}} | label65 = Waterfalls | data65 = {{{waterfalls|}}} | label66 = Bridges | data66 = {{{bridges|}}} | label67 = [[Inland port]]s | data67 = {{{ports|}}} | label68 = {{{custom_label|}}} | data68 = {{{custom_data|}}} | below = {{{extra|}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox river with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox river]] with unknown parameter "_VALUE_"|ignoreblank=y| basin_landmarks | basin_population | basin_size | bridges | cities | city | country | country_type | custom_data | custom_label | depth_avg | depth_max | depth_min | discharge1_avg | discharge1_location | discharge1_max | discharge1_min | discharge2_avg | discharge2_location | discharge2_max | discharge2_min | discharge3_avg | discharge3_location | discharge3_max | discharge3_min | discharge4_avg | discharge4_location | discharge4_max | discharge4_min | discharge5_avg | discharge5_location | discharge5_max | discharge5_min | district | district_type | embed | etymology | extra | fetchwikidata | image | image_alt | image_caption | image_size | image_upright | landmark | length | map | map_alt | map_caption | map_size | mouth | mouth_coord_ref | mouth_coordinates | mouth_elevation | mouth_location | municipality | municipality_type | name | name_etymology | name_native | name_other | native_name | nickname | other_name | parent | ports | progression | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_map_relief | pushpin_map_size | qid | region | region_type | river_system | source_confluence | source_confluence_coord_ref | source_confluence_coordinates | source_confluence_elevation | source_confluence_location | source1 | source1_coord_ref | source1_coordinates | source1_elevation | source1_length | source1_location | source2 | source2_coord_ref | source2_coordinates | source2_elevation | source2_length | source2_location | source3 | source3_coord_ref | source3_coordinates | source3_elevation | source3_length | source3_location | source4 | source4_coord_ref | source4_coordinates | source4_elevation | source4_length | source4_location | source5 | source5_coord_ref | source5_coordinates | source5_elevation | source5_length | source5_location | state | state_type | subdivision_name1 | subdivision_name2 | subdivision_name3 | subdivision_name4 | subdivision_name5 | subdivision_type1 | subdivision_type2 | subdivision_type3 | subdivision_type4 | subdivision_type5 | suppressfields | tributaries_left | tributaries_right | waterbodies | waterfalls | width_avg | width_max | width_min }}<noinclude> {{Documentation}} </noinclude> fj1614dkp7yhqx9vrb0tmh101to79vm Templat:Infobox river/calcunit 10 132 319 318 2024-08-09T09:19:54Z Jon Harald Søby 58 2 semakan diimportkan 318 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0kraq53t9qd1pk78dm0bdzpq4xhnh9u Templat:Infobox river/discharge 10 133 321 320 2024-08-09T09:19:55Z Jon Harald Søby 58 1 semakan diimportkan 320 wikitext text/x-wiki {{#if:{{{discharge|}}}{{{loc|}}}{{{min|}}}{{{avg|}}}{{{max|}}}|{{infobox | child = yes | label1 = Discharge | rowstyle1 = {{Infobox river/row-style}} | data1 = {{#if:{{{discharge|}}}|{{{discharge}}}|{{#if:{{{loc|}}}{{{min|}}}{{{avg|}}}{{{max|}}}|&nbsp;}}}} | label2 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;location</span> | rowstyle2 = {{Infobox river/row-style}} | data2 = {{{loc|}}} | label3 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;average</span> | rowstyle3 = {{Infobox river/row-style}} | data3 = {{{avg|}}} | label4 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;minimum</span> | rowstyle4 = {{Infobox river/row-style}} | data4 = {{{min|}}} | label5 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;maximum</span> | rowstyle5 = {{Infobox river/row-style}} | data5 = {{{max|}}} }}}}<noinclude> {{Documentation}} </noinclude> 5rpveqcdfnyrq5gvgnp988clavusdbe Templat:Infobox river/row-style 10 134 323 322 2024-08-09T09:19:55Z Jon Harald Søby 58 1 semakan diimportkan 322 wikitext text/x-wiki <noinclude>{{Pp-template|small=yes}}</noinclude>padding: 0 0.6em 0.2em 0.6em;line-height: 1.2em; klsp9kfrr2v14i7rnhbpodv2sy0mw92 Templat:Infobox river/source 10 135 325 324 2024-08-09T09:19:55Z Jon Harald Søby 58 1 semakan diimportkan 324 wikitext text/x-wiki <noinclude>{{Pp-template|small=yes}}</noinclude>{{#if:{{{source|}}}{{{loc|}}}{{{coord|}}}{{{len|}}}{{{elev|}}}|{{infobox | child = yes | label1 = {{#if:{{{1|}}}|{{{1}}}|Source}} | data1 = {{#if:{{{source|}}}|{{{source}}}|{{#if:{{{loc|}}}{{{coord|}}}{{{len|}}}{{{elev|}}}|&nbsp;}}}} | label2 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;location</span> | rowstyle2 = {{Infobox river/row-style}} | data2 = {{{loc|}}} | label3 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;coordinates</span> | rowstyle3 = {{Infobox river/row-style}} | data3 = {{{coord|}}}{{{coord_ref|}}} | label4 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;length</span> | rowstyle4 = {{Infobox river/row-style}} | data4 = {{{len|}}} | label5 = <span style="font-weight:normal">&nbsp;&bull;&nbsp;elevation</span> | rowstyle5 = {{Infobox river/row-style}} | data5 = {{{elev|}}} }}}} 4wyb6ji5k9kqzpnngtg8e8xuzvhpm9r Templat:Infobox scientist 10 136 327 326 2024-08-09T09:19:55Z Jon Harald Søby 58 1 semakan diimportkan 326 wikitext text/x-wiki {{#invoke:Template wrapper|wrap|_template=Infobox person | _alias-map = resting place:resting_place,restingplace:resting_place,resting place coordinates:resting_place_coordinates,restingplacecoordinates:resting_place_coordinates,module:module2 | _exclude = child,embed,pronounce,Pronounce,Pronunciation,pronunciation,pronounce ref,pronounce comment,pronounce 2,awards,prizes,field,fields,workplaces,work_institutions,work_institution,patrons,thesis_title,thesis_url,thesis_year,thesis1_title,thesis1_url,thesis1_year,thesis2_title,thesis2_url,thesis2_year,doctoral_advisors,doctoral_advisor,academic_advisors,doctoral_students,notable_students,author_abbreviation_bot,author_abbrev_bot,author_abbreviation_zoo,author_abbrev_zoo | template_name = infobox scientist | child = {{lc:{{{child|{{{embed|}}}}}}}} | pronunciation = {{#if:{{{pronounce|}}}{{{Pronounce|}}}{{{Pronunciation|}}}{{{pronunciation|}}}{{{pronounce comment|}}} |<!-- -->{{ubl|1={{{pronounce|}}}{{{Pronounce|}}}{{{Pronunciation|}}}{{{pronunciation|}}}{{{pronounce ref|}}}&#x20;{{{pronounce comment|}}}<!-- -->|2={{{pronounce 2|}}} }}}} | awards = {{{awards|}}}{{{prizes|}}} | signature_type = Signature | module = {{#if:{{{field|}}}{{{fields|}}}{{{workplaces|}}}{{{work_institutions|}}}{{{work_institution|}}}{{{patrons|}}}{{{thesis_title|}}}{{{thesis1_title|}}}{{{thesis2_title|}}}{{{doctoral_advisors|}}}{{{doctoral_advisor|}}}{{{academic_advisors|}}}{{{doctoral_students|}}}{{{notable_students|}}}{{{influences|}}}{{{influenced|}}}{{{author_abbreviation_bot|}}}{{{author_abbrev_bot|}}}{{{author_abbreviation_zoo|}}}{{{author_abbrev_zoo|}}} |{{Infobox | child = yes | title = '''Scientific career''' | decat = yes <!-- remove from template:infobox tracking categories --> | label1 = Fields | class1 = category | data1 = {{if empty|{{{field|}}}|{{{fields|}}}}} | label2 = Institutions | data2 = {{if empty|{{{workplaces|}}}|{{{work_institutions|}}}|{{{work_institution|}}}}} | label3 = Patrons | data3 = {{{patrons|}}} | label4 = {{#if:{{{thesis2_title|}}} |[[Thesis|Theses]] |[[Thesis]]}} | data4 = {{#if:{{{thesis1_title|}}}{{{thesis2_title|}}} | {{startplainlist}} * {{#if:{{{thesis1_title|}}} | {{#if:{{{thesis1_url|}}} |[{{{thesis1_url}}} ''{{{thesis1_title}}}''] |''{{{thesis1_title}}}''}}}}<!-- -->{{#if:{{{thesis1_year|}}} |&nbsp;{{resize|97%|({{{thesis1_year}}})}} }} * {{#if:{{{thesis2_title|}}} | {{#if:{{{thesis2_url|}}} |[{{{thesis2_url}}} ''{{{thesis2_title}}}''] |''{{{thesis2_title}}}''}}}}<!-- -->{{#if:{{{thesis2_year|}}} |&nbsp;{{resize|97%|({{{thesis2_year}}})}} }} {{endplainlist}} | {{#if:{{{thesis_title|}}} | {{#if:{{{thesis_url|}}} |[{{{thesis_url}}} ''{{{thesis_title}}}''] |''{{{thesis_title}}}''}}}}<!-- -->{{#if:{{{thesis_year|}}} |&nbsp;{{resize|97%|({{{thesis_year}}})}} }} }} | label5 = [[Doctoral advisor]]{{#if:{{{doctoral_advisors|}}}|s}} | data5 = {{if empty|{{{doctoral_advisors|}}}|{{{doctoral_advisor|}}}}} | label6 = {{#if:{{{doctoral_advisors|}}}{{{doctoral_advisor|}}} |Other&nbsp;academic advisors |Academic advisors}} | data6 = {{{academic_advisors|}}} | label7 = Doctoral students | data7 = {{{doctoral_students|}}} | label8 = {{#if:{{{doctoral_students|}}} |Other&nbsp;notable students |Notable students}} | data8 = {{{notable_students|}}} | label11 = [[Author citation (botany)|Author&nbsp;abbrev. (botany)]] | data11 = {{if empty|{{{author_abbreviation_bot|}}}|{{{author_abbrev_bot|}}}}} | label12 = [[Author citation (zoology)|Author&nbsp;abbrev. (zoology)]] | data12 = {{if empty|{{{author_abbreviation_zoo|}}}|{{{author_abbrev_zoo|}}}}} | rowclass3 = note }} }} }}<!--Auto-categorisation: -->{{main other|{{#if:{{{author_abbreviation_zoo|{{{author_abbrev_zoo|}}}}}} | [[Kategori:Zoologists with author abbreviations|{{{author_abbreviation_zoo|{{{author_abbrev_zoo}}}}}}]] }}}}<!-- -->{{#invoke:Check for clobbered parameters|check | nested = 1 | template = [[Templat:Infobox scientist|infobox scientist]] | cat = {{main other|Category:Pages using infobox scientist with conflicting parameters}} | child; embed | module; module2 | resting place; resting_place; restingplace | resting place coordinates; resting_place_coordinates; restingplacecoordinates | field; fields | workplaces; work_institutions; work_institution | doctoral_advisors; doctoral_advisor | author_abbreviation_bot; author_abbrev_bot | author_abbreviation_zoo; author_abbrev_zoo }}<noinclude> {{Documentation}} </noinclude> qvtgsnfsvudcplspluh1e0y9652xk2t Templat:Infobox settlement 10 137 329 328 2024-08-09T09:19:55Z Jon Harald Søby 58 1 semakan diimportkan 328 wikitext text/x-wiki <includeonly>{{main other|{{#invoke:Settlement short description|main}}|}}{{Infobox | child = {{yesno|{{{embed|}}}}} | templatestyles =Infobox settlement/styles.css | bodyclass = ib-settlement vcard <!--** names, type, and transliterations ** --> | above = <div class="fn org">{{if empty|{{{name|}}}|{{{official_name|}}}|{{PAGENAMEBASE}}}}</div> {{#if:{{{native_name|}}}|<div class="nickname ib-settlement-native" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}}{{#if:{{{other_name|}}}|<div class="nickname ib-settlement-other-name">{{{other_name}}}</div>}} | subheader = {{#if:{{{settlement_type|{{{type|}}}}}}|<div class="category">{{{settlement_type|{{{type}}}}}}</div>}} | rowclass1 = mergedtoprow ib-settlement-official | data1 = {{#if:{{{name|}}}|{{{official_name|}}}}} <!-- ***Transliteration language 1*** --> | rowclass2 = mergedtoprow | header2 = {{#if:{{{translit_lang1|}}}|{{{translit_lang1}}}&nbsp;transcription(s)}} | rowclass3 = {{#if:{{{translit_lang1_type1|}}}|mergedrow|mergedbottomrow}} | label3 = &nbsp;•&nbsp;{{{translit_lang1_type}}} | data3 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type|}}}|{{{translit_lang1_info|}}}}}}} | rowclass4 = {{#if:{{{translit_lang1_type2|}}}|mergedrow|mergedbottomrow}} | label4 = &nbsp;•&nbsp;{{{translit_lang1_type1}}} | data4 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type1|}}}|{{{translit_lang1_info1|}}}}}}} | rowclass5 = {{#if:{{{translit_lang1_type3|}}}|mergedrow|mergedbottomrow}} | label5 =&nbsp;•&nbsp;{{{translit_lang1_type2}}} | data5 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type2|}}}|{{{translit_lang1_info2|}}}}}}} | rowclass6 = {{#if:{{{translit_lang1_type4|}}}|mergedrow|mergedbottomrow}} | label6 = &nbsp;•&nbsp;{{{translit_lang1_type3}}} | data6 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type3|}}}|{{{translit_lang1_info3|}}}}}}} | rowclass7 = {{#if:{{{translit_lang1_type5|}}}|mergedrow|mergedbottomrow}} | label7 = &nbsp;•&nbsp;{{{translit_lang1_type4}}} | data7 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type4|}}}|{{{translit_lang1_info4|}}}}}}} | rowclass8 = {{#if:{{{translit_lang1_type6|}}}|mergedrow|mergedbottomrow}} | label8 = &nbsp;•&nbsp;{{{translit_lang1_type5}}} | data8 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type5|}}}|{{{translit_lang1_info5|}}}}}}} | rowclass9 = mergedbottomrow | label9 = &nbsp;•&nbsp;{{{translit_lang1_type6}}} | data9 = {{#if:{{{translit_lang1|}}}|{{#if:{{{translit_lang1_type6|}}}|{{{translit_lang1_info6|}}}}}}} <!-- ***Transliteration language 2*** --> | rowclass10 = mergedtoprow | header10 = {{#if:{{{translit_lang2|}}}|{{{translit_lang2}}}&nbsp;transcription(s)}} | rowclass11 = {{#if:{{{translit_lang2_type1|}}}|mergedrow|mergedbottomrow}} | label11 = &nbsp;•&nbsp;{{{translit_lang2_type}}} | data11 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type|}}}|{{{translit_lang2_info|}}}}}}} | rowclass12 = {{#if:{{{translit_lang2_type2|}}}|mergedrow|mergedbottomrow}} | label12 = &nbsp;•&nbsp;{{{translit_lang2_type1}}} | data12 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type1|}}}|{{{translit_lang2_info1|}}}}}}} | rowclass13 = {{#if:{{{translit_lang2_type3|}}}|mergedrow|mergedbottomrow}} | label13 =&nbsp;•&nbsp;{{{translit_lang2_type2}}} | data13 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type2|}}}|{{{translit_lang2_info2|}}}}}}} | rowclass14 = {{#if:{{{translit_lang2_type4|}}}|mergedrow|mergedbottomrow}} | label14 = &nbsp;•&nbsp;{{{translit_lang2_type3}}} | data14 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type3|}}}|{{{translit_lang2_info3|}}}}}}} | rowclass15 = {{#if:{{{translit_lang2_type5|}}}|mergedrow|mergedbottomrow}} | label15 = &nbsp;•&nbsp;{{{translit_lang2_type4}}} | data15 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type4|}}}|{{{translit_lang2_info4|}}}}}}} | rowclass16 = {{#if:{{{translit_lang2_type6|}}}|mergedrow|mergedbottomrow}} | label16 = &nbsp;•&nbsp;{{{translit_lang2_type5}}} | data16 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type5|}}}|{{{translit_lang2_info5|}}}}}}} | rowclass17 = mergedbottomrow | label17 = &nbsp;•&nbsp;{{{translit_lang2_type6}}} | data17 = {{#if:{{{translit_lang2|}}}|{{#if:{{{translit_lang2_type6|}}}|{{{translit_lang2_info6|}}}}}}} <!-- end ** names, type, and transliterations ** --> <!-- ***Skyline Image*** --> | rowclass18 = mergedtoprow | data18 = {{#if:{{{image_skyline|}}}|<!-- -->{{#invoke:InfoboxImage|InfoboxImage<!-- -->|image={{{image_skyline|}}}<!-- -->|size={{if empty|{{{image_size|}}}|{{{imagesize|}}}}}|sizedefault=250px<!-- -->|alt={{if empty|{{{image_alt|}}}|{{{alt|}}}}}<!-- -->|title={{if empty|{{{image_caption|}}}|{{{caption|}}}|{{{image_alt|}}}|{{{alt|}}}}}}}<!-- -->{{#if:{{{image_caption|}}}{{{caption|}}}|<div class="ib-settlement-caption">{{if empty|{{{image_caption|}}}|{{{caption|}}}}}</div>}} }} <!-- ***Flag, Seal, Shield and Coat of arms*** --> | rowclass19 = mergedtoprow | class19 = maptable | data19 = {{#if:{{{image_flag|}}}{{{image_seal|}}}{{{image_shield|}}}{{{image_blank_emblem|}}}{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}} |{{Infobox settlement/columns | 1 = {{#if:{{{image_flag|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_flag}}}|size={{{flag_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|125px|100x100px}}|border={{yesno |{{{flag_border|}}}|yes=yes|blank=yes}}|alt={{{flag_alt|}}}|title=Flag of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<div class="ib-settlement-caption-link">{{Infobox settlement/link|type=Flag|link={{{flag_link|}}}|name={{{official_name}}}}}</div>}} | 2 = {{#if:{{{image_seal|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_seal|}}}|size={{{seal_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100x100px}}|alt={{{seal_alt|}}}|title=Official seal of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<div class="ib-settlement-caption-link">{{Infobox settlement/link|type={{#if:{{{seal_type|}}}|{{{seal_type}}}|Seal}}|link={{{seal_link|}}}|name={{{official_name}}}}}</div>}} | 3 = {{#if:{{{image_shield|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_shield|}}}||size={{{shield_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100x100px}}|alt={{{shield_alt|}}}|title=Coat of arms of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<div class="ib-settlement-caption-link">{{Infobox settlement/link|type=Coat of arms|link={{{shield_link|}}}|name={{{official_name}}}}}</div>}} | 4 = {{#if:{{{image_blank_emblem|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_blank_emblem|}}}|size={{{blank_emblem_size|}}}|sizedefault={{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}|85px|100x100px}}|alt={{{blank_emblem_alt|}}}|title=Official logo of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}<div class="ib-settlement-caption-link">{{Infobox settlement/link|type={{#if:{{{blank_emblem_type|}}}|{{{blank_emblem_type}}}}}|link={{{blank_emblem_link|}}}|name={{{official_name}}}}}</div>}} | 5 = {{#if:{{{image_map|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map}}}|size={{{mapsize|}}}|sizedefault=100x100px|alt={{{map_alt|}}}|title={{{map_caption|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption|}}}|<div class="ib-settlement-caption-link">{{{map_caption}}}</div>}}}} | 0 = {{#if:{{{pushpin_map_narrow|}}}|{{#if:{{both| {{{pushpin_map|}}} | {{{coordinates|}}} }}| {{location map|{{{pushpin_map|}}} |border = infobox |alt = {{{pushpin_map_alt|}}} |caption ={{#if:{{{pushpin_map_caption_notsmall|}}}|{{{pushpin_map_caption_notsmall|}}}|{{#if:{{{pushpin_map_caption|}}}|{{{pushpin_map_caption}}}|{{#if:{{{map_caption|}}}|{{{map_caption}}}}}}}}} |float = center |width = {{#if:{{{pushpin_mapsize|}}}|{{{pushpin_mapsize}}}|150}} |default_width = 250 |relief= {{{pushpin_relief|}}} |AlternativeMap = {{{pushpin_image|}}} |overlay_image = {{{pushpin_overlay|}}} |coordinates = {{{coordinates|}}} |label = {{#ifeq: {{lc: {{{pushpin_label_position|}}} }} | none | | {{#if:{{{pushpin_label|}}}|{{{pushpin_label}}}|{{#if:{{{name|}}}|{{{name}}}|{{{official_name|}}}}}}} }} |marksize =6 |outside = {{{pushpin_outside|}}}<!-- pin is outside the map --> |position = {{{pushpin_label_position|}}} }} }} }} }} }} <!-- ***Etymology*** --> | rowclass20 = mergedtoprow | data20 = {{#if:{{{etymology|}}}|Etymology: {{{etymology}}} }} <!-- ***Nickname*** --> | rowclass21 = {{#if:{{{etymology|}}}|mergedrow|mergedtoprow}} | data21 = {{#if:{{{nickname|}}}{{{nicknames|}}}|<!-- -->{{Pluralize from text|parse_links=1|{{if empty|{{{nickname|}}}|{{{nicknames|}}}{{force plural}}}}|<!-- -->link={{{nickname_link|}}}|singular=Nickname|likely=Nickname(s)|plural=Nicknames}}:&nbsp;<!-- --><div class="ib-settlement-nickname nickname">{{if empty|{{{nickname|}}}|{{{nicknames|}}}}}</div><!-- -->{{Main other|{{Pluralize from text|parse_links=1|{{{nickname|}}}|<!-- -->likely=[[Kategori:Pages using infobox settlement with possible nickname list]]}}}}}} <!-- ***Motto*** --> | rowclass22 = {{#if:{{{etymology|}}}{{{nickname|}}}{{{nicknames|}}}|mergedrow|mergedtoprow}} | data22 = {{#if:{{{motto|}}}{{{mottoes|}}}|<!-- -->{{Pluralize from text|{{if empty|{{{motto|}}}|{{{mottoes|}}}{{force plural}}}}|<!-- -->link={{{motto_link|}}}|singular=Motto|likely=Motto(s)|plural=Mottoes}}:&nbsp;<!-- --><div class="ib-settlement-nickname nickname">{{if empty|{{{motto|}}}|{{{mottoes|}}}}}</div><!-- -->{{Main other|{{Pluralize from text|{{{motto|}}}|<!-- -->likely=[[Kategori:Pages using infobox settlement with possible motto list]]}}}}}} <!-- ***Anthem*** --> | rowclass23 = {{#if:{{{etymology|}}}{{{nickname|}}}{{{nicknames|}}}{{{motto|}}}{{{mottoes|}}}|mergedrow|mergedtoprow}} | data23 = {{#if:{{{anthem|}}}|{{#if:{{{anthem_link|}}}|[[{{{anthem_link|}}}|Anthem:]]|Anthem:}} {{{anthem}}}}} <!-- ***Map*** --> | rowclass24 = mergedtoprow | data24 = {{#if:{{both|{{{pushpin_map_narrow|}}}|{{{pushpin_map|}}}}}||{{#if:{{{image_map|}}} |{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map}}}|size={{{mapsize|}}}|sizedefault=250px|alt={{{map_alt|}}}|title={{{map_caption|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption|}}}|<div class="ib-settlement-caption">{{{map_caption}}}</div>}} }}}} | rowclass25 = mergedrow | data25 = {{#if:{{{image_map1|}}}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map1}}}|size={{{mapsize1|}}}|sizedefault=250px|alt={{{map_alt1|}}}|title={{{map_caption1|Location of {{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}}}}}}{{#if:{{{map_caption1|}}}|<div class="ib-settlement-caption">{{{map_caption1}}}</div>}} }} <!-- ***Pushpin Map*** --> | rowclass26 = mergedtoprow | data26 = {{#if:{{{pushpin_map_narrow|}}}||{{#if:{{both| {{{pushpin_map|}}} | {{{coordinates|}}} }}| {{location map|{{{pushpin_map|}}} |border = infobox |alt = {{{pushpin_map_alt|}}} |caption ={{#if:{{{pushpin_map_caption_notsmall|}}}|{{{pushpin_map_caption_notsmall|}}}|{{#if:{{{pushpin_map_caption|}}}|{{{pushpin_map_caption}}}|{{#if:{{{map_caption|}}}|{{#if:{{{image_map|}}}||{{{map_caption}}}}}}}}}}} |float = center |width = {{{pushpin_mapsize|}}} |default_width = 250 |relief= {{{pushpin_relief|}}} |AlternativeMap = {{{pushpin_image|}}} |overlay_image = {{{pushpin_overlay|}}} |coordinates = {{{coordinates|}}} |label = {{#ifeq: {{lc: {{{pushpin_label_position|}}} }} | none | | {{#if:{{{pushpin_label|}}}|{{{pushpin_label}}}|{{#if:{{{name|}}}|{{{name}}}|{{{official_name|}}}}}}} }} |marksize =6 |outside = {{{pushpin_outside|}}}<!-- pin is outside the map --> |position = {{{pushpin_label_position|}}} }} }} }} <!-- ***Coordinates*** --> | rowclass27 = {{#if:{{{image_map|}}}{{{image_map1|}}}{{{pushpin_map|}}}|{{#if:{{{grid_position|}}}|mergedrow|mergedbottomrow}}}} | data27 = {{#if:{{{coordinates|}}} |Coordinates{{#if:{{{coor_pinpoint|{{{coor_type|}}}}}}|&#32;({{{coor_pinpoint|{{{coor_type|}}}}}})}}: {{#invoke:ISO 3166|geocoordinsert|nocat=true|1={{{coordinates|}}}|country={{{subdivision_name|}}}|subdivision1={{{subdivision_name1|}}}|subdivision2={{{subdivision_name2|}}}|subdivision3={{{subdivision_name3|}}}|type=city{{#if:{{{population_total|}}}|{{#iferror:{{#expr:{{formatnum:{{{population_total}}}|R}}+1}}||({{formatnum:{{replace|{{{population_total}}}|,|}}|R}})}}}} }}{{{coordinates_footnotes|}}} }} | rowclass28 = {{#if:{{{image_map|}}}{{{image_map1|}}}{{{pushpin_map|}}}|mergedbottomrow|mergedrow}} | label28 = {{if empty|{{{grid_name|}}}|Grid&nbsp;position}} | data28 = {{{grid_position|}}} <!-- ***Subdivisions*** --> | rowclass29 = mergedtoprow | label29 = {{{subdivision_type}}} | data29 = {{#if:{{{subdivision_type|}}}|{{{subdivision_name|}}} }} | rowclass30 = mergedrow | label30 = {{{subdivision_type1}}} | data30 = {{#if:{{{subdivision_type1|}}}|{{{subdivision_name1|}}} }} | rowclass31 = mergedrow | label31 = {{{subdivision_type2}}} | data31 = {{#if:{{{subdivision_type2|}}}|{{{subdivision_name2|}}} }} | rowclass32 = mergedrow | label32 = {{{subdivision_type3}}} | data32 = {{#if:{{{subdivision_type3|}}}|{{{subdivision_name3|}}} }} | rowclass33 = mergedrow | label33 = {{{subdivision_type4}}} | data33 = {{#if:{{{subdivision_type4|}}}|{{{subdivision_name4|}}} }} | rowclass34 = mergedrow | label34 = {{{subdivision_type5}}} | data34 = {{#if:{{{subdivision_type5|}}}|{{{subdivision_name5|}}} }} | rowclass35 = mergedrow | label35 = {{{subdivision_type6}}} | data35 = {{#if:{{{subdivision_type6|}}}|{{{subdivision_name6|}}} }} <!--***Established*** --> | rowclass36 = mergedtoprow | label36 = {{{established_title}}} | data36 = {{#if:{{{established_title|}}}|{{{established_date|}}} }} | rowclass37 = mergedrow | label37 = {{{established_title1}}} | data37 = {{#if:{{{established_title1|}}}|{{{established_date1|}}} }} | rowclass38 = mergedrow | label38 = {{{established_title2}}} | data38 = {{#if:{{{established_title2|}}}|{{{established_date2|}}} }} | rowclass39 = mergedrow | label39 = {{{established_title3}}} | data39 = {{#if:{{{established_title3|}}}|{{{established_date3|}}} }} | rowclass40 = mergedrow | label40 = {{{established_title4}}} | data40 = {{#if:{{{established_title4|}}}|{{{established_date4|}}} }} | rowclass41 = mergedrow | label41 = {{{established_title5}}} | data41 = {{#if:{{{established_title5|}}}|{{{established_date5|}}} }} | rowclass42 = mergedrow | label42 = {{{established_title6}}} | data42 = {{#if:{{{established_title6|}}}|{{{established_date6|}}} }} | rowclass43 = mergedrow | label43 = {{{established_title7}}} | data43 = {{#if:{{{established_title7|}}}|{{{established_date7|}}} }} | rowclass44 = mergedrow | label44 = {{{extinct_title}}} | data44 = {{#if:{{{extinct_title|}}}|{{{extinct_date|}}} }} | rowclass45 = mergedrow | label45 = Founded by | data45 = {{{founder|}}} | rowclass46 = mergedrow | label46 = [[Namesake|Named for]] | data46 = {{{named_for|}}} <!-- ***Seat of government and subdivisions within the settlement*** --> | rowclass47 = mergedtoprow | label47 = {{#if:{{{seat_type|}}}|{{{seat_type}}}|Seat}} | data47 = {{{seat|}}} | rowclass48 = mergedrow | label48 = {{#if:{{{seat1_type|}}}|{{{seat1_type}}}|Former seat}} | data48 = {{{seat1|}}} | rowclass49 = mergedrow | label49 = {{#if:{{{seat2_type|}}}|{{{seat2_type}}}|Former seat}} | data49 = {{{seat2|}}} | rowclass51 = {{#if:{{{seat|}}}{{{seat1|}}}{{{seat2|}}}|mergedrow|mergedtoprow}} | label51 = {{#if:{{{parts_type|}}}|{{{parts_type}}}|Boroughs}} | data51 = {{#if:{{{parts|}}}{{{p1|}}} |{{#ifeq:{{{parts_style|}}}|para |<b>{{{parts|}}}{{#if:{{both|{{{parts|}}}|{{{p1|}}}}}|&#58;&nbsp;|}}</b>{{comma separated entries|{{{p1|}}}|{{{p2|}}}|{{{p3|}}}|{{{p4|}}}|{{{p5|}}}|{{{p6|}}}|{{{p7|}}}|{{{p8|}}}|{{{p9|}}}|{{{p10|}}}|{{{p11|}}}|{{{p12|}}}|{{{p13|}}}|{{{p14|}}}|{{{p15|}}}|{{{p16|}}}|{{{p17|}}}|{{{p18|}}}|{{{p19|}}}|{{{p20|}}}|{{{p21|}}}|{{{p22|}}}|{{{p23|}}}|{{{p24|}}}|{{{p25|}}}|{{{p26|}}}|{{{p27|}}}|{{{p28|}}}|{{{p29|}}}|{{{p30|}}}|{{{p31|}}}|{{{p32|}}}|{{{p33|}}}|{{{p34|}}}|{{{p35|}}}|{{{p36|}}}|{{{p37|}}}|{{{p38|}}}|{{{p39|}}}|{{{p40|}}}|{{{p41|}}}|{{{p42|}}}|{{{p43|}}}|{{{p44|}}}|{{{p45|}}}|{{{p46|}}}|{{{p47|}}}|{{{p48|}}}|{{{p49|}}}|{{{p50|}}}}} |{{#if:{{{p1|}}}|{{Collapsible list|title={{{parts|}}}|expand={{#switch:{{{parts_style|}}}|coll=|list=y|{{#if:{{{p6|}}}||y}}}}|1={{{p1|}}}|2={{{p2|}}}|3={{{p3|}}}|4={{{p4|}}}|5={{{p5|}}}|6={{{p6|}}}|7={{{p7|}}}|8={{{p8|}}}|9={{{p9|}}}|10={{{p10|}}}|11={{{p11|}}}|12={{{p12|}}}|13={{{p13|}}}|14={{{p14|}}}|15={{{p15|}}}|16={{{p16|}}}|17={{{p17|}}}|18={{{p18|}}}|19={{{p19|}}}|20={{{p20|}}}|21={{{p21|}}}|22={{{p22|}}}|23={{{p23|}}}|24={{{p24|}}}|25={{{p25|}}}|26={{{p26|}}}|27={{{p27|}}}|28={{{p28|}}}|29={{{p29|}}}|30={{{p30|}}}|31={{{p31|}}}|32={{{p32|}}}|33={{{p33|}}}|34={{{p34|}}}|35={{{p35|}}}|36={{{p36|}}}|37={{{p37|}}}|38={{{p38|}}}|39={{{p39|}}}|40={{{p40|}}}|41={{{p41|}}}|42={{{p42|}}}|43={{{p43|}}}|44={{{p44|}}}|45={{{p45|}}}|46={{{p46|}}}|47={{{p47|}}}|48={{{p48|}}}|49={{{p49|}}}|50={{{p50|}}}}} |{{{parts}}} }} }} }} <!-- ***Government type and Leader*** --> | rowclass52 = mergedtoprow | header52 = {{#if:{{{government_type|}}}{{{governing_body|}}}{{{leader_name|}}}{{{leader_name1|}}}{{{leader_name2|}}}{{{leader_name3|}}}{{{leader_name4|}}}|Government<div class="ib-settlement-fn">{{{government_footnotes|}}}</div>}} <!-- ***Government*** --> | rowclass53 = mergedrow | label53 = &nbsp;•&nbsp;Type | data53 = {{{government_type|}}} | rowclass54 = mergedrow | label54 = &nbsp;•&nbsp;Body | class54 = agent | data54 = {{{governing_body|}}} | rowclass55 = mergedrow | label55 = &nbsp;•&nbsp;{{{leader_title}}} | data55 = {{#if:{{{leader_title|}}}|{{{leader_name|}}} {{#if:{{{leader_party|}}}|({{Polparty|{{{subdivision_name}}}|{{{leader_party}}}}})}}}} | rowclass56 = mergedrow | label56 = &nbsp;•&nbsp;{{{leader_title1}}} | data56 = {{#if:{{{leader_title1|}}}|{{{leader_name1|}}}}} | rowclass57 = mergedrow | label57 = &nbsp;•&nbsp;{{{leader_title2}}} | data57 = {{#if:{{{leader_title2|}}}|{{{leader_name2|}}}}} | rowclass58 = mergedrow | label58 = &nbsp;•&nbsp;{{{leader_title3}}} | data58 = {{#if:{{{leader_title3|}}}|{{{leader_name3|}}}}} | rowclass59 = mergedrow | label59 = &nbsp;•&nbsp;{{{leader_title4}}} | data59 = {{#if:{{{leader_title4|}}}|{{{leader_name4|}}}}} | rowclass60 = mergedrow | label60 = {{{government_blank1_title}}} | data60 = {{#if:{{{government_blank1|}}}|{{{government_blank1|}}}}} | rowclass61 = mergedrow | label61 = {{{government_blank2_title}}} | data61 = {{#if:{{{government_blank2|}}}|{{{government_blank2|}}}}} | rowclass62 = mergedrow | label62 = {{{government_blank3_title}}} | data62 = {{#if:{{{government_blank3|}}}|{{{government_blank3|}}}}} | rowclass63 = mergedrow | label63 = {{{government_blank4_title}}} | data63 = {{#if:{{{government_blank4|}}}|{{{government_blank4|}}}}} | rowclass64 = mergedrow | label64 = {{{government_blank5_title}}} | data64 = {{#if:{{{government_blank5|}}}|{{{government_blank5|}}}}} | rowclass65 = mergedrow | label65 = {{{government_blank6_title}}} | data65 = {{#if:{{{government_blank6|}}}|{{{government_blank6|}}}}} <!-- ***Geographical characteristics*** --> <!-- ***Area*** --> | rowclass66 = mergedtoprow | header66 = {{#if:{{{area_total_km2|}}}{{{area_total_ha|}}}{{{area_total_acre|}}}{{{area_total_sq_mi|}}}{{{area_total_dunam|}}}{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_acre|}}}{{{area_land_sq_mi|}}}{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_acre|}}}{{{area_water_sq_mi|}}}{{{area_urban_km2|}}}{{{area_urban_ha|}}}{{{area_urban_acre|}}}{{{area_urban_sq_mi|}}}{{{area_rural_sq_mi|}}}{{{area_rural_ha|}}}{{{area_rural_acre|}}}{{{area_rural_km2|}}}{{{area_metro_km2|}}}{{{area_metro_ha|}}}{{{area_metro_acre|}}}{{{area_blank1_km2|}}}{{{area_blank1_ha|}}}{{{area_blank1_acre|}}}{{{area_metro_sq_mi|}}}{{{area_blank1_sq_mi|}}} |{{#if:{{both|{{#ifeq:{{{total_type}}}|&nbsp;|1}}|{{{area_total_km2|}}}{{{area_total_ha|}}}{{{area_total_acre|}}}{{{area_total_sq_mi|}}}{{{area_total_dunam|}}}}} |<!-- displayed below --> |Area<div class="ib-settlement-fn">{{{area_footnotes|}}}</div> }} }} | rowclass67 = {{#if:{{both|{{#ifeq:{{{total_type}}}|&nbsp;|1}}|{{{area_total_km2|}}}{{{area_total_ha|}}}{{{area_total_acre|}}}{{{area_total_sq_mi|}}}{{{area_total_dunam|}}}}}|mergedtoprow|mergedrow}} | label67 = {{#if:{{both|{{#ifeq:{{{total_type}}}|&nbsp;|1}}|{{{area_total_km2|}}}{{{area_total_ha|}}}{{{area_total_acre|}}}{{{area_total_sq_mi|}}}{{{area_total_dunam|}}}}} |Area<div class="ib-settlement-fn">{{{area_footnotes|}}}</div> |&nbsp;•&nbsp;{{#if:{{{total_type|}}}|{{{total_type}}}|{{#if:{{{area_metro_km2|}}}{{{area_metro_sq_mi|}}}{{{area_urban_km2|}}}{{{area_urban_sq_mi|}}}{{{area_rural_km2|}}}{{{area_rural_sq_mi|}}}{{{population_metro|}}}{{{population_urban|}}}{{{population_rural|}}}|{{#if:{{{settlement_type|{{{type|}}}}}}|{{{settlement_type|{{{type}}}}}}|City}}|Total}}}} }} | data67 = {{#if:{{{area_total_km2|}}}{{{area_total_ha|}}}{{{area_total_acre|}}}{{{area_total_sq_mi|}}}{{{area_total_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_total_km2|}}} |ha ={{{area_total_ha|}}} |acre ={{{area_total_acre|}}} |sqmi ={{{area_total_sq_mi|}}} |dunam={{{area_total_dunam|}}} |link ={{#switch:{{{dunam_link|}}}||on|total=on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass68 = mergedrow | label68 = &nbsp;•&nbsp;Land | data68 = {{#if:{{{area_land_km2|}}}{{{area_land_ha|}}}{{{area_land_acre|}}}{{{area_land_sq_mi|}}}{{{area_land_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_land_km2|}}} |ha ={{{area_land_ha|}}} |acre ={{{area_land_acre|}}} |sqmi ={{{area_land_sq_mi|}}} |dunam={{{area_land_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|land|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass69 = mergedrow | label69 = &nbsp;•&nbsp;Water | data69 = {{#if:{{{area_water_km2|}}}{{{area_water_ha|}}}{{{area_water_acre|}}}{{{area_water_sq_mi|}}}{{{area_water_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_water_km2|}}} |ha ={{{area_water_ha|}}} |acre ={{{area_water_acre|}}} |sqmi ={{{area_water_sq_mi|}}} |dunam={{{area_water_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|water|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }} {{#if:{{{area_water_percent|}}}| &nbsp;{{{area_water_percent}}}{{#ifeq:%|{{#invoke:String|sub|{{{area_water_percent|}}}|-1}}||%}}}}}} | rowclass70 = mergedrow | label70 = &nbsp;•&nbsp;Urban<div class="ib-settlement-fn">{{{area_urban_footnotes|}}}</div> | data70 = {{#if:{{{area_urban_km2|}}}{{{area_urban_ha|}}}{{{area_urban_acre|}}}{{{area_urban_sq_mi|}}}{{{area_urban_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_urban_km2|}}} |ha ={{{area_urban_ha|}}} |acre ={{{area_urban_acre|}}} |sqmi ={{{area_urban_sq_mi|}}} |dunam={{{area_urban_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|urban|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass71 = mergedrow | label71 = &nbsp;•&nbsp;Rural<div class="ib-settlement-fn">{{{area_rural_footnotes|}}}</div> | data71 = {{#if:{{{area_rural_km2|}}}{{{area_rural_ha|}}}{{{area_rural_acre|}}}{{{area_rural_sq_mi|}}}{{{area_rural_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_rural_km2|}}} |ha ={{{area_rural_ha|}}} |acre ={{{area_rural_acre|}}} |sqmi ={{{area_rural_sq_mi|}}} |dunam={{{area_rural_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|rural|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass72 = mergedrow | label72 =&nbsp;•&nbsp;Metro<div class="ib-settlement-fn">{{{area_metro_footnotes|}}}</div> | data72 = {{#if:{{{area_metro_km2|}}}{{{area_metro_ha|}}}{{{area_metro_acre|}}}{{{area_metro_sq_mi|}}}{{{area_metro_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_metro_km2|}}} |ha ={{{area_metro_ha|}}} |acre ={{{area_metro_acre|}}} |sqmi ={{{area_metro_sq_mi|}}} |dunam={{{area_metro_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|metro|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} <!-- ***Area rank*** --> | rowclass73 = mergedrow | label73 = &nbsp;•&nbsp;Rank | data73 = {{{area_rank|}}} | rowclass74 = mergedrow | label74 = &nbsp;•&nbsp;{{{area_blank1_title}}} | data74 = {{#if:{{{area_blank1_km2|}}}{{{area_blank1_ha|}}}{{{area_blank1_acre|}}}{{{area_blank1_sq_mi|}}}{{{area_blank1_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_blank1_km2|}}} |ha ={{{area_blank1_ha|}}} |acre ={{{area_blank1_acre|}}} |sqmi ={{{area_blank1_sq_mi|}}} |dunam={{{area_blank1_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|blank1|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass75 = mergedrow | label75 = &nbsp;•&nbsp;{{{area_blank2_title}}} | data75 = {{#if:{{{area_blank2_km2|}}}{{{area_blank2_ha|}}}{{{area_blank2_acre|}}}{{{area_blank2_sq_mi|}}}{{{area_blank2_dunam|}}} |{{infobox_settlement/areadisp |km2 ={{{area_blank2_km2|}}} |ha ={{{area_blank2_ha|}}} |acre ={{{area_blank2_acre|}}} |sqmi ={{{area_blank2_sq_mi|}}} |dunam={{{area_blank2_dunam|}}} |link ={{#ifeq:{{{dunam_link|}}}|blank2|on}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass76 = mergedrow | label76 = &nbsp; | data76 = {{{area_note|}}} <!-- ***Dimensions*** --> | rowclass77 = mergedtoprow | header77 = {{#if:{{{length_km|}}}{{{length_mi|}}}{{{width_km|}}}{{{width_mi|}}}|Dimensions<div class="ib-settlement-fn">{{{dimensions_footnotes|}}}</div>}} | rowclass78 = mergedrow | label78 = &nbsp;•&nbsp;Length | data78 = {{#if:{{{length_km|}}}{{{length_mi|}}} | {{infobox_settlement/lengthdisp |km ={{{length_km|}}} |mi ={{{length_mi|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} | rowclass79 = mergedrow | label79 = &nbsp;•&nbsp;Width | data79 = {{#if:{{{width_km|}}}{{{width_mi|}}} |{{infobox_settlement/lengthdisp |km ={{{width_km|}}} |mi ={{{width_mi|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} <!-- ***Elevation*** --> | rowclass80 = mergedtoprow | label80 = {{#if:{{{elevation_link|}}}|[[{{{elevation_link|}}}|Elevation]]|Elevation}}<div class="ib-settlement-fn">{{{elevation_footnotes|}}}{{#if:{{{elevation_point|}}}|&#32;({{{elevation_point}}})}}</div> | data80 = {{#if:{{{elevation_m|}}}{{{elevation_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_m|}}} |ft ={{{elevation_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} | rowclass81 = {{#if:{{{elevation_m|}}}{{{elevation_ft|}}}|mergedrow|mergedtoprow}} | label81 = Highest&nbsp;elevation<div class="ib-settlement-fn">{{{elevation_max_footnotes|}}}{{#if:{{{elevation_max_point|}}}|&#32;({{{elevation_max_point}}})}}</div> | data81 = {{#if:{{{elevation_max_m|}}}{{{elevation_max_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_max_m|}}} |ft ={{{elevation_max_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} <!-- ***Elevation max rank*** --> | rowclass82 = mergedrow | label82 = &nbsp;•&nbsp;Rank | data82 = {{#if:{{{elevation_max_m|}}}{{{elevation_max_ft|}}}| {{{elevation_max_rank|}}} }} | rowclass83 = {{#if:{{{elevation_min_rank|}}}|mergedrow|mergedbottomrow}} | label83 = Lowest&nbsp;elevation<div class="ib-settlement-fn">{{{elevation_min_footnotes|}}}{{#if:{{{elevation_min_point|}}}|&#32;({{{elevation_min_point}}})}}</div> | data83 = {{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}} |{{infobox_settlement/lengthdisp |m ={{{elevation_min_m|}}} |ft ={{{elevation_min_ft|}}} |pref={{{unit_pref}}} |name={{{subdivision_name}}} }} }} <!-- ***Elevation min rank*** --> | rowclass84 = mergedrow | label84 = &nbsp;•&nbsp;Rank | data84 = {{#if:{{{elevation_min_m|}}}{{{elevation_min_ft|}}}|{{{elevation_min_rank|}}}}} <!-- ***Population*** --> | rowclass85 = mergedtoprow | label85 = Population<div class="ib-settlement-fn">{{#if:{{{population_as_of|}}}|{{nbsp}}({{{population_as_of}}})}}{{{population_footnotes|}}}</div> | data85 = {{fix comma category|{{#if:{{{population|}}} | {{formatnum:{{replace|{{{population}}}|,|}}}} | {{#ifeq:{{{total_type}}}|&nbsp; | {{#if:{{{population_total|}}} | {{formatnum:{{replace|{{{population_total}}}|,|}}}} }} }} }}}} | rowclass86 = mergedtoprow | header86 = {{#if:{{{population|}}} | |{{#ifeq:{{{total_type}}}|&nbsp; | |{{#if:{{{population_total|}}}{{{population_urban|}}}{{{population_rural|}}}{{{population_metro|}}}{{{population_blank1|}}}{{{population_blank2|}}}{{{population_est|}}} |Population<div class="ib-settlement-fn">{{#if:{{{population_as_of|}}}|{{nbsp}}({{{population_as_of}}})}}{{{population_footnotes|}}}</div> }} }} }} | rowclass87 = mergedrow | label87 = &nbsp;•&nbsp;{{#if:{{{total_type|}}}|{{{total_type}}}|{{#if:{{{population_metro|}}}{{{population_urban|}}}{{{population_rural|}}}{{{area_metro_km2|}}}{{{area_metro_sq_mi|}}}{{{area_urban_km2|}}}{{{area_urban_sq_mi|}}}{{{area_rural_km2|}}}{{{area_rural_sq_mi|}}}|{{#if:{{{settlement_type|{{{type|}}}}}}|{{{settlement_type|{{{type}}}}}}|City}}|Total}}}} | data87 = {{#if:{{{population|}}} | |{{#ifeq:{{{total_type}}}|&nbsp; | |{{#if:{{{population_total|}}} | {{fix comma category|{{formatnum:{{replace|{{{population_total}}}|,|}}}}}} }} }} }} | rowclass88 = mergedrow | label88 = &nbsp;•&nbsp;Estimate&nbsp;<div class="ib-settlement-fn">({{{pop_est_as_of}}}){{{pop_est_footnotes|}}}</div> | data88 = {{#if:{{{population_est|}}}|{{fix comma category|{{formatnum:{{replace|{{{population_est}}}|,|}}}}}} }} <!-- ***Population rank*** --> | rowclass89 = mergedrow | label89 =&nbsp;•&nbsp;Rank | data89 = {{{population_rank|}}} | rowclass90 = mergedrow | label90 = &nbsp;•&nbsp;Density | data90 = {{#if:{{{population_density_km2|}}}{{{population_density_sq_mi|}}}{{{population_total|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_km2|}}} |/sqmi={{{population_density_sq_mi|}}} |pop ={{{population_total|}}} |dunam={{{area_total_dunam|}}} |ha ={{{area_total_ha|}}} |km2 ={{{area_total_km2|}}} |acre ={{{area_total_acre|}}} |sqmi ={{{area_total_sq_mi|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} <!-- ***Population density rank*** --> | rowclass91 = mergedrow | label91 = &nbsp;&nbsp;•&nbsp;Rank | data91 = {{{population_density_rank|}}} | rowclass92 = mergedrow | label92 = &nbsp;•&nbsp;[[Urban area|Urban]]<div class="ib-settlement-fn">{{{population_urban_footnotes|}}}</div> | data92 = {{#if:{{{population_urban|}}}| {{fix comma category|{{formatnum:{{replace|{{{population_urban}}}|,|}}}}}} }} | rowclass93 = mergedrow | label93 = &nbsp;•&nbsp;Urban&nbsp;density | data93 = {{#if:{{{population_density_urban_km2|}}}{{{population_density_urban_sq_mi|}}}{{{population_urban|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_urban_km2|}}} |/sqmi={{{population_density_urban_sq_mi|}}} |pop ={{{population_urban|}}} |ha ={{{area_urban_ha|}}} |km2 ={{{area_urban_km2|}}} |acre ={{{area_urban_acre|}}} |sqmi ={{{area_urban_sq_mi|}}} |dunam={{{area_urban_dunam|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass94 = mergedrow | label94 = &nbsp;•&nbsp;[[Rural area|Rural]]<div class="ib-settlement-fn">{{{population_rural_footnotes|}}}</div> | data94 = {{#if:{{{population_rural|}}}|{{fix comma category|{{formatnum:{{replace|{{{population_rural}}}|,|}}}}}}}} | rowclass95 = mergedrow | label95 = &nbsp;•&nbsp;Rural&nbsp;density | data95 = {{#if:{{{population_density_rural_km2|}}}{{{population_density_rural_sq_mi|}}}{{{population_rural|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_rural_km2|}}} |/sqmi={{{population_density_rural_sq_mi|}}} |pop ={{{population_rural|}}} |ha ={{{area_rural_ha|}}} |km2 ={{{area_rural_km2|}}} |acre ={{{area_rural_acre|}}} |sqmi ={{{area_rural_sq_mi|}}} |dunam={{{area_rural_dunam|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass96 = mergedrow | label96 =&nbsp;•&nbsp;[[Metropolitan area|Metro]]<div class="ib-settlement-fn">{{{population_metro_footnotes|}}}</div> | data96 = {{#if:{{{population_metro|}}}| {{fix comma category|{{formatnum:{{replace|{{{population_metro}}}|,|}}}}}} }} | rowclass97 = mergedrow | label97 = &nbsp;•&nbsp;Metro&nbsp;density | data97 = {{#if:{{{population_density_metro_km2|}}}{{{population_density_metro_sq_mi|}}}{{{population_metro|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_metro_km2|}}} |/sqmi={{{population_density_metro_sq_mi|}}} |pop ={{{population_metro|}}} |ha ={{{area_metro_ha|}}} |km2 ={{{area_metro_km2|}}} |acre ={{{area_metro_acre|}}} |sqmi ={{{area_metro_sq_mi|}}} |dunam={{{area_metro_dunam|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass98 = mergedrow | label98 = &nbsp;•&nbsp;{{{population_blank1_title|}}}<div class="ib-settlement-fn">{{{population_blank1_footnotes|}}}</div> | data98 = {{#if:{{{population_blank1|}}}|{{fix comma category|{{formatnum:{{replace|{{{population_blank1}}}|,|}}}}}}}} | rowclass99 = mergedrow | label99 = &nbsp;•&nbsp;{{#if:{{{population_blank1_title|}}}|{{{population_blank1_title}}} density|Density}} | data99 = {{#if:{{{population_density_blank1_km2|}}}{{{population_density_blank1_sq_mi|}}}{{{population_blank1|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_blank1_km2|}}} |/sqmi={{{population_density_blank1_sq_mi|}}} |pop ={{{population_blank1|}}} |ha ={{{area_blank1_ha|}}} |km2 ={{{area_blank1_km2|}}} |acre ={{{area_blank1_acre|}}} |sqmi ={{{area_blank1_sq_mi|}}} |dunam={{{area_blank1_dunam|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass100 = mergedrow | label100 = &nbsp;•&nbsp;{{{population_blank2_title|}}}<div class="ib-settlement-fn">{{{population_blank2_footnotes|}}}</div> | data100 = {{#if:{{{population_blank2|}}}|{{fix comma category|{{formatnum:{{replace|{{{population_blank2}}}|,|}}}}}}}} | rowclass101 = mergedrow | label101 = &nbsp;•&nbsp;{{#if:{{{population_blank2_title|}}}|{{{population_blank2_title}}} density|Density}} | data101 = {{#if:{{{population_density_blank2_km2|}}}{{{population_density_blank2_sq_mi|}}}{{{population_blank2|}}} |{{infobox_settlement/densdisp |/km2 ={{{population_density_blank2_km2|}}} |/sqmi={{{population_density_blank2_sq_mi|}}} |pop ={{{population_blank2|}}} |ha ={{{area_blank2_ha|}}} |km2 ={{{area_blank2_km2|}}} |acre ={{{area_blank2_acre|}}} |sqmi ={{{area_blank2_sq_mi|}}} |dunam={{{area_blank2_dunam|}}} |pref ={{{unit_pref}}} |name ={{{subdivision_name}}} }}}} | rowclass102 = mergedrow | label102 = &nbsp; | data102 = {{{population_note|}}} | rowclass103 = mergedtoprow | label103 = {{Pluralize from text|{{if empty|{{{population_demonym|}}}|{{{population_demonyms|}}}{{force plural}}}}|<!-- -->link=Demonym|singular=Demonym|likely=Demonym(s)|plural=Demonyms}} | data103 = {{if empty|{{{population_demonym|}}}|{{{population_demonyms|}}}}}{{Main other|{{Pluralize from text|{{{population_demonym|}}}|likely=[[Kategori:Pages using infobox settlement with possible demonym list]]}}}} <!-- ***Demographics 1*** --> | rowclass104 = mergedtoprow | header104 = {{#if:{{{demographics_type1|}}} |{{{demographics_type1}}}<div class="ib-settlement-fn">{{{demographics1_footnotes|}}}</div>}} | rowclass105 = mergedrow | label105 = &nbsp;•&nbsp;{{{demographics1_title1}}} | data105 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title1|}}}|{{{demographics1_info1|}}}}}}} | rowclass106 = mergedrow | label106 = &nbsp;•&nbsp;{{{demographics1_title2}}} | data106 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title2|}}}|{{{demographics1_info2|}}}}}}} | rowclass107 = mergedrow | label107 = &nbsp;•&nbsp;{{{demographics1_title3}}} | data107 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title3|}}}|{{{demographics1_info3|}}}}}}} | rowclass108 = mergedrow | label108 = &nbsp;•&nbsp;{{{demographics1_title4}}} | data108 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title4|}}}|{{{demographics1_info4|}}}}}}} | rowclass109 = mergedrow | label109 = &nbsp;•&nbsp;{{{demographics1_title5}}} | data109 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title5|}}}|{{{demographics1_info5|}}}}}}} | rowclass110 = mergedrow | label110 = &nbsp;•&nbsp;{{{demographics1_title6}}} | data110 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title6|}}}|{{{demographics1_info6|}}}}}}} | rowclass111 = mergedrow | label111 = &nbsp;•&nbsp;{{{demographics1_title7}}} | data111 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title7|}}}|{{{demographics1_info7|}}}}}}} | rowclass112 = mergedrow | label112 = &nbsp;•&nbsp;{{{demographics1_title8}}} | data112 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title8|}}}|{{{demographics1_info8|}}}}}}} | rowclass113 = mergedrow | label113 = &nbsp;•&nbsp;{{{demographics1_title9}}} | data113 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title9|}}}|{{{demographics1_info9|}}}}}}} | rowclass114 = mergedrow | label114 = &nbsp;•&nbsp;{{{demographics1_title10}}} | data114 = {{#if:{{{demographics_type1|}}} |{{#if:{{{demographics1_title10|}}}|{{{demographics1_info10|}}}}}}} <!-- ***Demographics 2*** --> | rowclass115 = mergedtoprow | header115 = {{#if:{{{demographics_type2|}}} |{{{demographics_type2}}}<div class="ib-settlement-fn">{{{demographics2_footnotes|}}}</div>}} | rowclass116 = mergedrow | label116 = &nbsp;•&nbsp;{{{demographics2_title1}}} | data116 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title1|}}}|{{{demographics2_info1|}}}}}}} | rowclass117 = mergedrow | label117 = &nbsp;•&nbsp;{{{demographics2_title2}}} | data117 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title2|}}}|{{{demographics2_info2|}}}}}}} | rowclass118 = mergedrow | label118 = &nbsp;•&nbsp;{{{demographics2_title3}}} | data118 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title3|}}}|{{{demographics2_info3|}}}}}}} | rowclass119 = mergedrow | label119 = &nbsp;•&nbsp;{{{demographics2_title4}}} | data119 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title4|}}}|{{{demographics2_info4|}}}}}}} | rowclass120 = mergedrow | label120 = &nbsp;•&nbsp;{{{demographics2_title5}}} | data120 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title5|}}}|{{{demographics2_info5|}}}}}}} | rowclass121 = mergedrow | label121 = &nbsp;•&nbsp;{{{demographics2_title6}}} | data121 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title6|}}}|{{{demographics2_info6|}}}}}}} | rowclass122 = mergedrow | label122 = &nbsp;•&nbsp;{{{demographics2_title7}}} | data122 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title7|}}}|{{{demographics2_info7|}}}}}}} | rowclass123 = mergedrow | label123 = &nbsp;•&nbsp;{{{demographics2_title8}}} | data123 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title8|}}}|{{{demographics2_info8|}}}}}}} | rowclass124 = mergedrow | label124 = &nbsp;•&nbsp;{{{demographics2_title9}}} | data124 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title9|}}}|{{{demographics2_info9|}}}}}}} | rowclass125 = mergedrow | label125 = &nbsp;•&nbsp;{{{demographics2_title10}}} | data125 = {{#if:{{{demographics_type2|}}} |{{#if:{{{demographics2_title10|}}}|{{{demographics2_info10|}}}}}}} <!-- ***Time Zones*** --> | rowclass126 = mergedtoprow | header126 = {{#if:{{{timezone1_location|}}}|{{#if:{{{timezone2|}}}|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]s|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]}}|}} | rowclass127 = {{#if:{{{timezone1_location|}}}|mergedrow|mergedtoprow}} | label127 = {{#if:{{{timezone1_location|}}}|{{{timezone1_location}}}|{{#if:{{{timezone2_location|}}}|{{{timezone2_location}}}|{{#if:{{{timezone2|}}}|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]s|[[{{#if:{{{timezone_link|}}}|{{{timezone_link}}}|Time zone}}|Time zone]]}}}}}} | data127 = {{#if:{{{utc_offset1|{{{utc_offset|}}} }}} |[[UTC{{{utc_offset1|{{{utc_offset}}}}}}]] {{#if:{{{timezone1|{{{timezone|}}}}}}|({{{timezone1|{{{timezone}}}}}})}} |{{{timezone1|{{{timezone|}}}}}} }} | rowclass128 = mergedrow | label128 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data128 = {{#if:{{{utc_offset1_DST|{{{utc_offset_DST|}}}}}} |[[UTC{{{utc_offset1_DST|{{{utc_offset_DST|}}}}}}]] {{#if:{{{timezone1_DST|{{{timezone_DST|}}}}}}|({{{timezone1_DST|{{{timezone_DST}}}}}})}} |{{{timezone1_DST|{{{timezone_DST|}}}}}} }} | rowclass129 = mergedrow | label129 = {{#if:{{{timezone2_location|}}}| {{{timezone2_location|}}}|<nowiki />}} | data129 = {{#if:{{{timezone1|{{{timezone|}}}}}}{{{utc_offset1|{{{utc_offset|}}}}}} |{{#if:{{{utc_offset2|{{{utc_offset2|}}} }}} |[[UTC{{{utc_offset2|{{{utc_offset2}}}}}}]] {{#if:{{{timezone2|}}}|({{{timezone2}}})}} |{{{timezone2|}}} }} }} | rowclass130 = mergedrow | label130 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data130 = {{#if:{{{utc_offset2_DST|}}}|[[UTC{{{utc_offset2_DST|}}}]] {{#if:{{{timezone2_DST|}}}|({{{timezone2_DST|}}})}} |{{{timezone2_DST|}}} }} | rowclass131 = mergedrow | label131 = {{#if:{{{timezone3_location|}}}| {{{timezone3_location|}}}|<nowiki />}} | data131 = {{#if:{{{timezone1|{{{timezone|}}}}}}{{{utc_offset1|{{{utc_offset|}}}}}} |{{#if:{{{utc_offset3|{{{utc_offset3|}}} }}} |[[UTC{{{utc_offset3|{{{utc_offset3}}}}}}]] {{#if:{{{timezone3|}}}|({{{timezone3}}})}} |{{{timezone3|}}} }} }} | rowclass132 = mergedrow | label132 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data132 = {{#if:{{{utc_offset3_DST|}}}|[[UTC{{{utc_offset3_DST|}}}]] {{#if:{{{timezone3_DST|}}}|({{{timezone3_DST|}}})}} |{{{timezone3_DST|}}} }} | rowclass133 = mergedrow | label133 = {{#if:{{{timezone4_location|}}}| {{{timezone4_location|}}}|<nowiki />}} | data133 = {{#if:{{{timezone1|{{{timezone|}}}}}}{{{utc_offset1|{{{utc_offset|}}}}}} |{{#if:{{{utc_offset4|{{{utc_offset4|}}} }}} |[[UTC{{{utc_offset4|{{{utc_offset4}}}}}}]] {{#if:{{{timezone4|}}}|({{{timezone4}}})}} |{{{timezone4|}}} }} }} | rowclass134 = mergedrow | label134 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data134 = {{#if:{{{utc_offset4_DST|}}}|[[UTC{{{utc_offset4_DST|}}}]] {{#if:{{{timezone4_DST|}}}|({{{timezone4_DST|}}})}} |{{{timezone4_DST|}}} }} | rowclass135 = mergedrow | label135 = {{#if:{{{timezone5_location|}}}| {{{timezone5_location|}}}|<nowiki />}} | data135 = {{#if:{{{timezone1|{{{timezone|}}}}}}{{{utc_offset1|{{{utc_offset|}}}}}} |{{#if:{{{utc_offset5|{{{utc_offset5|}}} }}} |[[UTC{{{utc_offset5|{{{utc_offset5}}}}}}]] {{#if:{{{timezone5|}}}|({{{timezone5}}})}} |{{{timezone5|}}} }} }} | rowclass136 = mergedrow | label136 = <span class="nowrap">&nbsp;•&nbsp;Summer ([[Daylight saving time|DST]])</span> | data136 = {{#if:{{{utc_offset5_DST|}}}|[[UTC{{{utc_offset5_DST|}}}]] {{#if:{{{timezone5_DST|}}}|({{{timezone5_DST|}}})}} |{{{timezone5_DST|}}} }} <!-- ***Postal Code(s)*** --> | rowclass137 = mergedtoprow | label137 = {{{postal_code_type}}} | class137 = adr | data137 = {{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|<div class="postal-code">{{{postal_code}}}</div>}}}} | rowclass138 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}|mergedbottomrow|mergedtoprow}} | label138 = {{{postal2_code_type}}} | class138 = adr | data138 = {{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|<div class="postal-code">{{{postal2_code}}}</div>}} }} }} <!-- ***Area Code(s)*** --> | rowclass139 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}|mergedrow|mergedtoprow}} | label139 = {{if empty|{{{area_code_type|}}}|{{Pluralize from text|any_comma=1|parse_links=1|{{if empty|{{{area_code|}}}|{{{area_codes|}}}{{force plural}}}}|<!-- -->link=Telephone numbering plan|singular=Area code|likely=Area code(s)|plural=Area codes}}}} | data139 = {{if empty|{{{area_code|}}}|{{{area_codes|}}}}}{{#if:{{{area_code_type|}}}||{{Main other|{{Pluralize from text|any_comma=1|parse_links=1|{{{area_code|}}}|||[[Kategori:Pages using infobox settlement with possible area code list]]}}}}}} <!-- Geocode--> | rowclass140 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}{{{area_code|}}}|mergedrow|mergedtoprow}} | label140 = [[Geocode]] | class140 = nickname | data140 = {{{geocode|}}} <!-- ISO Code--> | rowclass141 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}{{{area_code|}}}{{{geocode|}}}|mergedrow|mergedtoprow}} | label141 = [[ISO 3166|ISO 3166 code]] | class141 = nickname | data141 = {{{iso_code|}}} <!-- Vehicle registration plate--> | rowclass142 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}{{{area_code|}}}{{{geocode|}}}{{{iso_code|}}}|mergedrow|mergedtoprow}} | label142 = {{#if:{{{registration_plate_type|}}}|{{{registration_plate_type}}}|[[Vehicle registration plate|Vehicle registration]]}} | data142 = {{{registration_plate|}}} <!-- Other codes --> | rowclass143 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}{{{area_code|}}}{{{geocode|}}}{{{iso_code|}}}|{{{registration_plate|}}}|mergedrow|mergedtoprow}} | label143 = {{{code1_name|}}} | class143 = nickname | data143 = {{#if:{{{code1_name|}}}|{{{code1_info|}}}}} | rowclass144 = {{#if:{{#if:{{{postal_code_type|}}}|{{#if:{{{postal_code|}}}|1}}}}{{#if:{{{postal_code_type|}}}|{{#if:{{{postal2_code_type|}}}|{{#if:{{{postal2_code|}}}|1}}}}}}{{{area_code|}}}{{{geocode|}}}{{{iso_code|}}}|{{{registration_plate|}}}|{{{code1_name|}}}|mergedrow|mergedtoprow}} | label144 = {{{code2_name|}}} | class144 = nickname | data144 = {{#if:{{{code2_name|}}}|{{{code2_info|}}}}} <!-- ***Blank Fields (two sections)*** --> | rowclass145 = mergedtoprow | label145 = {{{blank_name_sec1|{{{blank_name|}}}}}} | data145 = {{#if:{{{blank_name_sec1|{{{blank_name|}}}}}}|{{{blank_info_sec1|{{{blank_info|}}}}}}}} | rowclass146 = mergedrow | label146 = {{{blank1_name_sec1|{{{blank1_name|}}}}}} | data146 = {{#if:{{{blank1_name_sec1|{{{blank1_name|}}}}}}|{{{blank1_info_sec1|{{{blank1_info|}}}}}}}} | rowclass147 = mergedrow | label147 = {{{blank2_name_sec1|{{{blank2_name|}}}}}} | data147 = {{#if:{{{blank2_name_sec1|{{{blank2_name|}}}}}}|{{{blank2_info_sec1|{{{blank2_info|}}}}}}}} | rowclass148 = mergedrow | label148 = {{{blank3_name_sec1|{{{blank3_name|}}}}}} | data148 = {{#if:{{{blank3_name_sec1|{{{blank3_name|}}}}}}|{{{blank3_info_sec1|{{{blank3_info|}}}}}}}} | rowclass149 = mergedrow | label149 = {{{blank4_name_sec1|{{{blank4_name|}}}}}} | data149 = {{#if:{{{blank4_name_sec1|{{{blank4_name|}}}}}}|{{{blank4_info_sec1|{{{blank4_info|}}}}}}}} | rowclass150 = mergedrow | label150 = {{{blank5_name_sec1|{{{blank5_name|}}}}}} | data150 = {{#if:{{{blank5_name_sec1|{{{blank5_name|}}}}}}|{{{blank5_info_sec1|{{{blank5_info|}}}}}}}} | rowclass151 = mergedrow | label151 = {{{blank6_name_sec1|{{{blank6_name|}}}}}} | data151 = {{#if:{{{blank6_name_sec1|{{{blank6_name|}}}}}}|{{{blank6_info_sec1|{{{blank6_info|}}}}}}}} | rowclass152 = mergedrow | label152 = {{{blank7_name_sec1|{{{blank7_name|}}}}}} | data152 = {{#if:{{{blank7_name_sec1|{{{blank7_name|}}}}}}|{{{blank7_info_sec1|{{{blank7_info|}}}}}}}} | rowclass153 = mergedtoprow | label153 = {{{blank_name_sec2}}} | data153 = {{#if:{{{blank_name_sec2|}}}|{{{blank_info_sec2|}}}}} | rowclass154 = mergedrow | label154 = {{{blank1_name_sec2}}} | data154 = {{#if:{{{blank1_name_sec2|}}}|{{{blank1_info_sec2|}}}}} | rowclass155 = mergedrow | label155 = {{{blank2_name_sec2}}} | data155 = {{#if:{{{blank2_name_sec2|}}}|{{{blank2_info_sec2|}}}}} | rowclass156 = mergedrow | label156 = {{{blank3_name_sec2}}} | data156 = {{#if:{{{blank3_name_sec2|}}}|{{{blank3_info_sec2|}}}}} | rowclass157 = mergedrow | label157 = {{{blank4_name_sec2}}} | data157 = {{#if:{{{blank4_name_sec2|}}}|{{{blank4_info_sec2|}}}}} | rowclass158 = mergedrow | label158 = {{{blank5_name_sec2}}} | data158 = {{#if:{{{blank5_name_sec2|}}}|{{{blank5_info_sec2|}}}}} | rowclass159 = mergedrow | label159 = {{{blank6_name_sec2}}} | data159 = {{#if:{{{blank6_name_sec2|}}}|{{{blank6_info_sec2|}}}}} | rowclass160 = mergedrow | label160 = {{{blank7_name_sec2}}} | data160 = {{#if:{{{blank7_name_sec2|}}}|{{{blank7_info_sec2|}}}}} <!-- ***Website*** --> | rowclass161 = mergedtoprow | label161 = Website | data161 = {{#if:{{{website|}}}|{{{website}}}}} | class162 = maptable | data162 = {{#if:{{{module|}}}|{{{module}}}}} <!-- ***Footnotes*** --> | belowrowclass = mergedtoprow | below = {{{footnotes|}}} }}<!-- Check for unknowns -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using infobox settlement with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox settlement]] with unknown parameter "_VALUE_"|ignoreblank=y | alt | anthem | anthem_link | area_blank1_acre | area_blank1_dunam | area_blank1_ha | area_blank1_km2 | area_blank1_sq_mi | area_blank1_title | area_blank2_acre | area_blank2_dunam | area_blank2_ha | area_blank2_km2 | area_blank2_sq_mi | area_blank2_title | area_code | area_code_type | area_codes | area_footnotes | area_land_acre | area_land_dunam | area_land_ha | area_land_km2 | area_land_sq_mi | area_metro_acre | area_metro_dunam | area_metro_footnotes | area_metro_ha | area_metro_km2 | area_metro_sq_mi | area_note | area_rank | area_rural_acre | area_rural_dunam | area_rural_footnotes | area_rural_ha | area_rural_km2 | area_rural_sq_mi | area_total_acre | area_total_dunam | area_total_ha | area_total_km2 | area_total_sq_mi | area_urban_acre | area_urban_dunam | area_urban_footnotes | area_urban_ha | area_urban_km2 | area_urban_sq_mi | area_water_acre | area_water_dunam | area_water_ha | area_water_km2 | area_water_percent | area_water_sq_mi | blank_emblem_alt | blank_emblem_link | blank_emblem_size | blank_emblem_type | blank_info | blank_info_sec1 | blank_info_sec2 | blank_name | blank_name_sec1 | blank_name_sec2 | blank1_info | blank1_info_sec1 | blank1_info_sec2 | blank1_name | blank1_name_sec1 | blank1_name_sec2 | blank2_info | blank2_info_sec1 | blank2_info_sec2 | blank2_name | blank2_name_sec1 | blank2_name_sec2 | blank3_info | blank3_info_sec1 | blank3_info_sec2 | blank3_name | blank3_name_sec1 | blank3_name_sec2 | blank4_info | blank4_info_sec1 | blank4_info_sec2 | blank4_name | blank4_name_sec1 | blank4_name_sec2 | blank5_info | blank5_info_sec1 | blank5_info_sec2 | blank5_name | blank5_name_sec1 | blank5_name_sec2 | blank6_info | blank6_info_sec1 | blank6_info_sec2 | blank6_name | blank6_name_sec1 | blank6_name_sec2 | blank7_info | blank7_info_sec1 | blank7_info_sec2 | blank7_name | blank7_name_sec1 | blank7_name_sec2 | caption | code1_info | code1_name | code2_info | code2_name | coor_pinpoint | coor_type | coordinates | coordinates_footnotes | demographics_type1 | demographics_type2 | demographics1_footnotes | demographics1_info1 | demographics1_info10 | demographics1_info2 | demographics1_info3 | demographics1_info4 | demographics1_info5 | demographics1_info6 | demographics1_info7 | demographics1_info8 | demographics1_info9 | demographics1_title1 | demographics1_title10 | demographics1_title2 | demographics1_title3 | demographics1_title4 | demographics1_title5 | demographics1_title6 | demographics1_title7 | demographics1_title8 | demographics1_title9 | demographics2_footnotes | demographics2_info1 | demographics2_info10 | demographics2_info2 | demographics2_info3 | demographics2_info4 | demographics2_info5 | demographics2_info6 | demographics2_info7 | demographics2_info8 | demographics2_info9 | demographics2_title1 | demographics2_title10 | demographics2_title2 | demographics2_title3 | demographics2_title4 | demographics2_title5 | demographics2_title6 | demographics2_title7 | demographics2_title8 | demographics2_title9 | dimensions_footnotes | dunam_link | elevation_footnotes | elevation_ft | elevation_link | elevation_m | elevation_max_footnotes | elevation_max_ft | elevation_max_m | elevation_max_point | elevation_max_rank | elevation_min_footnotes | elevation_min_ft | elevation_min_m | elevation_min_point | elevation_min_rank | elevation_point | embed | established_date | established_date1 | established_date2 | established_date3 | established_date4 | established_date5 | established_date6 | established_date7 | established_title | established_title1 | established_title2 | established_title3 | established_title4 | established_title5 | established_title6 | established_title7 | etymology | extinct_date | extinct_title | flag_alt | flag_border | flag_link | flag_size | footnotes | founder | geocode | governing_body | government_footnotes | government_type | government_blank1_title | government_blank1 | government_blank2_title | government_blank2 | government_blank2_title | government_blank3 | government_blank3_title | government_blank3 | government_blank4_title | government_blank4 | government_blank5_title | government_blank5 | government_blank6_title | government_blank6 | grid_name | grid_position | image_alt | image_blank_emblem | image_caption | image_flag | image_map | image_map1 | image_seal | image_shield | image_size | image_skyline | imagesize | iso_code | leader_name | leader_name1 | leader_name2 | leader_name3 | leader_name4 | leader_party | leader_title | leader_title1 | leader_title2 | leader_title3 | leader_title4 | length_km | length_mi | map_alt | map_alt1 | map_caption | map_caption1 | mapsize | mapsize1 | module | motto | motto_link | mottoes | name | named_for | native_name | native_name_lang | nickname | nickname_link | nicknames | official_name | other_name | p1 | p10 | p11 | p12 | p13 | p14 | p15 | p16 | p17 | p18 | p19 | p2 | p20 | p21 | p22 | p23 | p24 | p25 | p26 | p27 | p28 | p29 | p3 | p30 | p31 | p32 | p33 | p34 | p35 | p36 | p37 | p38 | p39 | p4 | p40 | p41 | p42 | p43 | p44 | p45 | p46 | p47 | p48 | p49 | p5 | p50 | p6 | p7 | p8 | p9 | parts | parts_style | parts_type | pop_est_as_of | pop_est_footnotes | population | population_as_of | population_blank1 | population_blank1_footnotes | population_blank1_title | population_blank2 | population_blank2_footnotes | population_blank2_title | population_demonym | population_demonyms | population_density_blank1_km2 | population_density_blank1_sq_mi | population_density_blank2_km2 | population_density_blank2_sq_mi | population_density_km2 | population_density_metro_km2 | population_density_metro_sq_mi | population_density_rank | population_density_rural_km2 | population_density_rural_sq_mi | population_density_sq_mi | population_density_urban_km2 | population_density_urban_sq_mi | population_est | population_footnotes | population_metro | population_metro_footnotes | population_note | population_rank | population_rural | population_rural_footnotes | population_total | population_urban | population_urban_footnotes | postal_code | postal_code_type | postal2_code | postal2_code_type | pushpin_image | pushpin_label | pushpin_label_position | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_map_caption_notsmall | pushpin_map_narrow | pushpin_mapsize | pushpin_outside | pushpin_overlay | pushpin_relief | registration_plate | registration_plate_type | seal_alt | seal_link | seal_size | seal_type | seat | seat_type | seat1 | seat1_type | seat2 | seat2_type | settlement_type | shield_alt | shield_link | shield_size | short_description | subdivision_name | subdivision_name1 | subdivision_name2 | subdivision_name3 | subdivision_name4 | subdivision_name5 | subdivision_name6 | subdivision_type | subdivision_type1 | subdivision_type2 | subdivision_type3 | subdivision_type4 | subdivision_type5 | subdivision_type6 | timezone | timezone_DST | timezone_link | timezone1 | timezone1_DST | timezone1_location | timezone2 | timezone2_DST | timezone2_location | timezone3 | timezone3_DST | timezone3_location | timezone4 | timezone4_DST | timezone4_location | timezone5 | timezone5_DST | timezone5_location | total_type | translit_lang1 | translit_lang1_info | translit_lang1_info1 | translit_lang1_info2 | translit_lang1_info3 | translit_lang1_info4 | translit_lang1_info5 | translit_lang1_info6 | translit_lang1_type | translit_lang1_type1 | translit_lang1_type2 | translit_lang1_type3 | translit_lang1_type4 | translit_lang1_type5 | translit_lang1_type6 | translit_lang2 | translit_lang2_info | translit_lang2_info1 | translit_lang2_info2 | translit_lang2_info3 | translit_lang2_info4 | translit_lang2_info5 | translit_lang2_info6 | translit_lang2_type | translit_lang2_type1 | translit_lang2_type2 | translit_lang2_type3 | translit_lang2_type4 | translit_lang2_type5 | translit_lang2_type6 | type | unit_pref | utc_offset | utc_offset_DST | utc_offset1 | utc_offset1_DST | utc_offset2 | utc_offset2_DST | utc_offset3 | utc_offset3_DST | utc_offset4 | utc_offset4_DST | utc_offset5 | utc_offset5_DST | website | width_km | width_mi }}<!-- -->{{#invoke:Check for clobbered parameters|check | template = Infobox settlement | cat = {{main other|Category:Pages using infobox settlement with conflicting parameters}} | population; population_total | image_size; imagesize | image_alt; alt | image_caption; caption }}<!-- Wikidata -->{{#if:{{{coordinates_wikidata|}}}{{{wikidata|}}} |[[Kategori:Pages using infobox settlement with the wikidata parameter]] }}{{main other|<!-- Missing country -->{{#if:{{{subdivision_name|}}}||[[Kategori:Pages using infobox settlement with missing country]]}}<!-- No map -->{{#if:{{{pushpin_map|}}}{{{image_map|}}}{{{image_map1|}}}||[[Kategori:Pages using infobox settlement with no map]]}}<!-- Image_map1 without image_map -->{{#if:{{{image_map1|}}}|{{#if:{{{image_map|}}}||[[Kategori:Pages using infobox settlement with image_map1 but not image_map]]}}}}<!-- No coordinates -->{{#if:{{{coordinates|}}}||[[Kategori:Pages using infobox settlement with no coordinates]]}}<!-- -->{{#if:{{{type|}}}|{{#ifeq:{{{settlement_type|a}}}|{{{settlement_type|b}}}|[[Kategori:Pages using infobox settlement with ignored type]]|}}|}}<!-- Ignored type parameter -->{{#if:{{{embed|}}}|[[Kategori:Pages using infobox settlement with embed]]}} }}</includeonly><noinclude> {{Documentation}} <!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> 5rfnepksk1gfgzzbf5dfbpxkhpt3hbc Templat:Infobox settlement/areadisp 10 138 701 332 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 330 wikitext text/x-wiki <includeonly>{{infobox settlement/{{infobox settlement/pref|{{{pref}}}|{{{name}}}|area}}{{#if:{{{mag|}}}|/mag}} |metv={{#if:{{{ha|}}}{{{km2|}}} |{{#if:{{{ha|}}}|{{{ha}}}|{{{km2}}}}} |{{#if:{{{dunam|}}} |{{#ifexpr:{{formatnum:{{{dunam}}}|R}}<1E3 |{{round<!-- convert dunams to hectares --> |{{#expr:{{formatnum:{{{dunam}}}|R}}/10}} |({{precision|{{formatnum:{{{dunam}}}|R}}}}+1) }}<!-- end round --> |{{round<!-- convert dunams to square kilometres --> |{{#expr:{{formatnum:{{{dunam}}}|R}}/1E3}} |({{precision|{{formatnum:{{{dunam}}}|R}}}}+3) }}<!-- end round --> }}<!-- end #ifexpr:...{{{dunam}}}...<1E3 --> |{{#if:{{{acre|}}} |{{round<!-- convert acres to hectares --> |{{#expr:{{formatnum:{{{acre}}}|R}}*0.4046856422}} |{{max<!-- output at least one sig fig --> |{{precision|{{formatnum:{{{acre}}}|R}}}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{acre}}}|R}}*0.4046856422}}}} }}<!-- end max --> }}<!-- end round --> |{{round<!-- convert square miles to square kilometres --> |{{#expr:{{formatnum:{{{sqmi}}}|R}}*2.589988110336}} |{{max<!-- output at least one sig fig --> |({{precision|{{formatnum:{{{sqmi}}}|R}}}}-1) |-{{Order of magnitude|{{#expr:{{formatnum:{{{sqmi}}}|R}}*2.589988110336}}}} }}<!-- end max --> }}<!-- end rnd --> }}<!-- end #if:{{{acre|}}} --> }}<!-- end #if:{{{dunam|}}} --> }}<!-- end #if:{{{ha|}}}{{{km2|}}} --> |metu={{#if:{{{ha|}}}{{#if:{{{km2|}}} | |{{#if:{{{dunam|}}} |{{#ifexpr:{{formatnum:{{{dunam}}}|R}}<1E3|X}} |{{{acre|}}} }} }} |ha |km<sup>2</sup> }} |impv={{#if:{{{acre|}}}{{{sqmi|}}} |{{#if:{{{acre|}}}|{{{acre}}}|{{{sqmi}}}}} |{{#if:{{{ha|}}}{{{km2|}}} |{{#if:{{{ha|}}} |{{round<!-- convert hectares to acres --> |{{#expr:{{formatnum:{{{ha}}}|R}}/0.4046856422}} |({{precision|{{formatnum:{{{ha}}}|R}}}}) }}<!-- end round --> |{{round<!-- convert square kilometres to square miles --> |{{#expr:{{formatnum:{{{km2}}}|R}}/2.589988110336}} |{{max<!-- output at least one sig fig --> |{{precision|{{formatnum:{{{km2}}}|R}}}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{km2}}}|R}}/2.589988110336}}}} }}<!-- end max --> }}<!-- end round --> }}<!-- end #if:{{{ha|}}} --> |{{#ifexpr:{{formatnum:{{{dunam}}}|R}}<2589 |{{round<!-- convert dunams to acres --> |{{#expr:{{formatnum:{{{dunam}}}|R}}/4.046856422}} |{{max<!-- output at least one sig fig --> |({{precision|{{formatnum:{{{dunam}}}|R}}}}) |-{{Order of magnitude|{{#expr:{{formatnum:{{{dunam}}}|R}}/4.046856422}}}} }}<!-- end max --> }}<!-- end round --> |{{round<!-- convert dunams to square miles --> |{{#expr:{{formatnum:{{{dunam}}}|R}}/2589.988110336}} |{{max<!-- output at least one sig fig --> |({{precision|{{formatnum:{{{dunam}}}|R}}}}+3) |-{{Order of magnitude|{{#expr:{{formatnum:{{{dunam}}}|R}}/2589.988110336}}}} }}<!-- end max --> }}<!-- end round --> }}<!-- end #ifexpr:...{{{dunam}}}...<2589 --> }}<!-- end #if:{{{ha|}}}{{{km2|}}} --> }}<!-- end #if:{{{acre|}}}{{{sqmi|}}} --> |impu={{#if:{{{acre|}}}{{#if:{{{sqmi|}}} | |{{{ha|}}}{{#if:{{{km2|}}} | |{{#ifexpr:{{formatnum:{{{dunam}}}|R}}<2589|X}} }} }} |acre |sq&nbsp;mi }} |dunv={{#if:{{#ifeq:{{lc:{{{pref}}}}}|dunam|{{{dunam|}}}|no dunams}} |{{{dunam}}} |{{#if:{{{ha|}}}{{{km2|}}} |{{#if:{{{km2|}}} |{{round<!-- convert square kilometres to dunams --> |{{#expr:{{formatnum:{{{km2}}}|R}}*1E3}} |({{precision|{{formatnum:{{{km2}}}|R}}}}-3) }}<!-- end round --> |{{round<!-- convert hectares to dunams --> |{{#expr:{{formatnum:{{{ha}}}|R}}*10}} |({{precision|{{formatnum:{{{ha}}}|R}}}}-1) }}<!-- end round --> }}<!-- end #if:{{{km2|}}} --> |{{#if:{{{sqmi|}}} |{{round<!-- convert square miles to dunams --> |{{#expr:{{formatnum:{{{sqmi}}}|R}}*2589.988110336}} |{{max<!-- output at least one sig fig --> |({{precision|{{formatnum:{{{sqmi}}}|R}}}}-4) |-{{Order of magnitude|{{#expr:{{formatnum:{{{sqmi}}}|R}}*2589.988110336}}}} }}<!-- end max --> }}<!-- end round --> |{{round<!-- convert acres to dunams --> |{{#expr:{{formatnum:{{{acre}}}|R}}*4.046856422}} |{{max<!-- output at least one sig fig --> |({{precision|{{formatnum:{{{acre}}}|R}}}}-1) |-{{Order of magnitude|{{#expr:{{formatnum:{{{acre}}}|R}}*4.046856422}}}} }}<!-- end max --> }}<!-- end round --> }}<!-- end #if:{{{sqmi|}}} --> }}<!-- end #if:{{{ha|}}}{{{km2|}}} --> }} |dunu={{#if:{{{link|}}}|[[dunam]]|dunam}} }}</includeonly><noinclude> {{Documentation}} </noinclude> 5h968obrp9q3emvd2hmzzql1bfdmnvs Templat:Infobox settlement/columns 10 139 334 333 2024-08-09T09:19:56Z Jon Harald Søby 58 1 semakan diimportkan 333 wikitext text/x-wiki <templatestyles src="Infobox settlement/columns/styles.css"/> <div class="ib-settlement-cols"> <div class="ib-settlement-cols-row">{{#if:{{{0|}}} |<!-- if 0 -->{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}} |<!-- if 0 and (1 or 2 or 3 or 4 or 5) --><div class="ib-settlement-cols-cellt"> {{#if:{{{1|}}}|<div>{{{1}}}</div>}} {{#if:{{{2|}}}|<div>{{{2}}}</div>}} {{#if:{{{3|}}}|<div>{{{3}}}</div>}} {{#if:{{{4|}}}|<div>{{{4}}}</div>}} {{#if:{{{5|}}}|<div>{{{5}}}</div>}} </div> }}<div class="ib-settlement-cols-cellt">{{{0}}}</div> |<!-- if not 0 -->{{#ifexpr:({{#if:{{{1|}}}|1|0}}+{{#if:{{{2|}}}|1|0}}+{{#if:{{{3|}}}|1|0}}+{{#if:{{{4|}}}|1|0}}) > 2 |<!-- if more than two images -->{{#if:{{{1|}}} |<div class="ib-settlement-cols-cell">{{{1}}}</div>{{#if:{{{2|}}}||</div></div><div class="ib-settlement-cols"><!-- TODO: The "3" element case currently produces two div-tables, which is non-optimal, but someone else should figure out how to fix it; 4 and 2 cases output as one "table". --><div class="ib-settlement-cols-row">}} }}{{#if:{{{2|}}} |<div class="ib-settlement-cols-cell">{{{2}}}</div>{{#if:{{{1|}}}||</div></div><div class="ib-settlement-cols"><div class="ib-settlement-cols-row">}} }}</div><div class="ib-settlement-cols-row">{{#if:{{{3|}}} |{{#if:{{{4|}}}||</div></div><div class="ib-settlement-cols"><div class="ib-settlement-cols-row">}}<div class="ib-settlement-cols-cell">{{{3}}}</div> }}{{#if:{{{4|}}} |{{#if:{{{3|}}}||</div></div><div class="ib-settlement-cols"><div class="ib-settlement-cols-row">}}<div class="ib-settlement-cols-cell">{{{4}}}</div> }} |<!-- if two or fewer images -->{{#if:{{{1|}}}|<div class="ib-settlement-cols-cell">{{{1}}}</div>}}<!-- -->{{#if:{{{2|}}}|<div class="ib-settlement-cols-cell">{{{2}}}</div>}}<!-- -->{{#if:{{{3|}}}|<div class="ib-settlement-cols-cell">{{{3}}}</div>}}<!-- -->{{#if:{{{4|}}}|<div class="ib-settlement-cols-cell">{{{4}}}</div>}} }} }}</div></div><noinclude> {{Documentation}} </noinclude> 4ixpa0vepjb4lkn0xoyrssylcltr6v7 Templat:Infobox settlement/columns/styles.css 10 140 336 335 2024-08-09T09:19:56Z Jon Harald Søby 58 1 semakan diimportkan 335 sanitized-css text/css /* {{pp|small=y}} */ .ib-settlement-cols { text-align: center; display: table; width: 100%; } .ib-settlement-cols-row { display: table-row; } .ib-settlement-cols-cell { display: table-cell; vertical-align: middle; } .ib-settlement-cols-cellt { display: table-cell; vertical-align: top; } eoq56w19zfw3akcqfxtw079peuodz3k Templat:Infobox settlement/densdisp 10 141 703 339 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 337 wikitext text/x-wiki <includeonly>{{#if: {{#iferror:{{#expr:-{{formatnum:{{{/km2}}}|R}}}} |{{#iferror:{{#expr:-{{formatnum:{{{/sqmi}}}|R}}}} |{{#switch:auto |{{{/km2}}}|{{{/sqmi}}}={{#iferror:{{#expr:-{{formatnum:{{{pop}}}|R}}}} ||{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{ha|}}}|R}}}}}} +{{#iferror:{{#expr:{{formatnum:{{{km2|}}}|R}}}}}} +{{#iferror:{{#expr:{{formatnum:{{{acre|}}}|R}}}}}} +{{#iferror:{{#expr:{{formatnum:{{{sqmi|}}}|R}}}}}} +{{#iferror:{{#expr:{{formatnum:{{{dunam|}}}|R}}}}}} +0 >0 |1}} }} }} |1 }} |1 }} |{{infobox settlement/{{infobox settlement/pref|{{{pref}}}|{{{name}}}}} |metv={{#iferror:{{#expr:-{{formatnum:{{{/km2}}}|R}}}} |{{#iferror:{{#expr:-{{formatnum:{{{/sqmi}}}|R}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{km2|}}}|R}}}}}}+0>0 |{{round|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{km2}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{km2}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{ha|}}}|R}}}}}}+0>0 |{{round|{{#expr:100*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{ha}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:100*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{ha}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{dunam|}}}|R}}}}}}+0>0 |{{round|{{#expr:1000*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{dunam}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:1000*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{dunam}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{sqmi|}}}|R}}}}}}+0>0 |{{round|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{sqmi}}}|R}}/2.589988110336}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{sqmi}}}|R}}/2.589988110336}}}}}}}} |{{round|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{acre}}}|R}}/0.004046856422}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{acre}}}|R}}/0.004046856422}}}}}}}} }}}}}}}} |{{round |{{#expr:{{formatnum:{{{/sqmi}}}|R}}/2.589988110336}} |{{max |{{precision|{{formatnum:{{{/sqmi}}}|R}}}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{/sqmi}}}|R}}/2.589988110336}}}} }} }} }} |{{{/km2}}} }} |metu=km<sup>2</sup> |impv={{#iferror:{{#expr:-{{formatnum:{{{/sqmi}}}|R}}}} |{{#iferror:{{#expr:-{{formatnum:{{{/km2}}}|R}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{sqmi|}}}|R}}}}}}+0>0 |{{round|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{sqmi}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{sqmi}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{acre|}}}|R}}}}}}+0>0 |{{round|{{#expr:640*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{acre}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:640*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{acre}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{km2|}}}|R}}}}}}+0>0 |{{round|{{#expr:2.589988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{km2}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:2.589988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{km2}}}|R}}}}}}}}}} |{{#ifexpr:{{#iferror:{{#expr:{{formatnum:{{{ha|}}}|R}}}}}}+0>0 |{{round|{{#expr:258.9988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{ha}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:258.9988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{ha}}}|R}}}}}}}}}} |{{round|{{#expr:2589.988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{dunam}}}|R}}}}<!-- -->|{{#expr:1-{{Order of magnitude|{{#expr:2589.988110336*{{formatnum:{{{pop}}}|R}}/{{formatnum:{{{dunam}}}|R}}}}}}}}}} }}}}}}}} |{{round |{{#expr:{{formatnum:{{{/km2}}}|R}}*2.589988110336}} |{{max |{{#expr:{{precision|{{formatnum:{{{/km2}}}|R}}}}-1}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{/km2}}}|R}}*2.589988110336}}}} }} }} }} |{{{/sqmi}}} }} |impu=sq&nbsp;mi |s=/ }} }}</includeonly><noinclude> {{Documentation}} </noinclude> 6643ko48r2af39a8na8mw1c378b1agm Templat:Infobox settlement/lengthdisp 10 142 705 342 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 340 wikitext text/x-wiki <includeonly>{{infobox settlement/{{infobox settlement/pref|{{{pref}}}|{{{name}}}}} |metv={{#if:{{{km|}}}{{{m|}}} |{{{km|}}}{{{m|}}} |{{#if:{{{mi|}}} |{{round |{{#expr:{{formatnum:{{{mi}}}|R}}*1.609344}} |{{precision|{{formatnum:{{{mi}}}|R}}}} }} |{{round |{{#expr:{{formatnum:{{{ft}}}|R}}*0.3048}} |{{max |{{precision|{{formatnum:{{{ft}}}|R}}}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{ft}}}|R}}*0.3048}}}} }} }} }} }} |metu={{#if:{{{km|}}}{{{mi|}}}|k}}m |impv={{#if:{{{mi|}}}{{{ft|}}} |{{{mi|}}}{{{ft|}}} |{{#if:{{{km|}}} |{{round |{{#expr:{{formatnum:{{{km}}}|R}}/1.609344}} |{{max |{{precision|{{formatnum:{{{km}}}|R}}}} |-{{Order of magnitude|{{#expr:{{formatnum:{{{km}}}|R}}/1.609344}}}} }} }} |{{round |{{#expr:{{formatnum:{{{m}}}|R}}/0.3048}} |{{precision|{{formatnum:{{{m}}}|R}}}} }} }} }} |impu={{#if:{{{km|}}}{{{mi|}}}|mi|ft}} }}</includeonly><noinclude> {{Documentation}} </noinclude> fjwtvwks1pq6z1eqnunaf5h2pa73b5r Templat:Infobox settlement/link 10 143 344 343 2024-08-09T09:19:57Z Jon Harald Søby 58 1 semakan diimportkan 343 wikitext text/x-wiki {{#if:{{{link|}}}<!-- -->|[[{{{link}}}|{{{type}}}]]<!-- -->|{{#ifexist:{{{type}}} of {{PAGENAME}}<!-- -->|[[{{{type}}} of {{PAGENAME}}|{{{type|}}}]]<!-- -->|{{#if:{{{name|}}}<!-- -->|{{#ifexist:{{{type}}} of {{{name}}}<!-- -->|[[{{{type}}} of {{{name}}}|{{{type|}}}]]<!-- -->|{{{type}}}<!-- -->}}<!-- -->|{{{type}}}<!-- -->}}<!-- -->}}<!-- -->}}<noinclude> {{Documentation}} </noinclude> brq3m9tk68xiypbrteri7r7hvl4y9dc Templat:Infobox settlement/metric 10 144 707 347 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 345 wikitext text/x-wiki <includeonly>{{formatnum:{{replace|{{{metv}}}|,|}}}}{{{s|&nbsp;}}}{{{metu|m}}} ({{formatnum:{{replace|{{{impv}}}|,|}}}}{{{s|&nbsp;}}}{{{impu|ft}}}{{#ifeq:{{{impv|0}}}|1||{{#ifeq:{{{s}}}|/||{{#ifeq:{{{impu}}}|acre|s}}}}}})</includeonly><noinclude> {{documentation}} </noinclude> 45cyrzn2w481akei92mqe3mesz2rjva Templat:Infobox settlement/pref 10 145 709 350 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 348 wikitext text/x-wiki <includeonly>{{#switch:{{ucfirst:{{{1}}}}} |Imperial |English |UK|US|U.S. |US Customary|U.S. Customary |Standard = impus |{{#switch:{{{2}}} |[[United Kingdom]]|United Kingdom |[[United States]]|United States |[[United States of America]]|United States of America |[[United States|United States of America]] |[[Fail:Flag of the United States.svg|20px]] [[United States]] = impus |{{#ifeq:{{{3}}}_{{lc:{{{1}}}}}|area_dunam|dunam|metric}} }} }}</includeonly><noinclude> {{documentation}} </noinclude> 49sbyd2rfpnkfs8xfveyytthbfiboi5 Templat:Infobox television 10 146 352 351 2024-08-09T09:19:57Z Jon Harald Søby 58 1 semakan diimportkan 351 wikitext text/x-wiki {{Main other|{{Infobox television/Short description|released={{{released|}}}|first_aired={{{first_aired|}}}|country={{{country|}}}}}}} {{Infobox | italic title = {{{italic_title|<noinclude>no</noinclude>}}} | bodyclass = vevent | abovestyle = background-color: #CCCCFF; padding: 0.25em 1em; font-size: 125%; | aboveclass = summary | above = {{#invoke:Infobox television|above_title}} | headerclass = summary | headerstyle = background-color: #CCCCFF; padding: 0.25em 1em; | autoheaders = y | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{image_alt|{{{alt|}}}}}}|title={{{image_alt|{{{alt|}}}}}}}} | caption = {{{caption|}}} | label1 = Also known as | label1style = font-style: italic; | data1 = {{{alt_name|}}} | class2 = description | data2 = {{{native_name|}}} | label3 = Genre | class3 = category | data3 = {{{genre|}}} | label4 = Created by | data4 = {{{creator|}}} | label5 = {{#if: {{{based_on|}}} | Based on | Inspired by }} | data5 = {{If empty |{{{based_on|}}} |{{{inspired_by|}}} }} | label6 = Developed by | data6 = {{{developer|}}} | label7 = Written by | data7 = {{{writer|}}} | label8 = {{#if: {{{teleplay|}}} | Teleplay | Screenplay}} by | data8 = {{{screenplay|{{{teleplay|}}}}}} | label9 = Story by | data9 = {{{story|}}} | label10 = Directed by | class10 = attendee | data10 = {{{director|}}} | label11 = Creative director{{Pluralize from text|{{{creative_director|}}}|plural=s}} | class11 = attendee | data11 = {{{creative_director|}}} | label12 = Presented by | class12 = attendee | data12 = {{If empty |{{{presenter|}}} |{{{host|}}} }} | label13 = Starring | class13 = attendee | data13 = {{{starring|}}} | label14 = Judges | class14 = attendee | data14 = {{{judges|}}} | label15 = Voices of | class15 = attendee | data15 = {{{voices|}}} | label16 = Narrated by | class16 = attendee | data16 = {{{narrator|{{{narrated|}}}}}} | label17 = {{#if: {{{music|}}} | Music by | Theme music composer }} | data17 = {{If empty |{{{theme_music_composer|}}} |{{{music|}}} }} | label18 = Opening theme | data18 = {{If empty |{{{open_theme|}}} |{{{opentheme|}}} }} | label19 = Ending theme | data19 = {{If empty |{{{end_theme|}}} |{{{endtheme|}}} }} | label20 = Composer{{Pluralize from text|{{{composer|}}}|plural=s}} | data20 = {{{composer|}}} | label21 = Country of origin | data21 = {{{country|}}} | label22 = Original language{{Pluralize from text|{{{language|}}}|plural=s}} | data22 = {{{language|}}} | label23 = {{Abbr|No.|Number}} of {{#if: {{{num_seasons|}}} | seasons | series }} | data23 = {{If empty |{{{num_seasons|}}} |{{{num_series|}}} }} | label24 = {{#ifeq: {{PAGENAME}} | Doctor Who | {{Abbr|No.|Number}} of series }} | data24 = {{#ifeq: {{PAGENAME}} | Doctor Who | {{{num_series|}}} }} | label25 = {{Abbr|No.|Number}} of {{#if: {{{num_specials|}}} | specials | episodes }} | data25 = {{If empty |{{{num_specials|}}} |{{{num_episodes|}}} }} {{#if: {{{list_episodes|}}} | {{Nowrap|([[{{{list_episodes}}}|list of episodes]])}} }} {{#ifeq:{{{list_episodes|}}} | #Episodes | {{Preview warning|1=Page using [[Templat:Infobox television]] with "list_episodes" parameter using self-link. See [[Templat:Infobox television#Usage|Infobox instructions]] and [[MOS:INFOBOXPURPOSE]].}} |}} | header26 = Production | label27 = Executive producer{{Pluralize from text|{{{executive_producer|}}}|plural=s}} | data27 = {{{executive_producer|}}} | label28 = Producer{{Pluralize from text|{{{producer|}}}|plural=s}} | data28 = {{{producer|}}} | label29 = News editor{{Pluralize from text|{{{news_editor|}}}|plural=s}} | data29 = {{{news_editor|}}} | label30 = Production location{{Pluralize from text|{{{location|}}}|plural=s}} | data30 = {{{location|}}} | label31 = Cinematography | data31 = {{{cinematography|}}} | label32 = Animator{{Pluralize from text|{{{animator|}}}|plural=s}} | data32 = {{{animator|}}} | label33 = Editor{{Pluralize from text|{{{editor|}}}|plural=s}} | data33 = {{{editor|}}} | label34 = Camera setup | data34 = {{{camera|}}} | label35 = Running time | data35 = {{{runtime|}}} | label36 = Production {{Pluralize from text|{{If empty |{{{company|}}} |{{{studio|}}} }}|singular=company|plural=companies}} | data36 = {{If empty |{{{company|}}} |{{{studio|}}} }} | label38 = Budget | data38 = {{{budget|}}} | header40 = Original release | label41 = Network | data41 = {{If empty |{{{network|}}} |{{{channel|}}} }} | label42 = Release | data42 = {{#invoke:Infobox/dates|dates|{{If empty |{{{first_aired|}}} |{{{released|}}} }}|{{{last_aired|}}}}} | label43 = Network | data43 = {{If empty |{{{network2|}}} |{{{channel2|}}} }} | label44 = Release | data44 = {{#invoke:Infobox/dates|dates|{{If empty |{{{first_aired2|}}} |{{{released2|}}} }}|{{{last_aired2|}}}}} | label45 = Network | data45 = {{If empty |{{{network3|}}} |{{{channel3|}}} }} | label46 = Release | data46 = {{#invoke:Infobox/dates|dates|{{If empty |{{{first_aired3|}}} |{{{released3|}}} }}|{{{last_aired3|}}}}} | label47 = Network | data47 = {{If empty |{{{network4|}}} |{{{channel4|}}} }} | label48 = Release | data48 = {{#invoke:Infobox/dates|dates|{{If empty |{{{first_aired4|}}} |{{{released4|}}} }}|{{{last_aired4|}}}}} | label49 = Network | data49 = {{If empty |{{{network5|}}} |{{{channel5|}}} }} | label50 = Release | data50 = {{#invoke:Infobox/dates|dates|{{If empty |{{{first_aired5|}}} |{{{released5|}}} }}|{{{last_aired5|}}}}} | header60 = Related | data61 = {{{related|}}} | below = {{If preview|[[Templat:Infobox television#Usage|Infobox instructions (only shown in preview)]]}} }}<!-- Tracking categories -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Kategori:Pages using infobox television with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox television]] with unknown parameter "_VALUE_". See [[Templat:Infobox television#Usage|Infobox instructions]].|showblankpositional=1| alt | alt_name | animator | based_on | budget | camera | caption | channel | channel2 | channel3 | channel4 | channel5 | cinematography | company | composer | country | creative_director | creator | developer | director | editor | end_theme | endtheme | executive_producer | first_aired | first_aired2 | first_aired3 | first_aired4 | first_aired5 | genre | host | image | image_alt | image_size | image_upright | inspired_by | italic_title | judges | language | last_aired | last_aired2 | last_aired3 | last_aired4 | last_aired5 | list_episodes | location | music | name | narrated | narrator | native_name | network | network2 | network3 | network4 | network5 | news_editor | num_episodes | num_seasons | num_series | num_specials | open_theme| opentheme | presenter | producer | related | released | released2 | released3 | released4 | released5 | runtime | screenplay | starring | story | studio | teleplay | theme_music_composer | voices | writer }}<!-- -->{{Main other|{{#if: {{{host|}}} | [[Kategori:Pages using infobox television with alias parameters]] }}}}<!-- -->{{Main other|{{#if: {{{studio|}}} | [[Kategori:Pages using infobox television with alias parameters]] }}}}<!-- -->{{Main other|{{#invoke:Infobox television|validate_values}}}}<!-- -->{{Main other|{{#invoke:Infobox television disambiguation check|main|{{PAGENAME}}}}}}<!-- --><noinclude> {{Documentation}} </noinclude> jsn3m80qwk71nirc3o5t5h3i6l8v5lu Templat:Infobox university 10 147 354 353 2024-08-09T09:19:57Z Jon Harald Søby 58 1 semakan diimportkan 353 wikitext text/x-wiki {{Infobox | bodyclass = vcard | titleclass = fn org | titlestyle = font-size:125%; | title = {{{name|<includeonly>{{PAGENAMEBASE}}</includeonly>}}} | subheader = {{#if:{{{native_name|}}} |<div class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{if empty|{{{image|}}}|{{{image_name|}}}}}|size={{{image_size|}}} |upright={{if empty|{{{image_upright|}}}|1}} |alt={{{image_alt|}}}}} | caption = {{{caption|}}} | labelstyle = padding-right:0.65em;<!--(to ensure sufficient gap between (long/unwrapped) labels and subsequent data on same line)--> <!--------------------- Names, motto ----------------------> | class1 = nickname | data1 = {{#if:{{{latin_name|}}} |{{lang-la|{{{latin_name}}}}} }} | label2 = {{longitem|Other name{{#if:{{{other_names|}}}|s}}}} | class2 = nickname | data2 = {{if empty|{{{other_names|}}}|{{{other_name|}}}}} | label3 = {{longitem|Former name{{#if:{{{former_names|}}}|s}}}} | class3 = nickname | data3 = {{if empty|{{{former_names|}}}|{{{former_name|}}}}} | label4 = Motto | data4 = {{#if:{{both|{{{motto|}}}|{{{motto_lang|}}}}}|<div lang="{{{motto_lang}}}">{{{motto}}}</div>|{{{motto|}}}}} | label5 = {{longitem|Motto in&nbsp;English}} | data5 = {{{mottoeng|}}} | label6 = {{{top_free_label|}}} | data6 = {{#if:{{{top_free_label|}}} |{{{top_free|}}} }} | label7 = {{{top_free_label1|}}} | data7 = {{#if:{{{top_free_label1|}}} |{{{top_free1}}} }} | label8 = {{{top_free_label2|}}} | data8 = {{#if:{{{top_free_label2|}}} |{{{top_free2}}} }} <!---------- Date/s, type, affiliation, finance -----------> | label9 = Type | data9 = {{{type|}}} | label10 = {{#if:{{{closed|}}} |Active |Established}} | data10 = {{#if:{{{established|}}} |{{{established}}}{{#if:{{{closed|}}}|–{{{closed}}}}} }} | label11 = {{#if:{{{founders|}}}|Founders|Founder}} | data11 = {{if empty|{{{founders|}}}|{{{founder|}}}}} | label12 = {{longitem|Parent institution}} | data12 = {{{parent|}}} | label13 = [[Higher education accreditation|Accreditation]] | data13 = {{{accreditation|}}} | label14 = Affiliation | data14 = {{{affiliation|}}} | label15 = {{longitem|Religious affiliation}} | data15 = {{{religious_affiliation|}}} | label16 = {{longitem|Academic {{#if:{{{academic_affiliations|}}}|affiliations|affiliation}}}} | data16 = {{if empty|{{{academic_affiliations|}}}|{{{academic_affiliation|}}}}} | label17 = [[Financial endowment|Endowment]] | data17 = {{{endowment|}}} | label18 = Budget | data18 = {{{budget|}}} <!--------------------- Personnel -------------------------> | label19 = {{longitem|Officer in charge}} | data19 = {{{officer_in_charge|}}} | label20 = [[Chair (officer)|Chair]] | data20 = {{{chair|}}} | label21 = [[Chairperson|Chairman]] | data21 = {{{chairman|}}} | label22 = [[Chairperson]] | data22 = {{{chairperson|}}} | label23 = [[Visitor]] | data23 = {{{visitor|}}} | label24 = [[Chancellor (education)|Chancellor]] | data24 = {{{chancellor|}}} | label25 = [[University president|President]] | data25 = {{{president|}}} | label26 = {{nowrap|Vice-president}} | data26 = {{{vice-president|{{{vice_president|}}}}}} | label27 = [[Superintendent (education)|Superintendent]] | data27 = {{#if:{{{superintendent|}}} |{{{superintendent}}} [[Kategori:Pages using infobox university with the superintendent parameter]] |}} | label28 = {{nowrap|[[Vice-Chancellor]]}} | data28 = {{{vice_chancellor|}}} | label29 = [[Provost (education)|Provost]] | data29 = {{{provost|}}} | label30 = [[Rector (academia)|Rector]] | data30 = {{{rector|}}} | label31 = [[Principal (academia)|Principal]] | data31 = {{{principal|}}} | label32 = [[Dean (education)|Dean]] | data32 = {{{dean|}}} | label33 = Director | data33 = {{{director|}}} | label34 = {{{head_label}}} | data34 = {{#if:{{{head_label|}}} |{{{head|}}} }} | label35 = {{longitem|Academic staff}} | data35 = {{{academic_staff|}}}<!--for backwards compatibility:-->{{{faculty|}}} | label36 = {{longitem|Administrative staff}} | data36 = {{{administrative_staff|}}} | label37 = {{longitem|Total staff}} | data37 = {{{total_staff|}}} | label38 = Students | data38 = {{br separated entries|{{{students|}}}|{{{enrollment|}}}}} | label39 = [[Undergraduate education|Undergraduates]] | data39 = {{{undergrad|}}} | label40 = [[Postgraduate education|Postgraduates]] | data40 = {{{postgrad|}}} | label41 = {{longitem|[[Doctorate|Doctoral students]]}} | data41 = {{{doctoral|}}} | label42 = {{longitem|Other students}} | data42 = {{if empty|{{{other_students|}}}|{{{other|}}}}} <!------------ Location, language, {{{free}}} -------------> | label43 = {{#if:{{{address|}}}|Address|Location}} | class43 = adr | data43 = {{Br separated entries | 1 = {{#if:{{{location|}}} | <div style="display:inline" class="extended-address">{{{location}}}</div> | {{Comma separated entries | 1 = {{#if:{{{address|}}}|<div style="display:inline" class="street-address">{{{address}}}</div>}} | 2 = {{#if:{{{city|}}}|<div style="display:inline" class="locality">{{{city}}}</div>}} | 3 = {{#if:{{{canton|}}}{{{prefecture|}}}{{{province|}}}{{{region|}}}{{{state|}}}|<div style="display:inline" class="state">{{Comma separated entries|{{{canton|}}}|{{{prefecture|}}}|{{{province|}}}|{{{region|}}}|{{{state|}}}}}</div>}} | 4 = {{#if:{{{postalcode|}}}{{{postcode|}}}{{{zipcode|}}}|<div style="display:inline" class="postal-code">{{If empty|{{{postalcode|}}}|{{{postcode|}}}|{{{zipcode|}}}}}</div>}} | 5 = {{#if:{{{country|}}}|<div style="display:inline" class="country-name">{{{country}}}</div>}} }} }} | 2 = {{if empty|{{{coordinates|}}}|{{{coor|}}}}} }} | label44 = Campus | data44 = {{#if:{{{campus_size|}}}|{{#if:{{{campus_type|{{{campus|}}}}}}|{{{campus_type|{{{campus|}}}}}}, {{{campus_size}}}|{{{campus_size}}}}}|{{{campus_type|{{{campus|}}}}}}}} | label45 = Language | data45 = {{{language|}}} | label46 = {{if empty|{{{free_label|}}}|{{{free_label1|}}}}} | data46 = {{#if:{{{free_label|}}}{{{free_label1|}}} |{{{free|}}} {{{free1|}}} }} | label47 = {{{free_label2|}}} | data47 = {{#if:{{{free_label2|}}} |{{{free2}}} }} <!------------ Colo/urs, sports, website, etc -------------> | label48 = [[School colors|Colo{{#if:{{{colours|}}}|u}}rs]] | data48 = {{{colors|}}}{{{colours|}}} | label49 = [[Athletic nickname|Nickname]]{{#if:{{{athletics_nicknames|}}}{{{sports_nicknames|}}}|s}} | data49 = {{if empty|{{{athletics_nicknames|}}}|{{{sports_nicknames|}}}|{{{athletics_nickname|}}}|{{{sports_nickname|}}}|{{{nickname|}}}}} | label50 = {{#if:{{{athletics_affiliations|{{{sporting_affiliations|}}}}}}|{{longitem|Sporting affiliations}}|Affiliations}} | data50 = {{if empty|{{{athletics_affiliations|{{{sporting_affiliations|}}}}}}|{{{affiliations|}}}}} | label52 = Mascot{{#if:{{{mascots|}}}|s}} | data52 = {{if empty|{{{mascots|}}}|{{{mascot|}}}}} | label53 = {{{sports_free_label|}}} | data53 = {{{sports_free|}}} | label54 = {{{sports_free_label1|}}} | data54 = {{{sports_free1|}}} | label55 = {{{sports_free_label2|}}} | data55 = {{{sports_free2|}}} | label56 = {{{sports_free_label3|}}} | data56 = {{{sports_free3|}}} | label57 = Website | data57 = {{{website|}}} | data58 = {{#invoke:InfoboxImage|InfoboxImage |image={{{logo|}}}|size={{{logo_size|}}}|upright={{{logo_upright|}}}|alt={{{logo_alt|}}}}} | header59 = {{if empty|{{{nrhp|}}}|{{{embedded|}}}|{{{module|}}}}} <!-------------------- Location map -----------------------> | data60 = {{#if:{{{pushpin_map|}}} | {{Location map|{{{pushpin_map}}} | float = center | caption = {{#if:{{{pushpin_map_caption|}}}|{{{pushpin_map_caption}}}|Location in {{#invoke:Location map|data|{{{pushpin_map}}}|name}}}} | border = infobox | width = {{if empty|{{{map_size|}}}|250}} | coordinates = {{if empty|{{{coordinates|}}}|{{{coor|}}}}} | position = {{{pushpin_label_position|}}} }} }} | below = {{{footnotes|}}} }}{{Main other|[[Kategori:Articles using infobox university]] }}{{#if:{{{image_name|}}}|{{Main other|[[Kategori:Pages using infobox university with the image name parameter]]}} }}{{#if:{{{affiliations|}}}|{{Main other|[[Kategori:Pages using infobox university with the affiliations parameter]]}} }}{{#if:{{{nickname|}}}|{{Main other|[[Kategori:Pages using infobox university with the nickname alias]]}} }}{{#invoke:Check for unknown parameters|check |unknown={{main other|[[Kategori:Pages using infobox university with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox university]] with unknown parameter "_VALUE_"|ignoreblank=y | academic_affiliation | academic_affiliations | academic_staff | accreditation | address | administrative_staff | affiliation | affiliations | athletics_affiliations | athletics_nickname | athletics_nicknames | budget | campus | campus_type | campus_size | canton | caption | chair | chairman | chairperson | chancellor | city | closed | colors | colours | coor | coordinates | country | dean | director | doctoral | embedded | endowment | enrollment | established | faculty | footnotes | former_name | former_names | founder | founders | free | free1 | free2 | free_label | free_label1 | free_label2 | head | head_label | image | image_alt | image_name | image_size | image_upright | language | latin_name | location | logo | logo_alt | logo_size | logo_upright | map_size | mascot | mascots | module | motto | mottoeng | motto_lang | mottoeng | name | native_name | native_name_lang | nickname | nrhp | officer_in_charge | other | other_name | other_names | other_students | parent | postalcode | postcode | postgrad | prefecture | president | principal | province | provost | pushpin_label_position | pushpin_map | pushpin_map_caption | rector | region | religious_affiliation | sporting_affiliations | sports_free | sports_free1 | sports_free2 | sports_free3 | sports_free_label | sports_free_label1 | sports_free_label2 | sports_free_label3 | sports_nickname | sports_nicknames | state | students | superintendent | top_free | top_free1 | top_free2 | top_free_label | top_free_label1 | top_free_label2 | total_staff | type | undergrad | vice_chancellor | vice-president | vice_president | visitor | website | zipcode }}<!-- tracking conflicting parameters -->{{#invoke:Check for clobbered parameters|check | template = Infobox university | cat = {{main other|Category:Pages using infobox university with conflicting parameters}} | image; image_name | other_names; other_name | former_names; former_name | founders; founder | academic_affiliations; academic_affiliation | academic_staff; faculty | campus_type; campus | other_students; other | location; address | location; city | location; address | location; canton | location; prefecture | location; province | location; region | location; state | location; country | location; postalcode | location; postcode | location; zipcode | postalcode; postcode; zipcode | coordinates; coor | colors; colours | free_label; free_label1 | free; free1 | athletics_nicknames; sports_nicknames; athletics_nickname; sports_nickname; nickname | athletics_affiliations; sporting_affiliations | affiliation; affiliations | mascots; mascot | nrhp; embedded; module }}<noinclude> {{Documentation}} </noinclude> 2bk7jl0j03frz09glwf22addgio541w Templat:Infobox website 10 148 356 355 2024-08-09T09:19:58Z Jon Harald Søby 58 1 semakan diimportkan 355 wikitext text/x-wiki {{Infobox | bodyclass = vcard | child = {{lc:{{{embed|}}}}} | decat = yes | titleclass = fn org | title = {{if empty|{{{name|}}}|{{{company_name|}}}|{{{websitename|}}}|<includeonly>{{PAGENAMEBASE}}</includeonly>}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{if empty|{{{company_logo|}}}|{{{logo|}}}|{{{websitelogo|}}}}}|size={{{logo_size|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{logo_alt|}}}}} | caption1 = {{if empty|{{{logo_caption|}}}|{{{logocaption|}}}}} | image2 = {{#if:{{{collapsible|}}}|{{hidden begin|title={{{collapsetext|Screenshot}}}|titlestyle=background:{{{background|gainsboro}}};text-align:center|contentstyle=text-align:center}}}} {{#invoke:InfoboxImage|InfoboxImage|image={{{screenshot|}}}|size={{{screenshot_size|}}}|sizedefault=300px|alt={{{screenshot_alt|}}}}} | caption2 = {{{caption|}}}{{#if:{{{collapsible|}}}|{{hidden end}}}} | label1 = Type of business | class1 = category | data1 = {{{company_type|}}} | label2 = {{longitem|Type of site}} | data2 = {{if empty|{{{website_type|}}}|{{{type|}}}}} | label3 = Available&nbsp;in | data3 = {{#if:{{{language_count|}}} |{{{language_count}}} languages |{{{language|}}} }}{{{language_footnote|}}} | data4 = {{#if:{{both| {{{language_count|}}} | {{{language|}}}}} |{{Begin hidden|titlestyle=background:transparent;|title=List of languages}}{{{language|}}}{{End hidden}} }} | label5 = [[Ticker symbol|Traded&nbsp;as]] | data5 = {{{traded_as|}}} | label6 = Founded | data6 = {{if empty|{{{founded|}}}|{{{foundation|}}}}} | label7 = [[Dissolution (law)|Dissolved]] | data7 = {{{dissolved|}}} | label8 = Predecessor(s) | data8 = {{{predecessor|}}} | label9 = Successor(s) | data9 = {{{successor|}}} | label10 = Headquarters | class10 = {{#if:{{{headquarters|}}}{{{location|}}}|label|adr}} | data10 = {{comma separated entries | 1= {{if empty|{{{headquarters|}}}|{{{location|}}}}} | 2= {{#if:{{{location_city|}}}|<div style="display:inline;" class="locality">{{{location_city}}}</div>}} | 3= {{#if:{{{country|}}}{{{location_country|}}}|<div style="display:inline;" class="country-name">{{if empty|{{{country|}}}|{{{location_country}}}}}</div>}} }} | label11 = Country of origin | data11 = {{{country_of_origin|}}} | label12 = No.&nbsp;of locations | data12 = {{{locations|}}} | label13 = Area&nbsp;served | data13 = {{{area_served|}}} | label14 = Owner{{#if:{{{owners|}}}|s}} | data14 = {{if empty|{{{owners|}}}|{{{owner|}}}}} <!-- Essentially the same, but up to the editor to choose --> | label15 = Created&nbsp;by | data15 = {{if empty|{{{author|}}}|{{{creator|}}}|{{{authors|}}}|{{{creators|}}}}} | label16 = [[Organizational founder|Founder(s)]] | data16 = {{{founder|}}} | label17 = Editor{{#if:{{{editors|}}}|s}} | data17 = {{if empty|{{{editors|}}}|{{{editor|}}}}} | label18 = Chairman | data18 = {{{chairman|}}} | label19 = Chairperson | data19 = {{{chairperson|}}} | label20 = President | data20 = {{{president|}}} | label21 = CEO | data21 = {{{CEO|}}} | label22 = [[Chief executive officer|Managing director]] | data22 = {{{MD|}}} | label23 = General manager | data23 = {{{GM|}}} | label24 = Key&nbsp;people | data24 = {{{key_people|}}} | label25 = Industry | class25 = category | data25 = {{{industry|}}} | label26 = [[Product (business)|Products]] | data26 = {{{products|}}} | label27 = [[Service (economics)|Services]] | data27 = {{{services|}}} | label28 = [[Revenue]] | data28 = {{if empty|{{{revenue|}}}|{{{rev|}}}}} | label29 = [[Earnings before interest and taxes|Operating income]] | data29 = {{{operating_income|}}} | label30 = {{#ifeq:{{if empty|{{{international|}}}|{{{intl|}}}}}|yes|[[Net income|Profit]]|[[Net income]]}} | data30 = {{{net_income|}}} | label31 = [[Asset|Total assets]] | data31 = {{{assets|}}} | label32 = [[Equity (finance)|Total equity]] | data32 = {{{equity|}}} | label33 = Employees | data33 = {{if empty|{{{employees|}}}|{{{num_employees|}}}}} | label34 = [[Holding company|Parent]] | data34 = {{{parent|}}} | label35 = [[Division (business)|Divisions]] | data35 = {{{divisions|}}} | label36 = [[Subsidiary|Subsidiaries]] | data36 = {{if empty|{{{subsidiaries|}}}|{{{subsid|}}}}} | label37 = URL | class37 = url | data37 = {{if empty|{{{url|}}}|{{{website|}}}|{{{homepage|}}}}} | label38 = [[IPv6]] support | data38 = {{{ipv6|}}} | label40 = [[Online advertising|Advertising]] | data40 = {{{advertising|}}} | label41 = Commercial | data41 = {{{commercial|}}} | label42 = Registration | data42 = {{if empty|{{{registration|}}}|{{{reg|}}}}} | label43 = [[Registered user|Users]] | data43 = {{if empty|{{{users|}}}|{{{num_users|}}}}} | label44 = Launched | data44 = {{if empty|{{{launched|}}}|{{{launch_date|}}}|{{{date_of_launch|}}}}} | label45 = Current&nbsp;status | class45 = category | data45 = {{{current_status|}}} | label46 = [[Computing platform|Native client(s) on]] | data46 = {{{native_clients|}}} <!-- Spelled differently; see [[MOS:ENGVAR]] --> | label47 = {{#if:{{{content_license|}}}{{{license|}}}|{{longitem|Content license}}|{{longitem|Content licence}}}} | data47 = {{if empty|{{{content_license|}}}|{{{license|}}}|{{{content_licence|}}}|{{{licence|}}}}} | label48 = Written&nbsp;in | data48 = {{{programming_language|}}} | label49 = [[ISSN]] | data49 = {{ISSN link|1={{if empty|{{{issn|}}}|{{{ISSN|}}}}}|2={{if empty|{{{eissn|}}}|{{{eISSN|}}}}}}} | label50 = [[OCLC]]&nbsp;number | data50 = {{#if:{{{oclc|}}}|{{OCLC search link|{{{oclc}}} }} }} | data99 = {{{module|}}} | below = {{{footnotes|}}} }}{{#invoke:Check for unknown parameters|check|unknown=[[Kategori:{{main other|Pages using infobox website with unknown parameters|Non-articles using infobox website with unknown parameters}}|_VALUE_{{PAGENAME}}]]|preview=Page using [[Templat:Infobox website]] with unknown parameter "_VALUE_"|ignoreblank=y| advertising | area_served | assets | author | authors | background | caption | CEO | chairman | chairperson | collapsetext | collapsible | commercial | company_logo | company_name | company_type | content_licence | content_license | country | country_of_origin | creator | creators | current_status | date_of_launch | dissolved | divisions | editor | editors | embed | employees | equity | footnotes | foundation | founded | founder | GM | headquarters | homepage | industry | international | intl | ipv6 | issn | ISSN | eissn | eISSN | key_people | language | language_count | language_footnote | launch_date | launched | licence | license | location | location_city | location_country | locations | logo | logo_alt | logo_caption | logo_size | logocaption | MD | module | name | native_clients | net_income | num_employees | num_users | oclc | operating_income | owner | owners | parent | predecessor | president | products | programming_language | reg | registration | rev | revenue | screenshot | screenshot_alt | screenshot_size | services | subsid | subsidiaries | successor | traded_as | type | url | users | website | website_type | websitelogo | websitename }}{{#invoke:check for clobbered parameters|check | template = Infobox website | cat = {{main other|Category:Pages using infobox website with redundant parameters}} | name; company_name; websitename | company_logo; logo; websitelogo | logo_caption; logocaption | website_type; type | founded; foundation | headquarters; location | country; location_country | owners; owner | author; creator; authors; creators | editors; editor | revenue; rev | international; intl | employees; num_employees | subsidiaries; subsid | url; website; homepage | registration; reg | users; num_users | launched; launch_date; date_of_launch | content_license; license; content_licence; licence | issn; ISSN | eissn; eISSN }}<noinclude> {{Documentation}} </noinclude> 8xn8lox0g8zy5xfke58l8utudr4dbpg Templat:Infobox writer 10 149 358 357 2024-08-09T09:19:58Z Jon Harald Søby 58 1 semakan diimportkan 357 wikitext text/x-wiki {{Infobox | bodyclass = vcard | bodystyle = {{#if:{{{box_width|}}} |width:{{{box_width}}};}} | child = {{lc:{{{embed}}}}} | title = {{#ifeq:{{lc:{{{embed}}}}}|yes|'''Writing career'''}} | abovestyle = font-size:125%; | above = {{#ifeq:{{lc:{{{embed}}}}}|yes|| {{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|}}}}}}}}} |<div class="honorific-prefix" style="display:inline;font-size: 77%; font-weight: normal;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix}}}}}}}}}</div><br/>}}<!-- --><includeonly><div style="display:inline;" class="fn">{{{name|{{PAGENAMEBASE}}}}}</div></includeonly><!-- -->{{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|}}}}}}}}} |<br/><div class="honorific-suffix" style="display:inline;font-size: 77%; font-weight: normal;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix}}}}}}}}}</div>}}<!-- -->}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|300|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}}x200px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |title={{{caption|}}} |suppressplaceholder=yes}} | caption = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}} | captionstyle = line-height:1.4em; | labelstyle = line-height:1.2em; padding-right:0.65em; | datastyle = line-height:1.4em; | label1 = Native name | data1 = {{#if:{{{native_name|}}} |<div class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}} | label2 = Born | data2 = {{br separated entries | 1={{{birth_name|}}} | 2={{#switch:{{lc:{{{birth_date|}}}}} |? |?? |??? |???? |19? |19?? |18?? |17?? |u |unk |unknown = {{abbr|DOB|Date of birth}}&nbsp;unknown | {{{birth_date|}}} }} | 3={{{birth_place|}}} }} | label3 = Died | data3 = {{br separated entries | 1={{#switch:{{lc:{{{death_date|}}}}} |? |?? |??? |???? |19? |19?? |18?? |17?? |u |unk |unknown = {{abbr|DOD|Date of death}}&nbsp;unknown | {{{death_date|}}} }} | 2={{{death_place|}}} }} | label4 = Resting place | data4 = {{br separated entries|{{{resting_place|}}} |{{{resting_place_coordinates|}}} }} | label5 = Pen name | class5 = nickname | data5 = {{{penname|{{{pseudonym|}}}}}} | label6 = Nickname | class6 = nickname | data6 = {{{nickname|}}} | label7 = Occupation | class7 = role | data7 = {{{occupation|}}} | label8 = Language | data8 = {{{language|}}} | label10 = Nationality | class10 = category | data10 = {{{nationality|}}} | label11 = Citizenship | data11 = {{{citizenship|}}} | label12 = Education | data12 = {{{education|}}} | label13 = Alma&nbsp;mater | data13 = {{{alma_mater|}}} | label15 = Period | data15 = {{{period|}}} | label16 = Genre{{#if:{{{genres|}}}|s}} | class16 = category | data16 = {{#if:{{{genres|}}}|{{{genres}}}|{{{genre|}}}}} | label17 = Subject{{#if:{{{subjects|}}}|s}} | data17 = {{#if:{{{subjects|}}}|{{{subjects}}}|{{{subject|}}}}} | label18 = Literary movement | data18 = {{{movement|}}} | label21 = Years&nbsp;active | data21 = {{{years active|{{{years_active|{{{yearsactive|}}}}}}}}} | label22 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data22 = {{{employer|}}}{{main other|{{Pluralize from text| {{{employer|}}}|likely=}}}} | class22 = org | label29 = Notable work{{#if:{{{notableworks|{{{notable_works|}}}}}}|s}} | data29 = {{#if:{{{notableworks|{{{notable_works|}}}}}}|{{{notableworks|{{{notable_works|}}}}}}|{{{notablework|}}}}} | label30 = Notable awards | data30 = {{{awards|}}} | label32 = Spouse{{#if:{{{spouses|}}}|s}} | data32 = {{#if:{{{spouses|}}}|{{{spouses}}}|{{{spouse|}}}}} | label33 = Partner{{#if:{{{partners|}}}|s}} | data33 = {{#if:{{{partners|}}}|{{{partners}}}|{{{partner|}}}}} | label34 = Children | data34 = {{{children|}}} | label35 = Parent{{#if:{{{parents|}}}|s}} | data35 = {{#if:{{{parents|}}}|{{{parents}}}|{{{parent|}}}}} | label36 = Relatives | data36 = {{{relatives|{{{relations|}}}}}} |header39 = {{#if:{{{signature|}}}|{{if empty|{{{signature_type|}}}|Signature}}}} | data40 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|sizedefault=150px|upright=0.72|alt={{{signature_alt|}}}}} | data41 = {{{misc|{{{module|}}}}}} | header42 = {{#if:{{{website|{{{homepage|{{{URL|}}}}}}}}}|Website}} | data43 = {{{website|{{{homepage|{{{URL|}}}}}}}}} | data44 = {{#if:{{{portaldisp|}}} |<hr/>'''{{portal-inline|Literature|size=tiny}}'''}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using Infobox writer with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Infobox writer]] with unknown parameter "_VALUE_"|ignoreblank=y| alma_mater | alt | awards | birth_date | birth_name | birth_place | box_width | caption | children | citizenship | death_date | death_place | education | embed | employer | genre | genres | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | image | image caption | image size | image_caption | image_size | image_upright | imagesize | landscape | language | misc | module | movement | name | nationality | native_name | native_name_lang | nickname | notablework | notableworks | notable_works | occupation | partner | partners | penname | period | portaldisp | pronunciation | pseudonym | relations | relatives | resting_place | resting_place_coordinates | signature | signature_alt | signature_size | signature_type | spouse | spouses | subject | subjects | URL | website | years active | years_active | yearsactive | parent | parents}}{{main other| {{#if:{{{pronunciation|}}} |[[Kategori:Biography template using pronunciation]] }}{{#if:{{{website|{{{homepage|{{{URL|}}}}}}}}}|{{#switch:{{str left|{{{website|{{{homepage|{{{URL|}}}}}}}}}|1}}|<=|[=|#default=[[Kategori:Biography template using bare URL in website parameter]]}}}} }}<noinclude> {{Documentation}} </noinclude> 3y1qumpg7nzziczg0catzdjlbaq7wi9 Templat:Is italic taxon 10 150 360 359 2024-08-09T09:19:58Z Jon Harald Søby 58 1 semakan diimportkan 359 wikitext text/x-wiki {{#ifeq:{{{virus|no}}}|yes|<!-- virus -->{{#switch:{{lc:{{{1}}} }} |unranked_domain|unranked domain|unranked|virus_group|virus group|virus|strain|serotype=no |#default=yes}}|<!-- not virus -->{{#switch:{{lc:{{{1}}} }} |genus|ichnogenus|oogenus|subgenus|ichnosubgenus|oosubgenus |supersectio|sectio|subsectio |series|subseries |species_complex|species complex|species_group|species group|species_subgroup|species subgroup |species|ichnospecies|oospecies|subspecies|ichnosubspecies|oosubspecies=yes |#default=no}} }}<noinclude> {{Documentation}}</noinclude> pggonbn5gicszqmw5prxuga4c6hpvbm Templat:Jawi 10 151 362 361 2024-08-09T09:19:58Z Jon Harald Søby 58 1 semakan diimportkan 361 wikitext text/x-wiki #REDIRECT [[Templat:Lang-ms-Arab]] 6ouqqwahxp4spb39jh6e57eek6a4tl0 Templat:Lang 10 152 711 365 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 363 wikitext text/x-wiki <includeonly>{{#invoke:Lang|{{{fn|lang}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> rpiilobim1eh22a50sfaaeqssz4iwxu Templat:Lang-ko 10 153 367 366 2024-08-09T09:19:59Z Jon Harald Søby 58 1 semakan diimportkan 366 wikitext text/x-wiki <includeonly>{{#invoke:Lang|lang_xx_inherit |code=ko }}</includeonly><noinclude> {{Documentation|Template:Lang-x/doc}} [[Kategori:Korean name templates]] </noinclude> ofwn7b1d8o2bwh6jjhmpxn3m9ejna0d Templat:Lang-ms-Arab 10 154 370 369 2024-08-09T09:19:59Z Jon Harald Søby 58 2 semakan diimportkan 368 wikitext text/x-wiki <includeonly>{{#invoke:Lang|lang_xx_inherit |code=ms-Arab }}</includeonly><noinclude> {{Documentation|Template:Lang-x/doc}} [[Kategori:Austronesian multilingual support templates]] </noinclude> 7zhk21c6srwoi311p8bh0mw72ck84ty Templat:Lang-th 10 155 713 373 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 371 wikitext text/x-wiki <includeonly>{{#invoke:Lang|lang_xx_inherit |code=th }}{{#if:{{{2|}}}|{{Main other|[[Kategori:Instances of Lang-th using second unnamed parameter]]}}}}</includeonly><noinclude> {{Documentation |1=Template:Lang-x/doc |content={{Template:Lang-x/doc |category=Articles containing Thai-language text |tracking-category=Instances of Lang-th using second unnamed parameter }} }} [[Kategori:Kra–Dai multilingual support templates]] </noinclude> k7r61zqs5ww16gbxvgdydhrooglsj1m Templat:Large 10 156 715 376 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 374 wikitext text/x-wiki <span style="font-size:120%">{{{1}}}</span><noinclude> {{Documentation}} </noinclude> gb9jg7srxpcm0n8wv0k3unldj3qzdrc Templat:Legend/styles.css 10 157 378 377 2024-08-09T09:19:59Z Jon Harald Søby 58 1 semakan diimportkan 377 sanitized-css text/css /* {{pp-template}} */ .legend { page-break-inside: avoid; break-inside: avoid-column; } .legend-color { display: inline-block; min-width: 1.25em; height: 1.25em; line-height: 1.25; margin: 1px 0; text-align: center; border: 1px solid black; background-color: transparent; color: black; } .legend-text {/*empty for now, but part of the design!*/} snsolhs3l12896xqc89e8b5hu9itnmf Templat:Legend inline 10 158 380 379 2024-08-09T09:20:00Z Jon Harald Søby 58 1 semakan diimportkan 379 wikitext text/x-wiki <includeonly><!-- --><templatestyles src="Legend/styles.css" /><!-- --><span class="legend nowrap"><!-- --><span class="legend-color mw-no-invert" style="<!-- -->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!-- -->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!-- -->{{#if:{{{textcolor|}}}|color:{{{textcolor}}};}}<!-- -->{{#if:{{{size|}}}|font-size:{{{size}}};}}"><!-- -->{{#if:{{{text|}}}{{{alt|}}} | <span class="legend-text" style="{{#if:{{{alt|}}}|color:{{{1|}}};}}font-family: monospace, monospace;">{{If empty|{{{alt|}}}|{{Encodefirst|{{{text|}}}}}|&nbsp;}}</span>|&nbsp;}}<!-- --></span><!-- -->&nbsp;{{{2|}}}<!-- --></span><!-- --></includeonly><noinclude> {{Documentation}} </noinclude> 0i229mxwoevzt9y3hypcw1q4nhdlej7 Templat:Longitem 10 159 383 382 2024-08-09T09:20:00Z Jon Harald Søby 58 2 semakan diimportkan 382 wikitext text/x-wiki <noinclude>{{#tag: code| </noinclude>{{#ifeq: {{{1|+}}} | {{{1|-}}} | <div style="}}display: inline-block; line-height: 1.2em; padding: .1em 0; {{#ifeq: {{{1|+}}} | {{{1|-}}} | {{{style|}}}">{{{1|}}}</div> | <includeonly>width: 100%;</includeonly> }}<includeonly>{{#if:{{{2|}}}|[[Kategori:Pages using Template:Longitem with unnamed style parameter]]}}</includeonly><noinclude> |lang=wikitext}} {{Documentation}} {{INTERWIKI|Q11722212}} </noinclude> 6xipab89bteodbuy08hla7smbyr85v8 Templat:Lorem ipsum 10 160 717 386 2024-08-09T09:21:22Z Jon Harald Søby 58 1 semakan diimportkan 384 wikitext text/x-wiki {{#ifexpr:{{{1|1}}}>0|{{Lorem ipsum/p-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P1|link={{{link|{{{4|no}}}}}}}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>1|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P2}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>2|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P3}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>3|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P4}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>4|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P5}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>5|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P6}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>6|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P7}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>7|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P8}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>8|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P9}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>9|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P10}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>10|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P11}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>11|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P12}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>12|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P13}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>13|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P14}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>14|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P15}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>15|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P16}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>16|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P17}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>17|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P18}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>18|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P19}}{{{3|}}} |}}{{#ifexpr:{{{1|1}}}>19|{{Lorem ipsum/pb-cond|{{{2|}}}|{{{join|}}}}}{{{2|}}}{{Lorem ipsum/P20}}{{{3|}}}}}{{Lorem ipsum/p-end-cond|{{{2|}}}|{{{join|}}}}}<includeonly>{{#ifeq:{{{cat|}}}|no||{{Main other|[[Kategori:Wikipedia articles containing placeholders]]}}}}</includeonly><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, AND INTERWIKIS TO WIKIDATA, THANKS --> </noinclude> okeh2urz2a98l0pjz4g8ciqi654pqms Templat:Lorem ipsum/P1 10 161 388 387 2024-08-09T09:20:00Z Jon Harald Søby 58 1 semakan diimportkan 387 wikitext text/x-wiki {{#ifeq:{{{link|no}}}|yes|[[Lorem ipsum]]|Lorem ipsum}} dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<noinclude>{{pp-template}}</noinclude> q2pmmu1fq1hlsxz747b5d901gp06zkp Templat:Lorem ipsum/P2 10 162 390 389 2024-08-09T09:20:00Z Jon Harald Søby 58 1 semakan diimportkan 389 wikitext text/x-wiki Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. 0okg8uh7isdujb97jkpg9swbizw44is Templat:Lorem ipsum/P3 10 163 392 391 2024-08-09T09:20:01Z Jon Harald Søby 58 1 semakan diimportkan 391 wikitext text/x-wiki Fusce convallis, mauris imperdiet gravida bibendum, nisl turpis suscipit mauris, sed placerat ipsum urna sed risus. In convallis tellus a mauris. Curabitur non elit ut libero tristique sodales. Mauris a lacus. Donec mattis semper leo. In hac habitasse platea dictumst. Vivamus facilisis diam at odio. Mauris dictum, nisi eget consequat elementum, lacus ligula molestie metus, non feugiat orci magna ac sem. Donec turpis. Donec vitae metus. Morbi tristique neque eu mauris. Quisque gravida ipsum non sapien. Proin turpis lacus, scelerisque vitae, elementum at, lobortis ac, quam. Aliquam dictum eleifend risus. In hac habitasse platea dictumst. Etiam sit amet diam. Suspendisse odio. Suspendisse nunc. In semper bibendum libero. qv2sza0i5644otxuj66ct8rgl66z1y7 Templat:Lorem ipsum/p-cond 10 164 394 393 2024-08-09T09:20:01Z Jon Harald Søby 58 1 semakan diimportkan 393 wikitext text/x-wiki {{#ifeq: {{{2|{{{join|no}}}}}} | yes | | {{#switch: {{#invoke:String|sub|x{{{1|}}}|2|2}} | : | # | * = | #default = <p><!-- -->}} }}</p><noinclude>{{Documentation |content= Conditional paragraph begin. Generates a begin p-tag if needed, depending on ''prefix'' and ''join'': * nothing, in the case of joins; * nothing, where prefix metacharacters are present like (<code>*</code>, <code>#</code>, or <code>:</code>) which must sit in column 1; * a begin p-tag before the first lorem paragraph, in other cases. == Usage == {{tlc|Lorem ipsum/p-cond|''prefix''|''join''}} }}</noinclude> nx7n2cm777czmq56rdgn8hir342fni5 Templat:Lorem ipsum/p-end-cond 10 165 396 395 2024-08-09T09:20:01Z Jon Harald Søby 58 1 semakan diimportkan 395 wikitext text/x-wiki {{#ifeq: {{{2|{{{join|no}}}}}} | yes | | {{#switch: {{#invoke:String|sub|x{{{1|}}}|2|2}} | : | # | * = | #default = </p><!-- -->}} }}<noinclude>{{Documentation |content= Conditional paragraph end. Generates an p-tag if needed, depending on ''prefix'' and ''join'': * nothing, in the case of joins; * nothing, where prefix metacharacters are present like (<code>*</code>, <code>#</code>, or <code>:</code>) which must sit in column 1, don't acquire begin-p tags, and therefore don't need an end p-tag; * an end p-tag after the lorem paragraph emitted last, in other cases. == Usage == {{tlc|Lorem ipsum/p-end-cond|''prefix''|''join''}} }}</noinclude> f74cby9ro3huc4uz42mnbnlxcc09ep4 Templat:Lorem ipsum/pb-cond 10 166 398 397 2024-08-09T09:20:01Z Jon Harald Søby 58 1 semakan diimportkan 397 wikitext text/x-wiki {{#ifeq: {{{2|{{{join|no}}}}}} | yes | &nbsp; | {{#switch: {{#invoke:String|sub|x{{{1|}}}|2|2}} | : | # | * = | #default = </p> <p><!-- --> }} }}<noinclude></p>{{Documentation |content= Conditional paragraph break. Generates correct content between lorem paragraphs, depending on ''prefix'' and ''join'': * a single space in the case of joins * an inverted p-tag pair between paragraphs where needed * nothing at all for prefix metacharacters like (<code>*</code>, <code>#</code>, or <code>:</code>) which must sit in column 1. == Usage == {{tlc|Lorem ipsum/pb-cond|''prefix''|''join''}} }}</noinclude> 0o7om9pbcw5wxx4d6ve3y3pd34200v2 Templat:Lower 10 167 400 399 2024-08-09T09:20:01Z Jon Harald Søby 58 1 semakan diimportkan 399 wikitext text/x-wiki <span style="position: relative; top: {{Safesubst<noinclude />:#if:{{{2|}}}|{{{1}}}|0.6em}};">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} </noinclude> 3sa53qumtyj81vkyig6326tfcixciql Templat:Main other 10 168 719 403 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 402 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> {{INTERWIKI|Q5627213}} </noinclude> 2ap2g3h3y2k6v7tul3sodona559sxub Templat:Map caption 10 169 721 406 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 404 wikitext text/x-wiki <div style="text-align:center;line-height:1.15em;">Location of{{#if:{{{countryprefix|}}} |&nbsp;{{{countryprefix}}} }}&nbsp;{{#ifexist:{{{country}}} |[[{{{country}}}]] |{{{country|{{PAGENAME}}}}} }}{{#ifeq:{{{location|{{{location_color|any}}}}}}|none| |&nbsp;({{{location|{{{location_color|orange}}}}}}) }}{{#if:{{{region|{{{legend|}}}}}} |{{#if:{{{subregion|}}} |<p style="text-align:left;margin-left:1.2ex;margin-top:0px;margin-bottom:0px;line-height:1.15em;">–&nbsp; |<p style="text-align:center;margin-top:0px;margin-bottom:0px;line-height:1.15em;"> }}{{#switch:{{{region|none}}} | none = | Europe | [[Europe]] | in Europe | in [[Europe]] | on the European continent | on the [[Europe|European continent]] = in [[Europe]] | Pacific | [[Pacific]] | the Pacific | the [[Pacific]] | the Pacific Ocean = in the [[Pacific Ocean]] | Middle East | [[Middle East]] | Arctic Circle | [[Arctic Circle]] | Pacific Ocean | [[Pacific Ocean]] = in the {{#ifexist:{{{region}}}|[[{{{region}}}]]|{{{region}}}}} | #default = in {{#ifexist:{{{region}}} |[[{{{region}}}]] |{{{region}}} }} }}{{#if:{{{region|}}} |{{#ifeq:{{{region_color|any}}}|none| |&nbsp;({{#if:{{{subregion|}}} |{{#ifeq:{{{subregion_color|tan}}}|{{{region_color|white}}}| |{{#ifeq:{{{subregion_color|any}}}|none| |{{{subregion_color|tan}}} &&nbsp; }} }} }}{{{region_color|white}}}) }}{{#if:{{{subregion|}}} |<br />–&nbsp;{{#switch:{{{subregion|none}}} | EU | [[EU]] | the EU | the [[EU]] | European Union | [[European Union]] | the European Union | the [[European Union]] = in the [[European Union]] | #default = in {{#ifexist:{{{subregion}}} |[[{{{subregion}}}]] |{{{subregion}}} }} }}{{#ifeq:{{{subregion_color|any}}}|none| |&nbsp;({{{subregion_color|tan}}}) }} }} }}{{#if:{{{legend|}}} |{{#switch:<!--[13]-->{{{subregion|none}}} | EU | [[EU]] | the EU | the [[EU]] | European Union | [[European Union]] | the European Union | the [[European Union]] = {{#ifeq:{{{subregion_color|tan}}}|tan |&nbsp; |&nbsp; –&nbsp; }} | none = {{#ifeq:{{{region|none}}}|none| |&nbsp; –&nbsp; }} | #default = &nbsp; –&nbsp; }} &#91;[[:File:{{{legend}}}|Legend]]&#93; }}</p> }}</div><noinclude> {{documentation}} </noinclude> d0huf50rkdhicp4bjhds2aostixj6r6 Templat:Marriage 10 170 725 408 2024-08-09T09:21:23Z Jon Harald Søby 58 3 semakan diimportkan 407 wikitext text/x-wiki <templatestyles src="Template:Marriage/styles.css"/> {{#if:{{{1|}}}||{{#if:{{{2|}}}{{{3|}}}{{{end|{{{reason|}}}}}} |{{#ifeq:{{{1|+}}}|{{{1|-}}}|<div class="marriage-line-margin3px">&#8203;</div>|{{main other|[[Kategori:Marriage template anomalies|N{{PAGENAME}}]]}}}}}}}} <div class="marriage-display-ws">{{#if:{{{1|}}} |{{trim|{{#if:{{{end|{{{reason|}}}}}} |<div style="display:inline-block;line-height:normal;{{#if:{{{2|}}}{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2=20|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|<div class="marriage-line-margin2px">&#8203;</div>}} |{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2=20 |3=<div class="marriage-line-margin2px">&#8203;</div>}} }}}} |<div style="display:inline-block;line-height:normal;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}} |3=<div class="marriage-line-margin2px">&#8203;</div>}}}} }}}}}}&#32;<div style="display:inline-block;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-bottom:1px;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-bottom:1px;|4={{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|margin-bottom:1px;}}}}}}}}">&#8203;</div>&#40;<!-- -->{{#if:{{{2|}}} |{{#ifeq:{{{end|{{{reason|+}}}}}}| |{{#switch:{{{3|}}} | = after&nbsp;}} |{{abbr|m.|married}}&nbsp;}}{{#ifeq:{{{2|}}}|{{YEAR|{{{2|}}}}} |{{{2|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{2|}}}}} | {{main other|[[Kategori:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}}|{{YEAR|{{{2|}}}}}}}|2={{{2|}}}}} }} |{{#if:{{{3|}}}{{{end|{{{reason|}}}}}}||{{#if:{{#property:P570}}||{{main other|[[Kategori:Marriage template errors|N{{PAGENAME}}]]}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}||{{#if:{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} | {{main other|[[Kategori:Marriage template anomalies|B{{PAGENAME}}]]}}before&nbsp;{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} |{{error-small|date missing}}}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}{{{3|}}}|&#44;&#32;}}}}}} }}{{#if:{{{3|}}} |{{#ifeq:{{{end|{{{reason|}}}}}}| |{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|{{#ifeq:{{{end|+}}}|{{{end|-}}} |{{#ifeq:{{{end|+}}}|{{{end|-}}} | until | before }} |{{#ifeq:{{{reason|+}}}|{{{reason|-}}} | until | before }}}}&nbsp;}} |{{#if:{{{2|}}} |&#59;&#32; }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" --> | div | div. | divorce | divorced = {{abbr|div.|divorced}}&nbsp; | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died&nbsp;|{{main other|[[Kategori:Marriage template deprecations]]}}{{dc|her death&nbsp;}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died&nbsp;|{{main other|[[Kategori:Marriage template deprecations]]}}{{dc|his death&nbsp;}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Kategori:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}}&nbsp; | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}}&nbsp; }} }}{{#ifeq:{{{3|}}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Kategori:Marriage template anomalies|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Kategori:Marriage template anomalies|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Kategori:Marriage template anomalies|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }} |{{{3|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{3|}}}}} | {{main other|[[Kategori:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Kategori:Marriage template anomalies|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Kategori:Marriage template anomalies|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Kategori:Marriage template anomalies|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template anomalies|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }}}}|2={{{3|}}}}} }} |{{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}} }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died | div | div. | divorce | divorced = divorced | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died|{{main other|[[Kategori:Marriage template deprecations]]}}{{dc|her death}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died|{{main other|[[Kategori:Marriage template deprecations]]}}{{dc|his death}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Kategori:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}} | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}} }} }}&#41;<wbr />&#8203;</div><!-- -->{{#invoke:Parameter validation|validateparams|module_options = Module:Parameter validation/default config}}<noinclude> {{Documentation}} </noinclude> gcdwk0esylmgsp2035esae4bldz53cy Templat:Marriage/styles.css 10 171 410 409 2024-08-09T09:20:02Z Jon Harald Søby 58 1 semakan diimportkan 409 sanitized-css text/css .marriage-line-margin2px { line-height: 0; margin-bottom: -2px; } .marriage-line-margin3px { line-height: 0; margin-bottom: -3px; } .marriage-display-ws { display: inline; white-space: nowrap; } 559ychzvbk3wsawre7ip1fgyj12uf97 Templat:Max 10 172 727 413 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 411 wikitext text/x-wiki <includeonly>{{#invoke:Math|max}}</includeonly><noinclude> {{Documentation}} </noinclude> s2lyijw8m0l517bfw1z0srbw197c8fh Templat:Mbox 10 173 415 414 2024-08-09T09:20:03Z Jon Harald Søby 58 1 semakan diimportkan 414 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> aqsrswx233se5jbjaza2b2hrk7pgx53 Templat:NUMBEROFARTICLES 10 174 417 416 2024-08-09T09:20:03Z Jon Harald Søby 58 1 semakan diimportkan 416 wikitext text/x-wiki [[Khas:Prefixindex/Wp/bdr|{{PAGESINCATEGORY:Wp/bdr}}]]<noinclude></noinclude> qr5uo95xosq1xxtearq43929n7mj8ya Templat:Namespace detect 10 175 419 418 2024-08-09T09:20:03Z Jon Harald Søby 58 1 semakan diimportkan 418 wikitext text/x-wiki {{SAFESUBST:<noinclude />#invoke:Namespace detect|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> l3ti6zjxip68spdlt018btofjtao8um Templat:Native name 10 176 729 422 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 420 wikitext text/x-wiki <includeonly>{{#invoke:Native name|native_name}}</includeonly><noinclude>{{Documentation}}</noinclude> 4zrrzpw8wwy1e192yy95rlec1cmzddt Templat:Native name checker 10 177 731 424 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 423 wikitext text/x-wiki <includeonly>{{#invoke:Native name|native_name_checker}}</includeonly><noinclude>{{Documentation}}</noinclude> hd67xqsake6m0rwe1o1ya8oqyhnzk5d Templat:Nobold 10 178 4639 735 2024-08-16T14:59:10Z Rombituon 59 4639 wikitext text/x-wiki (<templatestyles src="Nobold/styles.css"/><span class="nobold">{{{1}}}</span><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 7m21ko7ec72z6o81o3sp75qt6t7iko4 Templat:Nobold/styles.css 10 179 429 428 2024-08-09T09:20:04Z Jon Harald Søby 58 1 semakan diimportkan 428 sanitized-css text/css /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } fenpgkszzubv5v79v09z2871g8mgdmr Templat:Nowrap 10 180 4701 737 2024-08-19T16:22:44Z Ultron90 9 4701 wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> 8qvksz8mo2lzed92r81v9d5y72fzg0g Templat:Ombox 10 181 434 433 2024-08-09T09:20:04Z Jon Harald Søby 58 1 semakan diimportkan 433 wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 1o93yrjvq6v2ylug2k0uaaltljurje2 Templat:Order of magnitude 10 182 739 437 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 435 wikitext text/x-wiki <includeonly>{{safesubst:<noinclude/>#ifexpr:{{{1|0}}}=0 |{{safesubst:<noinclude/>#ifexpr:abs{{{1|0}}}1=1 |0 |{{safesubst:<noinclude/>#expr:floor((ln(abs{{{1}}}1)/ln10)+1)}} }} |{{safesubst:<noinclude/>#expr:floor((ln(abs({{{1|0}}}) )/ln 10)+1E((abs{{{1|0}}}>1E100 or abs{{{1|0}}}<1E-100)-14))}} }}</includeonly><noinclude> {{documentation}} </noinclude> o5x97tr9z1fixe14ip2xcqhbr1akroo Templat:PAGENAMEBASE 10 183 439 438 2024-08-09T09:20:04Z Jon Harald Søby 58 1 semakan diimportkan 438 wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> sam8aetb68ekom4findu6pp900ngldr Templat:PP 10 184 441 440 2024-08-09T09:20:05Z Jon Harald Søby 58 1 semakan diimportkan 440 wikitext text/x-wiki #REDIRECT [[Templat:Pp]] a05h5b13hpc76ngzofziunyy5dwpudd Templat:Pagetype 10 185 741 444 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 442 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Pagetype|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> rbyuasr0f64n1clt2dunhho7q1d1i4z Templat:Parabr 10 186 743 446 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 445 wikitext text/x-wiki #REDIRECT[[Templat:Paragraph break]] jl6d9ng7tsgtm9ua26j7hlrdtgko093 Templat:Paragraph break 10 187 449 448 2024-08-09T09:20:05Z Jon Harald Søby 58 2 semakan diimportkan 447 wikitext text/x-wiki <div class="paragraphbreak" style="margin-top:0.5em"></div><noinclude>{{documentation}}</noinclude> r8flwbox6t79tbhxblur1xf3iyaqaec Templat:Petetaan pendok 10 188 454 453 2024-08-09T09:20:06Z Jon Harald Søby 58 4 semakan diimportkan 453 wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|<nowiki /><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Kategori:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Kategori:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Kategori:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Kategori:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> 6lhg8vnlthwjalrvwws1sgcwuut3a2r Templat:Petetaan pendok/lowercasecheck 10 189 457 456 2024-08-09T09:20:06Z Jon Harald Søby 58 2 semakan diimportkan 455 wikitext text/x-wiki {{#ifeq:<!--test first character for lower-case letter-->{{#invoke:String|find|1={{{1|}}}|2=^%l|plain=false}}|1 |<!-- first character is a lower case letter; test against whitelist -->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist--> |c. <!--for circa--> |gTLD |iMac |iOS |iOS, |iPad |iPhone |iTunes |macOS |none |pH |pH-dependent=<!-- end whitelist; short description starts with an allowed lower-case string; whitelist matched; do nothing --> |#default=<!-- apply category to track lower-case short descriptions -->{{main other|[[Kategori:Pages with lower-case short description|{{trim|{{{1|}}}}}]]}}{{Testcases other|{{red|CATEGORY APPLIED}}}}<!-- end whitelist test -->}} |<!-- short description does not start with lower-case letter; do nothing; end lower-case test --> }}<noinclude> {{documentation}} </noinclude> 5c6txi8l41pgahk0dq16rl35mye9m5i Templat:Plainlist 10 190 459 458 2024-08-09T09:20:06Z Jon Harald Søby 58 1 semakan diimportkan 458 wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> aauem8fvp0apfdx4hoaa24a9q951cds Templat:Plainlist/styles.css 10 191 461 460 2024-08-09T09:20:06Z Jon Harald Søby 58 1 semakan diimportkan 460 sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 9iguthb0t8w7c89r3am2dbgv55d4w1c Templat:Pluralize from text 10 192 463 462 2024-08-09T09:20:06Z Jon Harald Søby 58 1 semakan diimportkan 462 wikitext text/x-wiki {{#invoke:Detect singular|pluralize}}<noinclude>{{Documentation}}</noinclude> 80sfwmn8csglemkzs9a3g6e1xz8eytk Templat:Pp 10 193 745 466 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 464 wikitext text/x-wiki {{#invoke:Protection banner|main}}<noinclude> {{documentation}} </noinclude> 8rt1snyv5yit3jnuzrbl00negaj27e5 Templat:Pp-extended 10 194 468 467 2024-08-09T09:20:07Z Jon Harald Søby 58 1 semakan diimportkan 467 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0kraq53t9qd1pk78dm0bdzpq4xhnh9u Templat:Pp-move 10 195 470 469 2024-08-09T09:20:07Z Jon Harald Søby 58 1 semakan diimportkan 469 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0kraq53t9qd1pk78dm0bdzpq4xhnh9u Templat:Pp-template 10 196 472 471 2024-08-09T09:20:07Z Jon Harald Søby 58 1 semakan diimportkan 471 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0kraq53t9qd1pk78dm0bdzpq4xhnh9u Templat:Precision 10 197 747 475 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 473 wikitext text/x-wiki <includeonly>{{#invoke:Math|precision|{{{1|0}}}|check_fraction=true}}</includeonly><noinclude> {{documentation}} </noinclude> hbl3vf33a239ici6o7feo2ici90hboa Templat:Principal rank 10 198 477 476 2024-08-09T09:20:07Z Jon Harald Søby 58 1 semakan diimportkan 476 wikitext text/x-wiki <!-- Remove "ichno" and "oo" and then check for a major taxon ("oordo" becomes "rdo"): -->{{#switch:{{#invoke:String|replace|{{#invoke:String|replace|{{{1|}}}|ichno|}}|oo|}} |realm|regnum|phylum|divisio|classis|ordo|rdo|familia|genus|species=yes|#default=no}}<noinclude>{{Documentation}}</noinclude> ok51o7dspe70is0gm6v1ofmslcabjyi Templat:Reflist 10 199 479 478 2024-08-09T09:20:07Z Jon Harald Søby 58 1 semakan diimportkan 478 wikitext text/x-wiki <div class="reflist <!-- -->{{#if: | {{#iferror: {{#ifexpr: 1 > 1 }} | references-column-width | references-column-count references-column-count-{{#if:1|{{{1}}}}} }} | {{#if: | references-column-width }} }}" style="<!-- -->{{#if: | {{#iferror: {{#ifexpr: 1 > 1 }} | {{column-width|{{#if:1|{{{1}}}}}}} | {{column-count|{{#if:1|{{{1}}}}}}} }} | {{#if: | {{column-width|{{{colwidth}}}}} }} }} list-style-type: <!-- -->{{#switch: | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = {{{group}}} | #default = decimal}};"> {{#tag:references||group=}}</div><noinclude> [[Kategori:Templat|Reflist]] </noinclude> 2hkwy7c5y8gwp0gftf4iukbao5tc9p4 Templat:Refn 10 200 749 482 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 480 wikitext text/x-wiki <includeonly>{{#if:{{{follow|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}|follow={{{follow|}}}}}|{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude> io4dd44uoflipi3djyp8pgmxfxl0eie Templat:Remove first word 10 201 751 486 2024-08-09T09:21:24Z Jon Harald Søby 58 1 semakan diimportkan 483 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|pattern=^[^{{{sep|%s}}}]*{{{sep|%s}}}*|replace=|plain=false}}<noinclude>{{Documentation}}</noinclude> q3rvb3vj9phd54s3yecz8846q90qfgo Templat:Replace 10 202 754 488 2024-08-09T09:21:24Z Jon Harald Søby 58 2 semakan diimportkan 487 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|plain={{{plain|true}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude> 7nqxv5kwvok0dz443yff5lxmdev97ci Templat:Resize 10 203 490 489 2024-08-09T09:20:08Z Jon Harald Søby 58 1 semakan diimportkan 489 wikitext text/x-wiki {{safesubst<noinclude />:#if:{{{2|}}} |<{{#ifeq:{{{div|}}}|yes|div|span}} style="font-size:{{{1|}}};">{{{2|}}}</{{#ifeq:{{{div|}}}|yes|div|span}}> |<{{#ifeq:{{{div|}}}|yes|div|span}} style="font-size:90%;">{{{1}}}</{{#ifeq:{{{div|}}}|yes|div|span}}> }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> 78jwx7qunqpd1utzq30d69l1010d87n Templat:Round 10 204 757 492 2024-08-09T09:21:24Z Jon Harald Søby 58 2 semakan diimportkan 491 wikitext text/x-wiki <includeonly>{{safesubst<noinclude/>:#iferror:{{#expr:{{{2|0}}}}} | {{main other|[[Kategori:Pages with bad rounding precision]]}}{{hid|Bad rounding here}}<!-- -->{{safesubst<noinclude/>:#invoke:Math|precision_format| {{{1}}} | 1-{{order of magnitude|{{{1}}}}} }}| {{safesubst<noinclude/>:#invoke:Math|precision_format| {{{1}}} | {{{2|0}}}}}}}</includeonly><noinclude> {{documentation}} </noinclude> 5ti26y2tjbvnm1as06lycplyul3ari9 Templat:SDcat 10 205 494 493 2024-08-09T09:20:09Z Jon Harald Søby 58 1 semakan diimportkan 493 wikitext text/x-wiki <includeonly>{{#invoke:SDcat |setCat}}</includeonly><noinclude> {{Documentation}} </noinclude> 1voorosqldlqksb30q2eh9qm6eztgrd Templat:Sandbox other 10 206 759 497 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 495 wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> h1idujwaw20aducxsd1gc4ovgnjikqa Templat:Script/styles arabic.css 10 207 499 498 2024-08-09T09:20:09Z Jon Harald Søby 58 1 semakan diimportkan 498 sanitized-css text/css .script-arabic { font-family: 'SF Arabic', Scheherazade, Lateef, LateefGR, 'Scheherazade New', 'Amiri', 'Noto Naskh Arabic', 'Droid Arabic Naskh', 'Microsoft Uighur', 'Sakkal Majalla', 'Harmattan', 'Arabic Typesetting', 'Arabic Transparent', 'Times New Roman', 'Arial', Calibri, 'Microsoft Sans Serif', 'Segoe UI', serif, sans-serif; font-weight: normal; } jkuhjkz6c0eedtt4oytjhw0ovmedwfn Templat:Short description 10 208 502 501 2024-08-09T09:20:09Z Jon Harald Søby 58 2 semakan diimportkan 501 wikitext text/x-wiki #Redirect [[Templat:Petetaan pendok]] 9ttt2gli3vrj1zd7gzn0phiz2ss8qqp Templat:Short description/lowercasecheck 10 209 504 503 2024-08-09T09:20:09Z Jon Harald Søby 58 1 semakan diimportkan 503 wikitext text/x-wiki #REDIRECT [[Templat:Petetaan pendok/lowercasecheck]] pfeezb9r461swahxicc6qrwk61vro8w Templat:Side box 10 210 506 505 2024-08-09T09:20:10Z Jon Harald Søby 58 1 semakan diimportkan 505 wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 7dxeu1ykbik6d3wt95kucm98xv8qdde Templat:Sister project 10 211 508 507 2024-08-09T09:20:10Z Jon Harald Søby 58 1 semakan diimportkan 507 wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[Fail:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> s2nzo84zfq39kuw6eeumpikxmxz48fg Templat:Smallsup 10 212 763 511 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 509 wikitext text/x-wiki <includeonly><sup><small>{{{1}}}</small></sup></includeonly><noinclude> {{Documentation}} </noinclude> mlix1y93be7qpylydjn1k0t69oyvr6i Templat:Spaces 10 213 514 513 2024-08-09T09:20:10Z Jon Harald Søby 58 2 semakan diimportkan 512 wikitext text/x-wiki <span class="nowrap">{{#iferror:{{#expr:{{{1|1}}}}} |{{#switch:{{{1}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }} |{{#invoke:String|rep|{{#switch:{{{2}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }}|{{{1|1}}}}} }}</span><noinclude> {{documentation}} </noinclude> jukvcl40dksi5vvimpqq0n6czue0473 Templat:Speciesbox 10 214 517 516 2024-08-09T09:20:10Z Jon Harald Søby 58 2 semakan diimportkan 515 wikitext text/x-wiki <noinclude><!-- -==================================================================== - Template:Speciesbox - Generate a taxobox infobox for species -==================================================================== -- -- This template chooses parameters to send to {Taxobox/core}, to -- generate a right-side taxobox infobox. Most parameters are just -- passed directly; some are explained with a comment. When run as -- stand-alone, the template shows Acacia aemula as sample output. -- -- The genus name of the species is found by looking in order at -- (1) the genus parameter -- (2) the first word of the taxon parameter -- (3) the first word of the page name. -- The species name/specific epithet is found by looking in order at -- (1) the species parameter -- (2) the rest of the taxon parameter after removing the first word -- (3) the rest of the page name after removing any final part in -- parentheses and then removing the first word. -- -- The genus name is then the entry into the taxonomic hierarchy. -- -- A complication is that if the taxonomy template for the genus needs -- disambiguation (i.e. is "Template:Taxonomy/GENUS (DISAMBIG)") then -- the parameters will be genus=GENUS (DISAMBIG) | species=EPITHET -- Can also have genus=GENUS/QUALIFIER -- -------------------------------- Invoke {Taxobox/core} The nowiki that follows is needed because of parser bug T18700--></noinclude><nowiki/>{{Taxobox/core<includeonly> | edit link = {{{edit link|{{{edit_link|edit}}} }}}</includeonly><noinclude><!-- -- -- fossil_range: If the specified fossil range is a period supported -- by templates {period_start} and {next_period}, then it incorporates -- the specified range in template {geological range}, but checking -- to display properly. Otherwise, just passes parameter. --></noinclude> | temporal_range = {{#if:{{{fossil_range|{{{fossil range|}}} }}}|{{#iferror:{{geological range|{{{temporal_range|{{{temporal range|{{{fossil_range|{{{fossil range|}}} }}} }}} }}} }}|{{{temporal_range|{{{temporal range|{{{fossil_range|{{{fossil range|}}} }}} }}} }}}|{{geological range|{{{temporal_range|{{{temporal range|{{{fossil_range|{{{fossil range|}}} }}} }}} }}} }} }} | {{#if:{{{oldest fossil|{{{oldest_fossil|}}} }}}|{{geological range|{{{oldest fossil|{{{oldest_fossil}}} }}}|{{{youngest fossil|{{{youngest_fossil|Recent}}} }}} }} }} }}<noinclude><!-- PARENT: this is the taxon whose taxonomy template is used to find the taxonomic hierarchy; if not supplied as a parameter value, it defaults to the genus name. Template:Taxonomy/PARENT must exist. --></noinclude> | parent = <includeonly>{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}</includeonly><noinclude>Acacia<!-- DISPLAY PARENTS: Number of immediate parents to display. Defaults to 1 above species, normally the genus (which is displayed as a major rank, anyway). --></noinclude> | display_taxa = {{#expr:{{{display parents|{{{display_parents|1}}} }}}-1}}<noinclude><!-- AUTHORITY (etc): In the format "author, year". Species-authority is redundant to binomial_authority; we'll just list it the once. (This avoids reference-duplication errors, too. | species_authority = {{{authority|{{{binomial authority|{{{binomial_authority|}}} }}} }}}--></noinclude> | authority = {{{authority|}}} | parent_authority = {{{parent_authority|{{{parent authority|}}}}}} | grandparent_authority = {{{grandparent_authority|{{{grandparent authority|}}}}}} | greatgrandparent_authority = {{{greatgrandparent_authority|{{{greatgrandparent authority|}}}}}} | greatgreatgrandparent_authority = {{{greatgreatgrandparent_authority|{{{greatgreatgrandparent authority|}}}}}} | greatgreatgreatgrandparent_authority = {{{greatgreatgreatgrandparent_authority|{{{greatgreatgreatgrandparent authority|}}}}}} | offset = 1 <noinclude><!-- NAME: {{Speciesbox/name}} both determines the taxobox name and whether the page title should be italicized by adding the {{italic title}} template. --></noinclude> | name = {{Speciesbox/name|{{{name|<noinclude>''Acacia aemula''</noinclude>}}}|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}|{{PAGENAMEBASE}}|{{{italic_title|{{{italic title|yes}}}}}}}}<noinclude><!-- -- colour: (Note UK spelling here) There are two cases: 1) the parameter color_as has a value – the colour is found directly using {{Taxobox colour|color_as}} 2) otherwise – Module:Autotaxobox|taxoboxColour searches up the taxonomic hierarchy to try to find a taxon that determines the taxobox colour --></noinclude> | colour = {{#if:{{{color_as|{{{colour_as|{{{color as|{{{colour as|}}}}}}}}}}}}|{{Taxobox colour|{{{color_as|{{{colour_as|{{{color as|{{{colour as|}}}}}}}}}}}}}}|{{#invoke:Autotaxobox|taxoboxColour|<includeonly>{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}</includeonly><noinclude>Acacia</noinclude> }} }} | status = {{{status|}}} | status_system = {{{status system|{{{status_system|}}} }}} | status_ref = {{{status ref|{{{status_ref|}}} }}} | status2 = {{{status2|}}} | status2_system = {{{status2 system|{{{status2_system|}}} }}} | status2_ref = {{{status2 ref|{{{status2_ref|}}} }}} | trend = {{{trend|}}} | image = {{{image|}}} | upright = {{{image_upright|{{{image upright|}}} }}} | image_alt = {{{image alt|{{{image_alt|}}} }}} | image_caption = {{{image caption|{{{image_caption|}}} }}} | image2 = {{{image2|}}} | upright2 = {{{image2_upright|{{{image2 upright|}}} }}} | image2_alt = {{{image2 alt|{{{image2_alt|}}} }}} | image2_caption = {{{image2 caption|{{{image2_caption|}}} }}} | classification_status = {{{classification status|{{{classification_status|}}} }}} | diversity = {{{diversity|}}} | diversity_ref = {{{diversity ref|{{{diversity_ref|}}} }}} | diversity_link = {{{diversity link|{{{diversity_link|}}} }}} | extinct = {{{extinct|}}} | species = {{#if:{{{extinct|}}}|&dagger;|{{#ifeq:{{{status|}}}|EX|&dagger;|{{Taxon info|<includeonly>{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}</includeonly><noinclude>Acacia</noinclude>|dagger}}}}}}<!-- -->'''{{taxon italics|abbreviated=yes|<includeonly>{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}</includeonly><noinclude>Acacia aemula</noinclude>}}''' | binomial = <span style="font-weight:normal;">{{#if:{{{extinct|}}}|&dagger;|{{#ifeq:{{{status|}}}|EX|&dagger;|{{Taxon info|<includeonly>{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}</includeonly><noinclude>Acacia</noinclude>|dagger}}}}}}</span><!-- -->{{taxon italics|<includeonly>{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}</includeonly><noinclude>Acacia aemula</noinclude>}} | binomial_authority = {{{authority|{{{binomial authority|{{{binomial_authority|}}} }}} }}} | subdivision = {{{subdivision|}}} | subdivision_ranks = {{{subdivision ranks|{{{subdivision_ranks|Subspecies}}} }}} | subdivision_ref = {{{subdivision_ref|{{{subdivision ref|}}} }}} | type_strain = {{{type strain|{{{type_strain|}}} }}} | type_strain_ref = {{{type_strain_ref|{{{type strain ref|}}} }}} | range_map = {{{range map|{{{range_map|}}} }}} | range_map_upright = {{{range_map_upright|{{{range map upright|}}}}}} | range_map_alt = {{{range map alt|{{{range_map_alt|}}} }}} | range_map_caption = {{{range map caption|{{{range_map_caption|}}} }}} | range_map2 = {{{range map2|{{{range_map2|}}} }}} | range_map2_upright = {{{range_map2_upright|{{{range map2 upright|}}}}}} | range_map2_alt = {{{range map2 alt|{{{range_map2_alt|}}} }}} | range_map2_caption = {{{range map2 caption|{{{range_map2_caption|}}} }}} | range_map3 = {{{range map3|{{{range_map3|}}} }}} | range_map3_upright = {{{range_map3_upright|{{{range map3 upright|}}}}}} | range_map3_alt = {{{range map3 alt|{{{range_map3_alt|}}} }}} | range_map3_caption = {{{range map3 caption|{{{range_map3_caption|}}} }}} | range_map4 = {{{range map4|{{{range_map4|}}} }}} | range_map4_upright = {{{range_map4_upright|{{{range map4 upright|}}}}}} | range_map4_alt = {{{range map4 alt|{{{range_map4_alt|}}} }}} | range_map4_caption = {{{range map4 caption|{{{range_map4_caption|}}} }}} | synonyms_ref = {{{synonyms ref|{{{synonyms_ref|}}} }}} | synonyms = {{{synonyms|}}} }}{{Speciesbox/parameterCheck|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using speciesbox with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = unknown parameter "_VALUE_"|ignoreblank=y|authority|binomial authority||binomial_authority|classification status|classification_status|color as|color_as|colour as|colour_as|display parents|display_parents|diversity|diversity link|diversity ref|diversity_link|diversity_ref|edit link|edit_link|extinct|fossil range|fossil_range|genus|grandparent authority|grandparent_authority|greatgrandparent authority|greatgrandparent_authority|greatgreatgrandparent authority|greatgreatgrandparent_authority|greatgreatgreatgrandparent authority|greatgreatgreatgrandparent_authority|image|image alt|image caption|image upright|image2|image2 alt|image2 caption|image2 upright|image2_alt|image2_caption|image2_upright|image_alt|image_caption|image_upright|italic title|italic_title|name|oldest fossil|oldest_fossil|parent|parent authority|parent_authority|range map|range map alt|range map caption|range map upright|range map2|range map2 alt|range map2 caption|range map2 upright|range map3|range map3 alt|range map3 caption|range map3 upright|range map4|range map4 alt|range map4 caption|range map4 upright|range_map|range_map2|range_map2_alt|range_map2_caption|range_map2_upright|range_map3|range_map3_alt|range_map3_caption|range_map3_caption|range_map3_upright|range_map4|range_map4_alt|range_map4_caption|range_map4_upright|range_map4_upright|range_map_alt|range_map_caption|range_map_upright|species|status|status ref|status system|status2|status2 ref|status2 system|status2_ref|status2_system|status_ref|status_system|subdivision|subdivision ranks|subdivision ref|subdivision_ranks|subdivision_ref|synonyms|synonyms ref|synonyms_ref|taxon|temporal range|temporal_range|trend|type strain|type_strain|type strain ref|type_strain_ref|youngest fossil|youngest_fossil}}<noinclude> {{Documentation}}</noinclude> ian7b24qwymo0nb8uckvemfnawhas1y Templat:Speciesbox/getGenus 10 215 519 518 2024-08-09T09:20:11Z Jon Harald Søby 58 1 semakan diimportkan 518 wikitext text/x-wiki {{#if:{{{1|}}}|{{First word|{{{1}}}}}|{{#if:{{{2|}}}|{{{2}}}|{{First word|<includeonly>{{PAGENAME}}</includeonly><noinclude>Acacia aemula</noinclude>}}}}}} 79iiu7e9jmulppfvdgl7htu4viflzfb Templat:Speciesbox/name 10 216 521 520 2024-08-09T09:20:11Z Jon Harald Søby 58 1 semakan diimportkan 520 wikitext text/x-wiki <noinclude><!--Parameters: 1=name, 2=taxon, 3=genus, 4=species, 5=PAGENAMEBASE, 6=italic_title (obey no) --></noinclude><includeonly>{{#invoke:Automated taxobox|speciesboxName|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude> k2bymbs730cscxzcmtz2g5vtbazilfm Templat:Speciesbox/parameterCheck 10 217 523 522 2024-08-09T09:20:11Z Jon Harald Søby 58 1 semakan diimportkan 522 wikitext text/x-wiki <noinclude>{{Pp-template|small=yes}}</noinclude>{{#ifeq:{{NAMESPACENUMBER}}|0|{{#if:{{{1|}}}|{{#if:{{{2|}}}{{{3|}}}|[[Kategori:Speciesboxes with incorrect parameters specifying the taxon]]}}|{{#if:{{{2|}}}|{{#if:{{{3|}}}||[[Kategori:Speciesboxes with incorrect parameters specifying the taxon]]}}|{{#if:{{{3|}}}|[[Kategori:Speciesboxes with incorrect parameters specifying the taxon]]|[[Kategori:Speciesboxes relying on page title]]}}}}}}}} a8lu12rusfzlqan0ks5r7ip5aterywl Templat:Str left 10 218 4486 765 2024-08-12T10:25:40Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q5621848]] 4486 wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> pr0qap79kli8vz33dwyzt6hdf1yv7mx Templat:Switcher 10 219 767 531 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 529 wikitext text/x-wiki <includeonly><div class="switcher-container">{{ safesubst:#if:{{{2|}}}|<div>{{{1|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|1|data-switcher-default=""}}>{{safesubst:#if:trim|{{{2|}}}}}</span></div>}}{{ safesubst:#if:{{{4|}}}|<div>{{{3|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|2|data-switcher-default=""}}>{{safesubst:#if:trim|{{{4|}}}}}</span></div>}}{{ safesubst:#if:{{{6|}}}|<div>{{{5|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|3|data-switcher-default=""}}>{{safesubst:#if:trim|{{{6|}}}}}</span></div>}}{{ safesubst:#if:{{{8|}}}|<div>{{{7|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|4|data-switcher-default=""}}>{{safesubst:#if:trim|{{{8|}}}}}</span></div>}}{{ safesubst:#if:{{{10|}}}|<div>{{{9|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|5|data-switcher-default=""}}>{{safesubst:#if:trim|{{{10|}}}}}</span></div>}}{{ safesubst:#if:{{{12|}}}|<div>{{{11|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|6|data-switcher-default=""}}>{{safesubst:#if:trim|{{{12|}}}}}</span></div>}}{{ safesubst:#if:{{{14|}}}|<div>{{{13|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|7|data-switcher-default=""}}>{{safesubst:#if:trim|{{{14|}}}}}</span></div>}}{{ safesubst:#if:{{{16|}}}|<div>{{{15|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|8|data-switcher-default=""}}>{{safesubst:#if:trim|{{{16|}}}}}</span></div>}}{{ safesubst:#if:{{{18|}}}|<div>{{{17|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|9|data-switcher-default=""}}>{{safesubst:#if:trim|{{{18|}}}}}</span></div>}}{{ safesubst:#if:{{{20|}}}|<div>{{{19|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|10|data-switcher-default=""}}>{{safesubst:#if:trim|{{{20|}}}}}</span></div>}}{{ safesubst:#if:{{{22|}}}|<div>{{{21|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|11|data-switcher-default=""}}>{{safesubst:#if:trim|{{{22|}}}}}</span></div>}}{{ safesubst:#if:{{{24|}}}|<div>{{{23|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|12|data-switcher-default=""}}>{{safesubst:#if:trim|{{{24|}}}}}</span></div>}}{{ safesubst:#if:{{{26|}}}|<div>{{{25|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|13|data-switcher-default=""}}>{{safesubst:#if:trim|{{{26|}}}}}</span></div>}}{{ safesubst:#if:{{{28|}}}|<div>{{{27|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|14|data-switcher-default=""}}>{{safesubst:#if:trim|{{{28|}}}}}</span></div>}}{{ safesubst:#if:{{{30|}}}|<div>{{{29|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|15|data-switcher-default=""}}>{{safesubst:#if:trim|{{{30|}}}}}</span></div>}}{{ safesubst:#if:{{{32|}}}|<div>{{{31|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|16|data-switcher-default=""}}>{{safesubst:#if:trim|{{{32|}}}}}</span></div>}}{{ safesubst:#if:{{{34|}}}|<div>{{{33|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|17|data-switcher-default=""}}>{{safesubst:#if:trim|{{{34|}}}}}</span></div>}}{{ safesubst:#if:{{{36|}}}|<div>{{{35|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|18|data-switcher-default=""}}>{{safesubst:#if:trim|{{{36|}}}}}</span></div>}}{{ safesubst:#if:{{{38|}}}|<div>{{{37|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|19|data-switcher-default=""}}>{{safesubst:#if:trim|{{{38|}}}}}</span></div>}}{{ safesubst:#if:{{{40|}}}|<div>{{{39|}}}<span class="switcher-label" style="display:none" {{ safesubst:#ifeq:{{{default|}}}|20|data-switcher-default=""}}>{{safesubst:#if:trim|{{{40|}}}}}</span></div>}}</div></includeonly><noinclude><!-- NOTES The includeonly tags prevent the safesubst from substituting. #if:trim is the same as trim but lowers the post-expand include size. -->{{Documentation}}</noinclude> 4lh3mzjjb53tcged0t03qgb7b0dglkw Templat:Taxobox/Error colour 10 220 533 532 2024-08-09T09:20:12Z Jon Harald Søby 58 1 semakan diimportkan 532 wikitext text/x-wiki <includeonly>transparent; text-align:center; border: 2px solid red; error:colour</includeonly><noinclude><!-- -- The caller template must check invalid -- {{{colour}}} value to link [[Kategori:Taxoboxes with an invalid color]] because -- a [[wp:wikitable]] column format cannot contain a wikilinked page or category, -- as of September 2016. -- -- See check of {{{colour}}} in template {Taxobox/core}. -->{{documentation|Template:Taxobox colour/doc}}</noinclude> o33rgz8twn5zxqxgje4m0k9kh0ctnnj Templat:Taxobox/core 10 221 535 534 2024-08-09T09:20:12Z Jon Harald Søby 58 1 semakan diimportkan 534 wikitext text/x-wiki {| class="infobox biota" style="text-align: left; width: 200px; font-size: 100%" |- ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}}| }}" | {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}} }}{{#if:{{{temporal_range|}}}|<br/><div style="font-size: 85%;">Temporal range: {{{temporal_range}}}</div>}} |- {{#if:{{{image|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{image}}}|size={{{image_width|}}}|sizedefault=frameless|upright={{{upright|1}}}|alt={{{image_alt|}}}}} {{!}}- {{#if:{{{image_caption|}}}| {{!}} colspan=2 style="text-align: {{{image_caption_align|center}}}; font-size: 88%" {{!}} {{{image_caption}}} {{!}}- }} }} {{#if:{{{image2|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{image2}}}|size={{{image2_width|}}}|sizedefault=frameless|upright={{#if:{{{upright2|}}}|{{{upright2}}}|{{{upright|1}}}}}|alt={{{image2_alt|}}}}} {{!}}- {{#if:{{{image2_caption|}}}| {{!}} colspan=2 style="text-align: center; font-size: 88%" {{!}} {{{image2_caption}}} {{!}}- }} }} |- style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{#if:{{{status|}}}|{{taxobox/species|{{{status_system|}}}|{{{status|}}}|{{{status_ref|}}}|extinction_date={{{extinct|}}} }} }} |-{{#if:{{{status2|}}}|{{taxobox/species|{{{status2_system|}}}|{{{status2|}}}|{{{status2_ref|}}}|extinction_date={{{extinct|}}} }} }} |- ! colspan=2 style="min-width:15em; text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" | {{#if:{{{virus_group|{{{virus|}}}}}}|[[Virus classification]]|{{#if:{{{ichnos|}}}|[[Trace fossil classification]]|{{#if:{{{veterovata|}}}|[[Egg fossil#Classification|Egg fossil classification]]|[[Taxonomy (biology)|Scientific classification]]}} }} }} {{#if:{{{edit link|}}}|{{edit taxonomy|{{{parent|}}} | {{{edit link}}} }} }}{{#if: {{{classification_status|}}} | <br/><span style="font-weight:normal">({{{classification_status}}})</span> | }} |- {{#if:{{{parent|}}}|{{#invoke:Autotaxobox|taxoboxList|{{{parent}}}| display_taxa={{{display_taxa|1}}}| authority={{{authority|}}}| parent_authority={{{parent_authority|}}}| gparent_authority={{{grandparent_authority|}}}| ggparent_authority={{{greatgrandparent_authority|}}}| gggparent_authority={{{greatgreatgrandparent_authority|}}}| offset={{{offset|0}}}| bold_first={{{bold_first|{{#if:{{{species|}}}|link|bold}}}}}| virus={{{virus|no}}}}}}} {{#if:{{{virus_group|}}}|{{taxonomy|rank=group |link= {{#switch:{{lc:{{{virus_group}}} }} |i=Group I <small>([[dsDNA virus|dsDNA]])</small> |ii=Group II <small>([[ssDNA virus|ssDNA]])</small> |iii=Group III <small>([[Double-stranded RNA viruses|dsRNA]])</small> |iv=Group IV <small>([[Positive-sense single-stranded RNA virus|(+)ssRNA]])</small> |v=Group V <small>([[Negative-sense single-stranded RNA virus|(−)ssRNA]])</small> |vi=Group VI <small>([[ssRNA-RT virus|ssRNA-RT]])</small> |vi/vii=Groups VI and VII |vii=Group VII <small>([[dsDNA-RT virus|dsDNA-RT]])</small> |{{{virus_group}}} }} }} }} {{#if:{{{unranked_superdomain|}}}|{{taxonomy|rank=unranked|link={{{unranked_superdomain}}} | auth={{{unranked_superdomain_authority|}}} }} }} {{#if:{{{superdomain|}}}|{{taxonomy|rank=superdomain|link={{{superdomain}}} | auth={{{superdomain_authority|}}} }} }} {{#if:{{{unranked_domain|}}}|{{taxonomy|rank=unranked|link={{{unranked_domain}}} | auth={{{unranked_domain_authority|}}} }} }} {{#if:{{{domain|}}}|{{taxonomy|rank=domain|link={{{domain}}} | auth={{{domain_authority|}}} }} }} {{#if:{{{unranked_superregnum|}}}|{{taxonomy|rank=unranked|link={{{unranked_superregnum}}} | auth={{{unranked_superregnum_authority|}}} }} }} {{#if:{{{superregnum|}}}|{{taxonomy|rank=superregnum|link={{{superregnum}}} | auth={{{superregnum_authority|}}} }} }} {{#if:{{{unranked_regnum|}}}|{{taxonomy|rank=unranked|link={{{unranked_regnum}}} | auth={{{unranked_regnum_authority|}}} }} }} {{#if:{{{regnum|}}}|{{taxonomy|rank=regnum|link={{{regnum}}} | auth={{{regnum_authority|}}} }} }} {{#if:{{{unranked_subregnum|}}}|{{taxonomy|rank=unranked|link={{{unranked_subregnum}}} | auth={{{unranked_subregnum_authority|}}} }} }} {{#if:{{{subregnum|}}}|{{taxonomy|rank=subregnum|link={{{subregnum}}} | auth={{{subregnum_authority|}}} }} }} {{#if:{{{unranked_superdivisio|}}}|{{taxonomy|rank=unranked|link={{{unranked_superdivisio}}} | auth={{{unranked_superdivisio_authority|}}} }} }} {{#if:{{{superdivisio|}}}|{{taxonomy|rank=superdivisio|link={{{superdivisio}}} | auth={{{superdivisio_authority|}}} }} }} {{#if:{{{unranked_superphylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_superphylum}}} | auth={{{unranked_superphylum_authority|}}} }} }} {{#if:{{{superphylum|}}}|{{taxonomy|rank=superphylum|link={{{superphylum}}} | auth={{{superphylum_authority|}}} }} }} {{#if:{{{unranked_divisio|}}}|{{taxonomy|rank=unranked|link={{{unranked_divisio}}} | auth={{{unranked_divisio_authority|}}} }} }} {{#if:{{{divisio|}}}|{{taxonomy|rank=divisio|link={{{divisio}}} | auth={{{divisio_authority|}}} }} }} {{#if:{{{unranked_phylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_phylum}}} | auth={{{unranked_phylum_authority|}}} }} }} {{#if:{{{phylum|}}}|{{taxonomy|rank=phylum|link={{{phylum}}} | auth={{{phylum_authority|}}} }} }} {{#if:{{{unranked_subdivisio|}}}|{{taxonomy|rank=unranked|link={{{unranked_subdivisio}}} | auth={{{unranked_subdivisio_authority|}}} }} }} {{#if:{{{subdivisio|}}}|{{taxonomy|rank=subdivisio|link={{{subdivisio}}} | auth={{{subdivisio_authority|}}} }} }} {{#if:{{{unranked_subphylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_subphylum}}} | auth={{{unranked_subphylum_authority|}}} }} }} {{#if:{{{subphylum|}}}|{{taxonomy|rank=subphylum|link={{{subphylum}}} | auth={{{subphylum_authority|}}} }} }} {{#if:{{{unranked_infraphylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_infraphylum}}} | auth={{{unranked_infraphylum_authority|}}} }} }} {{#if:{{{infraphylum|}}}|{{taxonomy|rank=infraphylum|link={{{infraphylum}}} | auth={{{infraphylum_authority|}}} }} }} {{#if:{{{unranked_microphylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_microphylum}}} | auth={{{unranked_microphylum_authority|}}} }} }} {{#if:{{{microphylum|}}}|{{taxonomy|rank=microphylum|link={{{microphylum}}} | auth={{{microphylum_authority|}}} }} }} {{#if:{{{unranked_nanophylum|}}}|{{taxonomy|rank=unranked|link={{{unranked_nanophylum}}} | auth={{{unranked_nanophylum_authority|}}} }} }} {{#if:{{{nanophylum|}}}|{{taxonomy|rank=nanophylum|link={{{nanophylum}}} | auth={{{nanophylum_authority|}}} }} }} {{#if:{{{unranked_superclassis|}}}|{{taxonomy|rank=unranked|link={{{unranked_superclassis}}} | auth={{{unranked_superclassis_authority|}}} }} }} {{#if:{{{superclassis|}}}|{{taxonomy|rank=superclassis|link={{{superclassis}}} | auth={{{superclassis_authority|}}} }} }} {{#if:{{{unranked_classis|}}}|{{taxonomy|rank=unranked|link={{{unranked_classis}}} | auth={{{unranked_classis_authority|}}} }} }} {{#if:{{{classis|}}}|{{taxonomy|rank=classis|link={{{classis}}} | auth={{{classis_authority|}}} }} }} {{#if:{{{unranked_subclassis|}}}|{{taxonomy|rank=unranked|link={{{unranked_subclassis}}} | auth={{{unranked_subclassis_authority|}}} }} }} {{#if:{{{subclassis|}}}|{{taxonomy|rank=subclassis|link={{{subclassis}}} | auth={{{subclassis_authority|}}} }} }} {{#if:{{{unranked_infraclassis|}}}|{{taxonomy|rank=unranked|link={{{unranked_infraclassis}}} | auth={{{unranked_infraclassis_authority|}}} }} }} {{#if:{{{infraclassis|}}}|{{taxonomy|rank=infraclassis|link={{{infraclassis}}} | auth={{{infraclassis_authority|}}} }} }} {{#if:{{{unranked_magnordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_magnordo}}} | auth={{{unranked_magnordo_authority|}}} }} }} {{#if:{{{magnordo|}}}|{{taxonomy|rank=magnordo|link={{{magnordo}}} | auth={{{magnordo_authority|}}} }} }} {{#if:{{{unranked_superordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_superordo}}} | auth={{{unranked_superordo_authority|}}} }} }} {{#if:{{{superordo|}}}|{{taxonomy|rank=superordo|link={{{superordo}}} | auth={{{superordo_authority|}}} }} }} {{#if:{{{unranked_ordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_ordo}}} | auth={{{unranked_ordo_authority|}}} }} }} {{#if:{{{ordo|}}}|{{taxonomy|rank=ordo|link={{{ordo}}} | auth={{{ordo_authority|}}} }} }} {{#if:{{{unranked_subordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_subordo}}} | auth={{{unranked_subordo_authority|}}} }} }} {{#if:{{{subordo|}}}|{{taxonomy|rank=subordo|link={{{subordo}}} | auth={{{subordo_authority|}}} }} }} {{#if:{{{unranked_infraordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_infraordo}}} | auth={{{unranked_infraordo_authority|}}} }} }} {{#if:{{{infraordo|}}}|{{taxonomy|rank=infraordo|link={{{infraordo}}} | auth={{{infraordo_authority|}}} }} }} {{#if:{{{unranked_parvordo|}}}|{{taxonomy|rank=unranked|link={{{unranked_parvordo}}} | auth={{{unranked_parvordo_authority|}}} }} }} {{#if:{{{parvordo|}}}|{{taxonomy|rank=parvorder|link={{{parvordo}}} | auth={{{parvordo_authority|}}} }} }} {{#if:{{{unranked_zoodivisio|}}}|{{taxonomy|rank=unranked|link={{{unranked_zoodivisio}}} | auth={{{unranked_zoodivisio_authority|}}} }} }} {{#if:{{{zoodivisio|}}}|{{taxonomy|rank=zoodivisio|link={{{zoodivisio}}} | auth={{{zoodivisio_authority|}}} }} }} {{#if:{{{unranked_zoosectio|}}}|{{taxonomy|rank=unranked|link={{{unranked_zoosectio}}} | auth={{{unranked_zoosectio_authority|}}} }} }} {{#if:{{{zoosectio|}}}|{{taxonomy|rank=zoosectio|link={{{zoosectio}}} | auth={{{zoosectio_authority|}}} }} }} {{#if:{{{unranked_zoosubsectio|}}}|{{taxonomy|rank=unranked|link={{{unranked_zoosubsectio}}} | auth={{{unranked_zoosubsectio_authority|}}} }} }} {{#if:{{{zoosubsectio|}}}|{{taxonomy|rank=zoosubsectio|link={{{zoosubsectio}}} | auth={{{zoosubsectio_authority|}}} }} }} {{#if:{{{unranked_superfamilia|}}}|{{taxonomy|rank=unranked|link={{{unranked_superfamilia}}} | auth={{{unranked_superfamilia_authority|}}} }} }} {{#if:{{{superfamilia|}}}|{{taxonomy|rank=superfamilia|link={{{superfamilia}}} | auth={{{superfamilia_authority|}}} }} }} {{#if:{{{unranked_familia|}}}|{{taxonomy|rank=unranked|link={{{unranked_familia}}} | auth={{{unranked_familia_authority|}}} }} }} {{#if:{{{familia|}}}|{{taxonomy|rank=familia|link={{{familia}}} | auth={{{familia_authority|}}} }} }} {{#if:{{{unranked_subfamilia|}}}|{{taxonomy|rank=unranked|link={{{unranked_subfamilia}}} | auth={{{unranked_subfamilia_authority|}}} }} }} {{#if:{{{subfamilia|}}}|{{taxonomy|rank=subfamilia|link={{{subfamilia}}} | auth={{{subfamilia_authority|}}} }} }} {{#if:{{{unranked_supertribus|}}}|{{taxonomy|rank=unranked|link={{{unranked_supertribus}}} | auth={{{unranked_supertribus_authority|}}} }} }} {{#if:{{{supertribus|}}}|{{taxonomy|rank=supertribus|link={{{supertribus}}} | auth={{{supertribus_authority|}}} }} }} {{#if:{{{unranked_tribus|}}}|{{taxonomy|rank=unranked|link={{{unranked_tribus}}} | auth={{{unranked_tribus_authority|}}} }} }} {{#if:{{{tribus|}}}|{{taxonomy|rank=tribus|link={{{tribus}}} | auth={{{tribus_authority|}}} }} }} {{#if:{{{unranked_subtribus|}}}|{{taxonomy|rank=unranked|link={{{unranked_subtribus}}} | auth={{{unranked_subtribus_authority|}}} }} }} {{#if:{{{subtribus|}}}|{{taxonomy|rank=subtribus|link={{{subtribus}}} | auth={{{subtribus_authority|}}} }} }} {{#if:{{{unranked_alliance|}}}|{{taxonomy|rank=unranked|link={{{unranked_alliance}}} | auth={{{unranked_alliance_authority|}}} }} }} {{#if:{{{alliance|}}}|{{taxonomy|rank=alliance|link={{{alliance}}} | auth={{{alliance_authority|}}} }} }} {{#if:{{{unranked_genus|}}}|{{taxonomy|rank=unranked|link={{{unranked_genus}}} | auth={{{unranked_genus_authority|}}} }} }} {{#if:{{{genus|}}}| {{taxonomy|rank=genus|link={{{genus}}}|auth={{{genus_authority|}}} }} }} {{#if:{{{unranked_subgenus|}}}|{{taxonomy|rank=unranked|link={{{unranked_subgenus}}} | auth={{{unranked_subgenus_authority|}}} }} }} {{#if:{{{subgenus|}}}|{{taxonomy|rank=subgenus|link={{{subgenus}}} | auth={{{subgenus_authority|}}} }} }} {{#if:{{{unranked_sectio|}}}|{{taxonomy|rank=unranked|link={{{unranked_sectio}}} | auth={{{unranked_sectio_authority|}}} }} }} {{#if:{{{sectio|}}}|{{taxonomy|rank=sectio|link={{{sectio}}} | auth={{{sectio_authority|}}} }} }} {{#if:{{{unranked_subsectio|}}}|{{taxonomy|rank=unranked|link={{{unranked_subsectio}}} | auth={{{unranked_subsectio_authority|}}} }} }} {{#if:{{{subsectio|}}}|{{taxonomy|rank=subsectio|link={{{subsectio}}} | auth={{{subsectio_authority|}}} }} }} {{#if:{{{unranked_series|}}}|{{taxonomy|rank=unranked|link={{{unranked_series}}} | auth={{{unranked_series_authority|}}} }} }} {{#if:{{{series|}}}|{{taxonomy|rank=series|link={{{series}}} | auth={{{series_authority|}}} }} }} {{#if:{{{unranked_subseries|}}}|{{taxonomy|rank=unranked|link={{{unranked_subseries}}} | auth={{{unranked_subseries_authority|}}} }} }} {{#if:{{{subseries|}}}|{{taxonomy|rank=subseries|link={{{subseries}}}|auth={{{subseries_authority|}}} }} }} {{#if:{{{unranked_species_group|}}}|{{taxonomy|rank=unranked|link={{{unranked_species_group}}} | auth={{{unranked_species_group_authority|}}} }} }} {{#if:{{{species_group|}}}|{{taxonomy|rank=species group|link={{{species_group}}} | auth={{{species_group_authority|}}} }} }} {{#if:{{{unranked_species_subgroup|}}}|{{taxonomy|rank=unranked|link={{{unranked_species_subgroup}}} | auth={{{unranked_species_subgroup_authority|}}} }} }} {{#if:{{{species_subgroup|}}}|{{taxonomy|rank=species subgroup|link={{{species_subgroup}}} | auth={{{species_subgroup_authority|}}} }} }} {{#if:{{{unranked_species_complex|}}}|{{taxonomy|rank=unranked|link={{{unranked_species_complex}}} | auth={{{unranked_species_complex_authority|}}} }} }} {{#if:{{{species_complex|}}}|{{taxonomy|rank=species complex|link={{{species_complex}}} | auth={{{species_complex_authority|}}} }} }} {{#if:{{{unranked_species|}}}|{{taxonomy|rank=unranked|link={{{unranked_species}}} | auth={{{unranked_species_authority|}}} }} }} {{#if:{{{species|}}}|{{taxonomy|rank=species|link={{{species}}} | auth={{{species_authority|}}} }} }} {{#if:{{{unranked_subspecies|}}}|{{taxonomy|rank=unranked|link={{{unranked_subspecies}}} | auth={{{unranked_subspecies_authority|}}} }} }} {{#if:{{{subspecies|}}}|{{taxonomy|rank=subspecies|link={{{subspecies}}} | auth={{{subspecies_authority|}}} }} }} |- {{#if:{{{unranked_varietas|{{{unranked_variety|}}}}}}|{{taxonomy|rank=unranked|link={{{unranked_varietas|{{{unranked_variety|}}}}}} | auth={{{unranked_varietas_authority|{{{unranked_variety_authority|}}}}}} }} }} {{#if:{{{varietas|{{{variety|}}}}}}|{{taxonomy|rank=varietas|link={{{varietas|{{{variety}}}}}} | auth={{{varietas_authority|{{{variety_authority|}}}}}} }} }} {{#if:{{{forma|}}}|{{taxonomy|rank=forma|link={{{forma}}} | auth={{{forma_authority|}}} }} }} {{#if:{{{virus_infrasp|}}}|{{taxonomy|rank={{{virus_infrasp_rank|RANK MISSING}}}|link={{{virus_infrasp}}} | auth= }} }} |- {{#if:{{{binomial|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Binomial nomenclature|Binomial name]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} <b><span class="binomial">{{{binomial}}}</span></b><br/><div style="font-size: 85%;">{{{binomial_authority|}}}</div> }} |- style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{#if:{{{trinomial|}}}| ! colspan=2 style="text-align: center" {{!}} [[{{#switch:{{{regnum|}}}|[[Animalia]]|[[Animal]]ia|Animalia=Trinomen|[[Plantae]]|[[Plant]]ae|Plantae|[[Fungi]]|[[Fungus|Fungi]]|Fungi|[[Archaeplastida]]|Archaeplastida=Infraspecific name (botany)|Trinomial nomenclature}}|Trinomial name]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} <b><span class="trinomial">{{{trinomial}}}</span></b><br/><div style="font-size: 85%;">{{{trinomial_authority|}}}</div> }} |- {{#if:{{{type_genus|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour|}}} }}"{{!}} [[Type genus]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_genus}}}<br/><div style="font-size: 85%;">{{{type_genus_authority|}}}</div> }} |- {{#if:{{{type_ichnogenus|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour|}}} }}"{{!}} [[Type genus|Type ichnogenus]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_ichnogenus}}}<br/><div style="font-size: 85%;">{{{type_ichnogenus_authority|}}}</div> }} |- {{#if:{{{type_oogenus|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour|}}} }}"{{!}} [[Type genus|Type oogenus]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_oogenus}}}<br/><div style="font-size: 85%;">{{{type_oogenus_authority|}}}</div> }} |- {{#if:{{{type_species|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Type species]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_species}}}<br/><div style="font-size: 85%;">{{{type_species_authority|}}}</div> }} |- {{#if:{{{type_ichnospecies|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Type species|Type ichnospecies]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_ichnospecies}}}<br/><div style="font-size: 85%;">{{{type_ichnospecies_authority|}}}</div> }} |- {{#if:{{{type_oospecies|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Type species|Type oospecies]] {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_oospecies}}}<br/><div style="font-size: 85%;">{{{type_oospecies_authority|}}}</div> }} |- {{#if:{{{type_strain|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Type strain]]{{#if:{{{type_strain_ref|}}}|{{{type_strain_ref}}}|}} {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{{type_strain}}} }} |- {{#if:{{{subdivision|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} {{{subdivision_ranks}}}{{{subdivision_ref|}}} {{!}}- {{!}} colspan=2 style="text-align: left" {{!}} {{{subdivision|}}} }} |- {{#if:{{{possible_subdivision|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} {{{possible_subdivision_ranks}}} {{!}}- {{!}} colspan=2 style="text-align: left" {{!}} {{{possible_subdivision|}}} }} |- {{#if:{{{diversity|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Biodiversity|Diversity]]{{{diversity_ref|}}} {{#ifeq: {{NAMESPACEE}} | {{ns:0}} | [[Kategori:Articles using diversity taxobox]] | }} {{!}}- {{!}} colspan=2 style="text-align: center" {{!}} {{#if:{{{diversity_link|}}}|[[{{{diversity_link|}}}|{{{diversity|}}}]]|{{{diversity|}}}}} {{!}}- }} {{#if:{{{range_map|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{range_map}}}|size={{{range_map_width|}}}|sizedefault=frameless|upright={{#if:{{{range_map_upright|}}}|{{{range_map_upright}}}|{{{upright|1}}}}}|alt={{{range_map_alt|}}}}} {{!}}- {{#if:{{{range_map_caption|}}}| {{!}} colspan=2 style="text-align: center; font-size: 88%" {{!}} {{{range_map_caption}}} {{!}}- }} }} {{#if:{{{binomial2|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{binomial2}}}'''<br/><div style="font-size: 85%;">{{{binomial2_authority|}}}</div> {{!}}- }} {{#if:{{{trinomial2|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{trinomial2}}}'''<br/><div style="font-size: 85%;">{{{trinomial2_authority|}}}</div> {{!}}- }} {{#if:{{{range_map2|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{range_map2}}}|size={{{range_map2_width|}}}|sizedefault=frameless|upright={{#if:{{{range_map2_upright|}}}|{{{range_map2_upright}}}|{{{upright|1}}}}}|alt={{{range_map2_alt|}}}}} {{!}}- {{#if:{{{range_map2_caption|}}}| {{!}} colspan=2 style="text-align: center; font-size: 88%" {{!}} {{{range_map2_caption}}} {{!}}- }} }} {{#if:{{{binomial3|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{binomial3}}}'''<br/><div style="font-size: 85%;">{{{binomial3_authority|}}}</div> {{!}}- }} {{#if:{{{trinomial3|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{trinomial3}}}'''<br/><div style="font-size: 85%;">{{{trinomial3_authority|}}}</div> {{!}}- }} {{#if:{{{range_map3|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{range_map3}}}|size={{{range_map3_width|}}}|sizedefault=frameless|upright={{#if:{{{range_map3_upright|}}}|{{{range_map3_upright}}}|{{{upright|1}}}}}|alt={{{range_map3_alt|}}}}} {{!}}- {{#if:{{{range_map3_caption|}}}| {{!}} colspan=2 style="text-align: center; font-size: 88%" {{!}} {{{range_map3_caption}}} {{!}}- }} }} {{#if:{{{binomial4|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{binomial4}}}'''<br/><div style="font-size: 85%;">{{{binomial4_authority|}}}</div> {{!}}- }} {{#if:{{{trinomial4|}}}| {{!}} colspan=2 style="text-align: center" {{!}} '''{{{trinomial4}}}'''<br/><div style="font-size: 85%;">{{{trinomial4_authority|}}}</div> {{!}}- }} {{#if:{{{range_map4|}}}| {{!}} colspan=2 style="text-align: center" {{!}} {{#invoke:InfoboxImage|InfoboxImage|image={{{range_map4}}}|size={{{range_map4_width|}}}|sizedefault=frameless|upright={{#if:{{{range_map4_upright|}}}|{{{range_map4_upright}}}|{{{upright|1}}}}}|alt={{{range_map4_alt|}}}}} {{!}}- {{#if:{{{range_map4_caption|}}}| {{!}} colspan=2 style="text-align: center; font-size: 88%" {{!}} {{{range_map4_caption}}} }} }} |- {{#if:{{{synonyms|}}}| ! colspan=2 style="text-align: center{{#if:{{{colour|}}}|{{;}} background-color: {{{colour}}} }}" {{!}} [[Synonym (taxonomy)|Synonyms]]{{{synonyms_ref|}}} {{!}}- {{!}} colspan=2 style="text-align: left" {{!}} {{{synonyms}}} {{!}}- }} {{#if:{{{footer|}}}| {{!}}- {{!}} colspan=2 style="text-align: left" {{!}} {{{footer}}} {{!}}- }} |}<!-- Define any categories to be displayed on the page here: -->{{#ifeq:{{NAMESPACE}}|{{ns:0}}<!-- -->| [[Kategori:Articles with 'species' microformats]]<!-- -->{{#ifeq:{{{colour|none}}}|{{Taxobox/Error_colour}}| [[Kategori:Taxoboxes with the error color]]}}<!-- -->{{#ifeq:{{{colour|none}}}|{{Taxobox colour|incertae sedis}}| [[Kategori:Taxoboxes with the incertae sedis color]]}}<!-- -->{{#ifeq:{{{colour|none}}}|{{Taxobox colour|}}| [[Kategori:Taxoboxes with no color]]}}<!-- -->{{Taxonbar/candidate}}<!-- -->}}<noinclude>{{documentation}}</noinclude> lm9mlx3304todnr3rfydy9ngmmz8mrb Templat:Taxobox/species 10 222 773 537 2024-08-09T09:21:25Z Jon Harald Søby 58 5 semakan diimportkan 536 wikitext text/x-wiki {{#if:{{{2|}}}| ! colspan = 2 {{!}} <div style = "text-align: center">[[Conservation status]]</div> {{!}}- {{!}} colspan = 2 {{!}} <div style = "text-align: center">{{#if:{{{1|}}}|{{#switch:{{{1}}}<!-- ************* * IUCN2.3 * ************* --> | iucn2.3 | IUCN2.3 = {{#switch:{{{2}}} | EX | ex = [[Fail:Status iucn2.3 EX.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List extinct species]] | }} | EW | ew = [[Fail:Status iucn2.3 EW.svg|frameless|link=|alt=]]<br />[[Extinct in the Wild]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List extinct in the wild species]] | }} | CR | cr = [[Fail:Status iucn2.3 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered species|Critically Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]] | }} | EN | en = [[Fail:Status iucn2.3 EN.svg|frameless|link=|alt=]]<br />[[Endangered species (IUCN status)|Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List endangered species]] | }} | VU | vu = [[Fail:Status iucn2.3 VU.svg|frameless|link=|alt=]]<br />[[Vulnerable species|Vulnerable]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List vulnerable species]] | }} | LR | lr = [[Fail:Status iucn2.3 blank.svg|link=|alt=]]<br />Lower risk {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]] | }} | CD | cd | LR/CD | lr/CD | LR/cd | lr/cd = [[Fail:Status iucn2.3 CD.svg|frameless|link=|alt=]]<br />[[Conservation Dependent]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List conservation dependent species]] | }} | NT | nt | LR/NT | lr/NT | LR/nt | lr/nt = [[Fail:Status iucn2.3 NT.svg|frameless|link=|alt=]]<br />[[Near Threatened]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List near threatened species]] | }} | LC | lc | LR/LC | lr/LC | LR/lc | lr/lc = [[Fail:Status iucn2.3 LC.svg|frameless|link=|alt=]]<br />[[Least Concern]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List least concern species]] | }} | DD | dd = [[Fail:Status iucn2.3 blank.svg|frameless|link=|alt=]]<br />[[Data Deficient]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List data deficient species]] | }} | NE | ne = ''Not evaluated'' | NR | nr = ''Not recognized'' | PE | pe = [[Fail:Status iucn2.3 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]] |}} | PEW | pew = [[Fail:Status iucn2.3 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct in the wild {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]] | }} | '''''Invalid status''''' {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]] | }} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[IUCN Red List|IUCN 2.3]]}}){{{3|}}}</small><!-- ************* * IUCN3.1 * ************* -->| iucn | IUCN | iucn3.1 | IUCN3.1 = {{#switch:{{{2}}} | EX | ex = [[Fail:Status iucn3.1 EX.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List extinct species]] | }} | EW | ew = [[Fail:Status iucn3.1 EW.svg|frameless|link=|alt=]]<br />[[Extinct in the Wild]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List extinct in the wild species]] | }} | CR | cr = [[Fail:Status iucn3.1 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered species|Critically Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]] |}} | EN | en = [[Fail:Status iucn3.1 EN.svg|frameless|link=|alt=]]<br />[[Endangered species (IUCN status)|Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List endangered species]] | }} | VU | vu = [[Fail:Status iucn3.1 VU.svg|frameless|link=|alt=]]<br />[[Vulnerable species|Vulnerable]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List vulnerable species]] |}} | NT | nt = [[Fail:Status iucn3.1 NT.svg|frameless|link=|alt=]]<br />[[Near Threatened]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List near threatened species]] | }} | LC | lc = [[Fail:Status iucn3.1 LC.svg|frameless|link=|alt=]]<br />[[Least Concern]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List least concern species]] |}} | DD | dd = [[Fail:Status iucn3.1 blank.svg|frameless|link=|alt=]]<br/>[[Data Deficient]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List data deficient species]] |}} | NE | ne = ''Not evaluated'' | NR | nr = ''Not recognized'' | PE | pe = [[Fail:Status iucn3.1 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]] |}} | PEW | pew = [[Fail:Status iucn3.1 CR.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct in the wild {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:IUCN Red List critically endangered species]]|}} | '''''Invalid status'''''{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[IUCN Red List|IUCN 3.1]]}}){{{3|}}}</small><!-- ************* * EPBC * ************* -->| epbc | EPBC = {{#switch:{{{2}}} | EX | ex = [[Fail:Status EPBC EX.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act extinct biota]] |}} | EW | ew = [[Fail:Status EPBC EW.svg|frameless|link=|alt=]]<br />[[Extinct in the Wild]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act extinct in the wild biota]]|}} | CR | cr = [[Fail:Status EPBC CR.svg|frameless|link=|alt=]]<br />[[Critically endangered species|Critically endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act critically endangered biota]] |}} | EN | en = [[Fail:Status EPBC EN.svg|frameless|link=|alt=]]<br />[[Endangered species|Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act endangered biota]]|}} | VU | vu = [[Fail:Status EPBC VU.svg|frameless|link=|alt=]]<br />[[Vulnerable species|Vulnerable]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act vulnerable biota]] |}} | CD | cd = [[Fail:Status EPBC CD.svg|frameless|link=|alt=]]<br />[[Conservation Dependent]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:EPBC Act conservation dependent biota]] |}} | DL | dl | Delisted = [[Fail:Status EPBC DL.svg|frameless|link=|alt=]]<br />Delisted | '''''Invalid status''''' {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[Environment Protection and Biodiversity Conservation Act 1999|EPBC Act]]}}){{{3|}}}</small><!-- ************* * TNC * ************* -->| tnc | TNC | natureserve | NatureServe = {{#switch:{{{2}}} | GX | gx = [[Fail:Status TNC GX.svg|frameless|link=|alt=]]<br />Presumed [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe presumed extinct species]]|}} | GH | gh = [[Fail:Status TNC GH.svg|frameless|link=|alt=]]<br />Possibly [[Extinction|Extinct]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe possibly extinct species]]|}} | G1 | g1 = [[Fail:Status TNC G1.svg|frameless|link=|alt=]]<br />Critically Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe critically imperiled species]] |}} | G2 | g2 = [[Fail:Status TNC G2.svg|frameless|link=|alt=]]<br />Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe imperiled species]] |}} | G3 | g3 = [[Fail:Status TNC G3.svg|frameless|link=|alt=]]<br />Vulnerable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe vulnerable species]] |}} | G4 | g4 = [[Fail:Status TNC G4.svg|frameless|link=|alt=]]<br />Apparently Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe apparently secure species]] |}} | G5 | g5 = [[Fail:Status TNC G5.svg|frameless|link=|alt=]]<br />Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe secure species]]|}} | GU | gu = [[Fail:Status TNC blank.svg|frameless|link=|alt=]]<br />Unrankable | GNR | gnr = [[Fail:Status TNC blank.svg|frameless|link=|alt=]]<br />Unranked | TX | tx = [[Fail:Status TNC TX.svg|frameless|link=|alt=]]<br />Presumed [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date|{{{extinction_date}}}}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe presumed extinct species]]|}} | TH | th = [[Fail:Status TNC TH.svg|frameless|link=|alt=]]<br />Possibly [[Extinction|Extinct]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe possibly extinct species]]|}} | T1 | t1 = [[Fail:Status TNC T1.svg|frameless|link=|alt=]]<br />Critically Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe critically imperiled species]]|}} | T2 | t2 = [[Fail:Status TNC T2.svg|frameless|link=|alt=]]<br />Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe imperiled species]] |}} | T3 | t3 = [[Fail:Status TNC T3.svg|frameless|link=|alt=]]<br />Vulnerable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe vulnerable species]]|}} | T4 | t4 = [[Fail:Status TNC T4.svg|frameless|link=|alt=]]<br />Apparently Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe apparently secure species]]|}} | T5 | t5 = [[Fail:Status TNC T5.svg|frameless|link=|alt=]]<br />Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:NatureServe secure species]] |}} | TU | tu = [[Fail:Status TNC T blank.svg|frameless|link=|alt=]]<br />Unrankable | '''''Invalid status''''' {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[NatureServe conservation status|NatureServe]]}}){{{3|}}}</small><!-- ************* * ESA * ************* -->| esa | ESA = {{#switch:{{{2}}} | EX | ex = [[Fail:Status ESA EX.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | E | e | LE | le = [[Fail:Status ESA LE.svg|frameless|link=|alt=]]<br />[[Endangered species|Endangered]]{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:ESA endangered species]]|}} | T | t | LT | lt = [[Fail:Status ESA LT.svg|frameless|link=|alt=]]<br />[[Threatened species|Threatened]]{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:ESA threatened species]]|}} | DL | dl | Delisted = [[Fail:Status ESA DL.svg|frameless|link=|alt=]]<br />Delisted | '''''Invalid status'''''{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[Endangered Species Act|ESA]]}}){{{3|}}}</small><!-- ************* * COSEWIC * ************* -->| cosewic | COSEWIC = {{#switch:{{{2}}} | X | x = [[Fail:Status COSEWIC X.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | XT | xt = [[Fail:Status COSEWIC XT.svg|frameless|link=|alt=]]<br />Extirpated (Canada) | E | e = [[Fail:Status COSEWIC E.svg|frameless|link=|alt=]]<br />[[Endangered species|Endangered]] | T | t = [[Fail:Status COSEWIC T.svg|frameless|link=|alt=]]<br />[[Threatened species|Threatened]] | SC | sc = [[Fail:Status COSEWIC SC.svg|frameless|link=|alt=]]<br />Special Concern | NAR | nar = [[Fail:Status COSEWIC NAR.svg|frameless|link=|alt=]]<br />[[Least Concern|Not at risk]] | '''''Invalid status'''''{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[Committee on the Status of Endangered Wildlife in Canada|COSEWIC]]}}){{{3|}}}</small><!-- ************* * DECF * ************* -->| decf | DECF = {{#switch:{{{2}}} | X | x = [[Fail:Status DECF X.svg|frameless|link=|alt=]]<br />Declared Rare&nbsp;— Presumed [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | R | r = [[Fail:Status DECF R.svg|frameless|link=|alt=]]<br />Declared [[Rare species|rare]] | P1 | p1 = [[Fail:Status DECF P1.svg|frameless|link=|alt=]]<br />Priority One&nbsp;— Poorly Known Taxa | P2 | p2 = [[Fail:Status DECF P2.svg|frameless|link=|alt=]]<br />Priority Two&nbsp;— Poorly Known Taxa | P3 | p3 = [[Fail:Status DECF P3.svg|frameless|link=|alt=]]<br />Priority Three&nbsp;— Poorly Known Taxa | P4 | p4 = [[Fail:Status DECF P4.svg|frameless|link=|alt=]]<br />Priority Four&nbsp;— Rare Taxa | DL | dl | Delisted = [[Fail:Status DECF DL.svg|frameless|link=|alt=]]<br />Delisted | '''''Invalid status'''''{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[Declared Rare and Priority Flora List|DEC]]}}){{{3|}}}</small><!-- ************* * CITES * ************* -->| CITES | cites = {{#switch:{{{2}}} | CITES_A1 = [[CITES]] Appendix I | CITES_A2 = [[CITES]] Appendix II | CITES_A3 = [[CITES]] Appendix III | '''''Invalid status''''' {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[CITES]]}}){{{3|}}}</small><!-- ************* * NZTCS * ************* -->| nztcs | NZTCS = {{#switch:{{{2}}} | EX | ex = [[Fail:Status NZTCS EX.svg|frameless|link=|alt=]]<br />[[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | NC | nc = [[Fail:Status NZTCS NC.svg|frameless|link=|alt=]]<br />Nationally Critical | NE | ne = [[Fail:Status NZTCS NE.svg|frameless|link=|alt=]]<br />Nationally Endangered | NV | nv = [[Fail:Status NZTCS NV.svg|frameless|link=|alt=]]<br />Nationally Vulnerable | SD | sd = [[Fail:Status NZTCS SD.svg|frameless|link=|alt=]]<br />Serious Decline | GD | gd = [[Fail:Status NZTCS GD.svg|frameless|link=|alt=]]<br />Gradual Decline | SP | sp = [[Fail:Status NZTCS SP.svg|frameless|link=|alt=]]<br />Sparse | RR | rr = [[Fail:Status NZTCS RR.svg|frameless|link=|alt=]]<br />Range Restricted | NU | nu = [[Fail:Status NZTCS NU.svg|frameless|link=|alt=]]<br />Naturally Uncommon | REL | rel = [[Fail:Status NZTCS REL.svg|frameless|link=|alt=]]<br />Relict | R | r = [[Fail:Status NZTCS R.svg|frameless|link=|alt=]]<br />Recovering | D | d = [[Fail:Status NZTCS D.svg|frameless|link=|alt=]]<br />Declining | NT | nt = [[Fail:Status NZTCS NT.svg|frameless|link=|alt=]]<br />Not Threatened | DD | dd = [[Fail:Status NZTCS DD.svg|frameless|link=|alt=]]<br />Data Deficient | '''''Invalid status'''''{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|[[New Zealand Threat Classification System|NZ TCS]]}}){{{3|}}}</small><!-- ***************************************************************************** * adding support for other conservation systems using developmental module * * - handling of existing systems are not changed for now * * - the module handles all the above but needs more testing * ***************************************************************************** -->| CNCFLORA | cncflora |CNCFlora = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}} | NSWBCA = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}} | qldnca | QLDNCA = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}} | rlsap | RLSAP |sanbi |SANBI = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}} |TPWCA |tpwca = {{#invoke:Conservation status|status|{{{1}}}|{{{2}}}|{{{3}}}}}<!-- ******************** * No status system * ******************** -->| {{#switch:{{{2}}} | EX | ex = [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | CR | cr = [[Critically endangered species|Critically Endangered]] | EN | en = [[Endangered species|Endangered]] | {{{2}}} }}<small>&nbsp;({{#if:{{{status_text|}}}|[[{{{status_text|#Conservation status}}}|See text]]|{{{1}}}}}){{{3|}}}</small> {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes with an unrecognised status system]]|}} }} | {{#switch:{{{2}}} | EX | ex = [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} | EW | ew = [[Extinction|Extinct]]&nbsp;in&nbsp;the&nbsp;wild {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Species extinct in the wild]][[Kategori:Taxoboxes needing a status system parameter]]|}} | CR | cr = [[Critically endangered species|Critically endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Critically endangered species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | EN | en = [[Endangered species|Endangered]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Endangered species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | VU | vu = [[Vulnerable species|Vulnerable]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Vulnerable species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | NT | nt = [[Near Threatened]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Near threatened species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | LC | lc = [[Least Concern]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Least concern species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | SE | se | SECURE | Secure | secure = Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} | DD | dd = [[Data Deficient]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} | DOM | dom | DOMESTICATED | Domesticated | domesticated = Domesticated {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Domesticated animals]]|}} | PE | pe = [[Fail:Status_none_PE.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Critically endangered species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | PEW | pew = [[Fail:Status_none_PEW.svg|frameless|link=|alt=]]<br />[[Critically endangered]], possibly extinct in the wild {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Critically endangered species]][[Kategori:Taxoboxes needing a status system parameter]]|}} | CITES_A1 = [[CITES]] Appendix I {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} | CITES_A2 = [[CITES]] Appendix II {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} | CITES_A3 = [[CITES]] Appendix III {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} | FOSSIL | Fossil | fossil = Fossil | PRE | Pre | pre = Prehistoric {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Invalid conservation status]]|}} | text | Text | TEXT = ''See text'' | LR/CD | lr/CD | LR/cd | lr/cd = [[Fail:Status iucn2.3 CD.svg|frameless|link=|alt=]]<br />[[Conservation Dependent]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | LR/NT | lr/NT | LR/nt | lr/nt = [[Fail:Status iucn2.3 NT.svg|frameless|link=|alt=]]<br />[[Near Threatened]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Near threatened species]][[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | LR/LC | lr/LC | LR/lc | lr/lc = [[Fail:Status iucn2.3 LC.svg|frameless|link=|alt=]]<br />[[Least Concern]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Least Concern species]][[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | GX | gx = [[Fail:Status TNC GX.svg|frameless|link=|alt=]]<br />Presumed [[Extinction|Extinct]]{{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}} {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | GH | gh = [[Fail:Status TNC GH.svg|frameless|link=|alt=]]<br />Possibly [[Extinction|Extinct]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | G1 | g1 = [[Fail:Status TNC G1.svg|frameless|link=|alt=]]<br />Critically Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | G2 | g2 = [[Fail:Status TNC G2.svg|frameless|link=|alt=]]<br />Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | G3 | g3 = [[Fail:Status TNC G3.svg|frameless|link=|alt=]]<br />Vulnerable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | G4 | g4 = [[Fail:Status TNC G4.svg|frameless|link=|alt=]]<br />Apparently Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | G5 | g5 = [[Fail:Status TNC G5.svg|frameless|link=|alt=]]<br />Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | GU | gu = [[Fail:Status TNC blank.svg|frameless|link=|alt=]]<br />Unrankable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | TX | tx = [[Fail:Status TNC TX.svg|frameless|link=|alt=]]<br />Presumed [[Extinction|Extinct]]{{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}} {{#switch:{{{extinction_date|}}}|y|yes|true|=|&nbsp;({{{extinction_date}}})}}<!--This case is subject to deletion once status systems are added--> | TH | th = [[Fail:Status TNC TH.svg|frameless|link=|alt=]]<br />Possibly [[Extinction|Extinct]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | T1 | t1 = [[Fail:Status TNC T1.svg|frameless|link=|alt=]]<br />Critically Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | T2 | t2 = [[Fail:Status TNC T2.svg|frameless|link=|alt=]]<br />Imperiled {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | T3 | t3 = [[Fail:Status TNC T3.svg|frameless|link=|alt=]]<br />Vulnerable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | T4 | t4 = [[Fail:Status TNC T4.svg|frameless|link=|alt=]]<br />Apparently Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | T5 | t5 = [[Fail:Status TNC T5.svg|frameless|link=|alt=]]<br />Secure {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | TU | tu = [[Fail:Status TNC T blank.svg|frameless|link=|alt=]]<br />Unrankable {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | R | r = [[Fail:Status DECF R.svg|frameless|link=|alt=]]<br />Declared [[Rare species|rare]] {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | P1 | p1 = [[Fail:Status DECF P1.svg|frameless|link=|alt=]]<br />[[Conservation Codes for Western Australian Flora|Priority One]]&nbsp;— Poorly Known Taxa {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | P2 | p2 = [[Fail:Status DECF P2.svg|frameless|link=|alt=]]<br />[[Conservation Codes for Western Australian Flora|Priority Two]]&nbsp;— Poorly Known Taxa {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | P3 | p3 = [[Fail:Status DECF P3.svg|frameless|link=|alt=]]<br />[[Conservation Codes for Western Australian Flora|Priority Three]]&nbsp;— Poorly Known Taxa {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | P4 | p4 = [[Fail:Status DECF P4.svg|frameless|link=|alt=]]<br />[[Conservation Codes for Western Australian Flora|Priority Four]]&nbsp;— Rare Taxa {{#ifeq: {{NAMESPACEE}} | {{ns: 0}} | [[Kategori:Taxoboxes needing a status system parameter]]|}}<!--This case is subject to deletion once status systems are added--> | {{{2}}} }}<small>{{{3|}}}</small> }}</div> }}<noinclude>{{Documentation}}</noinclude> 1uu45aypty21kpjeiypw2m7cn0fxfbc Templat:Taxobox colour 10 223 539 538 2024-08-09T09:20:12Z Jon Harald Søby 58 1 semakan diimportkan 538 wikitext text/x-wiki <includeonly>{{#switch:{{lc:{{#invoke:Autotaxobox|removeQualifier|{{Delink|{{{1|}}}}} }} }} |animalia|animal = rgb(235,235,210) |archaea|nanoarchaeota|nanarchaeota|euryarchaeota|crenarchaeota|thaumarchaeota|korarchaeota = rgb(195,245,250) |archaeplastida|plantae|plant|viridiplantae = rgb(180,250,180) |bacteria|firmicutes|eubacteria = rgb(220,235,245) |eukaryota|eukarya|excavata|excavates|protista|protists|amoebozoa|opisthokonta|choanozoa = rgb(245,215,255) |fungi = rgb(145,250,250) |ichnos = rgb(230,222,214) |incertae sedis|''incertae sedis''|acritarcha = rgb(250,240,230) |sar|chromalveolata = rgb(200,250,80) |veterovata = rgb(250,250,220) |virus|viruses|i|ii|iii|iv|v|vi|vi/vii|vii|viii|viroid|viroids = rgb(250,250,190) |life|=transparent |#default = {{Taxobox/Error colour}}<!-- -->}}</includeonly><noinclude> {{Documentation}}</noinclude> evnfa1ygjg6vo2g4yesrr61ciqisxb4 Templat:Taxon info 10 224 541 540 2024-08-09T09:20:13Z Jon Harald Søby 58 1 semakan diimportkan 540 wikitext text/x-wiki {{#invoke:Autotaxobox|taxonInfo|{{{1|<noinclude>Acacia</noinclude>}}}|{{{2|<noinclude>parent</noinclude>}}}}}<noinclude>{{documentation}}</noinclude> 81398n6a16baqofp8mue2gyw3jh5xdx Templat:Taxonbar/candidate 10 225 543 542 2024-08-09T09:20:13Z Jon Harald Søby 58 1 semakan diimportkan 542 wikitext text/x-wiki {{#invoke:Taxonbar/candidate|check}}<noinclude> {{Documentation}} </noinclude> 5ff2tg5y7dbk1t1fd90lzmak8oigbfh Templat:Taxonomy 10 226 775 545 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 544 wikitext text/x-wiki <includeonly>{{#if:{{{rank|}}}|<!-- Cell stating the rank: --> {{!}} {{anglicise rank|{{{rank|}}}}}:<!-- Cell stating the taxon's name, with authority: DO NOT USE named parameters in the call to replace as they will strip the trailing whitespace. --> {{!}} <div style="display:inline" class="{{lc:{{anglicise rank|{{{rank}}} }} }}">{{#invoke:String|replace|{{{link}}}|. |.&nbsp;|count=1}}</div>{{#if:{{{auth|}}} |<br /><div style="font-size: 85%;">{{{auth}}}</div>}} {{!}}- }}</includeonly><noinclude>{{Documentation}} {{INTERWIKI|Q12168058}} </noinclude> 49uhypr9igahz8suu1ka4n22ktgxm48 Templat:Taxonomy/Carica 10 227 547 546 2024-08-09T09:20:13Z Jon Harald Søby 58 1 semakan diimportkan 546 wikitext text/x-wiki {{Don't edit this line {{{machine code|}}} |rank=genus |link=Carica |parent=Caricaceae |refs=<!--Shown on this page only; don't include <ref> tags --> }} gshjxq42vhjgerdt40rfpa26w2r05a6 Templat:Taxonomy/Caricaceae 10 228 549 548 2024-08-09T09:20:13Z Jon Harald Søby 58 1 semakan diimportkan 548 wikitext text/x-wiki {{Don't edit this line {{{machine code|}}} |rank=familia |link=Caricaceae |parent=Brassicales |refs={{Cite journal|author=Angiosperm Phylogeny Group|year=2016|title=An update of the Angiosperm Phylogeny Group classification for the orders and families of flowering plants: APG IV|journal=Botanical Journal of the Linnean Society|volume=181|issue=1|pages=1–20|url=http://onlinelibrary.wiley.com/doi/10.1111/boj.12385/epdf|format=PDF|issn=00244074|doi=10.1111/boj.12385}} }} e2rqc70e99fxzfsuqqexws24vhr3ww5 Templat:Taxonomy key 10 229 551 550 2024-08-09T09:20:13Z Jon Harald Søby 58 1 semakan diimportkan 550 wikitext text/x-wiki <includeonly><noinclude><!-- ****** First show the RIGHT-HAND table, with the correct taxobox colour, showing parent taxa with "edit" links --></noinclude>{{#invoke:Autotaxobox|taxonomyList|{{{taxon}}}}}<noinclude><!--Now check whether the parent taxonomy template or link target article need to be created; use #titleparts: to remove any #section part in the link target --></noinclude> {{#ifexist:Template:Taxonomy/{{{parent|}}} |{{#if:{{{link_target|}}}|{{#ifexist:{{#titleparts:{{{link_target}}}||}}|__NOINDEX__<noinclude><!-- then it looks like we're in the clear. Google can show the article, rather than this page. --></noinclude> |Wikipedia does not yet have an article about [[{{{link_target}}}]]. <!--You can help by [{{Create taxonomy/link|{{{link_target}}} }} creating it].--> The page that you are currently viewing contains information about [[{{{link_target}}}]]'s taxonomy.[[Kategori:Taxonomy templates with red-linked taxa]]}}}} |{{error|Making progress.}} If the table below looks correct, then the necessary taxonomic information for the target taxon exists. {{Taxonomy key/missing template|taxon={{{parent|}}}|msg=given as the value of <code>parent</code>}} }}<noinclude><!-- ****** Now show the LEFT-HAND table, i.e. information for the current taxon --></noinclude> Not sure why you're here? [[Wikipedia:Automated taxobox system/intro|Get started]] with the automated taxobox system. {| class="wikitable" |- |Parent: |<code>{{{parent|}}}</code> &#x5B;[[Templat:Taxonomy/{{{parent|}}}|Taxonomy]]; <span class=plainlinks>[{{Create taxonomy/link|{{{parent|}}}}} edit]&#x5D;</span> |- |Rank: |<code>{{{rank|}}}</code> (displays as <code>{{Anglicise rank|{{{rank|}}}|check=yes}}</code>){{#if:{{{rank|}}}||{{error|– a rank must be supplied}}}} |- |Link: |<code>{{#invoke:Autotaxobox|taxonLink |taxon={{{taxon}}} |extinct={{{extinct}}} |link_target={{{link_target}}} |link_text={{{link}}}<!--link here may be "link_target|link_text"--> |bold=no |italic={{Is italic taxon|{{{rank}}}}} }}</code>{{#ifeq:{{{link_target}}}|{{{link}}}|| (links to <code>{{{link_target}}}</code>)}} |- |Extinct: |{{#if:{{{extinct|}}}|<code>{{{extinct|}}}</code>|no}}{{#ifeq:{{{extinct_error|}}}|yes| <span style="background-color:#FCC">parent is marked as extinct</span>}} |- |Always displayed: |{{#if:{{{always_display|}}}|<code>{{{always_display}}}</code>[[Kategori:Taxonomy templates using always_display|{{{always_display}}}]]|{{#switch:{{lc:{{{rank|}}} }} |virus_group |regnum | phylum | divisio | classis | ordo | familia | genus | species = yes (major rank) |#default = no }} }} |- |Taxonomic references: |{{#invoke:Autotaxobox|showRefs|{{{taxon}}}|{{{refs|}}}}} |- |Parent's taxonomic references: |{{#invoke:Autotaxobox|showRefs|{{{parent|}}}|{{Taxon info|{{{parent|}}}|refs}}}} |- {{#if:{{{same_as|{{{same as|}}}}}}| {{!}}Same as taxon:{{!}}{{!}}<code>{{{same_as|{{{same as|}}}}}}</code> &#x5B;[[Templat:Taxonomy/{{{same_as|{{{same as}}}}}}|Taxonomy]]; <span class=plainlinks>[{{Create taxonomy/link|{{{same_as|{{{same as|}}}}}}}} edit]&#x5D;</span> {{!}}- }} {{#if:{{#invoke:String|endswith|{{{taxon}}}|/skip}}| {{!}} colspan=2 {{!}}For the suffix "/skip", see [[Wikipedia:Automated_taxobox_system/advanced_taxonomy#Skip_taxonomy_templates|Skip taxonomy templates]].<br>For the skipped taxa, see [[Templat:Taxonomy/{{#invoke:String|sub|{{{taxon}}}||-6}}]].| {{#if:{{#invoke:String|endswith|{{{taxon}}}|/?}}| {{!}} colspan=2 {{!}}For the suffix "/?", see [[Wikipedia:Automated_taxobox_system/advanced_taxonomy#Questionable_assignments|Questionable assignments]].| {{#ifeq:{{#titleparts:{{{taxon}}}|1|2}}|Incertae sedis| {{!}} colspan=2 {{!}}For taxon names with "Incertae sedis", see [[Wikipedia:Automated_taxobox_system/advanced_taxonomy#Incertae_sedis_taxonomy_templates|''Incertae sedis'' taxonomy templates]].| }}}}}} |}{{#ifeq:{{{extinct_error|}}}|yes|[[Kategori:Taxonomy templates with inconsistent extinct values]]}}</includeonly><noinclude>{{documentation}}</noinclude> ktxbh37h6srsuvtrc6e7mugn2r9lu1p Templat:Taxonomy preload 10 230 553 552 2024-08-09T09:20:14Z Jon Harald Søby 58 1 semakan diimportkan 552 wikitext text/x-wiki {{#switch:?| |{{#titleparts:{{{1|}}}|1|2}}=preload/?{{#titleparts:{{{1|}}}|1|3}} |{{#titleparts:{{{1|}}}|1|3}}=preload/? |{{#ifeq:{{lc:{{#titleparts:{{{1|}}}|1|1}} }}|incertae sedis|preload/incertae_sedis |{{#if:{{#titleparts:{{{1|}}}|1|2}}|sameas|preload}} }}}}<noinclude> {{Documentation}} </noinclude> r2qpxozl3wjztymbzex7gyjobcatpcu Templat:Tekokon Laman/Header 10 231 556 555 2024-08-09T09:20:14Z Jon Harald Søby 58 2 semakan diimportkan 555 wikitext text/x-wiki <div id="mp_header" class="mp_outerbox" style="border:3px solid #0a100d; margin: 0.5em; overflow: hidden; padding: 0.5em;"> {| width="100%" | <div style="float: left; width: 0em; height: 0em; margin: -0.5em 0em 0em -2.5em; overflow: visiable;">[[Fail:Wikipedia-logo-v2-200px-transparent.png|200px|link=]]</div> <div class="center"> <span style="color:#333333;font-size:180%;">Pesorong kam ta'</span><br /><span style="color:#333333;font-size:250%; line-height:100%;">[[Wikipidia Ling Sama|Wikipidia Bajau Sama]]</span><br /><span style="color:#333333;font-size:120%;">Ongkob tuturan momon ling Sama.<br /> Betiru kami bengen {{NUMBEROFARTICLES}} teturan Bajau Sama. </span> </div> |} </div> ig9at02uqntrc4cv73gvym7rjzxlxo0 Templat:Tekokon Laman/Wikipediasister 10 232 4607 4445 2024-08-13T11:45:46Z Minorax 160 4607 wikitext text/x-wiki {| style="border:1px solid #BED2E0; margin-bottom: 1em" cellspacing="0" cellpadding="5" width="100%" | style="font: 100% Tahoma; color:black" align="center" bgcolor="#D0E2EE" |'''Projek Wikimedia lain''' |- | style="border-top:1px solid #BED2E0; font: 85% Verdana;" align="left" bgcolor="#FFFFFF" | <div style width="50%" style="border:1px solid #aaaaaa; background-color:#f9f9f9; padding:5px"> <div class="plainlinks" style="text-align:center"> {|width="100%" align="center" cellpadding="4" style="text-align:left;" | align="center" | [[Fail:Wiktionary small.svg|link=Wt/bdr|35px]] | '''[[incubator:Wt/bdr|Wiktionary]]''' | align="center" | [[Fail:Wikinews-logo.svg|link=Wn/bdr|51px]] | '''[[incubator:Wn/bdr|Wikiabar]]''' | align="center" | [[Fail:Wikiquote-logo.svg|link=incubator:Wq/bdr|41px]] | '''[[incubator:Wq/bdr|Wikiquote]]''' |- | align="center" | [[Fail:Wikibooks-logo.svg|link=Wb/bdr|35px]] | '''[[incubator:Wb/bdr|Wikibuk]]''' | align="center" | [[Fail:Wikispecies-logo.svg|link=wikispecies:|30px]] | '''[[wikispecies:|Wikispecies]]''' | align="center" | [[Fail:Wikisource-logo.svg|link=oldwikisource:|31px]] | '''[[oldwikisource:Main Page/Bajau Sama|Wikisource]]''' |- | align="center" | [[Fail:Wikiversity-logo.svg|link=betawikiversity:|35px]] | '''[[betawikiversity:|Wikiversity Beta]]''' | align="center" | [[Fail:Commons-logo.svg|link=commons:|31px]] | '''[[c:|Commons]]''' | align="center" | [[Fail:Wikimedia Community Logo.svg|link=:m:|35px]] | '''[[:m:|Meta-Wiki]]''' |- | align="center" | [[Fail:Wikivoyage-Logo-v3-icon.svg|link=Wy/bdr|35px]] | '''[[incubator:Wy/bdr|Wikivoyage]]''' | align="center" | [[Fail:Wikidata-logo.svg|link=Wikidata:|31px]] | '''[[d:|Wikidata]]''' | align="center" | [[Fail:MediaWiki-2020-icon.svg|MediaWiki|link=mw:MediaWiki/bdr|35px]] | '''[[mw:MediaWiki/bdr|MediaWiki]]''' |} </div> </div> |} 8bixt3scs79vft6jmlyoctah4cuowwy Templat:TemplateData header 10 233 561 560 2024-08-09T09:20:14Z Jon Harald Søby 58 2 semakan diimportkan 559 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Kategori:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Templat:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Kategori:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> 0xyx7rhk71ja1y8e6ihqmhsxk6axtt1 Templat:Template link 10 234 564 563 2024-08-09T09:20:15Z Jon Harald Søby 58 2 semakan diimportkan 562 wikitext text/x-wiki &#123;&#123;[[Templat:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 2h4zi6ojyhbitrc6j3hfg0wn8hrz3cb Templat:Template link code 10 235 567 566 2024-08-09T09:20:15Z Jon Harald Søby 58 2 semakan diimportkan 565 wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlc}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 0i49ncdivj3996big2nh593ty7aspr8 Templat:Template link general/doc 10 236 572 571 2024-08-09T09:20:15Z Jon Harald Søby 58 4 semakan diimportkan 568 wikitext text/x-wiki {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --> {{#ifeq:{{FULLPAGENAME}}|Template:Template link with subst|{{used in system}}| {{#ifexpr:{{#invoke:Transclusion count|fetch|0}} > 2000|{{high-use}}}}}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} {{lua|Module:Template link general}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bold = tlxb | tlxi | template link expanded with italic = tlxi | tlxs | template link expanded with subst = tlxs | tls | template link with subst = tls | tnull | template link null = tnull | tlp | template link with parameters = tlp}} }}, is used to provide stylized formatting to template displays without actually using the template itself. The code generated will be displayed inline. For a multi-line output, see {{tl|tj}}. ===Parameters=== With the exception of {{mono|alttext}}, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order ([[#Examples|see Examples below]]). Certain templates have the parameter "on" by default; see [[#General-purpose formatting|the main table]] for all alternate options. {| class="wikitable" ! Parameter || Action || Use with<br>{{tl|example}} || Default active |- | || Default (without accessory parameters) || {{tlg|example}} || |- | brace || Include braces as part of the template link || {{tlg|brace=yes|example}} || {{tl|tlw}}/{{tl|tn}} |- | braceinside || Include innermost braces as part of the template link || {{tlg|example|braceinside=yes}} || |- | bold || Renders the template link/name in '''bold''' || {{tlg|bold=yes|example}} || {{tl|tlb}}, {{tl|tlxb}} |- | code || Display output using HTML [[HTML element#code|{{tag|code}}]] tags ([[monospaced font]]) || {{tlg|code=yes|example}} || {{tl|tlc}}, {{tl|Template link expanded}}, etc. |- | italic || Display any parameters accompanying the template link/name in ''italics'' ||| {{tlg|italic=yes|example|param}} || {{tl|tlxi}} |- | kbd || Display output using HTML [[HTML element#kbd|{{tag|kbd}}]] tags (monospaced font) || {{tlg|kbd=yes|example}} || |- | nolink || Don't render the template name as a link || {{tlg|nolink=yes|example}} || {{tl|tlf}}, {{tl|tnull}} |- | nowrap || Prevent the insertion of line breaks ([[word wrap]]) in the output || {{tlg|nowrap=yes|example}} || |- | nowrapname || Prevent word wrapping in the output of template name/link (parameters will wrap if needed) || {{tlg|nowrapname=yes|example}} || |- | plaincode || Uses {{tag|code|params=style="border:none; background:transparent;"}} || {{tlg|plaincode=yes|example}} || {{tl|tltss}} |- | subst || Include a [[Bantuan:Substitution|subst:]] prefix before the template link/name || {{tlg|subst=yes|example}} || {{tl|tls}}, {{tl|tlxs}}, etc |- | alttext=<code style="padding:0; margin:0">[text]</code> || Replace <code style="padding:0; margin:0">[text]</code> with the actual label to be displayed for the template link || {{tlg|alttext=Other|example}} || {{tl|tla}} |- | _show_result || Will also display the result of the template || {{Template link expanded|Min|7|-5|_show_result=y}} || |- | _expand || Will add a link to the expanded template page || {{Template link expanded|Min|7|-5|_expand=y}} || |} ====Unnamed (Positional)==== This template can take any number of [[unnamed parameter]]s as parameters accompanying the template link (or name); see Examples below. ===Examples=== {{#switch:{{SITENAME}} |Wikipedia|Meta= | ; Note: On the source sister projects, en.wikipedia and Meta, '''X0, X1, X2, ..., X9 are sandbox templates''' for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other Sister projects. }} {{Aligned table |cols=3 |class=wikitable |style=background-color:transparent;<!-- to see background of <code>...</code> --> | '''Code''' | '''Output''' | '''Remarks''' | {{tji|{{{1|tlg}}}|Banner}} | {{{{{1|tlg}}}|Banner}} | Template:Banner does not exist. (Non-existent template is redlinked.) | {{tji|{{{1|tlg}}}|Abc}} | {{{{{1|tlg}}}|Abc}} | Template:Abc exists. | {{tji|{{{1|tlg}}}|abC}} | {{{{{1|tlg}}}|abC}} | Template names are case-sensitive | {{tji|{{{1|tlg}}}|abc}} | {{{{{1|tlg}}}|abc}} | (but the first letter is case-insensitive). | {{tji|{{{1|tlg}}}|x0}} | {{{{{1|tlg}}}|x0}} | no parameters | {{tji|{{{1|tlg}}}|x1|one}} | {{{{{1|tlg}}}|x1|one}} | one parameter | {{tji|{{{1|tlg}}}|x2|one|two}} | {{{{{1|tlg}}}|x2|one|two}} | two parameters | {{tji|{{{1|tlg}}}|x3|1|2|3|4|5|6|7|8|9|10}} | {{{{{1|tlg}}}|x3|1|2|3|4|5|6|7|8|9|10}} | ten parameters | <syntaxhighlight lang="wikitext" inline>{{tlg|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}</syntaxhighlight> | {{{{{1|tlg}}}|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}} | Unlimited parameters, as one {{tag|nowiki|link=yes}} [[Bantuan:Wikitext#Nowiki|string]]. | {{tji|{{{1|tlg}}}|x2||two||}} | {{{{{1|tlg}}}|x2||two||}} | Empty parameters are discarded. | {{tji|{{{1|tlg}}}|x0|code: on}} | {{{{{1|tlg}}}|x0|code=on}} | &lt;code&gt; style | {{tji|{{{1|tlg}}}|x0|plaincode: on}} | {{{{{1|tlg}}}|x0|plaincode=on}} | plaincode style | {{tji|{{{1|tlg}}}|x0|kbd: on}} | {{{{{1|tlg}}}|x0|kbd=on}} | &lt;kbd&gt; style | {{tji|{{{1|tlg}}}|x0|bold: on}} | {{{{{1|tlg}}}|x0|bold=on}} | bold link/name | {{tji|{{{1|tlg}}}|x1|one|italic: on}} | {{{{{1|tlg}}}|x1|one|italic=on}} | parameter(s) in italics | {{tji|{{{1|tlg}}}|x0|nolink: on}} | {{{{{1|tlg}}}|x0|nolink=on}} | | {{tji|{{{1|tlg}}}|x0|subst: on}} | {{{{{1|tlg}}}|x0|subst=on}} | | {{tji|{{{1|tlg}}}|x0|brace: on}} | {{{{{1|tlg}}}|x0|brace=on}} | all braces in link | {{tji|{{{1|tlg}}}|x0|braceinside: on}} | {{{{{1|tlg}}}|x0|braceinside=on}} | inside braces in link | {{tji|{{{1|tlg}}}|x0|alttext: x0 link}} | {{{{{1|tlg}}}|x0|alttext=x0 link}} | | {{tji|{{{1|tlg}}}|x0|bold: on|code: on|brace: on}} | {{{{{1|tlg}}}|x0|bold=on|code=on|brace=on}} | Combine multiple parameter settings. | <syntaxhighlight lang="wikitext" inline>{{tlg|x1|{{spaces}}one{{spaces}}}}</syntaxhighlight> | {{{{{1|tlg}}}|abc|{{spaces}}one{{spaces}}}} | Using {{tl|spaces}} before and after a parameter. | {{tji|{{{1|tlg}}}|x2|bold: on|code: on|one|two}} | {{{{{1|tlg}}}|x2|bold=on|code=on|one|two}} | Can combine named and anonymous parameters ... | {{tji|{{{1|tlg}}}|x2|one|two|bold: on|code: on}} | {{{{{1|tlg}}}|x2|one|two|bold=on|code=on}} | ... in any order ... | {{tji|{{{1|tlg}}}|x2|one|code: on|two|bold: on|three}} | {{{{{1|tlg}}}|x2|one|code=on|two|bold=on|three}} | ... even intermixed ... | {{tji|{{{1|tlg}}}|x2|one|code: on|two|bold: on|three|italic: on}} | {{{{{1|tlg}}}|x2|one|code=on|two|bold=on|three|italic=on}} | ... with many configurations. | <syntaxhighlight lang="wikitext" inline>{{tlg|x1|x=u}}</syntaxhighlight> | {{{{{1|tlg}}}|x1|x=u}} | '''{{=}}''' won't work | <syntaxhighlight lang="wikitext" inline>{{tlg|x1|x&#61;u}}</syntaxhighlight> | {{{{{1|tlg}}}|x1|x&#61;u}} | <code>&amp;#61;</code> is okay | <syntaxhighlight lang="wikitext" inline>{{tlg|x1|x{{=}}u}}</syntaxhighlight> | {{{{{1|tlg}}}|x1|x{{=}}u}} | <code><nowiki>{{=}}</nowiki></code> is okay (see [[:Template:=|Template:=]]) | <syntaxhighlight lang="wikitext" inline>{{tlg|x1|x<nowiki>=</nowiki>u}}</syntaxhighlight> | {{{{{1|tlg}}}|x1|x<nowiki>=</nowiki>u}} | Sticky nowiki is okay. | {{tji|{{{1|tlg}}}|x2|3: two|2: one}} | {{{{{1|tlg}}}|x2|3=two|2=one}} | {{align|right|Right-to-left is okay}} | {{tji|{{{1|tlg}}}}} | {{{1|tlg}}} | With no arguments, it emits the current page name without braces. | {{tji|{{{1|tlg}}}|x2|3: one|4: two}} | {{{{{1|tlg}}}|x2|3=one|4=two}} | Null parameter stops parsing. }} {| class="wikitable" |style="background-color:transparent;" |+ style="text-align:left;" | Wrapping of long names (default) |- ! Code ! style="width:15em;" | Output |- | {{tji|{{{1|tlg}}}|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} | {{{{{1|tlg}}}|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} |} {| class="wikitable" |style="background-color:transparent;" |+ style="text-align:left;" | Wrapping of long names (<kbd>nowrap=on</kbd>) |- ! Code ! style="width:15em;" | Output |- | {{tji|{{{1|tlg}}}|nowrap: on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} | {{{{{1|tlg}}}|nowrap=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |} {| class="wikitable" |style="background-color:transparent;" |+ style="text-align:left;" | Wrapping of long names (<kbd>nowrapname=on</kbd>) |- ! Code ! style="width:15em;" | Output |- | {{tji|{{{1|tlg}}}|nowrapname: on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} | {{{{{1|tlg}}}|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |} ==See also== {{Template-linking templates}} {{Semantic markup templates}} <includeonly>{{Sandbox other| | <!-- CATEGORIES BELOW THIS LINE, PLEASE: --> [[Kategori:Internal template-link templates]] [[Kategori:Wikitext typing-aid templates]] }}</includeonly> 58esdmkwhg3cc2w1bj4rspppffhqpz4 Templat:Template other 10 237 777 575 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 573 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> ajk8yxcpxpflewxrsavevmgbhlr3kqc Templat:Template parameter usage 10 238 577 576 2024-08-09T09:20:16Z Jon Harald Søby 58 1 semakan diimportkan 576 wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:{{{1|}}}|[[Templat:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}} in articles{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Templat:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Templat:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{Documentation}} </noinclude> 5yk49e5uwbsmrowcocbvxbh9tknz1ce Templat:Tl 10 239 779 579 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 578 wikitext text/x-wiki #REDIRECT [[Templat:Template link]] c0r12ag725t6swu32jqnd1kn4p3cuwl Templat:Transclusionless 10 240 581 580 2024-08-09T09:20:16Z Jon Harald Søby 58 1 semakan diimportkan 580 wikitext text/x-wiki {{Mbox|text=This template {{Yesno|{{{should|}}}|yes=should|no=may}} have no transclusions, because {{{reason|it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason}}}.}}<!-- --><includeonly>{{#switch: {{SUBPAGENAME}} |doc |sandbox= |[[Kategori:Wikipedia transclusionless templates]]}}</includeonly><noinclude>{{Documentation}}</noinclude> tjder6tqrr1scqkvndrt206l840h41f Templat:Transliteration 10 241 785 584 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 582 wikitext text/x-wiki <includeonly>{{#invoke:Lang|transl}}</includeonly><noinclude> {{documentation}} </noinclude> o8z4apt19o91sf9okax90qs0m2phntr Templat:Tree list 10 242 787 587 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 585 wikitext text/x-wiki <templatestyles src="Tree list/styles.css" /><!-- --><div class="treeview"><noinclude> </div> {{Documentation}} </noinclude> 71bvast8rpckwcf0vpy9d52jfo6mn1r Templat:Tree list/end 10 243 789 591 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 589 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{Documentation|Template:Tree list/doc}} </noinclude> o1fzi3t43rwvajfcd88aaf375xq9afc Templat:Tree list/styles.css 10 244 593 592 2024-08-09T09:20:17Z Jon Harald Søby 58 1 semakan diimportkan 592 sanitized-css text/css /* {{pp-template}} */ .treeview ul { padding: 0; margin: 0; } .treeview li { padding: 0; margin: 0; list-style-type: none; list-style-image: none; } .treeview li li { background: url("https://upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px; /* @noflip */ padding-left: 21px; text-indent: 0.3em; } .treeview li li:last-child { background-position: 0 -5971px } /* first line here deals with new situation after RemexHTML switch, * where emptyline cause the first child to become the 2nd child. Such a mess */ .treeview li.emptyline > ul > .mw-empty-elt:first-child + .emptyline, .treeview li.emptyline > ul > li:first-child { background-position: 0 9px } ipolfperplt21ppkuzamefs0uvzp0zp Templat:URL 10 245 595 594 2024-08-09T09:20:17Z Jon Harald Søby 58 1 semakan diimportkan 594 wikitext text/x-wiki <includeonly>{{#invoke:URL|url}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using URL template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:URL]] with unknown parameter "_VALUE_"|ignoreblank=y | 1 | 2 }}<noinclude>{{Documentation}}</noinclude> 0pvaxe5l3hmej5oricmlyuocf1eowrg Templat:Ubl 10 246 792 597 2024-08-09T09:21:26Z Jon Harald Søby 58 2 semakan diimportkan 596 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> g28jpumica8ycuimxbfi2qlrcbowsb3 Templat:Unbulleted list 10 247 600 599 2024-08-09T09:20:18Z Jon Harald Søby 58 2 semakan diimportkan 599 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:List|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> q5qpu4d1htoesrko5lyzme7hzkbqawp Templat:UnstripNoWiki 10 248 602 601 2024-08-09T09:20:18Z Jon Harald Søby 58 1 semakan diimportkan 601 wikitext text/x-wiki {{#invoke:Unstrip|unstripNoWiki|{{{1}}}}}<noinclude> {{documentation}}</noinclude> 35pgdh1bd7wxuemlyvywm6cqsedyi02 Templat:Use American English 10 249 604 603 2024-08-09T09:20:18Z Jon Harald Søby 58 1 semakan diimportkan 603 wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||date=__DATE__ |$B= {{DMCA|Use American English|from|{{{date|}}}|All Wikipedia articles written in American English}} }}<noinclude>{{Documentation}}</noinclude> 2x37o7g1hmclvzsql7ciggmq0v57r0m Templat:Use dmy dates 10 250 606 605 2024-08-09T09:20:19Z Jon Harald Søby 58 1 semakan diimportkan 605 wikitext text/x-wiki {{ <includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B={{DMCA|Use dmy dates|from|{{{date|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Kategori:Pages using Use dmy dates template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Templat:Use dmy dates]] with unknown parameter "_VALUE_"|ignoreblank=y| cs1-dates | date }}}}<noinclude>{{Documentation}}</noinclude> 93lex8zygpsxoo0gn2oiq05v508rl6x Templat:Uses Wikidata 10 251 608 607 2024-08-09T09:20:19Z Jon Harald Søby 58 1 semakan diimportkan 607 wikitext text/x-wiki {{Sister project | position = {{{position|}}} | project = data | text = This {{module other|module|template}} uses {{#if:{{{section|}}} | one or more [[Wikidata]] properties; see {{Section link||{{{section}}}}} for details. | the [[Wikidata]] propert{{#if:{{{2|}}}|ies|y}}: {{#invoke:Uses Wikidata|usesProperty}} }}}}<includeonly>{{#switch:{{SUBPAGENAME}} |sandbox |testcases |doc= <!--no category--> |#default={{module other |[[Kategori:Modules using data from Wikidata]] |{{template other |[[Kategori:Templates using data from Wikidata]]}} }} }}</includeonly><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage --> </noinclude> f07xzbj55pg22rbp0f0xpk6z73sju7h Templat:Webarchive 10 252 794 611 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 609 wikitext text/x-wiki <includeonly>{{#invoke:Webarchive|webarchive}}</includeonly><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 2f8v1vjtb03b4wanrhoy23hvte9i183 Templat:Wikidata image 10 253 613 612 2024-08-09T09:20:19Z Jon Harald Søby 58 1 semakan diimportkan 612 wikitext text/x-wiki {{#if:{{NAMESPACE}}|| {{#if:{{{1|}}} | {{#if:{{#property:P18}} | {{#ifeq:{{filepath:{{{1|}}} }}|{{filepath:{{#property:P18}} }} | | }} | {{#if:{{#property:P41}}{{#property:P94}}{{#property:P117}}{{#property:P154}}{{#property:P242}} | | }} }} | {{#if:{{#property:P18}} | {{#if:{{{2|}}} | | [[Kategori:No local image but image on Wikidata]] }} | }} }} }}<noinclude> {{doc}} </noinclude> 9ojd4wawmocsodlaxg3d13mr3i5qy0t Templat:Wrap 10 254 616 615 2024-08-09T09:20:19Z Jon Harald Søby 58 2 semakan diimportkan 615 wikitext text/x-wiki <includeonly><span class="wrap">{{{1|&#32;}}}</span></includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> {{INTERWIKI|Q6237739}} </noinclude> ttvl6o5kx6c73y31jo1upl0xyjileic Templat:YEAR 10 255 618 617 2024-08-09T09:20:20Z Jon Harald Søby 58 1 semakan diimportkan 617 wikitext text/x-wiki <includeonly>{{#if: {{{1|}}} |{{#iferror:{{#time:Y|1 January {{{1|}}} }} |{{#iferror:{{#time:Y|{{{1|}}} }} |{{#ifeq:{{{2|}}}|{{{2}}}|error|{{error|Error}}}} |{{#time:Y|{{{1|}}} }} }} |{{#time:Y|1 January {{{1|}}} }} }} |{{CURRENTYEAR}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 6pkr8ifd4do88keroffs6jc441jh1za Templat:Yesno 10 256 797 620 2024-08-09T09:21:26Z Jon Harald Søby 58 2 semakan diimportkan 619 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> bioaq6x8oitfnx7oqmfhviol4hbp1nd Templat:Yesno-no 10 257 799 623 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 621 wikitext text/x-wiki {{safesubst:<noinclude />Yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 43119q6prqyz87j6xm42efn4di4x274 Templat:Edit taxonomy 10 258 674 673 2024-08-09T09:21:21Z Jon Harald Søby 58 1 semakan diimportkan 673 wikitext text/x-wiki <includeonly><span class='plainlinks' style='font-size:smaller; float:right; padding-right:0.4em; margin-left:-3em;'>[[Fail:OOjs UI icon edit-ltr.svg|15px|link=Template:Taxonomy/{{{1}}}|Edit this classification]]</span></includeonly><noinclude>{{documentation}}</noinclude> eqdmhluaigrryciz7bcx6g9ekyzld38 Templat:Nbsp 10 259 733 732 2024-08-09T09:21:23Z Jon Harald Søby 58 1 semakan diimportkan 732 wikitext text/x-wiki #REDIRECT [[Templat:Spaces]] husw7zyriv80av0vomr8fw7syddub7h Templat:Script/Arabic 10 260 761 760 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 760 wikitext text/x-wiki {{{{{|safesubst:}}}ifsubst|1=|2=<templatestyles src="Script/styles_arabic.css" />}}<span class="script-arabic script-Arab" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||dir="rtl"}} style="font-size: {{{size|125%}}}; {{{style|}}}" {{{attributes|}}}>{{{1}}}</span>{{#ifeq: {{{no_rtl_mark|+}}} | {{{no_rtl_mark|-}}}||&lrm;}}<noinclude>{{documentation}}</noinclude> 6tcygykkf1rmqkm53k9jhb1p2862872 Templat:Tlc 10 261 781 780 2024-08-09T09:21:25Z Jon Harald Søby 58 1 semakan diimportkan 780 wikitext text/x-wiki #REDIRECT [[Templat:Template link code]] 9jlo35krzqmlv8cneiqv9arwmty0a1o Templat:Tlg/doc 10 262 783 782 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 782 wikitext text/x-wiki #REDIRECT [[Templat:Template link general/doc]] oej57953bwt53dx69i68rgwsz1iwhd8 Modul:Age 828 263 4768 801 2024-08-19T17:04:15Z Rombituon 59 4768 Scribunto text/plain -- Implement various "age of" and other date-related templates. local mtext = { -- Message and other text that should be localized. -- Also need to localize text in table names in function dateDifference. ['mt-bad-param1'] = 'Invalid parameter $1', ['mt-bad-param2'] = 'Parameter $1=$2 is invalid', ['mt-bad-show'] = 'Parameter show=$1 is not supported here', ['mt-cannot-add'] = 'Cannot add "$1"', ['mt-conflicting-show'] = 'Parameter show=$1 conflicts with round=$2', ['mt-date-wrong-order'] = 'The second date must be later in time than the first date', ['mt-dd-future'] = 'Death date (first date) must not be in the future', ['mt-dd-wrong-order'] = 'Death date (first date) must be later in time than the birth date (second date)', ['mt-invalid-bd-age'] = 'Invalid birth date for calculating age', ['mt-invalid-dates-age'] = 'Invalid dates for calculating age', ['mt-invalid-end'] = 'Invalid end date in second parameter', ['mt-invalid-start'] = 'Invalid start date in first parameter', ['mt-need-jdn'] = 'Need valid Julian date number', ['mt-need-valid-bd'] = 'Need valid birth date: year, month, day', ['mt-need-valid-bd2'] = 'Need valid birth date (second date): year, month, day', ['mt-need-valid-date'] = 'Need valid date', ['mt-need-valid-dd'] = 'Need valid death date (first date): year, month, day', ['mt-need-valid-ymd'] = 'Need valid year, month, day', ['mt-need-valid-ymd-current'] = 'Need valid year|month|day or "currentdate"', ['mt-need-valid-ymd2'] = 'Second date should be year, month, day', ['mt-template-bad-name'] = 'The specified template name is not valid', ['mt-template-x'] = 'The template invoking this must have "|template=x" where x is the wanted operation', ['txt-and'] = ' and ', ['txt-or'] = '&nbsp;or ', ['txt-category'] = 'Category:Age error', ['txt-comma-and'] = ', and ', ['txt-error'] = 'Error: ', ['txt-format-default'] = 'mf', -- 'df' (day first = dmy) or 'mf' (month first = mdy) ['txt-module-convertnumeric'] = 'Module:ConvertNumeric', ['txt-module-date'] = 'Module:Date', ['txt-sandbox'] = 'sandbox', ['txt-bda'] = '<span style="display:none"> (<span class="bday">$1</span>) </span>$2<span class="noprint ForceAgeToShow"> (age&nbsp;$3)</span>', ['txt-dda'] = '$2<span style="display:none">($1)</span> (aged&nbsp;$3)', ['txt-bda-disp'] = 'disp_raw', -- disp_raw → age is a number only; disp_age → age is a number and unit (normally years but months or days if very young) ['txt-dda-disp'] = 'disp_raw', ['txt-dmy'] = '%-d %B %-Y', ['txt-mdy'] = '%B %-d, %-Y', } local isWarning = { ['mt-bad-param1'] = true, } local translate, from_en, to_en, isZero if translate then -- Functions to translate from en to local language and reverse go here. -- See example at [[:bn:Module:বয়স]]. else from_en = function (text) return text end isZero = function (text) return tonumber(text) == 0 end end local _Date, _currentDate local function getExports(frame) -- Return objects exported from the date module or its sandbox. if not _Date then local sandbox = frame:getTitle():find(mtext['txt-sandbox'], 1, true) and ('/' .. mtext['txt-sandbox']) or '' local datemod = require(mtext['txt-module-date'] .. sandbox) local realDate = datemod._Date _currentDate = datemod._current if to_en then _Date = function (...) local args = {} for i, v in ipairs({...}) do args[i] = to_en(v) end return realDate(unpack(args)) end else _Date = realDate end end return _Date, _currentDate end local Collection -- a table to hold items Collection = { add = function (self, item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end, join = function (self, sep) return table.concat(self, sep) end, remove = function (self, pos) if self.n > 0 and (pos == nil or (0 < pos and pos <= self.n)) then self.n = self.n - 1 return table.remove(self, pos) end end, sort = function (self, comp) table.sort(self, comp) end, new = function () return setmetatable({n = 0}, Collection) end } Collection.__index = Collection local function stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function dateFormat(args) -- Return string for wanted date format. local default = mtext['txt-format-default'] local other = default == 'df' and 'mf' or 'df' local wanted = stripToNil(args[other]) and other or default return wanted == 'df' and mtext['txt-dmy'] or mtext['txt-mdy'] end local function substituteParameters(text, ...) -- Return text after substituting any given parameters for $1, $2, etc. return mw.message.newRawMessage(text, ...):plain() end local function yes(parameter) -- Return true if parameter should be interpreted as "yes". -- Do not want to accept mixed upper/lowercase unless done by current templates. -- Need to accept "on" because "round=on" is wanted. return ({ y = true, yes = true, on = true })[parameter] end local function message(msg, ...) -- Return formatted message text for an error or warning. local function getText(msg) return mtext[msg] or error('Bug: message "' .. tostring(msg) .. '" not defined') end local categories = { error = mtext['txt-category'], warning = mtext['txt-category'], } local a, b, k, category local text = substituteParameters(getText(msg), ...) if isWarning[msg] then a = '<sup>[<i>' b = '</i>]</sup>' k = 'warning' else a = '<strong class="error">' .. getText('txt-error') b = '</strong>' k = 'error' end if mw.title.getCurrentTitle():inNamespaces(0) then -- Category only in namespaces: 0=article. category = '[[' .. categories[k] .. ']]' end return a .. mw.text.nowiki(text) .. b .. (category or '') end local function formatNumber(number) -- Return the given number formatted with commas as group separators, -- given that the number is an integer. local numstr = tostring(number) local length = #numstr local places = Collection.new() local pos = 0 repeat places:add(pos) pos = pos + 3 until pos >= length places:add(length) local groups = Collection.new() for i = places.n, 2, -1 do local p1 = length - places[i] + 1 local p2 = length - places[i - 1] groups:add(numstr:sub(p1, p2)) end return groups:join(',') end local function spellNumber(number, options, i) -- Return result of spelling number, or -- return number (as a string) if cannot spell it. -- i == 1 for the first number which can optionally start with an uppercase letter. number = tostring(number) return require(mtext['txt-module-convertnumeric']).spell_number( number, nil, -- fraction numerator nil, -- fraction denominator i == 1 and options.upper, -- true: 'One' instead of 'one' not options.us, -- true: use 'and' between tens/ones etc options.adj, -- true: hyphenated options.ordinal -- true: 'first' instead of 'one' ) or number end local function makeExtra(args, flagCurrent) -- Return extra text that will be inserted before the visible result -- but after any sort key. local extra = args.prefix or '' if mw.ustring.len(extra) > 1 then -- Parameter "~" gives "~3" whereas "over" gives "over 3". if extra:sub(-6, -1) ~= '&nbsp;' then extra = extra .. ' ' end end if flagCurrent then extra = '<span class="currentage"></span>' .. extra end return extra end local function makeSort(value, sortable) -- Return a sort key if requested. -- Assume value is a valid number which has not overflowed. if sortable == 'sortable_table' or sortable == 'sortable_on' or sortable == 'sortable_debug' then local sortKey if value == 0 then sortKey = '5000000000000000000' else local mag = math.floor(math.log10(math.abs(value)) + 1e-14) if value > 0 then sortKey = 7000 + mag else sortKey = 2999 - mag value = value + 10^(mag+1) end sortKey = string.format('%d', sortKey) .. string.format('%015.0f', math.floor(value * 10^(14-mag))) end local result if sortable == 'sortable_table' then result = 'data-sort-value="_SORTKEY_"|' elseif sortable == 'sortable_debug' then result = '<span data-sort-value="_SORTKEY_♠"><span style="border:1px solid">_SORTKEY_♠</span></span>' else result = '<span data-sort-value="_SORTKEY_♠"></span>' end return (result:gsub('_SORTKEY_', sortKey)) end end local translateParameters = { abbr = { off = 'abbr_off', on = 'abbr_on', }, disp = { age = 'disp_age', raw = 'disp_raw', }, format = { raw = 'format_raw', commas = 'format_commas', }, round = { on = 'on', yes = 'on', months = 'ym', weeks = 'ymw', days = 'ymd', hours = 'ymdh', }, sep = { comma = 'sep_comma', [','] = 'sep_comma', serialcomma = 'sep_serialcomma', space = 'sep_space', }, show = { hide = { id = 'hide' }, y = { 'y', id = 'y' }, ym = { 'y', 'm', id = 'ym' }, ymd = { 'y', 'm', 'd', id = 'ymd' }, ymw = { 'y', 'm', 'w', id = 'ymw' }, ymwd = { 'y', 'm', 'w', 'd', id = 'ymwd' }, yd = { 'y', 'd', id = 'yd', keepZero = true }, m = { 'm', id = 'm' }, md = { 'm', 'd', id = 'md' }, w = { 'w', id = 'w' }, wd = { 'w', 'd', id = 'wd' }, h = { 'H', id = 'h' }, hm = { 'H', 'M', id = 'hm' }, hms = { 'H', 'M', 'S', id = 'hms' }, M = { 'M', id = 'M' }, s = { 'S', id = 's' }, d = { 'd', id = 'd' }, dh = { 'd', 'H', id = 'dh' }, dhm = { 'd', 'H', 'M', id = 'dhm' }, dhms = { 'd', 'H', 'M', 'S', id = 'dhms' }, ymdh = { 'y', 'm', 'd', 'H', id = 'ymdh' }, ymdhm = { 'y', 'm', 'd', 'H', 'M', id = 'ymdhm' }, ymwdh = { 'y', 'm', 'w', 'd', 'H', id = 'ymwdh' }, ymwdhm = { 'y', 'm', 'w', 'd', 'H', 'M', id = 'ymwdhm' }, }, sortable = { off = false, on = 'sortable_on', table = 'sortable_table', debug = 'sortable_debug', }, } local spellOptions = { cardinal = {}, Cardinal = { upper = true }, cardinal_us = { us = true }, Cardinal_us = { us = true, upper = true }, ordinal = { ordinal = true }, Ordinal = { ordinal = true, upper = true }, ordinal_us = { ordinal = true, us = true }, Ordinal_us = { ordinal = true, us = true, upper = true }, } local function dateExtract(frame) -- Return part of a date after performing an optional operation. local Date = getExports(frame) local args = frame:getParent().args local parms = {} for i, v in ipairs(args) do parms[i] = v end if yes(args.fix) then table.insert(parms, 'fix') end if yes(args.partial) then table.insert(parms, 'partial') end local show = stripToNil(args.show) or 'dmy' local date = Date(unpack(parms)) if not date then if show == 'format' then return 'error' end return message('mt-need-valid-date') end local add = stripToNil(args.add) if add then for item in add:gmatch('%S+') do date = date + item if not date then return message('mt-cannot-add', item) end end end local sortKey, result local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date.partial and date.partial.first or date).jdz sortKey = makeSort(value, sortable) end if show ~= 'hide' then result = date[show] if result == nil then result = from_en(date:text(show)) elseif type(result) == 'boolean' then result = result and '1' or '0' else result = from_en(tostring(result)) end end return (sortKey or '') .. makeExtra(args) .. (result or '') end local function rangeJoin(range) -- Return text to be used between a range of ages. return range == 'dash' and '–' or mtext['txt-or'] end local function makeText(values, components, names, options, noUpper) -- Return wikitext representing an age or duration. local text = Collection.new() local count = #values local sep = names.sep or '' for i, v in ipairs(values) do -- v is a number (say 4 for 4 years), or a table ({4,5} for 4 or 5 years). local islist = type(v) == 'table' if (islist or v > 0) or (text.n == 0 and i == count) or (text.n > 0 and components.keepZero) then local fmt, vstr if options.spell then fmt = function(number) return spellNumber(number, options.spell, noUpper or i) end elseif i == 1 and options.format == 'format_commas' then -- Numbers after the first should be small and not need formatting. fmt = formatNumber else fmt = tostring end if islist then vstr = fmt(v[1]) .. rangeJoin(options.range) noUpper = true vstr = vstr .. fmt(v[2]) else vstr = fmt(v) end local name = names[components[i]] if name then if type(name) == 'table' then name = mw.getContentLanguage():plural(islist and v[2] or v, name) end text:add(vstr .. sep .. name) else text:add(vstr) end end end local first, last if options.join == 'sep_space' then first = ' ' last = ' ' elseif options.join == 'sep_comma' then first = ', ' last = ', ' elseif options.join == 'sep_serialcomma' and text.n > 2 then first = ', ' last = mtext['txt-comma-and'] else first = ', ' last = mtext['txt-and'] end for i, v in ipairs(text) do if i < text.n then text[i] = v .. (i + 1 < text.n and first or last) end end local sign = '' if options.isnegative then -- Do not display negative zero. if text.n > 1 or (text.n == 1 and text[1]:sub(1, 1) ~= '0' ) then if options.format == 'format_raw' then sign = '-' -- plain hyphen so result can be used in a calculation else sign = '−' -- Unicode U+2212 MINUS SIGN end end end return (options.sortKey or '') .. (options.extra or '') .. sign .. text:join() .. (options.suffix or '') end local function dateDifference(parms) -- Return a formatted date difference using the given parameters -- which have been validated. local names = { -- Each name is: -- * a string if no plural form of the name is used; or -- * a table of strings, one of which is selected using the rules at -- https://translatewiki.net/wiki/Plural/Mediawiki_plural_rules abbr_off = { sep = '&nbsp;', y = {'year', 'years'}, m = {'month', 'months'}, w = {'week', 'weeks'}, d = {'day', 'days'}, H = {'hour', 'hours'}, M = {'minute', 'minutes'}, S = {'second', 'seconds'}, }, abbr_on = { y = 'y', m = 'm', w = 'w', d = 'd', H = 'h', M = 'm', S = 's', }, abbr_infant = { -- for {{age for infant}} sep = '&nbsp;', y = {'yr', 'yrs'}, m = {'mo', 'mos'}, w = {'wk', 'wks'}, d = {'day', 'days'}, H = {'hr', 'hrs'}, M = {'min', 'mins'}, S = {'sec', 'secs'}, }, abbr_raw = {}, } local diff = parms.diff -- must be a valid date difference local show = parms.show -- may be nil; default is set below local abbr = parms.abbr or 'abbr_off' local defaultJoin if abbr ~= 'abbr_off' then defaultJoin = 'sep_space' end if not show then show = 'ymd' if parms.disp == 'disp_age' then if diff.years < 3 then defaultJoin = 'sep_space' if diff.years >= 1 then show = 'ym' else show = 'md' end else show = 'y' end end end if type(show) ~= 'table' then show = translateParameters.show[show] end if parms.disp == 'disp_raw' then defaultJoin = 'sep_space' abbr = 'abbr_raw' elseif parms.wantSc then defaultJoin = 'sep_serialcomma' end local diffOptions = { round = parms.round, duration = parms.wantDuration, range = parms.range and true or nil, } local sortKey if parms.sortable then local value = diff.age_days + (parms.wantDuration and 1 or 0) -- days and fraction of a day if diff.isnegative then value = -value end sortKey = makeSort(value, parms.sortable) end local textOptions = { extra = parms.extra, format = parms.format, join = parms.sep or defaultJoin, isnegative = diff.isnegative, range = parms.range, sortKey = sortKey, spell = parms.spell, suffix = parms.suffix, -- not currently used } if show.id == 'hide' then return sortKey or '' end local values = { diff:age(show.id, diffOptions) } if values[1] then return makeText(values, show, names[abbr], textOptions) end if diff.partial then -- Handle a more complex range such as -- {{age_yd|20 Dec 2001|2003|range=yes}} → 1 year, 12 days or 2 years, 11 days local opt = { format = textOptions.format, join = textOptions.join, isnegative = textOptions.isnegative, spell = textOptions.spell, } return (textOptions.sortKey or '') .. makeText({ diff.partial.mindiff:age(show.id, diffOptions) }, show, names[abbr], opt) .. rangeJoin(textOptions.range) .. makeText({ diff.partial.maxdiff:age(show.id, diffOptions) }, show, names[abbr], opt, true) .. (textOptions.suffix or '') end return message('mt-bad-show', show.id) end local function getDates(frame, getopt) -- Parse template parameters and return one of: -- * date (a date table, if single) -- * date1, date2 (two date tables, if not single) -- * text (a string error message) -- A missing date is optionally replaced with the current date. -- If wantMixture is true, a missing date component is replaced -- from the current date, so can get a bizarre mixture of -- specified/current y/m/d as has been done by some "age" templates. -- Some results may be placed in table getopt. local Date, currentDate = getExports(frame) getopt = getopt or {} local function flagCurrent(text) -- This allows the calling template to detect if the current date has been used, -- that is, whether both dates have been entered in a template expecting two. -- For example, an infobox may want the age when an event occurred, not the current age. -- Don't bother detecting if wantMixture is used because not needed and it is a poor option. if not text then if getopt.noMissing then return nil -- this gives a nil date which gives an error end text = 'currentdate' if getopt.flag == 'usesCurrent' then getopt.usesCurrent = true end end return text end local args = frame:getParent().args local fields = {} local isNamed = args.year or args.year1 or args.year2 or args.month or args.month1 or args.month2 or args.day or args.day1 or args.day2 if isNamed then fields[1] = args.year1 or args.year fields[2] = args.month1 or args.month fields[3] = args.day1 or args.day fields[4] = args.year2 fields[5] = args.month2 fields[6] = args.day2 else for i = 1, 6 do fields[i] = args[i] end end local imax = 0 for i = 1, 6 do fields[i] = stripToNil(fields[i]) if fields[i] then imax = i end if getopt.omitZero and i % 3 ~= 1 then -- omit zero months and days as unknown values but keep year 0 which is 1 BCE if isZero(fields[i]) then fields[i] = nil getopt.partial = true end end end local fix = getopt.fix and 'fix' or '' local partialText = getopt.partial and 'partial' or '' local dates = {} if isNamed or imax >= 3 then local nrDates = getopt.single and 1 or 2 if getopt.wantMixture then -- Cannot be partial since empty fields are set from current. local components = { 'year', 'month', 'day' } for i = 1, nrDates * 3 do fields[i] = fields[i] or currentDate[components[i > 3 and i - 3 or i]] end for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (m == 2 or m == '2') and (d == 29 or d == '29') then -- Workaround error with following which attempt to use invalid date 2001-02-29. -- {{age_ymwd|year1=2001|year2=2004|month2=2|day2=29}} -- {{age_ymwd|year1=2001|month1=2|year2=2004|month2=1|day2=29}} -- TODO Get rid of wantMixture because even this ugly code does not handle -- 'Feb' or 'February' or 'feb' or 'february'. if not ((y % 4 == 0 and y % 100 ~= 0) or y % 400 == 0) then d = 28 end end dates[i] = Date(y, m, d) end else -- If partial dates are allowed, accept -- year only, or -- year and month only -- Do not accept year and day without a month because that makes no sense -- (and because, for example, Date('partial', 2001, nil, 12) sets day = nil, not 12). for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (getopt.partial and y and (m or not d)) or (y and m and d) then dates[i] = Date(fix, partialText, y, m, d) elseif not y and not m and not d then dates[i] = Date(flagCurrent()) end end end else getopt.textdates = true -- have parsed each date from a single text field dates[1] = Date(fix, partialText, flagCurrent(fields[1])) if not getopt.single then dates[2] = Date(fix, partialText, flagCurrent(fields[2])) end end if not dates[1] then return message(getopt.missing1 or 'mt-need-valid-ymd') end if getopt.single then return dates[1] end if not dates[2] then return message(getopt.missing2 or 'mt-need-valid-ymd2') end return dates[1], dates[2] end local function ageGeneric(frame) -- Return the result required by the specified template. -- Can use sortable=x where x = on/table/off/debug in any supported template. -- Some templates default to sortable=on but can be overridden. local name = frame.args.template if not name then return message('mt-template-x') end local args = frame:getParent().args local specs = { age_days = { -- {{age in days}} show = 'd', disp = 'disp_raw', }, age_days_nts = { -- {{age in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', }, duration_days = { -- {{duration in days}} show = 'd', disp = 'disp_raw', duration = true, }, duration_days_nts = { -- {{duration in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', duration = true, }, age_full_years = { -- {{age}} show = 'y', abbr = 'abbr_raw', flag = 'usesCurrent', omitZero = true, range = 'dash', }, age_full_years_nts = { -- {{age nts}} show = 'y', abbr = 'abbr_raw', format = 'format_commas', sortable = 'on', }, age_in_years = { -- {{age in years}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', }, age_in_years_nts = { -- {{age in years nts}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', format = 'format_commas', sortable = 'on', }, age_infant = { -- {{age for infant}} -- Do not set show because special processing is done later. abbr = yes(args.abbr) and 'abbr_infant' or 'abbr_off', disp = 'disp_age', sep = 'sep_space', sortable = 'on', }, age_m = { -- {{age in months}} show = 'm', disp = 'disp_raw', }, age_w = { -- {{age in weeks}} show = 'w', disp = 'disp_raw', }, age_wd = { -- {{age in weeks and days}} show = 'wd', }, age_yd = { -- {{age in years and days}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, }, age_yd_nts = { -- {{age in years and days nts}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, sortable = 'on', }, age_ym = { -- {{age in years and months}} show = 'ym', sep = 'sep_comma', }, age_ymd = { -- {{age in years, months and days}} show = 'ymd', range = true, }, age_ymwd = { -- {{age in years, months, weeks and days}} show = 'ymwd', wantMixture = true, }, } local spec = specs[name] if not spec then return message('mt-template-bad-name') end if name == 'age_days' then local su = stripToNil(args['show unit']) if su then if su == 'abbr' or su == 'full' then spec.disp = nil spec.abbr = su == 'abbr' and 'abbr_on' or nil end end end local partial, autofill local range = stripToNil(args.range) or spec.range if range then -- Suppose partial dates are used and age could be 11 or 12 years. -- "|range=" (empty value) has no effect (spec is used). -- "|range=yes" or spec.range == true sets range = true (gives "11 or 12") -- "|range=dash" or spec.range == 'dash' sets range = 'dash' (gives "11–12"). -- "|range=no" or spec.range == 'no' sets range = nil and fills each date in the diff (gives "12"). -- ("on" is equivalent to "yes", and "off" is equivalent to "no"). -- "|range=OTHER" sets range = nil and rejects partial dates. range = ({ dash = 'dash', off = 'no', no = 'no', [true] = true })[range] or yes(range) if range then partial = true -- accept partial dates with a possible age range for the result if range == 'no' then autofill = true -- missing month/day in first or second date are filled from other date or 1 range = nil end end end local getopt = { fix = yes(args.fix), flag = stripToNil(args.flag) or spec.flag, omitZero = spec.omitZero, partial = partial, wantMixture = spec.wantMixture, } local date1, date2 = getDates(frame, getopt) if type(date1) == 'string' then return date1 end local format = stripToNil(args.format) local spell = spellOptions[format] if format then format = 'format_' .. format elseif name == 'age_days' and getopt.textdates then format = 'format_commas' end local parms = { diff = date2:subtract(date1, { fill = autofill }), wantDuration = spec.duration or yes(args.duration), range = range, wantSc = yes(args.sc), show = args.show == 'hide' and 'hide' or spec.show, abbr = spec.abbr, disp = spec.disp, extra = makeExtra(args, getopt.usesCurrent and format ~= 'format_raw'), format = format or spec.format, round = yes(args.round), sep = spec.sep, sortable = translateParameters.sortable[args.sortable or spec.sortable], spell = spell, } if (spec.negative or frame.args.negative) == 'error' and parms.diff.isnegative then return message('mt-date-wrong-order') end return from_en(dateDifference(parms)) end local function isFake(args) -- Some templates have TemplateData with an auto value like "{{Birth date and age|YYYY|MM|DD}}". -- Return true if that appears to be the case so the caller can output nothing rather than an error. return args[1] == 'YYYY' end local function bda(frame) -- Implement [[Template:Birth date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-bd', noMissing = true, single = true, } local date = getDates(frame, options) if type(date) == 'string' then return date -- error text end local Date = getExports(frame) local diff = Date('currentdate') - date if diff.isnegative or diff.years > 150 then return message('mt-invalid-bd-age') end local disp = mtext['txt-bda-disp'] local show = 'y' if diff.years < 2 then disp = 'disp_age' if diff.years == 0 and diff.months == 0 then show = 'd' else show = 'm' end end local result = substituteParameters( mtext['txt-bda'], date:text('%-Y-%m-%d'), from_en(date:text(dateFormat(args))), from_en(dateDifference({ diff = diff, show = show, abbr = 'abbr_off', disp = disp, sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, day = true, day1 = true, month = true, month1 = true, year = true, year1 = true, } local invalid local imax = options.textdates and 1 or 3 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dda(frame) -- Implement [[Template:Death date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-dd', missing2 = 'mt-need-valid-bd2', noMissing = true, partial = true, } local date1, date2 = getDates(frame, options) if type(date1) == 'string' then return date1 end local diff = date1 - date2 if diff.isnegative then return message('mt-dd-wrong-order') end local Date = getExports(frame) local today = Date('currentdate') + 1 -- one day in future allows for timezones if date1 > today then return message('mt-dd-future') end local years if diff.partial then years = diff.partial.years years = type(years) == 'table' and years[2] or years else years = diff.years end if years > 150 then return message('mt-invalid-dates-age') end local fmt_date, fmt_ymd if date1.day then -- y, m, d known fmt_date = dateFormat(args) fmt_ymd = '%-Y-%m-%d' elseif date1.month then -- y, m known; d unknown fmt_date = '%B %-Y' fmt_ymd = '%-Y-%m-00' else -- y known; m, d unknown fmt_date = '%-Y' fmt_ymd = '%-Y-00-00' end local sortKey local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date1.partial and date1.partial.first or date1).jdz sortKey = makeSort(value, sortable) end local result = (sortKey or '') .. substituteParameters( mtext['txt-dda'], date1:text(fmt_ymd), from_en(date1:text(fmt_date)), from_en(dateDifference({ diff = diff, show = 'y', abbr = 'abbr_off', disp = mtext['txt-dda-disp'], range = 'dash', sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, } local invalid local imax = options.textdates and 2 or 6 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dateToGsd(frame) -- Implement [[Template:Gregorian serial date]]. -- Return Gregorian serial date of the given date, or the current date. -- The returned value is negative for dates before 1 January 1 AD -- despite the fact that GSD is not defined for such dates. local date = getDates(frame, { wantMixture=true, single=true }) if type(date) == 'string' then return date end return tostring(date.gsd) end local function jdToDate(frame) -- Return formatted date from a Julian date. -- The result includes a time if the input includes a fraction. -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date('juliandate', args[1], args[2]) if date then return from_en(date:text()) end return message('mt-need-jdn') end local function dateToJd(frame) -- Return Julian date (a number) from a date which may include a time, -- or the current date ('currentdate') or current date and time ('currentdatetime'). -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date(args[1], args[2], args[3], args[4], args[5], args[6], args[7]) if date then return tostring(date.jd) end return message('mt-need-valid-ymd-current') end local function timeInterval(frame) -- Implement [[Template:Time interval]]. -- There are two positional arguments: date1, date2. -- The default for each is the current date and time. -- Result is date2 - date1 formatted. local Date = getExports(frame) local args = frame:getParent().args local parms = { extra = makeExtra(args), wantDuration = yes(args.duration), range = yes(args.range) or (args.range == 'dash' and 'dash' or nil), wantSc = yes(args.sc), } local fix = yes(args.fix) and 'fix' or '' local date1 = Date(fix, 'partial', stripToNil(args[1]) or 'currentdatetime') if not date1 then return message('mt-invalid-start') end local date2 = Date(fix, 'partial', stripToNil(args[2]) or 'currentdatetime') if not date2 then return message('mt-invalid-end') end parms.diff = date2 - date1 for argname, translate in pairs(translateParameters) do local parm = stripToNil(args[argname]) if parm then parm = translate[parm] if parm == nil then -- test for nil because false is a valid setting return message('mt-bad-param2', argname, args[argname]) end parms[argname] = parm end end if parms.round then local round = parms.round local show = parms.show if round ~= 'on' then if show then if show.id ~= round then return message('mt-conflicting-show', args.show, args.round) end else parms.show = translateParameters.show[round] end end parms.round = true end return from_en(dateDifference(parms)) end return { age_generic = ageGeneric, -- can emulate several age templates birth_date_and_age = bda, -- Template:Birth_date_and_age death_date_and_age = dda, -- Template:Death_date_and_age gsd = dateToGsd, -- Template:Gregorian_serial_date extract = dateExtract, -- Template:Extract jd_to_date = jdToDate, -- Template:? JULIANDAY = dateToJd, -- Template:JULIANDAY time_interval = timeInterval, -- Template:Time_interval } cowcf3ae34swh602y8alyi7cux4w0rk Modul:Arguments 828 264 803 802 2024-08-09T09:21:26Z Jon Harald Søby 58 1 semakan diimportkan 802 Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 5qx9tzlul9ser30uxj9nbasjt92cevn Modul:Automated taxobox 828 265 805 804 2024-08-09T09:21:27Z Jon Harald Søby 58 1 semakan diimportkan 804 Scribunto text/plain require('strict') local TaxonItalics = require('Module:TaxonItalics') local Autotaxobox = require('Module:Autotaxobox') local ItalicTitle = require('Module:Italic title') local p = {} -- functions made public local l = {} -- nonpublic internal functions and variables global to the module l.system = '' -- '' for normal scientific classification (default) -- 'ichnos' for trace fossil classification -- 'veterovata' for egg fossil classification -- ============================================================================= -- ichnobox implements Template:Ichnobox; see the documentation of that -- template for details. -- The only difference from Template:Automatic taxobox is in the taxobox colour -- and classification link and the parameters for type species and genera. -- ============================================================================= function p.ichnobox(frame) l.system = 'ichnos' return p.automaticTaxobox(frame) end -- ============================================================================= -- oobox implements Template:Oobox; see the documentation of that -- template for details. -- The only difference from Template:Automatic taxobox is in the taxobox colour -- and classification link and the parameters for type species and genera. -- ============================================================================= function p.oobox(frame) l.system = 'veterovata' return p.automaticTaxobox(frame) end -- ============================================================================= -- automaticTaxobox implements Template:Automatic taxobox; see the documentation -- of that template for details. -- It also implements Template:Ichnobox and Template:Oobox. The small -- differences are signalled by the module-wide variable l.system. -- The following parameters present in the old template code version of -- Template:Automatic taxobox were not used and have not been implemented: -- image_caption_align -- image2_caption_align -- binomial2 -- binomial2_authority -- binomial3 -- binomial3_authority -- binomial4 -- binomial4_authority -- ============================================================================= function p.automaticTaxobox(frame) local args if frame.args['direct'] == 'yes' then args = frame.args else args = frame:getParent().args end local res = '' -- --------------------------------------------------------------------- -- pick up taxobox parameters from the caller that need to be processed; -- most will be passed on unchanged -- --------------------------------------------------------------------- local pagename = args['pagename'] or '' -- for testing and debugging only local italicTitle = args['italic_title'] or args['italic title'] or '' local ichnos = '' if l.system == 'ichnos' then ichnos = 'true' end local veterovata = '' if l.system == 'veterovata' then veterovata = 'true' end local fossilRange = args['fossil_range'] or args['fossil range'] or args['temporal_range'] or args['temporal range'] or '' local oldestFossil = args['oldest_fossil'] or args['oldest fossil'] or '' local youngestFossil = args['youngest_fossil'] or args['youngest fossil'] or '' local name = args['name'] or '' local colourAs = args['color_as'] or args['color as'] or args['colour_as'] or args['colour as'] or '' local taxon = args['taxon'] or '' local authority = args['authority'] or '' local parentAuthority = args['parent_authority'] or args['parent authority'] or '' local subdivision = args['subdivision'] or '' local subdivisionRef = args['subdivision_ref'] or args['subdivision ref'] or '' local subdivisionRanks = args['subdivision_ranks'] or args['subdivision ranks'] or '' local manualFlag = 'text' -- marks manually specified ranks local binomial = args['binomial'] or args['binomial_'..manualFlag] or args['binomial '..manualFlag] or '' local binomialAuthority = args['binomial_authority'] or args['binomial authority'] or '' local genusManual = args['genus_'..manualFlag] or args['genus '..manualFlag] or'' local speciesManual = args['species_'..manualFlag] or args['species '..manualFlag] or'' -- ------------------------------------------------------ -- set the taxobox parameters determined by this function -- ------------------------------------------------------ fossilRange = l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil) -- use the base page name as the taxon if the taxon parameter is missing local currentPagename = mw.title.getCurrentTitle() if pagename == '' then pagename = currentPagename.text end -- pagename para only used in testing and local basePagename = pagename if italicTitle ~= 'taxon' then basePagename = mw.ustring.gsub(basePagename, '%s+%b()$', '', 1) end local taxonParaMissingError = false if taxon == '' then taxonParaMissingError = true taxon = basePagename end -- decide if the page name and taxobox name need to be italicized; -- if italic_title is not set, then if the names are the taxon, use its rank to decide local ok, taxonRank = Autotaxobox.getTaxonInfoItem(frame, taxon, 'rank') -- taxonRank needed later if not here if italicTitle == '' then if not (ok and taxonRank ~= '' and frame:expandTemplate{ title = 'Is italic taxon', args = {taxonRank} } == 'yes') then italicTitle = 'no' end end -- remove any " (DISAMBIG)" or "/MODIFIER" from the taxon's name; -- if the base page name is the same as the base taxon name, then italicization can be applied local baseTaxon = taxon if italicTitle ~= 'taxon' then baseTaxon = mw.ustring.gsub(baseTaxon, '%s+%b()$', '', 1) end baseTaxon = mw.ustring.gsub(baseTaxon, '/.*$', '', 1) if italicTitle == '' and basePagename == baseTaxon then italicTitle = 'yes' end -- italicize the page name (page title) if required if currentPagename.namespace == 0 and (italicTitle == 'yes' or italicTitle == 'taxon') then if italicTitle == 'taxon' or TaxonItalics.hasConnectingTerm(baseTaxon) then res = res .. frame:expandTemplate{ title = 'Italic taxon title', args = {} } italicTitle = 'yes' else ItalicTitle._main({}) end end -- set the taxobox name if not supplied, italicizing it if appropriate. if name == '' then name = basePagename if italicTitle == 'yes' then name = TaxonItalics.italicizeTaxonName(name, false, false) end -- name = name .. '/' .. baseTaxon .. '/' .. nameRank end -- determine taxobox colour local colour = '' if colourAs ~= '' then colour = frame:expandTemplate{ title = 'Taxobox colour', args = {colourAs} } elseif l.system == 'ichnos' then colour = frame:expandTemplate{ title = 'Taxobox colour', args = {'Ichnos'} } elseif l.system == 'veterovata' then colour = frame:expandTemplate{ title = 'Taxobox colour', args = {'Veterovata'} } else colour = Autotaxobox.getTaxoboxColour(frame, taxon) end -- fill in a missing subdivision_ranks parameter if subdivision ~= '' and subdivisionRanks == '' and ok and taxonRank ~= '' then subdivisionRanks = frame:expandTemplate{ title = 'Children rank', args = {taxonRank} } end -- set binomial parameters if the target taxon is (unusually) a species local genusAuthority = '' if binomial == '' then if ok and taxonRank == 'species' then binomial = TaxonItalics.italicizeTaxonName(taxon, false, false) binomialAuthority = authority end end -- handle any manually set ranks local boldFirst = '' local offset = 0 if speciesManual ~= '' then offset = offset + 1 binomialAuthority = authority if binomial == '' then binomial = '<span class="error">Error: binomial parameter value is missing</span>' end end if genusManual ~= '' then boldFirst = 'link' offset = offset + 1 if offset == 1 then genusAuthority = authority else genusAuthority = parentAuthority end end -- process type genus and type species if present; italicize if they seem not to have an authority attached local typeGenus = '' local typeGenusAuthority = '' local typeSpecies = '' local typeSpeciesAuthority = '' local typeIchnogenus = '' local typeIchnogenusAuthority = '' local typeIchnospecies = '' local typeIchnospeciesAuthority = '' local typeOogenus = '' local typeOogenusAuthority = '' local typeOospecies = '' local typeOospeciesAuthority = '' if l.system == '' then typeGenus = l.italicizeTypeName(args['type_genus'] or args['type genus'] or '') typeGenusAuthority = args['type_genus_authority'] or args['type genus authority'] or '' typeSpecies = l.italicizeTypeName(args['type_species'] or args['type species'] or '') typeSpeciesAuthority = args['type_species_authority'] or args['type species authority'] or '' elseif l.system == 'ichnos' then typeIchnogenus = l.italicizeTypeName(args['type_ichnogenus'] or args['type ichnogenus'] or '') typeIchnogenusAuthority = args['type_ichnogenus_authority'] or args['type ichnogenus authority'] or '' typeIchnospecies = l.italicizeTypeName(args['type_ichnospecies'] or args['type ichnospecies'] or '') typeIchnospeciesAuthority = args['type_ichnospecies_authority'] or args['type ichnospecies authority'] or '' elseif l.system == 'veterovata' then typeOogenus = l.italicizeTypeName(args['type_oogenus'] or args['type oogenus'] or '') typeOogenusAuthority = args['type_oogenus_authority'] or args['type oogenus authority'] or '' typeOospecies = l.italicizeTypeName(args['type_oospecies'] or args['type oospecies'] or '') typeOospeciesAuthority = args['type_oospecies_authority'] or args['type oospecies authority'] or '' end -- ------------------------------------------------ -- now call Taxobox/core with all of its parameters -- ------------------------------------------------ res = res .. frame:expandTemplate{ title = 'Taxobox/core', args = { ichnos = ichnos, veterovata = veterovata, ['edit link'] = 'e', temporal_range = fossilRange, display_taxa = args['display_parents'] or args['display parents'] or '1', parent = taxon, authority = authority, parent_authority = parentAuthority, grandparent_authority = args['grandparent_authority'] or args['grandparent authority'] or '', greatgrandparent_authority = args['greatgrandparent_authority'] or args['greatgrandparent authority'] or '', greatgreatgrandparent_authority = args['greatgreatgrandparent_authority'] or args['greatgreatgrandparent authority'] or '', name = name, colour = colour, status = args['status'] or '', status_system = args['status_system'] or args['status system'] or '', status_ref = args['status_ref'] or args['status ref'] or '', status2 = args['status2'] or '', status2_system = args['status2_system'] or args['status2 system'] or '', status2_ref = args['status2_ref'] or args['status2 ref'] or '', trend = args['trend'] or '', extinct = args['extinct'] or '', image = args['image'] or '', upright = args['image_upright'] or args['image upright'] or '', image_alt = args['image_alt'] or args['image alt'] or '', image_caption = args['image_caption'] or args['image caption'] or '', image2 = args['image2'] or '', upright2 = args['image2_upright'] or args['image2 upright'] or '', image2_alt = args['image2_alt'] or args['image2 alt'] or '', image2_caption = args['image2_caption'] or args['image2 caption'] or '', classification_status = args['classification_status'] or args['classification status'] or '', diversity = args['diversity'] or '', diversity_ref = args['diversity_ref'] or args['diversity ref'] or '', diversity_link = args['diversity_link'] or args['diversity link'] or '', bold_first = boldFirst, offset = offset, genus = genusManual, genus_authority = genusAuthority, species = speciesManual, binomial = binomial, binomial_authority = binomialAuthority, trinomial = args['trinomial'] or '', trinomial_authority = args['trinomial_authority'] or args['trinomial authority'] or '', type_genus = typeGenus, type_genus_authority = typeGenusAuthority, type_species = typeSpecies, type_species_authority = typeSpeciesAuthority, type_ichnogenus = typeIchnogenus, type_ichnogenus_authority = typeIchnogenusAuthority, type_ichnospecies = typeIchnospecies, type_ichnospecies_authority = typeIchnospeciesAuthority, type_oogenus = typeOogenus, type_oogenus_authority = typeOogenusAuthority, type_oospecies = typeOospecies, type_oospecies_authority = typeOospeciesAuthority, subdivision = subdivision, subdivision_ref = subdivisionRef, subdivision_ranks = subdivisionRanks, type_strain = args['type_strain'] or args['type strain'] or '', type_strain_ref = args['type_strain_ref'] or args['type strain ref'] or '', range_map = args['range_map'] or args['range map'] or '', range_map_upright = args['range_map_upright'] or args['range map upright'] or '', range_map_alt = args['range_map_alt'] or args['range map alt'] or '', range_map_caption = args['range_map_caption'] or args['range map caption'] or '', range_map2 = args['range_map2'] or args['range map2'] or '', range_map2_upright = args['range_map2_upright'] or args['range map2 upright'] or '', range_map2_alt = args['range_map2_alt'] or args['range map2 alt'] or '', range_map2_caption = args['range_map2_caption'] or args['range map2 caption'] or '', range_map3 = args['range_map3'] or args['range map3'] or '', range_map3_upright = args['range_map3_upright'] or args['range map3 upright'] or '', range_map3_alt = args['range_map3_alt'] or args['range map3 alt'] or '', range_map3_caption = args['range_map3_caption'] or args['range map3 caption'] or '', range_map4 = args['range_map4'] or args['range map4'] or '', range_map4_upright = args['range_map4_upright'] or args['range map4 upright'] or '', range_map4_alt = args['range_map4_alt'] or args['range map4 alt'] or '', range_map4_caption = args['range_map4_caption'] or args['range map4 caption'] or '', synonyms_ref = args['synonyms_ref'] or args['synonyms ref'] or '', synonyms = args['synonyms'] or '' } } -- put page in error-tracking categories if required local errCat1 = '' if genusManual ~= '' or speciesManual ~= '' or binomial ~= '' then errCat1 = '[[Kategori:Automatic taxoboxes using manual parameters]]' end local errCat2 = '' if taxonParaMissingError then errCat2 = '[[Kategori:Automatic taxoboxes relying on page title]]' end res = res .. frame:expandTemplate{ title = 'Main other', args = {errCat1..errCat2} } return res end -- ============================================================================= -- l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil) checks -- the parameters that determine the fossil range, returning an appropriate -- range. -- ============================================================================= -- temporary public function for debugging function p.chkFossilRange(frame) local args = frame.args local fossilRange = args['temporal_range'] or args['temporal range'] or args['fossil_range'] or args['fossil range'] or '' local oldestFossil = args['oldest_fossil'] or args['oldest fossil'] or '' local youngestFossil = args['youngest_fossil'] or args['youngest fossil'] or '' local fossilRange = l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil) return fossilRange end function l.setfossilRange(frame, fossilRange, oldestFossil, youngestFossil) local res = '' if fossilRange ~= '' then if mw.ustring.find(frame:expandTemplate{ title = 'Period start', args = { fossilRange } }, '[Ee]rror') then res = fossilRange else res = frame:expandTemplate{ title = 'Geological range', args = { fossilRange } } end elseif oldestFossil ~= '' then if youngestFossil == '' then youngestFossil = 'Recent' end if mw.ustring.find(frame:expandTemplate{ title = 'Period start', args = { oldestFossil } }, '[Ee]rror') or mw.ustring.find(frame:expandTemplate{ title = 'Period start', args = { youngestFossil } }, '[Ee]rror') then res = oldestFossil..'–'..youngestFossil else res = frame:expandTemplate{ title = 'Geological range', args = { oldestFossil, youngestFossil } } end end return res end -- ============================================================================= -- l.italicizeTypeName(typeName) checks whether the name of a type genus or -- species should be italicized, because it appears to be a bare name. -- ============================================================================= function l.italicizeTypeName(typeName) if typeName and not (string.find(typeName, "<", 1, true) or string.find(typeName, ">", 1, true)) then typeName = TaxonItalics.italicizeTaxonName(typeName, false, false) end return typeName end -- **************************** Speciesbox support ***************************** -- ============================================================================= -- l.genusOf(str) extracts the genus from a string. Normally this will be the -- first word of the string (e.g. given 'Bellis perennis' it returns 'Bellis'). -- It also handles a string containing a nothogenus with a spaced × (e.g. given -- '× Heucherella tiarelloides' it returns '× Heucherella'). -- ============================================================================= function l.genusOf(str) local res = mw.ustring.match(str, '^[^%s]*', 1) if res == mw.ustring.char(215) then res = res .. ' ' .. mw.ustring.match(str, '^[^%s]*', 3) end return res end -- ============================================================================= -- l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle) -- returns a name for a taxobox created by Template:Speciesbox. The name will be -- italicized if appropriate. It also generates code to italicize the page title -- if appropropriate. In both cases the test for italicization is that the base -- taxon name (stripped of any disambiguation or qualifier) is the same as the -- base page title. -- ============================================================================= function p.speciesboxName(frame) local name = frame.args[1] or '' local taxon = frame.args[2] or '' local genus = frame.args[3] or '' local species = frame.args[4] or '' local basePageTitle = frame.args[5] or '' local italicTitle = frame.args[6] or '' return l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle) end function l.doSpeciesboxName(name, taxon, genus, species, basePageTitle, italicTitle) if taxon ~= '' then genus = mw.ustring.gsub(l.genusOf(taxon), '/.*$', '', 1) -- strip any qualifier else genus = mw.ustring.gsub(mw.ustring.gsub(genus, '%s+%b()$', '', 1), '/.*$', '', 1) -- strip any disambig and qualifier if species == '' then taxon = genus else taxon = genus .. ' ' .. species end end local italicizeP = italicTitle ~= 'no' and (basePageTitle == taxon or basePageTitle == genus) -- use basePageTitle to match taxon/genus -- deal with taxobox name (i.e. its caption) if name == '' then name = basePageTitle if italicizeP then name = TaxonItalics.italicizeTaxonName(name, false, false) end end -- deal with page title if italicizeP then local pageTitle = mw.title.getCurrentTitle().text -- formatting the page title with DISPLAYTITLE needs the full page title if italicTitle ~= 'test' then pageTitle = TaxonItalics.italicizeTaxonName(pageTitle, false, false, true) -- format pageTitle, not italicizing any parenthesized term local nsText = mw.title.getCurrentTitle().nsText -- for drafts and other pages not in mainspace if nsText ~= '' then pageTitle = nsText .. ':' .. pageTitle end mw.getCurrentFrame():callParserFunction('DISPLAYTITLE', pageTitle) else name = name .. ' \\Italic title\\ ' .. pageTitle -- for testing and debugging end end return name end -- ============================================================================= -- ============================================================================= function p.infraspeciesboxName(frame) local name = frame.args[1] or '' local genus = frame.args[2] or '' local species = frame.args[3] or '' local ct = frame.args[4] or '' local infraspecies = frame.args[5] or '' local basePageTitle = frame.args[6] or '' local italicTitle = frame.args[7] or '' return l.doinfraspeciesboxName(name, genus, species, ct, infraspecies, basePageTitle, italicTitle) end function l.doinfraspeciesboxName(name, genus, species, ct, infraspecies, basePageTitle, italicTitle) genus = mw.ustring.gsub(mw.ustring.gsub(genus, '%s+%b()$', '', 1), '/.*$', '', 1) -- strip any disambig and qualifier local taxon = genus .. ' ' .. species if ct == '' then taxon = taxon .. ' ' .. infraspecies else taxon = taxon .. ' ' .. ct .. ' ' .. infraspecies end local italicizeP = italicTitle ~= 'no' and (basePageTitle == taxon) -- use basePageTitle to match taxon -- deal with taxobox name (i.e. its caption) if name == '' then name = basePageTitle if italicizeP then name = TaxonItalics.italicizeTaxonName(name, false, false) end end -- deal with page title if italicizeP then local pageTitle = mw.title.getCurrentTitle().text -- formatting the page title with DISPLAYTITLE needs the full page title pageTitle = TaxonItalics.italicizeTaxonName(pageTitle, false, false, true) -- format pageTitle, not italicizing any parenthesized term if italicTitle ~= 'test' then mw.getCurrentFrame():callParserFunction('DISPLAYTITLE', pageTitle) else name = name .. ' \\Italic title\\ ' .. pageTitle -- for testing and debugging end end return name end return p rpppr9m3zsr6aepuii0lm6cebgr3fiy Modul:Autotaxobox 828 266 807 806 2024-08-09T09:21:27Z Jon Harald Søby 58 1 semakan diimportkan 806 Scribunto text/plain --[[************************************************************************* This module provides support to the automated taxobox system – the templates Automatic taxobox, Speciesbox, Subspeciesbox, Infraspeciesbox, etc. In particular it provides a way of traversing the taxonomic hierarchy encoded in taxonomy templates (templates with names of the form "Template:Taxonomy/TAXON_NAME") without causing template expansion depth errors. *****************************************************************************]] require('strict') local TaxonItalics = require('Module:TaxonItalics') -- use a function from Module:TaxonItalics to italicize a taxon name local TableRow = '|-\n' local TableEnd = '|}\n' local p = {} -- functions made public local l = {} -- internal functions, kept separate local colour = '' -- colour for taxobox and taxonomy listings --[[========================================================================= Limit the maximum depth of a taxonomic hierarchy that can be traversed; avoids excessive processing time and protects against incorrectly set up hierarchies, e.g. loops. The value can be obtained externally via {{#invoke:Autotaxobox|getMaxSearchLevels}} =============================================================================]] local MaxSearchLevels = 100 function p.getMaxSearchLevels() return MaxSearchLevels end --[[========================== taxoboxColour ================================ Determines the correct colour for a taxobox, by searching up the taxonomic hierarchy from the supplied taxon for the first taxon (other than 'incertae sedis') that sets a taxobox colour. It is assumed that a valid taxobox colour is defined using CSS rgb() syntax. If no taxon that sets a taxobox colour is found, then 'transparent' is returned unless the taxonomic hierarchy is too deep, when the error colour is returned. Usage: {{#invoke:Autotaxobox|taxoboxColour|TAXON}} =============================================================================]] function p.taxoboxColour(frame) return p.getTaxoboxColour(frame, frame.args[1] or '') end function p.getTaxoboxColour(frame, currTaxon) -- note that colour is global to this function; default is empty string local i = 1 -- count levels processed local searching = currTaxon ~= '' -- still searching for a colour? local foundICTaxon = false -- record whether 'incertae sedis' found while searching and i <= MaxSearchLevels do local plainCurrTaxon, dummy = l.stripExtra(currTaxon) -- remove trailing text after / if string.lower(plainCurrTaxon) == 'incertae sedis' then foundICTaxon = true else local possibleColour = frame:expandTemplate{ title = 'Template:Taxobox colour', args = { plainCurrTaxon } } if string.sub(possibleColour,1,3) == 'rgb' then colour = possibleColour searching = false end end if searching then local ok, parent = p.getTaxonInfoItem(frame, currTaxon, 'parent') if ok and parent ~= '' then currTaxon = parent i = i + 1 else searching = false -- run off the top of the hierarchy or tried to use non-existent taxonomy template end end end if colour == '' then if foundICTaxon then colour = frame:expandTemplate{ title = 'Template:Taxobox colour', args = { 'incertae sedis' } } elseif searching then -- hierarchy exceeds MaxSearchLevels levels colour = frame:expandTemplate{ title = 'Template:Taxobox/Error colour', args = { } } else colour = 'transparent' end end return colour end --[[= = = = = = = = = = = = = topLevelTaxon = = = = = = = = = = = = = = = = Defines the correct top level taxa, one of which should terminate every taxonomic hierarchy encoded in taxonomy templates. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.topLevelTaxon(taxon) return taxon == 'Life' or taxon == 'Veterovata' or taxon == 'Ichnos' end --[[=========================== taxoboxList ================================= Returns the rows of taxa in an automated taxobox, based on the taxonomic hierarchy for the supplied taxon. Usage: {{#invoke:Autotaxobox|taxoboxList|TAXON |display_taxa = the number of taxa *above* TAXON to force to be displayed |authority = taxonomic authority for TAXON |parent_authority = taxonomic authority for TAXON's parent |gparent_authority = taxonomic authority for TAXON's grandparent |ggparent_authority = taxonomic authority for TAXON's greatgrandparent |ggparent_authority = taxonomic authority for TAXON's greatgreatgrandparent |bold_first = 'bold' to bold TAXON in its row |virus = 'yes' to apply virus taxa italicization standards }} =============================================================================]] function p.taxoboxList(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return '' end local displayN = (tonumber(frame.args['display_taxa']) or 1) + 1 local authTable = {} authTable[1] = frame.args['authority'] or '' authTable[2] = frame.args['parent_authority'] or '' authTable[3] = frame.args['gparent_authority'] or '' authTable[4] = frame.args['ggparent_authority'] or '' authTable[5] = frame.args['gggparent_authority'] or '' local boldFirst = frame.args['bold_first'] or 'link' -- values 'link' or 'bold' local virus = frame.args['virus'] or 'no' -- values 'yes' or 'no' local offset = tonumber(frame.args['offset'] or 0) -- adjust the authority table if 'authority' refers to a rank lower than the target taxon if offset ~= 0 then for i = 1, 5 do local j = i + offset if j <= 5 then authTable[i] = authTable[j] else authTable[i] = '' end end end local taxonTable, taxonRankTable = l.makeTable(frame, currTaxon) local res = '' local topTaxonN = taxonTable.n -- display all taxa above possible greatgreatgrandparent, without authority for i = topTaxonN, 6, -1 do res = res .. l.showTaxon(frame, taxonTable[i], taxonRankTable[i], topTaxonN==i, '', displayN >= i, '', virus) end -- display all taxa above possible parent, with authority if given for i = math.min(topTaxonN, 5), 2, -1 do res = res .. l.showTaxon(frame, taxonTable[i], taxonRankTable[i], topTaxonN==i, authTable[i], displayN >= i, '', virus) end -- display target taxon, always displayed and emboldened res = res .. l.showTaxon(frame, taxonTable[1], taxonRankTable[1], topTaxonN==1, authTable[1], true, boldFirst, virus) return res end --[[= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Show one taxon row in a taxobox. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.showTaxon(frame, taxon, rank, isTopTaxon, auth, force, boldFirst, virus) -- it's an error if this is the top taxon and it's not a top level taxon (e.g. "Life") if isTopTaxon then if l.topLevelTaxon(taxon) then return '' -- don't display a top level taxon elseif (mw.title.new('Taxonomy/'..taxon, 'Template') or {}).exists then -- taxonomy template for this taxon has no parent specified return frame:expandTemplate{ title = 'Template:Create taxonomy', args = {taxon, msg='Taxonomy template does not specify a parent'} } .. '\n' .. TableRow else -- no taxonomy template for this taxon return frame:expandTemplate{ title = 'Template:Create taxonomy', args = {taxon, msg='Missing taxonomy template'} } .. '\n' .. TableRow end else -- if showing is not already forced, force if it's a principal rank or an authority is specified force = force or frame:expandTemplate{ title = 'Template:Principal rank', args = {rank} } == 'yes' or auth ~= '' if not force then -- if showing is still not already forced, force if the taxonomy template has 'always_display' set local ok, alwaysDisplay = p.getTaxonInfoItem(frame, taxon, 'always_display') force = alwaysDisplay == 'yes' or alwaysDisplay == 'true' end if force then local res = l.tableCell(frame:expandTemplate{ title = 'Template:Anglicise rank', args = {rank} } .. ':') local bold = 'no' if boldFirst == 'bold' then bold = 'yes' end if auth ~= '' then auth = '<br><small>' .. auth .. '</small>' end local res = res .. l.tableCell(l.getTaxonLink(frame, taxon, rank, bold, '', '', virus) .. auth) -- italic, abbreviated return res .. TableRow else return '' end end end --[[========================== taxonomyList ================================= Returns the cells of the taxonomy table displayed on the right hand side of "Template:Taxonomy...." pages. Usage: {{#invoke:Autotaxobox|taxonomyList|TAXON}} =============================================================================]] function p.taxonomyList(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return '{|class="infobox biota"\n' .. TableRow .. l.tableCell('') .. l.tableCell('ERROR: no taxon supplied') .. TableEnd end local taxonTable, taxonRankTable = l.makeTable(frame, currTaxon) local rankValTable = l.getRankTable() local lastRankVal = 1000000 local orderOk = true -- check whether the taxonomy is for viruses; use already determined taxon colour if possible local virus = 'no' local taxoColour = colour if taxoColour == '' then if taxonTable[taxonTable.n] == 'Ichnos' or taxonTable[taxonTable.n] == 'Veterovata' then taxoColour = frame:expandTemplate{ title = 'Template:Taxobox colour', args = { taxonTable[taxonTable.n] } } else taxoColour = frame:expandTemplate{ title = 'Template:Taxobox colour', args = { taxonTable[taxonTable.n - 1] } } end end if taxoColour == frame:expandTemplate{ title = 'Template:Taxobox colour', args = { 'virus' } } then virus = 'yes' end -- add information message local res = '<p style="float:right">Bold ranks show taxa that will be shown in taxoboxes<br>because rank is principal or <code>always_display=yes</code>.</p>\n' -- start table res = res .. '{| class="infobox biota" style="text-align: left; font-size:100%"\n' .. TableRow .. '! colspan=4 style="text-align: center; background-color: ' .. taxoColour .. '"|Ancestral taxa\n' -- deal first with the top level taxon; if there are no errors, it should be Life/Veterovata/Ichnos, which are -- not displayed local taxon = taxonTable[taxonTable.n] if not l.topLevelTaxon(taxon) then local msg = 'Taxonomy template missing' if mw.title.new('Taxonomy/'..taxon, 'Template').exists then msg = 'Parent taxon needed' end res = res .. TableRow .. l.tableCell('colspan=2', frame:expandTemplate{title = 'Template:Create taxonomy', args = {taxon, msg = msg}}) end -- now output the rest of the table local currRankVal for i = taxonTable.n-1, 1, -1 do -- check ranks are in right order in the hierarchy taxon = taxonTable[i] local rank = taxonRankTable[i] currRankVal = l.lookupRankVal(rankValTable, rank) if currRankVal then orderOk = currRankVal < lastRankVal if orderOk then lastRankVal = currRankVal end else orderOk = true end -- see if the row will be displayed in a taxobox; bold the rank if so local boldRank = false local ok, alwaysDisplay = p.getTaxonInfoItem(frame, taxon, 'always_display') if ok and (alwaysDisplay == 'yes' or alwaysDisplay == 'true') then boldRank = true else boldRank = frame:expandTemplate{ title = 'Template:Principal rank', args = {rank} } == 'yes' end -- now return a row of the taxonomy table with anomalous ranks marked local errorStr = '' if not orderOk then errorStr = 'yes' end local link = l.getTaxonLink(frame, taxon, rank, '', '', '', virus) -- bold, italic, abbreviated res = res .. l.taxonomyListRow(frame, taxon, rank, link, boldRank, errorStr) end -- close table res = res .. TableEnd -- error-tracking for taxonomy templates -- if the last row has an anomalous rank, put the page in an error-tracking category local errCat1 = '' if not orderOk then errCat1 = '[[Kategori:Taxonomy templates showing anomalous ranks]]\n' end -- if the last row has a taxon name in the page name that does not match the link text, -- put the taxonomy template in a tracking category local dummy, linkText = p.getTaxonInfoItem(frame, taxon, 'link_text') local match = l.matchTaxonLink(taxon, linkText, currRankVal and currRankVal < rankValTable['genus']) local errCat2 = '' if not match then errCat2 = '[[Kategori:Taxonomy templates with name and link text not matching|' .. taxon .. ']]\n' end if errCat1..errCat2 ~= '' then res = res .. frame:expandTemplate{ title = 'Template other', args = { errCat1..errCat2} } end return res end --[[ = = = = = = = = = = = = = = taxonomyListRow = = = = = = = = = = = = = = Returns a single row of the taxonomy table displayed on the right hand side of "Template:Taxonomy...." pages. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.taxonomyListRow(frame, taxon, rank, link, boldRank, error) local res = '' if taxon == '' or rank == '' then return res end local baseTaxon, qualifier = l.stripExtra(taxon) -- if appropriate, make it clear that some taxa have been skipped via a ... row if qualifier == '/skip' then res = res .. TableRow .. l.tableCell('.....') .. l.tableCell('.....') end -- now generate a row of the table res = res .. TableRow local cellContent = '' local anglicizedRank = frame:expandTemplate{ title = 'Template:Anglicise rank', args = { rank } } if boldRank then cellContent = cellContent .. '<b>' .. anglicizedRank .. '</b>:' else cellContent = cellContent .. anglicizedRank .. ':' end if error == 'yes' then cellContent = '<span style="background-color:#FDD">' .. cellContent .. '</span>' end res = res .. l.tableCell(cellContent) .. l.tableCell('<span style="white-space:nowrap;">' .. link .. '</span>') .. l.tableCell('<span style="font-size:smaller;">' .. qualifier .. '</span>') .. l.tableCell('<span style="white-space:nowrap;">' .. frame:expandTemplate{ title = 'Template:Edit a taxon', args = { taxon } } .. '</span>') return res end --[[========================= callTaxonomyKey =============================== Prepares for, and then calls, Template:Taxonomy key to display a taxonomy template page. It does this by building up the information the template requires, following one 'same as' link, if required. Usage: {{#invoke:Autotaxobox|callTaxonomyKey |parent= |rank= |extinct= |always_display= |link_target=value of 'link' parameter in taxonomy template |link_text=value of parameter 2 in taxonomy template |same_as= }} =============================================================================]] local PARENT = 1 local RANK = 2 local LINK_TARGET = 3 local LINK_TEXT = 4 local ALWAYS_DISPLAY = 5 local EXTINCT = 6 local SAME_AS = 7 local REFS = 8 function p.callTaxonomyKey(frame) local taxon = frame.args['taxon'] or '' local parent = frame.args['parent'] or '' local rank = frame.args['rank'] or '' local extinct = string.lower(frame.args['extinct']) or '' local alwaysDisplay = string.lower(frame.args['always_display']) or '' local linkTarget = frame.args['link_target'] or '' local linkText = frame.args['link_text'] or '' -- this is the "raw" link text, and can be '' local refs = frame.args['refs'] or '' local sameAsTaxon = frame.args['same_as'] or '' if sameAsTaxon ~= '' then -- try using the 'same as' taxon; it's an error if it doesn't exist local ok, sameAsInfoStr = pcall(frame.expandTemplate, frame, { title = 'Template:Taxonomy/' .. sameAsTaxon, args = {['machine code'] = 'all' } }) if ok then local sameAsInfo = mw.text.split(sameAsInfoStr, '$', true) --'same as' taxon's taxonomy template must not have a 'same as' link if sameAsInfo[SAME_AS] == '' then if parent == '' then parent = sameAsInfo[PARENT] end if rank == '' then rank = sameAsInfo[RANK] end if extinct == '' then extinct = string.lower(sameAsInfo[EXTINCT]) end if alwaysDisplay == '' then alwaysDisplay = string.lower(sameAsInfo[ALWAYS_DISPLAY]) end if linkTarget == '' then linkTarget = sameAsInfo[LINK_TARGET] end if linkText == '' then linkText = sameAsInfo[LINK_TEXT] end if refs == '' and parent == sameAsInfo[PARENT] then refs = sameAsInfo[REFS] end else return '<span style="color:red; font-size:1.1em">Error: attempt to follow two "same as" links</span>: <code>same_as = ' .. sameAsTaxon .. '</code>, but [[Templat:Taxonomy/' .. sameAsTaxon .. ']] also has a<code>same_as</code> parameter.' end else return frame:expandTemplate{ title = 'Template:Taxonomy key/missing template', args = {taxon=sameAsTaxon, msg='given as the value of <code>same as</code>'} } end end local link = linkTarget if linkText ~= '' and linkText ~= linkTarget then link = link .. "|" .. linkText end -- check consistency of extinct status; if this taxon is not extinct, parent must not be either local extinctError = 'no' if parent ~= '' and (extinct == '' or extinct == 'no' or extinct == 'false') then local ok, parentExtinct = p.getTaxonInfoItem(frame, parent, 'extinct') if ok and (parentExtinct == 'yes' or parentExtinct == 'true') then extinctError = 'yes' end end return frame:expandTemplate{ title = 'Template:Taxonomy key', args = {taxon=taxon, parent=parent, rank=rank, extinct=extinct, always_display=alwaysDisplay, link_target=linkTarget, link=link, refs=refs, same_as=sameAsTaxon, extinct_error = extinctError} } end --[[============================= showRefs ================================== Shows the refs field in a taxonomy template, handing incertae sedis taxa and using '–' for absent refs. Usage: {{#invoke:Autotaxobox|showRefs|TAXON|REFS}} =============================================================================]] function p.showRefs(frame) local taxonName = frame.args[1] or '' local refs = frame.args[2] or '' return l.doShowRefs(taxonName, refs) end --[[= = = = = = = = = = = = = = doShowRefs = = = = = = = = = = = = = = = = = Show the refs field in a taxonomy template. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.doShowRefs(taxonName, refs) if mw.text.split(taxonName, '/', true)[1] == 'Incertae sedis' then refs = 'not applicable (<i>incertae sedis</i>)' elseif refs == '' then refs = '–' end return refs end --[[============================ taxonInfo ================================== Extracts and returns information from Template:Taxonomy/TAXON, following one 'same as' link if required. Usage: {{#invoke:Autotaxobox|taxonInfo|TAXON|ITEM}} ITEM is one of: 'parent', 'rank', 'link target', 'link text', 'extinct', 'always display', 'refs', 'same as' or 'all'. If ITEM is not specified, the default is 'all' – all values in a single string separated by '$'. =============================================================================]] function p.taxonInfo(frame) local taxon = frame.args[1] or '' local item = frame.args[2] or '' if item == '' then item = 'all' end local ok, info = p.getTaxonInfoItem(frame, taxon, item) return info end --[[= = = = = = = = = = = getTaxonInfoItem = = = = = = = = = = = = = = = = = Utility function to extract an item of information from a taxonomy template, following one 'same as' link if required. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function p.getTaxonInfoItem(frame, taxon, item) local ok, info -- item == 'dagger' is a special case if item == 'dagger' then ok, info = p.getTaxonInfoItem(frame, taxon, 'extinct') if ok then if info == 'yes' or info == 'true' then info = '&dagger;' else info = '' end end -- item ~= 'dagger' else ok, info = pcall(frame.expandTemplate, frame, { title = 'Template:Taxonomy/' .. taxon, args = {['machine code'] = item } }) if ok then if info == '' then -- try 'same as' local sameAsTaxon = frame:expandTemplate{ title = 'Template:Taxonomy/' .. taxon, args = {['machine code'] = 'same as' } } if sameAsTaxon ~= '' then ok, info = pcall(frame.expandTemplate, frame, { title = 'Template:Taxonomy/' .. sameAsTaxon, args = {['machine code'] = item } }) end end end end if ok then -- if item is 'link_text', trim info and check whether '(?)' needs to be added if item == 'link_text' then -- there is a newline at the end of linkText when taxonomy template has "|link = LINK_TARGET|LINK_TEXT" info = mw.text.trim(info) if string.sub(taxon, -2) == '/?' and not string.find(info, '?', 1, true) then info = info .. '<span style="font-style:normal;font-weight:normal;">&nbsp;(?)</span>' end end else info = '[[Templat:Taxonomy/' .. taxon .. ']]' --error indicator in code before conversion to Lua end return ok, info end --[[============================ taxonLink ================================== Returns a wikilink to a taxon, if required including '†' before it and ' (?)' after it, and optionally italicized or bolded without a wikilink. Usage: {{#invoke:Autotaxobox|taxonLink |taxon= : having '/?' at the end triggers the output of ' (?)' |extinct= : 'yes' or 'true' trigger the output of '†' |bold= : 'yes' makes the core output bold and not wikilinked |italic= : 'yes' makes the core output italic |link_target= : target for the wikilink |link_text= : text of the wikilink (may be same as link_target), without †, italics, etc. }} =============================================================================]] function p.taxonLink(frame) local taxon = frame.args['taxon'] or '' local extinct = string.lower(frame.args['extinct'] or '') local bold = frame.args['bold'] or '' local italic = frame.args['italic'] or '' local abbreviated = frame.args['abbreviated'] or '' local linkTarget = frame.args['link_target'] or '' local linkText = frame.args['link_text'] or frame.args['plain_link_text'] or '' --temporarily allow alternative args return l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText) end --[[= = = = = = = = = = = = = = getTaxonLink = = = = = = = = = = = = = = = = Internal function to drive l.makeLink(). = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.getTaxonLink(frame, taxon, rank, bold, italic, abbreviated, virus) local ok, extinct = p.getTaxonInfoItem(frame, taxon, 'extinct') if italic == '' then italic = frame:expandTemplate{ title = 'Template:Is italic taxon', args = { rank, virus = virus } } end local ok, linkTarget = p.getTaxonInfoItem(frame, taxon, 'link_target') local ok, linkText = p.getTaxonInfoItem(frame, taxon, 'link_text') return l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText) end --[[= = = = = = = = = = = = = = makeLink = = = = = = = = = = = = = = = = = = Actually make the link. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.makeLink(taxon, extinct, bold, italic, abbreviated, linkTarget, linkText) local dummy -- if link text is missing, try to find a replacement if linkText == '' then if string.find(taxon, 'Incertae sedis', 1, true) then linkText = "''incertae sedis''" linkTarget = 'Incertae sedis' else linkText, dummy = l.stripExtra(taxon) end end if linkTarget == '' then linkTarget = linkText end if italic == 'yes' then linkText = TaxonItalics.italicizeTaxonName(linkText, false, abbreviated=='yes') end local link = '' if bold == 'yes' then link = '<b>' .. linkText .. '</b>' else if linkTarget == linkText then link = linkText else link = linkTarget .. '|' .. linkText end link = '[[' .. link .. ']]' end if (extinct == 'yes' or extinct == 'true') and not string.find(link, '†', 1, true) then link = '<span style="font-style:normal;font-weight:normal;">†</span>' .. link end if string.sub(taxon, -2) == '/?' and not string.find(link, '?', 1, true) then link = link .. '<span style="font-style:normal;font-weight:normal;">&nbsp;(?)</span>' end return link end --[[========================== showRankTable ================================ Returns a wikitable showing the ranks and their values as set up by getRankTable(). Usage: {{#invoke:Autotaxobox|showRankTable}} =============================================================================]] function p.showRankTable(frame) local rankTable = l.getRankTable() local res = '{| class="wikitable sortable"\n|+ Ranks checked in taxonomy templates\n! Rank !! Shown as !! Value\n' for k, v in pairs(rankTable) do local rankShown = frame:expandTemplate{ title = 'Template:Anglicise rank', args = { k } } res = res .. TableRow .. l.tableCell(k) .. l.tableCell(rankShown) .. l.tableCell(v) end return res .. TableEnd end --[[============================== find ===================================== Returns the taxon above the specified taxon with a given rank. Usage: {{#invoke:Autotaxobox|find|TAXON|RANK}} =============================================================================]] function p.find(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return '<span class="error">no taxon supplied</span>' end local rank = frame.args[2] or '' if rank == '' then return '<span class="error">no rank supplied</span>' end local inHierarchy = true -- still in the taxonomic hierarchy or off the top? local searching = true -- still searching while inHierarchy and searching do local ok, parent = p.getTaxonInfoItem(frame, currTaxon, 'parent') if ok and parent ~= '' then currTaxon = parent local ok, currRank = p.getTaxonInfoItem(frame, currTaxon, 'rank') if currRank == rank then searching = false end else inHierarchy = false end end if inHierarchy and not searching then return currTaxon else return '<span class="error">rank not found</span>' end end --[[=============================== nth ===================================== External utility function primarily intended for use in checking and debugging. Returns the nth level above a taxon in a taxonomic hierarchy, where the taxon itself is counted as the first level. Usage: {{#invoke:Autotaxobox|nth|TAXON|n=N}} =============================================================================]] function p.nth(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return 'ERROR: no taxon supplied' end local n = tonumber(frame.args['n'] or 1) if n > MaxSearchLevels then return 'Exceeded maximum number of levels allowed (' .. MaxSearchLevels .. ')' end local i = 1 local inHierarchy = true -- still in the taxonomic hierarchy or off the top? while i < n and inHierarchy do local ok, parent = p.getTaxonInfoItem(frame, currTaxon, 'parent') if ok and parent ~= '' then currTaxon = parent i = i + 1 else inHierarchy = false end end if inHierarchy then return currTaxon else return 'Level ' .. n .. ' is past the top of the taxonomic hierarchy' end end --[[============================= nLevels =================================== External utility function primarily intended for use in checking and debugging. Returns number of levels in a taxonomic hierarchy, starting from the supplied taxon as level 1. Usage: {{#invoke:Autotaxobox|nLevels|TAXON}} =============================================================================]] function p.nLevels(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return 'ERROR: no taxon supplied' end local i = 1 local inHierarchy = true -- still in the taxonomic hierarchy or off the top? while inHierarchy and i < MaxSearchLevels do local ok, parent = p.getTaxonInfoItem(frame, currTaxon, 'parent') if ok and parent ~= '' then currTaxon = parent i = i + 1 else inHierarchy = false end end if inHierarchy then return MaxSearchLevels .. '+' else return i end end --[[============================= listAll =================================== External utility function primarily intended for use in checking and debugging. Returns a comma separated list of a taxonomic hierarchy, starting from the supplied taxon. Usage: {{#invoke:Autotaxobox|listAll|TAXON}} =============================================================================]] function p.listAll(frame) local currTaxon = frame.args[1] or '' if currTaxon == '' then return 'ERROR: no taxon supplied' end return l.doListAll(l.makeTable(frame, currTaxon)) end function l.doListAll(taxonTable, taxonRankTable) local lst = taxonTable[1] .. '-' .. tostring(taxonRankTable[1]) for i = 2, taxonTable.n, 1 do lst = lst .. ', ' .. taxonTable[i] .. '-' .. taxonRankTable[i] end return lst end --[[=========================== removeQualifier ================================ External utility function to remove a qualifier (any part after a "/") from a taxon name. Usage: {{#invoke:Autotaxobox|removeQualifier|TAXON}} =============================================================================]] function p.removeQualifier(frame) local baseName, qualifier = l.stripExtra(frame.args[1]) return baseName end --[[========================================================================= Internal functions =============================================================================]] --[[= = = = = = = = = = = = stripExtra = = = = = = = = = = = = = = = = = = = Internal utility function to strip off any extra parts of a taxon name, i.e. anything after a '/'. Thus 'Felidae/?' would be split into 'Felidae' and '?'. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.stripExtra(taxonName) local i = mw.ustring.find(taxonName, '/', 1, true) if i then return mw.ustring.sub(taxonName, 1, i-1), mw.ustring.sub(taxonName, i, -1) else return taxonName, '' end end --[[= = = = = = = = = = = = splitTaxonName = = = = = = = = = = = = = = = = = Internal utility function to split a taxon name into its parts and return them. Possible formats include: * taxon * taxon (disambig) * taxon (Subgenus) * taxon/qualifier * combinations, e.g. taxon (disambig)/qualifier = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.splitTaxonName(taxon) -- get any qualifier present local qualifier = '' local i = mw.ustring.find(taxon, '/', 1, true) if i then qualifier = mw.ustring.sub(taxon, i+1, -1) taxon = mw.ustring.sub(taxon, 1, i-1) end -- get any disambiguator or subgenus local disambig = '' local subgenus = '' i = mw.ustring.find(taxon, ' (', 1, true) if i then local parenTerm = mw.ustring.sub(taxon, i+2, -2) taxon = mw.ustring.sub(taxon, 1, i-1) local char1 = mw.ustring.sub(parenTerm, 1, 1) if char1 == mw.ustring.lower(char1) then disambig = parenTerm else subgenus = parenTerm end end return taxon, disambig, subgenus, qualifier end --[[= = = = = = = = = = = = matchTaxonLink = = = = = = = = = = = = = = = = = Function to determine whether the taxon name derived from the name of the taxonomy template (passed in the parameter taxon) matches the link text (passed in the parameter linkText). The taxon name may have any of the formats: * baseTaxon/qualifier * baseTaxon (disambig) * baseTaxon (Subgenus) [distinguished by the capital letter] * a qualifier may be present after the previous two formats. Examples of matches (baseTaxon ~ linkText): * Pinus ~ Pinus * Pinus sect. Trifoliae ~ Pinus sect. Trifoliae * Pinus sect. Trifoliae ~ ''Pinus'' sect. ''Trifoliae'' [italic markers ignored] * Pinus sect. Trifoliae ~ P. sect. Trifoliae [abbreviated genus name matches] * Bombus (Pyrobombus) ~ Bombus (Pyrobombus) * Bombus (Pyrobombus) ~ B. (Pyrobombus) * Bombus (Pyrobombus) ~ Pyrobombus [link text may just be the subgenus] * Heteractinida ~ "Heteractinida" [double-quotes are ignored in link text] * "Heteractinida" ~ Heteractinida [double-quotes are ignored in base taxon name] * Incertae sedis ~ anything [link text is ignored for matching in this case] * Cetotheriidae with qualifier=? ~ Cetotheriidae (?) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.matchTaxonLink(taxon, linkText, rankBelowGenus) local dummy linkText, dummy = mw.ustring.gsub(linkText, "''", '') -- remove any italic wikitext in the link text linkText, dummy = mw.ustring.gsub(linkText, '<.->', '') -- strip all tags used to format the link text linkText, dummy = mw.ustring.gsub(linkText, '"', '') -- remove any occurrences of " in the link text local baseTaxon, disambig, subgenus, qualifier = l.splitTaxonName(taxon) -- split up the taxon name baseTaxon, dummy = mw.ustring.gsub(linkText, '"', '') -- remove any occurrences of " in the base taxon name local match = linkText == baseTaxon or linkText == subgenus or linkText == baseTaxon .. ' (' .. subgenus .. ')' or linkText == mw.ustring.sub(baseTaxon, 1, 1) .. '. (' .. subgenus .. ')' or baseTaxon == 'Incertae sedis' or rankBelowGenus and linkText == mw.ustring.gsub(baseTaxon, '([A-Z]).- (.*)', '%1. %2') or mw.ustring.find(qualifier, '?', 1, true) and mw.ustring.find(linkText, baseTaxon, 1, true) == 1 return match end --[[= = = = = = = = = = = = = makeTable = = = = = = = = = = = = = = = = = = = Internal utility function to return a table (array) constructed from a taxonomic hierarchy stored in "Template:Taxonomy/..." templates. TABLE.n holds the total number of taxa; TABLE[1]..TABLE[TABLE.n] the taxon names. The last taxon in the table will either (a) have a taxonomy template but with no parent given (e.g. 'Life') or (b) not have a taxonomy template. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.makeTable(frame, currTaxon) local taxonTable = {} local taxonRankTable = {} local ok, rank, parent local i = 1 local topReached = false -- reached the top of the taxonomic hierarchy? repeat taxonTable[i] = currTaxon ok, rank = p.getTaxonInfoItem(frame, currTaxon, 'rank') if ok then taxonRankTable[i] = string.lower(rank) else taxonRankTable[i] = '' end ok, parent = p.getTaxonInfoItem(frame, currTaxon, 'parent') if ok and parent ~= '' then currTaxon = parent i = i + 1 else topReached = true -- reached the top of the hierarchy or tried to use a non-existent taxonomy template end until topReached or i > MaxSearchLevels taxonTable.n = math.min(i, MaxSearchLevels) return taxonTable, taxonRankTable end --[[= = = = = = = = = = = = getRankTable = = = = = = = = = = = = = = = = = = Internal utility function to set up a table of numerical values corresponding to 'Linnaean' ranks, with upper ranks having higher values. In a valid taxonomic hierarchy, a lower rank should never have a higher value than a higher rank. The actual numerical values are arbitrary so long as they are ordered. The ranks should correspond to those in Template:Anglicise ranks. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.getRankTable() return { classis = 1400, cohort = 1100, divisio = 1500, domain = 1700, epifamilia = 802, familia = 800, forma = 100, genus = 600, grandordo = 1005, ['grandordo-mb'] = 1002, hyperfamilia = 805; infraclassis = 1397, infralegio = 1197, infraordo = 997, infraphylum = 1497, infraregnum = 1597, infratribus = 697, legio = 1200, magnordo = 1006, microphylum = 1495, micrordo = 995, mirordo = 1004, ['mirordo-mb'] = 1001, nanophylum = 1494, nanordo = 994, ordo = 1000, parafamilia = 800, parvclassis = 1396; -- same as subterclassis parvordo = 996, phylum = 1500, regnum = 1600, sectio = 500, --series = 400, used too inconsistently to check species = 300, subclassis = 1398, subcohort = 1098, subdivisio = 1498, subfamilia = 798, subgenus = 598, sublegio = 1198, subordo = 998, subphylum = 1498, subregnum = 1598, subsectio = 498, subspecies = 298, subterclassis = 1396; -- same as parvclassis subtribus = 698, superclassis = 1403, supercohort = 1103, superdivisio = 1503, superdomain = 1703, superfamilia = 803, superlegio = 1203, superordo = 1003, superphylum = 1503, superregnum = 1603, supersectio = 503, supertribus = 703, tribus = 700, varietas = 200, zoodivisio = 1300, zoosectio = 900, zoosubdivisio = 1298, zoosubsectio = 898, } end --[[= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Function to look up the arbitrary numerical value of a rank in a rank value table. "Ichno" and "oo" ranks are not stored separately, so if present the prefix is removed. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.lookupRankVal(rankValTable, rank) local rankVal = rankValTable[rank] if not rankVal then -- may be an "ichno" or "oo" rank; try removing "ichno-" or "oo-" local baseRank = mw.ustring.gsub(mw.ustring.gsub(rank, '^ichno', ''), '^oo', '') if baseRank == 'rdo' then baseRank = 'ordo' end -- if an "ichno" or "oo" rank, lower rank value slightly so it is ok below the base rank rankVal = rankValTable[baseRank] if rankVal then rankVal = rankVal - 0.1 end end return rankVal end --[[= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =]] function l.tableCell(arg1, arg2) local text, style if arg2 then style = arg1 text = arg2 else style = '' text = arg1 end local res = '|' if style ~= '' then res = res .. style .. '|' end return res .. text .. '\n' end return p ng1zmgvkfuyjy6xl42kw4aa2d8wzvhx Modul:CIA World Factbook 828 267 809 808 2024-08-09T09:21:27Z Jon Harald Søby 58 1 semakan diimportkan 808 Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs -- prefix of all World Factbook pages local factbookPrefix = 'https://www.cia.gov/the-world-factbook/' -- Format of archive link. Both %d represent the year of the archive local archiveFormat = '&nbsp;[https://www.cia.gov/the-world-factbook/about/archives/download/factbook-%d.zip (Archived %d edition)]' -- Function to turn a string into a URL fragment appropriate for CIA website local function parseFragment(s) if not s then return '' end s = mw.ustring.lower(s) s = mw.ustring.gsub(s,' ','-') s = mw.ustring.gsub(s,',','') return s end -- Function to fill in factbook link: -- Arguments: -- args.country: topic of page (optional) -- args.section: section of page (optional) -- Returns: -- link to World Factbook page about country, with section anchor function p._country(args) if not args.country then return factbookPrefix end local result = factbookPrefix..'countries/'..parseFragment(args.country) if args.section then return result..'/#'..parseFragment(args.section) end return result end -- Function to fill in archive link: -- Arguments: -- args.archive: if non-empty, return nil -- args.year: else if this is non-empty, use it for year -- args.date: else if this is non-empty, parse it for a year -- Returns: -- the link, above, filled in with the year, or nil function p._archive(args) if args.archive then return nil end local year = nil if args.year then year = tonumber(args.year) elseif args.date then i, j = mw.ustring.find(args.date,'20%d%d') if i and j then year = tonumber(mw.ustring.sub(args.date,i,j)) end end if not year then return year end if year >= tonumber(os.date('%Y'))-1 then return false end return mw.ustring.format(archiveFormat, year, year) end function p.country(frame) local args = getArgs(frame) return p._country(args) end function p.archive(frame) local args = getArgs(frame) return p._archive(args) or '' end return p qdzkjo2my0miqmg8hhmfdv5o5cceccp Modul:Check for clobbered parameters 828 268 811 810 2024-08-09T09:21:27Z Jon Harald Søby 58 1 semakan diimportkan 810 Scribunto text/plain local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p 59n770hna40q9pw4oa0dsp86euaks0u Modul:Check for deprecated parameters 828 269 813 812 2024-08-09T09:21:27Z Jon Harald Søby 58 1 semakan diimportkan 812 Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and trim(s) ~= '' end function p.check (frame) local args = frame.args local pargs = frame:getParent().args local ignoreblank = isnotempty(frame.args['ignoreblank']) local deprecated = frame.args['category'] local preview = frame.args['preview'] or 'Page using [['..frame:getParent():getTitle()..']] with deprecated parameter _VALUE_' local dep_values = {} local values = {} local res = {} -- create the table of deprecated values and their matching new value for k, v in pairs(args) do if k == 'ignoreblank' or k == 'preview' or k == 'deprecated' then else dep_values[k] = v end end if isnotempty(preview) then preview = '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. preview .. ' (this message is shown only in preview).</div>' elseif preview == nil then preview = deprecated end -- loop over the parent args and see if any are deprecated for k, v in pairs(pargs) do if ignoreblank then if dep_values[k] and v~='' then table.insert(values, k) end else if dep_values[k] then table.insert(values, k) end end end -- add resuls to the output tables if #values > 0 then if frame:preprocess( "{{REVISIONID}}" ) == "" then deprecated = preview for k, v in pairs(values) do if v == '' then -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links v = ' ' end local r = deprecated:gsub('_VALUE_', ('"'..v..'". replace with "'..dep_values[v]..'"')) table.insert(res, r) end else for k, v in pairs(values) do local r = deprecated:gsub('_VALUE_', v) table.insert(res, r) end end end return table.concat(res) end return p r6s7h9qjf2ul6a76kgb45ejf85gmq1c Modul:Check for unknown parameters 828 270 815 814 2024-08-09T09:21:28Z Jon Harald Søby 58 1 semakan diimportkan 814 Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local knownargs = {} local unknown = args['unknown'] or 'Found _VALUE_, ' local preview = args['preview'] local values = {} local res = {} local regexps = {} -- create the list of known args, regular expressions, and the return string for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end if isnotempty(preview) then preview = '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. preview .. ' (this message is shown only in preview).</div>' elseif preview == nil then preview = unknown end -- loop over the parent args, and make sure they are on the list for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end -- add results to the output tables if #values > 0 then if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then unknown = preview end for _, v in pairs(values) do if v == '' then -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p fai6f8jbbmvoyopkl9xbkhi5th8yqh4 Modul:Citation/CS1 828 271 817 816 2024-08-09T09:21:28Z Jon Harald Søby 58 1 semakan diimportkan 816 Scribunto text/plain require('Module:No globals'); --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- each of these counts against the Lua upvalue limit ]] local validation; -- functions in Module:Citation/CS1/Date_validation local utilities; -- functions in Module:Citation/CS1/Utilities local z ={}; -- table of tables in Module:Citation/CS1/Utilities local identifiers; -- functions and tables in Module:Citation/CS1/Identifiers local metadata; -- functions in Module:Citation/CS1/COinS local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist --[[--------------------------< P A G E S C O P E V A R I A B L E S >-------------------------------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local added_deprecated_cat; -- Boolean flag so that the category is added only once local added_vanc_errs; -- Boolean flag so we only emit one Vancouver error / category local 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 utilities.is_set( list[i] ) then return list[i]; -- return the first set list member end i = i + 1; -- point to next end end --[[--------------------------< A D D _ V A N C _ E R R O R >---------------------------------------------------- Adds a single Vancouver system error message to the template's output regardless of how many error actually exist. To prevent duplication, added_vanc_errs is nil until an error message is emitted. added_vanc_errs is a Boolean declared in page scope variables above ]] local function add_vanc_error (source) if not added_vanc_errs then added_vanc_errs = true; -- note that we've added this category table.insert( z.message_tail, { utilities.set_message ( 'err_vancouver', {source}, true ) } ); end end --[[--------------------------< I S _ S C H E M E >------------------------------------------------------------ does this thing that purports to be a URI scheme seem to be a valid scheme? The scheme is checked to see if it is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says: Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). returns true if it does, else false ]] local function is_scheme (scheme) return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern end --[=[-------------------------< I S _ D O M A I N _ N A M E >-------------------------------------------------- Does this thing that purports to be a domain name seem to be a valid domain name? Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5 BNF defined here: https://tools.ietf.org/html/rfc4234 Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15; see also [[Single-letter second-level domain]] list of TLDs: https://www.iana.org/domains/root/db RFC 952 (modified by RFC 1123) requires the first and last character of a hostname to be a letter or a digit. Between the first and last characters the name may use letters, digits, and the hyphen. Also allowed are IPv4 addresses. IPv6 not supported domain is expected to be stripped of any path so that the last character in the last character of the TLD. tld is two or more alpha characters. Any preceding '//' (from splitting a URL with a scheme) will be stripped here. Perhaps not necessary but retained in case it is necessary for IPv4 dot decimal. There are several tests: the first character of the whole domain name including subdomains must be a letter or a digit internationalized domain name (ASCII characters with .xn-- ASCII Compatible Encoding (ACE) prefix xn-- in the TLD) see https://tools.ietf.org/html/rfc3490 single-letter/digit second-level domains in the .org, .cash, and .today TLDs q, x, and z SL domains in the .com TLD i and q SL domains in the .net TLD single-letter SL domains in the ccTLDs (where the ccTLD is two letters) two-character SL domains in gTLDs (where the gTLD is two or more letters) three-plus-character SL domains in gTLDs (where the gTLD is two or more letters) IPv4 dot-decimal address format; TLD not allowed returns true if domain appears to be a proper name and TLD or IPv4 address, else false ]=] local function is_domain_name (domain) if not domain then return false; -- if not set, abandon end domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once if not domain:match ('^[%w]') then -- first character must be letter or digit return false; end if domain:match ('^%a+:') then -- hack to detect things that look like s:Page:Title where Page: is namespace at Wikisource return false; end local patterns = { -- patterns that look like URLs '%f[%w][%w][%w%-]+[%w]%.%a%a+$', -- three or more character hostname.hostname or hostname.tld '%f[%w][%w][%w%-]+[%w]%.xn%-%-[%w]+$', -- internationalized domain name with ACE prefix '%f[%a][qxz]%.com$', -- assigned one character .com hostname (x.com times out 2015-12-10) '%f[%a][iq]%.net$', -- assigned one character .net hostname (q.net registered but not active 2015-12-10) '%f[%w][%w]%.%a%a$', -- one character hostname and ccTLD (2 chars) '%f[%w][%w][%w]%.%a%a+$', -- two character hostname and TLD '^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?', -- IPv4 address } for _, pattern in ipairs (patterns) do -- loop through the patterns list if domain:match (pattern) then return true; -- if a match then we think that this thing that purports to be a URL is a URL end end for _, d in ipairs ({'cash', 'company', 'today', 'org'}) do -- look for single letter second level domain names for these top level domains if domain:match ('%f[%w][%w]%.' .. d) then return true end end return false; -- no matches, we don't know what this thing is end --[[--------------------------< I S _ U R L >------------------------------------------------------------------ returns true if the scheme and domain parts of a URL appear to be a valid URL; else false. This function is the last step in the validation process. This function is separate because there are cases that are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external wikilinks. ]] local function is_url (scheme, domain) if utilities.is_set (scheme) then -- if scheme is set check it and domain return is_scheme (scheme) and is_domain_name (domain); else return is_domain_name (domain); -- scheme not set when URL is protocol-relative end end --[[--------------------------< S P L I T _ U R L >------------------------------------------------------------ Split a URL into a scheme, authority indicator, and domain. First remove Fully Qualified Domain Name terminator (a dot following TLD) (if any) and any path(/), query(?) or fragment(#). If protocol-relative URL, return nil scheme and domain else return nil for both scheme and domain. When not protocol-relative, get scheme, authority indicator, and domain. If there is an authority indicator (one or more '/' characters immediately following the scheme's colon), make sure that there are only 2. Any URL that does not have news: scheme must have authority indicator (//). TODO: are there other common schemes like news: that don't use authority indicator? Strip off any port and path; ]] local function split_url (url_str) local scheme, authority, domain; url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//') if url_str:match ('^//%S*') then -- if there is what appears to be a protocol-relative URL domain = url_str:match ('^//(%S*)') elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions if utilities.is_set (authority) then authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing; if utilities.is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then return scheme; -- return scheme only making domain nil which will cause an error message end else if not scheme:match ('^news:') then -- except for news:..., MediaWiki won't link URLs that do not have authority indicator; TODO: a better way to do this test? return scheme; -- return scheme only making domain nil which will cause an error message end end domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present end return scheme, domain; end --[[--------------------------< L I N K _ P A R A M _ O K >--------------------------------------------------- checks the content of |title-link=, |series-link=, |author-link=, etc. for properly formatted content: no wikilinks, no URLs Link parameters are to hold the title of a Wikipedia article, so none of the WP:TITLESPECIALCHARACTERS are allowed: # < > [ ] | { } _ except the underscore which is used as a space in wiki URLs and # which is used for section links returns false when the value contains any of these characters. When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid URL (the |<param>-link= parameter is ok); else false when value appears to be a valid URL (the |<param>-link= parameter is NOT ok). ]] local function link_param_ok (value) local scheme, domain; if value:find ('[<>%[%]|{}]') then -- if any prohibited characters return false; end scheme, domain = split_url (value); -- get scheme or nil and domain or nil from URL; return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid URL end --[[--------------------------< L I N K _ T I T L E _ O K >--------------------------------------------------- Use link_param_ok() to validate |<param>-link= value and its matching |<title>= value. |<title>= may be wiki-linked but not when |<param>-link= has a value. This function emits an error message when that condition exists check <link> for inter-language interwiki-link prefix. prefix must be a MediaWiki-recognized language code and must begin with a colon. ]] local function link_title_ok (link, lorig, title, torig) local orig; if utilities.is_set (link) then -- don't bother if <param>-link doesn't have a value if not link_param_ok (link) then -- check |<param>-link= markup orig = lorig; -- identify the failing link parameter elseif title:find ('%[%[') then -- check |title= for wikilink markup orig = torig; -- identify the failing |title= parameter elseif link:match ('^%a+:') then -- if the link is what looks like an interwiki local prefix = link:match ('^(%a+):'):lower(); -- get the interwiki prefix if cfg.inter_wiki_map[prefix] then -- if prefix is in the map, must have preceding colon orig = lorig; -- flag as error end end end if utilities.is_set (orig) then link = ''; -- unset table.insert( z.message_tail, { utilities.set_message ( 'err_bad_paramlink', orig)}); -- URL or wikilink in |title= with |title-link=; end return link; -- link if ok, empty string else end --[[--------------------------< 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 utilities.is_set(error_message) then -- once we've added the first portion of the error message ... error_message = error_message .. ", "; -- ... add a comma space separator end error_message = error_message .. "&#124;" .. k .. "="; -- add the failed parameter end end if utilities.is_set (error_message) then -- done looping, if there is an error message, display it table.insert( z.message_tail, { utilities.set_message ( 'err_param_has_ext_link', {error_message}, true ) } ); end end --[[--------------------------< 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, { utilities.set_message ( 'err_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 utilities.is_set ( label ) then label = URL; if utilities.is_set ( source ) then error_str = utilities.set_message ( 'err_bare_url_missing_title', { utilities.wrap_style ('parameter', source) }, false, " " ); else error( cfg.messages["bare_url_no_origin"] ); end end if not check_url( URL ) then error_str = utilities.set_message ( 'err_bad_url', {utilities.wrap_style ('parameter', source)}, false, " " ) .. error_str; end domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the URL into scheme plus domain and path if path then -- if there is a path portion path = path:gsub ('[%[%]]', {['['] = '%5b', [']'] = '%5d'}); -- replace '[' and ']' with their percent-encoded values URL = table.concat ({domain, path}); -- and reassemble end base_url = table.concat({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wiki-markup URL if utilities.is_set (access) then -- access level (subscription, registration, limited) base_url = utilities.substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon end return table.concat ({base_url, error_str}); end --[[--------------------------< 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, { utilities.set_message ( 'err_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 wiki-markup) are not kerned. Replaces Unicode quote marks in plain text or in the label portion of a [[L|D]] style wikilink with typewriter quote marks regardless of the need for kerning. Unicode quote marks are not replaced in simple [[D]] wikilinks. Call this function for chapter titles, for website titles, etc.; not for book titles. ]=] local function kern_quotes (str) local cap = ''; local cap2 = ''; local wl_type, label, link; wl_type, label, link = utilities.is_wikilink (str); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] if 1 == wl_type then -- [[D]] simple wikilink with or without quote marks if mw.ustring.match (str, '%[%[[\"“”\'‘’].+[\"“”\'‘’]%]%]') then -- leading and trailing quote marks str = utilities.substitute (cfg.presentation['kern-wl-both'], str); elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks str = utilities.substitute (cfg.presentation['kern-wl-left'], str); elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks str = utilities.substitute (cfg.presentation['kern-wl-right'], str); end else -- plain text or [[L|D]]; text in label variable label = mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark) label = mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark) cap, cap2 = mw.ustring.match (label, "^([\"\'])([^\'].+)"); -- match leading double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-left'], {cap, cap2}); end cap, cap2 = mw.ustring.match (label, "^(.+[^\'])([\"\'])$") -- match trailing double or single quote but not doubled single quotes (italic markup) if utilities.is_set (cap) then label = utilities.substitute (cfg.presentation['kern-right'], {cap, cap2}); end if 2 == wl_type then str = utilities.make_wikilink (link, label); -- reassemble the wikilink else str = label; end end return str; end --[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >---------------------------------------- |script-title= holds title parameters that are not written in Latin-based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped in italic markup. Regardless of language, all values provided by |script-title= are wrapped in <bdi>...</bdi> tags to isolate RTL languages from the English left to right. |script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO 639-1 language code and a colon: |script-title=ja:*** *** (where * represents a Japanese character) Spaces between the two-character code and the colon and the colon and the first script character are allowed: |script-title=ja : *** *** |script-title=ja: *** *** |script-title=ja :*** *** Spaces preceding the prefix are allowed: |script-title = ja:*** *** The prefix is checked for validity. If it is a valid ISO 639-1 language code, the lang attribute (lang="ja") is added to the <bdi> tag so that browsers can know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute is not added. At this time there is no error message for this condition. Supports |script-title=, |script-chapter=, |script-<periodical>= ]] local function format_script_value (script_value, script_param) local lang=''; -- initialize to empty string local name; if script_value:match('^%l%l%l?%s*:') then -- if first 3 or 4 non-space characters are script language prefix lang = script_value:match('^(%l%l%l?)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script if not utilities.is_set (lang) then table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'missing title part'}, true ) } ); -- prefix without 'title'; add error message return ''; -- script_value was just the prefix so return empty string end -- if we get this far we have prefix and script name = cfg.lang_code_remap[lang] or mw.language.fetchLanguageName( lang, cfg.this_wiki_code ); -- get language name so that we can use it to categorize if utilities.is_set (name) then -- is prefix a proper ISO 639-1 language code? script_value = script_value:gsub ('^%l+%s*:%s*', ''); -- strip prefix from script -- is prefix one of these language codes? if utilities.in_array (lang, cfg.script_lang_codes) then utilities.add_prop_cat ('script_with_name', {name, lang}) else table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'unknown language code'}, true ) } ); -- unknown script-language; add error message end lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute else table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'invalid language code'}, true ) } ); -- invalid language code; add error message lang = ''; -- invalid so set lang to empty string end else table.insert( z.message_tail, { utilities.set_message ( 'err_script_parameter', {script_param, 'missing prefix'}, true ) } ); -- no language code prefix; add error message end script_value = utilities.substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is RTL return script_value; end --[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------ Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been wrapped in <bdi> tags. ]] local function script_concatenate (title, script, script_param) if utilities.is_set (script) then script = format_script_value (script, script_param); -- <bdi> tags, lang attribute, categorization, etc.; returns empty string on error if utilities.is_set (script) then title = title .. ' ' .. script; -- concatenate title and script title end end return title; end --[[--------------------------< W R A P _ M S G >-------------------------------------------------------------- Applies additional message text to various parameter values. Supplied string is wrapped using a message_list configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken from citation_config.messages - the reason this function is similar to but separate from wrap_style(). ]] local function wrap_msg (key, str, lower) if not utilities.is_set ( str ) then return ""; end if true == lower then local msg; msg = cfg.messages[key]:lower(); -- set the message to lower case before return utilities.substitute ( msg, str ); -- including template text else return utilities.substitute ( cfg.messages[key], str ); end end --[[----------------< W I K I S O U R C E _ U R L _ M A K E >------------------- Makes a Wikisource URL from Wikisource interwiki-link. Returns the URL and appropriate label; nil else. str is the value assigned to |chapter= (or aliases) or |title= or |title-link= ]] local function wikisource_url_make (str) local wl_type, D, L; local ws_url, ws_label; local wikisource_prefix = table.concat ({'https://', cfg.this_wiki_code, '.wikisource.org/wiki/'}); wl_type, D, L = utilities.is_wikilink (str); -- wl_type is 0 (not a wikilink), 1 (simple wikilink), 2 (complex wikilink) if 0 == wl_type then -- not a wikilink; might be from |title-link= str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 1 == wl_type then -- simple wikilink: [[Wikisource:ws article]] str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title }); ws_label = str; -- label for the URL end elseif 2 == wl_type then -- non-so-simple wikilink: [[Wikisource:ws article|displayed text]] ([[L|D]]) str = L:match ('^[Ww]ikisource:(.+)') or L:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace if utilities.is_set (str) then ws_label = D; -- get ws article name from display portion of interwiki link ws_url = table.concat ({ -- build a Wikisource URL wikisource_prefix, -- prefix str, -- article title without namespace from link portion of wikilink }); end end if ws_url then ws_url = mw.uri.encode (ws_url, 'WIKI'); -- make a usable URL ws_url = ws_url:gsub ('%%23', '#'); -- undo percent-encoding of fragment marker end return ws_url, ws_label, L or D; -- return proper URL or nil and a label or nil end --[[----------------< F O R M A T _ P E R I O D I C A L >----------------------- Format the three periodical parameters: |script-<periodical>=, |<periodical>=, and |trans-<periodical>= into a single Periodical meta-parameter. ]] local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical) local periodical_error = ''; if not utilities.is_set (periodical) then periodical = ''; -- to be safe for concatenation else periodical = utilities.wrap_style ('italic-title', periodical); -- style end periodical = script_concatenate (periodical, script_periodical, script_periodical_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (trans_periodical) then trans_periodical = utilities.wrap_style ('trans-italic-title', trans_periodical); if utilities.is_set (periodical) then periodical = periodical .. ' ' .. trans_periodical; else -- here when trans-periodical without periodical or script-periodical periodical = trans_periodical; periodical_error = ' ' .. utilities.set_message ('err_trans_missing_title', {'periodical'}); end end return periodical .. periodical_error; end --[[------------------< F O R M A T _ C H A P T E R _ T I T L E >--------------- Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single chapter meta- parameter (chapter_url_source used for error messages). ]] local function format_chapter_title (script_chapter, script_chapter_source, chapter, chapter_source, trans_chapter, trans_chapter_source, chapter_url, chapter_url_source, no_quotes, access) local chapter_error = ''; local ws_url, ws_label, L = wikisource_url_make (chapter); -- make a wikisource URL and label from a wikisource interwiki link if ws_url then ws_label = ws_label:gsub ('_', ' '); -- replace underscore separators with space characters chapter = ws_label; end if not utilities.is_set (chapter) then chapter = ''; -- to be safe for concatenation else if false == no_quotes then chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from module provided quote marks chapter = utilities.wrap_style ('quoted-title', chapter); end end chapter = script_concatenate (chapter, script_chapter, script_chapter_source); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped if utilities.is_set (chapter_url) then chapter = external_link (chapter_url, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate elseif ws_url then chapter = external_link (ws_url, chapter .. '&nbsp;', 'ws link in chapter'); -- adds bare_url_missing_title error if appropriate; space char to move icon away from chap text; TODO: better way to do this? chapter = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, chapter}); end if utilities.is_set (trans_chapter) then trans_chapter = utilities.wrap_style ('trans-quoted-title', trans_chapter); if utilities.is_set (chapter) then chapter = chapter .. ' ' .. trans_chapter; else -- here when trans_chapter without chapter or script-chapter chapter = trans_chapter; chapter_source = trans_chapter_source:match ('trans%-?(.+)'); -- when no chapter, get matching name from trans-<param> chapter_error = ' ' .. utilities.set_message ('err_trans_missing_title', {chapter_source}); end 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 non-printable or invisible characters. The search stops at the first match. This function will detect the visible replacement character when it is part of the Wikisource. Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref) and identifies them with a slightly different error message. See also coins_cleanup(). Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the parameter value. ]] local function has_invisible_chars (param, v) local position = ''; -- position of invisible char or starting position of stripmarker local dummy; -- end of matching string; not used but required to hold end position when a capture is returned local capture; -- used by stripmarker detection to hold name of the stripmarker local i = 1; local stripmarker, apostrophe; capture = string.match (v, '[%w%p ]*'); -- test for values that are simple ASCII text and bypass other tests if true if capture == v then -- if same there are no Unicode characters return; end while cfg.invisible_chars[i] do local char = cfg.invisible_chars[i][1] -- the character or group name local pattern = cfg.invisible_chars[i][2] -- the pattern used to find it position, dummy, capture = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern if position and (char == 'zero width joiner') then -- if we found a zero-width joiner character if mw.ustring.find (v, cfg.indic_script) then -- it's ok if one of the Indic scripts position = nil; -- unset position end end if position then if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition) ('templatestyles' == capture and utilities.in_array (param, {'id', 'quote'})) then -- templatestyles stripmarker allowed in these parameters stripmarker = true; -- set a flag elseif true == stripmarker and 'delete' == char then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker position = nil; -- unset else local err_msg; if capture then err_msg = capture .. ' ' .. char; else err_msg = char .. ' ' .. 'character'; end table.insert( z.message_tail, { utilities.set_message ( 'err_invisible_char', {err_msg, utilities.wrap_style ('parameter', param), position}, true ) } ); -- add error message return; -- and done with this parameter end end i = i + 1; -- bump our index end end --[[-------------------< A R G U M E N T _ W R A P P E R >---------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper ( args ) local origin = {}; return setmetatable({ ORIGIN = function ( self, k ) local dummy = self[k]; -- force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) if origin[k] ~= nil then return nil; end local args, list, v = args, cfg.aliases[k]; if type( list ) == 'table' then v, origin[k] = utilities.select_one ( args, list, 'err_redundant_parameters' ); if origin[k] == nil then origin[k] = ''; -- Empty string, not nil end elseif list ~= nil then v, origin[k] = args[list], list; else -- maybe let through instead of raising an error? -- v, origin[k] = args[k], k; error( cfg.messages['unknown_argument_map'] .. ': ' .. k); end -- Empty strings, not nil; if v == nil then v = ''; origin[k] = ''; end tbl = rawset( tbl, k, v ); return v; end, }); end --[[--------------------------< N O W R A P _ D A T E >------------------------- When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>. When date is DD MMMM YYYY or is MMMM DD, YYYY then wrap in nowrap span: <span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> YYYY DOES NOT yet support MMMM YYYY or any of the date ranges. ]] local function nowrap_date (date) local cap = ''; local cap2 = ''; if date:match("^%d%d%d%d%-%d%d%-%d%d$") then date = utilities.substitute (cfg.presentation['nowrap1'], date); elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$"); date = utilities.substitute (cfg.presentation['nowrap2'], {cap, cap2}); end return date; end --[[--------------------------< S E T _ T I T L E T Y P E >--------------------- This function sets default title types (equivalent to the citation including |type=<default value>) for those templates that have defaults. Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none). ]] local function set_titletype (cite_class, title_type) if utilities.is_set (title_type) then if 'none' == cfg.keywords_xlate[title_type] then title_type = ''; -- if |type=none then type parameter not displayed end return title_type; -- if |type= has been set to any other value use that value end return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation end --[[--------------------------< H Y P H E N _ T O _ D A S H >-------------------------------------------------- Converts a hyphen to a dash under certain conditions. The hyphen must separate like items; unlike items are returned unmodified. These forms are modified: letter - letter (A - B) digit - digit (4-5) digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5) letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5) digitletter - digitletter (5a - 5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d) any other forms are returned unmodified. str may be a comma- or semicolon-separated list ]] local function hyphen_to_dash( str ) if not utilities.is_set (str) then return str; end local accept; -- Boolean str = str:gsub ('&[nm]dash;', {['&ndash;'] = '–', ['&mdash;'] = '—'}); -- replace &mdash; and &ndash; entities with their characters; semicolon mucks up the text.split str = str:gsub ('&#45;', '-'); -- replace HTML numeric entity with hyphen character str = str:gsub ('[^%-]%-%-%-[^%-]', '—'); -- replace triple-hyphen with emdash str = str:gsub ('[^%-]%-%-[^%-]', '–'); -- replace double-hyphen (as found in BibTeX entries) with endash str = str:gsub ('&nbsp;', ' '); -- replace &nbsp; entity with generic keyboard space character local out = {}; local list = mw.text.split (str, '%s*[,;]%s*'); -- split str at comma or semicolon separators if there are any for _, item in ipairs (list) do -- for each item in the list item, accept = utilities.has_accept_as_written (item); -- remove accept-this-as-written markup when it wraps all of item if not accept and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit) item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter) item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2'); -- replace hyphen, remove extraneous space characters else item = mw.ustring.gsub (item, '%s*[–—]%s*', '–'); -- for endash or emdash separated ranges, replace em with en, remove extraneous whitespace end end table.insert (out, item); -- add the (possibly modified) item to the output table end local temp_str = ''; -- concatenate the output table into a comma separated string temp_str, accept = utilities.has_accept_as_written (table.concat (out, ', ')); -- remove accept-this-as-written markup when it wraps all of concatenated out if accept then return utilities.has_accept_as_written (str); -- when global markup removed, return original str else return temp_str; -- else, return assembled temp_str end end --[[--------------------------< S A F E _ J O I N >----------------------------- Joins a sequence of strings together while checking for duplicate separation characters. ]] local function safe_join( tbl, duplicate_char ) local f = {}; -- create a function table appropriate to type of 'duplicate character' if 1 == #duplicate_char then -- for single byte ASCII characters use the string library functions f.gsub = string.gsub f.match = string.match f.sub = string.sub else -- for multi-byte characters use the ustring library functions f.gsub = mw.ustring.gsub f.match = mw.ustring.match f.sub = mw.ustring.sub end local str = ''; -- the output string local comp = ''; -- what does 'comp' mean? local end_chr = ''; local trim; for _, value in ipairs( tbl ) do if value == nil then value = ''; end if str == '' then -- if output string is empty str = value; -- assign value to it (first time through the loop) elseif value ~= '' then if value:sub(1, 1) == '<' then -- special case of values enclosed in spans and other markup. comp = value:gsub( "%b<>", "" ); -- remove HTML markup (<span>string</span> -> string) else comp = value; end -- typically duplicate_char is sepc if f.sub(comp, 1, 1) == duplicate_char then -- is first character same as duplicate_char? why test first character? -- Because individual string segments often (always?) begin with terminal punct for the -- preceding segment: 'First element' .. 'sepc next element' .. etc.? trim = false; end_chr = f.sub(str, -1, -1); -- get the last character of the output string -- str = str .. "<HERE(enchr=" .. end_chr .. ")" -- debug stuff? if end_chr == duplicate_char then -- if same as separator str = f.sub(str, 1, -2); -- remove it elseif end_chr == "'" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "''" then -- if last three chars of str are sepc'' str = f.sub(str, 1, -4) .. "''"; -- remove them and add back '' elseif f.sub(str, -5, -1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]'' trim = true; -- why? why do this and next differently from previous? elseif f.sub(str, -4, -1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]'' trim = true; -- same question end elseif end_chr == "]" then -- if it might be wiki-markup if f.sub(str, -3, -1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink trim = true; elseif f.sub(str, -3, -1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link trim = true; elseif f.sub(str, -2, -1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link trim = true; elseif f.sub(str, -4, -1) == duplicate_char .. "'']" then -- normal case when |url=something & |title=Title. trim = true; end elseif end_chr == " " then -- if last char of output string is a space if f.sub(str, -2, -1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space> str = f.sub(str, 1, -3); -- remove them both end end if trim then if value ~= comp then -- value does not equal comp when value contains HTML markup local dup2 = duplicate_char; if f.match(dup2, "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it value = f.gsub(value, "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows HTML markup else value = f.sub(value, 2, -1 ); -- remove duplicate_char when it is first character end end end str = str .. value; -- add it to the output string end end return str; end --[[--------------------------< I S _ S U F F I X >----------------------------- returns true is suffix is properly formed Jr, Sr, or ordinal in the range 1–9. Puncutation not allowed. ]] local function is_suffix (suffix) if utilities.in_array (suffix, {'Jr', 'Sr', 'Jnr', 'Snr', '1st', '2nd', '3rd'}) or suffix:match ('^%dth$') then return true; end return false; end --[[--------------------< 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. The module doesn't do this so editors may/must. This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets [http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A [http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF [http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F [http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F |lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) |firstn= also allowed to contain hyphens, spaces, apostrophes, and periods This original test: if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then was written outside of the code editor and pasted here because the code editor gets confused between character insertion point and cursor position. The test has been rewritten to use decimal character escape sequence for the individual bytes of the Unicode characters so that it is not necessary to use an external editor to maintain this code. \195\128-\195\150 – À-Ö (U+00C0–U+00D6 – C0 controls) \195\152-\195\182 – Ø-ö (U+00D8-U+00F6 – C0 controls) \195\184-\198\191 – ø-ƿ (U+00F8-U+01BF – C0 controls, Latin extended A & B) \199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B) ]] local function is_good_vanc_name (last, first, suffix) if not suffix then if first:find ('[,%s]') then -- when there is a space or comma, might be first name/initials + generational suffix first = first:match ('(.-)[,%s]+'); -- get name/initials suffix = first:match ('[,%s]+(.+)$'); -- get generational suffix end end if utilities.is_set (suffix) then if not is_suffix (suffix) then add_vanc_error (cfg.err_msg_supl.suffix); return false; -- not a name with an appropriate suffix end end if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%'%.]*$") then add_vanc_error (cfg.err_msg_supl['non-Latin char']); return false; -- not a string of Latin characters; Vancouver requires Romanization end; return true; end --[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------ Attempts to convert names to initials in support of |name-list-style=vanc. Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/. Vancouver style requires family rank designations (Jr, II, III, etc.) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/. This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials. This function uses ustring functions because firstname initials may be any of the Unicode Latin characters accepted by is_good_vanc_name (). ]] local function reduce_to_initials(first) local name, suffix = mw.ustring.match(first, "^(%u+) ([%dJS][%drndth]+)$"); if not name then -- if not initials and a suffix name = mw.ustring.match(first, "^(%u+)$"); -- is it just initials? end if name then -- if first is initials with or without suffix if 3 > mw.ustring.len (name) then -- if one or two initials if suffix then -- if there is a suffix if is_suffix (suffix) then -- is it legitimate? return first; -- one or two initials and a valid suffix so nothing to do else add_vanc_error (cfg.err_msg_supl.suffix); -- one or two initials with invalid suffix so error message return first; -- and return first unmolested end else return first; -- one or two initials without suffix; nothing to do end end end -- if here then name has 3 or more uppercase letters so treat them as a word local initials, names = {}, {}; -- tables to hold name parts and initials local i = 1; -- counter for number of initials names = mw.text.split (first, '[%s,]+'); -- split into a table of names and possible suffix while names[i] do -- loop through the table if 1 < i and names[i]:match ('[%dJS][%drndth]+%.?$') then -- if not the first name, and looks like a suffix (may have trailing dot) names[i] = names[i]:gsub ('%.', ''); -- remove terminal dot if present if is_suffix (names[i]) then -- if a legitimate suffix table.insert (initials, ' ' .. names[i]); -- add a separator space, insert at end of initials table break; -- and done because suffix must fall at the end of a name end -- no error message if not a suffix; possibly because of Romanization end if 3 > i then table.insert (initials, mw.ustring.sub(names[i], 1, 1)); -- insert the initial at end of initials table end i = i + 1; -- bump the counter end return table.concat(initials) -- Vancouver format does not include spaces. end --[[--------------------------< L I S T _ P E O P L E >-------------------------- Formats a list of people (authors, contributors, editors, interviewers, translators) names in the list will be linked when |<name>-link= has a value |<name>-mask- does NOT have a value; masked names are presumed to have been rendered previously so should have been linked there when |<name>-mask=0, the associated name is not rendered ]] local function list_people (control, people, etal) local sep; local namesep; local format = control.format; local maximum = control.maximum; local name_list = {}; if 'vanc' == format then -- Vancouver-like name styling? sep = cfg.presentation['sep_nl_vanc']; -- name-list separator between names is a comma namesep = cfg.presentation['sep_name_vanc']; -- last/first separator is a space else sep = cfg.presentation['sep_nl']; -- name-list separator between names is a semicolon namesep = cfg.presentation['sep_name']; -- last/first separator is <comma><space> end if sep:sub (-1, -1) ~= " " then sep = sep .. " " end if utilities.is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for other names for i, person in ipairs (people) do if utilities.is_set (person.last) then local mask = person.mask; local one; local sep_one = sep; if utilities.is_set (maximum) and i > maximum then etal = true; break; end if mask then local n = tonumber (mask); -- convert to a number if it can be converted; nil else if n then one = 0 ~= n and string.rep("&mdash;", n) or nil; -- make a string of (n > 0) mdashes, nil else, to replace name person.link = nil; -- don't create link to name if name is replaces with mdash string or has been set nil else one = mask; -- replace name with mask text (must include name-list separator) sep_one = " "; -- modify name-list separator end else one = person.last; -- get surname local first = person.first -- get given name if utilities.is_set (first) then if ("vanc" == format) then -- if Vancouver format one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) if not person.corporate and is_good_vanc_name (one, first) then -- and name is all Latin characters; corporate authors not tested first = reduce_to_initials (first); -- attempt to convert first name(s) to initials end end one = one .. namesep .. first; end end if utilities.is_set (person.link) then one = utilities.make_wikilink (person.link, one); -- link author/editor end if one then -- if <one> has a value (name, mdash replacement, or mask text replacement) table.insert (name_list, one); -- add it to the list of names table.insert (name_list, sep_one); -- add the proper name-list separator end end end local count = #name_list / 2; -- (number of names + number of separators) divided by 2 if 0 < count then if 1 < count and not etal then if 'amp' == format then name_list[#name_list-2] = " & "; -- replace last separator with ampersand text elseif 'and' == format then if 2 == count then name_list[#name_list-2] = cfg.presentation.sep_nl_and; -- replace last separator with 'and' text else name_list[#name_list-2] = cfg.presentation.sep_nl_end; -- replace last separator with '(sep) and' text end end end name_list[#name_list] = nil; -- erase the last separator end local result = table.concat (name_list); -- construct list if etal and utilities.is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list result = result .. sep .. ' ' .. cfg.messages['et al']; -- we've got a last-first list and etal so add et al. end return result, count; -- return name-list string and count of number of names (count used for editor names only) end --[[--------------------------< 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 utilities.is_set (id) then -- if concatenation is not an empty string return "CITEREF" .. id; -- add the CITEREF portion else return ''; -- return an empty string; no reason to include CITEREF id in this citation end end --[[---------------------< N A M E _ H A S _ E T A L >-------------------------- Evaluates the content of name parameters (author, editor, etc.) for variations on the theme of et al. If found, the et al. is removed, a flag is set to true and the function returns the modified name and the flag. This function never sets the flag to false but returns its previous state because it may have been set by previous passes through this function or by the associated |display-<names>=etal parameter ]] local function name_has_etal (name, etal, nocat, param) if utilities.is_set (name) then -- name can be nil in which case just return local patterns = cfg.et_al_patterns; -- get patterns from configuration for _, pattern in ipairs (patterns) do -- loop through all of the patterns if name:match (pattern) then -- if this 'et al' pattern is found in name name = name:gsub (pattern, ''); -- remove the offending text etal = true; -- set flag (may have been set previously here or by |display-<names>=etal) if not nocat then -- no categorization for |vauthors= table.insert( z.message_tail, {utilities.set_message ('err_etal', {param})}); -- and set an error if not added end end end end return name, etal; end --[[---------------------< N A M E _ I S _ N U M E R I C >---------------------- Add maint cat when name parameter value does not contain letters. Does not catch mixed alphanumeric names so |last=A. Green (1922-1987) does not get caught in the current version of this test but |first=(1888) is caught. returns nothing ]] local function name_is_numeric (name, list_name) if utilities.is_set (name) then if mw.ustring.match (name, '^[%A]+$') then -- when name does not contain any letters utilities.set_message ('maint_numeric_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template end end end --[[-------------------< N A M E _ H A S _ E D _ M A R K U P >------------------ Evaluates the content of author and editor parameters for extraneous editor annotations: ed, ed., eds, (Ed.), etc. These annotations do not belong in author parameters and are redundant in editor parameters. If found, the function adds the editor markup maintenance category. returns nothing ]] local function name_has_ed_markup (name, list_name) local patterns = cfg.editor_markup_patterns; -- get patterns from configuration if utilities.is_set (name) then for _, pattern in ipairs (patterns) do -- spin through patterns table and if name:match (pattern) then utilities.set_message ('maint_extra_text_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template break; end end end end --[[-----------------< N A M E _ H A S _ M U L T _ N A M E S >------------------ Evaluates the content of last/surname (authors etc.) parameters for multiple names. Multiple names are indicated if there is more than one comma or any "unescaped" semicolons. Escaped semicolons are ones used as part of selected HTML entities. If the condition is met, the function adds the multiple name maintenance category. returns nothing ]] local function name_has_mult_names (name, list_name) local _, commas, semicolons, nbsps; if utilities.is_set (name) then _, commas = name:gsub (',', ''); -- count the number of commas _, semicolons = name:gsub (';', ''); -- count the number of semicolons -- nbsps probably should be its own separate count rather than merged in -- some way with semicolons because Lua patterns do not support the -- grouping operator that regex does, which means there is no way to add -- more entities to escape except by adding more counts with the new -- entities _, nbsps = name:gsub ('&nbsp;',''); -- count nbsps -- There is exactly 1 semicolon per &nbsp; entity, so subtract nbsps -- from semicolons to 'escape' them. If additional entities are added, -- they also can be subtracted. if 1 < commas or 0 < (semicolons - nbsps) then utilities.set_message ('maint_mult_names', cfg.special_case_translation [list_name]); -- add a maint message end end end --[[------------------------< 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) local accept_name; if utilities.is_set (last) then last, accept_name = utilities.has_accept_as_written (last); -- remove accept-this-as-written markup when it wraps all of <last> if not accept_name then -- <last> not wrapped in accept-as-written markup name_has_mult_names (last, list_name); -- check for multiple names in the parameter (last only) name_has_ed_markup (last, list_name); -- check for extraneous 'editor' annotation name_is_numeric (last, list_name); -- check for names that are composed of digits and punctuation end end if utilities.is_set (first) then first, accept_name = utilities.has_accept_as_written (first); -- remove accept-this-as-written markup when it wraps all of <first> if not accept_name then -- <first> not wrapped in accept-as-written markup name_has_ed_markup (first, list_name); -- check for extraneous 'editor' annotation name_is_numeric (first, list_name); -- check for names that are composed of digits and punctuation end end return last, first; -- done end --[[----------------------< E X T R A C T _ N A M E S >------------------------- Gets name list from the input arguments Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters. Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't find |last4= and |last5= then the search is done. This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3= are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=. When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the template's metadata. When this occurs, an error is emitted. ]] local function extract_names(args, list_name) local names = {}; -- table of names local last; -- individual name components local first; local link; local mask; local i = 1; -- loop counter/indexer local n = 1; -- output table indexer local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors) local etal = false; -- return value set to true when we find some form of et al. in an author parameter local last_alias, first_alias, link_alias; -- selected parameter aliases used in error messaging while true do last, last_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'err_redundant_parameters', i ); -- search through args for name components beginning at 1 first, first_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'err_redundant_parameters', i ); link, link_alias = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ); mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); last, etal = name_has_etal (last, etal, false, last_alias); -- find and remove variations on et al. first, etal = name_has_etal (first, etal, false, first_alias); -- find and remove variations on et al. last, first = name_checks (last, first, list_name); -- multiple names, extraneous annotation, etc. checks if first and not last then -- if there is a firstn without a matching lastn local alias = first_alias:find ('given', 1, true) and 'given' or 'first'; -- get first or given form of the alias table.insert (z.message_tail, { utilities.set_message ( 'err_first_missing_last', { first_alias, -- param name of alias missing its mate first_alias:gsub (alias, {['first'] = 'last', ['given'] = 'surname'}), -- make param name appropriate to the alias form }, true ) } ); -- add this error message elseif not first and not last then -- if both firstn and lastn aren't found, are we done? count = count + 1; -- number of times we haven't found last and first if 2 <= count then -- two missing names and we give up break; -- normal exit or there is a two-name hole in the list; can't tell which end else -- we have last with or without a first local result; link = link_title_ok (link, link_alias, last, last_alias); -- check for improper wiki-markup if first then link = link_title_ok (link, link_alias, first, first_alias); -- check for improper wiki-markup end names[n] = {last = last, first = first, link = link, mask = mask, corporate = false}; -- add this name to our names list (corporate for |vauthors= only) n = n + 1; -- point to next location in the names table if 1 == count then -- if the previous name was missing table.insert( z.message_tail, { utilities.set_message ( 'err_missing_name', {list_name:match ("(%w+)List"):lower(), i - 1}, true ) } ); -- add this error message end count = 0; -- reset the counter, we're looking for two consecutive missing names end i = i + 1; -- point to next args location end return names, etal; -- all done, return our list of names and the etal flag end --[[--------------------------< 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') returns a list of languages that in some cases may include extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support code 'cbk' or name 'Chavacano'. Most (all?) of these languages are not used a 'language' codes per se, rather they are used as sub-domain names: cbk-zam.wikipedia.org. A list of language names and codes supported by fetchLanguageNames() can be found at Template:Citation Style documentation/language/doc Names that are included in the list will be found if that name is provided in the |language= parameter. For example, if |language=Chavacano de Zamboanga, that name will be found with the associated code 'cbk-zam'. When names are found and the associated code is not two or three characters, this function returns only the WikiMedia language name. Some language names have multiple entries under different codes: Aromanian has code rup and code roa-rup When this occurs, this function returns the language name and the 2- or 3-character code Adapted from code taken from Module:Check ISO 639-1. ]] local function get_iso639_code (lang, this_wiki_code) if cfg.lang_name_remap[lang:lower()] then -- if there is a remapped name (because MediaWiki uses something that we don't think is correct) return cfg.lang_name_remap[lang:lower()][1], cfg.lang_name_remap[lang:lower()][2]; -- for this language 'name', return a possibly new name and appropriate code end local ietf_code; -- because some languages have both IETF-like codes and ISO 639-like codes local ietf_name; local langlc = mw.ustring.lower (lang); -- lower-case version for comparisons for code, name in pairs (cfg.languages) do -- scan the list to see if we can find our language if langlc == mw.ustring.lower (name) then if 2 == #code or 3 == #code then -- two- or three-character codes only; IETF extensions not supported return name, code; -- so return the name and the code end ietf_code = code; -- remember that we found an IETF-like code and save its name ietf_name = name; -- but keep looking for a 2- or 3-char code end end -- didn't find name with 2- or 3-char code; if IETF-like code found return return ietf_code and ietf_name or lang; -- associated name; return original language text else end --[[-------------------< L A N G U A G E _ P A R A M E T E R >------------------ Gets language name from a provided two- or three-character ISO 639 code. If a code is recognized by MediaWiki, use the returned name; if not, then use the value that was provided with the language parameter. When |language= contains a recognized language (either code or name), the page is assigned to the category for that code: Category:Norwegian-language sources (no). For valid three-character code languages, the page is assigned to the single category for '639-2' codes: Category:CS1 ISO 639-2 language sources. Languages that are the same as the local wiki are not categorized. MediaWiki does not recognize three-character equivalents of two-character codes: code 'ar' is recognized but code 'ara' is not. This function supports multiple languages in the form |language=nb, French, th where the language names or codes are separated from each other by commas with optional space characters. ]] local function language_parameter (lang) local code; -- the two- or three-character language code local name; -- the language name local language_list = {}; -- table of language names to be rendered local names_table = {}; -- table made from the value assigned to |language= local this_wiki_name = mw.language.fetchLanguageName (cfg.this_wiki_code, cfg.this_wiki_code); -- get this wiki's language name names_table = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list for _, lang in ipairs (names_table) do -- reuse lang name = cfg.lang_code_remap[lang:lower()]; -- first see if this is a code that is not supported by MediaWiki but is in remap if name then -- there was a remapped code so if not lang:match ('^%a%a%a?%-x%-%a+$') then -- if not a private IETF tag lang = lang:gsub ('^(%a%a%a?)%-.*', '%1'); -- strip IETF tags from code end else lang = lang:gsub ('^(%a%a%a?)%-.*', '%1'); -- strip any IETF-like tags from code if 2 == lang:len() or 3 == lang:len() then -- if two-or three-character code name = mw.language.fetchLanguageName (lang:lower(), cfg.this_wiki_code); -- get language name if |language= is a proper code end end if utilities.is_set (name) then -- if |language= specified a valid code code = lang:lower(); -- save it else name, code = get_iso639_code (lang, cfg.this_wiki_code); -- attempt to get code from name (assign name here so that we are sure of proper capitalization) end if utilities.is_set (code) then -- only 2- or 3-character codes name = cfg.lang_code_remap[code] or name; -- override wikimedia when they misuse language codes/names if cfg.this_wiki_code ~= code then -- when the language is not the same as this wiki's language if 2 == code:len() then -- and is a two-character code utilities.add_prop_cat ('foreign_lang_source' .. code, {name, code}); -- categorize it; code appended to allow for multiple language categorization else -- or is a recognized language (but has a three-character code) utilities.add_prop_cat ('foreign_lang_source_2' .. code, {code}); -- categorize it differently TODO: support multiple three-character code categories per cs1|2 template end elseif cfg.local_lang_cat_enable then -- when the language and this wiki's language are the same and categorization is enabled utilities.add_prop_cat ('local_lang_source', {name, code}); -- categorize it end else utilities.set_message ('maint_unknown_lang'); -- add maint category if not already added end table.insert (language_list, name); name = ''; -- so we can reuse it end name = utilities.make_sep_list (#language_list, language_list); if this_wiki_name == name then return ''; -- if one language and that language is this wiki's return an empty string (no annotation) end return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)' --[[ TODO: should only return blank or name rather than full list so we can clean up the bunched parenthetical elements Language, Type, Format ]] end --[[----------------------< S E T _ C S 1 _ S T Y L E >------------------------- Set style settings for CS1 citation templates. Returns separator and postscript settings At en.wiki, for cs1: ps gets: '.' sep gets: '.' ]] local function set_cs1_style (ps) if not utilities.is_set (ps) then -- unless explicitly set to something ps = cfg.presentation['ps_cs1']; -- terminate the rendered citation end return cfg.presentation['sep_cs1'], ps; -- element separator end --[[-----------------------< S E T _ C S 2 _ S T Y L E >------------------------ Set style settings for CS2 citation templates. Returns separator, postscript, ref settings At en.wiki, for cs2: ps gets: '' (empty string - no terminal punctuation) sep gets: ',' ]] local function set_cs2_style (ps, ref) if not utilities.is_set (ps) then -- if |postscript= has not been set, set cs2 default ps = cfg.presentation['ps_cs2']; -- terminate the rendered citation end if not utilities.is_set (ref) then -- if |ref= is not set ref = "harv"; -- set default |ref=harv end return cfg.presentation['sep_cs2'], ps, ref; -- element separator end --[[---------< 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 = set_cs1_style (ps); 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 = set_cs1_style (ps); else -- anything but cs1 or cs2 sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass end if cfg.keywords_xlate[ps:lower()] == 'none' then -- if assigned value is 'none' then ps = ''; -- set to empty string end return sep, ps, ref end --[=[-------------------------< I S _ P D F >----------------------------------- Determines if a URL has the file extension that is one of the PDF file extensions used by [[MediaWiki:Common.css]] when applying the PDF icon to external links. returns true if file extension is one of the recognized extensions, else false ]=] local function is_pdf (url) return url:match ('%.pdf$') or url:match ('%.PDF$') or url:match ('%.pdf[%?#]') or url:match ('%.PDF[%?#]') or url:match ('%.PDF&#035') or url:match ('%.pdf&#035'); end --[[--------------------------< S T Y L E _ F O R M A T >----------------------- Applies CSS style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does not have a matching URL parameter. If the format parameter is not set and the URL contains a file extension that is recognized as a PDF document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with the appropriate styling. ]] local function style_format (format, url, fmt_param, url_param) if utilities.is_set (format) then format = utilities.wrap_style ('format', format); -- add leading space, parentheses, resize if not utilities.is_set (url) then format = format .. ' ' .. utilities.set_message ( 'err_format_missing_url', {fmt_param, url_param} ); -- add an error message end elseif is_pdf (url) then -- format is not set so if URL is a PDF file then format = utilities.wrap_style ('format', 'PDF'); -- set format to PDF else format = ''; -- empty string for concatenation end return format; end --[[---------------------< G E T _ D I S P L A Y _ N A M E S >------------------ Returns a number that defines the number of names displayed for author and editor name lists and a Boolean flag to indicate when et al. should be appended to the name list. When the value assigned to |display-xxxxors= is a number greater than or equal to zero, return the number and the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains some variant of the text 'et al.'). When the value assigned to |display-xxxxors= is the keyword 'etal', return a number that is one greater than the number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of the names in the name list followed by 'et al.' In all other cases, returns nil and the previous state of the 'etal' flag. inputs: max: A['DisplayAuthors'] or A['DisplayEditors']; a number or some flavor of etal count: #a or #e list_name: 'authors' or 'editors' etal: author_etal or editor_etal ]] local function get_display_names (max, count, list_name, etal) if utilities.is_set (max) then if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings max = count + 1; -- number of authors + 1 so display all author name plus et al. etal = true; -- overrides value set by extract_names() elseif max:match ('^%d+$') then -- if is a string of numbers max = tonumber (max); -- make it a number if max >= count then -- if |display-xxxxors= value greater than or equal to number of authors/editors table.insert( z.message_tail, {utilities.set_message ('err_disp_name', {cfg.special_case_translation [list_name], max}, true)}); -- add error message max = nil; end else -- not a valid keyword or number table.insert( z.message_tail, {utilities.set_message ('err_disp_name', {cfg.special_case_translation [list_name], max}, true)}); -- add error message max = nil; -- unset; as if |display-xxxxors= had not been set end end return max, etal; end --[[----------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >--------------- Adds error if |page=, |pages=, |quote-page=, |quote-pages= has what appears to be some form of p. or pp. abbreviation in the first characters of the parameter content. check page for extraneous p, p., pp, pp., pg, pg. at start of parameter value: good pattern: '^P[^%.P%l]' matches when page begins PX or P# but not Px where x and X are letters and # is a digit bad pattern: '^[Pp][PpGg]' matches when page begins pp, pP, Pp, PP, pg, pG, Pg, PG ]] local function extra_text_in_page_check (page) local good_pattern = '^P[^%.PpGg]'; -- OK to begin with uppercase P: P7 (page 7 of section P), but not p123 (page 123) local bad_pattern = '^[Pp][PpGg]?%.?[ %d]'; if not page:match (good_pattern) and (page:match (bad_pattern) or page:match ('^[Pp]ages?') or page:match ('^[Pp]gs.?')) then table.insert( z.message_tail, { utilities.set_message ( 'err_extra_text_pages')}); -- add error end end --[=[-------------------------< G E T _ V _ N A M E _ T A B L E >---------------------------------------------- split apart a |vauthors= or |veditors= parameter. This function allows for corporate names, wrapped in doubled parentheses to also have commas; in the old version of the code, the doubled parentheses were included in the rendered citation and in the metadata. Individual author names may be wikilinked |vauthors=Jones AB, [[E. B. White|White EB]], ((Black, Brown, and Co.)) ]=] local function get_v_name_table (vparam, output_table, output_link_table) local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas local wl_type, label, link; -- wl_type not used here; just a placeholder local i = 1; while name_table[i] do if name_table[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of corporate with one or more commas; this segment has the opening doubled parentheses local name = name_table[i]; i = i + 1; -- bump indexer to next segment while name_table[i] do name = name .. ', ' .. name_table[i]; -- concatenate with previous segments if name_table[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parentheses break; -- and done reassembling so end i = i + 1; -- bump indexer end table.insert (output_table, name); -- and add corporate name to the output table table.insert (output_link_table, ''); -- no wikilink else wl_type, label, link = utilities.is_wikilink (name_table[i]); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]] table.insert (output_table, label); -- add this name if 1 == wl_type then table.insert (output_link_table, label); -- simple wikilink [[D]] else table.insert (output_link_table, link); -- no wikilink or [[L|D]]; add this link if there is one, else empty string end end i = i + 1; end return output_table; end --[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >-------------------------------- This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and |xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does. Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance tests, are wrapped in doubled parentheses ((corporate name)) to suppress the format tests. Supports generational suffixes Jr, 2nd, 3rd, 4th–6th. This function sets the Vancouver error when a required comma is missing and when there is a space between an author's initials. ]] local function parse_vauthors_veditors (args, vparam, list_name) local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn= local v_name_table = {}; local v_link_table = {}; -- when name is wikilinked, targets go in this table local etal = false; -- return value set to true when we find some form of et al. vauthors parameter local last, first, link, mask, suffix; local corporate = false; vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period) v_name_table = get_v_name_table (vparam, v_name_table, v_link_table); -- names are separated by commas for i, v_name in ipairs(v_name_table) do first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor local accept_name; v_name, accept_name = utilities.has_accept_as_written (v_name); -- remove accept-this-as-written markup when it wraps all of <v_name> -- if v_name:match ('^%(%(.+%)%)$') then -- corporate authors are wrapped in doubled parentheses to suppress vanc formatting and error detection -- last = v_name:match ('^%(%((.+)%)%)$') -- remove doubled parentheses if accept_name then last = v_name; corporate = true; -- flag used in list_people() elseif string.find(v_name, "%s") then if v_name:find('[;%.]') then -- look for commonly occurring punctuation characters; add_vanc_error (cfg.err_msg_supl.punctuation); end local lastfirstTable = {} lastfirstTable = mw.text.split(v_name, "%s+") first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be initials or generational suffix if not mw.ustring.match (first, '^%u+$') then -- mw.ustring here so that later we will catch non-Latin characters suffix = first; -- not initials so assume that whatever we got is a generational suffix first = table.remove(lastfirstTable); -- get what should be the initials from the table end last = table.concat(lastfirstTable, ' ') -- returns a string that is the concatenation of all other names that are not initials and generational suffix if not utilities.is_set (last) then first = ''; -- unset last = v_name; -- last empty because something wrong with first add_vanc_error (cfg.err_msg_supl.name); end if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then add_vanc_error (cfg.err_msg_supl['missing comma']); -- matches last II last; the case when a comma is missing end if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test add_vanc_error (cfg.err_msg_supl.name); -- matches a space between two initials end else last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this? end if utilities.is_set (first) then if not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else add_vanc_error (cfg.err_msg_supl.initials); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials end is_good_vanc_name (last, first, suffix); -- check first and last before restoring the suffix which may have a non-Latin digit if utilities.is_set (suffix) then first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials suffix = ''; -- unset so we don't add this suffix to all subsequent names end else if not corporate then is_good_vanc_name (last, ''); end end link = utilities.select_one ( args, cfg.aliases[list_name .. '-Link'], 'err_redundant_parameters', i ) or v_link_table[i]; mask = utilities.select_one ( args, cfg.aliases[list_name .. '-Mask'], 'err_redundant_parameters', i ); names[i] = {last = last, first = first, link = link, mask = mask, corporate = corporate}; -- add this assembled name to our names list end return names, etal; -- all done, return our list of names end --[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------ Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or select one of |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list. Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest; |editorn= (and aliases) highest and |veditors= lowest (support for |editors= withdrawn) When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better way to do this, I just haven't discovered what that way is. Emits an error message when more than one xxxxor name source is provided. In this function, vxxxxors = vauthors or veditors; xxxxors = authors as appropriate. ]] local function select_author_editor_source (vxxxxors, xxxxors, args, list_name) local lastfirst = false; if utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice in case we have a |first1= without a |last1=; this ... utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors= utilities.select_one ( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or utilities.select_one ( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then lastfirst = true; end if (utilities.is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions (utilities.is_set (vxxxxors) and utilities.is_set (xxxxors)) or (true == lastfirst and utilities.is_set (xxxxors)) then local err_name; if 'AuthorList' == list_name then -- figure out which name should be used in error message err_name = 'author'; else err_name = 'editor'; end table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {err_name .. '-name-list parameters'}, true ) } ); -- add error message end if true == lastfirst then return 1 end; -- return a number indicating which author name source to use if utilities.is_set (vxxxxors) then return 2 end; if utilities.is_set (xxxxors) then return 3 end; return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last end --[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------ This function is used to validate a parameter's assigned value for those parameters that have only a limited number of allowable values (yes, y, true, live, dead, etc.). When the parameter value has not been assigned a value (missing or empty in the source template) the function returns the value specified by ret_val. If the parameter value is one of the list of allowed values returns the translated value; else, emits an error message and returns the value specified by ret_val. ]] local function is_valid_parameter_value (value, name, possible, ret_val) if not utilities.is_set (value) then return ret_val; -- an empty parameter is ok elseif utilities.in_array (value, possible) then return cfg.keywords_xlate[value]; -- return translation of parameter keyword else table.insert( z.message_tail, { utilities.set_message ( 'err_invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message return ret_val; end end --[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >---------------------------------------- This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space when the last character is not a sepc character or when the last three characters are not sepc followed by two closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a single space character. ]] local function terminate_name_list (name_list, sepc) if (string.sub (name_list, -3, -1) == sepc .. '. ') then -- if already properly terminated return name_list; -- just return the name list elseif (string.sub (name_list, -1, -1) == sepc) or (string.sub (name_list, -3, -1) == sepc .. ']]') then -- if last name in list ends with sepc char return name_list .. " "; -- don't add another else return name_list .. sepc .. ' '; -- otherwise terminate the name list end end --[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >---------------------------------------- returns the concatenation of the formatted volume and issue parameters as a single string; or formatted volume or formatted issue, or an empty string if neither are set. ]] local function format_volume_issue (volume, issue, cite_class, origin, sepc, lower) if not utilities.is_set (volume) and not utilities.is_set (issue) then return ''; end if 'magazine' == cite_class or (utilities.in_array (cite_class, {'citation', 'map'}) and 'magazine' == origin) then if utilities.is_set (volume) and utilities.is_set (issue) then return wrap_msg ('vol-no', {sepc, hyphen_to_dash (volume), issue}, lower); elseif utilities.is_set (volume) then return wrap_msg ('vol', {sepc, hyphen_to_dash (volume)}, lower); else return wrap_msg ('issue', {sepc, issue}, lower); end end if 'podcast' == cite_class and utilities.is_set (issue) then return wrap_msg ('issue', {sepc, issue}, lower); end local vol = ''; -- here for all cites except magazine if utilities.is_set (volume) then if volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$') then -- volume value is all digits or all uppercase Roman numerals vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, volume}); -- render in bold face elseif (4 < mw.ustring.len(volume)) then -- not all digits or Roman numerals and longer than 4 characters vol = utilities.substitute (cfg.messages['j-vol'], {sepc, hyphen_to_dash (volume)}); -- not bold utilities.add_prop_cat ('long_vol'); else -- four or less characters vol = utilities.substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash (volume)}); -- bold end end if utilities.is_set (issue) then return vol .. utilities.substitute (cfg.messages['j-issue'], issue); end return vol; end --[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >----------------------------------------- adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings. The return order is: page, pages, sheet, sheets Singular has priority over plural when both are provided. ]] local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower) if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators if utilities.is_set (sheet) then if 'journal' == origin then return '', '', wrap_msg ('j-sheet', sheet, lower), ''; else return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), ''; end elseif utilities.is_set (sheets) then if 'journal' == origin then return '', '', '', wrap_msg ('j-sheets', sheets, lower); else return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower); end end end local is_journal = 'journal' == cite_class or (utilities.in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin); if utilities.is_set (page) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], page), '', '', ''; elseif not nopp then return utilities.substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', ''; else return utilities.substitute (cfg.messages['nopp'], {sepc, page}), '', '', ''; end elseif utilities.is_set (pages) then if is_journal then return utilities.substitute (cfg.messages['j-page(s)'], pages), '', '', ''; elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number return '', utilities.substitute (cfg.messages['p-prefix'], {sepc, pages}), '', ''; elseif not nopp then return '', utilities.substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', ''; else return '', utilities.substitute (cfg.messages['nopp'], {sepc, pages}), '', ''; end end return '', '', '', ''; -- return empty strings end --[[--------------------------< I N S O U R C E _ L O C _ G E T >---------------------------------------------- returns one of the in-source locators: page, pages, or at. If any of these are interwiki links to Wikisource, returns the label portion of the interwiki-link as plain text for use in COinS. This COinS thing is done because here we convert an interwiki-link to an external link and add an icon span around that; get_coins_pages() doesn't know about the span. TODO: should it? TODO: add support for sheet and sheets?; streamline; TODO: make it so that this function returns only one of the three as the single in-source (the return value assigned to a new name)? ]] local function insource_loc_get (page, pages, at) local ws_url, ws_label, coins_pages, L; -- for Wikisource interwiki-links; TODO: this corrupts page metadata (span remains in place after cleanup; fix there?) if utilities.is_set (page) then if utilities.is_set (pages) or utilities.is_set (at) then pages = ''; -- unset the others at = ''; end extra_text_in_page_check (page); -- add this page to maint cat if |page= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (page); -- make ws URL from |page= interwiki link; link portion L becomes tooltip label if ws_url then page = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in page'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? page = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, page}); coins_pages = ws_label; end elseif utilities.is_set (pages) then if utilities.is_set (at) then at = ''; -- unset end extra_text_in_page_check (pages); -- add this page to maint cat if |pages= value begins with what looks like p., pp., etc. ws_url, ws_label, L = wikisource_url_make (pages); -- make ws URL from |pages= interwiki link; link portion L becomes tooltip label if ws_url then pages = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in pages'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? pages = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, pages}); coins_pages = ws_label; end elseif utilities.is_set (at) then ws_url, ws_label, L = wikisource_url_make (at); -- make ws URL from |at= interwiki link; link portion L becomes tooltip label if ws_url then at = external_link (ws_url, ws_label .. '&nbsp;', 'ws link in at'); -- space char after label to move icon away from in-source text; TODO: a better way to do this? at = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, at}); coins_pages = ws_label; end end return page, pages, at, coins_pages; end --[=[-------------------------< A R C H I V E _ U R L _ C H E C K >-------------------------------------------- Check archive.org URLs to make sure they at least look like they are pointing at valid archives and not to the save snapshot URL or to calendar pages. When the archive URL is 'https://web.archive.org/save/' (or http://...) archive.org saves a snapshot of the target page in the URL. That is something that Wikipedia should not allow unwitting readers to do. When the archive.org URL does not have a complete timestamp, archive.org chooses a snapshot according to its own algorithm or provides a calendar 'search' result. [[WP:ELNO]] discourages links to search results. This function looks at the value assigned to |archive-url= and returns empty strings for |archive-url= and |archive-date= and an error message when: |archive-url= holds an archive.org save command URL |archive-url= is an archive.org URL that does not have a complete timestamp (YYYYMMDDhhmmss 14 digits) in the correct place otherwise returns |archive-url= and |archive-date= There are two mostly compatible archive.org URLs: //web.archive.org/<timestamp>... -- the old form //web.archive.org/web/<timestamp>... -- the new form The old form does not support or map to the new form when it contains a display flag. There are four identified flags ('id_', 'js_', 'cs_', 'im_') but since archive.org ignores others following the same form (two letters and an underscore) we don't check for these specific flags but we do check the form. This function supports a preview mode. When the article is rendered in preview mode, this function may return a modified archive URL: for save command errors, return undated wildcard (/*/) for timestamp errors when the timestamp has a wildcard, return the URL unmodified for timestamp errors when the timestamp does not have a wildcard, return with timestamp limited to six digits plus wildcard (/yyyymm*/) ]=] local function archive_url_check (url, date) local err_msg = ''; -- start with the error message empty local path, timestamp, flag; -- portions of the archive.org URL if (not url:match('//web%.archive%.org/')) and (not url:match('//liveweb%.archive%.org/')) then -- also deprecated liveweb Wayback machine URL return url, date; -- not an archive.org archive, return ArchiveURL and ArchiveDate end if url:match('//web%.archive%.org/save/') then -- if a save command URL, we don't want to allow saving of the target page err_msg = cfg.err_msg_supl.save; url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL elseif url:match('//liveweb%.archive%.org/') then err_msg = cfg.err_msg_supl.liveweb; else path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the URL parts for evaluation if not utilities.is_set (timestamp) or 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here err_msg = cfg.err_msg_supl.timestamp; if '*' ~= flag then url=url:gsub ('(//web%.archive%.org/[^%d]*%d?%d?%d?%d?%d?%d?)[^/]*', '%1*', 1) -- for preview, modify ts to be yearmo* max (0-6 digits plus splat) end elseif utilities.is_set (path) and 'web/' ~= path then -- older archive URLs do not have the extra 'web/' path element err_msg = cfg.err_msg_supl.path; elseif utilities.is_set (flag) and not utilities.is_set (path) then -- flag not allowed with the old form URL (without the 'web/' path element) err_msg = cfg.err_msg_supl.flag; elseif utilities.is_set (flag) and not flag:match ('%a%a_') then -- flag if present must be two alpha characters and underscore (requires 'web/' path element) err_msg = cfg.err_msg_supl.flag; else return url, date; -- return ArchiveURL and ArchiveDate end end -- if here, something not right so table.insert( z.message_tail, { utilities.set_message ( 'err_archive_url', {err_msg}, true ) } ); -- add error message and if utilities.is_set (Frame:preprocess('{{REVISIONID}}')) then return '', ''; -- return empty strings for ArchiveURL and ArchiveDate else return url, date; -- preview mode so return ArchiveURL and ArchiveDate end end --[[--------------------------< P L A C E _ C H E C K >-------------------------------------------------------- check |place=, |publication-place=, |location= to see if these params include digits. This function added because many editors misuse location to specify the in-source location (|page(s)= and |at= are supposed to do that) returns the original parameter value without modification; added maint cat when parameter value contains digits ]] local function place_check (param_val) if not utilities.is_set (param_val) then -- parameter empty or omitted return param_val; -- return that empty state end if mw.ustring.find (param_val, '%d') then -- not empty, are there digits in the parameter value utilities.set_message ('maint_location'); -- yep, add maint cat end return param_val; -- and done end --[[--------------------------< I S _ G E N E R I C _ T I T L E >---------------------------------------------- compares |title= value against list of known generic title patterns. Returns true when pattern matches; nil else the k/v pairs in 'generic_titles' each contain two tables, one for English and one for another 'local' language Each of those tables contain another table that holds the string or pattern (whole title or title fragment) in index [1]. index [2] is a Boolean that tells string.find() or mw.ustring.find() to do plain-text search (true) or a pattern search (false). The intent of all this complexity is to make these searches as fast as possible so that we don't run out of processing time on very large articles. ]] local function is_generic_title (title) title = mw.ustring.lower(title); -- switch title to lower case for _, generic_title in ipairs (cfg.special_case_translation['generic_titles']) do -- spin through the list of known generic title fragments if title:find (generic_title['en'][1], 1, generic_title['en'][2]) then return true; -- found English generic title so done elseif generic_title['local'] then -- to keep work load down, generic_title['local'] should be nil except when there is a local version of the generic title if mw.ustring.find (title, generic_title['local'][1], 1, generic_title['local'][2]) then -- mw.ustring() because might not be Latin script return true; -- found local generic title so done end end end end --[[--------------------------< I S _ A R C H I V E D _ C O P Y >---------------------------------------------- compares |title= to 'Archived copy' (placeholder added by bots that can't find proper title); if matches, return true; nil else ]] local function is_archived_copy (title) title = mw.ustring.lower(title); -- switch title to lower case if title:find (cfg.special_case_translation.archived_copy.en) then -- if title is 'Archived copy' return true; elseif cfg.special_case_translation.archived_copy['local'] then if mw.ustring.find (title, cfg.special_case_translation.archived_copy['local']) then -- mw.ustring() because might not be Latin script return true; end end end --[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------ This is the main function doing the majority of the citation formatting. ]] local function citation0( config, args) --[[ Load Input Parameters The argument_wrapper facilitates the mapping of multiple aliases to single internal variable. ]] local A = argument_wrapper ( args ); local i -- Pick out the relevant fields from the arguments. Different citation templates -- define different field names for the same underlying things. local Mode = is_valid_parameter_value (A['Mode'], A:ORIGIN('Mode'), cfg.keywords_lists['mode'], ''); local author_etal; local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors= local Authors; local NameListStyle = is_valid_parameter_value (A['NameListStyle'], A:ORIGIN('NameListStyle'), cfg.keywords_lists['name-list-style'], ''); local Collaboration = A['Collaboration']; do -- to limit scope of selected local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList'); if 1 == selected then a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be a, author_etal = parse_vauthors_veditors (args, args.vauthors, 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn= elseif 3 == selected then Authors = A['Authors']; -- use content of |authors= if 'authors' == A:ORIGIN('Authors') then -- but add a maint cat if the parameter is |authors= utilities.set_message ('maint_authors'); -- because use of this parameter is discouraged; what to do about the aliases is a TODO: end end if utilities.is_set (Collaboration) then author_etal = true; -- so that |display-authors=etal not required end end local Others = A['Others']; local editor_etal; local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors= local Editors; do -- to limit scope of selected local selected = select_author_editor_source (A['Veditors'], nil, args, 'EditorList'); -- support for |editors= withdrawn if 1 == selected then e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn= elseif 2 == selected then NameListStyle = 'vanc'; -- override whatever |name-list-style= might be e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn= end end local translator_etal; local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs local Translators; -- assembled translators name list t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn= local interviewer_etal; local interviewers_list = {}; local Interviewers; -- used later interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters local contributor_etal; local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs local Contributors; -- assembled contributors name list local Chapter = A['Chapter']; -- done here so that we have access to |contribution= from |chapter= aliases local Chapter_origin = A:ORIGIN ('Chapter'); local Contribution; -- because contribution is required for contributor(s) if 'contribution' == A:ORIGIN ('Chapter') then Contribution = A['Chapter']; -- get the name of the contribution end if utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (A['Periodical']) then -- |contributor= and |contribution= only supported in book cites c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn= if 0 < #c then if not utilities.is_set (Contribution) then -- |contributor= requires |contribution= table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_missing_required_param', 'contribution')}); -- add missing contribution error message c = {}; -- blank the contributors' table; it is used as a flag later end if 0 == #a then -- |contributor= requires |author= table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_missing_required_param', 'author')}); -- add missing author error message c = {}; -- blank the contributors' table; it is used as a flag later end end else -- if not a book cite if utilities.select_one (args, cfg.aliases['ContributorList-Last'], 'err_redundant_parameters', 1 ) then -- are there contributor name list parameters? table.insert( z.message_tail, { utilities.set_message ( 'err_contributor_ignored')}); -- add contributor ignored error message end Contribution = nil; -- unset end if utilities.is_set (Others) then if 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor= utilities.set_message ('maint_others'); end end local Year = A['Year']; local PublicationDate = A['PublicationDate']; local OrigDate = A['OrigDate']; local Date = A['Date']; local LayDate = A['LayDate']; ------------------------------------------------- Get title data local Title = A['Title']; local ScriptTitle = A['ScriptTitle']; local BookTitle = A['BookTitle']; local Conference = A['Conference']; local TransTitle = A['TransTitle']; local TransTitle_origin = A:ORIGIN ('TransTitle'); local TitleNote = A['TitleNote']; local TitleLink = A['TitleLink']; local auto_select = ''; -- default is auto local accept_link; TitleLink, accept_link = utilities.has_accept_as_written(TitleLink, true); -- test for accept-this-as-written markup if (not accept_link) and utilities.in_array (TitleLink, {'none', 'pmc', 'doi'}) then -- check for special keywords auto_select = TitleLink; -- remember selection for later TitleLink = ''; -- treat as if |title-link= would have been empty end TitleLink = link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wiki-markup in |title-link= or wiki-markup in |title= when |title-link= is set local Section = ''; -- {{cite map}} only; preset to empty string for concatenation if not used if 'map' == config.CitationClass and 'section' == A:ORIGIN ('Chapter') then Section = A['Chapter']; -- get |section= from |chapter= alias list; |chapter= and the other aliases not supported in {{cite map}} Chapter = ''; -- unset for now; will be reset later from |map= if present end local ScriptChapter = A['ScriptChapter']; local ScriptChapter_origin = A:ORIGIN ('ScriptChapter'); local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode local TransChapter = A['TransChapter']; local TransChapter_origin = A:ORIGIN ('TransChapter'); local TitleType = A['TitleType']; local Degree = A['Degree']; local Docket = A['Docket']; local ArchiveFormat = A['ArchiveFormat']; local ArchiveDate; local ArchiveURL; ArchiveURL, ArchiveDate = archive_url_check (A['ArchiveURL'], A['ArchiveDate']) local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], ''); local URL = A['URL'] local URL_origin = A:ORIGIN('URL'); -- get name of parameter that holds URL local ChapterURL = A['ChapterURL']; local ChapterURL_origin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL local ConferenceFormat = A['ConferenceFormat']; local ConferenceURL = A['ConferenceURL']; local ConferenceURL_origin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL local Periodical = A['Periodical']; local Periodical_origin = ''; if utilities.is_set (Periodical) then Periodical_origin = A:ORIGIN('Periodical'); -- get the name of the periodical parameter local i; Periodical, i = utilities.strip_apostrophe_markup (Periodical); -- strip apostrophe markup so that metadata isn't contaminated if i then -- non-zero when markup was stripped so emit an error message table.insert( z.message_tail, {utilities.set_message ('err_apostrophe_markup', {Periodical_origin}, true)}); end end if 'mailinglist' == config.CitationClass then -- special case for {{cite mailing list}} if utilities.is_set (Periodical) and utilities.is_set (A ['MailingList']) then -- both set emit an error table.insert( z.message_tail, {utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', Periodical_origin) .. ' and ' .. utilities.wrap_style ('parameter', 'mailinglist')}, true )}); end Periodical = A ['MailingList']; -- error or no, set Periodical to |mailinglist= value because this template is {{cite mailing list}} Periodical_origin = A:ORIGIN('MailingList'); end local ScriptPeriodical = A['ScriptPeriodical']; local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical'); -- web and news not tested for now because of -- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors? if not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter -- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message if p[config.CitationClass] then table.insert( z.message_tail, {utilities.set_message ('err_missing_periodical', {config.CitationClass, p[config.CitationClass]}, true)}); end end local TransPeriodical = A['TransPeriodical']; local TransPeriodical_origin = A:ORIGIN ('TransPeriodical'); local Series = A['Series']; local Volume; local Issue; local Page; local Pages; local At; if 'citation' == config.CitationClass then if utilities.is_set (Periodical) then if not utilities.in_array (Periodical_origin, {'website', 'mailinglist'}) then -- {{citation}} does not render volume for these 'periodicals' Volume = A['Volume']; -- but does for all other 'periodicals' end elseif utilities.is_set (ScriptPeriodical) then if 'script-website' ~= ScriptPeriodical_origin then -- {{citation}} does not render volume for |script-website= Volume = A['Volume']; -- but does for all other 'periodicals' end else Volume = A['Volume']; -- and does for non-'periodical' cites end elseif utilities.in_array (config.CitationClass, cfg.templates_using_volume) then -- render |volume= for cs1 according to the configuration settings Volume = A['Volume']; end if 'citation' == config.CitationClass then if utilities.is_set (Periodical) and utilities.in_array (Periodical_origin, {'journal', 'magazine', 'newspaper', 'periodical', 'work'}) or -- {{citation}} renders issue for these 'periodicals' utilities.is_set (ScriptPeriodical) and utilities.in_array (ScriptPeriodical_origin, {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work'}) then -- and these 'script-periodicals' Issue = hyphen_to_dash (A['Issue']); end elseif utilities.in_array (config.CitationClass, cfg.templates_using_issue) then -- conference & map books do not support issue; {{citation}} listed here because included in settings table if not (utilities.in_array (config.CitationClass, {'conference', 'map', 'citation'}) and not (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical))) then Issue = hyphen_to_dash (A['Issue']); end end local Position = ''; if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) then Page = A['Page']; Pages = hyphen_to_dash (A['Pages']); At = A['At']; end local QuotePage = A['QuotePage']; local QuotePages = hyphen_to_dash (A['QuotePages']); local Edition = A['Edition']; local PublicationPlace = place_check (A['PublicationPlace'], A:ORIGIN('PublicationPlace')); local Place = place_check (A['Place'], A:ORIGIN('Place')); local PublisherName = A['PublisherName']; local PublisherName_origin = A:ORIGIN('PublisherName'); if utilities.is_set (PublisherName) then local i = 0; PublisherName, i = utilities.strip_apostrophe_markup (PublisherName); -- strip apostrophe markup so that metadata isn't contaminated; publisher is never italicized if i then -- non-zero when markup was stripped so emit an error message table.insert( z.message_tail, {utilities.set_message ('err_apostrophe_markup', {PublisherName_origin}, true)}); end end local Newsgroup = A['Newsgroup']; -- TODO: strip apostrophe markup? local Newsgroup_origin = A:ORIGIN('Newsgroup'); if 'newsgroup' == config.CitationClass then if utilities.is_set (PublisherName) then -- general use parameter |publisher= not allowed in cite newsgroup local error_text, error_state = utilities.set_message ('err_parameter_ignored', {PublisherName_origin}, true); if utilities.is_set (error_text) then table.insert( z.message_tail, {error_text, error_state} ); end end PublisherName = nil; -- ensure that this parameter is unset for the time being; will be used again after COinS end local UrlAccess = is_valid_parameter_value (A['UrlAccess'], A:ORIGIN('UrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (URL) and utilities.is_set (UrlAccess) then UrlAccess = nil; table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {'url'}, true ) } ); end local ChapterUrlAccess = is_valid_parameter_value (A['ChapterUrlAccess'], A:ORIGIN('ChapterUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (ChapterURL) and utilities.is_set (ChapterUrlAccess) then ChapterUrlAccess = nil; table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')}, true ) } ); end local MapUrlAccess = is_valid_parameter_value (A['MapUrlAccess'], A:ORIGIN('MapUrlAccess'), cfg.keywords_lists['url-access'], nil); if not utilities.is_set (A['MapURL']) and utilities.is_set (MapUrlAccess) then MapUrlAccess = nil; table.insert( z.message_tail, { utilities.set_message ( 'err_param_access_requires_param', {'map-url'}, true ) } ); end local Via = A['Via']; local AccessDate = A['AccessDate']; local Agency = A['Agency']; local Language = A['Language']; local Format = A['Format']; local ChapterFormat = A['ChapterFormat']; local DoiBroken = A['DoiBroken']; local ID = A['ID']; local ASINTLD = A['ASINTLD']; local Embargo = A['Embargo']; local Class = A['Class']; -- arxiv class identifier local Quote = A['Quote']; local ScriptQuote = A['ScriptQuote']; local TransQuote = A['TransQuote']; local LayFormat = A['LayFormat']; local LayURL = A['LayURL']; local LaySource = A['LaySource']; local Transcript = A['Transcript']; local TranscriptFormat = A['TranscriptFormat']; local TranscriptURL = A['TranscriptURL'] local TranscriptURL_origin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil); -- local variables that are not cs1 parameters local use_lowercase; -- controls capitalization of certain static text local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language local anchor_year; -- used in the CITEREF identifier local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification local DF = is_valid_parameter_value (A['DF'], A:ORIGIN('DF'), cfg.keywords_lists['df'], ''); if not utilities.is_set (DF) then DF = cfg.global_df; -- local |df= if present overrides global df set by {{use xxx date}} template end local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma local PostScript; local Ref = A['Ref']; if 'harv' == Ref then utilities.set_message ('maint_ref_harv'); -- add maint cat to identify templates that have this now-extraneous param value elseif not utilities.is_set (Ref) then Ref = 'harv'; -- set as default when not set externally end sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], Ref, config.CitationClass); use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text -- check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories if not utilities.is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page if utilities.in_array (this_page.nsText, cfg.uncategorized_namespaces) then no_tracking_cats = "true"; -- set no_tracking_cats end for _, v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns if this_page.text:match (v) then -- test page name against each pattern no_tracking_cats = "true"; -- set no_tracking_cats break; -- bail out if one is found end end end -- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it) utilities.select_one (args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'err_redundant_parameters'); -- this is a dummy call simply to get the error message and category local coins_pages; Page, Pages, At, coins_pages = insource_loc_get (Page, Pages, At); local NoPP = is_valid_parameter_value (A['NoPP'], A:ORIGIN('NoPP'), cfg.keywords_lists['yes_true_y'], nil); if utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- both |publication-place= and |place= (|location=) allowed if different utilities.add_prop_cat ('location test'); -- add property cat to evaluate how often PublicationPlace and Place are used together if PublicationPlace == Place then Place = ''; -- unset; don't need both if they are the same end elseif not utilities.is_set (PublicationPlace) and utilities.is_set (Place) then -- when only |place= (|location=) is set ... PublicationPlace = Place; -- promote |place= (|location=) to |publication-place end if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same --[[ Parameter remapping for cite encyclopedia: When the citation has these parameters: |encyclopedia= and |title= then map |title= to |article= and |encyclopedia= to |title= |encyclopedia= and |article= then map |encyclopedia= to |title= |trans-title= maps to |trans-chapter= when |title= is re-mapped |url= maps to |chapter-url= when |title= is remapped All other combinations of |encyclopedia=, |title=, and |article= are not modified ]] local Encyclopedia = A['Encyclopedia']; -- used as a flag by this module and by ~/COinS if utilities.is_set (Encyclopedia) then -- emit error message when Encyclopedia set but template is other than {{cite encyclopedia}} or {{citation}} if 'encyclopaedia' ~= config.CitationClass and 'citation' ~= config.CitationClass then table.insert (z.message_tail, {utilities.set_message ('err_parameter_ignored', {A:ORIGIN ('Encyclopedia')}, true)}); Encyclopedia = nil; -- unset because not supported by this template end end if ('encyclopaedia' == config.CitationClass) or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Periodical) and utilities.is_set (Encyclopedia) then -- when both set emit an error table.insert (z.message_tail, {utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', A:ORIGIN ('Encyclopedia')) .. ' and ' .. utilities.wrap_style ('parameter', Periodical_origin)}, true )}); end if utilities.is_set (Encyclopedia) then Periodical = Encyclopedia; -- error or no, set Periodical to Encyclopedia; allow periodical without encyclopedia Periodical_origin = A:ORIGIN ('Encyclopedia'); end if utilities.is_set (Periodical) then -- Periodical is set when |encyclopedia= is set if utilities.is_set (Title) or utilities.is_set (ScriptTitle) then if not utilities.is_set (Chapter) then Chapter = Title; -- |encyclopedia= and |title= are set so map |title= to |article= and |encyclopedia= to |title= ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle') TransChapter = TransTitle; ChapterURL = URL; ChapterURL_origin = A:ORIGIN('URL') ChapterUrlAccess = UrlAccess; if not utilities.is_set (ChapterURL) and utilities.is_set (TitleLink) then Chapter = utilities.make_wikilink (TitleLink, Chapter); end Title = Periodical; ChapterFormat = Format; Periodical = ''; -- redundant so unset TransTitle = ''; URL = ''; Format = ''; TitleLink = ''; ScriptTitle = ''; end elseif utilities.is_set (Chapter) then -- |title= not set Title = Periodical; -- |encyclopedia= set and |article= set so map |encyclopedia= to |title= Periodical = ''; -- redundant so unset end end end -- special case for cite techreport. if (config.CitationClass == "techreport") then -- special case for cite techreport if utilities.is_set (A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue' if not utilities.is_set (ID) then -- can we use ID for the "number"? ID = A['Number']; -- yes, use it else -- ID has a value so emit error message table.insert( z.message_tail, { utilities.set_message ('err_redundant_parameters', {utilities.wrap_style ('parameter', 'id') .. ' and ' .. utilities.wrap_style ('parameter', 'number')}, true )}); end end end -- Account for the oddity that is {{cite conference}}, before generation of COinS data. if 'conference' == config.CitationClass then if utilities.is_set (BookTitle) then Chapter = Title; Chapter_origin = 'title'; -- ChapterLink = TitleLink; -- |chapter-link= is deprecated ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = URL_origin; URL_origin = ''; ChapterFormat = Format; TransChapter = TransTitle; TransChapter_origin = TransTitle_origin; Title = BookTitle; Format = ''; -- TitleLink = ''; TransTitle = ''; URL = ''; end elseif 'speech' ~= config.CitationClass then Conference = ''; -- not cite conference or cite speech so make sure this is empty string end -- cite map oddities local Cartography = ""; local Scale = ""; local Sheet = A['Sheet'] or ''; local Sheets = A['Sheets'] or ''; if config.CitationClass == "map" then if utilities.is_set (Chapter) then table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'map') .. ' and ' .. utilities.wrap_style ('parameter', Chapter_origin)}, true ) } ); -- add error message end Chapter = A['Map']; Chapter_origin = A:ORIGIN('Map'); ChapterURL = A['MapURL']; ChapterURL_origin = A:ORIGIN('MapURL'); TransChapter = A['TransMap']; ScriptChapter = A['ScriptMap'] ScriptChapter_origin = A:ORIGIN('ScriptMap') ChapterUrlAccess = MapUrlAccess; ChapterFormat = A['MapFormat']; Cartography = A['Cartography']; if utilities.is_set ( Cartography ) then Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase); end Scale = A['Scale']; if utilities.is_set ( Scale ) then Scale = sepc .. " " .. Scale; end end -- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data. if 'episode' == config.CitationClass or 'serial' == config.CitationClass then local SeriesLink = A['SeriesLink']; SeriesLink = link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wiki-markup in |series-link= or wiki-markup in |series= when |series-link= is set local Network = A['Network']; local Station = A['Station']; local s, n = {}, {}; -- do common parameters first if utilities.is_set (Network) then table.insert(n, Network); end if utilities.is_set (Station) then table.insert(n, Station); end ID = table.concat(n, sepc .. ' '); if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}} local Season = A['Season']; local SeriesNumber = A['SeriesNumber']; if utilities.is_set (Season) and utilities.is_set (SeriesNumber) then -- these are mutually exclusive so if both are set table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'season') .. ' and ' .. utilities.wrap_style ('parameter', 'seriesno')}, true ) } ); -- add error message SeriesNumber = ''; -- unset; prefer |season= over |seriesno= end -- assemble a table of parts concatenated later into Series if utilities.is_set (Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end if utilities.is_set (SeriesNumber) then table.insert(s, wrap_msg ('seriesnum', SeriesNumber, use_lowercase)); end if utilities.is_set (Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end Issue = ''; -- unset because this is not a unique parameter Chapter = Title; -- promote title parameters to chapter ScriptChapter = ScriptTitle; ScriptChapter_origin = A:ORIGIN('ScriptTitle'); ChapterLink = TitleLink; -- alias |episode-link= TransChapter = TransTitle; ChapterURL = URL; ChapterUrlAccess = UrlAccess; ChapterURL_origin = A:ORIGIN('URL'); Title = Series; -- promote series to title TitleLink = SeriesLink; Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number if utilities.is_set (ChapterLink) and not utilities.is_set (ChapterURL) then -- link but not URL Chapter = utilities.make_wikilink (ChapterLink, Chapter); elseif utilities.is_set (ChapterLink) and utilities.is_set (ChapterURL) then -- if both are set, URL links episode; Series = utilities.make_wikilink (ChapterLink, Series); end URL = ''; -- unset TransTitle = ''; ScriptTitle = ''; else -- now oddities that are cite serial Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday? if utilities.is_set (Series) and utilities.is_set (SeriesLink) then Series = utilities.make_wikilink (SeriesLink, Series); end Series = utilities.wrap_style ('italic-title', Series); -- series is italicized end end -- end of {{cite episode}} stuff -- handle type parameter for those CS1 citations that have default values if utilities.in_array (config.CitationClass, {"AV-media-notes", "interview", "mailinglist", "map", "podcast", "pressrelease", "report", "techreport", "thesis"}) then TitleType = set_titletype (config.CitationClass, TitleType); if utilities.is_set (Degree) and "Thesis" == TitleType then -- special case for cite thesis TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower(); end end if utilities.is_set (TitleType) then -- if type parameter is specified TitleType = utilities.substitute ( cfg.messages['type'], TitleType); -- display it in parentheses -- TODO: Hack on TitleType to fix bunched parentheses problem end -- legacy: promote PublicationDate to Date if neither Date nor Year are set. local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging if not utilities.is_set (Date) then Date = Year; -- promote Year to Date Year = nil; -- make nil so Year as empty string isn't used for CITEREF if not utilities.is_set (Date) and utilities.is_set (PublicationDate) then -- use PublicationDate when |date= and |year= are not set Date = PublicationDate; -- promote PublicationDate to Date PublicationDate = ''; -- unset, no longer needed Date_origin = A:ORIGIN('PublicationDate'); -- save the name of the promoted parameter else Date_origin = A:ORIGIN('Year'); -- save the name of the promoted parameter end else Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging end if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation --[[ Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where we get the date used in the metadata. Date validation supporting code is in Module:Citation/CS1/Date_validation ]] do -- create defined block to contain local variables error_message, date_parameters_list, mismatch local error_message = ''; -- AirDate has been promoted to Date so not necessary to check it local date_parameters_list = { ['access-date'] = {val = AccessDate, name = A:ORIGIN ('AccessDate')}, ['archive-date'] = {val = ArchiveDate, name = A:ORIGIN ('ArchiveDate')}, ['date'] = {val = Date, name = Date_origin}, ['doi-broken-date'] = {val = DoiBroken, name = A:ORIGIN ('DoiBroken')}, ['pmc-embargo-date'] = {val = Embargo, name = A:ORIGIN ('Embargo')}, ['lay-date'] = {val = LayDate, name = A:ORIGIN ('LayDate')}, ['publication-date'] = {val = PublicationDate, name = A:ORIGIN ('PublicationDate')}, ['year'] = {val = Year, name = A:ORIGIN ('Year')}, }; local error_list = {}; anchor_year, Embargo = validation.dates(date_parameters_list, COinS_date, error_list); -- start temporary Julian / Gregorian calendar uncertainty categorization if COinS_date.inter_cal_cat then utilities.add_prop_cat ('jul_greg_uncertainty'); end -- end temporary Julian / Gregorian calendar uncertainty categorization if utilities.is_set (Year) and utilities.is_set (Date) then -- both |date= and |year= not normally needed; local mismatch = validation.year_date_check (Year, Date); if 0 == mismatch then -- |year= does not match a year-value in |date= table.insert (error_list, '<code class="cs1-code">&#124;year= / &#124;date= mismatch</code>'); elseif 1 == mismatch then -- |year= matches year-value in |date= utilities.set_message ('maint_date_year'); -- add a maint cat end end if 0 == #error_list then -- error free dates only; 0 when error_list is empty local modified = false; -- flag if utilities.is_set (DF) then -- if we need to reformat dates modified = validation.reformat_dates (date_parameters_list, DF); -- reformat to DF format, use long month names if appropriate end if true == validation.date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate modified = true; utilities.set_message ('maint_date_format'); -- hyphens were converted so add maint category end -- for those wikis that can and want to have English date names translated to the local language, -- uncomment the next three lines. Not supported by en.wiki (for obvious reasons) -- set validation.date_name_xlate() second argument to true to translate English digits to local digits (will translate ymd dates) -- if validation.date_name_xlate (date_parameters_list, false) then -- modified = true; -- end if modified then -- if the date_parameters_list values were modified AccessDate = date_parameters_list['access-date'].val; -- overwrite date holding parameters with modified values ArchiveDate = date_parameters_list['archive-date'].val; Date = date_parameters_list['date'].val; DoiBroken = date_parameters_list['doi-broken-date'].val; LayDate = date_parameters_list['lay-date'].val; PublicationDate = date_parameters_list['publication-date'].val; end else table.insert (z.message_tail, {utilities.set_message ('err_bad_date', {utilities.make_sep_list (#error_list, error_list)}, true)}); -- add this error message end end -- end of do local ID_list = {}; -- sequence table of rendered identifiers local ID_list_coins = {}; -- table of identifiers and their values from args; key is same as cfg.id_handlers's key ID_list, ID_list_coins = identifiers.identifier_lists_get (args, {DoiBroken = DoiBroken, ASINTLD = ASINTLD, Embargo = Embargo, Class = Class}); if utilities.is_set (DoiBroken) and not ID_list_coins['DOI'] then table.insert (z.message_tail, {utilities.set_message ('err_doibroken_missing_doi', A:ORIGIN('DoiBroken'))}); end -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite ssrn}}, before generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list) then if not utilities.is_set (ID_list_coins[config.CitationClass:upper()]) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv= & |citeseerx= required for their templates table.insert (z.message_tail, {utilities.set_message ('err_' .. config.CitationClass .. '_missing', {}, true)}); -- add error message end Periodical = ({['arxiv'] = 'arXiv', ['biorxiv'] = 'bioRxiv', ['citeseerx'] = 'CiteSeerX', ['ssrn'] = 'Social Science Research Network'})[config.CitationClass]; end -- Link the title of the work if no |url= was provided, but we have a |pmc= or a |doi= with |doi-access=free if config.CitationClass == "journal" and not utilities.is_set (URL) and not utilities.is_set (TitleLink) and not utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) then -- TODO: remove 'none' once existing citations have been switched to 'off', so 'none' can be used as token for "no title" instead if 'none' ~= cfg.keywords_xlate[auto_select] then -- if auto-linking not disabled if identifiers.auto_link_urls[auto_select] then -- manual selection URL = identifiers.auto_link_urls[auto_select]; -- set URL to be the same as identifier's external link URL_origin = cfg.id_handlers[auto_select:upper()].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['pmc'] then -- auto-select PMC URL = identifiers.auto_link_urls['pmc']; -- set URL to be the same as the PMC external link if not embargoed URL_origin = cfg.id_handlers['PMC'].parameters[1]; -- set URL_origin to parameter name for use in error message if citation is missing a |title= elseif identifiers.auto_link_urls['doi'] then -- auto-select DOI URL = identifiers.auto_link_urls['doi']; URL_origin = cfg.id_handlers['DOI'].parameters[1]; end end if utilities.is_set (URL) and utilities.is_set (AccessDate) then -- access date requires |url=; identifier-created URL is not |url= table.insert( z.message_tail, { utilities.set_message ( 'err_accessdate_missing_url', {}, true ) } ); -- add an error message AccessDate = ''; -- unset end end -- At this point fields may be nil if they weren't specified in the template use. We can use that fact. -- Test if citation has no title if not utilities.is_set (Title) and not utilities.is_set (TransTitle) and not utilities.is_set (ScriptTitle) then -- has special case for cite episode table.insert( z.message_tail, { utilities.set_message ( 'err_citation_missing_title', {'episode' == config.CitationClass and 'series' or 'title'}, true ) } ); end if utilities.in_array (cfg.keywords_xlate[Title], {'off', 'none'}) and utilities.in_array (config.CitationClass, {'journal', 'citation'}) and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and ('journal' == Periodical_origin or 'script-journal' == ScriptPeriodical_origin) then -- special case for journal cites Title = ''; -- set title to empty string utilities.set_message ('maint_untitled'); -- add maint cat end check_for_url ({ -- add error message when any of these parameters hold a URL ['title'] = Title, [A:ORIGIN('Chapter')] = Chapter, [Periodical_origin] = Periodical, [PublisherName_origin] = PublisherName }); -- COinS metadata (see <http://ocoins.info/>) for automated parsing of citation information. -- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that -- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title -- is the article title, and Chapter is a section within the article. So, we remap local coins_chapter = Chapter; -- default assuming that remapping not required local coins_title = Title; -- et tu if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and utilities.is_set (Encyclopedia)) then if utilities.is_set (Chapter) and utilities.is_set (Title) and utilities.is_set (Periodical) then -- if all are used then coins_chapter = Title; -- remap coins_title = Periodical; end end local coins_author = a; -- default for coins rft.au if 0 < #c then -- but if contributor list coins_author = c; -- use that instead end -- this is the function call to COinS() local OCinSoutput = metadata.COinS({ ['Periodical'] = utilities.strip_apostrophe_markup (Periodical), -- no markup in the metadata ['Encyclopedia'] = Encyclopedia, -- just a flag; content ignored by ~/COinS ['Chapter'] = metadata.make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic wiki-markup ['Degree'] = Degree; -- cite thesis only ['Title'] = metadata.make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic wiki-markup ['PublicationPlace'] = PublicationPlace, ['Date'] = COinS_date.rftdate, -- COinS_date has correctly formatted date if Date is valid; ['Season'] = COinS_date.rftssn, ['Quarter'] = COinS_date.rftquarter, ['Chron'] = COinS_date.rftchron or (not COinS_date.rftdate and Date) or '', -- chron but if not set and invalid date format use Date; keep this last bit? ['Series'] = Series, ['Volume'] = Volume, ['Issue'] = Issue, ['Pages'] = coins_pages or metadata.get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At, QuotePage, QuotePages}, 7)), -- pages stripped of external links ['Edition'] = Edition, ['PublisherName'] = PublisherName or Newsgroup, -- any apostrophe markup already removed from PublisherName ['URL'] = first_set ({ChapterURL, URL}, 2), ['Authors'] = coins_author, ['ID_list'] = ID_list_coins, ['RawPage'] = this_page.prefixedText, }, config.CitationClass); -- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, and {{cite ssrn}} AFTER generation of COinS data. if utilities.in_array (config.CitationClass, whitelist.preprint_template_list) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, CiteSeerX, or ssrn now unset so it isn't displayed Periodical = ''; -- periodical not allowed in these templates; if article has been published, use cite journal end -- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text if 'newsgroup' == config.CitationClass and utilities.is_set (Newsgroup) then PublisherName = utilities.substitute (cfg.messages['newsgroup'], external_link( 'news:' .. Newsgroup, Newsgroup, Newsgroup_origin, nil )); end -- Now perform various field substitutions. -- We also add leading spaces and surrounding markup and punctuation to the -- various parts of the citation, but only when they are non-nil. local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list do local last_first_list; local control = { format = NameListStyle, -- empty string or 'vanc' maximum = nil, -- as if display-authors or display-editors not set mode = Mode }; do -- do editor name list first because the now unsupported coauthors used to modify control table control.maximum , editor_etal = get_display_names (A['DisplayEditors'], #e, 'editors', editor_etal); Editors, EditorCount = list_people (control, e, editor_etal); if 1 == EditorCount and (true == editor_etal or 1 < #e) then -- only one editor displayed but includes etal then EditorCount = 2; -- spoof to display (eds.) annotation end end do -- now do interviewers control.maximum , interviewer_etal = get_display_names (A['DisplayInterviewers'], #interviewers_list, 'interviewers', interviewer_etal); Interviewers = list_people (control, interviewers_list, interviewer_etal); end do -- now do translators control.maximum , translator_etal = get_display_names (A['DisplayTranslators'], #t, 'translators', translator_etal); Translators = list_people (control, t, translator_etal); end do -- now do contributors control.maximum , contributor_etal = get_display_names (A['DisplayContributors'], #c, 'contributors', contributor_etal); Contributors = list_people (control, c, contributor_etal); end do -- now do authors control.maximum , author_etal = get_display_names (A['DisplayAuthors'], #a, 'authors', author_etal); last_first_list = list_people(control, a, author_etal); if utilities.is_set (Authors) then Authors, author_etal = name_has_etal (Authors, author_etal, false, 'authors'); -- find and remove variations on et al. if author_etal then Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter end else Authors = last_first_list; -- either an author name list or an empty string end end -- end of do if utilities.is_set (Authors) and utilities.is_set (Collaboration) then Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al. end end -- apply |[xx-]format= styling; at the end, these parameters hold correctly styled format annotation, -- an error message if the associated URL is not set, or an empty string for concatenation ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url'); ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url'); Format = style_format (Format, URL, 'format', 'url'); LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url'); TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl'); -- special case for chapter format so no error message or cat when chapter not supported if not (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia))) then ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url'); end if not utilities.is_set (URL) then if utilities.in_array (config.CitationClass, {"web", "podcast", "mailinglist"}) or -- |url= required for cite web, cite podcast, and cite mailinglist ('citation' == config.CitationClass and ('website' == Periodical_origin or 'script-website' == ScriptPeriodical_origin)) then -- and required for {{citation}} with |website= or |script-website= table.insert( z.message_tail, { utilities.set_message ( 'err_cite_web_url', {}, true ) } ); end -- do we have |accessdate= without either |url= or |chapter-url=? if utilities.is_set (AccessDate) and not utilities.is_set (ChapterURL) then -- ChapterURL may be set when URL is not set; table.insert( z.message_tail, { utilities.set_message ( 'err_accessdate_missing_url', {}, true ) } ); AccessDate = ''; end end local OriginalURL, OriginalURL_origin, OriginalFormat, OriginalAccess; UrlStatus = UrlStatus:lower(); -- used later when assembling archived text if utilities.is_set ( ArchiveURL ) then if utilities.is_set (ChapterURL) then -- if chapter-url= is set apply archive url to it OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text OriginalURL_origin = ChapterURL_origin; -- name of |chapter-url= parameter for error messages OriginalFormat = ChapterFormat; -- and original |chapter-format= if 'live' ~= UrlStatus then ChapterURL = ArchiveURL -- swap-in the archive's URL ChapterURL_origin = A:ORIGIN('ArchiveURL') -- name of |archive-url= parameter for error messages ChapterFormat = ArchiveFormat or ''; -- swap in archive's format ChapterUrlAccess = nil; -- restricted access levels do not make sense for archived URLs end elseif utilities.is_set (URL) then OriginalURL = URL; -- save copy of original source URL OriginalURL_origin = URL_origin; -- name of URL parameter for error messages OriginalFormat = Format; -- and original |format= OriginalAccess = UrlAccess; if 'live' ~= UrlStatus then -- if URL set then |archive-url= applies to it URL = ArchiveURL -- swap-in the archive's URL URL_origin = A:ORIGIN('ArchiveURL') -- name of archive URL parameter for error messages Format = ArchiveFormat or ''; -- swap in archive's format UrlAccess = nil; -- restricted access levels do not make sense for archived URLs end end end if utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or -- if any of the 'periodical' cites except encyclopedia ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) then local chap_param; if utilities.is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters chap_param = A:ORIGIN ('Chapter') elseif utilities.is_set (TransChapter) then chap_param = A:ORIGIN ('TransChapter') elseif utilities.is_set (ChapterURL) then chap_param = A:ORIGIN ('ChapterURL') elseif utilities.is_set (ScriptChapter) then chap_param = ScriptChapter_origin; else utilities.is_set (ChapterFormat) chap_param = A:ORIGIN ('ChapterFormat') end if utilities.is_set (chap_param) then -- if we found one table.insert( z.message_tail, { utilities.set_message ( 'err_chapter_ignored', {chap_param}, true ) } ); -- add error message Chapter = ''; -- and set them to empty string to be safe with concatenation TransChapter = ''; ChapterURL = ''; ScriptChapter = ''; ChapterFormat = ''; end else -- otherwise, format chapter / article title local no_quotes = false; -- default assume that we will be quoting the chapter parameter value if utilities.is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s) if utilities.in_array (Contribution:lower(), cfg.keywords_lists.contribution) then -- and a generic contribution title no_quotes = true; -- then render it unquoted end end Chapter = format_chapter_title (ScriptChapter, ScriptChapter_origin, Chapter, Chapter_origin, TransChapter, TransChapter_origin, ChapterURL, ChapterURL_origin, no_quotes, ChapterUrlAccess); -- Contribution is also in Chapter if utilities.is_set (Chapter) then Chapter = Chapter .. ChapterFormat ; if 'map' == config.CitationClass and utilities.is_set (TitleType) then Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title end Chapter = Chapter .. sepc .. ' '; elseif utilities.is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ... Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it end end -- Format main title local plain_title = false; local accept_title; Title, accept_title = utilities.has_accept_as_written (Title, true); -- remove accept-this-as-written markup when it wraps all of <Title> if accept_title and ('' == Title) then -- only support forced empty for now "(())" Title = cfg.messages['notitle']; -- replace by predefined "No title" message -- TODO: utilities.set_message ( 'err_redundant_parameters', ...); -- issue proper error message instead of muting ScriptTitle = ''; -- just mute for now TransTitle = ''; -- just mute for now plain_title = true; -- suppress text decoration for descriptive title utilities.set_message ('maint_untitled'); -- add maint cat end if not accept_title then -- <Title> not wrapped in accept-as-written markup if '...' == Title:sub (-3) then -- if ellipsis is the last three characters of |title= Title = Title:gsub ('(%.%.%.)%.+$', '%1'); -- limit the number of dots to three elseif not mw.ustring.find (Title, '%.%s*%a%.$') and -- end of title is not a 'dot-(optional space-)letter-dot' initialism ... not mw.ustring.find (Title, '%s+%a%.$') then -- ...and not a 'space-letter-dot' initial (''Allium canadense'' L.) Title = mw.ustring.gsub(Title, '%' .. sepc .. '$', ''); -- remove any trailing separator character; sepc and ms.ustring() here for languages that use multibyte separator characters end if utilities.is_set (ArchiveURL) and is_archived_copy (Title) then utilities.set_message ('maint_archived_copy'); -- add maintenance category before we modify the content of Title end if is_generic_title (Title) then table.insert (z.message_tail, {utilities.set_message ( 'err_generic_title', {}, true ) } ); -- set an error message end end if (not plain_title) and (utilities.in_array (config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or ('citation' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)) and not utilities.is_set (Encyclopedia)) or ('map' == config.CitationClass and (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical)))) then -- special case for cite map when the map is in a periodical treat as an article Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from module provided quote marks Title = utilities.wrap_style ('quoted-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); elseif plain_title or ('report' == config.CitationClass) then -- no styling for cite report and descriptive titles (otherwise same as above) Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title else Title = utilities.wrap_style ('italic-title', Title); Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after title is wrapped TransTitle = utilities.wrap_style ('trans-italic-title', TransTitle); end local TransError = ""; if utilities.is_set (TransTitle) then if utilities.is_set (Title) then TransTitle = " " .. TransTitle; else TransError = " " .. utilities.set_message ( 'err_trans_missing_title', {'title'} ); end end if utilities.is_set (Title) then -- TODO: is this the right place to be making Wikisource URLs? if utilities.is_set (TitleLink) and utilities.is_set (URL) then table.insert( z.message_tail, { utilities.set_message ( 'err_wikilink_in_url', {}, true ) } ); -- set an error message because we can't have both TitleLink = ''; -- unset end if not utilities.is_set (TitleLink) and utilities.is_set (URL) then Title = external_link (URL, Title, URL_origin, UrlAccess) .. TransTitle .. TransError .. Format; URL = ''; -- unset these because no longer needed Format = ""; elseif utilities.is_set (TitleLink) and not utilities.is_set (URL) then local ws_url; ws_url = wikisource_url_make (TitleLink); -- ignore ws_label return; not used here if ws_url then Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title-link'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], TitleLink, Title}); Title = Title .. TransTitle .. TransError; else Title = utilities.make_wikilink (TitleLink, Title) .. TransTitle .. TransError; end else local ws_url, ws_label, L; -- Title has italic or quote markup by the time we get here which causes is_wikilink() to return 0 (not a wikilink) ws_url, ws_label, L = wikisource_url_make (Title:gsub('^[\'"]*(.-)[\'"]*$', '%1')); -- make ws URL from |title= interwiki link (strip italic or quote markup); link portion L becomes tooltip label if ws_url then Title = Title:gsub ('%b[]', ws_label); -- replace interwiki link with ws_label to retain markup Title = external_link (ws_url, Title .. '&nbsp;', 'ws link in title'); -- space char after Title to move icon away from italic text; TODO: a better way to do this? Title = utilities.substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, Title}); Title = Title .. TransTitle .. TransError; else Title = Title .. TransTitle .. TransError; end end else Title = TransTitle .. TransError; end if utilities.is_set (Place) then Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " "; end if utilities.is_set (Conference) then if utilities.is_set (ConferenceURL) then Conference = external_link( ConferenceURL, Conference, ConferenceURL_origin, nil ); end Conference = sepc .. " " .. Conference .. ConferenceFormat; elseif utilities.is_set (ConferenceURL) then Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURL_origin, nil ); end if not utilities.is_set (Position) then local Minutes = A['Minutes']; local Time = A['Time']; if utilities.is_set (Minutes) then if utilities.is_set (Time) then table.insert( z.message_tail, { utilities.set_message ( 'err_redundant_parameters', {utilities.wrap_style ('parameter', 'minutes') .. ' and ' .. utilities.wrap_style ('parameter', 'time')}, true ) } ); end Position = " " .. Minutes .. " " .. cfg.messages['minutes']; else if utilities.is_set (Time) then local TimeCaption = A['TimeCaption'] if not utilities.is_set (TimeCaption) then TimeCaption = cfg.messages['event']; if sepc ~= '.' then TimeCaption = TimeCaption:lower(); end end Position = " " .. TimeCaption .. " " .. Time; end end else Position = " " .. Position; At = ''; end Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase); At = utilities.is_set (At) and (sepc .. " " .. At) or ""; Position = utilities.is_set (Position) and (sepc .. " " .. Position) or ""; if config.CitationClass == 'map' then local Sections = A['Sections']; -- Section (singular) is an alias of Chapter so set earlier local Inset = A['Inset']; if utilities.is_set ( Inset ) then Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase); end if utilities.is_set ( Sections ) then Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase); elseif utilities.is_set ( Section ) then Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase); end At = At .. Inset .. Section; end if utilities.is_set (Language) then Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc. else Language=""; -- language not specified so make sure this is an empty string; --[[ TODO: need to extract the wrap_msg from language_parameter so that we can solve parentheses bunching problem with Format/Language/TitleType ]] end Others = utilities.is_set (Others) and (sepc .. " " .. Others) or ""; if utilities.is_set (Translators) then Others = safe_join ({sepc .. ' ', wrap_msg ('translated', Translators, use_lowercase), Others}, sepc); end if utilities.is_set (Interviewers) then Others = safe_join ({sepc .. ' ', wrap_msg ('interview', Interviewers, use_lowercase), Others}, sepc); end TitleNote = utilities.is_set (TitleNote) and (sepc .. " " .. TitleNote) or ""; if utilities.is_set (Edition) then if Edition:match ('%f[%a][Ee]d%n?%.?$') or Edition:match ('%f[%a][Ee]dition$') then -- Ed, ed, Ed., ed., Edn, edn, Edn., edn. table.insert( z.message_tail, { utilities.set_message ( 'err_extra_text_edition')}); -- add error end Edition = " " .. wrap_msg ('edition', Edition); else Edition = ''; end Series = utilities.is_set (Series) and wrap_msg ('series', {sepc, Series}) or ""; -- not the same as SeriesNum OrigDate = utilities.is_set (OrigDate) and wrap_msg ('origdate', OrigDate) or ''; Agency = utilities.is_set (Agency) and wrap_msg ('agency', {sepc, Agency}) or ""; Volume = format_volume_issue (Volume, Issue, config.CitationClass, Periodical_origin, sepc, use_lowercase); ------------------------------------ totally unrelated data Via = utilities.is_set (Via) and wrap_msg ('via', Via) or ''; if utilities.is_set (AccessDate) then local retrv_text = " " .. cfg.messages['retrieved'] AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format if (sepc ~= ".") then retrv_text = retrv_text:lower() end -- if mode is cs2, lower case AccessDate = utilities.substitute (retrv_text, AccessDate); -- add retrieved text AccessDate = utilities.substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates end if utilities.is_set (ID) then ID = sepc .. " " .. ID; end if "thesis" == config.CitationClass and utilities.is_set (Docket) then ID = sepc .. " Docket " .. Docket .. ID; end if "report" == config.CitationClass and utilities.is_set (Docket) then -- for cite report when |docket= is set ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set end if utilities.is_set (URL) then URL = " " .. external_link( URL, nil, URL_origin, UrlAccess ); end if utilities.is_set (Quote) or utilities.is_set (TransQuote) or utilities.is_set (ScriptQuote) then if utilities.is_set (Quote) then if Quote:sub(1, 1) == '"' and Quote:sub(-1, -1) == '"' then -- if first and last characters of quote are quote marks Quote = Quote:sub(2, -2); -- strip them off end end Quote = utilities.wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags if utilities.is_set (ScriptQuote) then Quote = script_concatenate (Quote, ScriptQuote, 'script-quote'); -- <bdi> tags, lang attribute, categorization, etc.; must be done after quote is wrapped end if utilities.is_set (TransQuote) then if TransQuote:sub(1, 1) == '"' and TransQuote:sub(-1, -1) == '"' then -- if first and last characters of |trans-quote are quote marks TransQuote = TransQuote:sub(2, -2); -- strip them off end Quote = Quote .. " " .. utilities.wrap_style ('trans-quoted-title', TransQuote ); end -- if not utilities.in_array (config.CitationClass, cfg.templates_not_using_page) if utilities.is_set (QuotePage) or utilities.is_set (QuotePages) then -- add page prefix local quote_prefix = ''; if utilities.is_set (QuotePage) then extra_text_in_page_check (QuotePage); -- add to maint cat if |quote-page= value begins with what looks like p., pp., etc. if not NoPP then quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, QuotePage}), '', '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, QuotePage}), '', '', ''; end elseif utilities.is_set (QuotePages) then extra_text_in_page_check (QuotePages); -- add to maint cat if |quote-pages= value begins with what looks like p., pp., etc. if tonumber(QuotePages) ~= nil and not NoPP then -- if only digits, assume single page quote_prefix = utilities.substitute (cfg.messages['p-prefix'], {sepc, QuotePages}), '', ''; elseif not NoPP then quote_prefix = utilities.substitute (cfg.messages['pp-prefix'], {sepc, QuotePages}), '', ''; else quote_prefix = utilities.substitute (cfg.messages['nopp'], {sepc, QuotePages}), '', ''; end end Quote = quote_prefix .. ": " .. Quote; else Quote = sepc .. " " .. Quote; end PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set end local Archived if utilities.is_set (ArchiveURL) then local arch_text; if not utilities.is_set (ArchiveDate) then ArchiveDate = utilities.set_message ('err_archive_missing_date'); end if "live" == UrlStatus then arch_text = cfg.messages['archived']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. utilities.substitute ( cfg.messages['archived-live'], { external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL'), nil ) .. ArchiveFormat, ArchiveDate } ); if not utilities.is_set (OriginalURL) then Archived = Archived .. " " .. utilities.set_message ('err_archive_missing_url'); end elseif utilities.is_set (OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown' if utilities.in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then arch_text = cfg.messages['archived-unfit']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. arch_text .. ArchiveDate; -- format already styled if 'bot: unknown' == UrlStatus then utilities.set_message ('maint_bot_unknown'); -- and add a category if not already added else utilities.set_message ('maint_unfit'); -- and add a category if not already added end else -- UrlStatus is empty, 'dead' arch_text = cfg.messages['archived-dead']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. utilities.substitute ( arch_text, { external_link( OriginalURL, cfg.messages['original'], OriginalURL_origin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); -- format already styled end else -- OriginalUrl not set arch_text = cfg.messages['archived-missing']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. utilities.substitute ( arch_text, { utilities.set_message ('err_archive_missing_url'), ArchiveDate } ); end elseif utilities.is_set (ArchiveFormat) then Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message else Archived = "" end local Lay = ''; if utilities.is_set (LayURL) then if utilities.is_set (LayDate) then LayDate = " (" .. LayDate .. ")" end if utilities.is_set (LaySource) then LaySource = " &ndash; ''" .. utilities.safe_for_italics (LaySource) .. "''"; else LaySource = ""; end if sepc == '.' then Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary'], A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate else Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary']:lower(), A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate end elseif utilities.is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url= Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message end if utilities.is_set (Transcript) then if utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, Transcript, TranscriptURL_origin, nil ); end Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat; elseif utilities.is_set (TranscriptURL) then Transcript = external_link( TranscriptURL, nil, TranscriptURL_origin, nil ); end local Publisher; if utilities.is_set (PublicationDate) then PublicationDate = wrap_msg ('published', PublicationDate); end if utilities.is_set (PublisherName) then if utilities.is_set (PublicationPlace) then Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate; else Publisher = sepc .. " " .. PublisherName .. PublicationDate; end elseif utilities.is_set (PublicationPlace) then Publisher= sepc .. " " .. PublicationPlace .. PublicationDate; else Publisher = PublicationDate; end -- Several of the above rely upon detecting this as nil, so do it last. if (utilities.is_set (Periodical) or utilities.is_set (ScriptPeriodical) or utilities.is_set (TransPeriodical)) then if utilities.is_set (Title) or utilities.is_set (TitleNote) then Periodical = sepc .. " " .. format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); else Periodical = format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical, TransPeriodical_origin); end end --[[ Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided). ]] if "speech" == config.CitationClass then -- cite speech only TitleNote = " (Speech)"; -- annotate the citation if utilities.is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter if utilities.is_set (Conference) then -- and if |event= is set Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering end end end -- Piece all bits together at last. Here, all should be non-nil. -- We build things this way because it is more efficient in LUA -- not to keep reassigning to the same string variable over and over. local tcommon; local tcommon2; -- used for book cite when |contributor= is set if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then if utilities.is_set (Others) then Others = safe_join ({Others, sepc .. " "}, sepc) end -- add terminal punctuation & space; check for dup sepc; TODO why do we need to do this here? tcommon = safe_join( {Others, Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency, Volume}, sepc ); elseif utilities.in_array (config.CitationClass, {"book", "citation"}) and not utilities.is_set (Periodical) then -- special cases for book cites if utilities.is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc. tcommon = safe_join( {Title, TitleNote}, sepc ); -- author and other stuff will come after this and before tcommon2 tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc ); else tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc ); end elseif 'map' == config.CitationClass then -- special cases for cite map if utilities.is_set (Chapter) then -- map in a book; TitleType is part of Chapter tcommon = safe_join( {Title, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc ); elseif utilities.is_set (Periodical) then -- map in a periodical tcommon = safe_join( {Title, TitleType, Format, Periodical, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc ); else -- a sheet or stand-alone map tcommon = safe_join( {Title, TitleType, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher}, sepc ); end elseif 'episode' == config.CitationClass then -- special case for cite episode tcommon = safe_join( {Title, TitleNote, TitleType, Series, Language, Edition, Publisher}, sepc ); else -- all other CS1 templates tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc ); end if #ID_list > 0 then ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc ); else ID_list = ID; end local idcommon; if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media & cite episode position transcript idcommon = safe_join( { ID_list, URL, Archived, Transcript, AccessDate, Via, Lay, Quote }, sepc ); else idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, Lay, Quote }, sepc ); end local text; local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; if utilities.is_set (Date) then if utilities.is_set (Authors) or utilities.is_set (Editors) then -- date follows authors or editors when authors not set Date = " (" .. Date .. ")" .. OrigDate .. sepc .. " "; -- in parentheses else -- neither of authors and editors set if (string.sub(tcommon, -1, -1) == sepc) then -- if the last character of tcommon is sepc Date = " " .. Date .. OrigDate; -- Date does not begin with sepc else Date = sepc .. " " .. Date .. OrigDate; -- Date begins with sepc end end end if utilities.is_set (Authors) then if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Authors termination Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space end if utilities.is_set (Editors) then local in_text = " "; local post_text = ""; if utilities.is_set (Chapter) and 0 == #c then in_text = in_text .. cfg.messages['in'] .. " " if (sepc ~= '.') then in_text = in_text:lower() -- lowercase for cs2 end end if EditorCount <= 1 then post_text = " (" .. cfg.messages['editor'] .. ")"; -- be consistent with no-author, no-date case else post_text = " (" .. cfg.messages['editors'] .. ")"; end Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space end if utilities.is_set (Contributors) then -- book cite and we're citing the intro, preface, etc. local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' '; if (sepc ~= '.') then by_text = by_text:lower() end -- lowercase for cs2 Authors = by_text .. Authors; -- author follows title so tweak it here if utilities.is_set (Editors) and utilities.is_set (Date) then -- when Editors make sure that Authors gets terminated Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space end if (not utilities.is_set (Date)) then -- when date is set it's in parentheses; no Contributors termination Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space end text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc ); else text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc ); end elseif utilities.is_set (Editors) then if utilities.is_set (Date) then if EditorCount <= 1 then Editors = Editors .. ", " .. cfg.messages['editor']; else Editors = Editors .. ", " .. cfg.messages['editors']; end else if EditorCount <= 1 then Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " " else Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " " end end text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc ); else if utilities.in_array (config.CitationClass, {"journal", "citation"}) and utilities.is_set (Periodical) then text = safe_join( {Chapter, Place, tcommon, pgtext, Date, idcommon}, sepc ); else text = safe_join( {Chapter, Place, tcommon, Date, pgtext, idcommon}, sepc ); end end if utilities.is_set (PostScript) and PostScript ~= sepc then text = safe_join( {text, sepc}, sepc ); -- Deals with italics, spaces, etc. text = text:sub(1, -sepc:len() - 1); end text = safe_join( {text, PostScript}, sepc ); -- Now enclose the whole thing in a <cite/> element local options = {}; if utilities.is_set (config.CitationClass) and config.CitationClass ~= "citation" then options.class = string.format ('%s %s %s', 'citation', config.CitationClass, utilities.is_set (Mode) and Mode or 'cs1'); -- class=citation required for blue highlight when used with |ref= else options.class = string.format ('%s %s', 'citation', utilities.is_set (Mode) and Mode or 'cs2'); end if utilities.is_set (Ref) and 'none' ~= cfg.keywords_xlate[Ref:lower()] then local id = Ref if ('harv' == Ref ) then local namelist = {}; -- holds selected contributor, author, editor name list local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation if #c > 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 = utilities.set_message ('err_empty_citation'); z.message_tail = {}; end local render = {}; -- here we collect the final bits for concatenation into the rendered citation if utilities.is_set (options.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags table.insert (render, utilities.substitute (cfg.presentation['cite-id'], {mw.uri.anchorEncode(options.id), mw.text.nowiki(options.class), text})); -- when |ref= is set else table.insert (render, utilities.substitute (cfg.presentation['cite'], {mw.text.nowiki(options.class), text})); -- all other cases end table.insert (render, utilities.substitute (cfg.presentation['ocins'], {OCinSoutput})); -- append metadata to the citation if 0 ~= #z.message_tail then table.insert (render, ' '); for i,v in ipairs( z.message_tail ) do if utilities.is_set (v[1]) then if i == #z.message_tail then table.insert (render, utilities.error_comment ( v[1], v[2] )); else table.insert (render, utilities.error_comment ( v[1] .. "; ", v[2] )); end end end end if 0 ~= #z.maintenance_cats then local maint_msgs = {}; -- here we collect all of the maint messages for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories local maint = {}; -- here we assemble a maintenence message table.insert (maint, v); -- maint msg is the category name table.insert (maint, ' ('); -- open the link text table.insert (maint, utilities.substitute (cfg.messages[':cat wikilink'], {v})); -- add the link table.insert (maint, ')'); -- and close it table.insert (maint_msgs, table.concat (maint)); -- assemble new maint message and add it to the maint_msgs table end table.insert (render, utilities.substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs, ' '))); -- wrap the group of maint message with proper presentation and save end if not no_tracking_cats then for _, v in ipairs( z.error_categories ) do -- append error categories table.insert (render, utilities.substitute (cfg.messages['cat wikilink'], {v})); end for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories table.insert (render, utilities.substitute (cfg.messages['cat wikilink'], {v})); end for _, v in ipairs( z.properties_cats ) do -- append properties categories table.insert (render, utilities.substitute (cfg.messages['cat wikilink'], {v})); end end return table.concat (render); end --[[--------------------------< V A L I D A T E >-------------------------------------------------------------- Looks for a parameter's name in one of several whitelists. Parameters in the whitelist can have three values: true - active, supported parameters false - deprecated, supported parameters nil - unsupported parameters ]] local function validate (name, cite_class, empty) local name = tostring (name); local enum_name; -- for enumerated parameters, is name with enumerator replaced with '#' local state; local function state_test (state, name) -- local function to do testing of state values if true == state then return true; end -- valid actively supported parameter if false == state then if empty then return nil; end -- deprecated empty parameters are treated as unknowns deprecated_parameter (name); -- parameter is deprecated but still supported return true; end return nil; end if name:find ('#') then -- # is a cs1|2 reserved character so parameters with # not permitted return nil; end if utilities.in_array (cite_class, whitelist.preprint_template_list ) then -- limited parameter sets allowed for these templates state = whitelist.limited_basic_arguments[name]; if true == state_test (state, name) then return true; end state = whitelist.preprint_arguments[cite_class][name]; -- look in the parameter-list for the template identified by cite_class if true == state_test (state, name) then return true; end -- limited enumerated parameters list enum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits) state = whitelist.limited_numbered_arguments[enum_name]; if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end -- end limited parameter-set templates if utilities.in_array (cite_class, whitelist.unique_param_template_list) then -- experiment for template-specific parameters for templates that accept parameters from the basic argument list state = whitelist.unique_arguments[cite_class][name]; -- look in the template-specific parameter-lists for the template identified by cite_class if true == state_test (state, name) then return true; end end -- if here, fall into general validation state = whitelist.basic_arguments[name]; -- all other templates; all normal parameters allowed if true == state_test (state, name) then return true; end -- all enumerated parameters allowed enum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits) state = whitelist.numbered_arguments[enum_name]; if true == state_test (state, name) then return true; end return false; -- not supported because not found or name is set to nil end --[=[-------------------------< I N T E R _ W I K I _ C H E C K >---------------------------------------------- check <value> for inter-language interwiki-link markup. <prefix> must be a MediaWiki-recognized language code. when these values have the form (without leading colon): [[<prefix>:link|label]] return label as plain-text [[<prefix>:link]] return <prefix>:link as plain-text return value as is else ]=] local function inter_wiki_check (parameter, value) local prefix = value:match ('%[%[(%a+):'); -- get an interwiki prefix if one exists local _; if prefix and cfg.inter_wiki_map[prefix:lower()] then -- if prefix is in the map, needs preceding colon so table.insert( z.message_tail, {utilities.set_message ('err_bad_paramlink', parameter)}); -- emit an error message _, value, _ = utilities.is_wikilink (value); -- extract label portion from wikilink end return value; end --[[--------------------------< M I S S I N G _ P I P E _ C H E C K >------------------------------------------ Look at the contents of a parameter. If the content has a string of characters and digits followed by an equal sign, compare the alphanumeric string to the list of cs1|2 parameters. If found, then the string is possibly a parameter that is missing its pipe. There are two tests made: {{cite ... |title=Title access-date=2016-03-17}} -- the first parameter has a value and whitespace separates that value from the missing pipe parameter name {{cite ... |title=access-date=2016-03-17}} -- the first parameter has no value (whitespace after the first = is trimmed by MediaWiki) cs1|2 shares some parameter names with XML/HTML attributes: class=, title=, etc. To prevent false positives XML/HTML tags are removed before the search. If a missing pipe is detected, this function adds the missing pipe maintenance category. ]] local function missing_pipe_check (parameter, value) local capture; value = value:gsub ('%b<>', ''); -- remove XML/HTML tags because attributes: class=, title=, etc. capture = value:match ('%s+(%a[%w%-]+)%s*=') or value:match ('^(%a[%w%-]+)%s*='); -- find and categorize parameters with possible missing pipes if capture and validate (capture) then -- if the capture is a valid parameter name table.insert( z.message_tail, {utilities.set_message ('err_missing_pipe', parameter)}); end end --[[--------------------------< H A S _ E X T R A N E O U S _ P U N C T >-------------------------------------- look for extraneous terminal punctuation in most parameter values; parameters listed in skip table are not checked ]] local function has_extraneous_punc (param, value) if 'number' == type (param) then return; end param = param:gsub ('%d+', '#'); -- enumerated name-list mask params allow terminal punct; normalize if cfg.punct_skip[param] then return; -- parameter name found in the skip table so done end if value:match ('[,;:]$') then utilities.set_message ('maint_extra_punct'); -- has extraneous punctuation; add maint cat end end --[[--------------------------< C I T A T I O N >-------------------------------------------------------------- This is used by templates such as {{cite book}} to create the actual citation text. ]] local function citation(frame) Frame = frame; -- save a copy in case we need to display an error message in preview mode local pframe = frame:getParent() local styles; if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); -- load sandbox versions of support modules whitelist = mw.loadData ('Module:Citation/CS1/Whitelist/sandbox'); utilities = require ('Module:Citation/CS1/Utilities/sandbox'); validation = require ('Module:Citation/CS1/Date_validation/sandbox'); identifiers = require ('Module:Citation/CS1/Identifiers/sandbox'); metadata = require ('Module:Citation/CS1/COinS/sandbox'); styles = 'Module:Citation/CS1/sandbox/styles.css'; else -- otherwise cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load live versions of support modules whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); utilities = require ('Module:Citation/CS1/Utilities'); validation = require ('Module:Citation/CS1/Date_validation'); identifiers = require ('Module:Citation/CS1/Identifiers'); metadata = require ('Module:Citation/CS1/COinS'); styles = 'Module:Citation/CS1/styles.css'; end utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the selected cfg tables identifiers.set_selected_modules (cfg, utilities); -- so that functions in Identifiers can see the selected cfg tables and selected Utilities module validation.set_selected_modules (cfg, utilities); -- so that functions in Date validataion can see selected cfg tables and the selected Utilities module metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities local args = {}; -- table where we store all of the template's arguments local suggestions = {}; -- table where we store suggestions if we need to loadData them local error_text, error_state; local config = {}; -- table to store parameters from the module {{#invoke:}} for k, v in pairs( frame.args ) do -- get parameters from the {{#invoke}} frame config[k] = v; -- args[k] = v; -- crude debug support that allows us to render a citation from module {{#invoke:}}; skips parameter validation; TODO: keep? end local capture; -- the single supported capture when matching unknown parameters using patterns local empty_unknowns = {}; -- sequence table to hold empty unknown params for error message listing for k, v in pairs( pframe.args ) do -- get parameters from the parent (template) frame v = mw.ustring.gsub (v, '^%s*(.-)%s*$', '%1'); -- trim leading/trailing whitespace; when v is only whitespace, becomes empty string if v ~= '' then if ('string' == type (k)) then k = mw.ustring.gsub (k, '%d', cfg.date_names.local_digits); -- for enumerated parameters, translate 'local' digits to Western 0-9 end if not validate( k, config.CitationClass ) then error_text = ""; if type( k ) ~= 'string' then -- exclude empty numbered parameters if v:match("%S+") ~= nil then error_text, error_state = utilities.set_message ( 'err_text_ignored', {v}, true ); end elseif validate( k:lower(), config.CitationClass ) then error_text, error_state = utilities.set_message ( 'err_parameter_ignored_suggest', {k, k:lower()}, true ); -- suggest the lowercase version of the parameter else if nil == suggestions.suggestions then -- if this table is nil then we need to load it if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions/sandbox' ); -- use the sandbox version else suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions' ); -- use the live version end end for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter capture = k:match (pattern); -- the whole match if no capture in pattern else the capture if a match if capture then -- if the pattern matches param = utilities.substitute (param, capture); -- add the capture to the suggested parameter (typically the enumerator) if validate (param, config.CitationClass) then -- validate the suggestion to make sure that the suggestion is supported by this template (necessary for limited parameter lists) error_text, error_state = utilities.set_message ('err_parameter_ignored_suggest', {k, param}, true); -- set the suggestion error message else error_text, error_state = utilities.set_message ( 'err_parameter_ignored', {param}, true ); -- suggested param not supported by this template v = ''; -- unset end end end if not utilities.is_set (error_text) then -- couldn't match with a pattern, is there an explicit suggestion? if suggestions.suggestions[ k:lower() ] ~= nil then error_text, error_state = utilities.set_message ( 'err_parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}, true ); else error_text, error_state = utilities.set_message ( 'err_parameter_ignored', {k}, true ); v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists) end end end if error_text ~= '' then table.insert( z.message_tail, {error_text, error_state} ); end end args[k] = v; -- save this parameter and its value elseif not utilities.is_set (v) then -- for empty parameters if not validate (k, config.CitationClass, true) then -- is this empty parameter a valid parameter k = ('' == k) and '(empty string)' or k; -- when k is empty string (or was space(s) trimmed to empty string), replace with descriptive text table.insert (empty_unknowns, utilities.wrap_style ('parameter', k)); -- format for error message and add to the list end -- crude debug support that allows us to render a citation from module {{#invoke:}} TODO: keep? -- elseif args[k] ~= nil or (k == 'postscript') then -- when args[k] has a value from {{#invoke}} frame (we don't normally do that) -- args[k] = v; -- overwrite args[k] with empty string from pframe.args[k] (template frame); v is empty string here end -- not sure about the postscript bit; that gets handled in parameter validation; historical artifact? end if 0 ~= #empty_unknowns then -- create empty unknown error message table.insert (z.message_tail, {utilities.set_message ('err_param_unknown_empty', { 1 == #empty_unknowns and '' or 's', utilities.make_sep_list (#empty_unknowns, empty_unknowns) }, true )}); end for k, v in pairs( args ) do if 'string' == type (k) then -- don't evaluate positional parameters has_invisible_chars (k, v); -- look for invisible characters end has_extraneous_punc (k, v); -- look for extraneous terminal punctuation in parameter values missing_pipe_check (k, v); -- do we think that there is a parameter that is missing a pipe? args[k] = inter_wiki_check (k, v); -- when language interwiki-linked parameter missing leading colon replace with wiki-link label end return table.concat ({ frame:extensionTag ('templatestyles', '', {src=styles}), citation0( config, args) }); end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return {citation = citation}; mrol5zdo98hyrm4oo4fptd61rlfao1c Modul:Citation/CS1/COinS 828 272 819 818 2024-08-09T09:21:28Z Jon Harald Søby 58 1 semakan diimportkan 818 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local is_set, in_array, remove_wiki_link, strip_apostrophe_markup; -- functions in Module:Citation/CS1/Utilities local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration --[[--------------------------< M A K E _ C O I N S _ T I T L E >---------------------------------------------- Makes a title for COinS from Title and / or ScriptTitle (or any other name-script pairs) Apostrophe markup (bold, italics) is stripped from each value so that the COinS metadata isn't corrupted with strings of %27%27... ]] local function make_coins_title (title, script) if is_set (title) then title = strip_apostrophe_markup (title); -- strip any apostrophe markup else title = ''; -- if not set, make sure title is an empty string end if is_set (script) then script = script:gsub ('^%l%l%s*:%s*', ''); -- remove language prefix if present (script value may now be empty string) script = strip_apostrophe_markup (script); -- strip any apostrophe markup else script = ''; -- if not set, make sure script is an empty string end if is_set (title) and is_set (script) then script = ' ' .. script; -- add a space before we concatenate end return title .. script; -- return the concatenation end --[[--------------------------< E S C A P E _ L U A _ M A G I C _ C H A R S >---------------------------------- Returns a string where all of Lua's magic characters have been escaped. This is important because functions like string.gsub() treat their pattern and replace strings as patterns, not literal strings. ]] local function escape_lua_magic_chars (argument) argument = argument:gsub("%%", "%%%%"); -- replace % with %% argument = argument:gsub("([%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"); -- replace all other Lua magic pattern characters return argument; end --[[--------------------------< G E T _ C O I N S _ P A G E S >------------------------------------------------ Extract page numbers from external wikilinks in any of the |page=, |pages=, or |at= parameters for use in COinS. ]] local function get_coins_pages (pages) local pattern; if not is_set (pages) then return pages; end -- if no page numbers then we're done while true do pattern = pages:match("%[(%w*:?//[^ ]+%s+)[%w%d].*%]"); -- pattern is the opening bracket, the URL and following space(s): "[url " if nil == pattern then break; end -- no more URLs pattern = escape_lua_magic_chars (pattern); -- pattern is not a literal string; escape Lua's magic pattern characters pages = pages:gsub(pattern, ""); -- remove as many instances of pattern as possible end pages = pages:gsub("[%[%]]", ""); -- remove the brackets pages = pages:gsub("–", "-" ); -- replace endashes with hyphens pages = pages:gsub("&%w+;", "-" ); -- and replace HTML entities (&ndash; etc.) with hyphens; do we need to replace numerical entities like &#32; and the like? return pages; end --[=[-------------------------< C O I N S _ R E P L A C E _ M A T H _ S T R I P M A R K E R >------------------ There are three options for math markup rendering that depend on the editor's math preference settings. These settings are at [[Khas:Preferences#mw-prefsection-rendering]] and are PNG images TeX source MathML with SVG or PNG fallback All three are heavy with HTML and CSS which doesn't belong in the metadata. Without this function, the metadata saved in the raw wikitext contained the rendering determined by the settings of the last editor to save the page. This function gets the rendered form of an equation according to the editor's preference before the page is saved. It then searches the rendering for the text equivalent of the rendered equation and replaces the rendering with that so that the page is saved without extraneous HTML/CSS markup and with a reasonably readable text form of the equation. When a replacement is made, this function returns true and the value with replacement; otherwise false and the initial value. To replace multipe equations it is necessary to call this function from within a loop. ]=] local function coins_replace_math_stripmarker (value) local stripmarker = cfg.stripmarkers['math']; local rendering = value:match (stripmarker); -- is there a math stripmarker if not rendering then -- when value doesn't have a math stripmarker, abandon this test return false, value; end rendering = mw.text.unstripNoWiki (rendering); -- convert stripmarker into rendered value (or nil? ''? when math render error) if rendering:match ('alt="[^"]+"') then -- if PNG math option rendering = rendering:match ('alt="([^"]+)"'); -- extract just the math text elseif rendering:match ('$%s+.+%s+%$') then -- if TeX math option; $ is legit character that is escapes as \$ rendering = rendering:match ('$%s+(.+)%s+%$') -- extract just the math text elseif rendering:match ('<annotation[^>]+>.+</annotation>') then -- if MathML math option rendering = rendering:match ('<annotation[^>]+>(.+)</annotation>') -- extract just the math text else return false, value; -- had math stripmarker but not one of the three defined forms end return true, value:gsub (stripmarker, rendering, 1); end --[[--------------------------< C O I N S _ C L E A N U P >---------------------------------------------------- Cleanup parameter values for the metadata by removing or replacing invisible characters and certain HTML entities. 2015-12-10: there is a bug in mw.text.unstripNoWiki (). It replaces math stripmarkers with the appropriate content when it shouldn't. See https://phabricator.wikimedia.org/T121085 and Wikipedia_talk:Lua#stripmarkers_and_mw.text.unstripNoWiki.28.29 TODO: move the replacement patterns and replacement values into a table in /Configuration similar to the invisible characters table? ]] local function coins_cleanup (value) local replaced = true; -- default state to get the do loop running while replaced do -- loop until all math stripmarkers replaced replaced, value = coins_replace_math_stripmarker (value); -- replace math stripmarker with text representation of the equation end value = value:gsub (cfg.stripmarkers['math'], "MATH RENDER ERROR"); -- one or more couldn't be replaced; insert vague error message value = mw.text.unstripNoWiki (value); -- replace nowiki stripmarkers with their content value = value:gsub ('<span class="nowrap" style="padding%-left:0%.1em;">&#39;(s?)</span>', "'%1"); -- replace {{'}} or {{'s}} with simple apostrophe or apostrophe-s value = value:gsub ('&nbsp;', ' '); -- replace &nbsp; entity with plain space value = value:gsub ('\226\128\138', ' '); -- replace hair space with plain space if not mw.ustring.find (value, cfg.indic_script) then -- don't remove zero-width joiner characters from indic script value = value:gsub ('&zwj;', ''); -- remove &zwj; entities value = mw.ustring.gsub (value, '[\226\128\141\226\128\139\194\173]', ''); -- remove zero-width joiner, zero-width space, soft hyphen end value = value:gsub ('[\009\010\013 ]+', ' '); -- replace horizontal tab, line feed, carriage return with plain space return value; end --[[--------------------------< C O I N S >-------------------------------------------------------------------- COinS metadata (see <http://ocoins.info/>) allows automated tools to parse the citation information. ]] local function COinS(data, class) if 'table' ~= type(data) or nil == next(data) then return ''; end for k, v in pairs (data) do -- spin through all of the metadata parameter values if 'ID_list' ~= k and 'Authors' ~= k then -- except the ID_list and Author tables (author nowiki stripmarker done when Author table processed) data[k] = coins_cleanup (v); end end local ctx_ver = "Z39.88-2004"; -- treat table strictly as an array with only set values. local OCinSoutput = setmetatable( {}, { __newindex = function(self, key, value) if is_set(value) then rawset( self, #self+1, table.concat{ key, '=', mw.uri.encode( remove_wiki_link( value ) ) } ); end end }); if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn', 'journal', 'news', 'magazine'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or ('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then -- set genre according to the type of citation template we are rendering OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv, cite biorxiv, cite citeseerx, cite ssrn elseif 'conference' == class then OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set) elseif 'web' == class then OCinSoutput["rft.genre"] = "unknown"; -- cite web (when Periodical set) else OCinSoutput["rft.genre"] = "article"; -- journal and other 'periodical' articles end OCinSoutput["rft.jtitle"] = data.Periodical; -- journal only OCinSoutput["rft.atitle"] = data.Title; -- 'periodical' article titles -- these used only for periodicals OCinSoutput["rft.ssn"] = data.Season; -- keywords: winter, spring, summer, fall OCinSoutput["rft.quarter"] = data.Quarter; -- single digits 1->first quarter, etc. OCinSoutput["rft.chron"] = data.Chron; -- free-form date components OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books OCinSoutput["rft.issue"] = data.Issue; OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata elseif 'thesis' ~= class then -- all others except cite thesis are treated as 'book' metadata; genre distinguishes OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:book"; -- book metadata identifier if 'report' == class or 'techreport' == class then -- cite report and cite techreport OCinSoutput["rft.genre"] = "report"; elseif 'conference' == class then -- cite conference when Periodical not set OCinSoutput["rft.genre"] = "conference"; OCinSoutput["rft.atitle"] = data.Chapter; -- conference paper as chapter in proceedings (book) elseif in_array (class, {'book', 'citation', 'encyclopaedia', 'interview', 'map'}) then if is_set (data.Chapter) then OCinSoutput["rft.genre"] = "bookitem"; OCinSoutput["rft.atitle"] = data.Chapter; -- book chapter, encyclopedia article, interview in a book, or map title else if 'map' == class or 'interview' == class then OCinSoutput["rft.genre"] = 'unknown'; -- standalone map or interview else OCinSoutput["rft.genre"] = 'book'; -- book and encyclopedia end end else -- {'audio-visual', 'AV-media-notes', 'DVD-notes', 'episode', 'interview', 'mailinglist', 'map', 'newsgroup', 'podcast', 'press release', 'serial', 'sign', 'speech', 'web'} OCinSoutput["rft.genre"] = "unknown"; end OCinSoutput["rft.btitle"] = data.Title; -- book only OCinSoutput["rft.place"] = data.PublicationPlace; -- book only OCinSoutput["rft.series"] = data.Series; -- book only OCinSoutput["rft.pages"] = data.Pages; -- book, journal OCinSoutput["rft.edition"] = data.Edition; -- book only OCinSoutput["rft.pub"] = data.PublisherName; -- book and dissertation else -- cite thesis OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:dissertation"; -- dissertation metadata identifier OCinSoutput["rft.title"] = data.Title; -- dissertation (also patent but that is not yet supported) OCinSoutput["rft.degree"] = data.Degree; -- dissertation only OCinSoutput['rft.inst'] = data.PublisherName; -- book and dissertation end -- NB. Not currently supported are "info:ofi/fmt:kev:mtx:patent", "info:ofi/fmt:kev:mtx:dc", "info:ofi/fmt:kev:mtx:sch_svc", "info:ofi/fmt:kev:mtx:ctx" -- and now common parameters (as much as possible) OCinSoutput["rft.date"] = data.Date; -- book, journal, dissertation -- TODO: data.ID_list should also contain identifier validity status (to suppress output of invalid identifier metadata) as well as OL A/M/W/X type and ASIN TLD info (to special-case prefix generation) for k, v in pairs( data.ID_list ) do -- what to do about these? For now assume that they are common to all? if k == 'ISBN' then v = v:gsub( "[^-0-9X]", "" ); end local id = cfg.id_handlers[k].COinS; if string.sub( id or "", 1, 4 ) == 'info' then -- for ids that are in the info:registry OCinSoutput["rft_id"] = table.concat{ id, "/", v }; elseif string.sub (id or "", 1, 3 ) == 'rft' then -- for isbn, issn, eissn, etc. that have defined COinS keywords OCinSoutput[ id ] = v; elseif id then -- when cfg.id_handlers[k].COinS is not nil OCinSoutput["rft_id"] = table.concat{ cfg.id_handlers[k].prefix, v, cfg.id_handlers[k].suffix or '', "#id-name=", cfg.id_handlers[k].label }; -- others; provide a URL and indicate identifier name as #fragment (human-readable, but transparent to browsers) end end local last, first; for k, v in ipairs( data.Authors ) do last, first = coins_cleanup (v.last), coins_cleanup (v.first or ''); -- replace any nowiki stripmarkers, non-printing or invisible characters if k == 1 then -- for the first author name only if is_set(last) and is_set(first) then -- set these COinS values if |first= and |last= specify the first author name OCinSoutput["rft.aulast"] = last; -- book, journal, dissertation OCinSoutput["rft.aufirst"] = first; -- book, journal, dissertation elseif is_set(last) then OCinSoutput["rft.au"] = last; -- book, journal, dissertation -- otherwise use this form for the first name end else -- for all other authors if is_set(last) and is_set(first) then OCinSoutput["rft.au"] = table.concat{ last, ", ", first }; -- book, journal, dissertation elseif is_set(last) then OCinSoutput["rft.au"] = last; -- book, journal, dissertation end -- TODO: At present we do not report "et al.". Add anything special if this condition applies? end end OCinSoutput.rft_id = data.URL; OCinSoutput.rfr_id = table.concat{ "info:sid/", mw.site.server:match( "[^/]*$" ), ":", data.RawPage }; -- TODO: Add optional extra info: -- rfr_dat=#REVISION<version> (referrer private data) -- ctx_id=<data.RawPage>#<ref> (identifier for the context object) -- ctx_tim=<ts> (timestamp in format yyyy-mm-ddThh:mm:ssTZD or yyyy-mm-dd) -- ctx_enc=info:ofi/enc:UTF-8 (character encoding) OCinSoutput = setmetatable( OCinSoutput, nil ); -- sort with version string always first, and combine. -- table.sort( OCinSoutput ); table.insert( OCinSoutput, 1, "ctx_ver=" .. ctx_ver ); -- such as "Z39.88-2004" return table.concat(OCinSoutput, "&"); end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) cfg = cfg_table_ptr; is_set = utilities_page_ptr.is_set; -- import functions from selected Module:Citation/CS1/Utilities module in_array = utilities_page_ptr.in_array; remove_wiki_link = utilities_page_ptr.remove_wiki_link; strip_apostrophe_markup = utilities_page_ptr.strip_apostrophe_markup; end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { make_coins_title = make_coins_title, get_coins_pages = get_coins_pages, COinS = COinS, set_selected_modules = set_selected_modules, } rhcncol1ss58wtsq88qf295xxtq4wrn Modul:Citation/CS1/Configuration 828 273 821 820 2024-08-09T09:21:28Z Jon Harald Søby 58 1 semakan diimportkan 820 Scribunto text/plain --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default. Note: Namespace names should use underscores instead of spaces. ]] local uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', 'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft_talk', 'Education_Program_talk', 'Module_talk', 'MediaWiki_talk' }; local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[^/]*[Ll]og', '/[Aa]rchive'}; -- list of Lua patterns found in page names of pages we should not categorize --[[--------------------------< M E S S A G E S >-------------------------------------------------------------- Translation table The following contains fixed text that may be output as part of a citation. This is separated from the main body to aid in future translations of this module. ]] local messages = { ['agency'] = '$1 $2', -- $1 is sepc, $2 is agency ['archived-dead'] = 'Archived from $1 on $2', ['archived-live'] = '$1 from the original on $2', ['archived-missing'] = 'Archived from the original$1 on $2', ['archived-unfit'] = 'Archived from the original on ', ['archived'] = 'Archived', ['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword ['cartography'] = 'Cartography by $1', ['editor'] = 'ed.', ['editors'] = 'eds.', ['edition'] = '($1&nbsp;ed.)', ['episode'] = 'Episode $1', ['et al'] = 'et&nbsp;al.', ['in'] = 'In', -- edited works ['inactive'] = 'inactive', ['inset'] = '$1 inset', ['interview'] = 'Interviewed by $1', ['lay summary'] = 'Lay summary', ['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1', -- ['nodate'] = 'n.d.', -- in the future for |date=none|n.d.|nd ['notitle'] = 'No title', -- for |title=(()) and (in the future) |title=none ['original'] = 'the original', ['origdate'] = ' [$1]', ['published'] = ' (published $1)', ['retrieved'] = 'Retrieved $1', ['season'] = 'Season $1', ['section'] = '§&nbsp;$1', ['sections'] = '§§&nbsp;$1', ['series'] = '$1 $2', -- $1 is sepc, $2 is series ['seriesnum'] = 'Series $1', ['translated'] = 'Translated by $1', ['type'] = ' ($1)', -- for titletype ['written'] = 'Written at $1', ['vol'] = '$1 Vol.&nbsp;$2', -- $1 is sepc; bold journal style volume is in presentation{} ['vol-no'] = '$1 Vol.&nbsp;$2 no.&nbsp;$3', -- sepc, volume, issue ['issue'] = '$1 No.&nbsp;$2', -- $1 is sepc ['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{} ['j-issue'] = ' ($1)', ['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc ['p-prefix'] = "$1 p.&nbsp;$2", -- $1 is sepc ['pp-prefix'] = "$1 pp.&nbsp;$2", -- $1 is sepc ['j-page(s)'] = ': $1', -- same for page and pages ['sheet'] = '$1 Sheet&nbsp;$2', -- $1 is sepc ['sheets'] = '$1 Sheets&nbsp;$2', -- $1 is sepc ['j-sheet'] = ': Sheet&nbsp;$1', ['j-sheets'] = ': Sheets&nbsp;$1', ['language'] = '(in $1)', ['via'] = " &ndash; via $1", ['event'] = 'Event occurs at', ['minutes'] = 'minutes in', -- Determines the location of the help page ['help page link'] = 'Help:CS1 errors', ['help page label'] = 'help', -- categories ['cat wikilink'] = '[[Kategori:$1]]', -- $1 is the category name [':cat wikilink'] = '[[:Category:$1|link]]', -- category name as maintenance message wikilink; $1 is the category name -- Internal errors (should only occur if configuration is bad) ['undefined_error'] = 'Called with an undefined error condition', ['unknown_ID_key'] = 'Unrecognized ID key', -- an ID key in id_handlers not found in ~/Identifiers func_map{} ['unknown_argument_map'] = 'Argument map not defined for this variable', ['bare_url_no_origin'] = 'Bare URL found but origin indicator is nil or empty', } --[=[-------------------------< E T _ A L _ P A T T E R N S >-------------------------------------------------- This table provides Lua patterns for the phrase "et al" and variants in name text (author, editor, etc.). The main module uses these to identify and emit the 'etal' message. ]=] local et_al_patterns = { "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.\"']*$", -- variations on the 'et al' theme "[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][AaIi][Ee]?[%.\"']*$", -- variations on the 'et alia', 'et alii' and 'et aliae' themes (false positive 'et aliie' unlikely to match) "[;,]? *%f[%a]and [Oo]thers", -- an alternative to et al. "%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form "%(%( *[Ee][Tt]%.? *[Aa][Ll]%.? *%)%)", -- a double-bracketed form (to counter partial removal of ((...)) syntax) "[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form } --[[--------------------------< E D I T O R _ M A R K U P _ P A T T E R N S >---------------------------------- This table provides Lua patterns for the phrase "ed" and variants in name text (author, editor, etc.). The main module uses these to identify and emit the 'extra_text_names' message. (It is not the only series of patterns for this message.) ]] local editor_markup_patterns = { -- these patterns match annotations at end of name '%f[%(%[][%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]?$', -- (ed) or (eds): leading '(', case insensitive 'ed', optional 's', '.' and/or ')' '[,%.%s]%f[e]eds?%.?$', -- ed or eds: without '('or ')'; case sensitive (ED could be initials Ed could be name) '%f[%(%[][%(%[]%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?%s*[%)%]]?$', -- (editor) or (editors): leading '(', case insensitive, optional '.' and/or ')' '[,%.%s]%f[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors: without '('or ')'; case insensitive -- these patterns match annotations at beginning of name '^eds?[%.,;]', -- ed. or eds.: lower case only, optional 's', requires '.' '^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', -- (ed) or (eds): also sqare brackets, case insensitive, optional 's', '.' '^[%(%[]?%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%A', -- (editor or (editors: also square brackets, case insensitive, optional brackets, 's' '^[%(%[]?%s*[Ee][Dd][Ii][Tt][Ee][Dd]%A', -- (edited: also square brackets, case insensitive, optional brackets -- these patterns match annotations that are the 'name' '^[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors; case insensitive } --[[--------------------------< P R E S E N T A T I O N >------------------------ Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically correct place. ]] local presentation = { -- Error output -- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538 -- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display ['hidden-error'] = '<span class="cs1-hidden-error error citation-comment">$1</span>', ['visible-error'] = '<span class="cs1-visible-error error citation-comment">$1</span>', ['hidden-maint'] = '<span class="cs1-maint citation-comment">$1</span>', ['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal CSS ['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like ['cite'] = '<cite class="$1">$2</cite>'; -- |ref= not set so no id="..." attribute ['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when |ref= is set ['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc. -- various access levels, for |access=, |doi-access=, |arxiv=, ... -- narrow no-break space &#8239; may work better than nowrap CSS. Or not? Browser support? ['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon ['free'] = {class='cs1-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css ['registration'] = {class='cs1-lock-registration', title='Free registration required'}, ['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'}, ['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'}, ['interwiki-icon'] = '<span class="$1" title="$2">$3</span>', ['class-wikisource'] = 'cs1-ws-icon', ['italic-title'] = "''$1''", ['kern-left'] = '<span class="cs1-kern-left">$1</span>$2', -- spacing to use when title contains leading single or double quote mark ['kern-right'] = '$1<span class="cs1-kern-right">$2</span>', -- spacing to use when title contains trailing single or double quote mark -- these for simple wikilinked titles [["text]], [[text"]] and [["text"]] -- span wraps entire wikilink ['kern-wl-left'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains leading single or double quote mark ['kern-wl-right'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains trailing single or double quote mark ['kern-wl-both'] = '<span class="cs1-kern-wl-left cs1-kern-wl-right">$1</span>', -- when title contains leading and trailing single or double quote marks ['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span> ['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space) ['ocins'] = '<span title="$1" class="Z3988"></span>', ['parameter'] = '<code class="cs1-code">&#124;$1=</code>', ['ps_cs1'] = '.'; -- CS1 style postscript (terminal) character ['ps_cs2'] = ''; -- CS2 style postscript (terminal) character (empty string) ['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content ['quoted-title'] = '"$1"', ['sep_cs1'] = '.', -- CS1 element separator ['sep_cs2'] = ',', -- CS2 separator ['sep_nl'] = ';', -- CS1|2 style name-list separator between names is a semicolon ['sep_nl_and'] = ' and ', -- used as last nl sep when |name-list-style=and and list has 2 items ['sep_nl_end'] = '; and ', -- used as last nl sep when |name-list-style=and and list has 3+ names ['sep_name'] = ', ', -- CS1|2 style last/first separator is <comma><space> ['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma ['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space ['sep_list'] = ', ', -- used for |language= when list has 3+ items except for last sep which uses sep_list_end ['sep_list_pair'] = ' and ', -- used for |language= when list has 2 items ['sep_list_end'] = ', and ', -- used as last list sep for |language= when list has 3+ items ['trans-italic-title'] = "&#91;''$1''&#93;", ['trans-quoted-title'] = "&#91;$1&#93;", -- for |trans-title= and |trans-quote= ['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{} } --[[--------------------------< A L I A S E S >--------------------------------- Aliases table for commonly passed parameters. Parameter names on the right side in the assignments in this table must have been defined in the Whitelist before they will be recognized as valid parameter names ]] local aliases = { ['AccessDate'] = {'access-date', 'accessdate'}, -- Used by InternetArchiveBot ['Agency'] = 'agency', ['ArchiveDate'] = {'archive-date', 'archivedate'}, -- Used by InternetArchiveBot ['ArchiveFormat'] = 'archive-format', ['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- Used by InternetArchiveBot ['ASINTLD'] = 'asin-tld', ['At'] = 'at', -- Used by InternetArchiveBot ['Authors'] = {'authors', 'people', 'credits'}, ['BookTitle'] = {'book-title', 'booktitle'}, ['Cartography'] = 'cartography', ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'}, ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'}; ['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url', 'chapterurl', 'contributionurl', 'sectionurl'}, -- Used by InternetArchiveBot ['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot ['Class'] = 'class', -- cite arxiv and arxiv identifiers ['Collaboration'] = 'collaboration', ['Conference'] = {'conference', 'event'}, ['ConferenceFormat'] = 'conference-format', ['ConferenceURL'] = {'conference-url', 'conferenceurl'}, -- Used by InternetArchiveBot ['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only ['Degree'] = 'degree', ['DF'] = 'df', ['DisplayAuthors'] = {'display-authors', 'display-subjects'}, ['DisplayContributors'] = 'display-contributors', ['DisplayEditors'] = 'display-editors', ['DisplayInterviewers'] = 'display-interviewers', ['DisplayTranslators'] = 'display-translators', ['Docket'] = 'docket', ['DoiBroken'] = 'doi-broken-date', ['Edition'] = 'edition', ['Embargo'] = 'pmc-embargo-date', ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'dictionary'}, -- cite encyclopedia only ['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode? ['Format'] = 'format', ['ID'] = {'id', 'ID'}, ['Inset'] = 'inset', ['Issue'] = {'issue', 'number'}, ['Language'] = {'language', 'lang'}, ['LayDate'] = {'lay-date', 'laydate'}, ['LayFormat'] = 'lay-format', ['LaySource'] = {'lay-source', 'laysource'}, ['LayURL'] = {'lay-url', 'layurl'}, -- Used by InternetArchiveBot ['MailingList'] = {'mailing-list', 'mailinglist'}, -- cite mailing list only ['Map'] = 'map', -- cite map only ['MapFormat'] = 'map-format', -- cite map only ['MapURL'] = {'map-url', 'mapurl'}, -- cite map only -- Used by InternetArchiveBot ['MapUrlAccess'] = 'map-url-access', -- cite map only -- Used by InternetArchiveBot ['Minutes'] = 'minutes', ['Mode'] = 'mode', ['NameListStyle'] = {'name-list-style', 'name-list-format'}, ['Network'] = 'network', ['Newsgroup'] = 'newsgroup', -- cite newsgroup only ['NoPP'] = {'no-pp', 'nopp'}, ['NoTracking'] = {'no-tracking', 'template-doc-demo'}, ['Number'] = 'number', -- this case only for cite techreport ['OrigDate'] = {'orig-date', 'orig-year', 'origyear'}, ['Others'] = 'others', ['Page'] = {'page', 'p'}, -- Used by InternetArchiveBot ['Pages'] = {'pages', 'pp'}, -- Used by InternetArchiveBot ['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work'}, ['Place'] = {'place', 'location'}, ['PostScript'] = 'postscript', ['PublicationDate'] = {'publication-date', 'publicationdate'}, ['PublicationPlace'] = {'publication-place', 'publicationplace'}, ['PublisherName'] = {'publisher', 'institution'}, ['Quote'] = {'quote', 'quotation'}, ['QuotePage'] = 'quote-page', ['QuotePages'] = 'quote-pages', ['Ref'] = 'ref', ['Scale'] = 'scale', ['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry', 'script-article', 'script-section'}, ['ScriptMap'] = 'script-map', ['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'}, ['ScriptQuote'] = 'script-quote', ['ScriptTitle'] = 'script-title', -- Used by InternetArchiveBot ['Season'] = 'season', ['Sections'] = 'sections', -- cite map only ['Series'] = {'series', 'version'}, ['SeriesLink'] = {'series-link', 'serieslink'}, ['SeriesNumber'] = {'series-number', 'series-no', 'seriesno'}, ['Sheet'] = 'sheet', -- cite map only ['Sheets'] = 'sheets', -- cite map only ['Station'] = 'station', ['Time'] = 'time', ['TimeCaption'] = {'time-caption', 'timecaption'}, ['Title'] = 'title', -- Used by InternetArchiveBot ['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, -- Used by InternetArchiveBot ['TitleNote'] = 'department', ['TitleType'] = {'type', 'medium'}, ['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'}, ['Transcript'] = 'transcript', ['TranscriptFormat'] = 'transcript-format', ['TranscriptURL'] = {'transcript-url', 'transcripturl'}, -- Used by InternetArchiveBot ['TransMap'] = 'trans-map', -- cite map only ['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'}, ['TransQuote'] = 'trans-quote', ['TransTitle'] = 'trans-title', -- Used by InternetArchiveBot ['URL'] = {'url', 'URL'}, -- Used by InternetArchiveBot ['UrlAccess'] = 'url-access', -- Used by InternetArchiveBot ['UrlStatus'] = 'url-status', -- Used by InternetArchiveBot ['Vauthors'] = 'vauthors', ['Veditors'] = 'veditors', ['Via'] = 'via', ['Volume'] = 'volume', ['Year'] = 'year', ['AuthorList-First'] = {"first#", "author-first#", "author#-first", "given#", "author-given#", "author#-given"}, ['AuthorList-Last'] = {"last#", "author-last#", "author#-last", "surname#", "author-surname#", "author#-surname", "author#", "subject#", 'host#'}, ['AuthorList-Link'] = {"author-link#", "author#-link", "subject-link#", "subject#-link", "authorlink#", "author#link"}, ['AuthorList-Mask'] = {"author-mask#", "author#-mask", "subject-mask#", "subject#-mask"}, ['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'}, ['ContributorList-Last'] = {'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname', 'contributor#'}, ['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'}, ['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'}, ['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"}, ['EditorList-Last'] = {"editor-last#", "editor#-last", "editor-surname#", "editor#-surname", "editor#"}, ['EditorList-Link'] = {"editor-link#", "editor#-link"}, ['EditorList-Mask'] = {"editor-mask#", "editor#-mask"}, ['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first', 'interviewer-given#', 'interviewer#-given'}, ['InterviewerList-Last'] = {'interviewer-last#', 'interviewer#-last', 'interviewer-surname#', 'interviewer#-surname', 'interviewer#'}, ['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'}, ['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'}, ['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'}, ['TranslatorList-Last'] = {'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname', 'translator#'}, ['TranslatorList-Link'] = {'translator-link#', 'translator#-link'}, ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, } --[[--------------------------< P U N C T _ S K I P >--------------------------- builds a table of parameter names that the extraneous terminal punctuation check should not check. ]] local punct_skip = {}; local meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value 'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters 'AuthorList-Mask', 'ContributorList-Mask', 'EditorList-Mask', 'InterviewerList-Mask', 'TranslatorList-Mask', -- name-list mask may have name separators 'PostScript', 'Quote', 'ScriptQuote', 'TransQuote', 'Ref', -- miscellaneous 'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- URL-holding parameters } for _, meta_param in ipairs (meta_params) do -- for each meta parameter key local params = aliases[meta_param]; -- get the parameter or the table of parameters associated with the meta parameter name if 'string' == type (params) then punct_skip[params] = 1; -- just a single parameter else for _, param in ipairs (params) do -- get the parameter name punct_skip[param] = 1; -- add the parameter name to the skip table local count; param, count = param:gsub ('#', ''); -- remove enumerator marker from enumerated parameters if 0 ~= count then -- if removed punct_skip[param] = 1; -- add param name without enumerator marker end end end end --[[-----------< S P E C I A L C A S E T R A N S L A T I O N S >------------ This table is primarily here to support internationalization. Translations in this table are used, for example, when an error message, category name, etc., is extracted from the English alias key. There may be other cases where this translation table may be useful. ]] local special_case_translation = { ['AuthorList'] = 'authors list', -- used to assemble maintenance category names ['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base mainenance category names in maint_cats{} table below ['EditorList'] = 'editors list', -- must match the names of the actual categories ['InterviewerList'] = 'interviewers list', -- this group or translations used by name_has_ed_markup() and name_has_mult_names() ['TranslatorList'] = 'translators list', ['authors'] = 'authors', -- used to assemble maintenance category names ['contributors'] = 'contributors', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below ['editors'] = 'editors', -- must match the names of the actual categories ['interviewers'] = 'interviewers', -- this group of translations used by get_display_names() ['translators'] = 'translators', -- Lua patterns to match pseudo-titles used by Internet Archive bot and others as placeholder for unknown |title= value ['archived_copy'] = { -- used with CS1 maint: Archive[d] copy as title ['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki ['local'] = nil, -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language }, -- Lua patterns to match generic titles; usually created by bots of reference filling tools -- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language ['generic_titles'] = { -- patterns in this table should be lowercase only -- leave ['local'] nil except when there is a matching generic title in your language {['en'] = {'^wayback%s+machine$', false}, ['local'] = nil}, {['en'] = {'are you a robot', true}, ['local'] = nil}, {['en'] = {'hugedomains.com', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?no +title[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'page not found', true}, ['local'] = nil}, {['en'] = {'subscribe to read', true}, ['local'] = nil}, {['en'] = {'^[%(%[{<]?unknown[>}%]%)]?$', false}, ['local'] = nil}, {['en'] = {'website is for sale', true}, ['local'] = nil}, {['en'] = {'^404', true}, ['local'] = nil}, } } --[[--------------------------< D A T E _ N A M E S >---------------------------------------------------------- This table of tables lists local language date names and fallback English date names. The code in Date_validation will look first in the local table for valid date names. If date names are not found in the local table, the code will look in the English table. Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation function date_name_xlate() is used. In these tables, season numbering is defined by Extended Date/Time Format (EDTF) Specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. CS1|2 only supports generic seasons. EDTF does support the distinction between north and south hemispere seasons but CS1|2 has no way to make that distinction. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) The standard does not address 'named' dates so, for the purposes of CS1|2, Easter and Christmas are defined here as 98 and 99, which should be out of the ISO 8601 (EDTF) range of uses for a while. ]] local date_names = { ['en'] = { -- English ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, ['local'] = { -- replace these English date names with the local language equivalents ['long'] = {['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12}, ['short'] = {['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12}, ['quarter'] = {['First Quarter'] = 33, ['Second Quarter'] = 34, ['Third Quarter'] = 35, ['Fourth Quarter'] = 36}, ['season'] = {['Winter'] = 24, ['Spring'] = 21, ['Summer'] = 22, ['Fall'] = 23, ['Autumn'] = 23}, ['named'] = {['Easter'] = 98, ['Christmas'] = 99}, }, ['inv_local_l'] = {}, -- used in date reformatting; copy of date_names['local'].long where k/v are inverted: [1]='<local name>' etc. ['inv_local_s'] = {}, -- used in date reformatting; copy of date_names['local'].short where k/v are inverted: [1]='<local name>' etc. ['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}, -- used to convert local language digits to Western 0-9 ['xlate_digits'] = {}, } for name, i in pairs (date_names['local'].long) do -- this table is ['name'] = i date_names['inv_local_l'][i] = name; -- invert to get [i] = 'name' for conversions from ymd end for name, i in pairs (date_names['local'].short) do -- this table is ['name'] = i date_names['inv_local_s'][i] = name; -- invert to get [i] = 'name' for conversions from ymd end for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value end local df_template_patterns = { -- table of redirects to {{Use dmy dates}} and {{Use mdy dates}} '{{ *[Uu]se +(dmy) +dates *[|}]', -- 1159k -- sorted by approximate transclusion count '{{ *[Uu]se +(mdy) +dates *[|}]', -- 212k '{{ *[Uu]se +(MDY) +dates *[|}]', -- 788 '{{ *[Uu]se +(DMY) +dates *[|}]', -- 343 '{{ *([Mm]dy) *[|}]', -- 176 '{{ *[Uu]se *(dmy) *[|}]', -- 156 + 18 '{{ *[Uu]se *(mdy) *[|}]', -- 149 + 11 '{{ *([Dd]my) *[|}]', -- 56 '{{ *[Uu]se +(MDY) *[|}]', -- 5 '{{ *([Dd]MY) *[|}]', -- 3 '{{ *[Uu]se(mdy)dates *[|}]', -- 1 '{{ *[Uu]se +(DMY) *[|}]', -- 0 '{{ *([Mm]DY) *[|}]', -- 0 } local function get_date_format () local content = mw.title.getCurrentTitle():getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 for _, pattern in ipairs (df_template_patterns) do -- loop through the patterns looking for {{Use dmy dates}} or {{Use mdy dates}} or any of their redirects local start, _, match = content:find(pattern); -- match is the three letters indicating desired date format if match then content = content:match ('%b{}', start); -- get the whole template if content:match ('| *cs1%-dates *= *[lsy][sy]?') then -- look for |cs1-dates=publication date length access-/archive-date length return match:lower() .. '-' .. content:match ('| *cs1%-dates *= *([lsy][sy]?)'); else return match:lower() .. '-all'; -- no |cs1-dates= k/v pair; return value appropriate for use in |df= end end end end local global_df = get_date_format (); --[[-----------------< V O L U M E , I S S U E , P A G E S >------------------ These tables hold cite class values (from the template invocation) and identify those templates that support |volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which is handled in the main module. ]] local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'} local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news', 'podcast'} local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'} --[[--------------------------< K E Y W O R D S >------------------------------- These tables hold keywords for those parameters that have defined sets of acceptable keywords. ]] --[[-------------------< K E Y W O R D S T A B L E >-------------------------- this is a list of keywords; each key in the list is associated with a table of synonymous keywords possibly from different languages. for I18N: add local-language keywords to value table; do not change the key. For example, adding the German keyword 'ja': ['affirmative'] = {'yes', 'true', 'y', 'ja'}, Because CS1|2 templates from en.wiki articles are often copied to other local wikis, it is recommended that the English keywords remain in these tables. ]] local keywords = { ['amp'] = {'&', 'amp', 'ampersand'}, -- |name-list-style= ['and'] = {'and', 'serial'}, -- |name-list-style= ['affirmative'] = {'yes', 'true', 'y'}, -- |no-tracking=, |no-pp= -- Used by InternetArchiveBot ['afterword'] = {'afterword'}, -- |contribution= ['bot: unknown'] = {'bot: unknown'}, -- |url-status= -- Used by InternetArchiveBot ['cs1'] = {'cs1'}, -- |mode= ['cs2'] = {'cs2'}, -- |mode= ['dead'] = {'dead'}, -- |url-status= -- Used by InternetArchiveBot ['dmy'] = {'dmy'}, -- |df= ['dmy-all'] = {'dmy-all'}, -- |df= ['foreword'] = {'foreword'}, -- |contribution= ['free'] = {'free'}, -- |url-access= -- Used by InternetArchiveBot ['introduction'] = {'introduction'}, -- |contribution= ['limited'] = {'limited'}, -- |url-access= -- Used by InternetArchiveBot ['live'] = {'live'}, -- |url-status= -- Used by InternetArchiveBot ['mdy'] = {'mdy'}, -- |df= ['mdy-all'] = {'mdy-all'}, -- |df= ['none'] = {'none'}, -- |postscript=, |ref=, |title=, |type= -- Used by InternetArchiveBot ['off'] = {'off'}, -- |title= (potentially also: |title-link=, |postscript=, |ref=, |type=) ['preface'] = {'preface'}, -- |contribution= ['registration'] = {'registration'}, -- |url-access= -- Used by InternetArchiveBot ['subscription'] = {'subscription'}, -- |url-access= -- Used by InternetArchiveBot ['unfit'] = {'unfit'}, -- |url-status= -- Used by InternetArchiveBot ['usurped'] = {'usurped'}, -- |url-status= -- Used by InternetArchiveBot ['vanc'] = {'vanc'}, -- |name-list-style= ['ymd'] = {'ymd'}, -- |df= ['ymd-all'] = {'ymd-all'}, -- |df= -- ['yMd'] = {'yMd'}, -- |df=; not supported at en.wiki -- ['yMd-all'] = {'yMd-all'}, -- |df=; not supported at en.wiki } --[[------------------------< X L A T E _ K E Y W O R D S >--------------------- this function builds a list, keywords_xlate{}, of the keywords found in keywords{} where the values from keywords{} become the keys in keywords_xlate{} and the keys from keywords{} become the values in keywords_xlate{}: ['affirmative'] = {'yes', 'true', 'y'}, -- in keywords{} becomes ['yes'] = 'affirmative', -- in keywords_xlate{} ['true'] = 'affirmative', ['y'] = 'affirmative', the purpose of this function is to act as a translator between a non-English keyword and its English equivalent that may be used in other modules of this suite ]] local function xlate_keywords () local out_table = {}; -- output goes here for k, keywords_t in pairs (keywords) do -- spin through the keywords table for _, keyword in ipairs (keywords_t) do -- for each keyword out_table[keyword] = k; -- create an entry in the output table where keyword is the key end end return out_table; end local keywords_xlate = xlate_keywords (); -- the list of translated keywords --[[----------------< M A K E _ K E Y W O R D S _ L I S T >--------------------- this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter. keywords_lists{}, is a table of tables from keywords{} ]] local function make_keywords_list (keywords_lists) local out_table = {}; -- output goes here for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ... table.insert (out_table, keyword); -- ... as plain text, to the output list end end return out_table; end --[[----------------< K E Y W O R D S _ L I S T S >----------------------------- this is a list of lists of valid keywords for the various parameters in [key]. Generally the keys in this table are the canonical en.wiki parameter names though some are contrived because of use in multiple differently named parameters: ['yes_true_y'], ['id-access']. The function make_keywords_list() extracts the individual keywords from the appropriate list in keywords{}. The lists in this table are used to validate the keyword assignment for the parameters named in this table's keys. ]] local keywords_lists = { ['yes_true_y'] = make_keywords_list ({keywords.affirmative}), ['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}), ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}), -- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki ['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}), ['name-list-style'] = make_keywords_list ({keywords.amp, keywords['and'], keywords.vanc}), ['url-access'] = make_keywords_list ({keywords.subscription, keywords.limited, keywords.registration}), ['url-status'] = make_keywords_list ({keywords.dead, keywords.live, keywords.unfit, keywords.usurped, keywords['bot: unknown']}), ['id-access'] = make_keywords_list ({keywords.free}), } --[[---------------------< S T R I P M A R K E R S >---------------------------- Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when) MediaWiki changes their form. ]] local stripmarkers = { ['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker ['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker() } --[[------------< I N V I S I B L E _ C H A R A C T E R S >--------------------- This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal representations of UTF-8 codes. The table is organized as a table of tables because the Lua pairs keyword returns table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at the top of the table are also found in the ranges specified by the entries at the bottom of the table. Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki stripmarker is not an error but some others are because the parameter values that include them become part of the template's metadata before stripmarker replacement. ]] local invisible_chars = { {'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD {'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D {'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B {'hair space', '\226\128\138'}, -- U+200A, E2 80 8A {'soft hyphen', '\194\173'}, -- U+00AD, C2 AD {'horizontal tab', '\009'}, -- U+0009 (HT), 09 {'line feed', '\010'}, -- U+000A (LF), 0A {'no-break space', '\194\160'}, -- U+00A0 (NBSP), C2 A0 {'carriage return', '\013'}, -- U+000D (CR), 0D {'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type {'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test {'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) {'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F -- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF -- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF -- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD -- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD } --[[ Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This pattern covers all of the unicode characters for these languages: Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf plus the not-necessarily Indic scripts for Sinhala and Burmese: Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf the pattern is used by has_invisible_chars() and coins_cleanup() TODO: find a better place for this? ]] local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]'; --[[----------------------< L A N G U A G E S U P P O R T >------------------- These tables and constants support various language-specific functionality. ]] local this_wiki_code = mw.getContentLanguage():getCode(); -- get this wiki's language code if string.match (mw.site.server, 'wikidata') then this_wiki_code = mw.getCurrentFrame():preprocess('{{int:lang}}'); -- on Wikidata so use interface language setting instead end local languages = mw.language.fetchLanguageNames (this_wiki_code, 'all'); -- get a list of language names known to Wikimedia; used for |language= and interwiki tests local inter_wiki_map = {}; -- map of interwiki prefixes that are language-code prefixes for k, v in pairs (mw.site.interwikiMap ('local')) do -- spin through the base interwiki map (limited to local) if languages[v["prefix"]] then -- if the prefix matches a known language code inter_wiki_map[v["prefix"]] = true; -- add it to our local map end end local local_lang_cat_enable = false; -- set to true to categorize pages where |language=<local wiki's language> --[[--------------------< S C R I P T _ L A N G _ C O D E S >------------------- This table is used to hold ISO 639-1 two-character and ISO 639-3 three-character language codes that apply only to |script-title= and |script-chapter= ]] local script_lang_codes = { 'am', 'ar', 'be', 'bg', 'bn', 'bo', 'bs', 'dv', 'dz', 'el', 'fa', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mr', 'my', 'ne', 'or', 'ota', 'ps', 'ru', 'sd', 'si', 'sr', 'ta', 'te', 'tg', 'th', 'ti', 'ug', 'uk', 'ur', 'uz', 'yi', 'zh' }; --[[---------------< L A N G U A G E R E M A P P I N G >---------------------- These tables hold language information that is different (correct) from MediaWiki's definitions For each ['code'] = 'language name' in lang_code_remap{} there must be a matching ['language name'] = {'language name', 'code'} in lang_name_remap{} lang_code_remap{}: key is always lowercase ISO 639-1, -2, -3 language code or a valid lowercase IETF language tag value is properly spelled and capitalized language name associated with key only one language name per key; key/value pair must have matching entry in lang_name_remap{} lang_name_remap{}: key is always lowercase language name value is a table the holds correctly spelled and capitalized language name [1] and associated code [2] (code must match a code key in lang_code_remap{}) may have multiple keys referring to a common preferred name and code; For example: ['kolsch'] and ['kölsch'] both refer to 'Kölsch' and 'ksh' ]] local lang_code_remap = { -- used for |language= and |script-title= / |script-chapter= ['als'] = 'Tosk Albanian', -- MediaWiki returns Alemannisch ['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['bn'] = 'Bengali', -- MediaWiki returns Bangla ['ca-valencia'] = 'Valencian', -- IETF variant of Catalan ['crh'] = 'Crimean Tatar', -- synonymous with Crimean Turkish (return value from {{#language:crh|en}}) ['ilo'] = 'Ilocano', -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['ksh'] = 'Kölsch', -- MediaWiki: Colognian; use IANA/ISO 639 preferred name ['ksh-x-colog'] = 'Colognian', -- override MediaWiki ksh; no IANA/ISO 639 code for Colognian; IETF private code created at Module:Lang/data ['mis-x-ripuar'] = 'Ripuarian', -- override MediaWiki ksh; no IANA/ISO 639 code for Ripuarian; IETF private code created at Module:Lang/data ['nan-tw'] = 'Taiwanese Hokkien', -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese and support en.wiki preferred name } local lang_name_remap = { -- used for |language= ['alemannisch'] = {'Swiss German', 'gsw'}, -- not an ISO or IANA language name; MediaWiki uses 'als' as a subdomain name for Alemannic Wikipedia: als.wikipedia.org ['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap ['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code ['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org ['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found ['blackfoot'] = {'Blackfoot', 'bla'}, -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name ['colognian'] = {'Colognian', 'ksh-x-colog'}, -- MediaWiki preferred name for ksh ['crimean tatar'] = {'Crimean Tatar', 'crh'}, -- MediaWiki uses 'crh' as a subdomain name for Crimean Tatar Wikipedia: crh.wikipedia.org ['ilocano'] = {'Ilocano', 'ilo'}, -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name ['kolsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name (use non-diacritical o instead of umlaut ö) ['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name ['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639 -- ['siksika'] = {'Siksika', 'bla'}, -- MediaWiki/IANA/ISO 639 preferred name: Siksika ['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-TW'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese ['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found ['valencian'] = {'Valencian', 'ca'}, -- variant of Catalan; categorizes as Catalan } --[[---------------< P R O P E R T I E S _ C A T E G O R I E S >---------------- Properties categories. These are used for investigating qualities of citations. ]] local prop_cats = { ['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is foreign-language name, $2 is ISO639-1 code ['foreign_lang_source_2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code used as a sort key ['local_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is local-language name, $2 is ISO639-1 code; not emitted when local_lang_cat_enable is false ['location test'] = 'CS1 location test', ['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category ['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code ['jul_greg_uncertainty'] = 'CS1: Julian–Gregorian uncertainty', -- probably temporary cat to identify scope of template with dates 1 October 1582 – 1 January 1926 ['long_vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 charachters ['year_range_abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form } --[[-------------------< T I T L E _ T Y P E S >-------------------------------- Here we map a template's CitationClass to TitleType (default values for |type= parameter) ]] local title_types = { ['AV-media-notes'] = 'Media notes', ['interview'] = 'Interview', ['mailinglist'] = 'Mailing list', ['map'] = 'Map', ['podcast'] = 'Podcast', ['pressrelease'] = 'Press release', ['report'] = 'Report', ['techreport'] = 'Technical report', ['thesis'] = 'Thesis', } --[[===================<< E R R O R M E S S A G I N G >>====================== ]] --[[----------< E R R O R M E S S A G E S U P P L I M E N T S >------------- I18N for those messages that are supplemented with additional specific text that describes the reason for the error TODO: merge this with special_case_translations{}? ]] local err_msg_supl = { ['char'] = 'invalid character', -- |isbn=, |sbn= ['check'] = 'checksum', -- |isbn=, |sbn= ['flag'] = 'flag', -- |archive-url= ['form'] = 'invalid form', -- |isbn=, |sbn= ['group'] = 'invalid group id', -- |isbn= ['initials'] = 'initials', -- Vancouver ['journal'] = 'journal', -- |bibcode= ['length'] = 'length', -- |isbn=, |bibcode=, |sbn= ['liveweb'] = 'liveweb', -- |archive-url= ['missing comma'] = 'missing comma', -- Vancouver ['name'] = 'name', -- Vancouver ['non-Latin char'] = 'non-Latin character', -- Vancouver ['path'] = 'path', -- |archive-url= ['prefix'] = 'invalid prefix', -- |isbn= ['punctuation'] = 'punctuation', -- Vancouver ['save'] = 'save command', -- |archive-url= ['suffix'] = 'suffix', -- Vancouver ['timestamp'] = 'timestamp', -- |archive-url= ['value'] = 'value', -- |bibcode= ['year'] = 'year', -- |bibcode= } --[[--------------< E R R O R _ C O N D I T I O N S >--------------------------- Error condition table. This table has two sections: errors at the top, maintenance at the bottom. Maint 'messaging' does not have a 'message' (message=nil) The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment. Anchor changes require identical changes to matching anchor in Help:CS1 errors TODO: rename error_conditions{} to something more generic; create separate error and maint tables inside that? ]] local error_conditions = { err_accessdate_missing_url = { message = '<code class="cs1-code">&#124;access-date=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'accessdate_missing_url', category = 'CS1 errors: access-date without URL', hidden = false }, err_apostrophe_markup = { message = 'Italic or bold markup not allowed in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'apostrophe_markup', category = 'CS1 errors: markup', hidden = false }, err_archive_missing_date = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;archive-date=</code>', anchor = 'archive_missing_date', category = 'CS1 errors: archive-url', hidden = false }, err_archive_missing_url = { message = '<code class="cs1-code">&#124;archive-url=</code> requires <code class="cs1-code">&#124;url=</code>', anchor = 'archive_missing_url', category = 'CS1 errors: archive-url', hidden = false }, err_archive_url = { message = '<code class="cs1-code">&#124;archive-url=</code> is malformed: $1', -- $1 is error message detail anchor = 'archive_url', category = 'CS1 errors: archive-url', hidden = false }, err_arxiv_missing = { message = '<code class="cs1-code">&#124;arxiv=</code> required', anchor = 'arxiv_missing', category = 'CS1 errors: arXiv', -- same as bad arxiv hidden = false }, err_bad_arxiv = { message = 'Check <code class="cs1-code">&#124;arxiv=</code> value', anchor = 'bad_arxiv', category = 'CS1 errors: arXiv', hidden = false }, err_bad_asin = { message = 'Check <code class="cs1-code">&#124;asin=</code> value', anchor = 'bad_asin', category ='CS1 errors: ASIN', hidden = false }, err_bad_bibcode = { message = 'Check <code class="cs1-code">&#124;bibcode=</code> $1', -- $1 is error message detail anchor = 'bad_bibcode', category = 'CS1 errors: bibcode', hidden = false }, err_bad_biorxiv = { message = 'Check <code class="cs1-code">&#124;biorxiv=</code> value', anchor = 'bad_biorxiv', category = 'CS1 errors: bioRxiv', hidden = false }, err_bad_citeseerx = { message = 'Check <code class="cs1-code">&#124;citeseerx=</code> value', anchor = 'bad_citeseerx', category = 'CS1 errors: citeseerx', hidden = false }, err_bad_date = { message = 'Check date values in: $1', -- $1 is a parameter name list anchor = 'bad_date', category = 'CS1 errors: dates', hidden = false }, err_bad_doi = { message = 'Check <code class="cs1-code">&#124;doi=</code> value', anchor = 'bad_doi', category = 'CS1 errors: DOI', hidden = false }, err_bad_hdl = { message = 'Check <code class="cs1-code">&#124;hdl=</code> value', anchor = 'bad_hdl', category = 'CS1 errors: HDL', hidden = false }, err_bad_isbn = { message = 'Check <code class="cs1-code">&#124;isbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_isbn', category = 'CS1 errors: ISBN', hidden = false }, err_bad_ismn = { message = 'Check <code class="cs1-code">&#124;ismn=</code> value', anchor = 'bad_ismn', category = 'CS1 errors: ISMN', hidden = false }, err_bad_issn = { message = 'Check <code class="cs1-code">&#124;$1issn=</code> value', -- $1 is 'e' or '' for eissn or issn anchor = 'bad_issn', category = 'CS1 errors: ISSN', hidden = false }, err_bad_jfm = { message = 'Check <code class="cs1-code">&#124;jfm=</code> value', anchor = 'bad_jfm', category = 'CS1 errors: JFM', hidden = false }, err_bad_jstor = { message = 'Check <code class="cs1-code">&#124;jstor=</code> value', anchor = 'bad_jstor', category = 'CS1 errors: JSTOR', hidden = false }, err_bad_lccn = { message = 'Check <code class="cs1-code">&#124;lccn=</code> value', anchor = 'bad_lccn', category = 'CS1 errors: LCCN', hidden = false }, err_bad_mr = { message = 'Check <code class="cs1-code">&#124;mr=</code> value', anchor = 'bad_mr', category = 'CS1 errors: MR', hidden = false }, err_bad_oclc = { message = 'Check <code class="cs1-code">&#124;oclc=</code> value', anchor = 'bad_oclc', category = 'CS1 errors: OCLC', hidden = false }, err_bad_ol = { message = 'Check <code class="cs1-code">&#124;ol=</code> value', anchor = 'bad_ol', category = 'CS1 errors: OL', hidden = false }, err_bad_osti = { message = 'Check <code class="cs1-code">&#124;osti=</code> value', anchor = 'bad_osti', category = 'CS1 errors: OSTI', hidden = false }, err_bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link= message = 'Check <code class="cs1-code">&#124;$1=</code> value', -- $1 is parameter name anchor = 'bad_paramlink', category = 'CS1 errors: parameter link', hidden = false }, err_bad_pmc = { message = 'Check <code class="cs1-code">&#124;pmc=</code> value', anchor = 'bad_pmc', category = 'CS1 errors: PMC', hidden = false }, err_bad_pmid = { message = 'Check <code class="cs1-code">&#124;pmid=</code> value', anchor = 'bad_pmid', category = 'CS1 errors: PMID', hidden = false }, err_bad_rfc = { message = 'Check <code class="cs1-code">&#124;rfc=</code> value', anchor = 'bad_rfc', category = 'CS1 errors: RFC', hidden = false }, err_bad_s2cid = { message = 'Check <code class="cs1-code">&#124;s2cid=</code> value', anchor = 'bad_s2cid', category = 'CS1 errors: S2CID', hidden = false }, err_bad_sbn = { message = 'Check <code class="cs1-code">&#124;sbn=</code> value: $1', -- $1 is error message detail anchor = 'bad_sbn', category = 'CS1 errors: SBN', hidden = false }, err_bad_ssrn = { message = 'Check <code class="cs1-code">&#124;ssrn=</code> value', anchor = 'bad_ssrn', category = 'CS1 errors: SSRN', hidden = false }, err_bad_url = { message = 'Check $1 value', -- $1 is parameter name anchor = 'bad_url', category = 'CS1 errors: URL', hidden = false }, err_bad_usenet_id = { message = 'Check <code class="cs1-code">&#124;message-id=</code> value', anchor = 'bad_message_id', category = 'CS1 errors: message-id', hidden = false }, err_bad_zbl = { message = 'Check <code class="cs1-code">&#124;zbl=</code> value', anchor = 'bad_zbl', category = 'CS1 errors: Zbl', hidden = false }, err_bare_url_missing_title = { message = '$1 missing title', -- $1 is parameter name anchor = 'bare_url_missing_title', category = 'CS1 errors: bare URL', hidden = false }, err_biorxiv_missing = { message = '<code class="cs1-code">&#124;biorxiv=</code> required', anchor = 'biorxiv_missing', category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv hidden = false }, err_chapter_ignored = { message = '<code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'chapter_ignored', category = 'CS1 errors: chapter ignored', hidden = false }, err_citation_missing_title = { message = 'Missing or empty <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'citation_missing_title', category = 'CS1 errors: missing title', hidden = false }, err_citeseerx_missing = { message = '<code class="cs1-code">&#124;citeseerx=</code> required', anchor = 'citeseerx_missing', category = 'CS1 errors: citeseerx', -- same as bad citeseerx hidden = false }, err_cite_web_url = { -- this error applies to cite web and to cite podcast message = 'Missing or empty <code class="cs1-code">&#124;url=</code>', anchor = 'cite_web_url', category = 'CS1 errors: requires URL', hidden = false }, err_class_ignored = { message = '<code class="cs1-code">&#124;class=</code> ignored', anchor = 'class_ignored', category = 'CS1 errors: class', hidden = false }, err_contributor_ignored = { message = '<code class="cs1-code">&#124;contributor=</code> ignored', anchor = 'contributor_ignored', category = 'CS1 errors: contributor', hidden = false }, err_contributor_missing_required_param = { message = '<code class="cs1-code">&#124;contributor=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'contributor_missing_required_param', category = 'CS1 errors: contributor', hidden = false }, err_deprecated_params = { message = 'Cite uses deprecated parameter <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'deprecated_params', category = 'CS1 errors: deprecated parameters', hidden = false }, err_disp_name = { message = 'Invalid <code class="cs1-code">&#124;display-$1=$2</code>', -- $1 is 'authors', 'contributors', 'editors', 'interviewers', 'translators'; gets value from special_case_translation table anchor = 'disp_name', category = 'CS1 errors: display-names', hidden = false, }, err_doibroken_missing_doi = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;doi=</code>', -- $1 is parameter name anchor = 'doibroken_missing_doi', category = 'CS1 errors: DOI', hidden = false }, err_empty_citation = { message = 'Empty citation', anchor = 'empty_citation', category = 'CS1 errors: empty citation', hidden = false }, err_etal = { message = 'Explicit use of et al. in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'explicit_et_al', category = 'CS1 errors: explicit use of et al.', hidden = false }, err_extra_text_edition = { message = '<code class="cs1-code">&#124;edition=</code> has extra text', anchor = 'extra_text_edition', category = 'CS1 errors: extra text: edition', hidden = false, }, err_extra_text_pages = { -- TODO make message dependent on triggering parameter i.e. p/pp/page/pages? message = '<code class="cs1-code">&#124;page(s)=</code> has extra text', anchor = 'extra_text_pages', category = 'CS1 errors: extra text: pages', hidden = false, }, err_first_missing_last = { message = '<code class="cs1-code">&#124;$1=</code> missing <code class="cs1-code">&#124;$2=</code>', -- $1 is first alias, $2 is matching last alias anchor = 'first_missing_last', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_format_missing_url = { message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;$2=</code>', -- $1 is format parameter $2 is url parameter anchor = 'format_missing_url', category = 'CS1 errors: format without URL', hidden = false }, err_generic_title = { message = 'Cite uses generic title', anchor = 'generic_title', category = 'CS1 errors: generic title', hidden = false, }, err_invalid_param_val = { message = 'Invalid <code class="cs1-code">&#124;$1=$2</code>', -- $1 is parameter name $2 is parameter value anchor = 'invalid_param_val', category = 'CS1 errors: invalid parameter value', hidden = false }, err_invisible_char = { message = '$1 in $2 at position $3', -- $1 is invisible char $2 is parameter name $3 is position number anchor = 'invisible_char', category = 'CS1 errors: invisible characters', hidden = false }, err_missing_name = { message = 'Missing <code class="cs1-code">&#124;$1$2=</code>', -- $1 is modified NameList; $2 is enumerator anchor = 'missing_name', category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator hidden = false }, err_missing_periodical = { message = 'Cite $1 requires <code class="cs1-code">&#124;$2=</code>', -- $1 is cs1 template name; $2 is canonical periodical parameter name for cite $1 anchor = 'missing_periodical', category = 'CS1 errors: missing periodical', hidden = true }, err_missing_pipe = { message = 'Missing pipe in: <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'missing_pipe', category = 'CS1 errors: missing pipe', hidden = false }, err_param_access_requires_param = { message = '<code class="cs1-code">&#124;$1-access=</code> requires <code class="cs1-code">&#124;$1=</code>', -- $1 is parameter name anchor = 'param_access_requires_param', category = 'CS1 errors: param-access', hidden = false }, err_param_has_ext_link = { message = 'External link in <code class="cs1-code">$1</code>', -- $1 is parameter name anchor = 'param_has_ext_link', category = 'CS1 errors: external links', hidden = false }, err_parameter_ignored = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored', -- $1 is parameter name anchor = 'parameter_ignored', category = 'CS1 errors: unsupported parameter', hidden = false }, err_parameter_ignored_suggest = { message = 'Unknown parameter <code class="cs1-code">&#124;$1=</code> ignored (<code class="cs1-code">&#124;$2=</code> suggested)', -- $1 is unknown parameter $2 is suggested parameter name anchor = 'parameter_ignored_suggest', category = 'CS1 errors: unsupported parameter', hidden = false }, err_redundant_parameters = { message = 'More than one of $1 specified', -- $1 is error message detail anchor = 'redundant_parameters', category = 'CS1 errors: redundant parameter', hidden = false }, err_script_parameter = { message = 'Invalid <code class="cs1-code">&#124;$1=</code>: $2', -- $1 is parameter name $2 is script language code or error detail anchor = 'script_parameter', category = 'CS1 errors: script parameters', hidden = false }, err_ssrn_missing = { message = '<code class="cs1-code">&#124;ssrn=</code> required', anchor = 'ssrn_missing', category = 'CS1 errors: SSRN', -- same as bad arxiv hidden = false }, err_text_ignored = { message = 'Text "$1" ignored', -- $1 is ignored text anchor = 'text_ignored', category = 'CS1 errors: unrecognized parameter', hidden = false }, err_trans_missing_title = { message = '<code class="cs1-code">&#124;trans-$1=</code> requires <code class="cs1-code">&#124;$1=</code> or <code class="cs1-code">&#124;script-$1=</code>', -- $1 is base parameter name anchor = 'trans_missing_title', category = 'CS1 errors: translated title', hidden = false }, err_param_unknown_empty = { message = 'Cite has empty unknown parameter$1: $2', -- $1 is 's' or empty space; $2 is emty unknown param list anchor = 'param_unknown_empty', category = 'CS1 errors: empty unknown parameters', hidden = false }, err_vancouver = { message = 'Vancouver style error: $1', -- $1 is error detail anchor = 'vancouver', category = 'CS1 errors: Vancouver style', hidden = false }, err_wikilink_in_url = { message = 'URL–wikilink conflict', -- uses ndash anchor = 'wikilink_in_url', category = 'CS1 errors: URL–wikilink conflict', -- uses ndash hidden = false }, --[[--------------------------< M A I N T >------------------------------------- maint messages do not have a message (message = nil); otherwise the structure is the same as error messages ]] maint_asin = { message = nil, anchor = 'ASIN', category = 'CS1 maint: ASIN uses ISBN', hidden = true, }, maint_archived_copy = { message = nil, anchor = 'archived_copy', category = 'CS1 maint: archived copy as title', hidden = true, }, maint_authors = { message = nil, anchor = 'authors', category = 'CS1 maint: uses authors parameter', hidden = true, }, maint_bot_unknown = { message = nil, anchor = 'bot:_unknown', category = 'CS1 maint: bot: original URL status unknown', hidden = true, }, maint_date_format = { message = nil, anchor = 'date_format', category = 'CS1 maint: date format', hidden = true, }, maint_date_year = { message = nil, anchor = 'date_year', category = 'CS1 maint: date and year', hidden = true, }, maint_doi_ignore = { message = nil, anchor = 'doi_ignore', category = 'CS1 maint: ignored DOI errors', hidden = true, }, maint_doi_inactive = { message = nil, anchor = 'doi_inactive', category = 'CS1 maint: DOI inactive', hidden = true, }, maint_doi_inactive_dated = { message = nil, anchor = 'doi_inactive_dated', category = 'CS1 maint: DOI inactive as of $2$3$1', -- $1 is year, $2 is month-name or empty string, $3 is space or empty string hidden = true, }, maint_extra_punct = { message = nil, anchor = 'extra_punct', category = 'CS1 maint: extra punctuation', hidden = true, }, maint_extra_text_names = { message = nil, anchor = 'extra_text_names', category = 'CS1 maint: extra text: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_isbn_ignore = { message = nil, anchor = 'ignore_isbn_err', category = 'CS1 maint: ignored ISBN errors', hidden = true, }, maint_issn_ignore = { message = nil, anchor = 'ignore_issn', category = 'CS1 maint: ignored ISSN errors', hidden = true, }, maint_jfm_format = { message = nil, anchor = 'jfm_format', category = 'CS1 maint: JFM format', hidden = true, }, maint_location = { message = nil, anchor = 'location', category = 'CS1 maint: location', hidden = true, }, maint_mr_format = { message = nil, anchor = 'mr_format', category = 'CS1 maint: MR format', hidden = true, }, maint_mult_names = { message = nil, anchor = 'mult_names', category = 'CS1 maint: multiple names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_numeric_names = { message = nil, anchor = 'numeric_names', category = 'CS1 maint: numeric names: $1', -- $1 is '<name>s list'; gets value from special_case_translation table hidden = true, }, maint_others = { message = nil, anchor = 'others', category = 'CS1 maint: others', hidden = true, }, maint_pmc_embargo = { message = nil, anchor = 'embargo', category = 'CS1 maint: PMC embargo expired', hidden = true, }, maint_pmc_format = { message = nil, anchor = 'pmc_format', category = 'CS1 maint: PMC format', hidden = true, }, maint_ref_harv = { message = nil, anchor = 'ref_harv', category = 'CS1 maint: ref=harv', hidden = true, }, maint_unfit = { message = nil, anchor = 'unfit', category = 'CS1 maint: unfit URL', hidden = true, }, maint_unknown_lang = { message = nil, anchor = 'unknown_lang', category = 'CS1 maint: unrecognized language', hidden = true, }, maint_untitled = { message = nil, anchor = 'untitled', category = 'CS1 maint: untitled periodical', hidden = true, }, maint_zbl = { message = nil, anchor = 'zbl', category = 'CS1 maint: Zbl', hidden = true, }, } --[[--------------------------< I D _ H A N D L E R S >-------------------------------------------------------- The following contains a list of values for various defined identifiers. For each identifier we specify a variety of information necessary to properly render the identifier in the citation. parameters: a list of parameter aliases for this identifier; first in the list is the canonical form link: Wikipedia article name redirect: a local redirect to a local Wikipedia article name; at en.wiki, 'ISBN (identifier)' is a redirect to 'International Standard Book Number' q: Wikidata q number for the identifier label: the label preceeding the identifier; label is linked to a Wikipedia article (in this order): redirect from id_handlers['<id>'].redirect when use_identifier_redirects is true Wikidata-supplied article name for the local wiki from id_handlers['<id>'].q local article name from id_handlers['<id>'].link prefix: the first part of a URL that will be concatenated with a second part which usually contains the identifier suffix: optional third part to be added after the identifier encode: true if URI should be percent-encoded; otherwise false COinS: identifier link or keyword for use in COinS: for identifiers registered at info-uri.info use: info:.... for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here) set to nil to leave the identifier out of the COinS separator: character or text between label and the identifier in the rendered citation id_limit: for those identifiers with established limits, this property holds the upper limit access: use this parameter to set the access level for all instances of this identifier. the value must be a valid access level for an identifier (see ['id-access'] in this file). custom_access: to enable custom access level for an identifier, set this parameter to the parameter that should control it (normally 'id-access') ]] local id_handlers = { ['ARXIV'] = { parameters = {'arxiv', 'eprint'}, link = 'arXiv', redirect = 'arXiv (identifier)', q = 'Q118398', label = 'arXiv', prefix = '//arxiv.org/abs/', -- protocol-relative tested 2013-09-04 encode = false, COinS = 'info:arxiv', separator = ':', access = 'free', -- free to read }, ['ASIN'] = { parameters = { 'asin', 'ASIN' }, link = 'Amazon Standard Identification Number', redirect = 'ASIN (identifier)', q = 'Q1753278', label = 'ASIN', prefix = '//www.amazon.', COinS = nil, -- no COinS for this id (TODO: needs thinking on implementation because |asin-tld=) separator = '&nbsp;', encode = false; }, ['BIBCODE'] = { parameters = {'bibcode'}, link = 'Bibcode', redirect = 'Bibcode (identifier)', q = 'Q25754', label = 'Bibcode', prefix = 'https://ui.adsabs.harvard.edu/abs/', encode = false, COinS = 'info:bibcode', separator = ':', custom_access = 'bibcode-access', }, ['BIORXIV'] = { parameters = {'biorxiv'}, link = 'bioRxiv', redirect = 'bioRxiv (identifier)', q = 'Q19835482', label = 'bioRxiv', prefix = '//doi.org/', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['CITESEERX'] = { parameters = {'citeseerx'}, link = 'CiteSeerX', redirect = 'CiteSeerX (identifier)', q = 'Q2715061', label = 'CiteSeerX', prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['DOI'] = { -- Used by InternetArchiveBot parameters = { 'doi', 'DOI'}, link = 'Digital object identifier', redirect = 'doi (identifier)', q = 'Q25670', label = 'doi', prefix = '//doi.org/', COinS = 'info:doi', separator = ':', encode = true, custom_access = 'doi-access', }, ['EISSN'] = { parameters = {'eissn', 'EISSN'}, link = 'International Standard Serial Number#Electronic ISSN', redirect = 'eISSN (identifier)', q = 'Q46339674', label = 'eISSN', prefix = '//www.worldcat.org/issn/', COinS = 'rft.eissn', encode = false, separator = '&nbsp;', }, ['HDL'] = { parameters = { 'hdl', 'HDL' }, link = 'Handle System', redirect = 'hdl (identifier)', q = 'Q3126718', label = 'hdl', prefix = '//hdl.handle.net/', COinS = 'info:hdl', separator = ':', encode = true, custom_access = 'hdl-access', }, ['ISBN'] = { -- Used by InternetArchiveBot parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'}, link = 'International Standard Book Number', redirect = 'ISBN (identifier)', q = 'Q33057', label = 'ISBN', prefix = 'Special:BookSources/', COinS = 'rft.isbn', separator = '&nbsp;', }, ['ISMN'] = { parameters = {'ismn', 'ISMN'}, link = 'International Standard Music Number', redirect = 'ISMN (identifier)', q = 'Q1666938', label = 'ISMN', prefix = '', -- not currently used; COinS = 'nil', -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['ISSN'] = { parameters = {'issn', 'ISSN'}, link = 'International Standard Serial Number', redirect = 'ISSN (identifier)', q = 'Q131276', label = 'ISSN', prefix = '//www.worldcat.org/issn/', COinS = 'rft.issn', encode = false, separator = '&nbsp;', }, ['JFM'] = { parameters = {'jfm', 'JFM'}, link = 'Jahrbuch über die Fortschritte der Mathematik', redirect = 'JFM (identifier)', q = '', label = 'JFM', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['JSTOR'] = { parameters = {'jstor', 'JSTOR'}, link = 'JSTOR', redirect = 'JSTOR (identifier)', q = 'Q1420342', label = 'JSTOR', prefix = '//www.jstor.org/stable/', -- protocol-relative tested 2013-09-04 COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', custom_access = 'jstor-access', }, ['LCCN'] = { parameters = {'lccn', 'LCCN'}, link = 'Library of Congress Control Number', redirect = 'LCCN (identifier)', q = 'Q620946', label = 'LCCN', prefix = '//lccn.loc.gov/', -- protocol-relative tested 2015-12-28 COinS = 'info:lccn', encode = false, separator = '&nbsp;', }, ['MR'] = { parameters = {'mr', 'MR'}, link = 'Mathematical Reviews', redirect = 'MR (identifier)', q = 'Q211172', label = 'MR', prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol-relative tested 2013-09-04 COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['OCLC'] = { parameters = {'oclc', 'OCLC'}, link = 'OCLC', redirect = 'OCLC (identifier)', q = 'Q190593', label = 'OCLC', prefix = '//www.worldcat.org/oclc/', COinS = 'info:oclcnum', encode = true, separator = '&nbsp;', id_limit = 9999999999, -- 10-digits }, ['OL'] = { parameters = { 'ol', 'OL' }, link = 'Open Library', redirect = 'OL (identifier)', q = 'Q1201876', label = 'OL', prefix = '//openlibrary.org/', COinS = nil, -- no COinS for this id (TODO: needs thinking on implementation because /authors/books/works/OL) separator = '&nbsp;', encode = true, custom_access = 'ol-access', }, ['OSTI'] = { parameters = {'osti', 'OSTI'}, link = 'Office of Scientific and Technical Information', redirect = 'OSTI (identifier)', q = 'Q2015776', label = 'OSTI', prefix = '//www.osti.gov/biblio/', -- protocol-relative tested 2018-09-12 COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = 23000000, custom_access = 'osti-access', }, ['PMC'] = { parameters = {'pmc', 'PMC'}, link = 'PubMed Central', redirect = 'PMC (identifier)', q = 'Q229883', label = 'PMC', prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC', suffix = '', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = 8000000, access = 'free', -- free to read }, ['PMID'] = { parameters = {'pmid', 'PMID'}, link = 'PubMed Identifier', redirect = 'PMID (identifier)', q = 'Q2082879', label = 'PMID', prefix = '//pubmed.ncbi.nlm.nih.gov/', COinS = 'info:pmid', encode = false, separator = '&nbsp;', id_limit = 33700000, }, ['RFC'] = { parameters = {'rfc', 'RFC'}, link = 'Request for Comments', redirect = 'RFC (identifier)', q = 'Q212971', label = 'RFC', prefix = '//tools.ietf.org/html/rfc', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = 9000, access = 'free', -- free to read }, ['SBN'] = { parameters = {'sbn', 'SBN'}, link = 'Standard Book Number', -- redirect to International_Standard_Book_Number#History redirect = 'SBN (identifier)', label = 'SBN', prefix = 'Special:BookSources/0-', -- prefix has leading zero necessary to make 9-digit sbn a 10-digit isbn COinS = nil, -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['SSRN'] = { parameters = {'ssrn', 'SSRN'}, link = 'Social Science Research Network', redirect = 'SSRN (identifier)', q = 'Q7550801', label = 'SSRN', prefix = '//ssrn.com/abstract=', -- protocol-relative tested 2013-09-04 COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', id_limit = 4000000, access = 'free', -- always free to read }, ['S2CID'] = { parameters = {'s2cid', 'S2CID'}, link = 'Semantic Scholar', redirect = 'S2CID (identifier)', q = 'Q22908627', label = 'S2CID', prefix = 'https://api.semanticscholar.org/CorpusID:', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', id_limit = 235000000, custom_access = 's2cid-access', }, ['USENETID'] = { parameters = {'message-id'}, link = 'Usenet', redirect = 'Usenet (identifier)', q = 'Q193162', label = 'Usenet:', prefix = 'news:', encode = false, COinS = 'pre', -- use prefix value separator = '&nbsp;', }, ['ZBL'] = { parameters = {'zbl', 'ZBL' }, link = 'Zentralblatt MATH', redirect = 'Zbl (identifier)', q = 'Q190269', label = 'Zbl', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, } --[[--------------------------< E X P O R T S >--------------------------------- ]] return { use_identifier_redirects = true, -- when true use redirect name for identifier label links aliases = aliases, special_case_translation = special_case_translation, date_names = date_names, err_msg_supl = err_msg_supl, error_conditions = error_conditions, editor_markup_patterns = editor_markup_patterns, et_al_patterns = et_al_patterns, global_df = global_df, id_handlers = id_handlers, keywords_lists = keywords_lists, keywords_xlate = keywords_xlate, stripmarkers=stripmarkers, invisible_chars = invisible_chars, indic_script = indic_script, local_lang_cat_enable = local_lang_cat_enable, maint_cats = maint_cats, messages = messages, presentation = presentation, prop_cats = prop_cats, punct_skip = punct_skip, script_lang_codes = script_lang_codes, lang_code_remap = lang_code_remap, lang_name_remap = lang_name_remap, this_wiki_code = this_wiki_code, title_types = title_types, uncategorized_namespaces = uncategorized_namespaces, uncategorized_subpages = uncategorized_subpages, templates_using_volume = templates_using_volume, templates_using_issue = templates_using_issue, templates_not_using_page = templates_not_using_page, inter_wiki_map = inter_wiki_map, languages = languages, } igh7wnjquldirh0h2nez6hba016vpuu Modul:Citation/CS1/Date validation 828 274 823 822 2024-08-09T09:21:29Z Jon Harald Søby 58 1 semakan diimportkan 822 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local add_prop_cat, is_set, in_array, wrap_style; -- imported functions from selected Module:Citation/CS1/Utilities local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< F I L E - S C O P E D E C L A R A T I O N S >-------------------------------- File-scope variables are declared here ]] local lang_object = mw.getContentLanguage(); -- used by is_valid_accessdate(), is_valid_year(), date_name_xlate(); TODO: move to ~/Configuration? local year_limit; -- used by is_valid_year() --[=[-------------------------< I S _ V A L I D _ A C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time) accessdate is the date provided in |access-date= at time 00:00:00 UTC today is the current date at time 00:00:00 UTC plus 48 hours if today is 2015-01-01T00:00:00 then adding 24 hours gives 2015-01-02T00:00:00 – one second more than today adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser apparently doesn't understand non-English date month names. This function will always return false when the date contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that call this function with YYYY-MM-DD format dates. ]=] local function is_valid_accessdate (accessdate) local good1, good2; local access_ts, tomorrow_ts; -- to hold Unix time stamps representing the dates good1, access_ts = pcall (lang_object.formatDate, lang_object, 'U', accessdate ); -- convert accessdate value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which which tonumber() may not understand access_ts = tonumber (access_ts) or lang_object:parseFormattedNumber (access_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix time stamp end if 979516800 <= access_ts and access_ts < tomorrow_ts then -- Wikipedia start date <= accessdate < tomorrow's date return true; else return false; -- accessdate out of range end end --[[--------------------------< I S _ V A L I D _ E M B A R G O _ D A T E >------------------------------------ returns true and date value if that value has proper dmy, mdy, ymd format. returns false and 9999 (embargoed forever) when date value is not proper format; assumes that when |pmc-embargo-date= is set, the editor intended to embargo a PMC but |pmc-embargo-date= does not hold a single date. ]] local function is_valid_embargo_date (v) if v:match ('^%d%d%d%d%-%d%d%-%d%d$') or -- ymd v:match ('^%d%d?%s+%a+%s+%d%d%d%d$') or -- dmy v:match ('^%a+%s+%d%d?%s*,%s*%d%d%d%d$') then -- mdy return true, v; end return false, '9999'; -- if here not good date so return false and set embargo date to long time in future end --[[--------------------------< G E T _ M O N T H _ N U M B E R >---------------------------------------------- returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct. If not a valid month, returns 0 ]] local function get_month_number (month) return cfg.date_names['local'].long[month] or cfg.date_names['local'].short[month] or -- look for local names first cfg.date_names['en'].long[month] or cfg.date_names['en'].short[month] or -- failing that, look for English names 0; -- not a recognized month name end --[[--------------------------< G E T _ S E A S O N _ N U M B E R >-------------------------------------------- returns a number according to the sequence of seasons in a year: 21 for Spring, etc. Capitalization and spelling must be correct. If not a valid season, returns 0. 21-24 = Spring, Summer, Autumn, Winter, independent of “Hemisphere” returns 0 when <param> is not |date= Season numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons. EDTF does support the distinction between north and south hemispere seasons but cs1|2 has no way to make that distinction. These additional divisions not currently supported: 25-28 = Spring - Northern Hemisphere, Summer- Northern Hemisphere, Autumn - Northern Hemisphere, Winter - Northern Hemisphere 29-32 = Spring – Southern Hemisphere, Summer– Southern Hemisphere, Autumn – Southern Hemisphere, Winter - Southern Hemisphere 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_season_number (season, param) if 'date' ~= param then return 0; -- season dates only supported by |date= end return cfg.date_names['local'].season[season] or -- look for local names first cfg.date_names['en'].season[season] or -- failing that, look for English names 0; -- not a recognized season name end --[[--------------------------< G E T _ Q U A R T E R _ N U M B E R >------------------------------------------ returns a number according to the sequence of quarters in a year: 33 for first quarter, etc. Capitalization and spelling must be correct. If not a valid quarter, returns 0. 33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each) returns 0 when <param> is not |date= Quarter numbering is defined by Extended Date/Time Format (EDTF) specification (https://www.loc.gov/standards/datetime/) which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard defines various divisions using numbers 21-41. cs1|2 only supports generic seasons and quarters. These additional divisions not currently supported: 37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each) 40-41 = Semestral 1, Semestral-2 (6 months each) ]] local function get_quarter_number (quarter, param) if 'date' ~= param then return 0; -- quarter dates only supported by |date= end quarter = mw.ustring.gsub (quarter, ' +', ' '); -- special case replace multiple space chars with a single space char return cfg.date_names['local'].quarter[quarter] or -- look for local names first cfg.date_names['en'].quarter[quarter] or -- failing that, look for English names 0; -- not a recognized quarter name end --[[--------------------------< G E T _ P R O P E R _ N A M E _ N U M B E R >---------------------------------- returns a non-zero number if date contains a recognized proper-name. Capitalization and spelling must be correct. returns 0 when <param> is not |date= ]] local function get_proper_name_number (name, param) if 'date' ~= param then return 0; -- proper-name dates only supported by |date= end return cfg.date_names['local'].named[name] or -- look for local names dates first cfg.date_names['en'].named[name] or -- failing that, look for English names 0; -- not a recognized named date end --[[--------------------------< G E T _ E L E M E N T _ N U M B E R <------------------------------------------ returns true if month or season or quarter or proper name is valid (properly spelled, capitalized, abbreviated) ]] local function get_element_number (element, param) local num; local funcs = {get_month_number, get_season_number, get_quarter_number, get_proper_name_number}; -- list of functions to execute in order for _, func in ipairs (funcs) do -- spin through the function list num = func (element, param); -- call the function and get the returned number if 0 ~= num then -- non-zero when valid month season quarter return num; -- return that number end end return nil; -- not valid end --[[--------------------------< I S _ V A L I D _ Y E A R >---------------------------------------------------- Function gets current year from the server and compares it to year from a citation parameter. Years more than one year in the future are not acceptable. ]] local function is_valid_year (year) if not is_set(year_limit) then year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once end year = tonumber (year) or lang_object:parseFormattedNumber (year); -- convert to numbers for the comparison; return year and (year <= year_limit) or false; end --[[--------------------------< I S _ V A L I D _ D A T E >---------------------------------------------------- Returns true if day is less than or equal to the number of days in month and year is no farther into the future than next year; else returns false. Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately 1923) dates are assumed to be Gregorian. ]] local function is_valid_date (year, month, day) 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 -- is a leap year? month_length = 29; -- if leap year then 29 days in February end else -- Gregorian calendar if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400))) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end end else month_length = days_in_month[month]; end if tonumber (day) > month_length then return false; end return true; end --[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >-------------------------- Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August. There is a special test for May because it can be either short or long form. Returns true when style for both months is the same ]] local function is_valid_month_range_style (month1, month2) local len1 = month1:len(); local len2 = month2:len(); if len1 == len2 then return true; -- both months are short form so return true elseif 'May' == month1 or 'May'== month2 then -- ToDo: I18N return true; -- both months are long form so return true elseif 3 == len1 or 3 == len2 then return false; -- months are mixed form so return false else return true; -- both months are long form so return true end end --[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------ Check a pair of months or seasons to see if both are valid members of a month or season pair. Month pairs are expected to be left to right, earliest to latest in time. All season ranges are accepted as valid because there are publishers out there who have published a Summer–Spring YYYY issue, hence treat as ok ]] local function is_valid_month_season_range(range_start, range_end, param) local range_start_number = get_month_number (range_start); local range_end_number; if 0 == range_start_number then -- is this a month range? range_start_number = get_season_number (range_start, param); -- not a month; is it a season? get start season number range_end_number = get_season_number (range_end, param); -- get end season number if (0 ~= range_start_number) and (0 ~= range_end_number) and (range_start_number ~= range_end_number) then return true; -- any season pairing is accepted except when both are the same end return false; -- range_start and/or range_end is not a season end -- here when range_start is a month range_end_number = get_month_number (range_end); -- get end month number if range_start_number < range_end_number 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 --[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------ This function receives a table of date parts for one or two dates and an empty table reference declared in Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=<value> is determined to be a valid date format. The question of what to do with invalid date formats is not answered here. The date parts in the input table are converted to an ISO 8601 conforming date string: single whole dates: yyyy-mm-dd month and year dates: yyyy-mm year dates: yyyy ranges: yyyy-mm-dd/yyyy-mm-dd yyyy-mm/yyyy-mm yyyy/yyyy Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from Julian to Proleptic Gregorian. The input table has: year, year2 – always present; if before 1582, ignore months and days if present month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 99 Christmas day, day2 – 0 if not provided, 1-31 for days the output table receives: rftdate: an ISO 8601 formatted date rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and proper-name dates) rftssn: one of four season keywords: winter, spring, summer, fall (lowercase) rftquarter: one of four values: 1, 2, 3, 4 ]] local function make_COinS_date (input, tCOinS_date) local date; -- one date or first date in a range local date2 = ''; -- end of range date -- start temporary Julian / Gregorian calendar uncertainty detection local year = tonumber(input.year); -- this temporary code to determine the extent of sources dated to the Julian/Gregorian local month = tonumber(input.month); -- interstice 1 October 1582 – 1 January 1926 local day = tonumber (input.day); if (0 ~= day) and -- day must have a value for this to be a whole date (((1582 == year) and (10 <= month) and (12 >= month)) or -- any whole 1582 date from 1 October to 31 December or ((1926 == year) and (1 == month) and (1 == input.day)) or -- 1 January 1926 or ((1582 < year) and (1925 >= year))) then -- any date 1 January 1583 – 31 December 1925 tCOinS_date.inter_cal_cat = true; -- set category flag true end -- end temporary Julian / Gregorian calendar uncertainty detection if 1582 > tonumber(input.year) or 20 < tonumber(input.month) then -- Julian calendar or season so &rft.date gets year only date = input.year; if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year date = string.format ('%.4d/%.4d', tonumber(input.year), tonumber(input.year2)) -- assemble the date range end if 20 < tonumber(input.month) then -- if season or proper-name date local season = {[24] = 'winter', [21] = 'spring', [22] = 'summer', [23] = 'fall', [33] = '1', [34] = '2', [35] = '3', [36] = '4', [98] = 'Easter', [99] = 'Christmas'}; -- seasons lowercase, no autumn; proper-names use title case if 0 == input.month2 then -- single season date if 40 < tonumber(input.month) then tCOinS_date.rftchron = season[input.month]; -- proper-name dates elseif 30 < tonumber(input.month) then tCOinS_date.rftquarter = season[input.month]; -- quarters else tCOinS_date.rftssn = season[input.month]; -- seasons end else -- season range with a second season specified if input.year ~= input.year2 then -- season year – season year range or season year–year tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this? if 0~= input.month2 then tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2); end else -- season–season year range tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this? tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range end end end tCOinS_date.rftdate = date; return; -- done end if 0 ~= input.day then date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date elseif 0 ~= input.month then date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month else date = string.format ('%s', input.year); -- just year end if 0 ~= input.year2 then if 0 ~= input.day2 then date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date elseif 0 ~= input.month2 then date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month else date2 = string.format ('/%s', input.year2); -- just year end end tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator return; end --[[--------------------------< P A T T E R N S >-------------------------------------------------------------- this is the list of patterns for date formats that this module recognizes. Approximately the first half of these patterns represent formats that might be reformatted into another format. Those that might be reformatted have 'indicator' letters that identify the content of the matching capture: 'd' (day), 'm' (month), 'a' (anchor year), 'y' (year); second day, month, year have a '2' suffix. These patterns are used for both date validation and for reformatting. This table should not be moved to ~/Configuration because changes to this table require changes to check_date() and to reformatter() and reformat_date() ]] local patterns = { -- year-initial numerical year-month-day ['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, -- month-initial: month day, year ['Mdy'] = {'^(%D-) +([1-9]%d?), +((%d%d%d%d?)%a?)$', 'm', 'd', 'a', 'y'}, -- month-initial day range: month day–day, year; days are separated by endash ['Md-dy'] = {'^(%D-) +([1-9]%d?)[%-–]([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'd2', 'a', 'y'}, -- day-initial: day month year ['dMy'] = {'^([1-9]%d?) +(%D-) +((%d%d%d%d?)%a?)$', 'd', 'm', 'a', 'y'}, -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed; not supported at en.wiki -- ['yMd'] = {'^((%d%d%d%d?)%a?) +(%D-) +(%d%d?)$', 'a', 'y', 'm', 'd'}, -- day-range-initial: day–day month year; days are separated by endash ['d-dMy'] = {'^([1-9]%d?)[%-–]([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'd2', 'm', 'a', 'y'}, -- day initial month-day-range: day month - day month year; uses spaced endash ['dM-dMy'] = {'^([1-9]%d?) +(%D-) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'd2', 'm2', 'a', 'y'}, -- month initial month-day-range: month day – month day, year; uses spaced endash ['Md-Mdy'] = {'^(%D-) +([1-9]%d?) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$','m', 'd', 'm2', 'd2', 'a', 'y'}, -- day initial month-day-year-range: day month year - day month year; uses spaced endash ['dMy-dMy'] = {'^([1-9]%d?) +(%D-) +(%d%d%d%d) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'y', 'd2', 'm2', 'a', 'y2'}, -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash ['Mdy-Mdy'] = {'^(%D-) +([1-9]%d?), +(%d%d%d%d) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'y', 'm2', 'd2', 'a', 'y2'}, -- these date formats cannot be converted, per se, but month name can be rendered short or long -- month/season year - month/season year; separated by spaced endash ['My-My'] = {'^(%D-) +(%d%d%d%d) +[%-–] +(%D-) +((%d%d%d%d)%a?)$', 'm', 'y', 'm2', 'a', 'y2'}, -- month/season range year; months separated by endash ['M-My'] = {'^(%D-)[%-–](%D-) +((%d%d%d%d)%a?)$', 'm', 'm2', 'a', 'y'}, -- month/season year or proper-name year; quarter year when First Quarter YYYY etc. ['My'] = {'^([^%d–]-) +((%d%d%d%d)%a?)$', 'm', 'a', 'y'}, -- this way because endash is a member of %D; %D- will match January–March 2019 when it shouldn't -- these date formats cannot be converted ['Sy4-y2'] = {'^(%D-) +((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash ['Sy-y'] = {'^(%D-) +(%d%d%d%d)[%-–]((%d%d%d%d)%a?)$'}, -- special case Winter/Summer year-year; year separated with unspaced endash ['y-y'] = {'^(%d%d%d%d?)[%-–]((%d%d%d%d?)%a?)$'}, -- year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 ['y4-y2'] = {'^((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- year range: YYYY–YY; separated by unspaced endash ['y'] = {'^((%d%d%d%d?)%a?)$'}, -- year; here accept either YYY or YYYY } --[[--------------------------< C H E C K _ D A T E >---------------------------------------------------------- Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons must be spelled correctly. Future years beyond next year are not allowed. If the date fails the format tests, this function returns false and does not return values for anchor_year and COinS_date. When this happens, the date parameter is (DEBUG: not?) used in the COinS metadata and the CITEREF identifier gets its year from the year parameter if present otherwise CITEREF does not get a date value. Inputs: date_string - date string from date-holding parameters (date, year, publication-date, access-date, pmc-embargo-date, archive-date, lay-date) Returns: false if date string is not a real date; else true, anchor_year, COinS_date anchor_year can be used in CITEREF anchors COinS_date is ISO 8601 format date; see make_COInS_date() ]] local function check_date (date_string, param, tCOinS_date) local year; -- assume that year2, months, and days are not used; local year2 = 0; -- second year in a year range local month = 0; local month2 = 0; -- second month in a month range local day = 0; local day2 = 0; -- second day in a day range local anchor_year; local coins_date; if date_string:match (patterns['ymd'][1]) then -- year-initial numerical year month day format year, month, day = date_string:match (patterns['ymd'][1]); if 12 < tonumber(month) or 1 > tonumber(month) or 1582 > tonumber(year) or 0 == tonumber(day) then return false; end -- month or day number not valid or not Gregorian calendar anchor_year = year; elseif mw.ustring.match(date_string, patterns['Mdy'][1]) then -- month-initial: month day, year month, day, anchor_year, year = mw.ustring.match(date_string, patterns['Mdy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months elseif mw.ustring.match(date_string, patterns['Md-dy'][1]) then -- month-initial day range: month day–day, year; days are separated by endash month, day, day2, anchor_year, year = mw.ustring.match(date_string, patterns['Md-dy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2=month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns['dMy'][1]) then -- day-initial: day month year day, month, anchor_year, year = mw.ustring.match(date_string, patterns['dMy'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months --[[ NOT supported at en.wiki elseif mw.ustring.match(date_string, patterns['yMd'][1]) then -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed anchor_year, year, month, day = mw.ustring.match(date_string, patterns['yMd'][1]); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months -- end NOT supported at en.wiki ]] elseif mw.ustring.match(date_string, patterns['d-dMy'][1]) then -- day-range-initial: day–day month year; days are separated by endash day, day2, month, anchor_year, year = mw.ustring.match(date_string, patterns['d-dMy'][1]); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2 = month; -- for metadata year2 = year; elseif mw.ustring.match(date_string, patterns['dM-dMy'][1]) then -- day initial month-day-range: day month - day month year; uses spaced endash day, month, day2, month2, anchor_year, year = mw.ustring.match(date_string, patterns['dM-dMy'][1]); if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later; month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns['Md-Mdy'][1]) then -- month initial month-day-range: month day – month day, year; uses spaced endash month, day, month2, day2, anchor_year, year = mw.ustring.match(date_string, patterns['Md-Mdy'][1]); if (not is_valid_month_season_range(month, month2, param)) or not is_valid_year(year) then return false; end month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2 = year; elseif mw.ustring.match(date_string, patterns['dMy-dMy'][1]) then -- day initial month-day-year-range: day month year - day month year; uses spaced endash day, month, year, day2, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns['dMy-dMy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number (month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]) then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash month, day, year, month2, day2, anchor_year, year2 = mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end -- both must be valid elseif mw.ustring.match(date_string, patterns['Sy4-y2'][1]) then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash local century; month, year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns['Sy4-y2'][1]); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years year2 = century..year2; -- add the century to year2 for comparisons if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number(month, param); elseif mw.ustring.match(date_string, patterns['Sy-y'][1]) then -- special case Winter/Summer year-year; year separated with unspaced endash month, year, anchor_year, year2 = mw.ustring.match(date_string, patterns['Sy-y'][1]); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number (month, param); -- for metadata elseif mw.ustring.match(date_string, patterns['My-My'][1]) then -- month/season year - month/season year; separated by spaced endash month, year, month2, anchor_year, year2 = mw.ustring.match(date_string, patterns['My-My'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor_year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_month_number(month); month2 = get_month_number(month2); elseif 0 ~= get_season_number(month, param) and 0 ~= get_season_number(month2, param) then -- both must be season year, not mixed month = get_season_number(month, param); month2 = get_season_number(month2, param); else return false; end elseif mw.ustring.match(date_string, patterns['M-My'][1]) then -- month/season range year; months separated by endash month, month2, anchor_year, year = mw.ustring.match(date_string, patterns['M-My'][1]); if (not is_valid_month_season_range(month, month2, param)) or (not is_valid_year(year)) then return false; end if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_month_number(month); month2 = get_month_number(month2); if 0 == month or 0 == month2 then return false; end else month = get_season_number(month, param); month2 = get_season_number(month2, param); end year2 = year; elseif mw.ustring.match(date_string, patterns['My'][1]) then -- month/season/quarter/proper-name year month, anchor_year, year = mw.ustring.match(date_string, patterns['My'][1]); if not is_valid_year(year) then return false; end month = get_element_number(month, param); -- get month season quarter proper-name number or nil if not month then return false; end -- not valid whatever it is elseif mw.ustring.match(date_string, patterns['y-y'][1]) then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 year, anchor_year, year2 = mw.ustring.match(date_string, patterns['y-y'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns['y4-y2'][1]) then -- Year range: YYYY–YY; separated by unspaced endash local century; year, century, anchor_year, year2 = mw.ustring.match(date_string, patterns['y4-y2'][1]); anchor_year = year .. '–' .. anchor_year; -- assemble anchor year from both years if in_array (param, {'date', 'publication-date', 'year'}) then add_prop_cat ('year_range_abbreviated'); end if 13 > tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003 year2 = century .. year2; -- add the century to year2 for comparisons if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif mw.ustring.match(date_string, patterns['y'][1]) then -- year; here accept either YYY or YYYY anchor_year, year = mw.ustring.match(date_string, patterns['y'][1]); if false == is_valid_year(year) then return false; end else return false; -- date format not one of the MOS:DATE approved formats end if 'access-date' == param then -- test accessdate here because we have numerical date parts if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required 0 == year2 and 0 == month2 and 0 == day2 then -- none of these; accessdate must not be a range if not is_valid_accessdate(year .. '-' .. month .. '-' .. day) then return false; -- return false when accessdate out of bounds end else return false; -- return false when accessdate is a range of two dates end end local result=true; -- check whole dates for validity; assume true because not all dates will go through this test if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date) result = is_valid_date(year, month, day); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range) result = is_valid_date(year, month, day); result = result and is_valid_date(year, month, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range) result = is_valid_date(year, month, day); result = result and is_valid_date(year, month2, day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range) result = is_valid_date(year, month, day); result = result and is_valid_date(year2, month2, day2); end if false == result then return false; end if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values make_COinS_date ({year = year, month = month, day = day, year2 = year2, month2 = month2, day2 = day2}, tCOinS_date); -- make an ISO 8601 date string for COinS end return true, anchor_year; -- format is good and date string represents a real date end --[[--------------------------< D A T E S >-------------------------------------------------------------------- Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes). Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially, parameters with errors are added to the <error_list> sequence table as the dates are tested. ]] local function dates(date_parameters_list, tCOinS_date, error_list) local anchor_year; -- will return as nil if the date being tested is not |date= local COinS_date; -- will return as nil if the date being tested is not |date= local embargo_date; -- if embargo date is a good dmy, mdy, ymd date then holds original value else reset to 9999 local good_date = false; for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(v.val) then -- if the parameter has a value v.val = mw.ustring.gsub(v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 if v.val:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year= local year = v.val:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested if 'date' == k then anchor_year, COinS_date = v.val:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter good_date = is_valid_year(year); elseif 'year' == k then good_date = is_valid_year(year); end elseif 'date' == k then -- if the parameter is |date= if v.val:match("^n%.d%.%a?$") then -- ToDo: I18N -- if |date=n.d. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((n%.d%.)%a?)"); -- ToDo: I18N -- "n.d."; no error when date parameter is set to no date elseif v.val:match("^nd%a?$") then -- ToDo: I18N -- if |date=nd with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((nd)%a?)"); -- ToDo: I18N -- "nd"; no error when date parameter is set to no date else good_date, anchor_year, COinS_date = check_date (v.val, k, tCOinS_date); -- go test the date end elseif 'year' == k then -- if the parameter is |year= it should hold only a year value if v.val:match("^[1-9]%d%d%d?%a?$") then -- if |year = 3 or 4 digits only with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v.val:match("((%d+)%a?)"); end elseif 'pmc-embargo-date' == k then -- if the parameter is |pmc-embargo-date= good_date = check_date (v.val, k); -- go test the date if true == good_date then -- if the date is a valid date good_date, embargo_date = is_valid_embargo_date (v.val); -- is |pmc-embargo-date= date a single dmy, mdy, or ymd formatted date? yes: returns embargo; no: returns 9999 end else -- any other date-holding parameter good_date = check_date (v.val, k); -- go test the date end if false == good_date then -- assemble one error message so we don't add the tracking category multiple times table.insert (error_list, wrap_style ('parameter', v.name)); -- make parameter name suitable for error message list end end end return anchor_year, embargo_date; -- and done end --[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------ Compare the value provided in |year= with the year value(s) provided in |date=. This function returns a numeric value: 0 - year value does not match the year value in date 1 - (default) year value matches the year value in date or one of the year values when date contains two years 2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx) ]] local function year_date_check (year_string, date_string) local year; local date1; local date2; local result = 1; -- result of the test; assume that the test passes year = year_string:match ('(%d%d%d%d?)'); if date_string:match ('%d%d%d%d%-%d%d%-%d%d') and year_string:match ('%d%d%d%d%a') then --special case where both date and year are required YYYY-MM-DD and YYYYx date1 = date_string:match ('(%d%d%d%d)'); year = year_string:match ('(%d%d%d%d)'); if year ~= date1 then result = 0; -- years don't match else result = 2; -- years match; but because disambiguated, don't add to maint cat end elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard range formats of date with two three- or four-digit years date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)"); if year ~= date1 and year ~= date2 then result = 0; end elseif mw.ustring.match(date_string, "%d%d%d%d[%-–]%d%d") then -- YYYY-YY date ranges local century; date1, century, date2 = mw.ustring.match(date_string, "((%d%d)%d%d)[%-–]+(%d%d)"); date2 = century..date2; -- convert YY to YYYY if year ~= date1 and year ~= date2 then result = 0; end elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year date1 = date_string:match ("(%d%d%d%d?)"); if year ~= date1 then result = 0; end else result = 0; -- no recognizable year in date end return result; end --[[--------------------------< R E F O R M A T T E R >-------------------------------------------------------- reformat 'date' into new format specified by format_param if pattern_idx (the current format of 'date') can be reformatted. Does the grunt work for reformat_dates(). The table re_formats maps pattern_idx (current format) and format_param (desired format) to a table that holds: format string used by string.format() identifier letters ('d', 'm', 'y', 'd2', 'm2', 'y2') that serve as indexes into a table t{} that holds captures from mw.ustring.match() for the various date parts specified by patterns[pattern_idx][1] Items in patterns{} have the general form: ['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, where: ['ymd'] is pattern_idx patterns['ymd'][1] is the match pattern with captures for mw.ustring.match() patterns['ymd'][2] is an indicator letter identifying the content of the first capture patterns['ymd'][3] ... the second capture etc. when a pattern matches a date, the captures are loaded into table t{} in capture order using the idemtifier characters as indexes into t{} For the above, a ymd date is in t{} as: t.y = first capture (year), t.m = second capture (month), t.d = third capture (day) To reformat, this function is called with the pattern_idx that matches the current format of the date and with format_param set to the desired format. This function loads table t{} as described and then calls string.format() with the format string specified by re_format[pattern_idx][format_param][1] using values taken from t{} according to the capture identifier letters specified by patterns[pattern_idx][format_param][n] where n is 2.. ]] local re_formats = { ['ymd'] = { -- date format is ymd; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Mdy'] = { -- date format is Mdy; reformat to: ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['dMy'] = { -- date format is dMy; reformat to: ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki }, ['Md-dy'] = { -- date format is Md-dy; reformat to: ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- |df=dmy -> d-dMy }, ['d-dMy'] = { -- date format is d-d>y; reformat to: ['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- |df=mdy -> Md-dy }, ['dM-dMy'] = { -- date format is dM-dMy; reformat to: ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- for long/short reformatting ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- |df=mdy -> Md-Mdy }, ['Md-Mdy'] = { -- date format is Md-Mdy; reformat to: ['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- for long/short reformatting ['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- |df=dmy -> dM-dMy }, ['dMy-dMy'] = { -- date format is dMy-dMy; reformat to: ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- for long/short reformatting ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- |df=mdy -> Mdy-Mdy }, ['Mdy-Mdy'] = { -- date format is Mdy-Mdy; reformat to: ['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- for long/short reformatting ['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- |df=dmy -> dMy-dMy }, ['My-My'] = { -- these for long/short reformatting ['any'] = {'%s %s – %s %s', 'm', 'y', 'm2', 'y2'}, -- dmy/mdy agnostic }, ['M-My'] = { -- these for long/short reformatting ['any'] = {'%s–%s %s', 'm', 'm2', 'y'}, -- dmy/mdy agnostic }, ['My'] = { -- these for long/short reformatting ['any'] = {'%s %s', 'm', 'y'}, -- dmy/mdy agnostic }, -- ['yMd'] = { -- not supported at en.wiki -- ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy -- ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy -- ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd -- }, } local function reformatter (date, pattern_idx, format_param, mon_len) if not in_array (pattern_idx, {'ymd', 'Mdy', 'Md-dy', 'dMy', 'yMd', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- not in this set of date format patterns then not a reformattable date end if 'ymd' == format_param and in_array (pattern_idx, {'ymd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then return; -- ymd date ranges not supported at en.wiki; no point in reformatting ymd to ymd end if in_array (pattern_idx, {'My', 'M-My', 'My-My'}) then -- these are not dmy/mdy so can't be 'reformatted' into either format_param = 'any'; -- so format-agnostic end -- yMd is not supported at en.wiki -- if yMd is supported at your wiki, uncomment the next line -- if 'yMd' == format_param and in_array (pattern_idx, {'yMd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy'}) then -- these formats not convertable; yMd not supported at en.wiki -- if yMd is supported at your wiki, remove or comment-out the next line if 'yMd' == format_param then -- yMd not supported at en.wiki return; -- not a reformattable date end local c1, c2, c3, c4, c5, c6, c7; -- these hold the captures specified in patterns[pattern_idx][1] c1, c2, c3, c4, c5, c6, c7 = mw.ustring.match (date, patterns[pattern_idx][1]); -- get the captures local t = { -- table that holds k/v pairs of date parts from the captures and patterns[pattern_idx][2..] [patterns[pattern_idx][2]] = c1; -- at minimum there is always one capture with a matching indicator letter [patterns[pattern_idx][3] or 'x'] = c2; -- patterns can have a variable number of captures; each capture requires an indicator letter; [patterns[pattern_idx][4] or 'x'] = c3; -- where there is no capture, there is no indicator letter so n in patterns[pattern_idx][n] will be nil; [patterns[pattern_idx][5] or 'x'] = c4; -- the 'x' here spoofs an indicator letter to prevent 'table index is nil' error [patterns[pattern_idx][6] or 'x'] = c5; [patterns[pattern_idx][7] or 'x'] = c6; [patterns[pattern_idx][8] or 'x'] = c7; }; if t.a then -- if this date has an anchor year capture t.y = t.a; -- use the anchor year capture when reassembling the date end if tonumber(t.m) then -- if raw month is a number (converting from ymd) if 's' == mon_len then -- if we are to use abbreviated month names t.m = cfg.date_names['inv_local_s'][tonumber(t.m)]; -- convert it to a month name else t.m = cfg.date_names['inv_local_l'][tonumber(t.m)]; -- convert it to a month name end t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present elseif 'ymd' == format_param then -- when converting to ymd if 1582 > tonumber(t.y) then -- ymd format dates not allowed before 1582 return; end t.m = string.format ('%02d', get_month_number (t.m)); -- make sure that month and day are two digits t.d = string.format ('%02d', t.d); elseif mon_len then -- if mon_len is set to either 'short' or 'long' for _, mon in ipairs ({'m', 'm2'}) do -- because there can be two month names, check both if t[mon] then t[mon] = get_month_number (t[mon]); -- get the month number for this month (is length agnostic) if 0 == t[mon] then return; end -- seasons and named dates can't be converted t[mon] = (('s' == mon_len) and cfg.date_names['inv_local_s'][t[mon]]) or cfg.date_names['inv_local_l'][t[mon]]; -- fetch month name according to length end end end local new_date = string.format (re_formats[pattern_idx][format_param][1], -- format string t[re_formats[pattern_idx][format_param][2]], -- named captures from t{} t[re_formats[pattern_idx][format_param][3]], t[re_formats[pattern_idx][format_param][4]], t[re_formats[pattern_idx][format_param][5]], t[re_formats[pattern_idx][format_param][6]], t[re_formats[pattern_idx][format_param][7]], t[re_formats[pattern_idx][format_param][8]] ); return new_date; end --[[-------------------------< R E F O R M A T _ D A T E S >-------------------------------------------------- Reformats existing dates into the format specified by format. format is one of several manual keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The -all version includes access- and archive-dates; otherwise these dates are not reformatted. This function allows automatic date formatting. In ~/Configuration, the article source is searched for one of the {{use xxx dates}} templates. If found, xxx becomes the global date format as xxx-all. If |cs1-dates= in {{use xxx dates}} has legitimate value then that value determines how cs1|2 dates will be rendered. Legitimate values for |cs1-dates= are: l - all dates are rendered with long month names ls - publication dates use long month names; access-/archive-dates use abbreviated month names ly - publication dates use long month names; access-/archive-dates rendered in ymd format s - all dates are rendered with abbreviated (short) month names sy - publication dates use abbreviated month names; access-/archive-dates rendered in ymd format y - all dates are rendered in ymd format the format argument for automatic date formatting will be the format specified by {{use xxx dates}} with the value supplied by |cs1-dates so one of: xxx-l, xxx-ls, xxx-ly, xxx-s, xxx-sy, xxx-y, or simply xxx (|cs1-dates= empty, omitted, or invalid) where xxx shall be either of dmy or mdy. dates are extracted from date_parameters_list, reformatted (if appropriate), and then written back into the list in the new format. Dates in date_parameters_list are presumed here to be valid (no errors). This function returns true when a date has been reformatted, false else. Actual reformatting is done by reformatter(). ]] local function reformat_dates (date_parameters_list, format) local all = false; -- set to false to skip access- and archive-dates local len_p = 'l'; -- default publication date length shall be long local len_a = 'l'; -- default access-/archive-date length shall be long local result = false; local new_date; if format:match('%a+%-all') then -- manual df keyword; auto df keyword when length not specified in {{use xxx dates}}; format = format:match('(%a+)%-all'); -- extract the format all = true; -- all dates are long format dates because this keyword doesn't specify length elseif format:match('%a+%-[lsy][sy]?') then -- auto df keywords; internal only all = true; -- auto df applies to all dates; use length specified by capture len_p for all dates format, len_p, len_a = format:match('(%a+)%-([lsy])([sy]?)'); -- extract the format and length keywords if 'y' == len_p then -- because allowed by MOS:DATEUNIFY (sort of) range dates and My dates not reformatted format = 'ymd'; -- override {{use xxx dates}} elseif (not is_set(len_a)) or (len_p == len_a) then -- no access-/archive-date length specified or same length as publication dates then len_a = len_p; -- in case len_a not set end end -- else only publication dates and they are long for param_name, param_val in pairs (date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) then -- if the parameter has a value if not (not all and in_array (param_name, {'access-date', 'archive-date'})) then -- skip access- or archive-date unless format is xxx-all; yeah, ugly; TODO: find a better way for pattern_idx, pattern in pairs (patterns) do if mw.ustring.match (param_val.val, pattern[1]) then if all and in_array (param_name, {'access-date', 'archive-date'}) then -- if this date is an access- or archive-date new_date = reformatter (param_val.val, pattern_idx, (('y' == len_a) and 'ymd') or format, len_a); -- choose ymd or dmy/mdy according to len_a setting else -- all other dates new_date = reformatter (param_val.val, pattern_idx, format, len_p); end if new_date then -- set when date was reformatted date_parameters_list[param_name].val = new_date; -- update date in date list result = true; -- and announce that changes have been made end end -- if end -- for end -- if end -- if end -- for return result; -- declare boolean result and done end --[[--------------------------< D A T E _ H Y P H E N _ T O _ D A S H >---------------------------------------- Loops through the list of date-holding parameters and converts any hyphen to an ndash. Not called if the cs1|2 template has any date errors. Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false. ]] local function date_hyphen_to_dash (date_parameters_list) local result = false; local n; for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set (param_val.val) then if not mw.ustring.match (param_val.val, '%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates (ustring because here digits may not be Western) param_val.val, n = param_val.val:gsub ('%-', '–'); -- replace any hyphen with ndash if 0 ~= n then date_parameters_list[param_name].val = param_val.val; -- update the list result = true; end end end end return result; -- so we know if any hyphens were replaced end --[[-------------------------< D A T E _ N A M E _ X L A T E >------------------------------------------------ Attempts to translate English month names to local-language month names using names supplied by MediaWiki's date parser function. This is simple name-for-name replacement and may not work for all languages. if xlat_dig is true, this function will also translate Western (English) digits to the local language's digits. This will also translate ymd dates. ]] local function date_name_xlate (date_parameters_list, xlt_dig) local xlate; local mode; -- long or short month names local modified = false; local date; for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(param_val.val) then -- if the parameter has a value date = param_val.val; for month in mw.ustring.gmatch (date, '%a+') do -- iterate through all dates in the date (single date or date range) if cfg.date_names.en.long[month] then mode = 'F'; -- English name is long so use long local name elseif cfg.date_names.en.short[month] then mode = 'M'; -- English name is short so use short local name else mode = nil; -- not an English month name; could be local language month name or an English season name end if mode then -- might be a season xlate = lang_object:formatDate(mode, '1' .. month); -- translate the month name to this local language date = mw.ustring.gsub (date, month, xlate); -- replace the English with the translation date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end if xlt_dig then -- shall we also translate digits? date = date:gsub ('%d', cfg.date_names.xlate_digits); -- translate digits from Western to 'local digits' date_parameters_list[param_name].val = date; -- save the translated date modified = true; end end end return modified; end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) add_prop_cat = utilities_page_ptr.add_prop_cat ; -- import functions from selected Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; -- set_message = utilities_page_ptr.set_message; wrap_style = utilities_page_ptr.wrap_style; cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { -- return exported functions dates = dates, year_date_check = year_date_check, reformat_dates = reformat_dates, date_hyphen_to_dash = date_hyphen_to_dash, date_name_xlate = date_name_xlate, set_selected_modules = set_selected_modules } ds0l4tghd9b1ze47i4ysqzmmocnzkhm Modul:Citation/CS1/Identifiers 828 275 825 824 2024-08-09T09:21:29Z Jon Harald Søby 58 1 semakan diimportkan 824 Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local has_accept_as_written, is_set, in_array, set_message, select_one, -- functions in Module:Citation/CS1/Utilities substitute, make_wikilink; local z; -- table of tables defined in Module:Citation/CS1/Utilities local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration --[[--------------------------< P A G E S C O P E V A R I A B L E S >-------------------------------------- declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here ]] local auto_link_urls = {}; -- holds identifier URLs for those identifiers that can auto-link |title= --============================<< H E L P E R F U N C T I O N S >>============================================ --[[--------------------------< W I K I D A T A _ A R T I C L E _ N A M E _ G E T >---------------------------- as an aid to internationalizing identifier-label wikilinks, gets identifier article names from Wikidata. returns :<lang code>:<article title> when <q> has an <article title> for <lang code>; nil else for identifiers that do not have q, returns nil for wikis that do not have mw.wikibase installed, returns nil ]] local function wikidata_article_name_get (q) if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki return nil; -- abandon end local wd_article; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki if wd_article then wd_article = table.concat ({':', this_wiki_code, ':', wd_article}); -- interwiki-style link without brackets if taken from WD; leading colon required end return wd_article; -- article title from WD; nil else end --[[--------------------------< L I N K _ L A B E L _ M A K E >------------------------------------------------ common function to create identifier link label from handler table or from Wikidata returns the first available of 1. redirect from local wiki's handler table (if enabled) 2. Wikidata (if there is a Wikidata entry for this identifier in the local wiki's language) 3. label specified in the local wiki's handler table ]] local function link_label_make (handler) local wd_article; if not (cfg.use_identifier_redirects and is_set (handler.redirect)) then -- redirect has priority so if enabled and available don't fetch from Wikidata because expensive wd_article = wikidata_article_name_get (handler.q); -- if Wikidata has an article title for this wiki, get it; end return (cfg.use_identifier_redirects and is_set (handler.redirect) and handler.redirect) or wd_article or handler.link; end --[[--------------------------< E X T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style external link ]] local function external_link_id (options) local url_string = options.id; local ext_link; local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org local wd_article; -- article title from Wikidata if options.encode == true or options.encode == nil then url_string = mw.uri.encode (url_string); end if options.auto_link and is_set (options.access) then auto_link_urls[options.auto_link] = table.concat ({options.prefix, url_string, options.suffix}); end ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki (options.id)); if is_set (options.access) then ext_link = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[options.access].class, cfg.presentation[options.access].title, ext_link}); -- add the free-to-read / paywall lock end return table.concat ({ make_wikilink (link_label_make (options), options.label), -- redirect, Wikidata link, or locally specified link (in that order) options.separator or '&nbsp;', ext_link }); end --[[--------------------------< I N T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki-style internal link TODO: Does not currently need to support options.access, options.encode, auto-linking and COinS (as in external_link_id), but may be needed in the future for :m:Interwiki_map custom-prefixes like :arxiv:, :bibcode:, :DOI:, :hdl:, :ISSN:, :JSTOR:, :Openlibrary:, :PMID:, :RFC:. ]] local function internal_link_id (options) local id = mw.ustring.gsub (options.id, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9 return table.concat ( { make_wikilink (link_label_make (options), options.label), -- wiki-link the identifier label options.separator or '&nbsp;', -- add the separator make_wikilink ( table.concat ( { options.prefix, id, -- translated to Western digits options.suffix or '' }), substitute (cfg.presentation['bdi'], {'', mw.text.nowiki (options.id)}) -- bdi tags to prevent Latin script identifiers from being reversed at RTL language wikis ); -- nowiki because MediaWiki still has magic links for ISBN and the like; TODO: is it really required? }); end --[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------ Determines if a PMC identifier's online version is embargoed. Compares the date in |pmc-embargo-date= against today's date. If embargo date is in the future, returns the content of |pmc-embargo-date=; otherwise, returns an empty string because the embargo has expired or because |pmc-embargo-date= was not set in this cite. ]] local function is_embargoed (embargo) if is_set (embargo) then local lang = mw.getContentLanguage(); local good1, embargo_date, todays_date; good1, embargo_date = pcall (lang.formatDate, lang, 'U', embargo); todays_date = lang:formatDate ('U'); if good1 then -- if embargo date is a good date if tonumber (embargo_date) >= tonumber (todays_date) then -- is embargo date is in the future? return embargo; -- still embargoed else set_message ('maint_pmc_embargo'); -- embargo has expired; add main cat return ''; -- unset because embargo has expired end end end return ''; -- |pmc-embargo-date= not set return empty string end --[=[-------------------------< I S _ V A L I D _ B I O R X I V _ D A T E >------------------------------------ returns true if: 2019-12-11T00:00Z <= biorxiv_date < today + 2 days The dated form of biorxiv identifier has a start date of 2019-12-11. The Unix timestamp for that date is {{#time:U|2019-12-11}} = 1576022400 biorxiv_date is the date provided in those |biorxiv= parameter values that are dated at time 00:00:00 UTC today is the current date at time 00:00:00 UTC plus 48 hours if today is 2015-01-01T00:00:00 then adding 24 hours gives 2015-01-02T00:00:00 – one second more than today adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser apparently doesn't understand non-English date month names. This function will always return false when the date contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that call this function with YYYY-MM-DD format dates. ]=] local function is_valid_biorxiv_date (biorxiv_date) local good1, good2; local biorxiv_ts, tomorrow_ts; -- to hold Unix timestamps representing the dates local lang_object = mw.getContentLanguage(); good1, biorxiv_ts = pcall (lang_object.formatDate, lang_object, 'U', biorxiv_date); -- convert biorxiv_date value to Unix timestamp good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which tonumber() may not understand biorxiv_ts = tonumber (biorxiv_ts) or lang_object:parseFormattedNumber (biorxiv_ts); -- convert to numbers for the comparison; tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts); else return false; -- one or both failed to convert to Unix timestamp end return ((1576022400 <= biorxiv_ts) and (biorxiv_ts < tomorrow_ts)) -- 2012-12-11T00:00Z <= biorxiv_date < tomorrow's date end --[[--------------------------< IS _ V A L I D _ I S X N >----------------------------------------------------- ISBN-10 and ISSN validator code calculates checksum across all ISBN/ISSN digits including the check digit. ISBN-13 is checked in isbn(). If the number is valid the result will be 0. Before calling this function, ISBN/ISSN must be checked for length and stripped of dashes, spaces and other non-ISxN characters. ]] local function is_valid_isxn (isxn_str, len) local temp = 0; isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58 len = len + 1; -- adjust to be a loop counter for i, v in ipairs (isxn_str) do -- loop through all of the bytes and calculate the checksum if v == string.byte ("X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58) temp = temp + 10 * (len - i); -- it represents 10 decimal else temp = temp + tonumber (string.char (v) )*(len-i); end end return temp % 11 == 0; -- returns true if calculation result is zero end --[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >----------------------------------------------- ISBN-13 and ISMN validator code calculates checksum across all 13 ISBN/ISMN digits including the check digit. If the number is valid, the result will be 0. Before calling this function, ISBN-13/ISMN must be checked for length and stripped of dashes, spaces and other non-ISxN-13 characters. ]] local function is_valid_isxn_13 (isxn_str) local temp=0; isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39 for i, v in ipairs (isxn_str) do temp = temp + (3 - 2*(i % 2)) * tonumber (string.char (v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit end return temp % 10 == 0; -- sum modulo 10 is zero when ISBN-13/ISMN is correct end --[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- LCCN normalization (http://www.loc.gov/marc/lccn-namespace.html#normalization) 1. Remove all blanks. 2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash. 3. If there is a hyphen in the string: a. Remove it. b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out): 1. All these characters should be digits, and there should be six or less. (not done in this function) 2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six. Returns a normalized LCCN for lccn() to validate. There is no error checking (step 3.b.1) performed in this function. ]] local function normalize_lccn (lccn) lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace if nil ~= string.find (lccn, '/') then lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it end local prefix local suffix prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix if nil ~= suffix then -- if there was a hyphen suffix = string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6 lccn = prefix..suffix; -- reassemble the LCCN end return lccn; end --============================<< I D E N T I F I E R F U N C T I O N S >>==================================== --[[--------------------------< A R X I V >-------------------------------------------------------------------- See: http://arxiv.org/help/arxiv_identifier format and error check arXiv identifier. There are three valid forms of the identifier: the first form, valid only between date codes 9107 and 0703, is: arXiv:<archive>.<class>/<date code><number><version> where: <archive> is a string of alpha characters - may be hyphenated; no other punctuation <class> is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 first digit of YY for this form can only 9 and 0 <number> is a three-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented) the second form, valid from April 2007 through December 2014 is: arXiv:<date code>.<number><version> where: <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 <number> is a four-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces the third form, valid from January 2015 is: arXiv:<date code>.<number><version> where: <date code> and <version> are as defined for 0704-1412 <number> is a five-digit number ]] local function arxiv (options) local id = options.id; local class = options.Class; -- TODO: lowercase? local handler = options.handler; local year, month, version; local err_cat = false; -- assume no error message local text; -- output text if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9107-0703 format with or without version year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((not (90 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month ((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok? err_cat = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((7 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years) ((7 == year) and (4 > month)) then -- when year is 07, is month invalid (before April)? err_cat = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format with or without version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$"); year = tonumber (year); month = tonumber (month); if ((15 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years) err_cat = true; -- flag for error message end else err_cat = true; -- not a recognized format; flag for error message end err_cat = err_cat and table.concat ({' ', set_message ('err_bad_arxiv')}) or ''; -- set error message if flag is true text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat; if is_set (class) then if id:match ('^%d+') then text = table.concat ({text, ' [[//arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink else text = table.concat ({text, ' ', set_message ('err_class_ignored')}); end end return text; end --[[--------------------------< B I B C O D E >-------------------------------------------------------------------- Validates (sort of) and formats a bibcode ID. Format for bibcodes is specified here: http://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters and first four digits must be a year. This function makes these tests: length must be 19 characters characters in position 1–4 must be digits and must represent a year in the range of 1000 – next year 5 must be a letter 6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. ) 9–18 must be letter, digit, or dot 19 must be a letter or dot ]] local function bibcode (options) local id = options.id; local access = options.access; local handler = options.handler; local err_type; local year; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}); if 19 ~= id:len() then err_type = cfg.err_msg_supl.length; else year = id:match ("^(%d%d%d%d)[%a][%w&%.][%w&%.][%w&%.][%w.]+[%a%.]$"); if not year then -- if nil then no pattern match err_type = cfg.err_msg_supl.value; -- so value error else local next_year = tonumber (os.date ('%Y')) + 1; -- get the current year as a number and add one for next year year = tonumber (year); -- convert year portion of bibcode to a number if (1000 > year) or (year > next_year) then err_type = cfg.err_msg_supl.year; -- year out of bounds end if id:find('&%.') then err_type = cfg.err_msg_supl.journal; -- journal abbreviation must not have '&.' (if it does it's missing a letter) end end end if is_set (err_type) then -- if there was an error detected text = text .. ' ' .. set_message ('err_bad_bibcode', {err_type}); end return text; end --[[--------------------------< B I O R X I V >----------------------------------------------------------------- Format bioRxiv ID and do simple error checking. Before 2019-12-11, biorXiv IDs were 10.1101/ followed by exactly 6 digits. After 2019-12-11, biorXiv IDs retained the six-digit identifier but prefixed that with a yyyy.mm.dd. date and suffixed with an optional version identifier. The bioRxiv ID is the string of characters: https://doi.org/10.1101/078733 -> 10.1101/078733 or a date followed by a six-digit number followed by an optional version indicator 'v' and one or more digits: https://www.biorxiv.org/content/10.1101/2019.12.11.123456v2 -> 10.1101/2019.12.11.123456v2 see https://www.biorxiv.org/about-biorxiv ]] local function biorxiv (options) local id = options.id; local handler = options.handler; local err_cat = true; -- flag; assume that there will be an error local patterns = { '^10.1101/%d%d%d%d%d%d$', -- simple 6-digit identifier (before 2019-12-11) '^10.1101/(20[1-9]%d)%.([01]%d)%.([0-3]%d)%.%d%d%d%d%d%dv%d+$', -- y.m.d. date + 6-digit identifier + version (after 2019-12-11) '^10.1101/(20[1-9]%d)%.([01]%d)%.([0-3]%d)%.%d%d%d%d%d%d$', -- y.m.d. date + 6-digit identifier (after 2019-12-11) } for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match if id:match (pattern) then local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier if m then -- m is nil when id is the six-digit form if not is_valid_biorxiv_date (y .. '-' .. m .. '-' .. d) then -- validate the encoded date; TODO: don't ignore leap-year and actual month lengths ({{#time:}} is a poor date validator) break; -- date fail; break out early so we don't unset the error message end end err_cat = nil; -- we found a match so unset the error message break; -- and done end end -- err_cat remains set here when no match return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. (err_cat and (' ' .. set_message ('err_bad_biorxiv')) or ''); end --[[--------------------------< C I T E S E E R X >------------------------------------------------------------ CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org). The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure ]] local function citeseerx (options) local id = options.id; local handler = options.handler; local matched; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}); matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$"); if not matched then text = text .. ' ' .. set_message ('err_bad_citeseerx' ); end return text; end --[[--------------------------< D O I >------------------------------------------------------------------------ Formats a DOI and checks for DOI errors. DOI names contain two parts: prefix and suffix separated by a forward slash. Prefix: directory indicator '10.' followed by a registrant code Suffix: character string of any length chosen by the registrant This function checks a DOI name for: prefix/suffix. If the DOI name contains spaces or endashes, or, if it ends with a period or a comma, this function will emit a bad_doi error message. DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash, and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in DOI names. ]] local function doi (options) local id = options.id; local inactive = options.DoiBroken local access = options.access; local ignore_invalid = options.accept; local handler = options.handler; local err_cat; local text; if is_set (inactive) then local inactive_year = inactive:match("%d%d%d%d") or ''; -- try to get the year portion from the inactive date local inactive_month, good; if is_set (inactive_year) then if 4 < inactive:len() then -- inactive date has more than just a year (could be anything) local lang_obj = mw.getContentLanguage(); -- get a language object for this wiki good, inactive_month = pcall (lang_obj.formatDate, lang_obj, 'F', inactive); -- try to get the month name from the inactive date if not good then inactive_month = nil; -- something went wrong so make sure this is unset end end else inactive_year = nil; -- |doi-broken-date= has something but it isn't a date end if is_set (inactive_year) and is_set (inactive_month) then set_message ('maint_doi_inactive_dated', {inactive_year, inactive_month, ' '}); elseif is_set (inactive_year) then set_message ('maint_doi_inactive_dated', {inactive_year, '', ''}); else set_message ('maint_doi_inactive'); end inactive = " (" .. cfg.messages['inactive'] .. ' ' .. inactive .. ')'; end local registrant = id:match ('^10%.([^/]+)/[^%s–]-[^%.,]$'); -- registrant set when DOI has the proper basic form local registrant_err_patterns = { -- these patterns are for code ranges that are not supported '^[^1-3]%d%d%d%d%.%d%d*$', -- 5 digits with subcode (0xxxx, 40000+); accepts: 10000–39999 '^[^1-4]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 40000+); accepts: 10000–49999 '^[^1-9]%d%d%d%.%d%d*$', -- 4 digits with subcode (0xxx); accepts: 1000–9999 '^[^1-9]%d%d%d$', -- 4 digits without subcode (0xxx); accepts: 1000–9999 '^%d%d%d%d%d%d+', -- 6 or more digits '^%d%d?%d?$', -- less than 4 digits without subcode (with subcode is legitimate) '^5555$', -- test registrant will never resolve '[^%d%.]', -- any character that isn't a digit or a dot } if not ignore_invalid then if registrant then -- when DOI has proper form for i, pattern in ipairs (registrant_err_patterns) do -- spin through error patterns if registrant:match (pattern) then -- to validate registrant codes err_cat = ' ' .. set_message ('err_bad_doi'); -- when found, mark this DOI as bad break; -- and done end end else err_cat = ' ' .. set_message ('err_bad_doi'); -- invalid directory or malformed end else set_message ('maint_doi_ignore'); end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access, auto_link = not (err_cat or is_set (inactive) or ignore_invalid) and 'doi' or nil -- do not auto-link when |doi-broken-date= has a value or when there is a DOI error or (to play it safe, after all, auto-linking is not essential) when invalid DOIs are ignored }) .. (inactive or ''); return text .. (err_cat and err_cat or ''); -- parentheses required end --[[--------------------------< H D L >------------------------------------------------------------------------ Formats an HDL with minor error checking. HDL names contain two parts: prefix and suffix separated by a forward slash. Prefix: character string using any character in the UCS-2 character set except '/' Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends with a period or a comma, this function will emit a bad_hdl error message. HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in HDLs. Query string parameters are named here: http://www.handle.net/proxy_servlet.html. query strings are not displayed but since '?' is an allowed character in an HDL, '?' followed by one of the query parameters is the only way we have to detect the query string so that it isn't URL-encoded with the rest of the identifier. ]] local function hdl (options) local id = options.id; local access = options.access; local handler = options.handler; local query_params = { -- list of known query parameters from http://www.handle.net/proxy_servlet.html 'noredirect', 'ignore_aliases', 'auth', 'cert', 'index', 'type', 'urlappend', 'locatt', 'action', } local hdl, suffix, param = id:match ('(.-)(%?(%a+).+)$'); -- look for query string local found; if hdl then -- when there are query strings, this is the handle identifier portion for _, q in ipairs (query_params) do -- spin through the list of query parameters if param:match ('^' .. q) then -- if the query string begins with one of the parameters found = true; -- announce a find break; -- and stop looking end end end if found then id = hdl; -- found so replace id with the handle portion; this will be URL-encoded, suffix will not else suffix = ''; -- make sure suffix is empty string for concatenation else end local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, suffix = suffix, separator = handler.separator, encode = handler.encode, access = access}) if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- HDL must contain a forward slash, must not contain spaces, endashes, and must not end with period or comma text = text .. ' ' .. set_message ('err_bad_hdl' ); end return text; end --[[--------------------------< I S B N >---------------------------------------------------------------------- Determines whether an ISBN string is valid ]] local function isbn (options) local isbn_str = options.id; local ignore_invalid = options.accept; local handler = options.handler; local function return_result (check, err_type) -- local function to handle the various returns local ISBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = isbn_str, separator = handler.separator}); if ignore_invalid then -- if ignoring ISBN errors set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error else -- here when not ignoring if not check then -- and there is an error return ISBN .. set_message ('err_bad_isbn', {err_type}, false, ' '); -- display an error message end end return ISBN; end if nil ~= isbn_str:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X end local id = isbn_str:gsub ('[%s-]', ''); -- remove hyphens and whitespace local len = id:len(); if len ~= 10 and len ~= 13 then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if len == 10 then if id:match ('^%d*X?$') == nil then -- fail if isbn_str has 'X' anywhere but last position return return_result (false, cfg.err_msg_supl.form); end return return_result (is_valid_isxn (id, 10), cfg.err_msg_supl.check); else if id:match ('^%d+$') == nil then return return_result (false, cfg.err_msg_supl.char); -- fail if ISBN-13 is not all digits end if id:match ('^97[89]%d*$') == nil then return return_result (false, cfg.err_msg_supl.prefix); -- fail when ISBN-13 does not begin with 978 or 979 end if id:match ('^9790') then return return_result (false, cfg.err_msg_supl.group); -- group identifier '0' is reserved to ISMN end return return_result (is_valid_isxn_13 (id), cfg.err_msg_supl.check); end end --[[--------------------------< A S I N >---------------------------------------------------------------------- Formats a link to Amazon. Do simple error checking: ASIN must be mix of 10 numeric or uppercase alpha characters. If a mix, first character must be uppercase alpha; if all numeric, ASINs must be 10-digit ISBN. If 10-digit ISBN, add a maintenance category so a bot or AWB script can replace |asin= with |isbn=. Error message if not 10 characters, if not ISBN-10, if mixed and first character is a digit. |asin=630....... is (apparently) not a legitimate ISBN though it checksums as one; these do not cause this function to emit the maint_asin message This function is positioned here because it calls isbn() ]] local function asin (options) local id = options.id; local domain = options.ASINTLD; local err_cat = "" if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then err_cat = ' ' .. set_message ('err_bad_asin'); -- ASIN is not a mix of 10 uppercase alpha and numeric characters else if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X) if isbn (options) then -- see if ASIN value is or validates as ISBN-10 if not id:find ('^630') then -- 630xxxxxxx is (apparently) not a valid isbn prefix but is used by amazon as a numeric identifier set_message ('maint_asin'); -- begins with something other than 630 so possibly an isbn end elseif not is_set (err_cat) then err_cat = ' ' .. set_message ('err_bad_asin'); -- ASIN is not ISBN-10 end elseif not id:match("^%u[%d%u]+$") then err_cat = ' ' .. set_message ('err_bad_asin'); -- asin doesn't begin with uppercase alpha end end if not is_set (domain) then domain = "com"; elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom domain = "co." .. domain; elseif in_array (domain, {'au', 'br', 'mx'}) then -- Australia, Brazil, Mexico domain = "com." .. domain; end local handler = options.handler; return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. domain .. "/dp/", id = id, encode = handler.encode, separator = handler.separator}) .. err_cat; end --[[--------------------------< I S M N >---------------------------------------------------------------------- Determines whether an ISMN string is valid. Similar to ISBN-13, ISMN is 13 digits beginning 979-0-... and uses the same check digit calculations. See http://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf section 2, pages 9–12. ]] local function ismn (options) local id = options.id; local handler = options.handler; local text; local valid_ismn = true; local id_copy; id_copy = id; -- save a copy because this testing is destructive id = id:gsub ('[%s-]', ''); -- remove hyphens and white space if 13 ~= id:len() or id:match ("^9790%d*$" ) == nil then -- ISMN must be 13 digits and begin with 9790 valid_ismn = false; else valid_ismn=is_valid_isxn_13 (id); -- validate ISMN end -- text = internal_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- use this (or external version) when there is some place to link to -- prefix = handler.prefix, id = id_copy, separator = handler.separator, encode = handler.encode}) text = table.concat ( -- because no place to link to yet { make_wikilink (link_label_make (handler), handler.label), handler.separator, id_copy }); if false == valid_ismn then text = text .. ' ' .. set_message ('err_bad_ismn' ) -- add an error message if the ISMN is invalid end return text; end --[[--------------------------< I S S N >---------------------------------------------------------------------- Validate and format an ISSN. This code fixes the case where an editor has included an ISSN in the citation but has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked like this: |issn=0819 4327 gives: [http://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link This code now prevents that by inserting a hyphen at the ISSN midpoint. It also validates the ISSN for length and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check ISSN error message. The ISSN is always displayed with a hyphen, even if the ISSN was given as a single group of 8 digits. ]] local function issn (options) local id = options.id; local handler = options.handler; local ignore_invalid = options.accept; local issn_copy = id; -- save a copy of unadulterated ISSN; use this version for display if ISSN does not validate local text; local valid_issn = true; id = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace if 8 ~= id:len() or nil == id:match ("^%d*X?$" ) then -- validate the ISSN: 8 digits long, containing only 0-9 or X in the last position valid_issn = false; -- wrong length or improper character else valid_issn = is_valid_isxn (id, 8); -- validate ISSN end if true == valid_issn then id = string.sub (id, 1, 4 ) .. "-" .. string.sub (id, 5 ); -- if valid, display correctly formatted version else id = issn_copy; -- if not valid, show the invalid ISSN with error message end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if ignore_invalid then set_message ('maint_issn_ignore'); else if false == valid_issn then text = text .. ' ' .. set_message ('err_bad_issn', (options.hkey == 'EISSN') and 'e' or ''); -- add an error message if the ISSN is invalid end end return text end --[[--------------------------< J F M >----------------------------------------------------------------------- A numerical identifier in the form nn.nnnn.nn ]] local function jfm (options) local id = options.id; local handler = options.handler; local id_num; local err_cat = ''; id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier if is_set (id_num) then set_message ('maint_jfm_format'); else -- plain number without JFM prefix id_num = id; -- if here id does not have prefix end if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then id = id_num; -- jfm matches pattern else err_cat = ' ' .. set_message ('err_bad_jfm' ); -- set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat; end --[[--------------------------< J S T O R >-------------------------------------------------------------------- Format a JSTOR with some error checking ]] local function jstor (options) local id = options.id; local access = options.access; local handler = options.handler; local err_msg = ''; if id:find ('[Jj][Ss][Tt][Oo][Rr]') or id:find ('^https?://') or id:find ('%s') then err_msg = ' ' .. set_message ('err_bad_jstor'); -- set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}) .. err_msg; end --[[--------------------------< L C C N >---------------------------------------------------------------------- Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits. http://info-uri.info/registry/OAIHandler?verb=GetRecord&metadataPrefix=reg&identifier=info:lccn/ length = 8 then all digits length = 9 then lccn[1] is lowercase alpha length = 10 then lccn[1] and lccn[2] are both lowercase alpha or both digits length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lowercase alpha or both digits length = 12 then lccn[1] and lccn[2] are both lowercase alpha ]] local function lccn (options) local lccn = options.id; local handler = options.handler; local err_cat = ''; -- presume that LCCN is valid local id = lccn; -- local copy of the LCCN id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes) local len = id:len(); -- get the length of the LCCN if 8 == len then if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) err_cat = ' ' .. set_message ('err_bad_lccn'); -- set an error message end elseif 9 == len then -- LCCN should be adddddddd if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern? err_cat = ' ' .. set_message ('err_bad_lccn'); -- set an error message end elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ... if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message end end elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message end elseif 12 == len then -- LCCN should be aadddddddddd if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern err_cat = ' ' .. set_message ('err_bad_lccn'); -- no match, set an error message end else err_cat = ' ' .. set_message ('err_bad_lccn'); -- wrong length, set an error message end if not is_set (err_cat) and nil ~= lccn:find ('%s') then err_cat = ' ' .. set_message ('err_bad_lccn'); -- lccn contains a space, set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = lccn, separator = handler.separator, encode = handler.encode}) .. err_cat; end --[[--------------------------< M R >-------------------------------------------------------------------------- A seven digit number; if not seven digits, zero-fill leading digits to make seven digits. ]] local function mr (options) local id = options.id; local handler = options.handler; local id_num; local id_len; local err_cat = ''; id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix if is_set (id_num) then set_message ('maint_mr_format'); -- add maint cat else -- plain number without mr prefix id_num = id:match ('^%d+$'); -- if here id is all digits end id_len = id_num and id_num:len() or 0; if (7 >= id_len) and (0 ~= id_len) then id = string.rep ('0', 7-id_len) .. id_num; -- zero-fill leading digits else err_cat = ' ' .. set_message ('err_bad_mr'); -- set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat; end --[[--------------------------< O C L C >---------------------------------------------------------------------- Validate and format an OCLC ID. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}} archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html ]] local function oclc (options) local id = options.id; local handler = options.handler; local number; local err_msg = ''; -- empty string for concatenation if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters) number = id:match('ocm(%d+)'); -- get the number elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters) number = id:match('ocn(%d+)'); -- get the number elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters) number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number if 9 < number:len() then number = nil; -- constrain to 1 to 9 digits; change this when OCLC issues 10-digit numbers end elseif id:match('^%d+$') then -- no prefix number = id; -- get the number if 10 < number:len() then number = nil; -- constrain to 1 to 10 digits; change this when OCLC issues 11-digit numbers end end if number then -- proper format id = number; -- exclude prefix, if any, from external link else err_msg = ' ' .. set_message ('err_bad_oclc') -- add an error message if the id is malformed end local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_msg; return text; end --[[--------------------------< O P E N L I B R A R Y >-------------------------------------------------------- Formats an OpenLibrary link, and checks for associated errors. ]] local function openlibrary (options) local id = options.id; local access = options.access; local handler = options.handler; local ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- strip optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W'; local error_msg = ''; local prefix = { -- these are appended to the handler.prefix according to code ['A']='authors/OL', ['M']='books/OL', ['W']='works/OL', ['X']='OL' -- not a code; spoof when 'code' in id is invalid }; if not ident then code = 'X'; -- no code or id completely invalid ident = id; -- copy id to ident so that we display the flawed identifier error_msg = ' ' .. set_message ('err_bad_ol'); end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix .. prefix[code], id = ident, separator = handler.separator, encode = handler.encode, access = access}) .. error_msg; end --[[--------------------------< O S T I >---------------------------------------------------------------------- Format OSTI and do simple error checking. OSTIs are sequential numbers beginning at 1 and counting up. This code checks the OSTI to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more OSTIs are issued. NB. 1018 is the lowest OSTI number found in the wild (so far) and resolving OK on the OSTI site ]] local function osti (options) local id = options.id; local access = options.access; local handler = options.handler; local err_cat = ''; -- presume that OSTI is valid if id:match("[^%d]") then -- if OSTI has anything but digits err_cat = ' ' .. set_message ('err_bad_osti'); -- set an error message else -- OSTI is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1018 > id_num or handler.id_limit < id_num then -- if OSTI is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_osti'); -- set an error message end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}) .. err_cat; end --[[--------------------------< P M C >------------------------------------------------------------------------ Format a PMC, do simple error checking, and check for embargoed articles. The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix. PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation has |pmc=<value> but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed () returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string. PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued. ]] local function pmc (options) local id = options.id; local embargo = options.Embargo; -- TODO: lowercase? local handler = options.handler; local err_cat; local id_num; local text; id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with PMC prefix if is_set (id_num) then set_message ('maint_pmc_format'); else -- plain number without PMC prefix id_num = id:match ('^%d+$'); -- if here id is all digits end if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMC is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_pmc'); -- set an error message else id = tostring (id_num); -- make sure id is a string end else -- when id format incorrect err_cat = ' ' .. set_message ('err_bad_pmc'); -- set an error message end if is_set (embargo) and is_set (is_embargoed (embargo)) then -- is PMC is still embargoed? text = table.concat ( -- still embargoed so no external link { make_wikilink (link_label_make (handler), handler.label), handler.separator, id, (err_cat and err_cat or '') -- parens required }); else text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, -- no embargo date or embargo has expired, ok to link to article prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access, auto_link = not err_cat and 'pmc' or nil -- do not auto-link when PMC has error }) .. (err_cat and err_cat or ''); -- parentheses required end return text; end --[[--------------------------< P M I D >---------------------------------------------------------------------- Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMIDs are issued. ]] local function pmid (options) local id = options.id; local handler = options.handler; local err_cat = ''; -- presume that PMID is valid if id:match("[^%d]") then -- if PMID has anything but digits err_cat = ' ' .. set_message ('err_bad_pmid'); -- set an error message else -- PMID is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if PMID is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_pmid'); -- set an error message end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat; end --[[--------------------------< R F C >------------------------------------------------------------------------ Format RFC and do simple error checking. RFCs are sequential numbers beginning at 1 and counting up. This code checks the RFC to see that it contains only digits and is less than test_limit specified in the configuration; the value in test_limit will need to be updated periodically as more RFCs are issued. An index of all RFCs is here: https://tools.ietf.org/rfc/ ]] local function rfc (options) local id = options.id; local handler = options.handler; local err_cat = ''; -- presume that RFC is valid if id:match("[^%d]") then -- if RFC has anything but digits err_cat = ' ' .. set_message ('err_bad_rfc'); -- set an error message else -- RFC is only digits local id_num = tonumber (id); -- convert id to a number for range testing if 1 > id_num or handler.id_limit < id_num then -- if RFC is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_rfc'); -- set an error message end end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat; end --[[--------------------------< S 2 C I D >-------------------------------------------------------------------- Format an S2CID, do simple error checking S2CIDs are sequential numbers beginning at 1 and counting up. This code checks the S2CID to see that it is only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more S2CIDs are issued. ]] local function s2cid (options) local id = options.id; local access = options.access; local handler = options.handler; local err_cat = ''; -- presume that S2CID is valid local id_num; local text; id_num = id:match ('^[1-9]%d*$'); -- id must be all digits; must not begin with 0; no open access flag if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if handler.id_limit < id_num then -- if S2CID is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_s2cid'); -- set an error message end else -- when id format incorrect err_cat = ' ' .. set_message ('err_bad_s2cid'); -- set an error message end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}) .. err_cat; return text; end --[[--------------------------< S B N >------------------------------------------------------------------------ 9-digit form of ISBN-10; uses same check-digit validation when SBN is prefixed with an additional '0' to make 10 digits ]] local function sbn (options) local id = options.id; local ignore_invalid = options.accept; local handler = options.handler; local function return_result (check, err_type) -- local function to handle the various returns local SBN = internal_link_id ({link = handler.link, label = handler.label, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator}); if not ignore_invalid then -- if not ignoring SBN errors if not check then return SBN .. set_message ('err_bad_sbn', {err_type}, false, ' '); -- display an error message end else set_message ('maint_isbn_ignore'); -- add a maint category even when there is no error (ToDo: Possibly switch to separate message for SBNs only) end return SBN; end if id:match ('[^%s-0-9X]') then return return_result (false, cfg.err_msg_supl.char); -- fail if SBN contains anything but digits, hyphens, or the uppercase X end local ident = id:gsub ('[%s-]', ''); -- remove hyphens and whitespace; they interfere with the rest of the tests if 9 ~= ident:len() then return return_result (false, cfg.err_msg_supl.length); -- fail if incorrect length end if ident:match ('^%d*X?$') == nil then return return_result (false, cfg.err_msg_supl.form); -- fail if SBN has 'X' anywhere but last position end return return_result (is_valid_isxn ('0' .. ident, 10), cfg.err_msg_supl.check); end --[[--------------------------< S S R N >---------------------------------------------------------------------- Format an SSRN, do simple error checking SSRNs are sequential numbers beginning at 100? and counting up. This code checks the SSRN to see that it is only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need to be updated periodically as more SSRNs are issued. ]] local function ssrn (options) local id = options.id; local handler = options.handler; local err_cat = ''; -- presume that SSRN is valid local id_num; local text; id_num = id:match ('^%d+$'); -- id must be all digits if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if 100 > id_num or handler.id_limit < id_num then -- if SSRN is outside test limit boundaries err_cat = ' ' .. set_message ('err_bad_ssrn'); -- set an error message end else -- when id format incorrect err_cat = ' ' .. set_message ('err_bad_ssrn'); -- set an error message end text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat; return text; end --[[--------------------------< U S E N E T _ I D >------------------------------------------------------------ Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in '<' and/or '>' angle brackets. ]] local function usenet_id (options) local id = options.id; local handler = options.handler; local text = external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) if not id:match('^.+@.+$') or not id:match('^[^<].*[^>]$') then -- doesn't have '@' or has one or first or last character is '< or '>' text = text .. ' ' .. set_message ('err_bad_usenet_id') -- add an error message if the message id is invalid end return text end --[[--------------------------< Z B L >----------------------------------------------------------------------- A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional format described here: http://emis.mi.sanu.ac.rs/ZMATH/zmath/en/help/search/ temporary format is apparently eight digits. Anything else is an error ]] local function zbl (options) local id = options.id; local handler = options.handler; local err_cat = ''; if id:match('^%d%d%d%d%d%d%d%d$') then -- is this identifier using temporary format? set_message ('maint_zbl'); -- yes, add maint cat elseif not id:match('^%d?%d?%d?%d%.%d%d%d%d%d$') then -- not temporary, is it normal format? err_cat = ' ' .. set_message ('err_bad_zbl'); -- no, set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode}) .. err_cat; end --============================<< I N T E R F A C E F U N C T I O N S >>========================================== --[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------ Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to the identifier list. Emits redundant error message if more than one alias exists in args ]] local function extract_ids (args) local id_list = {}; -- list of identifiers found in args for k, v in pairs (cfg.id_handlers) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table v = select_one (args, v.parameters, 'err_redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present if is_set (v) then id_list[k] = v; end -- if found in args, add identifier to our list end return id_list; end --[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >-------------------------------------- Fetches custom id access levels from arguments using configuration settings. Parameters which have a predefined access level (e.g. arxiv) do not use this function as they are directly rendered as free without using an additional parameter. returns a table of k/v pairs where k is same as the identifier's key in cfg.id_handlers and v is the assigned (valid) keyword access-level values must match the case used in cfg.keywords_lists['id-access'] (lowercase unless there is some special reason for something else) ]] local function extract_id_access_levels (args, id_list) local id_accesses_list = {}; for k, v in pairs (cfg.id_handlers) do local access_param = v.custom_access; -- name of identifier's access-level parameter if is_set (access_param) then local access_level = args[access_param]; -- get the assigned value if there is one if is_set (access_level) then if not in_array (access_level, cfg.keywords_lists['id-access']) then -- exact match required table.insert (z.message_tail, { set_message ('invalid_param_val', {access_param, access_level}, true) } ); access_level = nil; -- invalid so unset end if not is_set (id_list[k]) then -- identifier access-level must have a matching identifier table.insert (z.message_tail, { set_message ('err_param_access_requires_param', {k:lower()}, true) } ); -- parameter name is uppercase in cfg.id_handlers (k); lowercase for error message end id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword end end end return id_accesses_list; end --[[--------------------------< B U I L D _ I D _ L I S T >---------------------------------------------------- render the identifiers into a sorted sequence table <id_list_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value <options_t> is a table of is a table of various k/v option pairs provided in the call to new_build_id_list(); modified by this function and passed to all identifier rendering functions <access_levels_t> is a table of k/v pairs where k is same as key in cfg.id_handlers and v is the assigned value (if valid) returns a sequence table of sorted (by hkey) rendered identifier strings ]] local function build_id_list (id_list_t, options_t, access_levels_t) local new_list_t = {}; local accept; local func_map = { --function map points to functions associated with hkey identifier ['ARXIV'] = arxiv, ['ASIN'] = asin, ['BIBCODE'] = bibcode, ['BIORXIV'] = biorxiv, ['CITESEERX'] = citeseerx, ['DOI'] = doi, ['EISSN'] = issn, ['HDL'] = hdl, ['ISBN'] = isbn, ['ISMN'] = ismn, ['ISSN'] = issn, ['JFM'] = jfm, ['JSTOR'] = jstor, ['LCCN'] = lccn, ['MR'] = mr, ['OCLC'] = oclc, ['OL'] = openlibrary, ['OSTI'] = osti, ['PMC'] = pmc, ['PMID'] = pmid, ['RFC'] = rfc, ['S2CID'] = s2cid, ['SBN'] = sbn, ['SSRN'] = ssrn, ['USENETID'] = usenet_id, ['ZBL'] = zbl, } for hkey, v in pairs (id_list_t) do v, accept = has_accept_as_written (v); -- remove accept-as-written markup if present; accept is boolean true when markup removed; false else -- every function gets the options table with value v and accept boolean options_t.hkey = hkey; -- ~/Configuration handler key options_t.id = v; -- add that identifier value to the options table options_t.accept = accept; -- add the accept boolean flag options_t.access = access_levels_t[hkey]; -- add the access level for those that have an |<identifier-access= parameter options_t.handler = cfg.id_handlers[hkey]; if func_map[hkey] then table.insert (new_list_t, {hkey, func_map[hkey] (options_t)}); -- call the function and add the results to the output sequence table -- TODO: also retrieve identifier validity status, OL A/M/W/X type and ASIN TLD info from the corresponding function call for improved metadata generation in COinS() in ~/COinS else error (cfg.messages['unknown_ID_key'] .. ' ' .. hkey); -- here when func_map doesn't have a function for hkey end end local function comp (a, b) -- used by following table.sort() return a[1]:lower() < b[1]:lower(); -- sort by hkey end table.sort (new_list_t, comp); -- sequence table of tables sort for k, v in ipairs (new_list_t) do -- convert sequence table of tables to simple sequence table of strings new_list_t[k] = v[2]; end return new_list_t; end --[[--------------------------< I D E N T I F I E R _ L I S T S _ G E T >-------------------------------------- Creates two identifier lists: a k/v table of identifiers and their values to be used locally and for use in the COinS metadata, and a sequence table of the rendered identifier strings that will be included in the rendered citation. ]] local function identifier_lists_get (args, options_t) local ID_list_coins_t = extract_ids (args); -- get a table of identifiers and their values for use locally and for use in COinS local ID_access_levels_t = extract_id_access_levels (args, ID_list_coins_t); -- get a table of identifier access levels local ID_list_t = build_id_list (ID_list_coins_t, options_t, ID_access_levels_t); -- get a sequence table of rendered identifier strings -- TODO: add code to retrieve identifier validity status, OL A/M/W/X type and ASIN TLD info from ID_list_t and add this to ID_list_coins_t for improved metadata generation in COinS() in ~/COinS return ID_list_t, ID_list_coins_t; -- return the tables end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr) cfg = cfg_table_ptr; has_accept_as_written = utilities_page_ptr.has_accept_as_written; -- import functions from select Module:Citation/CS1/Utilities module is_set = utilities_page_ptr.is_set; in_array = utilities_page_ptr.in_array; set_message = utilities_page_ptr.set_message; select_one = utilities_page_ptr.select_one; substitute = utilities_page_ptr.substitute; make_wikilink = utilities_page_ptr.make_wikilink; z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { auto_link_urls = auto_link_urls, -- table of identifier URLs to be used when auto-linking |title= identifier_lists_get = identifier_lists_get, -- experiment to replace individual calls to build_id_list, extract_ids, extract_id_access_levels is_embargoed = is_embargoed; set_selected_modules = set_selected_modules; } gyud5k236nnv74ta7ljtp8hz15rjf3z Modul:Citation/CS1/Utilities 828 276 827 826 2024-08-09T09:21:29Z Jon Harald Søby 58 1 semakan diimportkan 826 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 --[[--------------------------< H A S _ A C C E P T _ A S _ W R I T T E N >------------------------------------ When <str> is wholly wrapped in accept-as-written markup, return <str> without markup and true; return <str> and false else with allow_empty = false, <str> must have at least one character inside the markup with allow_empty = true, <str> the markup frame can be empty like (()) to distinguish an empty template parameter from the specific condition "has no applicable value" in citation-context. After further evaluation the two cases might be merged at a later stage, but should be kept separated for now. ]] local function has_accept_as_written (str, allow_empty) local count; if true == allow_empty then str, count = str:gsub ('^%(%((.*)%)%)$', '%1'); -- allows (()) to be an empty set else str, count = str:gsub ('^%(%((.+)%)%)$', '%1'); end return str, 0 ~= count; end --[[--------------------------< 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 both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided (or link and display are the same), returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if not is_set (link) then return '' end if is_set (display) and link ~= display then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end end --[[--------------------------< S E T _ M E S S A G E >---------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. TODO: change z.error_categories and z.maintenance_cats to have the form cat_name = true; to avoid dups without having to have an extra cat ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats; TODO: figure out how to delete this table local function set_message (error_id, arguments, raw, prefix, suffix) local error_state = cfg.error_conditions[error_id]; prefix = prefix or ''; suffix = suffix or ''; if error_state == nil then error (cfg.messages['undefined_error'] .. ': ' .. error_id); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set (error_state.category) then if error_state.message then -- when error_state.message defined, this is an error message table.insert (z.error_categories, error_state.category); else if not added_maint_cats[error_id] then added_maint_cats[error_id] = true; -- note that we've added this category table.insert (z.maintenance_cats, substitute (error_state.category, arguments)); -- make cat name then add to table end return; -- because no message, nothing more to do end end local message = substitute (error_state.message, arguments); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids[error_id] = true; if z.error_ids['err_citation_missing_title'] and -- if missing-title error already noted in_array (error_id, {'err_bare_url_missing_title', 'err_trans_missing_title'}) then -- and this error is one of these return '', false; -- don't bother because one flavor of missing title is sufficient end message = table.concat ({prefix, message, suffix}); if raw == true then return message, error_state.hidden; end return error_comment (message, error_state.hidden); end --[[-------------------------< I S _ A L I A S _ U S E D >----------------------------------------------------- This function is used by select_one() to determine if one of a list of alias parameters is in the argument list provided by the template. Input: args – pointer to the arguments table from calling template alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration index – for enumerated parameters, identifies which one enumerated – true/false flag used to choose how enumerated aliases are examined value – value associated with an alias that has previously been selected; nil if not yet selected selected – the alias that has previously been selected; nil if not yet selected error_list – list of aliases that are duplicates of the alias already selected Returns: value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected ]] local function is_alias_used (args, alias, index, enumerated, value, selected, error_list) if enumerated then -- is this a test for an enumerated parameters? alias = alias:gsub ('#', index); -- replace '#' with the value in index else alias = alias:gsub ('#', ''); -- remove '#' if it exists end if is_set (args[alias]) then -- alias is in the template's argument list if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases local skip; for _, v in ipairs (error_list) do -- spin through the error list to see if we've added this alias if v == alias then skip = true; break; -- has been added so stop looking end end if not skip then -- has not been added so table.insert (error_list, alias); -- add error alias to the error list end else value = args[alias]; -- not yet selected an alias, so select this one selected = alias; end end return value, selected; -- return newly selected alias, or previously selected alias end --[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------ Adds a category to z.maintenance_cats using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats. ]] local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert (z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< 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. foreign_lang_source and foreign_lang_source_2 keys have a language code appended to them so that multiple languages may be categorized but multiples of the same language are not categorized. added_prop_cats is a table declared in page scope variables above ]] local added_prop_cats = {}; -- list of property categories that have been added to z.properties_cats local function add_prop_cat (key, arguments) if not added_prop_cats [key] then added_prop_cats [key] = true; -- note that we've added this category key = key:gsub ('(foreign_lang_source_?2?)%a%a%a?[%a%-]*', '%1'); -- strip lang code from keyname table.insert (z.properties_cats, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< S A F E _ F O R _ I T A L I C S >---------------------------------------------- Protects a string that will be wrapped in wiki italic markup '' ... '' Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact poorly under Mediawiki's HTML tidy. ]] local function safe_for_italics (str) if not is_set (str) then return str end if str:sub (1, 1) == "'" then str = "<span></span>" .. str; end if str:sub (-1, -1) == "'" then str = str .. "<span></span>"; end -- Remove newlines as they break italics. return str:gsub ('\n', ' '); end --[[--------------------------< W R A P _ S T Y L E >---------------------------------------------------------- Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason this function is similar to but separate from wrap_msg(). ]] local function wrap_style (key, str) if not is_set (str) then return ""; elseif in_array (key, {'italic-title', 'trans-italic-title'}) then str = safe_for_italics (str); end return substitute (cfg.presentation[key], {str}); end --[[--------------------------< M A K E _ S E P _ L I S T >------------------------------------------------------------ make a separated list of items using provided separators. <sep_list> - typically '<comma><space>' <sep_list_pair> - typically '<space>and<space>' <sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>' defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end'] if <sep_list_end> is specified, <sep_list> and <sep_list_pair> must also be supplied ]] local function make_sep_list (count, list_seq, sep_list, sep_list_pair, sep_list_end) local list = ''; if not sep_list then -- set the defaults sep_list = cfg.presentation['sep_list']; sep_list_pair = cfg.presentation['sep_list_pair']; sep_list_end = cfg.presentation['sep_list_end']; end if 2 >= count then list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item elseif 2 < count then list = table.concat (list_seq, sep_list, 1, count - 1); -- concatenate all but last item with plain list separator list = table.concat ({list, list_seq[count]}, sep_list_end); -- concatenate last item onto end of <list> with final separator end return list; end --[[--------------------------< S E L E C T _ O N E >---------------------------------------------------------- Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'. Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities. Generates an error if more than one match is present. ]] local function select_one (args, aliases_list, error_condition, index) local value = nil; -- the value assigned to the selected parameter local selected = ''; -- the name of the parameter we have chosen local error_list = {}; if index ~= nil then index = tostring(index); end for _, alias in ipairs (aliases_list) do -- for each alias in the aliases list if alias:match ('#') then -- if this alias can be enumerated if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias end value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias else value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- test for non-enumerated alias end end if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names() for i, v in ipairs (error_list) do error_list[i] = wrap_style ('parameter', v); end table.insert (error_list, wrap_style ('parameter', selected)); table.insert (z.message_tail, {set_message (error_condition, {make_sep_list (#error_list, error_list)}, 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 whitespace from the label if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match in the initial gsub, the replacement function l() doesn't get called. ]=] local function remove_wiki_link (str) return (str:gsub ("%[%[([^%[%]]*)%]%]", function(l) return l:gsub ("^[^|]*|(.*)$", "%1" ):gsub ("^%s*(.-)%s*$", "%1"); end)); end --[=[-------------------------< I S _ W I K I L I N K >-------------------------------------------------------- Determines if str is a wikilink, extracts, and returns the wikilink type, link text, and display text parts. If str is a complex wikilink ([[L|D]]): returns wl_type 2 and D and L from [[L|D]]; if str is a simple wikilink ([[D]]) returns wl_type 1 and D from [[D]] and L as empty string; if not a wikilink: returns wl_type 0, str as D, and L as empty string. trims leading and trailing whitespace and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes). ]=] local function is_wikilink (str) local D, L local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content) return 0, str, ''; -- not a wikilink; return wl_type as 0, str as D, and empty string as L end L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate display D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]] wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters return wl_type, D, L or ''; end --[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >-------------------------------- Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata. This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind. Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was removed; returns the argument and nil when no markup removed ]] local function strip_apostrophe_markup (argument) if not is_set (argument) then return argument, nil; -- no argument, nothing to do end if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit. return argument, nil; end local flag; while true do if argument:find ("'''''", 1, true) then -- bold italic (5) argument, flag = argument:gsub ("%'%'%'%'%'", ""); -- remove all instances of it elseif argument:find ("''''", 1, true) then -- italic start and end without content (4) argument, flag=argument:gsub ("%'%'%'%'", ""); elseif argument:find ("'''", 1, true) then -- bold (3) argument, flag=argument:gsub ("%'%'%'", ""); elseif argument:find ("''", 1, true) then -- italic (2) argument, flag = argument:gsub ("%'%'", ""); else break; end end return argument, flag; -- done end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr) cfg = cfg_table_ptr; end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { add_maint_cat = add_maint_cat, -- exported functions add_prop_cat = add_prop_cat, error_comment = error_comment, has_accept_as_written = has_accept_as_written, in_array = in_array, is_set = is_set, is_wikilink = is_wikilink, make_sep_list = make_sep_list, make_wikilink = make_wikilink, remove_wiki_link = remove_wiki_link, safe_for_italics = safe_for_italics, select_one = select_one, set_message = set_message, set_selected_modules = set_selected_modules, strip_apostrophe_markup = strip_apostrophe_markup, substitute = substitute, wrap_style = wrap_style, z = z, -- exported table } 12dopckfk6g95hjrotef4mkj3hq5uiw Modul:Citation/CS1/Whitelist 828 277 829 828 2024-08-09T09:21:29Z Jon Harald Søby 58 1 semakan diimportkan 828 Scribunto text/plain --[[--------------------------< S U P P O R T E D P A R A M E T E R S >-------------------------------------- Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported. remove entirely ]] local basic_arguments = { ['accessdate'] = true, ['access-date'] = true, ['agency'] = true, ['archivedate'] = true, ['archive-date'] = true, ['archive-format'] = true, ['archiveurl'] = true, ['archive-url'] = true, ['article'] = true, ['article-format'] = true, ['article-url'] = true, ['article-url-access'] = true, ['arxiv'] = true, -- cite arxiv; here because allowed in cite ... as identifier ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-given'] = true, ['author-last'] = true, ['author-surname'] = true, ['authorlink'] = true, ['author-link'] = true, ['author-mask'] = true, ['authors'] = true, ['bibcode'] = true, ['bibcode-access'] = true, ['biorxiv'] = true, -- cite biorxiv; here because allowed in cite ... as identifier ['booktitle'] = true, ['book-title'] = true, ['cartography'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapterurl'] = true, ['chapter-url'] = true, ['chapter-url-access'] = true, ['citeseerx'] = true, -- cite citeseerx; here because allowed in cite ... as identifier ['collaboration'] = true, ['conference'] = true, ['conference-format'] = true, ['conferenceurl'] = false, ['conference-url'] = true, ['contribution'] = true, ['contribution-format'] = true, ['contributionurl'] = false, ['contribution-url'] = true, ['contribution-url-access'] = true, ['contributor'] = true, ['contributor-first'] = true, ['contributor-given'] = true, ['contributor-last'] = true, ['contributor-surname'] = true, ['contributor-link'] = true, ['contributor-mask'] = true, ['date'] = true, ['degree'] = true, ['department'] = true, ['df'] = true, ['dictionary'] = true, ['display-authors'] = true, ['display-contributors'] = true, ['display-editors'] = true, ['display-interviewers'] = true, ['display-subjects'] = true, ['display-translators'] = true, ['docket'] = true, ['doi'] = true, ['DOI'] = true, ['doi-access'] = true, ['doi-broken-date'] = true, ['edition'] = true, ['editor'] = true, ['editor-first'] = true, ['editor-given'] = true, ['editor-last'] = true, ['editor-surname'] = true, ['editor-link'] = true, ['editor-mask'] = true, ['eissn'] = true, ['EISSN'] = true, ['encyclopaedia'] = true, ['encyclopedia'] = true, ['entry'] = true, ['entry-format'] = true, ['entry-url'] = true, ['entry-url-access'] = true, ['eprint'] = true, -- cite arxiv; here because allowed in cite ... as identifier ['event'] = true, -- synonym of conference in /Config, but used in Cite speech? ['first'] = true, ['format'] = true, ['given'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-access'] = true, ['host'] = true, ['id'] = true, ['ID'] = true, ['institution'] = true, ['interviewer'] = true, ['interviewer-first'] = true, ['interviewer-given'] = true, ['interviewer-last'] = true, ['interviewer-surname'] = true, ['interviewer-link'] = true, ['interviewer-mask'] = true, ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['issue'] = true, ['jfm'] = true, ['JFM'] = true, ['journal'] = true, ['jstor'] = true, ['JSTOR'] = true, ['jstor-access'] = true, ['lang'] = true, ['language'] = true, ['last'] = true, ['laydate'] = false, ['lay-date'] = true, ['laysource'] = false, ['lay-source'] = true, ['lay-format'] = true, ['layurl'] = false, ['lay-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['location'] = true, ['magazine'] = true, ['medium'] = true, ['minutes'] = true, ['mode'] = true, ['mr'] = true, ['MR'] = true, ['name-list-format'] = true, ['name-list-style'] = true, ['newspaper'] = true, ['nopp'] = true, ['no-pp'] = true, ['no-tracking'] = true, ['number'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-access'] = true, ['orig-date'] = true, ['origyear'] = true, ['orig-year'] = true, ['osti'] = true, ['OSTI'] = true, ['osti-access'] = true, ['others'] = true, ['p'] = true, ['page'] = true, ['pages'] = true, ['people'] = true, ['periodical'] = true, ['place'] = true, ['pmc'] = true, ['PMC'] = true, ['pmc-embargo-date'] = true, ['pmid'] = true, ['PMID'] = true, ['postscript'] = true, ['pp'] = true, ['publicationdate'] = true, ['publication-date'] = true, ['publicationplace'] = true, ['publication-place'] = true, ['publisher'] = true, ['quotation'] = true, ['quote'] = true, ['quote-page'] = true, ['quote-pages'] = true, ['ref'] = true, ['rfc'] = true, ['RFC'] = true, ['sbn'] = true, ['SBN'] = true, ['scale'] = true, ['script-article'] = true, ['script-chapter'] = true, ['script-contribution'] = true, ['script-entry'] = true, ['script-journal'] = true, ['script-magazine'] = true, ['script-newspaper'] = true, ['script-periodical'] = true, ['script-quote'] = true, ['script-section'] = true, ['script-title'] = true, ['script-website'] = true, ['script-work'] = true, ['season'] = true, ['section'] = true, ['section-format'] = true, ['sectionurl'] = false, ['section-url'] = true, ['section-url-access'] = true, ['series'] = true, ['serieslink'] = true, ['series-link'] = true, ['seriesno'] = false, ['series-no'] = true, ['series-number'] = true, ['ssrn'] = true, -- cite ssrn; these two here because allowed in cite ... as identifier ['SSRN'] = true, ['subject'] = true, ['subject-link'] = true, ['subject-mask'] = true, ['surname'] = true, ['s2cid'] = true, ['S2CID'] = true, ['s2cid-access'] = true, ['template-doc-demo'] = true, ['time'] = true, ['timecaption'] = false, ['time-caption'] = true, ['title'] = true, ['titlelink'] = false, ['title-link'] = true, ['translator'] = true, ['translator-first'] = true, ['translator-given'] = true, ['translator-last'] = true, ['translator-surname'] = true, ['translator-link'] = true, ['translator-mask'] = true, ['trans-article'] = true, ['trans-chapter'] = true, ['trans-contribution'] = true, ['trans-entry'] = true, ['trans-journal'] = true, ['trans-magazine'] = true, ['trans-newspaper'] = true, ['trans-periodical'] = true, ['trans-quote'] = true, ['trans-section'] = true, ['trans-title'] = true, ['trans-website'] = true, ['trans-work'] = true, ['type'] = true, ['url'] = true, ['URL'] = true, ['url-access'] = true, ['url-status'] = true, ['vauthors'] = true, ['veditors'] = true, ['version'] = true, ['via'] = true, ['volume'] = true, ['website'] = true, ['work'] = true, ['year'] = true, ['zbl'] = true, ['ZBL'] = true, } local numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-given#'] = true, ['author#-given'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-surname#'] = true, ['author#-surname'] = true, ['author-link#'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author#link'] = true, ['author-mask#'] = true, ['author#-mask'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor#-first'] = true, ['contributor-given#'] = true, ['contributor#-given'] = true, ['contributor-last#'] = true, ['contributor#-last'] = true, ['contributor-surname#'] = true, ['contributor#-surname'] = true, ['contributor-link#'] = true, ['contributor#-link'] = true, ['contributor-mask#'] = true, ['contributor#-mask'] = true, ['editor#'] = true, ['editor-first#'] = true, ['editor#-first'] = true, ['editor-given#'] = true, ['editor#-given'] = true, ['editor-last#'] = true, ['editor#-last'] = true, ['editor-surname#'] = true, ['editor#-surname'] = true, ['editor-link#'] = true, ['editor#-link'] = true, ['editor-mask#'] = true, ['editor#-mask'] = true, ['first#'] = true, ['given#'] = true, ['host#'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer#-first'] = true, ['interviewer-given#'] = true, ['interviewer#-given'] = true, ['interviewer-last#'] = true, ['interviewer#-last'] = true, ['interviewer-surname#'] = true, ['interviewer#-surname'] = true, ['interviewer-link#'] = true, ['interviewer#-link'] = true, ['interviewer-mask#'] = true, ['interviewer#-mask'] = true, ['last#'] = true, ['subject#'] = true, ['subject-link#'] = true, ['subject#-link'] = true, ['subject-mask#'] = true, ['subject#-mask'] = true, ['surname#'] = true, ['translator#'] = true, ['translator-first#'] = true, ['translator#-first'] = true, ['translator-given#'] = true, ['translator#-given'] = true, ['translator-last#'] = true, ['translator#-last'] = true, ['translator-surname#'] = true, ['translator#-surname'] = true, ['translator-link#'] = true, ['translator#-link'] = true, ['translator-mask#'] = true, ['translator#-mask'] = true, } --[[--------------------------< P R E P R I N T S U P P O R T E D P A R A M E T E R S >-------------------- Cite arXiv, cite biorxiv, cite citeseerx, and cite ssrn are preprint templates that use the limited set of parameters defined in the limited_basic_arguments and limited_numbered_arguments tables. Those lists are supplemented with a template-specific list of parameters that are required by the particular template and may be exclusive to one of the preprint templates. Some of these parameters may also be available to the general cs1|2 templates. Same conventions for true/false/nil as above. ]] local preprint_arguments = { arxiv = { ['arxiv'] = true, -- cite arxiv and arxiv identifiers ['class'] = true, ['eprint'] = true, -- cite arxiv and arxiv identifiers }, biorxiv = { ['biorxiv'] = true, }, citeseerx = { ['citeseerx'] = true, }, ssrn = { ['ssrn'] = true, ['SSRN'] = true, }, } --[[--------------------------< 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 Same conventions for true/false/nil as above. ]] local limited_basic_arguments = { ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-given'] = true, ['author-last'] = true, ['author-surname'] = true, ['author-link'] = true, ['authorlink'] = true, ['author-mask'] = true, ['authors'] = true, ['collaboration'] = true, ['date'] = true, ['df'] = true, ['display-authors'] = true, ['first'] = true, ['given'] = true, ['language'] = true, ['last'] = true, ['mode'] = true, ['name-list-format'] = true, ['name-list-style'] = true, ['no-tracking'] = true, ['p'] = true, ['page'] = true, ['pages'] = true, ['postscript'] = true, ['pp'] = true, ['quotation'] = true, ['quote'] = true, ['ref'] = true, ['surname'] = true, ['template-doc-demo'] = true, ['title'] = true, ['trans-title'] = true, ['url'] = true, ['URL'] = true, ['vauthors'] = true, ['year'] = true, } local limited_numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-given#'] = true, ['author#-given'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-surname#'] = true, ['author#-surname'] = true, ['author-link#'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author#link'] = true, ['author-mask#'] = true, ['author#-mask'] = true, ['first#'] = true, ['given#'] = true, ['last#'] = true, ['surname#'] = true, } --[[--------------------------< U N I Q U E _ A R G U M E N T S >---------------------------------------------- Some templates have unique parameters. Those templates and their unique parameters are listed here. Keys in this table are the template's CitationClass parameter value Same conventions for true/false/nil as above. ]] local unique_arguments = { ['audio-visual'] = { ['transcript'] = true, ['transcript-format'] = true, ['transcripturl'] = true, ['transcript-url'] = true, }, episode = { ['airdate'] = true, ['air-date'] = true, ['credits'] = true, ['episodelink'] = true, -- alias of |title-link= ['episode-link'] = true, -- alias of |title-link= ['network'] = true, ['station'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcripturl'] = true, ['transcript-url'] = true, }, mailinglist = { ['mailinglist'] = true, ['mailing-list'] = true, }, map = { ['inset'] = true, ['map'] = true, ['map-format'] = true, ['mapurl'] = true, ['map-url'] = true, ['map-url-access'] = true, ['script-map'] = true, ['sections'] = true, ['sheet'] = true, ['sheets'] = true, ['trans-map'] = true, }, newsgroup = { ['message-id'] = true, ['newsgroup'] = true, }, serial = { ['airdate'] = true, ['air-date'] = true, ['credits'] = true, ['episode'] = true, -- cite serial only TODO: make available to cite episode? ['episodelink'] = true, -- aliases of |title-link= ['episode-link'] = true, ['network'] = true, ['station'] = true, }, } --[[--------------------------< T E M P L A T E _ L I S T _ G E T >-------------------------------------------- gets a list of the templates from table t ]] local function template_list_get (t) local out = {}; -- a table for output for k, _ in pairs (t) do -- spin through the table and collect the keys table.insert (out, k) -- add each key to the output table end return out; -- and done end --[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------ ]] return { basic_arguments = basic_arguments, numbered_arguments = numbered_arguments, limited_basic_arguments = limited_basic_arguments, limited_numbered_arguments = limited_numbered_arguments, preprint_arguments = preprint_arguments, preprint_template_list = template_list_get (preprint_arguments), -- make a template list from preprint_arguments{} table unique_arguments = unique_arguments, unique_param_template_list = template_list_get (unique_arguments), -- make a template list from unique_arguments{} table }; me86q0rauh6lh0hgmc4j4or9ab0b0pb Modul:Citation/CS1/styles.css 828 278 831 830 2024-08-09T09:21:29Z Jon Harald Søby 58 1 semakan diimportkan 830 sanitized-css text/css /* Protection icon the following line controls the page-protection icon in the upper right corner it must remain within this comment {{sandbox other||{{pp-template}}}} */ /* Overrides Some wikis do not override user agent default styles for HTML <cite> and <q>, unlike en.wp. On en.wp, keep these the same as [[MediaWiki:Common.css]] */ cite.citation { font-style: inherit; /* Remove italics for <cite> */ } .citation q { quotes: '"' '"' "'" "'"; /* Straight quote marks for <q> */ } /* ID and URL access Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon. the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}} */ .id-lock-free a, .citation .cs1-lock-free a { background: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg) right 0.1em center/9px no-repeat; } .id-lock-limited a, .id-lock-registration a, .citation .cs1-lock-limited a, .citation .cs1-lock-registration a { background: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg) right 0.1em center/9px no-repeat; } .id-lock-subscription a, .citation .cs1-lock-subscription a { background: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg) right 0.1em center/9px no-repeat; } .cs1-subscription, .cs1-registration { color: #555; } .cs1-subscription span, .cs1-registration span { border-bottom: 1px dotted; cursor: help; } /* Wikisource Wikisource icon when |chapter= or |title= is wikilinked to Wikisource as in cite wikisource */ .cs1-ws-icon a { background: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg) right 0.1em center/12px no-repeat; } /* Errors and maintenance */ code.cs1-code { /* <code>...</code> style override: mediawiki's css definition is specified here: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/ 69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 */ color: inherit; background: inherit; border: none; /* this maybe can be inherit. MDN says yes, code editor says no */ padding: inherit; } .cs1-hidden-error { display: none; font-size: 100%; } .cs1-visible-error { font-size: 100%; } .cs1-maint { display: none; color: #33aa33; margin-left: 0.3em; } /* Small text size Set small text size in one place. 0.95 (here) * 0.9 (from references list) is ~0.85, which is the lower bound for size for accessibility. Old styling for this was just 0.85. We could write the rule so that when this template is inside references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */ .cs1-format { font-size: 95%; } /* kerning */ .cs1-kern-left, .cs1-kern-wl-left { padding-left: 0.2em; } .cs1-kern-right, .cs1-kern-wl-right { padding-right: 0.2em; } /* selflinks – avoid bold font style when cs1|2 template links to the current page */ .citation .mw-selflink { font-weight: inherit; } oaoi1bld4zu2dgneb2yaj11tyyqa6vc Modul:Collapsible list 828 279 833 832 2024-08-09T09:21:30Z Jon Harald Søby 58 1 semakan diimportkan 832 Scribunto text/plain local p = {} local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end -- TODO: use Module:List. Since the update for this comment is routine, -- this is blocked without a consensus discussion by -- [[MediaWiki_talk:Common.css/Archive_15#plainlist_+_hlist_indentation]] -- if we decide hlist in plainlist in this template isn't an issue, we can use -- module:list directly -- [https://en.wikipedia.org/w/index.php?title=Module:Collapsible_list/sandbox&oldid=1130172480] -- is an implementation (that will code rot slightly I expect) local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'collapsible-list', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', -- mostly work around .infobox-full-data defaulting to centered 'text-align: left;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'margin-top: 0; margin-bottom: 0; line-height: inherit;', not args.bullets and 'list-style: none; margin-left: 0;', args.list_style, args.liststyle ) local hlist_templatestyles = '' if args.hlist then hlist_templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } end -- Build the list. return mw.ustring.format( '%s<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', hlist_templatestyles, collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p aor0zrsrdpmo5yznpv21ln76lm7v3zx Modul:Color contrast 828 280 835 834 2024-08-09T09:21:30Z Jon Harald Søby 58 1 semakan diimportkan 834 Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 3j3oaih63ygo9p806h5yxpscaqh3xu9 Modul:Color contrast/colors 828 281 837 836 2024-08-09T09:21:30Z Jon Harald Søby 58 1 semakan diimportkan 836 Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } chi69ar1btd4wp6xbk3uez6sfu0vipn Modul:Convert 828 282 839 838 2024-08-09T09:21:30Z Jon Harald Søby 58 1 semakan diimportkan 838 Scribunto text/plain -- Convert a value from one unit of measurement to another. -- Example: {{convert|123|lb|kg}} --> 123 pounds (56 kg) -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. local MINUS = '−' -- Unicode U+2212 MINUS SIGN (UTF-8: e2 88 92) local abs = math.abs local floor = math.floor local format = string.format local log10 = math.log10 local ustring = mw.ustring local ulen = ustring.len local usub = ustring.sub -- Configuration options to keep magic values in one location. -- Conversion data and message text are defined in separate modules. local config, maxsigfig local numdot -- must be '.' or ',' or a character which works in a regex local numsep, numsep_remove, numsep_remove2 local data_code, all_units local text_code local varname -- can be a code to use variable names that depend on value local from_en_table -- to translate an output string of en digits to local language local to_en_table -- to translate an input string of digits in local language to en -- Use translation_table in convert/text to change the following. local en_default -- true uses lang=en unless convert has lang=local or local digits local group_method = 3 -- code for how many digits are in a group local per_word = 'per' -- for units like "liters per kilometer" local plural_suffix = 's' -- only other useful value is probably '' to disable plural unit names local omitsep -- true to omit separator before local symbol/name -- All units should be defined in the data module. However, to cater for quick changes -- and experiments, any unknown unit is looked up in an extra data module, if it exists. -- That module would be transcluded in only a small number of pages, so there should be -- little server overhead from making changes, and changes should propagate quickly. local extra_module -- name of module with extra units local extra_units -- nil or table of extra units from extra_module -- Some options in the invoking template can set variables used later in the module. local currency_text -- for a user-defined currency symbol: {{convert|12|$/ha|$=€}} (euro replaces dollar) local function from_en(text) -- Input is a string representing a number in en digits with '.' decimal mark, -- without digit grouping (which is done just after calling this). -- Return the translation of the string with numdot and digits in local language. if numdot ~= '.' then text = text:gsub('%.', numdot) end if from_en_table then text = text:gsub('%d', from_en_table) end return text end local function to_en(text) -- Input is a string representing a number in the local language with -- an optional numdot decimal mark and numsep digit grouping. -- Return the translation of the string with '.' mark and en digits, -- and no separators (they have to be removed here to handle cases like -- numsep = '.' and numdot = ',' with input "1.234.567,8"). if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end return text end local function decimal_mark(text) -- Return ',' if text probably is using comma for decimal mark, or has no decimal mark. -- Return '.' if text probably is using dot for decimal mark. -- Otherwise return nothing (decimal mark not known). if not text:find('[.,]') then return ',' end text = text:gsub('^%-', ''):gsub('%+%d+/%d+$', ''):gsub('[Ee]%-?%d+$', '') local decimal = text:match('^0?([.,])%d+$') or text:match('%d([.,])%d?%d?$') or text:match('%d([.,])%d%d%d%d+$') if decimal then return decimal end if text:match('%.%d+%.') then return ',' end if text:match('%,%d+,') then return '.' end end local add_warning, with_separator -- forward declarations local function to_en_with_check(text, parms) -- Version of to_en() for a wiki using numdot = ',' and numsep = '.' to check -- text (an input number as a string) which might have been copied from enwiki. -- For example, in '1.234' the '.' could be a decimal mark or a group separator. -- From viwiki. if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if decimal_mark(text) == '.' then local original = text text = text:gsub(',', '') -- for example, interpret "1,234.5" as an enwiki value if parms then add_warning(parms, 0, 'cvt_enwiki_num', original, with_separator({}, text)) end else if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end end return text end local function omit_separator(id) -- Return true if there should be no separator before id (a unit symbol or name). -- For zhwiki, there should be no separator if id uses local characters. -- The following kludge should be a sufficient test. if omitsep then if id:sub(1, 2) == '-{' then -- for "-{...}-" content language variant return true end if id:byte() > 127 then local first = usub(id, 1, 1) if first ~= 'Å' and first ~= '°' and first ~= 'µ' then return true end end end return id:sub(1, 1) == '/' -- no separator before units like "/ha" end local spell_module -- name of module that can spell numbers local speller -- function from that module to handle spelling (set if needed) local wikidata_module, wikidata_data_module -- names of Wikidata modules local wikidata_code, wikidata_data -- exported tables from those modules (set if needed) local function set_config(args) -- Set configuration options from template #invoke or defaults. config = args maxsigfig = config.maxsigfig or 14 -- maximum number of significant figures local data_module, text_module local sandbox = config.sandbox and ('/' .. config.sandbox) or '' data_module = "Module:Convert/data" .. sandbox text_module = "Module:Convert/text" .. sandbox extra_module = "Module:Convert/extra" .. sandbox wikidata_module = "Module:Convert/wikidata" .. sandbox wikidata_data_module = "Module:Convert/wikidata/data" .. sandbox spell_module = "Module:ConvertNumeric" data_code = mw.loadData(data_module) text_code = mw.loadData(text_module) all_units = data_code.all_units local translation = text_code.translation_table if translation then numdot = translation.numdot numsep = translation.numsep if numdot == ',' and numsep == '.' then if text_code.all_messages.cvt_enwiki_num then to_en = to_en_with_check end end if translation.group then group_method = translation.group end if translation.per_word then per_word = translation.per_word end if translation.plural_suffix then plural_suffix = translation.plural_suffix end varname = translation.varname from_en_table = translation.from_en local use_workaround = true if use_workaround then -- 2013-07-05 workaround bug by making a copy of the required table. -- mw.ustring.gsub fails with a table (to_en_table) as the replacement, -- if the table is accessed via mw.loadData. local source = translation.to_en if source then to_en_table = {} for k, v in pairs(source) do to_en_table[k] = v end end else to_en_table = translation.to_en end if translation.lang == 'en default' then en_default = true -- for hiwiki end omitsep = translation.omitsep -- for zhwiki end numdot = config.numdot or numdot or '.' -- decimal mark before fractional digits numsep = config.numsep or numsep or ',' -- group separator for numbers -- numsep should be ',' or '.' or '' or '&nbsp;' or a Unicode character. -- numsep_remove must work in a regex to identify separators to be removed. if numsep ~= '' then numsep_remove = (numsep == '.') and '%.' or numsep end if numsep ~= ',' and numdot ~= ',' then numsep_remove2 = ',' -- so numbers copied from enwiki will work end end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, } end local function divide(numerator, denominator) -- Return integers quotient, remainder resulting from dividing the two -- given numbers, which should be unsigned integers. local quotient, remainder = floor(numerator / denominator), numerator % denominator if not (0 <= remainder and remainder < denominator) then -- Floating point limits may need this, as in {{convert|160.02|Ym|ydftin}}. remainder = 0 end return quotient, remainder end local function split(text, delimiter) -- Return a numbered table with fields from splitting text. -- The delimiter is used in a regex without escaping (for example, '.' would fail). -- Each field has any leading/trailing whitespace removed. local t = {} text = text .. delimiter -- to get last item for item in text:gmatch('%s*(.-)%s*' .. delimiter) do table.insert(t, item) end return t end local function strip(text) -- If text is a string, return its content with no leading/trailing -- whitespace. Otherwise return nil (a nil argument gives a nil result). if type(text) == 'string' then return text:match("^%s*(.-)%s*$") end end local function table_len(t) -- Return length (<100) of a numbered table to replace #t which is -- documented to not work if t is accessed via mw.loadData(). for i = 1, 100 do if t[i] == nil then return i - 1 end end end local function wanted_category(catkey, catsort, want_warning) -- Return message category if it is wanted in current namespace, -- otherwise return ''. local cat local title = mw.title.getCurrentTitle() if title then local nsdefault = '0' -- default namespace: '0' = article; '0,10' = article and template local namespace = title.namespace for _, v in ipairs(split(config.nscat or nsdefault, ',')) do if namespace == tonumber(v) then cat = text_code.all_categories[want_warning and 'warning' or catkey] if catsort and catsort ~= '' and cat:sub(-2) == ']]' then cat = cat:sub(1, -3) .. '|' .. mw.text.nowiki(usub(catsort, 1, 20)) .. ']]' end break end end end return cat or '' end local function message(parms, mcode, is_warning) -- Return wikitext for an error message, including category if specified -- for the message type. -- mcode = numbered table specifying the message: -- mcode[1] = 'cvt_xxx' (string used as a key to get message info) -- mcode[2] = 'parm1' (string to replace '$1' if any in message) -- mcode[3] = 'parm2' (string to replace '$2' if any in message) -- mcode[4] = 'parm3' (string to replace '$3' if any in message) local msg if type(mcode) == 'table' then if mcode[1] == 'cvt_no_output' then -- Some errors should cause convert to output an empty string, -- for example, for an optional field in an infobox. return '' end msg = text_code.all_messages[mcode[1]] end parms.have_problem = true local function subparm(fmt, ...) local rep = {} for i, v in ipairs({...}) do rep['$' .. i] = v end return (fmt:gsub('$%d+', rep)) end if msg then local parts = {} local regex, replace = msg.regex, msg.replace for i = 1, 3 do local limit = 40 local s = mcode[i + 1] if s then if regex and replace then s = s:gsub(regex, replace) limit = nil -- allow long "should be" messages end -- Escape user input so it does not break the message. -- To avoid tags (like {{convert|1<math>23</math>|m}}) breaking -- the mouseover title, any strip marker starting with char(127) is -- replaced with '...' (text not needing i18n). local append local pos = s:find(string.char(127), 1, true) if pos then append = '...' s = s:sub(1, pos - 1) end if limit and ulen(s) > limit then s = usub(s, 1, limit) append = '...' end s = mw.text.nowiki(s) .. (append or '') else s = '?' end parts['$' .. i] = s end local function ispreview() -- Return true if a prominent message should be shown. if parms.test == 'preview' or parms.test == 'nopreview' then -- For testing, can preview a real message or simulate a preview -- when running automated tests. return parms.test == 'preview' end local success, revid = pcall(function () return (parms.frame):preprocess('{{REVISIONID}}') end) return success and (revid == '') end local want_warning = is_warning and not config.warnings and -- show unobtrusive warnings if config.warnings not configured not msg.nowarn -- but use msg settings, not standard warning, if specified local title = string.gsub(msg[1] or 'Missing message', '$%d+', parts) local text = want_warning and '*' or msg[2] or 'Missing message' local cat = wanted_category(msg[3], mcode[2], want_warning) local anchor = msg[4] or '' local fmtkey = ispreview() and 'cvt_format_preview' or (want_warning and 'cvt_format2' or msg.format or 'cvt_format') local fmt = text_code.all_messages[fmtkey] or 'convert: bug' return subparm(fmt, title:gsub('"', '&quot;'), text, cat, anchor) end return 'Convert internal error: unknown message' end function add_warning(parms, level, key, text1, text2) -- for forward declaration above -- If enabled, add a warning that will be displayed after the convert result. -- A higher level is more verbose: more kinds of warnings are displayed. -- To reduce output noise, only the first warning is displayed. if level <= (tonumber(config.warnings) or 1) then if parms.warnings == nil then parms.warnings = message(parms, { key, text1, text2 }, true) end end end local function spell_number(parms, inout, number, numerator, denominator) -- Return result of spelling (number, numerator, denominator), or -- return nil if spelling is not available or not supported for given text. -- Examples (each value must be a string or nil): -- number numerator denominator output -- ------ --------- ----------- ------------------- -- "1.23" nil nil one point two three -- "1" "2" "3" one and two thirds -- nil "2" "3" two thirds if not speller then local function get_speller(module) return require(module).spell_number end local success success, speller = pcall(get_speller, spell_module) if not success or type(speller) ~= 'function' then add_warning(parms, 1, 'cvt_no_spell', 'spell') return nil end end local case if parms.spell_upper == inout then case = true parms.spell_upper = nil -- only uppercase first word in a multiple unit end local sp = not parms.opt_sp_us local adj = parms.opt_adjectival return speller(number, numerator, denominator, case, sp, adj) end ------------------------------------------------------------------------ -- BEGIN: Code required only for built-in units. -- LATER: If need much more code, move to another module to simplify this module. local function speed_of_sound(altitude) -- This is for the Mach built-in unit of speed. -- Return speed of sound in metres per second at given altitude in feet. -- If no altitude given, use default (zero altitude = sea level). -- Table gives speed of sound in miles per hour at various altitudes: -- altitude = -17,499 to 402,499 feet -- mach_table[a + 4] = s where -- a = (altitude / 5000) rounded to nearest integer (-3 to 80) -- s = speed of sound (mph) at that altitude -- LATER: Should calculate result from an interpolation between the next -- lower and higher altitudes in table, rather than rounding to nearest. -- From: http://www.aerospaceweb.org/question/atmosphere/q0112.shtml local mach_table = { -- a = 799.5, 787.0, 774.2, 761.207051, -- -3 to 0 748.0, 734.6, 721.0, 707.0, 692.8, 678.3, 663.5, 660.1, 660.1, 660.1, -- 1 to 10 660.1, 660.1, 660.1, 662.0, 664.3, 666.5, 668.9, 671.1, 673.4, 675.6, -- 11 to 20 677.9, 683.7, 689.9, 696.0, 702.1, 708.1, 714.0, 719.9, 725.8, 731.6, -- 21 to 30 737.3, 737.7, 737.7, 736.2, 730.5, 724.6, 718.8, 712.9, 707.0, 701.0, -- 31 to 40 695.0, 688.9, 682.8, 676.6, 670.4, 664.1, 657.8, 652.9, 648.3, 643.7, -- 41 to 50 639.1, 634.4, 629.6, 624.8, 620.0, 615.2, 613.2, 613.2, 613.2, 613.5, -- 51 to 60 614.4, 615.3, 616.7, 619.8, 623.4, 629.7, 635.0, 641.1, 650.6, 660.0, -- 61 to 70 672.5, 674.3, 676.1, 677.9, 679.7, 681.5, 683.3, 685.1, 686.8, 688.6, -- 71 to 80 } altitude = altitude or 0 local a = (altitude < 0) and -altitude or altitude a = floor(a / 5000 + 0.5) if altitude < 0 then a = -a end if a < -3 then a = -3 elseif a > 80 then a = 80 end return mach_table[a + 4] * 0.44704 -- mph converted to m/s end -- END: Code required only for built-in units. ------------------------------------------------------------------------ local function add_style(parms, class) -- Add selected template style to parms if not already present. parms.templatestyles = parms.templatestyles or {} if not parms.templatestyles[class] then parms.templatestyles[class] = parms.frame:extensionTag({ name = 'templatestyles', args = { src = text_code.titles[class] } }) end end local function get_styles(parms) -- Return string of required template styles, empty if none. if parms.templatestyles then local t = {} for _, v in pairs(parms.templatestyles) do table.insert(t, v) end return table.concat(t) end return '' end local function get_range(word) -- Return a range (string or table) corresponding to word (like "to"), -- or return nil if not a range word. local ranges = text_code.ranges return ranges.types[word] or ranges.types[ranges.aliases[word]] end local function check_mismatch(unit1, unit2) -- If unit1 cannot be converted to unit2, return an error message table. -- This allows conversion between units of the same type, and between -- Nm (normally torque) and ftlb (energy), as in gun-related articles. -- This works because Nm is the base unit (scale = 1) for both the -- primary type (torque), and the alternate type (energy, where Nm = J). -- A match occurs if the primary types are the same, or if unit1 matches -- the alternate type of unit2, and vice versa. That provides a whitelist -- of which conversions are permitted between normally incompatible types. if unit1.utype == unit2.utype or (unit1.utype == unit2.alttype and unit1.alttype == unit2.utype) then return nil end return { 'cvt_mismatch', unit1.utype, unit2.utype } end local function override_from(out_table, in_table, fields) -- Copy the specified fields from in_table to out_table, but do not -- copy nil fields (keep any corresponding field in out_table). for _, field in ipairs(fields) do if in_table[field] then out_table[field] = in_table[field] end end end local function shallow_copy(t) -- Return a shallow copy of table t. -- Do not need the features and overhead of the Scribunto mw.clone(). local result = {} for k, v in pairs(t) do result[k] = v end return result end local unit_mt = { -- Metatable to get missing values for a unit that does not accept SI prefixes. -- Warning: The boolean value 'false' is returned for any missing field -- so __index is not called twice for the same field in a given unit. __index = function (self, key) local value if key == 'name1' or key == 'sym_us' then value = self.symbol elseif key == 'name2' then value = self.name1 .. plural_suffix elseif key == 'name1_us' then value = self.name1 if not rawget(self, 'name2_us') then -- If name1_us is 'foot', do not make name2_us by appending plural_suffix. self.name2_us = self.name2 end elseif key == 'name2_us' then local raw1_us = rawget(self, 'name1_us') if raw1_us then value = raw1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local function prefixed_name(unit, name, index) -- Return unit name with SI prefix inserted at correct position. -- index = 1 (name1), 2 (name2), 3 (name1_us), 4 (name2_us). -- The position is a byte (not character) index, so use Lua's sub(). local pos = rawget(unit, 'prefix_position') if type(pos) == 'string' then pos = tonumber(split(pos, ',')[index]) end if pos then return name:sub(1, pos - 1) .. unit.si_name .. name:sub(pos) end return unit.si_name .. name end local unit_prefixed_mt = { -- Metatable to get missing values for a unit that accepts SI prefixes. -- Before use, fields si_name, si_prefix must be defined. -- The unit must define _symbol, _name1 and -- may define _sym_us, _name1_us, _name2_us -- (_sym_us, _name2_us may be defined for a language using sp=us -- to refer to a variant unrelated to U.S. units). __index = function (self, key) local value if key == 'symbol' then value = self.si_prefix .. self._symbol if value == 'l' then value = 'L' end elseif key == 'sym_us' then value = rawget(self, '_sym_us') if value then value = self.si_prefix .. value else value = self.symbol end elseif key == 'name1' then value = prefixed_name(self, self._name1, 1) elseif key == 'name2' then value = rawget(self, '_name2') if value then value = prefixed_name(self, value, 2) else value = self.name1 .. plural_suffix end elseif key == 'name1_us' then value = rawget(self, '_name1_us') if value then value = prefixed_name(self, value, 3) else value = self.name1 end elseif key == 'name2_us' then value = rawget(self, '_name2_us') if value then value = prefixed_name(self, value, 4) elseif rawget(self, '_name1_us') then value = self.name1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local unit_per_mt = { -- Metatable to get values for a per unit of form "x/y". -- This is never called to determine a unit name or link because per units -- are handled as a special case. -- Similarly, the default output is handled elsewhere, and for a symbol -- this is only called from get_default() for default_exceptions. __index = function (self, key) local value if key == 'symbol' then local per = self.per local unit1, unit2 = per[1], per[2] if unit1 then value = unit1[key] .. '/' .. unit2[key] else value = '/' .. unit2[key] end elseif key == 'sym_us' then value = self.symbol elseif key == 'scale' then local per = self.per local unit1, unit2 = per[1], per[2] value = (unit1 and unit1.scale or 1) * self.scalemultiplier / unit2.scale else value = false end rawset(self, key, value) return value end } local function make_per(unitcode, unit_table, ulookup) -- Return true, t where t is a per unit with unit codes expanded to unit tables, -- or return false, t where t is an error message table. local result = { unitcode = unitcode, utype = unit_table.utype, per = {} } override_from(result, unit_table, { 'invert', 'iscomplex', 'default', 'link', 'symbol', 'symlink' }) result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation local prefix for i, v in ipairs(unit_table.per) do if i == 1 and v == '' then -- First unit symbol can be empty; that gives a nil first unit table. elseif i == 1 and text_code.currency[v] then prefix = currency_text or v else local success, t = ulookup(v) if not success then return false, t end result.per[i] = t end end local multiplier = unit_table.multiplier if not result.utype then -- Creating an automatic per unit. local unit1 = result.per[1] local utype = (unit1 and unit1.utype or prefix or '') .. '/' .. result.per[2].utype local t = data_code.per_unit_fixups[utype] if t then if type(t) == 'table' then utype = t.utype or utype result.link = result.link or t.link multiplier = multiplier or t.multiplier else utype = t end end result.utype = utype end result.scalemultiplier = multiplier or 1 result.vprefix = prefix or false -- set to non-nil to avoid calling __index return true, setmetatable(result, unit_per_mt) end local function lookup(parms, unitcode, what, utable, fails, depth) -- Return true, t where t is a copy of the unit's converter table, -- or return false, t where t is an error message table. -- Parameter 'what' determines whether combination units are accepted: -- 'no_combination' : single unit only -- 'any_combination' : single unit or combination or output multiple -- 'only_multiple' : single unit or output multiple only -- Parameter unitcode is a symbol (like 'g'), with an optional SI prefix (like 'kg'). -- If, for example, 'kg' is in this table, that entry is used; -- otherwise the prefix ('k') is applied to the base unit ('g'). -- If unitcode is a known combination code (and if allowed by what), -- a table of output multiple unit tables is included in the result. -- For compatibility with the old template, an underscore in a unitcode is -- replaced with a space so usage like {{convert|350|board_feet}} works. -- Wikignomes may also put two spaces or "&nbsp;" in combinations, so -- replace underscore, "&nbsp;", and multiple spaces with a single space. utable = utable or parms.unittable or all_units fails = fails or {} depth = depth and depth + 1 or 1 if depth > 9 then -- There are ways to mistakenly define units which result in infinite -- recursion when lookup() is called. That gives a long delay and very -- confusing error messages, so the depth parameter is used as a guard. return false, { 'cvt_lookup', unitcode } end if unitcode == nil or unitcode == '' then return false, { 'cvt_no_unit' } end unitcode = unitcode:gsub('_', ' '):gsub('&nbsp;', ' '):gsub(' +', ' ') local function call_make_per(t) return make_per(unitcode, t, function (ucode) return lookup(parms, ucode, 'no_combination', utable, fails, depth) end ) end local t = utable[unitcode] if t then if t.shouldbe then return false, { 'cvt_should_be', t.shouldbe } end if t.sp_us then parms.opt_sp_us = true end local target = t.target -- nil, or unitcode is an alias for this target if target then local success, result = lookup(parms, target, what, utable, fails, depth) if not success then return false, result end override_from(result, t, { 'customary', 'default', 'link', 'symbol', 'symlink' }) local multiplier = t.multiplier if multiplier then result.multiplier = tostring(multiplier) result.scale = result.scale * multiplier end return true, result end if t.per then return call_make_per(t) end local combo = t.combination -- nil or a table of unitcodes if combo then local multiple = t.multiple if what == 'no_combination' or (what == 'only_multiple' and not multiple) then return false, { 'cvt_bad_unit', unitcode } end -- Recursively create a combination table containing the -- converter table of each unitcode. local result = { utype = t.utype, multiple = multiple, combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, multiple and 'no_combination' or 'only_multiple', utable, fails, depth) if not success then return false, t end cvt[i] = t end return true, result end local result = shallow_copy(t) result.unitcode = unitcode if result.prefixes then result.si_name = '' result.si_prefix = '' return true, setmetatable(result, unit_prefixed_mt) end return true, setmetatable(result, unit_mt) end local SIprefixes = text_code.SIprefixes for plen = SIprefixes[1] or 2, 1, -1 do -- Look for an SI prefix; should never occur with an alias. -- Check for longer prefix first ('dam' is decametre). -- SIprefixes[1] = prefix maximum #characters (as seen by mw.ustring.sub). local prefix = usub(unitcode, 1, plen) local si = SIprefixes[prefix] if si then local t = utable[usub(unitcode, plen+1)] if t and t.prefixes then local result = shallow_copy(t) result.unitcode = unitcode result.si_name = parms.opt_sp_us and si.name_us or si.name result.si_prefix = si.prefix or prefix result.scale = t.scale * 10 ^ (si.exponent * t.prefixes) return true, setmetatable(result, unit_prefixed_mt) end end end -- Accept user-defined combinations like "acre+m2+ha" or "acre m2 ha" for output. -- If '+' is used, each unit code can include a space, and any error is fatal. -- If ' ' is used and if each space-separated word is a unit code, it is a combo, -- but errors are not fatal so the unit code can be looked up as an extra unit. local err_is_fatal local combo = collection() if unitcode:find('+', 1, true) then err_is_fatal = true for item in (unitcode .. '+'):gmatch('%s*(.-)%s*%+') do if item ~= '' then combo:add(item) end end elseif unitcode:find('%s') then for item in unitcode:gmatch('%S+') do combo:add(item) end end if combo.n > 1 then local function lookup_combo() if what == 'no_combination' or what == 'only_multiple' then return false, { 'cvt_bad_unit', unitcode } end local result = { combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, 'only_multiple', utable, fails, depth) if not success then return false, t end if i == 1 then result.utype = t.utype else local mismatch = check_mismatch(result, t) if mismatch then return false, mismatch end end cvt[i] = t end return true, result end local success, result = lookup_combo() if success or err_is_fatal then return success, result end end -- Accept any unit with an engineering notation prefix like "e6cuft" -- (million cubic feet), but not chained prefixes like "e3e6cuft", -- and not if the unit is a combination or multiple, -- and not if the unit has an offset or is a built-in. -- Only en digits are accepted. local exponent, baseunit = unitcode:match('^e(%d+)(.*)') if exponent then local engscale = text_code.eng_scales[exponent] if engscale then local success, result = lookup(parms, baseunit, 'no_combination', utable, fails, depth) if success and not (result.offset or result.builtin or result.engscale) then result.unitcode = unitcode -- 'e6cuft' not 'cuft' result.defkey = unitcode -- key to lookup default exception result.engscale = engscale result.scale = result.scale * 10 ^ tonumber(exponent) return true, result end end end -- Look for x/y; split on right-most slash to get scale correct (x/y/z is x/y per z). local top, bottom = unitcode:match('^(.-)/([^/]+)$') if top and not unitcode:find('e%d') then -- If valid, create an automatic per unit for an "x/y" unit code. -- The unitcode must not include extraneous spaces. -- Engineering notation (apart from at start and which has been stripped before here), -- is not supported so do not make a per unit if find text like 'e3' in unitcode. local success, result = call_make_per({ per = {top, bottom} }) if success then return true, result end end if not parms.opt_ignore_error and not get_range(unitcode) then -- Want the "what links here" list for the extra_module to show only cases -- where an extra unit is used, so do not require it if invoked from {{val}} -- or if looking up a range word which cannot be a unit. if not extra_units then local success, extra = pcall(function () return require(extra_module).extra_units end) if success and type(extra) == 'table' then extra_units = extra end end if extra_units then -- A unit in one data table might refer to a unit in the other table, so -- switch between them, relying on fails or depth to terminate loops. if not fails[unitcode] then fails[unitcode] = true local other = (utable == all_units) and extra_units or all_units local success, result = lookup(parms, unitcode, what, other, fails, depth) if success then return true, result end end end end if to_en_table then -- At fawiki it is common to translate all digits so a unit like "km2" becomes "km۲". local en_code = ustring.gsub(unitcode, '%d', to_en_table) if en_code ~= unitcode then return lookup(parms, en_code, what, utable, fails, depth) end end return false, { 'cvt_unknown', unitcode } end local function valid_number(num) -- Return true if num is a valid number. -- In Scribunto (different from some standard Lua), when expressed as a string, -- overflow or other problems are indicated with text like "inf" or "nan" -- which are regarded as invalid here (each contains "n"). if type(num) == 'number' and tostring(num):find('n', 1, true) == nil then return true end end local function hyphenated(name, parts) -- Return a hyphenated form of given name (for adjectival usage). -- The name may be linked and the target of the link must not be changed. -- Hypothetical examples: -- [[long ton|ton]] → [[long ton|ton]] (no change) -- [[tonne|long ton]] → [[tonne|long-ton]] -- [[metric ton|long ton]] → [[metric ton|long-ton]] -- [[long ton]] → [[long ton|long-ton]] -- Input can also have multiple links in a single name like: -- [[United States customary units|U.S.]] [[US gallon|gallon]] -- [[mile]]s per [[United States customary units|U.S.]] [[quart]] -- [[long ton]]s per [[short ton]] -- Assume that links cannot be nested (never like "[[abc[[def]]ghi]]"). -- This uses a simple and efficient procedure that works for most cases. -- Some units (if used) would require more, and can later think about -- adding a method to handle exceptions. -- The procedure is to replace each space with a hyphen, but -- not a space after ')' [for "(pre-1954&nbsp;US) nautical mile"], and -- not spaces immediately before '(' or in '(...)' [for cases like -- "British thermal unit (ISO)" and "Calorie (International Steam Table)"]. if name:find(' ', 1, true) then if parts then local pos if name:sub(1, 1) == '(' then pos = name:find(')', 1, true) if pos then return name:sub(1, pos+1) .. name:sub(pos+2):gsub(' ', '-') end elseif name:sub(-1) == ')' then pos = name:find('(', 1, true) if pos then return name:sub(1, pos-2):gsub(' ', '-') .. name:sub(pos-1) end end return name:gsub(' ', '-') end parts = collection() for before, item, after in name:gmatch('([^[]*)(%[%[[^[]*%]%])([^[]*)') do if item:find(' ', 1, true) then local prefix local plen = item:find('|', 1, true) if plen then prefix = item:sub(1, plen) item = item:sub(plen + 1, -3) else prefix = item:sub(1, -3) .. '|' item = item:sub(3, -3) end item = prefix .. hyphenated(item, parts) .. ']]' end parts:add(before:gsub(' ', '-') .. item .. after:gsub(' ', '-')) end if parts.n == 0 then -- No link like "[[...]]" was found in the original name. parts:add(hyphenated(name, parts)) end return table.concat(parts) end return name end local function hyphenated_maybe(parms, want_name, sep, id, inout) -- Return s, f where -- s = id, possibly modified -- f = true if hyphenated -- Possible modifications: hyphenate; prepend '-'; append mid text. if id == nil or id == '' then return '' end local mid = (inout == (parms.opt_flip and 'out' or 'in')) and parms.mid or '' if want_name then if parms.opt_adjectival then return '-' .. hyphenated(id) .. mid, true end if parms.opt_add_s and id:sub(-1) ~= 's' then id = id .. 's' -- for nowiki end end return sep .. id .. mid end local function use_minus(text) -- Return text with Unicode minus instead of '-', if present. if text:sub(1, 1) == '-' then return MINUS .. text:sub(2) end return text end local function digit_groups(parms, text, method) -- Return a numbered table of groups of digits (left-to-right, in local language). -- Parameter method is a number or nil: -- 3 for 3-digit grouping (default), or -- 2 for 3-then-2 grouping (only for digits before decimal mark). local len_right local len_left = text:find('.', 1, true) if len_left then len_right = #text - len_left len_left = len_left - 1 else len_left = #text end local twos = method == 2 and len_left > 5 local groups = collection() local run = len_left local n if run < 4 or (run == 4 and parms.opt_comma5) then if parms.opt_gaps then n = run else n = #text end elseif twos then n = run % 2 == 0 and 1 or 2 else n = run % 3 == 0 and 3 or run % 3 end while run > 0 do groups:add(n) run = run - n n = (twos and run > 3) and 2 or 3 end if len_right then if groups.n == 0 then groups:add(0) end if parms.opt_gaps and len_right > 3 then local want4 = not parms.opt_gaps3 -- true gives no gap before trailing single digit local isfirst = true run = len_right while run > 0 do n = (want4 and run == 4) and 4 or (run > 3 and 3 or run) if isfirst then isfirst = false groups[groups.n] = groups[groups.n] + 1 + n else groups:add(n) end run = run - n end else groups[groups.n] = groups[groups.n] + 1 + len_right end end local pos = 1 for i, length in ipairs(groups) do groups[i] = from_en(text:sub(pos, pos + length - 1)) pos = pos + length end return groups end function with_separator(parms, text) -- for forward declaration above -- Input text is a number in en digits with optional '.' decimal mark. -- Return an equivalent, formatted for display: -- with a custom decimal mark instead of '.', if wanted -- with thousand separators inserted, if wanted -- digits in local language -- The given text is like '123' or '123.' or '12345.6789'. -- The text has no sign (caller inserts that later, if necessary). -- When using gaps, they are inserted before and after the decimal mark. -- Separators are inserted only before the decimal mark. -- A trailing dot (as in '123.') is removed because their use appears to -- be accidental, and such a number should be shown as '123' or '123.0'. -- It is useful for convert to suppress the dot so, for example, '4000.' -- is a simple way of indicating that all the digits are significant. if text:sub(-1) == '.' then text = text:sub(1, -2) end if #text < 4 or parms.opt_nocomma or numsep == '' then return from_en(text) end local groups = digit_groups(parms, text, group_method) if parms.opt_gaps then if groups.n <= 1 then return groups[1] or '' end local nowrap = '<span style="white-space: nowrap">' local gap = '<span style="margin-left: 0.25em">' local close = '</span>' return nowrap .. groups[1] .. gap .. table.concat(groups, close .. gap, 2, groups.n) .. close .. close end return table.concat(groups, numsep) end -- An input value like 1.23e12 is displayed using scientific notation (1.23×10¹²). -- That also makes the output use scientific notation, except for small values. -- In addition, very small or very large output values use scientific notation. -- Use format(fmtpower, significand, '10', exponent) where each argument is a string. local fmtpower = '%s<span style="margin:0 .15em 0 .25em">×</span>%s<sup>%s</sup>' local function with_exponent(parms, show, exponent) -- Return wikitext to display the implied value in scientific notation. -- Input uses en digits; output uses digits in local language. return format(fmtpower, with_separator(parms, show), from_en('10'), use_minus(from_en(tostring(exponent)))) end local function make_sigfig(value, sigfig) -- Return show, exponent that are equivalent to the result of -- converting the number 'value' (where value >= 0) to a string, -- rounded to 'sigfig' significant figures. -- The returned items are: -- show: a string of digits; no sign and no dot; -- there is an implied dot before show. -- exponent: a number (an integer) to shift the implied dot. -- Resulting value = tonumber('.' .. show) * 10^exponent. -- Examples: -- make_sigfig(23.456, 3) returns '235', 2 (.235 * 10^2). -- make_sigfig(0.0023456, 3) returns '235', -2 (.235 * 10^-2). -- make_sigfig(0, 3) returns '000', 1 (.000 * 10^1). if sigfig <= 0 then sigfig = 1 elseif sigfig > maxsigfig then sigfig = maxsigfig end if value == 0 then return string.rep('0', sigfig), 1 end local exp, fracpart = math.modf(log10(value)) if fracpart >= 0 then fracpart = fracpart - 1 exp = exp + 1 end local digits = format('%.0f', 10^(fracpart + sigfig)) if #digits > sigfig then -- Overflow (for sigfig=3: like 0.9999 rounding to "1000"; need "100"). digits = digits:sub(1, sigfig) exp = exp + 1 end assert(#digits == sigfig, 'Bug: rounded number has wrong length') return digits, exp end -- Fraction output format. local fracfmt = { { -- Like {{frac}} (fraction slash). '<span class="frac" role="math">{SIGN}<span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1/2 '<span class="frac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1+2/3 style = 'frac', }, { -- Like {{sfrac}} (stacked fraction, that is, horizontal bar). '<span class="sfrac tion" role="math">{SIGN}<span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span>', -- 1//2 '<span class="sfrac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="tion"><span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span></span>', -- 1+2//3 style = 'sfrac', }, } local function format_fraction(parms, inout, negative, wholestr, numstr, denstr, do_spell, style) -- Return wikitext for a fraction, possibly spelled. -- Inputs use en digits and have no sign; output uses digits in local language. local wikitext if not style then style = parms.opt_fraction_horizontal and 2 or 1 end if wholestr == '' then wholestr = nil end local substitute = { SIGN = negative and MINUS or '', WHOLE = wholestr and with_separator(parms, wholestr), NUM = from_en(numstr), DEN = from_en(denstr), } wikitext = fracfmt[style][wholestr and 2 or 1]:gsub('{(%u+)}', substitute) if do_spell then if negative then if wholestr then wholestr = '-' .. wholestr else numstr = '-' .. numstr end end local s = spell_number(parms, inout, wholestr, numstr, denstr) if s then return s end end add_style(parms, fracfmt[style].style) return wikitext end local function format_number(parms, show, exponent, isnegative) -- Parameter show is a string or a table containing strings. -- Each string is a formatted number in en digits and optional '.' decimal mark. -- A table represents a fraction: integer, numerator, denominator; -- if a table is given, exponent must be nil. -- Return t where t is a table with fields: -- show = wikitext formatted to display implied value -- (digits in local language) -- is_scientific = true if show uses scientific notation -- clean = unformatted show (possibly adjusted and with inserted '.') -- (en digits) -- sign = '' or MINUS -- exponent = exponent (possibly adjusted) -- The clean and exponent fields can be used to calculate the -- rounded absolute value, if needed. -- -- The value implied by the arguments is found from: -- exponent is nil; and -- show is a string of digits (no sign), with an optional dot; -- show = '123.4' is value 123.4, '1234' is value 1234.0; -- or: -- exponent is an integer indicating where dot should be; -- show is a string of digits (no sign and no dot); -- there is an implied dot before show; -- show does not start with '0'; -- show = '1234', exponent = 3 is value 0.1234*10^3 = 123.4. -- -- The formatted result: -- * Is for an output value and is spelled if wanted and possible. -- * Includes a Unicode minus if isnegative and not spelled. -- * Uses a custom decimal mark, if wanted. -- * Has digits grouped where necessary, if wanted. -- * Uses scientific notation if requested, or for very small or large values -- (which forces result to not be spelled). -- * Has no more than maxsigfig significant digits -- (same as old template and {{#expr}}). local xhi, xlo -- these control when scientific notation (exponent) is used if parms.opt_scientific then xhi, xlo = 4, 2 -- default for output if input uses e-notation elseif parms.opt_scientific_always then xhi, xlo = 0, 0 -- always use scientific notation (experimental) else xhi, xlo = 10, 4 -- default end local sign = isnegative and MINUS or '' local maxlen = maxsigfig local tfrac if type(show) == 'table' then tfrac = show show = tfrac.wholestr assert(exponent == nil, 'Bug: exponent given with fraction') end if not tfrac and not exponent then local integer, dot, decimals = show:match('^(%d*)(%.?)(.*)') if integer == '0' or integer == '' then local zeros, figs = decimals:match('^(0*)([^0]?.*)') if #figs == 0 then if #zeros > maxlen then show = '0.' .. zeros:sub(1, maxlen) end elseif #zeros >= xlo then show = figs exponent = -#zeros elseif #figs > maxlen then show = '0.' .. zeros .. figs:sub(1, maxlen) end elseif #integer >= xhi then show = integer .. decimals exponent = #integer else maxlen = maxlen + #dot if #show > maxlen then show = show:sub(1, maxlen) end end end if exponent then local function zeros(n) return string.rep('0', n) end if #show > maxlen then show = show:sub(1, maxlen) end if exponent > xhi or exponent <= -xlo or (exponent == xhi and show ~= '1' .. zeros(xhi - 1)) then -- When xhi, xlo = 10, 4 (the default), scientific notation is used if the -- rounded value satisfies: value >= 1e9 or value < 1e-4 (1e9 = 0.1e10), -- except if show is '1000000000' (1e9), for example: -- {{convert|1000000000|m|m|sigfig=10}} → 1,000,000,000 metres (1,000,000,000 m) local significand if #show > 1 then significand = show:sub(1, 1) .. '.' .. show:sub(2) else significand = show end return { clean = '.' .. show, exponent = exponent, sign = sign, show = sign .. with_exponent(parms, significand, exponent-1), is_scientific = true, } end if exponent >= #show then show = show .. zeros(exponent - #show) -- result has no dot elseif exponent <= 0 then show = '0.' .. zeros(-exponent) .. show else show = show:sub(1, exponent) .. '.' .. show:sub(exponent+1) end end local formatted_show if tfrac then show = tostring(tfrac.value) -- to set clean in returned table formatted_show = format_fraction(parms, 'out', isnegative, tfrac.wholestr, tfrac.numstr, tfrac.denstr, parms.opt_spell_out) else if isnegative and show:match('^0.?0*$') then sign = '' -- don't show minus if result is negative but rounds to zero end formatted_show = sign .. with_separator(parms, show) if parms.opt_spell_out then formatted_show = spell_number(parms, 'out', sign .. show) or formatted_show end end return { clean = show, sign = sign, show = formatted_show, is_scientific = false, -- to avoid calling __index } end local function extract_fraction(parms, text, negative) -- If text represents a fraction, return -- value, altvalue, show, denominator -- where -- value is a number (value of the fraction in argument text) -- altvalue is an alternate interpretation of any fraction for the hands -- unit where "12.1+3/4" means 12 hands 1.75 inches -- show is a string (formatted text for display of an input value, -- and is spelled if wanted and possible) -- denominator is value of the denominator in the fraction -- Otherwise, return nil. -- Input uses en digits and '.' decimal mark (input has been translated). -- Output uses digits in local language and local decimal mark, if any. ------------------------------------------------------------------------ -- Originally this function accepted x+y/z where x, y, z were any valid -- numbers, possibly with a sign. For example '1.23e+2+1.2/2.4' = 123.5, -- and '2-3/8' = 1.625. However, such usages were found to be errors or -- misunderstandings, so since August 2014 the following restrictions apply: -- x (if present) is an integer or has a single digit after decimal mark -- y and z are unsigned integers -- e-notation is not accepted -- The overall number can start with '+' or '-' (so '12+3/4' and '+12+3/4' -- and '-12-3/4' are valid). -- Any leading negative sign is removed by the caller, so only inputs -- like the following are accepted here (may have whitespace): -- negative = false false true (there was a leading '-') -- text = '2/3' '+2/3' '2/3' -- text = '1+2/3' '+1+2/3' '1-2/3' -- text = '12.3+1/2' '+12.3+1/2' '12.3-1/2' -- Values like '12.3+1/2' are accepted, but are intended only for use -- with the hands unit (not worth adding code to enforce that). ------------------------------------------------------------------------ local leading_plus, prefix, numstr, slashes, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*(/+)%s*(%d+)%s*$') if not leading_plus then -- Accept a single U+2044 fraction slash because that may be pasted. leading_plus, prefix, numstr, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*⁄%s*(%d+)%s*$') slashes = '/' end local numerator = tonumber(numstr) local denominator = tonumber(denstr) if numerator == nil or denominator == nil or (negative and leading_plus ~= '') then return nil end local whole, wholestr if prefix == '' then wholestr = '' whole = 0 else -- Any prefix must be like '12+' or '12-' (whole number and fraction sign); -- '12.3+' and '12.3-' are also accepted (single digit after decimal point) -- because '12.3+1/2 hands' is valid (12 hands 3½ inches). local num1, num2, frac_sign = prefix:match('^(%d+)(%.?%d?)%s*([+%-])$') if num1 == nil then return nil end if num2 == '' then -- num2 must be '' or like '.1' but not '.' or '.12' wholestr = num1 else if #num2 ~= 2 then return nil end wholestr = num1 .. num2 end if frac_sign ~= (negative and '-' or '+') then return nil end whole = tonumber(wholestr) if whole == nil then return nil end end local value = whole + numerator / denominator if not valid_number(value) then return nil end local altvalue = whole + numerator / (denominator * 10) local style = #slashes -- kludge: 1 or 2 slashes can be used to select style if style > 2 then style = 2 end local wikitext = format_fraction(parms, 'in', negative, leading_plus .. wholestr, numstr, denstr, parms.opt_spell_in, style) return value, altvalue, wikitext, denominator end local function extract_number(parms, text, another, no_fraction) -- Return true, info if can extract a number from text, -- where info is a table with the result, -- or return false, t where t is an error message table. -- Input can use en digits or digits in local language and can -- have references at the end. Accepting references is intended -- for use in infoboxes with a field for a value passed to convert. -- Parameter another = true if the expected value is not the first. -- Before processing, the input text is cleaned: -- * Any thousand separators (valid or not) are removed. -- * Any sign is replaced with '-' (if negative) or '' (otherwise). -- That replaces Unicode minus with '-'. -- If successful, the returned info table contains named fields: -- value = a valid number -- altvalue = a valid number, usually same as value but different -- if fraction used (for hands unit) -- singular = true if value is 1 or -1 (to use singular form of units) -- clean = cleaned text with any separators and sign removed -- (en digits and '.' decimal mark) -- show = text formatted for output, possibly with ref strip markers -- (digits in local language and custom decimal mark) -- The resulting show: -- * Is for an input value and is spelled if wanted and possible. -- * Has a rounded value, if wanted. -- * Has digits grouped where necessary, if wanted. -- * If negative, a Unicode minus is used; otherwise the sign is -- '+' (if the input text used '+'), or is '' (if no sign in input). text = strip(text or '') local reference local pos = text:find('\127', 1, true) if pos then local before = text:sub(1, pos - 1) local remainder = text:sub(pos) local refs = {} while #remainder > 0 do local ref, spaces ref, spaces, remainder = remainder:match('^(\127[^\127]*UNIQ[^\127]*%-ref[^\127]*\127)(%s*)(.*)') if ref then table.insert(refs, ref) else refs = {} break end end if #refs > 0 then text = strip(before) reference = table.concat(refs) end end local clean = to_en(text, parms) if clean == '' then return false, { another and 'cvt_no_num2' or 'cvt_no_num' } end local isnegative, propersign = false, '' -- most common case local singular, show, denominator local value = tonumber(clean) local altvalue if value then local sign = clean:sub(1, 1) if sign == '+' or sign == '-' then propersign = (sign == '+') and '+' or MINUS clean = clean:sub(2) end if value < 0 then isnegative = true value = -value end else local valstr for _, prefix in ipairs({ '-', MINUS, '&minus;' }) do -- Including '-' sets isnegative in case input is a fraction like '-2-3/4'. local plen = #prefix if clean:sub(1, plen) == prefix then valstr = clean:sub(plen + 1) if valstr:match('^%s') then -- "- 1" is invalid but "-1 - 1/2" is ok return false, { 'cvt_bad_num', text } end break end end if valstr then isnegative = true propersign = MINUS clean = valstr value = tonumber(clean) end if value == nil then if not no_fraction then value, altvalue, show, denominator = extract_fraction(parms, clean, isnegative) end if value == nil then return false, { 'cvt_bad_num', text } end if value <= 1 then singular = true -- for example, "½ mile" or "one half mile" (singular unit) end end end if not valid_number(value) then -- for example, "1e310" may overflow return false, { 'cvt_invalid_num' } end if show == nil then -- clean is a non-empty string with no spaces, and does not represent a fraction, -- and value = tonumber(clean) is a number >= 0. -- If the input uses e-notation, show will be displayed using a power of ten, but -- we use the number as given so it might not be normalized scientific notation. -- The input value is spelled if specified so any e-notation is ignored; -- that allows input like 2e6 to be spelled as "two million" which works -- because the spell module converts '2e6' to '2000000' before spelling. local function rounded(value, default, exponent) local precision = parms.opt_ri if precision then local fmt = '%.' .. format('%d', precision) .. 'f' local result = fmt:format(tonumber(value) + 2e-14) -- fudge for some common cases of bad rounding if not exponent then singular = (tonumber(result) == 1) end return result end return default end singular = (value == 1) local scientific local significand, exponent = clean:match('^([%d.]+)[Ee]([+%-]?%d+)') if significand then show = with_exponent(parms, rounded(significand, significand, exponent), exponent) scientific = true else show = with_separator(parms, rounded(value, clean)) end show = propersign .. show if parms.opt_spell_in then show = spell_number(parms, 'in', propersign .. rounded(value, clean)) or show scientific = false end if scientific then parms.opt_scientific = true end end if isnegative and (value ~= 0) then value = -value altvalue = -(altvalue or value) end return true, { value = value, altvalue = altvalue or value, singular = singular, clean = clean, show = show .. (reference or ''), denominator = denominator, } end local function get_number(text) -- Return v, f where: -- v = nil (text is not a number) -- or -- v = value of text (text is a number) -- f = true if value is an integer -- Input can use en digits or digits in local language or separators, -- but no Unicode minus, and no fraction. if text then local number = tonumber(to_en(text)) if number then local _, fracpart = math.modf(number) return number, (fracpart == 0) end end end local function gcd(a, b) -- Return the greatest common denominator for the given values, -- which are known to be positive integers. if a > b then a, b = b, a end if a <= 0 then return b end local r = b % a if r <= 0 then return a end if r == 1 then return 1 end return gcd(r, a) end local function fraction_table(value, denominator) -- Return value as a string or a table: -- * If result is a string, there is no fraction, and the result -- is value formatted as a string of en digits. -- * If result is a table, it represents a fraction with named fields: -- wholestr, numstr, denstr (strings of en digits for integer, numerator, denominator). -- The result is rounded to the nearest multiple of (1/denominator). -- If the multiple is zero, no fraction is included. -- No fraction is included if value is very large as the fraction would -- be unhelpful, particularly if scientific notation is required. -- Input value is a non-negative number. -- Input denominator is a positive integer for the desired fraction. if value <= 0 then return '0' end if denominator <= 0 or value > 1e8 then return format('%.2f', value) end local integer, decimals = math.modf(value) local numerator = floor((decimals * denominator) + 0.5 + 2e-14) -- add fudge for some common cases of bad rounding if numerator >= denominator then integer = integer + 1 numerator = 0 end local wholestr = tostring(integer) if numerator > 0 then local div = gcd(numerator, denominator) if div > 1 then numerator = numerator / div denominator = denominator / div end return { wholestr = (integer > 0) and wholestr or '', numstr = tostring(numerator), denstr = tostring(denominator), value = value, } end return wholestr end local function preunits(count, preunit1, preunit2) -- If count is 1: -- ignore preunit2 -- return p1 -- else: -- preunit1 is used for preunit2 if the latter is empty -- return p1, p2 -- where: -- p1 is text to insert before the input unit -- p2 is text to insert before the output unit -- p1 or p2 may be nil to mean "no preunit" -- Using '+' gives output like "5+ feet" (no space before, but space after). local function withspace(text, wantboth) -- Return text with space before and, if wantboth, after. -- However, no space is added if there is a space or '&nbsp;' or '-' -- at that position ('-' is for adjectival text). -- There is also no space if text starts with '&' -- (e.g. '&deg;' would display a degree symbol with no preceding space). local char = text:sub(1, 1) if char == '&' then return text -- an html entity can be used to specify the exact display end if not (char == ' ' or char == '-' or char == '+') then text = ' ' .. text end if wantboth then char = text:sub(-1, -1) if not (char == ' ' or char == '-' or text:sub(-6, -1) == '&nbsp;') then text = text .. ' ' end end return text end local PLUS = '+ ' preunit1 = preunit1 or '' local trim1 = strip(preunit1) if count == 1 then if trim1 == '' then return nil end if trim1 == '+' then return PLUS end return withspace(preunit1, true) end preunit1 = withspace(preunit1) preunit2 = preunit2 or '' local trim2 = strip(preunit2) if trim1 == '+' then if trim2 == '' or trim2 == '+' then return PLUS, PLUS end preunit1 = PLUS end if trim2 == '' then if trim1 == '' then return nil, nil end preunit2 = preunit1 elseif trim2 == '+' then preunit2 = PLUS elseif trim2 == '&#32;' then -- trick to make preunit2 empty preunit2 = nil else preunit2 = withspace(preunit2) end return preunit1, preunit2 end local function range_text(range, want_name, parms, before, after, inout, options) -- Return before .. rtext .. after -- where rtext is the text that separates two values in a range. local rtext, adj_text, exception options = options or {} if type(range) == 'table' then -- Table must specify range text for ('off' and 'on') or ('input' and 'output'), -- and may specify range text for 'adj=on', -- and may specify exception = true. rtext = range[want_name and 'off' or 'on'] or range[((inout == 'in') == (parms.opt_flip == true)) and 'output' or 'input'] adj_text = range['adj'] exception = range['exception'] else rtext = range end if parms.opt_adjectival then if want_name or (exception and parms.abbr_org == 'on') then rtext = adj_text or rtext:gsub(' ', '-'):gsub('&nbsp;', '-') end end if rtext == '–' and (options.spaced or after:sub(1, #MINUS) == MINUS) then rtext = '&nbsp;– ' end return before .. rtext .. after end local function get_composite(parms, iparm, in_unit_table) -- Look for a composite input unit. For example, {{convert|1|yd|2|ft|3|in}} -- would result in a call to this function with -- iparm = 3 (parms[iparm] = "2", just after the first unit) -- in_unit_table = (unit table for "yd"; contains value 1 for number of yards) -- Return true, iparm, unit where -- iparm = index just after the composite units (7 in above example) -- unit = composite unit table holding all input units, -- or return true if no composite unit is present in parms, -- or return false, t where t is an error message table. local default, subinfo local composite_units, count = { in_unit_table }, 1 local fixups = {} local total = in_unit_table.valinfo[1].value local subunit = in_unit_table while subunit.subdivs do -- subdivs is nil or a table of allowed subdivisions local subcode = strip(parms[iparm+1]) local subdiv = subunit.subdivs[subcode] or subunit.subdivs[(all_units[subcode] or {}).target] if not subdiv then break end local success success, subunit = lookup(parms, subcode, 'no_combination') if not success then return false, subunit end -- should never occur success, subinfo = extract_number(parms, parms[iparm]) if not success then return false, subinfo end iparm = iparm + 2 subunit.inout = 'in' subunit.valinfo = { subinfo } -- Recalculate total as a number of subdivisions. -- subdiv[1] = number of subdivisions per previous unit (integer > 1). total = total * subdiv[1] + subinfo.value if not default then -- set by the first subdiv with a default defined default = subdiv.default end count = count + 1 composite_units[count] = subunit if subdiv.unit or subdiv.name then fixups[count] = { unit = subdiv.unit, name = subdiv.name, valinfo = subunit.valinfo } end end if count == 1 then return true -- no error and no composite unit end for i, fixup in pairs(fixups) do local unit = fixup.unit local name = fixup.name if not unit or (count > 2 and name) then composite_units[i].fixed_name = name else local success, alternate = lookup(parms, unit, 'no_combination') if not success then return false, alternate end -- should never occur alternate.inout = 'in' alternate.valinfo = fixup.valinfo composite_units[i] = alternate end end return true, iparm, { utype = in_unit_table.utype, scale = subunit.scale, -- scale of last (least significant) unit valinfo = { { value = total, clean = subinfo.clean, denominator = subinfo.denominator } }, composite = composite_units, default = default or in_unit_table.default } end local function translate_parms(parms, kv_pairs) -- Update fields in parms by translating each key:value in kv_pairs to terms -- used by this module (may involve translating from local language to English). -- Also, checks are performed which may display warnings, if enabled. -- Return true if successful or return false, t where t is an error message table. currency_text = nil -- local testing can hold module in memory; must clear globals if kv_pairs.adj and kv_pairs.sing then -- For enwiki (before translation), warn if attempt to use adj and sing -- as the latter is a deprecated alias for the former. if kv_pairs.adj ~= kv_pairs.sing and kv_pairs.sing ~= '' then add_warning(parms, 1, 'cvt_unknown_option', 'sing=' .. kv_pairs.sing) end kv_pairs.sing = nil end kv_pairs.comma = kv_pairs.comma or config.comma -- for plwiki who want default comma=5 for loc_name, loc_value in pairs(kv_pairs) do local en_name = text_code.en_option_name[loc_name] if en_name then local en_value = text_code.en_option_value[en_name] if en_value == 'INTEGER' then -- altitude_ft, altitude_m, frac, sigfig en_value = nil if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else local minimum local number, is_integer = get_number(loc_value) if en_name == 'sigfig' then minimum = 1 elseif en_name == 'frac' then minimum = 2 if number and number < 0 then parms.opt_fraction_horizontal = true number = -number end else minimum = -1e6 end if number and is_integer and number >= minimum then en_value = number else local m if en_name == 'frac' then m = 'cvt_bad_frac' elseif en_name == 'sigfig' then m = 'cvt_bad_sigfig' else m = 'cvt_bad_altitude' end add_warning(parms, 1, m, loc_name .. '=' .. loc_value) end end elseif en_value == 'TEXT' then -- $, input, qid, qual, stylein, styleout, tracking en_value = loc_value ~= '' and loc_value or nil -- accept non-empty user text with no validation if not en_value and (en_name == '$' or en_name == 'qid' or en_name == 'qual') then add_warning(parms, 2, 'cvt_empty_option', loc_name) elseif en_name == '$' then -- Value should be a single character like "€" for the euro currency symbol, but anything is accepted. currency_text = (loc_value == 'euro') and '€' or loc_value elseif en_name == 'input' then -- May have something like {{convert|input=}} (empty input) if source is an infobox -- with optional fields. In that case, want to output nothing rather than an error. parms.input_text = loc_value -- keep input because parms.input is nil if loc_value == '' end else en_value = en_value[loc_value] if en_value and en_value:sub(-1) == '?' then en_value = en_value:sub(1, -2) add_warning(parms, -1, 'cvt_deprecated', loc_name .. '=' .. loc_value) end if en_value == nil then if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end elseif en_value == '' then en_value = nil -- an ignored option like adj=off elseif type(en_value) == 'string' and en_value:sub(1, 4) == 'opt_' then for _, v in ipairs(split(en_value, ',')) do local lhs, rhs = v:match('^(.-)=(.+)$') if rhs then parms[lhs] = tonumber(rhs) or rhs else parms[v] = true end end en_value = nil end end parms[en_name] = en_value else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end end local abbr_entered = parms.abbr local cfg_abbr = config.abbr if cfg_abbr then -- Don't warn if invalid because every convert would show that warning. if cfg_abbr == 'on always' then parms.abbr = 'on' elseif cfg_abbr == 'off always' then parms.abbr = 'off' elseif parms.abbr == nil then if cfg_abbr == 'on default' then parms.abbr = 'on' elseif cfg_abbr == 'off default' then parms.abbr = 'off' end end end if parms.abbr then if parms.abbr == 'unit' then parms.abbr = 'on' parms.number_word = true end parms.abbr_org = parms.abbr -- original abbr, before any flip elseif parms.opt_hand_hh then parms.abbr_org = 'on' parms.abbr = 'on' else parms.abbr = 'out' -- default is to abbreviate output only (use symbol, not name) end if parms.opt_order_out then -- Disable options that do not work in a useful way with order=out. parms.opt_flip = nil -- override adj=flip parms.opt_spell_in = nil parms.opt_spell_out = nil parms.opt_spell_upper = nil end if parms.opt_spell_out and not abbr_entered then parms.abbr = 'off' -- should show unit name when spelling the output value end if parms.opt_flip then local function swap_in_out(option) local value = parms[option] if value == 'in' then parms[option] = 'out' elseif value == 'out' then parms[option] = 'in' end end swap_in_out('abbr') swap_in_out('lk') if parms.opt_spell_in and not parms.opt_spell_out then -- For simplicity, and because it does not appear to be needed, -- user cannot set an option to spell the output only. parms.opt_spell_in = nil parms.opt_spell_out = true end end if parms.opt_spell_upper then parms.spell_upper = parms.opt_flip and 'out' or 'in' end if parms.opt_table or parms.opt_tablecen then if abbr_entered == nil and parms.lk == nil then parms.opt_values = true end parms.table_align = parms.opt_table and 'right' or 'center' end if parms.table_align or parms.opt_sortable_on then parms.need_table_or_sort = true end local disp_joins = text_code.disp_joins local default_joins = disp_joins['b'] parms.join_between = default_joins[3] or '; ' local disp = parms.disp if disp == nil then -- special case for the most common setting parms.joins = default_joins elseif disp == 'x' then -- Later, parms.joins is set from the input parameters. else -- Old template does this. local abbr = parms.abbr if disp == 'slash' then if abbr_entered == nil then disp = 'slash-nbsp' elseif abbr == 'in' or abbr == 'out' then disp = 'slash-sp' else disp = 'slash-nosp' end elseif disp == 'sqbr' then if abbr == 'on' then disp = 'sqbr-nbsp' else disp = 'sqbr-sp' end end parms.joins = disp_joins[disp] or default_joins parms.join_between = parms.joins[3] or parms.join_between parms.wantname = parms.joins.wantname end if (en_default and not parms.opt_lang_local and (parms[1] or ''):find('%d')) or parms.opt_lang_en then from_en_table = nil end if en_default and from_en_table then -- For hiwiki: localized symbol/name is defined with the US symbol/name field, -- and is used if output uses localized numbers. parms.opt_sp_us = true end return true end local function get_values(parms) -- If successful, update parms and return true, v, i where -- v = table of input values -- i = index to next entry in parms after those processed here -- or return false, t where t is an error message table. local valinfo = collection() -- numbered table of input values local range = collection() -- numbered table of range items (having, for example, 2 range items requires 3 input values) local had_nocomma -- true if removed "nocomma" kludge from second parameter (like "tonocomma") local parm2 = strip(parms[2]) if parm2 and parm2:sub(-7, -1) == 'nocomma' then parms[2] = strip(parm2:sub(1, -8)) parms.opt_nocomma = true had_nocomma = true end local function extractor(i) -- If the parameter is not a value, try unpacking it as a range ("1-23" for "1 to 23"). -- However, "-1-2/3" is a negative fraction (-1⅔), so it must be extracted first. -- Do not unpack a parameter if it is like "3-1/2" which is sometimes incorrectly -- used instead of "3+1/2" (and which should not be interpreted as "3 to ½"). -- Unpacked items are inserted into the parms table. -- The tail recursion allows combinations like "1x2 to 3x4". local valstr = strip(parms[i]) -- trim so any '-' as a negative sign will be at start local success, result = extract_number(parms, valstr, i > 1) if not success and valstr and i < 20 then -- check i to limit abuse local lhs, sep, rhs = valstr:match('^(%S+)%s+(%S+)%s+(%S.*)') if lhs and not (sep == '-' and rhs:match('/')) then if sep:find('%d') then return success, result -- to reject {{convert|1 234 567|m}} with a decent message (en only) end parms[i] = rhs table.insert(parms, i, sep) table.insert(parms, i, lhs) return extractor(i) end if not valstr:match('%-.*/') then for _, sep in ipairs(text_code.ranges.words) do local start, stop = valstr:find(sep, 2, true) -- start at 2 to skip any negative sign for range '-' if start then parms[i] = valstr:sub(stop + 1) table.insert(parms, i, sep) table.insert(parms, i, valstr:sub(1, start - 1)) return extractor(i) end end end end return success, result end local i = 1 local is_change while true do local success, info = extractor(i) -- need to set parms.opt_nocomma before calling this if not success then return false, info end i = i + 1 if is_change then info.is_change = true -- value is after "±" and so is a change (significant for range like {{convert|5|±|5|°C}}) is_change = nil end valinfo:add(info) local range_item = get_range(strip(parms[i])) if not range_item then break end i = i + 1 range:add(range_item) if type(range_item) == 'table' then -- For range "x", if append unit to some values, append it to all. parms.in_range_x = parms.in_range_x or range_item.in_range_x parms.out_range_x = parms.out_range_x or range_item.out_range_x parms.abbr_range_x = parms.abbr_range_x or range_item.abbr_range_x is_change = range_item.is_range_change end end if range.n > 0 then if range.n > 30 then -- limit abuse, although 4 is a more likely upper limit return false, { 'cvt_invalid_num' } -- misleading message but it will do end parms.range = range elseif had_nocomma then return false, { 'cvt_unknown', parm2 } end return true, valinfo, i end local function simple_get_values(parms) -- If input is like "{{convert|valid_value|valid_unit|...}}", -- return true, i, in_unit, in_unit_table -- i = index in parms of what follows valid_unit, if anything. -- The valid_value is not negative and does not use a fraction, and -- no options requiring further processing of the input are used. -- Otherwise, return nothing or return false, parm1 for caller to interpret. -- Testing shows this function is successful for 96% of converts in articles, -- and that on average it speeds up converts by 8%. local clean = to_en(strip(parms[1] or ''), parms) if parms.opt_ri or parms.opt_spell_in or #clean > 10 or not clean:match('^[0-9.]+$') then return false, clean end local value = tonumber(clean) if not value then return end local info = { value = value, altvalue = value, singular = (value == 1), clean = clean, show = with_separator(parms, clean), } local in_unit = strip(parms[2]) local success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then return end in_unit_table.valinfo = { info } return true, 3, in_unit, in_unit_table end local function wikidata_call(parms, operation, ...) -- Return true, s where s is the result of a Wikidata operation, -- or return false, t where t is an error message table. local function worker(...) wikidata_code = wikidata_code or require(wikidata_module) wikidata_data = wikidata_data or mw.loadData(wikidata_data_module) return wikidata_code[operation](wikidata_data, ...) end local success, status, result = pcall(worker, ...) if success then return status, result end if parms.opt_sortable_debug then -- Use debug=yes to crash if an error while accessing Wikidata. error('Error accessing Wikidata: ' .. status, 0) end return false, { 'cvt_wd_fail' } end local function get_parms(parms, args) -- If successful, update parms and return true, unit where -- parms is a table of all arguments passed to the template -- converted to named arguments, and -- unit is the input unit table; -- or return false, t where t is an error message table. -- For special processing (not a convert), can also return -- true, wikitext where wikitext is the final result. -- The returned input unit table may be for a fake unit using the specified -- unit code as the symbol and name, and with bad_mcode = message code table. -- MediaWiki removes leading and trailing whitespace from the values of -- named arguments. However, the values of numbered arguments include any -- whitespace entered in the template, and whitespace is used by some -- parameters (example: the numbered parameters associated with "disp=x"). local kv_pairs = {} -- table of input key:value pairs where key is a name; needed because cannot iterate parms and add new fields to it for k, v in pairs(args) do if type(k) == 'number' or k == 'test' then -- parameter "test" is reserved for testing and is not translated parms[k] = v else kv_pairs[k] = v end end if parms.test == 'wikidata' then local ulookup = function (ucode) -- Use empty table for parms so it does not accumulate results when used repeatedly. return lookup({}, ucode, 'no_combination') end return wikidata_call(parms, '_listunits', ulookup) end local success, msg = translate_parms(parms, kv_pairs) if not success then return false, msg end if parms.input then success, msg = wikidata_call(parms, '_adjustparameters', parms, 1) if not success then return false, msg end end local success, i, in_unit, in_unit_table = simple_get_values(parms) if not success then if type(i) == 'string' and i:match('^NNN+$') then -- Some infoboxes have examples like {{convert|NNN|m}} (3 or more "N"). -- Output an empty string for these. return false, { 'cvt_no_output' } end local valinfo success, valinfo, i = get_values(parms) if not success then return false, valinfo end in_unit = strip(parms[i]) i = i + 1 success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then in_unit = in_unit or '' if parms.opt_ignore_error then -- display given unit code with no error (for use with {{val}}) in_unit_table = '' -- suppress error message and prevent processing of output unit end in_unit_table = setmetatable({ symbol = in_unit, name2 = in_unit, utype = in_unit, scale = 1, default = '', defkey = '', linkey = '', bad_mcode = in_unit_table }, unit_mt) end in_unit_table.valinfo = valinfo end if parms.test == 'msg' then -- Am testing the messages produced when no output unit is specified, and -- the input unit has a missing or invalid default. -- Set two units for testing that. -- LATER: Remove this code. if in_unit == 'chain' then in_unit_table.default = nil -- no default elseif in_unit == 'rd' then in_unit_table.default = "ft!X!m" -- an invalid expression end end in_unit_table.inout = 'in' -- this is an input unit if not parms.range then local success, inext, composite_unit = get_composite(parms, i, in_unit_table) if not success then return false, inext end if composite_unit then in_unit_table = composite_unit i = inext end end if in_unit_table.builtin == 'mach' then -- As with old template, a number following Mach as the input unit is the altitude. -- That is deprecated: should use altitude_ft=NUMBER or altitude_m=NUMBER. local success, info success = tonumber(parms[i]) -- this will often work and will give correct result for values like 2e4 without forcing output scientific notation if success then info = { value = success } else success, info = extract_number(parms, parms[i], false, true) end if success then i = i + 1 in_unit_table.altitude = info.value end end local word = strip(parms[i]) i = i + 1 local precision, is_bad_precision local function set_precision(text) local number, is_integer = get_number(text) if number then if is_integer then precision = number else precision = text is_bad_precision = true end return true -- text was used for precision, good or bad end end if word and not set_precision(word) then parms.out_unit = parms.out_unit or word if set_precision(strip(parms[i])) then i = i + 1 end end if parms.opt_adj_mid then word = parms[i] i = i + 1 if word then -- mid-text words if word:sub(1, 1) == '-' then parms.mid = word else parms.mid = ' ' .. word end end end if parms.opt_one_preunit then parms[parms.opt_flip and 'preunit2' or 'preunit1'] = preunits(1, parms[i]) i = i + 1 end if parms.disp == 'x' then -- Following is reasonably compatible with the old template. local first = parms[i] or '' local second = parms[i+1] or '' i = i + 2 if strip(first) == '' then -- user can enter '&#32;' rather than ' ' to avoid the default first = ' [&nbsp;' .. first second = '&nbsp;]' .. second end parms.joins = { first, second } elseif parms.opt_two_preunits then local p1, p2 = preunits(2, parms[i], parms[i+1]) i = i + 2 if parms.preunit1 then -- To simplify documentation, allow unlikely use of adj=pre with disp=preunit -- (however, an output unit must be specified with adj=pre and with disp=preunit). parms.preunit1 = parms.preunit1 .. p1 parms.preunit2 = p2 else parms.preunit1, parms.preunit2 = p1, p2 end end if precision == nil then if set_precision(strip(parms[i])) then i = i + 1 end end if is_bad_precision then add_warning(parms, 1, 'cvt_bad_prec', precision) else parms.precision = precision end for j = i, i + 3 do local parm = parms[j] -- warn if find a non-empty extraneous parameter if parm and parm:match('%S') then add_warning(parms, 1, 'cvt_unknown_option', parm) break end end return true, in_unit_table end local function record_default_precision(parms, out_current, precision) -- If necessary, adjust parameters and return a possibly adjusted precision. -- When converting a range of values where a default precision is required, -- that default is calculated for each value because the result sometimes -- depends on the precise input and output values. This function may cause -- the entire convert process to be repeated in order to ensure that the -- same default precision is used for each individual convert. -- If that were not done, a range like 1000 to 1000.4 may give poor results -- because the first output could be heavily rounded, while the second is not. -- For range 1000.4 to 1000, this function can give the second convert the -- same default precision that was used for the first. if not parms.opt_round_each then local maxdef = out_current.max_default_precision if maxdef then if maxdef < precision then parms.do_convert_again = true out_current.max_default_precision = precision else precision = out_current.max_default_precision end else out_current.max_default_precision = precision end end return precision end local function default_precision(parms, invalue, inclean, denominator, outvalue, in_current, out_current, extra) -- Return a default value for precision (an integer like 2, 0, -2). -- If denominator is not nil, it is the value of the denominator in inclean. -- Code follows procedures used in old template. local fudge = 1e-14 -- {{Order of magnitude}} adds this, so we do too local prec, minprec, adjust local subunit_ignore_trailing_zero local subunit_more_precision -- kludge for "in" used in input like "|2|ft|6|in" local composite = in_current.composite if composite then subunit_ignore_trailing_zero = true -- input "|2|st|10|lb" has precision 0, not -1 if composite[#composite].exception == 'subunit_more_precision' then subunit_more_precision = true -- do not use standard precision with input like "|2|ft|6|in" end end if denominator and denominator > 0 then prec = math.max(log10(denominator), 1) else -- Count digits after decimal mark, handling cases like '12.345e6'. local exponent local integer, dot, decimals, expstr = inclean:match('^(%d*)(%.?)(%d*)(.*)') local e = expstr:sub(1, 1) if e == 'e' or e == 'E' then exponent = tonumber(expstr:sub(2)) end if dot == '' then prec = subunit_ignore_trailing_zero and 0 or -integer:match('0*$'):len() else prec = #decimals end if exponent then -- So '1230' and '1.23e3' both give prec = -1, and '0.00123' and '1.23e-3' give 5. prec = prec - exponent end end if in_current.istemperature and out_current.istemperature then -- Converting between common temperatures (°C, °F, °R, K); not keVT. -- Kelvin value can be almost zero, or small but negative due to precision problems. -- Also, an input value like -300 C (below absolute zero) gives negative kelvins. -- Calculate minimum precision from absolute value. adjust = 0 local kelvin = abs((invalue - in_current.offset) * in_current.scale) if kelvin < 1e-8 then -- assume nonzero due to input or calculation precision problem minprec = 2 else minprec = 2 - floor(log10(kelvin) + fudge) -- 3 sigfigs in kelvin end else if invalue == 0 or outvalue <= 0 then -- We are never called with a negative outvalue, but it might be zero. -- This is special-cased to avoid calculation exceptions. return record_default_precision(parms, out_current, 0) end if out_current.exception == 'integer_more_precision' and floor(invalue) == invalue then -- With certain output units that sometimes give poor results -- with default rounding, use more precision when the input -- value is equal to an integer. An example of a poor result -- is when input 50 gives a smaller output than input 49.5. -- Experiment shows this helps, but it does not eliminate all -- surprises because it is not clear whether "50" should be -- interpreted as "from 45 to 55" or "from 49.5 to 50.5". adjust = -log10(in_current.scale) elseif subunit_more_precision then -- Conversion like "{{convert|6|ft|1|in|cm}}" (where subunit is "in") -- has a non-standard adjust value, to give more output precision. adjust = log10(out_current.scale) + 2 else adjust = log10(abs(invalue / outvalue)) end adjust = adjust + log10(2) -- Ensure that the output has at least two significant figures. minprec = 1 - floor(log10(outvalue) + fudge) end if extra then adjust = extra.adjust or adjust minprec = extra.minprec or minprec end return record_default_precision(parms, out_current, math.max(floor(prec + adjust), minprec)) end local function convert(parms, invalue, info, in_current, out_current) -- Convert given input value from one unit to another. -- Return output_value (a number) if a simple convert, or -- return f, t where -- f = true, t = table of information with results, or -- f = false, t = error message table. local inscale = in_current.scale local outscale = out_current.scale if not in_current.iscomplex and not out_current.iscomplex then return invalue * (inscale / outscale) -- minimize overhead for most common case end if in_current.invert or out_current.invert then -- Inverted units, such as inverse length, inverse time, or -- fuel efficiency. Built-in units do not have invert set. if (in_current.invert or 1) * (out_current.invert or 1) < 0 then return 1 / (invalue * inscale * outscale) end return invalue * (inscale / outscale) elseif in_current.offset then -- Temperature (there are no built-ins for this type of unit). if info.is_change then return invalue * (inscale / outscale) end return (invalue - in_current.offset) * (inscale / outscale) + out_current.offset else -- Built-in unit. local in_builtin = in_current.builtin local out_builtin = out_current.builtin if in_builtin and out_builtin then if in_builtin == out_builtin then return invalue end -- There are no cases (yet) where need to convert from one -- built-in unit to another, so this should never occur. return false, { 'cvt_bug_convert' } end if in_builtin == 'mach' or out_builtin == 'mach' then -- Should check that only one altitude is given but am planning to remove -- in_current.altitude (which can only occur when Mach is the input unit), -- and out_current.altitude cannot occur. local alt = parms.altitude_ft or in_current.altitude if not alt and parms.altitude_m then alt = parms.altitude_m / 0.3048 -- 1 ft = 0.3048 m end local spd = speed_of_sound(alt) if in_builtin == 'mach' then inscale = spd return invalue * (inscale / outscale) end outscale = spd local adjust = 0.1 / inscale return true, { outvalue = invalue * (inscale / outscale), adjust = log10(adjust) + log10(2), } elseif in_builtin == 'hand' then -- 1 hand = 4 inches; 1.2 hands = 6 inches. -- Decimals of a hand are only defined for the first digit, and -- the first fractional digit should be a number of inches (1, 2 or 3). -- However, this code interprets the entire fractional part as the number -- of inches / 10 (so 1.75 inches would be 0.175 hands). -- A value like 12.3 hands is exactly 12*4 + 3 inches; base default precision on that. local integer, fracpart = math.modf(invalue) local inch_value = 4 * integer + 10 * fracpart -- equivalent number of inches local factor = inscale / outscale if factor == 4 then -- Am converting to inches: show exact result, and use "inches" not "in" by default. if parms.abbr_org == nil then out_current.usename = true end local show = format('%g', abs(inch_value)) -- show and clean are unsigned if not show:find('e', 1, true) then return true, { invalue = inch_value, outvalue = inch_value, clean = show, show = show, } end end local outvalue = (integer + 2.5 * fracpart) * factor local fracstr = info.clean:match('%.(.*)') or '' local fmt if fracstr == '' then fmt = '%.0f' else fmt = '%.' .. format('%d', #fracstr - 1) .. 'f' end return true, { invalue = inch_value, clean = format(fmt, inch_value), outvalue = outvalue, minprec = 0, } end end return false, { 'cvt_bug_convert' } -- should never occur end local function user_style(parms, i) -- Return text for a user-specified style for a table cell, or '' if none, -- given i = 1 (input style) or 2 (output style). local style = parms[(i == 1) and 'stylein' or 'styleout'] if style then style = style:gsub('"', '') if style ~= '' then if style:sub(-1) ~= ';' then style = style .. ';' end return style end end return '' end local function make_table_or_sort(parms, invalue, info, in_current, scaled_top) -- Set options to handle output for a table or a sort key, or both. -- The text sort key is based on the value resulting from converting -- the input to a fake base unit with scale = 1, and other properties -- required for a conversion derived from the input unit. -- For other modules, return the sort key in a hidden span element, and -- the scaled value used to generate the sort key. -- If scaled_top is set, it is the scaled value of the numerator of a per unit -- to be combined with this unit (the denominator) to make the sort key. -- Scaling only works with units that convert with a factor (not temperature). local sortkey, scaled_value if parms.opt_sortable_on then local base = { -- a fake unit with enough fields for a valid convert scale = 1, invert = in_current.invert and 1, iscomplex = in_current.iscomplex, offset = in_current.offset and 0, } local outvalue, extra = convert(parms, invalue, info, in_current, base) if extra then outvalue = extra.outvalue end if in_current.istemperature then -- Have converted to kelvin; assume numbers close to zero have a -- rounding error and should be zero. if abs(outvalue) < 1e-12 then outvalue = 0 end end if scaled_top and outvalue ~= 0 then outvalue = scaled_top / outvalue end scaled_value = outvalue if not valid_number(outvalue) then if outvalue < 0 then sortkey = '1000000000000000000' else sortkey = '9000000000000000000' end elseif outvalue == 0 then sortkey = '5000000000000000000' else local mag = floor(log10(abs(outvalue)) + 1e-14) local prefix if outvalue > 0 then prefix = 7000 + mag else prefix = 2999 - mag outvalue = outvalue + 10^(mag+1) end sortkey = format('%d', prefix) .. format('%015.0f', floor(outvalue * 10^(14-mag))) end end local sortspan if sortkey and not parms.table_align then sortspan = parms.opt_sortable_debug and '<span data-sort-value="' .. sortkey .. '♠"><span style="border:1px solid">' .. sortkey .. '♠</span></span>' or '<span data-sort-value="' .. sortkey .. '♠"></span>' parms.join_before = sortspan end if parms.table_align then local sort if sortkey then sort = ' data-sort-value="' .. sortkey .. '"' if parms.opt_sortable_debug then parms.join_before = '<span style="border:1px solid">' .. sortkey .. '</span>' end else sort = '' end local style = 'style="text-align:' .. parms.table_align .. ';' local joins = {} for i = 1, 2 do joins[i] = (i == 1 and '' or '\n|') .. style .. user_style(parms, i) .. '"' .. sort .. '|' end parms.table_joins = joins end return sortspan, scaled_value end local cvt_to_hand local function cvtround(parms, info, in_current, out_current) -- Return true, t where t is a table with the conversion results; fields: -- show = rounded, formatted string with the result of converting value in info, -- using the rounding specified in parms. -- singular = true if result (after rounding and ignoring any negative sign) -- is "1", or like "1.00", or is a fraction with value < 1; -- (and more fields shown below, and a calculated 'absvalue' field). -- or return false, t where t is an error message table. -- Input info.clean uses en digits (it has been translated, if necessary). -- Output show uses en or non-en digits as appropriate, or can be spelled. if out_current.builtin == 'hand' then return cvt_to_hand(parms, info, in_current, out_current) end local invalue = in_current.builtin == 'hand' and info.altvalue or info.value local outvalue, extra = convert(parms, invalue, info, in_current, out_current) if parms.need_table_or_sort then parms.need_table_or_sort = nil -- process using first input value only make_table_or_sort(parms, invalue, info, in_current) end if extra then if not outvalue then return false, extra end invalue = extra.invalue or invalue outvalue = extra.outvalue end if not valid_number(outvalue) then return false, { 'cvt_invalid_num' } end local isnegative if outvalue < 0 then isnegative = true outvalue = -outvalue end local precision, show, exponent local denominator = out_current.frac if denominator then show = fraction_table(outvalue, denominator) else precision = parms.precision if not precision then if parms.sigfig then show, exponent = make_sigfig(outvalue, parms.sigfig) elseif parms.opt_round then local n = parms.opt_round if n == 0.5 then local integer, fracpart = math.modf(floor(2 * outvalue + 0.5) / 2) if fracpart == 0 then show = format('%.0f', integer) else show = format('%.1f', integer + fracpart) end else show = format('%.0f', floor((outvalue / n) + 0.5) * n) end elseif in_current.builtin == 'mach' then local sigfig = info.clean:gsub('^[0.]+', ''):gsub('%.', ''):len() + 1 show, exponent = make_sigfig(outvalue, sigfig) else local inclean = info.clean if extra then inclean = extra.clean or inclean show = extra.show end if not show then precision = default_precision(parms, invalue, inclean, info.denominator, outvalue, in_current, out_current, extra) end end end end if precision then if precision >= 0 then local fudge if precision <= 8 then -- Add a fudge to handle common cases of bad rounding due to inability -- to precisely represent some values. This makes the following work: -- {{convert|-100.1|C|K}} and {{convert|5555000|um|m|2}}. -- Old template uses #expr round, which invokes PHP round(). -- LATER: Investigate how PHP round() works. fudge = 2e-14 else fudge = 0 end local fmt = '%.' .. format('%d', precision) .. 'f' local success success, show = pcall(format, fmt, outvalue + fudge) if not success then return false, { 'cvt_big_prec', tostring(precision) } end else precision = -precision -- #digits to zero (in addition to any digits after dot) local shift = 10 ^ precision show = format('%.0f', outvalue/shift) if show ~= '0' then exponent = #show + precision end end end local t = format_number(parms, show, exponent, isnegative) if type(show) == 'string' then -- Set singular using match because on some systems 0.99999999999999999 is 1.0. if exponent then t.singular = (exponent == 1 and show:match('^10*$')) else t.singular = (show == '1' or show:match('^1%.0*$')) end else t.fraction_table = show t.singular = (outvalue <= 1) -- cannot have 'fraction == 1', but if it were possible it would be singular end t.raw_absvalue = outvalue -- absolute value before rounding return true, setmetatable(t, { __index = function (self, key) if key == 'absvalue' then -- Calculate absolute value after rounding, if needed. local clean, exponent = rawget(self, 'clean'), rawget(self, 'exponent') local value = tonumber(clean) -- absolute value (any negative sign has been ignored) if exponent then value = value * 10^exponent end rawset(self, key, value) return value end end }) end function cvt_to_hand(parms, info, in_current, out_current) -- Convert input to hands, inches. -- Return true, t where t is a table with the conversion results; -- or return false, t where t is an error message table. if parms.abbr_org == nil then out_current.usename = true -- default is to show name not symbol end local precision = parms.precision local frac = out_current.frac if not frac and precision and precision > 1 then frac = (precision == 2) and 2 or 4 end local out_next = out_current.out_next if out_next then -- Use magic knowledge to determine whether the next unit is inches without requiring i18n. -- The following ensures that when the output combination "hand in" is used, the inches -- value is rounded to match the hands value. Also, displaying say "61½" instead of 61.5 -- is better as 61.5 implies the value is not 61.4. if out_next.exception == 'subunit_more_precision' then out_next.frac = frac end end -- Convert to inches; calculate hands from that. local dummy_unit_table = { scale = out_current.scale / 4, frac = frac } local success, outinfo = cvtround(parms, info, in_current, dummy_unit_table) if not success then return false, outinfo end local tfrac = outinfo.fraction_table local inches = outinfo.raw_absvalue if tfrac then inches = floor(inches) -- integer part only; fraction added later else inches = floor(inches + 0.5) -- a hands measurement never shows decimals of an inch end local hands, inches = divide(inches, 4) outinfo.absvalue = hands + inches/4 -- supposed to be the absolute rounded value, but this is close enough local inchstr = tostring(inches) -- '0', '1', '2' or '3' if precision and precision <= 0 then -- using negative or 0 for precision rounds to nearest hand hands = floor(outinfo.raw_absvalue/4 + 0.5) inchstr = '' elseif tfrac then -- Always show an integer before fraction (like "15.0½") because "15½" means 15-and-a-half hands. inchstr = numdot .. format_fraction(parms, 'out', false, inchstr, tfrac.numstr, tfrac.denstr) else inchstr = numdot .. from_en(inchstr) end outinfo.show = outinfo.sign .. with_separator(parms, format('%.0f', hands)) .. inchstr return true, outinfo end local function evaluate_condition(value, condition) -- Return true or false from applying a conditional expression to value, -- or throw an error if invalid. -- A very limited set of expressions is supported: -- v < 9 -- v * 9 < 9 -- where -- 'v' is replaced with value -- 9 is any number (as defined by Lua tonumber) -- only en digits are accepted -- '<' can also be '<=' or '>' or '>=' -- In addition, the following form is supported: -- LHS and RHS -- where -- LHS, RHS = any of above expressions. local function compare(value, text) local arithop, factor, compop, limit = text:match('^%s*v%s*([*]?)(.-)([<>]=?)(.*)$') if arithop == nil then error('Invalid default expression', 0) elseif arithop == '*' then factor = tonumber(factor) if factor == nil then error('Invalid default expression', 0) end value = value * factor end limit = tonumber(limit) if limit == nil then error('Invalid default expression', 0) end if compop == '<' then return value < limit elseif compop == '<=' then return value <= limit elseif compop == '>' then return value > limit elseif compop == '>=' then return value >= limit end error('Invalid default expression', 0) -- should not occur end local lhs, rhs = condition:match('^(.-%W)and(%W.*)') if lhs == nil then return compare(value, condition) end return compare(value, lhs) and compare(value, rhs) end local function get_default(value, unit_table) -- Return true, s where s = name of unit's default output unit, -- or return false, t where t is an error message table. -- Some units have a default that depends on the input value -- (the first value if a range of values is used). -- If '!' is in the default, the first bang-delimited field is an -- expression that uses 'v' to represent the input value. -- Example: 'v < 120 ! small ! big ! suffix' (suffix is optional) -- evaluates 'v < 120' as a boolean with result -- 'smallsuffix' if (value < 120), or 'bigsuffix' otherwise. -- Input must use en digits and '.' decimal mark. local default = data_code.default_exceptions[unit_table.defkey or unit_table.symbol] or unit_table.default if not default then local per = unit_table.per if per then local function a_default(v, u) local success, ucode = get_default(v, u) if not success then return '?' -- an unlikely error has occurred; will cause lookup of default to fail end -- Attempt to use only the first unit if a combination or output multiple. -- This is not bulletproof but should work for most cases. -- Where it does not work, the convert will need to specify the wanted output unit. local t = all_units[ucode] if t then local combo = t.combination if combo then -- For a multiple like ftin, the "first" unit (ft) is last in the combination. local i = t.multiple and table_len(combo) or 1 ucode = combo[i] end else -- Try for an automatically generated combination. local item = ucode:match('^(.-)%+') or ucode:match('^(%S+)%s') if all_units[item] then return item end end return ucode end local unit1, unit2 = per[1], per[2] local def1 = (unit1 and a_default(value, unit1) or unit_table.vprefix or '') local def2 = a_default(1, unit2) -- 1 because per unit of denominator return true, def1 .. '/' .. def2 end return false, { 'cvt_no_default', unit_table.symbol } end if default:find('!', 1, true) == nil then return true, default end local t = split(default, '!') if #t == 3 or #t == 4 then local success, result = pcall(evaluate_condition, value, t[1]) if success then default = result and t[2] or t[3] if #t == 4 then default = default .. t[4] end return true, default end end return false, { 'cvt_bad_default', unit_table.symbol } end local linked_pages -- to record linked pages so will not link to the same page more than once local function unlink(unit_table) -- Forget that the given unit has previously been linked (if it has). -- That is needed when processing a range of inputs or outputs when an id -- for the first range value may have been evaluated, but only an id for -- the last value is displayed, and that id may need to be linked. linked_pages[unit_table.unitcode or unit_table] = nil end local function make_link(link, id, unit_table) -- Return wikilink "[[link|id]]", possibly abbreviated as in examples: -- [[mile]] --> [[mile]] -- [[mile]]s --> [[mile]]s -- However, just id is returned if: -- * no link given (so caller does not need to check if a link was defined); or -- * link has previously been used during the current convert (to avoid overlinking). local link_key if unit_table then link_key = unit_table.unitcode or unit_table else link_key = link end if not link or link == '' or linked_pages[link_key] then return id end linked_pages[link_key] = true -- Following only works for language en, but it should be safe on other wikis, -- and overhead of doing it generally does not seem worthwhile. local l = link:sub(1, 1):lower() .. link:sub(2) if link == id or l == id then return '[[' .. id .. ']]' elseif link .. 's' == id or l .. 's' == id then return '[[' .. id:sub(1, -2) .. ']]s' else return '[[' .. link .. '|' .. id .. ']]' end end local function variable_name(clean, unit_table) -- For slwiki, a unit name depends on the value. -- Parameter clean is the unsigned rounded value in en digits, as a string. -- Value Source Example for "m" -- integer 1: name1 meter (also is the name of the unit) -- integer 2: var{1} metra -- integer 3 and 4: var{2} metri -- integer else: var{3} metrov (0 and 5 or more) -- real/fraction: var{4} metra -- var{i} means the i'th field in unit_table.varname if it exists and has -- an i'th field, otherwise name2. -- Fields are separated with "!" and are not empty. -- A field for a unit using an SI prefix has the prefix name inserted, -- replacing '#' if found, or before the field otherwise. local vname if clean == '1' then vname = unit_table.name1 elseif unit_table.varname then local i if clean == '2' then i = 1 elseif clean == '3' or clean == '4' then i = 2 elseif clean:find('.', 1, true) then i = 4 else i = 3 end if i > 1 and varname == 'pl' then i = i - 1 end vname = split(unit_table.varname, '!')[i] end if vname then local si_name = rawget(unit_table, 'si_name') or '' local pos = vname:find('#', 1, true) if pos then vname = vname:sub(1, pos - 1) .. si_name .. vname:sub(pos + 1) else vname = si_name .. vname end return vname end return unit_table.name2 end local function linked_id(parms, unit_table, key_id, want_link, clean) -- Return final unit id (symbol or name), optionally with a wikilink, -- and update unit_table.sep if required. -- key_id is one of: 'symbol', 'sym_us', 'name1', 'name1_us', 'name2', 'name2_us'. local abbr_on = (key_id == 'symbol' or key_id == 'sym_us') if abbr_on and want_link then local symlink = rawget(unit_table, 'symlink') if symlink then return symlink -- for exceptions that have the linked symbol built-in end end local multiplier = rawget(unit_table, 'multiplier') local per = unit_table.per if per then local paren1, paren2 = '', '' -- possible parentheses around bottom unit local unit1 = per[1] -- top unit_table, or nil local unit2 = per[2] -- bottom unit_table if abbr_on then if not unit1 then unit_table.sep = '' -- no separator in "$2/acre" end if not want_link then local symbol = unit_table.symbol_raw if symbol then return symbol -- for exceptions that have the symbol built-in end end if (unit2.symbol):find('⋅', 1, true) then paren1, paren2 = '(', ')' end end local key_id2 -- unit2 is always singular if key_id == 'name2' then key_id2 = 'name1' elseif key_id == 'name2_us' then key_id2 = 'name1_us' else key_id2 = key_id end local result if abbr_on then result = '/' elseif omitsep then result = per_word elseif unit1 then result = ' ' .. per_word .. ' ' else result = per_word .. ' ' end if want_link and unit_table.link then if abbr_on or not varname then result = (unit1 and linked_id(parms, unit1, key_id, false, clean) or '') .. result .. linked_id(parms, unit2, key_id2, false, '1') else result = (unit1 and variable_name(clean, unit1) or '') .. result .. variable_name('1', unit2) end if omit_separator(result) then unit_table.sep = '' end return make_link(unit_table.link, result, unit_table) end if unit1 then result = linked_id(parms, unit1, key_id, want_link, clean) .. result if unit1.sep then unit_table.sep = unit1.sep end elseif omitsep then unit_table.sep = '' end return result .. paren1 .. linked_id(parms, unit2, key_id2, want_link, '1') .. paren2 end if multiplier then -- A multiplier (like "100" in "100km") forces the unit to be plural. multiplier = from_en(multiplier) if not omitsep then multiplier = multiplier .. (abbr_on and '&nbsp;' or ' ') end if not abbr_on then if key_id == 'name1' then key_id = 'name2' elseif key_id == 'name1_us' then key_id = 'name2_us' end end else multiplier = '' end local id = unit_table.fixed_name or ((varname and not abbr_on) and variable_name(clean, unit_table) or unit_table[key_id]) if omit_separator(id) then unit_table.sep = '' end if want_link then local link = data_code.link_exceptions[unit_table.linkey or unit_table.symbol] or unit_table.link if link then local before = '' local i = unit_table.customary if i == 1 and parms.opt_sp_us then i = 2 -- show "U.S." not "US" end if i == 3 and abbr_on then i = 4 -- abbreviate "imperial" to "imp" end local customary = text_code.customary_units[i] if customary then -- LATER: This works for language en only, but it's esoteric so ignore for now. local pertext if id:sub(1, 1) == '/' then -- Want unit "/USgal" to display as "/U.S. gal", not "U.S. /gal". pertext = '/' id = id:sub(2) elseif id:sub(1, 4) == 'per ' then -- Similarly want "per U.S. gallon", not "U.S. per gallon" (but in practice this is unlikely to be used). pertext = 'per ' id = id:sub(5) else pertext = '' end -- Omit any "US"/"U.S."/"imp"/"imperial" from start of id since that will be inserted. local removes = (i < 3) and { 'US&nbsp;', 'US ', 'U.S.&nbsp;', 'U.S. ' } or { 'imp&nbsp;', 'imp ', 'imperial ' } for _, prefix in ipairs(removes) do local plen = #prefix if id:sub(1, plen) == prefix then id = id:sub(plen + 1) break end end before = pertext .. make_link(customary.link, customary[1]) .. ' ' end id = before .. make_link(link, id, unit_table) end end return multiplier .. id end local function make_id(parms, which, unit_table) -- Return id, f where -- id = unit name or symbol, possibly modified -- f = true if id is a name, or false if id is a symbol -- using the value for index 'which', and for 'in' or 'out' (unit_table.inout). -- Result is '' if no symbol/name is to be used. -- In addition, set unit_table.sep = ' ' or '&nbsp;' or '' -- (the separator that caller will normally insert before the id). if parms.opt_values then unit_table.sep = '' return '' end local inout = unit_table.inout local info = unit_table.valinfo[which] local abbr_org = parms.abbr_org local adjectival = parms.opt_adjectival local lk = parms.lk local want_link = (lk == 'on' or lk == inout) local usename = unit_table.usename local singular = info.singular local want_name if usename then want_name = true else if abbr_org == nil then if parms.wantname then want_name = true end if unit_table.usesymbol then want_name = false end end if want_name == nil then local abbr = parms.abbr if abbr == 'on' or abbr == inout or (abbr == 'mos' and inout == 'out') then want_name = false else want_name = true end end end local key if want_name then if lk == nil and unit_table.builtin == 'hand' then want_link = true end if parms.opt_use_nbsp then unit_table.sep = '&nbsp;' else unit_table.sep = ' ' end if parms.opt_singular then local value if inout == 'in' then value = info.value else value = info.absvalue end if value then -- some unusual units do not always set value field value = abs(value) singular = (0 < value and value < 1.0001) end end if unit_table.engscale then -- engscale: so "|1|e3kg" gives "1 thousand kilograms" (plural) singular = false end key = (adjectival or singular) and 'name1' or 'name2' if parms.opt_sp_us then key = key .. '_us' end else if unit_table.builtin == 'hand' then if parms.opt_hand_hh then unit_table.symbol = 'hh' -- LATER: might want i18n applied to this end end unit_table.sep = '&nbsp;' key = parms.opt_sp_us and 'sym_us' or 'symbol' end return linked_id(parms, unit_table, key, want_link, info.clean), want_name end local function decorate_value(parms, unit_table, which, number_word) -- If needed, update unit_table so values will be shown with extra information. -- For consistency with the old template (but different from fmtpower), -- the style to display powers of 10 includes "display:none" to allow some -- browsers to copy, for example, "10³" as "10^3", rather than as "103". local info local engscale = unit_table.engscale local prefix = unit_table.vprefix if engscale or prefix then info = unit_table.valinfo[which] if info.decorated then return -- do not redecorate if repeating convert end info.decorated = true if engscale then local inout = unit_table.inout local abbr = parms.abbr if (abbr == 'on' or abbr == inout) and not parms.number_word then info.show = info.show .. '<span style="margin-left:0.2em">×<span style="margin-left:0.1em">' .. from_en('10') .. '</span></span><s style="display:none">^</s><sup>' .. from_en(tostring(engscale.exponent)) .. '</sup>' elseif number_word then local number_id local lk = parms.lk if lk == 'on' or lk == inout then number_id = make_link(engscale.link, engscale[1]) else number_id = engscale[1] end -- WP:NUMERAL recommends "&nbsp;" in values like "12 million". info.show = info.show .. (parms.opt_adjectival and '-' or '&nbsp;') .. number_id end end if prefix then info.show = prefix .. info.show end end end local function process_input(parms, in_current) -- Processing required once per conversion. -- Return block of text to represent input (value/unit). if parms.opt_output_only or parms.opt_output_number_only or parms.opt_output_unit_only then parms.joins = { '', '' } return '' end local first_unit local composite = in_current.composite -- nil or table of units if composite then first_unit = composite[1] else first_unit = in_current end local id1, want_name = make_id(parms, 1, first_unit) local sep = first_unit.sep -- separator between value and unit, set by make_id local preunit = parms.preunit1 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_input_unit_only then parms.joins = { '', '' } if composite then local parts = { id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, (make_id(parms, 1, unit))) end end id1 = table.concat(parts, ' ') end if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if parms.opt_also_symbol and not composite and not parms.opt_flip then local join1 = parms.joins[1] if join1 == ' (' or join1 == ' [' then parms.joins = { ' [' .. first_unit[parms.opt_sp_us and 'sym_us' or 'symbol'] .. ']' .. join1 , parms.joins[2] } end end if in_current.builtin == 'mach' and first_unit.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = first_unit.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. local prefix2 = make_id(parms, 2, first_unit) .. '&nbsp;' result = range_text(range[1], want_name, parms, result, prefix2 .. valinfo[2].show, 'in', {spaced=true}) end return preunit .. result end if composite then -- Simplify: assume there is no range, and no decoration. local mid = (not parms.opt_flip) and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end if omitsep and sep == '' then -- Testing the id of the most significant unit should be sufficient. sep1 = '' sep2 = '' end local parts = { first_unit.valinfo[1].show .. sep1 .. id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, unit.valinfo[1].show .. sep1 .. (make_id(parms, 1, unit))) end end return table.concat(parts, sep2) .. mid end local add_unit = (parms.abbr == 'mos') or parms[parms.opt_flip and 'out_range_x' or 'in_range_x'] or (not want_name and parms.abbr_range_x) local range = parms.range if range and not add_unit then unlink(first_unit) end local id = range and make_id(parms, range.n + 1, first_unit) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, 'in') if was_hyphenated then add_unit = false end local result local valinfo = first_unit.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, first_unit, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. first_unit.sep .. (i == 0 and id1 or make_id(parms, i+1, first_unit)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, 'in') end end else decorate_value(parms, first_unit, 1, true) result = valinfo[1].show end return result .. preunit .. extra end local function process_one_output(parms, out_current) -- Processing required for each output unit. -- Return block of text to represent output (value/unit). local inout = out_current.inout -- normally 'out' but can be 'in' for order=out local id1, want_name = make_id(parms, 1, out_current) local sep = out_current.sep -- set by make_id local preunit = parms.preunit2 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_output_unit_only then if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if out_current.builtin == 'mach' and out_current.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = out_current.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. result = range_text(range[1], want_name, parms, result, prefix .. valinfo[2].show, inout, {spaced=true}) end return preunit .. result end local add_unit = (parms[parms.opt_flip and 'in_range_x' or 'out_range_x'] or (not want_name and parms.abbr_range_x)) and not parms.opt_output_number_only local range = parms.range if range and not add_unit then unlink(out_current) end local id = range and make_id(parms, range.n + 1, out_current) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, inout) if was_hyphenated then add_unit = false end local result local valinfo = out_current.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, out_current, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. out_current.sep .. (i == 0 and id1 or make_id(parms, i+1, out_current)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, inout) end end else decorate_value(parms, out_current, 1, true) result = valinfo[1].show end if parms.opt_output_number_only then return result end return result .. preunit .. extra end local function make_output_single(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for a single output (which is not a combination or a multiple); -- or return false, t where t is an error message table. if parms.opt_order_out and in_unit_table.unitcode == out_unit_table.unitcode then out_unit_table.valinfo = in_unit_table.valinfo else out_unit_table.valinfo = collection() for _, v in ipairs(in_unit_table.valinfo) do local success, info = cvtround(parms, v, in_unit_table, out_unit_table) if not success then return false, info end out_unit_table.valinfo:add(info) end end return true, process_one_output(parms, out_unit_table) end local function make_output_multiple(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for an output which is a multiple (like 'ftin'); -- or return false, t where t is an error message table. local inout = out_unit_table.inout -- normally 'out' but can be 'in' for order=out local multiple = out_unit_table.multiple -- table of scaling factors (will not be nil) local combos = out_unit_table.combination -- table of unit tables (will not be nil) local abbr = parms.abbr local abbr_org = parms.abbr_org local disp = parms.disp local want_name = (abbr_org == nil and (disp == 'or' or disp == 'slash')) or not (abbr == 'on' or abbr == inout or abbr == 'mos') local want_link = (parms.lk == 'on' or parms.lk == inout) local mid = parms.opt_flip and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end local do_spell = parms.opt_spell_out parms.opt_spell_out = nil -- so the call to cvtround does not spell the value local function make_result(info, isfirst) local fmt, outvalue, sign local results = {} for i = 1, #combos do local tfrac, thisvalue, strforce local out_current = combos[i] out_current.inout = inout local scale = multiple[i] if i == 1 then -- least significant unit ('in' from 'ftin') local decimals out_current.frac = out_unit_table.frac local success, outinfo = cvtround(parms, info, in_unit_table, out_current) if not success then return false, outinfo end if isfirst then out_unit_table.valinfo = { outinfo } -- in case output value of first least significant unit is needed end sign = outinfo.sign tfrac = outinfo.fraction_table if outinfo.is_scientific then strforce = outinfo.show decimals = '' elseif tfrac then decimals = '' else local show = outinfo.show -- number as a string in local language local p1, p2 = show:find(numdot, 1, true) decimals = p1 and show:sub(p2 + 1) or '' -- text after numdot, if any end fmt = '%.' .. ulen(decimals) .. 'f' -- to reproduce precision if decimals == '' then if tfrac then outvalue = floor(outinfo.raw_absvalue) -- integer part only; fraction added later else outvalue = floor(outinfo.raw_absvalue + 0.5) -- keep all integer digits of least significant unit end else outvalue = outinfo.absvalue end end if scale then outvalue, thisvalue = divide(outvalue, scale) else thisvalue = outvalue end local id if want_name then if varname then local clean if strforce or tfrac then clean = '.1' -- dummy value to force name for floating point else clean = format(fmt, thisvalue) end id = variable_name(clean, out_current) else local key = 'name2' if parms.opt_adjectival then key = 'name1' elseif tfrac then if thisvalue == 0 then key = 'name1' end elseif parms.opt_singular then if 0 < thisvalue and thisvalue < 1.0001 then key = 'name1' end else if thisvalue == 1 then key = 'name1' end end id = out_current[key] end else id = out_current['symbol'] end if i == 1 and omit_separator(id) then -- Testing the id of the least significant unit should be sufficient. sep1 = '' sep2 = '' end if want_link then local link = out_current.link if link then id = make_link(link, id, out_current) end end local strval local spell_inout = (i == #combos or outvalue == 0) and inout or '' -- trick so the last value processed (first displayed) has uppercase, if requested if strforce and outvalue == 0 then sign = '' -- any sign is in strforce strval = strforce -- show small values in scientific notation; will only use least significant unit elseif tfrac then local wholestr = (thisvalue > 0) and tostring(thisvalue) or nil strval = format_fraction(parms, spell_inout, false, wholestr, tfrac.numstr, tfrac.denstr, do_spell) else strval = (thisvalue == 0) and from_en('0') or with_separator(parms, format(fmt, thisvalue)) if do_spell then strval = spell_number(parms, spell_inout, strval) or strval end end table.insert(results, strval .. sep1 .. id) if outvalue == 0 then break end fmt = '%.0f' -- only least significant unit can have a non-integral value end local reversed, count = {}, #results for i = 1, count do reversed[i] = results[count + 1 - i] end return true, sign .. table.concat(reversed, sep2) end local valinfo = in_unit_table.valinfo local success, result = make_result(valinfo[1], true) if not success then return false, result end local range = parms.range if range then for i = 1, range.n do local success, result2 = make_result(valinfo[i+1]) if not success then return false, result2 end result = range_text(range[i], want_name, parms, result, result2, inout, {spaced=true}) end end return true, result .. mid end local function process(parms, in_unit_table, out_unit_table) -- Return true, s, outunit where s = final wikitext result, -- or return false, t where t is an error message table. linked_pages = {} local success, bad_output local bad_input_mcode = in_unit_table.bad_mcode -- nil if input unit is a valid convert unit local out_unit = parms.out_unit if out_unit == nil or out_unit == '' or type(out_unit) == 'function' then if bad_input_mcode or parms.opt_input_unit_only then bad_output = '' else local getdef = type(out_unit) == 'function' and out_unit or get_default success, out_unit = getdef(in_unit_table.valinfo[1].value, in_unit_table) parms.out_unit = out_unit if not success then bad_output = out_unit end end end if not bad_output and not out_unit_table then success, out_unit_table = lookup(parms, out_unit, 'any_combination') if success then local mismatch = check_mismatch(in_unit_table, out_unit_table) if mismatch then bad_output = mismatch end else bad_output = out_unit_table end end local lhs, rhs local flipped = parms.opt_flip and not bad_input_mcode if bad_output then rhs = (bad_output == '') and '' or message(parms, bad_output) elseif parms.opt_input_unit_only then rhs = '' else local combos -- nil (for 'ft' or 'ftin'), or table of unit tables (for 'm ft') if not out_unit_table.multiple then -- nil/false ('ft' or 'm ft'), or table of factors ('ftin') combos = out_unit_table.combination end local frac = parms.frac -- nil or denominator of fraction for output values if frac then -- Apply fraction to the unit (if only one), or to non-SI units (if a combination), -- except that if a precision is also specified, the fraction only applies to -- the hand unit; that allows the following result: -- {{convert|156|cm|in hand|1|frac=2}} → 156 centimetres (61.4 in; 15.1½ hands) -- However, the following is handled elsewhere as a special case: -- {{convert|156|cm|hand in|1|frac=2}} → 156 centimetres (15.1½ hands; 61½ in) if combos then local precision = parms.precision for _, unit in ipairs(combos) do if unit.builtin == 'hand' or (not precision and not unit.prefixes) then unit.frac = frac end end else out_unit_table.frac = frac end end local outputs = {} local imax = combos and #combos or 1 -- 1 (single unit) or number of unit tables if imax == 1 then parms.opt_order_out = nil -- only useful with an output combination end if not flipped and not parms.opt_order_out then -- Process left side first so any duplicate links (from lk=on) are suppressed -- on right. Example: {{convert|28|e9pc|e9ly|abbr=off|lk=on}} lhs = process_input(parms, in_unit_table) end for i = 1, imax do local success, item local out_current = combos and combos[i] or out_unit_table out_current.inout = 'out' if i == 1 then if imax > 1 and out_current.builtin == 'hand' then out_current.out_next = combos[2] -- built-in hand can influence next unit in a combination end if parms.opt_order_out then out_current.inout = 'in' end end if out_current.multiple then success, item = make_output_multiple(parms, in_unit_table, out_current) else success, item = make_output_single(parms, in_unit_table, out_current) end if not success then return false, item end outputs[i] = item end if parms.opt_order_out then lhs = outputs[1] table.remove(outputs, 1) end local sep = parms.table_joins and parms.table_joins[2] or parms.join_between rhs = table.concat(outputs, sep) end if flipped or not lhs then local input = process_input(parms, in_unit_table) if flipped then lhs = rhs rhs = input else lhs = input end end if parms.join_before then lhs = parms.join_before .. lhs end local wikitext if bad_input_mcode then if bad_input_mcode == '' then wikitext = lhs else wikitext = lhs .. message(parms, bad_input_mcode) end elseif parms.table_joins then wikitext = parms.table_joins[1] .. lhs .. parms.table_joins[2] .. rhs else wikitext = lhs .. parms.joins[1] .. rhs .. parms.joins[2] end if parms.warnings and not bad_input_mcode then wikitext = wikitext .. parms.warnings end return true, get_styles(parms) .. wikitext, out_unit_table end local function main_convert(frame) -- Do convert, and if needed, do it again with higher default precision. local parms = { frame = frame } -- will hold template arguments, after translation set_config(frame.args) local success, result = get_parms(parms, frame:getParent().args) if success then if type(result) ~= 'table' then return tostring(result) end local in_unit_table = result local out_unit_table for _ = 1, 2 do -- use counter so cannot get stuck repeating convert success, result, out_unit_table = process(parms, in_unit_table, out_unit_table) if success and parms.do_convert_again then parms.do_convert_again = false else break end end end -- If input=x gives a problem, the result should be just the user input -- (if x is a property like P123 it has been replaced with ''). -- An unknown input unit would display the input and an error message -- with success == true at this point. -- Also, can have success == false with a message that outputs an empty string. if parms.input_text then if success and not parms.have_problem then return result end local cat if parms.tracking then -- Add a tracking category using the given text as the category sort key. -- There is currently only one type of tracking, but in principle multiple -- items could be tracked, using different sort keys for convenience. cat = wanted_category('tracking', parms.tracking) end return parms.input_text .. (cat or '') end return success and result or message(parms, result) end local function _unit(unitcode, options) -- Helper function for Module:Val to look up a unit. -- Parameter unitcode must be a string to identify the wanted unit. -- Parameter options must be nil or a table with optional fields: -- value = number (for sort key; default value is 1) -- scaled_top = nil for a normal unit, or a number for a unit which is -- the denominator of a per unit (for sort key) -- si = { 'symbol', 'link' } -- (a table with two strings) to make an SI unit -- that will be used for the look up -- link = true if result should be [[linked]] -- sort = 'on' or 'debug' if result should include a sort key in a -- span element ('debug' makes the key visible) -- name = true for the name of the unit instead of the symbol -- us = true for the US spelling of the unit, if any -- Return nil if unitcode is not a non-empty string. -- Otherwise return a table with fields: -- text = requested symbol or name of unit, optionally linked -- scaled_value = input value adjusted by unit scale; used for sort key -- sortspan = span element with sort key like that provided by {{ntsh}}, -- calculated from the result of converting value -- to a base unit with scale 1. -- unknown = true if the unitcode was not known unitcode = strip(unitcode) if unitcode == nil or unitcode == '' then return nil end set_config({}) linked_pages = {} options = options or {} local parms = { abbr = options.name and 'off' or 'on', lk = options.link and 'on' or nil, opt_sp_us = options.us and true or nil, opt_ignore_error = true, -- do not add pages using this function to 'what links here' for Module:Convert/extra opt_sortable_on = options.sort == 'on' or options.sort == 'debug', opt_sortable_debug = options.sort == 'debug', } if options.si then -- Make a dummy table of units (just one unit) for lookup to use. -- This makes lookup recognize any SI prefix in the unitcode. local symbol = options.si[1] or '?' parms.unittable = { [symbol] = { _name1 = symbol, _name2 = symbol, _symbol = symbol, utype = symbol, scale = symbol == 'g' and 0.001 or 1, prefixes = 1, default = symbol, link = options.si[2], }} end local success, unit_table = lookup(parms, unitcode, 'no_combination') if not success then unit_table = setmetatable({ symbol = unitcode, name2 = unitcode, utype = unitcode, scale = 1, default = '', defkey = '', linkey = '' }, unit_mt) end local value = tonumber(options.value) or 1 local clean = tostring(abs(value)) local info = { value = value, altvalue = value, singular = (clean == '1'), clean = clean, show = clean, } unit_table.inout = 'in' unit_table.valinfo = { info } local sortspan, scaled_value if options.sort then sortspan, scaled_value = make_table_or_sort(parms, value, info, unit_table, options.scaled_top) end return { text = make_id(parms, 1, unit_table), sortspan = sortspan, scaled_value = scaled_value, unknown = not success and true or nil, } end return { convert = main_convert, _unit = _unit } lh3b5yxbownw382vst8dwy5ungn7knn Modul:Convert/data 828 283 844 843 2024-08-09T09:21:31Z Jon Harald Søby 58 4 semakan diimportkan 843 Scribunto text/plain -- Conversion data used by [[Modul:Convert]] which uses mw.loadData() for -- read-only access to this module so that it is loaded only once per page. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- -- These data tables follow: -- all_units all properties for a unit, including default output -- default_exceptions exceptions for default output ('kg' and 'g' have different defaults) -- link_exceptions exceptions for links ('kg' and 'g' have different links) -- -- These tables are generated by a script which reads the wikitext of a page that -- documents the required properties of each unit; see [[:en:Module:Convert/doc]]. --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local all_units = { ["Gy"] = { _name1 = "gray", _symbol = "Gy", utype = "absorbed radiation dose", scale = 1, prefixes = 1, default = "rad", link = "Gray (unit)", }, ["rad"] = { _name1 = "rad", _symbol = "rad", utype = "absorbed radiation dose", scale = 0.01, prefixes = 1, default = "Gy", link = "Rad (unit)", }, ["cm/s2"] = { name1 = "centimetre per second squared", name1_us = "centimeter per second squared", name2 = "centimetres per second squared", name2_us = "centimeters per second squared", symbol = "cm/s<sup>2</sup>", utype = "acceleration", scale = 0.01, default = "ft/s2", link = "Gal (unit)", }, ["ft/s2"] = { name1 = "foot per second squared", name2 = "feet per second squared", symbol = "ft/s<sup>2</sup>", utype = "acceleration", scale = 0.3048, default = "m/s2", }, ["g0"] = { name1 = "standard gravity", name2 = "standard gravities", symbol = "''g''<sub>0</sub>", utype = "acceleration", scale = 9.80665, default = "m/s2", }, ["g-force"] = { name2 = "''g''", symbol = "''g''", utype = "acceleration", scale = 9.80665, default = "m/s2", link = "g-force", }, ["km/hs"] = { name1 = "kilometre per hour per second", name1_us = "kilometer per hour per second", name2 = "kilometres per hour per second", name2_us = "kilometers per hour per second", symbol = "km/(h⋅s)", utype = "acceleration", scale = 0.27777777777777779, default = "mph/s", link = "Acceleration", }, ["km/s2"] = { name1 = "kilometre per second squared", name1_us = "kilometer per second squared", name2 = "kilometres per second squared", name2_us = "kilometers per second squared", symbol = "km/s<sup>2</sup>", utype = "acceleration", scale = 1000, default = "mph/s", link = "Acceleration", }, ["m/s2"] = { name1 = "metre per second squared", name1_us = "meter per second squared", name2 = "metres per second squared", name2_us = "meters per second squared", symbol = "m/s<sup>2</sup>", utype = "acceleration", scale = 1, default = "ft/s2", }, ["mph/s"] = { name1 = "mile per hour per second", name2 = "miles per hour per second", symbol = "mph/s", utype = "acceleration", scale = 0.44704, default = "km/hs", link = "Acceleration", }, ["km/h/s"] = { target = "km/hs", }, ["standard gravity"] = { target = "g0", }, ["1000sqft"] = { name1 = "thousand square feet", name2 = "thousand square feet", symbol = "1000&nbsp;sq&nbsp;ft", utype = "area", scale = 92.90304, default = "m2", link = "Square foot", }, ["a"] = { _name1 = "are", _symbol = "a", utype = "area", scale = 100, prefixes = 1, default = "sqft", link = "Hectare#Are", }, ["acre"] = { symbol = "acre", usename = 1, utype = "area", scale = 4046.8564224, default = "ha", subdivs = { ["rood"] = { 4, default = "ha" }, ["sqperch"] = { 160, default = "ha" } }, }, ["acre-sing"] = { target = "acre", }, ["arpent"] = { symbol = "arpent", usename = 1, utype = "area", scale = 3418.89, default = "ha", }, ["cda"] = { name1 = "cuerda", symbol = "cda", utype = "area", scale = 3930.395625, default = "ha acre", }, ["daa"] = { name1 = "decare", symbol = "daa", utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunam"] = { symbol = "dunam", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunum"] = { symbol = "dunum", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", link = "Dunam", }, ["ha"] = { name1 = "hectare", symbol = "ha", utype = "area", scale = 10000, default = "acre", }, ["hectare"] = { name1 = "hectare", symbol = "ha", usename = 1, utype = "area", scale = 10000, default = "acre", }, ["Irish acre"] = { name1 = "Irish acre", symbol = "Irish&nbsp;acres", utype = "area", scale = 6555.2385024, default = "ha", link = "Acre (Irish)", }, ["m2"] = { _name1 = "square metre", _name1_us= "square meter", _symbol = "m<sup>2</sup>", prefix_position= 8, utype = "area", scale = 1, prefixes = 2, default = "sqft", link = "Square metre", }, ["pondemaat"] = { name1 = "pondemaat", name2 = "pondemaat", symbol = "pond", utype = "area", scale = 3674.363358816, default = "m2", link = ":nl:pondemaat", }, ["pyeong"] = { name2 = "pyeong", symbol = "pyeong", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", }, ["rai"] = { name2 = "rai", symbol = "rai", utype = "area", scale = 1600, default = "m2", link = "Rai (unit)", }, ["rood"] = { symbol = "rood", usename = 1, utype = "area", scale = 1011.7141056, default = "sqft m2", subdivs = { ["sqperch"] = { 40, default = "m2" } }, link = "Rood (unit)", }, ["sqfoot"] = { name1 = "square foot", name2 = "square foot", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqft"] = { name1 = "square foot", name2 = "square feet", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqin"] = { name1 = "square inch", name2 = "square inches", symbol = "sq&nbsp;in", utype = "area", scale = 0.00064516, default = "cm2", }, ["sqmi"] = { name1 = "square mile", symbol = "sq&nbsp;mi", utype = "area", scale = 2589988.110336, default = "km2", }, ["sqnmi"] = { name1 = "square nautical mile", symbol = "sq&nbsp;nmi", utype = "area", scale = 3429904, default = "km2 sqmi", link = "Nautical mile", }, ["sqperch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "area", scale = 25.29285264, default = "m2", link = "Rod (unit)#Area and volume", }, ["sqverst"] = { symbol = "square verst", usename = 1, utype = "area", scale = 1138062.24, default = "km2 sqmi", link = "Verst", }, ["sqyd"] = { name1 = "square yard", symbol = "sq&nbsp;yd", utype = "area", scale = 0.83612736, default = "m2", }, ["tsubo"] = { name2 = "tsubo", symbol = "tsubo", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", link = "Japanese units of measurement#Area", }, ["acres"] = { target = "acre", }, ["are"] = { target = "a", }, ["decare"] = { target = "daa", }, ["foot2"] = { target = "sqfoot", }, ["ft2"] = { target = "sqft", }, ["in2"] = { target = "sqin", symbol = "in<sup>2</sup>", }, ["km²"] = { target = "km2", }, ["mi2"] = { target = "sqmi", }, ["million acre"] = { target = "e6acre", }, ["million acres"] = { target = "e6acre", }, ["million hectares"] = { target = "e6ha", }, ["m²"] = { target = "m2", }, ["nmi2"] = { target = "sqnmi", }, ["pond"] = { target = "pondemaat", }, ["sq arp"] = { target = "arpent", }, ["sqkm"] = { target = "km2", }, ["sqm"] = { target = "m2", }, ["square verst"] = { target = "sqverst", }, ["verst2"] = { target = "sqverst", }, ["yd2"] = { target = "sqyd", }, ["m2/ha"] = { name1 = "square metre per hectare", name1_us = "square meter per hectare", name2 = "square metres per hectare", name2_us = "square meters per hectare", symbol = "m<sup>2</sup>/ha", utype = "area per unit area", scale = 0.0001, default = "sqft/acre", link = "Basal area", }, ["sqft/acre"] = { name1 = "square foot per acre", name2 = "square feet per acre", symbol = "sq&nbsp;ft/acre", utype = "area per unit area", scale = 2.295684113865932e-5, default = "m2/ha", link = "Basal area", }, ["cent"] = { name1 = "cent", symbol = "¢", utype = "cent", scale = 1, default = "cent", link = "Cent (currency)", }, ["¢"] = { target = "cent", }, ["A.h"] = { name1 = "ampere hour", symbol = "A⋅h", utype = "charge", scale = 3600, default = "coulomb", }, ["coulomb"] = { _name1 = "coulomb", _symbol = "C", utype = "charge", scale = 1, prefixes = 1, default = "e", link = "Coulomb", }, ["e"] = { name1 = "elementary charge", symbol = "''e''", utype = "charge", scale = 1.602176487e-19, default = "coulomb", }, ["g-mol"] = { name1 = "gram-mole", symbol = "g&#8209;mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["gmol"] = { name1 = "gram-mole", symbol = "gmol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kmol"] = { name1 = "kilomole", symbol = "kmol", utype = "chemical amount", scale = 1000, default = "lbmol", link = "Mole (unit)", }, ["lb-mol"] = { name1 = "pound-mole", symbol = "lb&#8209;mol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["lbmol"] = { name1 = "pound-mole", symbol = "lbmol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["mol"] = { name1 = "mole", symbol = "mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kgCO2/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg(CO<sub>2</sub>)/L", utype = "co2 per unit volume", scale = 1000, default = "lbCO2/USgal", link = "Exhaust gas", }, ["lbCO2/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lbCO2/US&nbsp;gal", utype = "co2 per unit volume", scale = 119.82642731689663, default = "kgCO2/L", link = "Exhaust gas", }, ["oz/lb"] = { per = { "oz", "lb" }, utype = "concentration", default = "mg/kg", }, ["mg/kg"] = { per = { "mg", "kg" }, utype = "concentration", default = "oz/lb", }, ["g/dm3"] = { name1 = "gram per cubic decimetre", name1_us = "gram per cubic decimeter", name2 = "grams per cubic decimetre", name2_us = "grams per cubic decimeter", symbol = "g/dm<sup>3</sup>", utype = "density", scale = 1, default = "kg/m3", link = "Density", }, ["g/L"] = { name1 = "gram per litre", name1_us = "gram per liter", name2 = "grams per litre", name2_us = "grams per liter", symbol = "g/L", utype = "density", scale = 1, default = "lb/cuin", link = "Density", }, ["g/mL"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/mL", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["g/ml"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/ml", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["kg/dm3"] = { name1 = "kilogram per cubic decimetre", name1_us = "kilogram per cubic decimeter", name2 = "kilograms per cubic decimetre", name2_us = "kilograms per cubic decimeter", symbol = "kg/dm<sup>3</sup>", utype = "density", scale = 1000, default = "lb/cuft", link = "Density", }, ["kg/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/L", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/l"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/l", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/m3"] = { name1 = "kilogram per cubic metre", name1_us = "kilogram per cubic meter", name2 = "kilograms per cubic metre", name2_us = "kilograms per cubic meter", symbol = "kg/m<sup>3</sup>", utype = "density", scale = 1, default = "lb/cuyd", link = "Density", }, ["lb/cuft"] = { name1 = "pound per cubic foot", name2 = "pounds per cubic foot", symbol = "lb/cu&nbsp;ft", utype = "density", scale = 16.018463373960142, default = "g/cm3", link = "Density", }, ["lb/cuin"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&nbsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/cuyd"] = { name1 = "pound per cubic yard", name2 = "pounds per cubic yard", symbol = "lb/cu&nbsp;yd", utype = "density", scale = 0.5932764212577829, default = "kg/m3", link = "Density", }, ["lb/impgal"] = { name1 = "pound per imperial gallon", name2 = "pounds per imperial gallon", symbol = "lb/imp&nbsp;gal", utype = "density", scale = 99.776372663101697, default = "kg/L", link = "Density", }, ["lb/in3"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/U.S.gal"] = { name1 = "pound per U.S. gallon", name2 = "pounds per U.S. gallon", symbol = "lb/U.S.&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lb/USbu"] = { name1 = "pound per US bushel", name2 = "pounds per US bushel", symbol = "lb/US&nbsp;bu", utype = "density", scale = 12.871859780974471, default = "kg/m3", link = "Bushel", }, ["lb/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lb/US&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lbm/cuin"] = { name1 = "pound mass per cubic inch", name2 = "pounds mass per cubic inch", symbol = "lbm/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["mg/L"] = { name1 = "milligram per litre", name1_us = "milligram per liter", name2 = "milligrams per litre", name2_us = "milligrams per liter", symbol = "mg/L", utype = "density", scale = 0.001, default = "lb/cuin", link = "Density", }, ["oz/cuin"] = { name1 = "ounce per cubic inch", name2 = "ounces per cubic inch", symbol = "oz/cu&nbsp;in", utype = "density", scale = 1729.9940443876951, default = "g/cm3", link = "Density", }, ["g/cm3"] = { per = { "g", "cm3" }, utype = "density", default = "lb/cuin", }, ["g/m3"] = { per = { "g", "m3" }, utype = "density", default = "lb/cuyd", link = "Density", }, ["Mg/m3"] = { per = { "Mg", "m3" }, utype = "density", default = "lb/cuft", }, ["mg/l"] = { per = { "mg", "ll" }, utype = "density", default = "oz/cuin", }, ["μg/dL"] = { per = { "μg", "dL" }, utype = "density", default = "lb/cuin", }, ["μg/l"] = { per = { "μg", "ll" }, utype = "density", default = "oz/cuin", }, ["lb/ft3"] = { target = "lb/cuft", }, ["lb/yd3"] = { target = "lb/cuyd", }, ["lbm/in3"] = { target = "lbm/cuin", }, ["mcg/dL"] = { target = "μg/dL", }, ["oz/in3"] = { target = "oz/cuin", }, ["ug/dL"] = { target = "μg/dL", }, ["ug/l"] = { target = "μg/l", }, ["B.O.T.U."] = { name1 = "Board of Trade Unit", symbol = "B.O.T.U.", utype = "energy", scale = 3600000, default = "MJ", link = "Kilowatt-hour", }, ["bboe"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "bboe", utype = "energy", scale = 6117863200, default = "GJ", }, ["BOE"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "BOE", utype = "energy", scale = 6117863200, default = "GJ", }, ["BTU"] = { name1 = "British thermal unit", symbol = "BTU", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["Btu"] = { name1 = "British thermal unit", symbol = "Btu", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["BTU-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "BTU<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["Btu-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "Btu<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["BTU-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "BTU<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["Btu-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "Btu<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["BTU-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "BTU<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["Btu-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "Btu<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["BTU-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "BTU<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["Btu-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "Btu<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["BTU-ISO"] = { name1 = "British thermal unit (ISO)", name2 = "British thermal units (ISO)", symbol = "BTU<sub>ISO</sub>", utype = "energy", scale = 1055.056, default = "kJ", link = "British thermal unit", }, ["Btu-ISO"] = { target = "BTU-ISO", }, ["BTU-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "BTU<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["Btu-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "Btu<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["BTU-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "BTU<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["Btu-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "Btu<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["BTU-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "BTU<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Btu-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "Btu<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Cal"] = { name1 = "calorie", symbol = "Cal", utype = "energy", scale = 4184, default = "kJ", }, ["cal"] = { name1 = "calorie", symbol = "cal", utype = "energy", scale = 4.184, default = "J", }, ["Cal-15"] = { name1 = "Calorie (15°C)", name2 = "Calories (15°C)", symbol = "Cal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["cal-15"] = { name1 = "calorie (15°C)", name2 = "calories (15°C)", symbol = "cal<sub>15</sub>", utype = "energy", scale = 4.1858, default = "J", link = "Calorie", }, ["Cal-IT"] = { name1 = "Calorie (International Steam Table)", name2 = "Calories (International Steam Table)", symbol = "Cal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["cal-IT"] = { name1 = "calorie (International Steam Table)", name2 = "calories (International Steam Table)", symbol = "cal<sub>IT</sub>", utype = "energy", scale = 4.1868, default = "J", link = "Calorie", }, ["Cal-th"] = { name1 = "Calorie (thermochemical)", name2 = "Calories (thermochemical)", symbol = "Cal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["cal-th"] = { name1 = "calorie (thermochemical)", name2 = "calories (thermochemical)", symbol = "cal<sub>th</sub>", utype = "energy", scale = 4.184, default = "J", link = "Calorie", }, ["CHU-IT"] = { name1 = "Celsius heat unit (International Table)", name2 = "Celsius heat units (International Table)", symbol = "CHU<sub>IT</sub>", utype = "energy", scale = 1899.100534716, default = "kJ", link = "Conversion of units#Energy", }, ["cufootnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic foot of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["cuftnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic feet of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["Eh"] = { name1 = "Hartree", symbol = "''E''<sub>h</sub>", utype = "energy", scale = 4.35974417e-18, default = "eV", }, ["erg"] = { symbol = "erg", utype = "energy", scale = 0.0000001, default = "μJ", }, ["eV"] = { name1 = "electronvolt", symbol = "eV", utype = "energy", scale = 1.602176487e-19, default = "aJ", }, ["feV"] = { name1 = "femtoelectronvolt", symbol = "feV", utype = "energy", scale = 1.602176487e-34, default = "yJ", link = "Electronvolt", }, ["foe"] = { symbol = "foe", utype = "energy", scale = 1e44, default = "YJ", link = "Foe (unit)", }, ["ftlb"] = { name1 = "foot-pound", symbol = "ft⋅lb", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlb-f"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlbf"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lbf", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftpdl"] = { name1 = "foot-poundal", symbol = "ft⋅pdl", utype = "energy", scale = 0.0421401100938048, default = "J", }, ["GeV"] = { name1 = "gigaelectronvolt", symbol = "GeV", utype = "energy", scale = 1.602176487e-10, default = "nJ", link = "Electronvolt", }, ["gTNT"] = { name2 = "grams of TNT", symbol = "gram of TNT", usename = 1, utype = "energy", scale = 4184, default = "kJ", link = "TNT equivalent", }, ["Gtoe"] = { name1 = "gigatonne of oil equivalent", name2 = "gigatonnes of oil equivalent", symbol = "Gtoe", utype = "energy", scale = 4.1868e19, default = "EJ", link = "Tonne of oil equivalent", }, ["GtonTNT"] = { name2 = "gigatons of TNT", symbol = "gigaton of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GtTNT"] = { name2 = "gigatonnes of TNT", symbol = "gigatonne of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GW.h"] = { name1 = "gigawatt-hour", symbol = "GW⋅h", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["GWh"] = { name1 = "gigawatt-hour", symbol = "GWh", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["hph"] = { name1 = "horsepower-hour", symbol = "hp⋅h", utype = "energy", scale = 2684519.537696172792, default = "kWh", link = "Horsepower", }, ["inlb"] = { name1 = "inch-pound", symbol = "in⋅lb", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlb-f"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlbf"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lbf", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inoz-f"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅oz<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["inozf"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅ozf", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["J"] = { _name1 = "joule", _symbol = "J", utype = "energy", scale = 1, prefixes = 1, default = "cal", link = "Joule", }, ["kBOE"] = { name1 = "kilo barrel of oil equivalent", name2 = "kilo barrels of oil equivalent", symbol = "kBOE", utype = "energy", scale = 6.1178632e12, default = "TJ", link = "Barrel of oil equivalent", }, ["kcal"] = { name1 = "kilocalorie", symbol = "kcal", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kcal-15"] = { name1 = "kilocalorie (15°C)", name2 = "kilocalories (15°C)", symbol = "kcal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["kcal-IT"] = { name1 = "kilocalorie (International Steam Table)", name2 = "kilocalories (International Steam Table)", symbol = "kcal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["kcal-th"] = { name1 = "kilocalorie (thermochemical)", name2 = "kilocalories (thermochemical)", symbol = "kcal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kerg"] = { name1 = "kiloerg", symbol = "kerg", utype = "energy", scale = 0.0001, default = "mJ", link = "Erg", }, ["keV"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "energy", scale = 1.602176487e-16, default = "fJ", link = "Electronvolt", }, ["kgTNT"] = { name2 = "kilograms of TNT", symbol = "kilogram of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["kt(TNT)"] = { name1 = "kilotonne", name1_us = "kiloton", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktoe"] = { name1 = "kilotonne of oil equivalent", name2 = "kilotonnes of oil equivalent", symbol = "ktoe", utype = "energy", scale = 4.1868e13, default = "TJ", link = "Tonne of oil equivalent", }, ["ktonTNT"] = { name1 = "kiloton of TNT", name2 = "kilotons of TNT", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktTNT"] = { name2 = "kilotonnes of TNT", symbol = "kilotonne of TNT", usename = 1, utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["kW.h"] = { name1 = "kilowatt-hour", symbol = "kW⋅h", utype = "energy", scale = 3600000, default = "MJ", }, ["kWh"] = { name1 = "kilowatt-hour", symbol = "kWh", utype = "energy", scale = 3600000, default = "MJ", }, ["Mcal"] = { name1 = "megacalorie", symbol = "Mcal", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal"] = { name1 = "millicalorie", symbol = "mcal", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Mcal-15"] = { name1 = "megacalorie (15°C)", name2 = "megacalories (15°C)", symbol = "Mcal<sub>15</sub>", utype = "energy", scale = 4185800, default = "MJ", link = "Calorie", }, ["mcal-15"] = { name1 = "millicalorie (15°C)", name2 = "millicalories (15°C)", symbol = "mcal<sub>15</sub>", utype = "energy", scale = 0.0041858, default = "mJ", link = "Calorie", }, ["Mcal-IT"] = { name1 = "megacalorie (International Steam Table)", name2 = "megacalories (International Steam Table)", symbol = "Mcal<sub>IT</sub>", utype = "energy", scale = 4186800, default = "MJ", link = "Calorie", }, ["mcal-IT"] = { name1 = "millicalorie (International Steam Table)", name2 = "millicalories (International Steam Table)", symbol = "mcal<sub>IT</sub>", utype = "energy", scale = 0.0041868, default = "mJ", link = "Calorie", }, ["Mcal-th"] = { name1 = "megacalorie (thermochemical)", name2 = "megacalories (thermochemical)", symbol = "Mcal<sub>th</sub>", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal-th"] = { name1 = "millicalorie (thermochemical)", name2 = "millicalories (thermochemical)", symbol = "mcal<sub>th</sub>", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Merg"] = { name1 = "megaerg", symbol = "Merg", utype = "energy", scale = 0.1, default = "J", link = "Erg", }, ["merg"] = { name1 = "millierg", symbol = "merg", utype = "energy", scale = 0.0000000001, default = "μJ", link = "Erg", }, ["MeV"] = { name1 = "megaelectronvolt", symbol = "MeV", utype = "energy", scale = 1.602176487e-13, default = "pJ", link = "Electronvolt", }, ["meV"] = { name1 = "millielectronvolt", symbol = "meV", utype = "energy", scale = 1.602176487e-22, default = "zJ", link = "Electronvolt", }, ["MMBtu"] = { name1 = "million British thermal units", name2 = "million British thermal units", symbol = "MMBtu", utype = "energy", scale = 1055055852.62, default = "GJ", link = "British thermal unit", }, ["Mt(TNT)"] = { name1 = "megatonne", name1_us = "megaton", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["Mtoe"] = { name1 = "megatonne of oil equivalent", name2 = "megatonnes of oil equivalent", symbol = "Mtoe", utype = "energy", scale = 4.1868e16, default = "PJ", link = "Tonne of oil equivalent", }, ["MtonTNT"] = { name1 = "megaton of TNT", name2 = "megatons of TNT", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtonTNT"] = { name2 = "millitons of TNT", symbol = "milliton of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MtTNT"] = { name2 = "megatonnes of TNT", symbol = "megatonne of TNT", usename = 1, utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtTNT"] = { name2 = "millitonnes of TNT", symbol = "millitonne of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MW.h"] = { name1 = "megawatt-hour", symbol = "MW⋅h", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mW.h"] = { name1 = "milliwatt-hour", symbol = "mW⋅h", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["MWh"] = { name1 = "megawatt-hour", symbol = "MWh", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mWh"] = { name1 = "milliwatt-hour", symbol = "mWh", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["neV"] = { name1 = "nanoelectronvolt", symbol = "neV", utype = "energy", scale = 1.602176487e-28, default = "yJ", link = "Electronvolt", }, ["PeV"] = { name1 = "petaelectronvolt", symbol = "PeV", utype = "energy", scale = 0.0001602176487, default = "mJ", link = "Electronvolt", }, ["peV"] = { name1 = "picoelectronvolt", symbol = "peV", utype = "energy", scale = 1.602176487e-31, default = "yJ", link = "Electronvolt", }, ["PSh"] = { name1 = "Pferdestärkenstunde", symbol = "PSh", utype = "energy", scale = 2647795.5, default = "kWh", }, ["quad"] = { name1 = "quadrillion British thermal units", name2 = "quadrillion British thermal units", symbol = "quad", utype = "energy", scale = 1.054804e18, default = "EJ", link = "Quad (unit)", }, ["Ry"] = { name1 = "rydberg", symbol = "Ry", utype = "energy", scale = 2.1798741e-18, default = "eV", link = "Rydberg constant", }, ["scf"] = { name1 = "standard cubic foot", name2 = "standard cubic feet", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["scfoot"] = { name1 = "standard cubic foot", name2 = "standard cubic foot", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["t(TNT)"] = { name1 = "tonne", name1_us = "ton", symbol = "t", utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TeV"] = { name1 = "teraelectronvolt", symbol = "TeV", utype = "energy", scale = 1.602176487e-7, default = "μJ", link = "Electronvolt", }, ["th"] = { name1 = "thermie", symbol = "th", utype = "energy", scale = 4186800, default = "MJ", link = "Conversion of units#Energy", }, ["thm-EC"] = { name1 = "therm (EC)", name2 = "therms (EC)", symbol = "thm (EC)", utype = "energy", scale = 105506000, default = "MJ", link = "Therm", }, ["thm-UK"] = { name1 = "therm (UK)", name2 = "therms (UK)", symbol = "thm (UK)", utype = "energy", scale = 105505585.257348, default = "MJ", link = "Therm", }, ["thm-US"] = { name1 = "therm (US)", name1_us = "therm (U.S.)", name2 = "therms (US)", name2_us = "therms (U.S.)", symbol = "thm (US)", sym_us = "thm (U.S.)", utype = "energy", scale = 105480400, default = "MJ", link = "Therm", }, ["toe"] = { name1 = "tonne of oil equivalent", name2 = "tonnes of oil equivalent", symbol = "toe", utype = "energy", scale = 41868000000, default = "GJ", }, ["tonTNT"] = { name2 = "tons of TNT", symbol = "ton of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["tTNT"] = { name2 = "tonnes of TNT", symbol = "tonne of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TtonTNT"] = { name2 = "teratons of TNT", symbol = "teraton of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TtTNT"] = { name2 = "teratonnes of TNT", symbol = "teratonne of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TW.h"] = { name1 = "terawatt-hour", symbol = "TW⋅h", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["TWh"] = { name1 = "terawatt-hour", symbol = "TWh", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["W.h"] = { name1 = "watt-hour", symbol = "W⋅h", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["Wh"] = { name1 = "watt-hour", symbol = "Wh", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["μerg"] = { name1 = "microerg", symbol = "μerg", utype = "energy", scale = 1e-13, default = "nJ", link = "Erg", }, ["μeV"] = { name1 = "microelectronvolt", symbol = "μeV", utype = "energy", scale = 1.602176487e-25, default = "yJ", link = "Electronvolt", }, ["μW.h"] = { name1 = "microwatt-hour", symbol = "μW⋅h", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["μWh"] = { name1 = "microwatt-hour", symbol = "μWh", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["-kW.h"] = { target = "kW.h", link = "Kilowatt hour", }, ["btu"] = { target = "BTU", }, ["Calorie"] = { target = "Cal", }, ["ft.lbf"] = { target = "ftlbf", }, ["ft·lbf"] = { target = "ftlbf", }, ["g-cal-15"] = { target = "cal-15", }, ["g-cal-IT"] = { target = "cal-IT", }, ["g-cal-th"] = { target = "cal-th", }, ["g-kcal-15"] = { target = "kcal-15", }, ["g-kcal-IT"] = { target = "kcal-IT", }, ["g-kcal-th"] = { target = "kcal-th", }, ["g-Mcal-15"] = { target = "Mcal-15", }, ["g-mcal-15"] = { target = "mcal-15", }, ["g-Mcal-IT"] = { target = "Mcal-IT", }, ["g-mcal-IT"] = { target = "mcal-IT", }, ["g-Mcal-th"] = { target = "Mcal-th", }, ["g-mcal-th"] = { target = "mcal-th", }, ["GW-h"] = { target = "GW.h", }, ["GW·h"] = { target = "GW.h", }, ["Hartree"] = { target = "Eh", }, ["hp.h"] = { target = "hph", }, ["in.lb-f"] = { target = "inlb-f", }, ["in.lbf"] = { target = "inlbf", }, ["in.oz-f"] = { target = "inoz-f", }, ["in.ozf"] = { target = "inozf", }, ["kbboe"] = { target = "kBOE", symbol = "kbboe", }, ["kg-cal-15"] = { target = "Cal-15", }, ["kg-cal-IT"] = { target = "Cal-IT", }, ["kg-cal-th"] = { target = "Cal-th", }, ["kW-h"] = { target = "kW.h", }, ["kW·h"] = { target = "kW.h", }, ["MW-h"] = { target = "MW.h", }, ["mW-h"] = { target = "mW.h", }, ["MW·h"] = { target = "MW.h", }, ["TW-h"] = { target = "TW.h", }, ["uerg"] = { target = "μerg", }, ["ueV"] = { target = "μeV", }, ["uW-h"] = { target = "μW.h", }, ["uW.h"] = { target = "μW.h", }, ["uWh"] = { target = "μWh", }, ["W-h"] = { target = "W.h", }, ["eVpar"] = { _name1 = "electronvolt", _symbol = "eV", utype = "energy per chemical amount", scale = 96485.329522144166, prefixes = 1, default = "kcal/mol", link = "Electronvolt", }, ["kcal/mol"] = { per = { "kcal", "mol" }, utype = "energy per chemical amount", default = "kJ/mol", link = "Kilocalorie per mole", }, ["kJ/mol"] = { per = { "kJ", "mol" }, utype = "energy per chemical amount", default = "kcal/mol", link = "Joule per mole", }, ["kWh/100 km"] = { name1 = "kilowatt-hour per 100 kilometres", name1_us = "kilowatt-hour per 100 kilometers", name2 = "kilowatt-hours per 100 kilometres", name2_us = "kilowatt-hours per 100 kilometers", symbol = "kW⋅h/100&nbsp;km", utype = "energy per unit length", scale = 36, default = "MJ/km kWh/mi", link = "Kilowatt-hour", }, ["kWh/100 mi"] = { name1 = "kilowatt-hour per 100 miles", name2 = "kilowatt-hours per 100 miles", symbol = "kW⋅h/100&nbsp;mi", utype = "energy per unit length", scale = 22.3694, default = "mpge", link = "Miles per gallon gasoline equivalent", }, ["MJ/100 km"] = { name1 = "megajoule per 100 kilometres", name1_us = "megajoule per 100 kilometers", name2 = "megajoules per 100 kilometres", name2_us = "megajoules per 100 kilometers", symbol = "MJ/100&nbsp;km", utype = "energy per unit length", scale = 10, default = "BTU/mi", link = "British thermal unit", }, ["mpge"] = { name1 = "mile per gallon gasoline equivalent", name2 = "miles per gallon gasoline equivalent", symbol = "mpg&#8209;e", utype = "energy per unit length", scale = 1.3263314048360777e-5, invert = -1, iscomplex= true, default = "kWh/100 mi", link = "Miles per gallon gasoline equivalent", }, ["BTU/mi"] = { per = { "BTU", "mi" }, utype = "energy per unit length", default = "v > 1525 ! M ! k ! J/km", }, ["kJ/km"] = { per = { "kJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["kWh/km"] = { per = { "-kW.h", "km" }, utype = "energy per unit length", default = "MJ/km kWh/mi", }, ["kWh/mi"] = { per = { "-kW.h", "mi" }, utype = "energy per unit length", default = "kWh/km MJ/km", }, ["MJ/km"] = { per = { "MJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["mpg-e"] = { target = "mpge", }, ["BTU/lb"] = { name1 = "British thermal unit per pound", name2 = "British thermal units per pound", symbol = "BTU/lb", utype = "energy per unit mass", scale = 2326, default = "kJ/kg", link = "British thermal unit", }, ["cal/g"] = { name1 = "calorie per gram", name2 = "calories per gram", symbol = "cal/g", utype = "energy per unit mass", scale = 4184, default = "J/g", }, ["GJ/kg"] = { name1 = "gigajoule per kilogram", name2 = "gigajoules per kilogram", symbol = "GJ/kg", utype = "energy per unit mass", scale = 1e9, default = "ktTNT/t", link = "Specific energy", }, ["J/g"] = { name1 = "joule per gram", name2 = "joules per gram", symbol = "J/g", utype = "energy per unit mass", scale = 1000, default = "kcal/g", link = "Specific energy", }, ["kcal/g"] = { name1 = "kilocalorie per gram", name2 = "kilocalories per gram", symbol = "kcal/g", utype = "energy per unit mass", scale = 4184000, default = "kJ/g", }, ["kJ/g"] = { name1 = "kilojoule per gram", name2 = "kilojoules per gram", symbol = "kJ/g", utype = "energy per unit mass", scale = 1000000, default = "kcal/g", link = "Specific energy", }, ["kJ/kg"] = { name1 = "kilojoule per kilogram", name2 = "kilojoules per kilogram", symbol = "kJ/kg", utype = "energy per unit mass", scale = 1000, default = "BTU/lb", link = "Specific energy", }, ["ktonTNT/MT"] = { name2 = "kilotons of TNT per metric ton", symbol = "kiloton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["ktTNT/t"] = { name2 = "kilotonnes of TNT per tonne", symbol = "kilotonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["MtonTNT/MT"] = { name2 = "megatons of TNT per metric ton", symbol = "megaton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["MtTNT/MT"] = { name2 = "megatonnes of TNT per tonne", symbol = "megatonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["TJ/kg"] = { name1 = "terajoule per kilogram", name2 = "terajoules per kilogram", symbol = "TJ/kg", utype = "energy per unit mass", scale = 1e12, default = "MtTNT/MT", link = "Specific energy", }, ["Cal/g"] = { per = { "Cal", "g" }, utype = "energy per unit mass", default = "kJ/g", }, ["BTU/cuft"] = { per = { "BTU", "cuft" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(mL)serve"] = { per = { "Cal", "-12USoz(mL)serve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(ml)serve"] = { per = { "Cal", "-12USoz(ml)serve" }, utype = "energy per unit volume", default = "kJ/l", }, ["Cal/12USozserve"] = { per = { "Cal", "-12USozserve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/USoz"] = { per = { "Cal", "USoz" }, utype = "energy per unit volume", default = "kJ/ml", }, ["kJ/L"] = { per = { "kJ", "L" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/l"] = { per = { "kJ", "ll" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/ml"] = { per = { "kJ", "ml" }, utype = "energy per unit volume", default = "Cal/USoz", }, ["MJ/m3"] = { per = { "MJ", "m3" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["Sv"] = { _name1 = "sievert", _symbol = "Sv", utype = "equivalent radiation dose", scale = 1, prefixes = 1, default = "rem", link = "Sievert", }, ["rem"] = { _name1 = "rem", _symbol = "rem", utype = "equivalent radiation dose", scale = 0.01, prefixes = 1, default = "Sv", link = "Roentgen equivalent man", }, ["g/km"] = { name1 = "gram per kilometre", name1_us = "gram per kilometer", name2 = "grams per kilometre", name2_us = "grams per kilometer", symbol = "g/km", utype = "exhaust emission", scale = 1e-6, default = "oz/mi", link = "Exhaust gas", }, ["g/mi"] = { name1 = "gram per mile", name2 = "grams per mile", symbol = "g/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "g/km", link = "Exhaust gas", }, ["gCO2/km"] = { name1 = "gram of CO<sub>2</sub> per kilometre", name1_us = "gram of CO<sub>2</sub> per kilometer", name2 = "grams of CO<sub>2</sub> per kilometre", name2_us = "grams of CO<sub>2</sub> per kilometer", symbol = "g(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 1e-6, default = "ozCO2/mi", link = "Exhaust gas", }, ["gCO2/mi"] = { name1 = "gram of CO<sub>2</sub> per mile", name2 = "grams of CO<sub>2</sub> per mile", symbol = "g(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "gCO2/km", link = "Exhaust gas", }, ["kg/km"] = { name1 = "kilogram per kilometre", name1_us = "kilogram per kilometer", name2 = "kilograms per kilometre", name2_us = "kilograms per kilometer", symbol = "kg/km", utype = "exhaust emission", scale = 0.001, default = "lb/mi", link = "Exhaust gas", }, ["kgCO2/km"] = { name1 = "kilogram of CO<sub>2</sub> per kilometre", name1_us = "kilogram of CO<sub>2</sub> per kilometer", name2 = "kilograms of CO<sub>2</sub> per kilometre", name2_us = "kilograms of CO<sub>2</sub> per kilometer", symbol = "kg(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 0.001, default = "lbCO2/mi", link = "Exhaust gas", }, ["lb/mi"] = { name1 = "pound per mile", name2 = "pounds per mile", symbol = "lb/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kg/km", link = "Exhaust gas", }, ["lbCO2/mi"] = { name1 = "pound of CO<sub>2</sub> per mile", name2 = "pounds of CO<sub>2</sub> per mile", symbol = "lb(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kgCO2/km", link = "Exhaust gas", }, ["oz/mi"] = { name1 = "ounce per mile", name2 = "ounces per mile", symbol = "oz/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "g/km", link = "Exhaust gas", }, ["ozCO2/mi"] = { name1 = "ounce of CO<sub>2</sub> per mile", name2 = "ounces of CO<sub>2</sub> per mile", symbol = "oz(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "gCO2/km", link = "Exhaust gas", }, ["cuft/a"] = { name1 = "cubic foot per annum", name2 = "cubic feet per annum", symbol = "cu&nbsp;ft/a", utype = "flow", scale = 8.9730672142368242e-10, default = "m3/a", link = "Cubic foot per second", }, ["cuft/d"] = { name1 = "cubic foot per day", name2 = "cubic feet per day", symbol = "cu&nbsp;ft/d", utype = "flow", scale = 3.2774128000000003e-7, default = "m3/d", link = "Cubic foot per second", }, ["cuft/h"] = { name1 = "cubic foot per hour", name2 = "cubic feet per hour", symbol = "cu&nbsp;ft/h", utype = "flow", scale = 7.8657907200000004e-6, default = "m3/h", link = "Cubic foot per second", }, ["cuft/min"] = { name1 = "cubic foot per minute", name2 = "cubic feet per minute", symbol = "cu&nbsp;ft/min", utype = "flow", scale = 0.00047194744319999999, default = "m3/min", }, ["cuft/s"] = { name1 = "cubic foot per second", name2 = "cubic feet per second", symbol = "cu&nbsp;ft/s", utype = "flow", scale = 28316846592e-12, default = "m3/s", }, ["cumi/a"] = { name1 = "cubic mile per annum", name2 = "cubic miles per annum", symbol = "cu&nbsp;mi/a", utype = "flow", scale = 132.08171170940057, default = "km3/a", link = "Cubic foot per second", }, ["cuyd/h"] = { name1 = "cubic yard per hour", name2 = "cubic yards per hour", symbol = "cuyd/h", utype = "flow", scale = 0.00021237634944000001, default = "m3/h", link = "Cubic foot per second", }, ["cuyd/s"] = { name1 = "cubic yard per second", name2 = "cubic yards per second", symbol = "cu&nbsp;yd/s", utype = "flow", scale = 0.76455485798400002, default = "m3/s", }, ["Goilbbl/a"] = { name1 = "billion barrels per year", name2 = "billion barrels per year", symbol = "Gbbl/a", utype = "flow", scale = 5.0380033629933836, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3/a", link = "Barrel per day", }, ["impgal/h"] = { name1 = "imperial gallon per hour", name2 = "imperial gallons per hour", symbol = "imp&nbsp;gal/h", utype = "flow", scale = 1.2628027777777779e-6, default = "m3/h", link = "Gallon", }, ["impgal/min"] = { name1 = "imperial gallon per minute", name2 = "imperial gallons per minute", symbol = "imp gal/min", utype = "flow", scale = 7.5768166666666671e-5, default = "m3/s", link = "Gallon", }, ["impgal/s"] = { name1 = "imperial gallon per second", name2 = "imperial gallons per second", symbol = "impgal/s", utype = "flow", scale = 0.00454609, default = "m3/s", link = "Imperial gallons per second", }, ["km3/a"] = { name1 = "cubic kilometre per annum", name1_us = "cubic kilometer per annum", name2 = "cubic kilometres per annum", name2_us = "cubic kilometers per annum", symbol = "km<sup>3</sup>/a", utype = "flow", scale = 31.68808781402895, default = "cumi/a", link = "Cubic metre per second", }, ["km3/d"] = { name1 = "cubic kilometre per day", name1_us = "cubic kilometer per day", name2 = "cubic kilometres per day", name2_us = "cubic kilometers per day", symbol = "km<sup>3</sup>/d", utype = "flow", scale = 11574.074074074075, default = "cuft/d", link = "Cubic metre per second", }, ["koilbbl/a"] = { name1 = "thousand barrels per year", name2 = "thousand barrels per year", symbol = "kbbl/a", utype = "flow", scale = 5.0380033629933841e-6, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/a", link = "Barrel per day", }, ["koilbbl/d"] = { name1 = "thousand barrels per day", name2 = "thousand barrels per day", symbol = "kbbl/d", utype = "flow", scale = 0.0018401307283333335, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/d", link = "Barrel per day", }, ["L/h"] = { name1 = "litre per hour", name1_us = "liter per hour", name2 = "litres per hour", name2_us = "liters per hour", symbol = "L/h", utype = "flow", scale = 2.7777777777777776e-7, default = "impgal/h USgal/h", link = "Cubic metre per second", }, ["L/min"] = { name1 = "litre per minute", name1_us = "liter per minute", name2 = "litres per minute", name2_us = "liters per minute", symbol = "L/min", utype = "flow", scale = 1.6666666666666667e-5, default = "impgal/min USgal/min", link = "Cubic metre per second", }, ["L/s"] = { name1 = "litre per second", name1_us = "liter per second", name2 = "litres per second", name2_us = "liters per second", symbol = "L/s", utype = "flow", scale = 0.001, default = "cuft/s", link = "Cubic metre per second", }, ["m3/a"] = { name1 = "cubic metre per annum", name1_us = "cubic meter per annum", name2 = "cubic metres per annum", name2_us = "cubic meters per annum", symbol = "m<sup>3</sup>/a", utype = "flow", scale = 3.1688087814028947e-8, default = "cuft/a", link = "Cubic metre per second", }, ["m3/d"] = { name1 = "cubic metre per day", name1_us = "cubic meter per day", name2 = "cubic metres per day", name2_us = "cubic meters per day", symbol = "m<sup>3</sup>/d", utype = "flow", scale = 1.1574074074074073e-5, default = "cuft/d", link = "Cubic metre per second", }, ["m3/h"] = { name1 = "cubic metre per hour", name1_us = "cubic meter per hour", name2 = "cubic metres per hour", name2_us = "cubic meters per hour", symbol = "m<sup>3</sup>/h", utype = "flow", scale = 0.00027777777777777778, default = "cuft/h", link = "Cubic metre per second", }, ["m3/min"] = { name1 = "cubic metre per minute", name1_us = "cubic meter per minute", name2 = "cubic metres per minute", name2_us = "cubic meters per minute", symbol = "m<sup>3</sup>/min", utype = "flow", scale = 0.016666666666666666, default = "cuft/min", link = "Cubic metre per second", }, ["m3/s"] = { name1 = "cubic metre per second", name1_us = "cubic meter per second", name2 = "cubic metres per second", name2_us = "cubic meters per second", symbol = "m<sup>3</sup>/s", utype = "flow", scale = 1, default = "cuft/s", }, ["Moilbbl/a"] = { name1 = "million barrels per year", name2 = "million barrels per year", symbol = "Mbbl/a", utype = "flow", scale = 0.0050380033629933837, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/a", link = "Barrel per day", }, ["Moilbbl/d"] = { name1 = "million barrels per day", name2 = "million barrels per day", symbol = "Mbbl/d", utype = "flow", scale = 1.8401307283333335, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/d", link = "Barrel per day", }, ["oilbbl/a"] = { name1 = "barrel per year", name2 = "barrels per year", symbol = "bbl/a", utype = "flow", scale = 5.0380033629933841e-9, default = "m3/a", link = "Barrel per day", }, ["oilbbl/d"] = { name1 = "barrel per day", name2 = "barrels per day", symbol = "bbl/d", utype = "flow", scale = 1.8401307283333336e-6, default = "m3/d", }, ["Toilbbl/a"] = { name1 = "trillion barrels per year", name2 = "trillion barrels per year", symbol = "Tbbl/a", utype = "flow", scale = 5038.0033629933832, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3/a", link = "Barrel per day", }, ["U.S.gal/d"] = { name1 = "U.S. gallon per day", name2 = "U.S. gallons per day", symbol = "U.S.&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", customary= 1, }, ["U.S.gal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 2, }, ["U.S.gal/min"] = { name1 = "U.S. gallon per minute", name2 = "U.S. gallons per minute", symbol = "U.S.&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/a"] = { name1 = "US gallon per year", name2 = "US gallons per year", symbol = "US&nbsp;gal/a", utype = "flow", scale = 1.1995246102365199e-10, default = "m3/s", }, ["USgal/d"] = { name1 = "US gallon per day", name2 = "US gallons per day", symbol = "US&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", }, ["USgal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 1, }, ["USgal/min"] = { name1 = "US gallon per minute", name2 = "US gallons per minute", symbol = "US&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/s"] = { name1 = "US gallon per second", name1_us = "U.S. gallon per second", name2 = "US gallons per second", name2_us = "U.S. gallons per second", symbol = "USgal/s", utype = "flow", scale = 0.003785411784, default = "m3/s", link = "US gallons per second", }, ["ft3/a"] = { target = "cuft/a", }, ["ft3/d"] = { target = "cuft/d", }, ["ft3/h"] = { target = "cuft/h", }, ["ft3/s"] = { target = "cuft/s", }, ["Gcuft/a"] = { target = "e9cuft/a", }, ["Gcuft/d"] = { target = "e9cuft/d", }, ["kcuft/a"] = { target = "e3cuft/a", }, ["kcuft/d"] = { target = "e3cuft/d", }, ["kcuft/s"] = { target = "e3cuft/s", }, ["Mcuft/a"] = { target = "e6cuft/a", }, ["Mcuft/d"] = { target = "e6cuft/d", }, ["Mcuft/s"] = { target = "e6cuft/s", }, ["m³/s"] = { target = "m3/s", }, ["Tcuft/a"] = { target = "e12cuft/a", }, ["Tcuft/d"] = { target = "e12cuft/d", }, ["u.s.gal/min"] = { target = "U.S.gal/min", }, ["usgal/min"] = { target = "USgal/min", }, ["-LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["-STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", utype = "force", scale = 8896.443230521, default = "kN", }, ["dyn"] = { name1 = "dyne", symbol = "dyn", utype = "force", scale = 0.00001, default = "gr-f", }, ["g-f"] = { name1 = "gram-force", name2 = "grams-force", symbol = "g<sub>f</sub>", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["gf"] = { name1 = "gram-force", name2 = "grams-force", symbol = "gf", utype = "force", scale = 0.00980665, default = "mN ozf", link = "Kilogram-force", }, ["gr-f"] = { name1 = "grain-force", name2 = "grains-force", symbol = "gr<sub>f</sub>", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["grf"] = { name1 = "grain-force", name2 = "grains-force", symbol = "grf", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["kdyn"] = { name1 = "kilodyne", symbol = "kdyn", utype = "force", scale = 0.01, default = "oz-f", link = "Dyne", }, ["kg-f"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kg<sub>f</sub>", utype = "force", scale = 9.80665, default = "N lb-f", }, ["kgf"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kgf", utype = "force", scale = 9.80665, default = "N lbf", }, ["kp"] = { name1 = "kilopond", symbol = "kp", utype = "force", scale = 9.80665, default = "N lb-f", link = "Kilogram-force", }, ["L/T-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/T<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["L/Tf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/Tf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["lb-f"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lb<sub>f</sub>", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lbf"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lbf", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lb(f)"] = { name1 = "pound", symbol = "lb", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["LT-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LT<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", usename = 1, utype = "force", scale = 9964.01641818352, default = "kN", }, ["Mdyn"] = { name1 = "megadyne", symbol = "Mdyn", utype = "force", scale = 10, default = "lb-f", link = "Dyne", }, ["mdyn"] = { name1 = "millidyne", symbol = "mdyn", utype = "force", scale = 0.00000001, default = "gr-f", link = "Dyne", }, ["mg-f"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mg<sub>f</sub>", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["mgf"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mgf", utype = "force", scale = 0.00000980665, default = "μN grf", link = "Kilogram-force", }, ["Mp"] = { name1 = "megapond", symbol = "Mp", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Kilogram-force", }, ["mp"] = { name1 = "millipond", symbol = "mp", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["N"] = { _name1 = "newton", _symbol = "N", utype = "force", scale = 1, prefixes = 1, default = "lb-f", link = "Newton (unit)", }, ["oz-f"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "oz<sub>f</sub>", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["ozf"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "ozf", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["p"] = { name1 = "pond", symbol = "p", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["pdl"] = { name1 = "poundal", symbol = "pdl", utype = "force", scale = 0.138254954376, default = "N", }, ["S/T-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/T<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["S/Tf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/Tf", utype = "force", scale = 8896.443230521, default = "kN", }, ["ST-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "ST<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", usename = 1, utype = "force", scale = 8896.443230521, default = "kN", }, ["t-f"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "t<sub>f</sub>", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Ton-force#Tonne-force", }, ["tf"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "tf", utype = "force", scale = 9806.65, default = "kN LTf STf", link = "Ton-force#Tonne-force", }, ["dyne"] = { target = "dyn", }, ["newtons"] = { target = "N", }, ["poundal"] = { target = "pdl", }, ["tonne-force"] = { target = "tf", }, ["impgal/mi"] = { per = { "@impgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km USgal/mi", }, ["km/L"] = { per = { "km", "L" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["km/l"] = { per = { "km", "ll" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["L/100 km"] = { per = { "L", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|L/100&nbsp;km]]", }, ["l/100 km"] = { per = { "ll", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|l/100&nbsp;km]]", }, ["L/km"] = { per = { "L", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["l/km"] = { per = { "ll", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["mi/impqt"] = { per = { "mi", "impqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/U.S.qt"] = { per = { "mi", "U.S.qt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/USqt"] = { per = { "mi", "USqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/usqt"] = { per = { "mi", "usqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mpgimp"] = { per = { "mi", "@impgal" }, symbol = "mpg<sub>&#8209;imp</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[Imperial units|imp]]</sub>", }, ["mpgus"] = { per = { "mi", "+USgal" }, symbol = "mpg<sub>&#8209;US</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgimp", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|US]]</sub>", }, ["U.S.gal/mi"] = { per = { "*U.S.gal", "mi" }, sp_us = true, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["usgal/mi"] = { per = { "+USgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["L/100km"] = { target = "L/100 km", }, ["l/100km"] = { target = "l/100 km", }, ["mpg"] = { shouldbe = "Use %{mpgus%} for miles per US gallon or %{mpgimp%} for miles per imperial gallon (not %{mpg%})", }, ["mpgU.S."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgu.s."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgUS"] = { target = "mpgus", }, ["USgal/mi"] = { target = "usgal/mi", }, ["kPa/m"] = { per = { "kPa", "-m-frac" }, utype = "fracture gradient", default = "psi/ft", }, ["psi/ft"] = { per = { "psi", "-ft-frac" }, utype = "fracture gradient", default = "kPa/m", }, ["cm/km"] = { name1 = "centimetre per kilometre", name1_us = "centimeter per kilometer", name2 = "centimetres per kilometre", name2_us = "centimeters per kilometer", symbol = "cm/km", utype = "gradient", scale = 0.00001, default = "ft/mi", link = "Grade (slope)", }, ["ft/mi"] = { name1 = "foot per mile", name2 = "feet per mile", symbol = "ft/mi", utype = "gradient", scale = 0.00018939393939393939, default = "v < 5.28 ! c ! ! m/km", link = "Grade (slope)", }, ["ft/nmi"] = { name1 = "foot per nautical mile", name2 = "feet per nautical mile", symbol = "ft/nmi", utype = "gradient", scale = 0.00016457883369330455, default = "v < 6.076 ! c ! ! m/km", link = "Grade (slope)", }, ["in/ft"] = { name1 = "inch per foot", name2 = "inches per foot", symbol = "in/ft", utype = "gradient", scale = 0.083333333333333329, default = "mm/m", link = "Grade (slope)", }, ["in/mi"] = { name1 = "inch per mile", name2 = "inches per mile", symbol = "in/mi", utype = "gradient", scale = 1.5782828282828283e-5, default = "v < 0.6336 ! m ! c ! m/km", link = "Grade (slope)", }, ["m/km"] = { name1 = "metre per kilometre", name1_us = "meter per kilometer", name2 = "metres per kilometre", name2_us = "meters per kilometer", symbol = "m/km", utype = "gradient", scale = 0.001, default = "ft/mi", link = "Grade (slope)", }, ["mm/km"] = { name1 = "millimetre per kilometre", name1_us = "millimeter per kilometer", name2 = "millimetres per kilometre", name2_us = "millimeters per kilometer", symbol = "mm/km", utype = "gradient", scale = 0.000001, default = "in/mi", link = "Grade (slope)", }, ["mm/m"] = { name1 = "millimetre per metre", name1_us = "millimeter per meter", name2 = "millimetres per metre", name2_us = "millimeters per meter", symbol = "mm/m", utype = "gradient", scale = 0.001, default = "in/ft", link = "Grade (slope)", }, ["admi"] = { name1 = "admiralty mile", symbol = "nmi&nbsp;(admiralty)", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["AU"] = { name1 = "astronomical unit", symbol = "AU", utype = "length", scale = 149597870700, default = "km mi", }, ["Brnmi"] = { name1 = "British nautical mile", symbol = "(Brit)&nbsp;nmi", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["bu"] = { name2 = "bu", symbol = "bu", usename = 1, utype = "length", scale = 0.0030303030303030303, default = "mm", link = "Japanese units of measurement#Length", }, ["ch"] = { name1 = "chain", symbol = "ch", utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chlk"] = { name1 = "[[Chain (unit)|chain]]", symbol = "[[Chain (unit)|ch]]", utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["chain"] = { symbol = "chain", usename = 1, utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chainlk"] = { symbol = "[[Chain (unit)|chain]]", usename = 1, utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["dpcm"] = { name2 = "dot/cm", symbol = "dot/cm", utype = "length", scale = 100, invert = -1, iscomplex= true, default = "dpi", link = "Dots per inch", }, ["dpi"] = { name2 = "DPI", symbol = "DPI", utype = "length", scale = 39.370078740157481, invert = -1, iscomplex= true, default = "pitch", link = "Dots per inch", }, ["fathom"] = { symbol = "fathom", usename = 1, utype = "length", scale = 1.8288, default = "ft m", }, ["foot"] = { name1 = "foot", name2 = "foot", symbol = "ft", utype = "length", scale = 0.3048, default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["ft"] = { name1 = "foot", name2 = "feet", symbol = "ft", utype = "length", scale = 0.3048, exception= "integer_more_precision", default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["furlong"] = { symbol = "furlong", usename = 1, utype = "length", scale = 201.168, default = "ft m", }, ["Gly"] = { name1 = "gigalight-year", symbol = "Gly", utype = "length", scale = 9.4607304725808e24, default = "Mpc", link = "Light-year#Definitions", }, ["Gpc"] = { name1 = "gigaparsec", symbol = "Gpc", utype = "length", scale = 3.0856775814671916e25, default = "Gly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["hand"] = { name1 = "hand", symbol = "h", utype = "length", builtin = "hand", scale = 0.1016, iscomplex= true, default = "in cm", link = "Hand (unit)", }, ["in"] = { name1 = "inch", name2 = "inches", symbol = "in", utype = "length", scale = 0.0254, exception= "subunit_more_precision", default = "mm", }, ["inabbreviated"] = { name2 = "in", symbol = "in", utype = "length", scale = 0.0254, default = "mm", link = "Inch", }, ["kly"] = { name1 = "kilolight-year", symbol = "kly", utype = "length", scale = 9.4607304725808e18, default = "pc", link = "Light-year#Definitions", }, ["kpc"] = { name1 = "kiloparsec", symbol = "kpc", utype = "length", scale = 3.0856775814671916e19, default = "kly", link = "Parsec#Parsecs and kiloparsecs", }, ["LD"] = { name1 = "lunar distance", symbol = "LD", utype = "length", scale = 384403000, default = "km mi", link = "Lunar distance (astronomy)", }, ["league"] = { symbol = "league", usename = 1, utype = "length", scale = 4828.032, default = "km", link = "League (unit)", }, ["ly"] = { name1 = "light-year", symbol = "ly", utype = "length", scale = 9.4607304725808e15, default = "AU", }, ["m"] = { _name1 = "metre", _name1_us= "meter", _symbol = "m", utype = "length", scale = 1, prefixes = 1, default = "v > 0 and v < 3 ! ftin ! ft", link = "Metre", }, ["mi"] = { name1 = "mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["ch"] = { 80, default = "km" }, ["chlk"] = { 80, default = "km" }, ["chain"] = { 80, default = "km" }, ["chainlk"] = { 80, default = "km" }, ["ft"] = { 5280, default = "km" }, ["furlong"] = { 8, default = "km" }, ["yd"] = { 1760, default = "km" } }, }, ["mil"] = { symbol = "mil", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["Mly"] = { name1 = "megalight-year", symbol = "Mly", utype = "length", scale = 9.4607304725808e21, default = "kpc", link = "Light-year#Definitions", }, ["Mpc"] = { name1 = "megaparsec", symbol = "Mpc", utype = "length", scale = 3.0856775814671916e22, default = "Mly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["NM"] = { name1 = "nautical mile", symbol = "NM", utype = "length", scale = 1852, default = "km mi", }, ["nmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1852, default = "km mi", }, ["oldUKnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.184, default = "km mi", }, ["oldUSnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.24496, default = "km mi", }, ["pc"] = { name1 = "parsec", symbol = "pc", utype = "length", scale = 3.0856775814671916e16, default = "ly", }, ["perch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pitch"] = { name2 = "μm", symbol = "μm", utype = "length", scale = 1e-6, default = "dpi", defkey = "pitch", linkey = "pitch", link = "Dots per inch", }, ["pole"] = { symbol = "pole", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pre1954U.S.nmi"] = { name1 = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["pre1954USnmi"] = { name1 = "(pre-1954&nbsp;US) nautical mile", name1_us = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;US) nmi", sym_us = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["rd"] = { name1 = "rod", symbol = "rd", utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["royal cubit"] = { name1 = "royal cubit", symbol = "cu", utype = "length", scale = 0.524, default = "mm", }, ["rtkm"] = { name1 = "route kilometre", name1_us = "route kilometer", symbol = "km", utype = "length", scale = 1000, default = "mi", link = "Kilometre", }, ["rtmi"] = { name1 = "route mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", link = "Mile", }, ["shaku"] = { name2 = "shaku", symbol = "shaku", usename = 1, utype = "length", scale = 0.30303030303030304, default = "m", link = "Shaku (unit)", }, ["sm"] = { name1 = "smoot", symbol = "sm", utype = "length", scale = 1.70180, default = "m", link = "Smoot (unit)", }, ["smi"] = { name1 = "statute mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["chain"] = { 80, default = "km" } }, }, ["solar radius"] = { name1 = "solar radius", name2 = "solar radii", symbol = "''R''<sub>☉</sub>", utype = "length", scale = 695700e3, default = "km", }, ["sun"] = { name2 = "sun", symbol = "sun", usename = 1, utype = "length", scale = 0.030303030303030304, default = "mm", link = "Japanese units of measurement#Length", }, ["thou"] = { name2 = "thou", symbol = "thou", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["verst"] = { symbol = "verst", usename = 1, utype = "length", scale = 1066.8, default = "km mi", }, ["yd"] = { name1 = "yard", symbol = "yd", utype = "length", scale = 0.9144, default = "m", subdivs = { ["ft"] = { 3, default = "m" } }, }, ["μin"] = { name1 = "microinch", name2 = "microinches", symbol = "μin", utype = "length", scale = 0.0000000254, default = "nm", link = "SI prefix#Non-metric units", }, ["Å"] = { name1 = "ångström", symbol = "Å", utype = "length", scale = 0.0000000001, default = "in", }, ["Hz"] = { _name1 = "hertz", _name2 = "hertz", _symbol = "Hz", utype = "length", scale = 3.3356409519815204e-9, invert = -1, iscomplex= true, prefixes = 1, default = "m", link = "Hertz", }, ["rpm"] = { name1 = "revolution per minute", name2 = "revolutions per minute", symbol = "rpm", utype = "length", scale = 5.5594015866358675e-11, invert = -1, iscomplex= true, default = "Hz", link = "Revolutions per minute", }, ["-ft-frac"] = { target = "ft", link = "Fracture gradient", }, ["-in-stiff"] = { target = "in", link = "Stiffness", }, ["-m-frac"] = { target = "m", link = "Fracture gradient", }, ["-m-stiff"] = { target = "m", link = "Stiffness", }, ["100km"] = { target = "km", multiplier= 100, }, ["100mi"] = { target = "mi", multiplier= 100, }, ["100miles"] = { target = "mi", symbol = "miles", multiplier= 100, }, ["admiralty nmi"] = { target = "oldUKnmi", }, ["angstrom"] = { target = "Å", }, ["au"] = { target = "AU", symbol = "au", }, ["feet"] = { target = "ft", }, ["hands"] = { target = "hand", }, ["inch"] = { target = "in", }, ["inches"] = { target = "in", }, ["light-year"] = { target = "ly", }, ["meter"] = { target = "m", sp_us = true, }, ["meters"] = { target = "m", sp_us = true, }, ["metre"] = { target = "m", }, ["metres"] = { target = "m", }, ["micrometre"] = { target = "μm", }, ["micron"] = { target = "μm", default = "μin", }, ["mile"] = { target = "mi", }, ["miles"] = { target = "mi", }, ["parsec"] = { target = "pc", }, ["rod"] = { target = "rd", }, ["smoot"] = { target = "sm", }, ["uin"] = { target = "μin", }, ["yard"] = { target = "yd", }, ["yards"] = { target = "yd", }, ["yds"] = { target = "yd", }, ["dtex"] = { name1 = "decitex", name2 = "decitex", symbol = "dtex", utype = "linear density", scale = 1e-7, default = "lb/yd", link = "Units of textile measurement#Units", }, ["kg/cm"] = { name1 = "kilogram per centimetre", name1_us = "kilogram per centimeter", name2 = "kilograms per centimetre", name2_us = "kilograms per centimeter", symbol = "kg/cm", utype = "linear density", scale = 100, default = "lb/yd", link = "Linear density", }, ["kg/m"] = { name1 = "kilogram per metre", name1_us = "kilogram per meter", name2 = "kilograms per metre", name2_us = "kilograms per meter", symbol = "kg/m", utype = "linear density", scale = 1, default = "lb/yd", link = "Linear density", }, ["lb/ft"] = { name1 = "pound per foot", name2 = "pounds per foot", symbol = "lb/ft", utype = "linear density", scale = 1.4881639435695539, default = "kg/m", link = "Linear density", }, ["lb/yd"] = { name1 = "pound per yard", name2 = "pounds per yard", symbol = "lb/yd", utype = "linear density", scale = 0.49605464785651798, default = "kg/m", link = "Linear density", }, ["G"] = { _name1 = "gauss", _name2 = "gauss", _symbol = "G", utype = "magnetic field strength", scale = 0.0001, prefixes = 1, default = "T", link = "Gauss (unit)", }, ["T"] = { _name1 = "tesla", _symbol = "T", utype = "magnetic field strength", scale = 1, prefixes = 1, default = "G", link = "Tesla (unit)", }, ["A/m"] = { name1 = "ampere per metre", name1_us = "ampere per meter", name2 = "amperes per metre", name2_us = "amperes per meter", symbol = "A/m", utype = "magnetizing field", scale = 1, default = "Oe", }, ["kA/m"] = { name1 = "kiloampere per metre", name1_us = "kiloampere per meter", name2 = "kiloamperes per metre", name2_us = "kiloamperes per meter", symbol = "kA/m", utype = "magnetizing field", scale = 1000, default = "kOe", link = "Ampere per metre", }, ["MA/m"] = { name1 = "megaampere per metre", name1_us = "megaampere per meter", name2 = "megaamperes per metre", name2_us = "megaamperes per meter", symbol = "MA/m", utype = "magnetizing field", scale = 1e6, default = "kOe", link = "Ampere per metre", }, ["Oe"] = { _name1 = "oersted", _symbol = "Oe", utype = "magnetizing field", scale = 79.5774715, prefixes = 1, default = "kA/m", link = "Oersted", }, ["-Lcwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 50.80234544, default = "lb", }, ["-Scwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 45.359237, default = "lb", }, ["-ST"] = { name1 = "short ton", symbol = "ST", utype = "mass", scale = 907.18474, default = "t", }, ["carat"] = { symbol = "carat", usename = 1, utype = "mass", scale = 0.0002, default = "g", link = "Carat (mass)", }, ["drachm"] = { name1_us = "dram", symbol = "drachm", usename = 1, utype = "mass", scale = 0.001771845195, default = "g", link = "Dram (unit)", }, ["dram"] = { target = "drachm", }, ["dwt"] = { name1 = "pennyweight", symbol = "dwt", utype = "mass", scale = 0.00155517384, default = "oz g", }, ["DWton"] = { symbol = "deadweight ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "DWtonne", link = "Deadweight tonnage", }, ["DWtonne"] = { name1_us = "deadweight metric ton", symbol = "deadweight tonne", sym_us = "~deadweight metric ton", usename = 1, utype = "mass", scale = 1000, default = "DWton", link = "Deadweight tonnage", }, ["g"] = { _name1 = "gram", _symbol = "g", utype = "mass", scale = 0.001, prefixes = 1, default = "oz", link = "Gram", }, ["gr"] = { name1 = "grain", symbol = "gr", utype = "mass", scale = 0.00006479891, default = "g", link = "Grain (unit)", }, ["Gt"] = { name1 = "gigatonne", symbol = "Gt", utype = "mass", scale = 1000000000000, default = "LT ST", link = "Tonne", }, ["impgalh2o"] = { name1 = "imperial gallon of water", name2 = "imperial gallons of water", symbol = "imp&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 4.5359236999999499, default = "lb kg", link = "Imperial gallon", }, ["kt"] = { name1 = "kilotonne", symbol = "kt", utype = "mass", scale = 1000000, default = "LT ST", link = "Tonne", }, ["lb"] = { name1 = "pound", symbol = "lb", utype = "mass", scale = 0.45359237, exception= "integer_more_precision", default = "kg", subdivs = { ["oz"] = { 16, default = "kg" } }, link = "Pound (mass)", }, ["Lcwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "Lcwt", usename = 1, utype = "mass", scale = 50.80234544, default = "lb", subdivs = { ["qtr"] = { 4, default = "kg" }, ["st"] = { 8, default = "kg" } }, link = "Hundredweight", }, ["long cwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "long&nbsp;cwt", utype = "mass", scale = 50.80234544, default = "lb kg", subdivs = { ["qtr"] = { 4, default = "kg" } }, link = "Hundredweight", }, ["long qtr"] = { name1 = "long quarter", symbol = "long&nbsp;qtr", utype = "mass", scale = 12.70058636, default = "lb kg", }, ["LT"] = { symbol = "long ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["lt"] = { name1 = "long ton", symbol = "LT", utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["metric ton"] = { symbol = "metric ton", usename = 1, utype = "mass", scale = 1000, default = "long ton", link = "Tonne", }, ["MT"] = { name1 = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", link = "Tonne", }, ["Mt"] = { name1 = "megatonne", symbol = "Mt", utype = "mass", scale = 1000000000, default = "LT ST", link = "Tonne", }, ["oz"] = { name1 = "ounce", symbol = "oz", utype = "mass", scale = 0.028349523125, default = "g", }, ["ozt"] = { name1 = "troy ounce", symbol = "ozt", utype = "mass", scale = 0.0311034768, default = "oz g", }, ["pdr"] = { name1 = "pounder", symbol = "pdr", utype = "mass", scale = 0.45359237, default = "kg", link = "Pound (mass)", }, ["qtr"] = { name1 = "quarter", symbol = "qtr", utype = "mass", scale = 12.70058636, default = "lb kg", subdivs = { ["lb"] = { 28, default = "kg" } }, link = "Long quarter", }, ["Scwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "Scwt", usename = 1, utype = "mass", scale = 45.359237, default = "lb", link = "Hundredweight", }, ["short cwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "short&nbsp;cwt", utype = "mass", scale = 45.359237, default = "lb kg", link = "Hundredweight", }, ["short qtr"] = { name1 = "short quarter", symbol = "short&nbsp;qtr", utype = "mass", scale = 11.33980925, default = "lb kg", }, ["ST"] = { symbol = "short ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", subdivs = { ["Scwt"] = { 20, default = "t", unit = "-Scwt" } }, }, ["shtn"] = { name1 = "short ton", symbol = "sh&nbsp;tn", utype = "mass", scale = 907.18474, default = "t", }, ["shton"] = { symbol = "ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", }, ["solar mass"] = { name1 = "solar mass", name2 = "solar masses", symbol = "''M''<sub>☉</sub>", utype = "mass", scale = 1.98855e30, default = "kg", }, ["st"] = { name1 = "stone", name2 = "stone", symbol = "st", utype = "mass", scale = 6.35029318, default = "lb kg", subdivs = { ["lb"] = { 14, default = "kg lb" } }, link = "Stone (unit)", }, ["t"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", }, ["tonne"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "shton", }, ["troy pound"] = { symbol = "troy pound", usename = 1, utype = "mass", scale = 0.3732417216, default = "lb kg", link = "Troy weight", }, ["usgalh2o"] = { name1 = "US gallon of water", name1_us = "U.S. gallon of water", name2 = "US gallons of water", name2_us = "U.S. gallons of water", symbol = "US&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 3.7776215836051126, default = "lb kg", link = "United States customary units#Fluid volume", }, ["viss"] = { name2 = "viss", symbol = "viss", utype = "mass", scale = 1.632932532, default = "kg", link = "Myanmar units of measurement#Mass", }, ["billion tonne"] = { target = "e9t", }, ["kilogram"] = { target = "kg", }, ["kilotonne"] = { target = "kt", }, ["lbs"] = { target = "lb", }, ["lbt"] = { target = "troy pound", }, ["lcwt"] = { target = "Lcwt", }, ["long ton"] = { target = "LT", }, ["mcg"] = { target = "μg", }, ["million tonne"] = { target = "e6t", }, ["scwt"] = { target = "Scwt", }, ["short ton"] = { target = "ST", }, ["stone"] = { target = "st", }, ["thousand tonne"] = { target = "e3t", }, ["tonnes"] = { target = "t", }, ["kg/kW"] = { name1 = "kilogram per kilowatt", name2 = "kilograms per kilowatt", symbol = "kg/kW", utype = "mass per unit power", scale = 0.001, default = "lb/hp", link = "Kilowatt", }, ["lb/hp"] = { name1 = "pound per horsepower", name2 = "pounds per horsepower", symbol = "lb/hp", utype = "mass per unit power", scale = 0.00060827738784176115, default = "kg/kW", link = "Horsepower", }, ["kg/h"] = { per = { "kg", "h" }, utype = "mass per unit time", default = "lb/h", }, ["lb/h"] = { per = { "lb", "h" }, utype = "mass per unit time", default = "kg/h", }, ["g-mol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "g&#8209;mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["g-mol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "g&#8209;mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["g-mol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "g&#8209;mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "g-mol/s", link = "Mole (unit)", }, ["g-mol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "g&#8209;mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["gmol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "gmol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["gmol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "gmol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["gmol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "gmol/min", utype = "molar rate", scale = 0.016666666666666666, default = "gmol/s", link = "Mole (unit)", }, ["gmol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "gmol/s", utype = "molar rate", scale = 1, default = "lbmol/min", link = "Mole (unit)", }, ["kmol/d"] = { name1 = "kilomole per day", name2 = "kilomoles per day", symbol = "kmol/d", utype = "molar rate", scale = 0.011574074074074073, default = "mmol/s", link = "Mole (unit)", }, ["kmol/h"] = { name1 = "kilomole per hour", name2 = "kilomoles per hour", symbol = "kmol/h", utype = "molar rate", scale = 0.27777777777777779, default = "mol/s", link = "Mole (unit)", }, ["kmol/min"] = { name1 = "kilomole per minute", name2 = "kilomoles per minute", symbol = "kmol/min", utype = "molar rate", scale = 16.666666666666668, default = "mol/s", link = "Kilomole (unit)", }, ["kmol/s"] = { name1 = "kilomole per second", name2 = "kilomoles per second", symbol = "kmol/s", utype = "molar rate", scale = 1000, default = "lb-mol/s", link = "Mole (unit)", }, ["lb-mol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lb&#8209;mol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lb-mol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lb&#8209;mol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lb-mol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lb&#8209;mol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lb-mol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lb&#8209;mol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["lbmol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lbmol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lbmol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lbmol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lbmol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lbmol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lbmol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lbmol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["mmol/s"] = { name1 = "millimole per second", name2 = "millimoles per second", symbol = "mmol/s", utype = "molar rate", scale = 0.001, default = "lb-mol/d", link = "Mole (unit)", }, ["mol/d"] = { name1 = "mole per day", name2 = "moles per day", symbol = "mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["mol/h"] = { name1 = "mole per hour", name2 = "moles per hour", symbol = "mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["mol/min"] = { name1 = "mole per minute", name2 = "moles per minute", symbol = "mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "mol/s", link = "Mole (unit)", }, ["mol/s"] = { name1 = "mole per second", name2 = "moles per second", symbol = "mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["μmol/s"] = { name1 = "micromole per second", name2 = "micromoles per second", symbol = "μmol/s", utype = "molar rate", scale = 0.000001, default = "lb-mol/d", link = "Mole (unit)", }, ["umol/s"] = { target = "μmol/s", }, ["/acre"] = { name1 = "per acre", name2 = "per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "/ha", link = "Acre", }, ["/ha"] = { name1 = "per hectare", name2 = "per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "/acre", link = "Hectare", }, ["/sqcm"] = { name1 = "per square centimetre", name1_us = "per square centimeter", name2 = "per square centimetre", name2_us = "per square centimeter", symbol = "/cm<sup>2</sup>", utype = "per unit area", scale = 1e4, default = "/sqin", link = "Square centimetre", }, ["/sqin"] = { name1 = "per square inch", name2 = "per square inch", symbol = "/in<sup>2</sup>", utype = "per unit area", scale = 1550.0031000062002, default = "/sqcm", link = "Square inch", }, ["/sqkm"] = { name1 = "per square kilometre", name1_us = "per square kilometer", name2 = "per square kilometre", name2_us = "per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "/sqmi", link = "Square kilometre", }, ["/sqmi"] = { name1 = "per square mile", name2 = "per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "/sqkm", link = "Square mile", }, ["PD/acre"] = { name1 = "inhabitant per acre", name2 = "inhabitants per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "PD/ha", link = "Acre", }, ["PD/ha"] = { name1 = "inhabitant per hectare", name2 = "inhabitants per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "PD/acre", link = "Hectare", }, ["PD/sqkm"] = { name1 = "inhabitant per square kilometre", name1_us = "inhabitant per square kilometer", name2 = "inhabitants per square kilometre", name2_us = "inhabitants per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "PD/sqmi", link = "Square kilometre", }, ["PD/sqmi"] = { name1 = "inhabitant per square mile", name2 = "inhabitants per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "PD/sqkm", link = "Square mile", }, ["/cm2"] = { target = "/sqcm", }, ["/in2"] = { target = "/sqin", }, ["/km2"] = { target = "/sqkm", }, ["pd/acre"] = { target = "PD/acre", }, ["pd/ha"] = { target = "PD/ha", }, ["PD/km2"] = { target = "PD/sqkm", }, ["pd/km2"] = { target = "PD/sqkm", }, ["PD/km²"] = { target = "PD/sqkm", }, ["pd/sqkm"] = { target = "PD/sqkm", }, ["pd/sqmi"] = { target = "PD/sqmi", }, ["/l"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/l", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/L"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/L", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/USgal"] = { name1 = "per gallon", name2 = "per gallon", symbol = "/gal", utype = "per unit volume", scale = 264.172052, default = "/L", link = "US gallon", customary= 2, }, ["/usgal"] = { target = "/USgal", }, ["bhp"] = { name1 = "brake horsepower", name2 = "brake horsepower", symbol = "bhp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Brake horsepower", }, ["Cal/d"] = { name1 = "large calorie per day", name2 = "large calories per day", symbol = "Cal/d", utype = "power", scale = 0.048425925925925928, default = "kJ/d", link = "Calorie", }, ["Cal/h"] = { name1 = "large calorie per hour", name2 = "large calories per hour", symbol = "Cal/h", utype = "power", scale = 1.1622222222222223, default = "kJ/h", link = "Calorie", }, ["cal/h"] = { name1 = "calorie per hour", name2 = "calories per hour", symbol = "cal/h", utype = "power", scale = 0.0011622222222222223, default = "W", link = "Calorie", }, ["CV"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "CV", utype = "power", scale = 735.49875, default = "kW", }, ["hk"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hk", utype = "power", scale = 735.49875, default = "kW", }, ["hp"] = { name1 = "horsepower", name2 = "horsepower", symbol = "hp", utype = "power", scale = 745.69987158227022, default = "kW", }, ["hp-electric"] = { name1 = "electric horsepower", name2 = "electric horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-electrical"] = { name1 = "electrical horsepower", name2 = "electrical horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-metric"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hp", utype = "power", scale = 735.49875, default = "kW", }, ["ihp"] = { name1 = "indicated horsepower", name2 = "indicated horsepower", symbol = "ihp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Indicated horsepower", }, ["kcal/h"] = { name1 = "kilocalorie per hour", name2 = "kilocalories per hour", symbol = "kcal/h", utype = "power", scale = 1.1622222222222223, default = "kW", link = "Calorie", }, ["kJ/d"] = { name1 = "kilojoule per day", name2 = "kilojoules per day", symbol = "kJ/d", utype = "power", scale = 0.011574074074074073, default = "Cal/d", link = "Kilojoule", }, ["kJ/h"] = { name1 = "kilojoule per hour", name2 = "kilojoules per hour", symbol = "kJ/h", utype = "power", scale = 0.27777777777777779, default = "W", link = "Kilojoule", }, ["PS"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "PS", utype = "power", scale = 735.49875, default = "kW", }, ["shp"] = { name1 = "shaft horsepower", name2 = "shaft horsepower", symbol = "shp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Shaft horsepower", }, ["W"] = { _name1 = "watt", _symbol = "W", utype = "power", scale = 1, prefixes = 1, default = "hp", link = "Watt", }, ["BTU/h"] = { per = { "BTU", "h" }, utype = "power", default = "W", }, ["Btu/h"] = { per = { "Btu", "h" }, utype = "power", default = "W", }, ["BHP"] = { target = "bhp", }, ["btu/h"] = { target = "BTU/h", }, ["HP"] = { target = "hp", }, ["Hp"] = { target = "hp", }, ["hp-mechanical"] = { target = "hp", }, ["IHP"] = { target = "ihp", }, ["SHP"] = { target = "shp", }, ["whp"] = { target = "hp", }, ["hp/lb"] = { name1 = "horsepower per pound", name2 = "horsepower per pound", symbol = "hp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/LT"] = { name1 = "horsepower per long ton", name2 = "horsepower per long ton", symbol = "hp/LT", utype = "power per unit mass", scale = 0.73392268125000004, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/ST"] = { name1 = "horsepower per short ton", name2 = "horsepower per short ton", symbol = "hp/ST", utype = "power per unit mass", scale = 0.821993403, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/t"] = { name1 = "horsepower per tonne", name2 = "horsepower per tonne", symbol = "hp/t", utype = "power per unit mass", scale = 0.74569987158227022, default = "kW/t", link = "Power-to-weight ratio", }, ["kW/kg"] = { name1 = "kilowatt per kilogram", name2 = "kilowatts per kilogram", symbol = "kW/kg", utype = "power per unit mass", scale = 1000, default = "hp/lb", link = "Power-to-weight ratio", }, ["kW/t"] = { name1 = "kilowatt per tonne", name2 = "kilowatts per tonne", symbol = "kW/t", utype = "power per unit mass", scale = 1, default = "PS/t", link = "Power-to-weight ratio", }, ["PS/t"] = { name1 = "metric horsepower per tonne", name2 = "metric horsepower per tonne", symbol = "PS/t", utype = "power per unit mass", scale = 0.73549875, default = "kW/t", link = "Power-to-weight ratio", }, ["shp/lb"] = { name1 = "shaft horsepower per pound", name2 = "shaft horsepower per pound", symbol = "shp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/tonne"] = { target = "hp/t", symbol = "hp/tonne", default = "kW/tonne", }, ["kW/tonne"] = { target = "kW/t", symbol = "kW/tonne", }, ["-lb/in2"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "lb/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["atm"] = { name1 = "standard atmosphere", symbol = "atm", utype = "pressure", scale = 101325, default = "kPa", link = "Atmosphere (unit)", }, ["Ba"] = { name1 = "barye", symbol = "Ba", utype = "pressure", scale = 0.1, default = "Pa", }, ["bar"] = { symbol = "bar", utype = "pressure", scale = 100000, default = "kPa", link = "Bar (unit)", }, ["dbar"] = { name1 = "decibar", symbol = "dbar", utype = "pressure", scale = 10000, default = "kPa", link = "Bar (unit)", }, ["inHg"] = { name1 = "inch of mercury", name2 = "inches of mercury", symbol = "inHg", utype = "pressure", scale = 3386.388640341, default = "kPa", }, ["kBa"] = { name1 = "kilobarye", symbol = "kBa", utype = "pressure", scale = 100, default = "hPa", link = "Barye", }, ["kg-f/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kg<sub>f</sub>/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kg/cm2"] = { name1 = "kilogram per square centimetre", name1_us = "kilogram per square centimeter", name2 = "kilograms per square centimetre", name2_us = "kilograms per square centimeter", symbol = "kg/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kgf/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kgf/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["ksi"] = { name1 = "kilopound per square inch", name2 = "kilopounds per square inch", symbol = "ksi", utype = "pressure", scale = 6894757.2931683613, default = "MPa", link = "Pound per square inch", }, ["lbf/in2"] = { name1 = "pound-force per square inch", name2 = "pounds-force per square inch", symbol = "lbf/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["mb"] = { name1 = "millibar", symbol = "mb", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mbar"] = { name1 = "millibar", symbol = "mbar", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mmHg"] = { name1 = "millimetre of mercury", name1_us = "millimeter of mercury", name2 = "millimetres of mercury", name2_us = "millimeters of mercury", symbol = "mmHg", utype = "pressure", scale = 133.322387415, default = "kPa", }, ["Pa"] = { _name1 = "pascal", _symbol = "Pa", utype = "pressure", scale = 1, prefixes = 1, default = "psi", link = "Pascal (unit)", }, ["psf"] = { name1 = "pound per square foot", name2 = "pounds per square foot", symbol = "psf", utype = "pressure", scale = 47.880258980335839, default = "kPa", link = "Pound per square inch", }, ["psi"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "psi", utype = "pressure", scale = 6894.7572931683608, default = "kPa", }, ["Torr"] = { name1 = "torr", symbol = "Torr", utype = "pressure", scale = 133.32236842105263, default = "kPa", }, ["N/cm2"] = { per = { "N", "cm2" }, utype = "pressure", default = "psi", }, ["N/m2"] = { per = { "N", "m2" }, utype = "pressure", default = "psi", }, ["g/cm2"] = { per = { "g", "cm2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["g/m2"] = { per = { "g", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["kg/ha"] = { per = { "kg", "ha" }, utype = "pressure", default = "lb/acre", multiplier= 9.80665, }, ["kg/m2"] = { per = { "kg", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["lb/1000sqft"] = { per = { "lb", "1000sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["lb/acre"] = { per = { "lb", "acre" }, utype = "pressure", default = "kg/ha", multiplier= 9.80665, }, ["lb/sqft"] = { per = { "lb", "sqft" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["lb/sqyd"] = { per = { "lb", "sqyd" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["LT/acre"] = { per = { "LT", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["MT/ha"] = { per = { "MT", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["oz/sqft"] = { per = { "oz", "sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["oz/sqyd"] = { per = { "oz", "sqyd" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["ST/acre"] = { per = { "ST", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["t/ha"] = { per = { "t", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["tonne/acre"] = { per = { "tonne", "acre" }, utype = "pressure", default = "tonne/ha", multiplier= 9.80665, }, ["tonne/ha"] = { per = { "tonne", "ha" }, utype = "pressure", default = "tonne/acre", multiplier= 9.80665, }, ["kgfpsqcm"] = { target = "kgf/cm2", }, ["kgpsqcm"] = { target = "kg/cm2", }, ["kN/m2"] = { target = "kPa", }, ["lb/in2"] = { target = "lbf/in2", }, ["torr"] = { target = "Torr", }, ["Bq"] = { _name1 = "becquerel", _symbol = "Bq", utype = "radioactivity", scale = 1, prefixes = 1, default = "pCi", link = "Becquerel", }, ["Ci"] = { _name1 = "curie", _symbol = "Ci", utype = "radioactivity", scale = 3.7e10, prefixes = 1, default = "GBq", link = "Curie (unit)", }, ["Rd"] = { _name1 = "rutherford", _symbol = "Rd", utype = "radioactivity", scale = 1e6, prefixes = 1, default = "MBq", link = "Rutherford (unit)", }, ["cm/h"] = { name1 = "centimetre per hour", name1_us = "centimeter per hour", name2 = "centimetres per hour", name2_us = "centimeters per hour", symbol = "cm/h", utype = "speed", scale = 2.7777777777777775e-6, default = "in/h", link = "Metre per second", }, ["cm/s"] = { name1 = "centimetre per second", name1_us = "centimeter per second", name2 = "centimetres per second", name2_us = "centimeters per second", symbol = "cm/s", utype = "speed", scale = 0.01, default = "in/s", link = "Metre per second", }, ["cm/year"] = { name1 = "centimetre per year", name1_us = "centimeter per year", name2 = "centimetres per year", name2_us = "centimeters per year", symbol = "cm/year", utype = "speed", scale = 3.168873850681143e-10, default = "in/year", link = "Orders of magnitude (speed)", }, ["foot/s"] = { name1 = "foot per second", name2 = "foot per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", }, ["ft/min"] = { name1 = "foot per minute", name2 = "feet per minute", symbol = "ft/min", utype = "speed", scale = 0.00508, default = "m/min", link = "Feet per second", }, ["ft/s"] = { name1 = "foot per second", name2 = "feet per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", link = "Feet per second", }, ["furlong per fortnight"] = { name2 = "furlongs per fortnight", symbol = "furlong per fortnight", usename = 1, utype = "speed", scale = 0.00016630952380952381, default = "km/h mph", link = "FFF system", }, ["in/h"] = { name1 = "inch per hour", name2 = "inches per hour", symbol = "in/h", utype = "speed", scale = 7.0555555555555559e-6, default = "cm/h", link = "Inch", }, ["in/s"] = { name1 = "inch per second", name2 = "inches per second", symbol = "in/s", utype = "speed", scale = 0.0254, default = "cm/s", link = "Inch", }, ["in/year"] = { name1 = "inch per year", name2 = "inches per year", symbol = "in/year", utype = "speed", scale = 8.0489395807301024e-10, default = "cm/year", link = "Orders of magnitude (speed)", }, ["isp"] = { name1 = "second", symbol = "s", utype = "speed", scale = 9.80665, default = "km/s", link = "Specific impulse", }, ["km/d"] = { name1 = "kilometre per day", name1_us = "kilometer per day", name2 = "kilometres per day", name2_us = "kilometers per day", symbol = "km/d", utype = "speed", scale = 1.1574074074074074e-2, default = "mi/d", link = "Orders of magnitude (speed)", }, ["km/h"] = { name1 = "kilometre per hour", name1_us = "kilometer per hour", name2 = "kilometres per hour", name2_us = "kilometers per hour", symbol = "km/h", utype = "speed", scale = 0.27777777777777779, default = "mph", link = "Kilometres per hour", }, ["km/s"] = { name1 = "kilometre per second", name1_us = "kilometer per second", name2 = "kilometres per second", name2_us = "kilometers per second", symbol = "km/s", utype = "speed", scale = 1000, default = "mi/s", link = "Metre per second", }, ["kn"] = { name1 = "knot", symbol = "kn", utype = "speed", scale = 0.51444444444444448, default = "km/h mph", link = "Knot (unit)", }, ["kNs/kg"] = { name2 = "kN&#8209;s/kg", symbol = "kN&#8209;s/kg", utype = "speed", scale = 1000, default = "isp", link = "Specific impulse", }, ["m/min"] = { name1 = "metre per minute", name1_us = "meter per minute", name2 = "metres per minute", name2_us = "meters per minute", symbol = "m/min", utype = "speed", scale = 0.016666666666666666, default = "ft/min", link = "Metre per second", }, ["m/s"] = { name1 = "metre per second", name1_us = "meter per second", name2 = "metres per second", name2_us = "meters per second", symbol = "m/s", utype = "speed", scale = 1, default = "ft/s", }, ["Mach"] = { name2 = "Mach", symbol = "Mach", utype = "speed", builtin = "mach", scale = 0, iscomplex= true, default = "km/h mph", link = "Mach number", }, ["mi/d"] = { name1 = "mile per day", name2 = "miles per day", symbol = "mi/d", utype = "speed", scale = 1.8626666666666667e-2, default = "km/d", link = "Orders of magnitude (speed)", }, ["mi/s"] = { name1 = "mile per second", name2 = "miles per second", symbol = "mi/s", utype = "speed", scale = 1609.344, default = "km/s", link = "Mile", }, ["mm/h"] = { name1 = "millimetre per hour", name1_us = "millimeter per hour", name2 = "millimetres per hour", name2_us = "millimeters per hour", symbol = "mm/h", utype = "speed", scale = 2.7777777777777781e-7, default = "in/h", link = "Metre per second", }, ["mph"] = { name1 = "mile per hour", name2 = "miles per hour", symbol = "mph", utype = "speed", scale = 0.44704, default = "km/h", link = "Miles per hour", }, ["Ns/kg"] = { name2 = "N&#8209;s/kg", symbol = "N&#8209;s/kg", utype = "speed", scale = 1, default = "isp", link = "Specific impulse", }, ["si tsfc"] = { name2 = "g/(kN⋅s)", symbol = "g/(kN⋅s)", utype = "speed", scale = 9.9999628621379242e-7, invert = -1, iscomplex= true, default = "tsfc", link = "Thrust specific fuel consumption", }, ["tsfc"] = { name2 = "lb/(lbf⋅h)", symbol = "lb/(lbf⋅h)", utype = "speed", scale = 2.832545036049801e-5, invert = -1, iscomplex= true, default = "si tsfc", link = "Thrust specific fuel consumption", }, ["cm/y"] = { target = "cm/year", }, ["cm/yr"] = { target = "cm/year", }, ["in/y"] = { target = "in/year", }, ["in/yr"] = { target = "in/year", }, ["knot"] = { target = "kn", }, ["knots"] = { target = "kn", }, ["kph"] = { target = "km/h", }, ["mi/h"] = { target = "mph", }, ["mm/s"] = { per = { "mm", "s" }, utype = "speed", default = "in/s", link = "Metre per second", }, ["C"] = { name1 = "degree Celsius", name2 = "degrees Celsius", symbol = "°C", usesymbol= 1, utype = "temperature", scale = 1, offset = -273.15, iscomplex= true, istemperature= true, default = "F", link = "Celsius", }, ["F"] = { name1 = "degree Fahrenheit", name2 = "degrees Fahrenheit", symbol = "°F", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 32-273.15*(9/5), iscomplex= true, istemperature= true, default = "C", link = "Fahrenheit", }, ["K"] = { _name1 = "kelvin", _symbol = "K", usesymbol= 1, utype = "temperature", scale = 1, offset = 0, iscomplex= true, istemperature= true, prefixes = 1, default = "C F", link = "Kelvin", }, ["keVT"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "temperature", scale = 11.604505e6, offset = 0, iscomplex= true, default = "MK", link = "Electronvolt", }, ["R"] = { name1 = "degree Rankine", name2 = "degrees Rankine", symbol = "°R", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 0, iscomplex= true, istemperature= true, default = "K F C", link = "Rankine scale", }, ["Celsius"] = { target = "C", }, ["°C"] = { target = "C", }, ["°F"] = { target = "F", }, ["°R"] = { target = "R", }, ["C-change"] = { name1 = "degree Celsius change", name2 = "degrees Celsius change", symbol = "°C", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Celsius", }, ["F-change"] = { name1 = "degree Fahrenheit change", name2 = "degrees Fahrenheit change", symbol = "°F", usesymbol= 1, utype = "temperature change", scale = 0.55555555555555558, default = "C-change", link = "Fahrenheit", }, ["K-change"] = { name1 = "kelvin change", name2 = "kelvins change", symbol = "K", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Kelvin", }, ["°C-change"] = { target = "C-change", }, ["°F-change"] = { target = "F-change", }, ["century"] = { name1 = "century", name2 = "centuries", symbol = "ha", utype = "time", scale = 3155760000, default = "Gs", }, ["d"] = { name1 = "day", symbol = "d", utype = "time", scale = 86400, default = "ks", }, ["decade"] = { name1 = "decade", symbol = "daa", utype = "time", scale = 315576000, default = "Ms", }, ["dog year"] = { name1 = "dog year", symbol = "dog yr", utype = "time", scale = 220903200, default = "years", link = "List of unusual units of measurement#Dog year", }, ["fortnight"] = { symbol = "fortnight", usename = 1, utype = "time", scale = 1209600, default = "week", }, ["h"] = { name1 = "hour", symbol = "h", utype = "time", scale = 3600, default = "ks", }, ["long billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["millennium"] = { name1 = "millennium", name2 = "millennia", symbol = "ka", utype = "time", scale = 31557600000, default = "Gs", }, ["milliard year"] = { name1 = "milliard years", name2 = "milliard years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["million year"] = { name1 = "million years", name2 = "million years", symbol = "Ma", utype = "time", scale = 31557600000000, default = "Ts", link = "Annum", }, ["min"] = { name1 = "minute", symbol = "min", utype = "time", scale = 60, default = "s", }, ["month"] = { symbol = "month", usename = 1, utype = "time", scale = 2629800, default = "Ms", }, ["months"] = { name1 = "month", symbol = "mo", utype = "time", scale = 2629800, default = "year", }, ["s"] = { _name1 = "second", _symbol = "s", utype = "time", scale = 1, prefixes = 1, default = "v < 7200 ! min ! h", link = "Second", }, ["short billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["short trillion year"] = { name1 = "trillion years", name2 = "trillion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["thousand million year"] = { name1 = "thousand million years", name2 = "thousand million years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["wk"] = { symbol = "week", usename = 1, utype = "time", scale = 604800, default = "Ms", }, ["year"] = { name1 = "year", symbol = "a", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["years"] = { name1 = "year", symbol = "yr", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["byr"] = { target = "short billion year", }, ["day"] = { target = "d", }, ["days"] = { target = "d", }, ["dog yr"] = { target = "dog year", }, ["Gyr"] = { target = "thousand million year", }, ["hour"] = { target = "h", }, ["hours"] = { target = "h", }, ["kMyr"] = { target = "thousand million year", }, ["kmyr"] = { target = "thousand million year", }, ["kyr"] = { target = "millennium", }, ["long byr"] = { target = "long billion year", }, ["minute"] = { target = "min", }, ["minutes"] = { target = "min", }, ["mth"] = { target = "month", }, ["Myr"] = { target = "million year", }, ["myr"] = { target = "million year", }, ["sec"] = { target = "s", }, ["second"] = { target = "s", }, ["seconds"] = { target = "s", }, ["tmyr"] = { target = "thousand million year", }, ["tryr"] = { target = "short trillion year", }, ["tyr"] = { target = "millennium", }, ["week"] = { target = "wk", }, ["weeks"] = { target = "wk", }, ["yr"] = { target = "year", }, ["kg.m"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["kgf.m"] = { name1 = "kilogram force-metre", name1_us = "kilogram force-meter", symbol = "kgf⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kgm"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kpm"] = { name1 = "kilopond metre", name1_us = "kilopond meter", symbol = "kp⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["lb-fft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "ft⋅lb<sub>f</sub>", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.ft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.in"] = { name1 = "pound force-inch", symbol = "lb⋅in", utype = "torque", scale = 0.1129848290276167, default = "mN.m", link = "Pound-foot (torque)", }, ["lbfft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lbf⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lbft"] = { name1 = "pound-foot", name2 = "pound-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["m.kg-f"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kg<sub>f</sub>", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["m.kgf"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kgf", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["mN.m"] = { name1 = "millinewton-metre", name1_us = "millinewton-meter", symbol = "mN⋅m", utype = "torque", scale = 0.001, default = "lb.in", link = "Newton-metre", }, ["Nm"] = { _name1 = "newton-metre", _name1_us= "newton-meter", _symbol = "N⋅m", utype = "torque", alttype = "energy", scale = 1, prefixes = 1, default = "lbfft", link = "Newton-metre", }, ["kN/m"] = { per = { "kN", "-m-stiff" }, utype = "torque", default = "lbf/in", }, ["lbf/in"] = { per = { "lbf", "-in-stiff" }, utype = "torque", default = "kN/m", }, ["lb-f.ft"] = { target = "lb-fft", }, ["lbf.ft"] = { target = "lbfft", }, ["lbf·ft"] = { target = "lbfft", }, ["lb·ft"] = { target = "lb.ft", }, ["mkg-f"] = { target = "m.kg-f", }, ["mkgf"] = { target = "m.kgf", }, ["N.m"] = { target = "Nm", }, ["N·m"] = { target = "Nm", }, ["ton-mile"] = { symbol = "ton-mile", usename = 1, utype = "transportation", scale = 1.4599723182105602, default = "tkm", }, ["tkm"] = { name1 = "tonne-kilometre", name1_us = "tonne-kilometer", symbol = "tkm", utype = "transportation", scale = 1, default = "ton-mile", }, ["-12USoz(mL)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["-12USoz(ml)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", utype = "volume", scale = 0.00035488235475000004, default = "ml", link = "Beverage can#Standard sizes", }, ["-12USozserve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["acre-foot"] = { name1 = "acre-foot", name2 = "acre-foot", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["acre-ft"] = { name1 = "acre-foot", name2 = "acre-feet", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["AUtbsp"] = { name1 = "Australian tablespoon", symbol = "AU&nbsp;tbsp", utype = "volume", scale = 0.000020, default = "ml", }, ["Bcuft"] = { name1 = "billion cubic foot", name2 = "billion cubic feet", symbol = "billion cu&nbsp;ft", utype = "volume", scale = 28316846.592, default = "Gl", link = "Cubic foot", }, ["bdft"] = { name1 = "board foot", name2 = "board feet", symbol = "bd&nbsp;ft", utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board feet"] = { name2 = "board feet", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board foot"] = { name2 = "board foot", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["cc"] = { name1 = "cubic centimetre", name1_us = "cubic centimeter", symbol = "cc", utype = "volume", scale = 0.000001, default = "cuin", }, ["CID"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cc", link = "Cubic inch#Engine displacement", }, ["cord"] = { symbol = "cord", utype = "volume", scale = 3.624556363776, default = "m3", link = "Cord (unit)", }, ["cufoot"] = { name1 = "cubic foot", name2 = "cubic foot", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuft"] = { name1 = "cubic foot", name2 = "cubic feet", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuin"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cm3", }, ["cumi"] = { name1 = "cubic mile", symbol = "cu&nbsp;mi", utype = "volume", scale = 4168181825.440579584, default = "km3", }, ["cuyd"] = { name1 = "cubic yard", symbol = "cu&nbsp;yd", utype = "volume", scale = 0.764554857984, default = "m3", }, ["firkin"] = { symbol = "firkin", usename = 1, utype = "volume", scale = 0.04091481, default = "L impgal USgal", link = "Firkin (unit)", }, ["foot3"] = { target = "cufoot", }, ["Goilbbl"] = { name1 = "billion barrels", name2 = "billion barrels", symbol = "Gbbl", utype = "volume", scale = 158987294.928, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3", link = "Barrel (unit)#Oil barrel", }, ["gr water"] = { name1 = "grains water", name2 = "grains water", symbol = "gr H<sub>2</sub>O", utype = "volume", scale = 0.00000006479891, default = "cm3", link = "Grain (unit)", }, ["grt"] = { name1 = "gross register ton", symbol = "grt", utype = "volume", scale = 2.8316846592, default = "m3", link = "Gross register tonnage", }, ["impbbl"] = { name1 = "imperial barrel", symbol = "imp&nbsp;bbl", utype = "volume", scale = 0.16365924, default = "L impgal USgal", link = "Barrel (unit)", }, ["impbsh"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bsh", utype = "volume", scale = 0.03636872, default = "L impgal USdrygal", }, ["impbu"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bu", utype = "volume", scale = 0.03636872, default = "m3", }, ["impgal"] = { name1 = "imperial gallon", symbol = "imp&nbsp;gal", utype = "volume", scale = 0.00454609, default = "L USgal", }, ["impgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001420653125, default = "ml USoz", link = "Gill (unit)", }, ["impkenning"] = { name1 = "imperial kenning", symbol = "kenning", utype = "volume", scale = 0.01818436, default = "L USdrygal", link = "Kenning (unit)", }, ["impoz"] = { name1 = "imperial fluid ounce", symbol = "imp&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000284130625, default = "ml USoz", }, ["imppk"] = { name1 = "imperial peck", symbol = "pk", utype = "volume", scale = 0.00909218, default = "L USdrygal", link = "Peck", }, ["imppt"] = { name1 = "imperial pint", symbol = "imp&nbsp;pt", utype = "volume", scale = 0.00056826125, default = "L", }, ["impqt"] = { name1 = "imperial quart", symbol = "imp&nbsp;qt", utype = "volume", scale = 0.0011365225, default = "ml USoz", customary= 3, }, ["kilderkin"] = { symbol = "kilderkin", usename = 1, utype = "volume", scale = 0.08182962, default = "L impgal USgal", }, ["koilbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "kbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! ! e3 ! m3", link = "Barrel (unit)#Oil barrel", }, ["L"] = { _name1 = "litre", _name1_us= "liter", _symbol = "L", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["l"] = { _name1 = "litre", _name1_us= "liter", _symbol = "l", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["ll"] = { name1 = "litre", name1_us = "liter", symbol = "l", utype = "volume", scale = 0.001, default = "impgal USgal", }, ["m3"] = { _name1 = "cubic metre", _name1_us= "cubic meter", _symbol = "m<sup>3</sup>", prefix_position= 7, utype = "volume", scale = 1, prefixes = 3, default = "cuft", link = "Cubic metre", }, ["Mbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "Mbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! e3 ! ! m3", link = "Barrel (unit)#Oil barrel", }, ["MMoilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "MMbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["Moilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "Mbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["MTON"] = { name1 = "measurement ton", symbol = "MTON", utype = "volume", scale = 1.13267386368, default = "m3", }, ["MUSgal"] = { name1 = "million US gallons", name1_us = "million U.S. gallons", name2 = "million US gallons", name2_us = "million U.S. gallons", symbol = "million US&nbsp;gal", sym_us = "million U.S.&nbsp;gal", utype = "volume", scale = 3785.411784, default = "Ml", link = "US gallon", }, ["oilbbl"] = { name1 = "barrel", symbol = "bbl", utype = "volume", scale = 0.158987294928, default = "m3", link = "Barrel (unit)#Oil barrel", }, ["stere"] = { symbol = "stere", usename = 1, utype = "volume", scale = 1, default = "cuft", }, ["Toilbbl"] = { name1 = "trillion barrels", name2 = "trillion barrels", symbol = "Tbbl", utype = "volume", scale = 158987294928, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3", link = "Barrel (unit)#Oil barrel", }, ["USbbl"] = { name1 = "US barrel", name1_us = "U.S. barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.119240471196, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbeerbbl"] = { name1 = "US beer barrel", name1_us = "U.S. beer barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.117347765304, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbsh"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bsh", sym_us = "U.S.&nbsp;bsh", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USbu"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bu", sym_us = "U.S.&nbsp;bu", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USdrybbl"] = { name1 = "US dry barrel", name1_us = "U.S. dry barrel", symbol = "US&nbsp;dry&nbsp;bbl", sym_us = "U.S.&nbsp;dry&nbsp;bbl", utype = "volume", scale = 0.11562819898508, default = "m3", link = "Barrel (unit)", }, ["USdrygal"] = { name1 = "US dry gallon", name1_us = "U.S. dry gallon", symbol = "US&nbsp;dry&nbsp;gal", sym_us = "U.S.&nbsp;dry&nbsp;gal", utype = "volume", scale = 0.00440488377086, default = "L", link = "Gallon", }, ["USdrypt"] = { name1 = "US dry pint", name1_us = "U.S. dry pint", symbol = "US&nbsp;dry&nbsp;pt", sym_us = "U.S.&nbsp;dry&nbsp;pt", utype = "volume", scale = 0.0005506104713575, default = "ml", link = "Pint", }, ["USdryqt"] = { name1 = "US dry quart", name1_us = "U.S. dry quart", symbol = "US&nbsp;dry&nbsp;qt", sym_us = "U.S.&nbsp;dry&nbsp;qt", utype = "volume", scale = 0.001101220942715, default = "ml", link = "Quart", }, ["USflgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US fl gal", sym_us = "U.S.&nbsp;fl&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", link = "Gallon", }, ["USgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US&nbsp;gal", sym_us = "U.S.&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", }, ["USgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001182941183, default = "ml impoz", link = "Gill (unit)", }, ["USkenning"] = { name1 = "US kenning", name1_us = "U.S. kenning", symbol = "US&nbsp;kenning", sym_us = "U.S.&nbsp;kenning", utype = "volume", scale = 0.01761953508344, default = "L impgal", link = "Kenning (unit)", }, ["USmin"] = { name1 = "US minim", name1_us = "U.S. minim", symbol = "US&nbsp;min", sym_us = "U.S.&nbsp;min", utype = "volume", scale = 0.000000061611519921875, default = "ml", link = "Minim (unit)", }, ["USoz"] = { name1 = "US fluid ounce", name1_us = "U.S. fluid ounce", symbol = "US&nbsp;fl&nbsp;oz", sym_us = "U.S.&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000295735295625, default = "ml", }, ["USpk"] = { name1 = "US peck", name1_us = "U.S. peck", symbol = "US&nbsp;pk", sym_us = "U.S.&nbsp;pk", utype = "volume", scale = 0.00880976754172, default = "L impgal", link = "Peck", }, ["USpt"] = { name1 = "US pint", name1_us = "U.S. pint", symbol = "US&nbsp;pt", sym_us = "U.S.&nbsp;pt", utype = "volume", scale = 0.000473176473, default = "L imppt", link = "Pint", }, ["USqt"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml", link = "Quart", customary= 1, }, ["USquart"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml impoz", link = "Quart", }, ["UStbsp"] = { name1 = "US tablespoon", name1_us = "U.S. tablespoon", symbol = "US&nbsp;tbsp", sym_us = "U.S.&nbsp;tbsp", utype = "volume", scale = 1.4786764781250001e-5, default = "ml", }, ["winecase"] = { symbol = "case", usename = 1, utype = "volume", scale = 0.009, default = "L", link = "Case (goods)", }, ["*U.S.drygal"] = { target = "USdrygal", sp_us = true, customary= 2, }, ["*U.S.gal"] = { target = "USgal", sp_us = true, customary= 2, }, ["+USdrygal"] = { target = "USdrygal", customary= 1, }, ["+usfloz"] = { target = "USoz", link = "Fluid ounce", customary= 1, }, ["+USgal"] = { target = "USgal", customary= 1, }, ["+USoz"] = { target = "USoz", customary= 1, }, ["@impgal"] = { target = "impgal", link = "Gallon", customary= 3, }, ["acre feet"] = { target = "acre-ft", }, ["acre foot"] = { target = "acre-foot", }, ["acre ft"] = { target = "acre-ft", }, ["acre-feet"] = { target = "acre-ft", }, ["acre.foot"] = { target = "acre-foot", }, ["acre.ft"] = { target = "acre-ft", }, ["acre·ft"] = { target = "acre-ft", }, ["bushels"] = { target = "USbsh", }, ["cid"] = { target = "CID", }, ["ft3"] = { target = "cuft", }, ["gal"] = { target = "USgal", }, ["gallon"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallon%})", }, ["gallons"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallons%})", }, ["Gcuft"] = { target = "e9cuft", }, ["impfloz"] = { target = "impoz", }, ["Impgal"] = { target = "impgal", }, ["in3"] = { target = "cuin", symbol = "in<sup>3</sup>", }, ["hm³"] = { target = "hm3", }, ["kcuft"] = { target = "e3cuft", }, ["kcum"] = { target = "e3m3", }, ["km³"] = { target = "km3", }, ["liter"] = { target = "L", sp_us = true, }, ["liters"] = { target = "L", sp_us = true, }, ["litre"] = { target = "L", }, ["litres"] = { target = "L", }, ["Mcuft"] = { target = "e6cuft", }, ["Mcum"] = { target = "e6m3", }, ["Mft3"] = { target = "e6cuft", }, ["mi3"] = { target = "cumi", }, ["m³"] = { target = "m3", }, ["Pcuft"] = { target = "e15cuft", }, ["pt"] = { shouldbe = "Use %{USpt%} for US pints or %{imppt%} for imperial pints (not %{pt%})", }, ["qt"] = { shouldbe = "Use %{USqt%} for US quarts or %{impqt%} for imperial quarts (not %{qt%})", }, ["Tcuft"] = { target = "e12cuft", }, ["Tft3"] = { target = "e12cuft", }, ["U.S.bbl"] = { target = "USbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.beerbbl"] = { target = "USbeerbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.bsh"] = { target = "USbsh", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.bu"] = { target = "USbu", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.drybbl"] = { target = "USdrybbl", sp_us = true, }, ["U.S.drygal"] = { target = "USdrygal", sp_us = true, }, ["U.S.drypt"] = { target = "USdrypt", sp_us = true, }, ["U.S.dryqt"] = { target = "USdryqt", sp_us = true, }, ["U.S.flgal"] = { target = "USflgal", sp_us = true, }, ["U.S.floz"] = { target = "USoz", sp_us = true, }, ["U.S.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["u.s.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["U.S.gi"] = { target = "USgi", sp_us = true, }, ["U.S.kenning"] = { target = "USkenning", sp_us = true, }, ["U.S.oz"] = { target = "USoz", sp_us = true, }, ["U.S.pk"] = { target = "USpk", sp_us = true, }, ["U.S.pt"] = { target = "USpt", sp_us = true, }, ["U.S.qt"] = { target = "USqt", sp_us = true, default = "L impqt", customary= 2, }, ["usbbl"] = { target = "USbbl", }, ["usbeerbbl"] = { target = "USbeerbbl", }, ["usbsh"] = { target = "USbsh", }, ["usbu"] = { target = "USbu", }, ["usdrybbl"] = { target = "USdrybbl", }, ["usdrygal"] = { target = "USdrygal", }, ["usdrypt"] = { target = "USdrypt", }, ["usdryqt"] = { target = "USdryqt", }, ["USfloz"] = { target = "USoz", }, ["usfloz"] = { target = "USoz", }, ["USGAL"] = { target = "USgal", }, ["usgal"] = { target = "USgal", }, ["usgi"] = { target = "USgi", }, ["uskenning"] = { target = "USkenning", }, ["usoz"] = { target = "USoz", }, ["uspk"] = { target = "USpk", }, ["uspt"] = { target = "USpt", }, ["usqt"] = { target = "USqt", }, ["yd3"] = { target = "cuyd", }, ["cuft/sqmi"] = { per = { "cuft", "sqmi" }, utype = "volume per unit area", default = "m3/km2", }, ["m3/ha"] = { name1 = "cubic metre per hectare", name1_us = "cubic meter per hectare", name2 = "cubic metres per hectare", name2_us = "cubic meters per hectare", symbol = "m<sup>3</sup>/ha", utype = "volume per unit area", scale = 0.0001, default = "USbu/acre", link = "Hectare", }, ["m3/km2"] = { per = { "m3", "km2" }, utype = "volume per unit area", default = "cuft/sqmi", }, ["U.S.gal/acre"] = { per = { "U.S.gal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["USbu/acre"] = { name2 = "US bushels per acre", symbol = "US bushel per acre", usename = 1, utype = "volume per unit area", scale = 8.7077638761350888e-6, default = "m3/ha", link = "Bushel", }, ["USgal/acre"] = { per = { "USgal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["cuyd/mi"] = { per = { "cuyd", "mi" }, utype = "volume per unit length", default = "m3/km", }, ["m3/km"] = { per = { "m3", "km" }, utype = "volume per unit length", default = "cuyd/mi", }, ["mich"] = { combination= { "ch", "mi" }, multiple = { 80 }, utype = "length", }, ["michlk"] = { combination= { "chlk", "mi" }, multiple = { 80 }, utype = "length", }, ["michainlk"] = { combination= { "chainlk", "mi" }, multiple = { 80 }, utype = "length", }, ["miyd"] = { combination= { "yd", "mi" }, multiple = { 1760 }, utype = "length", }, ["miydftin"] = { combination= { "in", "ft", "yd", "mi" }, multiple = { 12, 3, 1760 }, utype = "length", }, ["mift"] = { combination= { "ft", "mi" }, multiple = { 5280 }, utype = "length", }, ["ydftin"] = { combination= { "in", "ft", "yd" }, multiple = { 12, 3 }, utype = "length", }, ["ydft"] = { combination= { "ft", "yd" }, multiple = { 3 }, utype = "length", }, ["ftin"] = { combination= { "in", "ft" }, multiple = { 12 }, utype = "length", }, ["footin"] = { combination= { "in", "foot" }, multiple = { 12 }, utype = "length", }, ["handin"] = { combination= { "in", "hand" }, multiple = { 4 }, utype = "length", }, ["lboz"] = { combination= { "oz", "lb" }, multiple = { 16 }, utype = "mass", }, ["stlb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["stlboz"] = { combination= { "oz", "lb", "st" }, multiple = { 16, 14 }, utype = "mass", }, ["st and lb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["GN LTf"] = { combination= { "GN", "-LTf" }, utype = "force", }, ["GN LTf STf"] = { combination= { "GN", "-LTf", "-STf" }, utype = "force", }, ["GN STf"] = { combination= { "GN", "-STf" }, utype = "force", }, ["GN STf LTf"] = { combination= { "GN", "-STf", "-LTf" }, utype = "force", }, ["kN LTf"] = { combination= { "kN", "-LTf" }, utype = "force", }, ["kN LTf STf"] = { combination= { "kN", "-LTf", "-STf" }, utype = "force", }, ["kN STf"] = { combination= { "kN", "-STf" }, utype = "force", }, ["kN STf LTf"] = { combination= { "kN", "-STf", "-LTf" }, utype = "force", }, ["LTf STf"] = { combination= { "-LTf", "-STf" }, utype = "force", }, ["MN LTf"] = { combination= { "MN", "-LTf" }, utype = "force", }, ["MN LTf STf"] = { combination= { "MN", "-LTf", "-STf" }, utype = "force", }, ["MN STf"] = { combination= { "MN", "-STf" }, utype = "force", }, ["MN STf LTf"] = { combination= { "MN", "-STf", "-LTf" }, utype = "force", }, ["STf LTf"] = { combination= { "-STf", "-LTf" }, utype = "force", }, ["L/100 km mpgimp"] = { combination= { "L/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["l/100 km mpgimp"] = { combination= { "l/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["L/100 km mpgUS"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["L/100 km mpgus"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["l/100 km mpgus"] = { combination= { "l/100 km", "mpgus" }, utype = "fuel efficiency", }, ["mpgimp L/100 km"] = { combination= { "mpgimp", "L/100 km" }, utype = "fuel efficiency", }, ["LT ST t"] = { combination= { "lt", "-ST", "t" }, utype = "mass", }, ["LT t ST"] = { combination= { "lt", "t", "-ST" }, utype = "mass", }, ["ST LT t"] = { combination= { "-ST", "lt", "t" }, utype = "mass", }, ["ST t LT"] = { combination= { "-ST", "t", "lt" }, utype = "mass", }, ["t LT ST"] = { combination= { "t", "lt", "-ST" }, utype = "mass", }, ["ton"] = { combination= { "LT", "ST" }, utype = "mass", }, ["kPa kg/cm2"] = { combination= { "kPa", "kgf/cm2" }, utype = "pressure", }, ["kPa lb/in2"] = { combination= { "kPa", "-lb/in2" }, utype = "pressure", }, ["floz"] = { combination= { "impoz", "USoz" }, utype = "volume", }, } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local default_exceptions = { -- Prefixed units with a default different from that of the base unit. -- Each key item is a prefixed symbol (unitcode for engineering notation). ["cm<sup>2</sup>"] = "sqin", ["dm<sup>2</sup>"] = "sqin", ["e3acre"] = "km2", ["e3m2"] = "e6sqft", ["e6acre"] = "km2", ["e6ha"] = "e6acre", ["e6km2"] = "e6sqmi", ["e6m2"] = "e6sqft", ["e6sqft"] = "v * 9.290304 < 100 ! e3 ! e6 ! m2", ["e6sqmi"] = "e6km2", ["hm<sup>2</sup>"] = "acre", ["km<sup>2</sup>"] = "sqmi", ["mm<sup>2</sup>"] = "sqin", ["aJ"] = "eV", ["e3BTU"] = "MJ", ["e6BTU"] = "GJ", ["EJ"] = "kWh", ["fJ"] = "keV", ["GJ"] = "kWh", ["MJ"] = "kWh", ["PJ"] = "kWh", ["pJ"] = "MeV", ["TJ"] = "kWh", ["YJ"] = "kWh", ["yJ"] = "μeV", ["ZJ"] = "kWh", ["zJ"] = "meV", ["e12cuft/a"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/a", ["e12cuft/d"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/d", ["e12m3/a"] = "Tcuft/a", ["e12m3/d"] = "Tcuft/d", ["e3cuft/a"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/a", ["e3cuft/d"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/d", ["e3cuft/s"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/s", ["e3m3/a"] = "v < 28.316846592 ! k ! M ! cuft/a", ["e3m3/d"] = "v < 28.316846592 ! k ! M ! cuft/d", ["e3m3/s"] = "v < 28.316846592 ! k ! M ! cuft/s", ["e3USgal/a"] = "v * 3.785411784 < 1000 ! ! e3 ! m3/a", ["e6cuft/a"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/a", ["e6cuft/d"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/d", ["e6cuft/s"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/s", ["e6m3/a"] = "v < 28.316846592 ! M ! G ! cuft/a", ["e6m3/d"] = "v < 28.316846592 ! M ! G ! cuft/d", ["e6m3/s"] = "v < 28.316846592 ! e6 ! e9 ! cuft/s", ["e6USgal/a"] = "v * 3.785411784 < 1000 ! e3 ! e6 ! m3/a", ["e9cuft/a"] = "m3/a", ["e9cuft/d"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3/d", ["e9m3/a"] = "v < 28.316846592 ! G ! T ! cuft/a", ["e9m3/d"] = "v < 28.316846592 ! G ! T ! cuft/d", ["e9m3/s"] = "v < 28.316846592 ! e9 ! e12 ! cuft/s", ["e9USgal/a"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/a", ["e9USgal/s"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/s", ["nN"] = "gr-f", ["μN"] = "gr-f", ["mN"] = "oz-f", ["am"] = "in", ["cm"] = "in", ["dam"] = "ft", ["dm"] = "in", ["e12km"] = "e12mi", ["e12mi"] = "e12km", ["e3AU"] = "ly", ["e3km"] = "e3mi", ["e3mi"] = "e3km", ["e6km"] = "e6mi", ["e6mi"] = "e6km", ["e9km"] = "AU", ["e9mi"] = "e9km", ["Em"] = "mi", ["fm"] = "in", ["Gm"] = "mi", ["hm"] = "ft", ["km"] = "mi", ["mm"] = "in", ["Mm"] = "mi", ["nm"] = "in", ["Pm"] = "mi", ["pm"] = "in", ["Tm"] = "mi", ["Ym"] = "mi", ["ym"] = "in", ["Zm"] = "mi", ["zm"] = "in", ["μm"] = "in", ["e12lb"] = "v * 4.5359237 < 10 ! Mt ! Gt", ["e3lb"] = "v * 4.5359237 < 10 ! kg ! t", ["e3ozt"] = "v * 0.311034768 < 10 ! kg ! t", ["e3t"] = "LT ST", ["e6carat"] = "t", ["e6lb"] = "v * 4.5359237 < 10 ! t ! kilotonne", ["e6ozt"] = "lb kg", ["e6ST"] = "Mt", ["e6t"] = "LT ST", ["e9lb"] = "v * 4.5359237 < 10 ! kilotonne ! Mt", ["e9t"] = "LT ST", ["Gg"] = "lb", ["kg"] = "lb", ["mg"] = "gr", ["Mg"] = "LT ST", ["ng"] = "gr", ["μg"] = "gr", ["mBq"] = "fCi", ["kBq"] = "nCi", ["MBq"] = "μCi", ["GBq"] = "mCi", ["TBq"] = "Ci", ["PBq"] = "kCi", ["EBq"] = "kCi", ["fCi"] = "mBq", ["pCi"] = "Bq", ["nCi"] = "Bq", ["μCi"] = "kBq", ["mCi"] = "MBq", ["kCi"] = "TBq", ["MCi"] = "PBq", ["ns"] = "μs", ["μs"] = "ms", ["ms"] = "s", ["ks"] = "h", ["Ms"] = "week", ["Gs"] = "decade", ["Ts"] = "millennium", ["Ps"] = "million year", ["Es"] = "thousand million year", ["MK"] = "keVT", ["cL"] = "impoz usoz", ["cl"] = "impoz usoz", ["cm<sup>3</sup>"] = "cuin", ["dL"] = "impoz usoz", ["dl"] = "impoz usoz", ["mm<sup>3</sup>"] = "cuin", ["dm<sup>3</sup>"] = "cuin", ["e12cuft"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3", ["e12impgal"] = "v * 4.54609 < 1000 ! T ! P ! l", ["e12m3"] = "v < 28.316846592 ! T ! P ! cuft", ["e12U.S.gal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e12USgal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e15cuft"] = "v * 2.8316846592 < 100 ! e12 ! e15 ! m3", ["e15m3"] = "Pcuft", ["e3bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e3cuft"] = "v * 2.8316846592 < 100 ! ! e3 ! m3", ["e3impgal"] = "v * 4.54609 < 1000 ! k ! M ! l", ["e3m3"] = "v < 28.316846592 ! k ! M ! cuft", ["e3U.S.gal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e3USgal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e6bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e6cuft"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3", ["e6cuyd"] = "v * 7.64554857984 < 10 ! e3 ! e6 ! m3", ["e6impgal"] = "v * 4.54609 < 1000 ! M ! G ! l", ["e6L"] = "USgal", ["e6m3"] = "v < 28.316846592 ! M ! G ! cuft", ["e6U.S.gal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e6USgal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e9bdft"] = "v * 0.23597372167 < 100 ! e6 ! e9 ! m3", ["e9cuft"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3", ["e9impgal"] = "v * 4.54609 < 1000 ! G ! T ! l", ["e9m3"] = "v < 28.316846592 ! G ! T ! cuft", ["e9U.S.gal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["e9USgal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["GL"] = "cuft", ["Gl"] = "cuft", ["kL"] = "cuft", ["kl"] = "cuft", ["km<sup>3</sup>"] = "cumi", ["mL"] = "impoz usoz", ["ml"] = "impoz usoz", ["Ml"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["ML"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["TL"] = "cumi", ["Tl"] = "cumi", ["μL"] = "cuin", ["μl"] = "cuin", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local link_exceptions = { -- Prefixed units with a linked article different from that of the base unit. -- Each key item is a prefixed symbol (not unitcode). ["mm<sup>2</sup>"] = "Square millimetre", ["cm<sup>2</sup>"] = "Square centimetre", ["dm<sup>2</sup>"] = "Square decimetre", ["km<sup>2</sup>"] = "Square kilometre", ["kJ"] = "Kilojoule", ["MJ"] = "Megajoule", ["GJ"] = "Gigajoule", ["TJ"] = "Terajoule", ["fm"] = "Femtometre", ["pm"] = "Picometre", ["nm"] = "Nanometre", ["μm"] = "Micrometre", ["mm"] = "Millimetre", ["cm"] = "Centimetre", ["dm"] = "Decimetre", ["dam"] = "Decametre", ["hm"] = "Hectometre", ["km"] = "Kilometre", ["Mm"] = "Megametre", ["Gm"] = "Gigametre", ["Tm"] = "Terametre", ["Pm"] = "Petametre", ["Em"] = "Exametre", ["Zm"] = "Zettametre", ["Ym"] = "Yottametre", ["μg"] = "Microgram", ["mg"] = "Milligram", ["kg"] = "Kilogram", ["Mg"] = "Tonne", ["yW"] = "Yoctowatt", ["zW"] = "Zeptowatt", ["aW"] = "Attowatt", ["fW"] = "Femtowatt", ["pW"] = "Picowatt", ["nW"] = "Nanowatt", ["μW"] = "Microwatt", ["mW"] = "Milliwatt", ["kW"] = "Kilowatt", ["MW"] = "Megawatt", ["GW"] = "Gigawatt", ["TW"] = "Terawatt", ["PW"] = "Petawatt", ["EW"] = "Exawatt", ["ZW"] = "Zettawatt", ["YW"] = "Yottawatt", ["as"] = "Attosecond", ["fs"] = "Femtosecond", ["ps"] = "Picosecond", ["ns"] = "Nanosecond", ["μs"] = "Microsecond", ["ms"] = "Millisecond", ["ks"] = "Kilosecond", ["Ms"] = "Megasecond", ["Gs"] = "Gigasecond", ["Ts"] = "Terasecond", ["Ps"] = "Petasecond", ["Es"] = "Exasecond", ["Zs"] = "Zettasecond", ["Ys"] = "Yottasecond", ["mm<sup>3</sup>"] = "Cubic millimetre", ["cm<sup>3</sup>"] = "Cubic centimetre", ["dm<sup>3</sup>"] = "Cubic decimetre", ["dam<sup>3</sup>"] = "Cubic decametre", ["km<sup>3</sup>"] = "Cubic kilometre", ["μL"] = "Microlitre", ["μl"] = "Microlitre", ["mL"] = "Millilitre", ["ml"] = "Millilitre", ["cL"] = "Centilitre", ["cl"] = "Centilitre", ["dL"] = "Decilitre", ["dl"] = "Decilitre", ["daL"] = "Decalitre", ["dal"] = "Decalitre", ["hL"] = "Hectolitre", ["hl"] = "Hectolitre", ["kL"] = "Kilolitre", ["kl"] = "Kilolitre", ["ML"] = "Megalitre", ["Ml"] = "Megalitre", ["GL"] = "Gigalitre", ["Gl"] = "Gigalitre", ["TL"] = "Teralitre", ["Tl"] = "Teralitre", ["PL"] = "Petalitre", ["Pl"] = "Petalitre", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local per_unit_fixups = { -- Automatically created per units of form "x/y" may have their unit type -- changed, for example, "length/time" is changed to "speed". -- Other adjustments can also be specified. ["/area"] = "per unit area", ["/volume"] = "per unit volume", ["area/area"] = "area per unit area", ["energy/length"] = "energy per unit length", ["energy/mass"] = "energy per unit mass", ["energy/time"] = { utype = "power", link = "Power (physics)" }, ["energy/volume"] = "energy per unit volume", ["force/area"] = { utype = "pressure", link = "Pressure" }, ["length/length"] = { utype = "gradient", link = "Grade (slope)" }, ["length/time"] = { utype = "speed", link = "Speed" }, ["length/time/time"] = { utype = "acceleration", link = "Acceleration" }, ["mass/area"] = { utype = "pressure", multiplier = 9.80665 }, ["mass/length"] = "linear density", ["mass/mass"] = "concentration", ["mass/power"] = "mass per unit power", ["mass/time"] = "mass per unit time", ["mass/volume"] = { utype = "density", link = "Density" }, ["power/mass"] = "power per unit mass", ["power/volume"] = { link = "Power density" }, ["pressure/length"] = "fracture gradient", ["speed/time"] = { utype = "acceleration", link = "Acceleration" }, ["volume/area"] = "volume per unit area", ["volume/length"] = "volume per unit length", ["volume/time"] = "flow", } return { all_units = all_units, default_exceptions = default_exceptions, link_exceptions = link_exceptions, per_unit_fixups = per_unit_fixups, } qqj4g2oxidkgpzdwn80dmy13z1k46b9 Modul:Convert/extra 828 284 846 845 2024-08-09T09:21:31Z Jon Harald Søby 58 1 semakan diimportkan 845 Scribunto text/plain -- Extra conversion data used by Module:Convert. -- -- [[Modul:Convert/data]] defines all units and is transcluded in all pages -- where [[Modul:Convert]] is used. Testing new units by editing that module -- would invalidate the cache for all affected pages. -- -- For quick changes and experiments with new units, this module can be edited. -- Since this module is transcluded in only a small number of pages, changes -- should cause little server overhead and should propagate quickly. -- -- If a unit is defined in the data module, any definition here is ignored, -- so defining the same unit in both modules is not an error. -- A unit defined here can refer to units that are also defined here, and -- can refer to units defined in the data module. -- -- Periodically, those extra units that are wanted permanently can be removed -- from here after being added to [[Modul:Convert/data]]. local extra_units = { ["bit"] = { _name1 = "bit", _symbol = "bit", utype = "information", scale = 0.125, prefixes = 1, default = "B", link = "Bit", }, } return { extra_units = extra_units } cvnm42pgoviqct0jfqimjfo21c6ncdf Modul:Convert/text 828 285 848 847 2024-08-09T09:21:31Z Jon Harald Søby 58 1 semakan diimportkan 847 Scribunto text/plain -- Text used by Module:Convert for enwiki. -- This is a separate module to simplify translation for use on another wiki. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- Some units accept an SI prefix before the unit code, such as "kg" for kilogram. local SIprefixes = { -- The prefix field is what the prefix should be, if different from the prefix used. ['Q'] = { exponent = 30, name = 'quetta', }, ['R'] = { exponent = 27, name = 'ronna', }, ['Y'] = { exponent = 24, name = 'yotta', }, ['Z'] = { exponent = 21, name = 'zetta', }, ['E'] = { exponent = 18, name = 'exa' , }, ['P'] = { exponent = 15, name = 'peta' , }, ['T'] = { exponent = 12, name = 'tera' , }, ['G'] = { exponent = 9, name = 'giga' , }, ['M'] = { exponent = 6, name = 'mega' , }, ['k'] = { exponent = 3, name = 'kilo' , }, ['h'] = { exponent = 2, name = 'hecto', }, ['da']= { exponent = 1, name = 'deca' , name_us = 'deka' }, ['d'] = { exponent = -1, name = 'deci' , }, ['c'] = { exponent = -2, name = 'centi', }, ['m'] = { exponent = -3, name = 'milli', }, ['μ'] = { exponent = -6, name = 'micro', }, -- key = 'GREEK SMALL LETTER MU' (U+03BC) utf-8 CE BC ['µ'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- key = 'MICRO SIGN' (U+00B5) utf-8 C2 B5 ['u'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- not an SI prefix, but allow for people typing this ['n'] = { exponent = -9, name = 'nano' , }, ['p'] = { exponent =-12, name = 'pico' , }, ['f'] = { exponent =-15, name = 'femto', }, ['a'] = { exponent =-18, name = 'atto' , }, ['z'] = { exponent =-21, name = 'zepto', }, ['y'] = { exponent =-24, name = 'yocto', }, ['r'] = { exponent =-27, name = 'ronto', }, ['q'] = { exponent =-30, name = 'quecto', }, } -- Some units can be qualified with one of the following prefixes, when linked. local customary_units = { { "US", link = "United States customary units" }, { "U.S.", link = "United States customary units" }, { "imperial", link = "Imperial units" }, { "imp", link = "Imperial units" }, } -- Names when using engineering notation (a prefix of "eN" where N is a number; example "e6km"). -- key = { "name", link = "article title", exponent = numeric_key_value } -- If lk=on and link is defined, the name of the number will appear as a link. local eng_scales = { ["3"] = { "thousand", exponent = 3 }, ["6"] = { "million", exponent = 6 }, ["9"] = { "billion", link = "1000000000 (number)", exponent = 9 }, ["12"] = { "trillion", link = "1000000000000 (number)", exponent = 12 }, ["15"] = { "quadrillion", link = "1000000000000000 (number)", exponent = 15 }, } local all_categories = { unit = "[[Kategori:Convert errors]]", option = "[[Kategori:Convert errors]]", warning = '[[Kategori:Convert invalid options]]', tracking = '[[Kategori:Convert tracking]]', } -- For some error messages, the following puts the wanted style around -- each unit code marked like '...%{ft%}...'. local unitcode_regex = '%%([{}])' local unitcode_replace = { ['{'] = '"', ['}'] = '"' } -- no longer need the more elaborate substitute used before 2013-09-28 -- All messages that may be displayed if a problem occurs. local all_messages = { -- Message format string: $1=title, $2=text, $3=category, $4=anchor. -- Each displayed message starts with "Convert:" so can easily locate by searching article. cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i>[[Bantuan:Convert messages#$4|<span title="Convert: $1">convert: $2</span>]]</i>]</sup>$3<span class="error"></span>', cvt_format2 = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[[Bantuan:Convert messages#$4|<span title="Convert: $1">$2</span>]]</sup>$3<span class="error"></span>', cvt_format_preview = '<strong class="error">Error in convert: $1 [[Bantuan:Convert messages#$4|(help)]]</strong>$3', -- Each of following messages is a table: -- { [1] = 'title', -- mouseover title text -- [2] = 'text', -- link text displayed in article -- [3] = 'category key', -- key to lookup category in all_categories -- [4] = 'anchor', -- anchor for link to relevant section on help page -- regex = gsub_regex, -- replace = gsub_table, -- } Mouseover title text Link text CatKey Anchor cvt_bad_input = { 'input "$1" must be a number and unit' , 'invalid input' , 'option', 'invalid_input' }, cvt_bad_num = { 'Value "$1" must be a number' , 'invalid number' , 'option', 'invalid_number' }, cvt_big_prec = { 'Precision "$1" is too large' , 'precision too large' , 'option', 'precision_too_large' }, cvt_invalid_num = { 'Number has overflowed' , 'number overflow' , 'option', 'number_overflow' }, cvt_no_num = { 'Needs the number to be converted' , 'needs a number' , 'option', 'needs_number' }, cvt_no_num2 = { 'Needs another number for a range' , 'needs another number', 'option', 'needs_another_number' }, cvt_bad_altitude = { '"$1" needs an integer' , 'invalid altitude' , 'option', 'invalid_altitude' }, cvt_bad_frac = { '"$1" needs an integer above 1' , 'invalid fraction' , 'option', 'invalid_fraction' }, cvt_bad_prec = { 'Precision "$1" must be an integer' , 'invalid precision' , 'option', 'invalid_precision' }, cvt_bad_sigfig = { '"$1" needs a positive integer' , 'invalid sigfig' , 'option', 'invalid_sigfig' }, cvt_empty_option = { 'Ignored empty option "$1"' , 'empty option' , 'option', 'empty_option' }, cvt_deprecated = { 'Option "$1" is deprecated' , '*' , 'option', 'deprecated_option', format = 'cvt_format2', nowarn = true }, cvt_no_spell = { 'Spelling is not available' , 'bug, ask for help' , 'option', 'ask_for_help' }, cvt_unknown_option = { 'Ignored invalid option "$1"' , 'invalid option' , 'option', 'invalid_option' }, cvt_wd_fail = { 'Unable to access Wikidata' , 'wikidata problem' , 'option', 'wikidata_problem' }, cvt_bad_default = { 'Unit "$1" has an invalid default' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_bad_unit = { 'Unit "$1" is invalid here' , 'unit invalid here' , 'unit' , 'unit_invalid_here' }, cvt_no_default = { 'Unit "$1" has no default output unit' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_no_unit = { 'Needs name of unit' , 'needs unit name' , 'unit' , 'needs_unit_name' }, cvt_unknown = { 'Unit name "$1" is not known' , 'unknown unit' , 'unit' , 'unknown_unit' }, cvt_should_be = { '$1' , 'ambiguous unit' , 'unit' , 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace }, cvt_mismatch = { 'Cannot convert "$1" to "$2"' , 'unit mismatch' , 'unit' , 'unit_mismatch' }, cvt_bug_convert = { 'Bug: Cannot convert between specified units', 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_lookup = { 'Unit "$1" is incorrectly defined' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, } -- Text to join input value/unit with output value/unit. local disp_joins = { -- [1]=before output, [2]=after output, [3]=between outputs in a combination; default "; " -- [wantname] gives default abbr=off ["or"] = { " or " , "" , " or ", wantname = true }, ["sqbr-sp"] = { " [" , "]" }, ["sqbr-nbsp"] = { "&nbsp;[" , "]" }, ["comma"] = { ", " , "" , ", " }, ["semicolon"] = { "; " , "" }, ["slash-sp"] = { " / " , "" , wantname = true }, ["slash-nbsp"] = { "&nbsp;/ ", "" , wantname = true }, ["slash-nosp"] = { "/" , "" , wantname = true }, ["b"] = { " (" , ")" }, ["(or)"] = { " (" , ")", " or " }, ["br"] = { "<br />" , "" , wantname = true }, ["br()"] = { "<br />(" , ")", wantname = true }, } -- Text to separate values in a range. local range_types = { -- Specifying a table requires either: -- * "off" and "on" values (for "abbr=off" and "abbr=on"), or -- * "input" and "output" values (for LHS and RHS); -- other fields are optional. -- When "adj=on|abbr=off" applies, spaces in range text are replaced with hyphens. -- With "exception = true", that also occurs with "adj=on|abbr=on". -- If "adj" is defined here, that text (unchanged) is used with "adj=on". ["+"] = " + ", [","] = ",&nbsp;", [", and"] = ", and ", [", or"] = ", or ", ["by"] = " by ", ["-"] = "–", ["to about"] = " to about ", ["and"] = { off = " and ", on = " and ", exception = true }, ["and(-)"] = { input = " and ", output = "–" }, ["or"] = { off = " or " , on = " or " , exception = true }, ["to"] = { off = " to " , on = " to " , exception = true }, ["to(-)"] = { input = "&nbsp;to ", output = "–" }, ["+/-"] = { off = "&nbsp;±&nbsp;", on = "&nbsp;±&nbsp;", adj = "&nbsp;±&nbsp;", is_range_change = true }, ["by(x)"] = { input = " by ", output = " ×&nbsp;", out_range_x = true }, ["x"] = { off = " by ", on = " ×&nbsp;", abbr_range_x = true }, ["xx"] = "&nbsp;×&nbsp;", ["*"] = "×", ["/"] = "&thinsp;/&thinsp;", -- for a table of high/low temperatures with {{convert|83|/|63|F|disp=br()|abbr=values}} } local range_aliases = { -- ["alternative name for a range"] = "standard range name" ["–"] = "-", ["&ndash;"] = "-", ["×"] = "x", ["&times;"] = "x", ["±"] = "+/-", ["&plusmn;"] = "+/-", } -- Convert accepts range text delimited with whitespace, for example, {{convert|1 to 2|ft}}. -- In addition, the following "words" are accepted without spaces, for example, {{convert|1-2|ft}}. -- Words must be in correct order for searching, for example, 'x' after 'xx'. local range_words = { '-', '–', 'xx', 'x', '*' } local ranges = { types = range_types, aliases = range_aliases, words = range_words, } -- Valid option names. local en_option_name = { -- ["local text for option name"] = "en name used in this module" ["$"] = "$", ["abbr"] = "abbr", ["adj"] = "adj", ["altitude_ft"] = "altitude_ft", ["altitude_m"] = "altitude_m", ["comma"] = "comma", ["debug"] = "debug", ["disp"] = "disp", ["frac"] = "frac", ["input"] = "input", ["lang"] = "lang", ["lk"] = "lk", ["order"] = "order", ["qid"] = "qid", ["qual"] = "qual", ["qualifier"] = "qual", ["round"] = "round", ["sigfig"] = "sigfig", ["sing"] = "adj", -- "sing" is an old alias for "adj" ["sortable"] = "sortable", ["sp"] = "sp", ["spell"] = "spell", ["stylein"] = "stylein", ["styleout"] = "styleout", ["tracking"] = "tracking", } -- Valid option values. -- Convention: parms.opt_xxx refers to an option that is set here -- (not intended to be set by the template which invokes this module). -- Example: At enwiki, "abbr" includes: -- ["values"] = "opt_values" -- As a result, if the template uses abbr=values, Module:Convert sets: -- parms["opt_values"] = true -- parms["abbr"] = nil -- Therefore parms.abbr will be nil, or will have one of the listed values -- that do not start with "opt_". -- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated. local en_option_value = { ["$"] = 'TEXT', -- TEXT should be a currency symbol that will be used instead of "$" ["abbr"] = { -- ["local text for option value"] = "en value used in this module" ["def"] = "", -- ignored (some wrapper templates call convert with "abbr=def" to mean "default abbreviation") ["h"] = "on", -- abbr=on + use "h" for hand unit (default) ["hh"] = "opt_hand_hh", -- abbr=on + use "hh" for hand unit ["in"] = "in", -- use symbol for LHS unit ["none"] = "off", -- old name for "off" ["off"] = "off", -- use name for all units ["on"] = "on", -- use symbol for all units ["out"] = "out", -- use symbol for RHS unit (default) ["unit"] = "unit", -- abbr=on but abbreviate units only: e6km → million km (not ×10⁶ km) ["values"] = "opt_values", -- show only input and output numbers, not units ["~"] = "opt_also_symbol", -- show input unit symbol as well as name }, ["adj"] = { ["mid"] = "opt_adjectival, opt_adj_mid", -- adj=on with user-specified text after input unit (between input and output) ["off"] = "", -- ignored (off is the default) ["on"] = "opt_adjectival", -- unit name is singular and hyphenated ["pre"] = "opt_one_preunit", -- user-specified text before input unit ["ri0"] = "opt_ri=0", -- round input with precision = 0 ["ri1"] = "opt_ri=1", -- round input with precision = 1 ["ri2"] = "opt_ri=2", -- round input with precision = 2 ["ri3"] = "opt_ri=3", -- round input with precision = 3 }, ["altitude_ft"] = 'INTEGER', ["altitude_m"] = 'INTEGER', ["comma"] = { ["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits ["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits ["gaps3"] = "opt_gaps, opt_gaps3", -- group only in threes rather than default of no gap before a single digit after decimal mark ["off"] = "opt_nocomma", -- no numsep in input or output numbers }, ["debug"] = { ["yes"] = "opt_sortable_debug", -- make the normally hidden sort key visible }, ["disp"] = { ["5"] = "opt_round=5?", -- round output value to nearest 5 ["b"] = "b", -- join: '(...)' ["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination ["br"] = "br", -- join: '<br />' ["br()"] = "br()", -- join: '<br />(...)' ["comma"] = "comma", -- join: ',' ["flip"] = "opt_flip", -- reverse order of input/output ["number"] = "opt_output_number_only", -- display output value (not input, and not output symbol/name) ["or"] = "or", -- join: 'or' ["out"] = "opt_output_only", ["output number only"] = "opt_output_number_only", ["output only"] = "opt_output_only", ["preunit"] = "opt_two_preunits", -- user-specified text before input and output units ["semicolon"] = "semicolon", -- join: ';' ["sqbr"] = "sqbr", -- join: '[...]' ["table"] = "opt_table", -- output is suitable for a table cell with align="right" ["tablecen"] = "opt_tablecen", -- output is suitable for a table cell with align="center" ["unit"] = "opt_input_unit_only", -- display input symbol/name (not output, and not input value) ["unit or text"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known ["unit2"] = "opt_output_unit_only", ["x"] = "x", -- join: <first>...<second> (user-specified text) }, ["frac"] = 'INTEGER', ["input"] = 'TEXT', -- TEXT should be value><space><unitcode> or <wikidata-property-id> ["lang"] = { -- language for output digits (both en and local digits are always accepted for input) ["en"] = "opt_lang_en", -- use en digits for numbers, regardless of local language ["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en) }, ["lk"] = { ["in"] = "in", -- link LHS unit name or symbol ["off"] = "off", -- do not link: same as default except for hand unit ["on"] = "on", -- link all unit names or symbols (but not twice for the same unit) ["out"] = "out", -- link RHS unit name or symbol }, ["order"] = { ["flip"] = "opt_flip", -- reverse order of input/output ["out"] = "opt_order_out", -- do not show input; instead, use order in output combination, with the first output shown as the input }, ["qid"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["qual"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["round"] = { ["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5 ["5"] = "opt_round=5", -- round output value to nearest 5 ["10"] = "opt_round=10", -- round output value to nearest 10 (same as but clearer than "|-1") ["25"] = "opt_round=25", -- round output value to nearest 25 ["50"] = "opt_round=50", -- round output value to nearest 50 ["each"] = "opt_round_each", -- using default precision in a range, round each output separately (default uses highest precision of each item in range) }, ["sigfig"] = 'INTEGER', ["sortable"] = { ["off"] = "", -- ignored (off is the default) ["on"] = "opt_sortable_on", -- output sort key for use in a sortable table, based on value from converting to a standard base unit ["debug"] = "opt_sortable_on, opt_sortable_debug", -- |sortable=debug is the same as |sortable=on|debug=yes }, ["sp"] = { ["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre") }, ["spell"] = { -- only English spelling is supported; not scientific notation; only some fractions ["in"] = "opt_spell_in", -- spell input value in words ["In"] = "opt_spell_in, opt_spell_upper", -- spell input value in words with first letter uppercase ["on"] = "opt_spell_in, opt_spell_out", -- spell input and output values in words ["On"] = "opt_spell_in, opt_spell_out, opt_spell_upper", -- same, with first letter of first word in result uppercase ["us"] = "opt_sp_us", -- use U.S. spelling; same as sp=us so spell=us also works }, ["stylein"] = 'TEXT', ["styleout"] = 'TEXT', ["tracking"] = 'TEXT', } local titles = { ["frac"] = "Fraction/styles.css", ["sfrac"] = "Sfrac/styles.css", } return { SIprefixes = SIprefixes, all_categories = all_categories, all_messages = all_messages, currency = { ['$'] = true, ['£'] = true, ['€'] = true, ['₱'] = true, ['₽'] = true, ['¥'] = true }, customary_units = customary_units, disp_joins = disp_joins, en_option_name = en_option_name, en_option_value = en_option_value, eng_scales = eng_scales, ranges = ranges, titles = titles, } o3z30yxxa8tpko87s2pq3ph03cqmkzg Modul:Convert/wikidata 828 286 850 849 2024-08-09T09:21:31Z Jon Harald Søby 58 1 semakan diimportkan 849 Scribunto text/plain -- Functions to access Wikidata for Module:Convert. local Collection = {} Collection.__index = Collection do function Collection:add(item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end function Collection:join(sep) return table.concat(self, sep) end function Collection:remove(pos) if self.n > 0 and (pos == nil or (0 < pos and pos <= self.n)) then self.n = self.n - 1 return table.remove(self, pos) end end function Collection:sort(comp) table.sort(self, comp) end function Collection.new() return setmetatable({n = 0}, Collection) end end local function strip_to_nil(text) -- If text is a non-empty string, return its trimmed content, -- otherwise return nothing (empty string or not a string). if type(text) == 'string' then return text:match('(%S.-)%s*$') end end local function frequency_unit(value, unit_table) -- For use when converting m to Hz. -- Return true, s where s = name of unit's default output unit, -- or return false, t where t is an error message table. -- However, for simplicity a valid result is always returned. local unit if unit_table._symbol == 'm' then -- c = speed of light in a vacuum = 299792458 m/s -- frequency = c / wavelength local w = value * (unit_table.scale or 1) local f = 299792458 / w -- if w == 0, f = math.huge which works here if f >= 1e12 then unit = 'THz' elseif f >= 1e9 then unit = 'GHz' elseif f >= 1e6 then unit = 'MHz' elseif f >= 1e3 then unit = 'kHz' else unit = 'Hz' end end return true, unit or 'Hz' end local function wavelength_unit(value, unit_table) -- Like frequency_unit but for use when converting Hz to m. local unit if unit_table._symbol == 'Hz' then -- Using 0.9993 rather than 1 avoids rounding which would give results -- like converting 300 MHz to 100 cm instead of 1 m. local w = 1 / (value * (unit_table.scale or 1)) -- Hz scale is inverted if w >= 0.9993e6 then unit = 'Mm' elseif w >= 0.9993e3 then unit = 'km' elseif w >= 0.9993 then unit = 'm' elseif w >= 0.9993e-2 then unit = 'cm' elseif w >= 0.9993e-3 then unit = 'mm' else unit = 'um' end end return true, unit or 'm' end local specials = { frequency = { frequency_unit }, wavelength = { wavelength_unit }, -------------------------------------------------------------------------------- -- Following is a removed experiment to show two values as a range -- using '-' as the separator. -- frequencyrange = { frequency_unit, '-' }, -- wavelengthrange = { wavelength_unit, '-' }, } local function make_unit(units, parms, uid) -- Return a unit code for convert or nil if unit unknown. -- If necessary, add a dummy unit to parms so convert will use it -- for the input without attempting a conversion since nothing -- useful is available (for example, with unit volt). local unit = units[uid] if type(unit) ~= 'table' then return nil end local ucode = unit.ucode if ucode and not unit.si then return ucode -- a unit known to convert end parms.opt_ignore_error = true ucode = ucode or unit._ucode -- must be a non-empty string local ukey, utable if unit.si then local base = units[unit.si] ukey = base.symbol -- must be a non-empty string local n1 = base.name1 local n2 = base.name2 if not n1 then n1 = ukey n2 = n2 or n1 -- do not append 's' end utable = { _symbol = ukey, _name1 = n1, _name2 = n2, link = unit.link or base.link, utype = n1, prefixes = 1, } else ukey = ucode utable = { symbol = ucode, -- must be a non-empty string name1 = unit.name1, -- if nil, uses symbol name2 = unit.name2, -- if nil, uses name1..'s' link = unit.link, -- if nil, uses name1 utype = unit.name1 or ucode, } end utable.scale = 1 utable.default = '' utable.defkey = '' utable.linkey = '' utable.bad_mcode = '' parms.unittable = { [ukey] = utable } return ucode end local function matches_qualifier(statement, qual) -- Return: -- false, nil : if statement does not match specification -- true, nil : if matches, and statement has no qualifier -- true, sq : if matches, where sq is the statement's qualifier -- A match means that no qualifier was specified (qual == nil), or that -- the statement has a qualifier matching the specification. -- If a match occurs, the caller needs the statement's qualifier (if any) -- so statements that duplicate the qualifier are not used, after the first. -- Then, if convert is showing all values for a property such as the diameter -- of a telescope's mirror (diameters of primary and secondary mirrors), it -- will not show alternative values that could in principle be present for the -- same item (telescope) and property (diameter) and qualifier (primary/secondary). local target = (statement.qualifiers or {}).P518 -- P518 is "applies to part" if type(target) == 'table' then for _, q in ipairs(target) do if type(q) == 'table' then local value = (q.datavalue or {}).value if value then if qual == nil or qual == value.id then return true, value.id end end end end end if qual == nil then return true, nil -- only occurs if statement has no qualifier end return false, nil -- statement's qualifier is not relevant because statement will be skipped end local function get_statements(parms, pid) -- Get specified item and return a list of tables with each statement for property pid. -- Each table is of form {statqual=sq, stmt=statement} where sq = statement qualifier (nil if none). -- Statements are in Wikidata's order except that those with preferred rank -- are first, then normal rank. Any other rank is ignored. local stored = {} -- qualifiers of statements that are first for the qualifier, and will be returned local qid = strip_to_nil(parms.qid) -- nil for current page's item, or an item id (expensive) local qual = strip_to_nil(parms.qual) -- nil or id of wanted P518 (applies to part) item in qualifiers local result = Collection.new() local entity = mw.wikibase.getEntity(qid) if type(entity) == 'table' then local statements = (entity.claims or {})[pid] if type(statements) == 'table' then for _, rank in ipairs({ 'preferred', 'normal' }) do for _, statement in ipairs(statements) do if type(statement) == 'table' and rank == statement.rank then local is_match, statqual = matches_qualifier(statement, qual) if is_match then result:add({ statqual = statqual, stmt = statement }) end end end end end end return result end local function input_from_property(tdata, parms, pid) -- Given that pid is a Wikidata property identifier like 'P123', -- return a collection of {amount, ucode} pairs (two strings) -- for each matching item/property, or return nothing. -------------------------------------------------------------------------------- -- There appear to be few restrictions on how Wikidata is organized so it is -- very likely that any decision a module makes about how to handle data -- will be wrong for some cases at some time. This meets current requirements. -- For each qualifier (or if no qualifier), if there are any preferred -- statements, use them and ignore any normal statements. -- For each qualifier, for the preferred statements if any, or for -- the normal statements (but not both): -- * Accept each statement if it has no qualifier (this will not occur -- if qual=x is specified because other code already ensures that in that -- case, only statements with a qualifier matching x are considered). -- * Ignore any statements after the first if it has a qualifier. -- The rationale is that for the diameter at [[South Pole Telescope]], want -- convert to show the diameters for both the primary and secondary mirrors -- if the convert does not specify which diameter is wanted. -- However, if convert is given the wanted qualifier, only one value -- (_the_ diameter) is wanted. For simplicity/consistency, that is also done -- even if no qual=x is specified. Unclear what should happen. -- For the wavelength at [[Nançay Radio Telescope]], want to show all three -- values, and the values have no qualifiers. -------------------------------------------------------------------------------- local result = Collection.new() local done = {} local skip_normal for _, t in ipairs(get_statements(parms, pid)) do local statement = t.stmt if statement.mainsnak and statement.mainsnak.datatype == 'quantity' then local value = (statement.mainsnak.datavalue or {}).value if value then local amount = value.amount if amount then amount = tostring(amount) -- in case amount is ever a number if amount:sub(1, 1) == '+' then amount = amount:sub(2) end local unit = value.unit if type(unit) == 'string' then unit = unit:match('Q%d+$') -- unit item id is at end of URL local ucode = make_unit(tdata.wikidata_units, parms, unit) if ucode then local skip if t.statqual then if done[t.statqual] then skip = true else done[t.statqual] = true end else if statement.rank == 'preferred' then skip_normal = true elseif skip_normal then skip = true end end if not skip then result:add({ amount, ucode }) end end end end end end end return result end local function input_from_text(tdata, parms, text, insert2) -- Given string should be of form "<value><space><unit>" or -- "<value1><space>ft<space><value2><space>in" for a special case (feet and inches). -- Return true if values/units were extracted and inserted, or return nothing. text = text:gsub('&nbsp;', ' '):gsub('%s+', ' ') local pos = text:find(' ', 1, true) if pos then -- Leave checking of value to convert which can handle fractions. local value = text:sub(1, pos - 1) local uid = text:sub(pos + 1) if uid:sub(1, 3) == 'ft ' and uid:sub(-3) == ' in' then -- Special case for enwiki to allow {{convert|input=5 ft 10+1/2 in}} insert2(uid:sub(4, -4), 'in') insert2(value, 'ft') else insert2(value, make_unit(tdata.wikidata_units, parms, uid) or uid) end return true end end local function adjustparameters(tdata, parms, index) -- For Module:Convert, adjust parms (a table of {{convert}} parameters). -- Return true if successful or return false, t where t is an error message table. -- This is intended mainly for use in infoboxes where the input might be -- <value><space><unit> or -- <wikidata-property-id> -- If successful, insert values and units in parms, before given index. local text = parms.input -- should be a trimmed, non-empty string local pid = text:match('^P%d+$') local sep = ',' local special = specials[parms[index]] if special then parms.out_unit = special[1] sep = special[2] or sep table.remove(parms, index) end local function quit() return false, pid and { 'cvt_no_output' } or { 'cvt_bad_input', text } end local function insert2(first, second) table.insert(parms, index, second) table.insert(parms, index, first) end if pid then parms.input_text = '' -- output an empty string if an error occurs local result = input_from_property(tdata, parms, pid) if result.n == 0 then return quit() end local ucode for i, t in ipairs(result) do -- Convert requires each input unit to be identical. if i == 1 then ucode = t[2] elseif ucode ~= t[2] then return quit() end end local item = ucode if item == parms[index] then -- Remove specified output unit if it is the same as the Wikidata unit. -- For example, {{convert|input=P2044|km}} with property "12 km". table.remove(parms, index) end for i = result.n, 1, -1 do insert2(result[i][1], item) item = sep end return true else if input_from_text(tdata, parms, text, insert2) then return true end end return quit() end -------------------------------------------------------------------------------- --- List units and check syntax of definitions --------------------------------- -------------------------------------------------------------------------------- local specifications = { -- seq = sequence in which fields are displayed base = { title = 'SI base units', fields = { symbol = { seq = 2, mandatory = true }, name1 = { seq = 3, mandatory = true }, name2 = { seq = 4 }, link = { seq = 5 }, }, noteseq = 6, header = '{| class="wikitable"\n!si !!symbol !!name1 !!name2 !!link !!note', item = '|-\n|%s ||%s ||%s ||%s ||%s ||%s', footer = '|}', }, alias = { title = 'Aliases for convert', fields = { ucode = { seq = 2, mandatory = true }, si = { seq = 3 }, }, noteseq = 4, header = '{| class="wikitable"\n!alias !!ucode !!base !!note', item = '|-\n|%s ||%s ||%s ||%s', footer = '|}', }, known = { title = 'Units known to convert', fields = { ucode = { seq = 2, mandatory = true }, label = { seq = 3, mandatory = true }, }, noteseq = 4, header = '{| class="wikitable"\n!qid !!ucode !!label !!note', item = '|-\n|%s ||%s ||%s ||%s', footer = '|}', }, unknown = { title = 'Units not known to convert', fields = { _ucode = { seq = 2, mandatory = true }, si = { seq = 3 }, name1 = { seq = 4 }, name2 = { seq = 5 }, link = { seq = 6 }, label = { seq = 7, mandatory = true }, }, noteseq = 8, header = '{| class="wikitable"\n!qid !!_ucode !!base !!name1 !!name2 !!link !!label !!note', item = '|-\n|%s ||%s ||%s ||%s ||%s ||%s ||%s ||%s', footer = '|}', }, } local function listunits(tdata, ulookup) -- For Module:Convert, make wikitext to list the built-in Wikidata units. -- Return true, wikitext if successful or return false, t where t is an -- error message table. Currently, an error return never occurs. -- The syntax of each unit definition is checked and a note is added if -- a problem is detected. local function safe_cells(t) -- This is not currently needed, but in case definitions ever use wikitext -- like '[[kilogram|kg]]', escape the text so it works in a table cell. local result = {} for i, v in ipairs(t) do if v:find('|', 1, true) then v = v:gsub('(%[%[[^%[%]]-)|(.-%]%])', '%1\0%2') -- replace pipe in piped link with a zero byte v = v:gsub('|', '&#124;') -- escape '|' v = v:gsub('%z', '|') -- restore pipe in piped link end result[i] = v:gsub('{', '&#123;') -- escape '{' end return unpack(result) end local wdunits = tdata.wikidata_units local speckeys = { 'base', 'alias', 'unknown', 'known' } for _, sid in ipairs(speckeys) do specifications[sid].units = Collection.new() end local keys = Collection.new() for k, v in pairs(wdunits) do keys:add(k) end table.sort(keys) local note_count = 0 for _, key in ipairs(keys) do local unit = wdunits[key] local ktext, sid if key:match('^Q%d+$') then ktext = '[[d:' .. key .. '|' .. key .. ']]' if unit.ucode then sid = 'known' else sid = 'unknown' end elseif unit.ucode then ktext = key sid = 'alias' else ktext = key sid = 'base' end local result = { ktext } local spec = specifications[sid] local fields = spec.fields local note = Collection.new() for k, v in pairs(unit) do if fields[k] then local seq = fields[k].seq if result[seq] then note:add('duplicate ' .. k) -- cannot happen since keys are unique else result[seq] = v end else note:add('invalid ' .. k) end end for k, v in pairs(fields) do local value = result[v.seq] if value then if k == 'si' and not wdunits[value] then note:add('need si ' .. value) end if k == 'label' then local wdl = mw.wikibase.getLabel(key) if wdl ~= value then note:add('label changed to ' .. tostring(wdl)) end end else result[v.seq] = '' if v.mandatory then note:add('missing ' .. k) end end end local text if note.n > 0 then note_count = note_count + 1 text = '*' .. note:join('<br />') end result[spec.noteseq] = text or '' spec.units:add(result) end local results = Collection.new() if note_count > 0 then local text = note_count .. (note_count == 1 and ' note' or ' notes') results:add("'''Search for * to see " .. text .. "'''\n") end for _, sid in ipairs(speckeys) do local spec = specifications[sid] results:add("'''" .. spec.title .. "'''") results:add(spec.header) local fmt = spec.item for _, unit in ipairs(spec.units) do results:add(string.format(fmt, safe_cells(unit))) end results:add(spec.footer) end return true, results:join('\n') end return { _adjustparameters = adjustparameters, _listunits = listunits } lmwjmv8zqmf3stqjlrmtr852l67ct50 Modul:Convert/wikidata/data 828 287 852 851 2024-08-09T09:21:32Z Jon Harald Søby 58 1 semakan diimportkan 851 Scribunto text/plain --[[ Cache of Wikidata information with units for Module:Convert. The codes should rarely change, and using a cache means that changing a unit at Wikidata will not cause lots of converts in articles to break. For a unit known to convert, the unit here must have: label = Wikidata label for unit (used only when listing units) ucode = unit code for input to convert (there are no optional fields because convert handles everything) For a unit not known to convert, the unit here must have: label = Wikidata label for unit (used only when listing units) (no ucode field) _ucode = unit code for input to convert, and the symbol used to display the unit when abbr=on (convert will use the specified fields to display the unit, and will not attempt to do a conversion) For a unit not known to convert, the unit here may have: name1 = singular name used to display the unit when abbr=off name2 = plural name used to display the unit when abbr=off link = name of article that unit will be linked to when lk=on si = key for the SI base unit, if any The base unit for each SI unit here must have: symbol = symbol used to display the base unit when abbr=on name1 = singular name of base unit used to display the unit when abbr=off (if name1 is not given, symbol will be used, but an SI unit should have a name) The base unit for each SI unit here may have: name2 = plural name of base unit used to display the unit when abbr=off link = name of article that unit will be linked to when lk=on (applies for all SI units using this base, where the SI unit does not define its own link field) If name1 is not specified, the symbol is used for the name. If name2 is not specified, a plural name is formed by appending 's' to name1. If link is not specified, name1 is used for the link. SI units are assumed to be simple items like V (volt) where 'mV' would cause convert to insert: 'm' before the base symbol 'V' to make 'mV', if abbr=on 'milli' before the base name 'volt' to make 'millivolt', if abbr=off A unit like "square meter" would not work because it needs an SI prefix inserted before "meter" rather than at the beginning of the name. Items that should not be used with convert as no precise unit is implied: Q11247037 ton generic (cannot use) Q178413 gallon generic Q130964 calorie dubious (ambiguous, should not use) Q216658 bushel dubious Q420266 fluid ounce dubious ]] local wikidata_units = { -- Following are SI base units. A = { symbol = 'A', name1 = 'ampere', }, F = { symbol = 'F', name1 = 'faraday', }, H = { symbol = 'H', name1 = 'henry', }, V = { symbol = 'V', name1 = 'volt', }, -- Following are aliases to convert unit codes, used with "input=<value><space><unit>". kilograms = { ucode = 'kg', }, -- Following are SI units not known to convert, used with "input=<value><space><unit>". kV = { ucode = 'kV', si = 'V', }, mV = { ucode = 'mV', si = 'V', }, -- Following are Wikidata units. Q131255 = { label = 'farad', _ucode = 'F', si = 'F', }, Q163354 = { label = 'henry', _ucode = 'H', si = 'H', }, Q1916026 = { label = 'microvolt', _ucode = 'uV', si = 'V', }, Q193933 = { label = 'dioptre', name1 = 'dioptre', _ucode = 'dpt', }, Q212120 = { label = 'ampere hour', name1 = 'ampere hour', _ucode = 'A⋅h', }, Q2448803 = { label = 'millivolt', _ucode = 'mV', si = 'V', }, Q2451296 = { label = 'microfarad', _ucode = 'uF', si = 'F', }, Q2490574 = { label = 'milliampere', _ucode = 'mA', si = 'A', }, Q25250 = { label = 'volt', _ucode = 'V', si = 'V', }, Q25272 = { label = 'ampere', _ucode = 'A', si = 'A', }, Q2553708 = { label = 'megavolt', _ucode = 'MV', si = 'V', }, Q2554092 = { label = 'kilovolt', _ucode = 'kV', si = 'V', }, Q2636421 = { label = 'nanohenry', _ucode = 'nH', si = 'H', }, Q2679083 = { label = 'microhenry', _ucode = 'uH', si = 'H', }, Q2682463 = { label = 'nanofarad', _ucode = 'nF', si = 'F', }, Q2756030 = { label = 'picofarad', _ucode = 'pF', si = 'F', }, Q2793566 = { label = 'gigavolt', _ucode = 'GV', si = 'V', }, Q2924137 = { label = 'millihenry', _ucode = 'mH', si = 'H', }, Q3117809 = { label = 'microampere', _ucode = 'uA', si = 'A', }, Q33680 = { label = 'radian', name1 = 'radian', _ucode = 'rad', }, Q4456994 = { label = 'millifarad', _ucode = 'mF', si = 'F', }, Q47083 = { label = 'ohm', name1 = 'ohm', _ucode = 'Ω', }, Q483261 = { label = 'dalton', name1 = 'dalton', _ucode = 'u', }, Q550341 = { label = 'volt-ampere', name1 = 'volt-ampere', _ucode = 'VA', }, Q100995 = { label = 'pound', ucode = 'lb', }, Q1022113 = { label = 'cubic centimetre', ucode = 'cc', }, Q102573 = { label = 'becquerel', ucode = 'Bq', }, Q103246 = { label = 'sievert', ucode = 'Sv', }, Q1050958 = { label = 'inch of mercury', ucode = 'inHg', }, Q1051665 = { label = 'metre per second squared', ucode = 'm/s2', }, Q1052397 = { label = 'rad', ucode = 'rad', }, Q1054140 = { label = 'megametre', ucode = 'Mm', }, Q1057069 = { label = 'hectogram', ucode = 'hg', }, Q1063786 = { label = 'square inch', ucode = 'sqin', }, Q1092296 = { label = 'annum', ucode = 'year', }, Q11570 = { label = 'kilogram', ucode = 'kg', }, Q11573 = { label = 'metre', ucode = 'm', }, Q11574 = { label = 'second', ucode = 's', }, Q11579 = { label = 'kelvin', ucode = 'K', }, Q11582 = { label = 'litre', ucode = 'litre', }, Q1165588 = { label = 'rod', ucode = 'rod', }, Q1165799 = { label = 'thou', ucode = 'thou', }, Q11776930 = { label = 'megagram', ucode = 'Mg', }, Q11929860 = { label = 'kiloparsec', ucode = 'kpc', }, Q1194225 = { label = 'pound-force', ucode = 'lbf', }, Q12129 = { label = 'parsec', ucode = 'pc', }, Q12438 = { label = 'newton', ucode = 'N', }, Q1255620 = { label = 'dram', ucode = 'drachm', }, Q12874593 = { label = 'watt-hour', ucode = 'W.h', }, Q128822 = { label = 'knot', ucode = 'kn', }, Q1374438 = { label = 'kilosecond', ucode = 'ks', }, Q1377051 = { label = 'gigasecond', ucode = 'Gs', }, Q14754979 = { label = 'zettagram', ucode = 'Zg', }, Q14786969 = { label = 'megajoule', ucode = 'MJ', }, Q14787261 = { label = 'megawatt hour', ucode = 'MW.h', }, Q1550511 = { label = 'square yard', ucode = 'sqyd', }, Q160857 = { label = 'metric horsepower', ucode = 'hp', }, Q1628990 = { label = 'horsepower-hour', ucode = 'hph', }, Q163343 = { label = 'tesla', ucode = 'T', }, Q1645498 = { label = 'microgram', ucode = 'ug', }, Q17087835 = { label = 'cuerda', ucode = 'cda', }, Q174728 = { label = 'centimetre', ucode = 'cm', }, Q174789 = { label = 'millimetre', ucode = 'mm', }, Q175821 = { label = 'micrometre', ucode = 'um', }, Q1770733 = { label = 'teragram', ucode = 'Tg', }, Q1772386 = { label = 'decigram', ucode = 'dg', }, Q177493 = { label = 'gauss', ucode = 'G', }, Q1777507 = { label = 'femtosecond', ucode = 'fs', }, Q177974 = { label = 'standard atmosphere', ucode = 'atm', }, Q178674 = { label = 'nanometre', ucode = 'nm', }, Q180154 = { label = 'kilometre per hour', ucode = 'km/h', }, Q180892 = { label = 'solar mass', ucode = 'solar mass', }, Q1811 = { label = 'astronomical unit', ucode = 'au', }, Q1815100 = { label = 'centilitre', ucode = 'cl', }, Q182098 = { label = 'kilowatt hour', ucode = 'kW.h', }, Q1823150 = { label = 'microwatt', ucode = 'uW', }, Q182429 = { label = 'metre per second', ucode = 'm/s', }, Q1826195 = { label = 'decilitre', ucode = 'dl', }, Q185078 = { label = 'are', ucode = 'a', }, Q185153 = { label = 'erg', ucode = 'erg', }, Q185648 = { label = 'torr', ucode = 'Torr', }, Q190095 = { label = 'gray', ucode = 'Gy', }, Q191118 = { label = 'tonne', ucode = 'tonne', }, Q1913097 = { label = 'femtogram', ucode = 'fg', }, Q192274 = { label = 'picometre', ucode = 'pm', }, Q1972579 = { label = 'poundal', ucode = 'pdl', }, Q200323 = { label = 'decimetre', ucode = 'dm', }, Q201933 = { label = 'dyne', ucode = 'dyn', }, Q2029519 = { label = 'hectolitre', ucode = 'hl', }, Q2051195 = { label = 'gigawatt hour', ucode = 'GW.h', }, Q207488 = { label = 'Rankine scale', ucode = 'R', }, Q208788 = { label = 'femtometre', ucode = 'fm', }, Q2101 = { label = 'elementary charge', ucode = 'e', }, Q21014455 = { label = 'metre per minute', ucode = 'm/min', }, Q21062777 = { label = 'megapascal', ucode = 'MPa', }, Q21064807 = { label = 'kilopascal', ucode = 'kPa', }, Q211256 = { label = 'mile per hour', ucode = 'mph', }, Q21178489 = { label = 'barrels per day', ucode = 'oilbbl/d', }, Q2143992 = { label = 'kilohertz', ucode = 'kHz', }, Q21467992 = { label = 'cubic foot per second', ucode = 'cuft/s', }, Q215571 = { label = 'newton metre', ucode = 'Nm', }, Q216795 = { label = 'dunam', ucode = 'dunam', }, Q216880 = { label = 'kilogram-force', ucode = 'kgf', }, Q18413919 = { label = 'centimetre per second', ucode = 'cm/s', }, Q218593 = { label = 'inch', ucode = 'in', }, Q2282891 = { label = 'microlitre', ucode = 'ul', }, Q2282906 = { label = 'nanogram', ucode = 'ng', }, Q229354 = { label = 'curie', ucode = 'Ci', }, Q232291 = { label = 'square mile', ucode = 'sqmi', }, Q2332346 = { label = 'millilitre', ucode = 'ml', }, Q23387 = { label = 'week', ucode = 'week', }, Q23823681 = { label = 'terawatt', ucode = 'TW', }, Q23925410 = { label = 'gallon (UK)', ucode = 'impgal', }, Q23925413 = { label = 'gallon (US)', ucode = 'USgal', }, Q2438073 = { label = 'attogram', ucode = 'ag', }, Q2474258 = { label = 'millisievert', ucode = 'mSv', }, Q2483628 = { label = 'attosecond', ucode = 'as', }, Q2489298 = { label = 'square centimetre', ucode = 'cm2', }, Q2518569 = { label = 'nanosievert', ucode = 'nSv', }, Q25235 = { label = 'hour', ucode = 'h', }, Q25236 = { label = 'watt', ucode = 'W', }, Q25267 = { label = 'degree Celsius', ucode = 'C', }, Q25269 = { label = 'joule', ucode = 'J', }, Q253276 = { label = 'mile', ucode = 'mi', }, Q25343 = { label = 'square metre', ucode = 'm2', }, Q25406 = { label = 'coulomb', ucode = 'coulomb', }, Q25517 = { label = 'cubic metre', ucode = 'm3', }, Q260126 = { label = 'Roentgen equivalent man', ucode = 'rem', }, Q2612219 = { label = 'petagram', ucode = 'Pg', }, Q2619500 = { label = 'foe', ucode = 'foe', }, Q2637946 = { label = 'decalitre', ucode = 'dal', }, Q2655272 = { label = 'exagram', ucode = 'Eg', }, Q2691798 = { label = 'centigram', ucode = 'cg', }, Q2739114 = { label = 'microsievert', ucode = 'uSv', }, Q2799294 = { label = 'gigagram', ucode = 'Gg', }, Q3013059 = { label = 'kiloannum', ucode = 'millennium', }, Q305896 = { label = 'dots per inch', ucode = 'dpi', }, Q3207456 = { label = 'milliwatt', ucode = 'mW', }, Q3221356 = { label = 'yoctometre', ucode = 'ym', }, Q3239557 = { label = 'picogram', ucode = 'pg', }, Q3241121 = { label = 'milligram', ucode = 'mg', }, Q3267417 = { label = 'terametre', ucode = 'Tm', }, Q3270676 = { label = 'zeptometre', ucode = 'zm', }, Q3276763 = { label = 'gigahertz', ucode = 'GHz', }, Q3277907 = { label = 'exametre', ucode = 'Em', }, Q3277915 = { label = 'zettametre', ucode = 'Zm', }, Q3277919 = { label = 'petametre', ucode = 'Pm', }, Q3312063 = { label = 'femtolitre', ucode = 'fl', }, Q3320608 = { label = 'kilowatt', ucode = 'kW', }, Q3332822 = { label = 'megaton of TNT', ucode = 'Mt(TNT)', }, Q35852 = { label = 'hectare', ucode = 'ha', }, Q3675550 = { label = 'cubic millimetre', ucode = 'mm3', }, Q3710 = { label = 'foot', ucode = 'ft', }, Q3773454 = { label = 'megaparsec', ucode = 'Mpc', }, Q3902688 = { label = 'picolitre', ucode = 'pl', }, Q3902709 = { label = 'picosecond', ucode = 'ps', }, Q39369 = { label = 'hertz', ucode = 'Hz', }, Q3972226 = { label = 'kilolitre', ucode = 'kl', }, Q4068266 = { label = "apothecaries' drachm", ucode = 'drachm', }, Q41803 = { label = 'gram', ucode = 'g', }, Q4220561 = { label = 'kilometre per second', ucode = 'km/s', }, Q42289 = { label = 'degree Fahrenheit', ucode = 'F', }, Q4243638 = { label = 'cubic kilometre', ucode = 'km3', }, Q44395 = { label = 'pascal', ucode = 'Pa', }, Q48013 = { label = 'ounce', ucode = 'oz', }, Q482798 = { label = 'yard', ucode = 'yd', }, Q4989854 = { label = 'kilojoule', ucode = 'kJ', }, Q4992853 = { label = 'kiloton of TNT', ucode = 'kt(TNT)', }, Q5139563 = { label = 'hectopascal', ucode = 'hPa', }, Q5151 = { label = 'month', ucode = 'month', }, Q531 = { label = 'light-year', ucode = 'ly', }, Q5465723 = { label = 'foot-poundal', ucode = 'ftpdl', }, Q573 = { label = 'day', ucode = 'd', }, Q577 = { label = 'year', ucode = 'year', }, Q5879479 = { label = 'gigawatt', ucode = 'GW', }, Q6003257 = { label = 'attometre', ucode = 'am', }, Q613726 = { label = 'yottagram', ucode = 'Yg', }, Q6170164 = { label = 'yoctogram', ucode = 'yg', }, Q667419 = { label = 'long ton', ucode = 'LT', }, Q673166 = { label = 'gravity of Earth', ucode = 'g0', }, Q693944 = { label = 'grain', ucode = 'gr', }, Q6982035 = { label = 'megawatt', ucode = 'MW', }, Q712226 = { label = 'square kilometre', ucode = 'km2', }, Q723733 = { label = 'millisecond', ucode = 'ms', }, Q732454 = { label = 'megaannum', ucode = 'Myr', }, Q732707 = { label = 'megahertz', ucode = 'MHz', }, Q752079 = { label = 'gross register ton', ucode = 'grt', }, Q752197 = { label = 'kilojoule per mole', ucode = 'kJ/mol', }, Q7727 = { label = 'minute', ucode = 'min', }, Q794261 = { label = 'cubic metre per second', ucode = 'm3/s', }, Q809678 = { label = 'barye', ucode = 'Ba', }, Q81292 = { label = 'acre', ucode = 'acre', }, Q81454 = { label = 'ångström', ucode = 'angstrom', }, Q828224 = { label = 'kilometre', ucode = 'km', }, Q83327 = { label = 'electronvolt', ucode = 'eV', }, Q838801 = { label = 'nanosecond', ucode = 'ns', }, Q842015 = { label = 'microsecond', ucode = 'us', }, Q844211 = { label = 'kilogram per cubic metre', ucode = 'kg/m3', }, Q844338 = { label = 'hectometre', ucode = 'hm', }, Q844976 = { label = 'oersted', ucode = 'Oe', }, Q848856 = { label = 'decametre', ucode = 'dam', }, Q854546 = { label = 'gigametre', ucode = 'Gm', }, Q857027 = { label = 'square foot', ucode = 'sqft', }, Q9048643 = { label = 'nanolitre', ucode = 'nl', }, Q93318 = { label = 'nautical mile', ucode = 'nmi', }, } return { wikidata_units = wikidata_units } e0oadhpk55nehxq8r0iliggv562by3a Modul:ConvertNumeric 828 288 854 853 2024-08-09T09:21:32Z Jon Harald Søby 58 1 semakan diimportkan 853 Scribunto text/plain -- Module for converting between different representations of numbers. See talk page for user documentation. -- For unit tests see: [[Modul:ConvertNumeric/testcases]] -- When editing, preview with: [[Module_talk:ConvertNumeric/testcases]] -- First, edit [[Modul:ConvertNumeric/sandbox]], then preview with [[Module_talk:ConvertNumeric/sandbox/testcases]] require('strict') local ones_position = { [0] = 'zero', [1] = 'one', [2] = 'two', [3] = 'three', [4] = 'four', [5] = 'five', [6] = 'six', [7] = 'seven', [8] = 'eight', [9] = 'nine', [10] = 'ten', [11] = 'eleven', [12] = 'twelve', [13] = 'thirteen', [14] = 'fourteen', [15] = 'fifteen', [16] = 'sixteen', [17] = 'seventeen', [18] = 'eighteen', [19] = 'nineteen' } local ones_position_ord = { [0] = 'zeroth', [1] = 'first', [2] = 'second', [3] = 'third', [4] = 'fourth', [5] = 'fifth', [6] = 'sixth', [7] = 'seventh', [8] = 'eighth', [9] = 'ninth', [10] = 'tenth', [11] = 'eleventh', [12] = 'twelfth', [13] = 'thirteenth', [14] = 'fourteenth', [15] = 'fifteenth', [16] = 'sixteenth', [17] = 'seventeenth', [18] = 'eighteenth', [19] = 'nineteenth' } local ones_position_plural = { [0] = 'zeros', [1] = 'ones', [2] = 'twos', [3] = 'threes', [4] = 'fours', [5] = 'fives', [6] = 'sixes', [7] = 'sevens', [8] = 'eights', [9] = 'nines', [10] = 'tens', [11] = 'elevens', [12] = 'twelves', [13] = 'thirteens', [14] = 'fourteens', [15] = 'fifteens', [16] = 'sixteens', [17] = 'seventeens', [18] = 'eighteens', [19] = 'nineteens' } local tens_position = { [2] = 'twenty', [3] = 'thirty', [4] = 'forty', [5] = 'fifty', [6] = 'sixty', [7] = 'seventy', [8] = 'eighty', [9] = 'ninety' } local tens_position_ord = { [2] = 'twentieth', [3] = 'thirtieth', [4] = 'fortieth', [5] = 'fiftieth', [6] = 'sixtieth', [7] = 'seventieth', [8] = 'eightieth', [9] = 'ninetieth' } local tens_position_plural = { [2] = 'twenties', [3] = 'thirties', [4] = 'forties', [5] = 'fifties', [6] = 'sixties', [7] = 'seventies', [8] = 'eighties', [9] = 'nineties' } local groups = { [1] = 'thousand', [2] = 'million', [3] = 'billion', [4] = 'trillion', [5] = 'quadrillion', [6] = 'quintillion', [7] = 'sextillion', [8] = 'septillion', [9] = 'octillion', [10] = 'nonillion', [11] = 'decillion', [12] = 'undecillion', [13] = 'duodecillion', [14] = 'tredecillion', [15] = 'quattuordecillion', [16] = 'quindecillion', [17] = 'sexdecillion', [18] = 'septendecillion', [19] = 'octodecillion', [20] = 'novemdecillion', [21] = 'vigintillion', [22] = 'unvigintillion', [23] = 'duovigintillion', [24] = 'tresvigintillion', [25] = 'quattuorvigintillion', [26] = 'quinquavigintillion', [27] = 'sesvigintillion', [28] = 'septemvigintillion', [29] = 'octovigintillion', [30] = 'novemvigintillion', [31] = 'trigintillion', [32] = 'untrigintillion', [33] = 'duotrigintillion', [34] = 'trestrigintillion', [35] = 'quattuortrigintillion', [36] = 'quinquatrigintillion', [37] = 'sestrigintillion', [38] = 'septentrigintillion', [39] = 'octotrigintillion', [40] = 'noventrigintillion', [41] = 'quadragintillion', [51] = 'quinquagintillion', [61] = 'sexagintillion', [71] = 'septuagintillion', [81] = 'octogintillion', [91] = 'nonagintillion', [101] = 'centillion', [102] = 'uncentillion', [103] = 'duocentillion', [104] = 'trescentillion', [111] = 'decicentillion', [112] = 'undecicentillion', [121] = 'viginticentillion', [122] = 'unviginticentillion', [131] = 'trigintacentillion', [141] = 'quadragintacentillion', [151] = 'quinquagintacentillion', [161] = 'sexagintacentillion', [171] = 'septuagintacentillion', [181] = 'octogintacentillion', [191] = 'nonagintacentillion', [201] = 'ducentillion', [301] = 'trecentillion', [401] = 'quadringentillion', [501] = 'quingentillion', [601] = 'sescentillion', [701] = 'septingentillion', [801] = 'octingentillion', [901] = 'nongentillion', [1001] = 'millinillion', } local roman_numerals = { I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000 } local engord_tens_end = { ['twentieth'] = 20, ['thirtieth'] = 30, ['fortieth'] = 40, ['fiftieth'] = 50, ['sixtieth'] = 60, ['seventieth'] = 70, ['eightieth'] = 80, ['ninetieth'] = 90, } local eng_tens_cont = { ['twenty'] = 20, ['thirty'] = 30, ['forty'] = 40, ['fifty'] = 50, ['sixty'] = 60, ['seventy'] = 70, ['eighty'] = 80, ['ninety'] = 90, } -- Converts a given valid roman numeral (and some invalid roman numerals) to a number. Returns { -1, errorstring } on error. local function roman_to_numeral(roman) if type(roman) ~= "string" then return -1, "roman numeral not a string" end local rev = roman:reverse() local raising = true local last = 0 local result = 0 for i = 1, #rev do local c = rev:sub(i, i) local next = roman_numerals[c] if next == nil then return -1, "roman numeral contains illegal character " .. c end if next > last then result = result + next raising = true elseif next < last then result = result - next raising = false elseif raising then result = result + next else result = result - next end last = next end return result end -- Converts a given integer between 0 and 100 to English text (e.g. 47 -> forty-seven). local function numeral_to_english_less_100(num, ordinal, plural, zero) local terminal_ones, terminal_tens if ordinal then terminal_ones = ones_position_ord terminal_tens = tens_position_ord elseif plural then terminal_ones = ones_position_plural terminal_tens = tens_position_plural else terminal_ones = ones_position terminal_tens = tens_position end if num == 0 and zero ~= nil then return zero elseif num < 20 then return terminal_ones[num] elseif num % 10 == 0 then return terminal_tens[num / 10] else return tens_position[math.floor(num / 10)] .. '-' .. terminal_ones[num % 10] end end local function standard_suffix(ordinal, plural) if ordinal then return 'th' end if plural then return 's' end return '' end -- Converts a given integer (in string form) between 0 and 1000 to English text (e.g. 47 -> forty-seven). local function numeral_to_english_less_1000(num, use_and, ordinal, plural, zero) num = tonumber(num) if num < 100 then return numeral_to_english_less_100(num, ordinal, plural, zero) elseif num % 100 == 0 then return ones_position[num/100] .. ' hundred' .. standard_suffix(ordinal, plural) else return ones_position[math.floor(num/100)] .. ' hundred ' .. (use_and and 'and ' or '') .. numeral_to_english_less_100(num % 100, ordinal, plural, zero) end end -- Converts an ordinal in English text from 'zeroth' to 'ninety-ninth' inclusive to a number [0–99], else -1. local function english_to_ordinal(english) local eng = string.lower(english or '') local engord_lt20 = {} -- ones_position_ord{} keys & values swapped for k, v in pairs( ones_position_ord ) do engord_lt20[v] = k end if engord_lt20[eng] then return engord_lt20[eng] -- e.g. first -> 1 elseif engord_tens_end[eng] then return engord_tens_end[eng] -- e.g. ninetieth -> 90 else local tens, ones = string.match(eng, '^([a-z]+)[%s%-]+([a-z]+)$') if tens and ones then local tens_cont = eng_tens_cont[tens] local ones_end = engord_lt20[ones] if tens_cont and ones_end then return tens_cont + ones_end -- e.g. ninety-ninth -> 99 end end end return -1 -- Failed end -- Converts a number in English text from 'zero' to 'ninety-nine' inclusive to a number [0–99], else -1. local function english_to_numeral(english) local eng = string.lower(english or '') local eng_lt20 = { ['single'] = 1 } -- ones_position{} keys & values swapped for k, v in pairs( ones_position ) do eng_lt20[v] = k end if eng_lt20[eng] then return eng_lt20[eng] -- e.g. one -> 1 elseif eng_tens_cont[eng] then return eng_tens_cont[eng] -- e.g. ninety -> 90 else local tens, ones = string.match(eng, '^([a-z]+)[%s%-]+([a-z]+)$') if tens and ones then local tens_cont = eng_tens_cont[tens] local ones_end = eng_lt20[ones] if tens_cont and ones_end then return tens_cont + ones_end -- e.g. ninety-nine -> 99 end end end return -1 -- Failed end -- Converts a number expressed as a string in scientific notation to a string in standard decimal notation -- e.g. 1.23E5 -> 123000, 1.23E-5 = .0000123. Conversion is exact, no rounding is performed. local function scientific_notation_to_decimal(num) local exponent, subs = num:gsub("^%-?%d*%.?%d*%-?[Ee]([+%-]?%d+)$", "%1") if subs == 0 then return num end -- Input not in scientific notation, just return unmodified exponent = tonumber(exponent) local negative = num:find("^%-") local _, decimal_pos = num:find("%.") -- Mantissa will consist of all decimal digits with no decimal point local mantissa = num:gsub("^%-?(%d*)%.?(%d*)%-?[Ee][+%-]?%d+$", "%1%2") if negative and decimal_pos then decimal_pos = decimal_pos - 1 end if not decimal_pos then decimal_pos = #mantissa + 1 end -- Remove leading zeros unless decimal point is in first position while decimal_pos > 1 and mantissa:sub(1,1) == '0' do mantissa = mantissa:sub(2) decimal_pos = decimal_pos - 1 end -- Shift decimal point right for exponent > 0 while exponent > 0 do decimal_pos = decimal_pos + 1 exponent = exponent - 1 if decimal_pos > #mantissa + 1 then mantissa = mantissa .. '0' end -- Remove leading zeros unless decimal point is in first position while decimal_pos > 1 and mantissa:sub(1,1) == '0' do mantissa = mantissa:sub(2) decimal_pos = decimal_pos - 1 end end -- Shift decimal point left for exponent < 0 while exponent < 0 do if decimal_pos == 1 then mantissa = '0' .. mantissa else decimal_pos = decimal_pos - 1 end exponent = exponent + 1 end -- Insert decimal point in correct position and return return (negative and '-' or '') .. mantissa:sub(1, decimal_pos - 1) .. '.' .. mantissa:sub(decimal_pos) end -- Rounds a number to the nearest integer (NOT USED) local function round_num(x) if x%1 >= 0.5 then return math.ceil(x) else return math.floor(x) end end -- Rounds a number to the nearest two-word number (round = up, down, or "on" for round to nearest). -- Numbers with two digits before the decimal will be rounded to an integer as specified by round. -- Larger numbers will be rounded to a number with only one nonzero digit in front and all other digits zero. -- Negative sign is preserved and does not count towards word limit. local function round_for_english(num, round) -- If an integer with at most two digits, just return if num:find("^%-?%d?%d%.?$") then return num end local negative = num:find("^%-") if negative then -- We're rounding magnitude so flip it if round == 'up' then round = 'down' elseif round == 'down' then round = 'up' end end -- If at most two digits before decimal, round to integer and return local _, _, small_int, trailing_digits, round_digit = num:find("^%-?(%d?%d?)%.((%d)%d*)$") if small_int then if small_int == '' then small_int = '0' end if (round == 'up' and trailing_digits:find('[1-9]')) or (round == 'on' and tonumber(round_digit) >= 5) then small_int = tostring(tonumber(small_int) + 1) end return (negative and '-' or '') .. small_int end -- When rounding up, any number with > 1 nonzero digit will round up (e.g. 1000000.001 rounds up to 2000000) local nonzero_digits = 0 for digit in num:gfind("[1-9]") do nonzero_digits = nonzero_digits + 1 end num = num:gsub("%.%d*$", "") -- Remove decimal part -- Second digit used to determine which way to round lead digit local _, _, lead_digit, round_digit, round_digit_2, rest = num:find("^%-?(%d)(%d)(%d)(%d*)$") if tonumber(lead_digit .. round_digit) < 20 and (1 + #rest) % 3 == 0 then -- In English numbers < 20 are one word so put 2 digits in lead and round based on 3rd lead_digit = lead_digit .. round_digit round_digit = round_digit_2 else rest = round_digit_2 .. rest end if (round == 'up' and nonzero_digits > 1) or (round == 'on' and tonumber(round_digit) >= 5) then lead_digit = tostring(tonumber(lead_digit) + 1) end -- All digits but lead digit will turn to zero rest = rest:gsub("%d", "0") return (negative and '-' or '') .. lead_digit .. '0' .. rest end local denominators = { [2] = { 'half', plural = 'halves' }, [3] = { 'third' }, [4] = { 'quarter', us = 'fourth' }, [5] = { 'fifth' }, [6] = { 'sixth' }, [8] = { 'eighth' }, [9] = { 'ninth' }, [10] = { 'tenth' }, [16] = { 'sixteenth' }, } -- Return status, fraction where: -- status is a string: -- "finished" if there is a fraction with no whole number; -- "ok" if fraction is empty or valid; -- "unsupported" if bad fraction; -- fraction is a string giving (numerator / denominator) as English text, or is "". -- Only unsigned fractions with a very limited range of values are supported, -- except that if whole is empty, the numerator can use "-" to indicate negative. -- whole (string or nil): nil or "" if no number before the fraction -- numerator (string or nil): numerator, if any (default = 1 if a denominator is given) -- denominator (string or nil): denominator, if any -- sp_us (boolean): true if sp=us -- negative_word (string): word to use for negative sign, if whole is empty -- use_one (boolean): false: 2+1/2 → "two and a half"; true: "two and one-half" local function fraction_to_english(whole, numerator, denominator, sp_us, negative_word, use_one) if numerator or denominator then local finished = (whole == nil or whole == '') local sign = '' if numerator then if finished and numerator:sub(1, 1) == '-' then numerator = numerator:sub(2) sign = negative_word .. ' ' end else numerator = '1' end if not numerator:match('^%d+$') or not denominator or not denominator:match('^%d+$') then return 'unsupported', '' end numerator = tonumber(numerator) denominator = tonumber(denominator) local dendata = denominators[denominator] if not (dendata and 1 <= numerator and numerator <= 99) then return 'unsupported', '' end local numstr, denstr local sep = '-' if numerator == 1 then denstr = sp_us and dendata.us or dendata[1] if finished or use_one then numstr = 'one' elseif denstr:match('^[aeiou]') then numstr = 'an' sep = ' ' else numstr = 'a' sep = ' ' end else numstr = numeral_to_english_less_100(numerator) denstr = dendata.plural if not denstr then denstr = (sp_us and dendata.us or dendata[1]) .. 's' end end if finished then return 'finished', sign .. numstr .. sep .. denstr end return 'ok', ' and ' .. numstr .. sep .. denstr end return 'ok', '' end -- Takes a decimal number and converts it to English text. -- Return nil if a fraction cannot be converted (only some numbers are supported for fractions). -- num (string or nil): the number to convert. -- Can be an arbitrarily large decimal, such as "-123456789123456789.345", and -- can use scientific notation (e.g. "1.23E5"). -- May fail for very large numbers not listed in "groups" such as "1E4000". -- num is nil if there is no whole number before a fraction. -- numerator (string or nil): numerator of fraction (nil if no fraction) -- denominator (string or nil): denominator of fraction (nil if no fraction) -- capitalize (boolean): whether to capitalize the result (e.g. 'One' instead of 'one') -- use_and (boolean): whether to use the word 'and' between tens/ones place and higher places -- hyphenate (boolean): whether to hyphenate all words in the result, useful as an adjective -- ordinal (boolean): whether to produce an ordinal (e.g. 'first' instead of 'one') -- plural (boolean): whether to pluralize the resulting number -- links: nil: do not add any links; 'on': link "billion" and larger to Orders of magnitude article; -- any other text: list of numbers to link (e.g. "billion,quadrillion") -- negative_word: word to use for negative sign (typically 'negative' or 'minus'; nil to use default) -- round: nil or '': no rounding; 'on': round to nearest two-word number; 'up'/'down': round up/down to two-word number -- zero: word to use for value '0' (nil to use default) -- use_one (boolean): false: 2+1/2 → "two and a half"; true: "two and one-half" local function _numeral_to_english(num, numerator, denominator, capitalize, use_and, hyphenate, ordinal, plural, links, negative_word, round, zero, use_one) if not negative_word then if use_and then -- TODO Should 'minus' be used when do not have sp=us? -- If so, need to update testcases, and need to fix "minus zero". -- negative_word = 'minus' negative_word = 'negative' else negative_word = 'negative' end end local status, fraction_text = fraction_to_english(num, numerator, denominator, not use_and, negative_word, use_one) if status == 'unsupported' then return nil end if status == 'finished' then -- Input is a fraction with no whole number. -- Hack to avoid executing stuff that depends on num being a number. local s = fraction_text if hyphenate then s = s:gsub("%s", "-") end if capitalize then s = s:gsub("^%l", string.upper) end return s end num = scientific_notation_to_decimal(num) if round and round ~= '' then if round ~= 'on' and round ~= 'up' and round ~= 'down' then error("Invalid rounding mode") end num = round_for_english(num, round) end -- Separate into negative sign, num (digits before decimal), decimal_places (digits after decimal) local MINUS = '−' -- Unicode U+2212 MINUS SIGN (may be in values from [[Modul:Convert]]) if num:sub(1, #MINUS) == MINUS then num = '-' .. num:sub(#MINUS + 1) -- replace MINUS with '-' elseif num:sub(1, 1) == '+' then num = num:sub(2) -- ignore any '+' end local negative = num:find("^%-") local decimal_places, subs = num:gsub("^%-?%d*%.(%d+)$", "%1") if subs == 0 then decimal_places = nil end num, subs = num:gsub("^%-?(%d*)%.?%d*$", "%1") if num == '' and decimal_places then num = '0' end if subs == 0 or num == '' then error("Invalid decimal numeral") end -- For each group of 3 digits except the last one, print with appropriate group name (e.g. million) local s = '' while #num > 3 do if s ~= '' then s = s .. ' ' end local group_num = math.floor((#num - 1) / 3) local group = groups[group_num] local group_digits = #num - group_num*3 s = s .. numeral_to_english_less_1000(num:sub(1, group_digits), false, false, false, zero) .. ' ' if links and (((links == 'on' and group_num >= 3) or links:find(group)) and group_num <= 13) then s = s .. '[[Orders_of_magnitude_(numbers)#10' .. group_num*3 .. '|' .. group .. ']]' else s = s .. group end num = num:sub(1 + group_digits) num = num:gsub("^0*", "") -- Trim leading zeros end -- Handle final three digits of integer part if s ~= '' and num ~= '' then if #num <= 2 and use_and then s = s .. ' and ' else s = s .. ' ' end end if s == '' or num ~= '' then s = s .. numeral_to_english_less_1000(num, use_and, ordinal, plural, zero) elseif ordinal or plural then -- Round numbers like "one million" take standard suffixes for ordinal/plural s = s .. standard_suffix(ordinal, plural) end -- For decimal places (if any) output "point" followed by spelling out digit by digit if decimal_places then s = s .. ' point' for i = 1, #decimal_places do s = s .. ' ' .. ones_position[tonumber(decimal_places:sub(i,i))] end end s = s:gsub("^%s*(.-)%s*$", "%1") -- Trim whitespace if ordinal and plural then s = s .. 's' end -- s suffix works for all ordinals if negative and s ~= zero then s = negative_word .. ' ' .. s end s = s:gsub("negative zero", "zero") s = s .. fraction_text if hyphenate then s = s:gsub("%s", "-") end if capitalize then s = s:gsub("^%l", string.upper) end return s end local function _numeral_to_english2(args) local num = tostring(args.num) num = num:gsub("^%s*(.-)%s*$", "%1") -- Trim whitespace num = num:gsub(",", "") -- Remove commas num = num:gsub("^<span[^<>]*></span>", "") -- Generated by Template:age if num ~= '' then -- a fraction may have an empty whole number if not num:find("^%-?%d*%.?%d*%-?[Ee]?[+%-]?%d*$") then -- Input not in a valid format, try to eval it as an expr to see -- if that produces a number (e.g. "3 + 5" will become "8"). local noerr, result = pcall(mw.ext.ParserFunctions.expr, num) if noerr then num = result end end end -- Call helper function passing args return _numeral_to_english( num, args['numerator'], args['denominator'], args['capitalize'], args['use_and'], args['hyphenate'], args['ordinal'], args['plural'], args['links'], args['negative_word'], args['round'], args['zero'], args['use_one'] ) or '' end local p = { -- Functions that can be called from another module roman_to_numeral = roman_to_numeral, spell_number = _numeral_to_english, spell_number2 = _numeral_to_english2, english_to_ordinal = english_to_ordinal, english_to_numeral = english_to_numeral, } function p._roman_to_numeral(frame) -- Callable via {{#invoke:ConvertNumeric|_roman_to_numeral|VI}} return roman_to_numeral(frame.args[1]) end function p._english_to_ordinal(frame) -- callable via {{#invoke:ConvertNumeric|_english_to_ordinal|First}} return english_to_ordinal(frame.args[1]) end function p._english_to_numeral(frame) -- callable via {{#invoke:ConvertNumeric|_english_to_numeral|One}} return english_to_numeral(frame.args[1]) end function p.numeral_to_english(frame) local args = frame.args -- Tail call to helper function passing args from frame return _numeral_to_english2{ ['num'] = args[1], ['numerator'] = args['numerator'], ['denominator'] = args['denominator'], ['capitalize'] = args['case'] == 'U' or args['case'] == 'u', ['use_and'] = args['sp'] ~= 'us', ['hyphenate'] = args['adj'] == 'on', ['ordinal'] = args['ord'] == 'on', ['plural'] = args['pl'] == 'on', ['links'] = args['lk'], ['negative_word'] = args['negative'], ['round'] = args['round'], ['zero'] = args['zero'], ['use_one'] = args['one'] == 'one' -- experiment: using '|one=one' makes fraction 2+1/2 give "two and one-half" instead of "two and a half" } end ---- recursive function for p.decToHex local function decToHexDigit(dec) local dig = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"} local div = math.floor(dec/16) local mod = dec-(16*div) if div >= 1 then return decToHexDigit(div)..dig[mod+1] else return dig[mod+1] end end -- I think this is supposed to be done with a tail call but first I want something that works at all ---- finds all the decimal numbers in the input text and hexes each of them function p.decToHex(frame) local args=frame.args local parent=frame.getParent(frame) local pargs={} if parent then pargs=parent.args end local text=args[1] or pargs[1] or "" local minlength=args.minlength or pargs.minlength or 1 minlength=tonumber(minlength) local prowl=mw.ustring.gmatch(text,"(.-)(%d+)") local output="" repeat local chaff,dec=prowl() if not(dec) then break end local hex=decToHexDigit(dec) while (mw.ustring.len(hex)<minlength) do hex="0"..hex end output=output..chaff..hex until false local chaff=mw.ustring.match(text,"(%D+)$") or "" return output..chaff end return p 5d0rprr59aq3aery3sjjc9rcepl5qmw Modul:Coordinates 828 289 858 857 2024-08-09T09:21:32Z Jon Harald Søby 58 3 semakan diimportkan 855 Scribunto text/plain --[[ This module is intended to replace the functionality of {{Coord}} and related templates. It provides several methods, including {{#invoke:Coordinates | coord }} : General function formatting and displaying coordinate values. {{#invoke:Coordinates | dec2dms }} : Simple function for converting decimal degree values to DMS format. {{#invoke:Coordinates | dms2dec }} : Simple function for converting DMS format to decimal degree format. {{#invoke:Coordinates | link }} : Export the link used to reach the tools ]] require('strict') local math_mod = require("Module:Math") local coordinates = {}; local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true); local current_page = mw.title.getCurrentTitle() local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' ); local coord_link = 'https://geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '&params=' --[[ Helper function, replacement for {{coord/display/title}} ]] local function displaytitle(coords) return mw.getCurrentFrame():extensionTag{ name = 'indicator', args = { name = 'coordinates' }, content = '<span id="coordinates">[[Geographic coordinate system|Coordinates]]: ' .. coords .. '</span>' } end --[[ Helper function, used in detecting DMS formatting ]] local function dmsTest(first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end local s = (first .. second):upper() return s:find('^[NS][EW]$') or s:find('^[EW][NS]$') end --[[ Wrapper function to grab args, see Module:Arguments for this function's documentation. ]] local function makeInvokeFunc(funcName) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Coord' }) return coordinates[funcName](args, frame) end end --[[ Helper function, handle optional args. ]] local function optionalArg(arg, supplement) return arg and arg .. supplement or '' end --[[ Formats any error messages generated for display ]] local function errorPrinter(errors) local result = "" for i,v in ipairs(errors) do result = result .. '<strong class="error">Coordinates: ' .. v[2] .. '</strong><br />' end return result end --[[ Determine the required CSS class to display coordinates Usually geo-nondefault is hidden by CSS, unless a user has overridden this for himself default is the mode as specificied by the user when calling the {{coord}} template mode is the display mode (dec or dms) that we will need to determine the css class for ]] local function displayDefault(default, mode) if default == "" then default = "dec" end if default == mode then return "geo-default" else return "geo-nondefault" end end --[[ specPrinter Output formatter. Takes the structure generated by either parseDec or parseDMS and formats it for inclusion on Wikipedia. ]] local function specPrinter(args, coordinateSpec) local uriComponents = coordinateSpec["param"] if uriComponents == "" then -- RETURN error, should never be empty or nil return "ERROR param was empty" end if args["name"] then uriComponents = uriComponents .. "&title=" .. mw.uri.encode(coordinateSpec["name"]) end local geodmshtml = '<span class="geo-dms" title="Maps, aerial photos, and other data for this location">' .. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> ' .. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>' .. '</span>' local lat = tonumber( coordinateSpec["dec-lat"] ) or 0 local geodeclat if lat < 0 then -- FIXME this breaks the pre-existing precision geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°S" else geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°N" end local long = tonumber( coordinateSpec["dec-long"] ) or 0 local geodeclong if long < 0 then -- FIXME does not handle unicode minus geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°W" else geodeclong = (coordinateSpec["dec-long"] or 0) .. "°E" end local geodechtml = '<span class="geo-dec" title="Maps, aerial photos, and other data for this location">' .. geodeclat .. ' ' .. geodeclong .. '</span>' local geonumhtml = '<span class="geo">' .. coordinateSpec["dec-lat"] .. '; ' .. coordinateSpec["dec-long"] .. '</span>' local inner = '<span class="' .. displayDefault(coordinateSpec["default"], "dms" ) .. '">' .. geodmshtml .. '</span>' .. '<span class="geo-multi-punct">&#xfeff; / &#xfeff;</span>' .. '<span class="' .. displayDefault(coordinateSpec["default"], "dec" ) .. '">'; if not args["name"] then inner = inner .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span></span>' else inner = inner .. '<span class="vcard">' .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span>' .. '<span style="display:none">&#xfeff; (<span class="fn org">' .. args["name"] .. '</span>)</span></span></span>' end local stylesheetLink = 'Module:Coordinates' .. ( isSandbox and '/sandbox' or '' ) .. '/styles.css' return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = stylesheetLink } } .. '<span class="plainlinks nourlexpansion">[' .. coord_link .. uriComponents .. ' ' .. inner .. ']</span>' end --[[ Helper function, convert decimal to degrees ]] local function convert_dec2dms_d(coordinate) local d = math_mod._round( coordinate, 0 ) .. "°" return d .. "" end --[[ Helper function, convert decimal to degrees and minutes ]] local function convert_dec2dms_dm(coordinate) coordinate = math_mod._round( coordinate * 60, 0 ); local m = coordinate % 60; coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) end --[[ Helper function, convert decimal to degrees, minutes, and seconds ]] local function convert_dec2dms_dms(coordinate) coordinate = math_mod._round( coordinate * 60 * 60, 0 ); local s = coordinate % 60 coordinate = math.floor( (coordinate - s) / 60 ); local m = coordinate % 60 coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) .. string.format( "%02d″", s ) end --[[ Helper function, convert decimal latitude or longitude to degrees, minutes, and seconds format based on the specified precision. ]] local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) local coord = tonumber(coordinate) local postfix if coord >= 0 then postfix = firstPostfix else postfix = secondPostfix end precision = precision:lower(); if precision == "dms" then return convert_dec2dms_dms( math.abs( coord ) ) .. postfix; elseif precision == "dm" then return convert_dec2dms_dm( math.abs( coord ) ) .. postfix; elseif precision == "d" then return convert_dec2dms_d( math.abs( coord ) ) .. postfix; end end --[[ Convert DMS format into a N or E decimal coordinate ]] local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str) local degrees = tonumber(degrees_str) local minutes = tonumber(minutes_str) or 0 local seconds = tonumber(seconds_str) or 0 local factor = 1 if direction == "S" or direction == "W" then factor = -1 end local precision = 0 if seconds_str then precision = 5 + math.max( math_mod._precision(seconds_str), 0 ); elseif minutes_str and minutes_str ~= '' then precision = 3 + math.max( math_mod._precision(minutes_str), 0 ); else precision = math.max( math_mod._precision(degrees_str), 0 ); end local decimal = factor * (degrees+(minutes+seconds/60)/60) return string.format( "%." .. precision .. "f", decimal ) -- not tonumber since this whole thing is string based. end --[[ Checks input values to for out of range errors. ]] local function validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, source, strong ) local errors = {}; lat_d = tonumber( lat_d ) or 0; lat_m = tonumber( lat_m ) or 0; lat_s = tonumber( lat_s ) or 0; long_d = tonumber( long_d ) or 0; long_m = tonumber( long_m ) or 0; long_s = tonumber( long_s ) or 0; if strong then if lat_d < 0 then table.insert(errors, {source, "latitude degrees < 0 with hemisphere flag"}) end if long_d < 0 then table.insert(errors, {source, "longitude degrees < 0 with hemisphere flag"}) end --[[ #coordinates is inconsistent about whether this is an error. If globe: is specified, it won't error on this condition, but otherwise it will. For not simply disable this check. if long_d > 180 then table.insert(errors, {source, "longitude degrees > 180 with hemisphere flag"}) end ]] end if lat_d > 90 then table.insert(errors, {source, "latitude degrees > 90"}) end if lat_d < -90 then table.insert(errors, {source, "latitude degrees < -90"}) end if lat_m >= 60 then table.insert(errors, {source, "latitude minutes >= 60"}) end if lat_m < 0 then table.insert(errors, {source, "latitude minutes < 0"}) end if lat_s >= 60 then table.insert(errors, {source, "latitude seconds >= 60"}) end if lat_s < 0 then table.insert(errors, {source, "latitude seconds < 0"}) end if long_d >= 360 then table.insert(errors, {source, "longitude degrees >= 360"}) end if long_d <= -360 then table.insert(errors, {source, "longitude degrees <= -360"}) end if long_m >= 60 then table.insert(errors, {source, "longitude minutes >= 60"}) end if long_m < 0 then table.insert(errors, {source, "longitude minutes < 0"}) end if long_s >= 60 then table.insert(errors, {source, "longitude seconds >= 60"}) end if long_s < 0 then table.insert(errors, {source, "longitude seconds < 0"}) end return errors; end --[[ parseDec Transforms decimal format latitude and longitude into the structure to be used in displaying coordinates ]] local function parseDec( lat, long, format ) local coordinateSpec = {} local errors = {} if not long then return nil, {{"parseDec", "Missing longitude"}} elseif not tonumber(long) then return nil, {{"parseDec", "Longitude could not be parsed as a number: " .. long}} end errors = validate( lat, nil, nil, long, nil, nil, 'parseDec', false ); coordinateSpec["dec-lat"] = lat; coordinateSpec["dec-long"] = long; local mode = coordinates.determineMode( lat, long ); coordinateSpec["dms-lat"] = convert_dec2dms( lat, "N", "S", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} coordinateSpec["dms-long"] = convert_dec2dms( long, "E", "W", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dec" end return coordinateSpec, errors end --[[ parseDMS Transforms degrees, minutes, seconds format latitude and longitude into the a structure to be used in displaying coordinates ]] local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format ) local coordinateSpec, errors, backward = {}, {} lat_f = lat_f:upper(); long_f = long_f:upper(); -- Check if specified backward if lat_f == 'E' or lat_f == 'W' then lat_d, long_d, lat_m, long_m, lat_s, long_s, lat_f, long_f, backward = long_d, lat_d, long_m, lat_m, long_s, lat_s, long_f, lat_f, true; end errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true ); if not long_d then return nil, {{"parseDMS", "Missing longitude" }} elseif not tonumber(long_d) then return nil, {{"parseDMS", "Longitude could not be parsed as a number:" .. long_d }} end if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then if lat_f:upper() == 'S' then lat_d = '-' .. lat_d; end if long_f:upper() == 'W' then long_d = '-' .. long_d; end return parseDec( lat_d, long_d, format ); end end coordinateSpec["dms-lat"] = lat_d.."°"..optionalArg(lat_m,"′") .. optionalArg(lat_s,"″") .. lat_f coordinateSpec["dms-long"] = long_d.."°"..optionalArg(long_m,"′") .. optionalArg(long_s,"″") .. long_f coordinateSpec["dec-lat"] = convert_dms2dec(lat_f, lat_d, lat_m, lat_s) -- {{coord/dms2dec|{{{4}}}|{{{1}}}|0{{{2}}}|0{{{3}}}}} coordinateSpec["dec-long"] = convert_dms2dec(long_f, long_d, long_m, long_s) -- {{coord/dms2dec|{{{8}}}|{{{5}}}|0{{{6}}}|0{{{7}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dms" end return coordinateSpec, errors, backward end --[[ Check the input arguments for coord to determine the kind of data being provided and then make the necessary processing. ]] local function formatTest(args) local result, errors local backward, primary = false, false local function getParam(args, lim) local ret = {} for i = 1, lim do ret[i] = args[i] or '' end return table.concat(ret, '_') end if not args[1] then -- no lat logic return errorPrinter( {{"formatTest", "Missing latitude"}} ) elseif not tonumber(args[1]) then -- bad lat logic return errorPrinter( {{"formatTest", "Unable to parse latitude as a number:" .. args[1]}} ) elseif not args[4] and not args[5] and not args[6] then -- dec logic result, errors = parseDec(args[1], args[2], args.format) if not result then return errorPrinter(errors); end -- formatting for geohack: geohack expects D_N_D_E notation or D;D notation -- wikiminiatlas doesn't support D;D notation -- #coordinates parserfunction doesn't support negative decimals with NSWE result.param = table.concat({ math.abs(tonumber(args[1])), ((tonumber(args[1]) or 0) < 0) and 'S' or 'N', math.abs(tonumber(args[2])), ((tonumber(args[2]) or 0) < 0) and 'W' or 'E', args[3] or ''}, '_') elseif dmsTest(args[4], args[8]) then -- dms logic result, errors, backward = parseDMS(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args.format) if args[10] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 9) elseif dmsTest(args[3], args[6]) then -- dm logic result, errors, backward = parseDMS(args[1], args[2], nil, args[3], args[4], args[5], nil, args[6], args['format']) if args[8] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 7) elseif dmsTest(args[2], args[4]) then -- d logic result, errors, backward = parseDMS(args[1], nil, nil, args[2], args[3], nil, nil, args[4], args.format) if args[6] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 5) else -- Error return errorPrinter({{"formatTest", "Unknown argument format"}}) .. '[[Kategori:Pages with malformed coordinate tags]]' end result.name = args.name local extra_param = {'dim', 'globe', 'scale', 'region', 'source', 'type'} for _, v in ipairs(extra_param) do if args[v] then table.insert(errors, {'formatTest', 'Parameter: "' .. v .. '=" should be "' .. v .. ':"' }) end end local ret = specPrinter(args, result) if #errors > 0 then ret = ret .. ' ' .. errorPrinter(errors) .. '[[Kategori:Pages with malformed coordinate tags]]' end return ret, backward end --[[ Generate Wikidata tracking categories. ]] local function makeWikidataCategories(qid) local ret local qid = qid or mw.wikibase.getEntityIdForCurrentPage() if mw.wikibase and current_page.namespace == 0 then if qid and mw.wikibase.entityExists(qid) and mw.wikibase.getBestStatements(qid, "P625") and mw.wikibase.getBestStatements(qid, "P625")[1] then local snaktype = mw.wikibase.getBestStatements(qid, "P625")[1].mainsnak.snaktype if snaktype == 'value' then -- coordinates exist both here and on Wikidata, and can be compared. ret = 'Coordinates on Wikidata' elseif snaktype == 'somevalue' then ret = 'Coordinates on Wikidata set to unknown value' elseif snaktype == 'novalue' then ret = 'Coordinates on Wikidata set to no value' end else -- We have to either import the coordinates to Wikidata or remove them here. ret = 'Coordinates not on Wikidata' end end if ret then return string.format('[[Kategori:%s]]', ret) else return '' end end --[[ link Simple function to export the coordinates link for other uses. Usage: {{#invoke:Coordinates | link }} ]] function coordinates.link(frame) return coord_link; end --[[ dec2dms Wrapper to allow templates to call dec2dms directly. Usage: {{#invoke:Coordinates | dec2dms | decimal_coordinate | positive_suffix | negative_suffix | precision }} decimal_coordinate is converted to DMS format. If positive, the positive_suffix is appended (typical N or E), if negative, the negative suffix is appended. The specified precision is one of 'D', 'DM', or 'DMS' to specify the level of detail to use. ]] coordinates.dec2dms = makeInvokeFunc('_dec2dms') function coordinates._dec2dms(args) local coordinate = args[1] local firstPostfix = args[2] or '' local secondPostfix = args[3] or '' local precision = args[4] or '' return convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) end --[[ Helper function to determine whether to use D, DM, or DMS format depending on the precision of the decimal input. ]] function coordinates.determineMode( value1, value2 ) local precision = math.max( math_mod._precision( value1 ), math_mod._precision( value2 ) ); if precision <= 0 then return 'd' elseif precision <= 2 then return 'dm'; else return 'dms'; end end --[[ dms2dec Wrapper to allow templates to call dms2dec directly. Usage: {{#invoke:Coordinates | dms2dec | direction_flag | degrees | minutes | seconds }} Converts DMS values specified as degrees, minutes, seconds too decimal format. direction_flag is one of N, S, E, W, and determines whether the output is positive (i.e. N and E) or negative (i.e. S and W). ]] coordinates.dms2dec = makeInvokeFunc('_dms2dec') function coordinates._dms2dec(args) local direction = args[1] local degrees = args[2] local minutes = args[3] local seconds = args[4] return convert_dms2dec(direction, degrees, minutes, seconds) end --[[ coord Main entry point for Lua function to replace {{coord}} Usage: {{#invoke:Coordinates | coord }} {{#invoke:Coordinates | coord | lat | long }} {{#invoke:Coordinates | coord | lat | lat_flag | long | long_flag }} ... Refer to {{coord}} documentation page for many additional parameters and configuration options. Note: This function provides the visual display elements of {{coord}}. In order to load coordinates into the database, the {{#coordinates:}} parser function must also be called, this is done automatically in the Lua version of {{coord}}. ]] coordinates.coord = makeInvokeFunc('_coord') function coordinates._coord(args) if not tonumber(args[1]) and not args[2] then args[3] = args[1]; args[1] = nil local entity = mw.wikibase.getEntityObject(args.qid) if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1].mainsnak.snaktype == 'value' then local precision = entity.claims.P625[1].mainsnak.datavalue.value.precision args[1] = entity.claims.P625[1].mainsnak.datavalue.value.latitude args[2] = entity.claims.P625[1].mainsnak.datavalue.value.longitude if precision then precision = -math_mod._round(math.log(precision)/math.log(10),0) args[1] = math_mod._round(args[1],precision) args[2] = math_mod._round(args[2],precision) end end end local contents, backward = formatTest(args) local Notes = args.notes or '' local Display = args.display and args.display:lower() or 'inline' -- it and ti are short for inline,title and title,inline local function isInline(s) -- Finds whether coordinates are displayed inline. return s:find('inline') ~= nil or s == 'i' or s == 'it' or s == 'ti' end local function isInTitle(s) -- Finds whether coordinates are displayed in the title. return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti' end local function coord_wrapper(in_args) -- Calls the parser function {{#coordinates:}}. return mw.getCurrentFrame():callParserFunction('#coordinates', in_args) or '' end local text = '' if isInline(Display) then text = text .. '<span class="geo-inline">' .. contents .. Notes .. '</span>' end if isInTitle(Display) then -- Add to output since indicator content is invisible to Lua later on if not isInline(Display) then text = text .. '<span class="geo-inline-hidden noexcerpt">' .. contents .. Notes .. '</span>' end text = text .. displaytitle(contents .. Notes) .. makeWikidataCategories(args.qid) end if not args.nosave then local page_title, count = mw.title.getCurrentTitle(), 1 if backward then local tmp = {} while not string.find((args[count-1] or ''), '[EW]') do tmp[count] = (args[count] or ''); count = count+1 end tmp.count = count; count = 2*(count-1) while count >= tmp.count do table.insert(tmp, 1, (args[count] or '')); count = count-1 end for i, v in ipairs(tmp) do args[i] = v end else while count <= 9 do args[count] = (args[count] or ''); count = count+1 end end if isInTitle(Display) and not page_title.isTalkPage and page_title.subpageText ~= 'doc' and page_title.subpageText ~= 'testcases' then args[10] = 'primary' end args.notes, args.format, args.display = nil text = text .. coord_wrapper(args) end return text end --[[ coord2text Extracts a single value from a transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coord2text | {{Coord}} | parameter }} Valid values for the second parameter are: lat (signed integer), long (signed integer), type, scale, dim, region, globe, source ]] function coordinates._coord2text(coord,type) if coord == '' or type == '' or not type then return nil end type = mw.text.trim(type) if type == 'lat' or type == 'long' then local result, negative = mw.text.split((mw.ustring.match(coord,'[%.%d]+°[NS] [%.%d]+°[EW]') or ''), ' ') if type == 'lat' then result, negative = result[1], 'S' else result, negative = result[2], 'W' end result = mw.text.split(result, '°') if result[2] == negative then result[1] = '-'..result[1] end return result[1] else return mw.ustring.match(coord, 'params=.-_' .. type .. ':(.-)[ _]') end end function coordinates.coord2text(frame) return coordinates._coord2text(frame.args[1],frame.args[2]) end --[[ coordinsert Injects some text into the Geohack link of a transclusion of {{Coord}} (if that text isn't already in the transclusion). Outputs the modified transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coordinsert | {{Coord}} | parameter:value | parameter:value | … }} Do not make Geohack unhappy by inserting something which isn't mentioned in the {{Coord}} documentation. ]] function coordinates.coordinsert(frame) -- for the 2nd or later integer parameter (the first is the coord template, as above) for i, v in ipairs(frame.args) do if i ~= 1 then -- if we cannot find in the coord_template the i_th coordinsert parameter e.g. region if not mw.ustring.find(frame.args[1], (mw.ustring.match(frame.args[i], '^(.-:)') or '')) then -- find from the params= up to the first possibly-present underscore -- and append the i_th coordinsert parameter and a space -- IDK why we're adding a space but it does seem somewhat convenient frame.args[1] = mw.ustring.gsub(frame.args[1], '(params=.-)_? ', '%1_'..frame.args[i]..' ') end end end if frame.args.name then -- if we can't find the vcard class if not mw.ustring.find(frame.args[1], '<span class="vcard">') then -- take something that looks like a coord template and add the vcard span with class and fn org class local namestr = frame.args.name frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-default">)(<span[^<>]*>[^<>]*</span><span[^<>]*>[^<>]*<span[^<>]*>[^<>]*</span></span>)(</span>)', '%1<span class="vcard">%2<span style="display:none">&#xfeff; (<span class="fn org">' .. namestr .. '</span>)</span></span>%3' ) -- then find anything from coordinates parameters to the 'end' and attach the title parameter frame.args[1] = mw.ustring.gsub( frame.args[1], '(&params=[^&"<>%[%] ]*) ', '%1&title=' .. mw.uri.encode(namestr) .. ' ' ) end end -- replace the existing indicator with a new indicator using the modified content frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-inline[^"]*">(.+)</span>)\127[^\127]*UNIQ%-%-indicator%-%x+%-%-?QINU[^\127]*\127', function (inline, coord) return inline .. displaytitle(coord) end ) return frame.args[1] end return coordinates 0wgju88nfkapwpam9wtoxhxrfs46vju Modul:Coordinates/styles.css 828 290 860 859 2024-08-09T09:21:32Z Jon Harald Søby 58 1 semakan diimportkan 859 sanitized-css text/css /* {{pp-template}} */ /* Geographical coordinates defaults. The classes "geo", "longitude", and "latitude" are used by the [[Geo microformat]]. */ .geo-default, .geo-dms, .geo-dec { display: inline; } .geo-nondefault, .geo-multi-punct, .geo-inline-hidden { display: none; } .longitude, .latitude { white-space: nowrap; } 372gk2cap99kasnuwl2084jfakikzgw Modul:Cs1 documentation support 828 291 862 861 2024-08-09T09:21:32Z Jon Harald Søby 58 1 semakan diimportkan 861 Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load the configuration module local whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); -- load the whitelist module local exclusion_lists = { -- TODO: move these tables into a separate ~/data module and mw.loadData() it ['cite book'] = { ['agency'] = true, ['air-date'] = true, ['arxiv'] = true, ['biorxiv'] = true, ['citeseerx'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['episode'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['ismn'] = true, ['issn'] = true, ['issue'] = true, ['jfm'] = true, ['journal'] = true, ['jstor'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['MR'] = true, ['network'] = true, ['number'] = true, ['RFC'] = true, ['script-journal'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['SSRN'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['trans-journal'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, ['ZBL'] = true, }, ['cite journal'] = { ['agency'] = true, ['air-date'] = true, ['book-title'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapter-url'] = true, ['chapter-url-access'] = true, ['class'] = true, ['conference'] = true, ['conference-format'] = true, ['conference-url'] = true, ['contribution'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor-link#'] = true, ['contributor-mask#'] = true, ['degree'] = true, ['department'] = true, ['display-interviewers'] = true, ['docket'] = true, ['edition'] = true, ['editor#'] = true, ['editor-first#'] = true, ['editor-link#'] = true, ['editor-mask#'] = true, ['editors'] = true, ['encyclopedia'] = true, ['episode'] = true, ['ignore-isbn-error'] = true, ['interviewer#'] = true, ['interviewer-first#'] = true, ['interviewer-link#'] = true, ['interviewer-mask#'] = true, ['isbn'] = true, ['ismn'] = true, ['LCCN'] = true, ['mailinglist'] = true, ['message-id'] = true, ['minutes'] = true, ['network'] = true, ['script-chapter'] = true, ['season'] = true, ['section'] = true, ['sections'] = true, ['series-link'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, ['sheets'] = true, ['station'] = true, ['time'] = true, ['time-caption'] = true, ['trans-article'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcript-url'] = true, }, } --[[-------------------------< A D D _ T O _ L I S T >--------------------------------------------------------- adds code/name pair to code_list and name/code pair to name_list; code/name pairs in override_list replace those taken from the MediaWiki list; these are marked with a superscripted dagger. |script-<param>= lang codes always use override names so dagger is omitted ]] local function add_to_list (code_list, name_list, override_list, code, name, dagger) if false == dagger then dagger = ''; -- no dagger for |script-<param>= codes and names else dagger = '<sup>†</sup>'; -- dagger for all other lists using override end if override_list[code] then -- look in the override table for this code code_list[code] = override_list[code] .. dagger; -- use the name from the override table; mark with dagger name_list[override_list[code]] = code .. dagger; else code_list[code] = name; -- use the MediaWiki name and code name_list[name] = code; end end --[[-------------------------< L I S T _ F O R M A T >--------------------------------------------------------- formats key/value pair into a string for rendering ['k'] = 'v' → k: v ]] local function list_format (result, list) for k, v in pairs (list) do table.insert (result, k .. ': ' .. v); end end --[[-------------------------< L A N G _ L I S T E R >--------------------------------------------------------- Module entry point Crude documentation tool that returns one of several lists of language codes and names. Used in Template:Citation Style documentation/language/doc {{#invoke:cs1 documentation support|lang_lister|list=<selector>|lang=<code>}} where <selector> is one of the values: 2char – list of ISO 639-1 codes and names sorted by code 3char – list of ISO 639-2, -3 codes and names sorted by code ietf – list of IETF language tags and names sorted by tag ietf2 – list of ISO 639-1 based IETF language tags and names sorted by tag ietf3 – list of list of ISO 639-2, -3 based IETF language tags and names sorted by tag name – list of language names and codes sorted by name all - list all language codes/tags and names sorted by code/tag where <code> is a MediaWiki supported 2, 3, or ietf-like language code; because of fall-back, language names may be the English-language names. ]] local function lang_lister (frame) local lang = (frame.args.lang and '' ~= frame.args.lang) and frame.args.lang or mw.getContentLanguage():getCode() local source_list = mw.language.fetchLanguageNames(lang, 'all'); local override = cfg.lang_tag_remap; local code_1_list={}; local code_2_list={}; local ietf_list={}; local ietf_list2={}; local ietf_list3={}; local name_list={}; if not ({['2char']=true, ['3char']=true, ['ietf']=true, ['ietf2']=true, ['ietf3']=true, ['name']=true, ['all']=true})[frame.args.list] then return '<span style="color:#d33">unknown list selector: ' .. frame.args.list .. '</span>'; end for code, name in pairs (source_list) do if 'all' == frame.args.list then add_to_list (code_1_list, name_list, override, code, name); -- use the code_1_list because why not? elseif 2 == code:len() then add_to_list (code_1_list, name_list, override, code, name); elseif 3 == code:len() then add_to_list (code_2_list, name_list, override, code, name); elseif code:match ('^%a%a%-.+') then -- ietf with 2-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list2, name_list, override, code, name); -- add to ietf2 list elseif code:match ('^%a%a%a%-.+') then -- ietf with 3-character language tag add_to_list (ietf_list, name_list, override, code, name); -- add to main ietf list for |list=ietf add_to_list (ietf_list3, name_list, override, code, name); -- add to ietf3 list end end local result = {}; local out = {}; if '2char' == frame.args.list or 'all' == frame.args.list then -- iso 639-1 list_format (result, code_1_list); elseif '3char' == frame.args.list then -- iso 639-2, 3 list_format (result, code_2_list); elseif 'ietf' == frame.args.list then -- all ietf tags list_format (result, ietf_list); elseif 'ietf2' == frame.args.list then -- 2-character ietf tags list_format (result, ietf_list2); elseif 'ietf3' == frame.args.list then -- 3 character ietf tags list_format (result, ietf_list3); else --must be 'name' list_format (result, name_list); end local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< S C R I P T _ L A N G _ L I S T E R >------------------------------------------ Module entry point Crude documentation tool that returns list of language codes and names supported by the various |script-<param>= parameters. used in Help:CS1 errors {{#invoke:cs1 documentation support|script_lang_lister}} ]] local function script_lang_lister (frame) local lang_code_src = cfg.script_lang_codes ; -- get list of allowed script language codes local override = cfg.lang_tag_remap; local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language local code_list = {}; -- interim list of aliases local name_list={}; -- not used; defined here so that we can reuse add_to_list() local out = {}; -- final output (for now an unordered list) for _, code in ipairs (lang_code_src) do -- loop through the list of codes local name = mw.language.fetchLanguageName (code, this_wiki_lang); -- get the language name associated with this code add_to_list (code_list, name_list, override, code, name, false); -- name_list{} not used but provided so that we can reuse add_to_list(); don't add superscript dagger end local result = {}; local out = {}; list_format (result, code_list); local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } table.sort (result); table.insert (result, 1, templatestyles .. '<div class="div-col" style="column-width:16em">'); table.insert (out, table.concat (result, '\n*')); table.insert (out, '</div>'); return table.concat (out, '\n'); end --[[--------------------------< A L I A S _ L I S T E R >------------------------------------------------------ experimental code that lists parameters and their aliases. Perhaps basis for some sort of documentation? {{#invoke:cs1 documentation support|alias_lister}} ]] local function alias_lister () local alias_src = cfg.aliases; -- get master list of aliases local key; -- key for k/v in a new table local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop throu the master list of aliases if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do -- loop through all of the aliases if 1 == i then -- first 'alias' is the canonical parameter name key = alias; -- so it becomes the key in list else list[key] = list[key] and (list[key] .. ', ' .. alias) or alias; -- make comma-separated list of aliases list[alias] = 'see ' .. key; -- make a back reference from this alias to the canonical parameter end end end end for k, v in pairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', k, ': ', v})); end table.sort (out); -- sort it return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ P A R A M _ L I S T E R >---------------------------------- experimental code that lists canonical parameter names. Perhaps basis for some sort of documentation? returns a comma separated, alpha sorted, list of the canonical parameters. If given a template name, excludes parameters listed in that template's exclusion_list[<template>]{} table (if a table has been defined). {{#invoke:cs1 documentation support|canonical_param_lister|<template>}} ]] local function canonical_param_lister (frame) local template = frame.args[1]; if '' == template then template = nil; end if template then template = mw.text.trim (template:lower()); end local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local list = {}; -- interim list of aliases local out = {}; -- final output (for now an unordered list) for _, aliases in pairs (alias_src) do -- loop through the master list of aliases local name; if 'table' == type (aliases) then -- table only when there are aliases name = aliases[1]; -- first member of an aliases table is declared canonical else name = aliases; -- for those parameters that do not have any aliases, the parameter is declared canonical end if not template then -- no template name, add this parameter table.insert (list, name); elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); end end for k, ids in pairs (id_src) do -- spin through the list of identifiers local name = id_src[k].parameters[1]; -- get the first (left-most) parameter name local access = id_src[k].custom_access; -- get the access-icon parameter if it exists for this identifier if not template then -- no template name table.insert (list, name); -- add this parameter if access then table.insert (list, access); -- add this access-icon parameter end elseif not exclusion_lists[template] then -- template name but no exclusion list table.insert (list, name); if access then table.insert (list, access); end elseif not exclusion_lists[template][name] then -- template name and exclusion list but name not in list table.insert (list, name); if access then table.insert (list, access); end end end for _, param in ipairs (list) do -- loop through the list to make a simple unordered list table.insert (out, table.concat ({'*', param})); end local function comp( a, b ) -- used in following table.sort() return a:lower() < b:lower(); end table.sort (out, comp); -- sort the list return table.concat (out, '\010'); -- concatenate with \n -- return (mw.dumpObject (list)) end --[[--------------------------< C A N O N I C A L _ N A M E _ G E T >------------------------------------------ returns first (canonical) name when metaparameter is assigned a table of names returns name when metaparameter is assigned a single name returns empty string when metaparameter name not found in alias_src{}, id_src{}, or id_src[meta].custom_access metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Because access-icon don't have <metaparam> keys, per se, we create pseudo <metaparam> keys by appending 'access' to the identifier <metaparam>: the <metaparam> for |doi-access= is, for the purposes of this function, DOIaccess, etc Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the parameter best suited for that template so we can specify magazine in the override (frame.args[2]) While for this function, it would be just as simple to not use the function, this mechanism is implemented here to match similar functionality in alias_names_get() (there are slight differences) <override> must exist in the alias list does not apply to the access icon parameters (ignored - these have no aliases) (and which would be best for {{cite news}}? |newspaper= or |work=? can't solve all of the worlds problems at once). output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} {{#invoke:cs1 documentation support|canonical_name_get|<metaparam>|<override>|id=<attribute>|format=[plain|para]}} ]] local function canonical_name_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local name; local meta = args[1] local override = args[2]; local access; -- for id-access parameters if meta:match ('^(%u+)access') then -- the metaparameter (which is not used in ~/Configuration) is id_handlers key concatenated with access: BIBCODEaccess meta, access = meta:gsub ('^(%u+)access', '%1'); -- strip 'access' text from meta and use returned count value as a flag end if alias_src[meta] then name = alias_src[meta]; -- name is a string or a table if 'table' == type (name) then -- table only when there are aliases if not override then name = name[1]; -- first member of an aliases table is declared canonical else for _, v in ipairs (name) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end elseif id_src[meta]then -- if there is an id handler if access then -- and if this is a request for the handler's custom access parameter if id_src[meta].custom_access then -- if there is a custom access parameter name = id_src[meta].custom_access; -- use it else return ''; -- nope, return empty string end else if not override then name = id_src[meta].parameters[1]; -- get canonical id handler parameter else for _, v in ipairs (id_src[meta].parameters) do -- here when override is set; spin throu the aliases to make sure override matches alias in table if v == override then name = v; -- declare override to be the canonical param for this use case break; end end end end else return ''; -- metaparameter not specified, or no such metaparameter end if 'plain' == args.format then -- format and return the output if args.id then return string.format ('<span id="%s">%s</span>', args.id, name); -- plain text with id attribute else return name; -- plain text end elseif 'para' == args.format then return string.format ('<code class="nowrap">|%s=</code>', name); -- same as {{para|<param>}} end return string.format ('<b id="%s">%s</b>', args.id or '', name); -- because {{csdoc}} bolds param names end --[[--------------------------< A L I A S _ N A M E S _ G E T >------------------------------------------------ returns list of aliases for metaparameter <metaparam> returns empty string when there are no aliases returns empty string when <metaparam> name not found in alias_src{} or id_src{}; access icon parameters have no aliases so ignored metaparameter <metaparam> is the key in Module:Citation/CS1 aliases{} table or id_handlers{} table. Some lists of aliases might be better served when a particular alias is identified as the canonical alias for a particular use case. If, for example, <metaparam> Perodical lists: 'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work' that order works fine for {{cite journal}} documentation but doesn't work so well for {{cite magazine}}, {{cite news}}, or {{cite web}}. So, for using this function to document {{cite magazine}} the returned value should be the aliases that are not best suited for that template so we can specify magazine in the override (frame.args[2]) to be the canonical parameter so it won't be listed with the rest of the aliases (normal canonical journal will be) <override> must exist in the alias list except: when <override> value is 'all', returns the canonical parameter plus all of the aliases output format is controlled by |format= plain - renders in plain text in a <span> tag; may have id attribute para - renders as it would in {{para|<param>}} when not specified, refurns the default bold format used for {{csdoc}} {{#invoke:cs1 documentation support|alias_name_get|<metaparam>|<override>|format=[plain|para]}} ]] local function alias_names_get (frame) local alias_src = cfg.aliases; -- get master list of aliases local id_src = cfg.id_handlers; -- get master list of identifiers local args = getArgs (frame); local meta = args[1]; local override = args[2]; local out = {}; local source; -- selected parameter or id aliases list local aliases; source = alias_src[meta] or (id_src[meta] and id_src[meta].parameters); if not source then if meta:match ('%u+access') then return 'no' == args.none and '' or 'none'; -- custom access parameters don't have aliases else return ''; -- no such meta end elseif not source[2] then -- id_source[meta] is always a table; if no second member, no aliases return 'no' == args.none and '' or 'none'; end if not override then aliases = source; -- normal skip-canonical param case else local flag = 'all' == override and true or nil; -- so that we know that <override> parameter is a valid alias; spoof when override == 'all' aliases = {[1] = ''}; -- spoof to push alias_src[meta][1] and id_src[meta][1] into aliases[2] for _, v in ipairs (source) do -- here when override is set; spin through the aliases to make sure override matches alias in table if v ~= override then table.insert (aliases, v); -- add all but overridden param to the the aliases list for this use case else flag = true; -- set the flag so we know that <override> is a valid alias end end if not flag then aliases = {} -- unset the table as error indicator end end if 'table' == type (aliases) then -- table only when there are aliases for i, alias in ipairs (aliases) do if 1 ~= i then -- aliases[1] is the canonical name; don't include it if 'plain' == args.format then -- format and return the output table.insert (out, alias); -- plain text elseif 'para' == args.format then table.insert (out, string.format ('<code class="nowrap">|%s=</code>', alias)); -- same as {{para|<param>}} else table.insert (out, string.format ("'''%s'''", alias)); -- because csdoc bolds param names end end end return table.concat (out, ', '); -- make pretty list and quit end return 'no' == args.none and '' or 'none'; -- no metaparameter with that name or no aliases end --[[--------------------------< I S _ B O O K _ C I T E _ T E M P L A T E >------------------------------------ fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local book_cite_templates = { ['citation'] = true, ['cite book'] = true, } local function is_book_cite_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return book_cite_templates[title] or ''; end --[[--------------------------< I S _ L I M I T E D _ P A R A M _ T E M P L A T E >---------------------------- fetch the title of the current page; if it is a preprint template, return true; empty string else ]] local limited_param_templates = { -- if ever there is a need to fetch info from ~/Whitelist then ['cite arxiv'] = true, -- this list could also be fetched from there ['cite biorxiv'] = true, ['citeseerx'] = true, ['ssrn'] = true, } local function is_limited_param_template () local title = mw.title.getCurrentTitle().rootText; -- get title of current page without namespace and without sub-pages; from Template:Cite book/new -> Cite book title = title and title:lower() or ''; return limited_param_templates[title] or ''; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function _header_make (args) if not args[1] then return ''; -- no header text end local level = args[2] and tonumber (args[2]) or 2; level = string.rep ('=', level); return level .. args[1] .. level; end --[[--------------------------< H E A D E R _ M A K E >-------------------------------------------------------- Entry from an {{#invoke:}} makes a section header from <header_text> and <level>; <level> defaults to 2; cannot be less than 2 ]] local function header_make (frame) local args = getArgs (frame); return _header_make (args); end --[[--------------------------< I D _ L I M I T S _ G E T >---------------------------------------------------- return the limit values for named identifier parameters that have <id> limits (pmc, pmid, ssrn, s2cid, oclc, osti, rfc); the return value used in template documentation and error message help-text {{#invoke:Cs1 documentation support|id_limits_get|<id>}} ]] local function id_limits_get (frame) local args = getArgs (frame); local handlers = cfg.id_handlers; -- get id_handlers {} table from ~/Configuration return args[1] and handlers[args[1]:upper()].id_limit or ('<span style="color:#d33">No limit defined for identifier: ' .. (args[1] or '<unknown name>') .. '</span>'); end --[[--------------------------< C A T _ L I N K _ M A K E >---------------------------------------------------- ]] local function cat_link_make (cat) return table.concat ({'[[:Category:', cat, ']]'}); end --[[--------------------------< S C R I P T _ C A T _ L I S T E R >-------------------------------------------- utility function to get script-language categories ]] local lang_list_t = mw.language.fetchLanguageNames ('en', 'all'); local function script_cat_lister (script_lang_codes_t, lang_tag_remap_t, cats_list_t) for _, lang_code in ipairs (script_lang_codes_t) do local lang_name = lang_tag_remap_t[lang_code] or lang_list_t[lang_code]; -- use remap table to get Bengali instead of Bangla and the like; else use standard MediaWiki names local cat = 'CS1 uses ' .. lang_name .. '-language script (' .. lang_code .. ')'; -- build a category name cats_list_t[cat] = 1; -- and save it end end --[[--------------------------< C S 1 _ C A T _ L I S T E R >-------------------------------------------------- This is a crude tool that reads the category names from Module:Citation/CS1/Configuration, makes links of them, and then lists them in sorted lists. A couple of parameters control the rendering of the output: |select= -- (required) takes one of three values: error, maint, prop |sandbox= -- takes one value: no |hdr-lvl= -- base header level (number of == that make a header); default:2 min:2 This tool will automatically attempt to load a sandbox version of ~/Configuration if one exists. Setting |sandbox=no will defeat this. {{#invoke:cs1 documentation support|cat_lister|select=<error|maint|prop>|sandbox=<no>}} ]] local function cat_lister (frame) local args = getArgs (frame); local list_live_cats = {}; -- list of live categories local list_sbox_cats = {}; -- list of sandbox categories local live_sbox_out = {} -- list of categories that are common to live and sandbox modules local live_not_in_sbox_out = {} -- list of categories in live but not sandbox local sbox_not_in_live_out = {} -- list of categories in sandbox but not live local out = {}; -- final output assembled here local sandbox; -- boolean; true: evaluate the sandbox module local hdr_lvl; -- local sb_cfg; local sandbox, sb_cfg = pcall (mw.loadData, 'Module:Citation/CS1/Configuration/sandbox'); -- get sandbox configuration local cat; local select = args.select; if 'no' == args.sandbox then -- list sandbox? sandbox = false; -- no, live only end if hdr_lvl then -- if set and if tonumber (hdr_lvl) then -- can be converted to number if 2 > tonumber (hdr_lvl) then -- min is 2 hdr_lvl = 2; -- so set to min end else -- can't be converted hdr_lvl = 2; -- so default to min end else hdr_lvl = 2; -- not set so default to min end if 'error' == select or 'maint' == select then -- error and main categorys handling different from poperties cats for _, t in pairs (cfg.error_conditions) do -- get the live module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end end if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, t in pairs (sb_cfg.error_conditions) do -- get the sandbox module's categories if ('error' == select and t.message) or ('maint' == select and not t.message) then cat = t.category:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end end end elseif 'prop' == select then -- prop cats for _, cat in pairs (cfg.prop_cats) do -- get the live module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_live_cats[cat] = 1; -- add to the list end script_cat_lister (cfg.script_lang_codes, cfg.lang_tag_remap, list_live_cats); -- get live module's foriegn language script cats if sandbox then -- if ~/sandbox module exists and |sandbox= not set to 'no' for _, cat in pairs (sb_cfg.prop_cats) do -- get the sandbox module's categories cat = cat:gsub ('|(.*)$', ''); -- strip sort key if any list_sbox_cats[cat] = 1; -- add to the list end script_cat_lister (sb_cfg.script_lang_codes, sb_cfg.lang_tag_remap, list_sbox_cats); -- get sandbox module's foriegn language script cats end else return '<span style="color:#d33; font-style:normal;">error: unknown selector: ' .. select .. '</span>' end for k, _ in pairs (list_live_cats) do -- separate live/sbox common cats from cats not in sbox if not list_sbox_cats[k] and sandbox then table.insert (live_not_in_sbox_out, cat_link_make (k)); -- in live but not in sbox else table.insert (live_sbox_out, cat_link_make (k)); -- in both live and sbox end end for k, _ in pairs (list_sbox_cats) do -- separate sbox/live common cats from cats not in live if not list_live_cats[k] then table.insert (sbox_not_in_live_out, cat_link_make (k)); -- in sbox but not in live end end local function comp (a, b) -- local function for case-agnostic category name sorting return a:lower() < b:lower(); end local header; -- initialize section header with name of selected category list if 'error' == select then header = 'error'; elseif 'maint' == select then header = 'maintenance'; else header = 'properties'; end header = table.concat ({ -- build the main header 'Live ', -- always include this ((sandbox and 'and sandbox ') or ''), -- if sandbox evaluated, mention that header, -- add the list name ' categories (', -- finish the name and add #live_sbox_out, -- count of categories listed ')' -- close }) local templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = "Div col/styles.css" } } header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl}), '\n' .. templatestyles .. '<div class="div-col">' -- opening <div> for columns }); table.sort (live_sbox_out, comp); -- sort case agnostic acsending table.insert (live_sbox_out, 1, header); -- insert the header at the top table.insert (out, table.concat (live_sbox_out, '\n*')); -- make a big string of unordered list markup table.insert (out, '</div>\n'); -- close the </div> and add new line so the next header works if 0 ~= #live_not_in_sbox_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In live but not in sandbox (', #live_not_in_sbox_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (live_not_in_sbox_out, comp); table.insert (live_not_in_sbox_out, 1, header); table.insert (out, table.concat (live_not_in_sbox_out, '\n*')); table.insert (out, '</div>\n'); end if 0 ~= #sbox_not_in_live_out then -- when there is something in the table header = table.concat ({ -- build header for subsection 'In sandbox but not in live (', #sbox_not_in_live_out, ')' }); header = table.concat ({ -- make a useable header _header_make ({header, hdr_lvl+1}), '\n' .. templatestyles .. '<div class="div-col">' }); table.sort (sbox_not_in_live_out, comp); table.insert (sbox_not_in_live_out, 1, header); table.insert (out, table.concat (sbox_not_in_live_out, '\n*')); table.insert (out, '</div>\n'); end return table.concat (out); -- concat into a huge string and done end --[=[--------------------------< H E L P _ T E X T _ C A T S >-------------------------------------------------- To create category links at the bottom of each error help text section and on the individual error category pages; fetches category names from ~/Configuration; replaces this: {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: bioRxiv|Category:CS1 errors: bioRxiv|[[:Category:CS1 errors: bioRxiv]]}} with this: {{#invoke:Cs1 documentation support|help_text_cats|err_bad_biorxiv}} where {{{1}}} is the error_conditions key from Module:Citation/CS1/Configuration add |pages=yes to append the number of pages in the category ]=] local function help_text_cats (frame) local args_t = getArgs (frame); local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local replacements_t = {}; -- table to hold replacement parameters for $1 etc placeholders in category names for k, v in pairs (args_t) do -- look for |$1=<replacement> parameters if 'string' == type (k) and k:match ('^$%d+$') then -- if found replacements_t[k] = v; -- save key and value end end if args_t[1] and error_conditions_t[args_t[1]] then -- must have error_condition key and it must exist local error_cat = error_conditions_t[args_t[1]].category; -- get error category from cs1|2 configuration if error_cat:match ('$%d') then -- look for placeholders in <error_cat> error_cat = error_cat:gsub ('$%d', replacements_t) -- replace place holders with matching value from replacements_t end local title_obj = mw.title.getCurrentTitle(); -- get a title object for the currently displayed page local name_space = title_obj.nsText; if ('Category' == name_space) and (error_cat == title_obj.text) then -- if this is the category page for the error message return table.concat ({'Category:', error_cat}); -- no link; just category name else -- here when currently displayed page is other than the error message category local pages = ''; -- default empty strin for concatenation if 'yes' == args_t.pages then -- if we should display category page count: TODO: do we need to keep this? pages = mw.site.stats.pagesInCategory (error_cat, 'all'); -- get category page count pages = table.concat ({' (', mw.language.getContentLanguage():formatNum (pages), ' page', (1 == pages) and ')' or 's)'}); -- make renderable text end return table.concat ({'[[:Category:', error_cat, ']]', pages}); -- link to category with or without page count end else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end end --[[--------------------------< H E L P _ T E X T _ E R R O R _ M E S S A G E >-------------------------------- to render help text example error messages {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_biorxiv}} assign a single underscore to any of the |$n= parameters to insert an empty string in the error message: {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=_}} -> Check |issn= value {{#invoke:Cs1 documentation support|help_text_error_messages|err_bad_issn|$1=e}} -> Check |eissn= value error message is rendered at 120% font size; to specify another font size use |size=; must include unit specifier (%, em, etc) ]] local function help_text_error_messages (frame) local args_t = getArgs (frame); local error_conditions = mw.loadData ('Module:Citation/CS1/Configuration').error_conditions; -- local span_o = '<span class="cs1-visible-error citation-comment">'; local span_o = '<span class="citation-comment" style="color:#d33; font-size:' .. ((args_t.size and args_t.size) or '120%') .. '">'; local span_c = '</span>'; local message; local out = {}; -- output goes here if args_t[1] and error_conditions[args_t[1]] then -- must have error_condition key and it must exist message = error_conditions[args_t[1]].message; local i=1; local count; local rep; repeat rep = '$'..i args_t[rep] = args_t[rep] and args_t[rep]:gsub ('^%s*_%s*$', '') or nil; -- replace empty string marker with actual empty string message, count = message:gsub (rep, args_t[rep] or rep) i = i + 1; until (0 == count); table.insert (out, span_o); table.insert (out, message); table.insert (out, span_c); else return '<span style="color:#d33">unknown error_conditions key: ' .. (args_t[1] or 'key missing') .. '</span>'; end local out_str = table.concat (out); return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), out_str}); end --[[--------------------------< T E M P L A T E S _ T >-------------------------------------------------------- This table is a k/v table of sequence tables. The keys in this table are collapsed lowercase form of the cs1|2 template names ({{ROOTPAGENAME}}): Template:Cite AV media -> citeavmedia Each subsequence table holds: [1] documentation page where the TemplateData json is stored ({{cite book}} is the oddball) [2] key to 'preprint_arguments_t' and unique_arguments_t' tables in Module:Citation/CS1/Whitelist; these keys dictate which of the basic or limited arguments and numbered arguments tables will be used to validate the content of the TemplateData ]] local templates_t = { citearxiv = {'Template:Cite_arXiv/doc', 'arxiv'}, -- preprint arguments citeavmedia = {'Template:Cite AV media/doc', 'audio-visual'}, -- unique arguments citeavmedianotes = {'Template:Cite AV media notes/doc'}, -- no template data citebiorxiv = {'Template:Cite bioRxiv/doc', 'biorxiv'}, -- preprint arguments citebook = {'Template:Cite book/TemplateData'}, citeciteseerx = {'Template:Cite CiteSeerX/doc', 'citeseerx'}, -- no template data; preprint uses limited arguments citeconference = {'Template:Cite conference/doc', 'conference'}, -- unique arguments citeencyclopedia = {'Template:Cite encyclopedia/doc'}, citeepisode = {'Template:Cite episode/doc', 'episode'}, -- unique arguments citeinterview = {'Template:Cite interview/doc'}, citejournal = {'Template:Cite journal/doc'}, citemagazine = {'Template:Cite magazine/doc'}, citemailinglist = {'Template:Cite mailing list/doc', 'mailinglist'}, -- unique arguments -- no template data citemap = {'Template:Cite map/TemplateData', 'map'}, -- unique arguments citemedrxiv = {'Template:Cite medRxiv/doc', 'medrxiv'}, -- preprint arguments citenews = {'Template:Cite news/doc'}, citenewsgroup = {'Template:Cite newsgroup/doc', 'newsgroup'}, -- unique arguments citepodcast = {'Template:Cite podcast/doc'}, citepressrelease = {'Template:Cite press release/doc'}, citereport = {'Template:Cite report/doc', 'report'}, -- unique arguments citeserial = {'Template:Cite serial/doc', 'serial'}, -- unique arguments -- no template data citesign = {'Template:Cite sign/doc'}, citespeech = {'Template:Cite speech/doc', 'speech'}, -- unique arguments -- no template data citessrn = {'Template:Cite SSRN/doc', 'ssrn'}, -- preprint arguments -- no template data citetechreport = {'Template:Cite techreport/doc'}, citethesis = {'Template:Cite thesis/doc', 'thesis'}, -- unique arguments citeweb = {'Template:Cite web/doc'}, citation = {'Template:Citation/doc'}, } --[[--------------------------< N O _ P A G E _ T E M P L A T E S _ T >---------------------------------------- ]] local no_page_templates_t = {}; --[[--------------------------< I D E N T I F I E R _ A L I A S E S _ T >-------------------------------------- a table of the identifier aliases ]] local identifier_aliases_t = {} for identifier, handler in pairs (cfg.id_handlers) do -- for each identifier local aliases_t = {}; -- create a table for _, alias in ipairs (handler.parameters) do -- get the alaises aliases_t[alias] = true; -- and add them to the table in a form that mimics the whitelist tables end identifier_aliases_t[identifier:lower()] = aliases_t; -- add new table to the identifier aliases table; use lowercase identifier base name for the key end --[[--------------------------< T E M P L A T E _ D A T A _ J S O N _ G E T >---------------------------------- get template doc page content and extract the content of the TemplateData tags (case insensitive) <template> is the canonical name of the template doc page (with namespace) that holds the template data; usually Template:Cite xxx/doc (except Template:Cite book/TemplateData) ]] local function template_data_json_get (template) local json = mw.title.new (template):getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625 json = json:match ('<[Tt]emplate[Dd]ata>(.-)</[Tt]emplate[Dd]ata>'); -- remove everything exept the content of the TemplatData tags return json and mw.text.jsonDecode (json); -- decode the json string and return as a table; nil if not found end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.basic_arguments{} and if necessary in whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData ]] local function validate_basic_param (param) if true == whitelist.common_parameters_t[param] then -- if true == whitelist.basic_arguments[param] or true == whitelist.numbered_arguments[param] then return true; end end --[[--------------------------< V A L I D A T E _ P R E P R I N T _ P A R A M >-------------------------------- looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.preprint_arguments_t{} or whitelist.limited_basic_arguments{} or whitelist.limited_numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.preprint_arguments_t{} ]] local function validate_preprint_param (param, key) if true == whitelist.preprint_arguments_t[key][param] or true == whitelist.limited_parameters_t[param] then -- true == whitelist.limited_basic_arguments_t[param] or -- true == whitelist.limited_numbered_arguments_t[param] then return true; end end --[[--------------------------< V A L I D A T E _ U N I Q U E _ P A R A M >------------------------------------ looks for <param> (can be the canonical parameter name or can be an alias) in whitelist.unique_arguments_t{} or whitelist.basic_arguments{} or whitelist.numbered_arguments{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <key> is key neccessary to look in the appropriate subtable of whitelist.unique_arguments_t{} ]] local function validate_unique_param (param, key, cfg_aliases_t) if true == whitelist.unique_arguments_t[key][param] or true == validate_basic_param (param) then return true; end end --[[--------------------------< V A L I D A T E _ I D _ P A R A M >-------------------------------------------- looks for <param> <alias> in identifier_aliases_t{}. When found, returns true; nil else <param> is the parameter's name as listed in the TemplateData <alias> is the alias that we're looking for ]] local function validate_id_alias (param, alias) return identifier_aliases_t[param] and identifier_aliases_t[param][alias]; end --[[--------------------------< P A R A M _ E R R O R_ M S G >------------------------------------------------- ]] local function param_error_msg (param) return '<code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. param .. '=</code> is not a valid parameter'; end --[[--------------------------< A L I A S _ E R R O R_ M S G >------------------------------------------------- ]] local function alias_error_msg (param, alias) return '<code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. alias .. '=</code> is not a valid alias of: <code style="color: inherit; background: inherit; border: none; padding: inherit">|' .. param .. '=</code>'; end --[[--------------------------< C F G _ A L I A S E S _ T _ M A K E >------------------------------------------ convert this from cfg.aliases{}: ['AccessDate'] = {'access-date', 'accessdate'} to this in out_t{} ['access-date'] = 'AccessDate', ['accessdate'] = 'AccessDate', to test if |accessdate= is an aliases of |access-date=: if out_t['access-date'] == out_t['accessdate'] ]] local function cfg_aliasts_t_make () local out_t = {}; for meta, params_t in pairs (cfg.aliases) do if 'table' == type (params_t) then -- metaparameters that are assigned string values do not have aliases for _, param in ipairs (params_t) do -- for each alias param = param:gsub ('#', ''); -- get rid of enumerators out_t[param] = meta; -- add it to the output table end end end --error (mw.dumpObject (out_t)) return out_t; end --[[--------------------------< T E M P L A T E _ D A T A _ V A L I D A T E >---------------------------------- compairs parameter names listed in a cs1|2 template's TemplateData structure (everything between <TemplateData> and </TemplateData> tag case insensitive). Returns error messages when errors found, empty string else. {{#invoke:Cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}} When called from a different page: {{#invoke:cs1 documentation support|template_data_validate|<canonical template name>}} where the <canonical template name> is the template's canonical name with or without namespace and or subpages ]] local function template_data_validate (frame) local args_t = getArgs (frame); if not args_t[1] then return '<span style="color:#d33">Error: cs1|2 template name required</span>'; end local template_idx = args_t[1]:lower():match ('cit[ae][^/]+'); -- args_t[1] has something if not template_idx then -- but if not a cs1|2 template abandon with error message return '<span style="color:#d33">Error: cs1|2 template name required</span>'; else template_idx = template_idx:gsub (' ', ''); -- is what appears to be a cs1|2 template so strip spaces end local cfg_aliases_t = cfg_aliasts_t_make (); local template_t = templates_t[template_idx]; local out = {}; local template_doc = template_t[1]; local json_t = template_data_json_get (template_doc); if not json_t then table.insert (out, 'Error: can\'t find TemplateData'); else for param, param_t in pairs (json_t['params']) do local param_i; -- this will be the parameter name that gets validated if param:find ('[Ss]2[Cc][Ii][Dd]') then -- |s2cid*= parameters are not enumerated ... param_i = param; -- ... so don't convert the '2' to '#' else param_i = param:gsub ('%d+', '#'); -- for enumerated parameters, convert the enumerator digits to a single '#' character; all others unmolested end local param_is_valid; -- boolean true when param is valid; nil else if template_t[2] then -- if template is a preprint or uses unique parameters if whitelist.preprint_arguments_t[template_t[2]] then -- if a preprint template param_is_valid = validate_preprint_param (param_i, template_t[2]); if param_is_valid then if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerator digits to a single '#' character if not validate_preprint_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); -- may be known but is not supported elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid preprint param table.insert (out, param_error_msg (param)) end elseif whitelist.unique_arguments_t[template_t[2]] then -- if a unique parameters template param_is_valid = validate_unique_param (param_i, template_t[2]); if param_is_valid then if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_unique_param (alias_i, template_t[2]) then -- is 'alias' a known parameter? table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid unique parameter table.insert (out, param_error_msg (param)) end else -- should never be here if coder is doing the right thing ... table.insert (out, 'internal error: unexpected keyword in templates_t: ' .. template_t[2]); break; end else -- here when not unique or preprint param_is_valid = validate_basic_param (param_i); if param_is_valid then if param_t['aliases'] then for _, alias in ipairs (param_t['aliases']) do local alias_i = alias:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character if not validate_basic_param (alias_i) and not validate_id_alias (param, alias) then -- for isbn13 (while still supported) must not mask the digits table.insert (out, alias_error_msg (param, alias)); elseif cfg_aliases_t[param_i:gsub ('#', '')] ~= cfg_aliases_t[alias_i:gsub ('#', '')] then -- is 'alias' known to be an alias of 'param'? table.insert (out, alias_error_msg (param, alias)); end end end else -- here when param not valid table.insert (out, param_error_msg (param)) end end end end ---------- this emits errors when page/pages/at listed in templatedata of templates that don't support those parameters ---------- -- if json_t then -- if ({['citeavmedia']=true, ['citeepisode']=true, ['citemailinglist']=true, ['citenewsgroup']=true, ['citepodcast']=true, ['citeserial']=true, ['citesign']=true, ['citespeech']=true})[template_idx] then -- local insource_params_t = {}; -- build sequence of pagination params not supported by these templates -- for _, meta_param in ipairs ({'At', 'Page', 'Pages', 'QuotePage', 'QuotePages'}) do -- if 'table' == type (cfg.aliases[meta_param]) then -- for _, alias in ipairs (cfg.aliases[meta_param]) do -- metaparameter is a sequence -- table.insert (insource_params_t, alias); -- add the aliases from the metaparameter sequence to the table -- end -- else -- metaparameter is plain text -- table.insert (insource_params_t, cfg.aliases[meta_param]); -- add the alias to the table -- end -- end -- -- for _, param in ipairs (insource_params_t) do -- if json_t.params[param] then -- table.insert (out, param_error_msg (param)); -- error; this parameter not supported by this template -- end -- end -- end -- end ---------- end page/pages/at error detection ---------- if 0 ~= #out then table.sort (out); out[1] = '*' .. out[1]; -- add a splat to the first error message -- return table.concat ({'[[' .. template_doc .. ']] TemplateData has errors:<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>'}); return table.concat ({ '[[Templat:' .. args_t[1] .. ']] uses ', whitelist.preprint_arguments_t[template_t[2]] and 'preprint and limited parameter sets' or (whitelist.unique_arguments_t[template_t[2]] and 'unique and standard parameter sets' or 'standard parameter set'), '; TemplateData has errors:\n', '<div style="color:#d33; font-style: normal">\n', table.concat (out, '\n*'), '</div>' }); else return; -- no errors detected; return nothing end end --[[--------------------------< E R R O R _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|error_cat_page_tally}} ]] local function error_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local i = 0; -- number of categories for k, v_t in pairs (error_conditions_t) do if k:match ('^err') then if not cat_t[v_t.category] then cat_t[v_t.category] = true; tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< M A I N T _ C A T _ P A G E _ T A L L Y >-------------------------------------- loop through Module:Citation/CS1/Configuration error_conditions {} fetching error category names. For each error category add the number of pages in the category to the tally. Render the number when done. {{#invoke:cs1 documentation support|maint_cat_page_tally}} Dynamic subcats of CS1 maint: DOI inactive not counted because these names come and go as time goes by. ]] local function maint_cat_page_tally () local error_conditions_t = cfg.error_conditions; -- get the table of error conditions local tally = 0; local cat_t = {}; -- some error message share a category; save tallied cats here so we don't recount the already counted local i = 0; -- number of categories for k, v_t in pairs (error_conditions_t) do if not k:match ('^err') then -- if not an error key its a maint key if not cat_t[v_t.category] then cat_t[v_t.category] = true; if 'maint_mult_names' == k or 'maint_numeric_names' == k then local special_case_translation_t = cfg.special_case_translation; for _, name in ipairs ({'AuthorList', 'ContributorList', 'EditorList', 'InterviewerList', 'TranslatorList'}) do local cat_name = v_t.category:gsub ('$1', special_case_translation_t[name]); -- replace $1 with translated list name tally = tally + mw.site.stats.pagesInCategory (cat_name, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end else tally = tally + mw.site.stats.pagesInCategory (v_t.category, 'pages'); -- get category page count; ignore subcats and files i = i + 1; end end end end return mw.language.getContentLanguage():formatNum (tally) end --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E _ L I S T E R >------------------ For use in the Help:CS1 error §Notes Get namespace names and identifiers from MediaWiki. Make a human readable list of namespace names and identifiers that cs1|2 does not categorize. {{#invoke:cs1 documentation support|uncategorized_namespace_lister}} For convenience, {{#invoke:cs1 documentation support|uncategorized_namespace_lister|all=<anything>}} returns a list of all namespace names and identifiers used on the current wiki. Any namespace with an identifier less than 1, currently Mainspace (0), Special (-1), and Media (-2), is excluded from the list. ]] local function uncategorized_namespace_lister (frame) local list_t = {}; local function compare (a, b) -- local function to sort namespaces numerically by the identifiers local a_num = tonumber (a:match ('%d+')); -- get identifiers and convert to numbers local b_num = tonumber (b:match ('%d+')); return a_num < b_num; -- do the comparison end for i, _ in pairs (mw.site.namespaces) do -- for each namespace in the table if '' == frame.args.all or not frame.args.all then -- when |all= not set, make a list of uncategorized namespaces if cfg.uncategorized_namespaces[i] then -- if the identifier is listed in our uncategorized namespace list table.insert (list_t, table.concat ({mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier to our local list end elseif 0 < i then -- |all=<anything>: all namespace names and identifiers; ignore identifiers less than 1 table.insert (list_t, table.concat ({'*', mw.site.namespaces[i].name, ' (', i, ')'})) -- add name and identifier as an unordered list item end end table.sort (list_t, compare); -- ascending numerical sort by identifier if not frame.args.all then -- when |all= not set, format list of uncategorized namespaces and identifiers list_t[#list_t] = 'and ' .. list_t[#list_t]; -- add 'and ' to the last name/identifier pair return table.concat (list_t, ', '); -- make a big string and done else -- make list of all namespaces and identifiers return table.concat (list_t, '\n'); -- make a big string and done end end --[[--------------------------< S I N G L E _ L T R _ 2 N D _ L V L _ D O M A I N _ L I S T E R >------------- for Help:CS1_errors#bad_url, list the supported top level domains that support single-letter 2nd level names {{#invoke:Module:cs1 documentation support|single_ltr_2nd_lvl_domain_lister}} ]] local function single_ltr_2nd_lvl_domain_lister () local out_t = {}; -- output goes here for _, tld in ipairs (cfg.single_letter_2nd_lvl_domains_t) do -- fetch each tld table.insert (out_t, '.' .. tld); -- prefix with a dot and save in out_t{} end return table.concat (out_t, ', '); -- make a big string and done end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { alias_lister = alias_lister, alias_names_get = alias_names_get, canonical_param_lister = canonical_param_lister, canonical_name_get = canonical_name_get, cat_lister = cat_lister, error_cat_page_tally = error_cat_page_tally, header_make = header_make, help_text_cats = help_text_cats, help_text_error_messages = help_text_error_messages, id_limits_get = id_limits_get, is_book_cite_template = is_book_cite_template, is_limited_param_template = is_limited_param_template, lang_lister = lang_lister, maint_cat_page_tally = maint_cat_page_tally, script_lang_lister = script_lang_lister, single_ltr_2nd_lvl_domain_lister = single_ltr_2nd_lvl_domain_lister, template_data_validate = template_data_validate, uncategorized_namespace_lister = uncategorized_namespace_lister, }; sid1gd77hr8tic9zeuf5zxam51ou9zs Modul:Date 828 292 864 863 2024-08-09T09:21:33Z Jon Harald Søby 58 1 semakan diimportkan 863 Scribunto text/plain -- Date functions for use by other modules. -- I18N and time zones are not supported. local MINUS = '−' -- Unicode U+2212 MINUS SIGN local floor = math.floor local Date, DateDiff, diffmt -- forward declarations local uniq = { 'unique identifier' } local function is_date(t) -- The system used to make a date read-only means there is no unique -- metatable that is conveniently accessible to check. return type(t) == 'table' and t._id == uniq end local function is_diff(t) return type(t) == 'table' and getmetatable(t) == diffmt end local function _list_join(list, sep) return table.concat(list, sep) end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, join = _list_join, } end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when Date fields are provided from -- another module which may pass a string, a number, or another type). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function is_leap_year(year, calname) -- Return true if year is a leap year. if calname == 'Julian' then return year % 4 == 0 end return (year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0 end local function days_in_month(year, month, calname) -- Return number of days (1..31) in given month (1..12). if month == 2 and is_leap_year(year, calname) then return 29 end return ({ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 })[month] end local function h_m_s(time) -- Return hour, minute, second extracted from fraction of a day. time = floor(time * 24 * 3600 + 0.5) -- number of seconds local second = time % 60 time = floor(time / 60) return floor(time / 60), time % 60, second end local function hms(date) -- Return fraction of a day from date's time, where (0 <= fraction < 1) -- if the values are valid, but could be anything if outside range. return (date.hour + (date.minute + date.second / 60) / 60) / 24 end local function julian_date(date) -- Return jd, jdz from a Julian or Gregorian calendar date where -- jd = Julian date and its fractional part is zero at noon -- jdz = same, but assume time is 00:00:00 if no time given -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- Testing shows this works for all dates from year -9999 to 9999! -- JDN 0 is the 24-hour period starting at noon UTC on Monday -- 1 January 4713 BC = (-4712, 1, 1) Julian calendar -- 24 November 4714 BC = (-4713, 11, 24) Gregorian calendar local offset local a = floor((14 - date.month)/12) local y = date.year + 4800 - a if date.calendar == 'Julian' then offset = floor(y/4) - 32083 else offset = floor(y/4) - floor(y/100) + floor(y/400) - 32045 end local m = date.month + 12*a - 3 local jd = date.day + floor((153*m + 2)/5) + 365*y + offset if date.hastime then jd = jd + hms(date) - 0.5 return jd, jd end return jd, jd - 0.5 end local function set_date_from_jd(date) -- Set the fields of table date from its Julian date field. -- Return true if date is valid. -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- This handles the proleptic Julian and Gregorian calendars. -- Negative Julian dates are not defined but they work. local calname = date.calendar local low, high -- min/max limits for date ranges −9999-01-01 to 9999-12-31 if calname == 'Gregorian' then low, high = -1930999.5, 5373484.49999 elseif calname == 'Julian' then low, high = -1931076.5, 5373557.49999 else return end local jd = date.jd if not (type(jd) == 'number' and low <= jd and jd <= high) then return end local jdn = floor(jd) if date.hastime then local time = jd - jdn -- 0 <= time < 1 if time >= 0.5 then -- if at or after midnight of next day jdn = jdn + 1 time = time - 0.5 else time = time + 0.5 end date.hour, date.minute, date.second = h_m_s(time) else date.second = 0 date.minute = 0 date.hour = 0 end local b, c if calname == 'Julian' then b = 0 c = jdn + 32082 else -- Gregorian local a = jdn + 32044 b = floor((4*a + 3)/146097) c = a - floor(146097*b/4) end local d = floor((4*c + 3)/1461) local e = c - floor(1461*d/4) local m = floor((5*e + 2)/153) date.day = e - floor((153*m + 2)/5) + 1 date.month = m + 3 - 12*floor(m/10) date.year = 100*b + d - 4800 + floor(m/10) return true end local function fix_numbers(numbers, y, m, d, H, M, S, partial, hastime, calendar) -- Put the result of normalizing the given values in table numbers. -- The result will have valid m, d values if y is valid; caller checks y. -- The logic of PHP mktime is followed where m or d can be zero to mean -- the previous unit, and -1 is the one before that, etc. -- Positive values carry forward. local date if not (1 <= m and m <= 12) then date = Date(y, 1, 1) if not date then return end date = date + ((m - 1) .. 'm') y, m = date.year, date.month end local days_hms if not partial then if hastime and H and M and S then if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then days_hms = hms({ hour = H, minute = M, second = S }) end end if days_hms or not (1 <= d and d <= days_in_month(y, m, calendar)) then date = date or Date(y, m, 1) if not date then return end date = date + (d - 1 + (days_hms or 0)) y, m, d = date.year, date.month, date.day if days_hms then H, M, S = date.hour, date.minute, date.second end end end numbers.year = y numbers.month = m numbers.day = d if days_hms then -- Don't set H unless it was valid because a valid H will set hastime. numbers.hour = H numbers.minute = M numbers.second = S end end local function set_date_from_numbers(date, numbers, options) -- Set the fields of table date from numeric values. -- Return true if date is valid. if type(numbers) ~= 'table' then return end local y = numbers.year or date.year local m = numbers.month or date.month local d = numbers.day or date.day local H = numbers.hour local M = numbers.minute or date.minute or 0 local S = numbers.second or date.second or 0 local need_fix if y and m and d then date.partial = nil if not (-9999 <= y and y <= 9999 and 1 <= m and m <= 12 and 1 <= d and d <= days_in_month(y, m, date.calendar)) then if not date.want_fix then return end need_fix = true end elseif y and date.partial then if d or not (-9999 <= y and y <= 9999) then return end if m and not (1 <= m and m <= 12) then if not date.want_fix then return end need_fix = true end else return end if date.partial then H = nil -- ignore any time M = nil S = nil else if H then -- It is not possible to set M or S without also setting H. date.hastime = true else H = 0 end if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then if date.want_fix then need_fix = true else return end end end date.want_fix = nil if need_fix then fix_numbers(numbers, y, m, d, H, M, S, date.partial, date.hastime, date.calendar) return set_date_from_numbers(date, numbers, options) end date.year = y -- -9999 to 9999 ('n BC' → year = 1 - n) date.month = m -- 1 to 12 (may be nil if partial) date.day = d -- 1 to 31 (* = nil if partial) date.hour = H -- 0 to 59 (*) date.minute = M -- 0 to 59 (*) date.second = S -- 0 to 59 (*) if type(options) == 'table' then for _, k in ipairs({ 'am', 'era', 'format' }) do if options[k] then date.options[k] = options[k] end end end return true end local function make_option_table(options1, options2) -- If options1 is a string, return a table with its settings, or -- if it is a table, use its settings. -- Missing options are set from table options2 or defaults. -- If a default is used, a flag is set so caller knows the value was not intentionally set. -- Valid option settings are: -- am: 'am', 'a.m.', 'AM', 'A.M.' -- 'pm', 'p.m.', 'PM', 'P.M.' (each has same meaning as corresponding item above) -- era: 'BCMINUS', 'BCNEGATIVE', 'BC', 'B.C.', 'BCE', 'B.C.E.', 'AD', 'A.D.', 'CE', 'C.E.' -- Option am = 'am' does not mean the hour is AM; it means 'am' or 'pm' is used, depending on the hour, -- and am = 'pm' has the same meaning. -- Similarly, era = 'BC' means 'BC' is used if year <= 0. -- BCMINUS displays a MINUS if year < 0 and the display format does not include %{era}. -- BCNEGATIVE is similar but displays a hyphen. local result = { bydefault = {} } if type(options1) == 'table' then result.am = options1.am result.era = options1.era elseif type(options1) == 'string' then -- Example: 'am:AM era:BC' or 'am=AM era=BC'. for item in options1:gmatch('%S+') do local lhs, rhs = item:match('^(%w+)[:=](.+)$') if lhs then result[lhs] = rhs end end end options2 = type(options2) == 'table' and options2 or {} local defaults = { am = 'am', era = 'BC' } for k, v in pairs(defaults) do if not result[k] then if options2[k] then result[k] = options2[k] else result[k] = v result.bydefault[k] = true end end end return result end local ampm_options = { -- lhs = input text accepted as an am/pm option -- rhs = code used internally ['am'] = 'am', ['AM'] = 'AM', ['a.m.'] = 'a.m.', ['A.M.'] = 'A.M.', ['pm'] = 'am', -- same as am ['PM'] = 'AM', ['p.m.'] = 'a.m.', ['P.M.'] = 'A.M.', } local era_text = { -- Text for displaying an era with a positive year (after adjusting -- by replacing year with 1 - year if date.year <= 0). -- options.era = { year<=0 , year>0 } ['BCMINUS'] = { 'BC' , '' , isbc = true, sign = MINUS }, ['BCNEGATIVE'] = { 'BC' , '' , isbc = true, sign = '-' }, ['BC'] = { 'BC' , '' , isbc = true }, ['B.C.'] = { 'B.C.' , '' , isbc = true }, ['BCE'] = { 'BCE' , '' , isbc = true }, ['B.C.E.'] = { 'B.C.E.', '' , isbc = true }, ['AD'] = { 'BC' , 'AD' }, ['A.D.'] = { 'B.C.' , 'A.D.' }, ['CE'] = { 'BCE' , 'CE' }, ['C.E.'] = { 'B.C.E.', 'C.E.' }, } local function get_era_for_year(era, year) return (era_text[era] or era_text['BC'])[year > 0 and 2 or 1] or '' end local function strftime(date, format, options) -- Return date formatted as a string using codes similar to those -- in the C strftime library function. local sformat = string.format local shortcuts = { ['%c'] = '%-I:%M %p %-d %B %-Y %{era}', -- date and time: 2:30 pm 1 April 2016 ['%x'] = '%-d %B %-Y %{era}', -- date: 1 April 2016 ['%X'] = '%-I:%M %p', -- time: 2:30 pm } if shortcuts[format] then format = shortcuts[format] end local codes = { a = { field = 'dayabbr' }, A = { field = 'dayname' }, b = { field = 'monthabbr' }, B = { field = 'monthname' }, u = { fmt = '%d' , field = 'dowiso' }, w = { fmt = '%d' , field = 'dow' }, d = { fmt = '%02d', fmt2 = '%d', field = 'day' }, m = { fmt = '%02d', fmt2 = '%d', field = 'month' }, Y = { fmt = '%04d', fmt2 = '%d', field = 'year' }, H = { fmt = '%02d', fmt2 = '%d', field = 'hour' }, M = { fmt = '%02d', fmt2 = '%d', field = 'minute' }, S = { fmt = '%02d', fmt2 = '%d', field = 'second' }, j = { fmt = '%03d', fmt2 = '%d', field = 'dayofyear' }, I = { fmt = '%02d', fmt2 = '%d', field = 'hour', special = 'hour12' }, p = { field = 'hour', special = 'am' }, } options = make_option_table(options, date.options) local amopt = options.am local eraopt = options.era local function replace_code(spaces, modifier, id) local code = codes[id] if code then local fmt = code.fmt if modifier == '-' and code.fmt2 then fmt = code.fmt2 end local value = date[code.field] if not value then return nil -- an undefined field in a partial date end local special = code.special if special then if special == 'hour12' then value = value % 12 value = value == 0 and 12 or value elseif special == 'am' then local ap = ({ ['a.m.'] = { 'a.m.', 'p.m.' }, ['AM'] = { 'AM', 'PM' }, ['A.M.'] = { 'A.M.', 'P.M.' }, })[ampm_options[amopt]] or { 'am', 'pm' } return (spaces == '' and '' or '&nbsp;') .. (value < 12 and ap[1] or ap[2]) end end if code.field == 'year' then local sign = (era_text[eraopt] or {}).sign if not sign or format:find('%{era}', 1, true) then sign = '' if value <= 0 then value = 1 - value end else if value >= 0 then sign = '' else value = -value end end return spaces .. sign .. sformat(fmt, value) end return spaces .. (fmt and sformat(fmt, value) or value) end end local function replace_property(spaces, id) if id == 'era' then -- Special case so can use local era option. local result = get_era_for_year(eraopt, date.year) if result == '' then return '' end return (spaces == '' and '' or '&nbsp;') .. result end local result = date[id] if type(result) == 'string' then return spaces .. result end if type(result) == 'number' then return spaces .. tostring(result) end if type(result) == 'boolean' then return spaces .. (result and '1' or '0') end -- This occurs if id is an undefined field in a partial date, or is the name of a function. return nil end local PERCENT = '\127PERCENT\127' return (format :gsub('%%%%', PERCENT) :gsub('(%s*)%%{(%w+)}', replace_property) :gsub('(%s*)%%(%-?)(%a)', replace_code) :gsub(PERCENT, '%%') ) end local function _date_text(date, fmt, options) -- Return a formatted string representing the given date. if not is_date(date) then error('date:text: need a date (use "date:text()" with a colon)', 2) end if type(fmt) == 'string' and fmt:match('%S') then if fmt:find('%', 1, true) then return strftime(date, fmt, options) end elseif date.partial then fmt = date.month and 'my' or 'y' else fmt = 'dmy' if date.hastime then fmt = (date.second > 0 and 'hms ' or 'hm ') .. fmt end end local function bad_format() -- For consistency with other format processing, return given format -- (or cleaned format if original was not a string) if invalid. return mw.text.nowiki(fmt) end if date.partial then -- Ignore days in standard formats like 'ymd'. if fmt == 'ym' or fmt == 'ymd' then fmt = date.month and '%Y-%m %{era}' or '%Y %{era}' elseif fmt == 'my' or fmt == 'dmy' or fmt == 'mdy' then fmt = date.month and '%B %-Y %{era}' or '%-Y %{era}' elseif fmt == 'y' then fmt = date.month and '%-Y %{era}' or '%-Y %{era}' else return bad_format() end return strftime(date, fmt, options) end local function hm_fmt() local plain = make_option_table(options, date.options).bydefault.am return plain and '%H:%M' or '%-I:%M %p' end local need_time = date.hastime local t = collection() for item in fmt:gmatch('%S+') do local f if item == 'hm' then f = hm_fmt() need_time = false elseif item == 'hms' then f = '%H:%M:%S' need_time = false elseif item == 'ymd' then f = '%Y-%m-%d %{era}' elseif item == 'mdy' then f = '%B %-d, %-Y %{era}' elseif item == 'dmy' then f = '%-d %B %-Y %{era}' else return bad_format() end t:add(f) end fmt = t:join(' ') if need_time then fmt = hm_fmt() .. ' ' .. fmt end return strftime(date, fmt, options) end local day_info = { -- 0=Sun to 6=Sat [0] = { 'Sun', 'Tiwang' }, { 'Mon', 'Tontolu' }, { 'Tue', 'Mirod' }, { 'Wed', 'Madsa' }, { 'Thu', 'Tadtaru' }, { 'Fri', 'Kurudu' }, { 'Sat', 'Kukuak' }, } local month_info = { -- 1=Jan to 12=Dec { 'Jan', 'Milatok' }, { 'Feb', 'Mansak' }, { 'Mar', 'Gomot' }, { 'Apr', 'Ngiop' }, { 'May', 'Mikat' }, { 'Jun', 'Mahas' }, { 'Jul', 'Madas' }, { 'Aug', 'Magus' }, { 'Sep', 'Manom' }, { 'Oct', 'Gumas' }, { 'Nov', 'Milau' }, { 'Dec', 'Momuhau' }, } local function name_to_number(text, translate) if type(text) == 'string' then return translate[text:lower()] end end local function day_number(text) return name_to_number(text, { sun = 0, sunday = 0, mon = 1, monday = 1, tue = 2, tuesday = 2, wed = 3, wednesday = 3, thu = 4, thursday = 4, fri = 5, friday = 5, sat = 6, saturday = 6, }) end local function month_number(text) return name_to_number(text, { jan = 1, january = 1, feb = 2, february = 2, mar = 3, march = 3, apr = 4, april = 4, may = 5, jun = 6, june = 6, jul = 7, july = 7, aug = 8, august = 8, sep = 9, september = 9, sept = 9, oct = 10, october = 10, nov = 11, november = 11, dec = 12, december = 12, }) end local function _list_text(list, fmt) -- Return a list of formatted strings from a list of dates. if not type(list) == 'table' then error('date:list:text: need "list:text()" with a colon', 2) end local result = { join = _list_join } for i, date in ipairs(list) do result[i] = date:text(fmt) end return result end local function _date_list(date, spec) -- Return a possibly empty numbered table of dates meeting the specification. -- Dates in the list are in ascending order (oldest date first). -- The spec should be a string of form "<count> <day> <op>" -- where each item is optional and -- count = number of items wanted in list -- day = abbreviation or name such as Mon or Monday -- op = >, >=, <, <= (default is > meaning after date) -- If no count is given, the list is for the specified days in date's month. -- The default day is date's day. -- The spec can also be a positive or negative number: -- -5 is equivalent to '5 <' -- 5 is equivalent to '5' which is '5 >' if not is_date(date) then error('date:list: need a date (use "date:list()" with a colon)', 2) end local list = { text = _list_text } if date.partial then return list end local count, offset, operation local ops = { ['>='] = { before = false, include = true }, ['>'] = { before = false, include = false }, ['<='] = { before = true , include = true }, ['<'] = { before = true , include = false }, } if spec then if type(spec) == 'number' then count = floor(spec + 0.5) if count < 0 then count = -count operation = ops['<'] end elseif type(spec) == 'string' then local num, day, op = spec:match('^%s*(%d*)%s*(%a*)%s*([<>=]*)%s*$') if not num then return list end if num ~= '' then count = tonumber(num) end if day ~= '' then local dow = day_number(day:gsub('[sS]$', '')) -- accept plural days if not dow then return list end offset = dow - date.dow end operation = ops[op] else return list end end offset = offset or 0 operation = operation or ops['>'] local datefrom, dayfirst, daylast if operation.before then if offset > 0 or (offset == 0 and not operation.include) then offset = offset - 7 end if count then if count > 1 then offset = offset - 7*(count - 1) end datefrom = date + offset else daylast = date.day + offset dayfirst = daylast % 7 if dayfirst == 0 then dayfirst = 7 end end else if offset < 0 or (offset == 0 and not operation.include) then offset = offset + 7 end if count then datefrom = date + offset else dayfirst = date.day + offset daylast = date.monthdays end end if not count then if daylast < dayfirst then return list end count = floor((daylast - dayfirst)/7) + 1 datefrom = Date(date, {day = dayfirst}) end for i = 1, count do if not datefrom then break end -- exceeds date limits list[i] = datefrom datefrom = datefrom + 7 end return list end -- A table to get the current date/time (UTC), but only if needed. local current = setmetatable({}, { __index = function (self, key) local d = os.date('!*t') self.year = d.year self.month = d.month self.day = d.day self.hour = d.hour self.minute = d.min self.second = d.sec return rawget(self, key) end }) local function extract_date(newdate, text) -- Parse the date/time in text and return n, o where -- n = table of numbers with date/time fields -- o = table of options for AM/PM or AD/BC or format, if any -- or return nothing if date is known to be invalid. -- Caller determines if the values in n are valid. -- A year must be positive ('1' to '9999'); use 'BC' for BC. -- In a y-m-d string, the year must be four digits to avoid ambiguity -- ('0001' to '9999'). The only way to enter year <= 0 is by specifying -- the date as three numeric parameters like ymd Date(-1, 1, 1). -- Dates of form d/m/y, m/d/y, y/m/d are rejected as potentially ambiguous. local date, options = {}, {} if text:sub(-1) == 'Z' then -- Extract date/time from a Wikidata timestamp. -- The year can be 1 to 16 digits but this module handles 1 to 4 digits only. -- Examples: '+2016-06-21T14:30:00Z', '-0000000180-00-00T00:00:00Z'. local sign, y, m, d, H, M, S = text:match('^([+%-])(%d+)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)Z$') if sign then y = tonumber(y) if sign == '-' and y > 0 then y = -y end if y <= 0 then options.era = 'BCE' end date.year = y m = tonumber(m) d = tonumber(d) H = tonumber(H) M = tonumber(M) S = tonumber(S) if m == 0 then newdate.partial = true return date, options end date.month = m if d == 0 then newdate.partial = true return date, options end date.day = d if H > 0 or M > 0 or S > 0 then date.hour = H date.minute = M date.second = S end return date, options end return end local function extract_ymd(item) -- Called when no day or month has been set. local y, m, d = item:match('^(%d%d%d%d)%-(%w+)%-(%d%d?)$') if y then if date.year then return end if m:match('^%d%d?$') then m = tonumber(m) else m = month_number(m) end if m then date.year = tonumber(y) date.month = m date.day = tonumber(d) return true end end end local function extract_day_or_year(item) -- Called when a day would be valid, or -- when a year would be valid if no year has been set and partial is set. local number, suffix = item:match('^(%d%d?%d?%d?)(.*)$') if number then local n = tonumber(number) if #number <= 2 and n <= 31 then suffix = suffix:lower() if suffix == '' or suffix == 'st' or suffix == 'nd' or suffix == 'rd' or suffix == 'th' then date.day = n return true end elseif suffix == '' and newdate.partial and not date.year then date.year = n return true end end end local function extract_month(item) -- A month must be given as a name or abbreviation; a number could be ambiguous. local m = month_number(item) if m then date.month = m return true end end local function extract_time(item) local h, m, s = item:match('^(%d%d?):(%d%d)(:?%d*)$') if date.hour or not h then return end if s ~= '' then s = s:match('^:(%d%d)$') if not s then return end end date.hour = tonumber(h) date.minute = tonumber(m) date.second = tonumber(s) -- nil if empty string return true end local item_count = 0 local index_time local function set_ampm(item) local H = date.hour if H and not options.am and index_time + 1 == item_count then options.am = ampm_options[item] -- caller checked this is not nil if item:match('^[Aa]') then if not (1 <= H and H <= 12) then return end if H == 12 then date.hour = 0 end else if not (1 <= H and H <= 23) then return end if H <= 11 then date.hour = H + 12 end end return true end end for item in text:gsub(',', ' '):gsub('&nbsp;', ' '):gmatch('%S+') do item_count = item_count + 1 if era_text[item] then -- Era is accepted in peculiar places. if options.era then return end options.era = item elseif ampm_options[item] then if not set_ampm(item) then return end elseif item:find(':', 1, true) then if not extract_time(item) then return end index_time = item_count elseif date.day and date.month then if date.year then return -- should be nothing more so item is invalid end if not item:match('^(%d%d?%d?%d?)$') then return end date.year = tonumber(item) elseif date.day then if not extract_month(item) then return end elseif date.month then if not extract_day_or_year(item) then return end elseif extract_month(item) then options.format = 'mdy' elseif extract_ymd(item) then options.format = 'ymd' elseif extract_day_or_year(item) then if date.day then options.format = 'dmy' end else return end end if not date.year or date.year == 0 then return end local era = era_text[options.era] if era and era.isbc then date.year = 1 - date.year end return date, options end local function autofill(date1, date2) -- Fill any missing month or day in each date using the -- corresponding component from the other date, if present, -- or with 1 if both dates are missing the month or day. -- This gives a good result for calculating the difference -- between two partial dates when no range is wanted. -- Return filled date1, date2 (two full dates). local function filled(a, b) -- Return date a filled, if necessary, with month and/or day from date b. -- The filled day is truncated to fit the number of days in the month. local fillmonth, fillday if not a.month then fillmonth = b.month or 1 end if not a.day then fillday = b.day or 1 end if fillmonth or fillday then -- need to create a new date a = Date(a, { month = fillmonth, day = math.min(fillday or a.day, days_in_month(a.year, fillmonth or a.month, a.calendar)) }) end return a end return filled(date1, date2), filled(date2, date1) end local function date_add_sub(lhs, rhs, is_sub) -- Return a new date from calculating (lhs + rhs) or (lhs - rhs), -- or return nothing if invalid. -- The result is nil if the calculated date exceeds allowable limits. -- Caller ensures that lhs is a date; its properties are copied for the new date. if lhs.partial then -- Adding to a partial is not supported. -- Can subtract a date or partial from a partial, but this is not called for that. return end local function is_prefix(text, word, minlen) local n = #text return (minlen or 1) <= n and n <= #word and text == word:sub(1, n) end local function do_days(n) local forcetime, jd if floor(n) == n then jd = lhs.jd else forcetime = not lhs.hastime jd = lhs.jdz end jd = jd + (is_sub and -n or n) if forcetime then jd = tostring(jd) if not jd:find('.', 1, true) then jd = jd .. '.0' end end return Date(lhs, 'juliandate', jd) end if type(rhs) == 'number' then -- Add/subtract days, including fractional days. return do_days(rhs) end if type(rhs) == 'string' then -- rhs is a single component like '26m' or '26 months' (with optional sign). -- Fractions like '3.25d' are accepted for the units which are handled as days. local sign, numstr, id = rhs:match('^%s*([+-]?)([%d%.]+)%s*(%a+)$') if sign then if sign == '-' then is_sub = not (is_sub and true or false) end local y, m, days local num = tonumber(numstr) if not num then return end id = id:lower() if is_prefix(id, 'years') then y = num m = 0 elseif is_prefix(id, 'months') then y = floor(num / 12) m = num % 12 elseif is_prefix(id, 'weeks') then days = num * 7 elseif is_prefix(id, 'days') then days = num elseif is_prefix(id, 'hours') then days = num / 24 elseif is_prefix(id, 'minutes', 3) then days = num / (24 * 60) elseif is_prefix(id, 'seconds') then days = num / (24 * 3600) else return end if days then return do_days(days) end if numstr:find('.', 1, true) then return end if is_sub then y = -y m = -m end assert(-11 <= m and m <= 11) y = lhs.year + y m = lhs.month + m if m > 12 then y = y + 1 m = m - 12 elseif m < 1 then y = y - 1 m = m + 12 end local d = math.min(lhs.day, days_in_month(y, m, lhs.calendar)) return Date(lhs, y, m, d) end end if is_diff(rhs) then local days = rhs.age_days if (is_sub or false) ~= (rhs.isnegative or false) then days = -days end return lhs + days end end local full_date_only = { dayabbr = true, dayname = true, dow = true, dayofweek = true, dowiso = true, dayofweekiso = true, dayofyear = true, gsd = true, juliandate = true, jd = true, jdz = true, jdnoon = true, } -- Metatable for a date's calculated fields. local datemt = { __index = function (self, key) if rawget(self, 'partial') then if full_date_only[key] then return end if key == 'monthabbr' or key == 'monthdays' or key == 'monthname' then if not self.month then return end end end local value if key == 'dayabbr' then value = day_info[self.dow][1] elseif key == 'dayname' then value = day_info[self.dow][2] elseif key == 'dow' then value = (self.jdnoon + 1) % 7 -- day-of-week 0=Sun to 6=Sat elseif key == 'dayofweek' then value = self.dow elseif key == 'dowiso' then value = (self.jdnoon % 7) + 1 -- ISO day-of-week 1=Mon to 7=Sun elseif key == 'dayofweekiso' then value = self.dowiso elseif key == 'dayofyear' then local first = Date(self.year, 1, 1, self.calendar).jdnoon value = self.jdnoon - first + 1 -- day-of-year 1 to 366 elseif key == 'era' then -- Era text (never a negative sign) from year and options. value = get_era_for_year(self.options.era, self.year) elseif key == 'format' then value = self.options.format or 'dmy' elseif key == 'gsd' then -- GSD = 1 from 00:00:00 to 23:59:59 on 1 January 1 AD Gregorian calendar, -- which is from jd 1721425.5 to 1721426.49999. value = floor(self.jd - 1721424.5) elseif key == 'juliandate' or key == 'jd' or key == 'jdz' then local jd, jdz = julian_date(self) rawset(self, 'juliandate', jd) rawset(self, 'jd', jd) rawset(self, 'jdz', jdz) return key == 'jdz' and jdz or jd elseif key == 'jdnoon' then -- Julian date at noon (an integer) on the calendar day when jd occurs. value = floor(self.jd + 0.5) elseif key == 'isleapyear' then value = is_leap_year(self.year, self.calendar) elseif key == 'monthabbr' then value = month_info[self.month][1] elseif key == 'monthdays' then value = days_in_month(self.year, self.month, self.calendar) elseif key == 'monthname' then value = month_info[self.month][2] end if value ~= nil then rawset(self, key, value) return value end end, } -- Date operators. local function mt_date_add(lhs, rhs) if not is_date(lhs) then lhs, rhs = rhs, lhs -- put date on left (it must be a date for this to have been called) end return date_add_sub(lhs, rhs) end local function mt_date_sub(lhs, rhs) if is_date(lhs) then if is_date(rhs) then return DateDiff(lhs, rhs) end return date_add_sub(lhs, rhs, true) end end local function mt_date_concat(lhs, rhs) return tostring(lhs) .. tostring(rhs) end local function mt_date_tostring(self) return self:text() end local function mt_date_eq(lhs, rhs) -- Return true if dates identify same date/time where, for example, -- Date(-4712, 1, 1, 'Julian') == Date(-4713, 11, 24, 'Gregorian') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. -- The months may both be nil, but must be the same. return lhs.year == rhs.year and lhs.month == rhs.month and lhs.calendar == rhs.calendar end return lhs.jdz == rhs.jdz end local function mt_date_lt(lhs, rhs) -- Return true if lhs < rhs, for example, -- Date('1 Jan 2016') < Date('06:00 1 Jan 2016') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. if lhs.calendar ~= rhs.calendar then return lhs.calendar == 'Julian' end if lhs.partial then lhs = lhs.partial.first end if rhs.partial then rhs = rhs.partial.first end end return lhs.jdz < rhs.jdz end --[[ Examples of syntax to construct a date: Date(y, m, d, 'julian') default calendar is 'gregorian' Date(y, m, d, H, M, S, 'julian') Date('juliandate', jd, 'julian') if jd contains "." text output includes H:M:S Date('currentdate') Date('currentdatetime') Date('1 April 1995', 'julian') parse date from text Date('1 April 1995 AD', 'julian') using an era sets a flag to do the same for output Date('04:30:59 1 April 1995', 'julian') Date(date) copy of an existing date Date(date, t) same, updated with y,m,d,H,M,S fields from table t Date(t) date with y,m,d,H,M,S fields from table t ]] function Date(...) -- for forward declaration above -- Return a table holding a date assuming a uniform calendar always applies -- (proleptic Gregorian calendar or proleptic Julian calendar), or -- return nothing if date is invalid. -- A partial date has a valid year, however its month may be nil, and -- its day and time fields are nil. -- Field partial is set to false (if a full date) or a table (if a partial date). local calendars = { julian = 'Julian', gregorian = 'Gregorian' } local newdate = { _id = uniq, calendar = 'Gregorian', -- default is Gregorian calendar hastime = false, -- true if input sets a time hour = 0, -- always set hour/minute/second so don't have to handle nil minute = 0, second = 0, options = {}, list = _date_list, subtract = function (self, rhs, options) return DateDiff(self, rhs, options) end, text = _date_text, } local argtype, datetext, is_copy, jd_number, tnums local numindex = 0 local numfields = { 'year', 'month', 'day', 'hour', 'minute', 'second' } local numbers = {} for _, v in ipairs({...}) do v = strip_to_nil(v) local vlower = type(v) == 'string' and v:lower() or nil if v == nil then -- Ignore empty arguments after stripping so modules can directly pass template parameters. elseif calendars[vlower] then newdate.calendar = calendars[vlower] elseif vlower == 'partial' then newdate.partial = true elseif vlower == 'fix' then newdate.want_fix = true elseif is_date(v) then -- Copy existing date (items can be overridden by other arguments). if is_copy or tnums then return end is_copy = true newdate.calendar = v.calendar newdate.partial = v.partial newdate.hastime = v.hastime newdate.options = v.options newdate.year = v.year newdate.month = v.month newdate.day = v.day newdate.hour = v.hour newdate.minute = v.minute newdate.second = v.second elseif type(v) == 'table' then if tnums then return end tnums = {} local tfields = { year=1, month=1, day=1, hour=2, minute=2, second=2 } for tk, tv in pairs(v) do if tfields[tk] then tnums[tk] = tonumber(tv) end if tfields[tk] == 2 then newdate.hastime = true end end else local num = tonumber(v) if not num and argtype == 'setdate' and numindex == 1 then num = month_number(v) end if num then if not argtype then argtype = 'setdate' end if argtype == 'setdate' and numindex < 6 then numindex = numindex + 1 numbers[numfields[numindex]] = num elseif argtype == 'juliandate' and not jd_number then jd_number = num if type(v) == 'string' then if v:find('.', 1, true) then newdate.hastime = true end elseif num ~= floor(num) then -- The given value was a number. The time will be used -- if the fractional part is nonzero. newdate.hastime = true end else return end elseif argtype then return elseif type(v) == 'string' then if v == 'currentdate' or v == 'currentdatetime' or v == 'juliandate' then argtype = v else argtype = 'datetext' datetext = v end else return end end end if argtype == 'datetext' then if tnums or not set_date_from_numbers(newdate, extract_date(newdate, datetext)) then return end elseif argtype == 'juliandate' then newdate.partial = nil newdate.jd = jd_number if not set_date_from_jd(newdate) then return end elseif argtype == 'currentdate' or argtype == 'currentdatetime' then newdate.partial = nil newdate.year = current.year newdate.month = current.month newdate.day = current.day if argtype == 'currentdatetime' then newdate.hour = current.hour newdate.minute = current.minute newdate.second = current.second newdate.hastime = true end newdate.calendar = 'Gregorian' -- ignore any given calendar name elseif argtype == 'setdate' then if tnums or not set_date_from_numbers(newdate, numbers) then return end elseif not (is_copy or tnums) then return end if tnums then newdate.jd = nil -- force recalculation in case jd was set before changes from tnums if not set_date_from_numbers(newdate, tnums) then return end end if newdate.partial then local year = newdate.year local month = newdate.month local first = Date(year, month or 1, 1, newdate.calendar) month = month or 12 local last = Date(year, month, days_in_month(year, month), newdate.calendar) newdate.partial = { first = first, last = last } else newdate.partial = false -- avoid index lookup end setmetatable(newdate, datemt) local readonly = {} local mt = { __index = newdate, __newindex = function(t, k, v) error('date.' .. tostring(k) .. ' is read-only', 2) end, __add = mt_date_add, __sub = mt_date_sub, __concat = mt_date_concat, __tostring = mt_date_tostring, __eq = mt_date_eq, __lt = mt_date_lt, } return setmetatable(readonly, mt) end local function _diff_age(diff, code, options) -- Return a tuple of integer values from diff as specified by code, except that -- each integer may be a list of two integers for a diff with a partial date, or -- return nil if the code is not supported. -- If want round, the least significant unit is rounded to nearest whole unit. -- For a duration, an extra day is added. local wantround, wantduration, wantrange if type(options) == 'table' then wantround = options.round wantduration = options.duration wantrange = options.range else wantround = options end if not is_diff(diff) then local f = wantduration and 'duration' or 'age' error(f .. ': need a date difference (use "diff:' .. f .. '()" with a colon)', 2) end if diff.partial then -- Ignore wantround, wantduration. local function choose(v) if type(v) == 'table' then if not wantrange or v[1] == v[2] then -- Example: Date('partial', 2005) - Date('partial', 2001) gives -- diff.years = { 3, 4 } to show the range of possible results. -- If do not want a range, choose the second value as more expected. return v[2] end end return v end if code == 'ym' or code == 'ymd' then if not wantrange and diff.iszero then -- This avoids an unexpected result such as -- Date('partial', 2001) - Date('partial', 2001) -- giving diff = { years = 0, months = { 0, 11 } } -- which would be reported as 0 years and 11 months. return 0, 0 end return choose(diff.partial.years), choose(diff.partial.months) end if code == 'y' then return choose(diff.partial.years) end if code == 'm' or code == 'w' or code == 'd' then return choose({ diff.partial.mindiff:age(code), diff.partial.maxdiff:age(code) }) end return nil end local extra_days = wantduration and 1 or 0 if code == 'wd' or code == 'w' or code == 'd' then local offset = wantround and 0.5 or 0 local days = diff.age_days + extra_days if code == 'wd' or code == 'd' then days = floor(days + offset) if code == 'd' then return days end return floor(days/7), days % 7 end return floor(days/7 + offset) end local H, M, S = diff.hours, diff.minutes, diff.seconds if code == 'dh' or code == 'dhm' or code == 'dhms' or code == 'h' or code == 'hm' or code == 'hms' or code == 'M' or code == 's' then local days = floor(diff.age_days + extra_days) local inc_hour if wantround then if code == 'dh' or code == 'h' then if M >= 30 then inc_hour = true end elseif code == 'dhm' or code == 'hm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'M' then if S >= 30 then M = M + 1 end else -- Nothing needed because S is an integer. end if inc_hour then H = H + 1 if H >= 24 then H = 0 days = days + 1 end end end if code == 'dh' or code == 'dhm' or code == 'dhms' then if code == 'dh' then return days, H elseif code == 'dhm' then return days, H, M else return days, H, M, S end end local hours = days * 24 + H if code == 'h' then return hours elseif code == 'hm' then return hours, M elseif code == 'M' or code == 's' then M = hours * 60 + M if code == 'M' then return M end return M * 60 + S end return hours, M, S end if wantround then local inc_hour if code == 'ymdh' or code == 'ymwdh' then if M >= 30 then inc_hour = true end elseif code == 'ymdhm' or code == 'ymwdhm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'ymd' or code == 'ymwd' or code == 'yd' or code == 'md' then if H >= 12 then extra_days = extra_days + 1 end end if inc_hour then H = H + 1 if H >= 24 then H = 0 extra_days = extra_days + 1 end end end local y, m, d = diff.years, diff.months, diff.days if extra_days > 0 then d = d + extra_days if d > 28 or code == 'yd' then -- Recalculate in case have passed a month. diff = diff.date1 + extra_days - diff.date2 y, m, d = diff.years, diff.months, diff.days end end if code == 'ymd' then return y, m, d elseif code == 'yd' then if y > 0 then -- It is known that diff.date1 > diff.date2. diff = diff.date1 - (diff.date2 + (y .. 'y')) end return y, floor(diff.age_days) elseif code == 'md' then return y * 12 + m, d elseif code == 'ym' or code == 'm' then if wantround then if d >= 16 then m = m + 1 if m >= 12 then m = 0 y = y + 1 end end end if code == 'ym' then return y, m end return y * 12 + m elseif code == 'ymw' then local weeks = floor(d/7) if wantround then local days = d % 7 if days > 3 or (days == 3 and H >= 12) then weeks = weeks + 1 end end return y, m, weeks elseif code == 'ymwd' then return y, m, floor(d/7), d % 7 elseif code == 'ymdh' then return y, m, d, H elseif code == 'ymwdh' then return y, m, floor(d/7), d % 7, H elseif code == 'ymdhm' then return y, m, d, H, M elseif code == 'ymwdhm' then return y, m, floor(d/7), d % 7, H, M end if code == 'y' then if wantround and m >= 6 then y = y + 1 end return y end return nil end local function _diff_duration(diff, code, options) if type(options) ~= 'table' then options = { round = options } end options.duration = true return _diff_age(diff, code, options) end -- Metatable for some operations on date differences. diffmt = { -- for forward declaration above __concat = function (lhs, rhs) return tostring(lhs) .. tostring(rhs) end, __tostring = function (self) return tostring(self.age_days) end, __index = function (self, key) local value if key == 'age_days' then if rawget(self, 'partial') then local function jdz(date) return (date.partial and date.partial.first or date).jdz end value = jdz(self.date1) - jdz(self.date2) else value = self.date1.jdz - self.date2.jdz end end if value ~= nil then rawset(self, key, value) return value end end, } function DateDiff(date1, date2, options) -- for forward declaration above -- Return a table with the difference between two dates (date1 - date2). -- The difference is negative if date1 is older than date2. -- Return nothing if invalid. -- If d = date1 - date2 then -- date1 = date2 + d -- If date1 >= date2 and the dates have no H:M:S time specified then -- date1 = date2 + (d.years..'y') + (d.months..'m') + d.days -- where the larger time units are added first. -- The result of Date(2015,1,x) + '1m' is Date(2015,2,28) for -- x = 28, 29, 30, 31. That means, for example, -- d = Date(2015,3,3) - Date(2015,1,31) -- gives d.years, d.months, d.days = 0, 1, 3 (excluding date1). if not (is_date(date1) and is_date(date2) and date1.calendar == date2.calendar) then return end local wantfill if type(options) == 'table' then wantfill = options.fill end local isnegative = false local iszero = false if date1 < date2 then isnegative = true date1, date2 = date2, date1 elseif date1 == date2 then iszero = true end -- It is known that date1 >= date2 (period is from date2 to date1). if date1.partial or date2.partial then -- Two partial dates might have timelines: ---------------------A=================B--- date1 is from A to B inclusive --------C=======D-------------------------- date2 is from C to D inclusive -- date1 > date2 iff A > C (date1.partial.first > date2.partial.first) -- The periods can overlap ('April 2001' - '2001'): -------------A===B------------------------- A=2001-04-01 B=2001-04-30 --------C=====================D------------ C=2001-01-01 D=2001-12-31 if wantfill then date1, date2 = autofill(date1, date2) else local function zdiff(date1, date2) local diff = date1 - date2 if diff.isnegative then return date1 - date1 -- a valid diff in case we call its methods end return diff end local function getdate(date, which) return date.partial and date.partial[which] or date end local maxdiff = zdiff(getdate(date1, 'last'), getdate(date2, 'first')) local mindiff = zdiff(getdate(date1, 'first'), getdate(date2, 'last')) local years, months if maxdiff.years == mindiff.years then years = maxdiff.years if maxdiff.months == mindiff.months then months = maxdiff.months else months = { mindiff.months, maxdiff.months } end else years = { mindiff.years, maxdiff.years } end return setmetatable({ date1 = date1, date2 = date2, partial = { years = years, months = months, maxdiff = maxdiff, mindiff = mindiff, }, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end end local y1, m1 = date1.year, date1.month local y2, m2 = date2.year, date2.month local years = y1 - y2 local months = m1 - m2 local d1 = date1.day + hms(date1) local d2 = date2.day + hms(date2) local days, time if d1 >= d2 then days = d1 - d2 else months = months - 1 -- Get days in previous month (before the "to" date) given December has 31 days. local dpm = m1 > 1 and days_in_month(y1, m1 - 1, date1.calendar) or 31 if d2 >= dpm then days = d1 - hms(date2) else days = dpm - d2 + d1 end end if months < 0 then years = years - 1 months = months + 12 end days, time = math.modf(days) local H, M, S = h_m_s(time) return setmetatable({ date1 = date1, date2 = date2, partial = false, -- avoid index lookup years = years, months = months, days = days, hours = H, minutes = M, seconds = S, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end return { _current = current, _Date = Date, _days_in_month = days_in_month, } a1l7tp0agk4yzx1gs67i2d5sgurzcxd Modul:Delink 828 293 866 865 2024-08-09T09:21:33Z Jon Harald Søby 58 1 semakan diimportkan 865 Scribunto text/plain -- This module de-links most wikitext. require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per [[Bantuan:Pipe trick]]. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:match("%[%[.-:(.*)|%]%]") -- If there are no colons, grab all of the text apart from the square brackets and the pipe. else s = s:match("%[%[(.*)|%]%]") end -- Next up, brackets and commas. if s:match("%(.-%)$") then -- Brackets trump commas. s = s:match("(.-) ?%(.-%)$") elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. s = s:match("(.-),.*$") end return s end -- Return wikilink target |wikilinks=target local function getDelinkedTarget(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end return target_area end local function getDelinkedLabel(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end -- Check for categories, interwikis, and files. local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon. local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace if mw.language.isKnownLanguageTag(colon_prefix) or (ns and (ns.canonicalName == "File" or ns.canonicalName == "Category")) then return "" end -- Remove the colon if the link is using the [[Bantuan:Colon trick]]. if result:match("%[%[:") then result = "[[" .. result:match("%[%[:(.*%]%])") end -- Deal with links using the [[Bantuan:Pipe trick]]. if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then return delinkPipeTrick(result) end -- Find the display area of the wikilink if result:match("|") then -- Find if we're dealing with a piped link. result = result:match("^%[%[.-|(.+)%]%]") -- Remove new lines from the display of multiline piped links, -- where the pipe is before the first new line. result = result:gsub("\n", "") else result = result:match("^%[%[(.-)%]%]") end return result end local function delinkURL(s) -- Assume we have already delinked internal wikilinks, and that -- we have been passed some text between two square brackets [foo]. -- If the text contains a line break it is not formatted as a URL, regardless of other content. if s:match("\n") then return s end -- Check if the text has a valid URL prefix and at least one valid URL character. local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"} local url_prefix for _ ,v in ipairs(valid_url_prefixes) do if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then url_prefix = v break end end -- Get display text if not url_prefix then return s end s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket. s = s:match('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ). s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded, "%c") then return s end return s_decoded end local function delinkLinkClass(text, pattern, delinkFunction) if type(text) ~= "string" then error("Attempt to de-link non-string input.", 2) end if type(pattern) ~= "string" or mw.ustring.sub(pattern, 1, 1) ~= "^" then error('Invalid pattern detected. Patterns must begin with "^".', 2) end -- Iterate over the text string, and replace any matched text. using the -- delink function. We need to iterate character by character rather -- than just use gsub, otherwise nested links aren't detected properly. local result = "" while text ~= "" do -- Replace text using one iteration of gsub. text = mw.ustring.gsub(text, pattern, delinkFunction, 1) -- Append the left-most character to the result string. result = result .. mw.ustring.sub(text, 1, 1) text = mw.ustring.sub(text, 2, -1) end return result end function p._delink(args) local text = args[1] or "" if args.refs == "yes" then -- Remove any [[Bantuan:Strip markers]] representing ref tags. In most situations -- this is not a good idea - only use it if you know what you are doing! text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "") end if args.comments ~= "no" then text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments. end if args.wikilinks ~= "no" and args.wikilinks ~= "target" then -- De-link wikilinks and return the label portion of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel) elseif args.wikilinks == "target" then -- De-link wikilinks and return the target portions of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget) end if args.urls ~= "no" then text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs. end if args.whitespace ~= "no" then -- Replace single new lines with a single space, but leave double new lines -- and new lines only containing spaces or tabs before a second new line. text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2") text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces. end return text end function p.delink(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._delink(getArgs(frame, {wrappers = 'Template:Delink'})) end return p c1u7jpi6o43f9bmprjiqw7kfm0whb0y Modul:Detect singular 828 294 868 867 2024-08-09T09:21:33Z Jon Harald Søby 58 1 semakan diimportkan 867 Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') local getPlain = require('Module:Text').Text().getPlain -- function to determine whether "sub" occurs in "s" local function plainFind(s, sub) return mw.ustring.find(s, sub, 1, true) end -- function to count the number of times "pattern" (a regex) occurs in "s" local function countMatches(s, pattern) local _, count = mw.ustring.gsub(s, pattern, '') return count end local singular = 1 local likelyPlural = 2 local plural = 3 -- Determine whether a string is singular or plural (i.e., it represents one -- item or many) -- Arguments: -- origArgs[1]: string to process -- origArgs.no_comma: if false, use commas to detect plural (default false) -- origArgs.parse_links: if false, treat wikilinks as opaque singular objects (default false) -- Returns: -- singular, likelyPlural, or plural (see constants above), or nil for completely unknown function p._main(origArgs) origArgs = type(origArgs) == 'table' and origArgs or {} local args = {} -- canonicalize boolean arguments for key, default in pairs({no_comma=false,parse_links=false,any_comma=false,no_and=false}) do if origArgs[key] == nil then args[key] = default else args[key] = yesNo(origArgs[key],default) end end local checkComma = not args.no_comma local checkAnd = not args.no_and local rewriteLinks = not args.parse_links local anyComma = args.any_comma local s = origArgs[1] -- the input string if not s then return nil -- empty input returns nil end s = tostring(s) s = mw.text.decode(s,true) --- replace HTML entities (to avoid spurious semicolons) if plainFind(s,'data-plural="0"') then -- magic data string to return true return singular end if plainFind(s,'data-plural="1"') then -- magic data string to return false return plural end -- count number of list items local numListItems = countMatches(s,'<%s*li') -- if exactly one, then singular, if more than one, then plural if numListItems == 1 then return singular end if numListItems > 1 then return plural end -- if "list of" occurs inside of wlink, then it's plural if mw.ustring.find(s:lower(), '%[%[[^%]]*list of[^%]]+%]%]') then return plural end -- fix for trailing br tags passed through [[Templat:marriage]] s = mw.ustring.gsub(s, '<%s*br[^>]*>%s*(</div>)', '%1') -- replace all wikilinks with fixed string if rewriteLinks then s = mw.ustring.gsub(s,'%b[]','WIKILINK') end -- Five conditions: any one of them can make the string a likely plural or plural local hasBreak = mw.ustring.find(s,'<%s*br') -- For the last 4, evaluate on string stripped of wikimarkup s = getPlain(s) local hasBullets = countMatches(s,'%*+') > 1 local multipleQids = mw.ustring.find(s,'Q%d+[%p%s]+Q%d+') -- has multiple QIDs in a row if hasBullets or multipleQids then return plural end local commaPattern = anyComma and '[,;]' or '%D[,;]%D' -- semi-colon similar to comma local hasComma = checkComma and mw.ustring.find(s, commaPattern) local hasAnd = checkAnd and mw.ustring.find(s,'[,%s]and%s') if hasBreak or hasComma or hasAnd then return likelyPlural end return singular end function p._pluralize(args) args = type(args) == 'table' and args or {} local singularForm = args[3] or args.singular or "" local pluralForm = args[4] or args.plural or "" local likelyForm = args.likely or pluralForm local link = args[5] or args.link if link then link = tostring(link) singularForm = '[['..link..'|'..singularForm..']]' pluralForm = '[['..link..'|'..pluralForm..']]' likelyForm = '[['..link..'|'..likelyForm..']]' end if args[2] then return pluralForm end local detect = p._main(args) if detect == nil then return "" -- return blank on complete failure end if detect == singular then return singularForm elseif detect == likelyPlural then return likelyForm else return pluralForm end end function p.main(frame) local args = getArgs(frame) -- For template, return 1 if singular, blank if plural or empty local result = p._main(args) if result == nil then return 1 end return result == singular and 1 or "" end function p.pluralize(frame) local args = getArgs(frame) return p._pluralize(args) end return p pkkemcuj8e822h0b8i1a8znu1rut3gb Modul:Disambiguation 828 295 870 869 2024-08-09T09:21:33Z Jon Harald Søby 58 1 semakan diimportkan 869 Scribunto text/plain local p = {} local mRedirect = require('Module:Redirect') local disambigTemplates = { "[Dd][Aa][Bb]", "[Dd]big", "[Dd]is", "[Dd]isambiguation", "[%w_%s]-%f[%w][Dd]isam[%w]-", "[Gg]eodis", "[Hh][Nn][Dd][Ii][Ss]", "[Hh]ndisambig", "[Ll]etter%-[Nn]umber [Cc]ombination [Dd]isambiguation", "[Ll]etter%-NumberCombDisambig", "[Mm]il%-unit%-dis", "[Nn]umberdis", "[Ss]choold[ai][bs]", "[Mm]il-unit-disambig", "[Mm]ilitary unit disambiguation", "[Gg]eo-dis", "[Gg]eodisambig", "[Dd]isambig[Gg]eo", "[Dd]isambig[GN]", "[Dd]isambigNm", "[Dd]isambigName", "[Ss]urnames?", "[Ss]pecies Latin name disambiguation", "[Ss]peciesLatinNameDisambig", "[Ll]atinNameDisambig", "[Mm]athematical disambiguation", "[Mm]athematics disambiguation", "[Mm]ath ?dab", "[Rr]oad disambiguation", "[Rr]oaddis", } p.isDisambiguation = function(content) -- false if there is no content if content == nil then return false end -- redirects are not disambiguation pages if mRedirect.getTargetFromText(content) ~= nil then return false end -- check for disambiguation templates in the content local templateNames = {} for name in string.gmatch(content, "{{%s*([^|}]-)%s*[|}]") do templateNames[name] = true end for _i, v in ipairs(disambigTemplates) do for template, _ in pairs(templateNames) do if string.match(template, "^"..v.."$") then return true end end end -- check for magic word if string.find(content, "__DISAMBIG__", 1, true) ~= nil then return true end return false end p._isDisambiguationPage = function(page) -- Look "(disambiguation)" in the title if string.find(page, "(disambiguation)",0,true) ~= nil then return true; end -- Look for disamiguation template in page content local title = mw.title.new(page) if not title then return false end local content = title:getContent() return p.isDisambiguation(content) end -- Entry points for templates p.isDisambiguationPage = function(frame) local title = frame.args[1] return p._isDisambiguationPage(title) and "yes" or "" end return p 1c7zr1lqel7bcujuga98za3odl6jitt Modul:Documentation 828 296 875 874 2024-08-09T09:21:34Z Jon Harald Søby 58 4 semakan diimportkan 874 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Khas:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Fail:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Templat:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Templat:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[Fail:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Templat:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Bantuan:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 55k3vq7y40w9ykdxcowdd56tjsshnck Modul:Documentation/config 828 297 879 878 2024-08-09T09:21:35Z Jon Harald Søby 58 3 semakan diimportkan 877 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Modul:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[Fail:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[Fail:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['file-docpage-preload'] -- Preload file for documentation page in the file namespace. cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- Print version configuration ---------------------------------------------------------------------------------------------------- -- cfg['print-subpage'] -- The name of the template subpage used for print versions. cfg['print-subpage'] = 'Print' -- cfg['print-link-display'] -- The text to display when linking to the /Print subpage. cfg['print-link-display'] = '/Print' -- cfg['print-blurb'] -- Text to display if a /Print subpage exists. $1 is a link to the subpage with -- a display value of cfg['print-link-display']. cfg['print-blurb'] = 'A [[Bantuan:Books/for experts#Improving the book layout|print version]] of this template exists at $1.' .. ' If you make a change to this template, please update the print version as well.' -- cfg['display-print-category'] -- Set to true to enable output of cfg['print-category'] if a /Print subpage exists. -- This should be a boolean value (either true or false). cfg['display-print-category'] = true -- cfg['print-category'] -- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists. cfg['print-category'] = 'Templates with print versions' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[|| ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 6ht253wwddt8sgqogayimav18ekmhjl Modul:Documentation/styles.css 828 298 881 880 2024-08-09T09:21:35Z Jon Harald Søby 58 1 semakan diimportkan 880 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } o2ia525en7wbq32mq4fpdevtl5d6pcb Modul:Effective protection expiry 828 299 883 882 2024-08-09T09:21:35Z Jon Harald Søby 58 1 semakan diimportkan 882 Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p i1wms02y1w048cq6uttka18a5pjzp63 Modul:Effective protection level 828 300 885 884 2024-08-09T09:21:35Z Jon Harald Søby 58 1 semakan diimportkan 884 Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p d3lhy0comfcfe9lnnj8klmrfqm1oxw7 Modul:Endangered Languages Project 828 301 887 886 2024-08-09T09:21:35Z Jon Harald Søby 58 1 semakan diimportkan 886 Scribunto text/plain --[[ Module:Endangered Languages Project --]] local p = {} local elpf = "http://www.endangeredlanguages.com/lang/" -- or get P1630 local make_display = function(elpc, elpn) return "[" .. elpf .. elpc .. " " .. elpn .. "]" end local tidy_param = function(param) if param == "" then param = nil end return param end p.make_entry = function(frame) local elpname = tidy_param(frame.args.elpname) local elpcode = tidy_param(frame.args.elpcode) local qid = tidy_param((frame.args.qid or ""):upper()) or mw.wikibase.getEntityIdForCurrentPage() local out = {} if elpcode and elpname then out[#out+1] = make_display(elpcode, elpname) else if qid then local props = mw.wikibase.getBestStatements(qid, "P2192") if props[1] then for i, v in ipairs(props) do local elpc = elpcode or v.mainsnak.datavalue and v.mainsnak.datavalue.value local elpn = elpname or v.qualifiers["P1810"][1].datavalue and v.qualifiers["P1810"][1].datavalue.value if elpc and elpn then out[#out+1] = make_display(elpc, elpn) end end elseif elpcode or elpname then return (elpcode or "") .. (elpname or "") .. "[[Kategori:Language articles with missing ELP parameters]]" end else if elpcode or elpname then return (elpcode or "") .. (elpname or "") .. "[[Kategori:Language articles with missing ELP parameters]]" end end end local ret = "" if #out > 1 then ret = frame:expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end return p m2211cwd4ij9kgoj8zzwclbmdiswwjm Modul:Exponential search 828 302 890 889 2024-08-09T09:21:36Z Jon Harald Søby 58 2 semakan diimportkan 889 Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end jqqi8l27tb73lglksbukg2g3bzt3fmv Modul:File link 828 303 892 891 2024-08-09T09:21:36Z Jon Harald Søby 58 1 semakan diimportkan 891 Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Templat:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[Fail:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 218swmwo7522kjdbq6tru5qfoj9di13 Modul:GetParameters 828 304 894 893 2024-08-09T09:21:36Z Jon Harald Søby 58 1 semakan diimportkan 893 Scribunto text/plain local p = {} --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function p.getParameters( frame_args, arg_list ) local new_args = {}; local index = 1; local value; for i,arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index]; index = index + 1; end new_args[arg] = value; end return new_args; end --[[ Helper Function to interpret boolean strings ]] function p.getBoolean( boolean_str ) local boolean_value; if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower(); if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false; else boolean_value = true; end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str; else error( 'No boolean value found' ); end return boolean_value end function p.defined(frame) local arg = mw.text.trim(frame.args[1]) --if arg == tostring(tonumber(arg)) then -- undesired result for '-0' -- arg = tonumber(arg) --end --if mw.ustring.find(arg, '^%s*-?[1-9][0-9]*%s*$') ~= nil or arg == '0' then -- arg = tonumber(arg) --end if mw.ustring.find(arg, '^-?[1-9][0-9]*$') ~= nil then arg = tonumber(arg) elseif arg == '0' then arg = 0 end return frame:getParent().args[arg] ~= nil end return p 03tz719zcckyx3el16h6xmmjd2dn09v Modul:ISO 3166 828 305 896 895 2024-08-09T09:21:36Z Jon Harald Søby 58 1 semakan diimportkan 895 Scribunto text/plain -- to enable us to replicate the current functioning of Country extract, we need to deal with: -- 2 {{<name>}} DONE! -- 3 [[<name>]] DONE! -- 4 [[<name>|<junk>]] DONE! -- 5 [[Fail:flag of <country>.[svg|gif|png|jpg]|\d+px]] DONE! local p = {} local getArgs = require("Module:Arguments").getArgs local data = mw.loadData("Module:ISO 3166/data/National") --[[----------F I N D N A M E----------]]-- -- Finds the name in the database local function findname(code,cdata,qry) local sqry = p.strip(qry) if cdata["name"] and sqry==p.strip(cdata["name"]) or cdata["isoname"] and sqry==p.strip(cdata["isoname"]) or not cdata["nocode"] and sqry==code or sqry==cdata["alpha3"] or sqry==cdata["numeric"] then return true end for _,tname in pairs(cdata["isonames"] or {}) do if sqry==p.strip(tname) then return true end end for _,tname in pairs(cdata["altnames"] or {}) do if sqry==p.strip(tname) then return true end end return false end --[[----------I S O N A M E----------]]-- -- Find the ISO name of a country/region local function isoname(data,code,lang) if data[code]["isonames"] then local name = data[code]["isodisplaynames"] and data[code]["isodisplaynames"][lang] or data[code]["isonames"][lang] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isonames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"]["en"] or data[code]["isonames"]["en"] if name then return name end for _,iname in pairs(data[code]["isonames"]) do return iname end return data[code]["isodisplayname"] or data[code]["isoname"] else return data[code]["isodisplayname"] or data[code]["isoname"] end end --[[----------S T R I P----------]]-- -- Removes junk from the input function p.strip(text) local accents = {["À"]="A",["Á"]="A",["Â"]="A",["Ã"]="A", -- accent list ["Ä"]="A",["Å"]="A",["Ç"]="C",["È"]="E",["É"]="E", ["Ê"]="E",["Ë"]="E",["Ì"]="I",["Í"]="I",["Î"]="I", ["Ï"]="I",["Ñ"]="N",["Ò"]="O",["Ó"]="O",["Ô"]="O", ["Õ"]="O",["Ö"]="O",["Ø"]="O",["Ù"]="U",["Ú"]="U", ["Û"]="U",["Ü"]="U",["Ý"]="Y" } local remove = {"NATION OF","COUNTRY OF","TERRITORY OF", -- text to be removed list "FLAG OF","FLAG","KINGDOM OF","STATE OF"," STATE ", "PROVINCE OF","PROVINCE","TERRITORY" } local patterns = {[".+:"]="",["|.+"]="",["%(.-%)"]="", -- patterns to follow (order may matter) ["%..*"]="",["^THE "]="",["%_"]=" ",["%-"]=" ", ["%d%d?%d?PX"]="", } text = mw.ustring.upper(text) -- Case insensitivity text = mw.ustring.gsub(text,"[À-Ý]",accents) -- Deaccent for pattern,value in pairs(patterns) do -- Follow patterns text = mw.ustring.gsub(text,pattern,value) end for _,words in pairs(remove) do -- Remove unneeded words text = mw.ustring.gsub(text,words,"") end text = mw.ustring.gsub(text,"%W","") -- Remove non alpha-numeric return text end --[[----------P . C A L L S T R I P ---------]]-- -- Calls P.strip but using Module:Arguments function p.callstrip(frame) local args = getArgs(frame) return p.strip(args[1]) or "" end --[[----------P . L U A C O D E---------]]-- -- Makes the ISO code of a country function p.luacode(args) if string.find(args[1] or '',"%-") then args[1], args[2] = string.match(args[1] or '',"^([^%-]*)%-(.*)$") end if args[1] then args[1] = p.strip(args[1]) end if args[2] then args[2] = p.strip(args[2]) end if args["codetype"]=="3" then args["codetype"]="alpha3" end local eot = args.error or "" local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Kategori:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Kategori:Wikipedia page with obscure subdivision]]' if not args[1] then if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>' end if not args[2] then --3166-1 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if args["codetype"]=="numeric" or args["codetype"]=="alpha3" then return cdata[args["codetype"]] else return alpha2 end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry else --3166-2 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if mw.ustring.match(alpha2,"GB") then -- For England, Wales etc. alpha2 = "GB" end local sdata = mw.loadData("Module:ISO 3166/data/"..alpha2) local empty = true for scode,scdata in pairs(sdata) do if type(scdata)=="table" then empty = false if findname(scode,scdata,args[2]) then return alpha2.."-"..scode end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnosubdivision = '' end return catnosubdivision end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry end end --[[----------P . C O D E---------]]-- -- Calls P.Luacode but using Module:Arguments function p.code(frame) return p.luacode(getArgs(frame)) or "" end --[[----------P . N U M E R I C---------]]-- -- Calls P.Luacode but using Module:Arguments and setting it to output a numeric value function p.numeric(frame) local args = getArgs(frame) args["codetype"]="numeric" return p.luacode(args) or "" end --[[----------P . L U A N A M E---------]]-- -- Makes the ISO/common name of a country function p.luaname(args) local code1 = p.luacode(args) local code2 = '' if string.find(code1,"%-") then code1, code2 = string.match(code1,"^([^%-]*)%-(.*)$") end if string.find(code1,"^%u%u$") then if code2=="" then --3166-1 alpha-2 code if data[code1] then return (args.isoname or args.lang) and isoname(data,code1,args.lang) or (data[code1]["displayname"] or data[code1]["name"]) else return '[[Kategori:Wikipedia page with obscure country]]' end else --3166-2 code local sdata if data[code1] then sdata = mw.loadData("Module:ISO 3166/data/"..code1) else return '[[Kategori:Wikipedia page with obscure country]]' end if sdata[code2] then return (args.isoname or args.lang) and isoname(sdata,code2,args.lang) or (sdata[code2]["displayname"] or sdata[code2]["name"]) else return '[[Kategori:Wikipedia page with obscure country]]' end end end end --[[----------P . N A M E---------]]-- -- Calls P.Luaname but using Module:Arguments function p.name(frame) return p.luaname(getArgs(frame)) or "" end --[[----------P . G E O C O O R D I N S E R T---------]]-- -- Wrapper for Module:Coordinates.coordinsert function p.geocoordinsert(frame) -- {{#invoke:ISO 3166|geocoordinsert|{{coord|...}} -- |country=..|subdivision1=...|subdivision2=... -- |type=...|scale=...|dim=...|source=...|globe=... -- }} local args = frame.args local subdivisionqueried = false local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Kategori:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Kategori:Wikipedia page with obscure subdivision]]' or '' local tracking = '' local targs = {} targs[1] = args[1] or '' for i, v in pairs(args) do if i == 'country' and not mw.ustring.find(targs[1], 'region:') then local country = v local k, region = 1, '' -- look for a valid subdivision while region == '' and k < 3 do local subdivision = args['subdivision' .. k] or '' if subdivision ~= '' then region = p.luacode({country, subdivision, nocat = 'true'}) subdivisionqueried = true end k = k + 1 end -- subdivision lookup failed or never attempted, try country only if region == '' then region = p.luacode({country, nocat = 'true'}) if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry, catnosubdivision = '', '' end if region == '' then tracking = tracking .. catnocountry elseif subdivisionqueried == true then tracking = tracking .. catnosubdivision end end -- something worked, add it to the targs if region ~= '' then targs[#targs + 1] = 'region:' .. region end elseif i == 'type' or i == 'scale' or i == 'dim' or i == 'source' or i == 'globe' then targs[#targs + 1] = i .. ':' .. v end end -- call Module:Coordinates.coordinsert if there is something to insert if #targs > 1 then local coordinsert = require('Module:Coordinates').coordinsert return coordinsert({args = targs}) .. tracking end -- otherwise, just return the coordinates return targs[1] .. tracking end return p px7pqicz6ojo71p0ejeh1jegwq50upp Modul:ISO 3166/data/National 828 306 898 897 2024-08-09T09:21:36Z Jon Harald Søby 58 1 semakan diimportkan 897 Scribunto text/plain return { ["AD"] = {alpha3="AND",numeric="020",name="Andorra"}, ["AE"] = {alpha3="ARE",numeric="784",name="United Arab Emirates",altnames={"UAE"}}, ["AF"] = {alpha3="AFG",numeric="004",name="Afghanistan"}, ["AG"] = {alpha3="ATG",numeric="028",name="Antigua and Barbuda"}, ["AI"] = {alpha3="AIA",numeric="660",name="Anguilla"}, ["AL"] = {alpha3="ALB",numeric="008",name="Albania"}, ["AM"] = {alpha3="ARM",numeric="051",name="Armenia"}, ["AO"] = {alpha3="AGO",numeric="024",name="Angola"}, ["AQ"] = {alpha3="ATA",numeric="010",name="Antarctica"}, ["AR"] = {alpha3="ARG",numeric="032",name="Argentina"}, ["AS"] = {alpha3="ASM",numeric="016",name="American Samoa"}, ["AT"] = {alpha3="AUT",numeric="040",name="Austria"}, ["AU"] = {alpha3="AUS",numeric="036",name="Australia"}, ["AW"] = {alpha3="ABW",numeric="533",name="Aruba"}, ["AX"] = {alpha3="ALA",numeric="248",name="Åland Islands",altnames={"Aland Islands","Åland","Aland"}}, ["AZ"] = {alpha3="AZE",numeric="031",name="Azerbaijan"}, ["BA"] = {alpha3="BIH",numeric="070",name="Bosnia and Herzegovina",altnames={"Bosnia"}}, ["BB"] = {alpha3="BRB",numeric="052",name="Barbados"}, ["BD"] = {alpha3="BGD",numeric="050",name="Bangladesh"}, ["BE"] = {alpha3="BEL",numeric="056",name="Belgium"}, ["BF"] = {alpha3="BFA",numeric="854",name="Burkina Faso"}, ["BG"] = {alpha3="BGR",numeric="100",name="Bulgaria"}, ["BH"] = {alpha3="BHR",numeric="048",name="Bahrain"}, ["BI"] = {alpha3="BDI",numeric="108",name="Burundi"}, ["BJ"] = {alpha3="BEN",numeric="204",name="Benin"}, ["BL"] = {alpha3="BLM",numeric="652",name="Saint Barthélemy",altnames={"St Barthelemy"}}, ["BM"] = {alpha3="BMU",numeric="060",name="Bermuda"}, ["BN"] = {alpha3="BRN",numeric="096",name="Brunei",isoname="Brunei Darussalam"}, ["BO"] = {alpha3="BOL",numeric="068",name="Bolivia",isoname="Bolivia (Plurinational State of)"}, ["BQ"] = {alpha3="BES",numeric="535",name="Caribbean Netherlands",isoname="Bonaire, Sint Eustatius and Saba"}, ["BR"] = {alpha3="BRA",numeric="076",name="Brazil"}, ["BS"] = {alpha3="BHS",numeric="044",name="Bahamas"}, ["BT"] = {alpha3="BTN",numeric="064",name="Bhutan"}, ["BV"] = {alpha3="BVT",numeric="074",name="Bouvet Island"}, ["BW"] = {alpha3="BWA",numeric="072",name="Botswana"}, ["BY"] = {alpha3="BLR",numeric="112",name="Belarus"}, ["BZ"] = {alpha3="BLZ",numeric="084",name="Belize"}, ["CA"] = {alpha3="CAN",numeric="124",name="Canada"}, ["CC"] = {alpha3="CCK",numeric="166",name="Cocos (Keeling) Islands",altnames={"Cocos Islands","Keeling Islands"}}, ["CD"] = {alpha3="COD",numeric="180",name="Democratic Republic of the Congo",isoname="Congo, Democratic Republic of the",altnames={"Congo-Kinshasa","DRC","DR Congo"}}, ["CF"] = {alpha3="CAF",numeric="140",name="Central African Republic",altnames={"CAR"}}, ["CG"] = {alpha3="COG",numeric="178",name="Republic of the Congo",isoname="Congo",altnames={"Congo-Brazzaville"}}, ["CH"] = {alpha3="CHE",numeric="756",name="Switzerland"}, ["CI"] = {alpha3="CIV",numeric="384",name="Côte d'Ivoire",altnames={"Ivory Coast"}}, ["CK"] = {alpha3="COK",numeric="184",name="Cook Islands"}, ["CL"] = {alpha3="CHL",numeric="152",name="Chile"}, ["CM"] = {alpha3="CMR",numeric="120",name="Cameroon"}, ["CN"] = {alpha3="CHN",numeric="156",name="China",altnames={"People's Republic of China","PRC"}}, ["CO"] = {alpha3="COL",numeric="170",name="Colombia"}, ["CR"] = {alpha3="CRI",numeric="188",name="Costa Rica"}, ["CU"] = {alpha3="CUB",numeric="192",name="Cuba"}, ["CV"] = {alpha3="CPV",numeric="132",name="Cabo Verde",altnames={"Cape Verde"}}, ["CW"] = {alpha3="CUW",numeric="531",name="Curaçao",altnames={"Curacao"}}, ["CX"] = {alpha3="CXR",numeric="162",name="Christmas Island"}, ["CY"] = {alpha3="CYP",numeric="196",name="Cyprus"}, ["CZ"] = {alpha3="CZE",numeric="203",name="Czech Republic",isoname="Czechia"}, ["DE"] = {alpha3="DEU",numeric="276",name="Germany"}, ["DJ"] = {alpha3="DJI",numeric="262",name="Djibouti"}, ["DK"] = {alpha3="DNK",numeric="208",name="Denmark"}, ["DM"] = {alpha3="DMA",numeric="212",name="Dominica"}, ["DO"] = {alpha3="DOM",numeric="214",name="Dominican Republic"}, ["DZ"] = {alpha3="DZA",numeric="012",name="Algeria"}, ["EC"] = {alpha3="ECU",numeric="218",name="Ecuador"}, ["EE"] = {alpha3="EST",numeric="233",name="Estonia"}, ["EG"] = {alpha3="EGY",numeric="818",name="Egypt"}, ["EH"] = {alpha3="ESH",numeric="732",name="Western Sahara"}, ["ER"] = {alpha3="ERI",numeric="232",name="Eritrea"}, ["ES"] = {alpha3="ESP",numeric="724",name="Spain"}, ["ET"] = {alpha3="ETH",numeric="231",name="Ethiopia"}, ["FI"] = {alpha3="FIN",numeric="246",name="Finland"}, ["FJ"] = {alpha3="FJI",numeric="242",name="Fiji"}, ["FK"] = {alpha3="FLK",numeric="238",name="Falkland Islands",isoname="Falkland Islands (Malvinas)",altnames={"Falklands","Islas Malvinas","Malvinas","Malvinas Islands"}}, ["FM"] = {alpha3="FSM",numeric="583",name="Federated States of Micronesia",isoname="Micronesia (Federated States of)",altnames={"Micronesia"}}, ["FO"] = {alpha3="FRO",numeric="234",name="Faroe Islands",altnames={"Faroer","Faeroer"}}, ["FR"] = {alpha3="FRA",numeric="250",name="France"}, ["GA"] = {alpha3="GAB",numeric="266",name="Gabon"}, ["GB"] = {alpha3="GBR",numeric="826",name="United Kingdom",isoname="United Kingdom of Great Britain and Northern Ireland",altnames={"UK","Great Britain"}}, ["GB-ENG"] = {alpha3="ENG",numeric="000",name="England"}, --Considered to be a country ["GB-NIR"] = {alpha3="NIR",numeric="000",name="Northern Ireland"}, --Considered to be a country ["GB-SCT"] = {alpha3="SCT",numeric="000",name="Scotland"}, --Considered to be a country ["GB-WLS"] = {alpha3="WLS",numeric="000",name="Wales"}, --Considered to be a country ["GB-EAW"] = {alpha3="EAW",numeric="000",name="England and Wales"}, --Considered to be a country ["GD"] = {alpha3="GRD",numeric="308",name="Grenada"}, ["GE"] = {alpha3="GEO",numeric="268",name="Georgia"}, ["GF"] = {alpha3="GUF",numeric="254",name="French Guiana"}, ["GG"] = {alpha3="GGY",numeric="831",name="Guernsey"}, ["GH"] = {alpha3="GHA",numeric="288",name="Ghana"}, ["GI"] = {alpha3="GIB",numeric="292",name="Gibraltar"}, ["GL"] = {alpha3="GRL",numeric="304",name="Greenland"}, ["GM"] = {alpha3="GMB",numeric="270",name="Gambia"}, ["GN"] = {alpha3="GIN",numeric="324",name="Guinea"}, ["GP"] = {alpha3="GLP",numeric="312",name="Guadeloupe"}, ["GQ"] = {alpha3="GNQ",numeric="226",name="Equatorial Guinea"}, ["GR"] = {alpha3="GRC",numeric="300",name="Greece"}, ["GS"] = {alpha3="SGS",numeric="239",name="South Georgia and the South Sandwich Islands"}, ["GT"] = {alpha3="GTM",numeric="320",name="Guatemala"}, ["GU"] = {alpha3="GUM",numeric="316",name="Guam"}, ["GW"] = {alpha3="GNB",numeric="624",name="Guinea-Bissau"}, ["GY"] = {alpha3="GUY",numeric="328",name="Guyana"}, ["HK"] = {alpha3="HKG",numeric="344",name="Hong Kong",altnames={"Hong Kong SAR","HKSAR"}}, ["HM"] = {alpha3="HMD",numeric="334",name="Heard Island and McDonald Islands",altnames={"Heard and McDonald Islands"}}, ["HN"] = {alpha3="HND",numeric="340",name="Honduras"}, ["HR"] = {alpha3="HRV",numeric="191",name="Croatia"}, ["HT"] = {alpha3="HTI",numeric="332",name="Haiti"}, ["HU"] = {alpha3="HUN",numeric="348",name="Hungary"}, ["ID"] = {alpha3="IDN",numeric="360",name="Indonesia"}, ["IE"] = {alpha3="IRL",numeric="372",name="Ireland",altnames={"Republic of Ireland"}}, ["IL"] = {alpha3="ISR",numeric="376",name="Israel"}, ["IM"] = {alpha3="IMN",numeric="833",name="Isle of Man"}, ["IN"] = {alpha3="IND",numeric="356",name="India"}, ["IO"] = {alpha3="IOT",numeric="086",name="British Indian Ocean Territory"}, ["IQ"] = {alpha3="IRQ",numeric="368",name="Iraq"}, ["IR"] = {alpha3="IRN",numeric="364",name="Iran",isoname="Iran (Islamic Republic of)"}, ["IS"] = {alpha3="ISL",numeric="352",name="Iceland"}, ["IT"] = {alpha3="ITA",numeric="380",name="Italy"}, ["JE"] = {alpha3="JEY",numeric="832",name="Jersey"}, ["JM"] = {alpha3="JAM",numeric="388",name="Jamaica"}, ["JO"] = {alpha3="JOR",numeric="400",name="Jordan"}, ["JP"] = {alpha3="JPN",numeric="392",name="Japan"}, ["KE"] = {alpha3="KEN",numeric="404",name="Kenya"}, ["KG"] = {alpha3="KGZ",numeric="417",name="Kyrgyzstan"}, ["KH"] = {alpha3="KHM",numeric="116",name="Cambodia"}, ["KI"] = {alpha3="KIR",numeric="296",name="Kiribati"}, ["KM"] = {alpha3="COM",numeric="174",name="Comoros"}, ["KN"] = {alpha3="KNA",numeric="659",name="Saint Kitts and Nevis",altnames={"St Kitts and Nevis"}}, ["KP"] = {alpha3="PRK",numeric="408",name="North Korea",isoname="Korea (Democratic People's Republic of)",altnames={"Democratic People's Republic of Korea"}}, ["KR"] = {alpha3="KOR",numeric="410",name="South Korea",isoname="Korea, Republic of",altnames={"Republic of Korea"}}, ["KW"] = {alpha3="KWT",numeric="414",name="Kuwait"}, ["KY"] = {alpha3="CYM",numeric="136",name="Cayman Islands"}, ["KZ"] = {alpha3="KAZ",numeric="398",name="Kazakhstan"}, ["LA"] = {alpha3="LAO",numeric="418",name="Laos",isoname="Lao People's Democratic Republic"}, ["LB"] = {alpha3="LBN",numeric="422",name="Lebanon"}, ["LC"] = {alpha3="LCA",numeric="662",name="Saint Lucia",altnames={"St Lucia"}}, ["LI"] = {alpha3="LIE",numeric="438",name="Liechtenstein"}, ["LK"] = {alpha3="LKA",numeric="144",name="Sri Lanka"}, ["LR"] = {alpha3="LBR",numeric="430",name="Liberia"}, ["LS"] = {alpha3="LSO",numeric="426",name="Lesotho"}, ["LT"] = {alpha3="LTU",numeric="440",name="Lithuania"}, ["LU"] = {alpha3="LUX",numeric="442",name="Luxembourg"}, ["LV"] = {alpha3="LVA",numeric="428",name="Latvia"}, ["LY"] = {alpha3="LBY",numeric="434",name="Libya"}, ["MA"] = {alpha3="MAR",numeric="504",name="Morocco"}, ["MC"] = {alpha3="MCO",numeric="492",name="Monaco"}, ["MD"] = {alpha3="MDA",numeric="498",name="Moldova",isoname="Moldova, Republic of"}, ["ME"] = {alpha3="MNE",numeric="499",name="Montenegro"}, ["MF"] = {alpha3="MAF",numeric="663",name="Saint-Martin",isoname="Saint Martin (French part)",altnames={"St Martin","St Martin (French part)","Collectivity of Saint Martin","Collectivity of St Martin"}}, ["MG"] = {alpha3="MDG",numeric="450",name="Madagascar"}, ["MH"] = {alpha3="MHL",numeric="584",name="Marshall Islands"}, ["MK"] = {alpha3="MKD",numeric="807",name="North Macedonia",altnames={"Republic of North Macedonia","Macedonia","Republic of Macedonia","Macedonia, the former Yugoslav Republic of"}}, ["ML"] = {alpha3="MLI",numeric="466",name="Mali"}, ["MM"] = {alpha3="MMR",numeric="104",name="Myanmar",altnames={"Burma"}}, ["MN"] = {alpha3="MNG",numeric="496",name="Mongolia"}, ["MO"] = {alpha3="MAC",numeric="446",name="Macau",isoname="Macao",altnames={"Macau SAR","Macao SAR"}}, ["MP"] = {alpha3="MNP",numeric="580",name="Northern Mariana Islands"}, ["MQ"] = {alpha3="MTQ",numeric="474",name="Martinique"}, ["MR"] = {alpha3="MRT",numeric="478",name="Mauritania"}, ["MS"] = {alpha3="MSR",numeric="500",name="Montserrat"}, ["MT"] = {alpha3="MLT",numeric="470",name="Malta"}, ["MU"] = {alpha3="MUS",numeric="480",name="Mauritius"}, ["MV"] = {alpha3="MDV",numeric="462",name="Maldives"}, ["MW"] = {alpha3="MWI",numeric="454",name="Malawi"}, ["MX"] = {alpha3="MEX",numeric="484",name="Mexico"}, ["MY"] = {alpha3="MYS",numeric="458",name="Malaysia"}, ["MZ"] = {alpha3="MOZ",numeric="508",name="Mozambique"}, ["NA"] = {alpha3="NAM",numeric="516",name="Namibia"}, ["NC"] = {alpha3="NCL",numeric="540",name="New Caledonia"}, ["NE"] = {alpha3="NER",numeric="562",name="Niger"}, ["NF"] = {alpha3="NFK",numeric="574",name="Norfolk Island"}, ["NG"] = {alpha3="NGA",numeric="566",name="Nigeria"}, ["NI"] = {alpha3="NIC",numeric="558",name="Nicaragua"}, ["NL"] = {alpha3="NLD",numeric="528",name="Netherlands"}, ["NO"] = {alpha3="NOR",numeric="578",name="Norway"}, ["NP"] = {alpha3="NPL",numeric="524",name="Nepal"}, ["NR"] = {alpha3="NRU",numeric="520",name="Nauru"}, ["NU"] = {alpha3="NIU",numeric="570",name="Niue"}, ["NZ"] = {alpha3="NZL",numeric="554",name="New Zealand",altnames={"Aotearoa"}}, ["OM"] = {alpha3="OMN",numeric="512",name="Oman"}, ["PA"] = {alpha3="PAN",numeric="591",name="Panama"}, ["PE"] = {alpha3="PER",numeric="604",name="Peru"}, ["PF"] = {alpha3="PYF",numeric="258",name="French Polynesia"}, ["PG"] = {alpha3="PNG",numeric="598",name="Papua New Guinea"}, ["PH"] = {alpha3="PHL",numeric="608",name="Philippines"}, ["PK"] = {alpha3="PAK",numeric="586",name="Pakistan"}, ["PL"] = {alpha3="POL",numeric="616",name="Poland"}, ["PM"] = {alpha3="SPM",numeric="666",name="Saint Pierre and Miquelon",altnames={"St Pierre and Miquelon"}}, ["PN"] = {alpha3="PCN",numeric="612",name="Pitcairn"}, ["PR"] = {alpha3="PRI",numeric="630",name="Puerto Rico"}, ["PS"] = {alpha3="PSE",numeric="275",name="Palestine",isoname="Palestine, State of",altnames={"State of Palestine"}}, ["PT"] = {alpha3="PRT",numeric="620",name="Portugal"}, ["PW"] = {alpha3="PLW",numeric="585",name="Palau"}, ["PY"] = {alpha3="PRY",numeric="600",name="Paraguay"}, ["QA"] = {alpha3="QAT",numeric="634",name="Qatar"}, ["RE"] = {alpha3="REU",numeric="638",name="Réunion"}, ["RO"] = {alpha3="ROU",numeric="642",name="Romania"}, ["RS"] = {alpha3="SRB",numeric="688",name="Serbia"}, ["RU"] = {alpha3="RUS",numeric="643",name="Russia",isoname="Russian Federation"}, ["RW"] = {alpha3="RWA",numeric="646",name="Rwanda"}, ["SA"] = {alpha3="SAU",numeric="682",name="Saudi Arabia"}, ["SB"] = {alpha3="SLB",numeric="090",name="Solomon Islands"}, ["SC"] = {alpha3="SYC",numeric="690",name="Seychelles"}, ["SD"] = {alpha3="SDN",numeric="729",name="Sudan"}, ["SE"] = {alpha3="SWE",numeric="752",name="Sweden"}, ["SG"] = {alpha3="SGP",numeric="702",name="Singapore"}, ["SH"] = {alpha3="SHN",numeric="654",name="Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {alpha3="SVN",numeric="705",name="Slovenia"}, ["SJ"] = {alpha3="SJM",numeric="744",name="Svalbard and Jan Mayen"}, ["SK"] = {alpha3="SVK",numeric="703",name="Slovakia"}, ["SL"] = {alpha3="SLE",numeric="694",name="Sierra Leone"}, ["SM"] = {alpha3="SMR",numeric="674",name="San Marino"}, ["SN"] = {alpha3="SEN",numeric="686",name="Senegal"}, ["SO"] = {alpha3="SOM",numeric="706",name="Somalia"}, ["SR"] = {alpha3="SUR",numeric="740",name="Suriname"}, ["SS"] = {alpha3="SSD",numeric="728",name="South Sudan"}, ["ST"] = {alpha3="STP",numeric="678",name="São Tomé and Príncipe",isoname="Sao Tome and Principe",altnames={"Democratic Republic of Sao Tome and Principe"}}, ["SV"] = {alpha3="SLV",numeric="222",name="El Salvador"}, ["SX"] = {alpha3="SXM",numeric="534",name="Sint Maarten",isoname="Sint Maarten (Dutch part)",altnames={"St Maarten","Saint Martin (Dutch part)","St Martin (Dutch part)"}}, ["SY"] = {alpha3="SYR",numeric="760",name="Syria",isoname="Syrian Arab Republic"}, ["SZ"] = {alpha3="SWZ",numeric="748",name="Eswatini",altnames={"Swaziland"}}, ["TC"] = {alpha3="TCA",numeric="796",name="Turks and Caicos Islands"}, ["TD"] = {alpha3="TCD",numeric="148",name="Chad"}, ["TF"] = {alpha3="ATF",numeric="260",name="French Southern and Antarctic Lands",isoname="French Southern Territories"}, ["TG"] = {alpha3="TGO",numeric="768",name="Togo"}, ["TH"] = {alpha3="THA",numeric="764",name="Thailand"}, ["TJ"] = {alpha3="TJK",numeric="762",name="Tajikistan"}, ["TK"] = {alpha3="TKL",numeric="772",name="Tokelau"}, ["TL"] = {alpha3="TLS",numeric="626",name="Timor-Leste",altnames={"East Timor"}}, ["TM"] = {alpha3="TKM",numeric="795",name="Turkmenistan"}, ["TN"] = {alpha3="TUN",numeric="788",name="Tunisia"}, ["TO"] = {alpha3="TON",numeric="776",name="Tonga"}, ["TR"] = {alpha3="TUR",numeric="792",name="Turkey",isoname="Türkiye"}, ["TT"] = {alpha3="TTO",numeric="780",name="Trinidad and Tobago"}, ["TV"] = {alpha3="TUV",numeric="798",name="Tuvalu"}, ["TW"] = {alpha3="TWN",numeric="158",name="Taiwan",isoname="Taiwan, Province of China",altnames={"Republic of China"}}, ["TZ"] = {alpha3="TZA",numeric="834",name="Tanzania",isoname="Tanzania, United Republic of"}, ["UA"] = {alpha3="UKR",numeric="804",name="Ukraine"}, ["UG"] = {alpha3="UGA",numeric="800",name="Uganda"}, ["UM"] = {alpha3="UMI",numeric="581",name="United States Minor Outlying Islands"}, ["US"] = {alpha3="USA",numeric="840",name="United States",isoname="United States of America",altnames={"US","USA","U.S."}}, ["UY"] = {alpha3="URY",numeric="858",name="Uruguay"}, ["UZ"] = {alpha3="UZB",numeric="860",name="Uzbekistan"}, ["VA"] = {alpha3="VAT",numeric="336",name="Vatican City",isoname="Holy See",altnames={"Holy See (Vatican City State)","Vatican City State"}}, ["VC"] = {alpha3="VCT",numeric="670",name="Saint Vincent and the Grenadines",altnames={"St Vincent and the Grenadines"}}, ["VE"] = {alpha3="VEN",numeric="862",name="Venezuela",isoname="Venezuela (Bolivarian Republic of)"}, ["VG"] = {alpha3="VGB",numeric="092",name="British Virgin Islands",isoname="Virgin Islands (British)",altnames={"UK Virgin Islands","BVI"}}, ["VI"] = {alpha3="VIR",numeric="850",name="United States Virgin Islands",isoname="Virgin Islands (U.S.)",altnames={"US Virgin Islands","USVI"}}, ["VN"] = {alpha3="VNM",numeric="704",name="Vietnam",isoname="Viet Nam"}, ["VU"] = {alpha3="VUT",numeric="548",name="Vanuatu"}, ["WF"] = {alpha3="WLF",numeric="876",name="Wallis and Futuna"}, ["WS"] = {alpha3="WSM",numeric="882",name="Samoa"}, ["YE"] = {alpha3="YEM",numeric="887",name="Yemen"}, ["YT"] = {alpha3="MYT",numeric="175",name="Mayotte"}, ["ZA"] = {alpha3="ZAF",numeric="710",name="South Africa"}, ["ZM"] = {alpha3="ZMB",numeric="894",name="Zambia"}, ["ZW"] = {alpha3="ZWE",numeric="716",name="Zimbabwe"} } 354v6e4nt0ba73omd7wvf0syrhii9kg Modul:If empty 828 307 900 899 2024-08-09T09:21:37Z Jon Harald Søby 58 1 semakan diimportkan 899 Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 8cxs60bq7ivex6wukqrel0fi3yogyu4 Modul:If preview 828 308 902 901 2024-08-09T09:21:37Z Jon Harald Søby 58 1 semakan diimportkan 901 Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p i2018hg2i8x3uajzdhhh7yzkknltvcf Modul:If preview/configuration 828 309 904 903 2024-08-09T09:21:37Z Jon Harald Søby 58 1 semakan diimportkan 903 Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } 7ccf9c7e3yxw9p4ke6iw4ndcfniweno Modul:If preview/styles.css 828 310 906 905 2024-08-09T09:21:37Z Jon Harald Søby 58 1 semakan diimportkan 905 sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } gaiz1uhqgmf5elgq82yqqfll7kgcbwe Modul:In lang 828 311 908 907 2024-08-09T09:21:37Z Jon Harald Søby 58 1 semakan diimportkan 907 Scribunto text/plain require('strict'); --[[--------------------------< _ I N _ L A N G >-------------------------------------------------------------- implements {{in lang}} Module entry point from another module |link=yes - creates wikilinked language names |template=<template name> - customizes error messages created by Module:lang |list-cats=yes - documentation tool returns language-category names of cats populated by this template <span class="languageicon">(in <language>)</span> ]] local function _in_lang (args) local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local list_cats = 'yes' == args['list-cats']; -- make a boolean local list = {}; local cats = {}; local maint_msgs = {}; if not args[1] then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">error: ', template, 'missing language tag</span>'}); end local module = 'Module:Lang' .. (mw.getCurrentFrame():getTitle():match ('/sandbox') or ''); -- if this module is the sandbox, local name_from_tag = require (module)._name_from_tag; -- use Module:Lang/sandbox; Module:Lang else local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local this_wiki_lang = mw.language.getContentLanguage().code; -- get this wiki's language code local override_t = mw.loadData ('Module:Lang/data').override; -- this table holds ietf tag/name definitions known to Module:Lang for i, lang in ipairs (args) do local code = args[i]:lower(); local t = {code, ['link'] = args['link'], ['template'] = args['template']}; -- build an 'args' table lang = name_from_tag (t) -- get the language name table.insert (list, lang) -- add this language or error message to the list if code:find ('%-') and not override_t[code] then -- except for the IETF tags listed in <override_t> code = code:match ('^%a%a%a?%f[^%a]'); -- strip off region, script, and variant subtags so that they aren't used to make category names end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym if (0 == namespace) and not list_cats then -- when listing cats don't include this cat; TODO: right choice? table.insert (cats, table.concat ({'[[Kategori:Lang and lang-xx code promoted to ISO 639-1|', code ..']]'})); end table.insert (maint_msgs, ' <span class="lang-comment" style="font-style:normal; display:none; color:#33aa33; margin-left:0.3em">') table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); table.insert (maint_msgs, '</span>;'); code = synonym_table[code]; -- use the synonym end if (0 == namespace) or list_cats then -- when in article space if lang:find ('[Ee]rror') then -- add error category (message provided by Module:Lang) if not list_cats then -- don't include this cat when listing cats; TODO: right choice? table.insert (cats, '[[Kategori:in lang template errors]]'); end elseif this_wiki_lang ~= code:match ('^%a%a%a?') then -- categorize article only when code is not this wiki's language code or variants thereof if lang:match ('%[%[.-|.-%]%]') then -- wikilinked individual language name lang = lang:match ('%[%[.-|(.-)%]%]'); elseif lang:match ('%[%[.-%]%]') then -- wikilinked collective languages name lang = lang:match ('%[%[(.-)%]%]'); end -- neither of these then plain-text language name if lang:find ('languages') then -- add appropriate language-name category table.insert (cats, table.concat ({'[[Kategori:Articles with sources in ', lang, ' (', code, ')]]'})); else table.insert (cats, table.concat ({'[[Kategori:Articles with ', lang, '-language sources (', code, ')]]'})); end end end end if list_cats then local cats = table.concat (cats, ', '):gsub ('[%[%]]', ''); -- make a string of categories and then strip wikilink markup return cats end local result = {'<span class="languageicon">('}; -- opening span and ( table.insert (result, 'yes' == args['cap'] and 'In ' or 'in '); -- add capitalized or uncapitalized 'in' table.insert (result, mw.text.listToText (list, ', ', (2 < #list) and ', and ' or ' and ' )); -- and concatenate the language list table.insert (result, ')</span>'); -- add closing ) and closing span table.insert (result, table.concat (maint_msgs) or ''); -- add maint messages, if any table.insert (result, table.concat (cats)); -- add categories return table.concat (result); -- make a big string and done end --[[--------------------------< I N _ L A N G >---------------------------------------------------------------- implements {{in lang}} Module entry point from an {{#invoke:lang/utilities/sanbox|in_lang|<code>|<code2>|<code3>|<code...>|link=yes|template=in lang|list-cats=yes}} ]] local function in_lang (frame) local args = require ('Module:Arguments').getArgs (frame); return _in_lang (args); end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { in_lang = in_lang, -- module entry from {{#invoke:}} _in_lang = _in_lang, -- module entry from another module } f52qp6wwxwayb33x9ylwui8dt6e0r11 Modul:Infobox 828 312 910 909 2024-08-09T09:21:38Z Jon Harald Søby 58 1 semakan diimportkan 909 Scribunto text/plain -- -- This module implements {{Infobox}} -- local p = {} local navbar = require('Module:Navbar')._navbar local args = {} local origArgs = {} local root local function notempty( s ) return s and s:match( '%S' ) end local function fixChildBoxes(sval, tt) if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end local function union(t1, t2) -- Returns the union of the values of two tables, as a sequence. local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end local function getArgNums(prefix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end local function addRow(rowArgs) -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. if rowArgs.header and rowArgs.header ~= '_BLANK_' then root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :attr('id', rowArgs.rowid) :tag('th') :attr('colspan', 2) :attr('id', rowArgs.headerid) :addClass(rowArgs.class) :addClass(args.headerclass) :css('text-align', 'center') :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext('[[Kategori:Pages which use infobox templates with ignored data cells]]') end elseif rowArgs.data then if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then rowArgs.rowstyle = 'display:none' end local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) row:attr('id', rowArgs.rowid) if rowArgs.label then row :tag('th') :attr('scope', 'row') :attr('id', rowArgs.labelid) :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') if not rowArgs.label then dataCell :attr('colspan', 2) :css('text-align', 'center') end dataCell :attr('id', rowArgs.dataid) :addClass(rowArgs.class) :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) end end local function renderTitle() if not args.title then return end root :tag('caption') :addClass(args.titleclass) :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end root :tag('tr') :tag('th') :attr('colspan', 2) :addClass(args.aboveclass) :css('text-align', 'center') :css('font-size', '125%') :css('font-weight', 'bold') :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end root :tag('tr') :tag('td') :attr('colspan', '2') :addClass(args.belowclass) :css('text-align', 'center') :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addRow({ data = args['subheader' .. tostring(num)], datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :cssText(args.captionstyle) :wikitext(caption) end addRow({ data = tostring(data), datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end local function preprocessRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end local function renderRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)], dataid = args['dataid' .. tostring(num)], labelid = args['labelid' .. tostring(num)], headerid = args['headerid' .. tostring(num)], rowid = args['rowid' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end root :tag('tr') :tag('td') :attr('colspan', '2') :css('text-align', 'right') :wikitext(navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end local function renderTrackingCategories() if args.decat ~= 'yes' then if args.child == 'yes' then if args.title then root:wikitext('[[Kategori:Pages which use embedded infobox templates with the title parameter]]') end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Kategori:Articles which use infobox templates with no data rows]]') end end end local function _infobox() -- Specify the overall layout of the infobox, with special settings -- if the infobox is used as a 'child' inside another infobox. if args.child ~= 'yes' then root = mw.html.create('table') root :addClass((args.subbox ~= 'yes') and 'infobox' or nil) :addClass(args.bodyclass) if args.subbox == 'yes' then root :css('padding', '0') :css('border', 'none') :css('margin', '-3px') :css('width', 'auto') :css('min-width', '100%') :css('font-size', '100%') :css('clear', 'none') :css('float', 'none') :css('background-color', 'transparent') else root :css('width', '22em') end root :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end renderSubheaders() renderImages() if args.autoheaders then preprocessRows() end renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderTrackingCategories() return tostring(root) end local function preprocessSingleArg(argName) -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end local function preprocessArgs(prefixTable, step) -- Assign the parameters with the given prefixes to the args table, in order, in batches -- of the step size specified. This is to prevent references etc. from appearing in the -- wrong order. The prefixTable should be an array containing tables, each of which has -- two possible fields, a "prefix" string and a "depend" table. The function always parses -- parameters containing the "prefix" string, but only parses parameters in the "depend" -- table if the prefix parameter is present and non-blank. if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones. preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present and not blank, or -- we are processing "prefix1" and "prefix" is present and not blank, and -- if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end local function parseDataParameters() -- Parse the data parameters in the same order that the old {{infobox}} did, so that -- references etc. will display in the expected places. Parameters that depend on -- another parameter are only processed if that parameter is present, to avoid -- phantom references appearing in article reference lists. preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'}, {prefix = 'dataid'}, {prefix = 'labelid'}, {prefix = 'headerid'}, {prefix = 'rowid'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent preprocessSingleArg('decat') end function p.infobox(frame) -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end function p.infoboxTemplate(frame) -- For calling via #invoke within a template origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p kp016619esgnj6gy7j5o16wgdz9h4id Modul:Infobox/dates 828 313 912 911 2024-08-09T09:21:38Z Jon Harald Søby 58 1 semakan diimportkan 911 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local default_error_category = "[[Kategori:Pages using infobox television with nonstandard dates]]" local p = {} function p.start_end_date_template_validation(frame) local args = getArgs(frame) local error_category = args.error_category or default_error_category local start_date = args.first_aired or args.released or args.airdate or args.release_date or args.airdate_overall if start_date then if not start_date:find("dtstart") then return error_category end end local end_date = args.last_aired if end_date then if not end_date:find("dtend") and end_date ~= "present" then return error_category end end end function p.dates(frame) local returnval local args = getArgs(frame) if table.getn(args) < 2 then if args['1'] == nil and args['2'] == nil then return '' elseif args['1'] == nil then return args['2'] elseif args['2'] == nil then return args['1'] end end args['1'] = args['1']:gsub("&nbsp;"," ") args['2'] = args['2']:gsub("&nbsp;"," ") local dmy = false local pr1, m1, d1, y1, su1 = string.match(args['1'], '(.-)(%u%a+)%s(%d+),%s(%d+)(.*)') local pr2, m2, d2, y2, su2 = string.match(args['2'], '(.-)(%u%a+)%s(%d+),%s(%d+)(.*)') if y1 == nil then dmy = true pr1, d1, m1, y1, su1 = string.match(args['1'], '(.-)(%d%d?)%s(%a+)%s(%d+)(.*)') pr2, d2, m2, y2, su2 = string.match(args['2'], '(.-)(%d%d?)%s(%a+)%s(%d+)(.*)') end local dash = '&nbsp;–<br />' if y1 ~= nil and y2 ~= nil then su1 = su1 or '' su2 = su2 or '' local 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} local diff = os.time({year=y2, month=MONTHS[m2], day=d2, hour=0, min=0, sec=0}) - os.time({year=y1, month=MONTHS[m1], day=d1, hour=0, min=0, sec=0}) if diff < 0 then returnval = 'Invalid date range' else if y1 == y2 then if dmy == false then returnval = pr1 .. m1 .. ' ' .. d1 .. su1 .. dash .. pr2 .. m2 ..' '.. d2 ..', '.. y2 .. su2 else returnval = pr1 .. d1 .. ' ' .. m1 .. su1 .. dash .. pr2 .. d2 .. ' ' .. m2 .. ' ' .. y2 .. su2 end else if dmy == false then returnval = pr1 .. m1 .. ' ' .. d1 ..', '.. y1 .. su1 .. dash .. pr2 .. m2 .. ' '.. d2 .. ', ' .. y2 .. su2 else returnval = pr1 .. d1 .. ' ' .. m1 ..' '.. y1 .. su1 .. dash .. pr2 .. d2 .. ' '.. m2 .. ' ' .. y2 .. su2 end end end else returnval = args['1']..dash..args['2']; end return returnval; end return p c3d75zu0pmb9ahlfrio1oxym92sceoc Modul:Infobox/styles.css 828 314 914 913 2024-08-09T09:21:38Z Jon Harald Søby 58 1 semakan diimportkan 913 sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[Perbincangan MediaWiki:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } tcb3cvo5d443czg3cw9ucw53opabglb Modul:InfoboxImage 828 315 916 915 2024-08-09T09:21:38Z Jon Harald Søby 58 1 semakan diimportkan 915 Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Kategori:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center= frame.args["center"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[Fail:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if title ~= "" and title ~= nil then result = result .. "|" .. title; elseif alt ~= "" and alt ~= nil then result = result .. "|" .. alt; end result = result .. "]]"; return result; end end return i; 4bg2pdfifugh281tarxv5nkfw8cmu54 Modul:Infobox mapframe 828 316 918 917 2024-08-09T09:21:39Z Jon Harald Søby 58 1 semakan diimportkan 917 Scribunto text/plain local mf = require('Module:Mapframe') local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local infoboxImage = require('Module:InfoboxImage').InfoboxImage -- Defaults local DEFAULT_FRAME_WIDTH = "270" local DEFAULT_FRAME_HEIGHT = "200" local DEFAULT_ZOOM = 10 local DEFAULT_GEOMASK_STROKE_WIDTH = "1" local DEFAULT_GEOMASK_STROKE_COLOR = "#777777" local DEFAULT_GEOMASK_FILL = "#888888" local DEFAULT_GEOMASK_FILL_OPACITY = "0.5" local DEFAULT_SHAPE_STROKE_WIDTH = "3" local DEFAULT_SHAPE_STROKE_COLOR = "#FF0000" local DEFAULT_SHAPE_FILL = "#606060" local DEFAULT_SHAPE_FILL_OPACITY = "0.5" local DEFAULT_LINE_STROKE_WIDTH = "5" local DEFAULT_LINE_STROKE_COLOR = "#FF0000" local DEFAULT_MARKER_COLOR = "#5E74F3" -- Trim whitespace from args, and remove empty args function trimArgs(argsTable) local cleanArgs = {} for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val end else cleanArgs[key] = val end end return cleanArgs end function getBestStatement(item_id, property_id) if not(item_id) or not(mw.wikibase.isValidEntityId(item_id)) or not(mw.wikibase.entityExists(item_id)) then return false end local statements = mw.wikibase.getBestStatements(item_id, property_id) if not statements or #statements == 0 then return false end local hasNoValue = ( statements[1].mainsnak and statements[1].mainsnak.snaktype == 'novalue' ) if hasNoValue then return false end return statements[1] end function hasWikidataProperty(item_id, property_id) return getBestStatement(item_id, property_id) and true or false end function getStatementValue(statement) return statement and statement.mainsnak and statement.mainsnak.datavalue and statement.mainsnak.datavalue.value or nil end function relatedEntity(item_id, property_id) local value = getStatementValue( getBestStatement(item_id, property_id) ) return value and value.id or false end function idType(id) if not id then return nil elseif mw.ustring.match(id, "[Pp]%d+") then return "property" elseif mw.ustring.match(id, "[Qq]%d+") then return "item" else return nil end end function getZoom(value, unit) local length_km if unit == 'km' then length_km = tonumber(value) elseif unit == 'mi' then length_km = tonumber(value)*1.609344 elseif unit == 'km2' then length_km = math.sqrt(tonumber(value)) elseif unit == 'mi2' then length_km = math.sqrt(tonumber(value))*1.609344 end -- max for zoom 2 is 6400km, for zoom 3 is 3200km, for zoom 4 is 1600km, etc local zoom = math.floor(8 - (math.log10(length_km) - 2)/(math.log10(2))) -- limit to values below 17 zoom = math.min(17, zoom) -- take off 1 when calculated from area, to account for unusual shapes if unit == 'km2' or unit == 'mi2' then zoom = zoom - 1 end -- minimum value is 1 return math.max(1, zoom) end function shouldAutoRun(frame) -- Check if should be running local explicitlyOn = yesno(mw.text.trim(frame.getParent(frame).args.mapframe or "")) -- true of false or nil local onByDefault = (explicitlyOn == nil) and yesno(mw.text.trim(frame.args.onByDefault or ""), false) -- true or false return explicitlyOn or onByDefault end function argsFromAuto(frame) -- Get args from the frame (invoke call) and the parent (template call). -- Frame arguments are default values which are overridden by parent values -- when both are present local args = getArgs(frame, {parentFirst = true}) -- Discard args not prefixed with "mapframe-", remove that prefix from those that remain local fixedArgs = {} for name, val in pairs(args) do local fixedName = string.match(name, "^mapframe%-(.+)$" ) if fixedName then fixedArgs[fixedName] = val -- allow coord, coordinates, etc to be unprefixed elseif name == "coordinates" or name == "coord" or name == "coordinate" and not fixedArgs.coord then fixedArgs.coord = val -- allow id, qid to be unprefixed, map to id (if not already present) elseif name == "id" or name == "qid" and not fixedArgs.id then fixedArgs.id = val end end return fixedArgs end local p = {} p.autocaption = function(frame) if not shouldAutoRun(frame) then return "" end local args = argsFromAuto(frame) if args.caption then return args.caption elseif args.switcher then return "" end local maskItem local maskType = idType(args.geomask) if maskType == 'item' then maskItem = args.geomask elseif maskType == "property" then maskItem = relatedEntity(args.id or mw.wikibase.getEntityIdForCurrentPage(), args.geomask) end local maskItemLabel = maskItem and mw.wikibase.getLabel( maskItem ) return maskItemLabel and "Location in "..maskItemLabel or "" end function parseCustomWikitext(customWikitext) -- infoboxImage will format an image if given wikitext containing an -- image, or else pass through the wikitext unmodified return infoboxImage({ args = { image = customWikitext } }) end p.auto = function(frame) if not shouldAutoRun(frame) then return "" end local args = argsFromAuto(frame) if args.custom then return frame:preprocess(parseCustomWikitext(args.custom)) end local mapframe = p._main(args) return frame:preprocess(mapframe) end p.main = function(frame) local parent = frame.getParent(frame) local parentArgs = parent.args local mapframe = p._main(parentArgs) return frame:preprocess(mapframe) end p._main = function(_config) -- `config` is the args passed to this module local config = trimArgs(_config) -- Require wikidata item, or specified coords local wikidataId = config.id or mw.wikibase.getEntityIdForCurrentPage() if not(wikidataId) and not(config.coord) then return '' end -- Require coords (specified or from wikidata), so that map will be centred somewhere -- (P625 = coordinate location) local hasCoordinates = hasWikidataProperty(wikidataId, 'P625') or config.coordinates or config.coord if not hasCoordinates then return '' end -- `args` is the arguments which will be passed to the mapframe module local args = {} -- Some defaults/overrides for infobox presentation args.display = "inline" args.frame = "yes" args.plain = "yes" args["frame-width"] = config["frame-width"] or config.width or DEFAULT_FRAME_WIDTH args["frame-height"] = config["frame-height"] or config.height or DEFAULT_FRAME_HEIGHT args["frame-align"] = "center" args["frame-coord"] = config["frame-coordinates"] or config["frame-coord"] or "" -- Note: config["coordinates"] or config["coord"] should not be used for the alignment of the frame; -- see talk page ( https://en.wikipedia.org/wiki/Special:Diff/876492931 ) -- deprecated lat and long parameters args["frame-lat"] = config["frame-lat"] or config["frame-latitude"] or "" args["frame-long"] = config["frame-long"] or config["frame-longitude"] or "" -- Calculate zoom from length or area (converted to km or km2) if config.length_km then args.zoom = getZoom(config.length_km, 'km') elseif config.length_mi then args.zoom = getZoom(config.length_mi, 'mi') elseif config.area_km2 then args.zoom = getZoom(config.area_km2, 'km2') elseif config.area_mi2 then args.zoom = getZoom(config.area_mi2, 'mi2') else args.zoom = config.zoom or DEFAULT_ZOOM end -- Conditionals: whether point, geomask should be shown local hasOsmRelationId = hasWikidataProperty(wikidataId, 'P402') -- P402 is OSM relation ID local shouldShowPointMarker; if config.point == "on" then shouldShowPointMarker = true elseif config.point == "none" then shouldShowPointMarker = false else shouldShowPointMarker = not(hasOsmRelationId) or (config.marker and config.marker ~= 'none') or (config.coordinates or config.coord) end local shouldShowShape = config.shape ~= 'none' local shapeType = config.shape == 'inverse' and 'shape-inverse' or 'shape' local shouldShowLine = config.line ~= 'none' local maskItem local useWikidata = wikidataId and true or false -- Use shapes/lines based on wikidata id, if there is one -- But do not use wikidata when local coords are specified (and not turned off), unless explicitly set if useWikidata and config.coord and shouldShowPointMarker then useWikidata = config.wikidata and true or false end -- Switcher if config.switcher == "zooms" then -- switching between zoom levels local maxZoom = math.max(tonumber(args.zoom), 3) -- what zoom would have otherwise been (if 3 or more, otherwise 3) local minZoom = 1 -- completely zoomed out local midZoom = math.floor((maxZoom + minZoom)/2) -- midway between maxn and min args.switch = "zoomed in, zoomed midway, zoomed out" args.zoom = string.format("SWITCH:%d,%d,%d", maxZoom, midZoom, minZoom) elseif config.switcher == "auto" then -- switching between P276 and P131 areas with recursive lookup, e.g. item's city, -- that city's state, and that state's country args.zoom = nil -- let kartographer determine the zoom local maskLabels = {} local maskItems = {} local maskItemId = relatedEntity(wikidataId, "P276") or relatedEntity(wikidataId, "P131") local maskLabel = mw.wikibase.getLabel(maskItemId) while maskItemId and maskLabel and mw.text.trim(maskLabel) ~= "" do table.insert(maskLabels, maskLabel) table.insert(maskItems, maskItemId) maskItemId = maskItemId and relatedEntity(maskItemId, "P131") maskLabel = maskItemId and mw.wikibase.getLabel(maskItemId) end if #maskLabels > 1 then args.switch = table.concat(maskLabels, "###") maskItem = "SWITCH:" .. table.concat(maskItems, ",") elseif #maskLabels == 1 then maskItem = maskItemId[1] end elseif config.switcher == "geomasks" and config.geomask then -- switching between items in geomask parameter args.zoom = nil -- let kartographer determine the zoom local separator = (mw.ustring.find(config.geomask, "###", 0, true ) and "###") or (mw.ustring.find(config.geomask, ";", 0, true ) and ";") or "," local pattern = "%s*"..separator.."%s*" local maskItems = mw.text.split(mw.ustring.gsub(config.geomask, "SWITCH:", ""), pattern) local maskLabels = {} if #maskItems > 1 then for i, item in ipairs(maskItems) do table.insert(maskLabels, mw.wikibase.getLabel(item)) end args.switch = table.concat(maskLabels, "###") maskItem = "SWITCH:" .. table.concat(maskItems, ",") end end -- resolve geomask item id (if not using geomask switcher) if not maskItem then -- local maskType = idType(config.geomask) if maskType == 'item' then maskItem = config.geomask elseif maskType == "property" then maskItem = relatedEntity(wikidataId, config.geomask) end end -- Keep track of arg numbering local argNumber = '' local function incrementArgNumber() if argNumber == '' then argNumber = 2 else argNumber = argNumber + 1 end end -- Geomask if maskItem then args["type"..argNumber] = "shape-inverse" args["id"..argNumber] = maskItem args["stroke-width"..argNumber] = config["geomask-stroke-width"] or DEFAULT_GEOMASK_STROKE_WIDTH args["stroke-color"..argNumber] = config["geomask-stroke-color"] or config["geomask-stroke-colour"] or DEFAULT_GEOMASK_STROKE_COLOR args["fill"..argNumber] = config["geomask-fill"] or DEFAULT_GEOMASK_FILL args["fill-opacity"..argNumber] = config["geomask-fill-opacity"] or DEFAULT_SHAPE_FILL_OPACITY -- Let kartographer determine zoom and position, unless it is explicitly set in config if not config.zoom and not config.switcher then args.zoom = nil args["frame-coord"] = nil args["frame-lat"] = nil args["frame-long"] = nil local maskArea = getStatementValue( getBestStatement(maskItem, 'P2046') ) end incrementArgNumber() -- Hack to fix phab:T255932 if not args.zoom then args["type"..argNumber] = "line" args["id"..argNumber] = maskItem args["stroke-width"..argNumber] = 0 incrementArgNumber() end end -- Shape (or shape-inverse) if useWikidata and shouldShowShape then args["type"..argNumber] = shapeType if config.id then args["id"..argNumber] = config.id end args["stroke-width"..argNumber] = config["shape-stroke-width"] or config["stroke-width"] or DEFAULT_SHAPE_STROKE_WIDTH args["stroke-color"..argNumber] = config["shape-stroke-color"] or config["shape-stroke-colour"] or config["stroke-color"] or config["stroke-colour"] or DEFAULT_SHAPE_STROKE_COLOR args["fill"..argNumber] = config["shape-fill"] or DEFAULT_SHAPE_FILL args["fill-opacity"..argNumber] = config["shape-fill-opacity"] or DEFAULT_SHAPE_FILL_OPACITY incrementArgNumber() end -- Line if useWikidata and shouldShowLine then args["type"..argNumber] = "line" if config.id then args["id"..argNumber] = config.id end args["stroke-width"..argNumber] = config["line-stroke-width"] or config["stroke-width"] or DEFAULT_LINE_STROKE_WIDTH args["stroke-color"..argNumber] = config["line-stroke-color"] or config["line-stroke-colour"] or config["stroke-color"] or config["stroke-colour"] or DEFAULT_LINE_STROKE_COLOR incrementArgNumber() end -- Point if shouldShowPointMarker then args["type"..argNumber] = "point" if config.id then args["id"..argNumber] = config.id end if config.coord then args["coord"..argNumber] = config.coord end if config.marker then args["marker"..argNumber] = config.marker end args["marker-color"..argNumber] = config["marker-color"] or config["marker-colour"] or DEFAULT_MARKER_COLOR incrementArgNumber() end local mapframe = args.switch and mf.multi(args) or mf._main(args) local tracking = hasOsmRelationId and '' or '[[Kategori:Infobox mapframe without OSM relation ID on Wikidata]]' return mapframe .. tracking end return p ny5mxwqezhwqgfftqwww9xurx9vvqwd Modul:Infobox television 828 317 920 919 2024-08-09T09:21:39Z Jon Harald Søby 58 1 semakan diimportkan 919 Scribunto text/plain --- @module local p = {} local maintenance_categories = { incorrectly_formatted = "[[Kategori:Pages using infobox television with incorrectly formatted values|%s]]", image_values_without_an_image = "[[Kategori:Pages using infobox television with image-related values without an image]]", unnecessary_title_parameter = "[[Kategori:Pages using infobox television with unnecessary name parameter]]", non_matching_title = "[[Kategori:Pages using infobox television with non-matching title]]", flag_icon = "[[Kategori:Pages using infobox television with flag icon]]", dates_incorrectly_formatted = "[[Kategori:Pages using infobox television with nonstandard dates]]", manual_display_title = "[[Kategori:Pages using infobox television with unnecessary manual displaytitle]]", manual_display_title_temp_tracking = "[[Kategori:Pages using infobox television with manual displaytitle]]", } --- Returns a table consisting of the title's title parts. --- --- The return table's properties: --- - title - The title. --- - disambiguation - the disambiguation text without parentheses. --- --- Note: could potentially be moved to an outside module for other template and module uses. --- --- @param text string --- @return table<string, string | nil> local function get_title_parts(text) local title, disambiguation = string.match(text, "^(.+) (%b())$") if not title or type(title) ~= "string" then title = text end ---@type table<string, string | nil> local title_parts = {title = --[[---@not number | nil]] title, disambiguation = nil} if not disambiguation or type(disambiguation) ~= "string" then return title_parts end -- Remove outside parentheses from names which use parentheses as part of the name such as "episode (Randall and Hopkirk (Deceased))". disambiguation = string.sub(--[[---@not number | nil]] disambiguation, 2, -2) title_parts.disambiguation = --[[---@not number]] disambiguation return title_parts end --- Returns a maintenance category if the italic_title value is not "no". --- --- Infobox parameters checked: --- - |italic_title= --- --- @param args table --- @return string local function is_italic_title_valid_value(args) if args.italic_title and args.italic_title ~= "no" then return string.format(maintenance_categories.incorrectly_formatted, "Italic title") end return "" end --- Returns a maintenance category if the dates are not formatted correctly with --- {{Start date}} and {{End date}} templates. --- --- Infobox parameters checked: --- - |first_aired= --- - |released= --- - |last_aired= --- --- @param start_date string The start date value. --- @param end_date string The end date value. --- @return string local function are_dates_formatted_correctly(start_date, end_date) if start_date and not string.find(start_date, "dtstart") then return maintenance_categories.dates_incorrectly_formatted end if end_date and (not string.find(end_date, "dtend") and end_date ~= "present") then return maintenance_categories.dates_incorrectly_formatted end return "" end --- Returns a maintenance category if the dates are not formatted correctly --- and using "Original" or "Revival" to denote a split in the date range. --- --- Infobox parameters checked: --- - |first_aired= --- - |released= --- - |last_aired= --- --- @param start_date string The start date value. --- @param end_date string The end date value. --- @return string local function are_dates_formatted_correctly_date_range(args) for _, v in pairs(args) do if string.find(string.lower(v), "original") or string.find(string.lower(v), "revival") or string.find(v, "''") then return maintenance_categories.dates_incorrectly_formatted end end return "" end --- Returns a maintenance category if a {{Italic title}} or {{DISPLAYTITLE}} template is used. --- --- Testing parameters: --- - |page_test= - a real Wikipedia page to read the content of the page. --- --- Infobox parameters checked: --- - |italic_title= --- --- @param args table --- @return string local function has_display_title(args) --TODO: when testing below is done uncomment code --if args.italic_title then -- return "" --end local article if args.page_test then article = mw.title.new(args.page_test) else article = mw.title.getCurrentTitle() end local page_text = article:getContent() if not page_text then return "" end if string.find(page_text, "{{[Ii]talic title") and not string.match(page_text, "{{[Ii]talic title|all=yes}}")then return maintenance_categories.manual_display_title end local display_title = string.match(page_text, "{{DISPLAYTITLE:(.*)}}") local article_title = article.text if display_title then if article_title == display_title or article_title == string.sub(display_title, 3, string.len(display_title) - 2) then return maintenance_categories.manual_display_title elseif string.find(display_title, "<sub>") or string.find(display_title, "<sup>") then -- TODO: This is valid. Will remove when done with cleanup. return "" else -- TODO: remove when done checking results. return maintenance_categories.manual_display_title_temp_tracking end end return "" end --- Returns a maintenance category if a flag icon is used. --- --- All the infobox values are checked. --- --- @param args table --- @return string local function has_flag_icon(args) for _, v in pairs(args) do if string.find(v, "flagicon") then return maintenance_categories.flag_icon end end return "" end --- Returns a maintenance category if the values are linked or formatted. --- --- Infobox parameters checked: --- - |language= --- --- The function currently checks if the following values are present: --- - ] - links. --- --- @param args table --- @return string local function are_values_linked_or_formatted(args) args = {language = args.language} for key, value in pairs(args) do for _, bad_value in pairs({"]"}) do if string.find(value, bad_value, 1, true) then return string.format(maintenance_categories.incorrectly_formatted, key) end end end return "" end --- Returns a maintenance category if the |image= value includes the "File:" or "Image:" prefix. --- --- Infobox parameters checked: --- - |image= --- --- @param image string --- @return string local function is_image_using_incorrect_syntax(image) if not image then return "" end if string.find(image, "[Ff]ile:") or string.find(image, "[Ii]mage:") then return string.format(maintenance_categories.incorrectly_formatted, "image") end return "" end --- Returns a maintenance category if the |image_size= value includes "px". --- --- Infobox parameters checked: --- - |image_size= --- --- @param image_size string --- @return string local function is_image_size_using_px(image_size) if image_size and string.find(image_size, "px") then return string.format(maintenance_categories.incorrectly_formatted, "image_size") end return "" end --- Returns a maintenance category if there is no image file while image auxiliary values are present. --- --- Infobox parameters checked: --- - |image= --- - |image_size= --- - |image_upright= --- - |image_alt= --- - |alt= --- - |caption= --- --- @param args table --- @return string local function are_image_auxiliary_values_used_for_no_image(args) if args.image then return "" end if args.image_size or args.image_upright or args.image_alt or args.alt or args.caption then return maintenance_categories.image_values_without_an_image end return "" end --- Returns the display title text used in either the {{DISPLAYTITLE}} or {{Italic title}} templates. --- --- @param page_text string --- @param article_title string --- @return string | nil local function get_display_title_text(page_text, article_title) if not page_text then return nil end local title_modification = string.match(page_text, "{{DISPLAYTITLE:(.-)}}") if title_modification and type(title_modification) == "string" then local title_parts = get_title_parts(title_modification) return string.gsub(title_parts.title, "'", "") end title_modification = string.match(page_text, "{{[Ii]talic title|all=yes}}") if title_modification and type(title_modification) == "string" then return article_title end return nil end --- Returns the title used in the {{Lowercase title}} template and an optional maintenance category. --- --- @param page_text string --- @param args table --- @param article_title string --- @param title_parts table --- @param return_category boolean --- @return string | nil local function get_lowercase_template_status(page_text, args, article_title, title_parts, return_category) if not page_text then return nil end local lowercase_template = string.match(page_text, "{{[Ll]owercase title.-}}") if not lowercase_template then return nil end local lowercase_title if string.find(lowercase_template, "|force=") then lowercase_title = string.gsub(article_title,"^%u", string.lower) else lowercase_title = string.gsub(title_parts.title,"^%u", string.lower) end if return_category and args.name then if args.name == lowercase_title then return maintenance_categories.unnecessary_title_parameter else return maintenance_categories.non_matching_title end return "" end return lowercase_title end --- Returns the title used in the {{Correct title}} template and an optional maintenance category. --- --- @param page_text string --- @param args table --- @param return_category boolean --- @return string | nil local function get_correct_title_value(page_text, args, return_category) if not page_text then return nil end local correct_title_template_pattern = "{{[Cc]orrect title|title=(.*)|reason=.-}}" local correct_title = string.match(page_text, correct_title_template_pattern) if not correct_title then correct_title_template_pattern = "{{[Cc]orrect title|(.*)|reason=.-}}" correct_title = string.match(page_text, correct_title_template_pattern) end if not correct_title and type(correct_title) ~= "string" then return nil end local correct_title_title_parts = get_title_parts(correct_title) if return_category and args.name then if args.name == correct_title or args.name == correct_title_title_parts.title then return maintenance_categories.unnecessary_title_parameter else return maintenance_categories.non_matching_title end end return correct_title end --- Returns a maintenance category if the infobox title is equal to the article title. --- --- Infobox parameters checked: --- - |name= --- --- The function currently checks if the infobox title is equal to the article title while ignoring styling such as: --- - Nowrap spans. --- - Line breaks. --- --- A return value can be one of three options: --- - The value of maintenance_categories.non_matching_title - when the args.title does not match the article title. --- - The value of maintenance_categories.unnecessary_title_parameter - when the args.title matches the article title. --- - An empty string - when args.name isn't used or the args.name uses an allowed modification --- (such as a nowrap template) while the rest of the args.name matches the article title. --- --- Testing parameters: --- - |page_test= - a real Wikipedia page to read the content of the page. --- - |page_title_test= - the title of the page being checked. --- --- @param frame table --- @param args table --- @return string local function is_infobox_title_equal_to_article_title(frame, args) if not args.name then return "" end local page_text if args.page_test then page_text = mw.title.new(args.page_test):getContent() else page_text = mw.title.getCurrentTitle():getContent() end -- Check if the article is using a {{Correct title}} template. local correct_title = get_correct_title_value(page_text, args, true) if correct_title then return correct_title end local article_title = args.page_title_test if not args.page_title_test then article_title = mw.title.getCurrentTitle().text end -- Remove disambiguation. local title_parts = get_title_parts(article_title) -- Check if the article is using a {{Lowercase title}} template. local lowercase_title = get_lowercase_template_status(page_text, args, article_title, title_parts, true) if lowercase_title then return lowercase_title end -- Remove nowrap span. if string.find(args.name, "nowrap") then local title = frame:expandTemplate{title = "Strip tags", args = {args.name}} if title == article_title or title == title_parts.title then return "" end return maintenance_categories.non_matching_title end -- Remove line breaks and additional spaces as a result. if string.find(args.name, "<br%s?/?>") then local title, _ = string.gsub(args.name, "<br%s?/?>", "") title, _ = string.gsub(title, " ", " ") if title == article_title or title == title_parts.title then return "" end return maintenance_categories.non_matching_title end if args.name == article_title or args.name == title_parts.title then return maintenance_categories.unnecessary_title_parameter end -- Article and infobox titles do not match. return maintenance_categories.non_matching_title end --- Returns the relevant maintenance categories based on the {{Infobox television}} values validated. --- --- @param frame table --- @return string function p.validate_values(frame) local getArgs = require("Module:Arguments").getArgs local args = getArgs(frame) local categories = {} table.insert(categories, is_infobox_title_equal_to_article_title(frame, args)) table.insert(categories, has_display_title(args)) table.insert(categories, are_image_auxiliary_values_used_for_no_image(args)) table.insert(categories, is_image_using_incorrect_syntax(args.image)) table.insert(categories, is_image_size_using_px(args.image_size)) table.insert(categories, are_values_linked_or_formatted(args)) table.insert(categories, has_flag_icon(args)) table.insert(categories, are_dates_formatted_correctly(args.first_aired or args.released, args.last_aired)) table.insert(categories, are_dates_formatted_correctly_date_range({args.first_aired, args.released, args.last_aired})) table.insert(categories, is_italic_title_valid_value(args)) return table.concat(categories, "") end --- Returns the text used for the |above= field of the infobox. --- --- Infobox parameters checked: --- - |name= --- --- Testing parameters: --- - |page_test= - a real Wikipedia page to read the content of the page. --- - |page_title_test= - the title of the page being checked. --- --- @param frame table --- @return string function p.above_title(frame) local getArgs = require("Module:Arguments").getArgs local args = getArgs(frame) local page if args.page_test then page = mw.title.new(args.page_test) else page = mw.title.getCurrentTitle() end local page_text = page:getContent() local article_title = args.page_title_test if not args.page_title_test then article_title = page.text end local title_format = "''%s''" local correct_title = get_correct_title_value(page_text, args, false) if correct_title then return string.format(title_format, correct_title) end local title_parts = get_title_parts(article_title) local lowercase_title = get_lowercase_template_status(page_text, args, article_title, title_parts, false) if lowercase_title then return string.format(title_format, lowercase_title) end if args.italic_title then local title_modification = get_display_title_text(page_text, article_title) if title_modification then return string.format(title_format, title_modification) end end if args.name then return string.format(title_format, args.name) end return string.format(title_format, title_parts.title) end return p 3qyhfyg8bxrvvqzrjjaa85ig0pfv8sd Modul:Italic title 828 318 922 921 2024-08-09T09:21:39Z Jon Harald Søby 58 1 semakan diimportkan 921 Scribunto text/plain -- This module implements {{italic title}}. require('strict') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local yesno = require('Module:Yesno') -------------------------------------------------------------------------------- -- ItalicTitle class -------------------------------------------------------------------------------- local ItalicTitle = {} do ---------------------------------------------------------------------------- -- Class attributes and functions -- Things that belong to the class are here. Things that belong to each -- object are in the constructor. ---------------------------------------------------------------------------- -- Keys of title parts that can be italicized. local italicizableKeys = { namespace = true, title = true, dab = true, } ---------------------------------------------------------------------------- -- ItalicTitle constructor -- This contains all the dynamic attributes and methods. ---------------------------------------------------------------------------- function ItalicTitle.new() local obj = {} -- Function for checking self variable in methods. local checkSelf = libraryUtil.makeCheckSelfFunction( 'ItalicTitle', 'obj', obj, 'ItalicTitle object' ) -- Checks a key is present in a lookup table. -- Param: name - the function name. -- Param: argId - integer position of the key in the argument list. -- Param: key - the key. -- Param: lookupTable - the table to look the key up in. local function checkKey(name, argId, key, lookupTable) if not lookupTable[key] then error(string.format( "bad argument #%d to '%s' ('%s' is not a valid key)", argId, name, key ), 3) end end -- Set up object structure. local parsed = false local categories = {} local italicizedKeys = {} local italicizedSubstrings = {} -- Parses a title object into its namespace text, title, and -- disambiguation text. -- Param: options - a table of options with the following keys: -- title - the title object to parse -- ignoreDab - ignore any disambiguation parentheses -- Returns the current object. function obj:parseTitle(options) checkSelf(self, 'parseTitle') checkType('parseTitle', 1, options, 'table') checkTypeForNamedArg('parseTitle', 'title', options.title, 'table') local title = options.title -- Title and dab text local prefix, parentheses if not options.ignoreDab then prefix, parentheses = mw.ustring.match( title.text, '^(.+) %(([^%(%)]+)%)$' ) end if prefix and parentheses then self.title = prefix self.dab = parentheses else self.title = title.text end -- Namespace local namespace = mw.site.namespaces[title.namespace].name if namespace and #namespace >= 1 then self.namespace = namespace end -- Register the object as having parsed a title. parsed = true return self end -- Italicizes part of the title. -- Param: key - the key of the title part to be italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:italicize(key) checkSelf(self, 'italicize') checkType('italicize', 1, key, 'string') checkKey('italicize', 1, key, italicizableKeys) italicizedKeys[key] = true return self end -- Un-italicizes part of the title. -- Param: key - the key of the title part to be un-italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:unitalicize(key) checkSelf(self, 'unitalicize') checkType('unitalicize', 1, key, 'string') checkKey('unitalicize', 1, key, italicizableKeys) italicizedKeys[key] = nil return self end -- Italicizes a substring in the title. This only affects the main part -- of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be italicized. -- Returns the current object. function obj:italicizeSubstring(s) checkSelf(self, 'italicizeSubstring') checkType('italicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = true return self end -- Un-italicizes a substring in the title. This only affects the main -- part of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be un-italicized. -- Returns the current object. function obj:unitalicizeSubstring(s) checkSelf(self, 'unitalicizeSubstring') checkType('unitalicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = nil return self end -- Renders the object into a page name. If no title has yet been parsed, -- the current title is used. -- Returns string function obj:renderTitle() checkSelf(self, 'renderTitle') -- Italicizes a string -- Param: s - the string to italicize -- Returns string. local function italicize(s) assert(type(s) == 'string', 's was not a string') assert(s ~= '', 's was the empty string') return string.format('<i>%s</i>', s) end -- Escape characters in a string that are magic in Lua patterns. -- Param: pattern - the pattern to escape -- Returns string. local function escapeMagicCharacters(s) assert(type(s) == 'string', 's was not a string') return s:gsub('%p', '%%%0') end -- If a title hasn't been parsed yet, parse the current title. if not parsed then self:parseTitle{title = mw.title.getCurrentTitle()} end -- Italicize the different parts of the title and store them in a -- titleParts table to be joined together later. local titleParts = {} -- Italicize the italicizable keys. for key in pairs(italicizableKeys) do if self[key] then if italicizedKeys[key] then titleParts[key] = italicize(self[key]) else titleParts[key] = self[key] end end end -- Italicize substrings. If there are any substrings to be -- italicized then start from the raw title, as this overrides any -- italicization of the main part of the title. if next(italicizedSubstrings) then titleParts.title = self.title for s in pairs(italicizedSubstrings) do local pattern = escapeMagicCharacters(s) local italicizedTitle, nReplacements = titleParts.title:gsub( pattern, italicize ) titleParts.title = italicizedTitle -- If we didn't make any replacements then it means that we -- have been passed a bad substring or that the page has -- been moved to a bad title, so add a tracking category. if nReplacements < 1 then categories['Pages using italic title with no matching string'] = true end end end -- Assemble the title together from the parts. local ret = '' if titleParts.namespace then ret = ret .. titleParts.namespace .. ':' end ret = ret .. titleParts.title if titleParts.dab then ret = ret .. ' (' .. titleParts.dab .. ')' end return ret end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments. -- Returns string function obj:renderDisplayTitle(...) checkSelf(self, 'renderDisplayTitle') return mw.getCurrentFrame():callParserFunction( 'DISPLAYTITLE', self:renderTitle(), ... ) end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments, plus -- any tracking categories. -- Returns string function obj:render(...) checkSelf(self, 'render') local ret = self:renderDisplayTitle(...) for cat in pairs(categories) do ret = ret .. string.format( '[[Kategori:%s]]', cat ) end return ret end return obj end end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} local function getArgs(frame, wrapper) assert(type(wrapper) == 'string', 'wrapper was not a string') return require('Module:Arguments').getArgs(frame, { wrappers = wrapper }) end -- Main function for {{italic title}} function p._main(args) checkType('_main', 1, args, 'table') local italicTitle = ItalicTitle.new() italicTitle:parseTitle{ title = mw.title.getCurrentTitle(), ignoreDab = yesno(args.all, false) } if args.string then italicTitle:italicizeSubstring(args.string) else italicTitle:italicize('title') end return italicTitle:render(args[1]) end function p.main(frame) return p._main(getArgs(frame, 'Template:Italic title')) end function p._dabonly(args) return ItalicTitle.new() :italicize('dab') :render(args[1]) end function p.dabonly(frame) return p._dabonly(getArgs(frame, 'Template:Italic dab')) end return p qed8j3qavcyzjwokt489lq7busex479 Modul:Lang 828 319 924 923 2024-08-09T09:21:39Z Jon Harald Søby 58 1 semakan diimportkan 923 Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Modul:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Modul:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transliteration' == template then category = 'Transliteration'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Kategori:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Kategori:Articles containing <language>-language text]] for English: [[Kategori:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Kategori:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Kategori:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Kategori:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transliteration}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Kategori:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:Wp/bdr}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transliteration'); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transliteration'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transliteration'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transliteration'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transliteration'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transliteration'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transliteration'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; safvltvufqld54mhpdh8vqej8fxn8kd Modul:Lang/ISO 639 synonyms 828 320 926 925 2024-08-09T09:21:39Z Jon Harald Søby 58 1 semakan diimportkan 925 Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } shzq5qyzo42nqfska6amwdq4g8lois9 Modul:Lang/data 828 321 4640 928 2024-08-16T15:00:56Z Rombituon 59 4640 Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-proto"] = "Proto-Celtic", -- cel in IANA is Celtic languages ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['pny'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; 80ga66pvq06ovmn7sppr6xrvohaacn4 Modul:List 828 322 1042 932 2024-08-09T09:22:48Z Jon Harald Søby 58 1 semakan diimportkan 931 Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Kategori:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p lymucamg8yq4t994943aom9hphrb5a4 Modul:Mapframe 828 323 934 933 2024-08-09T09:21:40Z Jon Harald Søby 58 1 semakan diimportkan 933 Scribunto text/plain -- Note: Originally written on English Wikipedia at https://en.wikipedia.org/wiki/Module:Mapframe --[[---------------------------------------------------------------------------- ##### Localisation (L10n) settings ##### Replace values in quotes ("") with localised values ----------------------------------------------------------------------------]]-- local L10n = {} -- Modue dependencies local transcluder -- local copy of https://www.mediawiki.org/wiki/Module:Transcluder loaded lazily -- "strict" should not be used, at least until all other modules which require this module are not using globals. -- Template parameter names (unnumbered versions only) -- Specify each as either a single string, or a table of strings (aliases) -- Aliases are checked left-to-right, i.e. `{ "one", "two" }` is equivalent to using `{{{one| {{{two|}}} }}}` in a template L10n.para = { display = "display", type = "type", id = { "id", "ids" }, from = "from", raw = "raw", title = "title", description = "description", strokeColor = { "stroke-color", "stroke-colour" }, strokeWidth = "stroke-width", strokeOpacity = "stroke-opacity", fill = "fill", fillOpacity = "fill-opacity", coord = "coord", marker = "marker", markerColor = { "marker-color", "marker-colour" }, markerSize = "marker-size", radius = { "radius", "radius_m" }, radiusKm = "radius_km", radiusFt = "radius_ft", radiusMi = "radius_mi", edges = "edges", text = "text", icon = "icon", zoom = "zoom", frame = "frame", plain = "plain", frameWidth = "frame-width", frameHeight = "frame-height", frameCoordinates = { "frame-coordinates", "frame-coord" }, frameLatitude = { "frame-lat", "frame-latitude" }, frameLongitude = { "frame-long", "frame-longitude" }, frameAlign = "frame-align", switch = "switch", overlay = "overlay", overlayBorder = "overlay-border", overlayHorizontalAlignment = "overlay-horizontal-alignment", overlayVerticalAlignment = "overlay-vertical-alignment", overlayHorizontalOffset = "overlay-horizontal-offset", overlayVerticalOffset = "overlay-vertical-offset" } -- Names of other templates this module can extract coordinates from L10n.template = { coord = { -- The coord template, as well as templates with output that contains {{coord}} "Coord", "Coord/sandbox", "NRHP row", "NRHP row/sandbox", "WikidataCoord", "WikidataCoord/sandbox", "Wikidatacoord", "Wikidata coord" } } -- Error messages L10n.error = { badDisplayPara = "Invalid display parameter", noCoords = "Coordinates must be specified on Wikidata or in |" .. ( type(L10n.para.coord)== 'table' and L10n.para.coord[1] or L10n.para.coord ) .. "=", wikidataCoords = "Coordinates not found on Wikidata", noCircleCoords = "Circle centre coordinates must be specified, or available via Wikidata", negativeRadius = "Circle radius must be a positive number", noRadius = "Circle radius must be specified", negativeEdges = "Circle edges must be a positive number", noSwitchPara = "Found only one switch value in |" .. ( type(L10n.para.switch)== 'table' and L10n.para.switch[1] or L10n.para.switch ) .. "=", oneSwitchLabel = "Found only one label in |" .. ( type(L10n.para.switch)== 'table' and L10n.para.switch[1] or L10n.para.switch ) .. "=", noSwitchLists = "At least one parameter must have a SWITCH: list", switchMismatches = "All SWITCH: lists must have the same number of values", -- "%s" and "%d" tokens will be replaced with strings and numbers when used oneSwitchValue = "Found only one switch value in |%s=", fewerSwitchLabels = "Found %d switch values but only %d labels in |" .. ( type(L10n.para.switch)== 'table' and L10n.para.switch[1] or L10n.para.switch ) .. "=", noNamedCoords = "No named coordinates found in %s" } -- Other strings L10n.str = { -- valid values for display parameter, e.g. (|display=inline) or (|display=title) or (|display=inline,title) or (|display=title,inline) inline = "inline", title = "title", dsep = ",", -- separator between inline and title (comma in the example above) -- valid values for type paramter line = "line", -- geoline feature (e.g. a road) shape = "shape", -- geoshape feature (e.g. a state or province) shapeInverse = "shape-inverse", -- geomask feature (the inverse of a geoshape) data = "data", -- geoJSON data page on Commons point = "point", -- single point feature (coordinates) circle = "circle", -- circular area around a point named = "named", -- all named coordinates in an article or section -- Keyword to indicate a switch list. Must NOT use the special characters ^$()%.[]*+-? switch = "SWITCH", -- valid values for icon, frame, and plain parameters affirmedWords = ' '..table.concat({ "add", "added", "affirm", "affirmed", "include", "included", "on", "true", "yes", "y" }, ' ')..' ', declinedWords = ' '..table.concat({ "decline", "declined", "exclude", "excluded", "false", "none", "not", "no", "n", "off", "omit", "omitted", "remove", "removed" }, ' ')..' ' } -- Default values for parameters L10n.defaults = { display = L10n.str.inline, text = "Map", frameWidth = "300", frameHeight = "200", frameAlign = "right", markerColor = "5E74F3", markerSize = nil, strokeColor = "#ff0000", strokeWidth = 6, edges = 32, -- number of edges used to approximate a circle overlayBorder = "1px solid white", overlayHorizontalAlignment = "right", overlayHorizontalOffset = "0", overlayVerticalAlignment = "bottom", overlayVerticalOffset = "0" } -- #### End of L10n settings #### --[[---------------------------------------------------------------------------- Utility methods ----------------------------------------------------------------------------]]-- local util = {} --[[ Looks up a parameter value based on the id (a key from the L10n.para table) and optionally a suffix, for parameters that can be suffixed (e.g. type2 is type with suffix 2). @param {table} args key-value pairs of parameter names and their values @param {string} param_id id for parameter name (key from the L10n.para table) @param {string} [suffix] suffix for parameter name @returns {string|nil} parameter value if found, or nil if not found ]]-- function util.getParameterValue(args, param_id, suffix) suffix = suffix or '' if type( L10n.para[param_id] ) ~= 'table' then return args[L10n.para[param_id]..suffix] end for _i, paramAlias in ipairs(L10n.para[param_id]) do if args[paramAlias..suffix] then return args[paramAlias..suffix] end end return nil end --[[ Trim whitespace from args, and remove empty args. Also fix control characters. @param {table} argsTable @returns {table} trimmed args table ]]-- function util.trimArgs(argsTable) local cleanArgs = {} for key, val in pairs(argsTable) do if type(key) == 'string' and type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then -- control characters inside json need to be escaped, but stripping them is simpler -- See also T214984 -- However, *don't* strip control characters from wikitext (text or description parameters) or you'll break strip markers -- Alternatively it might be better to only strip control char from raw parameter content if util.matchesParam('text', key) or util.matchesParam('description', key, key:gsub('^%D+(%d+)$', '%1') ) then cleanArgs[key] = val else cleanArgs[key] = val:gsub('%c',' ') end end else cleanArgs[key] = val end end return cleanArgs end --[[ Check if a parameter name matches an unlocalized parameter key @param {string} key - the unlocalized parameter name to search through @param {string} name - the localized parameter name to check @param {string|nil} - an optional suffix to apply to the value(s) from the localization key @returns {boolean} true if the name matches the parameter, false otherwise ]]-- function util.matchesParam(key, name, suffix) local param = L10n.para[key] suffix = suffix or '' if type(param) == 'table' then for _, v in pairs(param) do if (v .. suffix) == name then return true end end return false end return ((param .. suffix) == name) end --[[ Check if a value is affirmed (one of the values in L10n.str.affirmedWords) @param {string} val Value to be checked @returns {boolean} true if affirmed, false otherwise ]]-- function util.isAffirmed(val) if not(val) then return false end return string.find(L10n.str.affirmedWords, ' '..val..' ', 1, true ) and true or false end --[[ Check if a value is declined (one of the values in L10n.str.declinedWords) @param {string} val Value to be checked @returns {boolean} true if declined, false otherwise ]]-- function util.isDeclined(val) if not(val) then return false end return string.find(L10n.str.declinedWords , ' '..val..' ', 1, true ) and true or false end --[[ Check if the name of a template matches the known coord templates or wrappers (in L10n.template.coord). The name is normalised when checked, so e.g. the names "Coord", "coord", and " Coord" all return true. @param {string} name @returns {boolean} true if it is a coord template or wrapper, false otherwise ]]-- function util.isCoordTemplateOrWrapper(name) name = mw.text.trim(name) local inputTitle = mw.title.new(name, 'Template') if not inputTitle then return false end -- Create (or reuse) mw.title objects for each known coord template/wrapper. -- Stored in L10n.template.title so that they don't need to be recreated -- each time this function is called if not L10n.template.titles then L10n.template.titles = {} for _, v in pairs(L10n.template.coord) do table.insert(L10n.template.titles, mw.title.new(v, 'Template')) end end for _, templateTitle in pairs(L10n.template.titles) do if mw.title.equals(inputTitle, templateTitle) then return true end end return false end --[[ Recursively extract coord templates which have a name parameter. @param {string} wikitext @returns {table} table sequence of coord templates ]]-- function util.extractCoordTemplates(wikitext) local output = {} local templates = mw.ustring.gmatch(wikitext, '{%b{}}') local subtemplates = {} for template in templates do local templateName = mw.ustring.match(template, '{{([^}|]+)') local nameParam = mw.ustring.match(template, "|%s*name%s*=%s*[^}|]+") if util.isCoordTemplateOrWrapper(templateName) then if nameParam then table.insert(output, template) end elseif mw.ustring.find(mw.ustring.sub(template, 2), "{{") then local subOutput = util.extractCoordTemplates(mw.ustring.sub(template, 2)) for _, t in pairs(subOutput) do table.insert(output, t) end end end -- ensure coords are not using title display for k, v in pairs(output) do output[k] = mw.ustring.gsub(v, "|%s*display%s*=[^|}]+", "|display=inline") end return output end --[[ Gets all named coordiates from a page or a section of a page. @param {string|nil} page Page name, or name#section, to get named coordinates from. If the name is omitted, i.e. #section or nil or empty string, then the current page will be used. @returns {table} sequence of {coord, name, description} tables where coord is the coordinates in a format suitable for #util.parseCoords, name is a string, and description is a string (coordinates in a format suitable for displaying to the reader). If for some reason the name can't be found, the description is nil and the name contains display-format coordinates. @throws {L10n.error.noNamedCoords} if no named coordinates are found. ]]-- function util.getNamedCoords(page) if transcluder == nil then -- load [[Modul:Transcluder]] lazily so it is only transcluded on pages that -- actually use named coordinates transcluder = require("Module:Transcluder") end local parts = mw.text.split(page or "", "#", true) local name = parts[1] == "" and mw.title.getCurrentTitle().prefixedText or parts[1] local section = parts[2] local pageWikitext = transcluder.get(section and name.."#"..section or name) local coordTemplates = util.extractCoordTemplates(pageWikitext) if #coordTemplates == 0 then error(string.format(L10n.error.noNamedCoords, page or name), 0) end local frame = mw.getCurrentFrame() local sep = "________" local expandedContent = frame:preprocess(table.concat(coordTemplates, sep)) local expandedTemplates = mw.text.split(expandedContent, sep) local namedCoords = {} for _, expandedTemplate in pairs(expandedTemplates) do local coord = mw.ustring.match(expandedTemplate, "<span class=\"geo%-dec\".->(.-)</span>") if coord then local name = ( -- name specified by a wrapper template, e.g [[Article|Name]] mw.ustring.match(expandedTemplate, "<span class=\"mapframe%-coord%-name\">(.-)</span>") or -- name passed into coord template mw.ustring.match(expandedTemplate, "<span class=\"fn org\">(.-)</span>") or -- default to the coordinates if the name can't be retrieved coord ) local description = name ~= coord and coord local coord = mw.ustring.gsub(coord, "[° ]", "_") table.insert(namedCoords, {coord=coord, name=name, description=description}) end end if #namedCoords == 0 then error(string.format(L10n.error.noNamedCoords, page or name), 0) end return namedCoords end --[[ Parse coordinate values from the params passed in a GeoHack url (such as //tools.wmflabs.org/geohack/geohack.php?pagename=Example&params=1_2_N_3_4_W_ or //tools.wmflabs.org/geohack/geohack.php?pagename=Example&params=1.23_S_4.56_E_ ) or non-url string in the same format (such as `1_2_N_3_4_W_` or `1.23_S_4.56_E_`) @param {string} coords string containing coordinates @returns {number, number} latitude, longitude ]]-- function util.parseCoords(coords) local coordsPatt if mw.ustring.find(coords, "params=", 1, true) then -- prevent false matches from page name, e.g. ?pagename=Lorem_S._Ipsum coordsPatt = 'params=([_%.%d]+[NS][_%.%d]+[EW])' else -- not actually a geohack url, just the same format coordsPatt = '[_%.%d]+[NS][_%.%d]+[EW]' end local parts = mw.text.split((mw.ustring.match(coords, coordsPatt) or ''), '_') local lat_d = tonumber(parts[1]) local lat_m = tonumber(parts[2]) -- nil if coords are in decimal format local lat_s = lat_m and tonumber(parts[3]) -- nil if coords are either in decimal format or degrees and minutes only local lat = lat_d + (lat_m or 0)/60 + (lat_s or 0)/3600 if parts[#parts/2] == 'S' then lat = lat * -1 end local long_d = tonumber(parts[1+#parts/2]) local long_m = tonumber(parts[2+#parts/2]) -- nil if coords are in decimal format local long_s = long_m and tonumber(parts[3+#parts/2]) -- nil if coords are either in decimal format or degrees and minutes only local long = long_d + (long_m or 0)/60 + (long_s or 0)/3600 if parts[#parts] == 'W' then long = long * -1 end return lat, long end --[[ Get coordinates from a Wikidata item @param {string} item_id Wikidata item id (Q number) @returns {number, number} latitude, longitude @throws {L10n.error.noCoords} if item_id is invalid or the item does not exist @throws {L10n.error.wikidataCoords} if the the item does not have a P625 statement (coordinates), or it is set to "no value" ]]-- function util.wikidataCoords(item_id) if not (item_id and mw.wikibase.isValidEntityId(item_id) and mw.wikibase.entityExists(item_id)) then error(L10n.error.noCoords, 0) end local coordStatements = mw.wikibase.getBestStatements(item_id, 'P625') if not coordStatements or #coordStatements == 0 then error(L10n.error.wikidataCoords, 0) end local hasNoValue = ( coordStatements[1].mainsnak and (coordStatements[1].mainsnak.snaktype == 'novalue' or coordStatements[1].mainsnak.snaktype == 'somevalue') ) if hasNoValue then error(L10n.error.wikidataCoords, 0) end local wdCoords = coordStatements[1]['mainsnak']['datavalue']['value'] return tonumber(wdCoords['latitude']), tonumber(wdCoords['longitude']) end --[[ Creates a polygon that approximates a circle @param {number} lat Latitude @param {number} long Longitude @param {number} radius Radius in metres @param {number} n Number of edges for the polygon @returns {table} sequence of {latitude, longitude} table sequences, where latitude and longitude are both numbers ]]-- function util.circleToPolygon(lat, long, radius, n) -- n is number of edges -- Based on https://github.com/gabzim/circle-to-polygon, ISC licence local function offset(cLat, cLon, distance, bearing) local lat1 = math.rad(cLat) local lon1 = math.rad(cLon) local dByR = distance / 6378137 -- distance divided by 6378137 (radius of the earth) wgs84 local lat = math.asin( math.sin(lat1) * math.cos(dByR) + math.cos(lat1) * math.sin(dByR) * math.cos(bearing) ) local lon = lon1 + math.atan2( math.sin(bearing) * math.sin(dByR) * math.cos(lat1), math.cos(dByR) - math.sin(lat1) * math.sin(lat) ) return {math.deg(lon), math.deg(lat)} end local coordinates = {}; local i = 0; while i < n do table.insert(coordinates, offset(lat, long, radius, (2*math.pi*i*-1)/n) ) i = i + 1 end table.insert(coordinates, offset(lat, long, radius, 0)) return coordinates end --[[ Get the number of key-value pairs in a table, which might not be a sequence. @param {table} t @returns {number} count of key-value pairs ]]-- function util.tableCount(t) local count = 0 for k, v in pairs(t) do count = count + 1 end return count end --[[ For a table where the values are all tables, returns either the util.tableCount of the subtables if they are all the same, or nil if they are not all the same. @param {table} t @returns {number|nil} count of key-value pairs of subtable, or nil if subtables have different counts ]]-- function util.subTablesCount(t) local count = nil for k, v in pairs(t) do if count == nil then count = util.tableCount(v) elseif count ~= util.tableCount(v) then return nil end end return count end --[[ Splits a list into a table sequence. The items in the list may be separated by commas, or by semicolons (if items may contain commas), or by "###" (if items may contain semicolons). @param {string} listString @returns {table} sequence of list items ]]-- function util.tableFromList(listString) if type(listString) ~= "string" or listString == "" then return nil end local separator = (mw.ustring.find(listString, "###", 0, true ) and "###") or (mw.ustring.find(listString, ";", 0, true ) and ";") or "," local pattern = "%s*"..separator.."%s*" return mw.text.split(listString, pattern) end -- Boolean in outer scope indicating if Kartographer should be able to -- automatically calculate coordinates (see phab:T227402) local coordsDerivedFromFeatures = false; --[[---------------------------------------------------------------------------- Make methods: These take in a table of arguments, and return either a string or a table to be used in the eventual output. ----------------------------------------------------------------------------]]-- local make = {} --[[ Makes content to go inside the maplink or mapframe tag. @param {table} args @returns {string} tag content ]]-- function make.content(args) if util.getParameterValue(args, 'raw') then coordsDerivedFromFeatures = true -- Kartographer should be able to automatically calculate coords from raw geoJSON return util.getParameterValue(args, 'raw') end local content = {} local argsExpanded = {} for k, v in pairs(args) do local index = string.match( k, '^[^0-9]+([0-9]*)$' ) if index ~= nil then local indexNumber = '' if index ~= '' then indexNumber = tonumber(index) else indexNumber = 1 end if argsExpanded[indexNumber] == nil then argsExpanded[indexNumber] = {} end argsExpanded[indexNumber][ string.gsub(k, index, '') ] = v end end for contentIndex, contentArgs in pairs(argsExpanded) do local argType = util.getParameterValue(contentArgs, "type") -- Kartographer automatically calculates coords if geolines/shapes are used (T227402) if not coordsDerivedFromFeatures then coordsDerivedFromFeatures = ( argType == L10n.str.line or argType == L10n.str.shape ) and true or false end if argType == L10n.str.named then local namedCoords = util.getNamedCoords(util.getParameterValue(contentArgs, "from")) local typeKey = type(L10n.para.type) == "table" and L10n.para.type[1] or L10n.para.type local coordKey = type(L10n.para.coord) == "table" and L10n.para.coord[1] or L10n.para.coord local titleKey = type(L10n.para.title) == "table" and L10n.para.title[1] or L10n.para.title local descKey = type(L10n.para.description) == "table" and L10n.para.description[1] or L10n.para.description for _, namedCoord in pairs(namedCoords) do contentArgs[typeKey] = "point" contentArgs[coordKey] = namedCoord.coord contentArgs[titleKey] = namedCoord.name contentArgs[descKey] = namedCoord.description content[#content+1] = make.contentJson(contentArgs) end else content[#content + 1] = make.contentJson(contentArgs) end end --Single item, no array needed if #content==1 then return content[1] end --Multiple items get placed in a FeatureCollection local contentArray = '[\n' .. table.concat( content, ',\n') .. '\n]' return contentArray end --[[ Make coordinates from the coord arg, or the id arg, or the current page's Wikidata item. @param {table} args @param {boolean} [plainOutput] @returns {Mixed} Either: {number, number} latitude, longitude if plainOutput is true; or {table} table sequence of longitude, then latitude (gives the required format for GeoJSON when encoded) ]]-- function make.coords(args, plainOutput) local coords, lat, long local frame = mw.getCurrentFrame() if util.getParameterValue(args, 'coord') then coords = frame:preprocess( util.getParameterValue(args, 'coord') ) lat, long = util.parseCoords(coords) else lat, long = util.wikidataCoords(util.getParameterValue(args, 'id') or mw.wikibase.getEntityIdForCurrentPage()) end if plainOutput then return lat, long end return {[0] = long, [1] = lat} end --[[ Makes a table of coordinates that approximate a circle. @param {table} args @returns {table} sequence of {latitude, longitude} table sequences, where latitude and longitude are both numbers @throws {L10n.error.noCircleCoords} if centre coordinates are not specified @throws {L10n.error.noRadius} if radius is not specified @throws {L10n.error.negativeRadius} if radius is negative or zero @throws {L10n.error.negativeEdges} if edges is negative or zero ]]-- function make.circleCoords(args) local lat, long = make.coords(args, true) local radius = util.getParameterValue(args, 'radius') if not radius then radius = util.getParameterValue(args, 'radiusKm') and tonumber(util.getParameterValue(args, 'radiusKm'))*1000 if not radius then radius = util.getParameterValue(args, 'radiusMi') and tonumber(util.getParameterValue(args, 'radiusMi'))*1609.344 if not radius then radius = util.getParameterValue(args, 'radiusFt') and tonumber(util.getParameterValue(args, 'radiusFt'))*0.3048 end end end local edges = util.getParameterValue(args, 'edges') or L10n.defaults.edges if not lat or not long then error(L10n.error.noCircleCoords, 0) elseif not radius then error(L10n.error.noRadius, 0) elseif tonumber(radius) <= 0 then error(L10n.error.negativeRadius, 0) elseif tonumber(edges) <= 0 then error(L10n.error.negativeEdges, 0) end return util.circleToPolygon(lat, long, radius, tonumber(edges)) end --[[ Makes JSON data for a feature @param contentArgs args for this feature. Keys must be the non-suffixed version of the parameter names, i.e. use type, stroke, fill,... rather than type3, stroke3, fill3,... @returns {string} JSON encoded data ]]-- function make.contentJson(contentArgs) local data = {} if util.getParameterValue(contentArgs, 'type') == L10n.str.point or util.getParameterValue(contentArgs, 'type') == L10n.str.circle then local isCircle = util.getParameterValue(contentArgs, 'type') == L10n.str.circle data.type = "Feature" data.geometry = { type = isCircle and "LineString" or "Point", coordinates = isCircle and make.circleCoords(contentArgs) or make.coords(contentArgs) } data.properties = { title = util.getParameterValue(contentArgs, 'title') or mw.getCurrentFrame():getParent():getTitle() } if isCircle then -- TODO: This is very similar to below, should be extracted into a function data.properties.stroke = util.getParameterValue(contentArgs, 'strokeColor') or L10n.defaults.strokeColor data.properties["stroke-width"] = tonumber(util.getParameterValue(contentArgs, 'strokeWidth')) or L10n.defaults.strokeWidth local strokeOpacity = util.getParameterValue(contentArgs, 'strokeOpacity') if strokeOpacity then data.properties['stroke-opacity'] = tonumber(strokeOpacity) end local fill = util.getParameterValue(contentArgs, 'fill') if fill then data.properties.fill = fill local fillOpacity = util.getParameterValue(contentArgs, 'fillOpacity') data.properties['fill-opacity'] = fillOpacity and tonumber(fillOpacity) or 0.6 end else -- is a point local markerSymbol = util.getParameterValue(contentArgs, 'marker') or L10n.defaults.marker -- allow blank to be explicitly specified, for overriding infoboxes or other templates with a default value if markerSymbol ~= "blank" then data.properties["marker-symbol"] = markerSymbol end data.properties["marker-color"] = util.getParameterValue(contentArgs, 'markerColor') or L10n.defaults.markerColor data.properties["marker-size"] = util.getParameterValue(contentArgs, 'markerSize') or L10n.defaults.markerSize end else data.type = "ExternalData" if util.getParameterValue(contentArgs, 'type') == L10n.str.data or util.getParameterValue(contentArgs, 'from') then data.service = "page" elseif util.getParameterValue(contentArgs, 'type') == L10n.str.line then data.service = "geoline" elseif util.getParameterValue(contentArgs, 'type') == L10n.str.shape then data.service = "geoshape" elseif util.getParameterValue(contentArgs, 'type') == L10n.str.shapeInverse then data.service = "geomask" end if util.getParameterValue(contentArgs, 'id') or (not (util.getParameterValue(contentArgs, 'from')) and mw.wikibase.getEntityIdForCurrentPage()) then data.ids = util.getParameterValue(contentArgs, 'id') or mw.wikibase.getEntityIdForCurrentPage() else data.title = util.getParameterValue(contentArgs, 'from') end data.properties = { stroke = util.getParameterValue(contentArgs, 'strokeColor') or L10n.defaults.strokeColor, ["stroke-width"] = tonumber(util.getParameterValue(contentArgs, 'strokeWidth')) or L10n.defaults.strokeWidth } local strokeOpacity = util.getParameterValue(contentArgs, 'strokeOpacity') if strokeOpacity then data.properties['stroke-opacity'] = tonumber(strokeOpacity) end local fill = util.getParameterValue(contentArgs, 'fill') if fill and (data.service == "geoshape" or data.service == "geomask") then data.properties.fill = fill local fillOpacity = util.getParameterValue(contentArgs, 'fillOpacity') if fillOpacity then data.properties['fill-opacity'] = tonumber(fillOpacity) end end end data.properties.title = util.getParameterValue(contentArgs, 'title') or mw.title.getCurrentTitle().text if util.getParameterValue(contentArgs, 'description') then data.properties.description = util.getParameterValue(contentArgs, 'description') end return mw.text.jsonEncode(data) end --[[ Makes attributes for the maplink or mapframe tag. @param {table} args @param {boolean} [isTitle] Tag is to be displayed in the title of page rather than inline @returns {table<string,string>} key-value pairs of attribute names and values ]]-- function make.tagAttribs(args, isTitle) local attribs = {} if util.getParameterValue(args, 'zoom') then attribs.zoom = util.getParameterValue(args, 'zoom') end if util.isDeclined(util.getParameterValue(args, 'icon')) then attribs.class = "no-icon" end if util.getParameterValue(args, 'type') == L10n.str.point and not coordsDerivedFromFeatures then local lat, long = make.coords(args, 'plainOutput') attribs.latitude = tostring(lat) attribs.longitude = tostring(long) end if util.isAffirmed(util.getParameterValue(args, 'frame')) and not(isTitle) then attribs.width = util.getParameterValue(args, 'frameWidth') or L10n.defaults.frameWidth attribs.height = util.getParameterValue(args, 'frameHeight') or L10n.defaults.frameHeight if util.getParameterValue(args, 'frameCoordinates') then local frameLat, frameLong = util.parseCoords(util.getParameterValue(args, 'frameCoordinates')) attribs.latitude = frameLat attribs.longitude = frameLong else if util.getParameterValue(args, 'frameLatitude') then attribs.latitude = util.getParameterValue(args, 'frameLatitude') end if util.getParameterValue(args, 'frameLongitude') then attribs.longitude = util.getParameterValue(args, 'frameLongitude') end end if not attribs.latitude and not attribs.longitude and not coordsDerivedFromFeatures then local success, lat, long = pcall(util.wikidataCoords, util.getParameterValue(args, 'id') or mw.wikibase.getEntityIdForCurrentPage()) if success then attribs.latitude = tostring(lat) attribs.longitude = tostring(long) end end if util.getParameterValue(args, 'frameAlign') then attribs.align = util.getParameterValue(args, 'frameAlign') end if util.isAffirmed(util.getParameterValue(args, 'plain')) then attribs.frameless = "1" else attribs.text = util.getParameterValue(args, 'text') or L10n.defaults.text end else attribs.text = util.getParameterValue(args, 'text') or L10n.defaults.text end return attribs end --[[ Makes maplink wikitext that will be located in the top-right of the title of the page (the same place where coords with |display=title are positioned). @param {table} args @param {string} tagContent Content for the maplink tag @returns {string} ]]-- function make.titleOutput(args, tagContent) local titleTag = mw.text.tag('maplink', make.tagAttribs(args, true), tagContent) local spanAttribs = { style = "font-size: small;", id = "coordinates" } return mw.text.tag('span', spanAttribs, titleTag) end --[[ Makes maplink or mapframe wikitext that will be located inline. @param {table} args @param {string} tagContent Content for the maplink tag @returns {string} ]]-- function make.inlineOutput(args, tagContent) local tagName = 'maplink' if util.getParameterValue(args, 'frame') then tagName = 'mapframe' end return mw.text.tag(tagName, make.tagAttribs(args), tagContent) end --[[ Makes the HTML required for the swicther to work, including the templatestyles tag. @param {table} params table sequence of {map, label} tables @param {string} params{}.map Wikitext for mapframe map @param {string} params{}.label Label text for swicther option @param {table} options @param {string} options.alignment "left" or "center" or "right" @param {boolean} options.isThumbnail Display in a thumbnail @param {string} options.width Width of frame, e.g. "200" @param {string} [options.caption] Caption wikitext for thumnail @retruns {string} swicther HTML ]]-- function make.switcherHtml(params, options) options = options or {} local frame = mw.getCurrentFrame() local styles = frame:extensionTag{ name = "templatestyles", args = {src = "Template:Maplink/styles-multi.css"} } local container = mw.html.create("div") :addClass("switcher-container") :addClass("mapframe-multi-container") if options.alignment == "left" or options.alignment == "right" then container:addClass("float"..options.alignment) else -- alignment is "center" container:addClass("center") end for i = 1, #params do container :tag("div") :wikitext(params[i].map) :tag("span") :addClass("switcher-label") :css("display", "none") :wikitext(mw.text.trim(params[i].label)) end if not options.isThumbnail then return styles .. tostring(container) end local classlist = container:getAttr("class") classlist = mw.ustring.gsub(classlist, "%a*"..options.alignment, "") container:attr("class", classlist) local outerCountainer = mw.html.create("div") :addClass("mapframe-multi-outer-container") :addClass("mw-kartographer-container") :addClass("thumb") if options.alignment == "left" or options.alignment == "right" then outerCountainer:addClass("t"..options.alignment) else -- alignment is "center" outerCountainer :addClass("tnone") :addClass("center") end outerCountainer :tag("div") :addClass("thumbinner") :css("width", options.width.."px") :node(container) :node(options.caption and mw.html.create("div") :addClass("thumbcaption") :wikitext(options.caption) ) return styles .. tostring(outerCountainer) end --[[ Makes the HTML required for an overlay map to work tag. @param {string} overlayMap wikitext for the overlay map @param {string} baseMap wikitext for the base map @param {table} options various styling/display options @param {string} options.align "left" or "center" or "right" @param {string|number} options.width Width of the base map, e.g. "300" @param {string|number} options.width Height of the base map, e.g. "200" @param {string} options.border Border style for the overlayed map, e.g. "1px solid white" @param {string} options.horizontalAlignment Horizontal alignment for overlay map, "left" or "right" @param {string|number} options.horizontalOffset Horizontal offset in pixels from the alignment edge, e.g "10" @param {string} options.verticalAlignment Vertical alignment for overlay map, "top" or "bottom" @param {string|number} options.verticalOffset Vertical offset in pixels from the alignment edge, e.g. is "10" @param {boolean} options.isThumbnail Display in a thumbnail @param {string} [options.caption] Caption wikitext for thumnail @retruns {string} HTML for basemap with overlay ]]-- function make.overlayHtml(overlayMap, baseMap, options) options = options or {} local containerFloatClass = "float"..(options.align or "none") if options.align == "center" then containerFloatClass = "center" end local containerStyle = { position = "relative", width = options.width .. "px", height = options.height .. "px", overflow = "hidden" -- mobile/minerva tends to add scrollbars for a couple of pixels } if options.align == "center" then containerStyle["margin-left"] = "auto" containerStyle["margin-right"] = "auto" end local container = mw.html.create("div") :addClass("mapframe-withOverlay-container") :addClass(containerFloatClass) :addClass("noresize") :css(containerStyle) local overlayStyle = { position = "absolute", ["z-index"] = "1", border = options.border or "1px solid white" } if options.horizontalAlignment == "right" then overlayStyle.right = options.horizontalOffset .. "px" else overlayStyle.left = options.horizontalOffset .. "px" end if options.verticalAlignment == "bottom" then overlayStyle.bottom = options.verticalOffset .. "px" else overlayStyle.top = options.verticalOffset .. "px" end local overlayDiv = mw.html.create("div") :css(overlayStyle) :wikitext(overlayMap) container :node(overlayDiv) :wikitext(baseMap) if not options.isThumbnail then return tostring(container) end local classlist = container:getAttr("class") classlist = mw.ustring.gsub(classlist, "%a*"..options.align, "") container:attr("class", classlist) local outerCountainer = mw.html.create("div") :addClass("mapframe-withOverlay-outerContainer") :addClass("mw-kartographer-container") :addClass("thumb") if options.align == "left" or options.align == "right" then outerCountainer:addClass("t"..options.align) else -- alignment is "center" outerCountainer :addClass("tnone") :addClass("center") end outerCountainer :tag("div") :addClass("thumbinner") :css("width", options.width.."px") :node(container) :node(options.caption and mw.html.create("div") :addClass("thumbcaption") :wikitext(options.caption) ) return tostring(outerCountainer) end --[[---------------------------------------------------------------------------- Package to be exported, i.e. methods which will available to templates and other modules. ----------------------------------------------------------------------------]]-- local p = {} -- Entry point for templates function p.main(frame) local parent = frame.getParent(frame) -- Check for overlay option local overlay = util.getParameterValue(parent.args, 'overlay') local hasOverlay = overlay and mw.text.trim(overlay) ~= "" -- Check for switch option local switch = util.getParameterValue(parent.args, 'switch') local isMulti = switch and mw.text.trim(switch) ~= "" -- Create output by choosing method to suit options local output if hasOverlay then output = p.withOverlay(parent.args) elseif isMulti then output = p.multi(parent.args) else output = p._main(parent.args) end -- Preprocess output before returning it return frame:preprocess(output) end -- Entry points for modules function p._main(_args) local args = util.trimArgs(_args) local tagContent = make.content(args) local display = mw.text.split(util.getParameterValue(args, 'display') or L10n.defaults.display, '%s*' .. L10n.str.dsep .. '%s*') local displayInTitle = display[1] == L10n.str.title or display[2] == L10n.str.title local displayInline = display[1] == L10n.str.inline or display[2] == L10n.str.inline local output if displayInTitle and displayInline then output = make.titleOutput(args, tagContent) .. make.inlineOutput(args, tagContent) elseif displayInTitle then output = make.titleOutput(args, tagContent) elseif displayInline then output = make.inlineOutput(args, tagContent) else error(L10n.error.badDisplayPara) end return output end function p.multi(_args) local args = util.trimArgs(_args) if not args[L10n.para.switch] then error(L10n.error.noSwitchPara, 0) end local switchParamValue = util.getParameterValue(args, 'switch') local switchLabels = util.tableFromList(switchParamValue) if #switchLabels == 1 then error(L10n.error.oneSwitchLabel, 0) end local mapframeArgs = {} local switchParams = {} for name, val in pairs(args) do -- Copy to mapframeArgs, if not the switch labels or a switch parameter if val ~= switchParamValue and not string.match(val, "^"..L10n.str.switch..":") then mapframeArgs[name] = val end -- Check if this is a param to switch. If so, store the name and switch -- values in switchParams table. local switchList = string.match(val, "^"..L10n.str.switch..":(.+)") if switchList ~= nil then local values = util.tableFromList(switchList) if #values == 1 then error(string.format(L10n.error.oneSwitchValue, name), 0) end switchParams[name] = values end end if util.tableCount(switchParams) == 0 then error(L10n.error.noSwitchLists, 0) end local switchCount = util.subTablesCount(switchParams) if not switchCount then error(L10n.error.switchMismatches, 0) elseif switchCount > #switchLabels then error(string.format(L10n.error.fewerSwitchLabels, switchCount, #switchLabels), 0) end -- Ensure a plain frame will be used (thumbnail will be built by the -- make.switcherHtml function if required, so that switcher options are -- inside the thumnail) mapframeArgs.plain = "yes" local switcher = {} for i = 1, switchCount do local label = switchLabels[i] for name, values in pairs(switchParams) do mapframeArgs[name] = values[i] end table.insert(switcher, { map = p._main(mapframeArgs), label = "Show "..label }) end return make.switcherHtml(switcher, { alignment = args["frame-align"] or "right", isThumbnail = (args.frame and not args.plain) and true or false, width = args["frame-width"] or L10n.defaults.frameWidth, caption = args.text }) end function p.withOverlay(_args) -- Get and trim wikitext for overlay map local overlayMap = _args.overlay if type(overlayMap) == 'string' then overlayMap = overlayMap:match('^%s*(.-)%s*$') end local isThumbnail = (util.getParameterValue(_args, "frame") and not util.getParameterValue(_args, "plain")) and true or false -- Get base map using the _main function, as a plain map local args = util.trimArgs(_args) args.plain = "yes" local basemap = p._main(args) -- Extract overlay options from args local overlayOptions = { width = util.getParameterValue(args, "frameWidth") or L10n.defaults.frameWidth, height = util.getParameterValue(args, "frameHeight") or L10n.defaults.frameHeight, align = util.getParameterValue(args, "frameAlign") or L10n.defaults.frameAlign, border = util.getParameterValue(args, "overlayBorder") or L10n.defaults.overlayBorder, horizontalAlignment = util.getParameterValue(args, "overlayHorizontalAlignment") or L10n.defaults.overlayHorizontalAlignment, horizontalOffset = util.getParameterValue(args, "overlayHorizontalOffset") or L10n.defaults.overlayHorizontalOffset, verticalAlignment = util.getParameterValue(args, "overlayVerticalAlignment") or L10n.defaults.overlayVerticalAlignment, verticalOffset = util.getParameterValue(args, "overlayVerticalOffset") or L10n.defaults.overlayVerticalOffset, isThumbnail = isThumbnail, caption = util.getParameterValue(args, "text") or L10n.defaults.text } -- Make the HTML for the overlaying maps return make.overlayHtml(overlayMap, basemap, overlayOptions) end return p q2e1nzfks3c8oqbgowo6nzjrnbzedov Modul:Math 828 324 937 936 2024-08-09T09:21:40Z Jon Harald Søby 58 2 semakan diimportkan 935 Scribunto text/plain --[[ This module provides a number of basic mathematical operations. ]] local yesno, getArgs -- lazily initialized local p = {} -- Holds functions to be returned from #invoke, and functions to make available to other Lua modules. local wrap = {} -- Holds wrapper functions that process arguments from #invoke. These act as intemediary between functions meant for #invoke and functions meant for Lua. --[[ Helper functions used to avoid redundant code. ]] local function err(msg) -- Generates wikitext error messages. return mw.ustring.format('<strong class="error">Formatting error: %s</strong>', msg) end local function unpackNumberArgs(args) -- Returns an unpacked list of arguments specified with numerical keys. local ret = {} for k, v in pairs(args) do if type(k) == 'number' then table.insert(ret, v) end end return unpack(ret) end local function makeArgArray(...) -- Makes an array of arguments from a list of arguments that might include nils. local args = {...} -- Table of arguments. It might contain nils or non-number values, so we can't use ipairs. local nums = {} -- Stores the numbers of valid numerical arguments. local ret = {} for k, v in pairs(args) do v = p._cleanNumber(v) if v then nums[#nums + 1] = k args[k] = v end end table.sort(nums) for i, num in ipairs(nums) do ret[#ret + 1] = args[num] end return ret end local function fold(func, ...) -- Use a function on all supplied arguments, and return the result. The function must accept two numbers as parameters, -- and must return a number as an output. This number is then supplied as input to the next function call. local vals = makeArgArray(...) local count = #vals -- The number of valid arguments if count == 0 then return -- Exit if we have no valid args, otherwise removing the first arg would cause an error. nil, 0 end local ret = table.remove(vals, 1) for _, val in ipairs(vals) do ret = func(ret, val) end return ret, count end --[[ Fold arguments by selectively choosing values (func should return when to choose the current "dominant" value). ]] local function binary_fold(func, ...) local value = fold((function(a, b) if func(a, b) then return a else return b end end), ...) return value end --[[ random Generate a random number Usage: {{#invoke: Math | random }} {{#invoke: Math | random | maximum value }} {{#invoke: Math | random | minimum value | maximum value }} ]] function wrap.random(args) local first = p._cleanNumber(args[1]) local second = p._cleanNumber(args[2]) return p._random(first, second) end function p._random(first, second) math.randomseed(mw.site.stats.edits + mw.site.stats.pages + os.time() + math.floor(os.clock() * 1000000000)) -- math.random will throw an error if given an explicit nil parameter, so we need to use if statements to check the params. if first and second then if first <= second then -- math.random doesn't allow the first number to be greater than the second. return math.random(first, second) end elseif first then return math.random(first) else return math.random() end end --[[ order Determine order of magnitude of a number Usage: {{#invoke: Math | order | value }} ]] function wrap.order(args) local input_string = (args[1] or args.x or '0'); local input_number = p._cleanNumber(input_string); if input_number == nil then return err('order of magnitude input appears non-numeric') else return p._order(input_number) end end function p._order(x) if x == 0 then return 0 end return math.floor(math.log10(math.abs(x))) end --[[ precision Detemines the precision of a number using the string representation Usage: {{ #invoke: Math | precision | value }} ]] function wrap.precision(args) local input_string = (args[1] or args.x or '0'); local trap_fraction = args.check_fraction; local input_number; if not yesno then yesno = require('Module:Yesno') end if yesno(trap_fraction, true) then -- Returns true for all input except nil, false, "no", "n", "0" and a few others. See [[Modul:Yesno]]. local pos = string.find(input_string, '/', 1, true); if pos ~= nil then if string.find(input_string, '/', pos + 1, true) == nil then local denominator = string.sub(input_string, pos+1, -1); local denom_value = tonumber(denominator); if denom_value ~= nil then return math.log10(denom_value); end end end end input_number, input_string = p._cleanNumber(input_string); if input_string == nil then return err('precision input appears non-numeric') else return p._precision(input_string) end end function p._precision(x) if type(x) == 'number' then x = tostring(x) end x = string.upper(x) local decimal = x:find('%.') local exponent_pos = x:find('E') local result = 0; if exponent_pos ~= nil then local exponent = string.sub(x, exponent_pos + 1) x = string.sub(x, 1, exponent_pos - 1) result = result - tonumber(exponent) end if decimal ~= nil then result = result + string.len(x) - decimal return result end local pos = string.len(x); while x:byte(pos) == string.byte('0') do pos = pos - 1 result = result - 1 if pos <= 0 then return 0 end end return result end --[[ max Finds the maximum argument Usage: {{#invoke:Math| max | value1 | value2 | ... }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.max(args) return p._max(unpackNumberArgs(args)) end function p._max(...) local max_value = binary_fold((function(a, b) return a > b end), ...) if max_value then return max_value end end --[[ median Find the median of set of numbers Usage: {{#invoke:Math | median | number1 | number2 | ...}} OR {{#invoke:Math | median }} ]] function wrap.median(args) return p._median(unpackNumberArgs(args)) end function p._median(...) local vals = makeArgArray(...) local count = #vals table.sort(vals) if count == 0 then return 0 end if p._mod(count, 2) == 0 then return (vals[count/2] + vals[count/2+1])/2 else return vals[math.ceil(count/2)] end end --[[ min Finds the minimum argument Usage: {{#invoke:Math| min | value1 | value2 | ... }} OR {{#invoke:Math| min }} When used with no arguments, it takes its input from the parent frame. Note, any values that do not evaluate to numbers are ignored. ]] function wrap.min(args) return p._min(unpackNumberArgs(args)) end function p._min(...) local min_value = binary_fold((function(a, b) return a < b end), ...) if min_value then return min_value end end --[[ sum Finds the sum Usage: {{#invoke:Math| sum | value1 | value2 | ... }} OR {{#invoke:Math| sum }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.sum(args) return p._sum(unpackNumberArgs(args)) end function p._sum(...) local sums, count = fold((function(a, b) return a + b end), ...) if not sums then return 0 else return sums end end --[[ average Finds the average Usage: {{#invoke:Math| average | value1 | value2 | ... }} OR {{#invoke:Math| average }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.average(args) return p._average(unpackNumberArgs(args)) end function p._average(...) local sum, count = fold((function(a, b) return a + b end), ...) if not sum then return 0 else return sum / count end end --[[ round Rounds a number to specified precision Usage: {{#invoke:Math | round | value | precision }} --]] function wrap.round(args) local value = p._cleanNumber(args[1] or args.value or 0) local precision = p._cleanNumber(args[2] or args.precision or 0) if value == nil or precision == nil then return err('round input appears non-numeric') else return p._round(value, precision) end end function p._round(value, precision) local rescale = math.pow(10, precision or 0); return math.floor(value * rescale + 0.5) / rescale; end --[[ log10 returns the log (base 10) of a number Usage: {{#invoke:Math | log10 | x }} ]] function wrap.log10(args) return math.log10(args[1]) end --[[ mod Implements the modulo operator Usage: {{#invoke:Math | mod | x | y }} --]] function wrap.mod(args) local x = p._cleanNumber(args[1]) local y = p._cleanNumber(args[2]) if not x then return err('first argument to mod appears non-numeric') elseif not y then return err('second argument to mod appears non-numeric') else return p._mod(x, y) end end function p._mod(x, y) local ret = x % y if not (0 <= ret and ret < y) then ret = 0 end return ret end --[[ gcd Calculates the greatest common divisor of multiple numbers Usage: {{#invoke:Math | gcd | value 1 | value 2 | value 3 | ... }} --]] function wrap.gcd(args) return p._gcd(unpackNumberArgs(args)) end function p._gcd(...) local function findGcd(a, b) local r = b local oldr = a while r ~= 0 do local quotient = math.floor(oldr / r) oldr, r = r, oldr - quotient * r end if oldr < 0 then oldr = oldr * -1 end return oldr end local result, count = fold(findGcd, ...) return result end --[[ precision_format Rounds a number to the specified precision and formats according to rules originally used for {{template:Rnd}}. Output is a string. Usage: {{#invoke: Math | precision_format | number | precision }} ]] function wrap.precision_format(args) local value_string = args[1] or 0 local precision = args[2] or 0 return p._precision_format(value_string, precision) end function p._precision_format(value_string, precision) -- For access to Mediawiki built-in formatter. local lang = mw.getContentLanguage(); local value value, value_string = p._cleanNumber(value_string) precision = p._cleanNumber(precision) -- Check for non-numeric input if value == nil or precision == nil then return err('invalid input when rounding') end local current_precision = p._precision(value) local order = p._order(value) -- Due to round-off effects it is neccesary to limit the returned precision under -- some circumstances because the terminal digits will be inaccurately reported. if order + precision >= 14 then if order + p._precision(value_string) >= 14 then precision = 13 - order; end end -- If rounding off, truncate extra digits if precision < current_precision then value = p._round(value, precision) current_precision = p._precision(value) end local formatted_num = lang:formatNum(math.abs(value)) local sign -- Use proper unary minus sign rather than ASCII default if value < 0 then sign = '−' else sign = '' end -- Handle cases requiring scientific notation if string.find(formatted_num, 'E', 1, true) ~= nil or math.abs(order) >= 9 then value = value * math.pow(10, -order) current_precision = current_precision + order precision = precision + order formatted_num = lang:formatNum(math.abs(value)) else order = 0; end formatted_num = sign .. formatted_num -- Pad with zeros, if needed if current_precision < precision then local padding if current_precision <= 0 then if precision > 0 then local zero_sep = lang:formatNum(1.1) formatted_num = formatted_num .. zero_sep:sub(2,2) padding = precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end else padding = precision - current_precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end end -- Add exponential notation, if necessary. if order ~= 0 then -- Use proper unary minus sign rather than ASCII default if order < 0 then order = '−' .. lang:formatNum(math.abs(order)) else order = lang:formatNum(order) end formatted_num = formatted_num .. '<span style="margin:0 .15em 0 .25em">×</span>10<sup>' .. order .. '</sup>' end return formatted_num end --[[ divide Implements the division operator Usage: {{#invoke:Math | divide | x | y | round= | precision= }} --]] function wrap.divide(args) local x = args[1] local y = args[2] local round = args.round local precision = args.precision if not yesno then yesno = require('Module:Yesno') end return p._divide(x, y, yesno(round), precision) end function p._divide(x, y, round, precision) if y == nil or y == "" then return err("Empty divisor") elseif not tonumber(y) then if type(y) == 'string' and string.sub(y, 1, 1) == '<' then return y else return err("Not a number: " .. y) end elseif x == nil or x == "" then return err("Empty dividend") elseif not tonumber(x) then if type(x) == 'string' and string.sub(x, 1, 1) == '<' then return x else return err("Not a number: " .. x) end else local z = x / y if round then return p._round(z, 0) elseif precision then return p._round(z, precision) else return z end end end --[[ Helper function that interprets the input numerically. If the input does not appear to be a number, attempts evaluating it as a parser functions expression. ]] function p._cleanNumber(number_string) if type(number_string) == 'number' then -- We were passed a number, so we don't need to do any processing. return number_string, tostring(number_string) elseif type(number_string) ~= 'string' or not number_string:find('%S') then -- We were passed a non-string or a blank string, so exit. return nil, nil; end -- Attempt basic conversion local number = tonumber(number_string) -- If failed, attempt to evaluate input as an expression if number == nil then local success, result = pcall(mw.ext.ParserFunctions.expr, number_string) if success then number = tonumber(result) number_string = tostring(number) else number = nil number_string = nil end else number_string = number_string:match("^%s*(.-)%s*$") -- String is valid but may contain padding, clean it. number_string = number_string:match("^%+(.*)$") or number_string -- Trim any leading + signs. if number_string:find('^%-?0[xX]') then -- Number is using 0xnnn notation to indicate base 16; use the number that Lua detected instead. number_string = tostring(number) end end return number, number_string end --[[ Wrapper function that does basic argument processing. This ensures that all functions from #invoke can use either the current frame or the parent frame, and it also trims whitespace for all arguments and removes blank arguments. ]] local mt = { __index = function(t, k) return function(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return wrap[k](getArgs(frame)) -- Argument processing is left to Module:Arguments. Whitespace is trimmed and blank arguments are removed. end end } return setmetatable(p, mt) nf37ckm4rklpkejkbg7k01ss8lz06ol Modul:Message box 828 325 940 939 2024-08-09T09:21:41Z Jon Harald Søby 58 2 semakan diimportkan 938 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Modul:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Kategori:%s|%s]]', cat, sort) else cat = string.format('[[Kategori:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[Fail:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Modul:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Templat:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) 3ea43d4jh7b55zhilhb7tr2o6f0mkma Modul:Message box/configuration 828 326 944 943 2024-08-09T09:21:41Z Jon Harald Søby 58 3 semakan diimportkan 941 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Modul:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Bantuan:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } fl5u0k5cizecujbyd0zfmotvv93bgon Modul:Message box/ombox.css 828 327 947 946 2024-08-09T09:21:41Z Jon Harald Søby 58 2 semakan diimportkan 946 sanitized-css text/css /* {{Pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 0dl85041i4lbjfzban27a0kd9jtbujd Modul:Namespace detect 828 328 949 948 2024-08-09T09:21:42Z Jon Harald Søby 58 1 semakan diimportkan 948 Scribunto text/plain --[[ -------------------------------------------------------------------------------- -- -- -- NAMESPACE DETECT -- -- -- -- This module implements the {{namespace detect}} template in Lua, with a -- -- few improvements: all namespaces and all namespace aliases are supported, -- -- and namespace names are detected automatically for the local wiki. The -- -- module can also use the corresponding subject namespace value if it is -- -- used on a talk page. Parameter names can be configured for different wikis -- -- by altering the values in the "cfg" table in -- -- Module:Namespace detect/config. -- -- -- -------------------------------------------------------------------------------- --]] local data = mw.loadData('Module:Namespace detect/data') local argKeys = data.argKeys local cfg = data.cfg local mappings = data.mappings local yesno = require('Module:Yesno') local mArguments -- Lazily initialise Module:Arguments local mTableTools -- Lazily initilalise Module:TableTools local ustringLower = mw.ustring.lower local p = {} local function fetchValue(t1, t2) -- Fetches a value from the table t1 for the first key in array t2 where -- a non-nil value of t1 exists. for i, key in ipairs(t2) do local value = t1[key] if value ~= nil then return value end end return nil end local function equalsArrayValue(t, value) -- Returns true if value equals a value in the array t. Otherwise -- returns false. for i, arrayValue in ipairs(t) do if value == arrayValue then return true end end return false end function p.getPageObject(page) -- Get the page object, passing the function through pcall in case of -- errors, e.g. being over the expensive function count limit. if page then local success, pageObject = pcall(mw.title.new, page) if success then return pageObject else return nil end else return mw.title.getCurrentTitle() end end -- Provided for backward compatibility with other modules function p.getParamMappings() return mappings end local function getNamespace(args) -- This function gets the namespace name from the page object. local page = fetchValue(args, argKeys.demopage) if page == '' then page = nil end local demospace = fetchValue(args, argKeys.demospace) if demospace == '' then demospace = nil end local subjectns = fetchValue(args, argKeys.subjectns) local ret if demospace then -- Handle "demospace = main" properly. if equalsArrayValue(argKeys.main, ustringLower(demospace)) then ret = mw.site.namespaces[0].name else ret = demospace end else local pageObject = p.getPageObject(page) if pageObject then if pageObject.isTalkPage then -- Get the subject namespace if the option is set, -- otherwise use "talk". if yesno(subjectns) then ret = mw.site.namespaces[pageObject.namespace].subject.name else ret = 'talk' end else ret = pageObject.nsText end else return nil -- return nil if the page object doesn't exist. end end ret = ret:gsub('_', ' ') return ustringLower(ret) end function p._main(args) -- Check the parameters stored in the mappings table for any matches. local namespace = getNamespace(args) or 'other' -- "other" avoids nil table keys local params = mappings[namespace] or {} local ret = fetchValue(args, params) --[[ -- If there were no matches, return parameters for other namespaces. -- This happens if there was no text specified for the namespace that -- was detected or if the demospace parameter is not a valid -- namespace. Note that the parameter for the detected namespace must be -- completely absent for this to happen, not merely blank. --]] if ret == nil then ret = fetchValue(args, argKeys.other) end return ret end function p.main(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {removeBlanks = false}) local ret = p._main(args) return ret or '' end function p.table(frame) --[[ -- Create a wikitable of all subject namespace parameters, for -- documentation purposes. The talk parameter is optional, in case it -- needs to be excluded in the documentation. --]] -- Load modules and initialise variables. mTableTools = require('Module:TableTools') local namespaces = mw.site.namespaces local cfg = data.cfg local useTalk = type(frame) == 'table' and type(frame.args) == 'table' and yesno(frame.args.talk) -- Whether to use the talk parameter. -- Get the header names. local function checkValue(value, default) if type(value) == 'string' then return value else return default end end local nsHeader = checkValue(cfg.wikitableNamespaceHeader, 'Namespace') local aliasesHeader = checkValue(cfg.wikitableAliasesHeader, 'Aliases') -- Put the namespaces in order. local mappingsOrdered = {} for nsname, params in pairs(mappings) do if useTalk or nsname ~= 'talk' then local nsid = namespaces[nsname].id -- Add 1, as the array must start with 1; nsid 0 would be lost otherwise. nsid = nsid + 1 mappingsOrdered[nsid] = params end end mappingsOrdered = mTableTools.compressSparseArray(mappingsOrdered) -- Build the table. local ret = '{| class="wikitable"' .. '\n|-' .. '\n! ' .. nsHeader .. '\n! ' .. aliasesHeader for i, params in ipairs(mappingsOrdered) do for j, param in ipairs(params) do if j == 1 then ret = ret .. '\n|-' .. '\n| <code>' .. param .. '</code>' .. '\n| ' elseif j == 2 then ret = ret .. '<code>' .. param .. '</code>' else ret = ret .. ', <code>' .. param .. '</code>' end end end ret = ret .. '\n|-' .. '\n|}' return ret end return p j7kygz1y56jpz4doq0m2c6x1td5d8ar Modul:Namespace detect/config 828 329 951 950 2024-08-09T09:21:42Z Jon Harald Søby 58 1 semakan diimportkan 950 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- -- -- -- To activate a configuration item, you need to uncomment it. This means -- -- that you need to remove the text "-- " at the start of the line. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. Values added -- -- here will work in addition to the default English parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- cfg.foo = 'parameter name' -- -- -- -- To add multiple names, you can use this format: -- -- -- -- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} -- -------------------------------------------------------------------------------- ---- This parameter displays content for the main namespace: -- cfg.main = 'main' ---- This parameter displays in talk namespaces: -- cfg.talk = 'talk' ---- This parameter displays content for "other" namespaces (namespaces for which ---- parameters have not been specified): -- cfg.other = 'other' ---- This parameter makes talk pages behave as though they are the corresponding ---- subject namespace. Note that this parameter is used with [[Modul:Yesno]]. ---- Edit that module to change the default values of "yes", "no", etc. -- cfg.subjectns = 'subjectns' ---- This parameter sets a demonstration namespace: -- cfg.demospace = 'demospace' ---- This parameter sets a specific page to compare: cfg.demopage = 'page' -------------------------------------------------------------------------------- -- Table configuration -- -- These configuration items allow customisation of the "table" function, -- -- used to generate a table of possible parameters in the module -- -- documentation. -- -------------------------------------------------------------------------------- ---- The header for the namespace column in the wikitable containing the list of ---- possible subject-space parameters. -- cfg.wikitableNamespaceHeader = 'Namespace' ---- The header for the wikitable containing the list of possible subject-space ---- parameters. -- cfg.wikitableAliasesHeader = 'Aliases' -------------------------------------------------------------------------------- -- End of configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. b07f4zh4ekotgh18pzm2nppzyky73s7 Modul:Namespace detect/data 828 330 953 952 2024-08-09T09:21:42Z Jon Harald Søby 58 1 semakan diimportkan 952 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Modul:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addKey(t, key, defaultKey) if key ~= defaultKey then t[#t + 1] = key end end -- Get a table of parameters to query for each default parameter name. -- This allows wikis to customise parameter names in the cfg table while -- ensuring that default parameter names will always work. The cfg table -- values can be added as a string, or as an array of strings. local defaultKeys = { 'main', 'talk', 'other', 'subjectns', 'demospace', 'demopage' } local argKeys = {} for i, defaultKey in ipairs(defaultKeys) do argKeys[defaultKey] = {defaultKey} end for defaultKey, t in pairs(argKeys) do local cfgValue = cfg[defaultKey] local cfgValueType = type(cfgValue) if cfgValueType == 'string' then addKey(t, cfgValue, defaultKey) elseif cfgValueType == 'table' then for i, key in ipairs(cfgValue) do addKey(t, key, defaultKey) end end cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more. end local function getParamMappings() --[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]] local mappings = {} local mainNsName = mw.site.subjectNamespaces[0].name mainNsName = mw.ustring.lower(mainNsName) mappings[mainNsName] = mw.clone(argKeys.main) mappings['talk'] = mw.clone(argKeys.talk) for nsid, ns in pairs(mw.site.subjectNamespaces) do if nsid ~= 0 then -- Exclude main namespace. local nsname = mw.ustring.lower(ns.name) local canonicalName = mw.ustring.lower(ns.canonicalName) mappings[nsname] = {nsname} if canonicalName ~= nsname then table.insert(mappings[nsname], canonicalName) end for _, alias in ipairs(ns.aliases) do table.insert(mappings[nsname], mw.ustring.lower(alias)) end end end return mappings end return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings() } 5221yzje3k4fq4nxe38rwh8v8cibohy Modul:Native name 828 331 955 954 2024-08-09T09:21:42Z Jon Harald Søby 58 1 semakan diimportkan 954 Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local lang_module = require ('Module:Lang'); local yes_no = require('Module:Yesno') local defined_values = { italic = {['no']='no', ['off']='no'}, -- values accepted by |italic= and |italics=; {{lang}} expects 'no' so 'off' must be translated paren = {['no']=true, ['off']=true, ['omit']=true}, -- values accepted by |paren= } local messages_t = { tag_required = 'an IETF language tag as parameter {{{1}}} is required', -- for {{native name}} name_required = 'a name as parameter {{{2}}} is required', tag_required_idx = 'an IETF language tag in |tag%s= is required', -- for {{native name}} when called from {{native name list}} name_required_idx = 'a name in |name%s= is required', empty_list = 'list is empty', -- for {{native name list}} positional = 'positional parameters not supported', br_list = '&lt;br /> lists not allowed', -- for {{native name checker}} list_markup = 'list markup expected for multiple names', malformed_param = 'parameter value is malformed', } local help_links_t = { ['native name'] = '[[Templat:Native name|help]]', ['native name checker'] = '[[Templat:Native name checker|help]]', ['native name list'] = '[[Templat:Native name list|help]]', } local error_cats_t = { ['native name'] = '[[Kategori:Native name template errors]]', ['native name checker'] = '[[Kategori:Native name checker template errors]]', ['native name list'] = '[[Kategori:Native name list template errors]]', } --[[--------------------------< E R R O R _ M S G >------------------------------------------------------------ returns a formatted error message ]] local function error_msg (msg, template, index) local cat = ((0 == mw.title.getCurrentTitle().namespace) and error_cats_t[template]) or ''; if index then local message = string.format (msg, index); return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, message, help_links_t[template], cat) end return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, msg, help_links_t[template], cat) end --[=[-------------------------< _ N A T I V E _ N A M E >------------------------------------------------------ implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Parameters that are supported are: args_t[1] - IETF language tag (required) args_t[2] - the native name (required) args_t.italic - accepts string values 'no' or 'off'; {{lang}} expects 'no' so 'off' must be translated args_t.italics - alias of |italic= args_t.paren - accepts 'omit', 'off', or 'no' args_t.icon - alias of paren args_t.parensize - args_t.fontsize - deprecated alias of |parensize= args_t.nolink - any value inhibits wikilinking of language name args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty' error message; mostly for use within another template this function calls these functions in Module:lang: _is_ietf_tag _lang _name_from_tag TODO: add support for romanization and transliteration? add support for postfix so that 'mis' can render something like this: {{native|name|mis|Chotilapacquen|parent=omit|postfix=&#32;([[Coahuiltecan languages|Coahuiltecan]])}} Chotilapacquen (Coahuiltecan) ]=] local function _native_name (args_t) local template = (args_t.template and args_t.template) or 'native name'; -- for error messaging; use 'native name list' when called from native_name_list(), etc if not (args_t[1] or args_t[2]) and yes_no (args_t.suppress_empty_list_error) then return ''; -- if empty list error is suppressed, return empty string elseif not args_t[1] then return error_msg ((args_t.index and messages_t.tag_required_idx) or messages_t.tag_required, template, args_t.index) elseif not args_t[2] then return error_msg ((args_t.index and messages_t.name_required_idx) or messages_t.name_required, template, args_t.index) end args_t.italic = args_t.italics or args_t.italic; -- plural form first in {{native name}} but singular form for {{lang}} args_t.italic = defined_values.italic[args_t.italic] or nil; -- translate assigned value args_t.italics = nil; -- so unset as unneeded args_t.paren = args_t.paren or args_t.icon; args_t.icon = nil; -- unset as unneeded args_t.parensize = args_t.parensize or args_t.fontsize or '100%'; args_t.fontsize = nil; -- unset as unneeded local out_t = {}; table.insert (out_t, lang_module._lang ({args_t[1], args_t[2], ['italic']=args_t.italic, ['template']=template})); if not defined_values.paren[args_t.paren] then table.insert (out_t, '&nbsp;'); table.insert (out_t, table.concat ({ '<span class="languageicon" style="font-size:', args_t.parensize, '; font-weight:normal">'})); if args_t.nolink then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['template']=template}), ')'})); else if lang_module._is_ietf_tag (args_t[1]) then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['link'] ='yes', ['template']=template}), ')'})); else table.insert (out_t, '(language?)'); -- TODO: any reason to keep this? end end table.insert (out_t, '</span>'); end return table.concat (out_t); end --[[--------------------------< N A T I V E _ N A M E >-------------------------------------------------------- implements {{native name}}; entry point from the template {{#invoke:native name|native_name|<tag>|<name>|italic=|paren=|parensize=|nolink=}} ]] local function native_name (frame) return _native_name (getArgs (frame)); end --[[--------------------------> _ N A T I V E _ N A M E _ L I S T >-------------------------------------------- implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Supports enumerated forms of the {{native name}} parameters: args_t.tagn - IETF language tag (|tag1= required) args_t.namen - the native name (|name1= required) args_t.italicn - accepts string values 'no' or 'off' args_t.italicsn - alias of |italicn= args_t.parenn - accepts 'omit', 'off', or 'no' args_t.iconn - alias of paren args_t.parensizen - args_t.fontsizen - deprecated alias of |parensizen= args_t.nolinkn - any value inhibits wikilinking of language name also supports: args_t.postfixn - wikitext to be appended to list item n (references other appropriate text) args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty list' error message; mostly for use within another template ]] local function _native_name_list (args_t) if args_t[1] then return error_msg (messages_t.positional, 'native name list') end local unsorted_enumerators_t = {} -- unsorted k/v table of tagn and namen enumerators where k is the enumerator and v is always true for param, _ in pairs (args_t) do -- loop through all parameters local enumerator = mw.ustring.match (param, "^tag(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if enumerator then -- if there is an enumerator unsorted_enumerators_t[tonumber(enumerator)] = true -- add enumerator to the table else local name_match = mw.ustring.match (param, "^name(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if name_match then -- if there is an enumerator unsorted_enumerators_t[tonumber (name_match)] = true -- add enumerator to the table end end end local enumerators_t = {} -- will hold a sorted sequence of enumerators for n, _ in pairs (unsorted_enumerators_t) do -- loop through the k/v table of enumerators table.insert (enumerators_t, n) -- add the enumerator to the sequence end table.sort (enumerators_t) -- and ascending sort local list_t = {}; -- list of formatted native names goes here for _, n in ipairs (enumerators_t) do -- loop through the sorted enumerators table.insert (list_t, table.concat ({ _native_name ({ -- go render the native name args_t['tag'..n], args_t['name'..n], ['italic'] = args_t['italic'..n], ['italics'] = args_t['italics'..n], ['paren'] = args_t['paren'..n], ['icon'] = args_t['icon'..n], ['parensize'] = args_t['parensize'..n], ['fontsize'] = args_t['fontsize'..n], ['nolink'] = args_t['nolink'..n], ['template'] = 'native name list', -- for error messaging ['index'] = n, -- for error messaging }), args_t['postfix'..n] or '', })); end if 0 == #list_t then return (yes_no (args_t.suppress_empty_list_error) and '') or -- return empty string when error suppressed error_msg (messages_t.empty_list, 'native name list'); -- otherwise error elseif 1 == #list_t then return list_t[1]; -- return the very short list; TODO: add error? else return require ('Module:List').unbulleted (list_t); -- use unbulleted list from module end end --[[--------------------------< N A T I V E _ N A M E _ L I S T >---------------------------------------------- implements {{native name list}}; entry point from the template {{#invoke:native name list|native_name_list|tag1=<tag>|name1=<name>|italic1=|paren1=|parensize1=|nolink1=}} ]] local function native_name_list (frame) return _native_name_list (getArgs (frame)); end --[[--------------------------< _ N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} for use inside infoboxen: |dataxx = {{native name checker|{{{native_name|}}}}} inspects rendered content of {{{native_name}}}: expects: at least one lang="<valid IETF tag>" html attribute; tag must begin with 2 or three letters followed by a hyphen or double quote character: lang="zh-Hant" or lang="nav" or lang="oj" emits error message when 2 or more lang="<valid IETF tag>" html attribute but list markup <li> tag not found emits error message if any form of '<br />' tag is found per MOS:NOBREAK returns: nothing when |native_name= is omitted or empty assigned value when no error error message on error ]] local function _native_name_checker (args_t) local value = args_t[1]; if not value then -- if |native_name= is omitted or empty return; -- return nothing end local _, count = value:gsub ('lang="%a%a%a?[%-"]%a*', '%1'); if 0 == count then return table.concat ({value, error_msg (messages_t.malformed_param, 'native name checker')}, ' '); -- no {{lang}} or {{native_name}} template end if 1 < count then if not value:find ('<div class="plainlist *" *>') or not value:find ('</div>$') then -- must be wrapped in 'plainlist' div return table.concat ({value, error_msg (messages_t.list_markup, 'native name checker')}, ' '); end end if value:find ('< */? *[Bb][Rr] */? *>') then -- look for something that vaguely resembles a <br /> tag return table.concat ({value, error_msg (messages_t.br_list, 'native name checker')}, ' '); end return value; -- no failed tests, return the value as is end --[[--------------------------< N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} ]] local function native_name_checker (frame) return _native_name_checker (getArgs (frame)); end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { native_name = native_name, -- template interface native_name_list = native_name_list, native_name_checker = native_name_checker, _native_name = _native_name, -- other module interface _native_name_list = _native_name_list, _native_name_checker = _native_name_checker, } qjeilwovan4bvatf9aunaupu4r8yne9 Modul:Navbar 828 332 958 957 2024-08-09T09:21:42Z Jon Harald Søby 58 2 semakan diimportkan 957 Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[|', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 5mj1josf0yiqi1b3udywdim7vp0xvvl Modul:Navbar/configuration 828 333 960 959 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 959 Scribunto text/plain local configuration = { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } return configuration euidki6p5y779y3t22gmvkjf2jgpam7 Modul:Navbar/styles.css 828 334 962 961 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 961 sanitized-css text/css /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } /* Navbar styling when nested in infobox and navbox Should consider having a separate TemplateStyles for those specific places using an infobox/navbox and a navbar, or possibly override from using template */ .infobox .navbar { font-size: 100%; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } slh5ct0wdlbpnikxf7x7x9dfeswx1km Modul:No globals 828 335 964 963 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 963 Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) gggsv54pq7f94l3up48hr91qtxnskdm Modul:Pagetype 828 336 966 965 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 965 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- PAGETYPE -- -- -- -- This is a meta-module intended to replace {{pagetype}} and similar -- -- templates. It automatically detects namespaces, and allows for a -- -- great deal of customisation. It can easily be ported to other -- -- wikis by changing the values in the [[Modul:Pagetype/config]]. -- -- -- -------------------------------------------------------------------------------- -- Load config. local cfg = mw.loadData('Module:Pagetype/config') -- Load required modules. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local mDisambiguation = require('Module:Disambiguation') local p = {} -- Look up a namespace argument in the args table. local function lookUpNamespaceArg(args, key) local arg = args[key] -- Convert "yes", "1" etc. to true, "no", "0" etc. to false, and leave -- other values the same. return yesno(arg, arg) end -- Append multiple values to an array local function appendMultiple(target, source) for _, value in ipairs(source) do table.insert(target, value) end end -- Get argument keys for a title's namespace local function getNamespaceArgKeys(title, cfg) local nsInfo = mw.site.namespaces[title.namespace] local customAliases = cfg.customNamespaceAliases[title.namespace] or {} local keys = {} if nsInfo.name ~= '' then table.insert(keys, nsInfo.name) end if nsInfo.canonicalName ~= nsInfo.name and nsInfo.canonicalName ~= '' then table.insert(keys, nsInfo.canonicalName) end appendMultiple(keys, nsInfo.aliases) appendMultiple(keys, customAliases) return keys end -- Get the argument for a title's namespace, if it was specified in the args -- table. local function getNamespaceArg(title, args, cfg) if title.isTalkPage then return lookUpNamespaceArg(args, cfg.talk) end for _, key in ipairs(getNamespaceArgKeys(title, cfg)) do local arg = lookUpNamespaceArg(args, mw.ustring.lower(key)) if arg ~= nil then return arg end end return nil end -- Look up a page type specific to the title's namespace local function getExplicitPageType(title, cfg) if title.isTalkPage then return cfg.talkDefault else return cfg.pagetypes[title.namespace] end end -- Get a default page type that is not specific to the title's namespace local function getDefaultPageType(args, cfg) local other = lookUpNamespaceArg(args, cfg.other) if type(other) == 'string' then return other else return cfg.otherDefault end end local function detectRedirects(title, args) local redirect = lookUpNamespaceArg(args, cfg.redirect) if redirect == false then -- Don't detect redirects if they have been specifically disallowed. return nil end -- Allow custom values for redirects. if not title.isRedirect then return nil elseif type(redirect) == 'string' then return redirect else return cfg.redirectDefault end end local function detectDisambiguationPages(title, args, cfg) if title.namespace ~= 0 then -- Only detect disambiguation pages in mainspace return nil end local dab = lookUpNamespaceArg(args, cfg.dab) if dab == false then -- Don't detect disambiguation pages if explicitly disallowed return nil end if not mDisambiguation.isDisambiguation(title:getContent()) then return nil elseif type(dab) == 'string' then return dab else return cfg.dabDefault end end -- Gets the pagetype from a class specified from the first positional -- parameter. local function getPageTypeFromClass(args, class, key, aliasTable, default) local arg = lookUpNamespaceArg(args, key) if arg == false then -- Don't check for this class if it is specifically disallowed. return nil end if aliasTable[class] then if type(arg) == 'string' then return arg else return default end end return nil end -- Get page types for mainspaces pages with an explicit class specified local function getMainNamespaceClassPageType(title, args, cfg) if title.namespace ~= 0 then return nil end local class = args[1] if type(class) == 'string' then -- Put in lower case so e.g. "na" and "NA" will both match. class = mw.ustring.lower(class) end return getPageTypeFromClass( args, class, cfg.na, cfg.naAliases, cfg.naDefault ) end -- Get page type specified by an explicit namespace argument. local function getNamespaceArgPageType(title, args, cfg) local namespaceArg = getNamespaceArg(title, args, cfg) if namespaceArg == true then -- Namespace has been explicitly enabled, so return the default for -- this namespace return getExplicitPageType(title, cfg) elseif namespaceArg == false then -- Namespace has been explicitly disabled return getDefaultPageType(args, cfg) elseif namespaceArg then -- This namespaces uses custom text return namespaceArg else return nil end end -- Whether the title is in the set of default active namespaces which are -- looked up in cfg.pagetypes. local function isInDefaultActiveNamespace(title, args, cfg) local defaultNamespacesKey = args[cfg.defaultns] if defaultNamespacesKey == cfg.defaultnsAll then return true end local defaultNamespaces if defaultNamespacesKey == cfg.defaultnsExtended then defaultNamespaces = cfg.extendedNamespaces elseif defaultNamespacesKey == cfg.defaultnsNone then defaultNamespaces = {} else defaultNamespaces = cfg.defaultNamespaces end return defaultNamespaces[title.namespace] or false end -- Get page type not specified or detected by other means local function getOtherPageType(title, args, cfg) if isInDefaultActiveNamespace(title, args, cfg) then return getExplicitPageType(title, cfg) else return getDefaultPageType(args, cfg) end end local function getPageType(title, args, cfg) return ( detectRedirects(title, args, cfg) or detectDisambiguationPages(title, args, cfg) or getMainNamespaceClassPageType(title, args, cfg) or getNamespaceArgPageType(title, args, cfg) or getOtherPageType(title, args, cfg) ) end local function shouldUseSubjectTitle(args, cfg) return not yesno(args.talk, true) and args[cfg.defaultns] ~= cfg.defaultnsAll end -- Get the Scribunto title object to fetch the page type of local function getTitle(args, cfg) local title if args.page then title = mw.title.new(args.page) if not title then return nil end else title = mw.title.getCurrentTitle() end if shouldUseSubjectTitle(args, cfg) then return title.subjectPageTitle else return title end end local function pluralize(pageType, cfg) if cfg.irregularPlurals[pageType] then return cfg.irregularPlurals[pageType] else return pageType .. cfg.plural -- often 's' end end local function capitalize(pageType) local first = mw.ustring.sub(pageType, 1, 1) local rest = mw.ustring.sub(pageType, 2) return mw.ustring.upper(first) .. rest end function p._main(args) local title = getTitle(args, cfg) local pageType = getPageType(title, args, cfg) if yesno(args.plural, false) then pageType = pluralize(pageType, cfg) end if yesno(args.caps, false) then pageType = capitalize(pageType) end return pageType end function p.main(frame) local args = getArgs(frame) return p._main(args) end return p fwhnomr7jwrcyrtdkdvunq7dtkcmu0w Modul:Pagetype/config 828 337 968 967 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 967 Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Pagetype configuration data -- -- This page holds localisation and configuration data for Module:Pagetype. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -- This table holds the default page types for each namespace. Keys to this -- table should be integers that can be used as keys to mw.site.namespaces. cfg.pagetypes = { [0] = 'article', -- Main namespace [2] = 'user page', [4] = 'project page', [6] = 'file', [8] = 'interface page', -- MediaWiki namespace [10] = 'template', [12] = 'help page', [14] = 'category', [100] = 'portal', [118] = 'draft', [710] = 'Timed Text page', [828] = 'module', [2300] = 'gadget', [2302] = 'gadget definition', [-1] = 'special page', [-2] = 'file', -- Media namespace } -- This table holds the namespaces to be looked up from cfg.pagetypes by -- default. cfg.defaultNamespaces = { [0] = true, -- main [6] = true, -- file [10] = true, -- template [14] = true, -- category [828] = true, -- module } -- This table holds the namespaces to be looked up from cfg.pagetypes if -- cfg.defaultnsExtended is set. cfg.extendedNamespaces = { [0] = true, -- main [2] = true, -- user [4] = true, -- project [6] = true, -- file [8] = true, -- mediawiki [10] = true, -- template [12] = true, -- help [14] = true, -- category [100] = true, -- portal [118] = true, -- draft [828] = true, -- module } -- This table holds custom aliases for each namespace. cfg.customNamespaceAliases = { [0] = {'main'}, } -- The parameter name to set which default namespace values to be looked up from -- cfg.pagetypes. cfg.defaultns = 'defaultns' -- The value of cfg.defaultns to set all namespaces, including talk. cfg.defaultnsAll = 'all' -- The value of cfg.defaultns to set the namespaces listed in -- cfg.extendedNamespaces cfg.defaultnsExtended = 'extended' -- The value of cfg.defaultns to set no default namespaces. cfg.defaultnsNone = 'none' -- The parameter name to use for talk pages. cfg.talk = 'talk' -- The default value for talk pages. cfg.talkDefault = 'talk page' -- The parameter name to use for disambiguation pages page. cfg.dab = 'dab' -- This table holds the different possible aliases for disambiguation-class -- pages. These should be lower-case. cfg.dabAliases = { ['disambiguation'] = true, ['disambig'] = true, ['disamb'] = true, ['dab'] = true, } -- The default value for disambiguation pages. cfg.dabDefault = 'page' -- The parameter name to use for N/A-class page. cfg.na = 'na' -- This table holds the different possible aliases for N/A-class pages. These -- should be lower-case. cfg.naAliases = { ['na'] = true, ['n/a'] = true, } -- The default value for N/A-class pages. cfg.naDefault = 'page' -- The parameter name to use for redirects. cfg.redirect = 'redirect' -- The default value to use for redirects. cfg.redirectDefault = 'redirect' -- The parameter name for undefined namespaces. cfg.other = 'other' -- The value used if the module detects an undefined namespace. cfg.otherDefault = 'page' -- The usual suffix denoting a plural. cfg.plural = 's' -- This table holds plurals not formed by a simple suffix. cfg.irregularPlurals = { ["category"] = "categories" } -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line 9qmc982q65l2h7aj1wblije3j52xkbx Modul:Parameter validation 828 338 970 969 2024-08-09T09:22:39Z Jon Harald Søby 58 1 semakan diimportkan 969 Scribunto text/plain local util = { empty = function( s ) return s == nil or type( s ) == 'string' and mw.text.trim( s ) == '' end , extract_options = function ( frame, optionsPrefix ) optionsPrefix = optionsPrefix or 'options' local options, n, more = {} if frame.args['module_options'] then local module_options = mw.loadData( frame.args['module_options'] ) if type( module_options ) ~= 'table' then return {} end local title = mw.title.getCurrentTitle() local local_ptions = module_options[ title.namespace ] or module_options[ title.nsText ] or {} for k, v in pairs( local_ptions ) do options[k] = v end end repeat ok, more = pcall( mw.text.jsonDecode, frame.args[optionsPrefix .. ( n or '' )] ) if ok and type( more ) == 'table' then for k, v in pairs( more ) do options[k] = v end end n = ( n or 0 ) + 1 until not ok return options end , build_namelist = function ( template_name, sp ) local res = { template_name } if sp then if type( sp ) == 'string' then sp = { sp } end for _, p in ipairs( sp ) do table.insert( res, template_name .. '/' .. p ) end end return res end , table_empty = function( t ) -- normally, test if next(t) is nil, but for some perverse reason, non-empty tables returned by loadData return nil... if type( t ) ~= 'table' then return true end for a, b in pairs( t ) do return false end return true end , } local function _readTemplateData( templateName ) local title = mw.title.makeTitle( 0, templateName ) local templateContent = title and title.exists and title:getContent() -- template's raw content local capture = templateContent and mw.ustring.match( templateContent, '<templatedata%s*>(.*)</templatedata%s*>' ) -- templatedata as text -- capture = capture and mw.ustring.gsub( capture, '"(%d+)"', tonumber ) -- convert "1": {} to 1: {}. frame.args uses numerical indexes for order-based params. local trailingComma = capture and mw.ustring.find( capture, ',%s*[%]%}]' ) -- look for ,] or ,} : jsonDecode allows it, but it's verbotten in json if capture and not trailingComma then return pcall( mw.text.jsonDecode, capture ) end return false end local function readTemplateData( templateName ) if type( templateName ) == 'string' then templateName = { templateName, templateName .. '/' .. docSubPage } end if type( templateName ) == "table" then for _, name in ipairs( templateName ) do local td, result = _readTemplateData( name ) if td then return result end end end return nil end -- this is the function to be called by other modules. it expects the frame, and then an optional list of subpages, e.g. { "Documentation" }. -- if second parameter is nil, only tempalte page will be searched for templatedata. function calculateViolations( frame, subpages ) -- used for parameter type validy test. keyed by TD 'type' string. values are function(val) returning bool. local type_validators = { ['number'] = function( s ) return mw.language.getContentLanguage():parseFormattedNumber( s ) end } function compatible( typ, val ) local func = type_validators[typ] return type( func ) ~= 'function' or util.empty( val ) or func( val ) end local t_frame = frame:getParent() local t_args, template_name = t_frame.args, t_frame:getTitle() template_name = mw.ustring.gsub( template_name, '/sandbox', '', 1 ) local td_source = util.build_namelist( template_name, subpages ) if frame.args['td_source'] then table.insert(td_source, frame.args['td_source']) end local templatedata = readTemplateData( td_source ) local td_params = templatedata and templatedata.params local all_aliases, all_series = {}, {} if not td_params then return { ['no-templatedata'] = { [''] = '' } } end -- from this point on, we know templatedata is valid. local res = {} -- before returning to caller, we'll prune empty tables -- allow for aliases for x, p in pairs( td_params ) do for y, alias in ipairs( p.aliases or {} ) do p['primary'] = x td_params[x] = p all_aliases[alias] = p if tonumber(alias) then all_aliases[tonumber(alias)] = p end end end -- handle undeclared and deprecated local already_seen = {} local series = frame.args['series'] for p_name, value in pairs( t_args ) do local tp_param, noval, numeric, table_name = td_params[p_name] or all_aliases[p_name], util.empty( value ), tonumber( p_name ) local hasval = not noval if not tp_param and series then -- 2nd chance. check to see if series for s_name, p in pairs(td_params) do if mw.ustring.match( p_name, '^' .. s_name .. '%d+' .. '$') then -- mw.log('found p_name '.. p_name .. ' s_name:' .. s_name, ' p is:', p) debugging series support tp_param = p end -- don't bother breaking. td always correct. end end if not tp_param then -- not in TD: this is called undeclared -- calculate the relevant table for this undeclared parameter, based on parameter and value types table_name = noval and numeric and 'empty-undeclared-numeric' or noval and not numeric and 'empty-undeclared' or hasval and numeric and 'undeclared-numeric' or 'undeclared' -- tzvototi nishar. else -- in td: test for deprecation and mistype. if deprecated, no further tests table_name = tp_param.deprecated and hasval and 'deprecated' or tp_param.deprecated and noval and 'empty-deprecated' or not compatible( tp_param.type, value ) and 'incompatible' or not series and already_seen[tp_param] and hasval and 'duplicate' if hasval and table_name ~= 'duplicate' then already_seen[tp_param] = p_name end end -- report it. if table_name then res[table_name] = res[table_name] or {} if table_name == 'duplicate' then local primary_param = tp_param['primary'] local primaryData = res[table_name][primary_param] if not primaryData then primaryData = {} table.insert(primaryData, already_seen[tp_param]) end table.insert(primaryData, p_name) res[table_name][primary_param] = primaryData else res[table_name][p_name] = value end end end -- check for empty/missing parameters declared "required" for p_name, param in pairs( td_params ) do if param.required and util.empty( t_args[p_name] ) then local is_alias for _, alias in ipairs( param.aliases or {} ) do is_alias = is_alias or not util.empty( t_args[alias] ) end if not is_alias then res['empty-required'] = res['empty-required'] or {} res['empty-required'][p_name] = '' end end end mw.logObject(res) return res end -- wraps report in hidden frame function wrapReport(report, template_name, options) mw.logObject(report) if util.empty( report ) then return '' end local naked = mw.title.new( template_name )['text'] naked = mw.ustring.gsub(naked, 'Infobox', 'infobox', 1) report = ( options['wrapper-prefix'] or "<div class = 'paramvalidator-wrapper'><span class='paramvalidator-error'>" ) .. report .. ( options['wrapper-suffix'] or "</span></div>" ) report = mw.ustring.gsub( report, 'tname_naked', naked ) report = mw.ustring.gsub( report, 'templatename', template_name ) return report end -- this is the "user" version, called with {{#invoke:}} returns a string, as defined by the options parameter function validateParams( frame ) local options, report, template_name = util.extract_options( frame ), '', frame:getParent():getTitle() local ignore = function( p_name ) for _, pattern in ipairs( options['ignore'] or {} ) do if mw.ustring.match( p_name, '^' .. pattern .. '$' ) then return true end end return false end local replace_macros = function( error_type, s, param_names ) function concat_and_escape( t , sep ) sep = sep or ', ' local s = table.concat( t, sep ) return ( mw.ustring.gsub( s, '%%', '%%%%' ) ) end if s and ( type( param_names ) == 'table' ) then local k_ar, kv_ar = {}, {} for k, v in pairs( param_names ) do table.insert( k_ar, k ) if type(v) == 'table' then v = table.concat(v, ', ') end if error_type == 'duplicate' then table.insert( kv_ar, v) else table.insert( kv_ar, k .. ': ' .. v) end end s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) ) s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar, ' AND ' ) ) if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) ~= "" then s = mw.ustring.gsub( s, "<div.*<%/div>", "", 1 ) end end return s end local report_params = function( key, param_names ) local res = replace_macros( key, options[key], param_names ) res = frame:preprocess(res or '') report = report .. ( res or '' ) return res end -- no option no work. if util.table_empty( options ) then return '' end -- get the errors. local violations = calculateViolations( frame, options['doc-subpage'] ) -- special request of bora: use skip_empty_numeric if violations['empty-undeclared-numeric'] then for i = 1, tonumber( options['skip-empty-numeric'] ) or 0 do violations['empty-undeclared-numeric'][i] = nil end end -- handle ignore list, and prune empty violations - in that order! local offenders = 0 for name, tab in pairs( violations ) do -- remove ignored parameters from all violations for pname in pairs( tab ) do if ignore( pname ) then tab[pname] = nil end end -- prune empty violations if util.table_empty( tab ) then violations[name] = nil end -- WORK IS DONE. report the errors. -- if report then count it. if violations[name] and report_params( name, tab ) then offenders = offenders + 1 end end if offenders > 1 then report_params( 'multiple' ) end if offenders ~= 0 then report_params( 'any' ) end -- could have tested for empty( report ), but since we count them anyway... return wrapReport(report, template_name, options) end return { ['validateparams'] = validateParams, ['calculateViolations'] = calculateViolations, ['wrapReport'] = wrapReport } 4qkzuo2iwtgkzfsbp529j9belmcqwmy Modul:Parameter validation/default config 828 339 972 971 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 971 Scribunto text/plain function create(cat, msg) return mw.ustring.format("{{main other|[[Kategori:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg) end function create_message(msg) return require('Module:If preview')._warning({ mw.ustring.format("[[templatename]] used with %s.", msg) }) end local options = { ["undeclared"] = create("unknown", 'unknown parameter(s): paramname'), ["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'), ["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'), ["doc-subpage"] = "doc", } local result = { [0] = options, [2] = options, [4] = options, [6] = options, [10] = options, [12] = options, [14] = options, } return result oo8uh4zh4ephbvq6vmlqa0hqn8j6sy3 Modul:Plain text 828 340 974 973 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 973 Scribunto text/plain --converts text with wikilinks to plain text, e.g "[[foo|gah]] is [[bar]]" to "gah is bar" --removes anything enclosed in tags that isn't nested, mediawiki strip markers (references etc), files, italic and bold markup require[[strict]] local p = {} function p.main(frame) local text = frame.args[1] local encode = require('Module:Yesno')(frame.args.encode) return p._main(text, encode) end function p._main(text, encode) if not text then return end text = mw.text.killMarkers(text) :gsub('&nbsp;', ' ') --replace nbsp spaces with regular spaces :gsub('<br ?/?>', ', ') --replace br with commas :gsub('<span.->(.-)</span>', '%1') --remove spans while keeping text inside :gsub('<i.->(.-)</i>', '%1') --remove italics while keeping text inside :gsub('<b.->(.-)</b>', '%1') --remove bold while keeping text inside :gsub('<em.->(.-)</em>', '%1') --remove emphasis while keeping text inside :gsub('<strong.->(.-)</strong>', '%1') --remove strong while keeping text inside :gsub('<sub.->(.-)</sub>', '%1') --remove subscript markup; retain contents :gsub('<sup.->(.-)</sup>', '%1') --remove superscript markup; retain contents :gsub('<u.->(.-)</u>', '%1') --remove underline markup; retain contents :gsub('<.->.-<.->', '') --strip out remaining tags and the text inside :gsub('<.->', '') --remove any other tag markup :gsub('%[%[%s*[Ff][Ii][Ll][Ee]%s*:.-%]%]', '') --strip out files :gsub('%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:.-%]%]', '') --strip out use of image: :gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:.-%]%]', '') --strip out categories :gsub('%[%[[^%]]-|', '') --strip out piped link text :gsub('([^%[])%[[^%[%]][^%]]-%s', '%1') --strip out external link text :gsub('^%[[^%[%]][^%]]-%s', '') --strip out external link text :gsub('[%[%]]', '') --then strip out remaining [ and ] :gsub("'''''", "") --strip out bold italic markup :gsub("'''?", "") --not stripping out '''' gives correct output for bolded text in quotes :gsub('----+', '') --remove ---- lines :gsub("^%s+", "") --strip leading :gsub("%s+$", "") --and trailing spaces :gsub("%s+", " ") --strip redundant spaces if encode then return mw.text.encode(text) else return text end end return p 7ci5b7u9jd07j7hml02qu00dgvqsob8 Modul:Protection banner 828 341 976 975 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 975 Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p g1esh5v0eq6i86pqpylkdm09loryn3e Modul:Protection banner/config 828 342 978 977 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 977 Scribunto text/plain -- This module provides configuration data for [[Modul:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Bantuan:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Bantuan:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Templat:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Khas:Userlogin|log in]],' .. ' or [[Khas:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Bantuan:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Bantuan:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Bantuan:Protection|protected]]' .. ' from [[Bantuan:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Khas:Userlogin|log in]], or' .. ' [[Khas:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Khas:Userlogin|log in]], or' .. ' [[Khas:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Bantuan:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Khas:Userlogin|log in]], or' .. ' [[Khas:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Bantuan:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 4im888qcsw5eh7u7nm5ue68cbdg7hdd Modul:Redirect 828 343 980 979 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 979 Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p ixuh7hehfu8mxwx3ai7pksok45inaxs Modul:SDcat 828 344 982 981 2024-08-09T09:22:40Z Jon Harald Søby 58 1 semakan diimportkan 981 Scribunto text/plain --[[ SDcat Module to check whether local short description matches that on Wikidata --]] local p = {} ------------------------------------------------------------------------------- --[[ setCat has the qid of a Wikidata entity passed as |qid= (it defaults to the associated qid of the current article if omitted) and the local short description passed as |sd= It returns a category if there is an associated Wikidata entity. It returns one of the following tracking categories, as appropriate: * Category:Short description matches Wikidata (case-insensitive) * Category:Short description is different from Wikidata * Category:Short description with empty Wikidata description For testing purposes, a link prefix |lp= may be set to ":" to make the categories visible. --]] -- function exported for use in other modules -- (local short description, Wikidata entity-ID, link prefix) p._setCat = function(sdesc, itemID, lp) if not mw.wikibase then return nil end if itemID == "" then itemID = nil end -- Wikidata description field local wdesc = (mw.wikibase.getDescription(itemID) or ""):lower() if wdesc == "" then return "[[" .. lp .. "Category:Short description with empty Wikidata description]]" elseif wdesc == sdesc then return "[[" .. lp .. "Category:Short description matches Wikidata]]" else return "[[" .. lp .. "Category:Short description is different from Wikidata]]" end end -- function exported for call from #invoke p.setCat = function(frame) local args if frame.args.sd then args = frame.args else args = frame:getParent().args end -- local short description local sdesc = mw.text.trim(args.sd or ""):lower() -- Wikidata entity-ID local itemID = mw.text.trim(args.qid or "") -- link prefix, strip quotes local lp = mw.text.trim(args.lp or ""):gsub('"', '') return p._setCat(sdesc, itemID, lp) end return p cml06m2kvz7og9bi5f1xe6ylhi3d9a0 Modul:Separated entries 828 345 984 983 2024-08-09T09:22:41Z Jon Harald Søby 58 1 semakan diimportkan 983 Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) return mw.text.listToText(values, separator, conjunction) end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p r3n53qz4zycs3vxyo5ms9qjo1jm32bp Modul:Settlement short description 828 346 986 985 2024-08-09T09:22:41Z Jon Harald Søby 58 1 semakan diimportkan 985 Scribunto text/plain --generates auto short description for use in infobox settlement local p = {} p.categories = "" local plain = require('Module:Plain text')._main local getArgs = require('Module:Arguments').getArgs local tableTools = require ('Module:TableTools') function p.reverseTable (init) init[1], init[3] = init[3], init[1] return init end function p.assign (args, argname, num) local val local var = {} for i = 0,num do --handle initial "subdivision_foo" without number if i == 0 then val = "" else val = tostring(i) end var[i+1] = p.validate(plain(args[argname..val])) end return var end --Display short description using {{short description}} function p.shortdesc(text, frame) return frame:expandTemplate{title = 'Short description', args = {text, 'noreplace'}} end function p.category (cattype) local category = string.format('[[Kategori:Pages using infobox settlement with bad %s]]', cattype) if category then p.categories = p.categories..category end --categorize end --sanity and other checks function p.validate (parameter, cat) if not parameter then return nil end parameter = parameter:gsub('%b()', '') --remove things in brackets as extraneous information :gsub('%s+', ' ') --fix possible extra spaces from previous cleanup :gsub('^%s+', '') --trim spaces from beginning :gsub('%s+$', '') --trim spaces from end if parameter:match("[,;]") or not parameter:match("%a") then --must have some letters, ignore if multiple types/subdivisions if cat then p.category (cat) end return nil end if (parameter == "") then return nil end return parameter end --removes redundancy like "England, United Kingdom" and fixes issues like "Foo in United States" (to "Foo in the United States") --also used in Module:Type in location function p.cleanupLoc (location) if location == "" then return nil end local replacements = { ["England, United Kingdom"] = "England", ["Scotland, United Kingdom"] = "Scotland", ["Wales, United Kingdom"] = "Wales", ["New York City, New York, United States"] = "New York City", ["^United States$"] = "the United States", ["London, United Kingdom"] = "London, England" } for i, v in pairs(replacements) do location = location:gsub(i, v) --series of replacements end return location end function p.main(frame) local categories = "" local subdivision_types = {} local subdivision_names = {} local args = getArgs (frame, {parentOnly = true}) local settlement_type = p.validate(plain(args.settlement_type or args.type), "settlement type") or "Place" local short_description = plain(args.short_description) subdivision_types = p.assign(args, "subdivision_type", 2) subdivision_names = p.assign(args, "subdivision_name", 2) if short_description then if (short_description == 'no') then return else local language = mw.language.getContentLanguage() return p.shortdesc(language:ucfirst(short_description), frame) end end if not(subdivision_names[3] and (string.find(settlement_type, '[nN]eighbo[u]?rhood') or string.find(settlement_type, '[sS]uburb'))) then subdivision_names[3] = nil --display the third subdivision_type only if suburb or neighborhood end --if say "Voivodeship" is found within the subdivision_type, then specially handle --by adding Voivodeship to the end if not already present for x, y in ipairs (subdivision_types) do local special_types = { "Voivodeship" } for i, j in ipairs(special_types) do if subdivision_names[x] and string.find(y, j, 1, true) and not string.find(subdivision_names[x], j, 1, true) then subdivision_names[x] = subdivision_names[x].." "..j end end end for x, y in ipairs (subdivision_names) do if y then if string.find(settlement_type, y, 1, true) then --if the subdivision is found within the settlement type subdivision_names[x] = nil --don't display redundancy p.category ("settlement type") end if y == mw.title.getCurrentTitle().text then --if the title is the same as one of the subdivision_names subdivision_names[x] = nil --don't display redundancy end end end local location = table.concat(tableTools.compressSparseArray(p.reverseTable(subdivision_names)), ', ') location = p.cleanupLoc (location) if location then location = " in " .. location else location = "" end local language = mw.language.getContentLanguage() return p.shortdesc(language:ucfirst(settlement_type..location), frame)..p.categories end return p t7duifbcfukefrhhji8o2u8npa8rq31 Modul:Side box 828 347 988 987 2024-08-09T09:22:41Z Jon Harald Søby 58 1 semakan diimportkan 987 Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 13mb9x4khy3x9kci53p03u6xw7fwg3p Modul:Sortkey 828 348 990 989 2024-08-09T09:22:42Z Jon Harald Søby 58 1 semakan diimportkan 989 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local p = {} function p._encode(sortkey) -- Protect against sortkey nesting. -- Example: {{sort|{{dts|2013|07|07}}|{{dts|1990|12|01}}}} if string.find(sortkey, "sortkey") or string.find(sortkey, "data-sort-value") then return ""; end return mw.text.encode(sortkey) end function p.encode(frame) local args = getArgs(frame); return p._encode(args[1] or "") end local function valid_number(num) -- Return true if num is a valid number. -- In Scribunto (different from some standard Lua), when expressed as a string, -- overflow or other problems are indicated with text like "inf" or "nan" -- which are regarded as invalid here (each contains "n"). if type(num) == 'number' and tostring(num):find('n', 1, true) == nil then return true end end function p._sortKeyForNumber(value) local sortkey if not valid_number(value) then if value < 0 then sortkey = '1000000000000000000' else sortkey = '9000000000000000000' end elseif value == 0 then sortkey = '5000000000000000000' else local mag = math.floor(math.log10(math.abs(value)) + 1e-14) local prefix if value > 0 then prefix = 7000 + mag else prefix = 2999 - mag value = value + 10^(mag+1) end sortkey = string.format('%d', prefix) .. string.format('%015.0f', math.floor(value * 10^(math.min(28,14-mag)))) end return sortkey; end function p.sortKeyForNumber(frame) local args = getArgs(frame); return p._sortKeyForNumber(args[1] or "") end return p bf6nib86o701vban8cvux2j7z8q1z36 Modul:String 828 349 992 991 2024-08-09T09:22:42Z Jon Harald Søby 58 1 semakan diimportkan 991 Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Kategori:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str aki1ursb5y3zyu3mz07rjx1j4aqudw2 Modul:String2 828 350 994 993 2024-08-09T09:22:42Z Jon Harald Søby 58 1 semakan diimportkan 993 Scribunto text/plain local p = {} p.trim = function(frame) return mw.text.trim(frame.args[1] or "") end p.sentence = function (frame) -- {{lc:}} is strip-marker safe, string.lower is not. frame.args[1] = frame:callParserFunction('lc', frame.args[1]) return p.ucfirst(frame) end p.ucfirst = function (frame ) local s = mw.text.trim( frame.args[1] or "" ) local s1 = "" -- if it's a list chop off and (store as s1) everything up to the first <li> local lipos = mw.ustring.find(s, "<li>" ) if lipos then s1 = mw.ustring.sub(s, 1, lipos + 3) s = mw.ustring.sub(s, lipos + 4) end -- s1 is either "" or the first part of the list markup, so we can continue -- and prepend s1 to the returned string local letterpos if mw.ustring.find(s, "^%[%[[^|]+|[^%]]+%]%]") then -- this is a piped wikilink, so we capitalise the text, not the pipe local _ _, letterpos = mw.ustring.find(s, "|%W*%w") -- find the first letter after the pipe else letterpos = mw.ustring.find(s, '%w') end if letterpos then local first = mw.ustring.sub(s, 1, letterpos - 1) local letter = mw.ustring.sub(s, letterpos, letterpos) local rest = mw.ustring.sub(s, letterpos + 1) return s1 .. first .. mw.ustring.upper(letter) .. rest else return s1 .. s end end p.title = function (frame ) -- http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html -- recommended by The U.S. Government Printing Office Style Manual: -- "Capitalize all words in titles of publications and documents, -- except a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor." local alwayslower = {['a'] = 1, ['an'] = 1, ['the'] = 1, ['and'] = 1, ['but'] = 1, ['or'] = 1, ['for'] = 1, ['nor'] = 1, ['on'] = 1, ['in'] = 1, ['at'] = 1, ['to'] = 1, ['from'] = 1, ['by'] = 1, ['of'] = 1, ['up'] = 1 } local res = '' local s = mw.text.trim( frame.args[1] or "" ) local words = mw.text.split( s, " ") for i, s in ipairs(words) do -- {{lc:}} is strip-marker safe, string.lower is not. s = frame:callParserFunction('lc', s) if i == 1 or alwayslower[s] ~= 1 then s = mw.getContentLanguage():ucfirst(s) end words[i] = s end return table.concat(words, " ") end -- findlast finds the last item in a list -- the first unnamed parameter is the list -- the second, optional unnamed parameter is the list separator (default = comma space) -- returns the whole list if separator not found p.findlast = function(frame) local s = mw.text.trim( frame.args[1] or "" ) local sep = frame.args[2] or "" if sep == "" then sep = ", " end local pattern = ".*" .. sep .. "(.*)" local a, b, last = s:find(pattern) if a then return last else return s end end -- stripZeros finds the first number and strips leading zeros (apart from units) -- e.g "0940" -> "940"; "Year: 0023" -> "Year: 23"; "00.12" -> "0.12" p.stripZeros = function(frame) local s = mw.text.trim(frame.args[1] or "") local n = tonumber( string.match( s, "%d+" ) ) or "" s = string.gsub( s, "%d+", n, 1 ) return s end -- nowiki ensures that a string of text is treated by the MediaWiki software as just a string -- it takes an unnamed parameter and trims whitespace, then removes any wikicode p.nowiki = function(frame) local str = mw.text.trim(frame.args[1] or "") return mw.text.nowiki(str) end -- split splits text at boundaries specified by separator -- and returns the chunk for the index idx (starting at 1) -- #invoke:String2 |split |text |separator |index |true/false -- #invoke:String2 |split |txt=text |sep=separator |idx=index |plain=true/false -- if plain is false/no/0 then separator is treated as a Lua pattern - defaults to plain=true p.split = function(frame) local args = frame.args if not(args[1] or args.txt) then args = frame:getParent().args end local txt = args[1] or args.txt or "" if txt == "" then return nil end local sep = (args[2] or args.sep or ""):gsub('"', '') local idx = tonumber(args[3] or args.idx) or 1 local plain = (args[4] or args.plain or "true"):sub(1,1) plain = (plain ~= "f" and plain ~= "n" and plain ~= "0") local splittbl = mw.text.split( txt, sep, plain ) if idx < 0 then idx = #splittbl + idx + 1 end return splittbl[idx] end -- val2percent scans through a string, passed as either the first unnamed parameter or |txt= -- it converts each number it finds into a percentage and returns the resultant string. p.val2percent = function(frame) local args = frame.args if not(args[1] or args.txt) then args = frame:getParent().args end local txt = mw.text.trim(args[1] or args.txt or "") if txt == "" then return nil end local function v2p (x) x = (tonumber(x) or 0) * 100 if x == math.floor(x) then x = math.floor(x) end return x .. "%" end txt = txt:gsub("%d[%d%.]*", v2p) -- store just the string return txt end -- one2a scans through a string, passed as either the first unnamed parameter or |txt= -- it converts each occurrence of 'one ' into either 'a ' or 'an ' and returns the resultant string. p.one2a = function(frame) local args = frame.args if not(args[1] or args.txt) then args = frame:getParent().args end local txt = mw.text.trim(args[1] or args.txt or "") if txt == "" then return nil end txt = txt:gsub(" one ", " a "):gsub("^one", "a"):gsub("One ", "A "):gsub("a ([aeiou])", "an %1"):gsub("A ([aeiou])", "An %1") return txt end -- findpagetext returns the position of a piece of text in a page -- First positional parameter or |text is the search text -- Optional parameter |title is the page title, defaults to current page -- Optional parameter |plain is either true for plain search (default) or false for Lua pattern search -- Optional parameter |nomatch is the return value when no match is found; default is nil p._findpagetext = function(args) -- process parameters local nomatch = args.nomatch or "" if nomatch == "" then nomatch = nil end -- local text = mw.text.trim(args[1] or args.text or "") if text == "" then return nil end -- local title = args.title or "" local titleobj if title == "" then titleobj = mw.title.getCurrentTitle() else titleobj = mw.title.new(title) end -- local plain = args.plain or "" if plain:sub(1, 1) == "f" then plain = false else plain = true end -- get the page content and look for 'text' - return position or nomatch local content = titleobj and titleobj:getContent() return content and mw.ustring.find(content, text, 1, plain) or nomatch end p.findpagetext = function(frame) local args = frame.args local pargs = frame:getParent().args for k, v in pairs(pargs) do args[k] = v end if not (args[1] or args.text) then return nil end -- just the first value return (p._findpagetext(args)) end -- returns the decoded url. Inverse of parser function {{urlencode:val|TYPE}} -- Type is: -- QUERY decodes + to space (default) -- PATH does no extra decoding -- WIKI decodes _ to space p._urldecode = function(url, type) url = url or "" type = (type == "PATH" or type == "WIKI") and type return mw.uri.decode( url, type ) end -- {{#invoke:String2|urldecode|url=url|type=type}} p.urldecode = function(frame) return mw.uri.decode( frame.args.url, frame.args.type ) end -- what follows was merged from Module:StringFunc -- helper functions p._GetParameters = require('Module:GetParameters') -- Argument list helper function, as per Module:String p._getParameters = p._GetParameters.getParameters -- Escape Pattern helper function so that all characters are treated as plain text, as per Module:String function p._escapePattern( pattern_str) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end -- Helper Function to interpret boolean strings, as per Module:String p._getBoolean = p._GetParameters.getBoolean --[[ Strip This function Strips characters from string Usage: {{#invoke:String2|strip|source_string|characters_to_strip|plain_flag}} Parameters source: The string to strip chars: The pattern or list of characters to strip from string, replaced with '' plain: A flag indicating that the chars should be understood as plain text. defaults to true. Leading and trailing whitespace is also automatically stripped from the string. ]] function p.strip( frame ) local new_args = p._getParameters( frame.args, {'source', 'chars', 'plain'} ) local source_str = new_args['source'] or '' local chars = new_args['chars'] or '' or 'characters' source_str = mw.text.trim(source_str) if source_str == '' or chars == '' then return source_str end local l_plain = p._getBoolean( new_args['plain'] or true ) if l_plain then chars = p._escapePattern( chars ) end local result result = mw.ustring.gsub(source_str, "["..chars.."]", '') return result end --[[ Match any Returns the index of the first given pattern to match the input. Patterns must be consecutively numbered. Returns the empty string if nothing matches for use in {{#if:}} Usage: {{#invoke:String2|matchAll|source=123 abc|456|abc}} returns '2'. Parameters: source: the string to search plain: A flag indicating that the patterns should be understood as plain text. defaults to true. 1, 2, 3, ...: the patterns to search for ]] function p.matchAny(frame) local source_str = frame.args['source'] or error('The source parameter is mandatory.') local l_plain = p._getBoolean( frame.args['plain'] or true ) for i = 1, math.huge do local pattern = frame.args[i] if not pattern then return '' end if mw.ustring.find(source_str, pattern, 1, l_plain) then return tostring(i) end end end --[[--------------------------< H Y P H E N _ T O _ D A S H >-------------------------------------------------- Converts a hyphen to a dash under certain conditions. The hyphen must separate like items; unlike items are returned unmodified. These forms are modified: letter - letter (A - B) digit - digit (4-5) digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5) letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5) digitletter - digitletter (5a - 5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d) any other forms are returned unmodified. str may be a comma- or semicolon-separated list ]] function p.hyphen_to_dash( str, spacing ) if (str == nil or str == '') then return str end local accept str = mw.text.decode(str, true ) -- replace html entities with their characters; semicolon mucks up the text.split local out = {} local list = mw.text.split (str, '%s*[,;]%s*') -- split str at comma or semicolon separators if there are any for _, item in ipairs (list) do -- for each item in the list item = mw.text.trim(item) -- trim whitespace item, accept = item:gsub ('^%(%((.+)%)%)$', '%1') if accept == 0 and mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit) item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter) item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2') -- replace hyphen, remove extraneous space characters else item = mw.ustring.gsub (item, '%s*[–—]%s*', '–') -- for endash or emdash separated ranges, replace em with en, remove extraneous whitespace end end table.insert (out, item) -- add the (possibly modified) item to the output table end local temp_str = table.concat (out, ',' .. spacing) -- concatenate the output table into a comma separated string temp_str, accept = temp_str:gsub ('^%(%((.+)%)%)$', '%1') -- remove accept-this-as-written markup when it wraps all of concatenated out if accept ~= 0 then temp_str = str:gsub ('^%(%((.+)%)%)$', '%1') -- when global markup removed, return original str; do it this way to suppress boolean second return value end return temp_str end function p.hyphen2dash( frame ) local str = frame.args[1] or '' local spacing = frame.args[2] or ' ' -- space is part of the standard separator for normal spacing (but in conjunction with templates r/rp/ran we may need a narrower spacing return p.hyphen_to_dash(str, spacing) end -- Similar to [[Modul:String#endswith]] function p.startswith(frame) return (frame.args[1]:sub(1, frame.args[2]:len()) == frame.args[2]) and 'yes' or '' end return p 1fwhiw8hz7k14ciuvf80ebxrauelgbi Modul:TableTools 828 351 996 995 2024-08-09T09:22:42Z Jon Harald Søby 58 1 semakan diimportkan 995 Scribunto text/plain --[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke. -- ------------------------------------------------------------------------------------ --]] local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti --[[ ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ --]] function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end --[[ ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a value can be a valid table key. Lua will -- generate an error if a NaN is used as a table key. ------------------------------------------------------------------------------------ --]] function p.isNan(v) return type(v) == 'number' and tostring(v) == '-nan' end --[[ ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ --]] function p.shallowClone(t) local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end --[[ ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ --]] function p.removeDuplicates(t) checkType('removeDuplicates', 1, t, 'table') local isNan = p.isNan local ret, exists = {}, {} for i, v in ipairs(t) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end --[[ ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ --]] function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k, v in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will -- return {1, 3, 6}. ------------------------------------------------------------------------------------ --]] function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k, v in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table -- of subtables in the format -- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} } -- Keys that don't end with an integer are stored in a subtable named "other". -- The compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end --[[ ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end --[[ ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ --]] function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end --[[ ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ --]] function p.size(t) checkType('size', 1, t, 'table') local i = 0 for k in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 else -- This will fail with table, boolean, function. return item1 < item2 end end --[[ Returns a list of the keys in a table, sorted using either a default comparison function or a custom keySort function. ]] function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' }) end local list = {} local index = 1 for key, value in pairs(t) do list[index] = key index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(list, keySort) end return list end --[[ Iterates through a table, with the keys sorted using the keysToList function. If there are only numerical keys, sparseIpairs is probably more efficient. ]] function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local list = p.keysToList(t, keySort, true) local i = 0 return function() i = i + 1 local key = list[i] if key ~= nil then return key, t[key] else return nil, nil end end end --[[ Returns true if all keys in the table are consecutive integers starting at 1. --]] function p.isArray(t) checkType("isArray", 1, t, "table") local i = 0 for k, v in pairs(t) do i = i + 1 if t[i] == nil then return false end end return true end -- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 } function p.invert(array) checkType("invert", 1, array, "table") local map = {} for i, v in ipairs(array) do map[v] = i end return map end --[[ { "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true } --]] function p.listToSet(t) checkType("listToSet", 1, t, "table") local set = {} for _, item in ipairs(t) do set[item] = true end return set end --[[ Recursive deep copy function. Preserves identities of subtables. ]] local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = deepcopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end --[[ Concatenates all values in the table that are indexed by a number, in order. sparseConcat{ a, nil, c, d } => "acd" sparseConcat{ nil, b, c, d } => "bcd" ]] function p.sparseConcat(t, sep, i, j) local list = {} local list_i = 0 for _, v in p.sparseIpairs(t) do list_i = list_i + 1 list[list_i] = v end return table.concat(list, sep, i, j) end --[[ -- Finds the length of an array, or of a quasi-array with keys such -- as "data1", "data2", etc., using an exponential search algorithm. -- It is similar to the operator #, but may return -- a different value when there are gaps in the array portion of the table. -- Intended to be used on data loaded with mw.loadData. For other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of -- the number of unnamed template parameters, so use this function for -- frame.args. --]] function p.length(t, prefix) -- requiring module inline so that [[Modul:Exponential search]] -- which is only needed by this one function -- doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function(i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p ap8igfznhwx352ur946746coumrqqsc Modul:TaxonItalics 828 352 998 997 2024-08-09T09:22:42Z Jon Harald Søby 58 1 semakan diimportkan 997 Scribunto text/plain --[[========================================================================= Italicize a taxon name appropriately by invoking italicizeTaxonName. The algorithm used is: * If the name has italic markup at the start or the end, do nothing. * Else * Remove (internal) italic markup. * If the name is made up of four words and the third word is a botanical connecting term, de-italicize the connecting term and add italic markup to the outside of the name. * Else if the name is made up of three words and the second word is a botanical connecting term or a variant of "cf.", de-italicize the connecting term and add italic markup to the outside of the name. * Else just add italic markup to the outside of the name. The module also: * Ensures that the hybrid symbol, ×, and parentheses are not italicized, as well as any string inside parentheses if dab is true. * Has an option to abbreviate all parts of taxon names other than the last to the first letter (e.g. "Pinus sylvestris var. sylvestris" becomes "P. s. var. sylvestris"). * Has an option to wikilink the italicized name to the input name. =============================================================================]] local p = {} local l = {} -- used to store purely local functions --connecting terms in three part names (e.g. Pinus sylvestris var. sylvestris) local cTerms3 = { --subsp. subspecies = "subsp.", ["subsp."] = "subsp.", subsp = "subsp.", ["ssp."] = "subsp.", ssp = "subsp.", --var. varietas = "var.", ["var."] = "var.", var = "var.", --subvar. subvarietas = "subvar.", ["subvar."] = "subvar.", subvar = "subvar.", --f. forma = "f.", ["f."] = "f.", f = "f.", --subf. subforma = "subf.", ["subf."] = "subf.", subf = "subf." } --connecting terms in two part names (e.g. Pinus sect. Pinus) local cTerms2 = { --subg. subgenus = "subg.", ["subgen."] = "subg.", ["subg."] = "subg.", subg = "subg.", --supersect. supersection = "supersect.", ["supersect."] = "supersect.", supersect = "supersect.", --sect. section = "sect.", ["sect."] = "sect.", sect = "sect.", --subsect. subsection = "subsect.", ["subsect."] = "subsect.", subsect = "subsect.", --ser. series = "ser.", ["ser."] = "ser.", ser = "ser.", --subser. subseries = "subser.", ["subser."] = "subser.", subser = "subser.", --cf. cf = "cf.", ["cf."] = "cf.", ["c.f."] = "cf." } --[[========================================================================= Main function to italicize a taxon name appropriately. For the purpose of the parameters, see p.italicizeTaxonName(). =============================================================================]] function p.main(frame) local name = frame.args[1] or '' local linked = frame.args['linked'] == 'yes' local abbreviated = frame.args['abbreviated'] == 'yes' local dab = frame.args['dab'] == 'yes' return p.italicizeTaxonName(name, linked, abbreviated, dab) end --[[========================================================================= Utility local function to abbreviate an input string to its first character followed by ".". Both "×" and an HTML entity at the start of the string are skipped over in determining first character, as is an opening parenthesis and an opening ", which cause a matching closing character to be included. =============================================================================]] function l.abbreviate(str) local result = "" local hasParentheses = false local isQuoted = false if mw.ustring.len(str) < 2 then --single character strings are left unchanged result = str else --skip over an opening parenthesis that could be present at the start of the string if mw.ustring.sub(str,1,1) == "(" then hasParentheses = true result = "(" str = mw.ustring.sub(str,2,mw.ustring.len(str)) elseif mw.ustring.sub(str,1,1) == '"' then isQuoted = true result = '"' str = mw.ustring.sub(str,2,mw.ustring.len(str)) end --skip over a hybrid symbol that could be present at the start of the string if mw.ustring.sub(str,1,1) == "×" then result = "×" str = mw.ustring.sub(str,2,mw.ustring.len(str)) end --skip over an HTML entity that could be present at the start of the string if mw.ustring.sub(str,1,1) == "&" then local i,dummy = mw.ustring.find(str,";",2,plain) result = result .. mw.ustring.sub(str,1,i) str = mw.ustring.sub(str,i+1,mw.ustring.len(str)) end --if there's anything left, reduce it to its first character plus ".", --adding the closing parenthesis or quote if required if str ~= "" then result = result .. mw.ustring.sub(str,1,1) .. "." if hasParentheses then result = result .. ")" elseif isQuoted then result = result .. '"' end end end return result end --[[========================================================================= The function which does the italicization. Parameters: name (string) – the taxon name to be processed linked (boolean) – should a wikilink be generated? abbreviated (boolean) – should the first parts of the taxon name be reduced to capital letters? dab (boolean) – should any parenthesized part be treated as a disambiguation term and left unitalicized? =============================================================================]] function p.italicizeTaxonName(name, linked, abbreviated, dab) name = mw.text.trim(name) -- if the name begins with '[', then assume formatting is present if mw.ustring.sub(name,1,1) == '[' then return name end -- otherwise begin by replacing any use of the HTML italic tags -- by Wikimedia markup; replace any entity alternatives to the hybrid symbol -- by the symbol itself; prevent the hybrid symbol being treated as -- a 'word' by converting a following space to the HTML entity local italMarker = "''" name = string.gsub(mw.text.trim(name), "</?i>", italMarker) name = string.gsub(string.gsub(name, "&#215;", "×"), "&times;", "×") name = string.gsub(name, "</?span.->", "") -- remove any span markup name = string.gsub(name, "× ", "×&#32;") -- now italicize and abbreviate if required local result = name if name ~= '' then if string.sub(name,1,2) == italMarker or string.sub(name,-2) == italMarker then -- do nothing if the name already has italic markers at the start or end else name = string.gsub(name, italMarker, "") -- first remove any internal italics local words = mw.text.split(name, " ", true) if #words == 4 and cTerms3[words[3]] then -- the third word of a four word name is a connecting term -- ensure the connecting term isn't italicized words[3] = '<span style="font-style:normal;">' .. cTerms3[words[3]] .. '</span>' if abbreviated then words[1] = l.abbreviate(words[1]) words[2] = l.abbreviate(words[2]) end result = words[1] .. " " .. words[2] .. " " .. words[3] .. " " .. words[4] elseif #words == 3 and cTerms2[words[2]] then -- the second word of a three word name is a connecting term -- ensure the connecting term isn't italicized words[2] = '<span style="font-style:normal;">' .. cTerms2[words[2]] .. '</span>' if abbreviated then words[1] = l.abbreviate(words[1]) end result = words[1] .. " " .. words[2] .. " " .. words[3] else -- not a name as above; only deal with abbreviation if abbreviated then if #words > 1 then result = l.abbreviate(words[1]) for i = 2, #words-1, 1 do result = result .. " " .. l.abbreviate(words[i]) end result = result .. " " .. words[#words] end else result = name end end -- deal with any hybrid symbol as it should not be italicized result = string.gsub(result, "×", '<span style="font-style:normal;">×</span>') -- deal with any parentheses as they should not be italicized if dab then result = string.gsub(string.gsub(result,"%(",'<span style="font-style:normal;">('),"%)",')</span>') else result = string.gsub(string.gsub(result,"%(",'<span style="font-style:normal;">(</span>'),"%)",'<span style="font-style:normal;">)</span>') end -- any question marks surrounded by spans can have the spans joined result = string.gsub(result,'</span>%?<span style="font%-style:normal;">','?') -- add outside markup if linked then if result ~= name then result = "[[" .. name .. "|" .. italMarker .. result .. italMarker .. "]]" else result = italMarker .. "[[" .. name .. "]]" .. italMarker end else result = italMarker .. result .. italMarker end end end return result end --[[========================================================================= Utility function used by other modules to check if a connecting term is present in a name. The value of name is assumed to be plain text. =============================================================================]] function p.hasCT(frame) return p.hasConnectingTerm(frame.args[1] or '') end function p.hasConnectingTerm(name) local words = mw.text.split(name, " ", true) if #words == 4 and cTerms3[words[3]] then return true elseif #words == 3 and cTerms2[words[2]] then return true else return false end end return p tk857d4brbmgnwhescettkachysboi2 Modul:Taxonbar/candidate 828 353 1000 999 2024-08-09T09:22:43Z Jon Harald Søby 58 1 semakan diimportkan 999 Scribunto text/plain local p = {} function p.check(frame) local taxonbarExists = require('Module:Taxonbar/exists').check if taxonbarExists(frame) then return '' else local resolveEntity = require( 'Module:ResolveEntityId' ) local currentTitle = mw.title.getCurrentTitle() local currentItem = nil local categories = { '[[Kategori:Taxobox articles possibly missing a taxonbar]]' --unset if acceptable or unacceptable found } --preliminary exclusion criteria if string.match( currentTitle.text, '^List of ') then return '' end --find Wikidata item if currentTitle.namespace == 0 then --mainspace local currentEntityId = mw.wikibase.getEntityIdForCurrentPage() if resolveEntity._id(currentEntityId) then currentItem = mw.wikibase.getEntity(currentEntityId) else --currentEntityId == nil/unresolvable return categories[1] end else return '' end if currentItem then --currentItem should not be nil here, but check just in case --determine if {{Taxonbar}} is *definitely* missing, *possibly* missing, or not missing at all local whitelist = require( 'Module:Taxonbar/whitelist' ).whitelist local blacklist = require( 'Module:Taxonbar/blacklist' ).blacklist local acceptableInstanceOf_All = whitelist{ args = { 'all' } } local unacceptableInstanceOf = blacklist{ args = {} } local acceptableCount = 0 local unacceptableCount = 0 for _, instanceOfState in pairs ( currentItem:getBestStatements('P31') ) do --instance of local instanceOf = instanceOfState.mainsnak.datavalue.value.id if acceptableInstanceOf_All[instanceOf] then acceptableCount = acceptableCount + 1 elseif unacceptableInstanceOf[instanceOf] then unacceptableCount = unacceptableCount + 1 end end for _, subclassOfState in pairs ( currentItem:getBestStatements('P279') ) do --subclass of local subclassOf = subclassOfState.mainsnak.datavalue.value.id if acceptableInstanceOf_All[subclassOf] then acceptableCount = acceptableCount + 1 elseif unacceptableInstanceOf[subclassOf] then unacceptableCount = unacceptableCount + 1 end end if acceptableCount > 0 then categories[1] = '' categories[2] = '[[Kategori:Taxobox articles missing a taxonbar]]' elseif unacceptableCount > 0 then categories[1] = '' categories[2] = '' end return table.concat(categories) else return '' end end end return p kh7u52bk4g7vcl9lsz3kh98ui5oucih Modul:Taxonbar/exists 828 354 1002 1001 2024-08-09T09:22:43Z Jon Harald Søby 58 1 semakan diimportkan 1001 Scribunto text/plain local p = {} function p.check( frame ) local pagename = mw.title.getCurrentTitle().baseText local content = mw.title.new(pagename):getContent() or '' local getRegex = require('Module:Template redirect regex').main local tregex = getRegex('Taxonbar') for _, v in pairs (tregex) do local found = string.match(content, v) if found then return true end end return false end return p dkbt7sahwkxjz7ti05i6v3scbw6x7o5 Modul:Template link general 828 355 1004 1003 2024-08-09T09:22:43Z Jon Harald Søby 58 1 semakan diimportkan 1003 Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p n9mqsaqf536os0lov5na5yuqoibbr4y Modul:Template redirect regex 828 356 1006 1005 2024-08-09T09:22:43Z Jon Harald Søby 58 1 semakan diimportkan 1005 Scribunto text/plain local p = {} --returns a table of regular expressions, sorted by descending popularity, for a parent template and all redirects to it as of a certain date, or nil --regex for the 1st pipe and surrounding whitespace are purposefully omitted to give the calling modules more flexibility function p.main( template ) --expand the following table as-needed, following the same format local tCanonical_templates = { ['Category redirect'] = { --the following 11 pages (6 condensed) redirect to [[Templat:Category redirect]], as of 2022/9: '{{ *[Cc]ate?g?o?r?y?[ _]*[rR]edirect', --parent+505+312+243+1 transclusions '{{ *[Cc]atr', --21 '{{ *[Cc]at[ _]*[rR]edir', --5+3 '{{ *[Cc]at[ _]*[rR]ed', --3+2 '{{ *[Cc]at[ _]*[mM]ove', --1 '{{ *[Cc]ategory[ _]*[mM]ove', --0 }, ['Taxonbar'] = { --the following 6 pages (3 condensed) redirect to [[Templat:Taxonbar]], as of 2023/8: '{{ *[Tt]axon?[ _-]?[bB]ar', --parent+50+11+2+2 transclusions '{{ *[Tt]axon[Ii]ds', --45 '{{ *[Tt]axon[ _]*[iI]dentifiers', --1 }, } return tCanonical_templates[template] or nil end return p j8q7e65pehbqrl9236mglli24nj9yol Modul:Template wrapper 828 357 1008 1007 2024-08-09T09:22:43Z Jon Harald Søby 58 1 semakan diimportkan 1007 Scribunto text/plain require('strict'); local error_msg = '<span style=\"font-size:100%\" class=\"error\"><code style=\"color:inherit; border:inherit; padding:inherit;\">&#124;_template=</code> missing or empty</span>'; --[[--------------------------< I S _ I N _ T A B L E >-------------------------------------------------------- scan through tbl looking for value; return true if found, false else ]] local function is_in_table (tbl, value) for k, v in pairs (tbl) do if v == value then return true end end return false; end --[[--------------------------< A D D _ P A R A M E T E R >---------------------------------------------------- adds parameter name and its value to args table according to the state of boolean list argument; kv pair for template execution; k=v string for template listing. ]] local function add_parameter (k, v, args, list) if list then table.insert( args, table.concat ({k, '=', v})); -- write parameter names and values to args table as string else args[k] = v; -- copy parameters to args table end end --[[--------------------------< A L I A S _ M A P _ G E T >---------------------------------------------------- returns a table of local template (parent frame) parameter names and the target template names that match where in [key]=<value> pairs where: [key] is local template parameter name (an alias) <value> is target template parameter name (the canonical parameter name used in the working template) The parameter |_alias-map= has the form: |_alias-map=<list> where <list> is a comma-separated list of alias / canonical parameter name pairs in the form <from> : <to> where: <from> is the local template's parameter name (alias) <to> is the target template's parameter name (canonical) for enumerated parameters place an octothorp (#) where the enumerator digits are placed in the parameter names: <from#> : <to#> ]] local function alias_map_get (_alias_map) local T = mw.text.split (_alias_map, '%s*,%s*'); -- convert the comma-separated list into a table of alias pairs local mapped_aliases = {}; -- mapped aliases will go here local l_name, t_name; -- parameter names for _, alias_pair in ipairs (T) do -- loop through the table of alias pairs l_name, t_name = alias_pair:match ('(.-)%s*:%s*(.+)'); -- from each pair, get local and target parameter names if l_name and t_name then -- if both are set if tonumber (l_name) then l_name = tonumber (l_name); -- convert number-as-text to a number end mapped_aliases[l_name] = t_name; -- add them to the map table end end return mapped_aliases; end --[[--------------------------< F R A M E _ A R G S _ G E T >-------------------------------------------------- Fetch the wrapper template's 'default' and control parameters; adds default parameters to args returns content of |_template= parameter (name of the working template); nil else ]] local function frame_args_get (frame_args, args, list) local template; for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters if 'string' == type (k) and (v and ('' ~= v)) then -- do not pass along positional or empty parameters if '_template' == k then template = v; -- save the name of template that we are wrapping elseif '_exclude' ~= k and '_reuse' ~= k and '_include-positional' ~= k and '_alias-map' ~= k then -- these already handled so ignore here; add_parameter (k, v, args, list); -- add all other parameters to args in the style dictated by list end end end return template; -- return contents of |_template= parameter end --[=[--------------------------< P F R A M E _ A R G S _ G E T >------------------------------------------------ Fetches the wrapper template's 'live' parameters; adds live parameters that aren't members of the exclude table to args table; positional parameters may not be excluded no return value ]=] local function pframe_args_get (pframe_args, args, exclude, _include_positional, list) for k, v in pairs (pframe_args) do if 'string' == type (k) and not is_in_table (exclude, k) then -- do not pass along excluded parameters if v and ('' ~= v) then -- pass along only those parameters that have assigned values if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (k, v, args, list) -- add all other parameters to args in the style dictated by list; alias map only supported for local-template parameters end end end if _include_positional then for i, v in ipairs (pframe_args) do -- pass along positional parameters if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (i, v, args, list); end end end --[[--------------------------< _ M A I N >-------------------------------------------------------------------- Collect the various default and live parameters into args styled according to boolean list. returns name of the working or listed template or nil for an error message ]] local function _main (frame, args, list) local template; local exclude = {}; -- table of parameter names for parameters that are not passed to the working template local reuse_list = {}; -- table of pframe parameter names whose values are modified before they are passed to the working template as the same name local alias_map = {}; -- table that maps parameter aliases to working template canonical parameter names local _include_positional; if frame.args._exclude and ('' ~= frame.args._exclude) then -- if there is |_exclude= and it's not empty exclude = mw.text.split (frame.args._exclude, "%s*,%s*"); -- make a table from its contents end -- TODO: |_reuse= needs a better name (|_reuse=) if frame.args._reuse and ('' ~= frame.args._reuse) then -- if there is |_reuse= and it's not empty reuse_list = mw.text.split (frame.args._reuse, "%s*,%s*"); -- make a table from its contents end if frame.args['_alias-map'] and ('' ~= frame.args['_alias-map']) then -- if there is |_alias-map= and it's not empty alias_map = alias_map_get (frame.args['_alias-map']); -- make a table from its contents end template = frame_args_get (frame.args, args, list); -- get parameters provided in the {{#invoke:template wrapper|...|...}} if nil == template or '' == template then -- this is the one parameter that is required by this module return nil; -- not present, tell calling function to emit an error message end _include_positional = 'yes' == frame.args['_include-positional']; -- when true pass all positional parameters along with non-excluded named parameters to ... -- ... the working template; positional parameters are not excludable local _pframe_args = frame:getParent().args; -- here we get the wrapper template's 'live' parameters from pframe.args local pframe_args = {}; -- a local table that we can modify for k, v in pairs (_pframe_args) do -- make a copy that we can modify pframe_args[k] = v; end -- here we look for pframe parameters that are aliases of canonical parameter names; when found -- we replace the alias with the canonical. We do this here because the reuse_list works on -- canonical parameter names so first we convert alias parameter names to canonical names and then -- we remove those canonical names from the pframe table that are reused (provided to the working -- template through the frame args table) for k, v in pairs (alias_map) do -- k is alias name, v is canonical name if pframe_args[k] then -- if pframe_args has parameter with alias name pframe_args[v] = _pframe_args[k]; -- create new canonical name with alias' value pframe_args[k] = nil; -- unset the alias end end for k, v in pairs (pframe_args) do -- do enumerated parameter alias -> canonical translation if 'string' == type (k) then -- only named parameters can be enumerated if alias_map[k..'#'] then -- non-enumerated alias matches enumerated parameter pattern? enumerator at end only pframe_args[alias_map[k..'#']:gsub('#', '')] = v; -- remove '#' and copy parameter to pframe_args table pframe_args[k] = nil; -- unset the alias elseif k:match ('%d+') then -- if this parameter name contains digits local temp = k:gsub ('%d+', '#'); -- make a copy; digits replaced with single '#' local enum = k:match ('%d+'); -- get the enumerator if alias_map[temp] then -- if this parameter is a recognized enumerated alias pframe_args[alias_map[temp]:gsub('#', enum)] = v; -- use canonical name and replace '#' with enumerator and add to pframe_args pframe_args[k] = nil; -- unset the alias end end end end -- pframe parameters that are _reused are 'reused' have the form something like this: -- |chapter=[[wikisource:{{{chapter}}}|{{{chapter}}}]] -- where a parameter in the wrapping template is modified and then passed to the working template -- using the same parameter name (in this example |chapter=) -- remove parameters that will be reused for k, v in ipairs (reuse_list) do -- k is numerical index, v is canonical parameter name to ignore if pframe_args[v] then -- if pframe_args has parameter that should be ignored pframe_args[v] = nil; -- unset the ignored parameter end end pframe_args_get (pframe_args, args, exclude, _include_positional, list); -- add parameters and values to args that are not listed in the exclude table return template; -- args now has all default and live parameters, return working template name end --[[--------------------------< W R A P >---------------------------------------------------------------------- Template entry point. Call this function to 'execute' the working template ]] local function wrap (frame) local args = {}; -- table of default and live parameters and their values to be passed to the wrapped template local template; -- the name of the working template template = _main (frame, args, false); -- get default and live parameters and the name of the working template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end return frame:expandTemplate {title=template, args=args}; -- render the working template end --[[--------------------------< L I S T >---------------------------------------------------------------------- Template entry point. Call this function to 'display' the source for the working template. This function added as a result of a TfD here: Wikipedia:Templates_for_discussion/Log/2018_April_28#Module:PassArguments This function replaces a similarly named function which was used in {{cite compare}} and {{cite compare2}} Values in the args table are numerically indexed strings in the form 'name=value' ]] local function list(frame, do_link) local args = {}; -- table of default and live parameters and their values to be passed to the listed template local template; -- the name of the listed template template = _main (frame, args, true); -- get default and live parameters and the name of the listed template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end if do_link then template = ('[[%s|%s]]'):format(frame:expandTemplate{ title='Transclude', args = {template} }, template) end table.sort(args) for i = 1, #args do local stripped = args[i]:match('^' .. i .. '=([^=]*)$') if stripped then args[i] = stripped else break end end return frame:preprocess(table.concat({ '<code style="color:inherit; background:inherit; border:none;">&#123;&#123;', template, ('<wbr><nowiki>|%s</nowiki>'):rep(#args):format(unpack(args)), '&#125;&#125;</code>'})); -- render the template end local function link (frame) return list(frame, true) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { link = link, list = list, wrap = wrap, }; b0ambjffywwcjy4rlrl344s9i200kdz Modul:Text 828 358 1010 1009 2024-08-09T09:22:44Z Jon Harald Søby 58 1 semakan diimportkan 1009 Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2022-07-21", suite = "Text" } --[=[ Text utilities ]=] -- local globals local PatternCJK = false local PatternCombined = false local PatternLatin = false local PatternTerminated = false local QuoteLang = false local QuoteType = false local RangesLatin = false local SeekQuote = false local function initLatinData() if not RangesLatin then RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } end if not PatternLatin then local range PatternLatin = "^[" for i = 1, #RangesLatin do range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] ) end -- for i PatternLatin = PatternLatin .. "]*$" end end local function initQuoteData() -- Create quote definitions if not QuoteLang then QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } end if not QuoteType then QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } end end -- initQuoteData() local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite initQuoteData() local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" if not patternCJK then patternCJK = mw.ustring.char( 91, 4352, 45, 4607, 11904, 45, 42191, 43072, 45, 43135, 44032, 45, 55215, 63744, 45, 64255, 65072, 45, 65103, 65381, 45, 65500, 131072, 45, 196607, 93 ) end return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string initLatinData() return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end if not SeekQuote then SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK end return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed if not PatternCombined then PatternCombined = mw.ustring.char( 91, 0x0300, 45, 0x036F, 0x1AB0, 45, 0x1AFF, 0x1DC0, 45, 0x1DFF, 0xFE20, 45, 0xFE2F, 93 ) end decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r if not PatternTerminated then PatternTerminated = mw.ustring.char( 91, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" end if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r initLatinData() if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range for i = 1, #RangesLatin do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then initQuoteData() r = { } r.QuoteLang = QuoteLang r.QuoteType = QuoteType end return r end -- Text.test() -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 0xet6fnewsfg3wohnjcgtxmnjwe52je Modul:URL 828 359 1012 1011 2024-08-09T09:22:44Z Jon Harald Søby 58 1 semakan diimportkan 1011 Scribunto text/plain -- -- This module implements {{URL}} -- -- See unit tests at [[Modul:URL/testcases]] local p = {} local function safeUri(s) local success, uri = pcall(function() return mw.uri.new(s) end) if success then return uri end end local function extractUrl(args) for name, val in pairs(args) do if name ~= 2 and name ~= "msg" then local url = name .. "=" .. val; url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url); if uri and uri.host then return url end end end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } } end else return text end end -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error url = mw.ustring.gsub(url, '#$', '') url = mw.ustring.gsub(url, '%?$', '') -- If it's an HTTP[S] URL without the double slash, fix it. url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url) -- Handle URL's without a protocol and URL's that are protocol-relative, -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then url = 'http://' .. url uri = safeUri(url) end if text == '' then if uri then if uri.path == '/' then uri.path = '' end local port = '' if uri.port then port = ':' .. uri.port end text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '') -- Add <wbr> before _/.-# sequences text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know. text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1") -- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1") text = mw.ustring.gsub(text,"(_+)","<wbr/>%1") else -- URL is badly-formed, so just display whatever was passed in text = url end end return mw.ustring.format('<span class="url">[%s %s]</span>', url, text) end --[[ The main entry point for calling from Template:URL. --]] function p.url(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' local msg = templateArgs.msg or parentArgs.msg or '' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' return p._url(url, text, msg) end --[[ The entry point for calling from the forked Template:URL2. This function returns no message by default. It strips out wiki-link markup, html tags, and everything after a space. --]] function p.url2(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' -- default to no message local msg = templateArgs.msg or parentArgs.msg or 'no' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' -- if the url came from a Wikidata call, it might have a pen icon appended -- we want to keep that and add it back at the end. local u1, penicon = mw.ustring.match( url, "(.*)(&nbsp;<span class='penicon.*)" ) if penicon then url = u1 end -- strip out html tags and [ ] from url url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "") -- truncate anything after a space url = url:gsub("%%20", " "):gsub(" .*", "") return (p._url(url, text, msg) or "") .. (penicon or "") end return p fmec20rfwvaanybmeoq3c46ge7c4wmv Modul:Unicode data 828 360 1014 1013 2024-08-09T09:22:44Z Jon Harald Søby 58 1 semakan diimportkan 1013 Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Modul:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end --[[ -- No image data modules on Wikipedia yet. function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end --]] local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Modul:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Modul:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p rukm5vvmtheog967mlv9erxwf0jckzc Modul:Unicode data/scripts 828 361 1016 1015 2024-08-09T09:22:45Z Jon Harald Søby 58 1 semakan diimportkan 1015 Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x031EF] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2EBF0, 0x2EE5D, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Modul:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Modul:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data hughjbknhu8eczzyb64iyhy2qvzgufw Modul:Unstrip 828 362 1018 1017 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1017 Scribunto text/plain -- This module provides a frontend to the mw.text.unstrip, unstripNoWiki and killMarkers functions local p = {} function p.unstrip(frame) return mw.text.unstrip(frame.args[1]) end function p.unstripNoWiki(frame) return mw.text.unstripNoWiki(frame.args[1]) end function p.killMarkers(frame) return mw.text.killMarkers(frame.args[1]) end return p 8gqjpuzw8h09v57191ev56sc768x5mf Modul:Unsubst 828 363 1020 1019 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1019 Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p eu3d3ip0gtd6n65iz4vmtpogb62rxdi Modul:Val 828 364 1022 1021 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1021 Scribunto text/plain -- For Template:Val, output a number and optional unit. -- Format options include scientific and uncertainty notations. local numdot = '.' -- decimal mark (use ',' for Italian) local numsep = ',' -- group separator (use ' ' for Italian) local mtext = { -- Message and other text that should be localized. ['mt-bad-exponent'] = 'exponent parameter (<b>e</b>)', ['mt-parameter'] = 'parameter ', ['mt-not-number'] = 'is not a valid number', ['mt-cannot-range'] = 'cannot use a range if the first parameter includes "e"', ['mt-need-range'] = 'needs a range in parameter 2', ['mt-should-range'] = 'should be a range', ['mt-cannot-with-e'] = 'cannot be used if the first parameter includes "e"', ['mt-not-range'] = 'does not accept a range', ['mt-cannot-e'] = 'cannot use e notation', ['mt-too-many-parameter'] = 'too many parameters', ['mt-need-number'] = 'need a number after the last parameter because it is a range.', ['mt-ignore-parameter4'] = 'Val parameter 4 ignored', ['mt-val-not-supported'] = 'Val parameter "%s=%s" is not supported', ['mt-invalid-scale'] = 'Unit "%s" has invalid scale "%s"', ['mt-both-u-ul'] = 'unit (<b>u</b>) and unit with link (<b>ul</b>) are both specified, only one is allowed.', ['mt-both-up-upl'] = 'unit per (<b>up</b>) and unit per with link (<b>upl</b>) are both specified, only one is allowed.', } local data_module = 'Module:Val/units' local convert_module = 'Module:Convert' local function valerror(msg, nocat, iswarning) -- Return formatted message text for an error or warning. -- Can append "#FormattingError" to URL of a page with a problem to find it. local anchor = '<span id="FormattingError"></span>' local body, category if nocat or mw.title.getCurrentTitle():inNamespaces(1, 2, 3, 5) then -- No category in Talk, User, User_talk, or Wikipedia_talk. category = '' else category = '[[Kategori:Pages with incorrect formatting templates use]]' end iswarning = false -- problems are infrequent so try showing large error so editor will notice if iswarning then body = '<sup class="noprint Inline-Template" style="white-space:nowrap;">' .. '[[Templat:Val|<span title="' .. msg:gsub('"', '&quot;') .. '">warning</span>]]</sup>' else body = '<strong class="error">' .. 'Error in &#123;&#123;[[Templat:val|val]]&#125;&#125;: ' .. msg .. '</strong>' end return anchor .. body .. category end local range_types = { -- No need for '&nbsp;' because nowrap applies to all output. [","] = ", ", ["by"] = " by ", ["-"] = "–", ["–"] = "–", ["and"] = " and ", ["or"] = " or " , ["to"] = " to " , ["x"] = " × ", ["×"] = " × ", ["/"] = "/", } local range_repeat_unit = { -- WP:UNIT wants unit repeated when a "multiply" range is used. ["x"] = true, ["×"] = true, } local function extract_item(index, numbers, arg) -- Extract an item from arg and store the result in numbers[index]. -- If no argument or if argument is valid, return nil (no error); -- otherwise, return an error message. -- The stored result is: -- * a table for a number (empty if there was no specified number); or -- * a string for range text -- Input like 1e3 is regarded as invalid for all except argument 1 -- which accepts e notation as an alternative to the 'e' argument. -- Input group separators are removed. local which = index local function fail(msg) local description if which == 'e' then description = mtext['mt-bad-exponent'] else description = mtext['mt-parameter'] .. which end return description .. ' ' .. (msg or mtext['mt-not-number']) .. '.' end local result = {} local range = range_types[arg] if range then if type(index) == 'number' and (index % 2 == 0) then if index == 2 then if numbers[1] and numbers[1].exp then return fail(mtext['mt-cannot-range']) end numbers.has_ranges = true else if not numbers.has_ranges then return fail(mtext['mt-need-range']) end end numbers[index] = range if range_repeat_unit[arg] then -- Any "repeat" range forces unit (if any) to be repeated for all items. numbers.isrepeat = true end return nil end return fail(mtext['mt-not-range']) end if numbers.has_ranges and type(index) == 'number' and (index % 2 == 0) then return fail(mtext['mt-should-range']) end if index == 'e' then local e = numbers[1] and numbers[1].exp if e then if arg then return fail(mtext['mt-cannot-with-e']) end arg = e which = 1 end end if arg and arg ~= '' then arg = arg:gsub(numsep, '') if numdot ~= '.' then arg = arg:gsub(numdot, '.') end if arg:sub(1, 1) == '(' and arg:sub(-1) == ')' then result.parens = true arg = arg:sub(2, -2) end local a, b = arg:match('^(.+)[Ee](.+)$') if a then if index == 1 then arg = a result.exp = b else return fail(mtext['mt-cannot-e']) end end local isnegative, propersign, prefix local minus = '−' prefix, arg = arg:match('^(.-)([%d.]+)$') local value = tonumber(arg) if not value then return fail() end if arg:sub(1, 1) == '.' then arg = '0' .. arg end if prefix == '' then -- Ignore. elseif prefix == '±' then -- Display for first number, ignore for others. if index == 1 then propersign = '±' end elseif prefix == '+' then propersign = '+' elseif prefix == '-' or prefix == minus then propersign = minus isnegative = true else return fail() end result.clean = arg result.sign = propersign or '' result.value = isnegative and -value or value end numbers[index] = result return nil -- no error end local function get_args(numbers, args) -- Extract arguments and store the results in numbers. -- Return nothing (no error) if ok; otherwise, return an error message. for index = 1, 99 do local which = index local arg = args[which] -- has been trimmed if not arg then which = 'e' arg = args[which] end local msg = extract_item(which, numbers, arg) if msg then return msg end if which == 'e' then break end if index > 19 then return mtext['mt-too-many-parameter'] end end if numbers.has_ranges and (#numbers % 2 == 0) then return mtext['mt-need-number'] end end local function get_scale(text, ucode) -- Return the value of text as a number, or throw an error. -- This supports extremely basic expressions of the form: -- a / b -- a ^ b -- where a and b are numbers or 'pi'. local n = tonumber(text) if n then return n end n = text:gsub('pi', math.pi) for _, op in ipairs({ '/', '^' }) do local a, b = n:match('^(.-)' .. op .. '(.*)$') if a then a = tonumber(a) b = tonumber(b) if a and b then if op == '/' then return a / b elseif op == '^' then return a ^ b end end break end end error(string.format(mtext['mt-invalid-scale'], ucode, text)) end local function get_builtin_unit(ucode, definitions) -- Return table of information for the specified built-in unit, or nil if not known. -- Each defined unit code must be followed by two spaces (not tab characters). local _, pos = definitions:find('\n' .. ucode .. ' ', 1, true) if pos then local endline = definitions:find('%s*\n', pos) if endline then local result = {} local n = 0 local text = definitions:sub(pos + 1, endline - 1):gsub('%s%s+', '\t') for item in (text .. '\t'):gmatch('(%S.-)\t') do if item == 'ALIAS' then result.alias = true elseif item == 'ANGLE' then result.isangle = true result.nospace = true elseif item == 'NOSPACE' then result.nospace = true elseif item == 'SI' then result.si = true else n = n + 1 if n == 1 then local link, symbol = item:match('^%[%[([^|]+)|(.+)%]%]$') if link then result.symbol = symbol result.link = link n = 2 else result.symbol = item end elseif n == 2 then result.link = item elseif n == 3 then result.scale_text = item result.scale = get_scale(item, ucode) else result.more_ignored = item break end end end if result.si then local s = result.symbol if ucode == 'mc' .. s or ucode == 'mu' .. s then result.ucode = 'µ' .. s -- unit code for convert should be this end end if n >= 2 or (n >= 1 and result.alias) then return result end -- Ignore invalid definition, treating it as a comment. end end end local function convert_lookup(ucode, value, scaled_top, want_link, si, options) local lookup = require(convert_module)._unit return lookup(ucode, { value = value, scaled_top = scaled_top, link = want_link, si = si, sort = options.sortable, }) end local function get_unit(ucode, value, scaled_top, options) local want_link = options.want_link if scaled_top then want_link = options.want_per_link end local data = mw.loadData(data_module) local result = options.want_longscale and get_builtin_unit(ucode, data.builtin_units_long_scale) or get_builtin_unit(ucode, data.builtin_units) local si, use_convert if result then if result.alias then ucode = result.symbol use_convert = true end if result.scale then -- Setting si means convert will use the unit as given, and the sort key -- will be calculated from the value without any extra scaling that may -- occur if convert found the unit code. For example, if val defines the -- unit 'year' with a scale and if si were not set, convert would also apply -- its own scale because convert knows that a year is 31,557,600 seconds. si = { result.symbol, result.link } value = value * result.scale end if result.si then ucode = result.ucode or ucode si = { result.symbol, result.link } use_convert = true end else result = {} use_convert = true end local convert_unit = convert_lookup(ucode, value, scaled_top, want_link, si, options) result.sortkey = convert_unit.sortspan if use_convert then result.text = convert_unit.text result.scaled_top = convert_unit.scaled_value else if want_link then result.text = '[[' .. result.link .. '|' .. result.symbol .. ']]' else result.text = result.symbol end result.scaled_top = value end return result end local function makeunit(value, options) -- Return table of information for the requested unit and options, or -- return nil if no unit. options = options or {} local unit local ucode = options.u local percode = options.per if ucode then unit = get_unit(ucode, value, nil, options) elseif percode then unit = { nospace = true, scaled_top = value } else return nil end local text = unit.text or '' local sortkey = unit.sortkey if percode then local function bracketed(code, text) return code:find('[*./]') and '(' .. text .. ')' or text end local perunit = get_unit(percode, 1, unit.scaled_top, options) text = (ucode and bracketed(ucode, text) or '') .. '/' .. bracketed(percode, perunit.text) sortkey = perunit.sortkey end if not (unit.nospace or options.nospace) then text = '&nbsp;' .. text end return { text = text, isangle = unit.isangle, sortkey = sortkey } end local function list_units(mode) -- Return wikitext to list the built-in units. -- A unit code should not contain wikimarkup so don't bother escaping. local data = mw.loadData(data_module) local definitions = data.builtin_units .. data.builtin_units_long_scale local last_was_blank = true local n = 0 local result = {} local function add(line) if line == '' then last_was_blank = true else if last_was_blank and n > 0 then n = n + 1 result[n] = '' end last_was_blank = false n = n + 1 result[n] = line end end local si_prefixes = { -- These are the prefixes recognized by convert; u is accepted for micro. y = 'y', z = 'z', a = 'a', f = 'f', p = 'p', n = 'n', u = 'µ', ['µ'] = 'µ', m = 'm', c = 'c', d = 'd', da = 'da', h = 'h', k = 'k', M = 'M', G = 'G', T = 'T', P = 'P', E = 'E', Z = 'Z', Y = 'Y', } local function is_valid(ucode, unit) if unit and not unit.more_ignored then assert(type(unit.symbol) == 'string' and unit.symbol ~= '') if unit.alias then if unit.link or unit.scale_text or unit.si then return false end end if unit.si then if unit.scale_text then return false end ucode = unit.ucode or ucode local base = unit.symbol if ucode == base then unit.display = base return true end local plen = #ucode - #base if plen > 0 then local prefix = si_prefixes[ucode:sub(1, plen)] if prefix and ucode:sub(plen + 1) == base then unit.display = prefix .. base return true end end else unit.display = unit.symbol return true end end return false end local lookup = require(convert_module)._unit local function show_convert(ucode, unit) -- If a built-in unit defines a scale or sets the SI flag, any unit defined in -- convert is not used (the scale or SI prefix's scale is used for a sort key). -- If there is no scale or SI flag, and the unit is not defined in convert, -- the sort key may not be correct; this allows such units to be identified. if not (unit.si or unit.scale_text) then if mode == 'convert' then unit.show = not lookup(unit.alias and unit.symbol or ucode).unknown unit.show_text = 'CONVERT' elseif mode == 'unknown' then unit.show = lookup(unit.alias and unit.symbol or ucode).unknown unit.show_text = 'UNKNOWN' elseif not unit.alias then -- Show convert's scale in square brackets ('[1]' for an unknown unit). -- Don't show scale for an alias because it's misleading for temperature -- and an alias is probably not useful for anything else. local scale = lookup(ucode, {value=1, sort='on'}).scaled_value if type(scale) == 'number' then scale = string.format('%.5g', scale):gsub('e%+?(%-?)0*(%d+)', 'e%1%2') else scale = '?' end unit.show = true unit.show_text = '[' .. scale .. ']' end end end for line in definitions:gmatch('([^\n]*)\n') do local pos, _ = line:find(' ', 1, true) if pos then local ucode = line:sub(1, pos - 1) local unit = get_builtin_unit(ucode, '\n' .. line .. '\n') if is_valid(ucode, unit) then show_convert(ucode, unit) local flags, text if unit.alias then text = unit.symbol else text = '[[' .. unit.link .. '|' .. unit.display .. ']]' end if unit.isangle then unit.nospace = nil -- don't show redundant flag end for _, f in ipairs({ { 'alias', 'ALIAS' }, { 'isangle', 'ANGLE' }, { 'nospace', 'NOSPACE' }, { 'si', 'SI' }, { 'scale_text', unit.scale_text }, { 'show', unit.show_text }, }) do if unit[f[1]] then local t = f[2] if t:match('^%u+$') then t = '<small>' .. t .. '</small>' end if flags then flags = flags .. ' ' .. t else flags = t end end end if flags then text = text .. ' • ' .. flags end add(ucode .. ' = ' .. text .. '<br />') else add(line .. ' ◆ <b>invalid definition</b><br />') end else add(line) end end return table.concat(result, '\n') end local delimit_groups = require('Module:Gapnum').groups local function delimit(sign, numstr, fmt) -- Return sign and numstr (unsigned digits or numdot only) after formatting. -- Four-digit integers are not formatted with gaps. fmt = (fmt or ''):lower() if fmt == 'none' or (fmt == '' and #numstr == 4 and numstr:match('^%d+$')) then return sign .. numstr end -- Group number by integer and decimal parts. -- If there is no decimal part, delimit_groups returns only one table. local ipart, dpart = delimit_groups(numstr) local result if fmt == 'commas' then result = sign .. table.concat(ipart, numsep) if dpart then result = result .. numdot .. table.concat(dpart) end else -- Delimit with a small gap by default. local groups = {} groups[1] = table.remove(ipart, 1) for _, v in ipairs(ipart) do table.insert(groups, '<span style="margin-left:.25em;">' .. v .. '</span>') end if dpart then table.insert(groups, numdot .. (table.remove(dpart, 1) or '')) for _, v in ipairs(dpart) do table.insert(groups, '<span style="margin-left:.25em;">' .. v .. '</span>') end end result = sign .. table.concat(groups) end return result end local function sup_sub(sup, sub, align) -- Return the same result as Module:Su except val defaults to align=right. if align == 'l' or align == 'left' then align = 'left' elseif align == 'c' or align == 'center' then align = 'center' else align = 'right' end return '<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:' .. align .. ';">' .. sup .. '<br />' .. sub .. '</span>' end local function range_text(items, unit_table, options) local fmt = options.fmt local nend = items.nend or '' if items.isrepeat or unit_table.isangle then nend = nend .. unit_table.text end local text = '' for i = 1, #items do if i % 2 == 0 then text = text .. items[i] else text = text .. delimit(items[i].sign, items[i].clean, fmt) .. nend end end return text end local function uncertainty_text(uncertainty, unit_table, options) local angle, text, need_parens if unit_table.isangle then angle = unit_table.text end local upper = uncertainty.upper or {} local lower = uncertainty.lower or {} local uncU = upper.clean if uncU then local fmt = options.fmt local uncL = lower.clean if uncL then uncU = delimit('+', uncU, fmt) .. (upper.errend or '') uncL = delimit('−', uncL, fmt) .. (lower.errend or '') if angle then uncU = uncU .. angle uncL = uncL .. angle end text = (angle or '') .. '<span style="margin-left:0.3em;">' .. sup_sub(uncU, uncL, options.align) .. '</span>' else if upper.parens then text = '(' .. uncU .. ')' -- old template did not delimit else text = (angle or '') .. '<span style="margin-left:0.3em;margin-right:0.15em;">±</span>' .. delimit('', uncU, fmt) need_parens = true end if uncertainty.errend then text = text .. uncertainty.errend end if angle then text = text .. angle end end else if angle then text = angle end end return text, need_parens end local function _main(values, unit_spec, options) if options.sandbox then data_module = data_module .. '/sandbox' convert_module = convert_module .. '/sandbox' end local action = options.action if action then if action == 'list' then -- Kludge: am using the align parameter (a=xxx) for type of list. return list_units(options.align) end return valerror('invalid action "' .. action .. '".', options.nocat) end local number = values.number or (values.numbers and values.numbers[1]) or {} local e_10 = options.e or {} local novalue = (number.value == nil and e_10.clean == nil) local fmt = options.fmt local want_sort = true local sortable = options.sortable if sortable == 'off' or (sortable == nil and novalue) then want_sort = false elseif sortable == 'debug' then -- Same as sortable = 'on' but the sort key is displayed. else sortable = 'on' end local sort_value = 1 if want_sort then sort_value = number.value or 1 if e_10.value and sort_value ~= 0 then -- The 'if' avoids {{val|0|e=1234}} giving an invalid sort_value due to overflow. sort_value = sort_value * 10^e_10.value end end local unit_table = makeunit(sort_value, { u = unit_spec.u, want_link = unit_spec.want_link, per = unit_spec.per, want_per_link = unit_spec.want_per_link, nospace = novalue, want_longscale = unit_spec.want_longscale, sortable = sortable, }) local sortkey if unit_table then if want_sort then sortkey = unit_table.sortkey end else unit_table = { text = '' } if want_sort then sortkey = convert_lookup('dummy', sort_value, nil, nil, nil, { sortable = sortable }).sortspan end end local final_unit = unit_table.isangle and '' or unit_table.text local e_text, n_text, need_parens local uncertainty = values.uncertainty if uncertainty then if number.clean then n_text = delimit(number.sign, number.clean, fmt) .. (number.nend or '') local text text, need_parens = uncertainty_text(uncertainty, unit_table, options) if text then n_text = n_text .. text end else n_text = '' end else if values.numbers.isrepeat then final_unit = '' end n_text = range_text(values.numbers, unit_table, options) need_parens = true end if e_10.clean then if need_parens then n_text = '(' .. n_text .. ')' end e_text = '10<sup>' .. delimit(e_10.sign, e_10.clean, fmt) .. '</sup>' if number.clean then e_text = '<span style="margin-left:0.25em;margin-right:0.15em;">×</span>' .. e_text end else e_text = '' end local result = (sortkey or '') .. (options.prefix or '') .. n_text .. e_text .. final_unit .. (options.suffix or '') if result ~= '' then result = '<span class="nowrap">' .. result .. '</span>' end return result .. (options.warning or '') end local function check_parameters(args, has_ranges, nocat) -- Return warning text for the first problem parameter found, or nothing if ok. local whitelist = { a = true, action = true, debug = true, e = true, ['end'] = true, errend = true, ['+errend'] = true, ['-errend'] = true, fmt = true, ['long scale'] = true, long_scale = true, longscale = true, nocategory = true, p = true, s = true, sortable = true, u = true, ul = true, up = true, upl = true, } for k, v in pairs(args) do if type(k) == 'string' and not whitelist[k] then local warning = string.format(mtext['mt-val-not-supported'], k, v) return valerror(warning, nocat, true) end end if not has_ranges and args[4] then return valerror(mtext['mt-ignore-parameter4'], nocat, true) end end local function main(frame) local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame, {wrappers = { 'Template:Val' }}) local nocat = args.nocategory local numbers = {} -- table of number tables, perhaps with range text local msg = get_args(numbers, args) if msg then return valerror(msg, nocat) end if args.u and args.ul then return valerror(mtext['mt-both-u-ul'], nocat) end if args.up and args.upl then return valerror(mtext['mt-both-up-upl'], nocat) end local values if numbers.has_ranges then -- Multiple values with range separators but no uncertainty. numbers.nend = args['end'] values = { numbers = numbers, } else -- A single value with optional uncertainty. local function setfield(i, dst, src) local v = args[src] if v then if numbers[i] then numbers[i][dst] = v else numbers[i] = { [dst] = v } end end end setfield(1, 'nend', 'end') setfield(2, 'errend', '+errend') setfield(3, 'errend', '-errend') values = { number = numbers[1], uncertainty = { upper = numbers[2], lower = numbers[3], errend = args.errend, } } end local unit_spec = { u = args.ul or args.u, want_link = args.ul ~= nil, per = args.upl or args.up, want_per_link = args.upl ~= nil, want_longscale = (args.longscale or args.long_scale or args['long scale']) == 'on', } local options = { action = args.action, align = args.a, e = numbers.e, fmt = args.fmt, nocat = nocat, prefix = args.p, sandbox = string.find(frame:getTitle(), 'sandbox', 1, true) ~= nil, sortable = args.sortable or (args.debug == 'yes' and 'debug' or nil), suffix = args.s, warning = check_parameters(args, numbers.has_ranges, nocat), } return _main(values, unit_spec, options) end return { main = main, _main = _main } piubnmyngj77v4g4i18keflasuuf5la Modul:Val/units 828 365 1024 1023 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1023 Scribunto text/plain -- Definitions for units known to val -- File format is two strings and a return statement with them in it: -- string in quotes [=[ ... builtin_units ... ]=]. -- string in quotes [=[ ... builtin_units_long_scale ... ]=]. -- First string, builtin_units, is short-scale, second string is long scale. -- Entry format: -- One record per line, starting in first column, having 2-4 fields. -- Field separator: two or more spaces -- Between first and second fields: two or more spaces -- Between all other fields: two or more spaces, or one or more tabs -- Entries without two spaces in them are ignored. -- There must be a blank line before the first entry and after the last. -- I.e. the first two and last two characters of the string must be newlines. -- Format of entry. Two record types: -- -- One record type is a wikilink: -- Unit-code [[ pagename | Symbol-accepts-HTML-only ]] -- Text-field separator is still two spaces. Two spaces not allowed in wikilink. -- -- The other record type is all fields: -- Unit-code symbol-accepts-HTML-only pagename#section-OK -- -- Plus there is an optional field that goes at the end after two or more spaces. -- Whether it is a number or an equation or the letters SI, -- any of these three has the same function: a wikitable sorting "scale". -- It is for sorting, and it works for either record type. -- Difference is SI can't accept HTML. But SI correctly scales any SI prefix. -- (Optional fields ALIAS and NOSPACE and ANGLE are for advanced users.) -- "Invalid unit" error: -- Using SI requires that the symbol equal unit-code, so never allows HTML. -- Any difference between SI or symbol must be an SI prefix, such as k, M, or G. -- A space at the end of an entry is an error. No space at each EOL. local builtin_units = [=[ == Test == Foo [[Hz|<samp>Foo</samp>]] Baz [[Hertz|baz<sub>0</sub>]] Baz [[Kelvins|baz<sub>0</sub>]] Bar [[Foobar|bar<abbr title="super duper">0</abbr>]] quux [[Foobar|<span title="super duper 2">bar0</span>]] == Unsorted units == c0 [[Speed of light#Numerical value, notation, and units|''c''<sub>0</sub>]] lbf [[Pound (force)|<span title="pound-force">lb<sub>F</sub></span> ]] N.s [[Newton-second|N&sdot;s]] J.K-1 [[Joule per kelvin|J&sdot;K<sup>−1</sup>]] C.mol-1 [[Faraday constant|C&sdot;mol<sup>−1</sup>]] C/mol [[Faraday constant|C/mol]] C.kg-1 [[Roentgen (unit)|C&sdot;kg<sup>−1</sup>]] C/kg [[Roentgen (unit)|C/kg]] F.m-1 [[vacuum permittivity|F&sdot;m<sup>−1</sup>]] F/m [[vacuum permittivity|F/m]] e [[Elementary charge|''e'']] kB [[Kilobyte|kB]] 8e3 KB [[Kilobyte|KB]] 8e3 MB [[Megabyte|MB]] 8e6 GB [[Gigabyte|GB]] 8e9 TB [[Terabyte|TB]] 8e12 lx [[Lux (unit)|lx]] nat [[nat (unit)|nat]] == Time and frequency == byte/s [[Data rate units|byte/s]] 8 kB/s [[Data rate units#Kilobyte per second|<span title="Kilobytes per second">kB/s</span>]] 8e3 MB/s [[Data rate units#Megabyte per second|<span title="Megabytes per second">MB/s</span>]] 8e6 GB/s [[Data rate units#Gigabyte per second|<span title="Gigabytes per second">GB/s</span>]] 8e9 TB/s [[Data rate units#Terabyte per second|<span title="Terabytes per second">TB/s</span>]] 8e12 bit/s [[Bit per second|bit/s]] 1 bps [[Bit per second|bit/s]] 1 kbit/s [[Kilobit per second|kbit/s]] 1e3 Mbit/s [[Megabit per second|Mbit/s]] 1e6 Gbit/s [[Gigabit per second|Gbit/s]] 1e9 Tbit/s [[Terabit per second|Tbit/s]] 1e12 kT/s [[Transfer (computing)|<span title="Kilotransfers per second">kT/s</span>]] 1e3 MT/s [[Transfer (computing)|<span title="Megatransfers per second">MT/s</span>]] 1e6 GT/s [[Transfer (computing)|<span title="Gigatransfers per second">GT/s</span>]] 1e9 year [[year]] 31557600 years [[year]]s 31557600 yr [[Year#Symbols y and yr|yr]] 31557600 y [[Year|y]] 31557600 a [[Annum|a]] 31557600 Ga [[Gigaannum|Ga]] 31557600000000000 Ma [[Megaannum|Ma]] 31557600000000 ka [[Kiloannum|ka]] 31557600000 kyr [[kyr]] 31557600000 kya [[kyr|kya]] 31557600000 myr [[myr]] 31557600000000 mya [[Mya (unit)|mya]] 31557600000000 byr [[Billion years|byr]] 31557600000000000 bya [[Billion years ago|bya]] 31557600000000000 Gyr [[billion years|Gyr]] 31557600000000000 BP [[Before present|BP]] uBP [[Radiocarbon dating#Calibration|<sup>14</sup>C yr BP]] BC [[Before Christ|BC]] -1 AD [[Anno Domini|AD]] 1 BCE [[Before the Common Era|BCE]] -1 CE [[Common Era|CE]] 1 JD [[Julian date|JD]] 1 MJD [[Modified Julian date|MJD]] 1 s-1 [[Second|s<sup>−1</sup>]] s-2 [[Second|s<sup>−2</sup>]] s2 [[Second|s<sup>2</sup>]] s [[Second|s]] SI as [[Attosecond|s]] SI cs [[Second|s]] SI das [[Second|s]] SI ds [[Second|s]] SI Es [[Second|s]] SI fs [[Femtosecond|s]] SI Gs [[Second|s]] SI hs [[Second|s]] SI ks [[Second|s]] SI ms [[Millisecond|s]] SI µs [[Microsecond|s]] SI us [[Microsecond|s]] SI Ms [[Second|s]] SI ns [[Nanosecond|s]] SI ps [[Picosecond|s]] SI Ps [[Second|s]] SI Ts [[Second|s]] SI Ys [[Second|s]] SI ys [[Yoctosecond|s]] SI Zs [[Second|s]] SI zs [[Zeptosecond|s]] SI Hz [[Hertz|Hz]] SI aHz [[Hertz|Hz]] SI cHz [[Hertz|Hz]] SI daHz [[Hertz|Hz]] SI dHz [[Hertz|Hz]] SI EHz [[Hertz|Hz]] SI fHz [[Hertz|Hz]] SI hHz [[Hertz|Hz]] SI GHz [[Gigahertz|Hz]] SI kHz [[Kilohertz|Hz]] SI MHz [[Megahertz|Hz]] SI mHz [[Hertz|Hz]] SI uHz [[Hertz|Hz]] SI µHz [[Hertz|Hz]] SI nHz [[Hertz|Hz]] SI pHz [[Hertz|Hz]] SI PHz [[Hertz|Hz]] SI THz [[Hertz|Hz]] SI yHz [[Hertz|Hz]] SI YHz [[Hertz|Hz]] SI zHz [[Hertz|Hz]] SI ZHz [[Hertz|Hz]] SI ips [[Inch per second|ips]] == Length, area, volume == Å3 [[Ångström|Å<sup>3</sup>]] fb-1 [[Barn (unit)|fb<sup>−1</sup>]] m-1 [[Metre|m<sup>−1</sup>]] m-2 [[Square metre|m<sup>−2</sup>]] m-3 [[Cubic metre|m<sup>−3</sup>]] km2 [[Square kilometre|km<sup>2</sup>]] km3 [[Cubic kilometre|km<sup>3</sup>]] µm2 [[Square metre|µm<sup>2</sup>]] um2 [[Square metre|µm<sup>2</sup>]] am2 [[Square metre|am<sup>2</sup>]] cm2 [[Square centimetre|cm<sup>2</sup>]] dam2 [[Square metre|dam<sup>2</sup>]] dm2 [[Square metre|dm<sup>2</sup>]] Em2 [[Square metre|Em<sup>2</sup>]] fm2 [[Square metre|fm<sup>2</sup>]] Gm2 [[Square metre|Gm<sup>2</sup>]] hm2 [[Square metre|hm<sup>2</sup>]] mm2 [[Square metre|mm<sup>2</sup>]] Mm2 [[Square metre|Mm<sup>2</sup>]] nm2 [[Square metre|nm<sup>2</sup>]] pm2 [[Square metre|pm<sup>2</sup>]] Pm2 [[Square metre|Pm<sup>2</sup>]] Tm2 [[Square metre|Tm<sup>2</sup>]] ym2 [[Square metre|ym<sup>2</sup>]] Ym2 [[Square metre|Ym<sup>2</sup>]] zm2 [[Square metre|zm<sup>2</sup>]] Zm2 [[Square metre|Zm<sup>2</sup>]] gal [[Gallon|gal]] Gal [[Gal (unit)|Gal]] uGal [[Gal (unit)|µGal]] µGal [[Gal (unit)|µGal]] mGal [[Gal (unit)|mGal]] b [[Barn (unit)|b]] SI ab [[Barn (unit)|b]] SI cb [[Barn (unit)|b]] SI dab [[Barn (unit)|b]] SI db [[Barn (unit)|b]] SI Eb [[Barn (unit)|b]] SI fb [[Barn (unit)|b]] SI Gb [[Barn (unit)|b]] SI hb [[Barn (unit)|b]] SI kb [[Barn (unit)|b]] SI mb [[Barn (unit)|b]] SI µb [[Barn (unit)|b]] SI ub [[Barn (unit)|b]] SI Mb [[Barn (unit)|b]] SI nb [[Barn (unit)|b]] SI pb [[Barn (unit)|b]] SI Pb [[Barn (unit)|b]] SI Tb [[Barn (unit)|b]] SI Yb [[Barn (unit)|b]] SI yb [[Barn (unit)|b]] SI Zb [[Barn (unit)|b]] SI zb [[Barn (unit)|b]] SI == Velocity and acceleration == m.s-2 [[Metre per second squared|m&sdot;s<sup>−2</sup>]] m/s2 [[Metre per second squared|m/s<sup>2</sup>]] m.s-1 [[Metre per second|m&sdot;s<sup>−1</sup>]] m/s [[Metre per second|m/s]] km.s-1 [[Metre per second|km&sdot;s<sup>−1</sup>]] km/s [[Metre per second|km/s]] == Mass and energy == lbm [[Pound (mass)|<span title="pound-mass">lb<sub>m</sub></span>]] uJ [[Joule|µJ]] J.s [[Joule-second|J&sdot;s]] kWh [[Kilowatt hour|kWh]] kW.h [[Kilowatt hour|kW&sdot;h]] J/C [[Volt|J/C]] J/kg [[Joule|J/kg]] Da [[Dalton (unit)|Da]] SI EDa [[Dalton (unit)|Da]] SI PDa [[Dalton (unit)|Da]] SI TDa [[Dalton (unit)|Da]] SI GDa [[Dalton (unit)|Da]] SI MDa [[Dalton (unit)|Da]] SI kDa [[Dalton (unit)|Da]] SI mDa [[Dalton (unit)|Da]] SI uDa [[Dalton (unit)|Da]] SI μDa [[Dalton (unit)|Da]] SI nDa [[Dalton (unit)|Da]] SI pDa [[Dalton (unit)|Da]] SI fDa [[Dalton (unit)|Da]] SI aDa [[Dalton (unit)|Da]] SI g [[Gram|g]] SI ag [[Attogram|g]] SI cg [[Centigram|g]] SI dag [[Gram|g]] SI dg [[Decigram|g]] SI Eg [[Exagram|g]] SI fg [[Femtogram|g]] SI Gg [[Gigagram|g]] SI hg [[Kilogram#SI multiples|g]] SI kg [[Kilogram|g]] SI mcg [[Microgram|g]] SI Mg [[Megagram|g]] SI mg [[Milligram|g]] SI ug [[Microgram|g]] SI µg [[Microgram|g]] SI ng [[Nanogram|g]] SI Pg [[Petagram|g]] SI pg [[Picogram|g]] SI Tg [[Tonne|g]] SI yg [[Yoctogram|g]] SI Yg [[Yottagram|g]] SI zg [[Zeptogram|g]] SI Zg [[Zettagram|g]] SI == Pressure and density == psi [[Pounds per square inch|psi]] g.cm-3 [[Gram per cubic centimetre|g&sdot;cm<sup>−3</sup>]] g/cm3 [[Gram per cubic centimetre|g/cm<sup>3</sup>]] kg.m-3 [[Kilogram per cubic metre|kg&sdot;m<sup>−3</sup>]] kg/m3 [[Kilogram per cubic metre|kg/m<sup>3</sup>]] kg/cm3 [[Density#Formula and common units|kg/cm<sup>3</sup>]] g/L [[Gram per litre|g/L]] g/l [[Gram per litre|g/l]] mcg/dL [[Gram per litre|µg/dL]] mcg/dl [[Gram per litre|µg/dl]] mg/mL [[Gram per litre|mg/mL]] mg/ml [[Gram per litre|mg/ml]] ug/dL [[Gram per litre|µg/dL]] ug/dl [[Gram per litre|µg/dl]] μg/dL [[Gram per litre|μg/dL]] μg/dl [[Gram per litre|μg/dl]] mg.L-1 [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]] mg/L [[Gram per litre|<abbr title="milligrams per liter">mg/L</abbr>]] mg.l-1 [[Gram per litre|<abbr title="milligrams per liter">mg/l</abbr>]] mg/l [[Gram per litre|<abbr title="milligrams per liter">mg/l</abbr>]] == Fracture toughness == MPa.m.5 [[Fracture toughness|MPa&sdot;m<sup>1/2</sup>]] kPa.m.5 [[Fracture toughness|kPa&sdot;m<sup>1/2</sup>]] Pa.m.5 [[Fracture toughness|Pa&sdot;m<sup>1/2</sup>]] == Temperature == degC °C ALIAS degF °F ALIAS degR °R ALIAS K [[Kelvin|K]] SI YK [[Yottakelvin|K]] SI ZK [[Zettakelvin|K]] SI EK [[Kelvin|K]] SI PK [[Petakelvin|K]] SI TK [[Terakelvin|K]] SI GK [[Gigakelvin|K]] SI MK [[Megakelvin|K]] SI kK [[Kilokelvin|K]] SI hK [[Hectokelvin|K]] SI daK [[Decakelvin|K]] SI dK [[Decikelvin|K]] SI cK [[Centikelvin|K]] SI mK [[Millikelvin|K]] SI µK [[Microkelvin|K]] SI uK [[Microkelvin|K]] SI nK [[Nanokelvin|K]] SI pK [[Picokelvin|K]] SI fK [[Femtokelvin|K]] SI aK [[Attokelvin|K]] SI zK [[Zeptokelvin|K]] SI yK [[Yoctokelvin|K]] SI == Electromagnetism == Wb [[Weber (unit)|Wb]] N.A-2 [[Permeability (electromagnetism)|N&sdot;A<sup>−2</sup>]] H.m-1 [[Permeability (electromagnetism)|H&sdot;m<sup>−1</sup>]] V.m-1 [[Electric field|V&sdot;m<sup>−1</sup>]] V/m [[Electric field|V/m]] C [[Coulomb|C]] SI YC [[Coulomb|C]] SI ZC [[Coulomb|C]] SI EC [[Coulomb|C]] SI PC [[Coulomb|C]] SI TC [[Coulomb|C]] SI GC [[Coulomb|C]] SI MC [[Coulomb|C]] SI kC [[Coulomb|C]] SI hC [[Coulomb|C]] SI daC [[Coulomb|C]] SI dC [[Coulomb|C]] SI cC [[Coulomb|C]] SI mC [[Coulomb|C]] SI µC [[Coulomb|C]] SI uC [[Coulomb|C]] SI nC [[Coulomb|C]] SI pC [[Coulomb|C]] SI fC [[Coulomb|C]] SI aC [[Coulomb|C]] SI zC [[Coulomb|C]] SI yC [[Coulomb|C]] SI F [[Farad|F]] SI YF [[Farad|F]] SI ZF [[Farad|F]] SI EF [[Farad|F]] SI PF [[Farad|F]] SI TF [[Farad|F]] SI GF [[Farad|F]] SI MF [[Farad|F]] SI kF [[Farad|F]] SI hF [[Farad|F]] SI daF [[Farad|F]] SI dF [[Farad|F]] SI cF [[Farad|F]] SI mF [[Farad|F]] SI µF [[Farad|F]] SI uF [[Farad|F]] SI nF [[Farad|F]] SI pF [[Farad|F]] SI fF [[Farad|F]] SI aF [[Farad|F]] SI zF [[Farad|F]] SI yF [[Farad|F]] SI H [[Henry (unit)|H]] SI YH [[Henry (unit)|H]] SI ZH [[Henry (unit)|H]] SI EH [[Henry (unit)|H]] SI PH [[Henry (unit)|H]] SI TH [[Henry (unit)|H]] SI GH [[Henry (unit)|H]] SI MH [[Henry (unit)|H]] SI kH [[Henry (unit)|H]] SI hH [[Henry (unit)|H]] SI daH [[Henry (unit)|H]] SI dH [[Henry (unit)|H]] SI cH [[Henry (unit)|H]] SI mH [[Henry (unit)|H]] SI µH [[Henry (unit)|H]] SI uH [[Henry (unit)|H]] SI nH [[Henry (unit)|H]] SI pH [[Henry (unit)|H]] SI fH [[Henry (unit)|H]] SI aH [[Henry (unit)|H]] SI zH [[Henry (unit)|H]] SI yH [[Henry (unit)|H]] SI A [[Ampere|A]] SI YA [[Ampere|A]] SI ZA [[Ampere|A]] SI EA [[Ampere|A]] SI PA [[Ampere|A]] SI TA [[Ampere|A]] SI GA [[Ampere|A]] SI MA [[Ampere|A]] SI kA [[Ampere|A]] SI hA [[Ampere|A]] SI daA [[Ampere|A]] SI dA [[Ampere|A]] SI cA [[Ampere|A]] SI mA [[Ampere|A]] SI µA [[Ampere|A]] SI uA [[Ampere|A]] SI nA [[Ampere|A]] SI pA [[Ampere|A]] SI fA [[Ampere|A]] SI aA [[Ampere|A]] SI zA [[Ampere|A]] SI yA [[Ampere|A]] SI V [[Volt|V]] SI YV [[Volt|V]] SI ZV [[Volt|V]] SI EV [[Volt|V]] SI PV [[Volt|V]] SI TV [[Volt|V]] SI GV [[Volt|V]] SI MV [[Volt|V]] SI kV [[Volt|V]] SI hV [[Volt|V]] SI daV [[Volt|V]] SI dV [[Volt|V]] SI cV [[Volt|V]] SI mV [[Volt|V]] SI µV [[Volt|V]] SI uV [[Volt|V]] SI nV [[Volt|V]] SI pV [[Volt|V]] SI fV [[Volt|V]] SI aV [[Volt|V]] SI zV [[Volt|V]] SI yV [[Volt|V]] SI VA [[Volt-ampere|VA]] SI YVA [[Volt-ampere|VA]] SI ZVA [[Volt-ampere|VA]] SI EVA [[Volt-ampere|VA]] SI PVA [[Volt-ampere|VA]] SI TVA [[Volt-ampere|VA]] SI GVA [[Volt-ampere|VA]] SI MVA [[Volt-ampere|VA]] SI kVA [[Volt-ampere|VA]] SI hVA [[Volt-ampere|VA]] SI daVA [[Volt-ampere|VA]] SI dVA [[Volt-ampere|VA]] SI cVA [[Volt-ampere|VA]] SI mVA [[Volt-ampere|VA]] SI µVA [[Volt-ampere|VA]] SI uVA [[Volt-ampere|VA]] SI nVA [[Volt-ampere|VA]] SI pVA [[Volt-ampere|VA]] SI fVA [[Volt-ampere|VA]] SI aVA [[Volt-ampere|VA]] SI zVA [[Volt-ampere|VA]] SI yVA [[Volt-ampere|VA]] SI Ω [[Ohm|Ω]] SI YΩ.m [[Electrical resistivity and conductivity#Definition|YΩ&sdot;m]] 1e24 ZΩ.m [[Electrical resistivity and conductivity#Definition|ZΩ&sdot;m]] 1e21 EΩ.m [[Electrical resistivity and conductivity#Definition|EΩ&sdot;m]] 1e18 PΩ.m [[Electrical resistivity and conductivity#Definition|PΩ&sdot;m]] 1e15 TΩ.m [[Electrical resistivity and conductivity#Definition|TΩ&sdot;m]] 1e12 GΩ.m [[Electrical resistivity and conductivity#Definition|GΩ&sdot;m]] 1e9 MΩ.m [[Electrical resistivity and conductivity#Definition|MΩ&sdot;m]] 1e6 kΩ.m [[Electrical resistivity and conductivity#Definition|kΩ&sdot;m]] 1e3 Ω.m [[Electrical resistivity and conductivity#Definition|Ω&sdot;m]] 1 mΩ.m [[Electrical resistivity and conductivity#Definition|mΩ&sdot;m]] 1e-3 µΩ.m [[Electrical resistivity and conductivity#Definition|µΩ&sdot;m]] 1e-6 uΩ.m [[Electrical resistivity and conductivity#Definition|µΩ&sdot;m]] 1e-6 nΩ.m [[Electrical resistivity and conductivity#Definition|nΩ&sdot;m]] 1e-9 pΩ.m [[Electrical resistivity and conductivity#Definition|pΩ&sdot;m]] 1e-12 fΩ.m [[Electrical resistivity and conductivity#Definition|fΩ&sdot;m]] 1e-15 aΩ.m [[Electrical resistivity and conductivity#Definition|aΩ&sdot;m]] 1e-18 zΩ.m [[Electrical resistivity and conductivity#Definition|zΩ&sdot;m]] 1e-21 yΩ.m [[Electrical resistivity and conductivity#Definition|yΩ&sdot;m]] 1e-24 R [[Rayleigh (unit)|R]] SI G [[Gauss (unit)|G]] SI aG [[Attogauss|G]] SI cG [[Centigauss|G]] SI daG [[Decagauss|G]] SI dG [[Decigauss|G]] SI EG [[Exagauss|G]] SI fG [[Femtogauss|G]] SI GG [[Gigagauss|G]] SI hG [[Hectogauss|G]] SI kG [[Kilogauss|G]] SI MG [[Megagauss|G]] SI mG [[Milligauss|G]] SI uG [[Microgauss|G]] SI µG [[Microgauss|G]] SI nG [[Nanogauss|G]] SI PG [[Petagauss|G]] SI pG [[Picogauss|G]] SI TG [[Teragauss|G]] SI yG [[Yoctogauss|G]] SI YG [[Yottagauss|G]] SI zG [[Zeptogauss|G]] SI ZG [[Zettagauss|G]] SI T [[Tesla (unit)|T]] SI aT [[Attotesla|T]] SI cT [[Centitesla|T]] SI daT [[Decatesla|T]] SI dT [[Decitesla|T]] SI ET [[Exatesla|T]] SI fT [[Femtotesla|T]] SI GT [[Gigatesla|T]] SI hT [[Hectotesla|T]] SI kT [[Kilotesla|T]] SI MT [[Megatesla|T]] SI mT [[Millitesla|T]] SI uT [[Microtesla|T]] SI µT [[Microtesla|T]] SI nT [[Nanotesla|T]] SI PT [[Petatesla|T]] SI pT [[Picotesla|T]] SI TT [[Teratesla|T]] SI yT [[Yoctotesla|T]] SI YT [[Yottatesla|T]] SI zT [[Zeptotesla|T]] SI ZT [[Zettatesla|T]] SI == Astrophysics == au [[Astronomical unit|au]] c [[Speed of light|''c'']] ly [[Light-year|ly]] Earth mass [[Earth mass|''M''<sub>🜨</sub>]] Earth radius [[Earth radius|''R''<sub>🜨</sub>]] M_Earth [[Earth mass|''M''<sub>🜨</sub>]] R_Earth [[Earth radius|''R''<sub>🜨</sub>]] M+ [[Earth mass|''M''<sub>🜨</sub>]] R+ [[Earth radius|''R''<sub>🜨</sub>]] Jupiter mass [[Jupiter mass|''M''<sub>J</sub>]] Jupiter radius [[Jupiter radius|''R''<sub>J</sub>]] Jy [[Jansky|Jy]] M_Jupiter [[Jupiter mass|''M''<sub>J</sub>]] R_Jupiter [[Jupiter radius|''R''<sub>J</sub>]] Solar mass [[Solar mass|''M''<sub>&#x2609;</sub>]] solar mass [[Solar mass|''M''<sub>&#x2609;</sub>]] M_Solar [[Solar mass|''M''<sub>&#x2609;</sub>]] M_solar [[Solar mass|''M''<sub>&#x2609;</sub>]] R_Solar [[Solar radius|''R''<sub>&#x2609;</sub>]] R_solar [[Solar radius|''R''<sub>&#x2609;</sub>]] Solar radius [[Solar radius|''R''<sub>&#x2609;</sub>]] solar radius [[Solar radius|''R''<sub>&#x2609;</sub>]] Solar luminosity [[Solar luminosity|''L''<sub>&#x2609;</sub>]] solar luminosity [[Solar luminosity|''L''<sub>&#x2609;</sub>]] L_solar [[Solar luminosity|''L''<sub>&#x2609;</sub>]] L_Solar [[Solar luminosity|''L''<sub>&#x2609;</sub>]] Lo [[Solar luminosity|''L''<sub>&#x2609;</sub>]] pc2 [[Parsec|pc<sup>2</sup>]] pc3 [[Parsec|pc<sup>3</sup>]] kpc2 [[Parsec#Parsecs and kiloparsecs|kpc<sup>2</sup>]] kpc3 [[Parsec#Parsecs and kiloparsecs|kpc<sup>3</sup>]] kpc [[Parsec#Parsecs and kiloparsecs|kpc]] Mpc2 [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>2</sup>]] Mpc3 [[Parsec#Megaparsecs and gigaparsecs|Mpc<sup>3</sup>]] Mpc [[Parsec#Megaparsecs and gigaparsecs|Mpc]] Gpc2 [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>2</sup>]] Gpc3 [[Parsec#Megaparsecs and gigaparsecs|Gpc<sup>3</sup>]] Gpc [[Parsec#Megaparsecs and gigaparsecs|Gpc]] == Nuclear physics and chemistry == cm-1 [[Wavenumber|cm<sup>−1</sup>]] u [[Unified atomic mass unit|u]] osmol [[Osmole (unit)|osmol]] Osm [[Osmole (unit)|Osm]] M [[Molarity|M]] TM [[Molarity|M]] SI GM [[Molarity|M]] SI MM [[Molarity|M]] SI kM [[Molarity|M]] SI hM [[Molarity|M]] SI daM [[Molarity|M]] SI dM [[Molarity|M]] SI cM [[Molarity|M]] SI mM [[Molarity|M]] SI uM [[Molarity|M]] 1e-6 nM [[Molarity|M]] SI pM [[Molarity|M]] SI kg.mol-1 [[Molar mass|kg&sdot;mol<sup>−1</sup>]] kg/mol [[Molar mass|kg/mol]] g.mol-1 [[Molar mass|g&sdot;mol<sup>−1</sup>]] g/mol [[Molar mass|g/mol]] eV/c2 [[Electronvolt#Mass|eV/''c''<sup>2</sup>]] keV/c2 [[Electronvolt#Mass|keV/''c''<sup>2</sup>]] MeV/c2 [[Electronvolt#Mass|MeV/''c''<sup>2</sup>]] GeV/c2 [[Electronvolt#Mass|GeV/''c''<sup>2</sup>]] TeV/c2 [[Electronvolt#Mass|TeV/''c''<sup>2</sup>]] eV [[Electronvolt|eV]] meV [[Electronvolt|meV]] keV [[Electronvolt|keV]] MeV [[Electronvolt|MeV]] GeV [[Electronvolt|GeV]] TeV [[Electronvolt|TeV]] mol-1 [[Avogadro constant|mol<sup>−1</sup>]] J.mol-1 [[Joule per mole|J&sdot;mol<sup>−1</sup>]] J/mol [[Joule per mole|J/mol]] kJ.mol-1 [[Joule per mole|kJ&sdot;mol<sup>−1</sup>]] kJ/mol [[Joule per mole|kJ/mol]] MJ.mol-1 [[Joule per mole|MJ&sdot;mol<sup>−1</sup>]] MJ/mol [[Joule per mole|MJ/mol]] GJ.mol-1 [[Joule per mole|GJ&sdot;mol<sup>−1</sup>]] GJ/mol [[Joule per mole|GJ/mol]] TJ.mol-1 [[Joule per mole|TJ&sdot;mol<sup>−1</sup>]] TJ/mol [[Joule per mole|TJ/mol]] == Numbers and phrases == pp [[Page (paper)|pp]] ppb [[Parts per billion|ppb]] 1e-9 ppm [[Parts per million|ppm]] 1e-6 billiard [[Orders of magnitude (numbers)#1015|billiard]] 1e15 billion [[1,000,000,000|billion]] 1e9 billionth [[1,000,000,000|billionth]] 1e-9 billionths [[1,000,000,000|billionths]] 1e-9 decilliard [[Orders of magnitude (numbers)#1063|decilliard]] 1e63 decillion [[Orders of magnitude (numbers)#1033|decillion]] 1e33 decillionth [[Orders of magnitude (numbers)#1033|decillionth]] 1e-33 decillionths [[Orders of magnitude (numbers)#1033|decillionths]] 1e-33 milliard [[1,000,000,000|milliard]] 1e9 million [[million]] 1e6 millionth [[million]]th 1e-6 millionths [[million]]ths 1e-6 nonilliard [[Orders of magnitude (numbers)#1057|nonilliard]] 1e57 nonillion [[Orders of magnitude (numbers)#1030|nonillion]] 1e30 nonillionth [[Orders of magnitude (numbers)#1030|nonillionth]] 1e-30 nonillionths [[Orders of magnitude (numbers)#1030|nonillionths]] 1e-30 octilliard [[Orders of magnitude (numbers)#1051|octilliard]] 1e51 octillion [[Orders of magnitude (numbers)#1027|octillion]] 1e27 octillionth [[Orders of magnitude (numbers)#1027|octillionth]] 1e-27 octillionths [[Orders of magnitude (numbers)#1027|octillionths]] 1e-27 quadrilliard [[Orders of magnitude (numbers)#1027|quadrilliard]] 1e27 quadrillion [[Orders of magnitude (numbers)#1015|quadrillion]] 1e15 quadrillionth [[Orders of magnitude (numbers)#1015|quadrillionth]] 1e-15 quadrillionths [[Orders of magnitude (numbers)#1015|quadrillionths]] 1e-15 quintilliard [[Orders of magnitude (numbers)#1033|quintilliard]] 1e33 quintillion [[Orders of magnitude (numbers)#1018|quintillion]] 1e18 quintillionth [[Orders of magnitude (numbers)#1018|quintillionth]] 1e-18 quintillionths [[Orders of magnitude (numbers)#1018|quintillionths]] 1e-18 septilliard [[Orders of magnitude (numbers)#1045|septilliard]] 1e45 septillion [[Orders of magnitude (numbers)#1024|septillion]] 1e24 septillionth [[Orders of magnitude (numbers)#1024|septillionth]] 1e-24 septillionths [[Orders of magnitude (numbers)#1024|septillionths]] 1e-24 sextilliard [[Orders of magnitude (numbers)#1039|sextilliard]] 1e39 sextillion [[Orders of magnitude (numbers)#1021|sextillion]] 1e21 sextillionth [[Orders of magnitude (numbers)#1021|sextillionth]] 1e-21 sextillionths [[Orders of magnitude (numbers)#1021|sextillionths]] 1e-21 trilliard [[Orders of magnitude (numbers)#1021|trilliard]] 1e21 trillion [[Orders of magnitude (numbers)#1012|trillion]] 1e12 trillionth [[Orders of magnitude (numbers)#1012|trillionth]] 1e-12 trillionths [[Orders of magnitude (numbers)#1012|trillionths]] 1e-12 == Angles == % % Percent ANGLE 0.01 percent % Percent ANGLE 0.01 per cent % Percent ANGLE 0.01 ‰ ‰ Per mil ANGLE 1e-3 per mil ‰ Per mil ANGLE 1e-3 per mill ‰ Per mil ANGLE 1e-3 per mille ‰ Per mil ANGLE 1e-3 permil ‰ Per mil ANGLE 1e-3 permill ‰ Per mil ANGLE 1e-3 permille ‰ Per mil ANGLE 1e-3 ° ° Degree (angle) ANGLE pi/180 deg ° Degree (angle) ANGLE pi/180 ' ′ Minute of arc ANGLE pi/10800 ′ ′ Minute of arc ANGLE pi/10800 arcmin ′ Minute of arc ANGLE pi/10800 arcminute ′ Minute of arc ANGLE pi/10800 " ″ Second of arc ANGLE pi/648000 ″ ″ Second of arc ANGLE pi/648000 arcsec ″ Second of arc ANGLE pi/648000 arcsecond ″ Second of arc ANGLE pi/648000 mas [[Milliarcsecond|mas]] pi/648000000 ]=] -- If val has "|long scale=on" the following definitions are used -- (then, if not found here, the normal definitions are used). -- Unit code [[Link|Symbol]] Flags/Scale local builtin_units_long_scale = [=[ == Long scale numbers and phrases == billion [[Orders of magnitude (numbers)#1012|billion]] 1e12 billionth [[Orders of magnitude (numbers)#1012|billionth]] 1e-12 billionths [[Orders of magnitude (numbers)#1012|billionths]] 1e-12 decillion [[Orders of magnitude (numbers)#1060|decillion]] 1e60 decillionth [[Orders of magnitude (numbers)#1060|decillionth]] 1e-60 decillionths [[Orders of magnitude (numbers)#1060|decillionths]] 1e-60 nonillion [[Orders of magnitude (numbers)#1054|nonillion]] 1e54 nonillionth [[Orders of magnitude (numbers)#1054|nonillionth]] 1e-54 nonillionths [[Orders of magnitude (numbers)#1054|nonillionths]] 1e-54 octillion [[Orders of magnitude (numbers)#1048|octillion]] 1e48 octillionth [[Orders of magnitude (numbers)#1048|octillionth]] 1e-48 octillionths [[Orders of magnitude (numbers)#1048|octillionths]] 1e-48 quadrillion [[Orders of magnitude (numbers)#1024|quadrillion]] 1e24 quadrillionth [[Orders of magnitude (numbers)#1024|quadrillionth]] 1e-24 quadrillionths [[Orders of magnitude (numbers)#1024|quadrillionths]] 1e-24 quintillion [[Orders of magnitude (numbers)#1030|quintillion]] 1e30 quintillionth [[Orders of magnitude (numbers)#1030|quintillionth]] 1e-30 quintillionths [[Orders of magnitude (numbers)#1030|quintillionths]] 1e-30 septillion [[Orders of magnitude (numbers)#1042|septillion]] 1e42 septillionth [[Orders of magnitude (numbers)#1042|septillionth]] 1e-42 septillionths [[Orders of magnitude (numbers)#1042|septillionths]] 1e-42 sextillion [[Orders of magnitude (numbers)#1036|sextillion]] 1e36 sextillionth [[Orders of magnitude (numbers)#1036|sextillionth]] 1e-36 sextillionths [[Orders of magnitude (numbers)#1036|sextillionths]] 1e-36 trillion [[Orders of magnitude (numbers)#1018|trillion]] 1e18 trillionth [[Orders of magnitude (numbers)#1018|trillionth]] 1e-18 trillionths [[Orders of magnitude (numbers)#1018|trillionths]] 1e-18 ]=] return { builtin_units = builtin_units, builtin_units_long_scale = builtin_units_long_scale } qk9wbd8c2mx34chb3n8h7v61vt2oa36 Modul:Wd 828 366 1026 1025 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1025 Scribunto text/plain -- Original module located at [[:en:Module:Wd]] and [[:en:Module:Wd/i18n]]. require("strict") local p = {} local arg = ... local i18n local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from frame title = frame:getTitle() else -- current module included by other module, get its title from ... title = arg end if not i18n then i18n = require(title .. "/i18n").init(aliasesP) end end p.claimCommands = { property = "property", properties = "properties", qualifier = "qualifier", qualifiers = "qualifiers", reference = "reference", references = "references" } p.generalCommands = { label = "label", title = "title", description = "description", alias = "alias", aliases = "aliases", badge = "badge", badges = "badges" } p.flags = { linked = "linked", short = "short", raw = "raw", multilanguage = "multilanguage", unit = "unit", ------------- preferred = "preferred", normal = "normal", deprecated = "deprecated", best = "best", future = "future", current = "current", former = "former", edit = "edit", editAtEnd = "edit@end", mdy = "mdy", single = "single", sourced = "sourced" } p.args = { eid = "eid", page = "page", date = "date" } local aliasesP = { coord = "P625", ----------------------- image = "P18", author = "P50", authorNameString = "P2093", publisher = "P123", importedFrom = "P143", wikimediaImportURL = "P4656", statedIn = "P248", pages = "P304", language = "P407", hasPart = "P527", publicationDate = "P577", startTime = "P580", endTime = "P582", chapter = "P792", retrieved = "P813", referenceURL = "P854", sectionVerseOrParagraph = "P958", archiveURL = "P1065", title = "P1476", formatterURL = "P1630", quote = "P1683", shortName = "P1813", definingFormula = "P2534", archiveDate = "P2960", inferredFrom = "P3452", typeOfReference = "P3865", column = "P3903", subjectNamedAs = "P1810", wikidataProperty = "P1687", publishedIn = "P1433" } local aliasesQ = { percentage = "Q11229", prolepticJulianCalendar = "Q1985786", citeWeb = "Q5637226", citeQ = "Q22321052" } local parameters = { property = "%p", qualifier = "%q", reference = "%r", alias = "%a", badge = "%b", separator = "%s", general = "%x" } local formats = { property = "%p[%s][%r]", qualifier = "%q[%s][%r]", reference = "%r", propertyWithQualifier = "%p[ <span style=\"font-size:85\\%\">(%q)</span>][%s][%r]", alias = "%a[%s]", badge = "%b[%s]" } local hookNames = { -- {level_1, level_2} [parameters.property] = {"getProperty"}, [parameters.reference] = {"getReferences", "getReference"}, [parameters.qualifier] = {"getAllQualifiers"}, [parameters.qualifier.."\\d"] = {"getQualifiers", "getQualifier"}, [parameters.alias] = {"getAlias"}, [parameters.badge] = {"getBadge"} } -- default value objects, should NOT be mutated but instead copied local defaultSeparators = { ["sep"] = {" "}, ["sep%s"] = {","}, ["sep%q"] = {"; "}, ["sep%q\\d"] = {", "}, ["sep%r"] = nil, -- none ["punc"] = nil -- none } local rankTable = { ["preferred"] = 1, ["normal"] = 2, ["deprecated"] = 3 } local function replaceAlias(id) if aliasesP[id] then id = aliasesP[id] end return id end local function errorText(code, param) local text = i18n["errors"][code] if param then text = mw.ustring.gsub(text, "$1", param) end return text end local function throwError(errorMessage, param) error(errorText(errorMessage, param)) end local function replaceDecimalMark(num) return mw.ustring.gsub(num, "[.]", i18n['numeric']['decimal-mark'], 1) end local function padZeros(num, numDigits) local numZeros local negative = false if num < 0 then negative = true num = num * -1 end num = tostring(num) numZeros = numDigits - num:len() for _ = 1, numZeros do num = "0"..num end if negative then num = "-"..num end return num end local function replaceSpecialChar(chr) if chr == '_' then -- replace underscores with spaces return ' ' else return chr end end local function replaceSpecialChars(str) local chr local esc = false local strOut = "" for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then esc = true else strOut = strOut .. replaceSpecialChar(chr) end else strOut = strOut .. chr esc = false end end return strOut end local function buildWikilink(target, label) if not label or target == label then return "[[" .. target .. "]]" else return "[[" .. target .. "|" .. label .. "]]" end end -- used to make frame.args mutable, to replace #frame.args (which is always 0) -- with the actual amount and to simply copy tables local function copyTable(tIn) if not tIn then return nil end local tOut = {} for i, v in pairs(tIn) do tOut[i] = v end return tOut end -- used to merge output arrays together; -- note that it currently mutates the first input array local function mergeArrays(a1, a2) for i = 1, #a2 do a1[#a1 + 1] = a2[i] end return a1 end local function split(str, del) local out = {} local i, j = str:find(del) if i and j then out[1] = str:sub(1, i - 1) out[2] = str:sub(j + 1) else out[1] = str end return out end local function parseWikidataURL(url) local id if url:match('^http[s]?://') then id = split(url, "Q") if id[2] then return "Q" .. id[2] end end return nil end local function parseDate(dateStr, precision) precision = precision or "d" local i, j, index, ptr local parts = {nil, nil, nil} if dateStr == nil then return parts[1], parts[2], parts[3] -- year, month, day end -- 'T' for snak values, '/' for outputs with '/Julian' attached i, j = dateStr:find("[T/]") if i then dateStr = dateStr:sub(1, i-1) end local from = 1 if dateStr:sub(1,1) == "-" then -- this is a negative number, look further ahead from = 2 end index = 1 ptr = 1 i, j = dateStr:find("-", from) if i then -- year parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) -- explicitly give base 10 to prevent error if parts[index] == -0 then parts[index] = tonumber("0") -- for some reason, 'parts[index] = 0' may actually store '-0', so parse from string instead end if precision == "y" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 i, j = dateStr:find("-", ptr) if i then -- month parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) if precision == "m" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 end end if dateStr:sub(ptr) ~= "" then -- day if we have month, month if we have year, or year parts[index] = tonumber(dateStr:sub(ptr), 10) end return parts[1], parts[2], parts[3] -- year, month, day end local function datePrecedesDate(aY, aM, aD, bY, bM, bD) if aY == nil or bY == nil then return nil end aM = aM or 1 aD = aD or 1 bM = bM or 1 bD = bD or 1 if aY < bY then return true end if aY > bY then return false end if aM < bM then return true end if aM > bM then return false end if aD < bD then return true end return false end local function getHookName(param, index) if hookNames[param] then return hookNames[param][index] elseif param:len() > 2 then return hookNames[param:sub(1, 2).."\\d"][index] else return nil end end local function alwaysTrue() return true end -- The following function parses a format string. -- -- The example below shows how a parsed string is structured in memory. -- Variables other than 'str' and 'child' are left out for clarity's sake. -- -- Example: -- "A %p B [%s[%q1]] C [%r] D" -- -- Structure: -- [ -- { -- str = "A " -- }, -- { -- str = "%p" -- }, -- { -- str = " B ", -- child = -- [ -- { -- str = "%s", -- child = -- [ -- { -- str = "%q1" -- } -- ] -- } -- ] -- }, -- { -- str = " C ", -- child = -- [ -- { -- str = "%r" -- } -- ] -- }, -- { -- str = " D" -- } -- ] -- local function parseFormat(str) local chr, esc, param, root, cur, prev, new local params = {} local function newObject(array) local obj = {} -- new object obj.str = "" array[#array + 1] = obj -- array{object} obj.parent = array return obj end local function endParam() if param > 0 then if cur.str ~= "" then cur.str = "%"..cur.str cur.param = true params[cur.str] = true cur.parent.req[cur.str] = true prev = cur cur = newObject(cur.parent) end param = 0 end end root = {} -- array root.req = {} cur = newObject(root) prev = nil esc = false param = 0 for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then endParam() esc = true elseif chr == '%' then endParam() if cur.str ~= "" then cur = newObject(cur.parent) end param = 2 elseif chr == '[' then endParam() if prev and cur.str == "" then table.remove(cur.parent) cur = prev end cur.child = {} -- new array cur.child.req = {} cur.child.parent = cur cur = newObject(cur.child) elseif chr == ']' then endParam() if cur.parent.parent then new = newObject(cur.parent.parent.parent) if cur.str == "" then table.remove(cur.parent) end cur = new end else if param > 1 then param = param - 1 elseif param == 1 then if not chr:match('%d') then endParam() end end cur.str = cur.str .. replaceSpecialChar(chr) end else cur.str = cur.str .. chr esc = false end prev = nil end endParam() -- make sure that at least one required parameter has been defined if not next(root.req) then throwError("missing-required-parameter") end -- make sure that the separator parameter "%s" is not amongst the required parameters if root.req[parameters.separator] then throwError("extra-required-parameter", parameters.separator) end return root, params end local function sortOnRank(claims) local rankPos local ranks = {{}, {}, {}, {}} -- preferred, normal, deprecated, (default) local sorted = {} for _, v in ipairs(claims) do rankPos = rankTable[v.rank] or 4 ranks[rankPos][#ranks[rankPos] + 1] = v end sorted = ranks[1] sorted = mergeArrays(sorted, ranks[2]) sorted = mergeArrays(sorted, ranks[3]) return sorted end local Config = {} -- allows for recursive calls function Config:new() local cfg = {} setmetatable(cfg, self) self.__index = self cfg.separators = { -- single value objects wrapped in arrays so that we can pass by reference ["sep"] = {copyTable(defaultSeparators["sep"])}, ["sep%s"] = {copyTable(defaultSeparators["sep%s"])}, ["sep%q"] = {copyTable(defaultSeparators["sep%q"])}, ["sep%r"] = {copyTable(defaultSeparators["sep%r"])}, ["punc"] = {copyTable(defaultSeparators["punc"])} } cfg.entity = nil cfg.entityID = nil cfg.propertyID = nil cfg.propertyValue = nil cfg.qualifierIDs = {} cfg.qualifierIDsAndValues = {} cfg.bestRank = true cfg.ranks = {true, true, false} -- preferred = true, normal = true, deprecated = false cfg.foundRank = #cfg.ranks cfg.flagBest = false cfg.flagRank = false cfg.periods = {true, true, true} -- future = true, current = true, former = true cfg.flagPeriod = false cfg.atDate = {parseDate(os.date('!%Y-%m-%d'))} -- today as {year, month, day} cfg.mdyDate = false cfg.singleClaim = false cfg.sourcedOnly = false cfg.editable = false cfg.editAtEnd = false cfg.inSitelinks = false cfg.langCode = mw.language.getContentLanguage().code cfg.langName = mw.language.fetchLanguageName(cfg.langCode, cfg.langCode) cfg.langObj = mw.language.new(cfg.langCode) cfg.siteID = mw.wikibase.getGlobalSiteId() cfg.states = {} cfg.states.qualifiersCount = 0 cfg.curState = nil cfg.prefetchedRefs = nil return cfg end local State = {} function State:new(cfg, type) local stt = {} setmetatable(stt, self) self.__index = self stt.conf = cfg stt.type = type stt.results = {} stt.parsedFormat = {} stt.separator = {} stt.movSeparator = {} stt.puncMark = {} stt.linked = false stt.rawValue = false stt.shortName = false stt.anyLanguage = false stt.unitOnly = false stt.singleValue = false return stt end -- if id == nil then item connected to current page is used function Config:getLabel(id, raw, link, short) local label = nil local prefix, title= "", nil if not id then id = mw.wikibase.getEntityIdForCurrentPage() if not id then return "" end end id = id:upper() -- just to be sure if raw then -- check if given id actually exists if mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id) then label = id end prefix, title = "d:Special:EntityPage/", label -- may be nil else -- try short name first if requested if short then label = p._property{aliasesP.shortName, [p.args.eid] = id} -- get short name if label == "" then label = nil end end -- get label if not label then label = mw.wikibase.getLabelByLang(id, self.langCode) -- XXX: should use fallback labels? end end if not label then label = "" elseif link then -- build a link if requested if not title then if id:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(id) elseif id:sub(1,1) == "P" then -- properties have no sitelink, link to Wikidata instead prefix, title = "d:Special:EntityPage/", id end end label = mw.text.nowiki(label) -- escape raw label text so it cannot be wikitext markup if title then label = buildWikilink(prefix .. title, label) end end return label end function Config:getEditIcon() local value = "" local prefix = "" local front = "&nbsp;" local back = "" if self.entityID:sub(1,1) == "P" then prefix = "Property:" end if self.editAtEnd then front = '<span style="float:' if self.langObj:isRTL() then front = front .. 'left' else front = front .. 'right' end front = front .. '">' back = '</span>' end value = "[[Fail:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode if self.propertyID then value = value .. "#" .. self.propertyID elseif self.inSitelinks then value = value .. "#sitelinks-wikipedia" end value = value .. "|" .. i18n['info']['edit-on-wikidata'] .. "]]" return front .. value .. back end -- used to create the final output string when it's all done, so that for references the -- function extensionTag("ref", ...) is only called when they really ended up in the final output function Config:concatValues(valuesArray) local outString = "" local j, skip for i = 1, #valuesArray do -- check if this is a reference if valuesArray[i].refHash then j = i - 1 skip = false -- skip this reference if it is part of a continuous row of references that already contains the exact same reference while valuesArray[j] and valuesArray[j].refHash do if valuesArray[i].refHash == valuesArray[j].refHash then skip = true break end j = j - 1 end if not skip then -- add <ref> tag with the reference's hash as its name (to deduplicate references) outString = outString .. mw.getCurrentFrame():extensionTag("ref", valuesArray[i][1], {name = valuesArray[i].refHash}) end else outString = outString .. valuesArray[i][1] end end return outString end function Config:convertUnit(unit, raw, link, short, unitOnly) local space = " " local label = "" local itemID if unit == "" or unit == "1" then return nil end if unitOnly then space = "" end itemID = parseWikidataURL(unit) if itemID then if itemID == aliasesQ.percentage then return "%" else label = self:getLabel(itemID, raw, link, short) if label ~= "" then return space .. label end end end return "" end function State:getValue(snak) return self.conf:getValue(snak, self.rawValue, self.linked, self.shortName, self.anyLanguage, self.unitOnly, false, self.type:sub(1,2)) end function Config:getValue(snak, raw, link, short, anyLang, unitOnly, noSpecial, type) if snak.snaktype == 'value' then local datatype = snak.datavalue.type local subtype = snak.datatype local datavalue = snak.datavalue.value if datatype == 'string' then if subtype == 'url' and link then -- create link explicitly if raw then -- will render as a linked number like [1] return "[" .. datavalue .. "]" else return "[" .. datavalue .. " " .. datavalue .. "]" end elseif subtype == 'commonsMedia' then if link then return buildWikilink("c:File:" .. datavalue, datavalue) elseif not raw then return "[[Fail:" .. datavalue .. "]]" else return datavalue end elseif subtype == 'geo-shape' and link then return buildWikilink("c:" .. datavalue, datavalue) elseif subtype == 'math' and not raw then local attribute = nil if (type == parameters.property or (type == parameters.qualifier and self.propertyID == aliasesP.hasPart)) and snak.property == aliasesP.definingFormula then attribute = {qid = self.entityID} end return mw.getCurrentFrame():extensionTag("math", datavalue, attribute) elseif subtype == 'external-id' and link then local url = p._property{aliasesP.formatterURL, [p.args.eid] = snak.property} -- get formatter URL if url ~= "" then url = mw.ustring.gsub(url, "$1", datavalue) return "[" .. url .. " " .. datavalue .. "]" else return datavalue end else return datavalue end elseif datatype == 'monolingualtext' then if anyLang or datavalue['language'] == self.langCode then return datavalue['text'] else return nil end elseif datatype == 'quantity' then local value = "" local unit if not unitOnly then -- get value and strip + signs from front value = mw.ustring.gsub(datavalue['amount'], "^%+(.+)$", "%1") if raw then return value end -- replace decimal mark based on locale value = replaceDecimalMark(value) -- add delimiters for readability value = i18n.addDelimiters(value) end unit = self:convertUnit(datavalue['unit'], raw, link, short, unitOnly) if unit then value = value .. unit end return value elseif datatype == 'time' then local y, m, d, p, yDiv, yRound, yFull, value, calendarID, dateStr local yFactor = 1 local sign = 1 local prefix = "" local suffix = "" local mayAddCalendar = false local calendar = "" local precision = datavalue['precision'] if precision == 11 then p = "d" elseif precision == 10 then p = "m" else p = "y" yFactor = 10^(9-precision) end y, m, d = parseDate(datavalue['time'], p) if y < 0 then sign = -1 y = y * sign end -- if precision is tens/hundreds/thousands/millions/billions of years if precision <= 8 then yDiv = y / yFactor -- if precision is tens/hundreds/thousands of years if precision >= 6 then mayAddCalendar = true if precision <= 7 then -- round centuries/millenniums up (e.g. 20th century or 3rd millennium) yRound = math.ceil(yDiv) if not raw then if precision == 6 then suffix = i18n['datetime']['suffixes']['millennium'] else suffix = i18n['datetime']['suffixes']['century'] end suffix = i18n.getOrdinalSuffix(yRound) .. suffix else -- if not verbose, take the first year of the century/millennium -- (e.g. 1901 for 20th century or 2001 for 3rd millennium) yRound = (yRound - 1) * yFactor + 1 end else -- precision == 8 -- round decades down (e.g. 2010s) yRound = math.floor(yDiv) * yFactor if not raw then prefix = i18n['datetime']['prefixes']['decade-period'] suffix = i18n['datetime']['suffixes']['decade-period'] end end if raw and sign < 0 then -- if BCE then compensate for "counting backwards" -- (e.g. -2019 for 2010s BCE, -2000 for 20th century BCE or -3000 for 3rd millennium BCE) yRound = yRound + yFactor - 1 end else local yReFactor, yReDiv, yReRound -- round to nearest for tens of thousands of years or more yRound = math.floor(yDiv + 0.5) if yRound == 0 then if precision <= 2 and y ~= 0 then yReFactor = 1e6 yReDiv = y / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years only if we have a whole number of them precision = 3 yFactor = yReFactor yRound = yReRound end end if yRound == 0 then -- otherwise, take the unrounded (original) number of years precision = 5 yFactor = 1 yRound = y mayAddCalendar = true end end if precision >= 1 and y ~= 0 then yFull = yRound * yFactor yReFactor = 1e9 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to billions of years if we're in that range precision = 0 yFactor = yReFactor yRound = yReRound else yReFactor = 1e6 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years if we're in that range precision = 3 yFactor = yReFactor yRound = yReRound end end end if not raw then if precision == 3 then suffix = i18n['datetime']['suffixes']['million-years'] elseif precision == 0 then suffix = i18n['datetime']['suffixes']['billion-years'] else yRound = yRound * yFactor if yRound == 1 then suffix = i18n['datetime']['suffixes']['year'] else suffix = i18n['datetime']['suffixes']['years'] end end else yRound = yRound * yFactor end end else yRound = y mayAddCalendar = true end if mayAddCalendar then calendarID = parseWikidataURL(datavalue['calendarmodel']) if calendarID and calendarID == aliasesQ.prolepticJulianCalendar then if not raw then if link then calendar = " ("..buildWikilink(i18n['datetime']['julian-calendar'], i18n['datetime']['julian'])..")" else calendar = " ("..i18n['datetime']['julian']..")" end else calendar = "/"..i18n['datetime']['julian'] end end end if not raw then local ce = nil if sign < 0 then ce = i18n['datetime']['BCE'] elseif precision <= 5 then ce = i18n['datetime']['CE'] end if ce then if link then ce = buildWikilink(i18n['datetime']['common-era'], ce) end suffix = suffix .. " " .. ce end value = tostring(yRound) if m then dateStr = self.langObj:formatDate("F", "1-"..m.."-1") if d then if self.mdyDate then dateStr = dateStr .. " " .. d .. "," else dateStr = d .. " " .. dateStr end end value = dateStr .. " " .. value end value = prefix .. value .. suffix .. calendar else value = padZeros(yRound * sign, 4) if m then value = value .. "-" .. padZeros(m, 2) if d then value = value .. "-" .. padZeros(d, 2) end end value = value .. calendar end return value elseif datatype == 'globecoordinate' then -- logic from https://github.com/DataValues/Geo (v4.0.1) local precision, unitsPerDegree, numDigits, strFormat, value, globe local latitude, latConv, latValue, latLink local longitude, lonConv, lonValue, lonLink local latDirection, latDirectionN, latDirectionS, latDirectionEN local lonDirection, lonDirectionE, lonDirectionW, lonDirectionEN local degSymbol, minSymbol, secSymbol, separator local latDegrees = nil local latMinutes = nil local latSeconds = nil local lonDegrees = nil local lonMinutes = nil local lonSeconds = nil local latDegSym = "" local latMinSym = "" local latSecSym = "" local lonDegSym = "" local lonMinSym = "" local lonSecSym = "" local latDirectionEN_N = "N" local latDirectionEN_S = "S" local lonDirectionEN_E = "E" local lonDirectionEN_W = "W" if not raw then latDirectionN = i18n['coord']['latitude-north'] latDirectionS = i18n['coord']['latitude-south'] lonDirectionE = i18n['coord']['longitude-east'] lonDirectionW = i18n['coord']['longitude-west'] degSymbol = i18n['coord']['degrees'] minSymbol = i18n['coord']['minutes'] secSymbol = i18n['coord']['seconds'] separator = i18n['coord']['separator'] else latDirectionN = latDirectionEN_N latDirectionS = latDirectionEN_S lonDirectionE = lonDirectionEN_E lonDirectionW = lonDirectionEN_W degSymbol = "/" minSymbol = "/" secSymbol = "/" separator = "/" end latitude = datavalue['latitude'] longitude = datavalue['longitude'] if latitude < 0 then latDirection = latDirectionS latDirectionEN = latDirectionEN_S latitude = math.abs(latitude) else latDirection = latDirectionN latDirectionEN = latDirectionEN_N end if longitude < 0 then lonDirection = lonDirectionW lonDirectionEN = lonDirectionEN_W longitude = math.abs(longitude) else lonDirection = lonDirectionE lonDirectionEN = lonDirectionEN_E end precision = datavalue['precision'] if not precision or precision <= 0 then precision = 1 / 3600 -- precision not set (correctly), set to arcsecond end -- remove insignificant detail latitude = math.floor(latitude / precision + 0.5) * precision longitude = math.floor(longitude / precision + 0.5) * precision if precision >= 1 - (1 / 60) and precision < 1 then precision = 1 elseif precision >= (1 / 60) - (1 / 3600) and precision < (1 / 60) then precision = 1 / 60 end if precision >= 1 then unitsPerDegree = 1 elseif precision >= (1 / 60) then unitsPerDegree = 60 else unitsPerDegree = 3600 end numDigits = math.ceil(-math.log10(unitsPerDegree * precision)) if numDigits <= 0 then numDigits = tonumber("0") -- for some reason, 'numDigits = 0' may actually store '-0', so parse from string instead end strFormat = "%." .. numDigits .. "f" if precision >= 1 then latDegrees = strFormat:format(latitude) lonDegrees = strFormat:format(longitude) if not raw then latDegSym = replaceDecimalMark(latDegrees) .. degSymbol lonDegSym = replaceDecimalMark(lonDegrees) .. degSymbol else latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol end else latConv = math.floor(latitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits lonConv = math.floor(longitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits if precision >= (1 / 60) then latMinutes = latConv lonMinutes = lonConv else latSeconds = latConv lonSeconds = lonConv latMinutes = math.floor(latSeconds / 60) lonMinutes = math.floor(lonSeconds / 60) latSeconds = strFormat:format(latSeconds - (latMinutes * 60)) lonSeconds = strFormat:format(lonSeconds - (lonMinutes * 60)) if not raw then latSecSym = replaceDecimalMark(latSeconds) .. secSymbol lonSecSym = replaceDecimalMark(lonSeconds) .. secSymbol else latSecSym = latSeconds .. secSymbol lonSecSym = lonSeconds .. secSymbol end end latDegrees = math.floor(latMinutes / 60) lonDegrees = math.floor(lonMinutes / 60) latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol latMinutes = latMinutes - (latDegrees * 60) lonMinutes = lonMinutes - (lonDegrees * 60) if precision >= (1 / 60) then latMinutes = strFormat:format(latMinutes) lonMinutes = strFormat:format(lonMinutes) if not raw then latMinSym = replaceDecimalMark(latMinutes) .. minSymbol lonMinSym = replaceDecimalMark(lonMinutes) .. minSymbol else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end end latValue = latDegSym .. latMinSym .. latSecSym .. latDirection lonValue = lonDegSym .. lonMinSym .. lonSecSym .. lonDirection value = latValue .. separator .. lonValue if link then globe = parseWikidataURL(datavalue['globe']) if globe then globe = mw.wikibase.getLabelByLang(globe, "en"):lower() else globe = "earth" end latLink = table.concat({latDegrees, latMinutes, latSeconds}, "_") lonLink = table.concat({lonDegrees, lonMinutes, lonSeconds}, "_") value = "[https://geohack.toolforge.org/geohack.php?language="..self.langCode.."&params="..latLink.."_"..latDirectionEN.."_"..lonLink.."_"..lonDirectionEN.."_globe:"..globe.." "..value.."]" end return value elseif datatype == 'wikibase-entityid' then local label local itemID = datavalue['numeric-id'] if subtype == 'wikibase-item' then itemID = "Q" .. itemID elseif subtype == 'wikibase-property' then itemID = "P" .. itemID else return '<strong class="error">' .. errorText('unknown-data-type', subtype) .. '</strong>' end label = self:getLabel(itemID, raw, link, short) if label == "" then label = nil end return label else return '<strong class="error">' .. errorText('unknown-data-type', datatype) .. '</strong>' end elseif snak.snaktype == 'somevalue' and not noSpecial then if raw then return " " -- single space represents 'somevalue' else return i18n['values']['unknown'] end elseif snak.snaktype == 'novalue' and not noSpecial then if raw then return "" -- empty string represents 'novalue' else return i18n['values']['none'] end else return nil end end function Config:getSingleRawQualifier(claim, qualifierID) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[qualifierID] end if qualifiers and qualifiers[1] then return self:getValue(qualifiers[1], true) -- raw = true else return nil end end function Config:snakEqualsValue(snak, value) local snakValue = self:getValue(snak, true) -- raw = true if snakValue and snak.snaktype == 'value' and snak.datavalue.type == 'wikibase-entityid' then value = value:upper() end return snakValue == value end function Config:setRank(rank) local rankPos if rank == p.flags.best then self.bestRank = true self.flagBest = true -- mark that 'best' flag was given return end if rank:sub(1,9) == p.flags.preferred then rankPos = 1 elseif rank:sub(1,6) == p.flags.normal then rankPos = 2 elseif rank:sub(1,10) == p.flags.deprecated then rankPos = 3 else return end -- one of the rank flags was given, check if another one was given before if not self.flagRank then self.ranks = {false, false, false} -- no other rank flag given before, so unset ranks self.bestRank = self.flagBest -- unsets bestRank only if 'best' flag was not given before self.flagRank = true -- mark that a rank flag was given end if rank:sub(-1) == "+" then for i = rankPos, 1, -1 do self.ranks[i] = true end elseif rank:sub(-1) == "-" then for i = rankPos, #self.ranks do self.ranks[i] = true end else self.ranks[rankPos] = true end end function Config:setPeriod(period) local periodPos if period == p.flags.future then periodPos = 1 elseif period == p.flags.current then periodPos = 2 elseif period == p.flags.former then periodPos = 3 else return end -- one of the period flags was given, check if another one was given before if not self.flagPeriod then self.periods = {false, false, false} -- no other period flag given before, so unset periods self.flagPeriod = true -- mark that a period flag was given end self.periods[periodPos] = true end function Config:qualifierMatches(claim, id, value) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[id] end if qualifiers then for _, v in pairs(qualifiers) do if self:snakEqualsValue(v, value) then return true end end elseif value == "" then -- if the qualifier is not present then treat it the same as the special value 'novalue' return true end return false end function Config:rankMatches(rankPos) if self.bestRank then return (self.ranks[rankPos] and self.foundRank >= rankPos) else return self.ranks[rankPos] end end function Config:timeMatches(claim) local startTime = nil local startTimeY = nil local startTimeM = nil local startTimeD = nil local endTime = nil local endTimeY = nil local endTimeM = nil local endTimeD = nil if self.periods[1] and self.periods[2] and self.periods[3] then -- any time return true end startTime = self:getSingleRawQualifier(claim, aliasesP.startTime) if startTime and startTime ~= "" and startTime ~= " " then startTimeY, startTimeM, startTimeD = parseDate(startTime) end endTime = self:getSingleRawQualifier(claim, aliasesP.endTime) if endTime and endTime ~= "" and endTime ~= " " then endTimeY, endTimeM, endTimeD = parseDate(endTime) end if startTimeY ~= nil and endTimeY ~= nil and datePrecedesDate(endTimeY, endTimeM, endTimeD, startTimeY, startTimeM, startTimeD) then -- invalidate end time if it precedes start time endTimeY = nil endTimeM = nil endTimeD = nil end if self.periods[1] then -- future if startTimeY and datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD) then return true end end if self.periods[2] then -- current if (startTimeY == nil or not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD)) and (endTimeY == nil or datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD)) then return true end end if self.periods[3] then -- former if endTimeY and not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD) then return true end end return false end function Config:processFlag(flag) if not flag then return false end if flag == p.flags.linked then self.curState.linked = true return true elseif flag == p.flags.raw then self.curState.rawValue = true if self.curState == self.states[parameters.reference] then -- raw reference values end with periods and require a separator (other than none) self.separators["sep%r"][1] = {" "} end return true elseif flag == p.flags.short then self.curState.shortName = true return true elseif flag == p.flags.multilanguage then self.curState.anyLanguage = true return true elseif flag == p.flags.unit then self.curState.unitOnly = true return true elseif flag == p.flags.mdy then self.mdyDate = true return true elseif flag == p.flags.single then self.singleClaim = true return true elseif flag == p.flags.sourced then self.sourcedOnly = true return true elseif flag == p.flags.edit then self.editable = true return true elseif flag == p.flags.editAtEnd then self.editable = true self.editAtEnd = true return true elseif flag == p.flags.best or flag:match('^'..p.flags.preferred..'[+-]?$') or flag:match('^'..p.flags.normal..'[+-]?$') or flag:match('^'..p.flags.deprecated..'[+-]?$') then self:setRank(flag) return true elseif flag == p.flags.future or flag == p.flags.current or flag == p.flags.former then self:setPeriod(flag) return true elseif flag == "" then -- ignore empty flags and carry on return true else return false end end function Config:processFlagOrCommand(flag) local param = "" if not flag then return false end if flag == p.claimCommands.property or flag == p.claimCommands.properties then param = parameters.property elseif flag == p.claimCommands.qualifier or flag == p.claimCommands.qualifiers then self.states.qualifiersCount = self.states.qualifiersCount + 1 param = parameters.qualifier .. self.states.qualifiersCount self.separators["sep"..param] = {copyTable(defaultSeparators["sep%q\\d"])} elseif flag == p.claimCommands.reference or flag == p.claimCommands.references then param = parameters.reference else return self:processFlag(flag) end if self.states[param] then return false end -- create a new state for each command self.states[param] = State:new(self, param) -- use "%x" as the general parameter name self.states[param].parsedFormat = parseFormat(parameters.general) -- will be overwritten for param=="%p" -- set the separator self.states[param].separator = self.separators["sep"..param] -- will be nil for param=="%p", which will be set separately if flag == p.claimCommands.property or flag == p.claimCommands.qualifier or flag == p.claimCommands.reference then self.states[param].singleValue = true end self.curState = self.states[param] return true end function Config:processSeparators(args) local sep for i, v in pairs(self.separators) do if args[i] then sep = replaceSpecialChars(args[i]) if sep ~= "" then self.separators[i][1] = {sep} else self.separators[i][1] = nil end end end end function Config:setFormatAndSeparators(state, parsedFormat) state.parsedFormat = parsedFormat state.separator = self.separators["sep"] state.movSeparator = self.separators["sep"..parameters.separator] state.puncMark = self.separators["punc"] end -- determines if a claim has references by prefetching them from the claim using getReferences, -- which applies some filtering that determines if a reference is actually returned, -- and caches the references for later use function State:isSourced(claim) self.conf.prefetchedRefs = self:getReferences(claim) return (#self.conf.prefetchedRefs > 0) end function State:resetCaches() -- any prefetched references of the previous claim must not be used self.conf.prefetchedRefs = nil end function State:claimMatches(claim) local matches, rankPos -- first of all, reset any cached values used for the previous claim self:resetCaches() -- if a property value was given, check if it matches the claim's property value if self.conf.propertyValue then matches = self.conf:snakEqualsValue(claim.mainsnak, self.conf.propertyValue) else matches = true end -- if any qualifier values were given, check if each matches one of the claim's qualifier values for i, v in pairs(self.conf.qualifierIDsAndValues) do matches = (matches and self.conf:qualifierMatches(claim, i, v)) end -- check if the claim's rank and time period match rankPos = rankTable[claim.rank] or 4 matches = (matches and self.conf:rankMatches(rankPos) and self.conf:timeMatches(claim)) -- if only claims with references must be returned, check if this one has any if self.conf.sourcedOnly then matches = (matches and self:isSourced(claim)) -- prefetches and caches references end return matches, rankPos end function State:out() local result -- collection of arrays with value objects local valuesArray -- array with value objects local sep = nil -- value object local out = {} -- array with value objects local function walk(formatTable, result) local valuesArray = {} -- array with value objects for i, v in pairs(formatTable.req) do if not result[i] or not result[i][1] then -- we've got no result for a parameter that is required on this level, -- so skip this level (and its children) by returning an empty result return {} end end for _, v in ipairs(formatTable) do if v.param then valuesArray = mergeArrays(valuesArray, result[v.str]) elseif v.str ~= "" then valuesArray[#valuesArray + 1] = {v.str} end if v.child then valuesArray = mergeArrays(valuesArray, walk(v.child, result)) end end return valuesArray end -- iterate through the results from back to front, so that we know when to add separators for i = #self.results, 1, -1 do result = self.results[i] -- if there is already some output, then add the separators if #out > 0 then sep = self.separator[1] -- fixed separator result[parameters.separator] = {self.movSeparator[1]} -- movable separator else sep = nil result[parameters.separator] = {self.puncMark[1]} -- optional punctuation mark end valuesArray = walk(self.parsedFormat, result) if #valuesArray > 0 then if sep then valuesArray[#valuesArray + 1] = sep end out = mergeArrays(valuesArray, out) end end -- reset state before next iteration self.results = {} return out end -- level 1 hook function State:getProperty(claim) local value = {self:getValue(claim.mainsnak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getQualifiers(claim, param) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[self.conf.qualifierIDs[param]] end if qualifiers then -- iterate through claim's qualifier statements to collect their values; -- return array with multiple value objects return self.conf.states[param]:iterate(qualifiers, {[parameters.general] = hookNames[parameters.qualifier.."\\d"][2], count = 1}) -- pass qualifier state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getQualifier(snak) local value = {self:getValue(snak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getAllQualifiers(claim, param, result, hooks) local out = {} -- array with value objects local sep = self.conf.separators["sep"..parameters.qualifier][1] -- value object -- iterate through the output of the separate "qualifier(s)" commands for i = 1, self.conf.states.qualifiersCount do -- if a hook has not been called yet, call it now if not result[parameters.qualifier..i] then self:callHook(parameters.qualifier..i, hooks, claim, result) end -- if there is output for this particular "qualifier(s)" command, then add it if result[parameters.qualifier..i] and result[parameters.qualifier..i][1] then -- if there is already some output, then add the separator if #out > 0 and sep then out[#out + 1] = sep end out = mergeArrays(out, result[parameters.qualifier..i]) end end return out end -- level 1 hook function State:getReferences(claim) if self.conf.prefetchedRefs then -- return references that have been prefetched by isSourced return self.conf.prefetchedRefs end if claim.references then -- iterate through claim's reference statements to collect their values; -- return array with multiple value objects return self.conf.states[parameters.reference]:iterate(claim.references, {[parameters.general] = hookNames[parameters.reference][2], count = 1}) -- pass reference state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getReference(statement) local key, citeWeb, citeQ, label local params = {} local citeParams = {['web'] = {}, ['q'] = {}} local citeMismatch = {} local useCite = nil local useParams = nil local value = "" local ref = {} local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved local numAuthorParameters = 0 local numAuthorNameStringParameters = 0 local tempLink local additionalRefProperties = {} -- will hold properties of the reference which are not in statement.snaks, namely backup title from "subject named as" and URL from an external ID local wikidataPropertiesOfSource -- will contain "Wikidata property" properties of the item in stated in, if any local version = 5 -- increment this each time the below logic is changed to avoid conflict errors if statement.snaks then -- don't include "imported from", which is added by a bot if statement.snaks[aliasesP.importedFrom] then statement.snaks[aliasesP.importedFrom] = nil end -- don't include "Wikimedia import URL" if statement.snaks[aliasesP.wikimediaImportURL] then statement.snaks[aliasesP.wikimediaImportURL] = nil -- don't include "retrieved" if no "referenceURL" is present, -- as "retrieved" probably belongs to "Wikimedia import URL" if statement.snaks[aliasesP.retrieved] and not statement.snaks[aliasesP.referenceURL] then statement.snaks[aliasesP.retrieved] = nil end end -- don't include "inferred from", which is added by a bot if statement.snaks[aliasesP.inferredFrom] then statement.snaks[aliasesP.inferredFrom] = nil end -- don't include "type of reference" if statement.snaks[aliasesP.typeOfReference] then statement.snaks[aliasesP.typeOfReference] = nil end -- don't include "image" to prevent littering if statement.snaks[aliasesP.image] then statement.snaks[aliasesP.image] = nil end -- don't include "language" if it is equal to the local one if self:getReferenceDetail(statement.snaks, aliasesP.language) == self.conf.langName then statement.snaks[aliasesP.language] = nil end if statement.snaks[aliasesP.statedIn] and not statement.snaks[aliasesP.referenceURL] then -- "stated in" was given but "reference URL" was not. -- get "Wikidata property" properties from the item in "stated in" -- if any of the returned properties of the external-id datatype is in statement.snaks, generate a URL from it and use the URL in the reference -- find the "Wikidata property" properties in the item from "stated in" wikidataPropertiesOfSource = mw.text.split(p._properties{p.flags.raw, aliasesP.wikidataProperty, [p.args.eid] = self.conf:getValue(statement.snaks[aliasesP.statedIn][1], true, false)}, ", ", true) for i, wikidataPropertyOfSource in pairs(wikidataPropertiesOfSource) do if statement.snaks[wikidataPropertyOfSource] and statement.snaks[wikidataPropertyOfSource][1].datatype == "external-id" then tempLink = self.conf:getValue(statement.snaks[wikidataPropertyOfSource][1], false, true) -- not raw, linked if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL. additionalRefProperties[aliasesP.referenceURL] = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1") -- the URL is in wiki markup, so strip the square brackets and the display text statement.snaks[wikidataPropertyOfSource] = nil break end end end end -- don't include "subject named as", but use it as the title when "title" is not present but a URL is if statement.snaks[aliasesP.subjectNamedAs] then if not statement.snaks[aliasesP.title] and (statement.snaks[aliasesP.referenceURL] or additionalRefProperties[aliasesP.referenceURL]) then additionalRefProperties[aliasesP.title] = statement.snaks[aliasesP.subjectNamedAs][1].datavalue.value end statement.snaks[aliasesP.subjectNamedAs] = nil end -- retrieve all the parameters for i in pairs(statement.snaks) do label = "" -- multiple authors may be given if i == aliasesP.author or i == aliasesP.authorNameString then params[i] = self:getReferenceDetails(statement.snaks, i, false, self.linked, true) -- link = true/false, anyLang = true else params[i] = {self:getReferenceDetail(statement.snaks, i, false, (self.linked or (i == aliasesP.statedIn)) and (statement.snaks[i][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true end if #params[i] == 0 then params[i] = nil else referenceEmpty = false if statement.snaks[i][1].datatype == 'external-id' then key = "external-id" label = self.conf:getLabel(i) if label ~= "" then label = label .. " " end else key = i end -- add the parameter to each matching type of citation for j in pairs(citeParams) do -- do so if there was no mismatch with a previous parameter if not citeMismatch[j] then -- check if this parameter is not mismatching itself if i18n['cite'][j][key] then -- continue if an option is available in the corresponding cite template if i18n['cite'][j][key] ~= "" then -- handle non-author properties (and author properties ("author" and "author name string"), if they don't use the same template parameter) if (i ~= aliasesP.author and i ~= aliasesP.authorNameString) or (i18n['cite'][j][aliasesP.author] ~= i18n['cite'][j][aliasesP.authorNameString]) then citeParams[j][i18n['cite'][j][key]] = label .. params[i][1] -- to avoid problems with non-author multiple parameters (if existent), the following old code is retained for k=2, #params[i] do citeParams[j][i18n['cite'][j][key]..k] = label .. params[i][k] end -- handle "author" and "author name string" specially if they use the same template parameter elseif i == aliasesP.author or i == aliasesP.authorNameString then if params[aliasesP.author] ~= nil then numAuthorParameters = #params[aliasesP.author] else numAuthorParameters = 0 end if params[aliasesP.authorNameString] ~= nil then numAuthorNameStringParameters = #params[aliasesP.authorNameString] else numAuthorNameStringParameters = 0 end -- execute only if both "author" and "author name string" satisfy this condition: the property is both in params and in statement.snaks or it is neither in params nor in statement.snaks -- reason: parameters are added to params each iteration of the loop, not before the loop if ((statement.snaks[aliasesP.author] == nil) == (numAuthorParameters == 0)) and ((statement.snaks[aliasesP.authorNameString] == nil) == (numAuthorNameStringParameters == 0)) then for k=1, numAuthorParameters + numAuthorNameStringParameters do if k <= numAuthorParameters then -- now handling the authors from the "author" property citeParams[j][i18n['cite'][j][aliasesP.author]..k] = label .. params[aliasesP.author][k] else -- now handling the authors from "author name string" citeParams[j][i18n['cite'][j][aliasesP.authorNameString]..k] = label .. params[aliasesP.authorNameString][k - numAuthorParameters] end end end end end else citeMismatch[j] = true end end end end end -- use additional properties for i in pairs(additionalRefProperties) do for j in pairs(citeParams) do if not citeMismatch[j] and i18n["cite"][j][i] then citeParams[j][i18n["cite"][j][i]] = additionalRefProperties[i] else citeMismatch[j] = true end end end -- get title of general template for citing web references citeWeb = split(mw.wikibase.getSitelink(aliasesQ.citeWeb) or "", ":")[2] -- split off namespace from front -- get title of template that expands stated-in references into citations citeQ = split(mw.wikibase.getSitelink(aliasesQ.citeQ) or "", ":")[2] -- split off namespace from front -- (1) use the general template for citing web references if there is a match and if at least both "reference URL" and "title" are present if citeWeb and not citeMismatch['web'] and citeParams['web'][i18n['cite']['web'][aliasesP.referenceURL]] and citeParams['web'][i18n['cite']['web'][aliasesP.title]] then useCite = citeWeb useParams = citeParams['web'] -- (2) use the template that expands stated-in references into citations if there is a match and if at least "stated in" is present elseif citeQ and not citeMismatch['q'] and citeParams['q'][i18n['cite']['q'][aliasesP.statedIn]] then -- we need the raw "stated in" Q-identifier for the this template citeParams['q'][i18n['cite']['q'][aliasesP.statedIn]] = self:getReferenceDetail(statement.snaks, aliasesP.statedIn, true) -- raw = true useCite = citeQ useParams = citeParams['q'] end if useCite and useParams then -- if this module is being substituted then build a regular template call, otherwise expand the template if mw.isSubsting() then for i, v in pairs(useParams) do value = value .. "|" .. i .. "=" .. v end value = "{{" .. useCite .. value .. "}}" else value = mw.getCurrentFrame():expandTemplate{title=useCite, args=useParams} end -- (3) if the citation couldn't be displayed using Cite web or Cite Q, but has properties other than the removed ones, throw an error elseif not referenceEmpty then value = "<span style=\"color:#dd3333\">" .. errorText("malformed-reference") .. "</span>" end if value ~= "" then value = {value} -- create one value object if not self.rawValue then -- this should become a <ref> tag, so save the reference's hash for later value.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['cite']['version']) + version) end ref = {value} -- wrap the value object in an array end end return ref end -- gets a detail of one particular type for a reference function State:getReferenceDetail(snaks, dType, raw, link, anyLang) local switchLang = anyLang local value = nil if not snaks[dType] then return nil end -- if anyLang, first try the local language and otherwise any language repeat for _, v in ipairs(snaks[dType]) do value = self.conf:getValue(v, raw, link, false, anyLang and not switchLang, false, true) -- noSpecial = true if value then break end end if value or not anyLang then break end switchLang = not switchLang until anyLang and switchLang return value end -- gets the details of one particular type for a reference function State:getReferenceDetails(snaks, dType, raw, link, anyLang) local values = {} if not snaks[dType] then return {} end for _, v in ipairs(snaks[dType]) do -- if nil is returned then it will not be added to the table values[#values + 1] = self.conf:getValue(v, raw, link, false, anyLang, false, true) -- noSpecial = true end return values end -- level 1 hook function State:getAlias(object) local value = object.value local title = nil if value and self.linked then if self.conf.entityID:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(self.conf.entityID) elseif self.conf.entityID:sub(1,1) == "P" then title = "d:Property:" .. self.conf.entityID end if title then value = buildWikilink(title, value) end end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getBadge(value) value = self.conf:getLabel(value, self.rawValue, self.linked, self.shortName) if value == "" then value = nil end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end function State:callHook(param, hooks, statement, result) local valuesArray, refHash -- call a parameter's hook if it has been defined and if it has not been called before if not result[param] and hooks[param] then valuesArray = self[hooks[param]](self, statement, param, result, hooks) -- array with value objects -- add to the result if #valuesArray > 0 then result[param] = valuesArray result.count = result.count + 1 else result[param] = {} -- an empty array to indicate that we've tried this hook already return true -- miss == true end end return false end -- iterate through claims, claim's qualifiers or claim's references to collect values function State:iterate(statements, hooks, matchHook) matchHook = matchHook or alwaysTrue local matches = false local rankPos = nil local result, gotRequired for _, v in ipairs(statements) do -- rankPos will be nil for non-claim statements (e.g. qualifiers, references, etc.) matches, rankPos = matchHook(self, v) if matches then result = {count = 0} -- collection of arrays with value objects local function walk(formatTable) local miss for i2, v2 in pairs(formatTable.req) do -- call a hook, adding its return value to the result miss = self:callHook(i2, hooks, v, result) if miss then -- we miss a required value for this level, so return false return false end if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point breaks the loop return true end end for _, v2 in ipairs(formatTable) do if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point prevents further childs from being processed return true end if v2.child then walk(v2.child) end end return true end gotRequired = walk(self.parsedFormat) -- only append the result if we got values for all required parameters on the root level if gotRequired then -- if we have a rankPos (only with matchHook() for complete claims), then update the foundRank if rankPos and self.conf.foundRank > rankPos then self.conf.foundRank = rankPos end -- append the result self.results[#self.results + 1] = result -- break if we only need a single value if self.singleValue then break end end end end return self:out() end local function getEntityId(arg, eid, page, allowOmitPropPrefix) local id = nil local prop = nil if arg then if arg:sub(1,1) == ":" then page = arg eid = nil elseif arg:sub(1,1):upper() == "Q" or arg:sub(1,9):lower() == "property:" or allowOmitPropPrefix then eid = arg page = nil else prop = arg end end if eid then if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end else id = replaceAlias(eid) end elseif page then if page:sub(1,1) == ":" then page = mw.text.trim(page:sub(2)) end id = mw.wikibase.getEntityIdForTitle(page) or "" end if not id then id = mw.wikibase.getEntityIdForCurrentPage() or "" end id = id:upper() if not mw.wikibase.isValidEntityId(id) then id = "" end return id, prop end local function nextArg(args) local arg = args[args.pointer] if arg then args.pointer = args.pointer + 1 return mw.text.trim(arg) else return nil end end local function claimCommand(args, funcName) local cfg = Config:new() cfg:processFlagOrCommand(funcName) -- process first command (== function name) local lastArg, parsedFormat, formatParams, claims, value local hooks = {count = 0} -- set the date if given; -- must come BEFORE processing the flags if args[p.args.date] then cfg.atDate = {parseDate(args[p.args.date])} cfg.periods = {false, true, false} -- change default time constraint to 'current' end -- process flags and commands repeat lastArg = nextArg(args) until not cfg:processFlagOrCommand(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID, cfg.propertyID = getEntityId(lastArg, args[p.args.eid], args[p.args.page]) if cfg.entityID == "" then return "" -- we cannot continue without a valid entity ID end cfg.entity = mw.wikibase.getEntity(cfg.entityID) if not cfg.propertyID then cfg.propertyID = nextArg(args) end cfg.propertyID = replaceAlias(cfg.propertyID) if not cfg.entity or not cfg.propertyID then return "" -- we cannot continue without an entity or a property ID end cfg.propertyID = cfg.propertyID:upper() if not cfg.entity.claims or not cfg.entity.claims[cfg.propertyID] then return "" -- there is no use to continue without any claims end claims = cfg.entity.claims[cfg.propertyID] if cfg.states.qualifiersCount > 0 then -- do further processing if "qualifier(s)" command was given if #args - args.pointer + 1 > cfg.states.qualifiersCount then -- claim ID or literal value has been given cfg.propertyValue = nextArg(args) end for i = 1, cfg.states.qualifiersCount do -- check if given qualifier ID is an alias and add it cfg.qualifierIDs[parameters.qualifier..i] = replaceAlias(nextArg(args) or ""):upper() end elseif cfg.states[parameters.reference] then -- do further processing if "reference(s)" command was given cfg.propertyValue = nextArg(args) end -- check for special property value 'somevalue' or 'novalue' if cfg.propertyValue then cfg.propertyValue = replaceSpecialChars(cfg.propertyValue) if cfg.propertyValue ~= "" and mw.text.trim(cfg.propertyValue) == "" then cfg.propertyValue = " " -- single space represents 'somevalue', whereas empty string represents 'novalue' else cfg.propertyValue = mw.text.trim(cfg.propertyValue) end end -- parse the desired format, or choose an appropriate format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) elseif cfg.states.qualifiersCount > 0 then -- "qualifier(s)" command given if cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.propertyWithQualifier) else parsedFormat, formatParams = parseFormat(formats.qualifier) end elseif cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.property) else -- "reference(s)" command given parsedFormat, formatParams = parseFormat(formats.reference) end -- if a "qualifier(s)" command and no "propert(y|ies)" command has been given, make the movable separator a semicolon if cfg.states.qualifiersCount > 0 and not cfg.states[parameters.property] then cfg.separators["sep"..parameters.separator][1] = {";"} end -- if only "reference(s)" has been given, set the default separator to none (except when raw) if cfg.states[parameters.reference] and not cfg.states[parameters.property] and cfg.states.qualifiersCount == 0 and not cfg.states[parameters.reference].rawValue then cfg.separators["sep"][1] = nil end -- if exactly one "qualifier(s)" command has been given, make "sep%q" point to "sep%q1" to make them equivalent if cfg.states.qualifiersCount == 1 then cfg.separators["sep"..parameters.qualifier] = cfg.separators["sep"..parameters.qualifier.."1"] end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hooks that should be called (getProperty, getQualifiers, getReferences); -- only define a hook if both its command ("propert(y|ies)", "reference(s)", "qualifier(s)") and its parameter ("%p", "%r", "%q1", "%q2", "%q3") have been given for i, v in pairs(cfg.states) do -- e.g. 'formatParams["%q1"] or formatParams["%q"]' to define hook even if "%q1" was not defined to be able to build a complete value for "%q" if formatParams[i] or formatParams[i:sub(1, 2)] then hooks[i] = getHookName(i, 1) hooks.count = hooks.count + 1 end end -- the "%q" parameter is not attached to a state, but is a collection of the results of multiple states (attached to "%q1", "%q2", "%q3", ...); -- so if this parameter is given then this hook must be defined separately, but only if at least one "qualifier(s)" command has been given if formatParams[parameters.qualifier] and cfg.states.qualifiersCount > 0 then hooks[parameters.qualifier] = getHookName(parameters.qualifier, 1) hooks.count = hooks.count + 1 end -- create a state for "properties" if it doesn't exist yet, which will be used as a base configuration for each claim iteration; -- must come AFTER defining the hooks if not cfg.states[parameters.property] then cfg.states[parameters.property] = State:new(cfg, parameters.property) -- if the "single" flag has been given then this state should be equivalent to "property" (singular) if cfg.singleClaim then cfg.states[parameters.property].singleValue = true end end -- if the "sourced" flag has been given then create a state for "reference" if it doesn't exist yet, using default values, -- which must exist in order to be able to determine if a claim has any references; -- must come AFTER defining the hooks if cfg.sourcedOnly and not cfg.states[parameters.reference] then cfg:processFlagOrCommand(p.claimCommands.reference) -- use singular "reference" to minimize overhead end -- set the parsed format and the separators (and optional punctuation mark); -- must come AFTER creating the additonal states cfg:setFormatAndSeparators(cfg.states[parameters.property], parsedFormat) -- process qualifier matching values, analogous to cfg.propertyValue for i, v in pairs(args) do i = tostring(i) if i:match('^[Pp]%d+$') or aliasesP[i] then v = replaceSpecialChars(v) -- check for special qualifier value 'somevalue' if v ~= "" and mw.text.trim(v) == "" then v = " " -- single space represents 'somevalue' end cfg.qualifierIDsAndValues[replaceAlias(i):upper()] = v end end -- first sort the claims on rank to pre-define the order of output (preferred first, then normal, then deprecated) claims = sortOnRank(claims) -- then iterate through the claims to collect values value = cfg:concatValues(cfg.states[parameters.property]:iterate(claims, hooks, State.claimMatches)) -- pass property state with level 1 hooks and matchHook -- if desired, add a clickable icon that may be used to edit the returned values on Wikidata if cfg.editable and value ~= "" then value = value .. cfg:getEditIcon() end return value end local function generalCommand(args, funcName) local cfg = Config:new() cfg.curState = State:new(cfg) local lastArg local value = nil repeat lastArg = nextArg(args) until not cfg:processFlag(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], true) if cfg.entityID == "" or not mw.wikibase.entityExists(cfg.entityID) then return "" -- we cannot continue without an entity end -- serve according to the given command if funcName == p.generalCommands.label then value = cfg:getLabel(cfg.entityID, cfg.curState.rawValue, cfg.curState.linked, cfg.curState.shortName) elseif funcName == p.generalCommands.title then cfg.inSitelinks = true if cfg.entityID:sub(1,1) == "Q" then value = mw.wikibase.getSitelink(cfg.entityID) end if cfg.curState.linked and value then value = buildWikilink(value) end elseif funcName == p.generalCommands.description then value = mw.wikibase.getDescription(cfg.entityID) else local parsedFormat, formatParams local hooks = {count = 0} cfg.entity = mw.wikibase.getEntity(cfg.entityID) if funcName == p.generalCommands.alias or funcName == p.generalCommands.badge then cfg.curState.singleValue = true end if funcName == p.generalCommands.alias or funcName == p.generalCommands.aliases then if not cfg.entity.aliases or not cfg.entity.aliases[cfg.langCode] then return "" -- there is no use to continue without any aliasses end local aliases = cfg.entity.aliases[cfg.langCode] -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.alias) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getAlias); -- only define the hook if the parameter ("%a") has been given if formatParams[parameters.alias] then hooks[parameters.alias] = getHookName(parameters.alias, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(aliases, hooks)) elseif funcName == p.generalCommands.badge or funcName == p.generalCommands.badges then if not cfg.entity.sitelinks or not cfg.entity.sitelinks[cfg.siteID] or not cfg.entity.sitelinks[cfg.siteID].badges then return "" -- there is no use to continue without any badges end local badges = cfg.entity.sitelinks[cfg.siteID].badges cfg.inSitelinks = true -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.badge) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getBadge); -- only define the hook if the parameter ("%b") has been given if formatParams[parameters.badge] then hooks[parameters.badge] = getHookName(parameters.badge, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(badges, hooks)) end end value = value or "" if cfg.editable and value ~= "" then -- if desired, add a clickable icon that may be used to edit the returned value on Wikidata value = value .. cfg:getEditIcon() end return value end -- modules that include this module should call the functions with an underscore prepended, e.g.: p._property(args) local function establishCommands(commandList, commandFunc) for _, commandName in pairs(commandList) do local function wikitextWrapper(frame) local args = copyTable(frame.args) args.pointer = 1 loadI18n(aliasesP, frame) return commandFunc(args, commandName) end p[commandName] = wikitextWrapper local function luaWrapper(args) args = copyTable(args) args.pointer = 1 loadI18n(aliasesP) return commandFunc(args, commandName) end p["_" .. commandName] = luaWrapper end end establishCommands(p.claimCommands, claimCommand) establishCommands(p.generalCommands, generalCommand) -- main function that is supposed to be used by wrapper templates function p.main(frame) if not mw.wikibase then return nil end local f, args loadI18n(aliasesP, frame) -- get the parent frame to take the arguments that were passed to the wrapper template frame = frame:getParent() or frame if not frame.args[1] then throwError("no-function-specified") end f = mw.text.trim(frame.args[1]) if f == "main" then throwError("main-called-twice") end assert(p["_"..f], errorText('no-such-function', f)) -- copy arguments from immutable to mutable table args = copyTable(frame.args) -- remove the function name from the list table.remove(args, 1) return p["_"..f](args) end return p blrzjm0tcc4tvhm3cgqopi4y7i8gmw1 Modul:Webarchive 828 367 1028 1027 2024-08-09T09:22:46Z Jon Harald Søby 58 1 semakan diimportkan 1027 Scribunto text/plain --[[ ---------------------------------- Lua module implementing the {{webarchive}} template. A merger of the functionality of three templates: {{wayback}}, {{webcite}} and {{cite archives}} ]] --[[--------------------------< D E P E N D E N C I E S >------------------------------------------------------ ]] require('strict'); local getArgs = require ('Module:Arguments').getArgs; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local categories = {}; -- category names local config = {}; -- global configuration settings local digits = {}; -- for i18n; table that translates local-wiki digits to western digits local err_warn_msgs = {}; -- error and warning messages local excepted_pages = {}; local month_num = {}; -- for i18n; table that translates local-wiki month names to western digits local prefixes = {}; -- service provider tail string prefixes local services = {}; -- archive service provider data from local s_text = {}; -- table of static text strings used to build final rendering local uncategorized_namespaces = {}; -- list of namespaces that we should not categorize local uncategorized_subpages = {}; -- list of subpages that should not be categorized --[[--------------------------< P A G E S C O P E I D E N T I F I E R S >---------------------------------- ]] local non_western_digits; -- boolean flag set true when data.digits.enable is true local this_page = mw.title.getCurrentTitle(); local track = {}; -- Associative array to hold tracking categories local ulx = {}; -- Associative array to hold template data --[[--------------------------< 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 --[[--------------------------< tableLength >----------------------- Given a 1-D table, return number of elements ]] local function tableLength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display, no_link) if nil == no_link then if link and ('' ~= link) then if display and ('' ~= display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end end return display or ''; -- link not set so return the display text else -- no_link if display and ('' ~= display) then -- if there is display text return display; -- return that else return link or ''; -- return the target article name or empty string end end end --[[--------------------------< createTracking >----------------------- Return data in track[] ie. tracking categories ]] local function createTracking() if not excepted_pages[this_page.fullText] then -- namespace:title/fragment is allowed to be categorized (typically this module's / template's testcases page(s)) if uncategorized_namespaces[this_page.nsText] then return ''; -- this page not to be categorized so return empty string end for _,v in ipairs (uncategorized_subpages) do -- cycle through page name patterns if this_page.text:match (v) then -- test page name against each pattern return ''; -- this subpage type not to be categorized so return empty string end end end local out = {}; if tableLength(track) > 0 then for key, _ in pairs(track) do -- loop through table table.insert (out, make_wikilink (key)); -- and convert category names to links end end return table.concat (out); -- concat into one big string; empty string if table is empty end --[[--------------------------< inlineError >----------------------- Critical error. Render output completely in red. Add to tracking category. This function called as the last thing before abandoning this module ]] local function inlineError (msg, args) track[categories.error] = 1 return table.concat ({ '<span style="font-size:100%" class="error citation-comment">Error in ', -- open the error message span config.tname, -- insert the local language template name ' template: ', substitute (msg, args), -- insert the formatted error message '.</span>', -- close the span createTracking() -- add the category }) end --[[--------------------------< inlineRed >----------------------- Render a text fragment in red, such as a warning as part of the final output. Add tracking category. ]] local function inlineRed(msg, trackmsg) if trackmsg == "warning" then track[categories.warning] = 1; elseif trackmsg == "error" then track[categories.error] = 1; end return '<span style="font-size:100%" class="error citation-comment">' .. msg .. '</span>' end --[[--------------------------< base62 >----------------------- Convert base-62 to base-10 Credit: https://de.wikipedia.org/wiki/Modul:Expr ]] local function base62( value ) local r = 1 -- default return value is input value is malformed if value:match ('%W') then -- value must only be in the set [0-9a-zA-Z] return; -- nil return when value contains extraneous characters end local n = #value -- number of characters in value local k = 1 local c r = 0 for i = n, 1, -1 do -- loop through all characters in value from ls digit to ms digit c = value:byte( i, i ) if c >= 48 and c <= 57 then -- character is digit 0-9 c = c - 48 elseif c >= 65 and c <= 90 then -- character is ascii a-z c = c - 55 else -- must be ascii A-Z c = c - 61 end r = r + c * k -- accumulate this base62 character's value k = k * 62 -- bump for next end -- for i return r end --[[--------------------------< D E C O D E _ D A T E >-------------------------------------------------------- Given a date string, return it in iso format along with an indicator of the date's format. Except that month names must be recognizable as legitimate month names with proper capitalization, and that the date string must match one of the recognized date formats, no error checking is done here; return nil else ]] local function decode_date (date_str) local patterns = { ['dmy'] = {'^(%d%d?) +([^%s%d]+) +(%d%d%d%d)$', 'd', 'm', 'y'}, -- %a does not recognize unicode combining characters used by some languages ['mdy'] = {'^([^%s%d]+) (%d%d?), +(%d%d%d%d)$', 'm', 'd', 'y'}, ['ymd'] = {'^(%d%d%d%d) +([^%s%d]+) (%d%d?)$', 'y', 'm', 'd'}, -- not mos compliant at en.wiki but may be acceptible at other wikis }; local t = {}; if non_western_digits then -- this wiki uses non-western digits? date_str = mw.ustring.gsub (date_str, '%d', digits); -- convert this wiki's non-western digits to western digits end if date_str:match ('^%d%d%d%d%-%d%d%-%d%d$') then -- already an iso format date, return western digits form return date_str, 'iso'; end for k, v in pairs (patterns) do local c1, c2, c3 = mw.ustring.match (date_str, patterns[k][1]); -- c1 .. c3 are captured but we don't know what they hold if c1 then -- set on match t = { -- translate unspecified captures to y, m, and d [patterns[k][2]] = c1, -- fill the table of captures with the captures [patterns[k][3]] = c2, -- take index names from src_pattern table and assign sequential captures [patterns[k][4]] = c3, }; if month_num[t.m] then -- when month not already a number t.m = month_num[t.m]; -- replace valid month name with a number else return nil, 'iso'; -- not a valid date form because month not valid end return mw.ustring.format ('%.4d-%.2d-%.2d', t.y, t.m, t.d), k; -- return date in iso format end end return nil, 'iso'; -- date could not be decoded; return nil and default iso date end --[[--------------------------< makeDate >----------------------- Given year, month, day numbers, (zero-padded or not) return a full date in df format where df may be one of: mdy, dmy, iso, ymd on entry, year, month, day are presumed to be correct for the date that they represent; all are required in this module, makeDate() is sometimes given an iso-format date in year: makeDate (2018-09-20, nil, nil, df) this works because table.concat() sees only one table member ]] local function makeDate (year, month, day, df) local format = { ['dmy'] = 'j F Y', ['mdy'] = 'F j, Y', ['ymd'] = 'Y F j', ['iso'] = 'Y-m-d', }; local date = table.concat ({year, month, day}, '-'); -- assemble year-initial numeric-format date (zero padding not required here) if non_western_digits then -- this wiki uses non-western digits? date = mw.ustring.gsub (date, '%d', digits); -- convert this wiki's non-western digits to western digits end return mw.getContentLanguage():formatDate (format[df], date); end --[[--------------------------< I S _ V A L I D _ D A T E >---------------------------------------------------- Returns true if date is after 31 December 1899 (why is 1900 the min year? shouldn't the internet's date-of-birth be min year?), not after today's date, and represents a valid date (29 February 2017 is not a valid date). Applies Gregorian leapyear rules. all arguments are required ]] 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; local y, m, d; local today = os.date ('*t'); -- fetch a table of current date parts if not year or '' == year or not month or '' == month or not day or '' == day then return false; -- something missing end y = tonumber (year); m = tonumber (month); d = tonumber (day); if 1900 > y or today.year < y or 1 > m or 12 < m then -- year and month are within bounds TODO: 1900? return false; end if (2==m) then -- if February month_length = 28; -- then 28 days unless if (0==(y%4) and (0~=(y%100) or 0==(y%400))) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end else month_length=days_in_month[m]; end if 1 > d or month_length < d then -- day is within bounds return false; end -- here when date parts represent a valid date return os.time({['year']=y, ['month']=m, ['day']=d, ['hour']=0}) <= os.time(); -- date at midnight must be less than or equal to current date/time end --[[--------------------------< decodeWebciteDate >----------------------- Given a URI-path to Webcite (eg. /67xHmVFWP) return the encoded date in df format returns date string in df format - webcite date is a unix timestamp encoded as bae62 or the string 'query' ]] local function decodeWebciteDate(path, df) local dt = {}; local decode; dt = mw.text.split(path, "/") -- valid URL formats that are not base62 -- http://www.webcitation.org/query?id=1138911916587475 -- http://www.webcitation.org/query?url=http..&date=2012-06-01+21:40:03 -- http://www.webcitation.org/1138911916587475 -- http://www.webcitation.org/cache/73e53dd1f16cf8c5da298418d2a6e452870cf50e -- http://www.webcitation.org/getfile.php?fileid=1c46e791d68e89e12d0c2532cc3cf629b8bc8c8e if dt[2]:find ('query', 1, true) or dt[2]:find ('cache', 1, true) or dt[2]:find ('getfile', 1, true) or tonumber(dt[2]) then return 'query'; end decode = base62(dt[2]); -- base62 string -> exponential number if not decode then return nil; -- nil return when dt[2] contains characters not in %w end dt = os.date('*t', string.format("%d", decode):sub(1,10)) -- exponential number -> text -> first 10 characters (a unix timestamp) -> a table of date parts decode = makeDate (dt.year, dt.month, dt.day, 'iso'); -- date comparisons are all done in iso format with western digits if non_western_digits then -- this wiki uses non-western digits? decode = mw.ustring.gsub (decode, '%d', digits); -- convert this wiki's non-western digits to western digits end return decode; end --[[--------------------------< decodeWaybackDate >----------------------- Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com ) or Library of Congress Web Archives (eg. /all/20160901010101/http://example.com) or UK Government Web Archive (eg. /ukgwa/20160901010101/http://example.com or /tna/20160901010101/http://example.com) return the formatted date eg. "September 1, 2016" in df format Handle non-digits in snapshot ID such as "re_" and "-" and "*" returns two values: first value is one of these: valid date string in df format - wayback date is valid (including the text string 'index' when date is '/*/') empty string - wayback date is malformed (less than 8 digits, not a valid date) nil - wayback date is '/save/' or otherwise not a number second return value is an appropriate 'message' may or may not be formatted ]] local function decodeWaybackDate(path, df) local msg, snapdate; snapdate = path:gsub ('^/web/', ''):gsub ('^/all/', ''):gsub ('^/ukgwa/', ''):gsub ('^/tna/', ''):gsub ('^/', ''); -- remove leading /web/, /all/, /ukgwa/, /tna/, or / snapdate = snapdate:match ('^[^/]+'); -- get timestamp if snapdate == "*" then -- eg. /web/*/http.., etc. return 'index'; -- return indicator that this url has an index date end snapdate = snapdate:gsub ('%a%a_%d?$', ''):gsub ('%-', ''); -- from date, remove any trailing "re_", dashes msg = ''; if snapdate:match ('%*$') then -- a trailing '*' causes calendar display at archive .org snapdate = snapdate:gsub ('%*$', ''); -- remove so not part of length calc later msg = inlineRed (err_warn_msgs.ts_cal, 'warning'); -- make a message end if not tonumber(snapdate) then return nil, 'ts_nan'; -- return nil (fatal error flag) and message selector end local dlen = snapdate:len(); if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits? return '', inlineRed (err_warn_msgs.ts_short, 'error'); -- return empty string and error message end local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here if not is_valid_date (year, month, day) then return '', inlineRed (err_warn_msgs.ts_date, 'error'); -- return empty string and error message end snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format if 14 == dlen then return snapdate, msg; -- return date with message if any else return snapdate, msg .. inlineRed (err_warn_msgs.ts_len, 'warning'); -- return date with warning message(s) end end --[[--------------------------< decodeArchiveisDate >----------------------- Given an Archive.is "long link" URI-path (e.g. /2016.08.28-144552/http://example.com) return the date in df format (e.g. if df = dmy, return 28 August 2016) Handles "." and "-" in snapshot date, so 2016.08.28-144552 is same as 20160828144552 returns two values: first value is one of these: valid date string in df format - archive.is date is valid (including the text string 'short link' when url is the short form) empty string - wayback date is malformed (not a number, less than 8 digits, not a valid date) nil - wayback date is '/save/' second return value is an appropriate 'message' may or may not be formatted ]] local function decodeArchiveisDate(path, df) local snapdate if path:match ('^/%w+$') then -- short form url path is '/' followed by some number of base 62 digits and nothing else return "short link" -- e.g. http://archive.is/hD1qz end snapdate = mw.text.split (path, '/')[2]:gsub('[%.%-]', ''); -- get snapshot date, e.g. 2016.08.28-144552; remove periods and hyphens local dlen = string.len(snapdate) if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits? return '', inlineRed (err_warn_msgs.ts_short, 'error'); -- return empty string and error message end local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here if not is_valid_date (year, month, day) then return '', inlineRed (err_warn_msgs.ts_date, 'error'); -- return empty string and error message end snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format if 14 == dlen then return snapdate; -- return date else return snapdate, inlineRed (err_warn_msgs.ts_len, 'warning'); -- return date with warning message end end --[[--------------------------< serviceName >----------------------- Given a domain extracted by mw.uri.new() (eg. web.archive.org) set tail string and service ID ]] local function serviceName(host, no_link) local tracking; local index; host = host:lower():gsub ('^web%.(.+)', '%1'):gsub ('^www%.(.+)', '%1'); -- lowercase, remove web. and www. subdomains if services[host] then index = host; else for k, _ in pairs (services) do if host:find ('%f[%a]'..k:gsub ('([%.%-])', '%%%1')) then index = k; break; end end end if index then local out = {''}; -- empty string in [1] so that concatenated result has leading single space ulx.url1.service = services[index][4] or 'other'; tracking = services[index][5] or categories.other; -- build tail string if false == services[index][1] then -- select prefix table.insert (out, prefixes.at); elseif true == services[index][1] then table.insert (out, prefixes.atthe); else table.insert (out, services[index][1]); end table.insert (out, make_wikilink (services[index][2], services[index][3], no_link)); -- add article wikilink if services[index][6] then -- add tail postfix if it exists table.insert (out, services[index][6]); end ulx.url1.tail = table.concat (out, ' '); -- put it all together; result has leading space character else -- here when unknown archive ulx.url1.service = 'other'; tracking = categories.unknown; ulx.url1.tail = table.concat ({'', prefixes.at, host, inlineRed (err_warn_msgs.unknown_url, error)}, ' '); end track[tracking] = 1 end --[[--------------------------< parseExtraArgs >----------------------- Parse numbered arguments starting at 2, such as url2..url10, date2..date10, title2..title10 For example: {{webarchive |url=.. |url4=.. |url7=..}} Three url arguments not in numeric sequence (1..4..7). Function only processes arguments numbered 2 or greater (in this case 4 and 7) It creates numeric sequenced table entries like: urlx.url2.url = <argument value for url4> urlx.url3.url = <argument value for url7> Returns the number of URL arguments found numbered 2 or greater (in this case returns "2") ]] local function parseExtraArgs(args) local i, j, argurl, argurl2, argdate, argtitle j = 2 for i = 2, config.maxurls do argurl = "url" .. i if args[argurl] then argurl2 = "url" .. j ulx[argurl2] = {} ulx[argurl2]["url"] = args[argurl] argdate = "date" .. i if args[argdate] then ulx[argurl2]["date"] = args[argdate] else ulx[argurl2]["date"] = inlineRed (err_warn_msgs.date_miss, 'warning'); end argtitle = "title" .. i if args[argtitle] then ulx[argurl2]["title"] = args[argtitle] else ulx[argurl2]["title"] = nil end j = j + 1 end end if j == 2 then return 0 else return j - 2 end end --[[--------------------------< comma >----------------------- Given a date string, return "," if it's MDY ]] local function comma(date) return (date and date:match ('%a+ +%d%d?(,) +%d%d%d%d')) or ''; end --[[--------------------------< createRendering >----------------------- Return a rendering of the data in ulx[][] ]] local function createRendering() local displayfield local out = {}; local index_date, msg = ulx.url1.date:match ('(index)(.*)'); -- when ulx.url1.date extract 'index' text and message text (if there is a message) ulx.url1.date = ulx.url1.date:gsub ('index.*', 'index'); -- remove message if 'none' == ulx.url1.format then -- For {{wayback}}, {{webcite}} table.insert (out, '['); -- open extlink markup table.insert (out, ulx.url1.url); -- add url if ulx.url1.title then table.insert (out, ' ') -- the required space table.insert (out, ulx.url1.title) -- the title table.insert (out, ']'); -- close extlink markup table.insert (out, ulx.url1.tail); -- tail text if ulx.url1.date then table.insert (out, '&#32;('); -- open date text; TODO: why the html entity? replace with regular space? table.insert (out, 'index' == ulx.url1.date and s_text.archive or s_text.archived); -- add text table.insert (out, ' '); -- insert a space table.insert (out, ulx.url1.date); -- add date table.insert (out, ')'); -- close date text end else -- no title if index_date then -- when url date is 'index' table.insert (out, table.concat ({' ', s_text.Archive_index, ']'})); -- add the index link label table.insert (out, msg or ''); -- add date mismatch message when url date is /*/ and |date= has valid date else table.insert (out, table.concat ({' ', s_text.Archived, '] '})); -- add link label for url has timestamp date (will include mismatch message if there is one) end if ulx.url1.date then if 'index' ~= ulx.url1.date then table.insert (out, ulx.url1.date); -- add date when data is not 'index' end table.insert (out, comma(ulx.url1.date)); -- add ',' if date format is mdy table.insert (out, ulx.url1.tail); -- add tail text else -- no date table.insert (out, ulx.url1.tail); -- add tail text end end if 0 < ulx.url1.extraurls then -- For multiple archive URLs local tot = ulx.url1.extraurls + 1 table.insert (out, '.') -- terminate first url table.insert (out, table.concat ({' ', s_text.addlarchives, ': '})); -- add header text for i=2, tot do -- loop through the additionals local index = table.concat ({'url', i}); -- make an index displayfield = ulx[index]['title'] and 'title' or 'date'; -- choose display text table.insert (out, '['); -- open extlink markup table.insert (out, ulx[index]['url']); -- add the url table.insert (out, ' '); -- the required space table.insert (out, ulx[index][displayfield]); -- add the label table.insert (out, ']'); -- close extlink markup table.insert (out, i==tot and '.' or ', '); -- add terminator end end return table.concat (out); -- make a big string and done else -- For {{cite archives}} if 'addlarchives' == ulx.url1.format then -- Multiple archive services table.insert (out, table.concat ({s_text.addlarchives, ': '})); -- add header text else -- Multiple pages from the same archive table.insert (out, table.concat ({s_text.addlpages, ' '})); -- add header text table.insert (out, ulx.url1.date); -- add date to header text table.insert (out, ': '); -- close header text end local tot = ulx.url1.extraurls + 1; for i=1, tot do -- loop through the additionals local index = table.concat ({'url', i}); -- make an index table.insert (out, '['); -- open extlink markup table.insert (out, ulx[index]['url']); -- add url table.insert (out, ' '); -- add required space displayfield = ulx[index]['title']; if 'addlarchives' == ulx.url1.format then if not displayfield then displayfield = ulx[index]['date'] end else -- must be addlpages if not displayfield then displayfield = table.concat ({s_text.Page, ' ', i}); end end table.insert (out, displayfield); -- add title, date, page label text table.insert (out, ']'); -- close extlink markup table.insert (out, (i==tot and '.' or ', ')); -- add terminator end return table.concat (out); -- make a big string and done end end --[[--------------------------< P A R A M E T E R _ N A M E _ X L A T E >-------------------------------------- for internaltionalization, translate local-language parameter names to their English equivalents TODO: return error message if multiple aliases of the same canonical parameter name are found? returns two tables: new_args - holds canonical form parameters and their values either from translation or because the parameter was already in canonical form origin - maps canonical-form parameter names to their untranslated (local language) form for error messaging in the local language unrecognized parameters are ignored ]] local function parameter_name_xlate (args, params, enum_params) local name; -- holds modifiable name of the parameter name during evaluation local enum; -- for enumerated parameters, holds the enumerator during evaluation local found = false; -- flag used to break out of nested for loops local new_args = {}; -- a table that holds canonical and translated parameter k/v pairs local origin = {}; -- a table that maps original (local language) parameter names to their canonical name for local language error messaging local unnamed_params; -- set true when unsupported positional parameters are detected for k, v in pairs (args) do -- loop through all of the arguments in the args table name = k; -- copy of original parameter name if 'string' == type (k) then if non_western_digits then -- true when non-western digits supported at this wiki name = mw.ustring.gsub (name, '%d', digits); -- convert this wiki's non-western digits to western digits end enum = name:match ('%d+$'); -- get parameter enumerator if it exists; nil else if not enum then -- no enumerator so looking for non-enumnerated parameters -- TODO: insert shortcut here? if params[name] then name holds the canonical parameter name; no need to search further for pname, aliases in pairs (params) do -- loop through each parameter the params table for _, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table if name == alias then new_args[pname] = v; -- create a new entry in the new_args table origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name found = true; -- flag so that we can break out of these nested for loops break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair end end if found then -- true when we found an alias that matched name found = false; -- reset the flag break; -- go do next args k/v pair end end else -- enumerated parameters name = name:gsub ('%d$', '#'); -- replace enumeration digits with place holder for table search -- TODO: insert shortcut here? if num_params[name] then name holds the canonical parameter name; no need to search further for pname, aliases in pairs (enum_params) do -- loop through each parameter the num_params table for _, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table if name == alias then pname = pname:gsub ('#$', enum); -- replace the '#' place holder with the actual enumerator new_args[pname] = v; -- create a new entry in the new_args table origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name found = true; -- flag so that we can break out of these nested for loops break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair end end if found then -- true when we found an alias that matched name found = false; -- reset the flag break; -- go do next args k/v pair end end end else unnamed_params = true; -- flag for unsupported positional parameters end end -- for k, v return new_args, origin, unnamed_params; end --[[--------------------------< W E B A R C H I V E >---------------------------------------------------------- template entry point ]] local function webarchive(frame) local args = getArgs (frame); local data = mw.loadData (table.concat ({ -- make a data module name; sandbox or live 'Module:Webarchive/data', frame:getTitle():find('sandbox', 1, true) and '/sandbox' or '' -- this instance is ./sandbox then append /sandbox })); categories = data.categories; -- fill in the forward declarations config = data.config; if data.digits.enable then digits = data.digits; -- for i18n; table of digits in the local wiki's language non_western_digits = true; -- use_non_western_digits end err_warn_msgs = data.err_warn_msgs; excepted_pages = data.excepted_pages; month_num = data.month_num; -- for i18n; table of month names in the local wiki's language prefixes = data.prefixes; services = data.services; s_text = data.s_text; uncategorized_namespaces = data.uncategorized_namespaces; uncategorized_subpages = data.uncategorized_subpages; local origin = {}; -- holds a map of English to local language parameter names used in the current template; not currently used local unnamed_params; -- boolean set to true when template call has unnamed parameters args, origin, unnamed_params = parameter_name_xlate (args, data.params, data.enum_params); -- translate parameter names in args to English local date, format, msg, udate, uri, url; local ldf = 'iso'; -- when there is no |date= parameter, render url dates in iso format if args.url and args.url1 then -- URL argument (first) return inlineError (data.crit_err_msgs.conflicting, {origin.url, origin.url1}); end url = args.url or args.url1; if not url then return inlineError (data.crit_err_msgs.empty); end -- these iabot bugs perportedly fixed; removing these causes lua script error --[[ -- at Template:Webarchive/testcases/Production; resolve that before deleting these tests if mw.ustring.find( url, "https://web.http", 1, true ) then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred track[categories.error] = 1; return inlineError (data.crit_err_msgs.iabot1); end if url == "https://web.archive.org/http:/" then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred track[categories.error] = 1; return inlineError (data.crit_err_msgs.iabot2); end ]] if not (url:lower():find ('^http') or url:find ('^//')) then return inlineError (data.crit_err_msgs.invalid_url ); end ulx.url1 = {} ulx.url1.url = url ulx.url1.extraurls = parseExtraArgs(args) local good = false; good, uri = pcall (mw.uri.new, ulx.url1.url); -- get a table of uri parts from this url; protected mode to prevent lua error when ulx.url1.url is malformed if not good or nil == uri.host then -- abandon when ulx.url1.url is malformed return inlineError (data.crit_err_msgs.invalid_url); end serviceName(uri.host, args.nolink) if args.date and args.date1 then -- Date argument return inlineError (data.crit_err_msgs.conflicting, {origin.date, origin.date1}); end date = args.date or args.date1; date = date and date:gsub (' +', ' '); -- replace multiple spaces with a single space if date and config.verifydates then if '*' == date then date = 'index'; ldf = 'iso'; -- set to default format elseif 'mdy' == date then date = nil; -- if date extracted from URL, ldf = 'mdy'; -- then |date=mdy overrides iso elseif 'dmy' == date then date = nil; -- if date extracted from URL, ldf = 'dmy'; -- then |date=dmy overrides iso elseif 'ymd' == date then date = nil; -- if date extracted from URL, ldf = 'ymd'; -- then |date=ymd overrides iso else date, ldf = decode_date (date); -- get an iso format date from date and get date's original format end end if 'wayback' == ulx.url1.service or 'locwebarchives' == ulx.url1.service or 'ukgwa' == ulx.url1.service then if date then if config.verifydates then if ldf then udate, msg = decodeWaybackDate (uri.path); -- get the url date in iso format and format of date in |date=; 'index' when wayback url date is * if not udate then -- this is the only 'fatal' error return return inlineError (data.crit_err_msgs[msg]); end if udate ~= date then -- date comparison using iso format dates date = udate; msg = table.concat ({ inlineRed (err_warn_msgs.mismatch, 'warning'), -- add warning message msg, -- add message if there is one }); end end end else -- no |date= udate, msg = decodeWaybackDate (uri.path); if not udate then -- this is the only 'fatal' error return return inlineError (data.crit_err_msgs[msg]); end if '' == udate then date = nil; -- unset else date = udate; end end elseif 'webcite' == ulx.url1.service then if date then if config.verifydates then if ldf then udate = decodeWebciteDate (uri.path); -- get the url date in iso format if 'query' ~= udate then -- skip if query if udate ~= date then -- date comparison using iso format dates date = udate; msg = table.concat ({ inlineRed (err_warn_msgs.mismatch, 'warning'), }); end end end end else date = decodeWebciteDate( uri.path, "iso" ) if date == "query" then date = nil; -- unset msg = inlineRed (err_warn_msgs.date_miss, 'warning'); elseif not date then -- invalid base62 string date = inlineRed (err_warn_msgs.date1, 'error'); end end elseif 'archiveis' == ulx.url1.service then if date then if config.verifydates then if ldf then udate, msg = decodeArchiveisDate (uri.path) -- get the url date in iso format if 'short link' ~= udate then -- skip if short link if udate ~= date then -- date comparison using iso format dates date = udate; msg = table.concat ({ inlineRed (err_warn_msgs.mismatch, 'warning'), -- add warning message msg, -- add message if there is one }); end end end end else -- no |date= udate, msg = decodeArchiveisDate( uri.path, "iso" ) if udate == "short link" then date = nil; -- unset msg = inlineRed (err_warn_msgs.date_miss, 'warning'); elseif '' == udate then date = nil; -- unset else date = udate; end end else -- some other service if not date then msg = inlineRed (err_warn_msgs.date_miss, 'warning'); end end if 'index' == date then ulx.url1.date = date .. (msg or ''); -- create index + message (if there is one) elseif date then ulx.url1.date = makeDate (date, nil, nil, ldf) .. (msg or ''); -- create a date in the wiki's local language + message (if there is one) else ulx.url1.date = msg; end format = args.format; -- Format argument if not format then format = "none" else for k, v in pairs (data.format_vals) do -- |format= accepts two specific values loop through a table of those values local found; -- declare a nil flag for _, p in ipairs (v) do -- loop through local language variants if format == p then -- when |format= value matches format = k; -- use name from table key found = true; -- declare found so that we can break out of outer for loop break; -- break out of inner for loop end end if found then break; end end if format == "addlpages" then if not ulx.url1.date then format = "none" end elseif format == "addlarchives" then format = "addlarchives" else format = "none" end end ulx.url1.format = format if args.title and args.title1 then -- Title argument return inlineError (data.crit_err_msgs.conflicting, {origin.title, origin.title1}); end ulx.url1.title = args.title or args.title1; local rend = createRendering() if not rend then return inlineError (data.crit_err_msgs.unknown); end return rend .. ((unnamed_params and inlineRed (err_warn_msgs.unnamed_params, 'warning')) or '') .. createTracking(); end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return {webarchive = webarchive}; pvifr0bhl0l6kt45y91pz5w049rbnxe Modul:Webarchive/data 828 368 1030 1029 2024-08-09T09:22:47Z Jon Harald Søby 58 1 semakan diimportkan 1029 Scribunto text/plain --[[--------------------------< C O N F I G U R A T I O N >---------------------------------------------------- global configuration settings ]] local config = { maxurls = 10, -- Max number of URLs allowed. tname = 'Webarchive', -- name of calling template. Change if template rename. verifydates = true, -- See documentation. Set false to disable. } --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces that should not be included in citation error categories. Note: Namespace names should use underscores instead of spaces. ]] local uncategorized_namespaces = { -- same list as specified at [[Modul:Citation/CS1/Configuration]] ['User']=true, ['Talk']=true, ['User_talk']=true, ['Wikipedia_talk']=true, ['File_talk']=true, ['Template_talk']=true, ['Help_talk']=true, ['Category_talk']=true, ['Portal_talk']=true, ['Book_talk']=true, ['Draft_talk']=true, ['Module_talk']=true, ['MediaWiki_talk']=true, } local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'}; -- list of Lua patterns found in page names of pages we should not categorize local excepted_pages = { -- these pages will be categorized if set true; set to nil to disable ['Module talk:Webarchive/testcases'] = true, -- test cases pages used during development ['Template:Webarchive/testcases/Production'] = true, } --[[--------------------------< C A T E G O R I E S >---------------------------------------------------------- this is a table of all categories supported by Module:Webarchive ]] local categories = { archiveis = 'Category:Webarchive template archiveis links', error = 'Category:Webarchive template errors', other = 'Category:Webarchive template other archives', unknown = 'Category:Webarchive template unknown archives', warning = 'Category:Webarchive template warnings', wayback = 'Category:Webarchive template wayback links', webcite = 'Category:Webarchive template webcite links', } --[[--------------------------< P R E F I X E S >-------------------------------------------------------------- used only with serviceName(), this table holds the two generic tail-text prefixes specified by services['<service name>'][1] ]] local prefixes = { at = 'at', atthe = 'at the', } --[=[-------------------------< S E R V I C E S >-------------------------------------------------------------- this is a table of tables for archive services. Each service table has: [1]=prefix; may be boolean true or false, or text string where: true indicates that the prefix is taken from prefixes.atthe false indicates that the prefix is taken from prefixes.at 'text string' is used in lieu of the typical 'at' or 'at the' prefix [2]=wikilink target article that describes the service; set to nil if not used [3]=wikilink label; the label in [[target|label]]; set to nil if not used; when there is not article ([2] is nil) use this to name the service; see wikiwix in the table [4]=service ID; set to nil if not used [5]=tracking category key from the categories table; set to nil if not used [6]=postfix; text string to be appended at the end of the tail string - see webarchive.loc.gov in the table ]=] local services = { ['archive.ec'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.fo'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.is'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.li'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.md'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.org'] = {true, 'Wayback Machine', nil, 'wayback', categories.wayback}, ['archive.ph'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.today'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive.vn'] = {false, 'archive.today', nil, 'archiveis', categories.archiveis}, ['archive-it.org'] = {false, 'Archive-It', nil, 'archiveit'}, ['arquivo.pt'] = {true, nil, 'Portuguese Web Archive'}, ['bibalex.org'] = {false, 'Bibliotheca Alexandrina#Internet Archive partnership', 'Bibliotheca Alexandrina'}, ['collectionscanada'] = {true, 'Canadian Government Web Archive'}, ['conifer.rhizome.org'] = {false, 'conifer.rhizome.org'}, ['europarchive.org'] = {true, 'National Library of Ireland'}, ['freezepage.com'] = {false, nil, 'Freezepage'}, ['ghostarchive.org'] = {false, nil, 'Ghost Archive'}, ['haw.nsk'] = {true, 'Croatian Web Archive (HAW)'}, ['langzeitarchivierung.bib-bvb.de'] = {false, 'Bavarian State Library'}, ['loc.gov'] = {true, 'Library of Congress'}, ['nationalarchives.gov.uk'] = {true, 'UK Government Web Archive', nil, 'ukgwa'}, ['nlb.gov.sg'] = {false, 'Web Archive Singapore'}, ['parliament.uk'] = {true, 'UK Parliament\'s Web Archive'}, ['perma.cc'] = {false, 'Perma.cc'}, ['perma-archives.cc'] = {false, 'Perma.cc'}, ['proni.gov'] = {true, 'Public Record Office of Northern Ireland'}, ['screenshots.com'] = {false, nil, 'Screenshots'}, ['stanford.edu'] = {true, 'Stanford University Libraries', 'Stanford Web Archive'}, ['timetravel.mementoweb.org'] = {false, 'Memento Project'}, ['uni-lj.si'] = {true, nil, 'Slovenian Web Archive'}, ['veebiarhiiv.digar.ee'] = {true, nil, 'Estonian Web Archive'}, ['vefsafn.is'] = {true, 'National and University Library of Iceland'}, ['webarchive.bac-lac.gc.ca'] = {false, 'Library and Archives Canada'}, ['webarchive.loc.gov'] = {true, 'Library of Congress', nil, 'locwebarchives', nil, 'Web Archives'}, ['webarchive.nla.gov.au'] = {true, 'Australian Web Archive'}, ['webarchive.org.uk'] = {true, 'UK Web Archive'}, ['webcache.googleusercontent.com'] = {false, nil, 'Google Cache'}, ['webcitation.org'] = {false, 'WebCite', nil, 'webcite', categories.webcite}, ['webharvest.gov'] = {true, 'National Archives and Records Administration'}, ['webrecorder.io'] = {false, 'webrecorder.io'}, ['wikiwix.com'] = {false, nil, 'Wikiwix'}, ['yorku.ca'] = {false, 'York University Libraries', 'York University Digital Library'}, } --[[--------------------------< S T A T I C T E X T >-------------------------------------------------------- for internationalzation ]] local s_text = { addlarchives = 'Additional archives', addlpages = 'Additional pages archived&nbsp;on', -- TODO why the &nbsp; there? replace with regular space? Archive_index = 'Archive index', Archived = 'Archived', archived = 'archived', archive = 'archive', Page = 'Page', } --[[--------------------------< E R R _ W A R N _ M S G S >---------------------------------------------------- these tables hold error and warning message text ]] local err_warn_msgs = { date_err = '(Date error)', -- decodeWebciteDate, decodeWaybackDate, decodeArchiveisDate date_miss = '(Date missing)', -- parseExtraArgs ts_short = '(Timestamp date length)', -- decodeWaybackDate timestamp less than 8 digits ts_date = '(Timestamp date invalid)', -- decodeWaybackDate timestamp not a valid date unknown_url = '(Error: unknown archive URL)', -- serviceName unnamed_params = '(Positional parameters ignored)', --warnings mismatch = '<sup>(Date mismatch)</sup>', -- webarchive ts_len = '<sup>(Timestamp length)</sup>', -- decodeWaybackDate, decodeArchiveisDate timestamp not 14 digits ts_cal = '<sup>(Calendar)</sup>', -- decodeWaybackDate timestamp has trailing splat } local crit_err_msgs = { -- critical error messages conflicting = 'Conflicting |$1= and |$2=', empty = 'Empty url', -- iabot1 = 'https://web.http', -- TODO: these iabot bugs perportedly fixed; removing these causes lua script error -- iabot2 = 'Invalid URL', -- at Template:Webarchive/testcases/Production; resolve that before deleting these messages invalid_url = 'Invalid URL', ts_nan = 'Timestamp not a number', unknown = 'Unknown problem. Please report on template talk page', } --[[--------------------------< D A T E I N T E R N A T I O N A L I Z A T I O N >---------------------------- these tables hold data that is used when converting date formats from non-English languages (because mw.language.getContentLanguage:formatDate() doesn't understand non-English month names) ]] local month_num = { -- retain English language names even though they may not be strictly required on the local wiki ['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12, ['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12, -- add local wiki month-names to number translation here -- [''] = 1, [''] = 2, [''] = 3, [''] = 4, [''] = 5, [''] = 6, [''] = 7, [''] = 8, [''] = 9, [''] = 10, [''] = 11, [''] = 12, }; -- when the local wiki uses non-western digits in dates, local wiki digits must be -- translated to western digits; lua only understands western digits local digits = { -- use this table to aid translation -- [''] = 0, [''] = 1, [''] = 2, [''] = 3, [''] = 4, [''] = 5, [''] = 6, [''] = 7, [''] = 8, [''] = 9, -- fill these table indexes with local digits enable = false -- set to true to enable local-digit to western-digit translation }; --[[--------------------------< P A R A M E T E R I N T E R N A T I O N A L I Z A T I O N >------------------ this table holds tables of parameter names and their non-English aliases. In the enum_params table '#' is a single character placeholder for 1 or more digit characters parameter names in this table shall be lowercase ]] local params = { ['url'] = {'url'}, ['date'] = {'date', 'datum'}, ['title'] = {'title', 'titel'}, ['nolink'] = {'nolink'}, ['format'] = {'format'} } local enum_params = { ['url#'] = {'url#'}, ['date#'] = {'date#', 'datum#'}, ['title#'] = {'title#', 'titel#'}, } local format_vals = { -- |format= accepts two values; add local language variants here ['addlpages'] = {'addlpages'}, ['addlarchives'] = {'addlarchives'}, } --[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------ ]] return { categories = categories, config = config, crit_err_msgs = crit_err_msgs, digits = digits, enum_params = enum_params, err_warn_msgs = err_warn_msgs, excepted_pages = excepted_pages, format_vals = format_vals, month_num = month_num, params = params, prefixes = prefixes, services = services, s_text = s_text, uncategorized_namespaces = uncategorized_namespaces, uncategorized_subpages = uncategorized_subpages, } d2d641q71q5ajz0h2v9s4fagp0e4jj8 Modul:Wikidata 828 369 1032 1031 2024-08-09T09:22:47Z Jon Harald Søby 58 1 semakan diimportkan 1031 Scribunto text/plain -- vim: set noexpandtab ft=lua ts=4 sw=4: require('strict') local p = {} local debug = false ------------------------------------------------------------------------------ -- module local variables and functions local wiki = { langcode = mw.language.getContentLanguage().code } -- internationalisation local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is not yet available in this wiki." }, ["datetime"] = { -- $1 is a placeholder for the actual number [0] = "$1 billion years", -- precision: billion years [1] = "$100 million years", -- precision: hundred million years [2] = "$10 million years", -- precision: ten million years [3] = "$1 million years", -- precision: million years [4] = "$100,000 years", -- precision: hundred thousand years [5] = "$10,000 years", -- precision: ten thousand years [6] = "$1 millennium", -- precision: millennium [7] = "$1 century", -- precision: century [8] = "$1s", -- precision: decade -- the following use the format of #time parser function [9] = "Y", -- precision: year, [10] = "F Y", -- precision: month [11] = "F j, Y", -- precision: day [12] = "F j, Y ga", -- precision: hour [13] = "F j, Y g:ia", -- precision: minute [14] = "F j, Y g:i:sa", -- precision: second ["beforenow"] = "$1 BCE", -- how to format negative numbers for precisions 0 to 5 ["afternow"] = "$1 CE", -- how to format positive numbers for precisions 0 to 5 ["bc"] = '$1 "BCE"', -- how print negative years ["ad"] = "$1", -- how print positive years -- the following are for function getDateValue() and getQualifierDateValue() ["default-format"] = "dmy", -- default value of the #3 (getDateValue) or -- #4 (getQualifierDateValue) argument ["default-addon"] = "BC", -- default value of the #4 (getDateValue) or -- #5 (getQualifierDateValue) argument ["prefix-addon"] = false, -- set to true for languages put "BC" in front of the -- datetime string; or the addon will be suffixed ["addon-sep"] = " ", -- separator between datetime string and addon (or inverse) ["format"] = -- options of the 3rd argument { ["mdy"] = "F j, Y", ["my"] = "F Y", ["y"] = "Y", ["dmy"] = "j F Y", ["ymd"] = "Y-m-d", ["ym"] = "Y-m" } }, ["monolingualtext"] = '<span lang="%language">%text</span>', ["warnDump"] = "[[Kategori:Called function 'Dump' from module Wikidata]]", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" } } if wiki.langcode ~= "en" then --require("Module:i18n").loadI18n("Module:Wikidata/i18n", i18n) -- got idea from [[:w:Module:Wd]] local module_title; if ... == nil then module_title = mw.getCurrentFrame():getTitle() else module_title = ... end require('Module:i18n').loadI18n(module_title..'/i18n', i18n) end -- this function needs to be internationalised along with the above: -- takes cardinal numer as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. local function makeOrdinal (cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end local function printError(code) return '<span class="error">' .. (i18n.errors[code] or code) .. '</span>' end local function parseDateFormat(f, timestamp, addon, prefix_addon, addon_sep) local year_suffix local tstr = "" local lang_obj = mw.language.new(wiki.langcode) local f_parts = mw.text.split(f, 'Y', true) for idx, f_part in pairs(f_parts) do year_suffix = '' if string.match(f_part, "x[mijkot]$") then -- for non-Gregorian year f_part = f_part .. 'Y' elseif idx < #f_parts then -- supress leading zeros in year year_suffix = lang_obj:formatDate('Y', timestamp) year_suffix = string.gsub(year_suffix, '^0+', '', 1) end tstr = tstr .. lang_obj:formatDate(f_part, timestamp) .. year_suffix end if addon ~= "" and prefix_addon then return addon .. addon_sep .. tstr elseif addon ~= "" then return tstr .. addon_sep .. addon else return tstr end end local function parseDateValue(timestamp, date_format, date_addon) local prefix_addon = i18n["datetime"]["prefix-addon"] local addon_sep = i18n["datetime"]["addon-sep"] local addon = "" -- check for negative date if string.sub(timestamp, 1, 1) == '-' then timestamp = '+' .. string.sub(timestamp, 2) addon = date_addon end local _date_format = i18n["datetime"]["format"][date_format] if _date_format ~= nil then return parseDateFormat(_date_format, timestamp, addon, prefix_addon, addon_sep) else return printError("unknown-datetime-format") end end -- This local function combines the year/month/day/BC/BCE handling of parseDateValue{} -- with the millennium/century/decade handling of formatDate() local function parseDateFull(timestamp, precision, date_format, date_addon) local prefix_addon = i18n["datetime"]["prefix-addon"] local addon_sep = i18n["datetime"]["addon-sep"] local addon = "" -- check for negative date if string.sub(timestamp, 1, 1) == '-' then timestamp = '+' .. string.sub(timestamp, 2) addon = date_addon end -- get the next four characters after the + (should be the year now in all cases) -- ok, so this is dirty, but let's get it working first local intyear = tonumber(string.sub(timestamp, 2, 5)) if intyear == 0 and precision <= 9 then return "" end -- precision is 10000 years or more if precision <= 5 then local factor = 10 ^ ((5 - precision) + 4) local y2 = math.ceil(math.abs(intyear) / factor) local relative = mw.ustring.gsub(i18n.datetime[precision], "$1", tostring(y2)) if addon ~= "" then -- negative date relative = mw.ustring.gsub(i18n.datetime.beforenow, "$1", relative) else relative = mw.ustring.gsub(i18n.datetime.afternow, "$1", relative) end return relative end -- precision is decades (8), centuries (7) and millennia (6) local era, card if precision == 6 then card = math.floor((intyear - 1) / 1000) + 1 era = mw.ustring.gsub(i18n.datetime[6], "$1", makeOrdinal(card)) end if precision == 7 then card = math.floor((intyear - 1) / 100) + 1 era = mw.ustring.gsub(i18n.datetime[7], "$1", makeOrdinal(card)) end if precision == 8 then era = mw.ustring.gsub(i18n.datetime[8], "$1", tostring(math.floor(math.abs(intyear) / 10) * 10)) end if era then if addon ~= "" then era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.bc, '"', ""), "$1", era) else era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.ad, '"', ""), "$1", era) end return era end local _date_format = i18n["datetime"]["format"][date_format] if _date_format ~= nil then -- check for precision is year and override supplied date_format if precision == 9 then _date_format = i18n["datetime"][9] end return parseDateFormat(_date_format, timestamp, addon, prefix_addon, addon_sep) else return printError("unknown-datetime-format") end end -- the "qualifiers" and "snaks" field have a respective "qualifiers-order" and "snaks-order" field -- use these as the second parameter and this function instead of the built-in "pairs" function -- to iterate over all qualifiers and snaks in the intended order. local function orderedpairs(array, order) if not order then return pairs(array) end -- return iterator function local i = 0 return function() i = i + 1 if order[i] then return order[i], array[order[i]] end end end -- precision: 0 - billion years, 1 - hundred million years, ..., 6 - millennia, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour, 13 - minute, 14 - second local function normalizeDate(date) date = mw.text.trim(date, "+") -- extract year local yearstr = mw.ustring.match(date, "^\-?%d+") local year = tonumber(yearstr) -- remove leading zeros of year return year .. mw.ustring.sub(date, #yearstr + 1), year end local function formatDate(date, precision, timezone) precision = precision or 11 local date, year = normalizeDate(date) if year == 0 and precision <= 9 then return "" end -- precision is 10000 years or more if precision <= 5 then local factor = 10 ^ ((5 - precision) + 4) local y2 = math.ceil(math.abs(year) / factor) local relative = mw.ustring.gsub(i18n.datetime[precision], "$1", tostring(y2)) if year < 0 then relative = mw.ustring.gsub(i18n.datetime.beforenow, "$1", relative) else relative = mw.ustring.gsub(i18n.datetime.afternow, "$1", relative) end return relative end -- precision is decades, centuries and millennia local era if precision == 6 then era = mw.ustring.gsub(i18n.datetime[6], "$1", tostring(math.floor((math.abs(year) - 1) / 1000) + 1)) end if precision == 7 then era = mw.ustring.gsub(i18n.datetime[7], "$1", tostring(math.floor((math.abs(year) - 1) / 100) + 1)) end if precision == 8 then era = mw.ustring.gsub(i18n.datetime[8], "$1", tostring(math.floor(math.abs(year) / 10) * 10)) end if era then if year < 0 then era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.bc, '"', ""), "$1", era) elseif year > 0 then era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.ad, '"', ""), "$1", era) end return era end -- precision is year if precision == 9 then return year end -- precision is less than years if precision > 9 then --[[ the following code replaces the UTC suffix with the given negated timezone to convert the global time to the given local time timezone = tonumber(timezone) if timezone and timezone ~= 0 then timezone = -timezone timezone = string.format("%.2d%.2d", timezone / 60, timezone % 60) if timezone[1] ~= '-' then timezone = "+" .. timezone end date = mw.text.trim(date, "Z") .. " " .. timezone end ]]-- local formatstr = i18n.datetime[precision] if year == 0 then formatstr = mw.ustring.gsub(formatstr, i18n.datetime[9], "") elseif year < 0 then -- Mediawiki formatDate doesn't support negative years date = mw.ustring.sub(date, 2) formatstr = mw.ustring.gsub(formatstr, i18n.datetime[9], mw.ustring.gsub(i18n.datetime.bc, "$1", i18n.datetime[9])) elseif year > 0 and i18n.datetime.ad ~= "$1" then formatstr = mw.ustring.gsub(formatstr, i18n.datetime[9], mw.ustring.gsub(i18n.datetime.ad, "$1", i18n.datetime[9])) end return mw.language.new(wiki.langcode):formatDate(formatstr, date) end end local function printDatavalueEntity(data, parameter) -- data fields: entity-type [string], numeric-id [int, Wikidata id] local id if data["entity-type"] == "item" then id = "Q" .. data["numeric-id"] elseif data["entity-type"] == "property" then id = "P" .. data["numeric-id"] else return printError("unknown-entity-type") end if parameter then if parameter == "link" then local linkTarget = mw.wikibase.getSitelink(id) local linkName = mw.wikibase.getLabel(id) if linkTarget then -- if there is a local Wikipedia article link to it using the label or the article title return "[[" .. linkTarget .. "|" .. (linkName or linkTarget) .. "]]" else -- if there is no local Wikipedia article output the label or link to the Wikidata object to let the user input a proper label if linkName then return linkName else return "[[:d:" .. id .. "|" .. id .. "]]" end end else return data[parameter] end else return mw.wikibase.getLabel(id) or id end end local function printDatavalueTime(data, parameter) -- data fields: time [ISO 8601 time], timezone [int in minutes], before [int], after [int], precision [int], calendarmodel [wikidata URI] -- precision: 0 - billion years, 1 - hundred million years, ..., 6 - millennia, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour, 13 - minute, 14 - second -- calendarmodel: e.g. http://www.wikidata.org/entity/Q1985727 for the proleptic Gregorian calendar or http://www.wikidata.org/wiki/Q11184 for the Julian calendar] if parameter then if parameter == "calendarmodel" then data.calendarmodel = mw.ustring.match(data.calendarmodel, "Q%d+") -- extract entity id from the calendar model URI elseif parameter == "time" then data.time = normalizeDate(data.time) end return data[parameter] else return formatDate(data.time, data.precision, data.timezone) end end local function printDatavalueMonolingualText(data, parameter) -- data fields: language [string], text [string] if parameter then return data[parameter] else local result = mw.ustring.gsub(mw.ustring.gsub(i18n.monolingualtext, "%%language", data["language"]), "%%text", data["text"]) return result end end local function findClaims(entity, property) if not property or not entity or not entity.claims then return end if mw.ustring.match(property, "^P%d+$") then -- if the property is given by an id (P..) access the claim list by this id return entity.claims[property] else property = mw.wikibase.resolvePropertyId(property) if not property then return end return entity.claims[property] end end local function getSnakValue(snak, parameter) if snak.snaktype == "value" then -- call the respective snak parser if snak.datavalue.type == "string" then return snak.datavalue.value elseif snak.datavalue.type == "globecoordinate" then return printDatavalueCoordinate(snak.datavalue.value, parameter) elseif snak.datavalue.type == "quantity" then return printDatavalueQuantity(snak.datavalue.value, parameter) elseif snak.datavalue.type == "time" then return printDatavalueTime(snak.datavalue.value, parameter) elseif snak.datavalue.type == "wikibase-entityid" then return printDatavalueEntity(snak.datavalue.value, parameter) elseif snak.datavalue.type == "monolingualtext" then return printDatavalueMonolingualText(snak.datavalue.value, parameter) end end return mw.wikibase.renderSnak(snak) end local function getQualifierSnak(claim, qualifierId) -- a "snak" is Wikidata terminology for a typed key/value pair -- a claim consists of a main snak holding the main information of this claim, -- as well as a list of attribute snaks and a list of references snaks if qualifierId then -- search the attribute snak with the given qualifier as key if claim.qualifiers then local qualifier = claim.qualifiers[qualifierId] if qualifier then return qualifier[1] end end return nil, printError("qualifier-not-found") else -- otherwise return the main snak return claim.mainsnak end end local function getValueOfClaim(claim, qualifierId, parameter) local error local snak snak, error = getQualifierSnak(claim, qualifierId) if snak then return getSnakValue(snak, parameter) else return nil, error end end local function getReferences(frame, claim) local result = "" -- traverse through all references for ref in pairs(claim.references or {}) do local refparts -- traverse through all parts of the current reference for snakkey, snakval in orderedpairs(claim.references[ref].snaks or {}, claim.references[ref]["snaks-order"]) do if refparts then refparts = refparts .. ", " else refparts = "" end -- output the label of the property of the reference part, e.g. "imported from" for P143 refparts = refparts .. tostring(mw.wikibase.getLabel(snakkey)) .. ": " -- output all values of this reference part, e.g. "German Wikipedia" and "English Wikipedia" if the referenced claim was imported from both sites for snakidx = 1, #snakval do if snakidx > 1 then refparts = refparts .. ", " end refparts = refparts .. getSnakValue(snakval[snakidx]) end end if refparts then result = result .. frame:extensionTag("ref", refparts) end end return result end local function parseInput(frame) local qid = frame.args.qid if qid and (#qid == 0) then qid = nil end local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") if input_parm ~= "FETCH_WIKIDATA" then return false, input_parm, nil, nil end local entity = mw.wikibase.getEntity(qid) local claims if entity and entity.claims then claims = entity.claims[propertyID] if not claims then return false, "", nil, nil end else return false, "", nil, nil end return true, entity, claims, propertyID end local function isType(claims, type) return claims[1] and claims[1].mainsnak.snaktype == "value" and claims[1].mainsnak.datavalue.type == type end local function getValue(entity, claims, propertyID, delim, labelHook) if labelHook == nil then labelHook = function (qnumber) return nil; end end if isType(claims, "wikibase-entityid") then local out = {} for k, v in pairs(claims) do local qnumber = "Q" .. v.mainsnak.datavalue.value["numeric-id"] local sitelink = mw.wikibase.getSitelink(qnumber) local label = labelHook(qnumber) or mw.wikibase.getLabel(qnumber) or qnumber if sitelink then out[#out + 1] = "[[" .. sitelink .. "|" .. label .. "]]" else out[#out + 1] = "[[:d:" .. qnumber .. "|" .. label .. "]]<abbr title='" .. i18n["errors"]["local-article-not-found"] .. "'>[*]</abbr>" end end return table.concat(out, delim) else -- just return best values return entity:formatPropertyValues(propertyID).value end end ------------------------------------------------------------------------------ -- module global functions if debug then function p.inspectI18n(frame) local val = i18n for _, key in pairs(frame.args) do key = mw.text.trim(key) val = val[key] end return val end end function p.descriptionIn(frame) local langcode = frame.args[1] local id = frame.args[2] -- return description of a Wikidata entity in the given language or the default language of this Wikipedia site return mw.wikibase.getEntity(id):getDescription(langcode or wiki.langcode) end function p.labelIn(frame) local langcode = frame.args[1] local id = frame.args[2] -- return label of a Wikidata entity in the given language or the default language of this Wikipedia site return mw.wikibase.getEntity(id):getLabel(langcode or wiki.langcode) end -- This is used to get a value, or a comma separated list of them if multiple values exist p.getValue = function(frame) local delimdefault = ", " -- **internationalise later** local delim = frame.args.delimiter or "" delim = string.gsub(delim, '"', '') if #delim == 0 then delim = delimdefault end local go, errorOrentity, claims, propertyID = parseInput(frame) if not go then return errorOrentity end return getValue(errorOrentity, claims, propertyID, delim) end -- Same as above, but uses the short name property for label if available. p.getValueShortName = function(frame) local go, errorOrentity, claims, propertyID = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity -- if wiki-linked value output as link if possible local function labelHook (qnumber) local label local claimEntity = mw.wikibase.getEntity(qnumber) if claimEntity ~= nil then if claimEntity.claims.P1813 then for k2, v2 in pairs(claimEntity.claims.P1813) do if v2.mainsnak.datavalue.value.language == "en" then label = v2.mainsnak.datavalue.value.text end end end end if label == nil or label == "" then return nil end return label end return getValue(errorOrentity, claims, propertyID, ", ", labelHook); end -- This is used to get a value, or a comma separated list of them if multiple values exist -- from an arbitrary entry by using its QID. -- Use : {{#invoke:Wikidata|getValueFromID|<ID>|<Property>|FETCH_WIKIDATA}} -- E.g.: {{#invoke:Wikidata|getValueFromID|Q151973|P26|FETCH_WIKIDATA}} - to fetch value of 'spouse' (P26) from 'Richard Burton' (Q151973) -- Please use sparingly - this is an *expensive call*. p.getValueFromID = function(frame) local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "") if input_parm == "FETCH_WIKIDATA" then local entity = mw.wikibase.getEntity(itemID) local claims if entity and entity.claims then claims = entity.claims[propertyID] end if claims then return getValue(entity, claims, propertyID, ", ") else return "" end else return input_parm end end local function getQualifier(frame, outputHook) local propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "") if input_parm == "FETCH_WIKIDATA" then local entity = mw.wikibase.getEntity() if entity.claims[propertyID] ~= nil then local out = {} for k, v in pairs(entity.claims[propertyID]) do for k2, v2 in pairs(v.qualifiers[qualifierID]) do if v2.snaktype == 'value' then out[#out + 1] = outputHook(v2); end end end return table.concat(out, ", "), true else return "", false end else return input_parm, false end end p.getQualifierValue = function(frame) local function outputValue(value) local qnumber = "Q" .. value.datavalue.value["numeric-id"] if (mw.wikibase.getSitelink(qnumber)) then return "[[" .. mw.wikibase.getSitelink(qnumber) .. "]]" else return "[[:d:" .. qnumber .. "|" ..qnumber .. "]]<abbr title='" .. i18n["errors"]["local-article-not-found"] .. "'>[*]</abbr>" end end return (getQualifier(frame, outputValue)) end -- This is used to get a value like 'male' (for property p21) which won't be linked and numbers without the thousand separators p.getRawValue = function(frame) local go, errorOrentity, claims, propertyID = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity local result = entity:formatPropertyValues(propertyID, mw.wikibase.entity.claimRanks).value -- if number type: remove thousand separators, bounds and units if isType(claims, "quantity") then result = mw.ustring.gsub(result, "(%d),(%d)", "%1%2") result = mw.ustring.gsub(result, "(%d)±.*", "%1") end return result end -- This is used to get the unit name for the numeric value returned by getRawValue p.getUnits = function(frame) local go, errorOrentity, claims, propertyID = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity local result = entity:formatPropertyValues(propertyID, mw.wikibase.entity.claimRanks).value if isType(claims, "quantity") then result = mw.ustring.sub(result, mw.ustring.find(result, " ")+1, -1) end return result end -- This is used to get the unit's QID to use with the numeric value returned by getRawValue p.getUnitID = function(frame) local go, errorOrentity, claims = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity local result if isType(claims, "quantity") then -- get the url for the unit entry on Wikidata: result = claims[1].mainsnak.datavalue.value.unit -- and just reurn the last bit from "Q" to the end (which is the QID): result = mw.ustring.sub(result, mw.ustring.find(result, "Q"), -1) end return result end p.getRawQualifierValue = function(frame) local function outputHook(value) if value.datavalue.value["numeric-id"] then return mw.wikibase.getLabel("Q" .. value.datavalue.value["numeric-id"]) else return value.datavalue.value end end local ret, gotData = getQualifier(frame, outputHook) if gotData then ret = string.upper(string.sub(ret, 1, 1)) .. string.sub(ret, 2) end return ret end -- This is used to get a date value for date_of_birth (P569), etc. which won't be linked -- Dates and times are stored in ISO 8601 format (sort of). -- At present the local formatDate(date, precision, timezone) function doesn't handle timezone -- So I'll just supply "Z" in the call to formatDate below: p.getDateValue = function(frame) local date_format = mw.text.trim(frame.args[3] or i18n["datetime"]["default-format"]) local date_addon = mw.text.trim(frame.args[4] or i18n["datetime"]["default-addon"]) local go, errorOrentity, claims = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity local out = {} for k, v in pairs(claims) do if v.mainsnak.datavalue.type == 'time' then local timestamp = v.mainsnak.datavalue.value.time local dateprecision = v.mainsnak.datavalue.value.precision -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") out[#out + 1] = parseDateFull(timestamp, dateprecision, date_format, date_addon) end end return table.concat(out, ", ") end p.getQualifierDateValue = function(frame) local date_format = mw.text.trim(frame.args[4] or i18n["datetime"]["default-format"]) local date_addon = mw.text.trim(frame.args[5] or i18n["datetime"]["default-addon"]) local function outputHook(value) local timestamp = value.datavalue.value.time return parseDateValue(timestamp, date_format, date_addon) end return (getQualifier(frame, outputHook)) end -- This is used to fetch all of the images with a particular property, e.g. image (P18), Gene Atlas Image (P692), etc. -- Parameters are | propertyID | value / FETCH_WIKIDATA / nil | separator (default=space) | size (default=frameless) -- It will return a standard wiki-markup [[Fail:Filename | size]] for each image with a selectable size and separator (which may be html) -- e.g. {{#invoke:Wikidata|getImages|P18|FETCH_WIKIDATA}} -- e.g. {{#invoke:Wikidata|getImages|P18|FETCH_WIKIDATA|<br>|250px}} -- If a property is chosen that is not of type "commonsMedia", it will return empty text. p.getImages = function(frame) local sep = mw.text.trim(frame.args[3] or " ") local imgsize = mw.text.trim(frame.args[4] or "frameless") local go, errorOrentity, claims = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity if (claims[1] and claims[1].mainsnak.datatype == "commonsMedia") then local out = {} for k, v in pairs(claims) do local filename = v.mainsnak.datavalue.value out[#out + 1] = "[[Fail:" .. filename .. "|" .. imgsize .. "]]" end return table.concat(out, sep) else return "" end end -- This is used to get the TA98 (Terminologia Anatomica first edition 1998) values like 'A01.1.00.005' (property P1323) -- which are then linked to https://ifaa.unifr.ch/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/01.1.00.005%20Entity%20TA98%20EN.htm -- uses the newer mw.wikibase calls instead of directly using the snaks -- formatPropertyValues returns a table with the P1323 values concatenated with ", " so we have to split them out into a table in order to construct the return string p.getTAValue = function(frame) local ent = mw.wikibase.getEntity() local props = ent:formatPropertyValues('P1323') local out = {} local t = {} for k, v in pairs(props) do if k == 'value' then t = mw.text.split( v, ", ") for k2, v2 in pairs(t) do out[#out + 1] = "[https://ifaa.unifr.ch/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/" .. string.sub(v2, 2) .. "%20Entity%20TA98%20EN.htm " .. v2 .. "]" end end end local ret = table.concat(out, "<br> ") if #ret == 0 then ret = "Invalid TA" end return ret end --[[ This is used to return an image legend from Wikidata image is property P18 image legend is property P2096 Call as {{#invoke:Wikidata |getImageLegend | <PARAMETER> | lang=<ISO-639code> |id=<QID>}} Returns PARAMETER, unless it is equal to "FETCH_WIKIDATA", from Item QID (expensive call) If QID is omitted or blank, the current article is used (not an expensive call) If lang is omitted, it uses the local wiki language, otherwise it uses the provided ISO-639 language code ISO-639: https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html#wp1252447 Ranks are: 'preferred' > 'normal' This returns the label from the first image with 'preferred' rank Or the label from the first image with 'normal' rank if preferred returns nothing Ranks: https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua ]] p.getImageLegend = function(frame) -- look for named parameter id; if it's blank make it nil local id = frame.args.id if id and (#id == 0) then id = nil end -- look for named parameter lang -- it should contain a two-character ISO-639 language code -- if it's blank fetch the language of the local wiki local lang = frame.args.lang if (not lang) or (#lang < 2) then lang = mw.language.getContentLanguage().code end -- first unnamed parameter is the local parameter, if supplied local input_parm = mw.text.trim(frame.args[1] or "") if input_parm == "FETCH_WIKIDATA" then local ent = mw.wikibase.getEntity(id) local imgs if ent and ent.claims then imgs = ent.claims.P18 end local imglbl if imgs then -- look for an image with 'preferred' rank for k1, v1 in pairs(imgs) do if v1.rank == "preferred" and v1.qualifiers and v1.qualifiers.P2096 then local imglbls = v1.qualifiers.P2096 for k2, v2 in pairs(imglbls) do if v2.datavalue.value.language == lang then imglbl = v2.datavalue.value.text break end end end end -- if we don't find one, look for an image with 'normal' rank if (not imglbl) then for k1, v1 in pairs(imgs) do if v1.rank == "normal" and v1.qualifiers and v1.qualifiers.P2096 then local imglbls = v1.qualifiers.P2096 for k2, v2 in pairs(imglbls) do if v2.datavalue.value.language == lang then imglbl = v2.datavalue.value.text break end end end end end end return imglbl else return input_parm end end -- This is used to get the QIDs of all of the values of a property, as a comma separated list if multiple values exist -- Usage: {{#invoke:Wikidata |getPropertyIDs |<PropertyID> |FETCH_WIKIDATA}} -- Usage: {{#invoke:Wikidata |getPropertyIDs |<PropertyID> |<InputParameter> |qid=<QID>}} p.getPropertyIDs = function(frame) local go, errorOrentity, propclaims = parseInput(frame) if not go then return errorOrentity end local entity = errorOrentity -- if wiki-linked value collect the QID in a table if (propclaims[1] and propclaims[1].mainsnak.snaktype == "value" and propclaims[1].mainsnak.datavalue.type == "wikibase-entityid") then local out = {} for k, v in pairs(propclaims) do out[#out + 1] = "Q" .. v.mainsnak.datavalue.value["numeric-id"] end return table.concat(out, ", ") else -- not a wikibase-entityid, so return empty return "" end end -- returns the page id (Q...) of the current page or nothing of the page is not connected to Wikidata function p.pageId(frame) return mw.wikibase.getEntityIdForCurrentPage() end function p.claim(frame) local property = frame.args[1] or "" local id = frame.args["id"] local qualifierId = frame.args["qualifier"] local parameter = frame.args["parameter"] local list = frame.args["list"] local references = frame.args["references"] local showerrors = frame.args["showerrors"] local default = frame.args["default"] if default then showerrors = nil end -- get wikidata entity local entity = mw.wikibase.getEntity(id) if not entity then if showerrors then return printError("entity-not-found") else return default end end -- fetch the first claim of satisfying the given property local claims = findClaims(entity, property) if not claims or not claims[1] then if showerrors then return printError("property-not-found") else return default end end -- get initial sort indices local sortindices = {} for idx in pairs(claims) do sortindices[#sortindices + 1] = idx end -- sort by claim rank local comparator = function(a, b) local rankmap = { deprecated = 2, normal = 1, preferred = 0 } local ranka = rankmap[claims[a].rank or "normal"] .. string.format("%08d", a) local rankb = rankmap[claims[b].rank or "normal"] .. string.format("%08d", b) return ranka < rankb end table.sort(sortindices, comparator) local result local error if list then local value -- iterate over all elements and return their value (if existing) result = {} for idx in pairs(claims) do local claim = claims[sortindices[idx]] value, error = getValueOfClaim(claim, qualifierId, parameter) if not value and showerrors then value = error end if value and references then value = value .. getReferences(frame, claim) end result[#result + 1] = value end result = table.concat(result, list) else -- return first element local claim = claims[sortindices[1]] result, error = getValueOfClaim(claim, qualifierId, parameter) if result and references then result = result .. getReferences(frame, claim) end end if result then return result else if showerrors then return error else return default end end end -- look into entity object function p.ViewSomething(frame) local f = (frame.args[1] or frame.args.id) and frame or frame:getParent() local id = f.args.id if id and (#id == 0) then id = nil end local data = mw.wikibase.getEntity(id) if not data then return nil end local i = 1 while true do local index = f.args[i] if not index then if type(data) == "table" then return mw.text.jsonEncode(data, mw.text.JSON_PRESERVE_KEYS + mw.text.JSON_PRETTY) else return tostring(data) end end data = data[index] or data[tonumber(index)] if not data then return end i = i + 1 end end -- getting sitelink of a given wiki -- get sitelink of current item if qid not supplied function p.getSiteLink(frame) local qid = frame.args.qid if qid == "" then qid = nil end local f = mw.text.trim( frame.args[1] or "") local entity = mw.wikibase.getEntity(qid) if not entity then return end local link = entity:getSitelink( f ) if not link then return end return link end function p.Dump(frame) local f = (frame.args[1] or frame.args.id) and frame or frame:getParent() local data = mw.wikibase.getEntity(f.args.id) if not data then return i18n.warnDump end local i = 1 while true do local index = f.args[i] if not index then return "<pre>"..mw.dumpObject(data).."</pre>".. i18n.warnDump end data = data[index] or data[tonumber(index)] if not data then return i18n.warnDump end i = i + 1 end end return p 71ve70wrz7fvlusf43lytnnnehkelkf Modul:WikidataIB 828 370 1034 1033 2024-08-09T09:22:47Z Jon Harald Søby 58 1 semakan diimportkan 1033 Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Kategori:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Kategori:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Modul:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Kategori:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, 1, "mul" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end if found then break end end -- loop through fallback table end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- 8uismo6nmdwnebckpi6gwn1nezhu2qr Modul:WikidataIB/nolinks 828 371 1036 1035 2024-08-09T09:22:47Z Jon Harald Søby 58 1 semakan diimportkan 1035 Scribunto text/plain local p ={} --[[ The values here are the English sitelinks for items that should not be linked. These 36 are not definitive and may be altered to suit. --]] p.items = { "Australia", "Austria", "Belgium", "Canada", "China", "Denmark", "England", "France", "Germany", "Greece", "Hungary", "Iceland", "India", "Republic of Ireland", "Israel", "Italy", "Jamaica", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Northern Ireland", "Norway", "Poland", "Portugal", "Russia", "Scotland", "South Africa", "Spain", "Sweden", "Switzerland", "Turkey", "United Kingdom", "UK", "United States", "USA", "Wales", } --[[ This provides a convenient way to create a test whether an item is on the list. --]] p.itemsindex = {} for i, v in ipairs(p.items) do p.itemsindex[v] = true end return p os706fxg7ivfr0wq2o2z1afni11n93q Modul:WikidataIB/titleformats 828 372 1038 1037 2024-08-09T09:22:47Z Jon Harald Søby 58 1 semakan diimportkan 1037 Scribunto text/plain --[[ To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. This submodule lists the entity-ids used in 'instance of' (P31), which allows a module to identify the values that should be formatted. The table p.formats is indexed by entity-id, and contains the value " or '' --]] local p = {} p.italics = { "Q571", -- book "Q13593966", -- literary trilogy "Q277759", -- book series "Q2188189", -- musical work "Q11424", -- film "Q13593818", -- film trilogy "Q24856", -- film series "Q5398426", -- television series "Q482994", -- album "Q169930", -- extended play "Q1760610", -- comic book "Q7889", -- video game "Q7058673", -- video game series "Q25379", -- play "Q2743", -- musical "Q37484", -- epic poem "Q41298", -- magazine } p.quotes = { "Q207628", -- musical composition } p.size = 0 p.formats = {} for i, v in ipairs(p.italics) do p.formats[v] = "''" p.size = p.size + 1 end for i, v in ipairs(p.quotes) do p.formats[v] = '"' p.size = p.size + 1 end return p kf27lmax414v7k61jzza3jomkstxn1m Modul:Yesno 828 373 1040 1039 2024-08-09T09:22:48Z Jon Harald Søby 58 1 semakan diimportkan 1039 Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end swdskn7svew8i9wuydn9uj5l3r2ghcs Abc 0 374 4487 1049 2024-08-12T10:25:42Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q118868156]] 4487 wikitext text/x-wiki [[Fail:Air batu campur ingredients.jpg|thumb|alt=ABC|ABC]] '''ABC''' iyo sejenis [[bue']] untuk nginum kikon ABC tu pinedagang diam [[buan poso]] jo. ABC tu pan alap bana [[Resp|reso]] ni nginum. [[Kategori:Papian Malaysia]] [[Kategori:Papian Singapura]] mt7k2horl94vdtefrdqtvym9dfzjs1z Abdul Somad 0 375 4714 4488 2024-08-19T16:26:22Z Umboh Tuhan 194 + Tungan metelak 4714 wikitext text/x-wiki [[Fail:Abdul Somad.jpg|thumb|alt=Abdul Somad|Abdul Somad diam 2018.]] [[Ustad]] '''Abdul Somad''' penenakan diam 18 Mei 1977. Iyo no dangan ulama lua' [[Indonesia]] yang asal ni lua' kawasan [[Asahan]], [[Sumatera Utara]]. Iyo tekilo kerna syarahan ni ngerukuk diam pelbagai tajuk serita' tajuk ni agama, khusus ni uun sekait moko' ajian hadis ko' falsafah perundangan Islam antawa ilmu fiqah. Ta' samping e, iyo selalu ni ngebinsang tajuk masyarakat agama Islam, antara ni pasal reso kebangsaan. == Tungan metelak == {{Reflist}} [[Kategori:Jomo Indonesia]] 7sruew8l7c2kgm01aswuq3op6rp3vud Abu Abdullah Mohammad Ibn Musa al-Khawarizmi 0 376 1059 1058 2024-08-09T09:22:50Z Jon Harald Søby 58 1 semakan diimportkan 1058 wikitext text/x-wiki #REDIRECT [[Al-Khawarizmi]] 37cfteuulfnsrvs2rmo83gecah5vb5s Adibah Noor 0 377 4728 4660 2024-08-19T16:31:11Z Umboh Tuhan 194 + Tungan metelak 4728 wikitext text/x-wiki '''Adibah Noor Mohamed Omar''' boi pinenakan ta' Kuala Lumpur pada 3 September 1970. Adibah Noor iyono' pelakon kok pelego' ta' Malaysia. Iyo boi jadi guru Bahasa Inggeris sebeta duo tahun ta' dembua' sekul tah Petaling Jaya. Adibah pan boi jadi duta ta' tungan bebeli barang. Iyo boi ngemban pada 18 Jun 2022. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] i9iy2wbu57wzm16n2ezv2xj8ht8fiap Agnes Monica 0 378 4713 4711 2024-08-19T16:25:56Z Umboh Tuhan 194 + Tungan metelak 4713 wikitext text/x-wiki {{Infobox person | name = Agnez Mo | image = Agnez Mo 2019 by Glenn Francis.jpg | caption = Agnez Mo at the [[2019 iHeartRadio Music Awards]] | birth_name = Agnes Monica Muljoto | other_names = Agnes Monica | birth_date = {{Birth date and age|1986|7|1}} | birth_place = [[Jakarta]], Indonesia | occupation = {{Hlist|Singer|songwriter|dancer|actress|record producer|director|businesswoman}} | agent = [[United Talent Agency]] | awards = [[List of awards and nominations received by Agnez Mo|Full list]] | nationality = Indonesia | website = {{URL|agnezmo.com}} | signature = Agnez Mo (signature).svg | module = {{Infobox musical artist | embed = yes | instrument = {{Flat list| *[[Vocal]] }} | genre = {{Hlist|[[Contemporary R&B|R&B]]|[[Pop music|pop]]|[[Hip hop music|hip hop]]|[[Soul music|soul]]}} | label = {{Hlist|[[Aquarius Musikindo]]|[[The Cherry Party]]|[[300 Entertainment|300]]| Entertainment INC|Rated A}} | associated_acts = {{Flat list| *[[Ahmad Dhani]] *[[Melly Goeslaw]] *[[Titi DJ]] *[[Timbaland]] *[[Michael Bolton]] *[[Chris Brown]] *[[Juicy J]] *[[French Montana]] *[[Nicki Minaj]] *[[Drake (musician)|Drake]] *[[Keshi]] *[[Steve Aoki]] }} }} }} '''Agnes Monica Muljoto''' (dipenanakan 1 Julai 1986) iyo tekilo mokok oron Agnez mo, iyo tu dangan pelego,pelakun kok penari muk indonesia. Iyo pan tekilo luak lakunan tajuk ni "Pernikahan Dini"(2001-2003) siniar tak RCTI.Iyo pan boi belagu lagu lakunan ae .iyo betiru jomo terkoyo tak indonesia mokok gaji kulek ni seiko AS$ 16 juta. == Tungan metelak == {{Reflist}} [[Kategori:Jomo Indonesia]] mm18oedlj7qe1wophr3zl3e2hjqt91p Agnes monica 0 379 1074 1073 2024-08-09T09:22:51Z Jon Harald Søby 58 1 semakan diimportkan 1073 wikitext text/x-wiki #REDIRECT [[Agnes Monica]] 6xf4o18daxysfh8hbc01vctcn32uy21 Aidiladha 0 380 4002 1076 2024-08-09T09:38:55Z JhsBot 61 Pywikibot touch edit 4002 wikitext text/x-wiki AIDILADHA IYONO PERAYAAN ISTIMEWA KERNA IYO NGERUO ELAU UMAT ISLAM NGINGOTON KISAH PENGORBANAN NABI IBRAHIM A.S DIAM KESABARAN ANAK NI NABI ISMAIL A.S DIAM MENOON PERINTAH ALLAH SWT. SELAIN AE, SALAH DIKAU KEISTIMEWAAN AIDILADHA KOK ELAU TASYRIK IYONO IBADAT KURBAN. ky7gl7v7w60kxey9i56xrhi7g60qfq4 Aina Abdul 0 381 4727 4725 2024-08-19T16:30:52Z Umboh Tuhan 194 4727 wikitext text/x-wiki {{Infobox person|name=Aina Abdul|image=|image_size=|caption=Aina digelar Diva Terulung Malaysia|birth_name=Nurul Aina binti Abdul Ghani|birth_date={{Birth date and age|df=yes|1993|10|25}}|birth_place=[[Johor Bahru]], [[Johor]], [[Malaysia]]|nationality=|other_names=|education=Ijazah Sarjana Muda Muzik Kontemporari|alma_mater=[[Universiti UCSI]]|years_active=2014–betiru|occupation={{Hlist|Penyanyi|penulis lagu|komposer|penerbit rakaman|pelakon}}|awards=|spouse=|children=|father=Abdul Ghani Abdullah|mother=Zaini Abdullah|family=|relatives=|website=https://www.ainaabdul.my/|module={{Infobox musical artist | embed = yes | background = solo_singer | genre = {{Hlist|[[Muzik pop|Pop]]|[[balada]]|[[R&B]]|[[Muzik soul|soul]]}} | instrument = [[Vokal]] | Label = {{Ublist|Indigital|Aina Abdul Entertainment}} | Associated_acts = {{Hlist|[[Khai Bahar]]|[[Lah Ahmad]]|[[Ella (penyanyi)|Ella]]}} | URL = {{Flatlist| * {{Cite web|title=TikTok|url=https://www.instagram.com/ainations/}}}}}}|signature=|signature_size=}}'''Nurul Aina Abdul Ghani''' (penenakan 25 oktober 1993) iyo tu pelego' dendo, penulis lagu, komposer kok pelakun dendo Malaysia.Kerjaya ni boi mula betak ni boi jadi peserta Memtor Legend iyo ai jadi anak murid tak penyanyi rock Ella.iyo boi manang tempat keduo diam pertandingan mentor legend.Iyo boi ngerakam single sulung ni ,"ini yang kau mahu" diom 2015 Keluman awal Aina Abdul boi penenakan 25 oktober 1993 tak kuala pilah,negeri sembilan.Iyo tu anak bongsu mediom limo urang gai dikberdik.Iyo kulek pendidikan awal tak sekolah kebangsanaan sri mawar,senawang,lapas ae nerus pelajaran ni tak peringkat menengah tak sekolah menengah kebangsanaan puteri.lapas kulek sijil pelajaran malaysia (SPM),iyo nambung sekul ni tak Universiti UCSI Kuala Lumpur, iyo boi namat sekul ni tak taun 2020 kok genelar graduan diom Sarjana Muda Muzik kontemporari taun 2021. Ma' ni ai ngemban tak taun 2008 oleh masam-masam masalah kesihatan,beta aina bau 15 taun.Diom temubual kok SinarHarian buan april 2021,iyo marak ma' ni ngemban muat iyo lebih tabah ngadap iko cabaran kok ling "kerungaian ma' muat iyo jadi dendo tabah kok bani sebunda kok iyan-iyan cabaran.sedongpan perjuanganku diom industri seni adalah dedikasi buatni". KERJAYA Aina mula kerjaya muzikni jadi pelego tak kelab malam,restoran kok lounge terposok No Black Tie.Iyo kemudian ni terpenek salah dangan finalis pertandingan irama 1malaysia nianjur Radio Televisyen Malaysia (RTM)Tak taun 2010. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 76vwhccbzhh2xjj8ovy9y7vqhab77n7 Ais 0 382 4492 1091 2024-08-12T10:25:53Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q23392]] 4492 wikitext text/x-wiki [[Fail:IceBlockNearJoekullsarlon.jpg|thumb|Ais]] '''Ais''' buli ngarujuk tak mingo-mingo sepuh empat bentuk pepejal fasa [[buek]] yang terati. h85p5bwktxh6yx267yy789ylwzzo5ef Ais buk 0 383 4493 1099 2024-08-12T10:25:56Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q37828]] 4493 wikitext text/x-wiki [[Fail:Open refrigerator with food at night.jpg|thumb|Ais buk]] '''Ais buk''' iyo noh dikau kemudahan ta' semimon jomo tujuan ni binuat [[tung ngena' makanan]]. Ais buk tu boi [[tekilo ta' dunia ti luak taun 1920-an]].<ref>https://ms.wikipedia.org/wiki/Peti_sejuk</ref> == Tungan metelak == {{Reflist}} 64u1at68ymqecotaltamdcw3r6npvb6 Aishah Ghani 0 384 4694 4458 2024-08-19T16:20:36Z Umboh Tuhan 194 + Tungan metelak 4694 wikitext text/x-wiki Tan Sri Datin Paduka Seri Hajah Aishah binti Haji Ghani boi penanakan 15 Disember 1923. Ngemban masa 19 April 2013. Iyo tu Menteri Kebajikan Masyarakat Malaysia masa 1973 kok 1984. Iyo pan Ketua Pergerakan Wanita UMNO Malaysia lua' tahun 1972 engkon 1984. Iyo ngemban masa 19 April 2013 pukul 12.50 tengah songom masa umur ni 90 taun. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] 48sl5s5xh9676vdeb6ma13yetd6rh1i Akad nika 0 385 4494 1109 2024-08-12T10:25:58Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q49836]] 4494 wikitext text/x-wiki '''Akad''' '''nika''' tu iyo noh ikrar pernikahan. Maksud ni ijab luak tak wali dendo ataupan wakil ni. Akad nika tu pan [[wajib]] [[Wpr/bdr Bana|bana]] diam proses pernikahan menurut tak upacara agama kiti. 61pk7sv0xnn2zpo141cuo3hjpgv038y Akal 0 386 4495 1114 2024-08-12T10:26:01Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q178354]] 4495 wikitext text/x-wiki '''Akal''' tu niak tekito tapi un, kegunoon ni untuk membeza nggo alap koh enggo buk. k9wre2pwnacr9b0m733gs8vtwmzn92c Al-Khawarizmi 0 387 4496 1123 2024-08-12T10:26:03Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q9038]] 4496 wikitext text/x-wiki [[Fail:1983 CPA 5426 (1).png|thumb|alt=Al-Khawarizmi|Al-Khawarizmi]] '''Abu Abdullah Muhammad Ibn Musa Al-Khawarizmi''' antawa '''Abū Jaʿfar Muḥammad ibn Mūsā al-Khwārizmī''' antawa tekilo sebagai '''Al-Khawarizmi''' jo (780 - 850) iyo no dikau' pakar mediam bidang matematik, astronomi engko' geografi lua' [[Iran]]. Al-Khawarizmi pan tekilo sebagai emma' algebra. [[Kategori:Jomo Iran]] aq9jzhf7d6cgxmth7poelueyzvyhgmr Al-Sultan Abdullah Ri’ayatuddin Al-Mustafa Billah Shah 0 388 4669 4656 2024-08-18T20:46:45Z Umboh Tuhan 194 Al-Sultan Abdullah pada 2019 4669 wikitext text/x-wiki [[Fail:Al-Sultan Abdullah (cropped) 2.jpg|thumb|Al-Sultan Abdullah pada 2019]]{{Infobox royalty|name=Abdullah {{nobold | {{Ubl | {{native name|ar|عبدﷲ|italics=no|paren=omit}} }}}}|title=Al-Mustafa Billah (He who is chosen by God)|image=King Abdullah of Pahang at the Enthronement of Naruhito (1).jpg|image_size=|caption=Abdullah in 2019|succession=[[Yang di-Pertuan Agong|Yang di-Pertuan Agong XVI]]|reign=31 January 2019 – 30 January 2024|coronation=30 July 2019|cor-type=[[Installation of Yang di-Pertuan Agong XVI|Installation]]|predecessor=[[Muhammad V of Kelantan|Muhammad V]]|successor=[[Ibrahim Iskandar of Johor|Ibrahim]]|succession3=[[Sultan of Pahang]]|reign3=11 January 2019 – present|coronation3=15 January 2019|cor-type3=Proclamation|full name=Tengku Abdullah ibni Tengku Ahmad Shah|regnal name=Al-Sultan Abdullah Ri'ayatuddin Al-Mustafa Billah Shah ibni Almarhum Sultan Haji Ahmad Shah Al-Musta'in Billah {{refn|group=fn|The meaning of his regnal name is "Sultan Abdullah as the protector of Islam who is chosen by Allah".<ref>{{cite news |title=Sultan of Pahang officially addressed as Al-Sultan Abdullah Ri'ayatuddin Al-Mustafa Billah Shah |url=http://www.bernama.com/state-news/berita.php?id=1685008 |author=[[Bernama]] |date=15 January 2019 |access-date=17 July 2019}}</ref>}}|predecessor3=[[Ahmad Shah of Pahang|Ahmad Shah]]|successor3=[[Tengku Hassanal Ibrahim Alam Shah]]|suc-type3={{nowrap|[[Heir apparent]]}}|consort=Tunku Azizah|consortreign=|consortto=|spouse={{Ublist |{{marriage|[[Tunku Azizah Aminah Maimunah Iskandariah]]|1986}} |{{marriage|[[Julia Rais|Cik Puan Julia Abdul Rais]]|1991}} }}|issue={{Ublist |[[Tengku Amir Nasser Ibrahim Shah]] (adopted) |Tengku Ahmad Iskandar Shah (deceased) |[[Tengku Hassanal Ibrahim|Tengku Hassanal Ibrahim Alam Shah]] |[[Tengku Muhammad Iskandar Ri'ayatuddin Shah]] |Tengku Ahmad Ismail Mu’adzam Shah |Tengku Puteri Afzan Aminah Hafidzatullah |Tengku Puteri Jihan Azizah 'Athiyatullah |[[Tengku Puteri Iman Afzan]] |Tengku Puteri Ilisha Ameera |Tengku Puteri Ilyana }}|house=[[Bendahara dynasty|Bendahara]]|father=[[Ahmad Shah of Pahang|Sultan Haji Ahmad Shah Al-Musta’in Billah ibni Almarhum Sultan Abu Bakar Ri’ayatuddin Al-Mu’azzam Shah]]|mother=[[Tengku Ampuan Afzan|Tengku Ampuan Hajah Afzan Rahimahallah binti Almarhum Tengku Panglima Perang Tengku Muhammad]]|birth_name=|birth_date={{birth date and age|df=yes|1959|07|30}}|birth_place=Istana Mangga Tunggal, [[Pekan, Pahang]], [[Federation of Malaya]]|death_date=|death_place=|date of burial=|place of burial=|religion=[[Sunni Islam]]|signature=Al-Sultan Abdullah signature.svg|module={{Infobox person | embed=yes | education = {{plain list| * [[Royal Military Academy Sandhurst]] * [[Worcester College, Oxford]] * [[Queen Elizabeth College]] ([[Diploma|Dip]]) }} }} {{Infobox military person |embed = yes |embed_title = |allegiance = {{Flag|Malaysia}} |branch = {{Army|MAS}} |serviceyears = 1978–present |rank = |unit = {{Ublist |[[Malaysian Royal Armoured Corps|Royal Armoured Corps]] |505th [[Rejimen Askar Wataniah|Territorial Army Regiment]] }} |website = }}}} '''Al-Sultan Abdullah Ri'ayatuddin Al-Mustafa Billah Shah Ibni Almarhum Sultan Haji Ahmad Shah Al-Musta'in Billah''' atau '''Al-Sultan Abdullah Al-Haj''' diputerakan sebagai Tengku Abdullah pada 30 Julai 1959 ta' Pekan,[[Pahang]] Malaysia. Al Sultan Abdullah menik takhta jadi Sultan Pahang masa 15 Januari 2019 boi begeh nilantik sebagai [[Yang di-Pertuan Agong|Yang di-Pertuan Agong Malaysia]] ke-16 oleh Majlis Rojo-rojo masa 24 Januari 2019.<ref><nowiki>http://www.royalark.net/Malaysia/pahang10.htm</nowiki></ref> Baginda ngelafaz sumpah sebagai Yang di-Pertuan Agong Malaysia masa dikau istiadat yang penuh gilang gemilang muh Istana Negara, Jalan Duta pada 31 Januari 2019. == Tungan metelak == {{Reflist}} dmkonxsn75igtckpa7w585p77estw1m Al-quran 0 389 4498 1133 2024-08-12T10:26:08Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q428]] 4498 wikitext text/x-wiki Quran eyonoh kitab bersih yang wajib diom umat muslim yang terua imam oleh wahyu peneduai oleh Allah tah Nabi Muhammad melalui perantaraan Malaikat Jibril. Kitab onantu dinagih tah 114 bab antau “surah”. Selain ae pan Quran tu iyo noh kitab susi yang utama untuk jomo muslim. mu0hlr5qa95gxoh5baepes58knp10h9 Aliff Syukri 0 390 4499 4003 2024-08-12T10:26:10Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q25484994]] 4499 wikitext text/x-wiki Yang Hormat Dato' Sri Aliff Syukri bin Kamarzaman.SSAP,DIMP (penenakan 3 April 1987) iyo tu salah dikau anak lua' pengasaa produk kosmetik Sendayu Tinggi,Rozita binti Ibrahim. Iyo boi mula nuut ta diom dunia perniagaan lua' umur ni 7 tahun,masa ni temban moko' eyang to' ni ta' Sabar Bernam, Selangor. h613dqv67dp64dimfs1m863c95duvkt Allah 0 391 4779 4500 2024-08-19T17:20:14Z Umboh Tuhan 194 + Tungan metelak 4779 wikitext text/x-wiki [[Fail:Allah3.svg|thumb|]] '''Allah''' SWA tu sembaan jomo [[Islam]], Io dikau, niak nganak koh pinanakan, Rojo toh segala Rojo, Pentadbir alam dan seisi ni teposok Alam Akhirat. == Tungan metelak == {{Reflist}} jf14o2jreb9viykh4syw7xo9ebprc9q Alun alun 0 392 4501 1148 2024-08-12T10:26:14Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q34442]] 4501 wikitext text/x-wiki [[Fail:MC 澳門 Macau 氹仔 Taipa 望德聖母灣街 Rua da Baía de Nossa Senhora de Esperança road name sign evening January 2019 SSG 03.jpg|thumb|Alun-alun ta' [[Makau]]]] '''Alun-alun''' iyono lan oyo tungan [[kerita]], [[mutu]], [[luri]] atau pan [[jomo]] lan untuk ngogo pu' ta dikau tempat yang ingin niogo. 1573e3f0eqwjeer6k4wmhrh2zecblpj Ambuyat 0 393 4502 1157 2024-08-12T10:26:16Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4742021]] 4502 wikitext text/x-wiki [[Fail:Ambuyat_in_Bandar_Seri_Begawan_Brunei.jpg|thumb|Ambuyat]] '''Ambuyat''' iyo noh dikau jenis [[makanan]] yang boi binuat lua bagian batang mediam sagu sawit. Makanan yang jinis berkanji yang nyaun reso somo dokon besina kanji. Ambuyat iyo noh hidangan kebangsaan muh [[Brunei]] enggai muh jo pan ambuyat pan antara makanan tempatan mitu Sarawak, Sabah kok Labuan yang kadang-kadang pinau sebagai linut. Candas atau tekilo sebagai garpu booh' bioso ni pinakai untuk mangan ambuyat. Ambuyat akan kinakan makai looh' dediri dokon looh' ding, bangan osom, manuk kari, ding sardin engko' iko lagi jenis looh'. 2ze1os1hovquil1yhpvv6exghcbulns Amelia Henderson 0 394 4653 4652 2024-08-18T07:07:00Z Umboh Tuhan 194 + Tungan metelak 4653 wikitext text/x-wiki {{Infobox person | name = Amelia Henderson | image = Amelia Henderson on MeleTOP.jpg | imagesize = | caption = Amelia ditemuramah dalam rancangan ''[[MeleTOP]]'' di [[Astro Ria]] pada 9 Ogos 2016. | birth_name = Amelia Thripura Henderson | birth_date = {{Birth date and age|1995|10|20}} | birth_place = [[Klang]], [[Selangor]], [[Malaysia]] | nationality = | known_for = | occupation = Pelakon, pengacara, model, penerbit | years_active = 2006–kini | spouse = {{Marriage|Dato’ Indera Tunku Harunnarasheed Putra|2015|2018|reason=divorced}} | parents = {{Plainlist| * Jaya Rudralingam (ibu) * Graham L. Henderson (bapa) }} | relatives = {{Plainlist| * Alexander Rudrakeith Henderson (adik lelaki) * Lydia Henderson }} | website = {{URL|ameliath.com}} }} '''Amelia Thripura Henderson''' (penenakan 20 Oktober 1995) iyo tu dangan pelakun dendo Malaysia, asal ni luak Klang, Selangor.iyo mula kerjo seni tu jadi model iklan,iyo pan pelidas belakun kok dangai drama mokok pilem. == Tungan metelak == {{Reflist}} ipnabnlzjn135hswwh5q120nbqvta2k Amelina 0 395 4503 1164 2024-08-12T10:26:18Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4742336]] 4503 wikitext text/x-wiki Norazlina Amir Sharipuddin pinau Amelina (dipenanakan 4 Ogos 1974) iyo tu dangan pelego' dendo tak malaysia tekilo diom taun era 1990-an.iyo tu pelego'dangdut,iyo pinau 'Ratu Dangdut Malaysia'iyo pinau begea kerna album ni paling iko penendangang seiko ratusan ribu unit. muvjym02tqybt8jbrqmru87txhnix8p Ampud 0 396 4004 1167 2024-08-09T09:39:03Z JhsBot 61 Pywikibot touch edit 4004 wikitext text/x-wiki Ampud ma'na ni ai abis tunu'. 5d78pujakwshg7o62lieuqfsbs7keu8 Ampus 0 397 4504 1173 2024-08-12T10:26:21Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q35869]] 4504 wikitext text/x-wiki [[Fail:Asthma.jpg|thumb|Ampus]] '''Ampus''' eyo sejenis penyakit yang [[merbahaya]] amun un jomo ben penyakit tu eyo niak buli terlampau lati amun eyo lati bana ampus ni akan pelua. sik5kiwrpdr0t0cml47izsy5g5wnt3o Amy Mastura 0 398 4715 4646 2024-08-19T16:27:23Z Umboh Tuhan 194 + Tungan metelak 4715 wikitext text/x-wiki '''Amy Mastura''' (boi penenekan 10 mei 1971) iyo tu dangan pelgo,pelakun,pelawak,komposer kok pegacara tak malaysia.iyo boi mula aktif diom bidang muzik lapas eyo noi manang Asia Bagus taun 1993 tak jipun kok boi melua' album makai oron ni sebagai oron lagu ae tak taun 1994 tak media' syarikat rakaman Pony Canyon enggo iyo kekal kok syarikat rakaman ae sampai 1999.iyo tu boi penenakan tak Ipoh,Perak lua' dangan bagas tentera,iyo sukup tekilo lua' lakunan watak-watak lusu dio pilem boi niarah lek Aziz M. osman. amundiam muzik, iyo tru tekilo lua' lagu ransak-ransak sampai iyo boi muat fenomena tak diri ni diom rantau Asia diom entegah taun 1990an.endiom mac 2011, iyo pan jadi duta bau Kose, jenama kosmetik jipun.iyo jadi dangan dendo malayu pertama boi jadi duta Kose. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] paoygz9c8637cickkk0cwvxyftfrw8m Anak laat 0 399 4005 1184 2024-08-09T09:39:04Z JhsBot 61 Pywikibot touch edit 4005 wikitext text/x-wiki '''Anak laat''' iyo noh dikau taraf ta melaat Sabah,Sarawak kok Labuan ta' [[Malaysia]] untuk ngerujuk jomo asal Pulau Borneo. Amun nuut Perlembagaan Persekutuan, mimon anak laat nianggap bumiputera Malaysia tapi ngai mimon bumiputera ae nianggapt anak laat.<ref><nowiki>https://www.bharian.com.my/rencana/komentar/2019/02/528889/isu-anak-negeri-jangan-sampai-gugat-perpaduan</nowiki></ref> == Tungan Metelak == {{Reflist}} a76k9fe9doli0hrmlk8nyugandy5w9o Anak suang 0 400 4006 1187 2024-08-09T09:39:05Z JhsBot 61 Pywikibot touch edit 4006 wikitext text/x-wiki Anak suang tu io suang diki diki nakung kok io un saluran ngogoh suang bagal atau suang utama . Anak suang tu lekat buek mediak tanah atau pan buek lekat enjata bukit , sangkan no oron ni anak suang , Anak suang tu mingo mingo ben suang bagal iyo un 5muwtrmo11p28vtrf3ced2ro5ayrz51 Angkup tikok 0 401 4604 1189 2024-08-13T11:44:43Z Minorax 160 4604 wikitext text/x-wiki '''Angkup''' ''guno ni untuk mubut bu tikok pute'' nz8onkk1dscudr5spoi6sucs4qyv9tz Antu 0 402 4778 4008 2024-08-19T17:19:43Z Umboh Tuhan 194 Hantu_(supernatural_creature) 4778 wikitext text/x-wiki '''Antu''' tu dikau [[makhluk ta' alam ghaib]].antu tu [[wujud ta' alam lain]]. Diom islam,antu tu [[roh jomo matai yang nyiak no temban ta' bumi]].<ref>https://en.wikipedia.org/wiki/Hantu_(supernatural_creature)</ref> == Tungan metelak == {{Reflist}} 6967yuo3cn3gimolaj7c1a174471o65 Api 0 403 4506 1199 2024-08-12T10:26:25Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q3196]] 4506 wikitext text/x-wiki '''Api''' iyo no salah satu prosesoksidasi pantas yang mengasil cahaya,haba,asap ko perbagai halis tindak balas [[kimia]] salah satu [[karbon dioksida]] dan [[air]]. leur8zmxqz85li0rqfdw3oziutk6lik Apo 0 404 4674 4009 2024-08-19T14:18:57Z Umboh Tuhan 194 + Tungan metelak 4674 wikitext text/x-wiki [[Fail:Apo pemapa'.jpg|thumb|Apo]] '''Apo''' tu rena ni pute' masam tana' pilit genuulan diam penapa' amun mapa'. Apo tu binuat lua' ta' kulit kuang ntawa kulit timung. Kulit timung tu tinunu' makay kayu boo'pasal api kayu boo' tu lema' engko' nya' ben boro. Amun ben boro engko' api ni keras, ansur kulit timung e jadi dodok siguul engko' abuk kayu boo'. Amun ai no tunu', nendo' kulit timung e benersi bo' ngena' e diam bisin, tenata' engko' bue dekiit bo' nongkob e lapat endo' nya' osok beriu. Lapas dengsongom binuka' bisin e, jadi no apo masam dodok. Enggai pemapa' jo, apo tu pan buli binuat toos kotol bagas nyamuk ngeket, tanda ngiro engko' tanda' ruma'. == Tungan metelak == {{Reflist}} a4uzpi87ognmz7xlc9o2kpkpdkumuxe Ari Raya' Poso 0 405 4507 1209 2024-08-12T10:26:27Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q464458]] 4507 wikitext text/x-wiki '''Hari Raya Poso''' sinambut pada 1 '''[[Syawal]]''' tahun Hijrah. Perayaan tu kiniloh sebagai Hari Raya Poso, Hari Raya Fitrah/ Hari lebaran. Hari Raya Poso sinambut oleh jomo Islam ta' dikau dunia nyiak kiro bengso ta' dikau dunia yang beragama Islam sebagai nanda tamat noh '''[[Ramadan]]'''. Hari Raya Poso iyo noh perayaan paling oyoh untuk jomo Islam. <ref>https://www.wonderfulmalaysia.com/faq/hari-raya-puasa-hari-raya-aidilfitri.htm</ref> == Tungan metelak == {{Reflist}} g1tmc5xkm7v8h3e2tu6m8fttav1npmp Arnab 0 406 1219 1218 2024-08-09T09:23:07Z Jon Harald Søby 58 9 semakan diimportkan 1218 wikitext text/x-wiki Arnab iyono sejinis binatang mamalia yang posok diam dinakan Leporidae. Arnab sanang tekilo engko' telingoni langkau kok entorong ni diki, depasang impon entenga' yang pelua embunda, betis ni embuli oyo dari betis embunda engko' ingko ni pendok. lnjngbdbgn35t3r9s52t9tdsr2ytp9g Asmah Omar 0 407 4508 1223 2024-08-12T10:26:29Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4071368]] 4508 wikitext text/x-wiki Profesor Emeritus Dr. Asmah Haji Omar iyonoh pakar diom kerjoon nahu Bongso melayu kok jomo yang rojo terkilo jomo diam kerjoon perancangan bongso. iyono pan Profesor Kerusi Tamadun Melayu Za'ba kok Pengarah Institut Tamadun Melayu muk Universiti Pendidikan Sultan Idris, Tanjung Malim, Perak. sebelum tu, iyo tu ahli akademik Universiti Malaya somon taun 1963 ngabut no yo bersara lekat Timbalan Naib canselor universiti malaya. iyopan boi ngentan jawatan Dekan Fakulti Bahasa kok Linguistik kok boi kerjo diom Jawatankuasa Tetap Bahasa Melayu. 393o0l8zb7e67mnj2jdbu78hy2192y5 Asmah haji omar 0 408 1225 1224 2024-08-09T09:23:07Z Jon Harald Søby 58 1 semakan diimportkan 1224 wikitext text/x-wiki #REDIRECT [[Asmah Omar]] 086d6751olr7nylucyt0n3elznmsdjh Atay 0 409 4509 1231 2024-08-12T10:26:31Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1072]] 4509 wikitext text/x-wiki [[Fail:Heart_numlabels.svg|thumb|Atay]] '''Atay''' iono [[organ]] tubuh tungan menap doom jomo. Reso doom susah sanang mimon berlaku koh nina diom atay. absmguib9roh39cqw512hojdvi2pi9y Awie 0 410 4510 1235 2024-08-12T10:26:34Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4830060]] 4510 wikitext text/x-wiki {{Infobox person|honorific_prefix=[[Malay styles and titles|Yang Hormat Dato']]|honorific_suffix=[[List of post-nominal letters (Pahang)|DIMP]]|image=Awie on MeleTOP.jpg|caption=Awie in 2016.|name=Awie|birth_name=Ahmad Azhar bin Othman|birth_date={{birth date and age|1968|11|24|df=y}}|birth_place={{nowrap|[[Kampung Datuk Keramat|Datuk Keramat]], [[Kuala Lumpur]],}} Malaysia<!-- Please do not add Federation of Malaya here because the subject was born after 1963. Federation of Malaya became Malaysia on 16 September 1963. -->|occupation=Singer, musician, actor, host, producer, director|other_names=Husin, Tok Wie|years_active=1985&ndash;present|spouse={{Plainlist| * {{marriage|Arni Nazira Anuar|1998|2006|reason=divorced}} * {{marriage|Rozana Misbun|2006|2014|reason=divorced}} * {{marriage|Datin Sharifah Ladyana|2016}} }}|children=6|module={{infobox musical artist | embed = yes | genre = [[Rock kapak]], [[pop rock]], [[Heavy metal music|heavy rock]], [[blues]], [[ballad]], [[funky]] | associated_acts = Wings, [[Erra Fazira]] [[Ziana Zain]], [[Ella (Malaysian singer)|Ella]], [[M. Nasir]] }}}}Dato' Ahmad Azhar Othman atau lebih tekilo kok oron Awie (penenakan 24 november 1968) iyo tu pelego',pemuzik, kok pelakun dela Malaysia. Iyo tekilo sebagai dangan pelego utama diom kumpulan wings.iyo pan boi nut diom kumpulan Metallica diom album Matster of puppets sabagi dangan pemain suling tak peringkat worldwide.Iyo boi penenakan tak Datuk Keramat, Kuala Lumpuriyo boi mula kerjaya ni tak taun 1987 mokok kumupulan wings kok album lagu tajuk ni Belenggu irama. s2bpp3rjysw0jyr08v18axvvupp63ft Azhar Idrus 0 411 4511 4010 2024-08-12T10:26:37Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q248820]] 4511 wikitext text/x-wiki '''Ustaz Azhar Idrus''' (penenakan 12 Februari 1964) iyo no dangan penseramah bibas [[Malaysia]]. Iyo tekilo mokok gaya nampai kok neramah amat bersahaja, senelit mokok jawapan pekat kok ling terengganu. Ustaz azhar kule' pendidikan awal ni tak sekul rendah hj mohd sharif,Alor setar,Kedah. Lps tamat sekul tak peringkat rendah,iyo nambung sekul ni tak Sekolah Menengah Kebangsaan Darulaman,Alor setar. 8qgu158ifyym8kc7kf4leg5zzkw5vfb Azharina 0 412 4722 4647 2024-08-19T16:29:22Z Umboh Tuhan 194 + Tungan metelak 4722 wikitext text/x-wiki '''Azharina Azhar''' (penenakan 11 Mac 1985) atau lebih tekilo moko' Azharina iyo tu dangan pelego' dendo Malaysia yang boi mula kerjoon ta' industri muzik Malaysia lua' 2001 lagi. Iyo tekilo lua' lagu ni "Elergi Sepi" setarusni mula tekilo moko' dangai bua' lagu antarani Rawan,Rasa, ko' iko lagi. '''[[Latar Embuli]]''' Azharina Azhar boi penenakan ta' Hospital Queen Elizabeth,Kota Kinabalu,Sabah. iyo boi poyo' mediam keluarga seni le' ma' ni Azhar bin Datuk Hj. M.Y Ahmad dan eyang ni Azizah Ibrahim,Iyo dangan pelego tempatan un keturunan peranakan sampuran Pakistan kok Kadazan-Dusun.Iyo boi metio diri ni lua' bidang seni sebeta dentaun' setangah lapas boi manang Bintang RTM 2001 sebab ni iyo ingin fokus diom' sekul ni kok' iyo ningkok peperiksaan SPM ta' salah dikau sekul ta' Kuala Lumpur.iyo kulek keputusan semerlang sampai tinawar biasiswa le' kerajaan sabah untuk narus pelajaran ni ta' New York university diom' bidang muzik.tapi ai tuak ni kerna iyo harus kerjo untuk mekelum dik ni kok eyang ni,Azizah Ibrahim yang boi sapek mokok ma' ni. Azharina mula belego' masa umur n i 3 taun moko' mula nuut pertandingan belagu lua' umur 5 taun kok' sampai taun 2017,iyo tu boi nuut 108 pertandingan no diom lum ni. '''[[KERJAYA MUZIK]]''' '''Juara Bintang RTM 2001''' Azharina manang diom umur ni 16 taun. iyo setanding ko' enam urang dendo moko' duangan dela teposok pan duangan oron bagal iyo no siti sarah raisuddin moko misha omar '''Anugerah Era 2005''' Lagu elergi sepi boi nilego oleg ni pan terua nobat lagu pop boi pinene' le' rakyat malaysia ta' Anugerah Era 2005. '''Gegar Vaganza 3''' Azharina terua nobat sebagai pemanang pertandingan akhir program Gegar Vaganza(musim3). '''Keluman Peribadi''' 30 September 2014,dinakan ni,Mohd.Faizal muan tanggungjawab membagalkan anak ni ta' Azharina,lua' mea no iyo boi jadi eyang angkat ta' Rahmat Azharin. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] nexo7fn05j53edrr2i71oe2j5kzzqcw Azizulhasni Awang 0 413 4684 4668 2024-08-19T16:10:44Z Rombituon 59 4684 wikitext text/x-wiki {{Infobox cyclist | honorific_prefix = [[Malay styles and titles#Honorary styles|Yang Berbahagia]] [[Malay styles and titles#State titles|Dato']] | name = Azizulhasni Awang | fullname = Muhammad Azizulhasni bin Awang | image = UCI Track World Championships 2020 043 (cropped).jpg | image_size = | caption = Azizulhasni pada 2020 | nickname = The Pocket Rocketman | birth_date = {{birth date and age|1988|1|5|df=yes}} | birth_place = [[Kuala Dungun]], [[Terengganu]], [[Malaysia]]<ref name=sr>[https://www.sports-reference.com/olympics/athletes/aw/mohd-azizulhasni-awang-1.html Mohd Azizulhasni Awang] {{webarchive|url=https://web.archive.org/web/20161002113218/http://www.sports-reference.com/olympics/athletes/aw/mohd-azizulhasni-awang-1.html |date= 2 October 2016 }}. sports-reference.com</ref> | height = 1.68 m<ref name="Beijing">{{cite web| url=http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/6/230136.shtml| title=Athlete Biography – AWANG Mohd Azizulhasni | publisher=Beijing Olympics official website|archive-url=https://web.archive.org/web/20080809113005/http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/6/230136.shtml|archive-date=9 August 2008}}</ref> | currentteam = | discipline = Track | role = Rider | ridertype = Sprinter | majorwins = | amateuryears1 = | amateurteam1 = Dungun Cycling Team | proyears1 = 2009 | proteam1 = Bike Technologies Australia | medaltemplates = {{MedalCountry|{{MAS}}}} {{MedalCount|total=yes |[[Summer Olympic Games|Olympic Games]]|0|1|1 |[[UCI Track Cycling World Championships|World Championships]]|1|2|4 |[[Asian Games]]|2|1|1 |[[Asian Cycling Championships|Asian Championships]]|12|7|6 |[[SEA Games]]|3|2|0 |[[Commonwealth Games]]|0|0|2 }} {{MedalSport|Men's [[track cycling]]}} {{MedalOlympic}} {{MedalSilver|[[2020 Summer Olympics|2020 Tokyo]]|[[Cycling at the 2020 Summer Olympics – Men's keirin|Keirin]]}} {{MedalBronze|[[2016 Summer Olympics|2016 Rio de Janeiro]]|[[Cycling at the 2016 Summer Olympics – Men's keirin|Keirin]]}} {{MedalCompetition|[[UCI Track Cycling World Championships|World Championships]]}} {{MedalGold|[[2017 UCI Track Cycling World Championships|2017 Hong Kong]]|[[2017 UCI Track Cycling World Championships – Men's keirin|Keirin]]}} {{MedalSilver|[[2009 UCI Track Cycling World Championships|2009 Pruszków]]|[[2009 UCI Track Cycling World Championships – Men's sprint|Sprint]]}} {{MedalSilver|[[2010 UCI Track Cycling World Championships|2010 Ballerup]]|[[2010 UCI Track Cycling World Championships – Men's keirin|Keirin]]}} {{MedalBronze|[[2015 UCI Track Cycling World Championships|2015 Yvelines]]|[[2015 UCI Track Cycling World Championships – Men's keirin|Keirin]]}} {{MedalBronze|[[2016 UCI Track Cycling World Championships|2016 London]]|[[2016 UCI Track Cycling World Championships – Men's keirin|Keirin]]}} {{MedalBronze|[[2020 UCI Track Cycling World Championships|2020 Berlin]]|[[2020 UCI Track Cycling World Championships – Men's keirin|Keirin]]}} {{MedalBronze|2020 Berlin|[[2020 UCI Track Cycling World Championships – Men's sprint|Sprint]]}} {{MedalCompetition|[[Cycling at the Asian Games|Asian Games]]}} {{MedalGold|[[2010 Asian Games|2010 Guangzhou]]|[[Cycling at the 2010 Asian Games – Men's keirin|Keirin]]}} {{MedalGold|[[2018 Asian Games|2018 Jakarta-Palembang]]|[[Cycling at the 2018 Asian Games – Men's sprint|Sprint]]}} {{MedalSilver|2018 Jakarta-Palembang|[[Cycling at the 2018 Asian Games – Men's Team Sprint|Team sprint]]}} {{MedalBronze|2018 Jakarta-Palembang|[[Cycling at the 2018 Asian Games – Men's keirin|Keirin]]}} {{MedalCompetition|[[Asian Cycling Championships|Asian Championships]]}} {{MedalGold|[[2007 Asian Cycling Championships|2007 Bangkok]]|Keirin}} {{MedalGold|[[2008 Asian Cycling Championships|2008 Nara]]|Sprint}} {{MedalGold|2008 Nara|Keirin}} {{MedalGold|[[2009 Asian Cycling Championships|2009 Tenggarong]]|Sprint}} {{MedalGold|2009 Tenggarong|[[2009 Asian Cycling Championships|Team sprint]]}} {{MedalGold|[[2014 Asian Cycling Championships|2014 Astana]]|Sprint}} {{MedalGold|[[2015 Asian Cycling Championships|2015 Nakhon Ratchasima]]|Keirin}} {{MedalGold|[[2017 Asian Track Cycling Championships|2017 New Delhi]]|Sprint}} {{MedalGold|[[2019 Asian Track Cycling Championships|2019 Jakarta]]|Sprint}} {{MedalGold|[[2020 Asian Track Cycling Championships|2020 Jincheon]]|Sprint}} {{MedalGold|[[2023 Asian Track Cycling Championships|2023 Nilai]]|Sprint}} {{MedalGold|[[2023 Asian Track Cycling Championships|2023 Nilai]]|Keirin}} {{MedalSilver|2008 Nara|[[2008 Asian Cycling Championships|Team sprint]]}} {{MedalSilver|[[2012 Asian Cycling Championships|2012 Kuala Lumpur]]|Sprint}} {{MedalSilver|2012 Kuala Lumpur|Keirin}} {{MedalSilver|2014 Astana|Keirin}} {{MedalSilver|2015 Nakhon Ratchasima|Sprint}} {{MedalSilver|[[2018 Asian Track Cycling Championships|2018 Nilai]]|Sprint}} {{MedalSilver|2020 Jincheon|Keirin}} {{MedalBronze|[[2011 Asian Cycling Championships|2011 Nakhon Ratchasima]]|Sprint}} {{MedalBronze|2011 Nakhon Ratchasima|Keirin}} {{MedalBronze|[[2016 Asian Cycling Championships|2016 Izu]]|Sprint}} {{MedalBronze|2016 Izu|Keirin}} {{MedalBronze|2018 Nilai|Keirin}} {{MedalBronze|2019 Jakarta|Team sprint}} {{MedalCompetition|[[Cycling at the Commonwealth Games|Commonwealth Games]]}} {{MedalBronze|[[2010 Commonwealth Games|2010 New Delhi]]|[[Cycling at the 2010 Commonwealth Games – Men's team sprint|Team sprint]]}} {{MedalBronze|[[2014 Commonwealth Games|2014 Glasgow]]|[[Cycling at the 2014 Commonwealth Games – Men's keirin|Keirin]]}} {{MedalCompetition|[[Southeast Asian Games]]}} {{MedalGold|[[2017 Southeast Asian Games|2017 Kuala Lumpur]]|[[Cycling at the 2017 Southeast Asian Games|Sprint]]}} {{MedalGold|2017 Kuala Lumpur|[[Cycling at the 2017 Southeast Asian Games|Keirin]]}} {{MedalGold|[[2007 Southeast Asian Games|2007 Nakhon Ratchasima]]|[[Cycling at the 2007 Southeast Asian Games|Team sprint]]}} {{MedalSilver|2007 Nakhon Ratchasima|[[Cycling at the 2007 Southeast Asian Games|1 km time trial]]}} {{MedalSilver|2007 Nakhon Ratchasima|[[Cycling at the 2007 Southeast Asian Games|Sprint]]}} }}[[Fail:UCI Track World Championships 2018 011.jpg|thumb|Azizulhasni Awang pada 2018]] Dato' '''Muhammmad Azizulhasni Awang Bin Awang''' DPMT KMN AMN (penenakan 5 januari 1988) iyo no dangan pelumba biskal trek profesional [[Malaysia]]. iyo tekilo lapas manang kejuraan lumba biskal dunia ta' Melbourne Australia diom tahun januari 2009 mokok pingat amas acara keirin ko' pecut 200m kejohanan Trek Asia April 2008. Iyo no boi sino' mo bendira kebangsaan Malaysian ta' Sukan Olimpik Beijing 2008. Iyo binuanan gelaran the poketroketman kerna tubuh badan ni diki. Iyo tu merupakan pelumba ngeduduk ranking enjata ta' dunia bagi acara keirin. iyo tu pan tekilo moko' sikap ni nyiak ngaku kalah apabila iyo narus kayuhan ni ensan betis ni tetojok kayu langkau ni 20cm. Sekelon acara keirin diom Siri Piala Dunia Klasik UCI (International Cycle Union) ta' Manchester,England Februari 2011.Iyo berjaya ngebisan perlumbaan ni ta' tempat numbur telu. ==Keluman Awal== Azizulhasni Awang boi penenekan 5 januari 1988 ta' Dungun,terengganu, ko' iyo tu nak kewau' lua' siam dik-berdik, Iyo nerimo pendidikan tena' ta' Sekul Kebangsaan Batu 48 ta' dungun, ko' narus pelajaran menegah ta' Sekul Menengah Sultan Omar Dungun, sebelum ni pindah posok Sekul Sukan Negara ta' Bukit Jalil. Iyo ngelanjut pelajaran ni tak Universiti Deakin,Australia diom Sarjana Muda Perdagangan, Pengkhususan diom ngurus sukan. == Tungan metelak == {{Reflist}} ggruxvef2qfu9bo8pp53uigqgn56gs1 Aznil Nawawi 0 414 4801 4513 2024-08-19T17:44:16Z Umboh Tuhan 194 + Tungan metelak 4801 wikitext text/x-wiki '''Datuk Aznil bin Haji Nawawi''' (penenakan 6 November 1962), lebi tekilo ko' penggilan Pak Nil. Iyo tu dangan pengecara, pelakun, pengara, pelego', penghibur ko' ngeyampai redio ta' Malaysia. Iyo boi mediam bidang pengacaraan tu lebih dari 26 taun. Iyo tu dangan ngentan Ijazah Sarjana Muda Ekonomi lua' [[Universiti Malaya]]. Iyo boi mula kerejoon siaran ni diom taun 1990 jadi meteko abar ko wartawan ta' rangkaian televisyen swasta Malaysia, TV3. Masa ni engko' TV3, antara ransangan boi ni urus le' ni iyo no Buletin Utama (jadi dangan meteko berita), Melodi ko' Pop Kuiz. Beta taun 1996, iyo ngelancar dikau album bau ni Macam-Macam ta' media' Syarikat rakaman Pony Conyon. Diom kerejoon lakunan ni, iyo boi ngebintang dangai kredit filem dokon Sama Tak Serup (1995), Aku No.1 (2004), Cicak-Man (2006) ko' Magika(2010). Iyo nianugera moko' gelaran kehormat Datuk oleh Yang Di-Pertuan Agong sempena Hari Wilayah Persekutuan taun 1 Februari 2013. Diom kerjayanya mediam bidang penyiaraan. Iyo ai kule' iko anugera ko' peenghargaan posok no Anugerah Bintang Popular Berita Harian bagi Pengacara TV Dela popular ko' iko lagi boi kule' ni diom selangkau kerejoon ni. Meluar bidang seni, Aznil pan nuut diom iko asara amal,Kempen ko' aktiviti kebajikan iyo no Kempen Jom Ganyang Aedes anjuran Kementerian Kesihatan Malaysia. Aznil boi nilantik jadi dangan Duta Perpaduan bersomo [[Siti Nurhaliza|Dato' Sri Siti Nurhaliza]] le' Yayasan Budi Penyayang Malaysia, Duta sihat 1Malaysia, ko' Ikon cinta Malaysia le' Lembaga Hasil Dalam Negeri. == Tungan metelak == {{Reflist}} [[Kategori:Jomo lua' Kuala Lumpur]] kz0c1sve1shck22kzzi50attro9p2gw Aznil nawawi 0 415 1267 1266 2024-08-09T09:23:12Z Jon Harald Søby 58 1 semakan diimportkan 1266 wikitext text/x-wiki #REDIRECT [[Aznil Nawawi]] pd2wm6xfaeyd3n0vnk9owaxr8hn4y6j BADI' 0 416 1269 1268 2024-08-09T09:23:12Z Jon Harald Søby 58 1 semakan diimportkan 1268 wikitext text/x-wiki #REDIRECT [[Badi']] 8ad90b84hye0i2a2hh8uwm3x91wxeq3 BELADAW 0 417 1271 1270 2024-08-09T09:23:12Z Jon Harald Søby 58 1 semakan diimportkan 1270 wikitext text/x-wiki #REDIRECT [[Beladaw]] f2age4doz5a7yerpvftreisxfxbvjms Badi' 0 418 4011 1277 2024-08-09T09:39:12Z JhsBot 61 Pywikibot touch edit 4011 wikitext text/x-wiki '''Badi'''' dikaw enggomon Sama untuk binoo kerejo meranau antawa betonomon gulay. Amun benoo meranau badi' tu pengerumput paray antawa sibor. Amun benoo betenomon gulay, badi' tu pinakay pengurik tana' tonom bigi antawa pengerumput. Badi' tu ben moto entekook ni guno penusu' tana'. Amun guuk, pida' engko' beladaw dikaw jo moto ni, badi duo moto ni. Badi' tu lentik kuanan pinakay le' jomo kerejo makay tangan kuanan engko lentik gibang pinakay le' jomo kerejo makay tangan gibang. Badi' tu ben ulu tapi nya ben sarung. ogtgsmuztl0huujesnwwtyzoie95y27 Badu 0 419 4796 4514 2024-08-19T17:32:57Z Umboh Tuhan 194 + Tungan metelak 4796 wikitext text/x-wiki [[Fail:Shirt, men's (AM 2015.44.1-1).jpg|thumb|Badu]] '''Badu''' iyono dikau jenis badu yang binuat untuk pengelingkap badan. Badu ginunoh oleh mimon [[jomo]]. Badu ben duo jenis lengan, un langkau un pendok. Un pan badu nyaun lengan ni. == Tungan metelak == {{Reflist}} m62xzq5plw2qz5826td2pd4ovy5dsur Badu baju sama 0 420 4012 1285 2024-08-09T09:39:13Z JhsBot 61 Pywikibot touch edit 4012 wikitext text/x-wiki '''Badu bajau sama''' ngeruo [[pekaian]] tradisional [[bajau sama]]. dendo makai badu sampit ngko olos berangkit. periasan kelong mandapun ngko periasan tikok sarempak yang serupo ngko tanduk kerabau. 55ymz3oigm9860sckaecvzsgrvq5opd Badu selangur 0 421 4013 1288 2024-08-09T09:39:13Z JhsBot 61 Pywikibot touch edit 4013 wikitext text/x-wiki '''Badu selangur''' badu tradisional pinakai oleh dela melayu ta’ [[Malaysia]], [[Brunei]], [[Singapura]], kok iko lagi negara. Badu Selangur tu ben duo bentuk sama ada lengan pendok kok lengan langkau. Keduo-duo bentuk badu tu ter diri badu kok seluar 8e0m8sthfv4bl92sorigo16axw5d73x Bakas 0 422 4515 4014 2024-08-12T10:26:46Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q58697]] 4515 wikitext text/x-wiki [[Fail:Wikiearth-Babi Hutan Taman Nasional Tanjung Puting.jpg|thumb|387x387px| '''''Ogok Bakas''''']] '''Baka'''s iyono [[ogok]] to' yang pinelioro. Asal ni lekat diam taun yang kikon ni ta' [[Eropah]] Tengah, Medirranen ( teposok Banjaran Atlas Afrika Utara), engko' kikon ni ta' kewasan [[Asia]] ngabut Indonesia ta' selatan. Bakas pan ai bino posok ta' iko tempat. Bakas posok ta' dinakan Suidae yang somo kok ''Warthog'' kok ''Bushpig'' ta Afrika, ''Pyhmy Hog'' ta' India utara kok Ogok Payau ta' Indonesia. == Tungan Metelak == # https://books.google.com.my/books?id=zg2NDAAAQBAJ&pg=PA94&dq=babi+hutan+%22Sus+scrofa%22&hl=en&sa=X&ved=0ahUKEwj5uL7G8ujXAhULJ5QKHUKLCNYQ6AEILzAB#v=onepage&q=babi%20hutan%20%22Sus%20scrofa%22&f=false rqt4t5rqtvz93eyrqjjum7yq1cux92d Baluk 0 423 4015 1306 2024-08-09T09:39:14Z JhsBot 61 Pywikibot touch edit 4015 wikitext text/x-wiki Baluk ma'na ni pesurang. 35ifzx5g62xz1tg7prj7oztllepfkmo Bambangan 0 424 4516 4016 2024-08-12T10:26:48Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q5458544]] 4516 wikitext text/x-wiki '''Bambangan''' iyo noh sejenis buah-buahan. Bambangan antara makanan yang sukup terkenal ta’ [[Sabah]]. Buah tu buli binuat jaruk atau pan tekilo sebagai jaruk bambangan yang binuat lua isi ngabut bigi ni. Selain a’ bambangan pan buli pinapi untuk jadi gulai peluk mangan. Isi ni nindo lepas a’ tinumis makai ding masin engko bawang oyo lepas a’ buli nina’ lodo amun ingin ngangah. Menurut kajian, buah bambangan tu cuma tomoh tak tertentu jo. Oleh sebab itu noh buah tu jadi perhatian oleh bangan pelancong yang teko pitu Sabah sebab buah tu sukup tekilo jomo ta’ laat Sabah. 6oouejztpmpe07qs13m4qbwaqkp9e99 Bangku 0 425 4517 1321 2024-08-12T10:26:50Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q204776]] 4517 wikitext text/x-wiki [[Fail:Garden bench 001.jpg|thumb|Bangku]] '''Bangku''' iyonoh [[perabut]] ginuno oleh jomo tungan ningko. Iyo ben tungan pesandar. Bangku tu pan ben empat betis untuk nangga tungan ningko enjata dasar. fazbsc0oqs4od5rxpyi5qdtl9vybefh Bangkung 0 426 4017 1324 2024-08-09T09:39:16Z JhsBot 61 Pywikibot touch edit 4017 wikitext text/x-wiki Bangkung iyono kayu oyo pemalu musu antawa binatang rengot dokon soo, buli pan pemalu uwa' antawa kuya' rangit. r7zdsh1fl2bkkvud5bv02ogjlb9yvh7 Bangso penioto 0 427 4018 1327 2024-08-09T09:39:17Z JhsBot 61 Pywikibot touch edit 4018 wikitext text/x-wiki Bangso penioto iyono bangso benuat ulun, benuat oto. lcyhpqv54yphqicphuz96jlvol4sywk Basing 0 428 4518 4019 2024-08-12T10:26:53Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q9482]] 4518 wikitext text/x-wiki [[Fail:Sciurus carolinensis.jpg|thumb|Basing]] '''Basing''' iyono' bedinakan engko' sepisis pinau ''[[Sciuridae]]'', dembua' denakan yang teposok rodensia sais ni diki atau pan sedong. Denakan basing tu teposok basing poon, basing tana' kok basing lemiang. Basing bana ta' Amerika, Eurasia kok Afrika pinekilo ole' jomo ta' Australia. 9e3fyzvb2swlpbr34th167zyorx1l1k Batung 0 429 4789 4519 2024-08-19T17:29:51Z Umboh Tuhan 194 + Tungan metelak 4789 wikitext text/x-wiki [[Fail:Painted Pony Bean.JPG|thumb|Batung]] '''Batung''' iyo no [[gulay]] ko' bentuk ni langkau. Gulay tu selalu pinapi bagai jinis masakan suntu' ni pinapi bue', [[kunit]] sama ada sinegul gulay batung tu ko’ gulay lain. Reso gulay batung tu mamis-manis ko’ pan gulay batung tu been bigi diki'-diki' mediam ni tapi buli kinakan. == Tungan metelak == {{Reflist}} [[Kategori:Gulay]] h394jm1hfh4ovdwszizfl12qlgsfmm6 Bawang 0 430 4520 1356 2024-08-12T10:26:57Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q23485]] 4520 wikitext text/x-wiki '''Bawang''' iyonoh umbisi poon yang tetonom mediam tanah. Bawang tu ginunoh untuk [[mapi]] mimon jenis masakan. Bawang tu iko [[jenis]] antara ni , bawang puteh, bawang darak ko' bawang darag. <ref>https://ms.m.wikipedia.org/wiki/Bawang</ref> == Tungan Metelak == {{Reflist}} p5vr0opznxq9b406hger0pybpn7viqi Bedaan 0 431 4020 1359 2024-08-09T09:39:19Z JhsBot 61 Pywikibot touch edit 4020 wikitext text/x-wiki Bedaan ma'na ni beranti sekajap. 0ec7fdd18y82nzsrb1dcf6xtnyh1x57 Bedesto' 0 432 4021 1362 2024-08-09T09:39:19Z JhsBot 61 Pywikibot touch edit 4021 wikitext text/x-wiki Bedesto' ma'na ni ngarang antawa ngakal. h2udsxwrs2wcyi0026bb9elrxv3xv5a Bekelekakan 0 433 4022 1365 2024-08-09T09:39:20Z JhsBot 61 Pywikibot touch edit 4022 wikitext text/x-wiki Bekelekakan iyono titoo ramai-ramai. 76pn7reg30vfrarvy7867ezq51578qx Beladaw 0 434 4023 1370 2024-08-09T09:39:20Z JhsBot 61 Pywikibot touch edit 4023 wikitext text/x-wiki '''Beladaw''' tu dikaw enggomon Sama binuat makay besi, ben ulu, ben sarung engko' bila pinakay tinangkin ta pangkat makay tali. Beladaw tu selalu ni ginuno pemebua' daging, pemebua' diing bagal atau binuat enggomon peranak, pasal amun peranak makay pida' langkaw bana. Beladaw tu pan selalu penganit babamban antawa buay. Pasal yo diki' beladaw tu kegunoon ni diam kawasan ruma' jo pasal nya' dangay engam binoo lumaan petio. afcsqjiaaod3xiyvnv3i5nf8sy368rw Belagu 0 435 4771 4521 2024-08-19T17:08:22Z Umboh Tuhan 194 + Tungan metelak 4771 wikitext text/x-wiki '''Belagu''' iyo noh dikau perbuatan melua soro untuk ngasil nada engko pan melodi yang tujuan ni mesanang atai. Jomo yang belagu buli makai pekakasan mujik dediri atau pan un cara ni dediri sebab belagu tu un kreativiti ni dediri. Jomo yang belagu pinau penyanyi. == Tungan metelak == {{Reflist}} 1906bu3vzjuddfo3y3y266alu68iu36 Belangkit 0 436 4024 1376 2024-08-09T09:39:21Z JhsBot 61 Pywikibot touch edit 4024 wikitext text/x-wiki Belangkit tu iyono olos binuat kambul. pgslzqfc6qgjupd096a1t2ce3dm3nhz Belilik 0 437 4799 4522 2024-08-19T17:39:45Z Umboh Tuhan 194 /* Tungan Metelak */ 4799 wikitext text/x-wiki [[Fail:Chamaeleonidae-01.jpg|thumb|Lua' gibang :''Chamaeleo chamaeleon'', ''Calumma parsonii'', ''Chamaeleo namaquensis'', ''Trioceros jacksonii'', ''Furcifer pardalis'' and ''Brookesia micra'']] '''Belilik''' iyono sejinis [[reptilia]] mediam dinakan '''Chamaeleonidae''' yang tekilo kok kebulian ni buli nukar-nukar rena badan nut ta' tempat, un 202 sepisis dinakan ni yang terati ngabut Jun 2015. Sesok-sesok mediam dinakan ni tu iko jinis belemparan lekat ta' gurun mu' benua [[Afrika]], [[Madagaskar]], selatan [[Eropah]] ngabut pu' ta' [[Sri Lanka]] ta' selatan [[Asia]]. == Tungan metelak == {{Reflist}} # https://w.wiki/A97k a1jbgdaj2xw42pe6yqx3id3kh9atkts Belintang 0 438 4026 1397 2024-08-09T09:39:22Z JhsBot 61 Pywikibot touch edit 4026 wikitext text/x-wiki '''Belintang''' ma'na ni anak [[suang]]. pbr99lo9dx5iede320r0erq2aj3xqth Beluang 0 439 4523 1402 2024-08-12T10:27:04Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q36794]] 4523 wikitext text/x-wiki [[Fail:P1210063_Paris_III_rue_des_Francs-Bourgeois_n26_rwk.jpg|250px|thumb|Beluang]] '''Beluang''' tu dikau benda keros ko’ rata. Beluang tu buli binuka ko’ tinutup endo buli posok pelua bilik atau engo-engo ruangan. Beluang tu un ta’ [[ruma]] atau ta’ [[bangunan]]. Beluang pan un ta’ kerita atau ta perabut-perabut masam almari. Beluang tu pan buli kinunsi untuk keselamatan, kinunsi untuk nagu barang penting conto ni emas atau sin ko’ barang-barang lain yang penting. lxx4ljs2gm9is7e3ei2j6jxluwfuqtb Belud 0 440 4524 1407 2024-08-12T10:27:06Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q8502]] 4524 wikitext text/x-wiki [[Fail:Himalayas, Ama Dablam, Nepal.jpg|thumb|Belud Himalaya]] '''Belud''' iyo no kawasan [[tanah]] yang lebih langah diam persikitaran ti. 63ed1a3z7yd15kyfl5gztvqe7wisk0a Belud Nibaau 0 441 4525 1412 2024-08-12T10:27:08Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q60967]] 4525 wikitext text/x-wiki [[Fail:Gunung Kinabalu Sabah.jpg|thumb|Belud Nibaau]] '''Belud Nibaau''' iyono Gunung Kinabalu. 3nvf1y3oj9wuxbjibwpp0qo7zmewmot Beragam 0 442 1414 1413 2024-08-09T09:23:27Z Jon Harald Søby 58 1 semakan diimportkan 1413 wikitext text/x-wiki Eyo no perbuatan binuat jadi suasana jadi ko' sanang atai engko' nia' mekong. nibav5g5p5y9j1wybtunpqo2p64z1xi Beramu 0 443 4027 1417 2024-08-09T09:39:25Z JhsBot 61 Pywikibot touch edit 4027 wikitext text/x-wiki Beramu iyono boi nemu dokon toos, makanan, barang antawa pekakas. s9iuqgu69mu15qcrt2when0xzi40pl1 Beringkat ringkat 0 444 4028 1420 2024-08-09T09:39:25Z JhsBot 61 Pywikibot touch edit 4028 wikitext text/x-wiki Beringkat ringkat ma'na ni betingkat tingkat. 9ewctvltkq3ogzwgk8p09gampcoev97 Berja' 0 445 4029 1423 2024-08-09T09:39:26Z JhsBot 61 Pywikibot touch edit 4029 wikitext text/x-wiki Berja' ma'na ni nyaun manang, seri, sekeloon tapi nia' abis. n2qaswefc5syewqv70tplyzo19edjf7 Beruntung 0 446 4526 1429 2024-08-12T10:27:10Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1052]] 4526 wikitext text/x-wiki [[Fail:A rainbow at sunset after rain in Gaziantep, Turkey.IMG 2448.jpg|250px|thumb|Beruntung]] '''Beruntung''' iyono ''pelangi'' am ta' [[ling Melayu]]. 2x0543c72u6n1v3taivm0tdpatl7gla Beserita 0 447 1431 1430 2024-08-09T09:23:29Z Jon Harald Søby 58 1 semakan diimportkan 1430 wikitext text/x-wiki Eyo no perbuatan betutur ko' jomo atau pan pinau interaksi kok jomo. Beserita tu jadi amun kiti betutur kok jomo endangan atau lebih, asal ni nia' betutur dendangan. 1hltczw49aseemrnnyufrth4def0g7h Betunggaan 0 448 4030 1434 2024-08-09T09:39:27Z JhsBot 61 Pywikibot touch edit 4030 wikitext text/x-wiki Betunggaan iyono setemu duangan, diam keadaan 50-50 penyerang kok kipa am main bul, duangan jomo sasa'. 2eju7gr0eg8ghr0mbm758hk1xbjufpu Biabas 0 449 4682 4527 2024-08-19T15:55:56Z Umboh Tuhan 194 /* Tungan metelak */ 4682 wikitext text/x-wiki [[Fail:Psidium guajava, deursnit van vrug, Pretoria, a.jpg|thumb|Biabas]] [[Fail:Guava leaves sunlight.jpg|thumb|Biabas]] '''Biabas''' ([[Ling Melayu]]: [[:w:ms:Jambu Batu|Jambu batu]]; ''Psidium guajava Linn'') tu bioso ni, iko tetemu ti tenonom ta' laman ruma' jomo sama. Jaman dau Biabas tu, saiz bua' ni bedikian ko karas. Tapi, jaman betiru, bua' Biabas bersaiz bagal ko nia' karos.<ref>[http://animhosnan.blogspot.com/2019/09/chong-penanam-jambu-batu-komersil.html?m=1 CHONG - PENANAM JAMBU BATU KOMERSIL] ''Anim Agro Technology''</ref> ==Guno== Iko guno poon Biabas. 1. Duun mura' guno ni untuk tuas andang-andang 2. Bua' Biabas mana bule binuat minuman bua'. ==Kesimpulan== Poon Biabas tu iko tenonom ta' kampung jomo sama. ==Ninda' pan== *[[Bua' Biabas]] *[[Bua-buaan kampung]] ==Tungan metelak== {{Reflist}} q5f18ewx8ymrb6efo0bigwn1ni1q589 Biduk 0 450 4672 4528 2024-08-19T14:17:32Z Umboh Tuhan 194 + Tungan metelak 4672 wikitext text/x-wiki [[Fail:YosriPerahu.jpg|thumb|right|230px|Biduk]] '''Biduk''' tu dikaw barang kegunoon jomo Sama benoo ngendokop diing. Biduk tu pan pinakay le' [[Sama]] moo barang entawa benoo ngeta suang entawa selang. Biduk tu selalu binuat makay kayu binuang. Batang kayu e tinara, kinurik makay kapak engko beliung sampai jadi dikaw biduk. Biduk tu uun pan binuat makay papan, pinaku' ta disk bo' nempol selang an papan e makay tendese. Daau-daau biduk Sama tu makay injin sigol ntawa makay lamak. Biduk tu pinesangan katig endo nya buwau. Jomo Sama ngendo' diing makay biduk ben katig engko lamak tu nironon usik. Gaai ngendo' diing diam telu batu jo. == Tungan metelak == {{Reflist}} qy2lyemjqibyw18bdknuozocaqhmnub Big 0 451 4529 1467 2024-08-12T10:27:17Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1323314]] 4529 wikitext text/x-wiki [[Fail:Nordic Climate Solutions 2009-09-09.jpg|250px|thumb|Big]] '''Big''' iyo noh [[tungan]] ngena barang-barang. Big pan guno ni untuk moh bangan [[barang]]. Big binuat makai olos, plastik engko pan [[keratas]]. jby55m1s60mdz8oi9ucasimmavx98w6 Bilang-bilang 0 452 4031 1470 2024-08-09T09:39:28Z JhsBot 61 Pywikibot touch edit 4031 wikitext text/x-wiki Bilang-bilang iyono ungus langa sedi selang. kntzwzpiw9hqi9l067p1lljeddl4lp2 Binangkung 0 453 4032 1473 2024-08-09T09:39:29Z JhsBot 61 Pywikibot touch edit 4032 wikitext text/x-wiki Binangkung iyono jomo ai penalu. gz0jdt694pon3trjtqbjdud6mgdzitf Binuat masau 0 454 4033 1476 2024-08-09T09:39:29Z JhsBot 61 Pywikibot touch edit 4033 wikitext text/x-wiki Binuat masau ma'na ni peneregaman, binuat regaman, niolok olok. sapfrzn7ipp68whxi5q3kh75bnj8ll1 Biula 0 455 4530 1483 2024-08-12T10:27:19Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q8355]] 4530 wikitext text/x-wiki [[Fail:Violin VL100.png|200px|thumb|Biula]] '''Biula''' tu dikaw barang kuri-kurian Sama. Biula tu dokon [[gitar]] tapi tali ni telu jo engko' le' meling ni keneet makay pengeet Biula. Badan biula tu binuat makay kayu, tali ni makay koot stil antawa tangsi. Tali pengeet ni binuat makay mayang [[suka']] boi nianit. Biula tu keneet diam keramaian balas pantun antawa keneet mesanang atay umpama keeten Anak Kuda Ragam 2eywy7vyr58nke87odjps0j3wyv6q8n Bola tampar 0 456 1485 1484 2024-08-09T09:23:35Z Jon Harald Søby 58 1 semakan diimportkan 1484 wikitext text/x-wiki #REDIRECT [[Bul tampar]] gwnho1zviy3rwj4h77s3fxyuf68bv11 Boyo' 0 457 4531 1490 2024-08-12T10:27:22Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q25363]] 4531 wikitext text/x-wiki [[Fail:Crocodilia collage2.jpg|250px|thumb|Boyo']] '''Boyo'''' iyono rumpun [[reptilia]] pemangsa bagal separa akuatik yang teposok diam order '''Crocodilia''' ( atau pan Crocodilia). 6hsmz2chxgybnvieibwokkj00ex89p7 Bu tikok 0 458 4034 1492 2024-08-09T09:39:31Z JhsBot 61 Pywikibot touch edit 4034 wikitext text/x-wiki Bu tikok iyono angguta badan yang ben enjata tikok. Bu tikok jomo nyiak somo werna ni, un bu tikok ni werna irom un werna suklat utama ni yang temban ta' Barat. fb8j0xu6q9rrgau28ftpqb1qe3ddfcf Bua' 0 459 4532 1497 2024-08-12T10:27:24Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q9635]] 4532 wikitext text/x-wiki [[Fail:Mouth.jpg|thumb|Bua']] '''Bua'''’ sebuo ovari boi datai somo-somo ko’ bigi ni luak sebuo pon berbungo. Hasil bua’ tu buli kinakan begea jo amun ai no datai. jjl2yde6ov82bzlw8h1ixzyug1ajzrc Buah tungkul 0 460 4035 1500 2024-08-09T09:39:31Z JhsBot 61 Pywikibot touch edit 4035 wikitext text/x-wiki Buah tungkul tu io buah lekat ta" pon saging kok iyo tu ngerati penapi binuat gulai , Amun ta jomo bajau tungkul tu tumi jo cara lek gai mapi . 2ywlq5xbq1jjcg1jdbaou6f4v19dtdu Buar-buar 0 461 4036 1503 2024-08-09T09:39:32Z JhsBot 61 Pywikibot touch edit 4036 wikitext text/x-wiki Buar-buar ma'na ni membajir. dqxq6efu8dmx4rwyuwrxi1m599xcsi0 Buas 0 462 4533 1509 2024-08-12T10:27:26Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q5090]] 4533 wikitext text/x-wiki [[Fail:JasmineRice.jpg|250px|thumb|Buas]] '''Buas''' iyo no boi benuat luak tak [[parai]] ko ni proses teniman kulit ni.buas pan akan ngembang apabila iyo penapi.. ==Ninda' pan== *[[Buas datay]] jy9hd5d0gy93guz4f2mph5dpwjg8a9q Buas Guring Pattaya 0 463 4037 1517 2024-08-09T09:39:33Z JhsBot 61 Pywikibot touch edit 4037 wikitext text/x-wiki '''Buas guring pattaya''' atau pan pinau nasi pattaya, iyo noh hidangan buas guring mitu [[Asia Tenggara]]. Buas ginuring tu tina tup atau binungkus makai telo guring yang nipis atau pan pinau sebagai telo dadar. Buas tu pan bioso ni nihidang makai sos engko pan timun. Sebana ni buas ni pinau asal ni lua oron bandar [[Pattaya]] muh [[Thailand]]. Tapi makanan tu sebana ni asal lua melaat mitu Malaysia. Betiru Buas guring pattaya tu rojo tekilo melaat jomo dokon muh Singapura. hrooy72deec4v2p4nlavf33ppnocb3p Buas datay 0 464 4534 1524 2024-08-12T10:27:29Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q523224]] 4534 wikitext text/x-wiki [[Fail:Meshi_001.jpg|250px|thumb|Buas datay]] '''Buas Datai''' tu buas matak boi ni rebus. Buas matak tu amun piniko [[buek]] ni akan jadi bubur. Kebiosoon ni iko jomo betiru mapi buas makai lanjang karan. ==Ninda' pan== *[[Buas]] ando9i8kfymbs74gle3vwq64iv9t08l Buas luun 0 465 4038 1527 2024-08-09T09:39:34Z JhsBot 61 Pywikibot touch edit 4038 wikitext text/x-wiki Buas luun iyono buas beta penesimpon. almd5s739udaikhwkqow1dd9tms2gr6 Buau 0 466 4039 1529 2024-08-09T09:39:34Z JhsBot 61 Pywikibot touch edit 4039 wikitext text/x-wiki Buau tu maksud ni biduk ai labu mediam selang, kadang biduk ae buli sinelamat atau niak buli sinelamat kerna kikon biduk buau tu niak ngerati sinelamat. Punsa biduk tu buau kikon ni biduk ae ben lubang ae no pasal ni buek selang ae posok diam biduk jadi biduk ae kebuatan ae no pasal ni posok diam selang. 6aow51ty09nx5pdwy5bh2t8e7br20zq Bubur buas 0 467 4535 1535 2024-08-12T10:27:31Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q186817]] 4535 wikitext text/x-wiki [[Fail:Oatmealraisins2.jpg|200px|thumb|Bubur buas]] '''Bubur buas''' eyo [[sejenis buas]]<nowiki/>boi nilanggang ,bubur buas tu pan salah satu makanan terkenal . pbb8ls0z85yvuh6cxgujeiw7f2j3nai Bue' Ngeloro 0 468 4040 1538 2024-08-09T09:39:35Z JhsBot 61 Pywikibot touch edit 4040 wikitext text/x-wiki Bue' Ngeloro iyono bue' niah dangai panas. 3yz34hweshg22bz9elr14irq55ewjz3 Bue' Sembiang 0 469 4041 1540 2024-08-09T09:39:36Z JhsBot 61 Pywikibot touch edit 4041 wikitext text/x-wiki Bue' sembiang iyono dikau sara untuk mersihksn diri lekat ta' hadas diki. Amun diom keadaan derurat, bue' sembiang buli ginentian kok tayammum. ( Ngendo bue' sembiang makai abuk yang susi). Reti bue' sembiang diom syarak iyono ngusek antawa napi angguta yang boi tinantu yang terua mula makai niat. 9igsfh4lf0phi6rw1a98pfc0b021mq8 Bue' ruru 0 470 4536 1544 2024-08-12T10:27:33Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q34038]] 4536 wikitext text/x-wiki [[Fail:Carson Fall Mt Kinabalu.jpg|thumb|Bue' ruru]] '''Bue' ruru''' iono bue' tungan jomo bermandi-manda engkoh tumgan piknik. 1lhak6em1xefi5y49tm5s9og96v5ea4 Buk 0 471 4537 1549 2024-08-12T10:27:35Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q571]] 4537 wikitext text/x-wiki [[Fail:Book4543543543.jpg|thumb|Buk]] '''Buk''' iyo sejenis [[keratas]] boi tinulis un pan buk tu ben gambar sedio. pr0awk1s11lo7hbzqtvr1bmucdk2770 Bul 0 472 4538 1556 2024-08-12T10:27:38Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q18545]] 4538 wikitext text/x-wiki [[Fail:Blue-sphere.png|200px|thumb|Bul]] '''Bul''' ([[Ling Melayu]]: '''Bola''') iyo dembua [[barang]] pinakai untuk besukan mlk9vubwqyl3ylzre6umrgraw1d9mb2 Bul tampar 0 473 4539 1562 2024-08-12T10:27:40Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1734]] 4539 wikitext text/x-wiki [[Fail:Volleyball (indoor) pictogram.svg|200px|thumb|Bul tampar]] '''Bul tampar''' tu iyo no dikau sukan [[olimpik]] enngo duo pesukan pinisah le' dikau jaring langga. Makai tangan kok bahagian badan lain untuk malu kok nampar [[bul]]. Dikau pesukan 6 urang diom ni, gai buli malu bul mentelu jo. Moto kiniro masa bul labu ta' gelanggang pasukan nilonon 5xqjo7hbfjdwefq63uvns9haq159vng Bulau 0 474 4042 1566 2024-08-09T09:39:38Z JhsBot 61 Pywikibot touch edit 4042 wikitext text/x-wiki '''Bulau''' iyono [[moto]] [[jomo]] teraat dembila' antawa keduo-duo ni. ewxg6inlqmxjjmsun7qv5zcb46ugetg Bung Moktar 0 475 4695 4627 2024-08-19T16:21:07Z Umboh Tuhan 194 + Tungan metelak 4695 wikitext text/x-wiki {{Infobox officeholder | honorific-prefix = [[Malay titles#Honorary styles|Yang Berhormat]] [[Malay titles#Dato' Sri|Datuk Seri Panglima]] | name = Bung Moktar Bin Radin | honorific-suffix = {{post-nominals|country=MYS|size=100|SPDK|SSAP|PGDK|ASDK|ADK|MP|MLA (Sabah)}} | image = | caption = | birth_name = Bung Moktar bin Radin | native_name = {{lang|ms|{{Script|Arab|بوڠ مختار رضين}}}} | birth_date = {{birth date and age|1958|09|14|df=y}} | birth_place = Kampung Bilit, Sukau, [[Kinabatangan]], [[Sandakan Division|Sandakan]], [[Crown Colony of North Borneo]] (now [[Sabah]], [[Malaysia]]) | residence = | death_place = | office4 = Ministerial roles (Sabah) | subterm4 = 2020–2023 | suboffice4 = Deputy Chief Minister | subterm5 = 2020–2023 | suboffice5 = Minister of Works | office8 = Faction represented in [[Dewan Rakyat]] | subterm8 = 1999– | suboffice8 = [[Barisan Nasional]] | office10 = Faction represented in [[Sabah State Legislative Assembly]] | subterm10 = 2020– | suboffice10 = [[Barisan Nasional]] | office12 = Other roles | subterm12 = 2013–2018 | suboffice12 = Chairman of [[FELCRA Berhad|FELCRA]] | citizenship = [[Malaysian people|Malaysian]] | party = [[United Sabah National Organisation]] (USNO) {{small|(1980-1990)}}<br />[[United Malays National Organisation]] (UMNO) {{small|(since 1990)}}<br />[[Gabungan Rakyat Sabah | Gabungan Rakyat Sabah (GRS)]] {{small|(2022-2023)}} | otherparty = [[Barisan Nasional]] (BN) {{small|(since 1990)}}<br />[[Perikatan Nasional]] (PN) {{small|(aligned: 2020-2022)}} <br />[[Muafakat Nasional]] (MN) {{small|(aligned: 2019-2022)}}<br/>[[Pakatan Harapan]] (PH) {{small|(aligned: since 2022)}}<br />[[Gabungan Rakyat Sabah | Gabungan Rakyat Sabah (GRS)]] {{small|(official coalition)}} {{small|(aligned: 2022-2023)}} | occupation = Politician, lawyer | majority = | relations = | spouse = [[Malay titles|Datin Seri Panglima]] Nor Asidah Alimudin<br /> [[Malay titles|Datin Sri]] Zizie Ezette (m. 2009) | children = | website = | footnotes = }} '''Datuk Seri Panglima Bung Moktar bin Radin''' (Penenakan 15 September 1959) iyo no dangan ahli politik ta' [[Malaysia]] yang boi ngentan jawatan jadi Timbalan Menteri Sabah ngerakap Menteri Kerja Raya Sabah lua' 29 September 2020 sampai 11 Januari 2023.Iyo tu dangan bagas ahli Pertubuhan Kebangsaan Sabah Bersatu (USNO) lua' taun 1980 sampai taun1990.Iyo boi berkhidmat jadi dangan Ahli Parlimen Kinabatangan,Sandakan lua' November 1999 ko' jadi Anggota Dewan Undangan Negeri Sabah (DUN)  lua' September 2020.Iyo tu Anggota Pertubuhan Kebangsaan Melayu Bersatu (UMNO). Iyo no parti komponen gabungan Barisan Nasional (BN) lua' taun 1991.Iyo jadi Timbalan Ketua Menteri Sabah Ko' ngejawat jawatan Menteri Kerja Raya Sabah (JKR Sabah) Lapas gabungan tempatan yang resmi, Gabungan Rakyat Sabah (GRS) manang diom Pilihan Raya Negeri Sabah 2020 ko' sesara resmi ni iyo tinarik jawatan diom Februari 2023 lapas boi nuba' melabu' Kerajaan Sabah pimpinan GRS (Jawatan ni terua ganti le' Shahelmey Yahya). == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] tvckm6ndk72wtutsygenfwmauhf45r0 Bungau 0 476 4044 1585 2024-08-09T09:39:39Z JhsBot 61 Pywikibot touch edit 4044 wikitext text/x-wiki Bungau ma'na ni budu antawa palui. c1ejmdvihfa800iruj6dk7f1bx1ws2r Bungkas 0 477 4045 1588 2024-08-09T09:39:39Z JhsBot 61 Pywikibot touch edit 4045 wikitext text/x-wiki Bungkas iyono bangkar ai larak kok parak. 37r5athubrnlp0uasrw8vbs1yxz2wze Bungo motoelau 0 478 4540 1614 2024-08-12T10:27:42Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q171497]] 4540 wikitext text/x-wiki [[Fail:Pokok Bunga Matahari.jpg|thumb|Poon Bungo Motoelau]] '''Bungo Motoelau''' atau oron saintifik ni ''Helianthus annuus'' lekat ta' keluarga Compositae. Eko jinis Bungo Motoelau tu tenonom ta' [[Malaysia]] ko bioso ni tenonom ta' sedi ruma' untuk perhiasan. Ta' laat meluar, Bungo Motoelau tu tenonom untuk sumber pendapatan ko sumber ekonomi. Bungo Motoelau tu bule jadi sumber makanan ko lain-lain. Ta' laat [[eropah]], Bungo Motoelau tu terua' proses untuk ngendo' enselan gulai ni ko jadi sumber pendapatan laat. Kiti semimon boi kereso mangan kuasi. Sebanani kuasi a binuat lekat ta' bigi Bungo Motoelau. Bungo Motoelau tu pan iko guno ni ta' diom bidang kesihatan. Bungo Motoelau tu begen kandungan [[bitamin C]] ko [[bitamin E]]. Perbezaan jinis-jinis Bungo Motoelau tu bule tenda ti lekat ta' langa poon, warna bungo ko bilangan kelopak bungo ni. Bioso ni, Bungo Motoelau tu bule tomo' ta' kawasan tana' tena', tana' subur, saliran alap, terua' sinaran motoelau yang iko, Ph tana' ni diom lingkungan 6-7 ko paling alap lagi amun makay tana' sampuran anu bengen iko kandungan bahan organik. Bungo Motoelau tu tinonom makay bigi. Bigi Bungo Motoelau tu bule beneli lekat ta' kadai anu mendagang barang-barang pertanian, kadai supermarket ko online. Bigi anu akan tinonom penene' lekat ta' bigi yang alap, nia' run bagas terua penyakit ko serangga. Bigi Bungo Motoelau bule meronok ta' diom pasu atau talam ronokan makay tana' segul 3.2.1. Bigi nena' ta' diom lubang anu lolom ni 3cm. Seniram ko bue' ko nena' ta' dia' motoelau. Tempoh meronok bigi Bungo Motoelau diom demingu. Anak poon Bungo Motoelau bule nu peninda tarus ta' jata' batas tonomon atau ta' pasu oyo. Tana' diom pasu mesti makay tana' segul 3.2.1. Amun tonom ta' jata batas, jarak tonomon mesti ni 45cm. Bungo Motoelau tu seniram menduo dembangi, dembila' sensaung entedo ko dembila' kemuap entedo. Amun Bungo Motoelau langa bana, bule pan penancang. Bungo Motoelau ningkot ta' pansang supaya yo nia' ba' Poon Bungo Motoelau tu generoton bana ule' belalang, giuk ko siput babi. Eko jinis rasun serangga bule penakay ngerasun boron serrangga tu. Rasun serangga anu bioso penakay yo ni ''Malathion''. Bungo Motoelau tu bule benaja makay Baja NPK ( 15:15:15 ) ko' baja organik menduo dembuan. 8sqq77k5v4va0jc59ne10vwhfk1k3m6 Butul 0 479 4541 1618 2024-08-12T10:27:44Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q80228]] 4541 wikitext text/x-wiki '''Butul''' iyono tungan ngena' buek. Butul sebanani binuat lekat ta' kasa, pelestik atau pan lugam kok pan ginuno tungan ngena' sesair masam kok [[buek]], [[susu]], [[bar]], [[anggur]], [[tos]], [[sabun]], dekwat kok sebagaini. Butul lekat ta' pelestik bioso ni binuat lekat ta' pengesilan. Barang yang ginuno untuk nutup butul sinebut penongkop butul. kl045enrrgykoxhdh568kpvp0xh1pb9 Butul buek 0 480 4542 1623 2024-08-12T10:27:46Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q6817227]] 4542 wikitext text/x-wiki [[Fail:Metal Water Bottles.jpeg|200px|thumb|Butul buek]] '''Butul Buek''' sebelum ti luman kerjo sedio ti no [[butul]] bueak tu endo niya no kiti meli bueak meluar. Butul buek oyo ea no ngam bino endo niya no lau lau ngisi. o1d5jg194aw2ys91r8txxnb5vx2by4t Buul 0 481 4046 1626 2024-08-09T09:39:42Z JhsBot 61 Pywikibot touch edit 4046 wikitext text/x-wiki '''Buul''' eyo sejenis objek yang iko guno ni diam permainan engko sukan . Buul tu paling tekilo bangan jomo eyo nironon [[bola sepak.]] 2gz9ornird3scudbls9y3zfum12v9me Cendol 0 482 4543 1630 2024-08-12T10:27:49Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q867426]] 4543 wikitext text/x-wiki '''Cendol''' iyo no penguseh bua sajuk yang binuat engko tepung buas ko' bue' pandan terua' tapis diam bue' engko' terua' segul muat engko' bue' sirap gula lekat jenis (baik enau antau aren, tebu, perang, melaka antau nipah) engko' santan. Iyo tekilo ta' Asia Tenggara diam rantau Nusantara Rangkumi Brunei, Malaysia. Terutama tekilo mea Negeri Johor ko' Pulau Pinang. 6etlupcx9iiwathy0fb22thngj0pso3 Datin Alyah 0 483 1637 1636 2024-08-09T09:23:51Z Jon Harald Søby 58 6 semakan diimportkan 1636 wikitext text/x-wiki Datin Noor Hasliah Abu Hassan (penenakan 3 januari 1981).Iyo tu dangan pelego' dendo Malaysia.Iyo boi mula aktif diom dunia seni lua' 2000 masa umur ni 19 taun,Tapi oron ni boi menik diom taun 2008.Lua' lagu tekilo ni "Tak Mungkin Kerna Sayang" boi binuat le' Ajai ko' Habsah Hassan.Bakat ni boi tekito masa ni boi nuut pertandingan Bintang HMI 2000 boi niajur le' Radio Television Malaysia (RTM) boi terua nobat iyo jadi dangan pemanang. rv38t4x0sj1oj2jjl4cc1v0u4nsps3v Datuk Kamilia binti Dato' Ibrahim 0 484 1639 1638 2024-08-09T09:23:51Z Jon Harald Søby 58 1 semakan diimportkan 1638 wikitext text/x-wiki #REDIRECT [[Kamilia Ibrahim]] btde8wi30dyhiebs9i96km9txmnkwrr Dayah Bakar 0 485 4544 1645 2024-08-12T10:27:51Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q59811693]] 4544 wikitext text/x-wiki {{Infobox person | honorific_prefix = | name = Dayah Bakar | honorific_suffix = | image = | landscape = | alt = | caption = | native_name = | native_name_lang = | pronunciation = | birth_name = Nur Hidayah binti Abu Bakar | birth_date = {{Birth date and age|1989|8|30}} | birth_place = [[Kuala Lumpur]], [[Malaysia]] | baptised = | disappeared_date = | disappeared_place = | disappeared_status = | death_date = | death_place = | death_cause = | body_discovered = | resting_place = | resting_place_coordinates = | burial_place = | burial_coordinates = | monuments = | nationality = | other_names = | siglum = | citizenship = | education = Ijazah Sarjana Muda (Kepujian) Undang-undang<ref>{{Cite web|url=http://www.azhan.co/biodata-dayah-bakar-host-jom-singgah-tv3|title=Biodata Dayah Bakar|publisher=Azhan.com|date=1 Disember 2017}}</ref> | alma_mater = [[Universiti Islam Antarabangsa Malaysia]] | occupation = Pengacara, penyanyi, penyampai radio, model, penulis lirik | years_active = 2013–kini | era = | employer = [[Media Prima Berhad|Media Prima]] (2013-kini) | organization = | agent = | known_for = | notable_works = | style = | height = | television = | title = | term = | predecessor = | successor = | party = | otherparty = | movement = | opponents = | boards = | criminal_charges = | criminal_penalty = | criminal_status = | spouse = {{Kahwin|Kapten Hanif Hamidi|2018}} | partner = | children = 2 | parents = | mother = | father = Datuk Abu Bakar Johar<ref>{{Cite web|url=http://www.gempak.com/artikel/10210/sekali-lafaz-dayah-bakar-sah-isteri-hanif-hamidi|title=Sekali Lafaz, Dayah Bakar Sah Isteri Hanif Hamidi|date=29 Jun 2018|publisher=Astro Gempak}}</ref> | relatives = | family = | callsign = | awards = | website = | module = | module2 = | module3 = | module4 = | module5 = | module6 = | signature = | signature_size = | signature_alt = | footnotes = }} '''Nur Hidayah Abu Bakar''' boi penanakan 30 Ogos 1989. Iyo tu pengasara, pelego, penyampai radio, model kok penulis lirik dendo Malaysia. Iyo mula kerjo lepas ai jadi salah dikau peserta mediam Projek 3R tak TV3. == Tungan metelak == {{Reflist}} j7ugc8kkamkwm2vh8gpncvj65t53mip Dayang Nurfaizah 0 486 4721 4663 2024-08-19T16:29:03Z Umboh Tuhan 194 + Tungan metelak 4721 wikitext text/x-wiki [[Fail:Dayang Nurfaizah performs on MeleTOP.jpg|thumb|Dayang Nurfaizah pada 2016]] '''Dayang Nurfaizah Awang Dowty''' (penenakan 20 julai 1981) iyo no dangan pelego dendo [[Malaysia]].iyo boi mula kerjaya ni beta umur ni 18 taun, iyo pan kuleh status teralap diom arena seni soro mokok boi muat 7 buah album studio kok kule'iko anugerah lua' diom kok luar negara.Oron ni sebaris kok pelego' dendo seangkat kok ni dokon Siti Nurhaliza, Misha Omar,Liza Hanim,kok Jaclyn Victor. KELUMAN AWAL Daynag Nurfaizah penenakan tak kuching, [[sarawak]]. Bakat bagal un mio ai pan tekesan lu' diki lagi masa minggo iyo boi imon diom bidang belego' lua' iyo tk sekul rendah lagi.Tak zaman sekul ni,iyo andang tekilo jadi pelego' diom setiap majlis boi buat tak sekul sampai oron ni tekilo. Mokok kelebihan luar bioso memeperlrgo lagu-lagu asli melayu mokok lagu R&B, Iyo mula ngendo' bahagian diom dangai pertandingan belego' tak negeri ni dediri,antara ni manang Bintang Asli Remaja 1996 kok ke peringkat akhir diom pertandingan Bintang Remaja Sarawak 1996 kok akhir ni teko juara diom edisi 1997.Iyo membanikan diri unutk pelua lua' laat ni kok nuut pertandingan nianjur Radio Televisyen Malaysia iyo ae Golden Teen Search 1997 tak Kuala Lumpur.pertandingan bakat belego lagu urang pute' tu kule ngakui iyo paling alap sampai iyo ngeraih gelaran juara diom umur ni bau 1.7 taun == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 33yx65a0y2dgdg8ynyt05ruh1jdxum8 Dayangku Intan 0 487 4719 4665 2024-08-19T16:28:46Z Umboh Tuhan 194 + Tungan metelak 4719 wikitext text/x-wiki [[Fail:Dayangku Intan.jpg|thumb|Dayangku Intan pada 2013]] YM Dayangku Intan binti Tengku Abdul Hamid atau iyo sebagai '''Dayangku Intan''' (lahir 29 April 1966) iyo seorang penyanyi dan ahli politik [[Malaysia]]. lua kerjaya muziknya sekitar era 1980-an iyo no terkenal dangan lagu 80-an "Semakin Rindu Semakin Sayang" se’e 90-an "Berpaut Di Dahan Cinta", "Senandung Hari Raya Untukmu" dan dangan gandingannya Jay Jay menerusi lagu "Kita Insan Biasa".Se lua pilihan raya umum Malaysia 2013, iyo no bertanding ta parlimen Pengerang mewakili PKR.[1] [2] Se’e Pakatan Rakyat dibubarkan ta 2015 iyo no undur diri lua politik dan talua PKR pada taun 2018. Walau bagaimanapun, iyo no nuut betiru Parti Islam Se-Malaysia ta lua taun 2023. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 80wly7xwj5yy5z4gqak3zue4t4uvy0e Dela' 0 488 4048 1664 2024-08-09T09:39:45Z JhsBot 61 Pywikibot touch edit 4048 wikitext text/x-wiki Dela' tu dikau alat diom bua' untuk kegunoon mekerso reso makanan koh terlibat pan tah proses meling fonem yang pelua' tah buah jomo.Di antara bagian dela' yang terlibat tah pembentukan eling fonem iono dela' jata,dela'entorong koh dela'empoon. lmdw414ck7q2tyg4iggcl9jd9dn8npk Delaksa' 0 489 4049 1667 2024-08-09T09:39:46Z JhsBot 61 Pywikibot touch edit 4049 wikitext text/x-wiki Delaksa' iyono kiroon Sama nyaun torong ni, infiniti. t0hir06chic1zj1dy1vyllsmcmqs8is Dendang Perantau 0 490 4050 1671 2024-08-09T09:39:46Z JhsBot 61 Pywikibot touch edit 4050 wikitext text/x-wiki lagu Dindang perantau sala satu lagu yang boi binuat ole Arwah P. Ramlee dan Lagu tu rojo tekilo lua dau sampai no betiru dan lagu tu selalu penekaleh sebelum raya berkumandang kok bila Hari Raya Aidilfitri. Liha acrmebwzciyjudipzt0lwkq0f7i5mt1 Denseen 0 491 4051 1674 2024-08-09T09:39:47Z JhsBot 61 Pywikibot touch edit 4051 wikitext text/x-wiki Denseen ma'na ni bedenakan, dempoon turunan ni. mhzullnlj82i8m19nxr7ad39gga6lzq Derakan 0 492 4052 1677 2024-08-09T09:39:47Z JhsBot 61 Pywikibot touch edit 4052 wikitext text/x-wiki Denakan tu hubungan laa' sikot koh tio.Semimon manusia tu bedenakan berasal luah tah Nabi Adam koh Hawa. 4ruhrsg4n7lr59vx0fs4ljpw0do6cpr Derian Sama 0 493 4683 4053 2024-08-19T15:56:45Z Umboh Tuhan 194 + Tungan metelak 4683 wikitext text/x-wiki [[Fail:Annona muricata 1.jpg|thumb|Derian Sama]] '''Derian Sama''' tu merupakan salah satu poon bua'-buan tempatan iko tinonom ta' diom kabun ko sedi ruma'. ==Guno== Eko guno ni derian sama tu. Bua' mana bule kenakan tarus. Duun poon derian sama bule binuat toos untuk niman panas badan boron peranak diki'. == Tungan metelak == {{Reflist}} nvtzmgdcck4r55xtb9hyedbzej5v9de Derian Sama @ Durian Belanda 0 494 1685 1684 2024-08-09T09:23:56Z Jon Harald Søby 58 1 semakan diimportkan 1684 wikitext text/x-wiki #REDIRECT [[Derian Sama]] r3a652rnphoqmkz462vqv39kuzip62i Didie Alias 0 495 4547 1690 2024-08-12T10:27:58Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q12685726]] 4547 wikitext text/x-wiki {{Infobox person |name = Didie Alias |image = |image_size = |caption = |birth_name = Fadzilah binti Mohd Ali |birth_date = {{Birth date and age|1972|1|11}} |birth_place = [[Negeri Sembilan]], [[Malaysia]] |death_date = |death_place = |death_cause = |resting_place = |resting_place_coordinates = |home_town = |nationality = |citizenship = |other_names = |known_for = |education = |alma_mater = |employer = |occupation = Pelawak, pelakon, pengacara, penyanyi |years_active = 1990–betiru |title = |salary = |networth = |height = |weight = |term = |predecessor = |successor = |party = |boards = |module = {{Infobox musical artist |embed = yes |label = [[Suria Records]] }} |religion = |spouse = {{Plainlist| * {{Kahwin|[[Ridzuan Hashim]]|1992|2002|reason=cerai}} * {{Kahwin|Norisham Ismail|2009}} }} |partner = |children = 6 |parents = |relations = |signature = |website = |footnotes = }} '''Fadzilah Mohd Ali''' (boi pinenakan 11 Januari 1972) atau tekilo jomo sebagai Didie Alias jomo rojo gauk kok pelakun dendo Malaysia. Didie boi mesegul diri ni mediam bidang lakunan lua' 1988. 2n4adfb493fjubaodx2mjnpn7fgyhrm Diing 0 496 4054 1697 2024-08-09T09:39:49Z JhsBot 61 Pywikibot touch edit 4054 wikitext text/x-wiki '''Diing''' tu jinis [[binatang]] diam bue'.<ref>https://www.researchgate.net/publication/328629864_Ikan_Kekek_di_Semenanjung_Malaysia</ref> == Jinis diing == * Banak * Diing lumaan * Diing pute' * Gorop * Kesili * Kuapu == Tungan metelak == {{Reflist}} b5elfn4do7qd83kdp8y2sp30jbbp615 Ding 0 497 1699 1698 2024-08-09T09:23:58Z Jon Harald Søby 58 1 semakan diimportkan 1698 wikitext text/x-wiki Ding iyono dikau jinis mekanan lekat ta selang f7dikudctly5d2lx9bk2dss6ybanwm6 Ding Megundung 0 498 4055 1702 2024-08-09T09:39:50Z JhsBot 61 Pywikibot touch edit 4055 wikitext text/x-wiki Ding Megundung iyono banan ding kurung ta' bue' lolom pelua' jungur ni jo bioso ni ding dalas, rungau kok lumpis. cael68ixp16coeoqwpkk2ipquvs9706 Ding Menaau 0 499 4056 1705 2024-08-09T09:39:50Z JhsBot 61 Pywikibot touch edit 4056 wikitext text/x-wiki Ding Menaau iyono banan ding kurung ta' bue' teba bioso ni ding kuruk kok dalas. 3lxhkx8wv9sucqoct9q487m4ihx3p9v Ding Pangi 0 500 4057 1708 2024-08-09T09:39:51Z JhsBot 61 Pywikibot touch edit 4057 wikitext text/x-wiki Ding pangi iyono ding senerundau kok bua' tibau', ding nejaruk kok bua' tibau' bioso ni ding dalas. 50jc5f5h56ho0u8i21v147s2p3uhraf Dodol 0 501 4548 1711 2024-08-12T10:28:00Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4924455]] 4548 wikitext text/x-wiki '''Dodol''' iyo noh dikau makanan yang buli pinau sebagai makanan mamis atau pan manisan. Dodol tu rojo tekilo melaat Melaka engko pan Johor. Binara amun muat tu rojo susah sebab iko jomo nuba ni tapi kikoon ni nyiak ngam dokon dodol yang paling alap. Jomo-jomo too yang bioso bana muat dodol tu sebab jarang peranak tabang muat tu. Bahan-bahan ni dokon santan, tepung buas,gula, gula Melaka engko pan timus. b1xk28h9bx07xep154ctsjuegqzhpxc Doot 0 502 4058 1714 2024-08-09T09:39:52Z JhsBot 61 Pywikibot touch edit 4058 wikitext text/x-wiki Doot ma'na ni tema' tr2azrqne7gcvlqj8rsv99pnz7hyse3 Doyo doyo pesat 0 503 4059 1717 2024-08-09T09:39:52Z JhsBot 61 Pywikibot touch edit 4059 wikitext text/x-wiki Doyo doyo pesat iyono perambaan Sama ma'na ni dediki bana. hcl9p31jchs41js0ntzu3rehiaabpqf Doyo korob 0 504 4060 1720 2024-08-09T09:39:53Z JhsBot 61 Pywikibot touch edit 4060 wikitext text/x-wiki Doyo korob iyono perambaan Sama ma'na ni telampau oyo antawa oyo bana. fmhso4rra8b7cw2rxtmeqx9k8zlijmg Doyo pesat 0 505 4061 1723 2024-08-09T09:39:53Z JhsBot 61 Pywikibot touch edit 4061 wikitext text/x-wiki Doyo pesat iyono perembaan Sama ma'na ni diki-diki, jomo diki-diki, jomo niah penedulan. 9l095lxzcprz3hoy13taius8044hmi6 Dr Hj Oki Setiana Dewi 0 506 1725 1724 2024-08-09T09:24:01Z Jon Harald Søby 58 1 semakan diimportkan 1724 wikitext text/x-wiki #REDIRECT [[Oki Setiana Dewi]] pxvrcrfj4cyp2jiyb5wacy9hd07d5vo Duang tabak 0 507 4062 1728 2024-08-09T09:39:54Z JhsBot 61 Pywikibot touch edit 4062 wikitext text/x-wiki Duang tabak ma'na ni duang paling langa diam semimon duang, bioso ni makai talam tembaga' tungan nagu' makanan, talam tembaga' tinagu' enjata' sumbul tembaga'. 9vsm6dh5tpfr2nhfl0jqpuz293u6bd3 Dugal 0 508 4063 1731 2024-08-09T09:39:54Z JhsBot 61 Pywikibot touch edit 4063 wikitext text/x-wiki Dugal tu io akan bungkar pedih ni amun niak mangam buas dembangi , Dugal tu baya amun niak pinadul , dong sampai yo pesak . 2ir3rw59pssrzjfett3v7lxqg7ifr5q Dun 0 509 4064 1733 2024-08-09T09:39:55Z JhsBot 61 Pywikibot touch edit 4064 wikitext text/x-wiki Diam bidang botani, dun tu dikau organ yang sinambung tak batang tumbuan pembulu' enjata tanah kok yang kusus diam fotosintesis. Tujuan ni tu, dun buli mentuk pepen untuk ngasil enjata dun a luas endok sel-sel yang ben kloroplas enggai pan kulek pinekiton ta' moto elau, tapi pan moto elau buli posok peno' mediam tisu-tisuni. Kikon kes, dun-dun pan dikau tenonom untuk respirasi, transpirasi kok gutasi. Dun-dun buli ngena' mekanan kok buek. Dun-dun pan dikau mekanan jomo asal iyo dikau gulai-gulai dun. jzy08x88u6avgb0vs8ei8722y6pszxx Dun begiang 0 510 4065 1736 2024-08-09T09:39:55Z JhsBot 61 Pywikibot touch edit 4065 wikitext text/x-wiki Dun begiang tu io" dun bagal yang mekar , kok batang ni rojo bagal . Dun begiang tu un buek getak" buek ni amun nintan kotol , Tapi petua jomo dau' dau' amun ai tekeket tetiak , ea no tos ni bana buek batang begiang , kok rungai rengot boi keket tetiak . i5ifyfdeen57tkm73pc8ozag3xm47rm Dun saging 0 511 4066 1738 2024-08-09T09:39:56Z JhsBot 61 Pywikibot touch edit 4066 wikitext text/x-wiki Dun saging iyono dun yang boi nindo lekat ta' pon saging. Dun saging tu beguno bana ta' jomo untuk pemungkus bangan buas datai, mekanan, kui kok masam-masam guno ni. Dun saging sukup wangi amun pinakai untuk pemungkus bongon mekanan. qdnqdmccrt1wnzo7mo3igbk0cy6ja23 Ebit lew 0 512 4067 1740 2024-08-09T09:39:56Z JhsBot 61 Pywikibot touch edit 4067 wikitext text/x-wiki Ebit Irawan bin Ibrahim Lew (lahir tah Lew Yun Pau; 21 Disember 1984),lebih tekilo oron ni Ebit Lew. Eyo jomo usahawan dan pendakwah Islam diom Malaysia bongso kina.Eyo tekilo kok pekayan baduh kurta , makai tupi kopiah, ben janggut .Eyo tekilo bana diom Malaysia engko pelua diom tv.Eyo noh selalu dabang jomo susah. gugvf1k85lmtkqyt7apj0f0jd2v9agi Ella Aminuddin 0 513 4718 4549 2024-08-19T16:28:31Z Umboh Tuhan 194 + Tungan metelak 4718 wikitext text/x-wiki {{Infobox person | title = Ratu Rock Malaysia | name = Ella | image = Ella on MeleTOP.jpg | caption = Ella ditemuramah dalam ''[[MeleTOP]]'' pada 2016. | image_size = | landscape = <!-- Tulis "yes", jika imej kelihatan lebar. Jika tidak, tinggalkan. --> | birth_name = Nor Zila binti Aminuddin | birth_date = {{Birth date and age|1966|7|31}} | birth_place = [[Gelugor]], [[Pulau Pinang]], [[Malaysia]] | death_cause = | death_date = | death_place = | body_discovered = | resting_place = | resting_place_coordinates = | home_town = | nationality = | education = [[Sijil Pelajaran Malaysia]] (SPM) | occupation = Penyanyi, pelakon, pemuzik, model, usahawan | years_active = 1985–kini | spouse = {{Marriage|Azhar Husaini Ghazali|2012}} | children = Shanome Az Zahra (anak angkat) | parents = {{Ubl|Aminuddin Manap (bapa)|Yang Asmah Long (ibu)}} | relatives = [[Kaka Azraff]] (anak saudara) | family = {{Plainlist| * Mohd. Nor Izam Aminuddin (abang) * Nor Azraff Aminuddin (abang) * Saidatulnisa Aminuddin (kakak) * Rozita Aminuddin (kakak) * Shahrizan Aminuddin (kakak) * Azahari Aminuddin (adik) }} | module = {{Infobox musical artist | embed = yes | background = solo_singer | genre = [[Rock]], [[hard rock]], [[pop rock]], [[rock kapak]] | instrument = [[Vokal]] | label = WEA (kini [[Warner Music Malaysia]]) {{Br}} [[EMI|EMI Music Malaysia]] | associated_acts = [[Ella & The Boys]], [[Kumpulan Spider|Spider]] }} | website = {{URL|www.ella.com.my}} | signature = Ella (malaysian singer) signature.png }} '''Nor Zila Haji Aminuddin''' (iyo tekilo kok oron Ella; iyo tu boi penenakan 31 Julai 1966) iyo no dendangan Pelego', Pelakun, Pemuzik kok Model tekilo tak Malaysia. Sampai betiru, iyo masih ginelar Ratu Rock Malaysia. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 2gzwz7j4hl0uvocm63o3etvz3c9lnua Ema’ 0 514 4068 1750 2024-08-09T09:39:58Z JhsBot 61 Pywikibot touch edit 4068 wikitext text/x-wiki '''Ema’''' ('''bapa)''' iyo noh dela atau pan pasangan Eyang yang boi mepanakan kiti. nvwqxqh482nmu9wvoris3x0bmp2r5z4 Emma Maembong 0 515 4069 1753 2024-08-09T09:39:58Z JhsBot 61 Pywikibot touch edit 4069 wikitext text/x-wiki Fatimah Rohani Ismail (boi penenakan 27 Mac 1992) pinau lebih tekilo Emma Maembong,[1] iyo no pelakun dendo kok model dendo malaysia.emma maembong tekilo kok watak ni lua' lakunan ngentan watak Nawwal Husna diom projek memikat laa'. 21mte4ajw6yancjt6xt7q4eol0ea5yv Emma maembong 0 516 1755 1754 2024-08-09T09:24:03Z Jon Harald Søby 58 1 semakan diimportkan 1754 wikitext text/x-wiki #REDIRECT [[Emma Maembong]] ch342l546ekiz0tz1aegurouagoy2xx Empuyat 0 517 4070 1758 2024-08-09T09:39:59Z JhsBot 61 Pywikibot touch edit 4070 wikitext text/x-wiki '''Empuyat''' tu dikau jenis idangan asal ni luak batang diam sagu sawit.Iyo tu [[bahan berkanji]] yang hambar.Empuyat tu makanan jomo tempatan tak brunei. 5xymm6yb0ysjc1d2fny9s31hyq5f5bh Enderio 0 518 4071 1761 2024-08-09T09:39:59Z JhsBot 61 Pywikibot touch edit 4071 wikitext text/x-wiki Enderio iyono kawasaan tio ensedi selang, embelud. i5xbg9yy8o8uzcdvwvxaamzhknrb2xt Enggomon 0 519 4072 1764 2024-08-09T09:40:00Z JhsBot 61 Pywikibot touch edit 4072 wikitext text/x-wiki Enggomon iyono senjata'. kuhm9ioy7iyk4hxrjbuk1ruqu2v41dg Erin Malek 0 520 4550 1767 2024-08-12T10:28:04Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q25484434]] 4550 wikitext text/x-wiki Erin Malek boi kawin dangan dela pilihan atai oron Farriz Fauzy (nanak 1986) ta 10 Oktober 2014. [1] ta 1 Oktober 2015, iyo no salamat anak sulung penanakan yang oron boibinanan Mohamed Faliq Mohamed Farriz ta pukul 9.27 semaung. Pienpen bege e, iyo no ruun boi kambar anak sulung stemui muli Penciptanya tebeta tu usia kandungannya berumur 16 minggu mengalami lebihan bagas boi mediam betong [2] Erin boi kongsi berita bakal penanakan kedua dangan peminat ta laman sosial instagram iyo no ta 4 Oktober 2016. [3] Ta banggi Jumaat, 10 Februari 2017, Erin boi salamat penanakan dendo iyo ta jam 4.25 kemual dangan anak keduo Erin tu oron buanan Nur Aisha Binti Mohamed Farriz. nidvs0tf0o87siyjjdj9x1xf9im89ts Ernie Zakri 0 521 4717 4551 2024-08-19T16:28:14Z Umboh Tuhan 194 + Tungan metelak 4717 wikitext text/x-wiki {{Infobox person | name = Ernie Zakri | image = Ernie Zakri (1).jpg | caption = Ernie pada 2020. | birth_name = Nur Ernie Shahirah binti Zakri | birth_date = {{Birth date and age|1982|11|23}}<!-- Ia telah dipersetujui oleh semua bahawa beliau dilahirkan pada 11 23 1982 berdasarkan dari nombor kad pengenalan dan dokumen kelahiran beliau. --> | birth_place = [[Kuala Lumpur]], [[Malaysia]] | spouse = {{Marriage|[[Syamel]]|2021}} | children = 1 | education = Ijazah Muzik | alma_mater = {{Plainlist| * [[Universiti Teknologi MARA]] (UiTM) * [[Universiti Malaya]] (UM) }} | occupation = {{Flatlist| * Penyanyi * pelakon * guru vokal }} | mother = Rafiaah Mohamed | father = Zakri Ahmad | relatives = [[Ziana Zain]] (ibu saudara)<br>[[Anuar Zain]] (bapa saudara) | module = {{Infobox musical artist | embed = yes | background = solo_singer | instrument = [[Vokal]] | years_active = 2009–kini | genre = [[Balada]], [[Muzik pop|Pop]] & [[R&B]] | label = [[Universal Music Malaysia]] | associated_acts = [[Tomok]], [[Syamel]] }} }} '''Nur Ernie Shahirah Zakri''' (penenakan 23 jun 1993) iyo dangan pelego'kok pelakun dendo tak malaysia. Iyo tu boi manang pertandingan Bintang RTM 2009.Tak taun 2018,iyo kok sek ni syamel, manang anugerah Vokal Terbaik Anugerah Juara Lagu ke-32. Selain ae,iyo tu bagas sigu muzik tak Akademi Muzik Bentley tak Mutiara Damansara,Petaling Jaya. ==KELUMAN AWAL== Ernie Zakri boi penenakan 23 jun 1992 tak kuala lumpur,iyo kulek pendidikan tak SMK(P) Methodist,Kuala Lumpur, lapas a kulek ijazah muzik tak Universiti Teknologi Mara (UITM) kampus Shah Alam.iyo pan ngentan ijazah muzik tak Universiti Malaya (UM).Eyang ni,Rafiaah Mohammed denakan tak duangan pelego'tekilo negara,Ziana Zain kok Anuar Zain.Ma'ni,Zakri Ahmad dangan pemain dram diom kumpulan kilat. ==KERJAYA== Lapas boi manang pertandingan Bintang RTM 2009,kerjoon iyo jadi dangan pelego tanah air dokon ai remot kajap bayak ni pan iyo boi melua lagu tajuk ni Sinaran diom taun 2011. Oron iyo tu boi menik balik luak dikau program Duo Star seganding kok syamel. Selain iyo fokus tak diom kerjoon ni jadi dangan pelego,iyo pan dangan sigu vokal. sampai betiru,kelas vokal ni kulek sambutan alap sampai posok siti nordiana,siti sarah,kok azza elite. Diom taun 2015, iyo munsul mokok lagu "Takkan Pudar" boi cinipta lek akir luak kumpulan Hyper Act,boijadi lagu tema drama Hati perempuan tak TV3. Iyo pan binuanan kepersoyoon diom ngajar vokal peserta program Big Stage 2018 nianjur lek Astro.iyo pan boi nuut belakun tak dikau telefilem istimewa Aidilfitri tak samping Tomok. Lapas kejayaan gai duangan,boi meluak lagu duet gai duangan,"Takkan Terlerai" tak buan April 2019.iyo pan tepenek mindam soro bawang darak kok bawang putek diom filem animasi upin&ipin: kris Siamang Tunggal. Iyo mula belakun luak drama Suri Katriana boi siniar tak Astro Prima. Diom November 2019, lagu ni " Ku Bersuara" tepenek jadi finalis diom Anugerah Juara Lagu ke-34 Diom buan disember,ernie kok syamel boi muka' kafe setable tak danau kota.diom mac 2021,iyo teko tak Anugerah Juara Lagu ke-35 mokok mo' lagu Gundah boi binuat kok tinulis lek iyo dediri mokok Sharon Paul.iyo manang anugerah Vokal Terbaik tak diom Anugerah Juara Lagu ke-35. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] jmcq584l3nsizuie8wmp3mjnbdvm20i Ernie zakri 0 522 1778 1777 2024-08-09T09:24:06Z Jon Harald Søby 58 1 semakan diimportkan 1777 wikitext text/x-wiki #REDIRECT [[Ernie Zakri]] 7l4lubantoo2gv96233y0gimr6h98i3 Eyang 0 523 4073 1781 2024-08-09T09:40:01Z JhsBot 61 Pywikibot touch edit 4073 wikitext text/x-wiki '''Eyang (mama)''' iyo noh dendo yang mepanakan engko moyo kiti. nvesch3lf1mijzjrimwmxuq1c6241am Farahdhiya 0 524 4716 1785 2024-08-19T16:27:47Z Umboh Tuhan 194 + Tungan metelak 4716 wikitext text/x-wiki Farah Dhiya Mohamed Amin (penenakan 28 april 1984) iyo no dangan pelego' pelakun kok pengasara dendo tak malaysia. iyo mula ngeraih kejayaan komersial tak taun 2004 lua' lagu "Bertakhta Di Hati" yang boi pinosok diom album studio mula-mula yang somo tajuk ni. Diom taun 2015,iyo posok jadi peserta gegar vanganza keduo tak astro enggo iyo ai manang tempat keduo. Iyo boi belakun diom drma Spa Q, Derhaka Seorang Madu kok Rumah Siti Khadijah. KELUMAN AWAL Iyio penenakan tak taun 28 April 1984 tak Sarzana, Itali kok iyo tu dangan anak bongsu luak duo dik berdik. iyo un laak kacukan melayu-inggeris.eyangni un keturunan Englang enggo ma' keturunan melayu yang asal ni lua' Johor. Iyo kulek pendidikan awal tak sekul menengah telok gadung,klang,selangor, lapas ae pindah tak sekul menengah taman Malawati,Ulu Kelang, Selangor. KERJAYA Farahdhiyah mula posok diom dunia pelego beta umur kakal belasan taun lagi tak diak naungan KRU Records. betiru bernaung mediak NAR Records.iyo boi ngasil duo bua' lagu,Bertakhta Di Hati diom taun 2004 kok Yang Ku Puja tak entorong taun 2006. Bertakhta Di Hati kulek tempat endiom carta carta diom radio ERa kok Hot FM mokok kulek pensalonan endiom Anugerah Anugerah AIM jadi Artis Bau Teralap. kemunsulan ni diom pertandingan gegar vanganza oron ni balik tinutur diom bidang muzik masa iyo boi kulek manang tempat keduo diom pertandingan ae mokok perbezaan markah ni kurang 2 markah jo luak pemenang ni Siti Nordiana == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] brcsvb9aqh9mo8ks92u4273zvzze7s4 Fatimah Hashim 0 525 4696 4460 2024-08-19T16:21:31Z Umboh Tuhan 194 + Tungan metelak 4696 wikitext text/x-wiki '''Tun Fatimah binti Haji Hashim''' boi pinenakan 25 Disember 1924. Beliau iyo no Menteri Kebajikan Am Malaysia lua' 20 Mei 1969 ngabut 28 Februari 1973. Beliau iyo no dendo numbur satu ta' Malaysia boi terua' lantik jadi Menteri Kabinet Malaysia. Ella ni, Tan Sri Abdul Kadir Yusof boi jadi Peguam Negara ko' Menteri Undang-Undang. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] 0c106ah6xqzyqtfbfjuq9n4io4i6cpx Fauziah Latiff 0 526 4735 4650 2024-08-19T16:37:38Z Umboh Tuhan 194 + Tungan metelak 4735 wikitext text/x-wiki '''Siti Fauziah binti Sheikh Abdul Latiff''' (Lahir mea Ayer Tawar, Teluk intan, Perak, 5 Disember 1970, Umur 52 taun) antau pan tekilo iyo noh pelego'diom Malaysia. Iyo tu boi niusah tah Klang, Selangor iyo boi sekul tah pendidikan Menengah Tengku Ampuan Jemaah Pelabuhan Klang, Selongor. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 89qz6su24t961h1p7srrwd271nc74kj Fauziah Nawi 0 527 4553 4074 2024-08-12T10:28:11Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q20458006]] 4553 wikitext text/x-wiki '''Fauziah Nawi''' (boi pinenakan 26 Jun 1953) iyo no endangan juruhebah radio, pengarah, pelakun, pelego' kok penari' Malaysia. Fauziah Nawi pan boi kerejo sebagai sigu ta' Akademi Fantasia Musim keempat (2006) ko' keenam (2008). Pada Mei 2019, Harian Metro boi mosok iyo jadi dangan lua' ta' 10 pelakun beta Malaysia paling laris sepanjang jaman. 10scy5bnpco3sw5x2nrl5nu6sw3bqai Fauziah latiff 0 528 1803 1802 2024-08-09T09:24:08Z Jon Harald Søby 58 1 semakan diimportkan 1802 wikitext text/x-wiki #REDIRECT [[Fauziah Latiff]] lc6xjmgz6hxmqgs8utw796hjvw92mqe GUUK 0 529 1805 1804 2024-08-09T09:24:08Z Jon Harald Søby 58 1 semakan diimportkan 1804 wikitext text/x-wiki #REDIRECT [[Guuk]] qve7nv33ojzl2z2de0hj7gdu4klwxcx Gaba 0 530 4075 1807 2024-08-09T09:40:03Z JhsBot 61 Pywikibot touch edit 4075 wikitext text/x-wiki Gaba tu buek selang menik,buek selang tu akan menik lebih paras luak sebelum ni kadang pan gaba tu buli sampai ta’ suang. Ae no akibat ni liud bagal. Contoh ni ta’ Kota Belud Sabah selalu liud lagi-lagi amun buek gaba buli jadi liud bagal. 66w6pss56pmsgavy0cpu6f4pjfera7q Gamut 0 531 1809 1808 2024-08-09T09:24:09Z Jon Harald Søby 58 1 semakan diimportkan 1808 wikitext text/x-wiki Gamut iyono dikau organ yang penting diam tenomon 52zfrha71bnjxi1j7s2ouxyeewxnwic Gara' gara' 0 532 4076 1812 2024-08-09T09:40:04Z JhsBot 61 Pywikibot touch edit 4076 wikitext text/x-wiki Gara' gara' iyono titoo nia' nedaran diri ni. l530jlc0it74ma7ro4r54s4k9em5bk4 Gayung 0 533 4554 1815 2024-08-12T10:28:13Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q10978258]] 4554 wikitext text/x-wiki Gayung guno ni untuk nyiduk buek selalu ni jomo melayu makai gayung untuk nyiduk buek mediom tempayan pengusek gai bangan betis sebelum gai menik rumah.Musim dau,gayung selalu ni binuat makai tempurung suka yang boi binila sinambung engko kayu tungan ngentanni.Gayung tu pan pakai ti untuk nyiduk buek pemandi ti. jmrikojhlyxo87jf6z3xbbsxh7xs6cv Genu genu 0 534 4077 1818 2024-08-09T09:40:05Z JhsBot 61 Pywikibot touch edit 4077 wikitext text/x-wiki Genu genu iyono abar boi peneteko 0ef2zxlcmo7490rb6vcqvnbdvycvm4f Gimbaran 0 535 4078 1821 2024-08-09T09:40:06Z JhsBot 61 Pywikibot touch edit 4078 wikitext text/x-wiki Gimbaran ma'na ni jomo alus sene' apid antawa bekawan. 6sc8vpaatr1weic9ljan2lb2kw63j2n Gipun 0 536 4555 1829 2024-08-12T10:28:17Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q17]] 4555 wikitext text/x-wiki [[Fail:Japan (orthographic projection).svg|thumb|alt=Gipun|Gipun]] '''Gipun''' dikaw laat paling iko iyo apun kemudahan diam laat ni. Iyang laat Gipun tu [[Tokyo]]. Laat Gipun tu ling petuturan gai iyo no [[ling Gipun]].<ref name="LangPolicy">{{Cite book |last=Fujita-Round |first=Sachiyo |title=Language Policy and Political Issues in Education |last2=Maher |first2=John C. |date=2017 |publisher=Springer International Publishing |isbn=978-3-319-02343-4 |editor-last=McCarty |editor-first=Teresa L. |edition=3rd |series=Encyclopedia of Language and Education |pages=491–505 |chapter=Language Policy and Education in Japan |doi=10.1007/978-3-319-02344-1_36 |editor-last2=May |editor-first2=Stephen |chapter-url=http://link.springer.com/10.1007/978-3-319-02344-1_36}}</ref> == Tungan metelak == {{Reflist}} 4v2ucc131psd762x47wpo23xccp4p8t Giuk 0 537 4079 1831 2024-08-09T09:40:08Z JhsBot 61 Pywikibot touch edit 4079 wikitext text/x-wiki Giuk iyono binatang yang badan ni lema' kok langkau diam kumpulan intertebrat. Giuk yang rojo tekilo iyono giuk tana'tapi tekule' retusan ribu pan sepisis debagi yang temban diam masam masam abitat selain tana'. ajpn4ocdt9nivkw96l4uyr9rtpd9knn Gulai 0 538 1840 1839 2024-08-09T09:24:12Z Jon Harald Søby 58 8 semakan diimportkan 1839 wikitext text/x-wiki [[Fail:Kleinmarkthalle Frankfurt Gemüsestand.jpg|thumb|337x337px|'''''Gulai-gulai pinedagang''''']] Gulai iyo no tumbuhan buli kinakan mata' atau pan pinapi enggo no alap kinakan jadi luuk. Gulai sukup no iko indah jinis ni. Gulai buli binagi ta' iko jinis enggo no un dun, bua', kok besina'. 24b5capdtl6yxumdqg6wb236rqetahm Gulai batung 0 539 1842 1841 2024-08-09T09:24:12Z Jon Harald Søby 58 1 semakan diimportkan 1841 wikitext text/x-wiki #REDIRECT [[Batung]] 4xv2lrvhq5j02ohknah4eifxm1nd3v1 Gulai kadi 0 540 4080 1848 2024-08-09T09:40:08Z JhsBot 61 Pywikibot touch edit 4080 wikitext text/x-wiki Kadi tu tinonom ta enjata tanah lemah , kok iyo pan tomok mediak tanah . Kadi tu amun pinapi gulai , iko jenis mesakan tekulek ni , salah dikau mesakan nirebus . Lek ngupas kulit ni pan un cara ni , amun niak bana cara ngupas ni , ai pinapi yo" akan kotol amun kinakan . Kadi tu un dangai jenis , salah dikau jenis ni kadi kampung , kadi kampung tu isi ni lawa kok mamis mamis . 3u7yst8x30plplt9tah12o3dnh9mtjx Gulay 0 541 4556 1854 2024-08-12T10:28:20Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q11004]] 4556 wikitext text/x-wiki [[Fail:Kleinmarkthalle Frankfurt Gemüsestand.jpg|thumb|Gulay]] '''Gulay''' iyo noh ngerujuk ta' '''[[Tenomon]]''' yang kinakan mata' atau pinapi. Gulay buli binuat jadi Ulam, Salad atau Luuk. Gulay buli binagi ta' dangai kumpulan. Tekuleh lebih 50 jenis gulay tinonom ta' Semenanjung Malaysia sama ada ta' '''[[dataran tenah atau langah.]]''' <ref>https://ms.m.wikipedia.org/wiki/Sayur</ref> == Tungan Metelak == {{Reflist}} 2jmowu6zu2vodd4ovwes1xq9ghkx65c Gunjai 0 542 4081 1857 2024-08-09T09:40:09Z JhsBot 61 Pywikibot touch edit 4081 wikitext text/x-wiki Gunjai ma'na ni sarai barai. rwp1swxr91aywy0coyjail3yrg09nnh Guuk 0 543 4790 4082 2024-08-19T17:30:05Z Umboh Tuhan 194 + Tungan metelak 4790 wikitext text/x-wiki '''Guuk''' dikaw enggomon Sama binoo kerejo nagendo' kayu api, pekakas ruma', benoo betenomon antawa benoo ngelasa kabun. Guuk tu buat makay besi, bengen ulu engko' sarung. Moo guuk tu tinangkin ta pangkat makay tali guuk. Amun Sama lumaan kerejo nya' been guuk masam lumaan nantang pasal guuk tu dikaw enggomon oyo ta' Sama. == Tungan metelak == {{Reflist}} khwzrd19sz3lvamj4s76ehjhr4xii0p Hari Raya Aidiladha 0 544 4675 1864 2024-08-19T15:47:47Z Rombituon 59 4675 wikitext text/x-wiki {{Infobox holiday | holiday_name = Hari Raya Aidiladha | official_name = Eid al-Adha | image = জাতীয় ঈদগাহ ময়দান.jpg | caption = National [[Eidgah]] decorated for Eid al-Adha celebration in Bangladesh | observedby = [[Islam]], [[Druze]] and [[Alawites|Alawi]]<ref>{{cite news |last=Kadi |first=Samar |date=25 September 2015 |title=Eid al-Adha celebrated differently by Druze, Alawites |url=http://www.thearabweekly.com/?id=2157 |newspaper=[[The Arab Weekly]] |location=London |accessdate=1 August 2016}}</ref> | type = Islamic | significance = {{Longitem|Commemoration of [[Abraham in Islam|Abraham (Ibrahim)]]'s willingness to sacrifice his son in obedience to a command from [[Allah in Islam|God]]}}<br />{{Longitem|End of the annual [[Hajj]] in [[Mecca]] for those present there }} | begins = 10 [[Dhu al-Hijja]] | ends = 13 Dhu al-Hijja | date2018 = 21 August<ref name="ummalqura">{{cite web |url= http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm |title= The Umm al-Qura Calendar of Saudi Arabia |access-date= 7 March 2017 |archive-url= https://web.archive.org/web/20110611040922/http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm |archive-date= 11 June 2011 |url-status= live }}</ref> | date2019 = 11 August<ref>{{Cite web|url=http://www.arabnews.com/node/1534151/saudi-arabia|title=First day of Hajj confirmed as Aug. 9|date=1 August 2019|website=Arab News|access-date=9 August 2019|archive-url=https://web.archive.org/web/20190808215436/http://www.arabnews.com/node/1534151/saudi-arabia|archive-date=8 August 2019|url-status=live}}</ref><ref>{{Cite web|url=http://www.birminghammail.co.uk/whats-on/whats-on-news/eid-al-adha-2016-what-11862345|title=When is the Day of Arafah 2019 before the Eid al-Adha celebrations?|last=Bentley|first=David|date=9 August 2019|website=[[Birmingham Mail]]|access-date=9 August 2019|archive-url=https://web.archive.org/web/20160911105247/http://www.birminghammail.co.uk/whats-on/whats-on-news/eid-al-adha-2016-what-11862345|archive-date=11 September 2016|url-status=live}}</ref> | date2024 = 16 June - 20 June (Kyrgyzstan, Uzbekistan)<ref>{{cite news |last1=Masalieva |first1=Zhazgul |title=Как отметить Курман айт. Правила, условия и требования праздника |url=https://24.kg/obschestvo/126087_kak_otmetit_kurman_ayt_pravila_usloviya_itrebovaniya_prazdnika/ |access-date=28 June 2023 |work=24.kg |date=28 June 2023}}</ref> <br/>16 June – 18 June (Saudi Arabia, Kazakhstan, Turkmenistan, Bangladesh)<ref>{{Cite web|url=https://www.infoplease.com/calendar-holidays/major-holidays/islamic-holidays|title=Islamic Holidays, 2010–2030 (A.H. 1431–1452)|website=InfoPlease|access-date=8 September 2020|archive-url=https://web.archive.org/web/20191218003408/https://www.infoplease.com/calendar-holidays/major-holidays/islamic-holidays|archive-date=18 December 2019|url-status=live}}</ref><ref>{{cite news |title=Курбан айт - 2023 в Казахстане: какого числа и как праздновать |url=https://tengrinews.kz/news/kurban-ayt-2023-v-kazahstane-kakogo-chisla-i-kak-prazdnovat-500922/ |access-date=28 June 2023 |work=Tengri News |date=26 June 2023}}</ref><ref>{{cite news |title=В Туркменистане 28-29-30 июня будут отмечать Курбан байрам |url=https://turkmenportal.com/blog/62464/v-turkmenistane-282930-iyunya-budut-otmechat-kurban-bairam |access-date=28 June 2023 |work=Turkmen Portal |date=27 May 2023}}</ref><ref>{{cite news |title=পাঁচ দিনের ঈদের ছুটি শুরু আজ|url=https://www.banglatribune.com/national/851174/%E0%A6%AA%E0%A6%BE%E0%A6%81%E0%A6%9A-%E0%A6%A6%E0%A6%BF%E0%A6%A8%E0%A7%87%E0%A6%B0-%E0%A6%88%E0%A6%A6%E0%A7%87%E0%A6%B0-%E0%A6%9B%E0%A7%81%E0%A6%9F%E0%A6%BF-%E0%A6%B6%E0%A7%81%E0%A6%B0%E0%A7%81-%E0%A6%86%E0%A6%9C |access-date=14 June 2024 |work=Bangla Tribune |date=14 June 2024}}</ref><br/>17 June (Indonesia, Malaysia, Singapore)<ref>{{Cite web |last=Translation |first=Office of Assistant to Deputy Cabinet Secretary for State Documents & |date=2023-09-12 |title=Gov't Announces National Holidays for 2024 |url=https://setkab.go.id/en/govt-announces-national-holidays-for-2024/ |access-date=2024-03-28 |website=Sekretariat Kabinet Republik Indonesia}}</ref><ref>{{Cite web |title=Hari Raya Haji 2024 / Tarikh Cuti Sekolah KPM Sempena Aidiladha |url=https://ecentral.my/cuti-umum-2024/hari-raya-haji/ |access-date=2024-06-16 |website=eCentral |language=en-US}}</ref><ref>{{Cite news |last=Yasmine |first=Rhea |date=2024-06-07 |title=Muslims in Singapore to celebrate Hari Raya Haji on June 17: Mufti |url=https://www.straitstimes.com/singapore/muslims-in-singapore-to-celebrate-hari-raya-haji-on-june-17-mufti |access-date=2024-06-16 |work=The Straits Times |language=en |issn=0585-3923}}</ref><br/>18 June - 20 June (United Kingdom, Brunei, Japan, Morocco)<ref>{{Cite web|url=https://www.moroccoworldnews.com/2023/06/356014/eid-al-adha-2023-in-uk-is-on-june-29|title=Eid Al Adha 2023 in UK is on June 29|website=Morocco World News|date=19 June 2023|access-date=28 June 2023}}</ref> | date2025 = 6 June – 10 June<ref name="inew_When">{{Cite web |title=When Eid al-Adha 2021 falls – and how long the festival lasts |last=Hughes |first=David |work=inews.co.uk |date=18 July 2021 |access-date=18 July 2021 |url= https://inews.co.uk/news/world/eid-al-adha-2021-when-moon-sighting-date-how-long-festival-what-meaning-explained-1002113}}</ref> | observances = [[Eid prayers]], [[Dhabihah|animal slaughter]], charity, social gatherings, festive meals, [[Eidi (gift)|gift-giving]] | relatedto = [[Hajj]]; [[Eid al-Fitr]] | alt = | nickname = | litcolor = | celebrations = During the Eid al-Adha celebration, Muslims greet each other by saying 'Eid Mubarak', which is Arabic for "Blessed Eid". | date = | weekday = | month = | scheduling = | duration = 3 days | frequency = | firsttime = | startedby = }} {{Islamic Culture}} '''Hari Raya Aidiladha,''' '''Hari Raya Kurban''' atau '''Hari Raya Haji''' iyo noh perayaan yang sinambut oleh bangan umat Islam tak mimon laat. Raya Kurban tu untuk ngormat kesanggupan Nabi Ibrahim boi ngorban anak ni Nabi Ismail untuk mekitoon tanda ni patuh ta’ perintah Allah SWT. == Tungan metelak == {{Reflist}} fyd1r29zmyqm8je800jbr8mwvz5i02f Hari raya haji 0 545 4083 1866 2024-08-09T09:40:11Z JhsBot 61 Pywikibot touch edit 4083 wikitext text/x-wiki hari raya haji sinambut ole mimon jomo islam diom dunia terutamani jomo yang sedang ngerjon ibada haji.Hari raya haji pan tanda ni abisno ibada haji taunan. 57wllc31grunyf89d2hsu96ijf2o05z Heliza helmi 0 546 1869 1868 2024-08-09T09:24:15Z Jon Harald Søby 58 2 semakan diimportkan 1868 wikitext text/x-wiki #REDIRECT [[Nur Heliza Helmi]] hpchajf7b1ekfdffm4sgm3z8zq4rfai Hillary Clinton 0 547 1875 1874 2024-08-09T09:24:15Z Jon Harald Søby 58 5 semakan diimportkan 1873 wikitext text/x-wiki [[Fail:Hillary Clinton official Secretary of State portrait crop.jpg|thumb|Hillary Clinton taun 2009]] Hillary Diane Rodham Clinton (boi pinenakan 26 Oktober, 1947) eyo no ahli pulitik Amerika Syarikat. Eyo tu dendo Pertama Amerika Syarikat lua' taun 1993 ngabut 2001, eyo boi ngejadi Senator Amerika Syarikat lua' New York lua’ taun 2001 ngabut 2009, Setiausaha Amerika ke-67 lua’ taun 2009 ngabut 2013 sambil ni ngejadi salun Demokrat mediam Pilian raya Presiden Amerika Syarikat 2016, tapi ai kalah ta’ salun republikan, Donald Trump. nv17ph9q5uf1snqs7jes34vf5adm8g9 Hillary clinton 0 548 1877 1876 2024-08-09T09:24:16Z Jon Harald Søby 58 1 semakan diimportkan 1876 wikitext text/x-wiki #REDIRECT [[Hillary Clinton]] hxvqgb8bj9ixkxilrub6mbqk6wcf11i Hishammuddin Hussein 0 549 4697 4464 2024-08-19T16:21:48Z Umboh Tuhan 194 + Tungan metelak 4697 wikitext text/x-wiki Hishammuddin bin Hussein ( boi penenakan 5 ogos 1961) iyo dangan ahli politik diom parti Pertubuhan Kebangsaan Melayu Bersatu(UMNO) betiru iyo ngetan dikau jawatan seabagai Menteri Luar Negeri 10 mac 2020.tak taun 7 julai 2021, iyo ai nilantik jadi Menteri Kanan Keselamatan nukar Ismail Sabri Yaakob yang boi nilantik jadi Timbalan Perdana Menteri Malaysia yang bau.iyo boi kerjo diom kerjaan malaysia jadi Menteri Pertahanan Malaysia lau' taun 2013 sampai 2018.iyo noi jadi Menteri Pelajaran lua' taun 2004-2009. iyo boi pinau sabagai kemungkinan nukar dinakan ni, Perdana Menteri Malaysia keenam Daatuk Seri Najib Razak.iyo tu anak tak bagas Perdana Menteri ketelu, Tun Hussein onn kok anak buah Perdana Menteri Malaysia keduo, Tun Abdul Razak. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] giz7raa6sm506b0mtjs25phydwe7kyg Ibadah Kurban 0 550 1882 1881 2024-08-09T09:24:16Z Jon Harald Søby 58 1 semakan diimportkan 1881 wikitext text/x-wiki '''Kurban''' atau pan '''qurban''' amun tinut ajaran Islam ngerujuk tak perlakuan nembali bangan haiwan yang tertentu masa musim Raya Haji untuk tujuan ni ngedamping diri ti ta’ Allah S.W.T Contoh bangan haiwan yang buli kinurban iyo noh unta,lembu,kerbau,kambing kok pan biri-biri. 11rulbl2jkk7yr2halubh61u85exwku Imam 0 551 4084 1887 2024-08-09T09:40:12Z JhsBot 61 Pywikibot touch edit 4084 wikitext text/x-wiki '''Imam''' (Mediam arab:إمام) mo maksud ketua. Mediam maksud bioso imam adalah jomo boi nilantik menjadi pemimpin untuk jemaah tebeta’ sembiang atau muat amal alap. Gai tu binanan kepesoyoon untuk mo jomo ke lan yang bana.<ref>https://ms.m.wikipedia.org/wiki/Imam</ref> == TUNGAN METELAK == {{Reflist}} 5lqgmrbdd6xmwdis387elvnjp3jkpat Imam al-Bukhari 0 552 1889 1888 2024-08-09T09:24:17Z Jon Harald Søby 58 1 semakan diimportkan 1888 wikitext text/x-wiki Imam al-Bukhari penenakan diom 13 syawal 194 Hijrah tak bandar Bokhara, tak bagian timur negeri Uzbekistan.Ma' ni ai ngemban dunia masa iyo masi kekanak, kok eyang ni boi mebagal iyo dediri. Eyang ni melihoro kok ngedidik mokok peno' ihsan serta berkurban untuk muan pendidikan yang alap tak anak ni. Masa ni diki lagi, nilai intelek Imam bukhari aii terkito. Iyo amat warak kok ruun daya ingoton laur bioso. Iyo un kesungguhan diom pelajaran ni. Diriwayatkan bahawa mediom belasan taun, iyo boi ngapal 70,000 hadis Rsulullah SAW 6e8vm4egwt4fwh5ul3hr7faxal7m7oq Imam keli 0 553 1891 1890 2024-08-09T09:24:17Z Jon Harald Søby 58 1 semakan diimportkan 1890 wikitext text/x-wiki '''Imam Keli''' iyo no jomo tablik tak kampung siasai , eyo selalu muan seramah tak surau kok ta masjid. '''Imam keli''' iyo pan selalu ngajar jomo ngaji tak kampung. lf5webwsnf2bblfn4bro8g75oirrbye Impon 0 554 4085 1894 2024-08-09T09:40:14Z JhsBot 61 Pywikibot touch edit 4085 wikitext text/x-wiki Impon tu dikau alat diom bua',kegunoon ni untuk ngeket makanan nuut tugas ni masing-masing koh impon pan berfungsi sebagai penentu eling setiap fonem yang akan tinaat. k9juufetngbwtkdw9z8vfai1n1r7lpf Indonesia 0 555 4475 4086 2024-08-10T09:39:02Z Rombituon 59 4475 wikitext text/x-wiki {{short description|Country in Southeast Asia and Oceania}} {{about|the country}} {{pp-vandalism|small=yes}} {{Pp-move}} {{Use dmy dates|date=June 2019}} {{Use British English|date=September 2019}} {{Infobox country | conventional_long_name = Republic of Indonesia | common_name = Indonesia | native_name = {{native name|id|Republik Indonesia}} | image_flag = Flag of Indonesia.svg | image_coat = National emblem of Indonesia Garuda Pancasila.svg | symbol_type = [[National emblem of Indonesia|National emblem]] | national_motto = <br/>{{native phrase|kaw|[[Bhinneka Tunggal Ika]]|paren=omit}} ([[Old Javanese]])<br/>"Unity in Diversity" | other_symbol = {{lang|id|[[Pancasila (politics)|Pancasila]]}}<br />({{lit|Five principles}}) | other_symbol_type = National ideology: | national_anthem = {{lang|id|[[Indonesia Raya]]}}<br />"Indonesia the Great"<br /><div style="display:inline-block;margin-top:0.4em;">[[File:Indonesia Raya instrumental.ogg]]</div> | image_map = {{Switcher|[[File:Indonesia (orthographic projection).svg|frameless]]|Show globe|[[File:Location Indonesia ASEAN.svg|upright=1.15|frameless]]|Show map of ASEAN|default=1}} | capital = Jakarta (Outgoing) [[Nusantara (city)|Nusantara]] (Incoming) | largest_city = [[Jakarta]]<br>{{Coord|6|10|S|106|49|E|type:city_region:ID}} | languages_type = Official language | languages = [[Indonesian language|Indonesian]]<!--Note: Not just the official language, but also the national language (bahasa pemersatu)--> | languages2_type = Regional languages | languages2 = Over [[Languages of Indonesia|700 languages]]<ref name="ethnologue"/> | ethnic_groups = Over [[Ethnic groups in Indonesia|1,300 ethnic groups]]<ref name="BPS">{{cite web|url=http://www.bps.go.id/website/pdf_publikasi/watermark%20_Kewarganegaraan%2C%20Suku%20Bangsa%2C%20Agama%20dan%20Bahasa_281211.pdf|title=Nationality, Ethnicity, Religion, and Languages of Indonesians|language=id|last1=Na'im|first1=Akhsan|last2=Syaputra|first2=Hendry|publisher=[[Statistics Indonesia]]|date=2010|access-date=2015-09-23|url-status=live|archive-url=https://web.archive.org/web/20150923194534/http://www.bps.go.id/website/pdf_publikasi/watermark%20_Kewarganegaraan%2C%20Suku%20Bangsa%2C%20Agama%20dan%20Bahasa_281211.pdf|archive-date=2015-09-23}}</ref> | religion_year = 2023 | religion = {{tree list}} *87.1% [[Islam in Indonesia|Islam]] *10.5% [[Christianity in Indonesia|Christianity]] **7.4% [[Protestant|Protestant]] **3.1% [[Roman Catholic|Catholic]] *1.7% [[Hinduism in Indonesia|Hinduism]] *0.7% [[Buddhism in Indonesia|Buddhism]] *0.08% [[Aliran Kepercayaan|Folk]], [[Confucianism|Confucianism]], and [[Religion in Indonesia|Others]]<ref>{{cite web| url= https://e-database.kemendagri.go.id/dataset/1203/tabel-data?page=23| title= Religion in Indonesia| access-date= 21 June 2024| archive-date= 21 June 2024| archive-url= https://web.archive.org/web/20240621091542/https://e-database.kemendagri.go.id/dataset/1203/tabel-data?page=23| url-status= live}}</ref>{{efn|According 2023 data.}} {{tree list/end}} | demonym = Indonesian | government_type = Unitary [[presidential republic]] | leader_title1 = [[President of Indonesia|President]] | leader_name1 = [[Joko Widodo]] | leader_title2 = {{nowrap|[[Vice President of Indonesia|Vice President]]}} | leader_name2 = [[Ma'ruf Amin]] | leader_title3 = {{nowrap|[[Speaker of the House of Representatives (Indonesia)|House Speaker]]}} | leader_name3 = [[Puan Maharani]] | leader_title4 = {{nowrap|[[Chief Justice of the Supreme Court of Indonesia|Chief Justice]]}} | leader_name4 = [[Muhammad Syarifuddin]] | legislature = [[People's Consultative Assembly]] (MPR) | upper_house = [[Regional Representative Council]] (DPD) | lower_house = [[People's Representative Council]] (DPR) | sovereignty_type = Independence | sovereignty_note = from the [[Dutch Empire|Netherlands]]<!-- Based on consensus, please discuss on the Talk Page before changing Netherlands to Japan, or adding both --> | established_event1 = [[Proclamation of Indonesian Independence|Proclaimed]] | established_date1 = 17 August 1945 | established_event2 = [[Dutch–Indonesian Round Table Conference|Recognised]] | established_date2 = 27 December 1949 | area_km2 = 1,904,569<ref>{{cite web|url=http://unstats.un.org/unsd/demographic/products/dyb/DYB2004/Table03.pdf|title=UN Statistics|publisher=United Nations|date=2005|access-date=2007-10-31|url-status=live|archive-url=https://web.archive.org/web/20071031023924/http://unstats.un.org/unsd/demographic/products/dyb/DYB2004/Table03.pdf|archive-date=2007-10-31}}</ref> | area_label = Total | area_rank = 14th | area_sq_mi = 735,358 <!--Do not remove per [[WP:MOSNUM]]--> | percent_water = | area_label2 = [[Water area|Water (%)]] | area_data2 = 4.85 | population_estimate = {{increaseNeutral}} 280,725,438<ref>{{citation|url=https://dukcapil.kemendagri.go.id/blog/read/mendagri-tito-karnavian-peran-dukcapil-sangat-penting-bagi-bangsa-indonesia#:~:text=Data%20penduduk%20Indonesia%20yang%20paling,mata%2C%22%20Mendagri%20rinci%20menjelaskan.|title=Indonesia's full-year population in 2023|work=[[Ministry of Home Affairs (Indonesia)]]|language=id|access-date=23 June 2024|archive-date=23 June 2024|archive-url=https://web.archive.org/web/20240623035021/https://dukcapil.kemendagri.go.id/blog/read/mendagri-tito-karnavian-peran-dukcapil-sangat-penting-bagi-bangsa-indonesia#:~:text=Data%20penduduk%20Indonesia%20yang%20paling,mata%2C%22%20Mendagri%20rinci%20menjelaskan.|url-status=live}}</ref> | population_census = 270,203,917<ref name="2020census" /> | population_estimate_year = 2023 civil registration | population_estimate_rank = 4th | population_census_year = 2020 | population_density_km2 = 143 | population_density_sq_mi = 371 | population_density_rank = 90th | GDP_PPP = {{increase}} $4.721&nbsp;trillion<ref name="IMFWEO.ID">{{cite web|url=https://www.imf.org/en/Publications/WEO/weo-database/2024/April/weo-report?c=536,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2022&ey=2029&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1|title=World Economic Outlook Database, April 2024 Edition. (Indonesia)|publisher=[[International Monetary Fund]]|date=2024-04-16|access-date=2024-04-16|archive-date=2024-05-11|archive-url=https://web.archive.org/web/20240511050658/https://www.imf.org/en/Publications/WEO/weo-database/2024/April/weo-report?c=536,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2022&ey=2029&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1|url-status=live}}</ref> | GDP_PPP_year = 2024 | GDP_PPP_rank = 7th | GDP_PPP_per_capita = {{increase}} $16,861<ref name="IMFWEO.ID" /> | GDP_PPP_per_capita_rank = 96th | GDP_nominal = {{increase}} $1.476&nbsp;trillion<ref name="IMFWEO.ID" /> | GDP_nominal_year = 2024 | GDP_nominal_rank = 16th | GDP_nominal_per_capita = {{increase}} $5,271<ref name="IMFWEO.ID" /> | GDP_nominal_per_capita_rank = 114th | Gini = 38.3 | Gini_year = 2023 | Gini_change = increase <!--increase/decrease/steady--> | Gini_ref = <ref>{{cite web|title=GINI index (World Bank estimate) – Indonesia|url=https://data.worldbank.org/indicator/SI.POV.GINI?locations=ID|publisher=[[World Bank]]|access-date=2021-04-15|archive-date=2019-12-19|archive-url=https://web.archive.org/web/20191219060113/https://data.worldbank.org/indicator/SI.POV.GINI?locations=ID|url-status=live}}</ref> | Gini_rank = | HDI = 0.713 | HDI_year = 2022 | HDI_change = increase <!--increase/decrease/steady--> | HDI_ref = <ref name="UNHDR">{{cite web|url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2023-24reporten.pdf|title=Human Development Report 2023/24|language=en|publisher=[[United Nations Development Programme]]|date=2024-03-13|page=289|access-date=2024-03-13|archive-date=2024-03-13|archive-url=https://web.archive.org/web/20240313164319/https://hdr.undp.org/system/files/documents/global-report-document/hdr2023-24reporten.pdf|url-status=live}}</ref> | HDI_rank = 112th | currency = [[Indonesian rupiah]] (Rp) | currency_code = IDR | time_zone = [[Time in Indonesia|various]] | utc_offset = +7 to +9 | date_format = DD/MM/YYYY | drives_on = left <!--Note that this refers to the side of the road used, not the seating of the driver--> | calling_code = [[+62]] | cctld = [[.id]] }} '''Indonesia''' iono dikau Republik nironon Republik Indonesia,Ibu Negara ni Jakarta.Bilangan penduduk ni santak ratusan juta orang.Penduduk ni terdiri lua'berbagai suku koh etnik, tetapi semimon rakyat ni betutur ngguno Bahasa Indonesia.Bahasa Indonesia tu Pan berasal luah tah Bahasa Melayu Riau Lama. === Tungan Metelak === {{Reflist}} f4sfixrd2r33bhkgj9bsw8ylzrk4esf Ingko 0 556 4087 1901 2024-08-09T09:40:15Z JhsBot 61 Pywikibot touch edit 4087 wikitext text/x-wiki Ingko tu dikau bahagian paling embuli diom tubuh setiap binatang. 4w1a961mnx7liqkfkwfoqkjynnsod27 Ipol 0 557 4455 1908 2024-08-10T03:18:16Z Zahirulnukman 5 update 4455 wikitext text/x-wiki '''Ipol''' iyo no sejenis tonomon saka numping [[pom]] diam genus [[Malus]] diom keluarga Mawar([[Rosaceae]]), ko' pan tonomon tu paling iko tinonom ta' junya. [[Kategori:Ipol]] ngziphqosy0x5k0xfdbnltscrgfs0rk Islam 0 558 4454 1912 2024-08-10T03:16:48Z Zahirulnukman 5 kemasan 4454 wikitext text/x-wiki Islam tu bermaksud selamat, ugama boi boo Nabi Muhammad untuk menyelamat manusia lua' tah kesempitan koh kesusahan lum diom dunia ngogo tah keoyoon koh kesangan dunia koh akhirat.Perambaan sesomo makhluk ngogo tah perambaan koh keoyoon Allah SWA. gu2ie87bq90ytt7uyqxn33h5pwfrkfk Ismail Sabri Yaakob 0 559 4698 4463 2024-08-19T16:22:03Z Umboh Tuhan 194 + Tungan metelak 4698 wikitext text/x-wiki '''Ismail Sabri Yakoob''' penenakan 18 Januari 1960. Iyo tu dangan peguam ko' ahli politik malaysia boi nilantik jadi [[Perdana Menteri Malaysia]] ke-9 ko' berkhidmat sebeta 15 buan lua' Ogos 2021 sampay November 2022. ta' peringkat parti, iyo ialah naib Presiden UMNO lua' 2018 sampay 2023. Iyo boi nilantik ta' buan Ogos taun 2021 boi jadi dikau detik sejarah apabila iyo jadi Perdana Manteri Malaysia yang boi lahir lapas kemerdekaan taun 1957 ko' bagas ketua pembangkang boi kule' jawatan e. Iyo pan dau pon ngentan jawatan jadi Timbalan Perdana Menteri ko' Menteri Kanan Keselamatan lua' pentadbiran bagas menteri ke-8, iyo e Tan Sri [[Muhyiddin Yassin]] diom waktu pandemik COVID-19 moko' sebagai Menteri Kemajuan Luar Bandar ko' Wilayah lua' pentadbiran bagas Perdana Menteri ke-6, [[Najib Razak]]. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] b4hyixl2io3uguxtywdalk83kjzwsud Jakat Pitra 0 560 4557 1920 2024-08-12T10:28:22Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q4917977]] 4557 wikitext text/x-wiki '''Jakat pitra''' iyo noh jakat '''badan, jakat poso, jakat Ramadan, kok zakat Pitri''' yang binanan untuk masa torong Ramadan engko pan masa Hari Raya Aidilfitri. Hukum jakat pitra tu wajib binuat oleh jomo Muslim syarat yang syarat ni: # Agama ni Islam (engai murtad) # Un akal # Lum masa sebahagian Ramadan kok sebahagian Syawal knoro06d949ccghli6qxwtr69nod76v Jamal Abdillah 0 561 4686 4558 2024-08-19T16:15:48Z Umboh Tuhan 194 + Tungan metelak 4686 wikitext text/x-wiki {{Infobox person|honorific_prefix=[[Malay styles and titles|Yang Hormat]] [[Datuk|Dato']]|honorific_suffix=[[Orders, decorations, and medals of Pahang|DIMP]]|title=|image=Jamal Abdillah.jpg|imagesize=200px|caption=During Anugerah Juara Lagu 23|native_name={{lang|ms|{{Script|Arab|جمال عبيدﷲ}}}}|name=Jamal Abdillah|birth_name=Jamal Ubaidillah bin Haji Mohd Ali|birth_date={{birth date and age|df=y|1959|5|7}}|birth_place=[[Teluk Intan|Telok Anson]], Perak, [[Federation of Malaya]], (now Teluk Intan, Perak, Malaysia)|nationality=|occupation=Singer, actor|years_active=1973–present|spouse={{plainlist| * Basariah Abdul Latiff (divorced) <br> Noraina Che Yusoff (divorced) <br> Fatimatuzahra Abdul Samad (divorced) * {{marriage|Datin Zai Izzati Khiruddin|2017|}} }}|other_names={{Ubl|Jamal Abdillah|King of Pop Malaysia}}|children=4|relatives=Jamilul Hayat & Helmi Hussaini (Brothers)|father=|mother=|module={{Infobox musical artist | embed = yes | background = solo_singer | instrument = Vocals | genre = Pop, Traditional Malay | label = EMI Warner Music Malaysia }}}}Dato' Jamal Ubaidillah Haji Mohd Ali lebih tekilo ko' oron Jamal Abdillah (penenakan 7 mei 1959) iyo tu dangan pelego' dela ta' Malaysia.iyo mula tekilo masa ni boi jadi pemanang Pertandingan Bintang RTM 1979.Lapas a', oron ni makin menik sebab ni lagu-lagu ni makin popular dokon "Perpisahan Tanpa Relamu","Azura","Sandarkan Pada Kenangan" ko' iko lagi. Iyo tu antara pelego' Malaysia yang kulek muat almbum solo ta' setiap 4 dekad setuut-tuut selain Dato' M.Nasir ko' debagi artis pelego' lain.Iyo pan tarus nuut ta' bidang lakunan mokok boi ngelakun mendangai filem pesak panggung dokon Azura mokok Kekasih Awal Dan Akhir.Iyo pan kulek gelaran Raja Pop Malaysia. sebeta kerjaya ni iyo tu boi kulek gelaran persembahan vokal terbaik seiko menduo. Anak-anak ni,Zaki Yamani ko' Osama Yamani nerus perjuangan ni diom bidang muzik. '''[[Keluman Awal]]''' Jamal Abdillah boi penenakan beta lau amis bersomoon 28, syawal(10),1378,7 mei 1959 ta' Teluk Intan, Perak.Iyo boi kulek pendidikan awal ni ta' dembua' sekul tena' mu' Brunei. Iyo kemudian ni nuut ta' ma' ni mulek Malaysia tarus narus sekul menengah ni ta' Sekulah Menengah Seri Perak,Teluk Intan.Bakat diom diri ni iyo no bakat semula jadi.Iyo nyiak boi kulek pendidikan formal diom bidang muzik. Dik ni, Helmi Hussaini Ali boi kerjo penok masa diom bidang lakunan tapi betiru beranti no. '''[[Diskografi]]''' '''Album studio:''' -Perpisahan Tanpa Relamu (1980) -Derita Cinta (1981) - Hatiku Luka Kembali (1982) -Layang-Layang (1983) -Sendiri (1984) -Mati Hidup Semula (1986) -Untukmu (1988) -Sepi Seorang Perindu (1989) -Seniman Menangis (1990) -Jamal (1991) -Penghujung Rindu (1994) -Suratan Kasih / Penawar Kasih (1995 / 1997) -Samrah (1998) -Segala Cinta (2002) -Aku Penghibur (2005) -Tak Hilang Cinta (2009) -Raja Pop 2 (2011) == Tungan metelak == {{Reflist}} [[Kategori:Pelego' Malaysia]] iyfs20eo2n3e5kja4okjb48lhwhafse Jambatan 0 562 4089 1932 2024-08-09T09:40:18Z JhsBot 61 Pywikibot touch edit 4089 wikitext text/x-wiki '''Jambatan''' dikau kemudahan ta' semimon jomo [[peketa' laan]].contoh ni peketa' tak '[[suang]]'.Jambatan pan muan [[kesanangan ta' jomo selalu luman tanak]].<ref>https://ms.wikipedia.org/wiki/Jambatan</ref> == Tungan metelak == {{Reflist}} kkv98fv24w1n54qhdkc1xwbjj4ry6ms Jantung 0 563 4090 1938 2024-08-09T09:40:19Z JhsBot 61 Pywikibot touch edit 4090 wikitext text/x-wiki Jantung tu iyo no organ yang penting tak jomo, pasal ni iyo ngepam laak tak dikau badan.<ref>https://ms.m.wikipedia.org/wiki/Jantung</ref> == Tungan metelak == {{Reflist}} 5yduvu61cklpcyk4kzf02uzfrbisdtu Jari 0 564 4091 1941 2024-08-09T09:40:20Z JhsBot 61 Pywikibot touch edit 4091 wikitext text/x-wiki Jari iono bagian anggota tangan yang terdiri luah jari temboro', jari penunduk,jari mangat,jari manis koh jari kelingking. pvz6vdrs88wyr6iurzp6v0fd46wqrr2 Jari mangat 0 565 4092 1944 2024-08-09T09:40:20Z JhsBot 61 Pywikibot touch edit 4092 wikitext text/x-wiki '''Jari mangat''' iyo no jari ke telu tak tangan jomo kebioson ni jari terlangkau tak jomo,ninak antara [[jari telunjuk]] ko [[jari manis]] g2gpzph7hdi2nfbo20blpcg55101bjg Jari manis 0 566 4093 1947 2024-08-09T09:40:21Z JhsBot 61 Pywikibot touch edit 4093 wikitext text/x-wiki '''Jari manis''' iyo no jari tangan yang boi ninak tak antara [[jari kelengkeng]] ko [[jari mangat.]] 4gpdkz34bewe201l7v5m5iaah6zmzx6 Jari temboro 0 567 4094 1950 2024-08-09T09:40:21Z JhsBot 61 Pywikibot touch edit 4094 wikitext text/x-wiki Jari temboro tu iono jari yang paling pendok koh bagal saiz ni,kegunoon ni untuk cop jari temboro diom surat perjanjian koh lain-lain kegunoon, teposok no pemekitoon sebagai simbol koh tanda alap. 54geislrcmc4u032umegocdy1tlf8k1 Jihan Muse 0 568 4559 1955 2024-08-12T10:28:27Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q20456383]] 4559 wikitext text/x-wiki {{Infobox person | name = Jihan Muse | image = | birth_name = Nur Jihan binti Musa | birth_date = {{Birth date and age|1983|8|29}} | birth_place = [[Hulu Langat]], [[Selangor]], [[Malaysia]] | nationality = | other_names = | occupation = Pelawak, pelakon, pengacara | years_active = 2009–kini | spouse = {{Marriage|[[Ungku Hariz]]|2016}} | height = {{Height|ft=4|in=10.4}} | parents = | relatives = | partner = | children = 2 }} '''Nuur Jihan binti Musa''' (boi penenakan 29 Ogos 1983) iyo tu dangan pelawak, pelakun kok pengacara Malaysia kok iyo tu bagas peserta Raja Lawak musim ketelu ngo' beliau manang naib pemanang s67frhv5c26w622qukk3j44satci1vd Jihan muse 0 569 1957 1956 2024-08-09T09:24:24Z Jon Harald Søby 58 1 semakan diimportkan 1956 wikitext text/x-wiki #REDIRECT [[Jihan Muse]] hg5463cuclh6ntbx69xc4h633gkbux0 Juhar Mahiruddin 0 570 4707 4462 2024-08-19T16:24:24Z Umboh Tuhan 194 /* Tungan metelak */ 4707 wikitext text/x-wiki '''Tuan Yang Terutama Tun Datuk Seri Panglima Juhar Mahiruddin''' lahir 5 November 1953 ta' Pulau Tambisan, Sandakan, Sabah. Beliau iyo no [[Yang di-Pertua Laat Sabah]] ke-10 mula 1 Januari 2011. Beliau been kelulusan Ijazah Sarjana Muda Undang-undang lua' Universiti Wolverhampton.<ref>https://archive.is/20130415112753/http://www.mysarawak.org/2011/01/02/former-speaker-juhar-mahiruddin-sworn-in-as-10th-sabah-governor.html</ref> == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] [[Kategori:Yang di-Pertua Laat Sabah]] r1pe71fb98intu8dcpxx1m2ezn3ff4v Kaban 0 571 1965 1964 2024-08-09T09:24:24Z Jon Harald Søby 58 1 semakan diimportkan 1964 wikitext text/x-wiki Tung jomo dau dau ngena’ badu, olos ko’ iyan jo barang bergo mediam ni. Jomo betiru ngena’ badu makai lemari. qm3p8d589bdfup07ngianltwws263fa Kabau 0 572 4095 1979 2024-08-09T09:40:23Z JhsBot 61 Pywikibot touch edit 4095 wikitext text/x-wiki Kabau iyono binatang sejinis krustasea dekapod lua' ta' infraorder Brachyura yang buli' ni rojo pendok. Badan-badan binatang tu peno' ole' eksoskeleton kapal engko lengkap ole' depasang kuku chelae. Un 850 sepisis kabau yang bau tinemu kok bau tekilo lum bofh2fh5tl71ddvql8wk4y8ofqnu2o1 Kadut 0 573 4096 1982 2024-08-09T09:40:24Z JhsBot 61 Pywikibot touch edit 4096 wikitext text/x-wiki '''TAJUK''' '''Kasut''' 7dd1ld9rafcr8pxyrmolvdxbtfje8al Kambul 0 574 4098 1984 2024-08-09T09:40:24Z JhsBot 61 Pywikibot touch edit 4098 wikitext text/x-wiki Kambul iyono dikau olos lema' yang oyo ginuno untuk penongkop badan. Kambul bioso ni pinakai amun jomo turi. Kambul pan ginuno amun jomo osok sajuk. n8r9cqo6ayeb65n70ms3vdazc07mfk7 Kamilia Ibrahim 0 575 4705 4664 2024-08-19T16:24:01Z Umboh Tuhan 194 + Tungan metelak 4705 wikitext text/x-wiki [[Fail:Datuk Kamilia binti Dato' Ibrahim.jpg|thumb|Datuk Kamilia binti Dato' Ibrahim pada 2021]] '''Datuk Dr. Kamilia binti Dato’ Ibrahim''' iyo no jomo politik yang daras mediam [[Malaysia]] ko' pan daras ngamal undang-undang sivil ko' Syaria ta' Malaysia. Iyo tu bagas Senator ta' [[Dewan Negara Malaysia|Dewan Negara]], dewan tertinggi Parlimen Malaysia engko' pan bagas Timbalan Ketua Sayap Wanita untuk [[UMNO|Pertubuhan Kebangsaan Melayu Bersatu Malaysia]] (UMNO). Enggai e jo, iyo pan bagas Ahli Majlis Tertinggi UMNO lua' 2011 koon 2013 sebelum boi ngena' peningkoon ni secara sukarela lua' UMNO. Jadi, iyo boi bertanding jadi calon bebas untuk laat ni dediri muh parlimen Kuala Kangsar masa Pilihan Raya Umum 2013. Betiru, iyo tekilo mediam ahli [[Parti Islam Se-Malaysia]] (PAS) lau 2018 lagi. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] f6dnkuwnreotkzbtkno5marug9ya53f Kandis 0 576 4099 1994 2024-08-09T09:40:26Z JhsBot 61 Pywikibot touch edit 4099 wikitext text/x-wiki Kandis iyono lubang dediki ta' papa antawa ling Melayu lesung pipit. d1caq40roip7zwhl94yyxjxxjoiamss Kansang 0 577 1996 1995 2024-08-09T09:24:27Z Jon Harald Søby 58 1 semakan diimportkan 1995 wikitext text/x-wiki Eyo no perbuatan enggo no lau-lau binuat. mibgkb611djn9vsu0ykb6vgg7mnbhzx Kaoru 0 578 4100 1998 2024-08-09T09:40:26Z JhsBot 61 Pywikibot touch edit 4100 wikitext text/x-wiki Kaoru penanakan ta Perak pada 4 Februari 1982. iyo no mula kerjo sebagai kartunis ta syarikat Kumpulan Art Square menerus majalah Gempak. Antara karya iyo yang pertama iyo Siri Maskeret Cinta. pada taun 2004 iyo hadir dangan karya bau iaitu Helios Eclipse yang bertemakan dunia fantasi yang disirikan ta mediang majalah Starz yang kemudian pindah pu majalah Gempak. Pada taun 2009 se e Helios Eclipse berakhir, boi iyo no cipta karya bertemakan pembantu rumah iaitu Maid Maiden boi disirikan mediang ta majalah Gempak, betiru tu boi dijadikan novel grafik bersiri. Karya iyo no betiru ialah My Secret Bodyguard yang mediang disirikan d majalah Gempak dan betiru boi didapati mediang novel grafik bersiri. o59lk5mg9mpnrblumtqu839gtzcqsf1 Kap-kap 0 579 4101 2001 2024-08-09T09:40:27Z JhsBot 61 Pywikibot touch edit 4101 wikitext text/x-wiki Kap-kap ma'na ni suka' mura' nia' bengen isi. 1ib5lam16t4n5581az2nh79chbhbb7s Kapsit 0 580 4102 2004 2024-08-09T09:40:27Z JhsBot 61 Pywikibot touch edit 4102 wikitext text/x-wiki Kapsit iyono nuut ta' tim dembila', pesurang. 4fn0g7zhni53ka7evexml7gjws4m36h Kar-kar 0 581 4103 2006 2024-08-09T09:40:28Z JhsBot 61 Pywikibot touch edit 4103 wikitext text/x-wiki Kar-kar tu iyo no tuturan jomo oyo maksud ni jomo tembirang betutur. Jomo gitu tu kadang iko niak makai ni karna iyo selalu melanga-langa tuturan ni sampai pan jomo endo atai ole tuturan ni. Kar-kar tu harus elak ti ta’ kalagan ti karna iyo buli jadi sampa masarakat. 27tn1kcpngote3rdn0phck0n54k7nh6 Karau 0 582 4104 2009 2024-08-09T09:40:28Z JhsBot 61 Pywikibot touch edit 4104 wikitext text/x-wiki Karau iyono titoo santak rungai soro ni. 2p1lkzswxjce4j2y47eepiydr2f3ze6 Karau-karau 0 583 4105 2012 2024-08-09T09:40:29Z JhsBot 61 Pywikibot touch edit 4105 wikitext text/x-wiki Karau-karau iyono titoo bana. dhm9m2zr3vq132qk3qltc4l2cjcj236 Katis 0 584 4106 2015 2024-08-09T09:40:29Z JhsBot 61 Pywikibot touch edit 4106 wikitext text/x-wiki Katis ma'na ni abis. htq5k7unp2o1wsy42bvsbc0mkfcy1ri Kaus 0 585 4107 2018 2024-08-09T09:40:30Z JhsBot 61 Pywikibot touch edit 4107 wikitext text/x-wiki Kaus ma'na ni pedi atai ni, uun kok samsi' ni. ce1h64pcr9rp2dly25g4bjn7toqrfpj Kejerangan 0 586 2020 2019 2024-08-09T09:26:13Z Jon Harald Søby 58 1 semakan diimportkan 2019 wikitext text/x-wiki '''Kejarangan''' iyo noh dikau perbuatan yang niya teliti ataupan jomo yang rojo pengelipat. ndskyng1qpe839q4bpuiqu1srmrnfmv Kekapeh 0 587 4108 2027 2024-08-09T09:40:32Z JhsBot 61 Pywikibot touch edit 4108 wikitext text/x-wiki Kekapeh tungan tomok bangan buh , amun mandi niak bersi iyo akan buan , Buan ni lesam lesam , oron ni buan bungkak . Un petua samah marak amun ingin ngalak buan bungkak makai apoh atau pan makai pewangi kekapeh pk4q1fclcfpzndphme5sfq2jz14zrcm Kekayau 0 588 4109 2030 2024-08-09T09:40:32Z JhsBot 61 Pywikibot touch edit 4109 wikitext text/x-wiki Kekayau binuat amun badan kineket oleh namuk atau pan benda benda kotol , Amun terso no kineket nyaun jalan lain selain kinayau . obloigq9nfsdywaxdt5imy8aznh5v1o Kekuran 0 589 4110 2034 2024-08-09T09:40:33Z JhsBot 61 Pywikibot touch edit 4110 wikitext text/x-wiki '''Kekuran''' tu dikaw pekakasan jomo Sama beguno untuk ngukur suka' too. Kekuran tu batang ni langkaw, tekook ni ben moto binuat makay besi neronon moto Kekuran. Amun ngukur, batang kekuran tu teningkoon endo nya' peginsar beta' ngukur suka. Suka kinukur tu binuat santan pemapi gulay, diing, bubur antawa tenanak binuat santan. c2t44jzshmyqjl1u2lhc3f15qchn27h Kekuri 0 590 2036 2035 2024-08-09T09:26:15Z Jon Harald Søby 58 1 semakan diimportkan 2035 wikitext text/x-wiki Eyo no perbuatan tungan ti gangau beta' nyaun binuat atau pinau mediam melayu ni riada dmy1ybhp0vtfluxl4vvf8wnoeo85gkf Kelekati' 0 591 4111 2038 2024-08-09T09:40:33Z JhsBot 61 Pywikibot touch edit 4111 wikitext text/x-wiki Kelekati' iyono dikau benda yang ginuno untuk pemila' barang keros kok buah keros masam kok buah pinang. Kelekati' tu binuat lekat ta besi, langkau ni boi terua tetap 10 ngabut 22 sentimeter. Lek muat kelekati' tu susa' dari muat keris kok guk. Kelekati tu pan mesti ben kepekaran langa' kok lolom ngabut un jomo 10 tau yang boi ngendo letian untuk muat kelekati yang sempurna. jc4umxmxhws98k0wgg1au7f7w4nlyw0 Kelok begoon 0 592 4112 2043 2024-08-09T09:40:34Z JhsBot 61 Pywikibot touch edit 4112 wikitext text/x-wiki Kelok begoon iyono tana' antawa laan iko bana lengkubang ni, tana' nia' rata, lengkubang gibang kuanan. 4eyd4gs0iyy1a65nltyskvz8eu7s8co Kelong 0 593 4113 2045 2024-08-09T09:40:34Z JhsBot 61 Pywikibot touch edit 4113 wikitext text/x-wiki Kelong iyono begian yang ngubung tikok kok badan. Tak bongon aiwan, kelong buli tomok langkau masam kok zirafah. Pian kok pian pan, bokok kelong tetap un pitu bokok. Mediam kelong ben seluran penepasan kok pensernaan. t17gwadqmotegwauq8d23e9c3ddb6no Keluarga 0 594 4560 2053 2024-08-12T10:28:29Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q8436]] 4560 wikitext text/x-wiki '''Kelurga''' iyo no dikau' kumpulan jomo yang sehubung lua' dikau' [[laa']] [[Kategori:Keluarga]] o3kguryxt3kl21xr44fjvjx4ixyjg05 Kemuap 0 595 3885 2055 2024-08-09T09:29:31Z Jon Harald Søby 58 2 semakan diimportkan 2054 wikitext text/x-wiki '''Kemuap''' iyo noh dikau masa antara jam 2 kemuap sampai 8 songom atau moto lau petenab. 48rzxa8mohvdatlkjxv5ju1znvwjvii Kendadu 0 596 4114 2058 2024-08-09T09:40:35Z JhsBot 61 Pywikibot touch edit 4114 wikitext text/x-wiki Kendadu iyono dikau pekakas ngunsi' beluang ruma'. krf8mrzbmbk3srqz550y5vdoxlw70d2 Kendoon Kasi 0 597 4115 2061 2024-08-09T09:40:36Z JhsBot 61 Pywikibot touch edit 4115 wikitext text/x-wiki Kendoon kasi tu perembaan Bajau Sama ma'na ni ai ngemban, matai. lx2ddqg9pgd5ampt51lcrbndwz51gbb Kenelimut 0 598 4116 2065 2024-08-09T09:40:36Z JhsBot 61 Pywikibot touch edit 4116 wikitext text/x-wiki Kenelimut ma'na ni terua' tipu, tenipu, kenekalan. tu5v17t4coywmyicvlacblieuhtudv8 Kepayas 0 599 4561 2071 2024-08-12T10:28:31Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q34887]] 4561 wikitext text/x-wiki {{Speciesbox | name = Papaya | image = Koeh-029.jpg | image_caption = Plant and fruit, from Koehler's ''Medicinal-Plants'' (1887) | status = DD | status_system = IUCN3.1 | status_ref = <ref name=IUCN>{{Cite iucn | author = Contreras, A. | title = ''Carica papaya'' | page = e.T20681422A20694916 | year = 2016 | access-date = 4 January 2022}}</ref> | genus = Carica | species = papaya | authority = [[Carl Linnaeus|L.]]<ref name=grin>{{Cite web |url=https://npgsweb.ars-grin.gov/gringlobal/taxonomydetail.aspx?9147 |title=''Carica papaya'' L. |publisher=U.S. National Plant Germplasm System |date=9 May 2011 |access-date=5 September 2017}}</ref> }} [[Fail:Papaya halves.jpg|thumb|Kepayas]] '''Kepayas''' iyo no dikau buah yang eko dikau tak asean iyo no tumbuhan berasal lua' Mexico Selatan namun demikian poon di tenonom tak hampir sememon [[negara]] beriklim tropika. == Tungan metelak == {{Reflist}} m3o8vjc5co8kf7ydd70oqqvf5vs8u1v Keperusan 0 600 4117 2074 2024-08-09T09:40:38Z JhsBot 61 Pywikibot touch edit 4117 wikitext text/x-wiki Keperusan ma'na ni kebisan sabar, nia' no sabar. 6s6lqbwiaqdgysm8omwej4i9h41xlsa Kepesan 0 601 2076 2075 2024-08-09T09:26:19Z Jon Harald Søby 58 1 semakan diimportkan 2075 wikitext text/x-wiki Kepesan iyono tejadi dediri yang enggo jomo kepesan nyiak nedaran diri ni 0bxi0t72fa254xazdb2u5vjknliw0fj Kera' 0 602 4118 2079 2024-08-09T09:40:38Z JhsBot 61 Pywikibot touch edit 4118 wikitext text/x-wiki Kera' ma'na ni tana' tomoon berangkas. 7v09txw2x6j1i9drwhfw6enq62pncg3 Kerabau 0 603 4119 2081 2024-08-09T09:40:39Z JhsBot 61 Pywikibot touch edit 4119 wikitext text/x-wiki Kerabu iyono sejinis binatang bovid bagal yang asalni lekat takl' Asia Selatan, Asia Tenggara kok China. Betiru sepisis onan pan tinemu ta' Eropah, Australia, Amerika Utara, Amerika Selatan kok dangai negara Afrika. 87dnnxrmalo71gtaagob7upncmuj1i2 Keratas 0 604 4562 2088 2024-08-12T10:28:34Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q11472]] 4562 wikitext text/x-wiki [[Fail:Paper_450x450.jpg|250px|thumb|Keratas]] '''Keratas''' eyo tu [[bahan nipis kok rata]].Keratas tu terhasil [[moko' cara penekanan ta' gentian]].Gentian diguno [[gentian semulo jadi]].<ref>https://ms.wikipedia.org/wiki/Kertas</ref> == Tungan metelak == {{Reflist}} e7anh7r09gm8e6n6xgefd13qqrxk8q0 Kerita 0 605 4563 4120 2024-08-12T10:28:37Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1420]] 4563 wikitext text/x-wiki [[Fail:Bundesarchiv_Bild_183-J0711-0001-003,_Warnemünde,_Stau.jpg|thumb|Kerita]] '''Kerita''' tu pinakai tebeta' ti ingin luman lua' dikau tungan ngogo tungan debagi. Kerita tu un iko inda jinis, enggo no un bagal, diki' pendok ko' langkau. Kerita tu (tinaat [kĕ.ré.ta], [[Jawi]]: ‏كريتا‎‎; [[ling Inggeris]]: ''car'') ataupan '''automobil''' (ling Inggeris: ''automobile'') eyo no kenderan empat tayar (bioso ni) enggo no un injin. Kerita tu un tungan ningko'. 72fn6n91gr5nfvgsq5yxlmy6i55d050 Kerusi' 0 606 4121 2098 2024-08-09T09:40:41Z JhsBot 61 Pywikibot touch edit 4121 wikitext text/x-wiki '''Kerusi''' tu sejenis perabot tungan [[ningko]] . Eyo un tungan nandar . Kerusi tu un empat batang betis tungan nangga tak lantai. o8wyrtajkp5id86n0kypi5s8x5x804r Kesukangan 0 607 4122 2101 2024-08-09T09:40:41Z JhsBot 61 Pywikibot touch edit 4122 wikitext text/x-wiki Kesukangan iyono manas, pedi atay ni. 3gd5g61bhuqxt00hhx8ciqnmsh1sraw Keteraan 0 608 4123 2104 2024-08-09T09:40:41Z JhsBot 61 Pywikibot touch edit 4123 wikitext text/x-wiki Keteraan iyono tampat boi binuat tungan manuk ngentelo dokon paak, tembusa' antawa raga'. luizuxlw92mkav9tncbrfzh22c7ezoi Kili' 0 609 4124 2107 2024-08-09T09:40:42Z JhsBot 61 Pywikibot touch edit 4124 wikitext text/x-wiki '''Kili'''' tu dikau [[alat serudung]] ginuno untuk manas buek. Manas buek untuk muat teh, kupi kok sebagai ni. bziho700rskkovtat1b0vx3800mbzjs Kima 0 610 4125 2109 2024-08-09T09:40:42Z JhsBot 61 Pywikibot touch edit 4125 wikitext text/x-wiki Kima iyo Jenis Kerang Laut yang serupo Makanan Tradisional Bajau Pantai Timur [[Sabah Tanah Airku|Sabah]].Bajau Pantai Timur yang semimang ni tekilo sebagai “Sea Gypsies” amat handal diam menyelam engko pan selalu kulek kima sebagai makanan ni,kelebihan kima tu buli kinakan sama ada cara matah atau pan penapi senegul engko gulai cth ni gulai tarum ,gulai batung mahu pan gulai kubis dan sebagai ni. 8kvfhrd56fba3zqmz36dcc4fyu4xonk Kimpot 0 611 4126 2112 2024-08-09T09:40:43Z JhsBot 61 Pywikibot touch edit 4126 wikitext text/x-wiki Kimpot iyono nonom tonomon sesikot sikot. 25188us1m081ikc16j2281wwpsqs8iw Kisap 0 612 4564 2116 2024-08-12T10:28:39Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q107016646]] 4564 wikitext text/x-wiki '''Kisap''' alap bana reso ni amun pinesegul engko' buas luuk entelo. Kisap tu buli pan binuat sambal lodo amun nunu diing kisap tu no paling alap sasa ni. smnd918j11g8u7jslwr1tnhqs1ymanc Kool 0 613 4127 2119 2024-08-09T09:40:44Z JhsBot 61 Pywikibot touch edit 4127 wikitext text/x-wiki Kool tu penyakit boi benoo leh virus penyebab kotol diom kelong. 0f0fpot4lyppc0il8aad0qxq94gyvq1 Kota Belud 0 614 4565 2125 2024-08-12T10:28:41Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1785358]] 4565 wikitext text/x-wiki {{For|the federal constituency represented in the Dewan Rakyat|Kota Belud (federal constituency)}} {{EngvarB|date=November 2017}} {{Use dmy dates|date=November 2017}} {{Infobox settlement | name = Kota Belud | official_name = Pekan Kota Belud<br />{{Nobold|Kota Belud Town}} | native_name = | native_name_lang = | translit_lang1 = Other | translit_lang1_type1 = [[Jawi script|Jawi]] | translit_lang1_info1 = كوتا بلود | translit_lang1_type2 = [[Chinese language|Chinese]] | translit_lang1_info2 = {{Lang|zh-hans|古打毛律}} {{Font|size=70%|([[Simplified Chinese characters|Simplified]])}}<br />{{Lang|zh-hant|古打毛律}} {{Font|size=70%|([[Traditional Chinese characters|Traditional]])}}<br />''Gǔdǎ Máolǜ'' {{Font|size=70%|([[Hanyu Pinyin]])}}<br />''Kó͘-táⁿ Môo-lu̍t'' {{Font|size=70%|([[Hokkien language|Hokkien]] [[Pe̍h-ōe-jī|POJ]])}}<br />''Gu2 Daa1 Mou4 Leot6'' {{Font|size=70%|([[Cantonese]] [[Jyutping]])}}<br />''Kú-tá Mâu-lu̍t'' {{Font|size=70%|([[Hakka language|Hakka]] [[Pha̍k-fa-sṳ]])}} | settlement_type = Town and [[List of capitals in Malaysia#District capitals|district capital]] | image_skyline = KotaBelud Sabah -TownView-01.jpg | image_alt = Kota Belud gateway | image_caption = Gateway marking the southern entrance to Kota Belud. | image_map = SabahDistricts-Kota Belud-pp.png | image_seal = File:The Seal of Kota Belud District Council.png | etymology = | nickname = | coordinates = {{Coord|6|21|00|N|116|26|00|E|region:MY|display=inline, title}} | subdivision_type = [[Countries of the world|Country]] | subdivision_name = {{Flag|Malaysia}} | subdivision_type1 = [[States and federal territories of Malaysia|State]] | subdivision_name1 = {{Flag|Sabah}} | subdivision_type2 = [[Divisions of Malaysia|Division]] | subdivision_name2 = [[West Coast Division|West Coast]] | subdivision_type3 = [[List of districts in Malaysia|District]] | subdivision_name3 = [[Kota Belud District|Kota Belud]] | seat_type = | seat = | population_as_of = 2010 | population_total = 8,392 | area_total_km2 = 1385.6 | blank1_name = Tamu (Weekly Market) | blank1_info = Sunday }} '''Kota Belud''' dembua pekan ko’ daerah tak'''’''' bahagian pantai barat sabah [[Daerah Kota Belud]] tu pan sebuo pantadbiran awal paling toh’ tak negeri sabah.diam penduduk kerajaan british'''.''' 6zc6zy9icwowqism44pwgsbn0opqjqk Kota Kinabalu 0 615 4566 2132 2024-08-12T10:28:44Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q137271]] 4566 wikitext text/x-wiki Kota kinabalu iyo no ibu kuta bagi negeri Sabah. Kota kinabalu tu tungan tumpuan utama barang jomo yang pinau sebagai (KK) mo maksud Kota Kinabalu.<ref>https://ms.m.wikipedia.org/wiki/Kota_Kinabalu</ref> == Tungan metelak == {{Reflist}} pv7cfqkfjry80q3fewdgwwid8k08aey Kota Marudu 0 616 4567 2139 2024-08-12T10:28:47Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1011913]] 4567 wikitext text/x-wiki {{Infobox settlement | name = Kota Marudu | native_name = Pekan Kota Marudu | native_name_lang = ms | settlement_type = Town and [[List of capitals in Malaysia#District capitals|district capital]] | image_skyline = {{Multiple image | border = infobox | total_width = 290 | image_style = border:1; | perrow = 1/2/2 | image1 = Langkon Sabah Corncob-Roundabout-01.jpg | image2 = KotaMarudu Sabah PusatBandar-03.jpg | image3 = KotaMarudu Sabah PejabatDaerah-02.jpg | image4 = KotaMarudu Sabah TownPadang-01.jpg | image5 = RiversOfSabah SungaiSumbilingon-04.jpg }} | image_caption = '''From top, left to right:'''<br>Corncob Roundabout in Langkon Commercial Centre, Shophouse in Downtown, the District Office, Town Square, and Access to Town Road | image_map = SabahDistricts-KotaMarudu-pp.png | etymology = | nickname = | coordinates = {{Coord|6|29|23|N|116|44|10|E|region:MY|display=inline, title}} | subdivision_type = [[Countries of the world|Country]] | subdivision_name = {{Flag|Malaysia}} | subdivision_type1 = [[States and federal territories of Malaysia|State]] | subdivision_name1 = {{Flag|Sabah}} | subdivision_type2 = [[Divisions of Malaysia|Division]] | subdivision_name2 = [[Kudat Division|Kudat]] | subdivision_type3 = [[Districts of Malaysia|District]] | subdivision_name3 = [[Kota Marudu District|Kota Marudu]] | seat_type = | seat = | population_as_of = 2010 | population_total = 8,716 }} '''Kota Marudu''' iyo no dikau [[Pesaan tugan pentadbiran daerah ta' negeri sabah,malaysia.|pesaan tugan pentadbiran daerah ta' negeri sabah,malaysia]]. Kota Marudu kedudukan ni ta' [[Bagian Kudat]], [[Sabah]].<ref>https://en.wikipedia.org/wiki/Kota_Marudu</ref> == Tungan Metelak == {{Reflist}} obthqk6zq0sczyjop4lwdysw9ts8nkz Kuapu' 0 617 4128 2142 2024-08-09T09:40:46Z JhsBot 61 Pywikibot touch edit 4128 wikitext text/x-wiki Kuapu' ma'na ni nengkaan kepedean antawa rengot tangan antawa betis mengkak, gaut (gout). kdkia73gwxmy6t3cpokjrp70fi0viz9 Kucing 0 618 2144 2143 2024-08-09T09:26:26Z Jon Harald Søby 58 1 semakan diimportkan 2143 wikitext text/x-wiki Using tekilo mokok using paling imon. Iyo tu dikau spesies mamalia diki. Iyo keturunan Afrika. ''Felis silvestris lybica'' kok paling beta niimon amun iyo sino' ngejogo makanan lua' tikus. Betiru using no sala' dikau binatang paling sinayang tekilo tak Malaysia. lf3qyr10z8krekam0lblgwgvvtsy7yo Kui Jala 0 619 2147 2146 2024-08-09T09:26:26Z Jon Harald Søby 58 2 semakan diimportkan 2146 wikitext text/x-wiki '''Kui Jala''' iyo noh kui tradisional mitu Sabah terutama ni bengso Bajau Samah, Kota Belud Sabah. Kui tu binuat lua tepung buas yang ben bentuk ni dediri dokon mi halus tp reso ni mamis engko rangup. Cara muat ni, tepung buas akan pinesair nut sukatan dediri ni. Boi begeh tepung a sik akan pinosok mediam asuan ni lepas a ginuring mediam selan yang panas sampai noh ro ni kuning emas. Amun ngam noh datai ni, kui jala nindo boi begeh terus nilepot atai ginulung. Kui tu rojo alap kinakan engko kupi panas. hcfzcne3hnant0alrfj0vaozwbr6ql5 Kui Saging 0 620 4129 2149 2024-08-09T09:40:48Z JhsBot 61 Pywikibot touch edit 4129 wikitext text/x-wiki Kui Saging iyono lekat ta' saging yang ginuring makai tepung. Kui saging tu tekilo bana ta' Malaysia, Indonesia, Brunei kok Singapura. Kui tu bioso ni kinakan waktu sinsaung kok kemuap, kui tu pan niidang panas-panas. Saging tu bioso ni sinelup diam adunan sair kunyit kok tepung sebelum ginurinh diam selan. Betiru kikon ni kui saging niidanb kok keji, jam kok soklat. lb1fphs1babz38rnlg4e4277g56sqxe Kui Sinsin 0 621 2152 2151 2024-08-09T09:26:27Z Jon Harald Søby 58 2 semakan diimportkan 2151 wikitext text/x-wiki '''Kuih Sinsin''' iyo noh antara kui tradisional jomo Sabah. Kui Sinsin antara kui yang istimewa tak bengso Bajau Samah. Kui Sinsin binuat lua gula,gula nipah/gula apong,tepung buas, enselan, bue’ engko gula melaka. Sara muat ni, binentuk dokon ro’ sinsin sebelum sinelup mediam tepung buas boi begeh ginuring. Lepas a sinelup balik mediam tepung buas boi begeh ginuring balik supaya kui sinsin tu jadi rangup. gdwcqlqjahrckyun55g7lavxsa1nula Kui baulu 0 622 4568 2155 2024-08-12T10:28:49Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q7310467]] 4568 wikitext text/x-wiki Kui baulu tu kui tradisional jomo melayu bioso un masa raya kok hari keramaian. Kui baulu tu un pinedagang ta pasar. 4fibekf4xydl003inhm03nmjkp46b9c Kuih Jala 0 623 2161 2160 2024-08-09T09:26:28Z Jon Harald Søby 58 5 semakan diimportkan 2160 wikitext text/x-wiki Kui Jala iyo noh kui tradisional lua Sabah kok Sarawak mitu Malaysia. Kui tu binuat un asuan ni dediri. Warna kui tu darag keperangan engko reso ni dokon reso mamis-mamis. Tapi kui jala tu nyiak somo dokon roti jala muh Semenanjung Malaysia. 8wq4z9e5ognmzxgt1ooxdc7wg5gpvfj Kuih putu 0 624 2169 2168 2024-08-09T09:26:29Z Jon Harald Søby 58 7 semakan diimportkan 2168 wikitext text/x-wiki [[Fail:Kuih Putu atau Piutu.jpg|thumb|Kuih Putu Atau Piutu]] Kuih Putu iyo no mekito sala dikau mekanan tradisi suku kaum Bajau Pantai Timur ta’ [[Sabah]]. Engko’ iyo pan merupoi sala dikau somo engko Buas, iyo pan sebahagian Makanan Utama,Putu atau pan Piutu itu buli benuat sebagai makanan ganti Buas tak jomo to’o Suku Kaum Bajau lebi ingin mangan Putu bebanding engko Buas.Putu boi ni asil sepenuh ni lua tak Besina Kayu (ubi kayu) yang boi pinarut alus,Reso Putu tu ibarat dokon Ketul-Ketul engko pan un reso lesam dekit,yang sesuai kenakan engko Putu tu ieyo no sebagai Ding tenunu,Ding guring ,Ampap engko perbagai lauk tradisi Sabah.Bila mangan putu tu jomo nyak ginalak nginum Buek yang jenis berkarbonat supaya mengelakkan betong jadi nyak selesa ko ngelakkan betong nyak ngembung (kembung) . Rejukan https://www.google.com.my/search?q=kuih+tradisional+kuih+putu+sabah&client=safari&sca_esv=559279238&hl=en-my&ei=PHzlZLbqFYGhseMP9YCbiAM&oq=kuih+tradisional+kuih+putu+&gs_lp=EhNtb2JpbGUtZ3dzLXdpei1zZXJwIhtrdWloIHRyYWRpc2lvbmFsIGt1aWggcHV0dSAqAggAMgUQIRigATIFECEYoAEyCBAhGBYYHhgdMggQIRgWGB4YHUjRIVCmC1imC3ABeAGQAQCYAY4CoAGOAqoBAzItMbgBAcgBAPgBAcICChAAGEcY1gQYsAPiAwQYACBBiAYBkAYI&sclient=mobile-gws-wiz-serp 1v7272uw3f3gn6baw7gwgtjyiclrupk Kulam 0 625 4131 2173 2024-08-09T09:40:51Z JhsBot 61 Pywikibot touch edit 4131 wikitext text/x-wiki Kulam tu binuat luah tah tanah tungan melioro deeng,siar koh lain-lain.Betiru kolam buli bunuat luah tah kanvas/kem,gantian kasa atau Simin. 5rrd3wzg0nlaps80kkkjafto0zkgpm0 Kulit 0 626 4133 2176 2024-08-09T09:40:52Z JhsBot 61 Pywikibot touch edit 4133 wikitext text/x-wiki Kulit tu bgian badan manusia paling meluar terdedah yang tah saya motolau. 4tv5sxajzk8arbo0gmoh09qsza4mypy Kulit moto 0 627 4134 2180 2024-08-09T09:40:52Z JhsBot 61 Pywikibot touch edit 4134 wikitext text/x-wiki Kulit Moto tu bagian yang paling meluar moto,kegunoon ni nungkapan/ ngelindung moto luah tah habuk koh barang-barang bahaya untuk kesiatan moto. 33drohhlbesf5zduqd784ehwsrtwv40 Kulu 0 628 4135 2183 2024-08-09T09:40:53Z JhsBot 61 Pywikibot touch edit 4135 wikitext text/x-wiki Kulu antawa oron saintifikni '''Artocarpus altilis''' iyono dikau tenomon yang bebungo somo dokon nangka kok tebadak yang tomo' rabung ta' Malaysia. Tenomon tu mura' bana tomo' ta' minggo-minggo jo kewasan nyiak kiro tana' a subur antawa nyiak subur. Poon kulu tu un duo siri-siri iyono' bua' ni ngasil bigi kok nyiak ben bigi. Kulu ben bigi biosoni tekulek mediam taun, engko kulu yang bioso kakan ti iyono jinis nyaun bigi. q8uiczt43h24o8f025l6ano0rl0wfcq Kumbung 0 629 4776 4775 2024-08-19T17:14:24Z Umboh Tuhan 194 ''' 4776 wikitext text/x-wiki '''Kumbung''' ngerujuk ta' olod selubung yang ginuno penutup aurat kok badan dendo Muslim amun sembiang. Iyo tu guno ni untuk nutup dikau badan kesuali mo'. Rena kumbung yang ingin pinakai nut ta' jomo yang makai ni tapi sunnah ni makai rena pute' kerna Rasulullah SAW ngenginan pekaian rena pute'. == Tungan metelak == {{Reflist}} 6syu9t89b2i9ro8t21p29n86ju0z7w4 Kupi' 0 630 4137 2190 2024-08-09T09:40:54Z JhsBot 61 Pywikibot touch edit 4137 wikitext text/x-wiki '''Kupi''' eyo sejenis bueh yang sinegul engko [[bueh panas]]. Kupi tu pan boi binuat lua benih bigi kupi yang boi nilanggang.Akan dikau dunia no jomo tu ingin bana nginum kupi. 7cn2p0dby12q9wr0tctmt3ti2ccla65 Kupi' kupi' 0 631 4138 2193 2024-08-09T09:40:54Z JhsBot 61 Pywikibot touch edit 4138 wikitext text/x-wiki Kupi' kupi' ma'na ni tin dediki'. 3ej4vgclevethb64oojccdyezxcxrq9 Kuri kuri 0 632 4139 2196 2024-08-09T09:40:55Z JhsBot 61 Pywikibot touch edit 4139 wikitext text/x-wiki Kuri-kuri tu iyono dikau' perbuatan main-main. 1vmrvu3ayjjn9dhwbbmjsyn6h7aec1m Kurma 0 633 4140 2198 2024-08-09T09:40:55Z JhsBot 61 Pywikibot touch edit 4140 wikitext text/x-wiki Kurma iyono dikau poon palma diom genus Phoenix yang iko boi tinonom untuk kulek bua' ni. Le' sebab serita penenomon ni yang beta, teburan asal ni nyiak terati tapi togon pan asal ni lekat ta' dikau tungan mu' wahah gurun ta' Afrika Utara kok togon pan lekat ta' Asia Barat Daya. Poon kurma tu sedong-sedong sais ni, langa' ni 15-25 meter, iyo tekumpul kok dikau poon lekat ta' dikau sistem umbut dediri , tapi iyo tu pan selalu tomo' dediri ni. Dun ni pinau pinat, langkau ni 3-5 m, kok iting ni ta' petiol kok ben lebih kurang 150 dun diki, dun diki ni langkau 30 sm kok pekaran ni 2 sm. tnpe6z6mectm9wkarz2on7qb3p454jc Kuta Belud 0 634 4601 2201 2024-08-12T10:31:44Z Jon Harald Søby 58 Melencong ke [[Kota Belud]] 4601 wikitext text/x-wiki #redirect [[Kota Belud]] rjjkilj9hworsshko72aczkqlri7rme Kutak 0 635 4141 2204 2024-08-09T09:40:57Z JhsBot 61 Pywikibot touch edit 4141 wikitext text/x-wiki Kutak kikon kutak tu tungan jomo mesimpon barang amun niya muat tak big . kutak tu pan pinakai amun luman tio suntu ni menik kapal kutak ae binungkus engko gam endo niya ansur barang. Kutak tu iko bana jinis ni un bagal,diki,sedong sedong inda masam jinis ni. oi8t4qor9rc93q2xvhwour4yw7qxwl3 Kutu 0 636 4142 2207 2024-08-09T09:40:57Z JhsBot 61 Pywikibot touch edit 4142 wikitext text/x-wiki '''Kutu''' iyo no oron bioso untuk lebih 5000 spesies seringga nyak bersayap diom phthiraptera rzcx5pa60p4yjnjs7gnimn3y24yijnj Kuya' 0 637 4143 2209 2024-08-09T09:40:57Z JhsBot 61 Pywikibot touch edit 4143 wikitext text/x-wiki Diam ilmu sains, kuya' iyono rumpun primat haplorin ( " urung keroi") kuya' tu rumpun yang ben ingko kok un 260 sepisis yang kakal lum ngabut betiru. Kikon sepisis kuya' temban ta' poon kayu tapi un pan sepisis lum ta' tana' dokon babun. k84hi50suqx11wrvuq1oohmwd19eq2i Kuya' paung 0 638 4144 2212 2024-08-09T09:40:58Z JhsBot 61 Pywikibot touch edit 4144 wikitext text/x-wiki Kuya' paung iyono perembaan Sama ma'na ni jomo tabiat ni dokon kuya'. 3tz5rc899cn7dh0jxc42puqtttbl7cs Kylie Jenner 0 639 4659 4658 2024-08-18T15:50:22Z Umboh Tuhan 194 4659 wikitext text/x-wiki {{Infobox person|name=Kylie Jenner|image=Kylie Jenner2 (cropped).png|caption=Kylie Jenner pada 2017|birth_name=Kylie Kristen Jenner|birth_date={{Birth date and age|1997|8|10}}|birth_place=[[Los Angeles]], [[California]], [[USA]]|occupation=[[Model]], [[Personaliti media]]|nationality=[[USA]]|known for=''[[Keeping Up with the Kardashians]]''|years active=2007 - betiru|parents=[[Kris Jenner]]<br/>[[Bruce Jenner]]|relatives=[[Kendall Jenner]] <small>(kakak)</small><br/>[[Brody Jenner]] <small>(abang tiri)</small><br>[[Brandon Jenner]] <small>(abang tiri)</small><br/>[[Kourtney Kardashian]] <small>(kakak tiri)</small><br/>[[Kim Kardashian]] <small>(kakak tiri)</small><br/>[[Khloé Kardashian]] <small>(kakak tiri)</small><br/>[[Rob Kardashian]] <small>(abang tiri)</small>|signature=Kylie-Jenner-autograph.png}}'''Kylie Kristen Jenner''' (boi pinenakan 10 ogos taun 1997) iyo no endangan model, pengasara TV kok duta jenama ''Seventeen''. Kylie tu tekilo jomo luak ransangan reakiti E! ''Keeping Up with the Kardahias'' ko' keluargani. 6cgjtwhris142qxcmjc3bnd45x8ftmd Lala 0 640 4147 2221 2024-08-09T09:41:00Z JhsBot 61 Pywikibot touch edit 4147 wikitext text/x-wiki Lala ma'na ni turunan gai ampun. h6maai4m8ln3znlqthim6k0uokh88o4 Langau 0 641 4148 2223 2024-08-09T09:41:00Z JhsBot 61 Pywikibot touch edit 4148 wikitext text/x-wiki Langau iyono sejinis bobok yang buli lemiang. Langau mangan engko utaan buek ni ilo ni pelua kok sesap ni balik mekanan yang boi kakan ni posok mediam betong ni lekat ta' telingo ni. 2fo017ugzd4pu13o35oupnuohwwu7ja Latan 0 642 4149 2226 2024-08-09T09:41:00Z JhsBot 61 Pywikibot touch edit 4149 wikitext text/x-wiki Latan ma'na ni sempadan. fwivep8wr0ue2f516pp6ti28qol5eyn Lebo 0 643 4150 2228 2024-08-09T09:41:01Z JhsBot 61 Pywikibot touch edit 4150 wikitext text/x-wiki Lebo tu sampuran sair antara buek ko’ tana atau tanah liat. Buek ko’ tana tu buli jadi degumpal batu amun iyo beta. eyzth4egjxdyr8u4vnv5xy80em1ym0k Leboh 0 644 4151 2231 2024-08-09T09:41:02Z JhsBot 61 Pywikibot touch edit 4151 wikitext text/x-wiki Leboh tu lekat tanah yang nakung buek ni yo jadi tanah lemah , bila yo lemah ngelitak kawasan ea , jadi yo leboh . Leboh selalu ni akan jadi lepas uran . 1xdr0i70nniojlbbj66ap91zfdfr4xj Lelipan 0 645 4795 4794 2024-08-19T17:32:41Z Umboh Tuhan 194 ''' 4795 wikitext text/x-wiki '''Lelipan''' iyono artropod teposok diam kelas Chilopoda diam subfilum Myriapoda. Lelipan iyono binatang langkau kok Ben betis . Lelipan buli un ikon betis lekat media 20 ngabut ngelebi 300. == Tungan metelak == {{Reflist}} 2fdg20b3h5kbry3g6zp45ywtt088jzk Lemari 0 646 4785 4784 2024-08-19T17:26:30Z Umboh Tuhan 194 4785 wikitext text/x-wiki '''Lemari''' guno ni tungan ti mesimpon badu. Lemari tu pan iko bana jinis ni un been seramin un nyaun. Bangan beluang ni un empat engkau telu inda masam jinis ni. == Tungan metelak == {{Reflist}} rp1voalp6wf9ssb5fqxgarh6t54aubt Lemok 0 647 2239 2238 2024-08-09T09:26:35Z Jon Harald Søby 58 1 semakan diimportkan 2238 wikitext text/x-wiki Lemok iyono badan jomo telampau iko lemak ni pf40rs7uedz1cnrkv9qt4f78q58hfws Lendangan 0 648 4154 2242 2024-08-09T09:41:03Z JhsBot 61 Pywikibot touch edit 4154 wikitext text/x-wiki Lendangan tu yo buek nakung ta tanak lekat ta singki atau kamar mandi , Kok pan lendangan tu buan amun penebenen beta beta nakung . 8b7wsjnvtm3iimq6ko981c3g2r2f9i1 Lengkebu' 0 649 4155 2245 2024-08-09T09:41:04Z JhsBot 61 Pywikibot touch edit 4155 wikitext text/x-wiki Lengkebu' ma'na ni kawasaan lolom entengah lebak antawa suang. sogbnmzbhpggg9xsrb3z18q5xffiucd Libu-libu 0 650 4157 2248 2024-08-09T09:41:05Z JhsBot 61 Pywikibot touch edit 4157 wikitext text/x-wiki Libu-libu iyono pusing-pusing embooi, nia' peginsar. 7q722m9vngj6ekuj5khdhfe625lh3sj Ligan 0 651 4158 2251 2024-08-09T09:41:05Z JhsBot 61 Pywikibot touch edit 4158 wikitext text/x-wiki Ligan antawa neligan ma'na ni genero. 6m27g3rp6lep9kri1vt531i2rcevq4e Limau nipis 0 652 2253 2252 2024-08-09T09:26:36Z Jon Harald Søby 58 1 semakan diimportkan 2252 wikitext text/x-wiki #REDIRECT [[Osom limau]] g8b51orwil290my1fa40sjladbcwn9x Lindangan 0 653 2255 2254 2024-08-09T09:26:36Z Jon Harald Søby 58 1 semakan diimportkan 2254 wikitext text/x-wiki Eyo no tungan ti niman barang bue’ kama lua’ serudung. js4buttb4k08w0m7ifb973l6cznssm5 Lindo' 0 654 4159 2258 2024-08-09T09:41:06Z JhsBot 61 Pywikibot touch edit 4159 wikitext text/x-wiki Lindo tu bahagian enjata moo jomo sesikot koh moto,io pan dikau bahagian anggota untuk sujud diom sembiang. 6lgox17bpd6lf29pk24umdljrgpngw0 Linggar 0 655 4160 2261 2024-08-09T09:41:07Z JhsBot 61 Pywikibot touch edit 4160 wikitext text/x-wiki Linggar ma'na ni rungai kepesoyoon, nia' no pesoyo. pq72ooe2z8xy9pmx1uk9ejlfi309ien Lio 0 656 4161 2264 2024-08-09T09:41:07Z JhsBot 61 Pywikibot touch edit 4161 wikitext text/x-wiki '''Lio''' tu guno ni untuk [[mapi]] bangan luuk contoh ni mapi sup manuk .sup manuk tu amun niak binatan lio eyo akan buan lantu jadi ea no guno ni lio g0tasux2j1a20vfwif33w0gf8c96i4d Liu-liu 0 657 4780 4162 2024-08-19T17:21:18Z Umboh Tuhan 194 ''' 4780 wikitext text/x-wiki '''Liu-liu''' tu bueh been pusaran. az6t7bho4gko7rmu71ebiuf3hbiatyl Liud 0 658 4761 4570 2024-08-19T16:54:52Z Umboh Tuhan 194 + Tungan metelak 4761 wikitext text/x-wiki [[Fail:Johor Flood 2007.jpg|thumb|Liud ta' Johor.]] '''Liud''' yo nu dekau' kejadian alam yang disebabkan oleh uran daras ko diom tempoh yang langkau. Kawasan yang bioso ni terua' liud atau petenob diom liud ialah kawasan yang tena' ko nia' bengen sistem parit yang alap. == Tungan metelak == {{Reflist}} 26n73zlndn23uijcr7mxssdbz0vurpv Liud @ Banjir 0 659 2275 2274 2024-08-09T09:26:38Z Jon Harald Søby 58 1 semakan diimportkan 2274 wikitext text/x-wiki #REDIRECT [[Liud]] 8z99nrckg5pqwfkz2u0j1lxzobhj0f1 Liza Hanim 0 660 4571 2282 2024-08-12T10:28:56Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q2892763]] 4571 wikitext text/x-wiki {{Infobox person | name = Liza Hanim | image = | caption = Liza pada 2017. | birth_name = Haliza Hanim binti Abdul Halim | birth_date = {{Birth date and age|1979|11|19}} | birth_place = [[Klang]], [[Selangor]], [[Malaysia]]<ref>{{Cite news|url=http://ww1.utusan.com.my/utusan/info.asp?y=2010&dt=0623&pub=Utusan_Malaysia&sec=Hiburan&pg=hi_01.htm|title=Bertudung atas kesedaran|author=Norliza Mohamed Zakaria|publisher=[[Utusan Malaysia]]|date=23 Jun 2010|accessdate=3 April 2018|archive-url=https://web.archive.org/web/20171209205729/http://ww1.utusan.com.my/utusan/info.asp?y=2010&dt=0623&pub=Utusan_Malaysia&sec=Hiburan&pg=hi_01.htm|archive-date=2017-12-09|url-status=live}}</ref> | occupation = Penyanyi, pelakon, penulis lagu, ahli perniagaan | years_active = 1994–kini | education = Diploma Pengurusan Perniagaan<ref name="Talents">{{Cite web|url=http://www.sixfingers.com.my/talents-page/liza-hanim|title=Liza Hanim|publisher=SixFingers|date=13 April 2015|accessdate=13 April 2020}}</ref> | alma_mater = [[Universiti Sunway]]<ref name="Talents"/> | spouse = {{Marriage|Mohd Shahrin Shamsudin|2003}} | children = 5 <!-- Jangan masukkan nama anak beliau di sini kerana mereka tidak terkenal. --> | mother = Badariah Hanum | father = Abdul Halim Abdul Razak | module = {{Infobox musical artist| | embed = yes | background = solo_singer | genre = {{Hlist|[[Muzik pop|Pop]]|[[balada]]|[[R&B]]}} | instrument = [[Nyanyian|Vokal]] | label = {{Ubl|[[Suria Records]] (Disember 1996– Mei 2004)|[[LIFE Records|Life Records]] (2006–2007)|Laugh Out Loud Entertainment (2017–kini)|LH Media (2017–kini)}} | associated_acts = {{Hlist|[[2 By 2]]|[[Siti Nurhaliza]]|[[Misha Omar]]|[[Ning Baizura]]|[[Noraniza Idris]]|[[Anis Suraya]]|[[Ziana Zain]]|[[Adnan Abu Hassan]]|[[Siti Sarah]]|[[Indigo]]|[[Shila Amzah]] }} }} }} '''Haliza Hanim Abdul Halim''' (penenakan 19 november 1979) iyo no dangan pelego,pelakun,penulis lagu kok ahli perniagaan Malaysia.Iyo boi mula kerjaya ni ta' industri muzik diom umur ni kakal 17 taun lapas manang numur duo diom pertandingan belagu Golden Teenn Search anjuran Radio Televisyen Malaysia (RTM)22 Disember 1996. lapas program ae habis, iyo terua nindo le' syarikat rakaman iyo no Suria Record. Iyo tu dangan anak didik Adnan Abu Hassan mokok disifatkan antara pelego' teralap Malaysia yang boi nguasa industri muzik ta' era 2000-an,debaris kok Siti Nurhaliza kok debagi lagi. Selangkau kerjayani, iyo boi manang vocal terbaik tak Anugerah Juara Lagu 17. Iyo pan boi manang Anugerah Piala Perak yang boi niajur le' Festival Muzik Shanghai sebeta 3 banggi setuu-tuut.iyo un 7 album studio. Lagu-lagu tekilo ni iyo no "siapa sangka siapa menduga","andainya aku bersuara","gelisah mimpi" ko' iko lagi.selain jadi pelgo iyo pan jadi pelakun. antara ni KL Menjerit(2002) ko' Laila Isabella(2003).Iyo boi kulek iko anugerah terposok Anugerah Industri Muzik,Anugerah Juara Lagu,engko' Anugerah Bintang Popular Harian. ta' taun 2017 iyo nuut Gegar Vanganza Musim Ke-4.Iyo manang tampat numbur duo. KERJAYA == Tungan Metelak== {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] jjhgxl6n1r6akc41v3g4byxr6vmxajj Luara' 0 661 4164 2285 2024-08-09T09:41:10Z JhsBot 61 Pywikibot touch edit 4164 wikitext text/x-wiki Luara' ma'na ni antap seruat keluman ni. 4klzpnk8rg0z52gf5wxbs4bajvwi6sb Lumbo aram 0 662 4165 2288 2024-08-09T09:41:10Z JhsBot 61 Pywikibot touch edit 4165 wikitext text/x-wiki '''Lumbo haram''' tu [[setupak]] sian manang sian kalah .contoh ni lumbo mutu tengah songom 0c555mpa0san6f2yzjwm0c2rtb91huw Lumbo kerita' 0 663 4166 2291 2024-08-09T09:41:10Z JhsBot 61 Pywikibot touch edit 4166 wikitext text/x-wiki '''Lumbo kerita'''' iyo no sejenis sukan bermotor ngelibat betanding lumbo kerita'. Iyo dikau sukan dinda ta' tv. ajxvlvhyxq5d3jejskvpdhjhhzl994a Luri 0 664 4572 2300 2024-08-12T10:28:59Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q43193]] 4572 wikitext text/x-wiki [[Fail:AFT227_at_Liangxiangximen_(20200914140857).jpg|thumb|Luri China]] '''Luri''' (ling Melayu: '''Lori''') iyo no [[pengangkutan]] buat pinakai untuk ngangkut barang buat tak laan oyo luak satu tempat tak tempat yang lain.<ref>https://ms.m.wikipedia.org/wiki/Lori</ref> == Tungan metelak == {{Reflist}} 3barc8ws5s0q59zps9rp7ldzbr62h5s Luuk 0 665 4167 2303 2024-08-09T09:41:11Z JhsBot 61 Pywikibot touch edit 4167 wikitext text/x-wiki '''Luuk''' iyo noh kinakan somo somo engko buas . luuk tu iko bana [[jenis]] ni contoh ni daging,telo engko bangan gulay gulay. f7z27tyvxleenyb8f1i8x55t2pyfq08 M. Daud Kilau 0 666 4573 4168 2024-08-12T10:29:01Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q7381141]] 4573 wikitext text/x-wiki '''Dato' Mohd Daud bin Kilau''', DPMP (lebih tekilo M. Daud Kilau; 10 Julai 1938 - 18 Disember 2013) iyo tu dangan pelego' dela Malaysia. Iyo anak siari lua' 10 urang di- berdik. Iyo boi mula nuut diam bidang seni lapas manang Bintang Radio ta' Singapura beta taun 1968 lua' lagu Musalmaah Manis engko' Joget Hitam Manis. Boi lua' mea' iyo tarus kule' peluang jadi dangan artis rekaman tarus boi muat iko EP ko' LP yang melua lagu rentak langgam, asli ko' dangdut. Lapas lua' 1985, iyo manang pertandingan Pesta Dendang Rakyat diam kategori Nyanyian Asli. dv99gzts6d4la36mpn6vcgxvl9ryeoo MK K-Clique 0 667 2311 2310 2024-08-09T09:26:42Z Jon Harald Søby 58 3 semakan diimportkan 2310 wikitext text/x-wiki Muhammad Hairi Amin bin Hamdan boi pinenakan lekat taun 27 july 1996 iyo tu tekilo bana tak malaysia oron ni pinau pau ole bangan jomo MK iyo dendangan pelakun engko penyanyi.Mk tu asal ni lekat Tawau Sabah.MK boi posok tak tim K-Clique Mk tu pan boi no kawin engko Siti Hajar. [[Kategori:Pelego' Malaysia]] 3z3v9uh3jw72u050q3uacu3t8rerow1 Maku dela 0 668 4169 2314 2024-08-09T09:41:13Z JhsBot 61 Pywikibot touch edit 4169 wikitext text/x-wiki Maku dela iyono perembaan Sama ma'na ni moo sasa', moo gagut. tjk40vctzjhmwrf7e07tgmmpqkr8nh2 Malaysia 0 669 4471 2342 2024-08-10T09:30:28Z Rombituon 59 membuang templat interwiki 4471 wikitext text/x-wiki {{Infobox country | conventional_long_name = Malaysia | name = {{Unbulleted list|{{Script/Arabic|مليسيا}} ([[Jawi script|Jawi]])}} <!-- The name of the Federation (official name of the state) according to Art 1(1) of the Federal Constitution is, in Malay and English, Malaysia. Nothing more, nothing less. 'Federation of' was only used for the state that preceded Malaysia – Federation of Malaya. Please do not insert 'Federation of' or 'Persekutuan' for Malay name --> | common_name = Malaysia | image_flag = Flag of Malaysia.svg | alt_flag = <!---Tukarkan kepada bdr A blue rectangle with a gold star and crescent in the canton, with 14 horizontal red and white stripes on the rest of the flag ---> | image_coat = Coat of arms of Malaysia.svg | coa_size = 90 | symbol_type = Coat of arms | alt_coat = <!---Tukarkan kepada bdr Shield showing the symbols of the Malaysian states with a star and crescent above and a motto below, supported by two tigers ---> | image_map = {{Switcher|[[Fail:Malaysia (orthographic projection).svg|upright=1.15|frameless]]|Show globe|[[Fail:Location Malaysia ASEAN.svg|upright=1.15|frameless]]|Show map of Southeast Asia|default=1}} | map_caption = {{Map caption |location_color=dark green |region=Asia |subregion= [[ASEAN]] | subregion_color = dark gray}} | national_motto = {{Lang|ms|Bersekutu Bertambah Mutu}}<ref>{{Cite web |url=http://mygov.malaysia.gov.my/EN/Main/MsianGov/MsianFlagAndCrest/Pages/MsianFlagAndCrest.aspx |archive-url=https://web.archive.org/web/20131022191931/http://mygov.malaysia.gov.my/EN/Main/MsianGov/MsianFlagAndCrest/Pages/MsianFlagAndCrest.aspx |url-status=dead |archive-date=22 October 2013 |title=Malaysian Flag and Coat of Arms |publisher=Malaysian Government |access-date=9 September 2013}}</ref>"[[Unity makes strength|Unity is Strength]]" | national_anthem = {{Lang|ms|[[Negaraku]]}}<br />"Negara aku"{{Parabr}}{{Center|[[Fail:Negaraku instrumental.ogg]]}} | capital = [[Kuala Lumpur]]{{Refn|group=fn|Constitutional capital, ceremonial and legislative}}<br />{{Coord|3|8|N|101|41|E|region:MY|display=inline}} | admin_center = [[Putrajaya]]{{Refn|group=fn|administrative and judicial}}<br />{{Coord|2|56|N|101|42|E|region:MY|display=inline}} | largest_city = capital | official_languages = [[Ling Melayu Malaysia|Melayu]]{{Efn|Section 9 of the [[National Language Act 1963/67]] states that "The script of the national language shall be the Rumi script: provided that this shall not prohibit the use of the Malay script, more commonly known as the Jawi script, of the national language".}}{{Efn|Section 2 of the [[National Language Act 1963/67]] states that "Save as provided in this Act and subject to the safeguards contained in Article 152(1) of the Constitution relating to any other language and the language of any other community in Malaysia the national language shall be used for official purposes".}}{{Efn|name=Recognized|See Article 152 of the [[Federal Constitution of Malaysia]] and [[National Language Act 1963/67]].}} | languages_type = Recognised language | languages = [[English language|English]]{{Efn|name=Recognized}} | ethnic_groups = {{Tree list}} * 69.7% [[Bumiputera (Malaysia)|Bumiputera]] ** 57.3% [[Malaysian Malays|Malay]] ** 12.4% indigenous groups of [[Sabah]], [[Sarawak]] and [[Orang Asli]] * 22.9% [[Malaysian Chinese|Chinese]] * 6.6% [[Malaysian Indian|Indian]] * 0.8% [[Ethnic origins of people in Malaysia|other]] {{Tree list/end}} | ethnic_groups_year = 2023 | ethnic_groups_ref = <ref name="2021 pop">{{Cite web|url=https://www.malaymail.com/news/malaysia/2022/01/17/minister-census-shows-malaysias-oldest-man-and-woman-aged-120-and-118-preli/2035636|title=Minister: Census shows Malaysia's oldest man and woman aged 120 and 118; preliminary census findings to be released in Feb 2022|date=17 January 2022 |publisher=Malaymail|access-date=17 January 2022}}</ref><ref>{{Cite web |url=https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=155&bul_id=ZjJOSnpJR21sQWVUcUp6ODRudm5JZz09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |title=Current population and estimates, Malaysia 2021 Group |author=Department of Statistics Malaysia |access-date=1 February 2022 |year=2021}}</ref> | religion = {{Ubl|63.5% [[Islam in Malaysia|Sunni Islam]] ([[State religion|official]])<ref>{{Cite web|url = http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf|title=The States, Religion and Law of the Federation|work=Constitution of Malaysia|publisher=Judicial Appointments Commission|access-date=29 October 2017|quote=Islam is the religion of the Federation; but other religions may be practised in peace and harmony in any part of the Federation.|archive-url=https://web.archive.org/web/20170614105535/http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf|archive-date=14 June 2017|url-status=dead}}</ref>|18.7% [[Buddhism in Malaysia|Buddhism]]|9.1% [[Christianity in Malaysia|Christianity]]|6.1% [[Hinduism in Malaysia|Hinduism]]|0.9% other|1.8% unknown}} | religion_ref = <ref>{{Cite web|url = https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09|title=Distribution and Basic Demographic Characteristic Report 2020 |publisher=Department of Statistics, Malaysia|date=14 February 2020}}</ref> | religion_year = 2020 | demonym = [[Malaysians|Malaysian]] | government_type = Federal [[Parliamentary system|parliamentary]] constitutional [[elective monarchy]] | leader_title1 = [[Yang di-Pertuan Agong]] (King) | leader_name1 = [[Sultan Ibrahim Sultan Iskandar]] | leader_title2 = [[Perdana Menteri Malaysia|Perdana Menteri]] | leader_name2 = [[Anwar Ibrahim]] | leader_title3 = [[President of the Dewan Negara]] | leader_name3 = ''kosong'' | leader_title4 = [[Speaker of the Dewan Rakyat]] | leader_name4 = [[Johari Abdul]] | leader_title5 = [[Chief Justice of Malaysia|Chief Justice]] | leader_name5 = [[Tengku Maimun Tuan Mat]] | legislature = [[Parlimen Malaysia|Parlimen]] | upper_house = [[Dewan Negara]] | lower_house = [[Dewan Rakyat]] | sovereignty_type = [[Independence Day (Malaysia)|Independence]] | sovereignty_note = from the [[United Kingdom]] | established_event1 = [[Federation of Malaya]] | established_date1 = 31 August 1957<ref>{{Cite book|author=Mackay, Derek |title=Eastern Customs: The Customs Service in British Malaya and the Opium Trade|url=https://books.google.com/books?id=QM5LImNbYusC&pg=PA240|date=2005|publisher=The Radcliffe Press|isbn=978-1-85043-844-1|pages=240–}}</ref> | established_event2 = [[Sarawak Self-government Day|Sarawak self-governance]] | established_date2 = 22 July 1963 | established_event3 = [[North Borneo Self-government Day|North Borneo self-governance]] | established_date3 = 31 August 1963<ref>{{Cite web|url=https://www.astroawani.com/perspektif/kenapa-kita-takut-dengan-sejarah-22258|title=31 Ogos 1963, Hari kemerdekaan Sabah yang rasmi|publisher=AWANI|date=14 May 2021|access-date=1 September 2021}}</ref> | established_event4 = [[Proclamation of Malaysia]] | established_date4 = 16 September 1963 | area_rank = 67th <!-- Area rank should match [[List of countries and dependencies by area]] --> | area_km2 = 330,803<ref name="2010 stats">{{Cite web |url=http://www.statistics.gov.my/ccount12/click.php?id=2127 |title=Laporan Kiraan Permulaan 2010 |publisher=Jabatan Perangkaan Malaysia |page=27 |access-date=2 August 2023 |url-status=dead |archive-url=https://web.archive.org/web/20101227065717/http://www.statistics.gov.my/ccount12/click.php?id=2127 |archive-date=27 December 2010 |df=dmy-all }}</ref><ref>{{Cite web |title=Malaysia country profile |url=https://www.bbc.com/news/world-asia-pacific-15356257 |website=BBC News |access-date=27 January 2021 |date=24 February 2020}}</ref> | area_sq_mi = 127,720 | percent_water = 0.3 | population_estimate = 33,200,000<ref>{{Cite CIA World Factbook|country=Malaysia|access-date=24 September 2022}}</ref> | population_estimate_year = 2023 | population_estimate_rank = 43rd | population_census_year = 2020 | population_census = 32,447,385<ref>{{Cite web |url=https://cloud.stats.gov.my/index.php/s/ppMYkLC4kyUzHKn#pdfviewer |title=Population and Housing Census of Malaysia 2020 |publisher=Department of Statistics, Malaysia |page=48 |access-date=23 March 2022 |archive-date=28 February 2022 |archive-url=https://web.archive.org/web/20220228142122/https://cloud.stats.gov.my/index.php/s/ppMYkLC4kyUzHKn#pdfviewer |url-status=dead }}</ref> | population_density_km2 = 101 | population_density_sq_mi = 263 | population_density_rank = 116th | GDP_PPP_year = 2024 | GDP_PPP = {{Increase}} $1.307 trillion<ref name="IMFWEO.MY">{{Cite web |url=https://www.imf.org/en/Publications/WEO/weo-database/2023/October/weo-report?c=548,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2020&ey=2028&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1 |title=World Economic Outlook Database, October 2023 Edition. (Malaysia) |publisher=[[International Monetary Fund]] |date=10 October 2023 |access-date=12 October 2023}}</ref> | GDP_PPP_rank = 31st | GDP_PPP_per_capita = {{Increase}} $39,069<ref name="IMFWEO.MY" /> | GDP_PPP_per_capita_rank = 55th | GDP_nominal_year = 2024 | GDP_nominal = {{Increase}} $465.541 billion<ref name="IMFWEO.MY" /> | GDP_nominal_rank = 36th | GDP_nominal_per_capita = {{Increase}} $13,913<ref name="IMFWEO.MY" /> | GDP_nominal_per_capita_rank = 67th | Gini_year = 2018 | Gini_change = increase<!--increase/decrease/steady--> | Gini = 41.2 <!--number only--> | Gini_ref = <ref name="wb-gini">{{Cite web |url=https://data.worldbank.org/indicator/SI.POV.GINI?locations=MY |title=Gini Index |publisher=World Bank |access-date=20 December 2018}}</ref> | Gini_rank = | HDI_year = 2022<!-- Please use the year to which the data refers, not the publication year--> | HDI_change = increase<!--increase/decrease/steady--> | HDI = 0.807<!--number only--> | HDI_ref = <ref name="HDI">{{Cite web |date=13 March 2024 |title=Human Development Report 2023/2024 |url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2023-24reporten.pdf|url-status=live |archive-url=https://web.archive.org/web/20240313164319/https://hdr.undp.org/system/files/documents/global-report-document/hdr2023-24reporten.pdf |archive-date=13 March 2024 |access-date=13 March 2024 |publisher=[[United Nations Development Programme]] |language=en}}</ref> | HDI_rank = 63rd | currency = [[Malaysian ringgit]] (RM) | currency_code = MYR | date_format = dd-mm-yyyy | time_zone = [[Malaysian Standard Time|MST]] | utc_offset = [[UTC+8|+8]] | drives_on = left | calling_code = [[+60|+60]] | cctld = [[.my|.my]] | footnotes = }}'''Malaysia''' iyo no negara rojo berpelembegaan pesekutuan ta' Asia Tenggara iyo o bengen 11 negeri melayu endiam ni, 2 negeri Borneo engko' 3 wilayah persekutuan boi netap ta' laat engko' luas ni 330,803 kilometer pesigi. Malaysia binagi ta' 2 kawasan ngapit Laut China Selatan, iyo no Semenanjung Malaysia engko' Malaysia Borneo. Malaysia sesambung laat ko' negara debagi dokon Thailand, Indonesia, ko' Brunei engko' pan sempadan selang engko' Singapura ko' Filipina. Ketua negara tu iyo no Yang di-Pertuan Agong, enggo no rojo elektif boi tepene' kok niundi lua' 9 rojo melayu. Ketua eksekutif laat tu pala, iyo no Perdana Menteri. Eyang negara Malaysia iyo no pinau Kuala Lumpur. == Asal-usul oron == oron "Malaysia" boi ginabung lua' "Malays" engko' Latin Yunani "-ia"/"-ία" enggo no bengen meksud "laat jomo Melayu". == Negeri== === Semenanjung Malaysia === # [[Johor]] # [[Kedah]] # [[Kelantan]] # [[Melaka]] # [[Negeri Sembilan]] # [[Pahang]] # [[Perak]] # [[Perlis]] # [[Pulau Pinang]] # [[Selangor]] # [[Terengganu]] === Malaysia Borneo === # [[Sabah]] # [[Sarawak]] === Wilayah Persekutuan === # [[Kuala Lumpur]] # [[Labuan]] # [[Putrajaya]] == Tungan metelak== {{Reflist}} [[Kategori:Malaysia]] <references group="fn" /> hv0ab92smr74ghq68ipzpdv2jsv14ef Mampan 0 670 4170 2345 2024-08-09T09:41:17Z JhsBot 61 Pywikibot touch edit 4170 wikitext text/x-wiki Mampan iyono lumaan entana'. 4h9oclxehzmgtw7zxjt6nyenffskkrx Mangan nia’ mangan, Asal jo kiti kurung kurung 0 671 2348 2347 2024-08-09T09:26:46Z Jon Harald Søby 58 2 semakan diimportkan 2347 wikitext text/x-wiki Eyo no sembatan diam tuturan sama pinakai ngabut betiru, engko’ maksudni mo barang denakan bekurung kurung, asal jo setemu temu. i1tq7gqfx2ytko34v9rlik4357dctj8 Mantir 0 672 4171 2351 2024-08-09T09:41:18Z JhsBot 61 Pywikibot touch edit 4171 wikitext text/x-wiki Mantir iyono bigi-bigi dediki' kotol ta' badan. kr6h74hiehbixsdb8b7sz9lsdk02x89 Manuk 0 673 4574 2356 2024-08-12T10:29:03Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q780]] 4574 wikitext text/x-wiki [[Fail:101C9183.JPG|right|250px]] Manuk tu sejenis imon, manuk tu lebih 19 bilion ingko luak taun 2011. Jomo melioro manuk tu binuat makanan diam bentuk daging kok telo. Manuk niak teko lemiang kerna io imon ngerati pinelioro. Manuk merupokan dikau jenis unggas pelihoro imon kok subspesies tak manuk taun darag. Manuk iyo no dikau haiwan pelihoro imon yang paling iko penelihoro kok jumlah ni ngelebih 19 bilion ingko diom taun 2011. Manusia ngusa manuk paling pan penejadi sumber makanan diom bentuk daging nia' pan telo ni. Manuk diom umumni nia' teko lemiang. Kulek peneimon kok penelihoro jo. tw97dzbhwkfvpx75m8h3v1lsaxnls2k Manusia' 0 674 4172 2361 2024-08-09T09:41:19Z JhsBot 61 Pywikibot touch edit 4172 wikitext text/x-wiki '''Manusia''' iyo no boi ni cipta lek [[Allah swt]].Manusia tu boi ni cipta ko' [[kelebihan dediri]].Manusia tu un lek [[cara gai betutur dediri tapi tepaam manusia lain nyiak]].<ref>https://min.wikipedia.org/wiki/Manusia</ref> == Tungan metelak == {{Reflist}} a3d2l2ebxejvytqh87wi0o5sxrtrznt Mapi 0 675 4173 2363 2024-08-09T09:41:19Z JhsBot 61 Pywikibot touch edit 4173 wikitext text/x-wiki Mapi iyono dikau seni, teknologi, sains kok kraf nedio mekanan untuk kinakan. Teknik mapi kok baan-baan mapi yang nyiak somo ta' dikau dunia, lekat ta' nunuk mekanan enjata api ngabut noh ule' makai tambak karan ngabut nunuk mediam jenis obon. Lek mapi kok jenis mapi nut ta' kemairan kok jenis letian yang pinapi oleh dangan pedangan tukang mapi. Mapi buli binuat ta' tungan temban dediri kok pan ta' restoran. Mapi nyiak pan subai ben api, mapi pan buli makai barang kimia masam ta' ceviche, idangan tradisional ta' Amerika Selatan ding ni pinapi kok buek lemon jo. Nedio mekanan makai api iyono dikau aktiviti unik ta' menusia. Io boi mula kiro-kiro 2 juta taun dau. 52fexrblmxfu28tdeffz5pf4gwnxres Margaret lim 0 676 4174 2365 2024-08-09T09:41:20Z JhsBot 61 Pywikibot touch edit 4174 wikitext text/x-wiki Margaret Lim Hui Lian (1947 – 8 Mei 2011) iyo no seorang pengarang buk peranak Kanada kelahiran Malaysia. Buku peranak iyo berdasarkan kenangan zaman peranak dediri, yang dihabiskan bersama jomo asli ta pediang Sarawak ta Pulo Borneo. mimun buk diilustrasikan oleh anak dendo dediri bege e ipiyo Su Jen Buchheim, dan diterbitkan oleh syarikatnya dedirinyw, Fairy Bird Children's Books. sc2o5kx5497di2nlbf6z6ef8h9axpq9 Marsha Milan 0 677 4575 2372 2024-08-12T10:29:05Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q9029464]] 4575 wikitext text/x-wiki {{Short description|Malaysian singer, host and actress}} {{Use mdy dates|date=January 2021}} {{Infobox person | name = Marsha Milan | image = Marsha Milan for MeleTOP during Cinderella premiere.jpg | image_size = | caption = Milan at the ''[[Cinderella (2015 Disney film)|Cinderella]]'' movie premiere in March 2015 | birth_name = Marsha Milan Londoh | birth_date = {{Birth date and age|1985|12|6}} | birth_place = [[Tamparuli]], [[Tuaran District|Tuaran]], [[Sabah]] | nationality = Malaysian | occupation = Singer, actress, musician, model, host | years_active = 2005–present | spouse = {{Marriage|Mohmamed Shaiful Nizam Ismail|2015}}<ref>{{Cite web|url=http://www.astroawani.com/berita-hiburan/marsha-milan-sah-bergelar-isteri-ahli-perniagaan-87621|title=Marsha Milan sah bergelar isteri ahli perniagaan|first=Ḥafiẓa|last=Kamarudin|date=January 1, 2016|access-date=July 18, 2017}}</ref> | relatives = Linda Nanuwil (cousin) | module = {{Infobox musical artist | embed = yes | genre = Pop | background = solo_singer | instrument = Vocals }} }} Marsha Milan Londoh boi penanakan 6 Disember taun 1985. iyono pengelego, pengasara kok pelakun kok boi kulek keampat diom asara Akademi fantasia musim ketelu kom boi-boi belakun diom drama TV diom Malaysia yang bok-bok lagi. == Tungan metelak == {{Reflist}} 7hgc0q5pyya9kec0la5w7q3zi0l0w1v Masap laat 0 678 4777 4576 2024-08-19T17:17:59Z Umboh Tuhan 194 + Tungan metelak 4777 wikitext text/x-wiki [[Fail:Pinatubo91eruption plume.jpg|thumb|alt=Masap laat|Masap laat]] '''Masap laat''' iyo no dikau' musiba' been kaitan engko' alam. Iyo berlaku paga [[manusia']] telandu dayag sambil mekitoon gaya yang nya' patut ni ta' dikau'-dikau' tungan. Tenga' deluut, diam taun antawa enjata' [[belud]] ko' lain-lain tungan yang terati le' jomo sebagai tungan keros. == Tungan metelak == {{Reflist}} [[Kategori:Masap laat| ]] 3uj4r90y5o9ixuahdsnd4bgoy4gkj0d Masig 0 679 4175 2384 2024-08-09T09:41:23Z JhsBot 61 Pywikibot touch edit 4175 wikitext text/x-wiki Masig iyono niman bioso ni kerabau, kuda' kok sapi. 2h70yzmzcqhmft34zbjfjadcb2970eu Masjd Jamek, Kuala Lumpur 0 680 4577 2387 2024-08-12T10:29:10Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1143296]] 4577 wikitext text/x-wiki Masjid Jamek, Kuala Lumpur asal ni boi binuat le' pedagang-pedagang Islam yang asal ni lua' India tak simpangan Sungai Klang kok sungai Gombak, Kuala Lumpur pada jaman boi nijajah lek British. Tunggan ni sikot kok kuburan awal mea kok betiru sikot mokok dataran merdeka. Iyo jadi dikau lua mercu tanda kuala lumpur jadi Kota Kebudayaan Islam. mxuuh1qf2bqx2gjg6zgxtevmut6hjct Masjid Nabawi 0 681 4578 2390 2024-08-12T10:29:12Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q486080]] 4578 wikitext text/x-wiki Masjid al-Haram antawa Masjidil Haram antawa Masjidilharam, iyo no masjid aling susi nuut kepersoyoon jomo islam. Masjid tak Kota Makkah Al-Mukarramah,Arab saudi. Masjid al-Haram binuat mengeliung kaabah, iyono Qiblat jomo islam masa gai ngerjoon sembiyang. dk1omwupn34lu6a6ucj3ldlnkgj08kc Masjid Quba 0 682 4579 2395 2024-08-12T10:29:14Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q276569]] 4579 wikitext text/x-wiki '''Masjid Quba''' antawa '''Masjid al-Quba''' iyo no masjid paling awal boi binuat lek jomo Islam. Masjid tu tungan ni ta' Kota Madina duo batu tio ni lua' Masjid an-Nabawi. Masjid tu niasas le' Nabi Muhammad SAW sebelum iyo teko ta' Madinah masa ni berhijrah lua' Makkah. [[Kategori:Masjid]] j0ccxkcwv4xuq12ajskawzdigdz1vqm Masjid Terapung Al-Aminah 0 683 2397 2396 2024-08-09T09:26:51Z Jon Harald Søby 58 1 semakan diimportkan 2396 wikitext text/x-wiki Masjid Terapung Al-Aminah iyo no dembua' masjid sikot 300 meter lua ' pantai sari Ringgung,Lampung, Indonesia. Masjid pelantung enjata bue' mokok rejeki kok dangai pelampung kok sauh jadi iyo nyiak panut. Iyo pada asal ni jadi kemudahan sembiyang ta' nelayan masi' tak diom selang. Pembuatan awal diom taun 2012, kok iyo ai niubah suai beta taun 2014. Boi ni rasmi jadi dikau tarikan pelansong tak lampung dim taun 215 mokok kehadiran naib gabenor Bachtiar Basri. 4g367sgorvsm4drb7q140qemy7azi5g Masjid al-Haram 0 684 4176 2400 2024-08-09T09:41:26Z JhsBot 61 Pywikibot touch edit 4176 wikitext text/x-wiki '''Mesjid al-Haram''' antau '''Mesjidil Haram''' atau '''Mesjidilharam''' iyo noh mesjid yang paling susi yang tinuut kepercayaan jomo Islam. Mesjid tu tungan ni muh Kota Makkah Al-Mukarramah, Arab Saudi. Mesjid al-Haram binuat ngeliling Kaabah, yang jadi petunjuk Qiblat jomo Islam bila ngerjoon sembiang. lu62hhmmggatn5eoyn0kc8e83ebhiqj Mat Kilau 0 685 4177 2403 2024-08-09T09:41:26Z JhsBot 61 Pywikibot touch edit 4177 wikitext text/x-wiki Mat Kilau oron bana ni Mat Kilau bin Imam Rasu sebelum nukar oron ni ta' Mohamed bin Ibrahim moko' oran gelaran ni Mat Siam, Iyo tu dangan pahlawan Melayu yang boi berjuang nentang British ta' Pahang. Eyang ni Mahda iyo no anak ta' Tok Kaut Burau. Mat Kilau pinesoyo penenakan diom kiro-kiro taun 1865 ta' Kampung Masjid,Pulau Tawar,Jerantut,Pahang. '''[[Keluman]]''' Mat Kilau bin Imam Rasu penenakan taun 1865 ta' Kampung Pulau Tawar, Kelahiran ni labu' masa zaman pemerintahan Raja Bendahara Pahang masa a'iyo no Tun Ahmad. Ma' ni Imam Rasu bin Shahrum antawa lebin tekio engko' oron Tok Gajah manakala Eyang ni pula Mahda binti Tok Kaut Burau.Mat Kilau tinutur pandai ngaji,berjanji, ko' berdikir maulud lapas ae binara' belajar berdikir rebana lebih tekilo engko' " Dikir Pahang". Hobi ni main gasing engko' sekelon bua' keros. Mediam umur ni lebih kurang 20 taun, Mat Kilau kawin moko' dangan dendo oron ni Yang Chik binti Imam Daud yang asal lua' Kampung Kedondong. Imam Daud iyo no dangan sigu agama ta' daerah Pulau Tawar,Jerantut, pahang ko' iyo pan sigu ngaji Mat Kilau engko se'-se' ni.Mat Kilau pan iko ngendo' ilmu lua' ma' ni dediri Tok Gajah.Ilmu kebatinan sara agama iko terua tuntut le' lua' Haji Montok iyo no mufti Pahang masa a'. Mat Kilau oan binara' pu' bertapa ta' Gua Kota Gelanggi tungan ni nyiak tio lua' pulau Tawar unytuk ngedalami ilmu yang boi tinuntut le' ni. Gua a' masi' un sampai betiru. nuut ta' pendapat jomo- jomo beta, Gua a' nambung Terengganu,Pahang, engko' Kelantan. '''[[Sejarah Perjuangan]]''' Mediam buan oktober 1888 masa Tok Gajah un ta' Pekan, Hugh Clifford ai teko ta' pulau Tawar. iyo puk serunding engko Mat Kilau. Hal tu memperngitokan Clifford pesoyo idea-idea Mat Kilau. Iyo binara' ingin seguul' moko' mimon jomo sebab tru no iyo jadi dangan jomo pinandang luas engko' kulek kepersoyoon peno' lua' masyarakat.Mat Kilau binara' dangan yang jujur ko' tegas, oleh a' no iyo paling kinasi' le' jomo-jomo ni. Jomo-jomo ni dokon Pawang Nong, Teh Ibrahim, Mat Kelubi, Mat Ali (khatib), Awang (Imam) dan Mat Tahir. s4bfx6l9g05evgsssheyl3vrd4cm8o1 Matai kiro-kiro 0 686 4178 2406 2024-08-09T09:41:27Z JhsBot 61 Pywikibot touch edit 4178 wikitext text/x-wiki Matai kiro-kiro ma'na ni nia' teko pikir, nia' tepikir. 1me3anzklqo6x2mteqwma03yd7bwn25 Mekemiin 0 687 4179 2409 2024-08-09T09:41:27Z JhsBot 61 Pywikibot touch edit 4179 wikitext text/x-wiki Mekemiin ma'na ni nindir. omjhf31964du4gberzd8vdc3jt6uugw Mekemin 0 688 4180 2412 2024-08-09T09:41:28Z JhsBot 61 Pywikibot touch edit 4180 wikitext text/x-wiki Mekemin ma'na ni nindir bbrpppstzi2rrxpx3qvkgrdlb6n0yji Mekesoom 0 689 4181 2415 2024-08-09T09:41:28Z JhsBot 61 Pywikibot touch edit 4181 wikitext text/x-wiki Mekesoom ma'na ni ngintip mcup3u0zsxbzel3wfyqf3g90sc26gm5 Memanuk 0 690 4580 2424 2024-08-12T10:29:17Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q5113]] 4580 wikitext text/x-wiki '''Memanuk''' iyo noh binatang ruun sayap, betis ni duo kau', laak ni panas engko ngentelo. Burung tergolong diom kumpulan binatang [[vertebrata]] yang bagal. Lebih kurang 8,600 spesis burung yang boi entemu lua' serata dunia.<ref>https://web.archive.org/web/20211023025739/https://www.data.gov.my/data/ms_MY/dataset/spesies-burung-yang-ditemui-di-frim</ref> == Tungan metelak == {{Reflist}} [[Kategori:Burung]] o7xt9oaaczkhyor8pnsl6d0xz32wcbp Memar 0 691 4182 2427 2024-08-09T09:41:29Z JhsBot 61 Pywikibot touch edit 4182 wikitext text/x-wiki Memar ma'na ni numbuk ta' moo. iqg6sbxgkd6xaes9qth11pzjskx14f4 Mensari 0 692 2429 2428 2024-08-09T09:26:54Z Jon Harald Søby 58 1 semakan diimportkan 2428 wikitext text/x-wiki Mensari tu enggo no buat jomo jadi kule' sin un pemekelum barang denakan, kok anak bendo. Mensari tu niat nut yan binuat, asal ni halal ko' tekakan oleh bangan keluarga. Mensari tu nia' nut sinsaung atau pan songom, dekit ka iko, asal jo tepekelum diri ko' keluarga. 1o3cxv6utjfborugwjdcjoztkfwzg12 Meronok 0 693 4183 2432 2024-08-09T09:41:30Z JhsBot 61 Pywikibot touch edit 4183 wikitext text/x-wiki Meronok iyono nonom tonomon makai bigi. cdmajk8h5wqb9aqfmha9ceva93ahifw Meroon 0 694 2437 2436 2024-08-09T09:26:54Z Jon Harald Søby 58 4 semakan diimportkan 2436 wikitext text/x-wiki '''Meroon''' iyo no [[jomo alus]] rangit bana. [[Kategori:Antu]] 8ahyhk1ob3p1xya14x6via7ktso5zhu Mesjid Bandaraya Kita Kinabalu 0 695 4184 2440 2024-08-09T09:41:31Z JhsBot 61 Pywikibot touch edit 4184 wikitext text/x-wiki '''Mesjid Bandaraya Kota Kinabalu''' iyo noh mesjid utama keduo yang boi binuat ta’ bandar Kota Kinabalu, Sabah, Malaysia lepas Mesjid Negeri. Mesjid tu tungan ni sedi selang Likas yang luas ni 14.83 hektar. Mesjid tu buli mosok 12,000 jomo diom dikau masa. Mesjid tu mula binuka secara rasmi ni masa 18 Februari 2000. Mesjid tu pan ben persomoon ni engko Mesjid Nabawi sebab hampir 70 % pan kawasan ni terua keliling bue. 4jd94k1mbfe7paffns8o44fnp641ch2 Mesjid Jamek, Kuala Lumpur 0 696 4185 2443 2024-08-09T09:41:31Z JhsBot 61 Pywikibot touch edit 4185 wikitext text/x-wiki '''Mesjid Jamek Sultan Abdul Samad''' boi binuat oleh oleh saudagar-saudagar Islam lua laat India tak persimpangan Suang Klang kok Suang Gombak, Kuala Lumpur masa jaman penjajahan British. Tungan mesjid sesikot engko tapak perkuburan awal meh kok betiru tungan ni sesikot kok Dataran Merdeka, stesen Putra LRT engko pan Star LRT. Mesjid tu penejadi separuh penunjuk Kuala Lumpur supaya tekilo jadi Kota Kebudayaan Islam. 997d0lousygorjxefbzsg9qigve9h1z Mesjid Raya Kota Belud 0 697 4186 2447 2024-08-09T09:41:32Z JhsBot 61 Pywikibot touch edit 4186 wikitext text/x-wiki '''Mesjid Raya Kota Belud''' iyonoh salah dikau mesjid yang ben ni muh Kota Belud, Sabah. Mesjid tu media’ pentadbiran Jabatan Hal Ehwal Agama Islam Negeri Sabah (JHEAINS). 0vmotwkvadqw82bjy44jkj5nypz1p9b Metela 0 698 4187 2450 2024-08-09T09:41:32Z JhsBot 61 Pywikibot touch edit 4187 wikitext text/x-wiki Metela ma'na ni muan penerangan, muan penjelasan. rjyx60otvnt1nt96pt1egwi3ocnxirx Mija 0 699 4774 4773 2024-08-19T17:10:12Z Umboh Tuhan 194 + Tungan metelak 4774 wikitext text/x-wiki '''Mija''' iyo noh dikau pekakas bentuk yang datar un bangan betis untuk nampung yo. Mija bioso ni pinakai untuk ngena' barang engko pan tungan ngena makanan. Mija pan bioso ni un kerusi untuk peningko. Mija un pelbagai jinis ni, ben bentuk kok langga yang berbija nut tujuan engko gaya ni dediri. Antara jinis mija yang selalu pinakai iyo noh mija mangan, mija turi engko pan mija kupi. Mija mangan bioso ni ben ta' ruang serudung yang pinakai untuk ngena' makanan. Mija turi pala iyo noh mija diki yang bioso ni ben ta mediam bilik turi untuk pengenaan suh, jam atau pan sawan. Amun mija kupi pala iyo noh mija diki yang nina' mediam bahagian ruang tamu untuk ngena' minuman, makanan atau pan barang-barang. == Tungan metelak == {{Reflist}} 4dk5rrhbfbadecyfuj3dj9er4l76qoh Mija' 0 700 4189 2460 2024-08-09T09:41:33Z JhsBot 61 Pywikibot touch edit 4189 wikitext text/x-wiki Mija' iyonoh selalu pinakai oleh bangan jomo betiru. Iyo pinakai tungan belajar, tungan mangan, dan iko lagi ginuno untuk muat kerjo lain. Diom teturan melayu iyo penau meja. bvx2stysyqn4dqzkqoj0myo1o0xutvc Mina' mina' 0 701 4190 2463 2024-08-09T09:41:33Z JhsBot 61 Pywikibot touch edit 4190 wikitext text/x-wiki Mina' mina' ma'na ni sikot no. tn725phwmntsyker9vyog81dkyl6yop Misha Omar 0 702 4750 4749 2024-08-19T16:44:40Z Umboh Tuhan 194 Misha Omar pada 2007 4750 wikitext text/x-wiki [[Fail:Misha Omar.jpg|thumb|alt=Misha Omar|Misha Omar pada 2007]] '''Misha Omar''' (boi penenakan Samihah @ Aisah Omar 6 Januari 1982 ta' [[Machang]], [[Kelantan]]) iyo tu dangan pelego' pop dendo ta' [[Malaysia]] berbongso [[Melayu]] ngabut betiru boi manang 8 piala [[Anugerah Juara Lagu]], 5 [[Anugerah Industri Muzik]], 3 Anugerah Era kok meroto dembua' tropi [[Festival Filem Malaysia]] ko' [[Anugerah Bintang Popular Berita Harian]]. Iyo tu asal ni lua' Machang, Kelantan ko' boi posok diam bidang seni soro lua' iyo umur ni 19 taun boi nuut pertandingan Bintang RTM 2001. Oron ni boi menik le' lagu ni [[Bunga-Bunga Cinta|''Bunga-Bunga Cinta'']] (Bungo-Bungo Sinta), iyo kakal popular ngabut betiru ngabut muat diri ni setanding kok pelego' dendo betiru dokon Datuk [[Siti Nurhaliza]], [[Dayang Nurfaizah]] ko' [[Liza Hanim]]. Iyo jadi pelego' dendo tinuut le' jomo ta' era 2000-an. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] j4k59wgcfgqh774qaob918p5m1oy4yv Misha omar 0 703 2473 2472 2024-08-09T09:26:58Z Jon Harald Søby 58 1 semakan diimportkan 2472 wikitext text/x-wiki #REDIRECT [[Misha Omar]] dn08gv11y4x6ccc8mwgvm0m92sa18bj Morpoloji 0 704 4191 2480 2024-08-09T09:41:34Z JhsBot 61 Pywikibot touch edit 4191 wikitext text/x-wiki Morpoloji Bahasa Bajau Sama. Morfoloji iono cabang/singo ilmu bahasa untuk metangun Kata/perkataan.Luah ta' unit paling diki bermula tah Fonem-Morfem-Kata-Klausa Santak Frasa. Fonem iono unit paling diki diom ilmu morpoloji yang terdiri luah tah fonem: /α/,/b/,/c/,/d/,/e/,/f/,/g/,/h/,/i/,/k/,/l/,/m/,/n/,/o/,/p/,/q/,/r/,/s/,/t/,/u/,/w/,/x/,/y/ dan /z/. Walaubagaimana pan setiap fonem ea un ling ni dediri ni yang akan kinaji diam ilmu fonologi yang akan bahas ti tah lain ruangan. Morfem: Morfem tu unit tatabahasa yang paling diki untuk membentuk dikau kata yang bengen makna.Contoh ni kata/perkataan "boso" terdiri luah tah duo morfem "bo" koh "so". Jaji kata/perkataan terdiri luah tah dangai-dangai morfem. Semimon kata/perkataan iono Morfem, tetapi niak semimon morfem iono kata/perkataan. Kata: Kata terdiri luah tah gabungan dikau atau lebih fonem.Contoh ni fenem /k/ + fonem /i/ + fonem /t/ + fonem /i/ = un [ k + i + t + i ] untuk metangun/membentuk kata "kiti". Klausa: Klausa tu terdiri dari dikau kata atau lebih untuk membentuk dikau kalimat/ayat.Asal un Subjek(S) koh Predikat(F) layak ningko tah posisi Klausa. Frasa : Frasa terdiri luah tah dikau kata atau lebih untuk pinau frasa.Frasa terdiri luah tah: Frasa Kerja/Kerjo(FK) Frasa Nama/Oron (FN) Frasa Adjektif/Sifat(FA) Frasa Benda(FB) aopv7xvklrodil8apl5dwdcv0vj2hpo Morpoloji ling Sama 0 705 4192 2483 2024-08-09T09:41:35Z JhsBot 61 Pywikibot touch edit 4192 wikitext text/x-wiki Morpoloji Ling Sama d2gnkuifplgb62vs9cu0juxzon956nk Muhammad Hairi Amin bin Hamdan 0 706 2485 2484 2024-08-09T09:26:59Z Jon Harald Søby 58 1 semakan diimportkan 2484 wikitext text/x-wiki #REDIRECT [[MK K-Clique]] a2fhr7gztzty3tbc6h3u8tz7s19xz0m Mulud Nabi 0 707 4193 2490 2024-08-09T09:41:35Z JhsBot 61 Pywikibot touch edit 4193 wikitext text/x-wiki '''Mulud Rasul''' ('''[[mediam Arab]]''': kelahiran Rasul) atau pan Mulud '''[[Nabi Muhammad SAW]]''' ialah lau bersejarah keputeraan Nabi Muhammad. Lau tu labu’ tak lau ke-12 buan Rabiulawal sempena keputeraan Nabi yang labu tak lau senin (luak hadis riwayat muslim, 8/25), 12 Rabiulawal Tahun Gajah somo ko’ 20 April 571. Baginda merupakan nabi yang demburi boi niutus oleh Allah Subjanahuwataala. Tapak keputeraan baginda betiru un dikau bangunan diki’ yang dikenali sebagai Maulid Nabi. <ref>https://ms.m.wikipedia.org/wiki/Maulidur_Rasul</ref> == Tungan Metelak == {{Reflist}} lrdaw9j6fgvzajt0euy0o7qin97vi1l Mungkang 0 708 4194 2493 2024-08-09T09:41:36Z JhsBot 61 Pywikibot touch edit 4194 wikitext text/x-wiki Mungkang ma'na ni sumbang. 8vu0ys4tjido96jqxnmogeotgu9wzai Nabila Huda 0 709 4786 4582 2024-08-19T17:28:42Z Umboh Tuhan 194 + Tungan metelak 4786 wikitext text/x-wiki '''Nabila Huda binti Suhaimi''' (boi penenakan 2 Disember 1984) iyo tu dendangan pelakun engko' pengacara dendo. Nabila Huda binti Suhaimi boi mula belakun lekat taun 2001 iyo tu tekilo ta' dekau Malaysia. Nabila Huda binti Suhaimi tu boi belakun pan ta' pilam munafik. Nabila Huda binti Suhaimi boi kawin menduo lua 2008 iyo been dekau anak dendo oron ni Kesha Laila boi pinenakan lekat taun 2009. Nabila boi sapek engko' ela ni lua taun 2011. Iyo boi tekilo lua' lakunan-lakunan raat boi lakun ni, iyo tu anak sulung lagenda rock tekilo Datuk Amy, vokalis kumpulan Search. == Tungan metelak == {{Reflist}} 71sj1gr6w9l83g8no94qoj6a6kzsl9m Nabila Huda binti Suhaimi 0 710 2500 2499 2024-08-09T09:27:00Z Jon Harald Søby 58 1 semakan diimportkan 2499 wikitext text/x-wiki #REDIRECT [[Nabila Huda]] 381fl85thjwz2sarxirb0i9r252jym4 Nabila huda 0 711 2503 2502 2024-08-09T09:27:00Z Jon Harald Søby 58 2 semakan diimportkan 2502 wikitext text/x-wiki #REDIRECT [[Nabila Huda]] 381fl85thjwz2sarxirb0i9r252jym4 Nampir 0 712 4197 2506 2024-08-09T09:41:38Z JhsBot 61 Pywikibot touch edit 4197 wikitext text/x-wiki Nampir iyono peguul antawa ngejangkit. 1ddtk06mdjlrrhf1k4wyh0wjk50tqus Nandas 0 713 4198 2509 2024-08-09T09:41:38Z JhsBot 61 Pywikibot touch edit 4198 wikitext text/x-wiki Nandas ma'na ni muat gula tebu makai tandasan pinusing le' kerabau. ngiikwpaia1fwgbia79qjkhlbwjzv7p Nangka' 0 714 4671 4670 2024-08-18T20:51:41Z Umboh Tuhan 194 4671 wikitext text/x-wiki [[Fail:Jackfruit hanging.JPG|thumb|Bua' nangka']] '''Nangka'''' (''Artocarpus heterophyllus'') e jinis poon ta' dinakan [[Moraceae]].<ref>"[https://web.archive.org/web/20120815013508/http://www.tropical-biology.org/research/dip/species/Artocarpus%20heterophyllus.htm ''Artocarpus heterophyllus'']". Tropical Biology Association. Oktober 2006</ref> ==Gambar== <gallery mode="packed" heights="100"> Jackfruit (Artocarpus heterophyllus) - photo of the inside.jpg|Nangka' en semio Selling jackfruit in bangkok3.jpg|Bedagang nangka' ta' [[Bangkok]] JackfruitNYC.jpg|Nangka' ta' Manhattan </gallery> ==Rujukan== {{Reflist}} [[Kategori:Bua']] 3a53bvyxs6qr5ykilcr26adzqqeb5g5 Ne'te' 0 715 4200 2519 2024-08-09T09:41:39Z JhsBot 61 Pywikibot touch edit 4200 wikitext text/x-wiki Ne'te iyono memia penu musim beriu toro. o14cwu0uf5dof1a0fo4suet7augjj6m Neelofa 0 716 4583 2523 2024-08-12T10:29:23Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q12698940]] 4583 wikitext text/x-wiki '''Noor Neelofa Mohd Noor''' boi penanakan 10 Februari 1989. Iyo tekilo sebab iyo tu pelakun, pengacara kok model dendo Malaysia. Lepas boi manang ta' Dewi Remaja 2009/10 iyo tekilo bangan jomo bila yo mula berlakun mediam serita judul Kau Yang Terindah yang kinilo sebagai Alisya siniar mediam TV3 engko serita Suri Hati Mr. Pilot siniar mediam Astro Ria. r6llikbbj2emu6r4obnu0sgsxv11ns1 Negaraku 0 717 4584 2528 2024-08-12T10:29:25Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q648596]] 4584 wikitext text/x-wiki '''Negaraku''' pinene' lua' lagu rasmi negeri [[Perak]] asal ni lua' Pulau Mahe ta' kepulauan [[Seychelles]], ai bino mule' le' Sultan Abdullah setelah baginda salasai meluman hukuman tiniman negeri puu' Pulau Seychelles, kerana' ni dakwa bersubahat mono' Residen British, [[JJW Birch]]. o4xoa12e385m6k5z68pib2jts2c873z Nejatan 0 718 4201 2531 2024-08-09T09:41:40Z JhsBot 61 Pywikibot touch edit 4201 wikitext text/x-wiki Nejatan ma'na ni teliti. hk3r6f6mp7eg67ok7b3tucnd9m9q5jk Nelagan 0 719 4202 2534 2024-08-09T09:41:41Z JhsBot 61 Pywikibot touch edit 4202 wikitext text/x-wiki Nelagan iyono metio diri ta' dangan jomo antawa nia' ingin ngelonon dikau' tim am main bul. bcq564uq921iqnzjouoh9eka3wwtg2i Nembiluk 0 720 4203 2537 2024-08-09T09:41:41Z JhsBot 61 Pywikibot touch edit 4203 wikitext text/x-wiki Nembiluk iyono pesurang nuut ta' musu. 8ywdgmh2ebtz52ldaiqcwe3or6evmar Nenggulug 0 721 4204 2540 2024-08-09T09:41:42Z JhsBot 61 Pywikibot touch edit 4204 wikitext text/x-wiki Nenggulug iyono ase'. r9gh4lbt3xn8kt2l4ontd7ela6d3i59 Neredu 0 722 4205 2543 2024-08-09T09:41:42Z JhsBot 61 Pywikibot touch edit 4205 wikitext text/x-wiki Neredu iyono tulus, seterua'. oz27f9n3q1fjpqnz22l9udmmf2cay1b Ngamalan 0 723 4206 2546 2024-08-09T09:41:43Z JhsBot 61 Pywikibot touch edit 4206 wikitext text/x-wiki Ngamalan iyono ngentanan lemu' 9fjsa9d0qqu13rl8tvo8ut5fylvb64j Ngatil 0 724 4207 2549 2024-08-09T09:41:43Z JhsBot 61 Pywikibot touch edit 4207 wikitext text/x-wiki Ngatil ma'na ni ngelelet 6mbplm7u3rfhtigti3mkmjc0p0kdou2 Ngejelabur 0 725 4208 2552 2024-08-09T09:41:43Z JhsBot 61 Pywikibot touch edit 4208 wikitext text/x-wiki Ngejelabur ma'na ni kama le' litak antawa lebo. q0yroa4g5bpwqnd6wgatwwsk9wc0uol Ngekuk 0 726 4209 2555 2024-08-09T09:41:44Z JhsBot 61 Pywikibot touch edit 4209 wikitext text/x-wiki Ngekuk ma'na ni nuul. ceh3efdhiza3x4hqsmlta59xzj04kii Ngelag ngelag 0 727 4210 2558 2024-08-09T09:41:44Z JhsBot 61 Pywikibot touch edit 4210 wikitext text/x-wiki Ngelag ngelag iyono bosoon maku ijin pelimpas ta' embo' embo'. 5klyb1832iicb7k716ogdeg4abwsxz2 Ngelagan 0 728 4211 2561 2024-08-09T09:41:45Z JhsBot 61 Pywikibot touch edit 4211 wikitext text/x-wiki Ngelagan iyono ngelag, nia' ingin sebeta', Ngelagan setemu kok dikau' tim am main bul. jdoplbrqkna4vhev1e2nzvh1yndn29y Ngelebo 0 729 4212 2564 2024-08-09T09:41:45Z JhsBot 61 Pywikibot touch edit 4212 wikitext text/x-wiki Ngelebo ma'na ni tana' bengen lebo'. aeiqngs974ogqusjuhnmw7aqfs2m0ox Ngelempusang 0 730 2566 2565 2024-08-09T09:27:06Z Jon Harald Søby 58 1 semakan diimportkan 2565 wikitext text/x-wiki Reso nia' selisa ofcrjeztjf0tv168bz4zm1ti0g6r2wr Ngelimut 0 731 4213 2569 2024-08-09T09:41:46Z JhsBot 61 Pywikibot touch edit 4213 wikitext text/x-wiki Ngelimut iyono nipu, ngakal. g2gr6j7wn09r6xfmqefxnkm3o0whtgm Ngelitak 0 732 4214 2572 2024-08-09T09:41:47Z JhsBot 61 Pywikibot touch edit 4214 wikitext text/x-wiki Ngelitak ma'na ni tana' bengen litak. rw2dei9zzdi107h8e4874ybi0obu6e9 Ngelumpi 0 733 4215 2575 2024-08-09T09:41:47Z JhsBot 61 Pywikibot touch edit 4215 wikitext text/x-wiki Ngelumpi iyono tapuk-tapuk nampu jomo luara'. ==Tungan metela== * Ngelumpi Budaya Bajau/Sama bercanggah Swafoto, Sabah Taim. glbxk88tnkc9hlq261ah1rhum4e5u3o Ngelute' 0 734 4216 2578 2024-08-09T09:41:47Z JhsBot 61 Pywikibot touch edit 4216 wikitext text/x-wiki Ngelute' ma'na ni lati bana. ezj2unaf6u7xmh38gbr75tfsldmjmri Ngeman 0 735 4217 2581 2024-08-09T09:41:48Z JhsBot 61 Pywikibot touch edit 4217 wikitext text/x-wiki Ngeman ma'na ni lesu' dediki'. 9t7o1ptd67paudlli0ym4odkm5qwitx Ngemban 0 736 2583 2582 2024-08-09T09:27:07Z Jon Harald Søby 58 1 semakan diimportkan 2582 wikitext text/x-wiki Ngemban iyono napas jomo beranti. jj5lvk0bj1ak3pj7jdync7uiuycbn75 Ngemit 0 737 2585 2584 2024-08-09T09:27:07Z Jon Harald Søby 58 1 semakan diimportkan 2584 wikitext text/x-wiki '''Ngemit''' iyo no maksud ni ngejogo peranak dfh607jlqmrhyv50408ar5l6vyasqq2 Ngempalan 0 738 4218 2588 2024-08-09T09:41:49Z JhsBot 61 Pywikibot touch edit 4218 wikitext text/x-wiki Ngempalan ma'na ni mio jo semimon. s58o11kz8zon6k55m1lw46figwyua4b Ngenguk 0 739 4219 2591 2024-08-09T09:41:49Z JhsBot 61 Pywikibot touch edit 4219 wikitext text/x-wiki Ngenguk iyono nampung. c8c6nxfc3h1zj51vtps7cd22q45jsl8 Ngeremun 0 740 4220 2594 2024-08-09T09:41:50Z JhsBot 61 Pywikibot touch edit 4220 wikitext text/x-wiki Ngeremun ma'na ni sakit bana no. bl3enofv0hkmuv6595h8qss5sbbxt21 Ngerentubu' 0 741 4221 2597 2024-08-09T09:41:50Z JhsBot 61 Pywikibot touch edit 4221 wikitext text/x-wiki Ngerentubu' ma'na ni soro uran antawa beriu to1nsz3uv5ei4df8mjj41kqd3fab25j Ngerered 0 742 4222 2600 2024-08-09T09:41:51Z JhsBot 61 Pywikibot touch edit 4222 wikitext text/x-wiki Ngerered antawa ngelered ma'na ni api ai poyo tunuan ni. 0gd1n8yfj5ykxycmsatl6skg9wv5xjt Ngeromon reso 0 743 4223 2603 2024-08-09T09:41:51Z JhsBot 61 Pywikibot touch edit 4223 wikitext text/x-wiki Ngeromon reso iyono perembaan Sama ma'na ni nia' bani tarus tarang. 7v71m508h9cv9cd43k9gen9bmg87gj3 Ngerunyum 0 744 4224 2606 2024-08-09T09:41:51Z JhsBot 61 Pywikibot touch edit 4224 wikitext text/x-wiki Ngerunyum ma'na ni ngakal, nipu, ngarang. 4dshgz7bhl49eq58oliq3my3ijmjfm6 Nginta' 0 745 4225 2609 2024-08-09T09:41:52Z JhsBot 61 Pywikibot touch edit 4225 wikitext text/x-wiki Nginta' ma'na ni mangan luuk jo nyaun buas ni. 7hi5br7s9080ebmxc2i46ki5zr6ixnn Nia' mina' mina' 0 746 4226 2612 2024-08-09T09:41:52Z JhsBot 61 Pywikibot touch edit 4226 wikitext text/x-wiki Nia' mina' mina' ma'na ni beta lagi. kdr9riec37dayyw3e462k04qb5tglop Nia' ngekuk 0 747 4227 2615 2024-08-09T09:41:53Z JhsBot 61 Pywikibot touch edit 4227 wikitext text/x-wiki Nia' ngekuk ma'na ni nia' nuul. hdjeqpodz0ytex71htjsjzt5cyhtqj1 Nia' ngenguk 0 748 4228 2618 2024-08-09T09:41:53Z JhsBot 61 Pywikibot touch edit 4228 wikitext text/x-wiki Nia' ngenguk ma'na ni nia' nampung, remod. 5rnbl9ooz07mq454vhsn0tb31ohom61 Nia' tekelis 0 749 4229 2621 2024-08-09T09:41:54Z JhsBot 61 Pywikibot touch edit 4229 wikitext text/x-wiki Nia' tekelis iyono nia' tebisan. dvnp2s3hmbjo97bxte3npiqu1lil8xk Niabaian 0 750 4230 2624 2024-08-09T09:41:54Z JhsBot 61 Pywikibot touch edit 4230 wikitext text/x-wiki Niabaian ma'na ni neligan enggibang antawa engkuanan. ru0a1bp61rxr2r4qdspzasap8y6a32a Nibau 0 751 4231 2627 2024-08-09T09:41:54Z JhsBot 61 Pywikibot touch edit 4231 wikitext text/x-wiki Nibau ma'na ni jiara jomo ngemban. pn5kwla8qwcrshjfkx0dkb8zdqncffm Nicol Ann David 0 752 4765 4764 2024-08-19T16:59:24Z Umboh Tuhan 194 + Tungan metelak 4765 wikitext text/x-wiki [[Fail:Squash Stars Meet the Stars Session 1 cropped.jpg|thumb|Nicol Ann David pada 2010]] '''Datuk Nicol Ann David''' asal ni jomo lua’ Pulau Pinang. Iyo lahir pada 26/8/1983. Oron Eyang ni Mary David berketurunan Cina manakala Ma’ ni Desmond David yang ben keturunan India. Seperti yang terati ti, Datuk Nicol Ann David iyo noh pemain Skuasy yang rojo sampin engai jo mediom laat ti Malaysia tapi iyo pan antara pemain terbaik [[Skuasy]] ta’ semimon laat. Iyo pan antara pedendoon Asia yang ningo paling enjata mediom sukan Skuasy. Yo selalu tekulek number 1 diom pertandingan Skuasy tu. Kemenangan ni yang rojo iko tungan ni jadi tokoh yang sentioso unggul ta pandang masyarakat sehingga tekulek gelaran Datuk. Iyo pan jadi pededoon Asia yang ngentan gelaran Terbuka Dunia masa taun 2005, 2006, 2008,2009 ko’ 2010. Ngai setakat gelaran Terbuka Dunia tapi iyo pan ngentan gelaran Terbuka British masa taun 2005, 2006 engko pan 2008. Jadi sebagai rakyat yang dikau bumbung laat engko Datuk Nicol Ann David, aku sangat bangga atas kemenangan-kemenangan yang boi tekulekk ni. Semoga semakin iko lagi tokoh-tokoh yang hebat dokon Datuk Nicol Ann David tu. == Tungan metelak == {{Reflist}} r2yjygfqf962lprd7x4hn8t597gybx8 Nike Ardilla 0 753 4233 2633 2024-08-09T09:41:55Z JhsBot 61 Pywikibot touch edit 4233 wikitext text/x-wiki Raden Rara Nike Ratnadilla boi penanakan ta' bandung tebeta 27 disember taun 1975- iyono ai ngemban tak bandung pan 19 mac taun 1995 diom umur ni 19 taun. iyono pengelego dendo luak indonesia bongso sunda kok temban muk bandung. iyono tekilo jomo "Queen of Rock Indonesia" kok retis kok album teriko boi laku tak Indonesia kok Malaysia. iyotu boi ngemban boi silanggar kok kereta lain tak laan oyo diom yo 19 taun. iyono boi-boi mo lagu boi buat komposer paling tekilo jomo luak Malaysia, Saari Amri. 4mweq16rcxhu8tfiegx8124zxuzs4b4 Nikki Palikat 0 754 2638 2637 2024-08-09T09:27:12Z Jon Harald Søby 58 4 semakan diimportkan 2637 wikitext text/x-wiki Nicolette Louise Palikat(penenakan 1 November 1985) atau betiru tekilo ko' oron Nikki Palikat iyo tu dangan pelego' dendo diom Malaysia ko' boi jadi peserta Malaysian Idol musim dikau. Iyo pan boi manang tempat kedua masa ni nuut pertandingan belagu ta' astro, program a' pinau Gegar Vaganza(musim 8) taun 2021. Asal ni lua' Tambunan,Sabah ko' boi penenakan 1 November 1985 ta' Berrien Springs,Michigan,Amerika Syarikat masa ma' ni ngelanjut pelajaran ni mea.Iyo tu pandai ling idaan ko' bahasa inggeris moko' Bahasa Melayu. Lapas Malaysia Idol 1, Iyo nambung sekul ni ta' Kolej Matrikulasi Labuan.Lapas a', iyo sekul ta' St Francis Convent Catholic School. Iyo tekilo ta' Malaysia moko' soro langga' pinau(Whistle Register) boi jadi gaya ni diom legoon' ni. 8fku48me318o0rh639sjage6lx5f6a6 Nimbug 0 755 4234 2641 2024-08-09T09:41:56Z JhsBot 61 Pywikibot touch edit 4234 wikitext text/x-wiki Nimbug iyono indu' manuk nuut ngentelo ta' keteraan manuk lain. 9p6ltwmqa65t9ibwcchzvsx4vbc0s0a Ninta' 0 756 4235 2644 2024-08-09T09:41:57Z JhsBot 61 Pywikibot touch edit 4235 wikitext text/x-wiki Ninta' ma'na ni luuk jo kenakan nyaun buas ni. 5a5vow5dhkrhurtu1dni0074kvsprwu Nissa Sabyan 0 757 2647 2646 2024-08-09T09:27:13Z Jon Harald Søby 58 2 semakan diimportkan 2646 wikitext text/x-wiki [[Fail:Nissa Sabyan.jpg|thumb|Nissa Sabyan]] '''Nissa Sabyan''' boi pinenakan tah Lumajang, Jawa Timur, 23 Mei 1999. Iyo pan dendangan pelego' gambusyang seguul diam kumpulan lagu Sabyan Gambus. Nissa pan tekilo kerna iyo selalu ngulang lagu selawat nabi. Bidio ni' selalu pinekiton ta' diom Youtube. 6zrtwaqvvafe47u9odyx37gu4mnzo7v Nondos 0 758 4236 2650 2024-08-09T09:41:57Z JhsBot 61 Pywikibot touch edit 4236 wikitext text/x-wiki Nondos ma'na ni nudu eni80568rd9dqcy0ajnbl7d4t00vnqp Nor Aniza Binti Idris 0 759 2652 2651 2024-08-09T09:27:13Z Jon Harald Søby 58 1 semakan diimportkan 2651 wikitext text/x-wiki #REDIRECT [[Noraniza Idris]] tdlv5r6b8re36szpgciwnfmlr9ajet5 Nor Zila binti Haji Aminuddin 0 760 2654 2653 2024-08-09T09:27:13Z Jon Harald Søby 58 1 semakan diimportkan 2653 wikitext text/x-wiki #REDIRECT [[Ella Aminuddin]] notopm6uh12ikc1vpm7y2x37r8vfl3v Nora Danish 0 761 4800 4585 2024-08-19T17:40:48Z Umboh Tuhan 194 + Tungan metelak 4800 wikitext text/x-wiki '''Nora binti Mohd Danish Hanif''' (lahir 7 Mac 1982) antau tekilo jomo Nora Danish iyo no pelakon diam wanita Malaysia. Iyo tekilo ngentan watak utama Puteri diam siri komedi Puteri. Iyo pan tekilo le' kerejoon ni diam TV. == Tungan metelak == {{Reflist}} mzkyfxf80q4hm83154llb962p50o12l Nora danish 0 762 2661 2660 2024-08-09T09:27:14Z Jon Harald Søby 58 1 semakan diimportkan 2660 wikitext text/x-wiki #REDIRECT [[Nora Danish]] oozx8l2ge88dly5ts4hvu54hb4t767l Noraniza Idris 0 763 4643 2665 2024-08-18T06:55:34Z Umboh Tuhan 194 ''' 4643 wikitext text/x-wiki '''Nor Aniza binti Idris''' (penenanakan tak kluang, johor, Malaysia, 27 ogos 1968; umur 54), iyo tekilo kok oron Noraniza Idris, iyo dangan pelego, pelakun, penulis lagu tak Malaysia. Iyo tu dangan pelego malaysia boi melua' album dediri diom 4 dekad entedo. Iyo boi boi mula belagu lua' 1985, iyo lagi tekilo kok oron Kak Ani pelego irama malaysia kok etnik kreatif sampai iyo betiru pinau kok gelaran Ratu Irama Malaysia. [[Kategori:Pelego' dendo Malaysia]] hkhaf9iddpd1hoawpyyxl7yd2fynmky Normala Samsudin 0 764 2667 2666 2024-08-09T09:27:14Z Jon Harald Søby 58 1 semakan diimportkan 2666 wikitext text/x-wiki Yang Berbahagia Puan Sri Dati Seri Normala binti Samsudin (boi pinenakan 4 jun 1964) eyo no dwngan pengacara, wartawan penyiaran, tukang mesampai berita kok pelakun mitu Malaysia. Eyo pan bagas pengacara majalah wanita TV3, Nona tungan ni boi jadi hos lua' ta' 2001 ngabut 2004. 5gnz8xjybojav6k61ovwpfcug24siaz Nulat 0 765 4237 2670 2024-08-09T09:41:59Z JhsBot 61 Pywikibot touch edit 4237 wikitext text/x-wiki Nulat ma'na nonom parai ennggentian parai matai. tdj5etzvf8pld3rg1lr5ooa6ed88r6g Nur Fazura Sharifuddin 0 766 4748 4642 2024-08-19T16:43:55Z Umboh Tuhan 194 + Tungan metelak 4748 wikitext text/x-wiki '''Nur Fazura Sharifuddin''' boi penenakan lua taun 27 september 1983. Iyo tu sebagai pelakun, pegacara, model engko penyanyi dendo Malaysia. Iyo tu boi mula kerjaya ni lua industri hiburan tak ransangan talibisin engko lakonan diki ni. Fazura tu pan boi tinerbit ole Redieu Talibisin Malaysia (RTM). Lekat taun 2004, iyo boi ngelansar kerjaya ni jadi pelakun, iyo boi belakun tak pilam Bicara Atai yang boi niara ole Rosnani Jamil fazura tu boi pan nerimo pencalunan anugera. Taun 2005 fazura boi nina tak watak utama menjadi Putri diom pilam Gol/Gincu. Fazura tu pan boi jadi duta jenama sabun lua taun februari 2011. Fazura tu anak numbur telu lua empat dik bedik, iyo dendangan anak dendo tunggal diom keluarga ni. Mak ni boi ngemban lua fazura umur 17 taun, iyo boi kule pendidikan ni tak sekul menenga datuk mahmud mat tak kampung ni. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] jifcewc7voa3gka9c86oqpbi61akyke Nur Heliza Helmi 0 767 4743 4586 2024-08-19T16:40:18Z Umboh Tuhan 194 + Tungan metelak 4743 wikitext text/x-wiki '''Nur Heliza Helmi''' (lahir 3 Februari 1986) iyo tu bagas pelajar [[Akademi Fantasi]]a Musim ke-5. Iko pengalaman ko' pan bakat ni mediam pelego' sebab pan iyo bani posok Akademi Fantasia. Enggai panday belagu jo, iyo tu pan panday bana mesampay sajak. Betiru jomo Malaysia rojo kagum miyo sebab iyo selalu nuut mediam misi kemanusiaan dokon nabang-nabang jomo muh [[Palestim|Palestin]]. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] tog3z8q7nozgoeutlswrzp8y7vmp1ng Nurul Fatiha Abd Hamid 0 768 2681 2680 2024-08-09T09:27:16Z Jon Harald Søby 58 1 semakan diimportkan 2680 wikitext text/x-wiki '''Nurul Fatiha Abd Hamid''' boi pinenakan ta' Alor Star, Kedah, Malaysia pada 13 April, 1986. Iyo dendangan atlet gimnastik artistik yang boi-boi ngewakil Malaysia pada kejohanan Sukan Asia Tenggara (2001 / 2003 / 2005 / 2007), Sukan Komanwel (2006), Sukan Asia (2006) kok pan kejohanan gimnastik bagal debagi. Nurul Fatiha boi namat sekul ni ta' Universiti Putra Malaysia kok betiru kerjo jadi pengacara dan nampai berita ta' RTM. Iyo' pan betiru ngentan jawatan Penerbit Rancangan ta' RTM. Iyo boi kawin pada 10 Disember 2010 kok bagas pemain bul Kelantan FA, betiru main ta' Johor Darul Ta'zim F.C. iyono Mohd Shakir Shaari. Gai tekuleh 4 urang anak lepas boi kawin siam taun. a3fqob0w5oxvj0nhofjrs9c3fo97its Nurul Izzah Anwar 0 769 4704 4702 2024-08-19T16:23:39Z Umboh Tuhan 194 ''' 4704 wikitext text/x-wiki '''Nurul Izzah''' (boi pinenakan 19 November 1980) eyo no jomo politik Malaysia kok anak sioko Dato Seri Anwar Ibrahim (Perdana Menteri Malaysia ke-10) kok Dato Seri Dr.Wan Azizah Wan Ismai, bagas timbalan perdana menteri. Eyo no bagas ahli Parlimen Permatang Pauh boi tungan ni manang tebetak PRU-14 2018. Pada peringkat parti,eyo no Naib Presiden KEADILAN ngabut tahun 2018. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] bes34le6a3gloduw7hlper65s7u9i1e Nutup aurat 0 770 4238 2687 2024-08-09T09:42:00Z JhsBot 61 Pywikibot touch edit 4238 wikitext text/x-wiki Nutup aurat erti ni anggota badan wajib tinutup kok tinapuk. Haram bagi jomo niak mahram ngendak, nutup aurat wajib bagi jomo Muslim niak kiro dela atau dendo. Wajib nutup aurat dasar ta’ Al-Quran kok hadis. Aurat dela luak pongsot sampai tut, manakala dendo mimon anggota badan kesuali permukaan mo kok pergelangan tangan. 1bc0eb4xvkgslio55w9ucgsix6dofyl Nuut noo 0 771 4239 2690 2024-08-09T09:42:01Z JhsBot 61 Pywikibot touch edit 4239 wikitext text/x-wiki Nuut noo iyono perembaan Sama ma'na ni nia' nuut ngerambat antawa ngeringgi' tapi maku bagian ni. r2ylb0o2jxz0fa9ywdskhrfsbo1xkmw Odon 0 772 4240 2692 2024-08-09T09:42:01Z JhsBot 61 Pywikibot touch edit 4240 wikitext text/x-wiki Odon iyono ginuno' untuk menik pejata kok duai pedia ta' dikau tempat yang ingin tinuju oleh jomo fjr25hif5nrq2e590vi61ihs9jea2o8 Ogok 0 773 4587 2698 2024-08-12T10:29:31Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q787]] 4587 wikitext text/x-wiki [[Fail:Sow_with_piglet.jpg|thumb|Ogok]] '''Ogok''' iyono sejinis [[binatang]] mamalia ungulata yang langkau munsung ni kok urung ni pepen. Ogok iyono binatang maserba, ma'na ni gai mangan daging kok tenomon tenomon. Ogok pan dianggap dikau mamalia yang rojo belakar kok sanang bana pinelioro banding kok uwa' kok using. hqbplhk88apstxpp4t0557pq3sj2pc5 Oki Setiana Dewi 0 774 4662 4241 2024-08-18T15:59:03Z Umboh Tuhan 194 Dr Hj Oki Setiana Dewi pada 2010 4662 wikitext text/x-wiki [[Fail:Oki Setiana Dewi.jpg|thumb|Dr Hj Oki Setiana Dewi pada 2010]] Dr. Hj. Oki Setiana Dewi, S.Hum, M.Pd boi pinenakan tah Batam, Kepulauan Riau, 13 Januari 1989. Beliau dendangan pelakon Indonesia yang boi ngelakon tokoh Anna diom filem Ketika Cinta Bertasbih. Anak dinakan Oki lua' tah Palembang, Suliyanto kok Yunifah Lismawati. Lua' umur ni 16 tahun Oki boi pindah puh Jawa, iyo temban tah Depok. Betiru, Oki jadi pimpinan Yayasan Maskanul Huffadz kok pendakwah. Enggai tah Indonesia joh, tetapi tah laat lain seperti Malaysia, Singapura kok Brunei Darussalam pan. dmw3sdr53v4eg1tcccnz6hvzxo5qr9r Onok 0 775 4243 2705 2024-08-09T09:42:03Z JhsBot 61 Pywikibot touch edit 4243 wikitext text/x-wiki Onok ma'na ni buas ai no datai, buas sukup no datai ni buli no kinakan 6cow0tsp4o7em2r1238yxhohx0ybttr Oron 0 776 4770 4769 2024-08-19T17:06:03Z Umboh Tuhan 194 + Tungan metelak 4770 wikitext text/x-wiki '''Oron''' iyono peketaan yang sinebut atau pan tanda yang dinagu ta barang, jomo, tempat, produk kok pan gagasan atau konsep, yang bioso ni ginuno untuk mekilo kok pan banding dikau kok dikau. Oron pinakai untuk mekilo rerungan atau pan mekilo barang. == Tungan metelak == {{Reflist}} amktg1v2hy2bo6b0mid7d5xrq9ii85c Osom Limau 0 777 2711 2710 2024-08-09T09:27:18Z Jon Harald Søby 58 3 semakan diimportkan 2709 wikitext text/x-wiki #REDIRECT [[Osom limau]] g8b51orwil290my1fa40sjladbcwn9x Osom limau 0 778 4588 2754 2024-08-12T10:29:34Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q849387]] 4588 wikitext text/x-wiki [[Fail:Pokok Limau Kasturi dalam pasu.jpg|thumb|Osom Limau diom pasu ]] '''Osom limau''' atau oron saintifik ni ''Citrus microcarpa'' lekat ta' keluarga Rutaceae, jinis [[poon]] tena'. Jomo Sama bioso ni nonom osom limau tu ta, sedi ruma'. Eko guno ni osom limau tu ta, diam masayarakat Bajau Sama terutama ni diom makanan. Masyarakat Malaysia minat makay osom limau ta' diam makanan ko minuman. Jadi eko pasaran untuk osom limau tu, ta' [[Malaysia]]. Rego ni ta' pasar lebih kurang [[Ringgit|RM]]4.50 dekilo samapai RM6.50 dekilo. Jomo petani bule' nu nonom osom tu ta' diam kabun untuk nambah sumber pendapatan segay. Osom limau tu sanang tomo'. Yoo bule' tomo' ta' eko jenis tana', tapi tana' yang paling geroton ni yo nu, tana' bengen [[ungus]]. Lagi pan iklim ta' Malaysia tu sangat sesuai untuk osom limau. Poon osom liau bule tenonom lekat ta' bigi atau pan makai poon kenawin. Bioso ni jomo nonom makay bigi, tapi amun tujuan untuk kabun, petani akan makai bibit kawin. Osom limau tu pan bule tenonom diom pasu bungo. Sebelum nonom, mesti sedio tana' campuran makay tana, tea' manuk ko tana' ungus. Campuran tu genuul semimon. Tana' campuran tu pinosok ta' diom pasu. Bibit osom limau bule nu tenonom tarus ta' diom pasu. Bioso ni amun tonom ta' kabun atau ta' jata' tana', mesti sedio lubang untuk nonom berukuran 60cm langkau x 60cm lebar x 60 cm lolom. Jarak dempoon ko' dempoon osom limau amun tenonom jata' tana' yo ni 6m x 6m. Jarak nonom mesti bana' supaya poon osom limau nia' serebut makanan, bue' ko moto elau. Masa ni poyo, osom limau tu perlu eko bue' tapi poon osom liau nia' bule' nerondom diom bue. Poon osom limau anu bau' tenonom mesti ni seniram menduo dembay. Dembila' sensaung ko' dembila' kemuap. untuk kule' hasil [[bua']] osom liau yang alap, engo-engo ingos anu bean penyakit, mesti teniman. Masa poon limau masi diki', [[rumput]] anu tomo' ta' sedi poon limau mesti teniman makai tangan atau pan makai sangkul. Amun ai nu poon limau oyo, maka bule nu makai rasun rumput untuk ngerasun rumput. Perlu pan makai baja tenomon untuk kule' poon osom limau yang lawa' ko' hasil bua' osom limau yang alap. Baja bioso ni penakay masa poon limau diki yo ni Baja urea 50g/poon. Tenomon osom limau diom pasu makay baja urea 20g/pasu. Tea' manuk keroi 50Kg/poon, penakay masa umur poon osom limau ai nu lebi dari dentahun. Pembajaan binuat menduo dentahun. Serangga anu bioso mengkeraat poon ko bua' osom liamu yo ni kutu trip, langau bua', pelombong duun, kepinding namuk ko pengurik bua'. Serangga tu bule kenawal makai rasun Malathion. Kebersihan kabun pan mesti nejogon. Osom limau tenonom makay bibit kawin, bioso ni, mula melua' bua' amun umur ni ai nu teko duo - telu taun. Asil bua' osom limau tu nia' somo dempoon ko dempoon, tapi bioso ni, asil tarus menik. Poon osom limau tu alap pan tenonom ko niusa' palap-palap, sebab pasaran ni iko ko' langa. Diom pandangan ku, osom limau tu alap niusa' kerana nia dangay perlu iko sin penakay. Lagi pan hasil bua' osom limau tu makin menik tiap dentahun. Iko bana'untung ni diom masa langkau. ==Ninda' pan== 2vn43doiejxraf52xcqsuxryozulxr4 Oto 0 779 4245 2757 2024-08-09T09:42:04Z JhsBot 61 Pywikibot touch edit 4245 wikitext text/x-wiki Oto iyono ulun eun8elpmnuvvdkik27fvs2slmcukxgd PIDA 0 780 2759 2758 2024-08-09T09:27:22Z Jon Harald Søby 58 1 semakan diimportkan 2758 wikitext text/x-wiki #REDIRECT [[Pida']] ed72dqcbmj9brb5vaivmkdd2r1x4i8g Pagut 0 781 4246 2761 2024-08-09T09:42:05Z JhsBot 61 Pywikibot touch edit 4246 wikitext text/x-wiki Pagut tu mimon jomo akan ngerso ni, contoh ni ingin muat kerjo tapi reso buat ko’ iyo akan nangguh kerjo ae sampai no kerjo ae lambat binuat. Itu no memusnahkan dedangan amun iyo ben kerjon kerna iyo niak begerak ko’ usa’ diri ni. Pagut pan buli monok sikap aktip ti muat kerjo ko’ ni anggap hina ta’ kalangan jomo.Paling teruk lagi sikap pagut tu paling binanci ole Allah S.W.T. kqrmalh56l9yc20qxqyw02hbqzidp7h Pakayan 0 782 2770 2769 2024-08-09T09:27:23Z Jon Harald Søby 58 8 semakan diimportkan 2769 wikitext text/x-wiki '''Pakayan''' pinakai untuk nutup mimon anggota [[badan]] jomo lua enjata sampai media'. Tujuan pakayan untuk ngelindung badan jomo lua' cahaya moto' lau somo pan ko' jenis cuaca debagi.<ref>https://ms.erf-est.org/2133-atuendo.html</ref> == Tungan metelak == {{Reflist}} [[Kategori:Pakayan]] jcdwtpmo40ne65xek4fdxg416nyux2l Palestin 0 783 4589 2797 2024-08-12T10:29:36Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q219060]] 4589 wikitext text/x-wiki {{Short description|Country in West Asia}} {{About|the State of Palestine specifically|the Fatah-controlled government body|Palestinian National Authority|the geographical region|Palestine (region)|other uses|Palestine (disambiguation)}} <noinclude>{{User:RMCD bot/subject notice|1=Palestine|2=Talk:State of Palestine#Requested move 1 June 2024}} </noinclude>{{Pp-move}} {{Pp-extended|small=yes}} {{Use dmy dates|date=November 2020}} {{Use American English|date=July 2020}} {{Infobox country | conventional_long_name = State of Palestine | common_name = Palestine | native_name = {{Nativename|ar|دولة فلسطين}}<br />''{{Resize|80%|{{Transliteration|ar|Dawlat Filasṭīn}}}}'' | image_flag = Flag of Palestine.svg | image_coat = Coat of arms of Palestine.svg | symbol_width = 70px | national_anthem = "{{Lang|ar|{{Big|فدائي}}}}"<br />{{Lower|0.1em|"[[Fida'i]]"<ref>{{Cite web|title=Palestine |access-date=8 June 2014 |website=nationalanthems.info |url=http://www.nationalanthems.info/ps.htm |archive-url=https://web.archive.org/web/20140331034257/http://www.nationalanthems.info/ps.htm |archive-date=31 March 2014 |format=includes audio |url-status=live }}</ref>}}<br />"Fedayeen Warrior" | image_map = State of Palestine (orthographic projection).svg | map_width = 220px | map_caption = [[Palestinian territories|Territory claimed by Palestine]] (green).<ref name=only1967 /><br />Claimed territory annexed by Israel (light green). | capital = {{Unbulleted list |item1_style=margin-bottom:2px;|[[Jerusalem]] ([[Status of Jerusalem|limited recognition]]){{Efn|The [[Palestinian Declaration of Independence]] proclaims the "establishment of the State of Palestine on our Palestinian territory with its capital Jerusalem (Al-Quds Ash-Sharif)." Israel exercises ''de facto'' control over Jerusalem, but [[Status of Jerusalem|neither state’s claims to Jerusalem are widely recognized by the international community]]. [[Ramallah]] is the administrative capital where government institutions and [[List of diplomatic missions to Palestine|foreign representative offices]] are located, while most countries maintain their [[List of diplomatic missions in Israel|embassies to Israel]] in [[Tel Aviv]]. In [[Oslo I Accord]], few parts of Jerusalem went under control of the Palestinian government, but did not solved overall [[status of Jerusalem]].}} |[[Ramallah]] }} | status = [[United Nations General Assembly observers|UN observer state]] under [[Israeli occupation of Palestine|Israeli occupation]]<br />[[International recognition of the State of Palestine|Recognized by 145 UN member states]] | capital_type = {{Unbulleted list |item1_style=margin-top:2px;margin-bottom:2px;|Proclaimed capital |Administrative<br />center }} | [[Gaza City]] (before 2023), currently in flux<ref name="flux1">{{Cite web|url= https://english.wafa.ps/Pages/Details/140699#:~:text=ActionAid%3A%20Conditions%20in%20Rafah%20at,over%20one%20million%20displaced%20people | title= ActionAid: Conditions in Rafah at breaking point, with over one million displaced people |work=wafa agency}}</ref><ref name="flux2">[https://www.npr.org/2024/05/24/g-s1-741/rafah-gaza-israel-hamas-war Nearly 1 million Palestinians are fleeing Rafah and northern Gaza]</ref> | official_languages = [[Arabic language|Arabic]] | demonym = [[Palestinians|Palestinian]] | government_type = Unitary [[semi-presidential republic]]<ref name=declaration1988>{{Cite web|title=Declaration of Independence (1988) (UN Doc) |date=18 November 1988 |access-date=8 June 2014 |website=State of Palestine Permanent Observer Mission to the United Nations |url=http://www.un.int/wcm/content/site/palestine/cache/offonce/pid/12353 |archive-url=https://web.archive.org/web/20140608203237/http://www.un.int/wcm/content/site/palestine/cache/offonce/pid/12353 |archive-date=8 June 2014 |url-status=dead |publisher=United Nations }}</ref><!-- Articles in Wikipedia may not be used as citations; I have cited the published document --> | leader_title1 = [[President of the State of Palestine|President]] | leader_name1 = [[Mahmoud Abbas]]{{Efn|name=PLOchair}} | leader_title2 = [[Prime Minister of the State of Palestine|Prime Minister]] | leader_name2 = [[Mohammad Mustafa (economist)|Mohammad Mustafa]] | leader_title3 = [[Speaker of the Palestinian Legislative Council|Speaker of the Parliament]] | leader_name3 = [[Aziz Dweik]] | legislature = [[Palestinian National Council|National Council]] | sovereignty_type = [[#History|Formation]] | established_event1 = [[Palestinian Declaration of Independence|Declaration of Independence]] | established_date1 = 15 November 1988 | established_event2 = [[United Nations General Assembly resolution 67/19|UNGA observer state resolution]] | established_date2 = 29 November 2012 | established_event3 = Sovereignty dispute with [[Israel]] | established_date3 = [[Israeli–Palestinian conflict|Ongoing]]{{Efn|name=control}}<ref>{{Cite web|first1=Maayana |last1=Miskin |title=PA Weighs 'State of Palestine' Passport |date=5 December 2012 |access-date=8 June 2014 |website=israelnationalnews.com |url=http://www.israelnationalnews.com/News/News.aspx/162844#.U5TD6vmICm6 |archive-url=https://web.archive.org/web/20121207082503/http://www.israelnationalnews.com/News/News.aspx/162844 |archive-date=7 December 2012 |url-status=live |publisher=Arutz Sheva |quote=A senior PA official revealed the plans in an interview with ''Al-Quds'' newspaper. The change to 'state' status is important because it shows that 'the state of Palestine is occupied,' he said. }}</ref><ref name="Limitations">{{Cite news|title=State of Palestine name change shows limitations|url=https://news.yahoo.com/state-palestine-name-change-shows-limitations-200641448.html|agency=AP|date=17 January 2013|quote=Israel remains in charge of territories the world says should one day make up that state.|archive-url=https://web.archive.org/web/20130110025703/http://news.yahoo.com/state-palestine-name-change-shows-limitations-200641448.html |archive-date=10 January 2013 }}</ref> | area_km2 = 6,020<ref name="UN Stats-2012">{{Cite book |chapter-url=https://unstats.un.org/unsd/demographic/products/dyb/dyb2012/Table03.pdf |chapter=Table 3, Population by sex, annual rate of population increase, surface area and density |title=Demographic Yearbook |url=https://unstats.un.org/unsd/demographic/products/dyb/dyb2012.htm |date=2012 |publisher=[[United Nations Statistics Division]] |access-date=28 January 2018 |archive-url=https://web.archive.org/web/20171015114145/https://unstats.un.org/unsd/demographic/products/dyb/dyb2012.htm |archive-date=15 October 2017 |url-status=live }}</ref> <!-- Area should match [[List of countries and dependencies by area]] --> | area_rank = 163rd <!-- Area rank should match [[List of countries and dependencies by area]] --> | area_footnote = | area_sq_mi = 2,320 <!-- Area should match [[List of countries and dependencies by area]] --> | percent_water = 3.5<ref>{{Cite web |url=https://www.cia.gov/the-world-factbook/countries/west-bank/ |title=The World Factbook: Middle East: West Bank |website=cia.gov |publisher=Central Intelligence Agency |date=7 April 2014 |access-date=8 June 2014 |archive-date=22 July 2021 |archive-url=https://web.archive.org/web/20210722231029/https://www.cia.gov/the-world-factbook/countries/west-bank/ |url-status=live }}</ref> | area_label2 = [[West Bank]] | area_data2 = 5,655 km{{Smallsup|2}} | area_label3 = [[Gaza Strip]] | area_data3 = 365 km{{Smallsup|2}}<ref>{{Cite web |url=https://www.cia.gov/the-world-factbook/countries/gaza-strip/ |title=The World Factbook: Middle East: Gaza Strip |website=cia.gov |publisher=Central Intelligence Agency |date=12 May 2014 |access-date=8 June 2014 |archive-date=12 January 2021 |archive-url=https://web.archive.org/web/20210112082940/https://www.cia.gov/the-world-factbook/countries/gaza-strip |url-status=live }}</ref> | population_estimate = 5,483,450<ref name="census">{{Cite web| url=https://www.pcbs.gov.ps/statisticsIndicatorsTables.aspx?lang=en&table_id=676| title=Estimated Population in the Palestine Mid-Year by Governorate,1997-2026| publisher=Palestinian Central Bureau of Statistics| access-date=7 December 2022| archive-date=7 December 2022| archive-url=https://web.archive.org/web/20221207112233/https://www.pcbs.gov.ps/statisticsIndicatorsTables.aspx?lang=en&table_id=676| url-status=live}}</ref> | population_estimate_year = 2023 | population_estimate_rank = 121st | population_census_year = | population_density_km2 = 731 | population_density_sq_mi = 1,895 | population_density_rank = | GDP_PPP = {{Increase}} $36.391 billion<ref name="IMFWEO.PS">{{Cite web |url=https://www.imf.org/en/Publications/WEO/weo-database/2023/October/weo-report?c=487,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2020&ey=2028&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1 |title=World Economic Outlook Database, October 2023 Edition. (Palestine) |publisher=[[International Monetary Fund]] |website=IMF.org |date=10 October 2023 |access-date=16 October 2023 |archive-date=23 October 2023 |archive-url=https://web.archive.org/web/20231023133432/https://www.imf.org/en/Publications/WEO/weo-database/2023/October/weo-report?c=487,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2020&ey=2028&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1 |url-status=live }}</ref> | GDP_PPP_year = 2023 | GDP_PPP_rank = 138th | GDP_PPP_per_capita = {{Increase}} $6,642<ref name="IMFWEO.PS" /> | GDP_nominal_per_capita_rank = 131st | GDP_nominal = {{Increase}} $18.109 billion<ref name="IMFWEO.PS" /> | GDP_nominal_year = 2021 | GDP_nominal_rank = 121st | GDP_nominal_per_capita = {{Increase}} $3,464<ref name="IMFWEO.PS" /> | GDP_PPP_per_capita_rank = 140th | Gini_year = 2016 | Gini_change = decrease<!--increase/decrease/steady--> | Gini = 33.7 <!--number only--> | Gini_ref = <ref name=gini-index>{{Cite web|title=GINI index coefficient: West Bank & Gaza|url=https://www.cia.gov/the-world-factbook/field/gini-index-coefficient-distribution-of-family-income/country-comparison|publisher=CIA Factbook|access-date=12 August 2021|archive-date=30 June 2021|archive-url=https://web.archive.org/web/20210630032239/https://www.cia.gov/the-world-factbook/field/gini-index-coefficient-distribution-of-family-income/country-comparison/|url-status=live}}</ref> | HDI = 0.715<!--number only, between 0 and 1--> | HDI_year = 2021<!-- Please use the year to which the data refers, not the publication year--> | HDI_change = increase<!--increase/decrease/steady--> | HDI_ref = <ref name="UNHDR">{{Cite book|title=Human Development Report 2020 The Next Frontier: Human Development and the Anthropocene|date=15 December 2020|publisher=United Nations Development Programme|isbn=978-92-1-126442-5|pages=343–346|url=http://hdr.undp.org/sites/default/files/hdr2020.pdf|access-date=16 December 2020|archive-date=15 December 2020|archive-url=https://web.archive.org/web/20201215063955/http://hdr.undp.org/sites/default/files/hdr2020.pdf|url-status=live}}</ref> | HDI_rank = 106th | currency = {{Unbulleted list |[[Egyptian pound]] ([[ISO 4217|EGP]]) |[[Israeli new shekel]] (ILS) |[[Jordanian dinar]] (JOD) |(''[[de facto]]'')<ref>According to [https://web.archive.org/web/20161001065601/http://www.mfa.gov.il/MFA/Peace%2BProcess/Guide%2Bto%2Bthe%2BPeace%2BProcess/Gaza-Jericho%2BAgreement%2BAnnex%2BIV%2B-%2BEconomic%2BProtoco.htm Article 4 of the 1994 Paris Protocol], the State of Palestine has no official currency. The Protocol allows the Palestinian Authority to adopt multiple currencies. In the [[West Bank]], the Israeli new sheqel and Jordanian dinar are widely accepted, while in the [[Gaza Strip]] the Israeli new sheqel and Egyptian pound are widely accepted.</ref>}} | time_zone = [[Palestine Standard Time]] | utc_offset = +2 | utc_offset_DST = +3 | time_zone_DST = [[Palestine Summer Time]] | date_format = dd/mm/yyyy<!--numeric dates (dd-mm-yyyy, yyyy.mm.dd, etc.) plus era (CE, AD, AH, etc.)--> | drives_on = right | calling_code = [[+970|+970]] | iso3166code = PS | cctld = [[.ps|.ps]] | footnote_a = | footnote_b = | footnote_c = }} '''Palestine''' (Arabni: دولة فلسطين, <small>rumini:</small> ''Dawlah filasṭin''), atau pan Palestin (Arabni: فلسطين, <small>rumini:</small> ''Filasṭin'') iyo no negara bedaulat ta' timur entenga' tebeta' selang entenga' engko' Suang Jurdan, ngerakumi tebing barat engko' Genting Gaza engko' ni betiru Baitulmaqdis jadi eyang negara laat tu, pien pan pusat pentadbiran ni tu betiru tebeta' Ramallah. Pekataan Palestin asal ni lua' ta' bahasa Yunani beta (Philistia), tapi bahasa Mesir kuno, Asyur engko' Ibrani pan makai kata-kata somo ling ni pan jadi gambaran wilayah atau penduduk ni. Agama yaudi, keristian, engko' islam antap no terikat gai ta' laat tu, enggo no ai tu boi ngejejak asal-usul ta' tanah tu lua' ta' dangai ribu taun lalu. Semimon wilayah boi pinejadi Negara Palestin tu boi tungan temban lua' ta' 1948, uli Mesir, Jordan engko' Israel boi separang enom bangi tebeta' taun 1967. [[Fail:Flag of Palestine.svg|thumb|Bendira]] [[Fail:Coat of arms of Palestine.svg|thumb|175x175px|Joto]] Boi jo separang Dunia Kedua, tebeta' 1947, PBB boi makai Pelan Pembagian jadi Mandat Palestin enggo no syur gai jadi nubu dikau negara Arab engko' dikau negara Yahudi engko' pejadi gai Baitulmaqdis tu antarabengso jadi terati jomo. Pelan pembagian tu tinerimo oleh jomo Yahudi-Zionis tapi tinuak oleh jomo Arab. Boi iko beruntak engko' pan separang boi jadi ta' Palestin. Boi tinubu negara Israel tebeta' taun 14 Mei 1948, negara Arab enggo no temban sedembila boi temban no balik ta' Palesin engko' nerang barang tentera Israel mediam Separang Arab-Israel 1948. Ai jo begea, semimon Kerajaan Palestin boi tinubu le' Liga Arab tebeta' 22 September jadi ngawal Negara Naungan semimon ta' Palestin mediam kawasan kawalan Mesir ta' Genting Gaza. == Tungan metelak == {{Reflist}} rzqe61jvp7pv9wnm6rmxv4jvzc2aiuk Pandalela Rinong 0 784 4667 4247 2024-08-18T20:44:13Z Umboh Tuhan 194 Pandalela Rinong pada 2010 4667 wikitext text/x-wiki [[Fail:XIX Commonwealth Games-2010 Delhi Winners of (Women`s) Swimming 10M Platform Diving, Pamg Pandelela Rinong of Malaysia (Gold), Melissa Wu of Australia (Silver) and Alexandra Croak of Australia (Bronze) (cropped).jpg|thumb|Pandalela Rinong pada 2010]] Dato Pandelela Rinong anak Pamg PSBS; AMN; JBK. Pandalela boi pinenakan 2 Mac 1993, iyo atlet kepo Malaysia numbur satu yang moo bendera ta' Upacara Pembukaan Sukan Olimpik Musim Pengelau 2012 ta' London. Beliau muat sejarah jadi atlet kepo Malaysia numbur satu manang pingat Olimpik (pingat gangsa) diam kurian kepo 10 meter platform dendo ko' atlet Malaysia keduo manang pingat Olimpik 2012 ta' London selepas Datuk Lee Chong Wei diom kurian badminton. oggq7optvkqco0fgw4hhrd4mslomv2a Panjut 0 785 4248 2803 2024-08-09T09:42:08Z JhsBot 61 Pywikibot touch edit 4248 wikitext text/x-wiki Panjut iyono boo' bengen sepeng pemembaling wani, mangga kok bunu'. 8md53nwyjv45uxt5otjhhrkfbj7h93k Pansak yu' 0 786 4249 2806 2024-08-09T09:42:08Z JhsBot 61 Pywikibot touch edit 4249 wikitext text/x-wiki Pansak yu' iyono makanan boi binuat makai ding yu'. 4y1on0bmet1a3okp2ug9bh8egy5xqqn Pansang 0 787 4250 2809 2024-08-09T09:42:09Z JhsBot 61 Pywikibot touch edit 4250 wikitext text/x-wiki Pansang iyono papak atag tana' boi sinukat. exylleumjtlv8tux2k62lsvc426xmkp Pantar 0 788 4251 2812 2024-08-09T09:42:09Z JhsBot 61 Pywikibot touch edit 4251 wikitext text/x-wiki Pantar iyono somo roto antawa somo jo daras ni. 013qyhlhjnjafynjin885t4jme6hexe Papar 0 789 4252 2817 2024-08-09T09:42:09Z JhsBot 61 Pywikibot touch edit 4252 wikitext text/x-wiki '''Papar''' iyonoh dikau bandar yang diki ko' pan daerah yang tetaguh ta' bahagian [[Pantai Barat Sabah, Malaysia, Timur]]. Ketioan papar lekat ta' selatan badar raya kota kinabalu setio 38 Kilometer. Papar pan iyonoh [[destinasi utama]] tungan jomo pesinggah kerna lokasi ni strategik yang tetagub entengah laa antara Putatan ko' Kota Kinabalu. <ref>https://en.m.wikipedia.org/wiki/Papar,_Malaysia</ref> == Tungan metelak == {{Reflist}} 981qlq1rzxj6c1w92i19crimvcsti4j Para-Para 0 790 4253 2819 2024-08-09T09:42:10Z JhsBot 61 Pywikibot touch edit 4253 wikitext text/x-wiki Para-para iyo no tempat ngena segala barang enjata rak o9yan6mjyeyqra6xwd8xi57txyy2uyt Parai 0 791 4767 4766 2024-08-19T17:00:13Z Umboh Tuhan 194 + Tungan metelak 4767 wikitext text/x-wiki '''Parai''' iyono jinis tenomon rumput yang boi binibit bigi beni' ni untuk ngasil buas. Buas iyono mekanan yang kinakan elau-elau ule' mimon jomo teposok jomo lekat ta' Asia, Amerika Latin kok Caribbean. Ta' Malaysia,parai yang boi tinonom un duo jinis iyono parai sawa' yang kinilo sebagai parai belut. Parai sawa' kikon ni tinonom kerna iyo melua asil yang langa'. Bue' engko' baja perlu iko pinakai ta' parai sawa' engko pan sara nonom parai sawa' tu mesti teratur. == Tungan metelak == {{Reflist}} q54yrh040z7bt1ca5uezg1eyp4vp9n8 Parai paraian 0 792 4255 2824 2024-08-09T09:42:11Z JhsBot 61 Pywikibot touch edit 4255 wikitext text/x-wiki Parai paraian iyono kantung-kantung tungan manuk antawa manuk-manuk nagu' makanan am ling Melayu nironon tembolok. 75qsf6idl8urymfut5lpfs2lh51onc4 Parang 0 793 4256 2828 2024-08-09T09:42:11Z JhsBot 61 Pywikibot touch edit 4256 wikitext text/x-wiki '''Parang''' iyo noh konflik yang boi nirancang. Bioso nih parang tu berlaku antara duo atau lebih laat atau aktivitis ngai laat. [[Jomo]] berparang makai bangan senjata hingga berlaku mono antara jomo.<ref>*The Cambridge History of China: Alien regimes and border states</ref> == Tungan Metelak == {{Reflist}} fbw9tbsx46yb50bt2te6bcyjjx8sp6a Paray 0 794 4257 2836 2024-08-09T09:42:12Z JhsBot 61 Pywikibot touch edit 4257 wikitext text/x-wiki Paray tu sejenis tenomon [[bijirin.]] Kikon jomo luar dokon Asia,Amerika Latin engko Caribbean mangan buas tu.Paray tu un duo jenis paray sawah eyo kinilo sebagai paray bendang dan paray human. ixva4cx4vaqrkcvl9tji8fu8jsv6lqy Parit 0 795 4258 2838 2024-08-09T09:42:12Z JhsBot 61 Pywikibot touch edit 4258 wikitext text/x-wiki Parit tu io' dokon anak anak suang diki diki tungan buek suang luman . 1plkvzxlq2vbsa9oyeibvlb4lmm6pb1 Patang gelumat 0 796 2840 2839 2024-08-09T09:27:30Z Jon Harald Søby 58 1 semakan diimportkan 2839 wikitext text/x-wiki Eyo no patang abis nyaun tantu su’ ni sama sekali’, sembatan jomo doko’ mediam kubur. tru5tf6z1zld7p09qbfhoz8d7jh7ud2 Payau 0 797 4259 2842 2024-08-09T09:42:13Z JhsBot 61 Pywikibot touch edit 4259 wikitext text/x-wiki Payau iyono binatang mamalia pemama' biak yang teposok mediam dinakan Cervinae. Dinakan ni tu binagi ta' kelompok Cervinae mencakup kijang kok elk kok kelompok Capreolinae mencakup payau kutub kok moose. Sepisis payau tu tinemu ta' mimon benua dikau dunia kesuali ta' Australia kok Antartika, sepisis payau tu iko tinemu ta' Asia. 1afinx9u9q09llfn7jxi68sn0q44tcq Payaw 0 798 4260 2847 2024-08-09T09:42:13Z JhsBot 61 Pywikibot touch edit 4260 wikitext text/x-wiki '''Payaw''' iyo noh sejenis binatang [[mamalia]]. Payaw pan tergolong diom keluarga [[Cervidae]]. Dikau ciri khas payaw iyo noh ben [[antler]] (tanduk payaw).<ref><nowiki>https://www.jpvpk.gov.my/index.php/awam/ternakan-rusa</nowiki></ref> == Tungan metelak == {{Reflist}} 71119380st3v9kfz3esurg5tgfi656i Payung 0 799 4261 2853 2024-08-09T09:42:13Z JhsBot 61 Pywikibot touch edit 4261 wikitext text/x-wiki '''Payung''' iyonoh [[alat tangan]] yang ginuno untuk ngelindung diri terua uran. Payung tu pan ginuno untuk binuat [[pesindung]] ko' ngelindung diri terua lekat ta' moto elau.<ref>https://prpm.dbp.gov.my/cari1?keyword=payung</ref> == Tungan metelak == {{Reflist}} qyffoa5smx816e7g0o32lxjbmj05nc6 Pekam 0 800 4262 2855 2024-08-09T09:42:14Z JhsBot 61 Pywikibot touch edit 4262 wikitext text/x-wiki Pekam iyono dikau tebiat yang enggo derakan engko' betong pedia'. Pekam tu dikau tebiat yang bioso binuat le' kekanak umur d 12jdj74762cm9wm4ypmjs1wletnuji2 Pekayang 0 801 4263 2858 2024-08-09T09:42:14Z JhsBot 61 Pywikibot touch edit 4263 wikitext text/x-wiki Pekayang ma'na ni begerak dekiit. kif9zsd0oejvo39v1tn2qpqyail60dk Pekemit 0 802 4264 2861 2024-08-09T09:42:15Z JhsBot 61 Pywikibot touch edit 4264 wikitext text/x-wiki Pekemit tu ma'na ni jomo numpang nuut ellum ta' rumah jomo. a1usjkv1nmlnhv771ml0yk7huk9gjt7 Pelanjar 0 803 4265 2864 2024-08-09T09:42:15Z JhsBot 61 Pywikibot touch edit 4265 wikitext text/x-wiki Pelanjar iyono ai piko le5te9he5xmi1nxaqbz7yq1pj0qe9ib Pelego' 0 804 4266 2867 2024-08-09T09:42:16Z JhsBot 61 Pywikibot touch edit 4266 wikitext text/x-wiki '''Dikau Jomo''' [[berlagu]] tak bangen penonton yang [[mengkaleh.]] 66z6qoujpebs85rbuimraatvyixrhzj Pemangkung 0 805 4267 2870 2024-08-09T09:42:16Z JhsBot 61 Pywikibot touch edit 4267 wikitext text/x-wiki Pemangkung iyono kayu oyo pemalu jomo antawa binatang f3g4nqdfgt61fx9871vuycuouyjr8aw Pendawan 0 806 2872 2871 2024-08-09T09:27:33Z Jon Harald Søby 58 1 semakan diimportkan 2871 wikitext text/x-wiki '''Pendawan''' iyo noh tungan moto elau, sahaya engko pan udara posok mediam rumah atau pan mediam ruang yang un pendawan. Amun tinutup maka nyaun udara kok sahaya posok mediam. Pendawan bioso ni binuat lua kasa atau kayu yang binuat bingkai. mlow7xlo9730rjfuydd9d0nywjz8oah Pendayan 0 807 2874 2873 2024-08-09T09:27:33Z Jon Harald Søby 58 1 semakan diimportkan 2873 wikitext text/x-wiki '''Pendayan''' iyo noh tempat untuk muat bangan guuk. Pendayan tu somo erti engko bengkel. Jadi bangan jomo yang muat guuk akan mau tempat tu sebagai pendayan. 4qn69hke7hjjcmwnvwhwwf29h1t7281 Peneronok 0 808 4268 2877 2024-08-09T09:42:17Z JhsBot 61 Pywikibot touch edit 4268 wikitext text/x-wiki Peneronok iyono bigi tonomon tinonom. f9ngtx3gowx98g96qk786b35oigslyr Pengabar 0 809 4269 2880 2024-08-09T09:42:17Z JhsBot 61 Pywikibot touch edit 4269 wikitext text/x-wiki '''pengabar''' ibarat ni dokon amun un jomo ben [[masalah]] atau maku bantuan eyo no tukang marak c6qw1arw9vna2t0jc207ptcn3ukvocm Penganan 0 810 2886 2885 2024-08-09T09:27:34Z Jon Harald Søby 58 5 semakan diimportkan 2885 wikitext text/x-wiki '''Kui Penganan''' iyo noh kui tradisional jomo mitu Sabah. Kui tu binuat lua gula, gula nipah, tepung buas, enselan, buek engko’ gula Melaka. Adunan kui tu bentuk ni dokon sinsin sebelum pinosok mediam adunan tepung buas lepas a baru noh ginuring. Lepas a pinosok balik mediam adunan tepung buas entedo lagi sebelum ginuring balik untuk kemenduo ni supaya kui a lebih ranggup. d009wwl0vy1az53qp9ez84xka89tsph Penigal 0 811 4270 2889 2024-08-09T09:42:18Z JhsBot 61 Pywikibot touch edit 4270 wikitext text/x-wiki Penigal ma'na ni tana' antap keras. srvb8xnv73052dwqeazdftgln5pjcee Penjaram 0 812 4271 3939 2024-08-09T09:42:19Z JhsBot 61 Pywikibot touch edit 4271 wikitext text/x-wiki '''Penjaram''' iyo noh antara kui [[Wp/bdr|tradisional]] jomo samah tak sabah. Penjaram pan tekilo oron ni sebagai penyaram, kui UFO atau kui telingo tikus. Kui tu binuat lua tepung buas, tepung gandum, gula, santan. Kui penjaram iko jenis perisa. Amun ingin penjaram Pandan buli ninak’ perisa pandan atau pan dun pandan yang boi kinisar untuk kulek reso asli pandan. Selain a, penjaram gula Melaka pan antara perisa yang selalu binuat untuk penjaram, engai a jo perisa durian engko keladi pan buli binuat untuk jadi perisa penjaram. 8izcdcyzup2pkhrhqy92q7vf4lyoxri Pensono 0 813 4272 2902 2024-08-09T09:42:19Z JhsBot 61 Pywikibot touch edit 4272 wikitext text/x-wiki Pensono iyono bensana'. 54alqnvb54ue1oh8jqcx3mq3eulpusg Pentaran 0 814 4273 2906 2024-08-09T09:42:20Z JhsBot 61 Pywikibot touch edit 4273 wikitext text/x-wiki Pentaran tu io" ruang" meluar rumah , menik lekat odon rumah tarus un ruang ruang sebelum posok beluang rumah ea no oron ni pentaran . Amun jomo dau" dau" pentaran tu tungan gai ningko ningko . 3hqwlndpdp0jfbyhknom5tsfb1bijhy Penungkus 0 815 4274 2909 2024-08-09T09:42:20Z JhsBot 61 Pywikibot touch edit 4274 wikitext text/x-wiki Penungkus iyono jomo nungkus jenaja makai olos rena pute'. 6r8qo4z6fsnhfin3rkfdch0jo1imk79 Pepik 0 816 4275 2912 2024-08-09T09:42:20Z JhsBot 61 Pywikibot touch edit 4275 wikitext text/x-wiki Pepik tu pinakai leh manuk-manuk koh Kapal Lemiang untuk lemiang ngogo destinasi asing-masing. kttq8sq5453bdy3q8i60kcntfh070he Perag 0 817 4276 2915 2024-08-09T09:42:21Z JhsBot 61 Pywikibot touch edit 4276 wikitext text/x-wiki Perag tu iyono serita' ai terati semimon jomo, tular am ling Melayu. o70gghs5clbhwskkbfpddxgyfmb2w0p Perancis 0 818 2938 2937 2024-08-09T09:27:39Z Jon Harald Søby 58 22 semakan diimportkan 2937 wikitext text/x-wiki [[Fail:Flag of France (1794–1815, 1830–1974).svg|thumb|262x262px| '''Bendira Perancis''']] Perancis atau pan oron resmi ni Republik Perancis. Enggo no laat tu tebeta' Iropa Barat engko' pulau-pulau engko' wilayah dembila selang enggo no ta' benua Amerika engko' selang-selang Atlantik, Pasifik engkok Hindi. Perancis tu iyo no angguta enjata' mediam Kesatuan Eropah. Posok pan mediam Pertubuan Perjanjian Atlantik Utara, Pertubuan Kerjosomo engko' pembangunan Ikonomi, G7 engko' ahli tatap Majlis Keselamatan Pertubuan Bengso-Bengso Bersatu. == Daerah == Perancis tu binagi ta' 26 kawasan pentadbiran, engko' 22 mediam ni un pinau Perancis Metropoliton. 26 daerah pentadbiran ni binagi lagi pan ta' 100 jebatan. 84fwkghptsy9m63hgu2tde6pt87i8yq Peranggi' 0 819 4277 2943 2024-08-09T09:42:22Z JhsBot 61 Pywikibot touch edit 4277 wikitext text/x-wiki '''Peranggi'''' iyo noh dikaw jenis tumbuan [[tropikal]]. Peranggi' asal ni lua' melaat Brazil,Bolivia engko pan Paraguay. Mitu melaat ti Malaysia iko tinonom ta' Johor, Selangor,Kelantan engko pan Pulau Pinang.<ref>http://www.mpib.gov.my/web/guest/asal_usul_nanas;jsessionid=C20A78C1C4E58D0244291715B036D280</ref> == Tungan metelak == {{Reflist}} qnhjkzvah6d62axecqf06j881lxt0a9 Perangi 0 820 3946 2945 2024-08-09T09:29:36Z Jon Harald Søby 58 3 semakan diimportkan 2944 wikitext text/x-wiki Eyo no perbuatan gerakan mediam bue. Perangi alap tebeta' ti mediam bue lolom, jadi ti nia' limbo mediam bue'. chlm3pt4looe72185ih672857y48pub Perembaan Sama 0 821 4278 2949 2024-08-09T09:42:22Z JhsBot 61 Pywikibot touch edit 4278 wikitext text/x-wiki [[Fail:Poker-sm-22A-5h.png|thumb|Limo Maria.... Nyaun kali kuasa ni amun sugal bunu ngko ungkian ]] Amun dokon ko begea² jo engkon ni alap '''beranti no pakau'''. Itu no perambaan selalu tekale ku amun bedoom no bana. Yen sigo reti perambaan 'beranti jono pakau' ta diom ayat enjata e? mdx9w10nrgai22tcci6jx3rqtcgmpmg Peremod 0 822 4279 2952 2024-08-09T09:42:23Z JhsBot 61 Pywikibot touch edit 4279 wikitext text/x-wiki Peremod iyono nia' betutur. quo8loyajxsww5d55iwlij6k7zej1xs Perenos 0 823 4280 2955 2024-08-09T09:42:23Z JhsBot 61 Pywikibot touch edit 4280 wikitext text/x-wiki Perenos iyono tana' lemunsur, badan suk. ih8bx73dgqa2gbquy6cgshayw66rln1 Perian 0 824 4281 2958 2024-08-09T09:42:24Z JhsBot 61 Pywikibot touch edit 4281 wikitext text/x-wiki Perian iyono kayu boi niukir pemiri geliga' benuat penganan. m2wtq96nfc0dn9uc22ajrdaqds149c8 Peristiwa Kahwin 0 825 4282 2960 2024-08-09T09:42:24Z JhsBot 61 Pywikibot touch edit 4282 wikitext text/x-wiki Kawin atau nikah tu menurut islam. Kiti sekumpul mimon.Menurut istila syarak ijab engko kabul (aqad) kiti boi ni halal nut persetubuhan dendo engko dela yang boi ni ucap lua kata-kata. thef1x7jmwllhomz37rgrkw7pjukflk Peristiwa penting Hari Raya 0 826 4283 2962 2024-08-09T09:42:24Z JhsBot 61 Pywikibot touch edit 4283 wikitext text/x-wiki sepu (10) zulhijjah. Mimon umat islam tak dunia tu akan nambut Hari Raya Aidiladha. Tiap taun kiti akan nambut tapi kiti niak ngerati intisari tak balik sambutan tu .Hari Raya Aidiladha atau Hari Raya Haji merupokan perayaan yang diraya ole kiti semimon tak dunia tu. 1geae3rzc5o6jbsh01aeay2gz308ayb Perlis 0 827 4654 4605 2024-08-18T07:07:26Z Umboh Tuhan 194 + Tungan metelak 4654 wikitext text/x-wiki {{Infobox settlement||name=Perlis<br>{{script/Arabic|ڤرليس}}|nickname=Indera Kayangan|area_code=04|registration_plate=[[Nombor plat kenderaan Malaysia|R]]|area_code_type=[[Nombor telefon di Malaysia|Kod panggilan]]|postal_code=01xxx sehingga 02xxx|postal_code_type=[[Senarai poskod di Malaysia|Poskod]]|demographics1_info1=[[Bahasa Melayu Malaysia|Bahasa Melayu Standard]]|demographics1_title1=Bahasa Rasmi|demographics1_title2=Bahasa pertuturan|demographics1_info2=[[Bahasa Melayu Kedah]], [[Bahasa Hokkien| Hokkien]], [[Bahasa Thai|Thai]], [[Bahasa Mandarin| Mandarin]]|demographics1_footnotes=<!-- for references: use <ref> tags -->|demographics_type1=Bahasa|demographics_type2=Penubuhan|demographics2_title1=Penubuhan Kota Sena sebagai ibu negeri Kedah|demographics2_info1=1653|demographics2_title2=Negeri Vasal Siam diperintah oleh Raja Long Krok|demographics2_info2=1839|demographics2_title3=Kerajaan terbentuk apabila Syed Hussain dilantik sebagai Raja oleh Siam|demographics2_info3=20 April 1843|demographics2_title4=Dimasukkan di dalam [[Persekutuan Tanah Melayu]]|demographics2_info4=1 February 1948|demographics2_title5=Kemerdekaan sebagai sebahagian daripada Persekutuan Tanah Melayu|demographics2_info5=31 August 1957|population_footnotes=<ref name=":0" />|footnotes=|website={{URL|www.perlis.gov.my}} {{URL|www.perlisroyalty.gov.my}}|population_density_km2=auto|population_as_of=2020|official_name=|image_map=Perlis in Malaysia.svg|anthem=''[[Amin Amin Ya Rabaljalil]]''<br>[[Fail:Perlis State Anthem.ogg|center]]|motto=|image_shield=Coat of arms of Perlis.svg|image_flag=Flag of Perlis.svg|settlement_type=[[Negeri dan Wilayah Persekutuan di Malaysia|Negeri]]|native_name=|map_caption={{Legend inline|#C41E3A|outline=silver}} '''Perlis''' di {{Legend inline|#FDF9D2|outline=silver}} '''[[Malaysia]]'''|population_total=284,885|leader_title1=[[Menteri Besar Perlis|Menteri Besar]]|elevation_max_point=[[Gunung Perlis]]|elevation_max_m=733|area_total_km2=819|area_footnotes=<ref name="statistics">{{cite web |url=http://www.statistics.gov.my/ccount12/click.php?id=2127 |title=Laporan Kiraan Permulaan 2010 |publisher=Jabatan Perangkaan Malaysia |page=27 |access-date=24 January 2011 |archive-url=https://web.archive.org/web/20101227065717/http://www.statistics.gov.my/ccount12/click.php?id=2127 <!--Added by H3llBot--> |archive-date=27 December 2010}}</ref>|leader_name1=[[Mohd Shukri Ramli]]|leader_name=[[Tuanku Syed Sirajuddin]]|coordinates={{coord|6|30|N|100|15|E|display=inline,title}}|leader_title=[[Raja Perlis|Raja]]|government_type=[[Sistem berparlimen|Parlimen]] [[Raja berperlembagaan]]|parts_style=para|parts_type=Bandar diraja|seat=[[Kangar]]|seat_type=Ibu negeri|coordinates_footnotes=<!-- for references: use <ref> tags -->|parts=[[Arau]]|blank_name_sec1=[[Indeks Pembangunan Manusia|IPM]] (2019)|blank_info_sec1=0.805&nbsp;(<span style="color:#090;">sangat tinggi</span>) ([[Senarai negeri Malaysia mengikut Indeks Pembangunan Manusia|ke-9]])}}'''Perlis''' iyo no negeri ta utara [[Semenanjung_Malaysia|Semenanjung Malaysia]] dan bersempadan dengan Wilayah [[Satun]] dan [[Songkhla]], [[Thailand]] di sebelah utara, dan [[Kedah]] di sebelah selatan. Perlis menjadi sebuah negeri yang berdaulat setelah [[Empayar_Siam|kerajaan Siam]] melantik Raja Syed Hussain Jamalullail sebagai [[Raja_Perlis|Raja Perlis]].<ref>{{Cite web|url=https://perlisroyalty.perlis.gov.my/index.php/ms/sejarah/institusi-beraja|title=Institusi Beraja|website=Raja Perlis|url-status=live}}</ref> Perlis mempunyai keluasan sebanyak 821 kilometer persegi menjadikannya sebagai negeri terkecil di Malaysia. Pada tahun 2020, jumlah penduduknya dianggarkan seramai 284,885 orang dengan majoritinya merupakan bumiputera iaitu 88.8 peratus dari jumlah penduduk.<ref name=":0">{{cite web|url=https://cloud.stats.gov.my/index.php/s/ppMYkLC4kyUzHKn#pdfviewer|title=PENEMUAN UTAMABANCI PENDUDUK DAN PERUMAHAN MALAYSIA 2020|year=2020|publisher=[[Jabatan Perangkaan Malaysia]]|url-status=live|access-date=24 March 2022}}</ref> == Geografi == [[Fail:Perlis_River.jpg|thumb|Sungai Perlis]] Perlis merupakan sebuah negeri yang terletak di utara [[Semenanjung_Malaysia|Semenanjung Malaysia]] bersempadan dengan negara [[Thailand]] di utara, negeri [[Kedah]] di selatan dan [[Selat_Melaka|Selat Melaka]] di barat. Perlis mempunyai keluasan sebanyak 819 kilometer persegi menjadikannya sebagai negeri terkecil di Malaysia. [[Gunung_Perlis|Gunung Perlis]] yang mempunyai ketinggian 733 meter menjadi titik tertinggi di negeri ini. Di bahagian utara dan barat daya negeri ini, terbentangnya [[Banjaran_Nakawan|Banjaran Nakawan]] yang merupakan banjaran batu kapur terpanjang di Malaysia. Di banjaran ini terdapat bukit-bukit batu kapur yang sebahagian besarnya terdiri daripada [[Formasi_Setul|Formasi Setul]] yang tertua di Malaysia yang dianggarkan berusia lebih 500 juta tahun. Di banjaran ini juga terletaknya [[Taman_Negeri_Perlis|Taman Negeri Perlis]] yang berkeluasan 4,379.81 hektar dan beberapa hutan simpan yang lain seperti [[Hutan_Simpan_Kekal_Mata_Ayer|Hutan Simpan Kekal Mata Ayer]] dan [[Hutan_Simpan_Kekal_Wang_Mu|Hutan Simpan Kekal Wang Mu]].<ref>{{Cite web|url=https://forestry.perlis.gov.my/index.php/ms/eko-pelancongan/taman-negeri-perlis|title=Taman Negeri Perlis|access-date=2022-03-25|publisher=Jabatan Perhutanan Negeri Perlis}}</ref> Dianggarkan jumlah panjang sungai dan terusan di negeri Perlis ialah sepanjang 174.2 kilometer. [[Sungai_Arau|Sungai Arau]] menjadi sungai terpanjang di negeri Perlis iaitu sepanjang 21.5 kilometer diikuti [[Sungai_Korok,_Perlis|Sungai Korok]] dengan panjang 17 kilometer.<ref>{{Cite web|url=https://web.archive.org/web/20160304091901/http://www.jpsperlis.gov.my/web/page/Default.aspx?Page=Kejuruteraan_Sungai_Pantai_1|title=Kejuruteraan Sungai dan Zon Pantai|access-date=2022-03-25|archive-url=http://www.jpsperlis.gov.my/web/page/Default.aspx?Page=Kejuruteraan_Sungai_Pantai_1|archive-date=2016-03-04|publisher=Jabatan Pengairan dan Saliran Negeri Perlis}}</ref> == Tungan metelak == {{Reflist}} 4dynesntwq18dwmv1bf0eseifuvxoux Peselap 0 828 4781 4285 2024-08-19T17:22:00Z Umboh Tuhan 194 + Tungan metelak 4781 wikitext text/x-wiki '''Peselap''' ma'na ni pelimpas enselangan pagar antawa repa' jomo; pegerakan badan lua' dikaw tampat ngogo dikaw tampat yang been babag. == Tungan metelak == {{Reflist}} e2oogu79g3us44lpiay5bhdnu552881 Pesi 0 829 4286 2974 2024-08-09T09:42:27Z JhsBot 61 Pywikibot touch edit 4286 wikitext text/x-wiki Pesi tu guno ni untuk mesi ding, mesi udang atau haiwan ta’ selang atauwa ta’ suang. Pesi tu selalu pakai jomo ta’ sedi-sedi selang atau suang. Jomo akan nagu umpan ta’ sedi pesi ni endo kakan ding, amun tekakan umpan ae ding akan mit ta pesi ae. 6d664y4m5s79glhlk89jr8limfiyf8b Pesorong kam 0 830 4287 2976 2024-08-09T09:42:27Z JhsBot 61 Pywikibot touch edit 4287 wikitext text/x-wiki Pesorong kam selalu pinakai ole mimon jomo, amun un dinakan atau jomo ingin pu meruma ti ayat tu selalu pinakai no jomo pesorong posok diam ruma endo barang jomo niak malu pu meruma ti. Ayat tu pan selalu pinakai amun un majlis kawin untuk nambut tetamu teko atau keluarga luak pengantin dela. j4mqwiwj1dc2avckc75ge91sfgt6vke Piatan 0 831 4288 2979 2024-08-09T09:42:27Z JhsBot 61 Pywikibot touch edit 4288 wikitext text/x-wiki Piatan ma'na ni denseen, dikau' turunan. bcm8bop1we6pi1np8vy685j55efr8u2 Pida' 0 832 4289 2985 2024-08-09T09:42:28Z JhsBot 61 Pywikibot touch edit 4289 wikitext text/x-wiki '''Pida'''' tu dikaw enggomon Sama bioso ni binoo nibaw, nembali antawa laan-laan ngogo ruma' denakan antawa kampung jomo. Pida' tu binuat makay besi, nipis, lampung, langkaw amun guuk engko' enggai binoo kerejo. Bengen ulu, sarung engko ningkoton empangkat amun binoo lumaan. Amun ngenda'nibaw nya' makay enggomon(pida), soo' jomo yo mule pasal nya' yo teko tabang nara papan mayat makay poon kupuk engko' muat sesangkap makay boo'tungan maba' mayat. bb27qunysfk39l0k7hn0h0xfd6hbsxf Pikap 0 833 2987 2986 2024-08-09T09:28:14Z Jon Harald Søby 58 1 semakan diimportkan 2986 wikitext text/x-wiki Pikap tu kerita bagal kansang bana tungan jomo dau-dau nut jadi sanang gai ngogo barang kadai. Pikap tu kansang pinakai dau sebab ni nia' jono maal bana binayad engko' ni sanang jono luman pinggo-pinggo. Betiru pikap tu teko' bana tekito ti, sambil ni nuut pan ta' laat ti temban. Sambil ni pikap tu kakal pan tungan jomo mensari. i5bt35u7hptu4jjnhwjv8pucdeo8k4p Pinang 0 834 4290 2992 2024-08-09T09:42:30Z JhsBot 61 Pywikibot touch edit 4290 wikitext text/x-wiki [[Fail:Beetle palm with nut bunch.jpg|thumb|Pinang]] '''Pinang''' (''Areca catechu'') tu dikau' tenomon jomo Sama. Pinang tu ben bua' nironon tendunan bua' pinang. Bua' pinang mura' rena ni gadung, amun too rena ni kuning taruk. Reso pinang tu pekat pait-pait. Pinang tu penapa' engko' siri engko' gambir engko' apo. Pinang tu pan pinakay pemeradak betong peranak kenendo' ta sapa jomo boi mapa'. Batang pinang tu buli benila'-bila' binuat dasar. Mayang pinang tu selalu binuat bungo niena' enjata sesangkap jomo matay. Amun ai nimbun, mayang pinang tu ninea' enjata kubur. ln73ed1qptqit6as4hi4kynqqn2rno1 Pinjaram 0 835 2995 2994 2024-08-09T09:28:15Z Jon Harald Søby 58 2 semakan diimportkan 2994 wikitext text/x-wiki '''Pinjaram''' iyo noh kui tradisional ta’ Sabah. Terutama ni bengso jomo Samah, Kota Belud Sabah. Pinjaram binuat makai tepung buas, tepung gandum, santan engko selan. Untuk ngewarna pinjaram bioso ni warna gadung akan makai dun pandan. Amun warna pinjaram iram pala kadang jomo makai gula darag atau pan gula Melaka. Tapi tujuan pandan atau pan gula darag engko’ gula Melaka engai sekadar untuk ngewarna pinjaram tapi tujuan lain untuk melua buan wangi pinjaram a. Kadang-kadang un pan jomo ingin memia wangi pinjaram lua bua-buaan. Dokon durian, jadi jomo akan makai durian untuk melua buan pinjaram durian. Pinjaram paling alap bila mangan panas-panas masa panas baru tereso bana nikmat alap pinjaram tu. Selain jadi, makanan tradisional jomo Samah pinjaram pan makanan wajib untuk duang jomo matai. g9x5hu05lwddhqtouwc9h9mt8ifq460 Poland 0 836 4590 4291 2024-08-12T10:29:41Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q36]] 4590 wikitext text/x-wiki {{Infobox country | conventional_long_name = Republic of Poland | common_name = Poland | native_name = {{Native name|pl|Rzeczpospolita Polska}} | image_flag = Flag of Poland.svg | flag_border = Flag of Poland (normative).svg | image_coat = Herb Polski.svg | national_anthem = {{Lang|pl|"[[Poland Is Not Yet Lost|Mazurek Dąbrowskiego]]"|italics=no}}{{Efn|"the [[Jan Henryk Dąbrowski|Dąbrowski]] [[Mazurka]]"}}<br />("Poland Is Not Yet Lost")<br /><div style="padding-top:0.5em;">{{Center|[[Fail:Mazurek Dabrowskiego.ogg]]}}</div> | demonym = {{Hlist|[[Polish people|Polish]]|Pole}} <!-- Maps and coordinates -->| image_map = {{Switcher|[[Fail:EU-Poland (orthographic projection).svg|frameless]]|Show globe|[[Fail:EU-Poland.svg|upright=1.15|frameless]]|Show map of Europe|default=1}} | map_caption = {{Map caption |location_color=dark green |region=Europe |region_color=dark grey |subregion=the [[European Union]] |subregion_color=green |legend=EU-Poland.svg}} | capital = [[Warsaw]] | coordinates = {{Coord|52|13|N|21|02|E|type:city}} | largest_city = capital <!-- Language -->| languages_type = [[Official language]] | languages = [[Polish language|Polish]]<ref>[[s:en:Constitution of the Republic of Poland/Chapter 1|Constitution of the Republic of Poland]], Article 27.</ref> <!-- Population, ethnic groups -->| population_census = {{IncreaseNeutral}} 38,036,118<ref>{{Cite web |title=Statistical Bulletin No 11/2022 |url=https://stat.gov.pl/en/topics/other-studies/informations-on-socio-economic-situation/statistical-bulletin-no-112022,4,145.html |access-date=23 December 2022 |website=Statistics Poland |archive-date=23 December 2022 |archive-url=https://web.archive.org/web/20221223120843/https://stat.gov.pl/en/topics/other-studies/informations-on-socio-economic-situation/statistical-bulletin-no-112022,4,145.html |url-status=live }}</ref> | population_census_year = 2022 | population_census_rank = 38th | population_density_km2 = 122 | population_density_sq_mi = 315.9 <!--Do not remove per [[Wikipedia:Manual of Style/Dates and numbers]]. --> | population_density_rank = 75th | ethnic_groups = {{Tree list}} *98.84% [[Polish people|Polish]]{{Efn|Multiple national identity was available in the census.}} **96.28% only Polish **2.56% Polish and others *1.13% only [[Ethnic minorities in Poland|non-Polish]] *0.03% unknown {{Tree list/end}} | ethnic_groups_year = 2021 | ethnic_groups_ref = <ref>{{|url=https://stat.gov.pl/en/national-census/national-population-and-housing-census-2021/final-results-of-the-national-population-and-housing-census-2021/size-and-demographic-social-structure-in-the-light-of-the-2021-census-results,6,1.html |title=National Population and Housing Census 2021 Population. Size and demographic-social structure in the light of the 2021 Census results |language=en }}</ref> | religion = {{Ublist|item_style=white-space: |{{Tree list}} * 72.2% Christianity ** 71.3% [[Catholic Church in Poland|Catholicism]] ** 0.9% other Christian {{Tree list/end}} |6.9% [[Irreligion|no religion]] |0.4% [[Religion in Poland|other]] |20.5% unanswered }} | religion_year = 2021<ref name="Census 2021">{{Cite web |title=Final results of the National Population and Housing Census 2021 |url=https://stat.gov.pl/download/gfx/portalinformacyjny/pl/defaultaktualnosci/6536/10/1/1/wyniki_ostateczne_nsp2021_nar_jezyk_wyznanie_29_09_202.xlsx |publisher=Statistics Poland}}</ref> <!-- Government type, leaders -->| government_type = [[Unitary parliamentary republic]] | leader_title1 = [[President of Poland|President]] | leader_name1 = {{Nowrap|[[Andrzej Duda]]}} | leader_title2 = [[Prime Minister of Poland|Prime Minister]] | leader_name2 = [[Donald Tusk]] | legislature = [[Parliament of Poland|Parliament]] | upper_house = [[Senate of Poland|Senate]] | lower_house = [[Sejm]] <!-- Events -->| sovereignty_type = [[History of Poland|Formation]] | established_event1 = [[Duchy of Poland]]{{Efn|"The dukes (dux) were originally the commanders of an armed retinue (drużyna) with which they broke the authority of the chieftains of the clans, thus transforming the original tribal organization into a territorial unit."<ref>{{Cite web |url=https://www.britannica.com/place/Poland/History |website=Encyclopedia Britannica |title=Poland |date=2023 |access-date=31 December 2023 |archive-date=19 January 2024 |archive-url=https://web.archive.org/web/20240119191221/https://www.britannica.com/place/Poland/History |url-status=live }}</ref>}} | established_date1 = {{Circa}} 960 | established_event2 = [[Christianization of Poland|Christianization]]{{Efn|"Mieszko accepted Roman Catholicism via Bohemia in 966. A missionary bishopric directly dependent on the papacy was established in Poznań. This was the true beginning of Polish history, for Christianity was a carrier of Western civilization with which Poland was henceforth associated."<ref>{{Cite web |url=https://www.britannica.com/place/Poland/History |website=Encyclopedia Britannica |title=Poland |date=2023 |access-date=31 December 2023 |archive-date=19 January 2024 |archive-url=https://web.archive.org/web/20240119191221/https://www.britannica.com/place/Poland/History |url-status=live }}</ref>}} | established_date2 = 966 | established_event3 = {{Nowrap|[[Kingdom of Poland]]}} | established_date3 = 18 April 1025 | established_event4 = [[Polish–Lithuanian Commonwealth]] | established_date4 = 1 July 1569 | established_event5 = {{Nowrap|[[Partitions of Poland]]}} | established_date5 = 24 October 1795 | established_event6 = {{Nowrap|[[Second Polish Republic|Second Republic]]}} | established_date6 = 11 November 1918 | established_event7 = {{Nowrap|[[Polish government-in-exile|Government-in-exile]]}} | established_date7 = 17 September 1939 | established_event8 = {{Nowrap|[[Polish People's Republic|People's Republic]]}} | established_date8 = 22 July 1944 | established_event9 = {{Nowrap|[[History of Poland (1989–present)|Third Republic]]}} | established_date9 = {{Nowrap|31 December 1989}}<ref>{{Cite web|url=http://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU19890750444|title=The Act of December 29, 1989 amending the Constitution of the Polish People's Republic.|publisher=Internetowy System Aktów Prawnych|access-date=18 October 2020|archive-date=19 October 2020|archive-url=https://web.archive.org/web/20201019101959/http://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU19890750444|url-status=live}} {{In lang|pl}}</ref> <!-- Area -->| area_km2 = 312696 | area_footnote = <ref name="GUS">{{Cite web |last=GUS |title=Powierzchnia i ludność w przekroju terytorialnym w 2023 roku |url=https://stat.gov.pl/obszary-tematyczne/ludnosc/ludnosc/powierzchnia-i-ludnosc-w-przekroju-terytorialnym-w-2023-roku,7,20.html |access-date=19 October 2023 |archive-date=22 September 2023 |archive-url=https://web.archive.org/web/20230922225517/https://stat.gov.pl/obszary-tematyczne/ludnosc/ludnosc/powierzchnia-i-ludnosc-w-przekroju-terytorialnym-w-2023-roku,7,20.html |url-status=live }}</ref><ref name="BBC News 2023">{{Cite web |date=12 November 2023 |title=Poland country profile |url=https://www.bbc.com/news/world-europe-17753718 |access-date=12 November 2023 |website=BBC News |archive-date=21 October 2023 |archive-url=https://web.archive.org/web/20231021204608/https://www.bbc.com/news/world-europe-17753718 |url-status=live }}</ref> | area_rank = 69th | area_sq_mi = 121,209.44 <!-- Do not remove per [[Wikipedia:Manual of Style/Dates and numbers]]. --> | percent_water = 1.48 (2015)<ref>{{Cite web |title=Surface water and surface water change |url=https://stats.oecd.org/Index.aspx?DataSetCode=SURFACE_WATER |access-date=11 October 2020 |publisher=[[Organisation for Economic Co-operation and Development]] (OECD) |archive-date=24 March 2021 |archive-url=https://web.archive.org/web/20210324133453/https://stats.oecd.org/Index.aspx?DataSetCode=SURFACE_WATER |url-status=live }}</ref> | GDP_PPP = {{Increase}} $1.801 trillion<ref name="IMFWEO.PL">{{Cite web |url=https://www.imf.org/en/Publications/WEO/weo-database/2024/April/weo-report?c=964,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2022&ey=2029&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1 |title=World Economic Outlook Database, April 2024 Edition. (Poland) |publisher=[[International Monetary Fund]] |date=16 April 2024 |access-date=16 April 2024}}</ref> | GDP_PPP_year = 2024 | GDP_PPP_rank = 20th | GDP_PPP_per_capita = {{Increase}} $49,060<ref name="IMFWEO.PL" /> | GDP_PPP_per_capita_rank = 39th | GDP_nominal = {{Increase}} $844.623 billion<ref name="IMFWEO.PL" /> | GDP_nominal_year = 2024 | GDP_nominal_rank = 21st | GDP_nominal_per_capita = {{Increase}} $23,014<ref name="IMFWEO.PL" /> | GDP_nominal_per_capita_rank = 45th <!-- Gini -->| Gini = 26.3 <!--number only--> | Gini_year = 2022 | Gini_change = decrease <!--increase/decrease/steady--> | Gini_ref = <ref name=eurogini>{{Cite web |url=https://ec.europa.eu/eurostat/databrowser/view/tessi190/default/table?lang=en |title=Gini coefficient of equivalised disposable income – EU-SILC survey|publisher=[[Eurostat]] |website=ec.europa.eu |access-date=13 April 2024}}</ref> <!-- HDI -->| HDI = 0.881<!--number only--> | HDI_year = 2022<!-- Please use the year to which the data refers, not the publication year. --> | HDI_change = increase<!--increase/decrease/steady--> | HDI_ref = <ref name="HDI">{{Cite web|url=https://hdr.undp.org/sites/default/files/2023-24_HDR/HDR23-24_Statistical_Annex_HDI_Table.xlsx|title=Human Development Report 2023/2024|language=en|publisher=[[United Nations Development Programme]]|date=19 March 2024|access-date=19 March 2024|archive-date=19 March 2024|archive-url=https://web.archive.org/web/20240319085123/https://hdr.undp.org/sites/default/files/2023-24_HDR/HDR23-24_Statistical_Annex_HDI_Table.xlsx|url-status=live}}</ref> | HDI_rank = 36th <!-- Currency -->| currency = [[Polish złoty|Złoty]] | currency_code = PLN <!-- Time zone, date format, other -->| time_zone = [[Central European Time|CET]] | utc_offset = +1 | utc_offset_DST = +2 | time_zone_DST = [[Central European Summer Time|CEST]] | date_format = dd.mm.yyyy ([[Common Era|CE]]) | drives_on = right | calling_code = [[Telephone numbers in Poland|+48]] | cctld = [[.pl|.pl]] <sup>[a]</sup> | footnote_a = Also .eu, shared with other European Union member states. }} [[Fail:Flag of Poland (1928–1980).svg|thumb|335x335px| '''Bendira Poland''']] '''Poland''' ([[:ms:Poland|Poland]]: ''Polska) atau pan engko' oron resmi ni '''Republik Poland''''' ([[:ms:Poland|Poland]]: ''Rzeczpospolita Polska'') iyo no dikau laat ta' Eropah Entengah ngodop pu' enselang Baltik ta' utara. Laat nironon Poland tu sedembila' ko' negara Jerman ta' Barat, enggo no pinau Republik Csezch engko' Slovakia ta' selatan, Ukraine engko' Belarus ta' timur ko' Selang Baltik, Kaliningrad ko' Lithuania ta' dembila' utara. Bagal laat nironon Poland iyo no 312,696 kilometer persegi, ngejadi iyo negara ke-69 tebagal ta' dunia ko' kesiam tebagal ta' Eropah. Enko' iko jomo ni kiro-kiro 38.5 juta jomo, Poland tu pan laat ke-34 paling sesok ta' dunia ko' kewau' tesesok ta' Eropah. == Pengoronan == [[Fail:Flag of the President of Poland.svg|thumb|325x325px|'''Joto''']]Bo'-bo' oron Poland tu boi nindo' lua' ta' jomo bengso Slav Barat iyono Polans (Polanie) enggo no temban ta' sedi suang Warta tebeta' begian besejarah Poland Raya tebeta' abad ke-8. Oron tekokon ni andang nindo' lua' teturan jomo Slav barat iyo no ''pole e''ngko' meksud ni padang antap luas. == Hubungan Malaysia-Poland == Tebeta' 20 Mac 2002, Perdana Menteri Malaysia Mahathir Mohammad boi ngogo ta' Poland. Otu iyo no lewatan entedo Perdana Menteri Malaysia pu' Poland boi jo un hubungan diplomatik ti ko' gai boi 10 taun. Duta Malaysia pu' Poland tebeta' ae Ng Bak Hai. == Tungan metelak == {{Reflist}} [https://stat.gov.pl/obszary-tematyczne/ludnosc/ludnosc/powierzchnia-i-ludnosc-w-przekroju-terytorialnym-w-2018-roku,7,15.html] [https://www.bankier.pl/wiadomosc/Powierzchnia-Polski-wzrosla-o-1643-ha-7603883.html] 7r4f27ywh3qwr9nsc7gfl24d98xfcmb Polis 0 837 4292 3038 2024-08-09T09:42:33Z JhsBot 61 Pywikibot touch edit 4292 wikitext text/x-wiki '''Pulis''' dangan jomo mediom [[menjogo keselamatan]] ko' kestabilan masyarakat nuut ta' diom undang".pulis tu sesuai sekali kerna politelia itu un maksud [[kerajaan atau pentadbiran]] diom bahasa yunani.<ref>https://ms.wikipedia.org/wiki/Polis</ref> == Tungan metelak == {{Reflist}} 5j4w0xlkkz33ojeb32z696emv218php Pon lodo 0 838 4293 3043 2024-08-09T09:42:33Z JhsBot 61 Pywikibot touch edit 4293 wikitext text/x-wiki Lodo io"no dembuah buah reso ni nga'ngah io"no reso paling penemia amun masyarakat bajau mangan , Buat masa betiru iko bana jenis lodo dokon lodo ijau kok lodo darak , Ta dembilak pantai timur tuturan lodo kakal tinat lau lau jn2x2yzeb5v9rwgbl44nuq16f1z5g0y Poon 0 839 4294 3050 2024-08-09T09:42:33Z JhsBot 61 Pywikibot touch edit 4294 wikitext text/x-wiki '''Poon''' eyo sejenis tenomon [[benkayu]]. Tempoh hayat poon tu rojo beta niak dokon tenomon debagi.Purata diam tahun 2005 tu enam empuh dikau poon utuk setiap urang. f45c6teudaw21ewkpe0qofrmbeougp0 Poon Tuadak @ Pokok Cempedak 0 840 3052 3051 2024-08-09T09:28:20Z Jon Harald Søby 58 1 semakan diimportkan 3051 wikitext text/x-wiki #REDIRECT [[Tebadak]] kydd10hzx1cjmjxtxu730ou6nvbke64 Poso 0 841 4295 3058 2024-08-09T09:42:34Z JhsBot 61 Pywikibot touch edit 4295 wikitext text/x-wiki Mo meksud nangka diri luak mangan atau pan minuman tak jangka masa tertentu.<ref>https://ms.m.wikipedia.org/wiki/Puasa</ref> == Tungan metelak == {{Reflist}} ssq0dk3vvtz48d22pzstttw5odgfkze Pugun 0 842 4296 3061 2024-08-09T09:42:34Z JhsBot 61 Pywikibot touch edit 4296 wikitext text/x-wiki Pugun iyono tana' tungan betenomon. 2iiehr2vj3tfuevzlz61rpv9tgde83f Pukek 0 843 4297 3064 2024-08-09T09:42:35Z JhsBot 61 Pywikibot touch edit 4297 wikitext text/x-wiki Pukek iyono indu' manuk ngera ngera sebelum ngentelo. s3gt2mwmf9c38gcbrtzpbc4n1me61s8 Pulau 0 844 4763 4298 2024-08-19T16:58:01Z Umboh Tuhan 194 + Tungan metelak 4763 wikitext text/x-wiki [[Fail:KotaKinabalu Sabah PulauSapanggar-02.jpg|thumb|Pulau]] '''Pulau''' iyo no salah satu bidang tanah yang lebih deki dari benua ko lebih bagal dari karang yang dikelilingi buek gugusan == Tungan metelak == {{Reflist}} nkw7jnv6rbd3qtz4mhct2ag9uog5nuv Pusal-pusal embooi 0 845 4299 3070 2024-08-09T09:42:36Z JhsBot 61 Pywikibot touch edit 4299 wikitext text/x-wiki Pusal-pusal embooi ma'na ni nia' pusik, pusing-pusing embooi jo. 51o3czmedzlbwoedcf53pl2jd326rgl Puteri 0 846 4300 3073 2024-08-09T09:42:36Z JhsBot 61 Pywikibot touch edit 4300 wikitext text/x-wiki Puteri ngerujuk ahli dendo kerabat dirojo selain ratu, utoma ni anakanda rojo atau endo' putera. Puteri tu asal ni luak bahasa Sanskrit ngerujuk kepada anak dendo. djs1nrv9zfxtlq4sb0mkycz30wwhmil Puteri Sarah Liyana 0 847 4666 4301 2024-08-18T20:27:28Z Umboh Tuhan 194 ''' 4666 wikitext text/x-wiki '''Puteri Sarah Liyana Megat Kamaruddin''' (lahir 1 Disember 1985) iyo tu tekilo jadi pelakon kok peragawati Dendo diom Malaysia. rvuxuata6hjz56djk9n0js26k8fo00i Puteri sarah liyana megat kamaruddin 0 848 3078 3077 2024-08-09T09:28:22Z Jon Harald Søby 58 1 semakan diimportkan 3077 wikitext text/x-wiki #REDIRECT [[Puteri Sarah Liyana]] 0jekdy2zuc6ki0j95hwq9qysb113mqh Raang 0 849 4302 3080 2024-08-09T09:42:37Z JhsBot 61 Pywikibot touch edit 4302 wikitext text/x-wiki Raang tu buek selang duai akibat pusingan bumi ko’ grabiti buan. Raang tu selalu berlaku ta’ selang jo, amun musim raang buek selang akan duek kiro-kiro 10km luak pasir. jfyb58txvkd78z94015hpj8kybnxhvi Rabia Abdul Salam 0 850 4303 3082 2024-08-09T09:42:38Z JhsBot 61 Pywikibot touch edit 4303 wikitext text/x-wiki Rabia boi penanakan tebata' 5 November diom taun 1973 ta' kampung Paya Terubong, Ayer Itam, Pulau Pinang. Mak ni kerjo ta' buruh diom kilang bigi timah, Yang ni nyaun kerjoon tapi ugurus kerjoon rumah jo. iyotuh boi penanakan niak normal, betis ni dembila ai pendok dekit. Diom sekul, iyonoh penetitoon le' sek-sek diom kelas ni le' betis ni ea. mak ni, Abdul Salam nempah kasut khas untuk iyo. Lapas ea, iyo ai no teko luman dokon bioso. 9izt7tihstvuhhh39vfgst38qeqrsnm Raga 0 851 4304 3084 2024-08-09T09:42:38Z JhsBot 61 Pywikibot touch edit 4304 wikitext text/x-wiki Raga tu selalu ni tungan ti ngena bangan badu,ngai badu jo masam masam buli nina tak raga ea.Raga tu iko bana pan jinis ni un bagal un diki inda masam jinis ni . Raya tu buli pan pinakai tungan ti ngena bangan duang tampu. bqt7j7m5utpagw176pz56sny5rdxwby Rambutan 0 852 4305 3089 2024-08-09T09:42:39Z JhsBot 61 Pywikibot touch edit 4305 wikitext text/x-wiki [[Fail:Rambutans by Muhammad Mahdi Karim.jpg|thumb|Bua' rambutan]] '''Rambutan''' (''Nephelium lappaceum'') e jinis poon ta' dinakan [[Sapindaceae]].<ref>"[https://www.britannica.com/topic/list-of-plants-in-the-family-Sapindaceae-2039143 ''List of plants in the family Sapindaceae'']". The Editors of Encyclopaedia Britannica. Dicapai pada 24 Disember 2020. </ref> Bu-u rambutan darag. ==Rujukan== {{Reflist}} bufots4bxq82vu7kckw6bbz40lfmmzu Rambutan' 0 853 3091 3090 2024-08-09T09:28:24Z Jon Harald Søby 58 1 semakan diimportkan 3090 wikitext text/x-wiki #REDIRECT [[Rambutan]] p9ysiy5nvxf5asjybimjiknyxhnllhv Rampa 0 854 4306 3094 2024-08-09T09:42:39Z JhsBot 61 Pywikibot touch edit 4306 wikitext text/x-wiki '''Rampa''' tu [[iko bana]] jenis ni contoh ni rampa kari , rampa kunyit .Amun kiti ingin mapi manuk kari kiti harus nuang kari ea tak manuk fhi6zuw8oydnlrck8th3tgbfgp4ci3h Ransa ransa 0 855 4307 3099 2024-08-09T09:42:40Z JhsBot 61 Pywikibot touch edit 4307 wikitext text/x-wiki Ransa ransa roh ni masak kok dun tapi ngerati kinakan , binuat ulam amun werna ni ijau tarang yo kakal murak , amun werna ni ijau patang yo toh ni , Yo alap reso ni kinakan murak murak , amun toh batang ni keros . Lek ngendok ni tinarik tarik jo lekat pon ni , bok ni kinusek sinisa ta belasan . 3i6p8lumjnv4lv2o9ij4s5h7cq5kouy Ratu Serimpak 0 856 4591 3104 2024-08-12T10:29:44Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q125960519]] 4591 wikitext text/x-wiki Eyo no asara tinut barang pedendoon bujang sambil makai badu tradisi Bajau Sama lengkap dokon badu sipak, ko' serimpak, olos berangkit ko' iko lagi. Asara tu binuat tiap taun jadi mekitoon pien lawa' ni bengso sama tu ko' barang pedendoon ni mamis megaya sambil makai badu tradisi tu.Asara tu kakal lagi binuat ngabut betiru dokon mu' ta' Semio Baga, Kota Belud, ko' Festival Duang boi binuat ta' Rumah Kebudayaan Rumpun BajauSama ta' Lok Batik, Tuaran. == Rejukan == <references /> https://cj.my/127930/sabah-launches-duang-festival-to-preserve-culture/ https://cj.my/127930/sabah-launches-duang-festival-to-preserve-culture/ avmt7hpvrlle1aq1a05ff76ei8hin12 Rebung 0 857 4308 3108 2024-08-09T09:42:40Z JhsBot 61 Pywikibot touch edit 4308 wikitext text/x-wiki Rebung tu iyo tomok ta poon kayu , poon kayu ea oron ni 'bok' . Rebung tu yo gulai amun pinapi reso ni mamis mamis , Un iko jenis rebung , un rebung mamis un rebung pait . Amun yo pinapi iko mesakan buli tebuat . Rebung tu petua jomo dau dau sian ben penyakit pedih betis , niak buli ni amal bana lek mangan ni , kok bungkar pedih betis . 500vfv9ep1p4tboazz8p7f1w39ywy2n Rediu 0 858 4309 3111 2024-08-09T09:42:41Z JhsBot 61 Pywikibot touch edit 4309 wikitext text/x-wiki Rediu tu tungan mekale abar-abar diom koh meluar laat engkoh tungan medayag atai. 0i19ud5v0mi6q9vw5t8r34uzgkqsq8k Regisin 0 859 4310 3114 2024-08-09T09:42:41Z JhsBot 61 Pywikibot touch edit 4310 wikitext text/x-wiki Regisin io no tungan buek parai luman ta tenomon ea , io no dembuak sumber tungan parai subur . Regisin tu un duo jenis ni dikau oyo dikau diki kok regisin tu tungan ni andang dembilak parai jo . ny9ydgug17kmprbs17pc5sq8nweqw91 Rego 0 860 4311 3117 2024-08-09T09:42:41Z JhsBot 61 Pywikibot touch edit 4311 wikitext text/x-wiki '''Rego''' tu nilai dikau barang. Rego tu belaku antara duo pihak [[pembeli]] kok [[medagang]] la0iaben8zu9k0nddlh71p96na1q7za Rejiki Pedus 0 861 4312 3120 2024-08-09T09:42:42Z JhsBot 61 Pywikibot touch edit 4312 wikitext text/x-wiki Rejiki Pedus iyono perembaan Sama ma'na ni nyaun rejiki, bagian ni endo' jomo. du8amj3b8mno0xoo9g1v2kfggpq0ovt Rembutan 0 862 3122 3121 2024-08-09T09:28:26Z Jon Harald Søby 58 1 semakan diimportkan 3121 wikitext text/x-wiki Oron ''rembutan'' nindo lua perketaan ''rambut'' engko ninak torong ni ''-an'' oleh sebab kulit ni rabung bana buh ni. Jadi oron ni tu nindo sempena lua kulit ni. Pokok rembutan tu buli tomo’ sampai langkau ni teko 15–24 atau 30 meter. Bangan duun ni akan berselang seli mediam pelepah 14–30 sm langkau, amun dikau tangkai pelepah duun ben 2-11 pasang anak duun yang berukuran 5–28 sentimeter langkau ni engko pan lebar ni 2–10 sm lebar. eeadivtldyzixq54rwrrsd97rbc6sm4 Rena 0 863 4313 3125 2024-08-09T09:42:43Z JhsBot 61 Pywikibot touch edit 4313 wikitext text/x-wiki '''Rena''' iyo no cahaya yang tenantu oleh langkau golombang atau oleh kandungan sebagai panduan j3hz31fljx6ixzwwogzbev01r8nocek Rendaman 0 864 4314 3128 2024-08-09T09:42:43Z JhsBot 61 Pywikibot touch edit 4314 wikitext text/x-wiki Rendaman ma'na ni buan niah dangai tarang. du7p8hdukdyijzwhgtcs1e4furyzt82 Rendang 0 865 4315 3130 2024-08-09T09:42:43Z JhsBot 61 Pywikibot touch edit 4315 wikitext text/x-wiki Rendang iyono hidangan asal bengso Minangkabau yang ningko ta' kewasan belud langa' Sumatera Barat, Indonesia. Sara nedion ni makai daging kok santan, lodo, kok iko lagi rampa' ratus ngabur keroi. Iyo dikau-dikau ni mekanan khas jomo Minangkaban, mekanan tu luas no ta' masyarakat suku Melayi kok Maranao ( tak Mindanao ) diom rantau Nusantara. smn42afw3dzbqtglxjg9h075u4kh0yk Renggang 0 866 4316 3133 2024-08-09T09:42:44Z JhsBot 61 Pywikibot touch edit 4316 wikitext text/x-wiki Renggang iyono nonom tonomon setio tio. 27lvi95xk3f5fa5zgvmxvsnzg3z1zpk Repa' 0 867 4317 3136 2024-08-09T09:42:44Z JhsBot 61 Pywikibot touch edit 4317 wikitext text/x-wiki Repa' ma'na ni jomo eko, eko bana jomo, diam majlis. e4y7u4zg494390azseit8pjf76b98us Ringgit 0 868 4318 3141 2024-08-09T09:42:45Z JhsBot 61 Pywikibot touch edit 4318 wikitext text/x-wiki '''Ringgit Malaysia''' iyo noh moto sin Malaysia. Simbol ni '''RM''' engko kod moto sin ni '''MYR'''. Ringgit Malaysia tu pinelua oleh [[Bank Negara Malaysia]].<ref><nowiki>https://www.malaysiancoin.com/2016/09/bilakah-rm-ringgit-malaysia-mula.html</nowiki></ref> == Tungan metelak == {{Reflist}} l5pf6xn38gmrncfhchdt458tirn48uu Riudan 0 869 4319 3144 2024-08-09T09:42:45Z JhsBot 61 Pywikibot touch edit 4319 wikitext text/x-wiki Riudan ma'na ni dikau' umur. 97f33hnem16hv4wbqu5qod016yyhyaw Rojo 0 870 4320 3149 2024-08-09T09:42:45Z JhsBot 61 Pywikibot touch edit 4320 wikitext text/x-wiki '''Raja''' iyo no' dangan jomo [[kuleh kuasa diom pemerintah]] dikau kerajaan.Endo rojo pinau [[ratu]].Rojo tu un [[kuasa diom nantu kesalahan jomo]].<ref>https://en.wikipedia.org/wiki/Raja</ref> == Tungan metelak == {{Reflist}} i3nhd2c108pbnv2uc4vsfdivl6tqlob Rosmah Mansur 0 871 4709 4708 2024-08-19T16:25:03Z Umboh Tuhan 194 ''' 4709 wikitext text/x-wiki '''Rosmah binti Mansor''' (iyo boi penenakan 10 Disember 1951) iyo no endo keduo tak Perdana Menteri Malaysia yang keenam Najib Razak. == Tungan metelak == {{Reflist}} [[Kategori:Jomo Malaysia]] k6tia0b3pms8rlc6pu4ggc4xomf2iis Rumput 0 872 4321 3155 2024-08-09T09:42:46Z JhsBot 61 Pywikibot touch edit 4321 wikitext text/x-wiki '''Rumput''' tu tumbuan berwarna hijau yang elum ta’ darat, suang atau selang. gcgne7gjuk5tzz3vvqprnzyk33f1xwc Runsay 0 873 4322 3158 2024-08-09T09:42:47Z JhsBot 61 Pywikibot touch edit 4322 wikitext text/x-wiki '''Runsay''' tu tarian [[jomo Sama]] ta' [[Sabah]], [[Malaysia]].<ref>Patrica Regis, Jacqueline Pugh-Kitingan engko' Judeth John Baptist, "[https://web.archive.org/web/20200110070057/http://www.myjurnal.my/filebank/published_article/15486/02_Patricia_Regis.pdf Berunsai: Meeting, Match-making and Music]". ''Tirai Panggung''. '''6''': 23–37</ref> Peserta runsay selalu ni ramay-ramay. Berunsay dendo engko' dela beta' kawin. Berunsay jomo-jomo sambil betitik [[kulintangan]]. ==Kito pan== * [[Limbay]] ==Tungan metelak== {{Reflist}} mbjbbckhqi8ovjez26kifg5c2k7jomo SAMPAK 0 874 3163 3162 2024-08-09T09:28:29Z Jon Harald Søby 58 4 semakan diimportkan 3162 wikitext text/x-wiki #REDIRECT [[Sampak]] et13hjg70gootn6f6hnxkmeslpek3du Saai saai 0 875 4323 3166 2024-08-09T09:42:47Z JhsBot 61 Pywikibot touch edit 4323 wikitext text/x-wiki Saai saai ma'na ni lulaai pelaan pelaan. ghwh10fu3cjv7imaiws3f7iktxfd1dj Saan 0 876 4324 3169 2024-08-09T09:42:48Z JhsBot 61 Pywikibot touch edit 4324 wikitext text/x-wiki '''Saan''' alat mangan bentuk ni datar kok un pan bentuk ni masam kok mangkuk. Un pan saan kayu pakai jomo untuk haisan rumah. 5u68tssoa8pb9waj1292zxbyajli5b9 Saat 0 877 4325 3172 2024-08-09T09:42:48Z JhsBot 61 Pywikibot touch edit 4325 wikitext text/x-wiki '''Cat''' tu guno ni untuk [[ngecat]] bangan rumah. i7zgpxprlfk4jkiheiw5qgc7q4zr5go Sabah 0 878 4690 3177 2024-08-19T16:19:16Z Umboh Tuhan 194 /* Tungan metelak */ 4690 wikitext text/x-wiki '''Sabah''' iyo no negeri ta' [[Malaysia]]. Iyo tu pinau ko' gelaran Negeri Di Bawah Bayu.<ref>{{cite web | url = https://www.beritaharian.sg/malaysia/sabah-di-bawah-bayu-mula-rasa-ribut-pilihan-raya | title = Sabah di bawah bayu mula rasa ribut pilihan raya | author = MOHD NOOR A. RAHMAN | authorlink = | last = | first = | coauthors = | date = 22 Januari 2024 | year = | month = | language = | format = | work = | pages = | publisher = Berita Harian SG | archiveurl = | archivedate = | accessdate = 2 Julai 2024 | accessmonthday = | accessyear = }}</ref> == Tungan metelak == {{Reflist}} [[Kategori:Malaysia]] myapwzy2tvco857jrhmvpn94pzfxjbi Sabah Tanah Airku 0 879 4592 3181 2024-08-12T10:29:46Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1188464]] 4592 wikitext text/x-wiki '''Sabah Tanah Airku''' iyo no lagu laat [[Sabah]] Di Bawah Bayu. Lagu tu binuat le' HB Hermann.<ref>https://www.bharian.com.my/rencana/sastera/2017/09/325573/lagu-sabah-tanah-airku-sinonim-usia-pembentukan-malaysia</ref> == Tungan metela == <references /> pkjl73t41hmnf29cgjpn3b1epueaq7d Sabau 0 880 4326 3184 2024-08-09T09:42:49Z JhsBot 61 Pywikibot touch edit 4326 wikitext text/x-wiki Sabau ma'na ni buas kok luuk seneguul diam saan peno' le' loo'. eheahs1yaqajh45znxamgcps22k4md8 Saging 0 881 4327 3188 2024-08-09T09:42:50Z JhsBot 61 Pywikibot touch edit 4327 wikitext text/x-wiki [[Fail:Banana and cross section.jpg|thumb|Bua' saging]] '''Saging''' (''Musa acuminata'' antawa ''Musa balbisiana'') e jinis poon ta' dinakan [[Musaceae]]. Kulit saging tu rena nei [[kuning]]. Kulit nei rena ijau amun iyo masi mura'. ==Rujukan== *{{IPNI|Musa acuminata|2015|Dec. 13}} *{{IPNI|Musa balbisiana|2015|Dec. 13}} 771yk5lwy9p1101ht3wo1iwfuv0k2mo Sair muka' tabir 0 882 4328 3191 2024-08-09T09:42:50Z JhsBot 61 Pywikibot touch edit 4328 wikitext text/x-wiki [[Fail:Syair buka tabir budaya Bajau.jpg|thumb|Syair buka tabir budaya Bajau]] Sair muka' tabir iyono adat sebelum setanding, wakil pengantin dendo nooh wakil pengantin dela moso sair. Boh ni pengantin setanding. Isi sair ae muan nasiat antawa tanda' petemuan antara pengantin dela kok dendo. Jomo pandai moso sair muka' tabir Bajau Sama, Diman Taop (entengah) moso sair muka' tabir ta' keramaian kawin ta' Kampung Wakap, Kota Belud taun 2014. 3c0hf13r5kx6mifohmxhofo5aafrn0g Saligundi' 0 883 4593 3198 2024-08-12T10:29:48Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q42861]] 4593 wikitext text/x-wiki [[Fail:GeometricKiteWithTail.jpg|thumb|Saligundi']] '''Saligundi'''' antawa '''selegundi'''' tu dikaw kuri-kurian peranak engko' anak bau Sama. Saligundi' tu binuat makay keratas minyak, boo' boi nianit, gam engko' tangsi. Selegubdi' tu kenuri-kurian musim lapas ngetu' engko' musim toro. Mangkin daras beriu selegundi' tu mangkin langa pekaja langit. Sanang bana atay amun nguri-ngurian selegundi' tu. Saligundi' tu mainan tradisional. Barang-barang seligundi tu keratas, bok antawa besi ko' tali atau pan benang yang nintan ta’ darat. Saligundi' tu daras hembusan beriu ni yang ngeliling badan saligundi' e no sebab ni jadi tekanan dutai mu’ enjata ko’ tekanan menik mitu media. Seligundi tu selalu tinagu ingko endo iyo muda lemiang ko’ saligundi' tu mainan jomo niak kira peranak, jomo remaja ko’ jomo to’. b7951k7zcpq6mmtzg37i76m31fb0owv Saloma 0 884 4329 3200 2024-08-09T09:42:51Z JhsBot 61 Pywikibot touch edit 4329 wikitext text/x-wiki Biduanita Negara Puan Sri Datin Amar Salmah Ismail, KMN (P), AMN antau tekilo eyonoh Saloma diom taun (22 Januari 1935 – 25 April 1983) eyonoh penyanyi lagu kok pelakon dendo Singapura-Malaysia yang tekilo tak taun 1950-an ngabut noh awal 1980-an. Eyo lahir tah Pasir Panjang, Singapura, Eyonoh dik tah seniwati Mariam Ismail (yang paling tekilo jomo sebagai Mariani). Ngai ea jo, eyo pan sioko tah bapa penyanyi kok pelakon, Aminah Ismail (yang tekilo sebagai Mimi Loma). Eyo tu ai jadi endo keteluh lek pengarah, penerbit, pelakon filem, komposer dan penerbit, Tan Sri Datuk Amar P. Ramlee. n2s6f8glpyjaxbpp4mzbpkrzie3t8q2 Sampak 0 885 4330 3206 2024-08-09T09:42:51Z JhsBot 61 Pywikibot touch edit 4330 wikitext text/x-wiki '''Sampak''' tu pinakay ta ulu guuk, pida', beladaw, badi', tekook kekura, unsui, maraw engko' lain-lain anu somo kegunoon ni. Sampak tu binuat makay besi, tembaga, tanduk kerabaw. Betiru uun pan makay batang paip plastik sebab sanang penemia engko taan pan. Sampak tu pinasang sebap endo' taan tungan masang e antawa nya' pesa'. m5n6f7favcvdqofk1bavzze5pf6nrxq Sampar 0 886 3208 3207 2024-08-09T09:28:34Z Jon Harald Søby 58 1 semakan diimportkan 3207 wikitext text/x-wiki Eyo no perkataan pinakai enggo no iko maksud ni. Kadang ni buli pinakai jadi sumpaan, pinakai beragam ko' iko lagi. Meksud sampar tu nia' tantu, nut pan lua' ta' ling tuturan ti kok keadaan tebeta' ti betutur. lvrpg43dea33o7p5w4skwftgxdqu3ok Samsi' 0 887 4331 3211 2024-08-09T09:42:53Z JhsBot 61 Pywikibot touch edit 4331 wikitext text/x-wiki Samsi' ma'na ni pedi atai ni. lgde31uciacdy77vzadacrphij8d261 Sangila' 0 888 4332 3214 2024-08-09T09:42:54Z JhsBot 61 Pywikibot touch edit 4332 wikitext text/x-wiki Sangila' ma'na ni sarig, jomo pinoyo poyo. · pzttbcar808ixavc6aujgm96izqlgeg Sanyam 0 889 4333 3217 2024-08-09T09:42:54Z JhsBot 61 Pywikibot touch edit 4333 wikitext text/x-wiki Sanyam ma'na ni remod. isw5satookmr50olpvp56ltpgk1pd3d Sapi 0 890 3219 3218 2024-08-09T09:28:34Z Jon Harald Søby 58 1 semakan diimportkan 3218 wikitext text/x-wiki Sapi tu jenis imon, sapi penelioro ngendo daging,kok buek susu. Kulit sapi buli nindo untuk jadi gandang kok ti' sapi buli jadi baja kok baan api 54fzxebgon1ogt7y7l7t7icw8ro81du Sapi' 0 891 4334 3224 2024-08-09T09:42:55Z JhsBot 61 Pywikibot touch edit 4334 wikitext text/x-wiki '''Sapi''' iyo noh sejenis diom kelompok [[mamalia]]. Sapi pan spesis binatang yang rojo iko. Bioso ni sapi tergolong diom kelas [[Taurus]]. Jomo melihoro sapi untuk ngendok daging ni, susu, hasil tenusu engko pan sapi buli pinakai sebagai kenderaan(sapi pinakai untuk narik kerita, muou parai ko' iko lagi).<ref><nowiki>https://books.google.com.my/books?id=JgAMbNSt8ikC&pg=PA1&redir_esc=y#v=onepage&q&f=false</nowiki></ref> == Tungan metelak == {{Reflist}} 9ypwr560gmussfokg8xlikmm58dchdw Sarawak 0 892 4691 3230 2024-08-19T16:19:49Z Umboh Tuhan 194 /* Tungan metelak */ 4691 wikitext text/x-wiki '''Sarawak''' iyo no negeri tebagal ta' Malaysia. Sebelum Persekutuan Malaysia binentuk, [[Sarawak]] bebas luak kolonial British pada 22 Julai 1963. Sarawak wilayah bagabung somo-somo Sabah, Singapura ko' Tahan Melayu. Iyo tu pinau ko' gelaran Bumi Kenyalang.<ref>{{Cite web | url = https://www.hmetro.com.my/WM/2023/01/924432/warisan-kian-hilang | title = Warisan kian hilang | author = Rosli Mohd Nordin | authorlink = | last = | first = | coauthors = | date = 11 Januari 2024 | year = | month = | language = | format = | work = | pages = | publisher = Harian Metro | archiveurl = | archivedate = | accessdate = 2 Julai 2024 | accessmonthday = | accessyear = }}</ref> == Tungan metelak == {{Reflist}} [[Kategori:Malaysia]] lxpput3rwx3rmmwv50174ngv1er8kp4 Sawan 0 893 4782 4594 2024-08-19T17:24:32Z Umboh Tuhan 194 + Tungan metelak 4782 wikitext text/x-wiki [[Fail:2006-10-15 Tasse+Untertasse-Pflaume01.jpg|thumb|alt=Sawan|Sawan]] '''Sawan''' iyo no ginuno untuk penginum bue' sajuk ko' [[bue' panas]] masam teh, [[Kuoi'|kupi']] ko' iyan-iyan jo bengso sesair. Sawan penginum bue' panas been tungan pengentan ensedi. == Tungan metelak == {{Reflist}} prsgu19lf3ugty69i6y5ajt2egu5b4n Sebu' 0 894 4335 3238 2024-08-09T09:42:56Z JhsBot 61 Pywikibot touch edit 4335 wikitext text/x-wiki Sebu' ma'na ni pedi atai. fphi72lnpzf1bv3dpg5sravyj64wnh3 Sedekah 0 895 4336 3241 2024-08-09T09:42:56Z JhsBot 61 Pywikibot touch edit 4336 wikitext text/x-wiki Sedaka’ lionoh manan benda tah jomo yang merlu bana tujuan ni untuk mesikot diri ni tah Allah SWT. l38fe5ydipgslq8cigaalwhogb732rr Sedepak 0 896 4337 3244 2024-08-09T09:42:57Z JhsBot 61 Pywikibot touch edit 4337 wikitext text/x-wiki Sedepak ma'na ni angkan silanggar dokon main bul, lulaai, mangat-mangatan. cnk88wlgeu8l09fryc11ykjoz1k6cgr Sekap too 0 897 4338 3247 2024-08-09T09:42:57Z JhsBot 61 Pywikibot touch edit 4338 wikitext text/x-wiki Sekap too iyono perembaan Sama ma'na ni umur jomo too. 1v78rs0q7txi9qk2vv0sa226e6bv202 Sekul 0 898 4339 3253 2024-08-09T09:42:57Z JhsBot 61 Pywikibot touch edit 4339 wikitext text/x-wiki Sekul iyo no tungan barang jomo kulek pendidikan. Ilmu lekat tak sekul tu sangat berguno buat semimon jomo.<ref>https://ms.m.wikipedia.org/wiki/Sekolah</ref> == Tungan metelak == {{Reflist}} it5kkgwipyzahso8beysrai1qlc1j63 Selawat 0 899 4340 3255 2024-08-09T09:42:58Z JhsBot 61 Pywikibot touch edit 4340 wikitext text/x-wiki Perkataan Selawat antau Salawat nindo lua perkataan solat Arab ionoh dua, pujian. Nut ling Kamus Bahasa Melayu, selawat binuat untuk maku dua tah Tuhan supaya kulek rahmat atas Nabi Muhammad S.A.W. ia0yry3k43on091ayvxpll7bbkj2c4x Sele' booi 0 900 4341 3258 2024-08-09T09:42:58Z JhsBot 61 Pywikibot touch edit 4341 wikitext text/x-wiki Sele' booi iyono perembaan Bajau Sama ma'na ni teko ta' tampat tungan setemu tapi jomo tenemuan ai no lumaan. 91hpj7p0616q9tknxxmrcepx12hral4 Selegundi 0 901 3260 3259 2024-08-09T09:28:38Z Jon Harald Søby 58 1 semakan diimportkan 3259 wikitext text/x-wiki #REDIRECT [[Saligundi']] 5heqgit3g2g3z39lw08p1l1v5kxh9fu Seligundi 0 902 3263 3262 2024-08-09T09:28:38Z Jon Harald Søby 58 2 semakan diimportkan 3262 wikitext text/x-wiki #REDIRECT [[Saligundi']] 5heqgit3g2g3z39lw08p1l1v5kxh9fu Selipar 0 903 4342 3266 2024-08-09T09:42:59Z JhsBot 61 Pywikibot touch edit 4342 wikitext text/x-wiki '''Selipar''' iyo noh kegunoon ni untuk nutup betis yang pan buli pinakai mediam atau meluar rumah. Amun binanding engko kasut, selipar lagi lampung. dev58eg9sjmapctwmcf4v5rzq54rsqz Sembiang 0 904 4343 3272 2024-08-09T09:42:59Z JhsBot 61 Pywikibot touch edit 4343 wikitext text/x-wiki '''Sembiang''' iyo no [[amal]] alap jadi para umat sikot kok Allah Subhanahuwataala. Sembiang tu perlu tinunai terutama ni sembiang [[pardu.]]<ref>https://ms.m.wikipedia.org/wiki/Sembahyang</ref> == Tungan metelak == {{Reflist}} tnv941i7ayq4ycrqabic1fsw1v9nda8 Sembiang Asar 0 905 4344 3277 2024-08-09T09:43:00Z JhsBot 61 Pywikibot touch edit 4344 wikitext text/x-wiki '''Sembiang Asar''' iyo noh salah dikau sembiang yang tergolong diom 5 sembiang fardu yang wajib binuat oleh jomo [[Islam]]. Sembiang Asar binuat diom 4 [[rakaat]]. Waktu untuk sembiang Asar iyo noh lepas habis noh waktu sembiang Juur.<ref>https://akuislam.com/blog/ibadah/solat-asar/</ref> == Tungan metelak == {{Reflist}} 660h0qpvdgu2n0858bzu6133uxf93u6 Sembiang Isya 0 906 4345 3283 2024-08-09T09:43:00Z JhsBot 61 Pywikibot touch edit 4345 wikitext text/x-wiki Sembiang isya iyo no sembiang pardu 4 rakaat. Sembiang tu merupakan sembiang yang ke-5 yang wajib tinunai oleh barang muslimin kok muslimat.<ref>https://ms.m.wikipedia.org/wiki/Solat_Isyak</ref> == Tungan metelak == {{Reflist}} cglsfgeizp558ctqj5jrwjymqptwxxt Sembiang Jumaat 0 907 4346 3287 2024-08-09T09:43:01Z JhsBot 61 Pywikibot touch edit 4346 wikitext text/x-wiki '''Sembiang Jumaat''' iyo noh sembiang fardu 2 rakaat yang binuat setiap lau [[Jumaat]] untuk ngentian sembiang [[Sembiang Juur|sembiang Juhur]].<ref><nowiki>http://pislamt1.blogspot.com/2012/05/ibadah-solat-jumaat.html?m=1</nowiki></ref> Binuat secara jemaah lepas mekaleh khutbah khas untuk sembiang tu. Hukum sembiang Jumaat iyo noh Fardu Ain yang wajib binuat oleh bangan pedelaan menepati syarat-syarat ni. == Tungan Metelak == {{Reflist}} hx5y40rnzgoje8xz57owg4kd0az2gar Sembiang Juur 0 908 4347 3292 2024-08-09T09:43:01Z JhsBot 61 Pywikibot touch edit 4347 wikitext text/x-wiki '''Sembiang Juur''' iyo noh salah dikau sembiang mediom sembiang fardu 5 waktu yang wajib binuat oleh jomo [[Islam]]. Sembiang Juur terdiri dari empat [[rakaat]]. Waktu untuk nunai sembiang Juur iyo noh lepas moto lau' mula condong lua puncak ni sampai noh separuh puh betis langit.<ref><nowiki>https://akumuslim.asia/solat-zohor-cara-solat-niat-bacaan-rumi/</nowiki></ref> == Tungan metelak == {{Reflist}} ri7k8y6oumcuka5qwctaivrrbfvc94o Sembiang Magrib 0 909 4348 3299 2024-08-09T09:43:02Z JhsBot 61 Pywikibot touch edit 4348 wikitext text/x-wiki '''Sembiang magrib''' iyo no [[sembiang pardu]] wajib. Sembiang tu un 3 rakaat yang wajib tinunai oleh semimon [[muslimin]] kok muslimat<ref>https://ms.m.wikipedia.org/wiki/Solat_Maghrib</ref> == Tungan metelak == {{Reflist}} oqlsfp2ecngayun5d5jb6xsx64pbkcj Sembiang Sunat Terawi' 0 910 4349 3301 2024-08-09T09:43:02Z JhsBot 61 Pywikibot touch edit 4349 wikitext text/x-wiki Sembiang Sunat Terawi' iyono dikau jenis sembiang sunat yang kinerjon diom buan Poso jo. lh4bbmgcl2grq6ul8cn42ppxr3a7qid Sembiang subu 0 911 4350 3306 2024-08-09T09:43:03Z JhsBot 61 Pywikibot touch edit 4350 wikitext text/x-wiki '''Sembiang''' '''Subu''' iyo noh salah dikau sembiang fardu yang wajib binuat oleh jomo [[Islam]]. Sembiang Subu terdiri dari duo rakaat. Amun nuut [[mazhab Syafie]], sembiang Subu binuat moko doa Qunut.<ref><nowiki>https://akuislam.com/blog/ibadah/solat-subuh/</nowiki></ref> == Tungan metelak == {{Reflist}} 0i80quab0n0rzmbyjvr88t0fzer9un7 Semek’ 0 912 4351 3308 2024-08-09T09:43:03Z JhsBot 61 Pywikibot touch edit 4351 wikitext text/x-wiki Semek’ tu selalu pinakai oleh jomo, somo un iyo pengelap kerita, mija, kerusi, dasar ko’ iko lagi guno ni. Rego semek’ tu mura jo pinedagang ko’ pan semek’ tu sanang pinemia ta’ minggo-minggo kadai. Semek’ tu binuat luak benang somo pan masam badu tapi semek tu iko jinis ni samaa un pan iyo lema’ atau pan kasar. Semek tu kikon ni bentuk empat segi. 5lruxtrqk8ak7rs6u9z8fzxv37u75lg Semio 0 913 4352 3311 2024-08-09T09:43:03Z JhsBot 61 Pywikibot touch edit 4352 wikitext text/x-wiki Semio tungan jomo medagang tenomon,diing bangan barang-barang yang penerlu'antawa peserantaan keluman jomo.Bioso ni semio tu binuat deminggu entendo tungan jomo setemu-temu sambil bebeli.Itu no ule' bedagang tradisi boi binuat lua' dau-dau. ogrutqt2f4ymtsgnn6v2813b9edpw9v Semio Kota Belud 0 914 3313 3312 2024-08-09T09:28:42Z Jon Harald Søby 58 1 semakan diimportkan 3312 wikitext text/x-wiki #REDIRECT [[Semio Kuta Belud]] 1ezp3ka76y44xchwaz774inpmstbxky Semio Kuta Belud 0 915 4353 3324 2024-08-09T09:43:04Z JhsBot 61 Pywikibot touch edit 4353 wikitext text/x-wiki [[Fail:TamuKB.jpg|thumb| '''''Semio Kota Belud 2023'''''<mapframe latitude="6.350424" longitude="116.433384" zoom="16" width="400" height="160" />]] Semio tu sikot ko' Kampung Siasai Laan Semio, iyo no semio paling toh ta' Negeri Sabah ko' umurni 145 taun boi binuat ole' William Prettyman tebeta' taun 1878. Semio tu awalni natu bangan bengso bengen ta' [[Kota Belud]] tu, eyo no bengso Bajau Sama, Kadazandusun, kok Ilanun lua'tak medagang dagangan gai ta' bangan jomo. Dangangan pinedagang ta' semio [[Kota Belud]] tu eyo no Kraftangan, Gulai, Bua-buaan kok iko lagi. Semio tu buka lua' ta' 6 sinsaung ngabut ni 2 kemuap. == Semio Bagal == Kota Belud andang jadi tuan rumah, engko' ni Semio Bagal sinambut tiap taun ta' Semio Kota Belud tu, asal teko no torong buan Uktuber. Iko petendingan binuat dokon [[Ratu Serimpak]], Tanjak Pahlawan engko' iko lagi. == Tungan Metelak == # https://ms.wikipedia.org/wiki/Tamu_Mingguan_Kota_Belud # https://www.bharian.com.my/bhplus-old/2015/11/97019/uniknya-tamu-kota-belud-bukan-sekadar-pasar-minggu<nowiki/> # [https://www.dailyexpress.com.my/read/5227/145-yr-old-kota-belud-tamu-sabah-s-oldest-/ https://www.dailyexpress.com.my/read/5227/145-yr-old-kota-belud-tamu-sabah-s-olde]<nowiki/>[https://www.dailyexpress.com.my/read/5227/145-yr-old-kota-belud-tamu-sabah-s-oldest-/ st-/] # [https://web.archive.org/web/20230821163607/http://www.sta.my/infoview.cfm?THE_ID=75 https://web.a]<nowiki/>[https://web.archive.org/web/20230821163607/http://www.sta.my/infoview.cfm?THE_ID=75 rchive.org/web/20230821163607/http://www.sta.my/infoview.cfm?THE_ID=75] 3emfu9g1xjf3gnar8bb1xmu59h782jy Sempangan 0 916 4354 3328 2024-08-09T09:43:04Z JhsBot 61 Pywikibot touch edit 4354 wikitext text/x-wiki '''Sempangan''' iyo no kraf Bajau Sama boi binuat lua' ta' olos boi ni rait sinambung-sambung nuut pata'-pata' dokon pata'kuda',rebung ,taris-taris inda-inda rena ni.Gayad sempangan bioso ni duo ko setanga ko' langkaw ni empat ela antawa lebi.Sempangan tu pengelemba' ruma',pelamin ,pandung-pandung antawa [[usungan]].<ref>https://web.archive.org/web/20200110061809/http://www.myjurnal.my/filebank/published_article/24069/Article_4.PDF</ref> ==Ninda' pan== * [[Pelamin]] ==Tungan metela== {{Reflist}} 1ihtyg9s8rruw42ki6au4nv3ae69qi4 Senenggilaan 0 917 4355 3331 2024-08-09T09:43:05Z JhsBot 61 Pywikibot touch edit 4355 wikitext text/x-wiki Senenggilaan iyono kenetauan, senarigan 6kn314ivywz2ad68gbrgwuilv2c861v Sengkaban 0 918 4356 3334 2024-08-09T09:43:05Z JhsBot 61 Pywikibot touch edit 4356 wikitext text/x-wiki Sengkaban ma'na ni kawasaan lolom ensedi timbang. 4uq7zz5c19usp1w25jhwzt10xcs86nu Sepanggar 0 919 4595 3337 2024-08-12T10:29:53Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q1797941]] 4595 wikitext text/x-wiki Sepanggar iyo no dikau subdaerah ta' sedi pantai barat bandar Kota Kinabalu, Sabah, Malaysia. Lokasi ni sukup lawa' ko' ngam tebeta' ni ta' kawasan belud sedi selang Teluk Sepanggar. Mitu bengen Universiti Mlaysia Sabah (UMS) tebagal ko' Kem Tentera Laut DIraja Malaysia (TLDM). alvxb77vjlt7goqhsh5xub9g6ctqco6 Serama 0 920 4357 3339 2024-08-09T09:43:06Z JhsBot 61 Pywikibot touch edit 4357 wikitext text/x-wiki Serama tu iyo no dakwah diom penyebaran ugama islam.Serama bioso ni benuat lek jomo untuk nebar ajaran alap ta ugama islam ju8u96vg4s7wlznn9nmlmbx7x14pmz9 Seramin 0 921 4358 3344 2024-08-09T09:43:07Z JhsBot 61 Pywikibot touch edit 4358 wikitext text/x-wiki '''Seramin''' iyo noh permukaan yang [[ngeluud]]. Seramin pinakai untuk ngenda' rou, gambaran engko bayangan yang somo bila ngodop seramin.<ref><nowiki>https://ms.weblogographic.com/difference-between-mirror</nowiki></ref> == Tungan metelak == {{Reflist}} qp8ulpb2xb0ir3sv76xd1k7sc9l9o8t Serudung 0 922 4359 3347 2024-08-09T09:43:07Z JhsBot 61 Pywikibot touch edit 4359 wikitext text/x-wiki Serudung iono dikau bagian ta'dembua'rumah untuk kegunoon mapi,ngena'saan koh peralatan mapi. tq6v2p7b470hviwhqphbys0fh5a5gqm Sesapu 0 923 4360 3349 2024-08-09T09:43:07Z JhsBot 61 Pywikibot touch edit 4360 wikitext text/x-wiki Sesapu guno ni tungan ti napu mediom ruma ti, ruma tu niya lengkap amun nyaun sesapu bioso ni kiti napu ruma awal sensaung engko kemuap.Sesapu tu boi binuat lua lidi pelepa un pan sesapu tu boi binuat lua pelistik. p3bt5a2iehpuclov9q4z488drdpp693 Sesok 0 924 4361 3351 2024-08-09T09:43:08Z JhsBot 61 Pywikibot touch edit 4361 wikitext text/x-wiki Sesok iyono sejinis reptilia mediam genus Hemidactylus [2] dinakan Gekkonidae. Un 187 sepisis yang terati kok entemu ta' mimon kewasan tropical dunia ngabut ta' kawasan-kawasan subtropical Afrika kok Eropah. btk7l11vt92yb0ynjnwzjnmi42kaisq Setimbug 0 925 4362 3354 2024-08-09T09:43:08Z JhsBot 61 Pywikibot touch edit 4362 wikitext text/x-wiki Setimbug iyono manuk ngentelo dikau keteraan. 6i5o5494l7gt9q5sgfuvwo7bxjnf25u Setoloi 0 926 4363 3357 2024-08-09T09:43:09Z JhsBot 61 Pywikibot touch edit 4363 wikitext text/x-wiki Setoloi iyono ngam, seterua'. 01q9obe7n38j5oi7x5y69d24rxiqmf1 Shahelmey Yahya 0 927 4700 4466 2024-08-19T16:22:42Z Umboh Tuhan 194 + Tungan metelak 4700 wikitext text/x-wiki YB Datuk Ir. Haji '''Shahelmey Yahya''' iyo no dangan Menteri Pembangunan Masyarakat ko' Kesejahteraan Rakyat ko' ADUN Tanjung Keramat. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] hw82atfxb0496efn4v1vvdy7gl1xh6y Sigu 0 928 4364 3366 2024-08-09T09:43:09Z JhsBot 61 Pywikibot touch edit 4364 wikitext text/x-wiki '''Sigu (guru)''' ataupan jomo ngajar, ngedidik mediom bagian pendidikan dokon sekul atau tungan-tungan belajar. Sigu ninda sebagai jomo yang iko ilmu. Tapi amun untuk peringkat Universiti, panggilan sigu nyiak pinakai sebab pendidik muh Universiti pinau pensyarah. Yang pasti ni, seorang sigu mesti oyo pengetahuan ni sebab gai mesampai ilmu masing-masing. reij7z50zdut6c5f4js6v0g4hkz6x0k Sin Raya 0 929 3368 3367 2024-08-09T09:28:47Z Jon Harald Søby 58 1 semakan diimportkan 3367 wikitext text/x-wiki '''Sin Raya''' diom raya aidilfitri un jomo muan sin raya contoh ni dokon kiti beraya tak rumah jomo kiti akan binanan sampul diom sampul ea un sin. Diom buan raya jo sin ea binanan un pan jomo niak muan un pan jomo muan niak somo.Debagi muan bangan 10 ringgit debagi 50 un 100 nut jomo ni pan . 49jq6wyxul4dbc02augjx331y8hr1fe Sinabau 0 930 4365 3371 2024-08-09T09:43:10Z JhsBot 61 Pywikibot touch edit 4365 wikitext text/x-wiki Sinabau ma'na ni buas kok luuk bengen loo' seneguul. frvbao4s6byq2w6cyrmhmz6e377qw94 Singapura 0 931 4673 4596 2024-08-19T14:18:34Z Umboh Tuhan 194 + Tungan metelak 4673 wikitext text/x-wiki [[Fail:Flag of Singapore.svg|thumb|Bendira]] '''Singapura''' antawa pan resmi ni pinau '''Republik Singapura'''. Iyo no laat pulau enggo no tungan ni tebeta' selatan Semenanjung Melayu, 137 kilomoter ta' utara garisan Khatulistiwa, ta' Asia Tenggara. Laat tu selekat lau' Malaysia engko' Selat Johor ta' utara, engko' Kepulauan Riau, [[Indonesia]] engko' Selat Singapura ta' selatan. Tebeta' ni sebelum merdeka ta' taun 1965, Singapura boi no jadi pelebuan engko' KDNK langa enggo no ketelu telanga ta' Asia Timur tebeta' e. Boi no merdeka, kenamat no laat tu iko perubaan ni. == Asal-usul oron == Oron Singapura boi entemu lau' [[ling Sanskrit]], iyo no ''siṃhāpura'' (सिंहपुर, "Kota Singa"). Boi begea, un pan oron ni ali lagi, eyo no pinau "Kota Singa". Boi no kinaji taklaat ae nyaun pan entemu gai singa dokon oron ni e pinau. == Tungan metelak == {{Reflist}} [[Kategori:Laat pulau]] 8uhu3kkntcjpcer63u80b1ek36e96sr Singkaban 0 932 3395 3394 2024-08-09T09:28:49Z Jon Harald Søby 58 1 semakan diimportkan 3394 wikitext text/x-wiki Singkaban iyono jendela c7j47sxrr14c3wefqvucdbr9ulhifhj Sinta kenemong 0 933 4366 3398 2024-08-09T09:43:11Z JhsBot 61 Pywikibot touch edit 4366 wikitext text/x-wiki Sinta kenemong iyono dela ingin ta' dangan dendo tapi nia' bani mara', buli pan dendo ingin ta' dangan dela' tapi romon ni jo reso atai ni. gy4vel2xq4etbxth65y4bsemj3b6zvd Sipit badu 0 934 4367 3952 2024-08-09T09:43:12Z JhsBot 61 Pywikibot touch edit 4367 wikitext text/x-wiki Sipit Badu guno ni untuk nipit badu base endo keroi.Selain ae iyo pan buli nipit barang barang lain dokon kasut engko lain lain, un pan alap nipit badu tu endo badu ti niya lemiang cyii9to2areu53oq5gmlqzfw4p8r7vk Siti Aisyah Alias 0 935 4597 3404 2024-08-12T10:29:58Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q26251113]] 4597 wikitext text/x-wiki {{Short description|Malaysian academic}} {{Distinguish|Siti Aisyah}} {{Infobox scientist | image = Siti Aisyah Alias.jpeg | image_size = | caption = Siti Aisyah Alias | birth_name = Siti Aisyah Binti Haji Alias | birth_date = {{Birth date and age |1966|03|25}} | nationality = Malaysian | fields = Polar [[mycology]] | workplaces = National Antarctic Research Centre, [[University of Malaya]] | alma_mater = [[University of Malaya]] }} iyoo penanakan ta 25 Mac 1966 ta Rembau, Negeri Sembilan. iyo no belajar ta Tunku Ampuan Durah luwa 1981 ngabut 1983. iyo no lulus ta luwa Universiti Malaya dangan BSc mediang bidang Ekologi pada taun 1991. iyo no ben PhD mediang bidang mikologi laut ta Universiti Portsmouth pada taun 1996. iyo no ta Malaysia muam bekerjo sebagai pensyarah ta Institut Sains Biologi, UM, dan memulakan program penyelidikan mengenai mikologi marin, kemudian mengejar penyelidikan kutub ke atas kepelbagaian kulat dan enzim. Pada taun 2015, iyo no pinindah ke Institut Sains Lautan dan Bumi (IOES). g874b24lb93chst33h428m701pgbiwp Siti Hasmah Mohamad Ali 0 936 4598 3410 2024-08-12T10:30:01Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q7531880]] 4598 wikitext text/x-wiki [[Fail:Siti Hasmah Mohamad Ali (cropped).jpg|thumb|Siti Hasmah Mohamad Ali]] Tun Dr. Siti Hasmah binti Haji Mohamad Ali ( nganak 12 Julai 1926 ). Beliau endo Mahathir bin Mohamad, iyono' Perdana Menteri [[Malaysia]] yang keempat kok kepitu' . Iyo boi pinenakan ta' Klang, Selangor pada 12 Julai 1926, Siti Hasmah iyono' doktor dendo yang berbongso Melayu. anak dinakan ni lekat ta' Minangkabau. Beliau tekule' MBBS lekat [[Universiti Malaya]] ta' [[Singapura]]. Tun Dr. Siti Hasmah iyono' dikau-dikau ni dendo Melayu yang twkule' kursus perubatan ta' Kolej Perubatan King Edward VII ta' Singapura (betiru Sekolah Perubatan Yong Loo) lepas Siparang Dunia keduo. bpzt30rem2v5nbl59y3rb23vo3h3rii Siti Nurhaliza 0 937 4741 4740 2024-08-19T16:39:20Z Umboh Tuhan 194 Siti Nurhaliza pada 2013 4741 wikitext text/x-wiki [[Fail:Siti Nurhaliza - Khairul Fahmi's Wedding 2013.jpg|thumb|Siti Nurhaliza pada 2013]] Yang Hormat Dato' Sri Siti Nurhaliza Tarudin, boi penanakan 11 Januari 1979. Iyo tekilo jomo sebab iyo tu pelego', pelakun, ngerati nulis lagu, nerbit rakaman, pengacara televisyen, engko pan jomo diom perniagaan Malaysia. Siti Nurhaliza pan boi mula kerjoon ni diom industri lagu-lagu Malaysia lau umur ni 16 taun lepas yo boi manang diom pertandingan lagu-lagu Bintang HMI anjuran Radio Televisyen Malaysia (RTM) masa 1 April 1995. Boi habis program ae, empat kauh tawaran kontrak rakaman boi terimoon ni lua syarikat rakaman antarabangsa sebelum yo nindo oleh Suria Records. Lagu paling awal boi pelua ni binan judul "Jerat Percintaan". Lagu ni tu boi manang mediam Anugerah Juara Lagu ke-11 kok kulek lagi duo anugerah lain diom kategori Persembahan Terbaik kok Lagu Balada paling alap. Album numbur satu ni boi tepedagang engko jumlah unit yang iko iyo noh 800,000 unit lua awal-awal lagi yo boi mososkan diri ni mediam industri muzik Malaysia ngabut tahun 2005 tak Malaysia. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] it8o0kyi1xp8hiunkx4pjyh5z5zkgvl Siti Saleha 0 938 3418 3417 2024-08-09T09:28:52Z Jon Harald Søby 58 3 semakan diimportkan 3417 wikitext text/x-wiki Siti Saleha Mohd Baharum(penenakan 14 mac 1990) dangan pelakun ko' model dendo ta' Malaysia been keturunan inggeris ko' dik ta' pelego diom kumpulan Bunkface, Sam Baharum. Iyo boi mula kerjoon ni diom umur 12 taun.Siti Saleha lapas a' kulek kejayaan komersial lua' drama lakunanni iyo no Asmara Luna(2013), Ramadan Jangan Pergi(2014) ko' iko lagi.Iyo pan tekilo dangan yang pandai diom ngurus sin ni, Iyo pan dangan pelakun yang lawa dendo ni inheasdk6llbuc920ruov6qpfgl4b5j Somo pantar 0 939 4368 3421 2024-08-09T09:43:14Z JhsBot 61 Pywikibot touch edit 4368 wikitext text/x-wiki Somo pantar ma'na ni kepandaian somo. 1n10taiuga68rjxpu5fonp92id2ua26 Songom 0 940 3423 3422 2024-08-09T09:28:52Z Jon Harald Søby 58 1 semakan diimportkan 3422 wikitext text/x-wiki Songom iyono cuaca yang nyaun moto lau lw3bh45lqkr561tl2u65pbodimldxgd Soo 0 941 4793 4792 2024-08-19T17:31:59Z Umboh Tuhan 194 + Tungan metelak 4793 wikitext text/x-wiki '''Soo''' iyono reptilia karnivor yang langkau kok ben betis mediam suborder Serpentes. == Tungan metelak == {{Reflist}} cbv8ovv09cfl3hlqotfe8xex9hqwjl6 Soro 0 942 4599 3433 2024-08-12T10:30:03Z JhsBot 61 bot: Removing interwiki template; the page is now connected to [[d:Q7390]] 4599 wikitext text/x-wiki [[Fail:Human voice spectrogram.jpg|thumb|Spektogram soro manusia']] '''Soro''' teposok lua' [[ling]] boi [[Pemuatan soro|buat]] [[Manusia'|jomo]] makay pita soro doko' [[Tuturan|betutur]], [[pelego']], [[titoo]], [[nangis]], [[ngeraa]] engko' lain-lain.<ref>"[http://www.lionsvoiceclinic.umn.edu/page2.htm#physiology101 About the voice]". www.lionsvoiceclinic.umn.edu.</ref> ==Kito pan== * [[Jinis soro]] ==Tungan metelak== {{Reflist}} ==Bosoon lagi== * Howard, D.M., engko' Murphy, D.T.M. (2009). [https://web.archive.org/web/20100407013351/http://www.pluralpublishing.com/publication_vsaar.htm] Voice science acoustics and recording, San Diego: Plural Press. * Titze, I. R. (2008). The human instrument. Sci. Am. 298 (1):94–101. [http://www.scientificamerican.com/article.cfm?id=the-human-instrument] * Thurman, Leon & Welch, ed., Graham (2000), Bodymind & voice: Foundations of voice education (revised ed.), Collegeville, Minnesota: The VoiceCare Network et al., ISBN 0-87414-123-0 [[Kategori:Soro manusia']] kzhsfdk9weiu3j2wuu5gqr00j8z7hmf Soro manusia' 0 943 3435 3434 2024-08-09T09:28:53Z Jon Harald Søby 58 1 semakan diimportkan 3434 wikitext text/x-wiki #REDIRECT [[Soro]] rpmcoe8qjldxrcvin7r3eoc0kf9v4c6 Stacy (penyanyi) 0 944 4738 4600 2024-08-19T16:38:23Z Umboh Tuhan 194 + Tungan metelak 4738 wikitext text/x-wiki {{Infobox person | name = Stacy | image = Stacy in performance, 2009.jpg | image_size = | caption = | native_name = {{Lang|ms|{{Script|Arab|ستيسي}}}} | birth_name = Stracie Angie Anam | birth_date = {{Birth date and age|df=yes|1990|8|18}} | birth_place = [[Penampang]], [[Sabah]], [[Malaysia]] | nationality = Malaysian | occupation = {{Flatlist| * Susuminding * Monunupu sinding * Susumayau * Mongingindapu * produser }} | years_active = 2008–betiru | spouse = {{Marriage|Akim Ahmad|2016}} | children = 3 | relatives = Chaq Mentor (brother) | father = Anam Bayar | mother = Agnes Kaloos | other_names = | website = | module = {{Infobox musical artist|embed=yes | background = solo_singer <!-- mandatory field --> | instrument = Vocals | genre = {{Flatlist| * [[Pop music|Pop]] * [[Pop rock]] * [[Contemporary R&B|R&B]] * [[Dance music|dance]] * [[Dance-pop]] * [[Electropop]] * [[Ballad]] }} | label = Maestro/ Astro Talent/ Rocketfuel Entertainment <small>(2008–2018)</small><br/> [[Warner Music]] Malaysia <small>(2011–2014)</small> | associated_acts = [[Adira]], Akim Ahmad, [[KRU]]<!--Please limit inclusion of associated acts to artists whom she shared an entire album with or concert that they both co-headlined.--> }} }} '''Ummu Shaikhah Stacy binti Anam''' (lahir Stracie Angie Anam) antau tekilo engko oron ne Stacy (lahir 18 0gos 1990 tah kota kinabalu, Sabah) iyo tekilo pelego numbur dikau tah malaysia diom realiti Tv Akademi Fantasia Musim keenom. Iyo lekat kampung Tuavon, penampang Sabah. Iyo boi binaan oron Ratu Tari Malaysia kerana iyo Muat sembahan kok tenaga vokal yang alap diom penyanyi engkok menari enjata pentas.Iyo pan komposer engkok penulis lirik, iyo pan tekilo jomo sebagai bungo lawa. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] 0mugna9u7mp73g5rpat7mqsj070etys Suang 0 945 4688 4446 2024-08-19T16:18:06Z Umboh Tuhan 194 + Tungan metelak 4688 wikitext text/x-wiki [[Fail:Jiuqu Brook in Wuyi Mountains.jpg|250px|thumb|Suang ta' China]] '''Suang''' iyono seluran [[buek]] tabii yang oyo. Sumber suang buli jadi lekat ta' [[tasik]], moto buek ataupan anak suang. Lekat sumberni, semomon suang duai lekat ta' belud kok pan iyo sara bioso buek uran yang duai ta' deratan untuk mengalir pu' ta' selang ataupan buek betakung yang oyo masam kok tasik. == Tungan metelak == {{Reflist}} [[Kategori:Suang]] savekxmlouoc1g1eq8t27y6vsvsp92c Suap 0 946 3449 3448 2024-08-09T09:28:55Z Jon Harald Søby 58 1 semakan diimportkan 3448 wikitext text/x-wiki Eyo no tungan jomo pesindung atau pan suap tu pinakai tungan temban. 4nca8hds66kp4t04qnr6s3wbpw2f05w Sudai 0 947 4370 3954 2024-08-09T09:43:17Z JhsBot 61 Pywikibot touch edit 4370 wikitext text/x-wiki '''Sudai''' iyo noh barang yang un impon pinakai untuk ngejogo bu tikok supaya lurus kok kemas. Sudai tu tinemu oleh pakar kaji purba yang boi tenemu diom bentuk yang alus lua petempatan tarikh ni 5,000 taun dau muh Parsi. b5sbpxiqkhc9ucgke7endkzpn1mhgys Sudu' 0 948 4371 3458 2024-08-09T09:43:18Z JhsBot 61 Pywikibot touch edit 4371 wikitext text/x-wiki '''Sudu''' iyo noh alat untuk [[mangan]]. Bioso ni pinakai untuk ngendo' makanan-makanan dokon luuk engko pan buli pinakai untuk ngacau bangan ramuan.<ref><nowiki>https://ms.refertimacuan.com/4024486-types-of-spoons-description-and-their-purpose</nowiki></ref> == Tungan metelak == {{Reflist}} fklf9uwsizca8y0m8viefejg0dzx8uf Sukud 0 949 4372 3461 2024-08-09T09:43:18Z JhsBot 61 Pywikibot touch edit 4372 wikitext text/x-wiki Sukud iyono teko entorong, abis. dm3p24zyzbjs7dj9vftbjztlg9vrz91 Suling 0 950 4373 3465 2024-08-09T09:43:19Z JhsBot 61 Pywikibot touch edit 4373 wikitext text/x-wiki Suling tu sejinis alat muzik kekurian Bajau Sama.Suling binuat ngguno sejenis boo' nironon kinan. 3furrbc69bf9w621zisvjcvjav8lsmz Sungkak 0 951 4374 3468 2024-08-09T09:43:19Z JhsBot 61 Pywikibot touch edit 4374 wikitext text/x-wiki '''Sungkak''' iyo no [[mainan tradisi]] Hindu. Kayu sungkak tu boi ni lubang enjata ni.Bioso ni amun jomo main sugkak gai akan makai bigi getah engko guli. b2lf56twao8uzb8v9nchzv4expnc08a Sungkang mangking 0 952 4375 3471 2024-08-09T09:43:20Z JhsBot 61 Pywikibot touch edit 4375 wikitext text/x-wiki Sungkang mangking ma'na ni nyaun ketantuan ni, surang, tebalik 50y3dhaglmw4kp9a85jnpc4elpdaxvy Sungkit 0 953 4376 3474 2024-08-09T09:43:20Z JhsBot 61 Pywikibot touch edit 4376 wikitext text/x-wiki Sungkit ma'na ni sudu' boi benuat makai kulit suka' penakai mangan isi suka'. 8lzxvpwkamvd8pzkowxt1gge6k41fav Sungkud 0 954 4798 4797 2024-08-19T17:38:32Z Umboh Tuhan 194 + Tungan metelak 4798 wikitext text/x-wiki '''Sungkud''' iyono dikaw pekakas pinakay amun lumaan. Sungkud tu penamba kederasan anggota betis antawa pangkat. Sungkud pan pinakay amun jomo nya' tetog lanan ni antawa reso paning. Sungkud tu nironon pan maraw, langkau lebi kurang duo kaki setanga sampai empat kaki, oyo ni dokon indung jari engko' binuat lua ta' kayu, buyai antawa boo'. Kadang-kadang pan sikot pengentanan sungkud pekuleng batang ni. == Tungan metelak == {{Reflist}} ksq4lq2uzx452s91ar6bao5u7a5hzb7 Sutung 0 955 4378 3480 2024-08-09T09:43:21Z JhsBot 61 Pywikibot touch edit 4378 wikitext text/x-wiki Sutung iyono sejinis binatang selang sefalopod diam superorder Decapodiformes yang ben kiro-kiro 300 sepisis. Sutung un dikau bokok kok un wau' lengan engko' duo janggut yang langkau. Diam badan ni un bokok nipis kok langkau yang binuat lekat ta' kitin. enolj3htujxwq8f93snw8605acbc45n Suu 0 956 4791 4788 2024-08-19T17:30:42Z Umboh Tuhan 194 4791 wikitext text/x-wiki '''Suu''' minggo jo been ti un jo suu tu amun songom. Amun nyaun suu tu diom patang no tek kiti bagas ni. Penting bana suu tu engkiti ngai kiti jo semimon kiti dikau dunia tu makai suu amun songom. Inda masam pan jinis suu tu un warna gadung, ngempute un pan bagal, diki un pan sedong2 inda masam tek. == Tungan metelak == {{Reflist}} sheixpo8g9xm8et7fsdtew3hajjn01o Sybil Kathigasu 0 957 4380 3484 2024-08-09T09:43:22Z JhsBot 61 Pywikibot touch edit 4380 wikitext text/x-wiki Sybil Medan Daly atau kineloon oron ni Sybil Kathigasu boi penanakan 3 September 1899. Iyo ai ngemban masa 12 Jun 1948. Iyo tu tekilo sebagai pejuang Tanah Melayu yang nelamat iko nyawa jomo sampai atusan bangso Kina masa Jepun teko tak Tanah Melayu. Jomo Kina tak Malaysia nganggap iyo tu dangan dendo yang atai ni putek. Laan utama muh Ipoh ngena oro ni sepanjang laan. Kerajaan British pan manan Pingat King George sebab jasa boi banan ni. cl2m1hh3hqh08kvq6s6ysncyv86j7il Syurga 0 958 3487 3486 2024-08-09T09:28:58Z Jon Harald Søby 58 2 semakan diimportkan 3486 wikitext text/x-wiki Syurga iyo no dikau konsep luum lapas matai diom iko ugama ko' falsafah rohaniah. Gai pesoyo tentang syurga antawa neraka tungan manusia lapas gai matai. Nuut iko testimoni ko' tradisi,diom kejadian yang luar bioso.Gai ngangap pengetahuan tu binuanan tak gai untuk ngajar manusia tentang keluman. 76k3zrr3kf0f5xr5idh8awt4m5t8zdd Tabung Haji 0 959 4381 3489 2024-08-09T09:43:23Z JhsBot 61 Pywikibot touch edit 4381 wikitext text/x-wiki Tabung Haji (TH) singkatan ni "Lembaga Tabung Haji " antau LTH . TH tekilo "Lembaga Urusan kok Tabung Haji" antau LUTH diom Malaysia yang ngurus luman Jemaah Haji lekat Malaysia Pu Mekkah setiap Tahun.Bangunan Ibu Pejabat TH tekilo sebagai Menara TH Tun Razak, lan Tun Abdul Razak , Kuala Lumpur, Malaysia.TH tu tekilo dembuah Institusi Kewangan yang meluman operasi Haji kok efisyen. oqta5py3ujzv8jdwubpitcb93hrx7m8 Talipaun 0 960 4382 3491 2024-08-09T09:43:23Z JhsBot 61 Pywikibot touch edit 4382 wikitext text/x-wiki Talipaun nantu no guno ti lau lau tungan ti main bangan wassap ngai wassap jo iko bana lagi guno talipaun tu .Wikipedia Bajau Samah tu pan makai talipaun pan kiti nulis ni talipaun tu iko bana guno ni tak kiti mimon amun nyaun talipaun tu nyiak kiti tu engko kito bangan jomo tio. lj0q4whz45r4ooqmsdj711doza8otlv Tana' pilit 0 961 4383 3495 2024-08-09T09:43:24Z JhsBot 61 Pywikibot touch edit 4383 wikitext text/x-wiki Tana pilit sejenis tana macam leboh tapi ikoh kegunaan ni,terutama ni tah industri pembuatan pasu atau objek lain. 0eyuaeaof1bn7yu9udyxjmgq460guy5 Tandasan 0 962 4384 3498 2024-08-09T09:43:24Z JhsBot 61 Pywikibot touch edit 4384 wikitext text/x-wiki Tandasan ma'na ni misin pemuat gula tebu pinusing le' kerabau. 5zrkikth3cfs34oi2qbrte59ip8zxs4 Tanjak Pahlawan 0 963 3500 3499 2024-08-09T09:28:58Z Jon Harald Søby 58 1 semakan diimportkan 3499 wikitext text/x-wiki Eyo no asara binuat jadi mekitoon budaya Bajau Samah tu lua' pakaian badu sama, pinakai ole' barang bujangan pedelaan. Asara tu kakal lagi binuat ngabut betiru dokon tebeta' Tamu Bagal ta' Semio Kota Belud, engko' Festival Duang tak Rumah Kebudayaan Rumpun BajauSama ta' Lok Batik, Tuaran. Asara tu sebana ni mekitoon indah jinis kelapan bengso Bajau Samah sambil ni asara tu suma' buli tinuut oleh bujangan pedelaan bengso Bajau Samah jo. == Rejukan == <references /> https://www.sabahtravel.com/articles/post/visit-the-biggest-market-in-sabah-tamu-besar-kota-belud<nowiki/>https://cj.my/127930/sabah-launches-duang-festival-to-preserve-culture/ 7b4hlvy7cyulu87d2javcizqzyjdjpb Tarap 0 964 4385 3963 2024-08-09T09:43:25Z JhsBot 61 Pywikibot touch edit 4385 wikitext text/x-wiki '''Tarap''' eyo dikau jenis tenomon ben buah.Tarap tu tekilo bana tak negeri sabah.Tenomon tu [[subur]] bana tak negeri sabah j3m76hr50gyvwd89iwq4etd61irvri1 Tarian Limbai 0 965 4448 3507 2024-08-10T02:24:51Z Zahirulnukman 5 update 4448 wikitext text/x-wiki Terian Limbai iyo no sala' dikau tarian tradisional un ta' negeri sabah.Terian tu selalu buli tekito ta' suku kaum bajau samah pantai barat.iyo ta' kota belud. Diom terian tu penari ni makai badu samah ko' alatan dokon tudung duang.Terian Limbai nipersembah masa un majlis-majlis kawin, nambut tetamu, engkok tamu besar.Terian tu niiring le' ling kelintangan jadi bangan penari ni nuut rentak ling a' adi terian gai tekito lawa ko' tesusun niak parak. Terian Limbai tu terua tari le' dikau kumpulan mediam ni un diom 4 atau 6 urang jadi iyo un sepasang dela ko' dendo masa gai menari.Terian tu pan jadi dikau terikan ta moto dunia kerna amun gai ngogo ta' pelancungan akan un jo terian tu nipersembah untuk nambut gai teko. Ta' kuta belud un masa ni akan ni anjurpan pertandingan terian limbai tu untuk anak mura' buli ngito ko' ngejogo pian keaslian terian tu. Terian tu nyiak buli sinarap sarap pasal ni un no rentak ko' cara terian ni. == Tungan metelak == * https://w.wiki/A9nL 39fsgo63rak3gi4vjn7i4b32o9bvetl Tarum 0 966 4386 3511 2024-08-09T09:43:26Z JhsBot 61 Pywikibot touch edit 4386 wikitext text/x-wiki TARUM Tarum tu dikaw tonomon binuat gulay. Bioso ni tarum tu niagad telumbuan bo ni bua.' Bua tarum tu uun langkaw uun pan buntar.Bioso ni rena tarum tu taruk engko' kadang-kadang uun pan kuning engko pute'. Umur tarum tu Bioso ni umur Tarum tu teko pan dentaun lebi^. p9bkyuj3ug2mqkr2ftqshebu3p8ddnm Tasbih 0 967 3514 3513 2024-08-09T09:29:00Z Jon Harald Søby 58 2 semakan diimportkan 3513 wikitext text/x-wiki #REDIRECT [[Tesbi']] cgeu26aftvew9wtzzz4ggbj78yphjuj Tasi' 0 968 4387 3517 2024-08-09T09:43:26Z JhsBot 61 Pywikibot touch edit 4387 wikitext text/x-wiki Tasi' iyono bue' boi pinakay pengeremoson buas. jtrgnf1kjrypwn2sdwo4tn8jupidwcf Tasi' buas 0 969 4388 3520 2024-08-09T09:43:27Z JhsBot 61 Pywikibot touch edit 4388 wikitext text/x-wiki Tasi' buas iyono bue' boi pinakay pengeremoson buas. 6qrkzxyhn4cqamash82anedlfeu17my Taubat 0 970 3522 3521 2024-08-09T09:29:00Z Jon Harald Søby 58 1 semakan diimportkan 3521 wikitext text/x-wiki '''Taubat''' maksud ni jomo yang bana bana maku ampun engko janji ni.Endo iyo niak ngulang yan boi buat ni sebelum tu.Beluang taubat tu untuk sian sian jo niak menek jomo . 7r0lx9zci6ldt89pcbtuzqq1h55uubf Tawap 0 971 4389 3527 2024-08-09T09:43:27Z JhsBot 61 Pywikibot touch edit 4389 wikitext text/x-wiki '''Tawap''' iyo noh perlakuan ngeliling kaabah mempituh. Tawap iyo noh salah dikau perlakuan ibadah binuat oleh jomo '''[[Muslim]]''' kok. Tawap hanya binuat ta' '''[[Masjidil Haram]]''' <ref>https://www.dalil-alhaj.com/my/altawaf_mo.htm</ref> == Tungan metelak == {{Reflist}} cnicyyi1rj0glccosz0by83tii86sih Tebadak 0 972 4390 3538 2024-08-09T09:43:28Z JhsBot 61 Pywikibot touch edit 4390 wikitext text/x-wiki [[Fail:Cempedak whole1.JPG|thumb|Tebadak]] '''Poon Tebadak''' (''Artocarpus integer'') tu merupakan salah satu poon bua'-buaan. Bioso ni tinonom ta' sedi ruma'. Selain tinonom ta' kabun, jomo sama pan selalu nonom poon tuadak ta, sedi ranau ko' sedi laan. ==Guno== Kegunaan utama '''poon tebadak''' tu ialah untuk bua' tebadak. Bua' tebadak mana bule kenakan tarus ko bule pan binuat kuih. pzthtr5w3h19uxo6wqlones0xphv8o5 Tebangkung 0 973 4391 3541 2024-08-09T09:43:28Z JhsBot 61 Pywikibot touch edit 4391 wikitext text/x-wiki Tebangkung iyono jomo antawa binatang ai tepalu. 4fq1qc2cjm2medcqxne1zgsq30vesw4 Tebung tebung 0 974 4392 3544 2024-08-09T09:43:29Z JhsBot 61 Pywikibot touch edit 4392 wikitext text/x-wiki '''Tebung tebung''' ma'na ni mandi sambil belensoton diam suang, lebak antawa regisin. 6ru29w9w37jflbch94lmg0g0kfyhv20 Tehe-Tehe 0 975 4393 3549 2024-08-09T09:43:29Z JhsBot 61 Pywikibot touch edit 4393 wikitext text/x-wiki [[Fail:TEGE-TEHE.jpg|thumb|[[Fail:TEGE-TEHE.jpg|thumb|Tehe-Tehe]]]] Tehe-Tehe iyo no salah satu Jenis Makanan Laut yang tekilo tak kalangan suku Kaum Bajau Pantai Timur [[Sabah Tanah Airku|Sabah]].Tehe-Tehe atau oron lain ni iyo no Indak Laut iko nindok tak diam sekitar Batu karang mediam laut yang paling madiam bana.Iyo amat no berkhasiat engko alap untuk kesihatan.Cara untuk nindo ni amat noh mudah,perlu kindusin Tehe-Tehe selepas dari ae ,pinosok mediam Buas lepas dari ae ni rebus engko buas.Selepas Tehe-Tehe ni rebus atau datai jo, buli no Tehe-Tehe ni hidang untuk kinakan. RUJUKAN http://kitakitapeers.blogspot.com/2017/10/10-makanan-tradisional-kaum-bajau-di.html?m=1 cfs5vjtrmxxousqi1rf8inojap344ks Tekelis 0 976 4394 3966 2024-08-09T09:43:30Z JhsBot 61 Pywikibot touch edit 4394 wikitext text/x-wiki Tekelis ma'na ni tiabisan antawa tebisan. cgzs91kb70roekfvyyveehinhpaovxr Telingo 0 977 4396 3581 2024-08-09T09:43:31Z JhsBot 61 Pywikibot touch edit 4396 wikitext text/x-wiki Telingo iyonoh dikau organ badan yang kulek ngesan ling. Telingo tu guno ni untuk mekaleh amun un jomo moh kiti betutur. 8wpwhe8lbngpbxwxpdl9zlktuphdksu Tembara 0 978 3583 3582 2024-08-09T09:29:04Z Jon Harald Søby 58 1 semakan diimportkan 3582 wikitext text/x-wiki '''Tembara''' iyo noh tungan ningko untuk bangan jomo muaw atau nonong pakai. Sebab tembara tu untuk engero pipit gutywc6hyk4lsz02kv07gv8eddxkkk3 Tembuku 0 979 4397 3586 2024-08-09T09:43:32Z JhsBot 61 Pywikibot touch edit 4397 wikitext text/x-wiki Tembuku ae no barang penumbuku Badu. 47csdft23m9bjhvd9xkle5pytta89pm Tempadung 0 980 4398 3589 2024-08-09T09:43:32Z JhsBot 61 Pywikibot touch edit 4398 wikitext text/x-wiki Tempadung ma'na ni Ongkob, tungan nagu' parai boi binuat makay kulit kayu, wit boo' 8yr6xfpqle7k9aod8h53nwaki3xmfmy Tene' 0 981 4399 3592 2024-08-09T09:43:32Z JhsBot 61 Pywikibot touch edit 4399 wikitext text/x-wiki Tene' ma'na ni sakit lampung jo. nwr7w3hsm1elh722ezx9eyqtmtajeg6 Tenga Bangi 0 982 3594 3593 2024-08-09T09:29:05Z Jon Harald Søby 58 1 semakan diimportkan 3593 wikitext text/x-wiki '''Tenga Bangi''' tanda perubahan lau yang masa ni mula lua jam 12 songom. Asal tenga bangi tu iyo noh lua moto lau petenab engko moto lau pelua yang berubah nut musim. sp70c70mx1u6t1e2byrdly3qlotn9y0 Tengkatai 0 983 4400 3596 2024-08-09T09:43:33Z JhsBot 61 Pywikibot touch edit 4400 wikitext text/x-wiki Tengkatai tu , io pedih amun bungkar dugal , Reso ni dekero tenekon tekon ta tengkatai . 59lxuz8mgkeiakh3c6og2iyj2izipd2 Tengku Ahmad Ismail Mu'adzam shah 0 984 3598 3597 2024-08-09T09:29:05Z Jon Harald Søby 58 1 semakan diimportkan 3597 wikitext text/x-wiki Yang Amat Mulia Tengku Panglima Parang '''Tengku Ahmad Ismail Mu’adzam Shah ibni Al-Sultan Abdullah Ri'ayatuddin Al-Mustafa Billah Shah''' (penenakan 11 September 2000) iyo tu putera ta' Sultan Pahang, Al-Sultan Abdullah Ri’ayatuddin Al Mustafa Billah Shah ko' Tengku Ampuan Pahang, Tunku Hajah Azizah Aminah Maimunah Iskandariah.iyo no pewaris takhta yang ke telu' diom susunan wariasan takhta kerajaan negeri Pahang. po8njcz6dw86mxtytszy2i8u7r683s3 Tenguyung 0 985 4401 3601 2024-08-09T09:43:34Z JhsBot 61 Pywikibot touch edit 4401 wikitext text/x-wiki Tenguyung iyono binatang dokon ruo tebuan kok buani tapi nia' pandai ngejarum. Ngengung ngengung jo sangkan no nironon tenguyung. phbrsuhti555vtoc1t9w8ivqto9bfrf Terenai 0 986 4402 3604 2024-08-09T09:43:35Z JhsBot 61 Pywikibot touch edit 4402 wikitext text/x-wiki Terenai ma'na ni niah pusik, tenang. mpk5gq51ftopatt5lc7tqttag049rkh Tesbi' 0 987 4403 3606 2024-08-09T09:43:35Z JhsBot 61 Pywikibot touch edit 4403 wikitext text/x-wiki lTesbi' iyono dikau tali manik yang boi niingkot entedo untuk pinejadi pengentan tungan jomo bengso Islam kok bongon bengso debagi masam Kristian, Bahai, Hindu, Buddha kok Sikh beribadah. f02mz7ugqipy464booqcgobikq27s0h Thailand 0 988 4450 3612 2024-08-10T02:32:24Z Zahirulnukman 5 Kemasan 4450 wikitext text/x-wiki {{Infobox country|conventional_long_name=Kingdom of Thailand|common_name=Thailand|native_name={{ubl|{{native name|th|ราชอาณาจักรไทย|italics=off}}|{{lang|th-Latn|Ratcha-anachak Thai}}}}|image_flag=Flag of Thailand.svg|image_coat=Garuda Emblem of Thailand.svg|symbol_type=Emblem|national_anthem={{lang|th|เพลงชาติไทย}}<br />{{transliteration|th|[[Thai National Anthem|Phleng Chat Thai]]}}<br />"Thai National Anthem"{{parabr}}{{center|[[Fail:Thai National Anthem - US Navy Band.ogg]]}}|royal_anthem={{lang|th|สรรเสริญพระบารมี}}<br />{{transliteration|th|[[Sansoen Phra Barami]]}}<br />"Glorify His Prestige"{{parabr}}{{center|[[Fail:Thai Royal Anthem - US Navy Band.ogg]]}}|image_map={{Switcher|[[Fail:Thailand (orthographic projection).svg|upright=1.15|frameless]]|Show globe|[[Fail:Location Thailand ASEAN.svg|upright=1.15|frameless]]|Show map of ASEAN|default=1}}|map_caption={{map caption |location_color= green |region= Asia |region_color= grey |subregion= [[ASEAN]] | subregion_color = grey}}|capital=[[Bangkok]]|coordinates={{Coord|13|45|N|100|29|E|region:TH-10_type:city(8,300,000)}}|largest_city=[[Bangkok]]|languages_type=Official language<br /> {{nobold|and national language}}|languages=[[Thai language|Thai]]<ref name="CIA">[https://www.cia.gov/the-world-factbook/countries/thailand/ "Thailand"] {{Webarchive|url=https://web.archive.org/web/20210610164345/https://www.cia.gov/the-world-factbook/countries/thailand/ |date=10 June 2021 }}, ''The World Factbook''.</ref><!--Thai is the official language. English is a non-official secondary language.-->|languages2_type=Spoken languages|languages2=[[Central Thai language|Thai]], [[Isan language|Isan]], [[Northern Thai language|Lanna]], [[Southern Thai language|Dambro]], [[Karenic languages|Karen]], [[Kelantan-Pattani Malay|Pattani Malay]], [[Bangkok Malay]], [[Teochew dialect|Teochew]], [[Hokkien]]|ethnic_groups={{tree list}} *80% [[Thai people|Thai]] **37% Thai (Central Thai) **25% [[Isan people|Thai Lao (Northeastern Thai)]] **8% [[Northern Thai people|Lanna (Northern Thai)]] **8% [[Southern Thai language|Dambro (Southern Thai)]] **2% (Western Thai) * 10% [[Thai Chinese]] * 3% [[Khmer people|Khmer]] * 7% [[Thai Malays|Malays]] {{tree list/end}}|ethnic_groups_ref=|ethnic_groups_year=|religion={{tree list}} *90% [[Buddhism in Thailand|Buddhism]] *4% [[Islam in Thailand|Islam]] *3% [[Christianity in Thailand|Christianity]] *1% [[Irreligion|no religion]] *1% undeclared {{tree list/end}}|religion_ref=<ref>{{Cite web |date=May 2023 |title=Global Religion – Religious Beliefs Across the World |url=https://www.ipsos.com/sites/default/files/ct/news/documents/2023-05/Ipsos%20Global%20Advisor%20-%20Religion%202023%20Report%20-%2026%20countries.pdf |access-date=23 August 2023 |website=Ipsos}}</ref>|religion_year=2023|demonym=[[Thai identity card|Thai]]|government_type=Unitary [[parliamentary constitutional monarchy]]|leader_title1=[[Monarchy of Thailand|Monarch]]|leader_name1=[[Vajiralongkorn]] <br>(Rama X)|leader_title2=[[Prime Minister of Thailand|Prime Minister]]|leader_name2=[[Srettha Thavisin]]|legislature=[[National Assembly of Thailand|National Assembly]]|upper_house=[[Senate of Thailand|Senate]]|lower_house=[[House of Representatives (Thailand)|House of Representatives]]|sovereignty_type=[[History of Thailand|Formation]]|established_event1=[[Sukhothai Kingdom]]|established_date1=1238–1448|established_event2=[[Ayutthaya Kingdom]]|established_date2=1351–1767|established_event3=[[Thonburi Kingdom]]|established_date3=1767–1782|established_event4=[[Rattanakosin Kingdom]]|established_date4=6 April 1782|established_event5={{nowrap|[[Siamese revolution of 1932|Constitutional monarchy]]}}|established_date5=24 June 1932|established_event6={{nowrap|[[Constitution of Thailand|Current constitution]]}}|established_date6=6 April 2017|area_km2=513,120|area_rank=50th|area_sq_mi=198,115 <!--Do not remove per [[WP:Manual of Style/Dates and numbers]]-->|percent_water={{nowrap|0.4 (2,230 km{{smallsup|2}})}}|population_estimate={{IncreaseNeutral}} 69,648,117<ref>{{Cite CIA World Factbook|country=Thailand|access-date=24 September 2022}}</ref>|population_estimate_year=2022|population_estimate_rank=20th|population_census=64,785,909<ref>{{in lang|th}} National Statistics Office, [http://popcensus.nso.go.th/doc/8-thailand%20census.doc "100th anniversary of population censuses in Thailand: Population and housing census 2010: 11th census of Thailand"] {{webarchive |url=https://web.archive.org/web/20120712002347/http://popcensus.nso.go.th/doc/8-thailand%20census.doc |date=12 July 2012}}. popcensus.nso.go.th.</ref>|population_census_year=2010|population_census_rank=21st|population_density_km2=132.1|population_density_sq_mi=342 <!--Do remove per [[WP:Manual of Style/Dates and numbers]]-->|population_density_rank=88th|GDP_PPP={{increase}} $1.578 trillion<ref name="IMF 2023">{{Cite web |date=10 October 2023 |title=World Economic Outlook Database, October 2023 Edition. (Thailand) |url=https://www.imf.org/en/Publications/WEO/weo-database/2023/October/weo-report?c=578,&s=NGDPD,PPPGDP,NGDPDPC,PPPPC,&sy=2020&ey=2028&ssm=0&scsm=1&scc=0&ssd=1&ssc=0&sic=0&sort=country&ds=.&br=1 |access-date=11 October 2023 |website=IMF.org |publisher=[[International Monetary Fund]]}}</ref>|GDP_PPP_year=2023|GDP_PPP_rank=23rd|GDP_PPP_per_capita={{increase}} $22,490<ref name="IMF 2023" />|GDP_PPP_per_capita_rank=74th|GDP_nominal={{increase}} $512.193 billion<ref name="IMF 2023" />|GDP_nominal_year=2023|GDP_nominal_rank=30th|GDP_nominal_per_capita={{increase}} $7,297<ref name="IMF 2023" />|GDP_nominal_per_capita_rank=91st|Gini=35.1 <!--number only-->|Gini_year=2021|Gini_change=increase <!--increase/decrease/steady-->|Gini_ref=<ref>{{Cite web |title=Gini Index |url=https://data.worldbank.org/indicator/SI.POV.GINI/ |url-status=live |archive-url=https://web.archive.org/web/20180727172441/https://data.worldbank.org/indicator/SI.POV.GINI |archive-date=27 July 2018 |access-date=12 August 2021 |publisher=World Bank}}</ref>|HDI=0.800 <!--number only-->|HDI_year=2021<!-- Please use the year to which the data refers, not the publication year-->|HDI_change=decrease<!--increase/decrease/steady-->|HDI_ref=<ref>{{Cite web |date=8 September 2022 |title=Human Development Report 2021/2022 |url=https://hdr.undp.org/system/files/documents/global-report-document/hdr2021-22pdf_1.pdf |url-status=live |archive-url=https://web.archive.org/web/20220908114232/http://hdr.undp.org/system/files/documents/global-report-document/hdr2021-22pdf_1.pdf |archive-date=8 September 2022 |access-date=8 September 2022 |publisher=[[United Nations Development Programme]] |language=en}}</ref>|HDI_rank=66th|currency=[[Thai baht]] (฿)|currency_code=THB|time_zone=[[UTC+07:00|ICT]]|utc_offset=+7|date_format=dd/mm/yyyy ([[Thai solar calendar|BE<!--Buddhist Era-->]])|drives_on=left|calling_code=[[Telephone numbers in Thailand|+66]]|cctld={{hlist |[[.th]] |[[.ไทย]]}}}} '''Thailand''' atau nama rasminya '''Kerajaan Thai''' adalah sebuah negara di rantau [[Asia Tenggara]]. Thailand bersempadan dengan [[Myanmar]] di barat laut, [[Laos]] dan [[Kemboja]] di timur, [[Teluk Thailand]] dan [[Malaysia]] di selatan, dan [[:ms:Laut_Andaman|Laut Andaman]] di barat. Sempadan lautnya termasuk [[Vietnam]] di tenggara dalam Teluk Thailand, dan [[Indonesia]] dan [[India]] di barat daya dalam Laut Andaman. Ibu negara dan bandar terbesarnya [[Bangkok]].<ref>https://www.worldometers.info/demographics/thailand-demographics/</ref><ref>https://www.worldatlas.com/articles/biggest-cities-in-thailand.html</ref><ref>https://www.nationsonline.org/oneworld/map/thailand-region-map.htm</ref> Dengan kira-kira 69 juta orang, Thailand merupakan negara ke-20 paling ramai penduduk di dunia. == Geografi == [[Fail:Nan_z_doi_phuka_2006_1003.jpg|left|thumb|Pemandangan Banjaran Luang Prabang Range yang merentangi sempadan Thai-Lao di [[:ms:Nan_(wilayah)|Wilayah Nan]], [[Utara Thailand]]]] [[Fail:Thailand_06_-_40_Railay_(158632937).jpg|right|thumb|Pulau batu kapur tipikal di Thailand]] [[Fail:Isla_Phi_Phi_Lay,_Tailandia,_2013-08-19,_DD_04.JPG|right|thumb|Kepulauan Phi Phi]] Dengan jumlah keluasan 513,120 km², Thailand merupakan [[:ms:Senarai_negara_mengikut_keluasan|negara ke-50th terbesar]] dari segi keluasan, sedikit kecil sedikit [[:ms:Yaman|Yaman]] dan sedikit besar daripada [[:ms:Sepanyol|Sepanyol]]. Thailand terdiri daripada pelbagai rantau geografi yang sedikit sebanyak berpadanan dengan pembahagian wilayah. Rantau utara merupakan kawasan tanah tinggi Thai, dengan puncak tertinggi di Doi Inthanon di Banjaran Thanon Thong Chai pada 2,565 meter [[:ms:Atas_min_aras_laut|di atas paras laut]]. Rantau timur laut atau Isan terdiri daripada Banjaran Khorat Plateau yang bersebelahan dengan [[:ms:Sungai_Mekong|Sungai Mekong]] di timur. Rantau tengah negara dikuasai oleh lembah rata [[:ms:Sungai_Chao_Phraya|Sungai Chao Phraya]] yang mengalir hingga [[:ms:Teluk_Thailand|Teluk Thailand]]. Thailand Selatan terdiri daripada [[:ms:Segenting_Kra|Segenting Kra]] yang sempit tetapi melebar hingga [[:ms:Tanah_Melayu|Semenanjung Tanah Melayu]]. Secara politik, terdapat enam kawasan geografi yang berbeza dengan satu sama lain dari segi populasi, sumber asas, ciri-ciri alam, dan tahap pembangunan sosial dan ekonomi. Kepelbagaian rantau-rantau merupakan ciri latar fizikal yang paling menonjol di Thailand. Sungai Chao Phraya dan Mekong River merupakan nadi kehidupan kawasan luar bandar Thailand. Pengeluaran tanaman secara industri menggunakan kedua-dua sungai tersebut serta cawang-cawangnya. Teluk Thailand luasnya 320,000 kilometer persegi dan disuap oleh sungai-sungai Chao Phraya, Mae Klong, Bang Pakong, dan Tapi. Air yang cetek di sepanjang pinggir-pinggir selatan dan Semenanjung Kra menyumbang kepada sektor pelancongan. Pesisir timur Teluk Thailand merupakan pusat perindustrian Thailand dengan pelabuhan air utama negara di Sattahip pelabuhan perdagangan yang tersibukk, Laem Chabang. [[:ms:Laut_Andaman|Laut Andaman]] merupakan sumber alam berharga dengan bertempatnya antara pusat peranginan paling popular dan mewah di Asia. Wilayah [[:ms:Phuket|Phuket]], Krabi, Ranong, Phang Nga dan [[:ms:Trang|Trang]], dan pulau-pulaunya semua terletak di sepanjang pesisir Laut Andaman. Biarpun dilanda [[:ms:Gempa_bumi_dan_tsunami_Lautan_Hindi_2004|tsunami 2004]], semuanya merupakan tarikan pelancong dari seluruh dunia. Bangkitnya usul untuk [[:ms:Terusan_Kra|sebuah terusan]] yang dijangka dapat menghubungkan Laut Andaman dengan Teluk Thailand, seumpama Terusan [[:ms:Terusan_Suez|Suez]] dan [[:ms:Terusan_Panama|Panama]]. Usul ini disambut baik oleh pembesar Thai kerana ini boleh mengurangkan yuran yang dikenakan oleh [[:ms:Pelabuhan_Singapura|Pelabuhan Singapura]], mengeratkan hubungan dengan China dan India, menyingkatkan perjalanan kapal, dan menghapuskan ancaman lanun di [[:ms:Selat_Melaka|Selat Melaka]], di samping menyokong dasar kerajaan Thai untuk menjadi hab logistik Asia Tenggara. Didakwa bahawa terusan ini akan memperbaiki keadaan ekonomi di Thailand selatan yang amat bergantung rezeki pada pelancongan. Jika dijalankan, terusan ini akan menjadi projek kejuruteraan raya dengan jangkaan belanja AS$20–30 bilion. == Tungan metelak == <references /> knmh7nbedb0jk9wywhglc7q0u4xd4fd Tigam 0 989 3633 3632 2024-08-09T09:29:09Z Jon Harald Søby 58 20 semakan diimportkan 3632 wikitext text/x-wiki '''Tigam''' iyono sejinis binatang yang ben kerang kok kulit ni pepen. Isi ni un kalori yang tena' kok isi ni un kalsium kok vitamin A. Tigam pan rojo tekilo kerna iyo melua asil mutiara semulajadi. Oron umum '''tigam''' tu ginuno untuk kumpulan mollusk dwicangkerang debagi, yang kikon ni temban ta' abitat selang kok bue' payau. Kulit meluar ni tu un duo bagian ben kalsium yang ngeliling isi ni yang lema'. Ingsang napis plankton lekat ta' bue' kok otot adukor ginuno supaya kerangka taan amun tutup. fmpor1f1byfbxweegzy1ez90806539j Timpa 0 990 4405 3637 2024-08-09T09:43:38Z JhsBot 61 Pywikibot touch edit 4405 wikitext text/x-wiki '''Timpa''' iyo no langit-langit atau permukaan bahagia enjata diom dembua bilik spo3hk85gfi35e8iv4trc753mrtykxx Timung 0 991 3641 3640 2024-08-09T09:29:09Z Jon Harald Søby 58 3 semakan diimportkan 3640 wikitext text/x-wiki '''Lokan''' (''Polymesoda expansa'') adalah sejenis moluska dwicangkerang yang banyak terdapat di lumpur pinggir laut. Lokan adalah sejenis haiwan bercengkerang (kerang-kerangan) yang boleh dimakan dan sangat enak Timung iyono sejinis binatang yang nyaun bokok. o65zp3afirbhtbqa0c8alxu97lk2sqn Timung ampun kulit, kuang kule' oron 0 992 4406 3644 2024-08-09T09:43:39Z JhsBot 61 Pywikibot touch edit 4406 wikitext text/x-wiki Timung ampun kulit, kuang kule' oron iyono perembaan Sama ma'na ni, jomo lain ampun kerejoon antawa pikiran, iyo kule' oron. t1nbmmhxtp1muuysjyfpg0ngzo5udnb Timus 0 993 4407 3647 2024-08-09T09:43:39Z JhsBot 61 Pywikibot touch edit 4407 wikitext text/x-wiki '''Timus''' iyo noh tekilo sebagai Wp/bdr timus mangan atau timus batu, iyo sejenis galian natrium klorida. Timus tu penting untuk hidupan manusia ko' haiwan diom kuantiti diki. b8844wxpt2bplqagov8cxxvgkslqdc5 Tinondos 0 994 4408 3650 2024-08-09T09:43:39Z JhsBot 61 Pywikibot touch edit 4408 wikitext text/x-wiki Tinondos ma'na ni terua' tudu 1x6pacrxjuogmgsbrugpbe6a79e5d3x Tinungkus 0 995 4409 3653 2024-08-09T09:43:40Z JhsBot 61 Pywikibot touch edit 4409 wikitext text/x-wiki Tinungkus iyono jenaja boi no binungkus kok olos rena pute'. jmjzw4ezhahm4ls3xexu3qodge8rlcd Tipo serisir 0 996 4410 3658 2024-08-09T09:43:40Z JhsBot 61 Pywikibot touch edit 4410 wikitext text/x-wiki '''Tipo serisir''' tu tipo boi kinulitan ko' olos inda-inda rena ni. Serisir tu olos boi nirait sinambung-sambung nuut pata' rebung bo' ngerait ni sedi tipo boi kinulitan e. Tipo Serisir guno ni binuat lemba' ruma' amun uun keramaian ngko' binuat pelamin. Bioso ni tipo serisir tu tungan pengantin ningkoo'. Tipo serisir tu hasil kraf Bajau Sama. 6c47g43cb3ikhpde3r2hun8mz8p9g6l Tiris 0 997 4411 3661 2024-08-09T09:43:41Z JhsBot 61 Pywikibot touch edit 4411 wikitext text/x-wiki Tiris ma'na ni turunan antawa keturunan 1e5ubzopvik7tjt98n9s4rfcxz2yj8h Tojok temboro'. 0 998 4412 3664 2024-08-09T09:43:41Z JhsBot 61 Pywikibot touch edit 4412 wikitext text/x-wiki Tojok Temboro' iyono perembaan Sama ma'na ni yo ampun songot, tonomon ni. bdleybl98g6ehiafs3rspfb1jx2r5v0 Tojok tomboro 0 999 3666 3665 2024-08-09T09:29:11Z Jon Harald Søby 58 1 semakan diimportkan 3665 wikitext text/x-wiki '''Tojok tomboro''' iyo no hasil tonomon ti 5x8oaxjk6ci5frqdko19pidcsvgxnip Toos 0 1000 4413 3673 2024-08-09T09:43:42Z JhsBot 61 Pywikibot touch edit 4413 wikitext text/x-wiki '''Toos''' tu dadah atau pan bahan yang nindo untuk ngala' sakit. Toos terdiri dari iko jenis untuk ngala' masam-masam jenis [[penyakit]]. Secara umum ni toos binagi kepada duo iyo no: # Nyaun preskripsi: toos bineli ta' farmasi atau mediam kadai yang nyaun sebarang halangan. # Engko preskripsi: toos yang sinok kinakan oleh duktur untuk pesakit tertentu jo.<ref>https://www.pharmacy.gov.my/v2/ms/soalan-lazim/apakah-maksud-ubat-terkawal-ubat-am.html</ref> == Tungan metelak == {{Reflist}} ba3ckrnjym3sqnrv8fjmcj9eggg54zm Toos turi 0 1001 4414 3676 2024-08-09T09:43:42Z JhsBot 61 Pywikibot touch edit 4414 wikitext text/x-wiki '''toos turi''' guno ni untuk [[Wpr Meturi|meturi]] jomo contoh ni amun jomo niak teko turi buli nginum toos tu. mrbtn1oeipzpxz5dsdbipzo59qhyqze Topi songkok 0 1002 4415 3678 2024-08-09T09:43:43Z JhsBot 61 Pywikibot touch edit 4415 wikitext text/x-wiki Tupi sungku tu sejenis tupi tradisional jomo sama. Tupi sungku pinakai untuk ngelengkap badu sama ngadir majlis. 16puwgbpg9mcyy0ytse8dx6z7ee9qd8 Tuaran 0 1003 4416 3684 2024-08-09T09:43:43Z JhsBot 61 Pywikibot touch edit 4416 wikitext text/x-wiki '''Tuaran''' iyo sebuo pekan bagal serupo sebuo daerah ta' Pantai Barat, Barat Laut Sabah. Malaysia ta' Pulau Borneo. 89xzve61cgwskuk6ny8f30vta6axtsn Tudung 0 1004 4417 3686 2024-08-09T09:43:44Z JhsBot 61 Pywikibot touch edit 4417 wikitext text/x-wiki Tudung pinakai untuk nutup bagian tikok endo nutup aurat. Tudung pinakai oleh dendo jo kerna aurat dendo semimon anggota badan kesuali permukaan mo kok pergelangan tangan eeesc5zsqpeants3iidg7vkq9b0oj91 Tudung Duang 0 1005 3688 3687 2024-08-09T09:29:13Z Jon Harald Søby 58 1 semakan diimportkan 3687 wikitext text/x-wiki #REDIRECT [[Tudung duang]] 4idd4rl9zflv91pxldpdqjtf8l6mqij Tudung duang 0 1006 4418 3707 2024-08-09T09:43:44Z JhsBot 61 Pywikibot touch edit 4418 wikitext text/x-wiki [[Fail:Tudung duang.jpg|thumb|Tudung duang]] [[Fail:Indonesian dining table and dish cover.jpg|thumb|Tudung duang]] '''Tudung duang''' @ Tudung Saji (Bahasa Melayu) yo nu dekau' pekakasan yang bioso ni tetemu ti ta' rumah jomo Sama. ==Guno== Tudung Duang tu bioso ni penakay le' jomo Sama untuk nongkob barang makanan. Diom jaman moden tu, ruun pan Tudung Duang benuat perhiasan. ==Bahan ko' sara muat tudung duang== Bioso ni Tudung duang tu asal ni benuat lekat' ta' duun pandan. Duun pandan kenerot nuut sais yang dikehendaki. Lupus a, duun pandan penosok ta' diom bue, panas ( 100°C ) diom masa dejaam. Kemudian duun pandan a penuyan ta' dia' motoelau sampai keroi. ==Ringkasan== Tudung duang @ Tudung saji ( Bahasa Melayu ) kakal lagi penakay oleh jomo Sama sampai betiru, terutama ni jomo Sama ta' Daerah Kota Belud, Daerah Kudat, Daerah Kota Marudu, Daerah Pitas, Daerah Tuaran, Daerah Tanparuli, Daerah Kota Kinabalu, Daerah Papar ko lain-lain ta' Negeri Sabah. ==Rujukan== # Kamus Asas Bajau Sama (Bajau Sama-Malay- English, Edisi Pertama). 2016 # http://prpm.dbp.gov.my/Cari1?keyword=Tudung+duang&d=28648&#LIHATSINI e885lt7j8pd3wc75it5dp4968lucnch Tuhan 0 1007 4419 3710 2024-08-09T09:43:44Z JhsBot 61 Pywikibot touch edit 4419 wikitext text/x-wiki Tuhan tu beja daripada Allah,Tuhan kebanyakan ni makhluk.Semimon diom dunia tu makhluk/ciptaan kecuali Allah SWA/Maha Pencipta. 1ke98p3m1ovejhxei2rs4hfbcb8vxt4 Tukan 0 1008 4420 3713 2024-08-09T09:43:45Z JhsBot 61 Pywikibot touch edit 4420 wikitext text/x-wiki Tukan iyono remoson dediki'. 8ynnjke6o8ra926dkroyl3uefapbitk Tun Dr Siti Hasmah binti Haji Mohamad Ali 0 1009 3715 3714 2024-08-09T09:29:15Z Jon Harald Søby 58 1 semakan diimportkan 3714 wikitext text/x-wiki #REDIRECT [[Siti Hasmah Mohamad Ali]] 47uy94h79k5t355853rybfagd24hbrs Tun Fatimah Binti Haji Hashim 0 1010 3717 3716 2024-08-09T09:29:15Z Jon Harald Søby 58 1 semakan diimportkan 3716 wikitext text/x-wiki #REDIRECT [[Fatimah Hashim]] 0ik9au70vg2z9x4k5ikh3w4qw1qrb4x Tung sampa 0 1011 4421 3719 2024-08-09T09:43:45Z JhsBot 61 Pywikibot touch edit 4421 wikitext text/x-wiki Tung sampa tungan ti niman bangan sampa.Tung sampa tu boi binuat luak pelistik engko logam.Mingo jo bean ti tung sampa tu un jo.Suntu ni tak semio amun nyaun tung sampa kama no semio ti inda masam buan ni. s5lduuu6hnjcgkcjf79nsmmfv4b7nrq Tungan ningko 0 1012 4422 3721 2024-08-09T09:43:46Z JhsBot 61 Pywikibot touch edit 4422 wikitext text/x-wiki Tung ningko iyono tungan untuk ningko. Istilah ni tu buli nirangkum kok siri tambaan seperti tungan nandaran tangan atau embukut kok pan tungan nandar tikok. 66ac5j1c0u690irbhw4ng30l2s9sid2 Tungku Tun Aminah Maimunah Iskandariah 0 1013 3727 3726 2024-08-09T09:29:16Z Jon Harald Søby 58 5 semakan diimportkan 3726 wikitext text/x-wiki Yang Amat Mulia Tunku Tun Aminah Maimunah Iskandariah Binti Sultan Ibrahim.(penenakan 8 April 1986 ta' Johor Bahru,Johor).Iyo tu anak numbur duo ko' iyo jo anak dendangan dendo ta' pasangan DYMM Sultan Johor Sultan Ibrahim ibni Almarhum Sultan Iskandar ko' DYMM Permaisuri Johor Raja Zarith Sofiah Binti Almarhum Sultan Idris Shah.Iyo un enam urang dik-berdik ko' lebih tekilo moko' gelaran "Tunku Inah". ce7jfzk3x0yyt1vnd7qjv3ongbkjk5x Tungkus 0 1014 4423 3730 2024-08-09T09:43:46Z JhsBot 61 Pywikibot touch edit 4423 wikitext text/x-wiki Tungkus iyono semek rena pute' pemungkus jomo ngemban. gtoddnija0m3dqg24spenc98t8tvce5 Tunku Abdul Rahman 0 1015 4651 4452 2024-08-18T07:02:07Z Umboh Tuhan 194 + Tungan metelak 4651 wikitext text/x-wiki {{Infobox Prime Minister | honorific-prefix = [[Rujukan kehormat#Yang Teramat Mulia|Yang Teramat Mulia]] | name = Tunku Abdul Rahman | honorific-suffix = {{small|[[Darjah Utama Seri Mahkota Negara|DMN]]; DK ([[Kedah]]); DK (I) ([[Johor]]); DK ([[Kelantan]]); DK ([[Perlis]]); DK ([[Selangor]]); DK ([[Terengganu]]); DUNM ([[Melaka]]); SPMS ([[Selangor]]); DK ([[Brunei]]); AC ([[Australia]]); CH ([[United Kingdom]]); SPMB ([[Brunei]])}} | native_name = {{lang|ms|{{Script|Arab|تونكو عبد الرحمن}}}} | image = Tunku Abdul Rahman 1960.jpg | image_size = |office = [[Perdana Menteri Malaysia]] | title = Digelar sebagai<br />{{nobold|Bapa Kemerdekaan / Bapa Malaysia<br />{{lang|ms|{{Script|Arab|باڤ مليسيا / باڤ کمرديکا{{ء|4.5}}ن}}}}}} | monarch ={{Flagicon image|Flag of the Supreme Head of Malaysia.svg}} {{Flagicon|Negeri Sembilan}} [[Tuanku Abdul Rahman]] (1957-1960)<br />{{Flagicon image|Flag of the Supreme Head of Malaysia.svg}} {{Flagicon|Selangor}} [[Sultan Hisamuddin Alam Shah]] (1960-1960)<br />{{Flagicon image|Flag of the Supreme Head of Malaysia.svg}} {{Flagicon|Perlis}} [[Tuanku Syed Putra Jamalullail]] (1960-1965)<br />{{Flagicon image|Flag of the Supreme Head of Malaysia.svg}} {{Flagicon|Terengganu}} [[Sultan Ismail Nasiruddin Shah ibni Almarhum Sultan Zainal Abidin|Sultan Ismail Nasiruddin Shah]] (1965-1970)<br />{{Flagicon image|Flag of the Supreme Head of Malaysia.svg}} {{Flagicon|Kedah}} [[Sultan Abdul Halim Mu’adzam Shah|Sultan Abdul Halim Muadzam Shah]] (1970-1975) | deputy = [[Abdul Razak Hussein|Tun Abdul Razak Hussein]] (1957-1970) | term_start = 31 Ogos 1957 | term_end = 22 September 1970 | predecessor = Pejabat ditubuhkan | successor = {{logo kecil BN}}{{logo kecil UMNO}} [[Abdul Razak Hussein|Tun Abdul Razak Hussein]] | office2 = Menteri Hal Ehwal Dalam Negeri Persekutuan Tanah Melayu | term_start2 = 1 Ogos 1955 | term_end2 = 28 Ogos 1957 | predecessor2 = ''Jawatan diwujudkan'' | successor2 = [[Suleiman Abdul Rahman|Dato' Suleiman Abdul Rahman]] | office3 = Menteri Luar Negeri Tanah Melayu | term_start3 = 31 Ogos 1957 | term_end3 = 1970 | predecessor3 = ''Jawatan diwujudkan'' | successor3 = | monarch3 = |office5 = [[Ahli Majlis Perundangan Persekutuan Tanah Melayu|Ahli Majlis Perundangan<br>Persekutuan Tanah Melayu]] |constituency5 = Sungei Muda |term_start5 = 1955 |term_end5 = 1959 |office6={{logo kecil UMNO}} [[Presiden UMNO]] | predecessor6 = [[Onn Jaafar]] | successor6 = Tun Abdul Razak Hussein | birth_name = Tunku Abdul Rahman Putra Al-Haj ibni Sultan Abdul Hamid Halim Shah | birth_date = {{birth date|1903|2|8|df=yes}} | birth_place = Istana Tia Tangga, [[Alor Setar]], [[Kedah]], [[Negeri-negeri Melayu Tidak Bersekutu]], [[Siam]] (kini [[Malaysia]]) | death_cause = Sakit Tenat | death_date = {{death date and age|1990|12|6|1903|2|8|df=yes}} | death_place = [[Hospital Kuala Lumpur]], [[Kuala Lumpur]], [[Malaysia]] | body_discovered = | resting_place = [[Makam Diraja Langgar, Alor Setar|Makam Diraja Langgar]], [[Alor Setar]], [[Kedah]] | resting_place_coordinates = | residence = | nationality = [[Orang Melayu Malaysia|Melayu]] | citizenship = [[Malaysia]] | party = {{logo kecil UMNO}} [[UMNO]] (1957-1990) | otherparty = {{Perikatan}} (1957-1973)<br>{{BN}} (1973-1990) | spouse = {{List collapsed |title= Lihat senarai |1= {{marriage|[[Mariam|Meriam Chong]]|1933|1935|end=died}} <br /> {{marriage|[[Violet Coulson]]|1935|1946|end=divorced}} <br /> {{marriage|[[Sharifah Rodziah Syed Alwi Barakbah]]|1939|2000|end=died}} <br /> {{marriage|Bibi Chong|1963|}} }} | children = {{List collapsed |title= Lihat senarai |1= Tunku Dato’ Sri Ahmad Nerang Putra bin Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Tunku Dato’ Paduka Khadijah binti Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Tunku Puan Sri Dato’ Noor Hayati binti Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Tunku Mastura binti Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Sulaiman bin Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Hajah Tunku Mariam binti Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj <br /> Faridah binti Tunku ‘Abdu’l Rahman Sayyid Putra Al-Haj }} | parents = [[Sultan Abdul Hamid Halim Shah]] (Ayahanda) <br /> [[Cik Menyelara]] (Bonda) | relatives = {{List collapsed |title= Lihat senarai |1= Tunku ‘Abdu’llah ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Ibrahim ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Zainal-Rashid ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Ahmad Taj ud-din ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Mansur ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Muhammad ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> [[Tunku Yusuf ibni Sultan Abdul Hamid]] (Kekanda Kandung) <br /> [[Sultan Badlishah ibni Sultan Abdul Hamid]] (Kekanda Tiri) <br /> Tunku Kasim ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku ‘Abdu’llah Thani ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Muhammad Jiwa ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Muhammad Jiwa ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Yakub ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Muhammad Akil bin al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku ‘Abdu’l Jalil bin al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Yahya ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku ‘Abdu’l Majid ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku Zainal-Abidin Thani ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku Muhammad Shu’ib ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku Muhammad Said ibni al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Kandung) <br /> Tunku Putri binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Ruqaiya binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Zamzam binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Ruqaiya binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Zohra [Sahara] binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Fatima binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Kalsum binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Kandung) <br /> Tunku Nur binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Hindun [Don] binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Daria binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Sofiah binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Jahara binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Hajar binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Kekanda Tiri) <br /> Tunku Baharum binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Kandung) <br /> Datin Tunku Amina binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Kandung) <br /> Tunku Bilqis binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku Zakiya binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) <br /> Tunku Toh Puan Habshah binti al-Marhum Sultan ‘Abdu’l Hamid Halim Shah (Adinda Tiri) }} | relations = | family = | education = Ijazah Undang-Undang | alma_mater = Kolej St Catharine [[Universiti Cambridge]], [[Inner Temple]] | signature = Tunku Abdul Rahman Putra al-haj signature.svg | signature_size = | website = | footnotes = | occupation = [[Menteri]] | profession = [[Ahli politik|Ahli Politik]], [[Peguam]] |}} '''Tunku Abdul Rahman Putra Al-Haj ibni Almarhum Sultan Abdul Hamid Halim Shah''' (8 Februari 1903 – 6 Disember 1990) merupakan Ketua Menteri [[Persekutuan Tanah Melayu]] dari 1955, dan [[Perdana Menteri Malaysia|Perdana Menteri]] pertama sejak [[kemerdekaan]] pada tahun 1957 sehingga 1970. Pembentukan [[Malaysia]] pada tahun 1963 merupakan salah satu daripada pencapaiannya yang teragung. Biasanya dikenali sebagai "Tunku", beliau juga dikenang sebagai "Bapa Kemerdekaan" dan "Bapa Malaysia".<ref>{{cite news|title=Royal Kedah Malaysia|url=http://www.royalark.net/Malaysia/kedah7.htm}}</ref><ref> {{cite news |last=The New York Times |date=7 December 1990 |title=Tunku Abdul Rahman, 87, Dead; First Prime Minister of Malaysia |work=[[New York Times]] |url=https://www.nytimes.com/1990/12/07/obituaries/tunku-abdul-rahman-87-dead-first-prime-minister-of-malaysia.html |accessdate=25 June 2015 |archive-url=https://web.archive.org/web/20231116045414/https://www.nytimes.com/1990/12/07/obituaries/tunku-abdul-rahman-87-dead-first-prime-minister-of-malaysia.html |archive-date=16 November 2023}}</ref><ref>{{cite book|last1=Cheah|first1=Boon Kheng|title=Malaysia: The Making of a Nation|date=2002|publisher=Institute of Southeast Asian Studies|location=Singapore|isbn=9812301542|pages=109–110|chapter=The Tunku as "Founding Father of the Nation"}}</ref> == Tungan metelak == {{Reflist}} 6rbyzg1lywnjmiwlhnn3hasb6mtp8p7 Tunku Azizah Aminah Maimunah Iskandariah 0 1016 4424 3742 2024-08-09T09:43:48Z JhsBot 61 Pywikibot touch edit 4424 wikitext text/x-wiki Tunku Hajah Azizah Aminah Maimunah Iskandariah binti Almarhum Al-Mutawakkil Alallah Sultan Iskandar Al-Haj (boi pinenakan sebagai puteri pada 5 ogos 1960) iyo no Rojo Permaisuri Agong ke-16 kok Tengku Ampuan Pahang ke-5. Baginda tu no permaisuri Al-Sultan Abdullah ibni Sultan Ahmad Shah. ibk4qhfn8z3mtfoazl81c2ilnpe62dk Umrah 0 1017 4425 3744 2024-08-09T09:43:48Z JhsBot 61 Pywikibot touch edit 4425 wikitext text/x-wiki Umrah ionoh ngelawat Baitullah mu Makkah kok muat ihram, tawaf, sa’i kok bertahallul nut tertib. Umrah iyo noh pardhu dokon Haji. Itu pendapat lua al-Imam as-Syafie r.a. yang al-Azhad. Imjak Ulama mara io wajib binuat cuma entedo jo sepanjang hayat untuk jomo yang mampu kesuali bagi jomo yang boi najar, gai mesti muat ni. f0dxmd0ivlicxc0ese9d6nb53k0ie16 Unduk Ngadau 0 1018 4426 3746 2024-08-09T09:43:48Z JhsBot 61 Pywikibot touch edit 4426 wikitext text/x-wiki Unduk Ngadau ngerujuk ta' ruh Huminodun. Unduk Ngadau asal ni lekat ta' peketaan "tunduk tadau" atau “runduk tadau”, meksud ni iyono " dendo yang boi terua mahkota lek moto elau" Binara pan, lapas jo Huminodun boi pinepatai lek Kinoingan lapas pitu bangi Unduk Ngadau, iyo pinesoyo jadi jelmaan ruh Huminodun. Unduk Ngadau pan binarak jomo numbur satu yang boi ngajar Bobohizan mentera yang terua amal ngabut betiru. Sejak a pan peketaan Unduk Ngadau pinakai untuk ngelambang lawa dendo kok alap alap ni bongso Huminodun. Kurian ratu santik Unduk Ngadau akan binuat amun tiba no' perayaan Tadau Kaamatan. phu7q8b7edzgqnsgkc37ogyjnhpqv7t Ungus 0 1019 4427 3751 2024-08-09T09:43:49Z JhsBot 61 Pywikibot touch edit 4427 wikitext text/x-wiki '''Ungus''' eyo tu un [[bentuk dokon butir-butir.]]Ungus tu [[terjadi semula jadi]].ungus un sampuran batu ko' zarah diki halus. <ref>https://ms.wikipedia.org/wiki/Pasir</ref> == Tungan metelak == {{Reflist}} 1z8pv6f6sw9ezd4p59fq5z42u3cgc8q Universiti Malaysia Sabah 0 1020 3776 3775 2024-08-09T09:29:21Z Jon Harald Søby 58 24 semakan diimportkan 3775 wikitext text/x-wiki [[Fail:KotaKinabalu-Sabah Universiti-Malaysia-Sabah-Chancellory-02.jpg|thumb|281x281px]] Universiti Malaysia Sabah iyo no dikau universiti bau un ta' Malaysia. Universiti Malaysia Sabah (UMS) boi binuat resmini tebeta' 24 November taun 1994. Universiti Malaysia Sabah iyo no universiti awam ke siam engko' terati jomo iyo no universiti paling lawa' ta' Asia Tenggara. == Sejarah == Awal ni Universiti tu boi binuka, bongon pelajar UMS bia'-bia' ta' Kolej Komuniti Yayasan Sabah ta' Likas tebeta' taun 1995 somo-somo ko' Kolej Menggatal taun 1999 ngabut 9 mei 2000, UMS boi logot-logot pindah ta' kampus tatapni ta' [[Sepanggar|Teluk Sepanggar]], [[Kota Kinabalu]], [[Sabah]]. == Lagu Universiti == [[Fail:KotaKinabalu-Universiti-Malaysia-Sabah-DewanCanselor-1.jpg|thumb|381x381px|'''''Dewan Canselori''''']] [[Fail:KotaKinabalu-Universiti-Malaysia-Sabah-MainEntrance-01.jpg|thumb|350x350px|'''''Beluang Posok Universiti Malaysia Sabah (UMS)''''']] UMS Lambang Puncak Jaya<br> Pancaran Perjuangan Semangat Waja<br> Pembentuk Citra Pelindung Budaya<br> Memandu Bangsa Memaju Negara<br> Di Sini Dicanai Segala Fikiran<br> Di Sini Dikaji Segala Wawasan<br> Ilmu Iman Sumber Pedoman<br> Bakti Curah Kasih Budiman<br> Bayu Bertiup Nafasmu Sejati<br> Bumi Terhampar Tubuhmu Abadi<br> Samudera Biru Wajahmu Berseri<br> Suria Menyinar Tenagamu Murni<br> Kaulah Harapan Bangsa Maju<br> Kaulah Jambatan Nusa Bersatu<br> Berdiri Megah Gagah Bermutu<br> Menunjuk Arah Bakal Dituju<br> UMS Kaulah Tunggak Negara<br> Warisan Sejati Malaysia Tercinta<br> Bertekad Cemerlang Menjadi Budaya<br> Semoga Unggul dan Sejahtera<br> Lagu: ''Abdul Jamal Abd. Hamid''<br> Lirik: ''Tuan Haji Salleh Haji Yusof'' == Tungan Metelak == # http://www.ums.edu.my/v5/index.php/ms/berita/1009-10-fakulti-ums-diisytihar.html<br> == Pautan meluar == * [http://www.ums.edu.my/ Laman web rasmi UMS] ksbddw54bm2kp0agwd0fkg75fj2gdyp Uran 0 1021 4428 3781 2024-08-09T09:43:50Z JhsBot 61 Pywikibot touch edit 4428 wikitext text/x-wiki '''Uran''' iyo tu dikau kejadian boi berlaku ta' bumi [[semula jadi]].Uran tu jadi apabila titik [[buek labu' tak bumi luak tak awan]].<ref>https://ms.wikipedia.org/wiki/Hujan_(kumpulan)</ref> == Tungan metelak == {{Reflist}} b0ckip4wulq4lw1shvx6yz7phlsagsi Urung 0 1022 4429 3784 2024-08-09T09:43:50Z JhsBot 61 Pywikibot touch edit 4429 wikitext text/x-wiki '''Urung''' tu guno ni untuk [[benafas]] jadi amun nyaun urung niak kiti teko benafas begea serita ni. aia88q4wz2gr7oquiu3mjo3oyp6emhu Using Taun 0 1023 3794 3793 2024-08-09T09:29:22Z Jon Harald Søby 58 9 semakan diimportkan 3793 wikitext text/x-wiki '''Using taun''' (Prionailurus planiceps) iyono' bedinakan kok using liar diki yang kikon ni mu' Thailand, Semenanjung Malaysia, Borneo kok Sumatera. Lekat 2008 using taun terua senarai sebagai sepisis teronsom ole' IUCN kerna punso tana' rawa ("wetland") abitat gai. 35ffydzptzmg8bhol69y1j62dezj1cf Ustad 0 1024 4430 3800 2024-08-09T09:43:51Z JhsBot 61 Pywikibot touch edit 4430 wikitext text/x-wiki '''Ustad''' iyo noh kata indomon lua bahasa Arab yang manan maksud mediom [[Melayu]] sebagai 1)Tuan 2)Guru agama dela.<ref><nowiki>https://prpm.dbp.gov.my/cari1?keyword=ustaz%20kamus%20dewan%20edisi%20empat</nowiki></ref> Bangan jomo Melayu nganggap ustad khusus ni ta' jomo yang ngajar agama atau ajaran agama Islam. == Tungan Metelak == {{Reflist}} qp2u0ykr0kqguompwwzitl6ymkhsl0t Usungan 0 1025 3802 3801 2024-08-09T09:29:23Z Jon Harald Søby 58 1 semakan diimportkan 3801 wikitext text/x-wiki Eyo no kenderaan pinakai tebetaa' kawin atau pan salah dikau adat tradisi Bajau Samah. d0fa7gc57ufghb67cygjwsn743gl6xo Utang 0 1026 4431 3805 2024-08-09T09:43:52Z JhsBot 61 Pywikibot touch edit 4431 wikitext text/x-wiki '''Utang''' tu sin boi ni indam ta' jomo lain ah2sf07q20a7yz13cguqzuour5exd64 Utok 0 1027 4432 3808 2024-08-09T09:43:52Z JhsBot 61 Pywikibot touch edit 4432 wikitext text/x-wiki '''utok''' tu guno ni untuk manusia [[berfikir]] jadi amun nyaun utok niak kiti teko berfikir sama sekali . do4s0kbhc41rfvxu2ld1rurc3awanxi Vanida Imran 0 1028 4433 3810 2024-08-09T09:43:53Z JhsBot 61 Pywikibot touch edit 4433 wikitext text/x-wiki Vanidah Imran boi pnenankan diom 1 Oktober 1973 iyonoh pelakon diom Malaysia, model kok pengacara dendo ta' Malaysia, iyopan tekilo jomo lek kerjoon-kerjoon ni ta' TV kok filem. iyotu pan boi bagas endo pelakun Rashidi Ishak. Gai boi sapek diom taun 2018. Diom taun 2007, iyonoh boi binanan Pelakun wanita tealap diom festival filem Malaysia yang ke-20. iyo tu pan boi kulek numbur 2 diom World Malaysia diom taun 1993 kok boi manang miss Photogenic. exsxpc0zizvnmi5f97ibi6im3s0hfxq Wan Azizah Wan Ismail 0 1029 4699 4661 2024-08-19T16:22:26Z Umboh Tuhan 194 + Tungan metelak 4699 wikitext text/x-wiki [[Fail:Wan Azizah Wan Ismail, 2019.jpg|thumb|Wan Azizah Wan Ismail pada 2019]] Yang Berhormat Dato' Seri Dr. Wan Azizah binti Dato’ Dr. Wan Ismail (Jawi: وان عزيزه بنت وان اسماعيل; boi penenakan 3 Disember 1952. Iyo jomo politik kok bagas Timbalan Perdana Menteri dendo yang numbur dikau tak Malaysia engko pan bagas Presiden Parti Keadilan Rakyat. Iyo pan boi bagas Menteri Pembangunan Wanita Keluarga kok Masyarakat ngabut tahun 2020. Betiru yo jadi Ahli Parlimen Bandar Tun Razak , lepas boi niumum senarai Kabinet oleh Perdana Menteri yang bau nilantik iyo noh Tun Dr Mahathir Mohamad. Engai ae jo Wan Azizah pan iyo noh dendo dikau-dikau ni yang boi ngentan peningkoon politik paling langga mitu Malaysia. Amun ta begian parti, iyo tekilo mediam Presiden Pakatan Harapan. == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] kga0nwvks50m90l6bp4n0e0xm0nyr2c Wawa Zainal 0 1030 4436 3815 2024-08-09T09:43:54Z JhsBot 61 Pywikibot touch edit 4436 wikitext text/x-wiki Wawa Zainal atau kiniloon Nur Hawa Zainal Abidin boi penanakan 12 Mac 1991. Iyo tu tekilo sebab iyo pelakun kok model. Asal ni lua Lahad datu, Sabah. Iyo anak numbur 8 lua 11 adik-beradik mediam keluarga ni. Iyo pan boi kawin engko jomo pelakun oron ni Suhairil Sunari atau tekilo engko oron Aeril Zafrel. es0l9csojb661kt8i30xtsk1ddkpu0r Wikipidia:Kaday Kupi' 4 1031 3828 3827 2024-08-09T09:29:25Z Jon Harald Søby 58 12 semakan diimportkan 3827 wikitext text/x-wiki Pesorong kam ta' '''Kaday Kupi' Wikipidia'''! Laman tu untuk tekule' abar Wikipidia Ling Sama engko' betutur bebia' jomo Wikipidia lain. Lebain sain (<nowiki>--~~~~</nowiki>) katis nulis. ==Wikilatih Bajau Sama #1== [[Fail:Wikilatih Logo - Malay Wikipedia.svg|right|alt=Wikilatih.|75px]] Iyan abar dinakan Wiki? Kiti akan muat Wikilatih Bajau Sama diam Internet nimpoon 1 Mas 2021 sampay 21 Mas 2021. Kami maku tabang ta' boron dinakan semimon muan pemelupus [[meta:Grants:Project/Rapid/Tofeiku/Wikilatih Sama|Wikilatih]] tu teposok pan jomo lain amun ingin ngerembia'. Terimo kasi! --[[Pengguna:Tofeiku|Tofeiku]] ([[Perbincangan pengguna:Tofeiku|talk]]) 10:02, 11 February 2021 (UTC) :Sokong. Seminar/program/kursus ini sangat perlu dibuat/diteruskan untuk memberikan maklumat, pengetahuan, idea, kaedah dan tatacara yang betul dan sesuai untuk para peserta bagi memulakan penulisan wikipidia Bajau Sama, yang baik dan dapat diadaptasi oleh masyarakat Bajau Sama khasnya dan rakyat Makaysia amnya. Tqvm-[[Khas:Contributions/183.171.83.204|183.171.83.204]] 04:49, 12 February 2021 (UTC) Sokong: Wikilatih tu alap bana mekelum Ling Sama, engko' miko terati diam penulisan Sama. Mudah2an sempurna pelanan Wikilatih Sama tu. 5fuwmlmxsjj5ufrt4phwdnu9ik8ls1w Wong Mew Choo 0 1032 4437 3830 2024-08-09T09:43:54Z JhsBot 61 Pywikibot touch edit 4437 wikitext text/x-wiki Datin Wong Mew Choo. iyonoh boi lahir diom buan Mei tak tanggal 1 taun 1983. Iyonoh pemain numbur satu dendo diom malaysia. iyonoh boi nuut pertandingan badminton dunia diom taun 2006 muk Anaheim. diom masa ea yo boi teko tak round keduo jo. diom sukan komanwel tak taun 2006 tak Melbourne, iyotuh tu boi mantu negara ti diom kulek pingat amas diom acara seguul-seguul dela kok dendo. negara ti boi manang lapas kulek moto 2-1 lek ni. Boi kok bangga lagi, malaysia ai kok alah England 3-1. diom masa ea negara ti bok ni pertama kali boi kok alah England kok ai jadi sejarah masa ea. g80gmjrjmvlhpj52e3gow0xh7xi4n6y YB Datuk Ir. Haji Shahelmey Yahya 0 1033 3832 3831 2024-08-09T09:29:26Z Jon Harald Søby 58 1 semakan diimportkan 3831 wikitext text/x-wiki #REDIRECT [[Shahelmey Yahya]] rfss1jc7kl3xtjrmpfkd41kbriorre9 Yang di-Pertua Laat 0 1034 4438 3836 2024-08-09T09:43:55Z JhsBot 61 Pywikibot touch edit 4438 wikitext text/x-wiki '''Yang di-Pertua Laat''' atau '''Tuan Yang Terutama (TYT)''' dau pinau sebagai Gabenor sebelum taun kemerdekaan 1957 untuk negeri-negeri Selat, ta' 4 buah laat mitu Malaysia iyo noh [[Melaka]], [[Sabah]], [[Sarawak]] engko [[Pulau Pinang]].<ref><nowiki>http://www.agc.gov.my/agcportal/uploads/files/Publications/FC/Federal%20Consti%20(BI%20text).pdf#page=375</nowiki></ref> Yang di-Pertuan Laat nilantik oleh Yang di-Pertuan Agong lepas berunding engko Majlis Kerajaan Malaysia sebab laat-laat tu nyaun sultan. == Tungan Metelak == {{Reflist}} 2xc5i10160llcf6b7vsui8gaotbubp3 Yang di-Pertua Laat Sabah 0 1035 4439 3840 2024-08-09T09:43:55Z JhsBot 61 Pywikibot touch edit 4439 wikitext text/x-wiki '''Yang di-Pertua Laat Sabah''' iyo noh ketua engko pemerintah untuk laat [[Sabah]]. Beliau terus lantik oleh Seri Paduka Baginda Yang di-Pertua Agong lepas kulek nasihat lua Ketua Menteri Sabah. Sabah nyaun rojo kok sultan jadi Yang di-Pertua laat ae noh ahli Majlis Rojo-rojo ni. Yang di-Pertua Laat nyiak buli ngundi untuk meneh YDPA engko pan nyiak buli jadi pengerusi mesyuarat Majlis Raja-raja.<ref><nowiki>http://ww2.sabah.gov.my/istana/Fungsi.html</nowiki></ref> == Tungan Metelak == {{Reflist}} 7nqagrxneepl600oo89gwr9cm6gluwx Yang di-Pertuan Agong 0 1036 4440 3846 2024-08-09T09:43:57Z JhsBot 61 Pywikibot touch edit 4440 wikitext text/x-wiki '''Yang di-Pertuan Agong''' iyo noh gelaran untuk [[Rojo Malaysia]]. YDPA pinakai sebagai gelaran rasmi untuk Ketua Negara Malaysia tapi untuk gelaran rasmi yang penoh iyo noh Ke bawah Duli Yang Maha Mulia Seri Paduka Baginda Yang di-Pertuan Agong.YDPA pan salah dikau lua dangai bentuk monarki ta dunia engko rojo yang pineneh. <ref>https://www.astroawani.com/berita-malaysia/lapan-fakta-mengenai-pengundian-yang-dipertuan-agong-195303</ref> == Tungan Metelak == {{Reflist}} nyq36wtftp6iroz1vzsko46s08ff5fy Yo jo masu 0 1037 4441 3849 2024-08-09T09:43:57Z JhsBot 61 Pywikibot touch edit 4441 wikitext text/x-wiki Yo jo masu iyono perembaan Sama ma'na ni iyo jo beserita' nia' mesele'. 7j4djfnldlzdd6wz4yyhkllgz8qcrur Yuna(pelego') 0 1038 3852 3851 2024-08-09T09:29:28Z Jon Harald Søby 58 2 semakan diimportkan 3851 wikitext text/x-wiki [[Fail:Yuna - Bandung 2016 (cropped).jpg|thumb|Yuna - Bandung 2016]] Yunalis Mat Zara'ai (boi pinenakan 14 November 1986) atau pinau Yuna (atau pan Yuna Zarai) eyono dangan pelego' kok penulis lagu dendo Malaysia. Yuna tekilo jomo dangan-dangan ni pelego' rock indie dendo betudung paling terawal ngias industri muzik boi mekilo muzik rock indie. 0z0q9zjsgxf0rmrt1ykj495m0ok6k9s Zaiton Sameon 0 1039 3854 3853 2024-08-09T09:29:28Z Jon Harald Søby 58 1 semakan diimportkan 3853 wikitext text/x-wiki Zaiton Sameon eyo no pelego' dendo tak Malaysia. Eyo boi mesegul diri ni mediam bidang belagu tebeta' tahun 1980-an. roiq8v4yd8a3rqj8gukc789frkhrpwt Zakat 0 1040 3856 3855 2024-08-09T09:29:28Z Jon Harald Søby 58 1 semakan diimportkan 3855 wikitext text/x-wiki '''Zakat''' maksud ni muan sedaka tak jomo niak mampu.Amun kiti mampu kiti mesti muan zakat tak jomo yang niak mampu.Zakat tu pan mesti binuat amun niak beduso. tvk91j76hhkum1wdb52uxndwplhn2q3 Zeti Akhtar Aziz 0 1041 4451 3860 2024-08-10T02:36:10Z Zahirulnukman 5 kemasan 4451 wikitext text/x-wiki '''Tan Sri Datin Paduka Dr. Ungku Zeti Akhtar binti Ungku Abdul Aziz''' boi penenakan 27 Ogos 1947. Iyo tu anak Profesor Diraja Ungku Abdul Aziz Ungku Abdul Hamid ko' Sharifah Azah Aziz. Zeti Aziz iyo no dendo dendangan yang boi nilantik diam Gabenor Bank Negara Malaysia. Iyo pan terati jadi salah dikau' dendo yang uun kuasa mitu Malaysia. Diam 13 September 2010, Zeti pineneh jadi Ketua Bank Pusat Terbaik Dunia le' majalah Global Finance. 8x7sazg77sfq9nlwoeaqizkj6cyk5pb Zikir 0 1042 4443 3862 2024-08-09T09:44:00Z JhsBot 61 Pywikibot touch edit 4443 wikitext text/x-wiki Zikir asal ni lua bahasa Arab yang binan maksud ingot antau naat. Diom Islam, zikir tu rujuk untuk ngingot tah Allah antau nat oron Allah. Diom Islam, zikir tah Allah iyo noh separuh ibadat kok jomo muslim yang boi muat kule pahala. c49znetfdy5ib8rfcewezn4y0djnt6l Zizi kirana 0 1043 4736 3865 2024-08-19T16:38:01Z Umboh Tuhan 194 + Tungan metelak 4736 wikitext text/x-wiki Nur Fazelah @ Zizie Mad Tahil (lahir23 Januari 1985) antau lebih tekilo jomo Zizi Kirana sebagai pelego'wanita Malaysia. Iyo bagas peserta Akademi Fantasia pada 2009. Iyo pan boi nut rancangan televisyen realiti Indonesia, D'Academy Asia musim keduo, kok iyo pan boi moh oron Malaysia. == Tungan metelak == {{Reflist}} [[Kategori:Pelego' dendo Malaysia]] ijclrjdhqxp1lgiytv8hfue1uaccz7z Angan angan 0 1044 4007 3868 2024-08-09T09:39:05Z JhsBot 61 Pywikibot touch edit 4007 wikitext text/x-wiki angan angan tu io" pan dekero bayangan yang ni" intom intom atau pan binayang bayang . Ke"ikoon" ni jomo angan angan tu un' niat ni untuk ngecapai niat ni atau pan" angan angan ni ea . mgov1ca0l2qr0ndxasnjelisxijsx57 Bu’ tikok 0 1045 4047 3870 2024-08-09T09:39:42Z JhsBot 61 Pywikibot touch edit 4047 wikitext text/x-wiki Bu’ tikok tu tomok ta’ enjata tikok. Bu’ tikok tu warna iram tapi kikon ni bahagian barat ngewarna bu’ tikok gai warna perang. 4md1htiotaezm0t8ew7qjy7isyo5r3f Gawa-gawa 0 1046 3872 3871 2024-08-09T09:29:30Z Jon Harald Søby 58 1 semakan diimportkan 3871 wikitext text/x-wiki '''Gawa-gawa''' erti ni, kerapak nyak beranti mendulen /ngendulek sidi aouxkhdmf7va0htruqgzekmuu8e5p4o Intan najwa 0 1047 4088 3874 2024-08-09T09:40:15Z JhsBot 61 Pywikibot touch edit 4088 wikitext text/x-wiki Datin Intan Najwa Abdul Wahid boi pinenekan lua taun 18 ogos 1997,iyo mula posok diom bidang lakunan lua umur ni 18 taun.Datin intan tu boi tekilo setat iyo belakun pilam mangat oron ni 'Hantu Punya Bos' engko 'Kekasih Paksa Rela'selain ae Datin tu boi belakun tak pilam 'Tuan Danial' pan.Lua taun 18 ogos 2023 Datin tu sa jadi endo jomo iyo boi bekawin engko Dato'Ahmad Azraf Azman pekawinan gai tu boi binuat tak resort Desaru Coast,bandar penawar johor. 3owcs7x5olq1gwh4wvb3h9tzi2lydo6 Kahanga 0 1048 4097 3880 2024-08-09T09:40:24Z JhsBot 61 Pywikibot touch edit 4097 wikitext text/x-wiki [[Fail:Kahanga.jpg|thumb|Kahanga]] Kahanga sebahagian makanan Tradisional Suku Kaum Bajau Pantai Barat Timur [[Sabah]].Kebenyakan iko makanan Bajau luak Pantai Timur lebih daripada Besina Kayu (ubi kayu) engko pan makanan laut.Cara mangan Kahanga itu pan perlu makai lidi (pencukil gigi) lagi sanang melua isi mediam kulit kahanga ae,lebih menak kinakan ko sambal atau Lok (kuah) engko pan lagi alap kinakan makai Buas Putek (Beras Putih) Rejukan https://sinarplus.sinarharian.com.my/lifestyle/5-makanan-tradisional-kaum-bajau-di-sabah-mungkin-anda-suka/amp/ 8bgf3ogyw1gen8mfs6pdsi6iqok6mjo Kek saging 0 1049 3882 3881 2024-08-09T09:29:31Z Jon Harald Søby 58 1 semakan diimportkan 3881 wikitext text/x-wiki '''Kek saging''' alap bana reso ni kinakan engko kupi sambil beserita engko jomo jrfumzwpkug3dl8a4j32li0v0raczt7 Kuih wajid 0 1050 4655 4130 2024-08-18T14:26:42Z Umboh Tuhan 194 4655 wikitext text/x-wiki [[Fail:Wajik - Penganan Tradisional Banyumas.jpg|alt=Rejukan|thumb|Kuih Wajid]] * Kuih Wajid iyo no yang sering benuat tak [[sabah]],Kuih Wajid tu pan sejenis kuih Pulut Mamis yang pada asas ni iyo no penapi engko santan,parut suka (kelapa) terdapat iko pan perisa yang senegul tak adunan Kuih Wajid itu pan ,antara jenis ni iyo no nedio Buas Pulut.Ko Buas Pulut itu pan perlu penapi sehingga iyo menjadi lema’h (lembut) <big>Rejukan</big> https://www.lemon8-app.com/discover/kuih%20wajik%20sabah?region=my 655s7thpb1vcv24diagru2a3dv5jwcm Kuling 0 1051 4132 3901 2024-08-09T09:40:51Z JhsBot 61 Pywikibot touch edit 4132 wikitext text/x-wiki Kuling tu ayat tambahan bagi ayat-ayat pinakai ole jomo selalu, contoh ayat ni,”kau kuling niak mara’ maku kau boi pinggo” obznzq5w5x5sud19ywnxqfx0tr4710q Ladin 0 1052 4146 3904 2024-08-09T09:40:59Z JhsBot 61 Pywikibot touch edit 4146 wikitext text/x-wiki Ladin tu jinis torom untuk mila’-mila’ benda. Ladin tu ujud lua’ jaman batu lagi. Ladin tu ben duo bahagian iaitu bilah ladin ko’ pegangan. dmoh4cbv4p7sarfvquw9nn8795q1oud Latok 0 1053 3912 3911 2024-08-09T09:29:33Z Jon Harald Søby 58 7 semakan diimportkan 3911 wikitext text/x-wiki [[Fail:Caulerpa lentillifera 1.jpg|thumb|Latok]] Latok iyo no sejenis makanan dari Rumpai Luat.Latok sememang ni paling lah tekilo tak kalangan suku kaum Bajau Laut yang kebenyakan ni temban tak sedih laut Daerah Semporna,[[Sabah]]. Latok buli nindo mingo-mingo pasar tak daerah sabah.engko buli ni hidang tak mingo-mingo restoren seafood tak daerah sabah pan.Reso latok tu kikon ni memang un dekit masin supaya alap iyo kinakan kok perlu un sisa sambal lodo supaya lagi alap reso ni.lagi dikau Latik buli kinakan ko pelbagai jenis luuk seperti ni Ding tenunu serta buas yang masih panas-panas. '''Rejukan''' https://web.archive.org/web/20230823062906/https://pemetaanbudaya.jkkn.gov.my/culture/dis/379 7jqwfor1unnxwpjk7vsu9vngy6yzgay Liabas 0 1054 4156 3917 2024-08-09T09:41:04Z JhsBot 61 Pywikibot touch edit 4156 wikitext text/x-wiki Liabas tu io" buah yang keros , Amun murak kakal yo rojo keros kok warna ni kakal ijau murak , amun yo ai" no toh werna ni pan berubah jadi werna kuning , amun kineket lemah , amun lemah bigi ni ngerati pan kineket . Kok petuah jomo dau' dau' amun bungair kineket terus buah liabas kakal diki diki ta pon' ni dong binekat , Sambil mapak mapak ni sampai abis . s4vvx9ken1sqpddcbbrqzmsejk25c9o Luara 0 1055 4163 3919 2024-08-09T09:41:09Z JhsBot 61 Pywikibot touch edit 4163 wikitext text/x-wiki nyun tantu keluman. ttju8wu4o1k7zlkzqp311ftrt8eyliw Makai akal 0 1056 3921 3920 2024-08-09T09:29:34Z Jon Harald Søby 58 1 semakan diimportkan 3920 wikitext text/x-wiki '''makai akal''' sebelum muat keputusan cqf0ofsn5yq9e4f9frd4y5b6xehi16k Makaleh buak 0 1057 3923 3922 2024-08-09T09:29:34Z Jon Harald Søby 58 1 semakan diimportkan 3922 wikitext text/x-wiki '''makaleh buak''' maksud ni makaleh teturan yang mak erti ni mjo67l95l6272rkkdrj0pzgbsr7zsdr Marsha milan 0 1058 3925 3924 2024-08-09T09:29:34Z Jon Harald Søby 58 1 semakan diimportkan 3924 wikitext text/x-wiki #REDIRECT [[Marsha Milan]] owkcznt6rd9pxqs4gy4kixmfurhpi02 Mekir 0 1059 3927 3926 2024-08-09T09:29:35Z Jon Harald Søby 58 1 semakan diimportkan 3926 wikitext text/x-wiki '''mekir''' sebelum muat keputusan ,dong sampai nesol demburi. mmho8o8omipbclm6vyyun7pwjtd1qch Moto 0 1060 3929 3928 2024-08-09T09:29:35Z Jon Harald Søby 58 1 semakan diimportkan 3928 wikitext text/x-wiki '''Moto''' guno ni untuk ngenda jomo htfuynvn68qona8ni2nly1r1kzgs549 Muzik bambu 0 1061 4195 3932 2024-08-09T09:41:36Z JhsBot 61 Pywikibot touch edit 4195 wikitext text/x-wiki [[Rambutan|Bambu]] iyo noh terkenal tak negara-negara seperti taiwan,filipina,indonesia dan malaysia (sabah) muzik bambo terkenal di sabah sebgai oron ni muzik bambu .kebenyakan alat-alat muzik tak sabah benuat daripada bahan-bahan asli ,sebagai cth :tongkngon , turai,suling (atau seruling ),sompoton dan togaggan benuat sebgai buluh bambu nso8aq2fnl9rvn7xq0h4emh5olp2v08 Muzik zaman bau 0 1062 4196 3934 2024-08-09T09:41:37Z JhsBot 61 Pywikibot touch edit 4196 wikitext text/x-wiki muzik zaman bau iyo noh pelbagai iko jenis muzik eo2brfx6u61li9h8dyqxd3ew1w0hq4g Olos 0 1063 4242 3936 2024-08-09T09:42:02Z JhsBot 61 Pywikibot touch edit 4242 wikitext text/x-wiki Olos tu pinakai ole jomo melayu, olos tu kikon ni pinakai ole dela. Olos tu tekilo sejak masyarakat melayu lekat jaman kerajaan melaka. Olos tu ben duo jenis sama ada boi nirait atau niak nirait(olos pelikat) tapi olos pelikat tu jarang pinedagang betiru. Dendangan pengembara Feringgi(Portugis) temban ta’ Melaka pada jaman 1528 hingga 1538 Castanheda. Ta Malaysia olos tu binuat seluar. hl2nfz0q1xzgpx9dh0609n07ks5dyx0 Peranggi 0 1064 3942 3941 2024-08-09T09:29:36Z Jon Harald Søby 58 2 semakan diimportkan 3941 wikitext text/x-wiki #REDIRECT [[Peranggi']] 8x6m789ihk80abzpihmnswyufne5cji Peristiwa penting hari guru 0 1065 4284 3948 2024-08-09T09:42:25Z JhsBot 61 Pywikibot touch edit 4284 wikitext text/x-wiki sepu enam (16) buan limo (5) Hari Guru bou pinene karna haribulan ni somo engko taun sepu siam lime empu enam (1956). Mejelis undang-undang Persekutuan Tana Melayu ( Federal Legislative Council ) boi nerimo sadangan lapuran Jawatankuasa pelajaran (Report Of The Education Committe) dokon pelajaran bagi negara kiti. 12bry0tb4mbx3toslcrooremskrjehv Pingo 0 1066 3950 3949 2024-08-09T09:29:36Z Jon Harald Søby 58 1 semakan diimportkan 3949 wikitext text/x-wiki '''pingo''' maksud ni ,tilau pingo ogo nu.atu pingo tujuan nu d7nfde1m5mr4ony25i5ee5xc2d97sa6 Surau 0 1067 3956 3955 2024-08-09T09:29:37Z Jon Harald Søby 58 1 semakan diimportkan 3955 wikitext text/x-wiki '''surau''' iyo dembua bugunan tungan jomo islam sembiang engai ea jo.'''Surau''' tu pan guno ni untuk bangan haji muan seramah.<big>Mimon jomo islam buli posok dela dendo ni.</big> 7fxcdmhtnq2i2849xjda10wnlcucz81 Telepon 0 1068 4395 3968 2024-08-09T09:43:30Z JhsBot 61 Pywikibot touch edit 4395 wikitext text/x-wiki Telepon tu alat telekomunikasi niguno memancar kok pelua ling,telepon tu ben duo jinis sama ada sesambung ko’ karan atau niak. Telepon tu buli ngubung jomo tio’ luak’ kiti. 54roynaye9mh816wrca7z4lqth3i5x0 Tikok buek 0 1069 4404 3971 2024-08-09T09:43:37Z JhsBot 61 Pywikibot touch edit 4404 wikitext text/x-wiki Tikok buek io' dekero buek bagal teko tiba tiba lekat enjata , io" panut daras lekat enderio orop endilud , io" punca" lekat uran daras atau ribut lekat enjata laat masam ta gunung . lycbb8ebg715t8t75ks12ip4isse42z Warna darak 0 1070 4435 3973 2024-08-09T09:43:54Z JhsBot 61 Pywikibot touch edit 4435 wikitext text/x-wiki Warna darak tu salah satu warna diam kalangan warna fyfwrsgw2s4sepsypuiyjkkvqfqgjsj Zee avi 0 1071 4442 3975 2024-08-09T09:43:59Z JhsBot 61 Pywikibot touch edit 4442 wikitext text/x-wiki iyo no penanakan pada 15 Disember 1985 ta Miri, Sarawak. Iyo pindah Kuala Lumpur pada usia 12 taun dan mula main gitar pada usia 17 taun.[5] Avi bermain gitar irama mediang dangai band manakala ta Kuala Lumpur sebelum me e berpindah ke London muan balajar reka bentuk fesyen dpta InterContinental University Amerika. Se e me e muli dari London, iyo mula menulis lagu.[6] iyo betemban ta Amerika Syarikat. 3pqbaw5u0fq7k7gf0be0lbeehu9zegm MediaWiki:Common.css 8 1072 3979 3978 2024-08-09T09:29:38Z Jon Harald Søby 58 3 semakan diimportkan 3978 sanitized-css text/css /* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Avoid FOUC/reflows on collapsed elements. */ /* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */ /* TODO: Use :is() selector at some reasonable future when support is good for Most Clients */ /* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */ .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > p, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > table, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > thead + tbody, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) tr:not( :first-child ), .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) .mw-collapsible-content, /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Cite customizations for Parsoid * Once everything uses the one true parser these are just customizations */ span[ rel="mw:referencedBy" ] { counter-reset: mw-ref-linkback 0; } span[ rel='mw:referencedBy' ] > a::before { content: counter( mw-ref-linkback, lower-alpha ); font-size: 80%; font-weight: bold; font-style: italic; } a[ rel="mw:referencedBy" ]::before { font-weight: bold; content: "^"; } span[ rel="mw:referencedBy" ]::before { content: "^ "; } .mw-ref > a[data-mw-group=lower-alpha]::after { content: '[' counter( mw-Ref, lower-alpha ) ']'; } .mw-ref > a[data-mw-group=upper-alpha]::after { content: '[' counter( mw-Ref, upper-alpha ) ']'; } .mw-ref > a[data-mw-group=decimal]::after { content: '[' counter( mw-Ref, decimal ) ']'; } .mw-ref > a[data-mw-group=lower-roman]::after { content: '[' counter( mw-Ref, lower-roman ) ']'; } .mw-ref > a[data-mw-group=upper-roman]::after { content: '[' counter( mw-Ref, upper-roman ) ']'; } .mw-ref > a[data-mw-group=lower-greek]::after { content: '[' counter( mw-Ref, lower-greek ) ']'; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ /* for .mw-warning-with-logexcerpt, behavior of this line differs between * the edit-protected notice and the special:Contribs for blocked users * The latter has specificity of 3 classes so we have to triple up here. */ .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ /* gotta get over the hump introduced by the triple class above */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Minimum thumb width */ figure[typeof~='mw:File/Thumb'], figure[typeof~='mw:File/Frame'], .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for tags in changes pages */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]], [[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .abusefilter-show, .abusefilter-helper-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors { margin: 0; } ul.permissions-errors > li { list-style: none; } /* larger inline math */ span.mwe-math-mathml-inline { font-size: 118%; } /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } @media screen { /* Put a chequered background behind images, only visible if they have transparency, * except on main, user, and portal namespaces */ body:not(.ns-0):not(.ns-2):not(.ns-100) .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* Display "From Wikipedia, the free encyclopedia" in skins that support it, do not apply to print mode */ #siteSub { display: block; } } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced, /* "Temporary" to remove links in sidebar T255381 */ #t-upload, /* Hide broken download box on Special:Book pending T285400 */ .mw-special-Book #coll-downloadbox { display: none; } /* * BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; * SEE [[Perbincangan MediaWiki:Common.css/to do]] */ /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row], .wikitable.plainrowheaders th[scope=rowgroup] { font-weight: normal; /* @noflip */ text-align: left; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Prevent line breaks in silly places where desired (nowrap) and links when we don't want them to (nowraplinks a) */ .nowrap, .nowraplinks a { white-space: nowrap; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* texhtml class for inline math (based on generic times-serif class) */ span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; white-space: nowrap; /* Force tabular and lining display for texhtml */ font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } span.texhtml span.texhtml { font-size: 100%; } @media screen { .nochecker .gallerybox .thumb img { background-image: none; } } /* Put anything you mean to be a sitewide addition above the TemplateStyles * comment above. */ a7iawtb5rm2qn09jvwa76xb8osxwica Kategori:Indonesia 14 1073 3981 3980 2024-08-09T09:29:48Z Jon Harald Søby 58 1 semakan diimportkan 3980 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Kategori:Jomo Indonesia 14 1074 3983 3982 2024-08-09T09:29:48Z Jon Harald Søby 58 1 semakan diimportkan 3982 wikitext text/x-wiki [[Kategori:Indonesia]] 53m679nv1vvnty84v6cyhq8ovuc749b Kategori:Jomo Malaysia 14 1075 3985 3984 2024-08-09T09:29:48Z Jon Harald Søby 58 1 semakan diimportkan 3984 wikitext text/x-wiki [[Kategori:Malaysia]] g2nj24ruknfqgiagkhzt8wm1iqdjh21 Kategori:Malaysia 14 1076 3987 3986 2024-08-09T09:29:48Z Jon Harald Søby 58 1 semakan diimportkan 3986 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 Kategori:Pelego' Malaysia 14 1077 3989 3988 2024-08-09T09:29:48Z Jon Harald Søby 58 1 semakan diimportkan 3988 wikitext text/x-wiki [[Kategori:Jomo Malaysia]] dqhfddfsvmxhorn9gv6vdqi4jn7rxfz Kategori:Pelego' dendo Malaysia 14 1078 3992 3991 2024-08-09T09:29:49Z Jon Harald Søby 58 2 semakan diimportkan 3991 wikitext text/x-wiki [[Kategori:Pelego' Malaysia]] koqf3ghhdt982u09ag9qpnklqifii53 Kategori:Suang 14 1079 4447 3995 2024-08-10T02:21:02Z Zahirulnukman 5 update 4447 wikitext text/x-wiki [[Kategori:Buek]] q24gakenfaqq27qsk1d961mn6dpa2y7 Perbincangan pengguna:InternetArchiveBot 3 1081 4444 2024-08-09T17:12:22Z Nintendofan885 11 redirect 4444 wikitext text/x-wiki #REDIRECT [[m:User talk:InternetArchiveBot]] sjfh092stp8ehoh44irkwop24njjffx Abdul Hadi Awang 0 1082 4693 4457 2024-08-19T16:20:21Z Umboh Tuhan 194 /* Tungan metelak */ 4693 wikitext text/x-wiki {{Infobox person|birth_date={{birth date and age|1947|10|20}}|birth_place=[[Terengganu]]|birth_name=Abdul Hadi bin Awang|occupation=Jomo politik|organization=[[Parti Islam Se-Malaysia]]|nationality=Malaysia}} '''Abdul Hadi bin Awang''' iyo no endangan jomo politik ta' Malaysia. Beliau tu Ahli [[Parlimen Malaysia]] ta' [[Parlimen Marang]]. Beliau tu boi ngejadi Ahli [[Dewan Undangan Negeri]] Terengganu ta' DUN [[Ru Rendang]] lua' 1986 ngabut 2018. Beliau betiru ngentan jewatan Presiden ta' [[Parti Islam Se-Malaysia]] (PAS) boi nilantik lua' 2003.<ref>{{Cite web|title=Malaysiakini, Presiden PAS Fadzil Noor meninggal dunia, 23 Jun|url=https://www.malaysiakini.com/news/11909|date=23 Jun 2002|website=Malaysiakini|language=ms}}</ref> == Tungan metelak == {{Reflist}} [[Kategori:Jomo politik Malaysia]] jb1dlvxbzqf0v6pwlsqdk63zzvm9e8y Kategori:Jomo politik Malaysia 14 1083 4468 2024-08-10T04:05:30Z Zahirulnukman 5 cipta 4468 wikitext text/x-wiki [[Kategori:Jomo Malaysia]] [[Kategori:Politik Malaysia]] 5959kptmcc8pwv81ag9tqwbvwmmj75h Pengguna:Hugo.arg 2 1084 4469 2024-08-10T07:21:43Z Hugo.arg 113 Mencipta laman baru dengan kandungan '{{#babel:lt|en-3|es-2|ru-2|pt-1|hi-1|sa-2|bdr-0}} Hi! I'm a user from Lithuania, a sysop of Samogitian and Guarani wikipedias. You can contact me '''[[:lt:User talk:Hugo.arg|here]]''' *'''[[commons:User:Hugo.arg/Gallery|My gallery in commons]]''' [[file:Bajau Laut Pictures 6.jpg|thumb|left|450px|Bajau. Sabah]] [[lt:Naudotojas:Hugo.arg]]' 4469 wikitext text/x-wiki {{#babel:lt|en-3|es-2|ru-2|pt-1|hi-1|sa-2|bdr-0}} Hi! I'm a user from Lithuania, a sysop of Samogitian and Guarani wikipedias. You can contact me '''[[:lt:User talk:Hugo.arg|here]]''' *'''[[commons:User:Hugo.arg/Gallery|My gallery in commons]]''' [[file:Bajau Laut Pictures 6.jpg|thumb|left|450px|Bajau. Sabah]] [[lt:Naudotojas:Hugo.arg]] g1a42kl5m4cad5dvvodd2u8vxq8alyb Perbincangan pengguna:Ameisenigel 3 1085 4470 2024-08-10T07:52:19Z Ameisenigel 114 Mencipta laman baru dengan kandungan '[[File:Redirect arrow without text.svg|46px|link=]][[m:User talk:Ameisenigel|m:User talk:Ameisenigel]]' 4470 wikitext text/x-wiki [[File:Redirect arrow without text.svg|46px|link=]][[m:User talk:Ameisenigel|m:User talk:Ameisenigel]] 2229pjupj4oxyrzx6wq7rucquxcn3pt Templat:Str ≠ len 10 1086 4473 2024-08-10T09:34:09Z Rombituon 59 Mencipta laman baru dengan kandungan '{{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} != {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>' 4473 wikitext text/x-wiki {{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} != {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> bjndedolj3rubo3o1o2kt0n4hoa36ki Templat:In string 10 1087 4474 2024-08-10T09:35:09Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{{plain|{{{4|}}}}}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude>' 4474 wikitext text/x-wiki {{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{{plain|{{{4|}}}}}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude> lo2s5l4hfmr5g93rjf8ky5ra1g8jbvz Modul:About 828 1088 4476 2024-08-10T09:39:47Z Rombituon 59 Mencipta laman baru dengan kandungan 'local mArguments --initialize lazily local mHatnote = require('Module:Hatnote') local mHatList = require('Module:Hatnote list') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.about (frame) -- A passthrough that gets args from the frame and all mArguments = require('Module:Arguments') args = mArguments.getArgs(frame) return p._about(args) end function p._about (args, options) -- Produce...' 4476 Scribunto text/plain local mArguments --initialize lazily local mHatnote = require('Module:Hatnote') local mHatList = require('Module:Hatnote list') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.about (frame) -- A passthrough that gets args from the frame and all mArguments = require('Module:Arguments') args = mArguments.getArgs(frame) return p._about(args) end function p._about (args, options) -- Produces "about" hatnote. -- Type checks and defaults checkType('_about', 1, args, 'table', true) args = args or {} checkType('_about', 2, options, 'table', true) options = options or {} local defaultOptions = { aboutForm = 'This %s is about %s. ', PageType = require('Module:Pagetype').main(), otherText = nil, --included for complete list sectionString = 'section' } for k, v in pairs(defaultOptions) do if options[k] == nil then options[k] = v end end -- Set initial "about" string local pageType = (args.section and options.sectionString) or options.PageType local about = '' if args[1] then about = string.format(options.aboutForm, pageType, args[1]) end --Allow passing through certain options local fsOptions = { otherText = options.otherText, extratext = args.text } local hnOptions = { selfref = args.selfref } -- Set for-see list local forSee = mHatList._forSee(args, 2, fsOptions) -- Concatenate and return return mHatnote._hatnote(about .. forSee, hnOptions) end return p 34eqkrvgvpb6coyf5mc8amjmasfegyy Templat:Pp-vandalism 10 1089 4477 2024-08-10T09:40:54Z Rombituon 59 Mencipta laman baru dengan kandungan '<includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>' 4477 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 5t6lal9n9hcpwsso2obr7pcyjbg26xc Templat:Native phrase 10 1090 4478 2024-08-10T09:41:47Z Rombituon 59 Melencong ke [[Templat:Native name]] 4478 wikitext text/x-wiki #redirect [[Template:Native name]] a25qkytecg0h2hp6prw0pz094d3l57i Templat:Lit 10 1091 4479 2024-08-10T09:42:45Z Rombituon 59 Melencong ke [[Templat:Literal translation]] 4479 wikitext text/x-wiki #REDIRECT [[Template:Literal translation]] 6mgo2to98xjsuga517m90gguib9ghye Templat:Literal translation 10 1092 4480 2024-08-10T09:43:05Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#if:{{{sortable|}}} |<span style="display:none;">{{{1|}}}</span> }}{{#if:{{{i|}}} |<nowiki/>'' }}{{abbr|style=font-size:85%|{{#switch:{{{lk|}}} |yes|on = [[Literal translation|lit.]] |#default = lit. }}|literal translation}}{{#if:{{{i|}}} |''<nowiki/> }}{{#if:{{{1|}}} | {{thinsp}}{{gloss|{{{1}}}}} }}{{#if:{{{2|}}} | {{sp}} or {{gloss|{{{2}}}}} }}{{#if:{{{3|}}} | {{sp}} or {{gloss|{{{3}}}}} }}{{#if:{{{4|}}} | {{sp}} or {{gloss|{{{4}}}}} }}<no...' 4480 wikitext text/x-wiki {{#if:{{{sortable|}}} |<span style="display:none;">{{{1|}}}</span> }}{{#if:{{{i|}}} |<nowiki/>'' }}{{abbr|style=font-size:85%|{{#switch:{{{lk|}}} |yes|on = [[Literal translation|lit.]] |#default = lit. }}|literal translation}}{{#if:{{{i|}}} |''<nowiki/> }}{{#if:{{{1|}}} | {{thinsp}}{{gloss|{{{1}}}}} }}{{#if:{{{2|}}} | {{sp}} or {{gloss|{{{2}}}}} }}{{#if:{{{3|}}} | {{sp}} or {{gloss|{{{3}}}}} }}{{#if:{{{4|}}} | {{sp}} or {{gloss|{{{4}}}}} }}<noinclude> {{Documentation}} </noinclude> crms03yreju0qz0e2ors94wklcas7qf Templat:Ns has subpages 10 1093 4481 2024-08-10T09:44:12Z Rombituon 59 Mencipta laman baru dengan kandungan '{{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude>' 4481 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 0pg457y46td6p53rdt8tyc76jeg9pa8 Modul:Ns has subpages 828 1094 4482 2024-08-10T09:44:55Z Rombituon 59 Mencipta laman baru dengan kandungan '-- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.s...' 4482 Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p qb0b1z2vff7kifnw21v205d791esbiz Perbincangan pengguna:Ultron90 3 1095 4612 4611 2024-08-13T14:19:21Z Jon Harald Søby 58 /* Welcome to the West Coast Bajau Wikipedia! */ Nampung 4612 wikitext text/x-wiki == Welcome to the West Coast Bajau Wikipedia! == Hello, and sorry for writing in English. Hopefully you will understand. :-) Also a ping to @[[Pengguna:Tofeiku|Tofeiku]], @[[Pengguna:Syafiq.y|Syafiq.y]], @[[Pengguna:Rombituon|Rombituon]], @[[Pengguna:Sabahtaim|Sabahtaim]], @[[Pengguna:Najihah Mail|Najihah Mail]], @[[Pengguna:Dyzahmail|Dyzahmail]], @[[Pengguna:Zahirulnukman|Zahirulnukman]], @[[Pengguna:Juiii|Juiii]] and @[[Pengguna:Canntoia|Canntoia]]. First of all, it's my pleasure to be able to welcome you to the brand new West Coast Bajau Wikipedia, the newest addition to the Wikimedia family. Thank you all (and the rest of the contributors I haven't pinged) for your great efforts which have brought us here, you've all done outstanding work so far! As you may have noticed, I finished importing the wiki from the Incubator a few days ago, so you can now edit here. I think everything should be working as on any other Wikipedia, but if you notice any problems, feel free to ask me for help any time. I am sure [[User:Tofeiku|Tofeiku]] will also be able to help with most things. There are no administrators on this wiki – I suggest that you start a Village pump page (maybe at [[Wikipedia:Beluang derepa']]?) to hold a vote for adminship, and then a request can be made for adminship in Meta. Let me or Tofeiku know about it, and we can guide you through that process. Again, thank you all for your hard work, and congratulations on your brand new Wikipedia! [[Pengguna:Jon Harald Søby|Jon Harald Søby]] ([[Perbincangan pengguna:Jon Harald Søby|upakat]]) 10:00, 12 Ogos 2024 (UTC) Hello! Thank you for messaging @[[Pengguna:Jon Harald Søby|Jon Harald Søby]]. We will do a vote for adminship soon. So far the problem I just found is that I can't reply to this very message using the '''reply''' button. It would show an error saying the page has been moved or deleted. I'm not sure if it is a global issue or just on this project. I hope it's fixable. Thank you [[Pengguna:Ultron90|Ultron90]] ([[Perbincangan pengguna:Ultron90|upakat]]) 00:21, 13 Ogos 2024 (+08) :It worked for me, I think it was a temporary problem, but hopefully it works for you too? [[Pengguna:Jon Harald Søby|Jon Harald Søby]] ([[Perbincangan pengguna:Jon Harald Søby|upakat]]) 21:05, 13 Ogos 2024 (+08) ::Oh yes it seems to have been fixed. Weird glitch. I even tried on two devices to reply to your initial message but it gave the same error so I had to just manually edit my reply. Hopefully it was a one time thing. Thanks! [[Pengguna:Ultron90|Ultron90]] ([[Perbincangan pengguna:Ultron90|upakat]]) 21:08, 13 Ogos 2024 (+08) :::Yeah, I've seen this error before in new wikis, but I thought it was no longer a problem. Luckily it was fixed quickly. [[Pengguna:Jon Harald Søby|Jon Harald Søby]] ([[Perbincangan pengguna:Jon Harald Søby|upakat]]) 22:19, 13 Ogos 2024 (+08) byp4wvgqq4j134g2mpa8l9jhqu2gysx Templat:Babel 10 1096 4614 4613 2024-08-15T23:57:19Z Wheatley2 185 4614 wikitext text/x-wiki {{#invoke:Babel|main}}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> snmz5d5bvptbgw00om15cbgropnu4e7 Modul:Babel 828 1097 4615 2024-08-15T23:58:00Z Wheatley2 185 Mencipta laman baru dengan kandungan 'local p = {} local getArgs local function showUserbox(frame, v, nocat) local maybeNocat = '' if nocat then maybeNocat = '|nocat=yes' end return frame:preprocess('{{User '..v..maybeNocat..'}}') end function p.main(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, {wrappers = 'Template:Babel'}) local ret = mw.html.create('table') :attr('role', 'presentation') :addClass('userbo...' 4615 Scribunto text/plain local p = {} local getArgs local function showUserbox(frame, v, nocat) local maybeNocat = '' if nocat then maybeNocat = '|nocat=yes' end return frame:preprocess('{{User '..v..maybeNocat..'}}') end function p.main(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, {wrappers = 'Template:Babel'}) local ret = mw.html.create('table') :attr('role', 'presentation') :addClass('userboxes') :css( { float = args.align or 'right', ['margin-left'] = (args.left or '1') .. 'em', ['margin-bottom'] = (args.bottom or '0') .. 'em', width = (args.width or '248') .. 'px', clear = args.align or 'right', color = args.textcolor or '#000000', border = (args.bordercolor or '#99B3FF') .. ' solid ' .. (args.solid or 1)..'px' } ) local nocat = args.nocat and string.lower(args.nocat) == 'yes' if args.shadow and string.lower(args.shadow) == 'yes' then ret:css({ ['box-shadow'] = '0 2px 4px rgb(0,0,0,0.2)' }) end ret:cssText( args['extra-css'] or '' ) local color = args.color or 'inherit' local row1 = ret:tag('tr') local row2 = ret:tag('tr') local row3 = ret:tag('tr') local body_cells = row2:tag('td') :css('vertical-align', 'middle !important') local userboxes -- Special message for when first argument is blank; otherwise treat it as normal if args[1] and args[1]:find('%S') then userboxes = showUserbox(frame, args[1], nocat) else userboxes = args.noboxestext or "''You haven't set up any languages. Please see [[Template:Babel/doc]] for help.''" end body_cells:wikitext(userboxes) -- "remove" args[1] so it isn't looked at in the loop -- table.remove(args,1) doesn't produce desired result args[1] = '' -- Keep track of how many columns are in this table local col_span = 1 for _, v in ipairs( args ) do -- ! indicates a new cell should be created if v:find('%S') and v ~= '!' then body_cells:wikitext( showUserbox(frame, v, nocat) ) -- Recycling body_cells for <td> elseif v and v == '!' then col_span = col_span + 1 body_cells:done() body_cells = row2:tag('td') end end row1:tag('th') :css({ ['background-color'] = color, ['text-align'] = 'center' }) :attr('colspan',col_span) :wikitext( args.header or '[[Wikipedia:Babel]]' ) :done() row3:tag('td') :css({ ['background-color'] = color, ['text-align'] = 'center' }) :attr('colspan',col_span) :wikitext( args.footer or '[[:Category:Wikipedians by language|Search user languages]]' ) :done() if args['special-boxes'] then body_cells:wikitext(args['special-boxes']) end body_cells:done() return tostring(ret) end return p c98ssiyxy2c344ukg0sivlb0wgfniov Templat:Userbox-level 10 1098 4616 2024-08-15T23:59:42Z Wheatley2 185 Mencipta laman baru dengan kandungan '{{userbox | border-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8 |3=99B3FF|3a=99B3FF|3b=00FF00|4=CCCC00|4a=FFCF4D |5=CC0000|5a=CC0000|5b=F99C99|#default=6EF7A7}} | id = {{{id}}}{{#if:{{{level|}}}|{{#if:{{{level-br|}}}|<br>|-}}{{#switch:{{{level}}}|0|0.5|1|2|3|4|5|N={{{level}}}|0a|0b=0|3a|3b=3|4a=4|5a|5b=5}}}} | id-c...' 4616 wikitext text/x-wiki {{userbox | border-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8 |3=99B3FF|3a=99B3FF|3b=00FF00|4=CCCC00|4a=FFCF4D |5=CC0000|5a=CC0000|5b=F99C99|#default=6EF7A7}} | id = {{{id}}}{{#if:{{{level|}}}|{{#if:{{{level-br|}}}|<br>|-}}{{#switch:{{{level}}}|0|0.5|1|2|3|4|5|N={{{level}}}|0a|0b=0|3a|3b=3|4a=4|5a|5b=5}}}} | id-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8 |3=99B3FF|3a=99B3FF|3b=00FF00|4=FFFF00|4a=FFCF4D |5=FF5e5e|5a=FF5e5e|5b=F99C99|#default=6EF7A7}} | id-s = {{{id-s|{{#ifeq:{{{level|}}}|0.5|12|14}}}}} | id-op = white-space:nowrap;{{{id-op|}}} | info = {{{info}}} | info-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=E8E8E8|0a=E8E8E8|0b=FFE0E8|0.5=FFFF99|1=F0F8FF|2=D0F8FF |3=E0E8FF|3a=E0E8FF|3b=90FF90|4=FFFF99|4a=FFEFA6 |5=FF8080|5a=FF8080|5b=F9CBC9|#default=C5FCDC}} | info-s = {{{info-s|8}}} | info-lh = {{{info-lh|1.25}}} | info-op = {{{info-op|}}} | info-a = {{{info-a|left}}} | usercategory = {{{usercategory|}}} | usercategory2 = {{{usercategory2|}}} | usercategory3 = {{{usercategory3|}}} | nocat = {{{nocat|}}} }}<!-- # Track the existence of level-zero templates -->{{Template other|{{#switch: {{{level|}}}|0|0a|0b=[[Category:Level-zero userbox templates]]}}}}<noinclude> {{documentation}} </noinclude> fq1a22g0ex2ncwbwjrj6fqys2oi1799 Templat:Userbox 10 1099 4617 2024-08-16T00:00:05Z Wheatley2 185 Mencipta laman baru dengan kandungan '{{#invoke:userbox|userbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>' 4617 wikitext text/x-wiki {{#invoke:userbox|userbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 7xqp98n4frdf5oy8egh9oenx188107s Modul:Userbox 828 1100 4618 2024-08-16T00:00:37Z Wheatley2 185 Mencipta laman baru dengan kandungan '-- This module implements {{userbox}}. local categoryHandler = require('Module:Category handler').main local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function checkNum(val, default) -- Checks whether a value is a number greater than or equal to zero. If so, -- returns it as a number. If not, ret...' 4618 Scribunto text/plain -- This module implements {{userbox}}. local categoryHandler = require('Module:Category handler').main local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function checkNum(val, default) -- Checks whether a value is a number greater than or equal to zero. If so, -- returns it as a number. If not, returns a default value. val = tonumber(val) if val and val >= 0 then return val else return default end end local function addSuffix(num, suffix) -- Turns a number into a string and adds a suffix. if num then return tostring(num) .. suffix else return nil end end local function checkNumAndAddSuffix(num, default, suffix) -- Checks a value with checkNum and adds a suffix. num = checkNum(num, default) return addSuffix(num, suffix) end local function makeCat(cat, sort) -- Makes a category link. if sort then return mw.ustring.format('[[Category:%s|%s]]', cat, sort) else return mw.ustring.format('[[Category:%s]]', cat) end end -------------------------------------------------------------------------------- -- Argument processing -------------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local origArgs = require('Module:Arguments').getArgs(frame) local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.main(funcName, args) end end p.userbox = makeInvokeFunc('_userbox') p['userbox-2'] = makeInvokeFunc('_userbox-2') p['userbox-r'] = makeInvokeFunc('_userbox-r') -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.main(funcName, args) local userboxData = p[funcName](args) local userbox = p.render(userboxData) local cats = p.categories(args) return userbox .. (cats or '') end function p._userbox(args) -- Does argument processing for {{userbox}}. local data = {} -- Get div tag values. data.float = args.float or 'left' local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width. data.borderWidth = addSuffix(borderWidthNum, 'px') data.borderColor = args['border-color'] or args['border-c'] or args[1] or args['id-c'] or '#999' data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag. data.bodyClass = args.bodyclass -- Get table tag values. data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee' -- Get info values. data.info = args.info or args[4] or "<code>{{{info}}}</code>" data.infoTextAlign = args['info-a'] or 'left' data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt') data.infoHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px') data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px' data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em' data.infoColor = args['info-color'] or args['info-fc'] or 'black' data.infoOtherParams = args['info-other-param'] or args['info-op'] data.infoClass = args['info-class'] -- Get id values. local id = args.logo or args[3] or args.id data.id = id data.showId = id and true or false data.idWidth = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px') data.idHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px') data.idBackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd' data.idTextAlign = args['id-a'] or 'center' data.idFontSize = checkNum(args['logo-size'] or args[5] or args['id-s'], 14) data.idColor = args['logo-color'] or args['id-fc'] or data.infoColor data.idPadding = args['logo-padding'] or args['id-p'] or '0 1px 0 0' data.idLineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em' data.idOtherParams = args['logo-other-param'] or args['id-op'] data.idClass = args['id-class'] return data end p['_userbox-2'] = function (args) -- Does argument processing for {{userbox-2}}. local data = {} -- Get div tag values. data.float = args.float or 'left' local borderWidthNum = checkNum(args['border-s'] or args[9], 1) -- Used to calculate width. data.borderWidth = addSuffix(borderWidthNum, 'px') data.borderColor = args['border-c'] or args[6] or args['id1-c'] or args[1] or '#999999' data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag. data.bodyClass = args.bodyclass -- Get table tag values. data.backgroundColor = args['info-c'] or args[2] or '#eeeeee' -- Get info values. data.info = args.info or args[4] or "<code>{{{info}}}</code>" data.infoTextAlign = args['info-a'] or 'left' data.infoFontSize = checkNumAndAddSuffix(args['info-s'], 8, 'pt') data.infoColor = args['info-fc'] or args[8] or 'black' data.infoPadding = args['info-p'] or '0 4px 0 4px' data.infoLineHeight = args['info-lh'] or '1.25em' data.infoOtherParams = args['info-op'] -- Get id values. data.showId = true data.id = args.logo or args[3] or args.id1 or 'id1' data.idWidth = checkNumAndAddSuffix(args['id1-w'], 45, 'px') data.idHeight = checkNumAndAddSuffix(args['id-h'], 45, 'px') data.idBackgroundColor = args['id1-c'] or args[1] or '#dddddd' data.idTextAlign = 'center' data.idFontSize = checkNum(args['id1-s'], 14) data.idLineHeight = args['id1-lh'] or '1.25em' data.idColor = args['id1-fc'] or data.infoColor data.idPadding = args['id1-p'] or '0 1px 0 0' data.idOtherParams = args['id1-op'] -- Get id2 values. data.showId2 = true data.id2 = args.logo or args[5] or args.id2 or 'id2' data.id2Width = checkNumAndAddSuffix(args['id2-w'], 45, 'px') data.id2Height = data.idHeight data.id2BackgroundColor = args['id2-c'] or args[7] or args[1] or '#dddddd' data.id2TextAlign = 'center' data.id2FontSize = checkNum(args['id2-s'], 14) data.id2LineHeight = args['id2-lh'] or '1.25em' data.id2Color = args['id2-fc'] or data.infoColor data.id2Padding = args['id2-p'] or '0 0 0 1px' data.id2OtherParams = args['id2-op'] return data end p['_userbox-r'] = function (args) -- Does argument processing for {{userbox-r}}. local data = {} -- Get div tag values. data.float = args.float or 'left' local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width. data.borderWidth = addSuffix(borderWidthNum, 'px') data.borderColor = args['border-color'] or args['border-c'] or args[1] or args['id-c'] or '#999' data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag. data.bodyClass = args.bodyclass -- Get table tag values. data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee' -- Get id values. data.showId = false -- We only show id2 in userbox-r. -- Get info values. data.info = args.info or args[4] or "<code>{{{info}}}</code>" data.infoTextAlign = args['info-align'] or args['info-a'] or 'left' data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt') data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px' data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em' data.infoColor = args['info-color'] or args['info-fc'] or 'black' data.infoOtherParams = args['info-other-param'] or args['info-op'] -- Get id2 values. data.showId2 = true data.id2 = args.logo or args[3] or args.id or 'id' data.id2Width = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px') data.id2Height = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px') data.id2BackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd' data.id2TextAlign = args['id-a'] or 'center' data.id2FontSize = checkNum(args['logo-size'] or args[5] or args['id-s'], 14) data.id2Color = args['logo-color'] or args['id-fc'] or data.infoColor data.id2Padding = args['logo-padding'] or args['id-p'] or '0 0 0 1px' data.id2LineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em' data.id2OtherParams = args['logo-other-param'] or args['id-op'] return data end function p.render(data) -- Renders the userbox html using the content of the data table. -- Render the div tag html. local root = mw.html.create('div') root :css('float', data.float) :css('border', (data.borderWidth or '') .. ' solid ' .. (data.borderColor or '')) :css('margin', '1px') :css('width', data.width) :addClass('wikipediauserbox') :addClass(data.bodyClass) -- Render the table tag html. local tableroot = root:tag('table') tableroot :attr('role', 'presentation') :css('border-collapse', 'collapse') :css('width', data.width) :css('margin-bottom', '0') :css('margin-top', '0') :css('background', data.backgroundColor) :css('color', 'inherit') -- Render the id html. local tablerow = tableroot:tag('tr') if data.showId then tablerow:tag('td') :css('border', '0') :css('width', data.idWidth) :css('height', data.idHeight) :css('background', data.idBackgroundColor) :css('text-align', data.idTextAlign) :css('font-size', data.idFontSize .. 'pt') :css('font-weight', 'bold') :css('color', data.idColor) :css('padding', data.idPadding) :css('line-height', data.idLineHeight) :css('vertical-align', 'middle') :cssText(data.idOtherParams) :addClass(data.idClass) :wikitext(data.id) end -- Render the info html. tablerow:tag('td') :css('border', '0') :css('text-align', data.infoTextAlign) :css('font-size', data.infoFontSize) :css('padding', data.infoPadding) :css('height', data.infoHeight) :css('line-height', data.infoLineHeight) :css('color', data.infoColor) :css('vertical-align', 'middle') :cssText(data.infoOtherParams) :addClass(data.infoClass) :wikitext(data.info) -- Render the second id html. if data.showId2 then tablerow:tag('td') :css('border', '0') :css('width', data.id2Width) :css('height', data.id2Height) :css('background', data.id2BackgroundColor) :css('text-align', data.id2TextAlign) :css('font-size', data.id2FontSize .. 'pt') :css('font-weight', 'bold') :css('color', data.id2Color) :css('padding', data.id2Padding) :css('line-height', data.id2LineHeight) :css('vertical-align', 'middle') :cssText(data.id2OtherParams) :wikitext(data.id2) end local title = mw.title.getCurrentTitle() if (title.namespace == 2) and not title.text:match("/") then return tostring(root) -- regular user page elseif title.namespace == 14 then return tostring(root) -- category elseif title.isTalkPage then return tostring(root) -- talk page end local legible = true local contrast = require('Module:Color contrast')._ratio local function has_text(wikitext) wikitext = wikitext:gsub("]]", "|]]") wikitext = wikitext:gsub("%[%[%s*[Mm][Ee][Dd][Ii][Aa]%s*:[^|]-(|.-)]]", "") wikitext = wikitext:gsub("%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:[^|]-(|.-)]]", "") wikitext = wikitext:gsub("%[%[%s*[Ff][Ii][Ll][Ee]%s*:[^|]-(|.-)]]", "") return mw.text.trim(wikitext) ~= "" end if contrast { data.infoColor, data.backgroundColor, error = 0 } < 4.5 then legible = false end -- For bold text >= 14pt, requirement is only 3. local idContrastThreshold = 4.5 local id2ContrastThreshold = 4.5 if (data.idFontSize or 0) >= 14 then idContrastThreshold = 3 end if (data.id2FontSize or 0) >= 14 then id2ContrastThreshold = 3 end if data.showId and contrast { data.idColor, data.idBackgroundColor, error = 0 } < idContrastThreshold then if has_text(data.id or "") then legible = false end end if data.showId2 and contrast { data.id2Color, data.id2BackgroundColor, error = 0 } < id2ContrastThreshold then if has_text(data.id2 or "") then legible = false end end if not legible then root:wikitext('[[Category:Userboxes with insufficient color contrast]]') end return tostring(root) end function p.categories(args, page) -- Gets categories from [[Module:Category handler]]. -- The page parameter makes the function act as though the module was being called from that page. -- It is included for testing purposes. local cats = {} cats[#cats + 1] = args.usercategory cats[#cats + 1] = args.usercategory2 cats[#cats + 1] = args.usercategory3 cats[#cats + 1] = args.usercategory4 cats[#cats + 1] = args.usercategory5 -- Get the title object local title if page then title = mw.title.new(page) else title = mw.title.getCurrentTitle() end -- Build category handler arguments. local chargs = {} chargs.page = page chargs.nocat = args.nocat chargs.main = '[[Category:Pages with templates in the wrong namespace]]' if args.notcatsubpages then chargs.subpage = 'no' end -- User namespace. local user = '' for i, cat in ipairs(cats) do user = user .. makeCat(cat) end chargs.user = user -- Template namespace. local basepage = title.baseText local template = '' for i, cat in ipairs(cats) do template = template .. makeCat(cat, ' ' .. basepage) end chargs.template = template return categoryHandler(chargs) end return p sp62xix66w9upayfcy40idgqzye8id8 Modul:Category handler 828 1101 4619 2024-08-16T00:01:49Z Wheatley2 185 Mencipta laman baru dengan kandungan '-------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and...' 4619 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases -- -- are supported, and namespace names are detected automatically for -- -- the local wiki. This module requires [[Module:Namespace detect]] -- -- and [[Module:Yesno]] to be available on the local wiki. It can be -- -- configured for different wikis by altering the values in -- -- [[Module:Category handler/config]], and pages can be blacklisted -- -- from categorisation by using [[Module:Category handler/blacklist]]. -- -- -- -------------------------------------------------------------------------------- -- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s else return nil end else return s end end -------------------------------------------------------------------------------- -- CategoryHandler class -------------------------------------------------------------------------------- local CategoryHandler = {} CategoryHandler.__index = CategoryHandler function CategoryHandler.new(data, args) local obj = setmetatable({ _data = data, _args = args }, CategoryHandler) -- Set the title object do local pagename = obj:parameter('demopage') local success, titleObj if pagename then success, titleObj = pcall(mw.title.new, pagename) end if success and titleObj then obj.title = titleObj if titleObj == mw.title.getCurrentTitle() then obj._usesCurrentTitle = true end else obj.title = mw.title.getCurrentTitle() obj._usesCurrentTitle = true end end -- Set suppression parameter values for _, key in ipairs{'nocat', 'categories'} do local value = obj:parameter(key) value = trimWhitespace(value, true) obj['_' .. key] = yesno(value) end do local subpage = obj:parameter('subpage') local category2 = obj:parameter('category2') if type(subpage) == 'string' then subpage = mw.ustring.lower(subpage) end if type(category2) == 'string' then subpage = mw.ustring.lower(category2) end obj._subpage = trimWhitespace(subpage, true) obj._category2 = trimWhitespace(category2) -- don't remove blank values end return obj end function CategoryHandler:parameter(key) local parameterNames = self._data.parameters[key] local pntype = type(parameterNames) if pntype == 'string' or pntype == 'number' then return self._args[parameterNames] elseif pntype == 'table' then for _, name in ipairs(parameterNames) do local value = self._args[name] if value ~= nil then return value end end return nil else error(string.format( 'invalid config key "%s"', tostring(key) ), 2) end end function CategoryHandler:isSuppressedByArguments() return -- See if a category suppression argument has been set. self._nocat == true or self._categories == false or ( self._category2 and self._category2 ~= self._data.category2Yes and self._category2 ~= self._data.category2Negative ) -- Check whether we are on a subpage, and see if categories are -- suppressed based on our subpage status. or self._subpage == self._data.subpageNo and self.title.isSubpage or self._subpage == self._data.subpageOnly and not self.title.isSubpage end function CategoryHandler:shouldSkipBlacklistCheck() -- Check whether the category suppression arguments indicate we -- should skip the blacklist check. return self._nocat == false or self._categories == true or self._category2 == self._data.category2Yes end function CategoryHandler:matchesBlacklist() if self._usesCurrentTitle then return self._data.currentTitleMatchesBlacklist else mShared = mShared or require('Module:Category handler/shared') return mShared.matchesBlacklist( self.title.prefixedText, mw.loadData('Module:Category handler/blacklist') ) end end function CategoryHandler:isSuppressed() -- Find if categories are suppressed by either the arguments or by -- matching the blacklist. return self:isSuppressedByArguments() or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist() end function CategoryHandler:getNamespaceParameters() if self._usesCurrentTitle then return self._data.currentTitleNamespaceParameters else if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end return mShared.getNamespaceParameters( self.title, mappings ) end end function CategoryHandler:namespaceParametersExist() -- Find whether any namespace parameters have been specified. -- We use the order "all" --> namespace params --> "other" as this is what -- the old template did. if self:parameter('all') then return true end if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end for ns, params in pairs(mappings) do for i, param in ipairs(params) do if self._args[param] then return true end end end if self:parameter('other') then return true end return false end function CategoryHandler:getCategories() local params = self:getNamespaceParameters() local nsCategory for i, param in ipairs(params) do local value = self._args[param] if value ~= nil then nsCategory = value break end end if nsCategory ~= nil or self:namespaceParametersExist() then -- Namespace parameters exist - advanced usage. if nsCategory == nil then nsCategory = self:parameter('other') end local ret = {self:parameter('all')} local numParam = tonumber(nsCategory) if numParam and numParam >= 1 and math.floor(numParam) == numParam then -- nsCategory is an integer ret[#ret + 1] = self._args[numParam] else ret[#ret + 1] = nsCategory end if #ret < 1 then return nil else return table.concat(ret) end elseif self._data.defaultNamespaces[self.title.namespace] then -- Namespace parameters don't exist, simple usage. return self._args[1] end return nil end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- Used for testing purposes. return { CategoryHandler = CategoryHandler } end function p._main(args, data) data = data or mw.loadData('Module:Category handler/data') local handler = CategoryHandler.new(data, args) if handler:isSuppressed() then return nil end return handler:getCategories() end function p.main(frame, data) data = data or mw.loadData('Module:Category handler/data') local args = require('Module:Arguments').getArgs(frame, { wrappers = data.wrappers, valueFunc = function (k, v) v = trimWhitespace(v) if type(k) == 'number' then if v ~= '' then return v else return nil end else return v end end }) return p._main(args, data) end return p letwavu3yvlayfzew66uuwixmwebq5b Templat:User en 10 1102 4620 2024-08-16T00:02:12Z Wheatley2 185 Mencipta laman baru dengan kandungan '{{userbox-level | level = | id = [[English language|en]] | info = This user is a '''[[:Category:User en-N|native speaker]]''' of the '''[[English&nbsp;language]]'''. | nocat = {{{nocat|false}}} | usercategory = User en-N }}<noinclude> {{Documentation|Template:User x}} </noinclude>' 4620 wikitext text/x-wiki {{userbox-level | level = | id = [[English language|en]] | info = This user is a '''[[:Category:User en-N|native speaker]]''' of the '''[[English&nbsp;language]]'''. | nocat = {{{nocat|false}}} | usercategory = User en-N }}<noinclude> {{Documentation|Template:User x}} </noinclude> b106f07xu6zbja3rk6m5kjho3mx8dlf Modul:Category handler/data 828 1103 4621 2024-08-16T00:02:37Z Wheatley2 185 Mencipta laman baru dengan kandungan '-- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared...' 4621 Scribunto text/plain -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( title.prefixedText, blacklist ) d3k4mala4c34gh798cnn5mw1hklhfrs Modul:Category handler/config 828 1104 4622 2024-08-16T00:03:14Z Wheatley2 185 Mencipta laman baru dengan kandungan '-------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. ---------...' 4622 Scribunto text/plain -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- foo = 'parameter name', -- -- -- -- To add multiple names, you can use this format: -- -- -- -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, -- -------------------------------------------------------------------------------- cfg.parameters = { -- The nocat and categories parameter suppress -- categorisation. They are used with Module:Yesno, and work as follows: -- -- cfg.nocat: -- Result of yesno() Effect -- true Categorisation is suppressed -- false Categorisation is allowed, and -- the blacklist check is skipped -- nil Categorisation is allowed -- -- cfg.categories: -- Result of yesno() Effect -- true Categorisation is allowed, and -- the blacklist check is skipped -- false Categorisation is suppressed -- nil Categorisation is allowed nocat = 'nocat', categories = 'categories', -- The parameter name for the legacy "category2" parameter. This skips the -- blacklist if set to the cfg.category2Yes value, and suppresses -- categorisation if present but equal to anything other than -- cfg.category2Yes or cfg.category2Negative. category2 = 'category2', -- cfg.subpage is the parameter name to specify how to behave on subpages. subpage = 'subpage', -- The parameter for data to return in all namespaces. all = 'all', -- The parameter name for data to return if no data is specified for the -- namespace that is detected. other = 'other', -- The parameter name used to specify a page other than the current page; -- used for testing and demonstration. demopage = 'page', } -------------------------------------------------------------------------------- -- Parameter values -- -- These are set values that can be used with certain parameters. Only one -- -- value can be specified, like this: -- -- -- -- cfg.foo = 'value name' -- -- -------------------------------------------------------------------------------- -- The following settings are used with the cfg.category2 parameter. Setting -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2 -- is present but equal to anything other than cfg.category2Yes or -- cfg.category2Negative then it supresses cateogrisation. cfg.category2Yes = 'yes' cfg.category2Negative = '¬' -- The following settings are used with the cfg.subpage parameter. -- cfg.subpageNo is the value to specify to not categorise on subpages; -- cfg.subpageOnly is the value to specify to only categorise on subpages. cfg.subpageNo = 'no' cfg.subpageOnly = 'only' -------------------------------------------------------------------------------- -- Default namespaces -- -- This is a table of namespaces to categorise by default. The keys are the -- -- namespace numbers. -- -------------------------------------------------------------------------------- cfg.defaultNamespaces = { [ 0] = true, -- main [ 6] = true, -- file [ 12] = true, -- help [ 14] = true, -- category [100] = true, -- portal [108] = true, -- book } -------------------------------------------------------------------------------- -- Wrappers -- -- This is a wrapper template or a list of wrapper templates to be passed to -- -- [[Module:Arguments]]. -- -------------------------------------------------------------------------------- cfg.wrappers = 'Template:Category handler' -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 6ga9hbq2pdwalsvx68i53dmbr421rq5 Modul:Category handler/shared 828 1105 4623 2024-08-16T00:03:54Z Wheatley2 185 Mencipta laman baru dengan kandungan '-- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappi...' 4623 Scribunto text/plain -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return require(dataPage).mappings end end function p.getNamespaceParameters(titleObj, mappings) -- We don't use title.nsText for the namespace name because it adds -- underscores. local mappingsKey if titleObj.isTalkPage then mappingsKey = 'talk' else mappingsKey = mw.site.namespaces[titleObj.namespace].name end mappingsKey = mw.ustring.lower(mappingsKey) return mappings[mappingsKey] or {} end return p omlsnhudxz6juptvtxz7ns97jutbzc5 Modul:Category handler/blacklist 828 1106 4625 4624 2024-08-16T00:04:48Z Wheatley2 185 4625 Scribunto text/plain -- This module contains the blacklist used by [[Module:Category handler]]. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested. return { 'Tekokon Laman$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$', -- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", } ivl884246teq3t3c6b2cnao5vah4ybx Pengguna:Wheatley2 2 1107 4626 2024-08-16T00:05:01Z Wheatley2 185 Mencipta laman baru dengan kandungan '{{Babel|en}}' 4626 wikitext text/x-wiki {{Babel|en}} 69zzznk7agsdkyvx5kpwfmatf7mi5vy Templat:Detect singular 10 1108 4628 2024-08-16T14:45:29Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:Detect singular|main}}<noinclude> {{documentation}} </noinclude>' 4628 wikitext text/x-wiki {{#invoke:Detect singular|main}}<noinclude> {{documentation}} </noinclude> 1m3tane3jctch6sxq6slm654yiblfzf Templat:Find country 10 1109 4629 2024-08-16T14:46:16Z Rombituon 59 Mencipta laman baru dengan kandungan '<includeonly>{{#if: {{{1|}}} | {{#invoke:Find country|main|string={{{1|}}}|match={{{match|}}}|nomatch={{{nomatch|}}}}} }}</includeonly><noinclude>{{Documentation}}</noinclude>' 4629 wikitext text/x-wiki <includeonly>{{#if: {{{1|}}} | {{#invoke:Find country|main|string={{{1|}}}|match={{{match|}}}|nomatch={{{nomatch|}}}}} }}</includeonly><noinclude>{{Documentation}}</noinclude> fv9ihqdzj12itpj5rigkuoj1wo1u01t Templat:Post-nominals 10 1110 4630 2024-08-16T14:48:30Z Rombituon 59 Mencipta laman baru dengan kandungan '<span class="noexcerpt nowraplinks" style="font-size:{{{size|85%}}}; font-weight:normal;"><!-- -->{{if empty|{{{unlinked|}}}|{{{list|}}}|{{{post-noms|}}}|{{for loop|{{#if:{{{sep|}}}{{{commas|}}}|<span style="font-size:14px;>&#44;</span>}}&#32;|call=post-nominals/{{{country|CAN}}}|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}|{{{17|}}}|{{{18|}}}|{{{1...' 4630 wikitext text/x-wiki <span class="noexcerpt nowraplinks" style="font-size:{{{size|85%}}}; font-weight:normal;"><!-- -->{{if empty|{{{unlinked|}}}|{{{list|}}}|{{{post-noms|}}}|{{for loop|{{#if:{{{sep|}}}{{{commas|}}}|<span style="font-size:14px;>&#44;</span>}}&#32;|call=post-nominals/{{{country|CAN}}}|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}|{{{17|}}}|{{{18|}}}|{{{19|}}}|{{{20|}}}|skipBlanks=yes}}}}<!-- --></span><!-- -->{{#if:{{{country|{{{unlinked|{{{list|{{{post-noms|<noinclude>1</noinclude>}}}}}}}}}}}}||[[Category:Pages using Template:Post-nominals with missing parameters]]}}<!-- -->{{#if:{{{unlinked|{{{list|{{{post-noms|}}}}}}}}}|[[Category:Pages using Template:Post-nominals with customized linking]] }}<noinclude>{{Documentation}}</noinclude> 532reyf4mo633b8r5d829vm5lhd9q5r Templat:For loop 10 1111 4631 2024-08-16T14:49:16Z Rombituon 59 Mencipta laman baru dengan kandungan '{{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>' 4631 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 26pm0milru0ru69zbzxe1y37xwy9bg7 Modul:For loop 828 1112 4632 2024-08-16T14:50:37Z Rombituon 59 Mencipta laman baru dengan kandungan '-- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variablePara...' 4632 Scribunto text/plain -- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variableParam = tonumber(variableParam) or variableParam or 1 -- fix for positional parameters local variableValPrefix = args.prefix or '' local variableValPostfix = args.postfix or '' local sep = args[1] or '' local constantArgs = p.getConstants(args) local variableVals = p.getVariableVals(args) local result = '' local addSeparator = false; for _, v in ipairs(variableVals) do v = mw.text.trim(v) if #v > 0 or not yesno(args.skipBlanks) then if addSeparator then result = result .. sep end addSeparator = true; local targs = constantArgs targs[variableParam] = variableValPrefix .. v .. variableValPostfix if calltemplates then local output = p.callTemplate(template, targs) if #mw.text.trim(output) == 0 then addSeparator = false end result = result .. output else local makeTemplate = require('Module:Template invocation').invocation result = result .. makeTemplate(template, targs) end end end return result end function p.getConstants(args) local constantArgNums = p.getArgNums(args, 'pc', 'n') local constantArgs = {} for _, num in ipairs(constantArgNums) do local keyArg = 'pc' .. tostring(num) .. 'n' local valArg = 'pc' .. tostring(num) .. 'v' local key = args[keyArg] key = tonumber(key) or key local value = args[valArg] constantArgs[key] = value end return constantArgs end function p.getVariableVals(args) local variableVals = {} if args.start or args.stop or args.by then if args[2] then error("Both start/stop/by and numbered parameters specified") end local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do variableVals [#variableVals + 1] = i end else for i, v in ipairs(args) do if i ~= 1 then variableVals[i - 1] = v end end end return variableVals end function p.getArgNums(args, prefix, suffix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix and suffix. local nums = {} local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' for k, _ in pairs(args) do local num = tostring(k):match(pattern) if num then nums[#nums + 1] = tonumber(num) end end table.sort(nums) return nums end function p.callTemplate(template, targs) return mw.getCurrentFrame():expandTemplate{title = template, args = targs} end return p 97htb8pbha3ivt9w9d0odbcxo0moteq Modul:Find country 828 1113 4633 2024-08-16T14:52:20Z Rombituon 59 Mencipta laman baru dengan kandungan '--[[ v1.00 Test the string against the list of countries/continents. Return the first word which matches a country/continent name ... unless the "match=" parameter specifies a different match. If there is no match, then return an empty string ... unless the "nomatch" parameter specifies something different ]] local getArgs = require('Module:Arguments').getArgs local p = {} -- config local nomatch = "" local matchnum = 1 loca...' 4633 Scribunto text/plain --[[ v1.00 Test the string against the list of countries/continents. Return the first word which matches a country/continent name ... unless the "match=" parameter specifies a different match. If there is no match, then return an empty string ... unless the "nomatch" parameter specifies something different ]] local getArgs = require('Module:Arguments').getArgs local p = {} -- config local nomatch = "" local matchnum = 1 local countryList = { 'South Africa', 'the Central African Republic', 'Central African Republic', 'Africa', 'Antarctica', 'Central Asia', 'South Asia', 'South East Asia', 'Southeast Asia', 'Asia', 'the Caribbean', 'Caribbean', 'Eurasia', 'Europe', 'the Middle East', 'Middle East', 'Central America', 'North America', 'South America', 'Oceania', 'the Americas', 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'the Austrian Empire', 'Austrian Empire', 'Austria-Hungary', 'Austria', 'Azerbaijan', 'the Bahamas', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'the Cayman Islands', 'Cayman Islands', 'Chad', 'Chile', "the People's Republic of China", "People's Republic of China", 'China PR', 'PR China', 'China', 'Colombia', 'Comoros', 'the Republic of the Congo', 'the Democratic Republic of the Congo', 'Democratic Republic of the Congo', 'Congo DR', 'DR Congo', 'DRC', 'the Congo', 'Congo', 'Cook Islands', 'Costa Rica', 'Croatia', 'Cuba', 'Curaçao', 'Curacao', 'Cyprus', 'the Czech Republic', 'Czech Republic', 'Czechia', 'Denmark', 'Djibouti', 'the Dominican Republic', 'Dominican Republic', 'Dominica', 'East Timor', 'Timor-Leste', 'Ecuador', 'Egypt', 'El Salvador', 'England', 'Eritrea', 'Estonia', 'Eswatini', 'Ethiopia', 'the Falkland Islands', 'Falkland Islands', 'the Faroe Islands', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'Gabon', 'the Gambia', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Great Britain', 'Britain', 'Greece', 'Grenada', 'Guam', 'Guatemala', 'Papua New Guinea', 'Equatorial Guinea', 'Guinea-Bissau', 'Guinea', 'Guyana', 'Haiti', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Northern Ireland', 'the Republic of Ireland', 'Republic of Ireland', 'Ireland', 'Israel', 'Italy', 'Ivory Coast', "Côte d'Ivoire", 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Kosovo', 'the Republic of Kosovo', 'Republic of Kosovo', 'Kuwait', 'Kyrgyzstan', 'the Kyrgyz Republic', 'Kyrgyz Republic', "the Lao People's Democratic Republic", "Lao People's Democratic Republic", 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'the Republic of Macedonia', 'Republic of Macedonia', 'North Macedonia', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'the Maldives', 'Maldives', 'Mali', 'Malta', 'the Marshall Islands', 'Marshall Islands', 'Mauritania', 'Mauritius', 'Mexico', 'the Federated States of Micronesia', 'Federated States of Micronesia', 'Micronesia', 'FSM', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'the Netherlands', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Nigeria', 'Niger', 'North Korea', "the People's Democratic Republic of Korea", "the Democratic People's Republic of Korea", "Democratic People's Republic of Korea", "People's Democratic Republic of Korea", 'DPR Korea', 'Korea DPR', 'Norway', 'Oman', 'the Ottoman Empire', 'Ottoman Empire', 'Ottoman Egypt', 'Pakistan', 'Palau', 'Mandatory Palestine', 'Palestine', 'the Palestinian territories', 'Palestinian territories', 'Panama', 'Paraguay', 'Peru', 'the Philippines', 'Philippines', 'Poland', 'Portugal', 'Puerto Rico', 'the Spanish Virgin Islands', 'Spanish Virgin Islands', 'Qatar', 'Romania', 'the Russian Empire', 'Russian Empire', 'the Russian Federation', 'Russian Federation', 'Russia', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Western Samoa', 'Samoa', 'San Marino', 'São Tomé and Príncipe', 'São Tomé and Príncipe', 'Sao Tome and Principe', 'Saudi Arabia', 'Scotland', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'the Solomon Islands', 'Solomon Islands', 'Somalia', 'South Korea', 'the Republic of Korea', 'Korea Republic', 'South Sudan', 'Sudan', 'Spain', 'Sri Lanka', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria', 'Tahiti', 'the Republic of China', 'Republic of China', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Trinidad', 'Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'the United Arab Emirates', 'the UAE', 'the U.A.E.', 'United Arab Emirates', 'UAE', 'U.A.E.', 'the United Kingdom', 'United Kingdom', 'the UK', 'the U.K.', 'UK', 'U.K.', 'the United States of America', 'the United States', 'the USA', 'the U.S.A.', 'United States of America', 'United States', 'US', 'U.S.', 'USA', 'U.S.A.', 'America', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela', 'Vietnam', 'the British Virgin Islands', 'British Virgin Islands', 'UK Virgin Islands', 'U.K. Virgin Islands', 'the United States Virgin Islands', 'the US Virgin Islands', 'the U.S. Virgin Islands', 'United States Virgin Islands', 'US Virgin Islands', 'U.S. Virgin Islands', 'the Virgin Islands', 'Virgin Islands', 'Wales', 'Yemen', 'Zambia', 'Zimbabwe', 'Find country/testcases' } -- returns the name of a country that is found in the string -- ... or an empty string if there is no match function findcountryinstring(str) nMatches = 0 myMatches ={} str=" " .. str:gsub("^%s*(.-)%s*$", "%1") .. " " -- check agaist each country -- if there is a match, then return that country for i, thiscountry in ipairs(countryList) do if mw.ustring.find(str, thiscountry) then nMatches = nMatches + 1 myMatches[nMatches] = thiscountry end end if (nMatches == 0) then -- none of the title words matches a whole country return nomatch end if ((matchnum >= 1) and (matchnum <= nMatches)) then return myMatches[matchnum] end if (matchnum < 0) then matchnum = matchnum + 1 -- so that -1 is the last match etc if ((matchnum + nMatches) >= 1) then return myMatches[matchnum + nMatches] end end -- if we get here, we have not found a match at the position specified by "matchnum" return nomatch end function p.main(frame) local args = getArgs(frame) return p._main(args) end function p._main(args) if (args['nomatch'] ~= nil) then nomatch = args['nomatch'] end -- by default, we return the first match -- but the optional "C" paarmeter sets the "matchnum" variable, which -- * for a positive matchnum "n", returns the nth match if it exists -- * for a positive matchnum "n", returns (if it exists) the nth match -- counting backwards from the end. -- So "match=-1" returns the last match -- and "match=-3" returns the 3rd-last match if (args['match'] ~= nil) then matchnum = tonumber(args['match']) if ((matchnum == nil) or (matchnum == 0)) then matchnum = 1 end end -- by default, we use the current page -- but if the "string=" parameters is supplied, we use that -- so we try the parameter first thispagename = nil if ((args['string'] ~= nil) and (args['string'] ~= "")) then -- we have a non-empty "string" parameter, so we use it thisstring = args['string'] else -- get the page title thispage = mw.title.getCurrentTitle() thisstring = thispage.text; end -- now check the pagename to try to find a country result = findcountryinstring(thisstring) if (result == "") then return nomatch end return result end return p mkznkqj59mobs198rtdxfhol49hgkys Templat:Post-nominals/MYS 10 1114 4634 2024-08-16T14:53:39Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#switch: {{{1}}} | SP = [[Grand Knight of Valour#S.P.|SP]] | DKM = [[Order of the Royal Family of Malaysia#Recipients|DKM]] | DMN = [[Order of the Crown of the Realm#Recipients|DMN]] | DMN(K) = [[Order of the Crown of the Realm#Honorary Recipients|DMN(K)]] | SMN = [[Order of the Defender of the Realm#Grand Commanders (S.M.N.)|SMN]] | SMN(K) = [[Order of the Defender of the Realm#Honorary Grand Commanders (S.M.N. (K))|SMN(K)]] | PMN...' 4634 wikitext text/x-wiki {{#switch: {{{1}}} | SP = [[Grand Knight of Valour#S.P.|SP]] | DKM = [[Order of the Royal Family of Malaysia#Recipients|DKM]] | DMN = [[Order of the Crown of the Realm#Recipients|DMN]] | DMN(K) = [[Order of the Crown of the Realm#Honorary Recipients|DMN(K)]] | SMN = [[Order of the Defender of the Realm#Grand Commanders (S.M.N.)|SMN]] | SMN(K) = [[Order of the Defender of the Realm#Honorary Grand Commanders (S.M.N. (K))|SMN(K)]] | PMN = [[Order of the Defender of the Realm#Commanders (P.M.N.)|PMN]] | PMN(K) = [[Order of the Defender of the Realm#Grand Commanders (P.M.N. (K))|PMN(K)]] | JMN = [[Order of the Defender of the Realm#Companion|JMN]] | KMN = [[Order of the Defender of the Realm#Officer|KMN]] | AMN = [[Order of the Defender of the Realm#Member|AMN]] | PPN = [[Order of the Defender of the Realm#Medal|PPN]] | SSM = [[Order of Loyalty to the Crown of Malaysia#Grand Commanders (S.S.M.)|SSM]] | SSM(K) = [[Order of Loyalty to the Crown of Malaysia#Honorary Grand Commanders (S.S.M. (K))|SSM(K)]] | PSM = [[Order of Loyalty to the Crown of Malaysia#Commanders (P.S.M.)|PSM]] | PSM(K) = [[Order of Loyalty to the Crown of Malaysia#Honorary Commanders (P.S.M. (K))|PSM(K)]] | JSM = [[Order of Loyalty to the Crown of Malaysia#Companion|JSM]] | DB = [[Order of Merit (Malaysia)#Recipients|DB]] | PJN = [[Order of Meritorious Service#Recipients|PJN]] | PJN(K) = [[Order of Meritorious Service#Honorary Recipients|PJN(K)]] | PSD = [[Order of Loyalty to the Royal Family of Malaysia#Commanders (P.S.D.)|PSD]] | JSD = [[Order of Loyalty to the Royal Family of Malaysia#Companion|JSD]] | KSD = [[Order of Loyalty to the Royal Family of Malaysia#Officer|KSD]] | BSD = [[Order of Loyalty to the Royal Family of Malaysia#Herald|BSD]] | PGAT = [[Orders, decorations, and medals of Malaysia#Military orders and medals|PGAT]] | PSAT = [[Orders, decorations, and medals of Malaysia#Military orders and medals|PSAT]] | PAT = [[Orders, decorations, and medals of Malaysia#Military orders and medals|PAT]] | KAT = [[Orders, decorations, and medals of Malaysia#Military orders and medals|KAT]] | BAT = [[Orders, decorations, and medals of Malaysia#Military orders and medals|BAT]] | PGB = [[Star of the Commander of Valour#List of recipients|PGB]] | PPS = [[Orders, decorations, and medals of Malaysia#Military orders and medals|PPS]] | PPA = [[General Service Medal (Malaysia)|PPA]] | PNBB = [[United Nations Medal|PNBB]] | PJM = [[Malaysian Service Medal|PJM]] | PGPP = [[Orders, decorations, and medals of Malaysia#Police orders and medals|PGPP]] | PSPP = [[Orders, decorations, and medals of Malaysia#Police orders and medals|PSPP]] | PPP = [[Orders, decorations, and medals of Malaysia#Police orders and medals|PPP]] | WPP = [[Orders, decorations, and medals of Malaysia#Police orders and medals|WPP]] | BPP = [[Orders, decorations, and medals of Malaysia#Police orders and medals|BPP]] | PPM = [[Orders, decorations, and medals of Malaysia#Honorary orders and medals|PPM]] | PKN = [[Orders, decorations, and medals of Malaysia#Honorary orders and medals|PKN]] | KPK = [[Orders, decorations, and medals of Malaysia#Honorary orders and medals|KPK]] | SUMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|SUMW]] | SMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|SMW]] | PMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|PMW]] | JMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|JMW]] | KMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|KMW]] | AMW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|AMW]] | PPW = [[Orders, decorations, and medals of the Malaysian states and federal territories#Federal Territories|PPW]] | SPSM = [[List of post-nominal letters (Malacca)|SPSM]] | DUNM = [[Premier and Exalted Order of Malacca#Recipients|DUNM]] | DGSM = [[Exalted Order of Malacca#Grand Commander (D.G.S.M.)|DGSM]] | DCSM = [[Exalted Order of Malacca#Knight Commander (D.C.S.M.)|DCSM]] | DMSM = [[Exalted Order of Malacca#Companion Class I (D.M.S.M.)|DMSM]] | DPSM = [[Exalted Order of Malacca#Companion Class II|DPSM]] | DSM = [[Exalted Order of Malacca#Member|DSM]] | PJK (Malacca) = [[List of post-nominal letters (Malacca)|PJK]] | PBM = [[List of post-nominal letters (Malacca)|PBM]] | DUPN = [[Order of the Defender of State#Knight Grand Commander (D.U.P.N.)|DUPN]] | DPPN = [[Order of the Defender of State#Knight Commander (D.P.P.N.)|DPPN]] | DGPN = [[Order of the Defender of State#Commander (D.G.P.N.)|DGPN]] | DMPN = [[Order of the Defender of State#Companion (D.M.P.N.)|DMPN]] | DSPN = [[Order of the Defender of State#Officer|DSPN]] | DJN = [[Order of the Defender of State#Member|DJN]] | SPDK = [[Order of Kinabalu#Grand Commander|SPDK]] | PGDK = [[Order of Kinabalu#Commander|PGDK]] | ASDK = [[Order of Kinabalu#Companion|ASDK]] | ADK = [[Order of Kinabalu#Member|ADK]] | BSK = [[Order of Kinabalu|BSK]] | BK = [[Order of Kinabalu|BK]] | SK = [[Order of Kinabalu|SK]] | SBS = [[Most Exalted Order of the Star of Sarawak#Satria Bintang Sarawak (S.B.S.)|SBS]] | PNBS = [[Most Exalted Order of the Star of Sarawak#Panglima Negara Bintang Sarawak (P.N.B.S.)|PNBS]] | PSBS = [[Most Exalted Order of the Star of Sarawak#Panglima Setia Bintang Sarawak (P.S.B.S.)|PSBS]] | JBS = [[Most Exalted Order of the Star of Sarawak#Johan Bintang Sarawak (J.B.S.)|JBS]] | PBS = [[Most Exalted Order of the Star of Sarawak#Pegawai Bintang Sarawak (P.B.S.)|PBS]] | ABS = [[Most Exalted Order of the Star of Sarawak#Ahli Bintang Sarawak (A.B.S.)|ABS]] | BBS = [[Most Exalted Order of the Star of Sarawak#Bentara Bintang Sarawak (B.B.S.)|BBS]] | DP = [[Order of the Star of Hornbill Sarawak#Datuk Patinggi Bintang Kenyalang (D.P.)|DP]] | DA = [[Order of the Star of Hornbill Sarawak#Datuk Amar Bintang Kenyalang (D.A.)|DA]] | PGBK = [[Order of the Star of Hornbill Sarawak#Panglima Gemilang Bintang Kenyalang (P.G.B.K.)|PGBK]] | JBK = [[Order of the Star of Hornbill Sarawak#Johan Bintang Kenyalang (J.B.K.)|JBK]] | PBK = [[Order of the Star of Hornbill Sarawak#Pegawai Bintang Kenyalang (P.B.K.)|PBK]] | ABK = [[Order of the Star of Hornbill Sarawak#Ahli Bintang Kenyalang (A.B.K.)|ABK]] | DJBS = [[Order of Meritorious Service to Sarawak#Recipients|DJBS]] | JPC = [[Civil Administration Medal|JPC]] | PPC = [[Civil Administration Medal|PPC]] | PPB = [[Civil Administration Medal|PPB]] | PPT (Sarawak) = [[Civil Administration Medal|PPT]] | DKI (Johor) = [[Royal Family Order of Johor|DK I (Johor)]] | DKII (Johor) = [[Royal Family Order of Johor|DK II (Johor)]] | DK I (Johor) = [[Royal Family Order of Johor|DK I (Johor)]] | DK II (Johor) = [[Royal Family Order of Johor|DK II (Johor)]] | SPMJ = [[Order of the Crown of Johor#Knight Grand Commander (S.P.M.J)|SPMJ]] | DPMJ = [[Order of the Crown of Johor#Knight Commander (D.P.M.J)|DPMJ]] | SMJ = [[Order of the Crown of Johor#Companion (S.M.J.)|SMJ]] | SSIJ = [[Order of Loyalty of Sultan Ismail of Johor#Knight Grand Companion (S.S.I.J)|SSIJ]] | DSIJ = [[Order of Loyalty of Sultan Ismail of Johor|DSIJ]] | SMIJ = [[Order of Sultan Ibrahim of Johor#The Honourable Grand Knight (S.M.I.J.)|SMIJ]] | DMIJ = [[Order of Sultan Ibrahim of Johor|DMIJ]] | SIJ = [[Order of Sultan Ibrahim of Johor|SIJ]] | PJP (Johor) = [[List of post-nominal letters (Johor)|PJP]] | PLP (Johor) = [[List of post-nominal letters (Johor)|PLP]] | PIS = [[List of post-nominal letters (Johor)|PIS]] | BSI = [[List of post-nominal letters (Johor)|BSI]] | PSI = [[List of post-nominal letters (Johor)|PSI]] | BKK = [[State of Kedah Star of Valour|BKK]] | DK (Kedah) = [[Royal Family Order of Kedah#Recipients|DK (Kedah)]] | DKH = [[Halimi Family Order of Kedah|DKH]] | DUK = [[Kedah Supreme Order of Merit#Recipients|DUK]] | DMK = [[Supreme Order of Sri Mahawangsa#Recipients|DMK]] | BPK = [[State of Kedah Star of Gallantry|BPK]] | SSSK = [[Order of Loyalty to Sultan Sallehuddin of Kedah#Grand Commander|SSSK]] | DPSS = [[Order of Loyalty to Sultan Sallehuddin of Kedah#Knight Commander|DPSS]] | DSSS = [[Order of Loyalty to Sultan Sallehuddin of Kedah#Knight Companion|DSSS]] | SSS = [[Order of Loyalty to Sultan Sallehuddin of Kedah#Companion|SSS]] | BSS = [[Order of Loyalty to Sultan Sallehuddin of Kedah#Star|BSS]] | SHMS = [[Order of Loyalty to Sultan Abdul Halim Mu'adzam Shah|SHMS]] | DHMS = [[Order of Loyalty to Sultan Abdul Halim Mu'adzam Shah|DHMS]] | SMS (Kedah) = [[Order of Loyalty to Sultan Abdul Halim Mu'adzam Shah|SMS]] | BMS = [[Order of Loyalty to Sultan Abdul Halim Mu'adzam Shah|BMS]] | SGMK = [[Glorious Order of the Crown of Kedah|SGMK]] | DGMK = [[Glorious Order of the Crown of Kedah|DGMK]] | GMK = [[Glorious Order of the Crown of Kedah|GMK]] | AGK = [[Glorious Order of the Crown of Kedah|AGK]] | SSPK = [[:ms:Darjah kebesaran negeri Kedah|SSPK]] | DSPK = [[:ms:Darjah kebesaran negeri Kedah|DSPK]] | DDSP = [[:ms:Darjah kebesaran negeri Kedah|DDSP]] | ASP = [[:ms:Darjah kebesaran negeri Kedah|AGK]] | SPMK (Kedah) = [[Exalted Order of the Crown of Kedah|SPMK]] | DPMK (Kedah) = [[Exalted Order of the Crown of Kedah|DPMK]] | SMK = [[Exalted Order of the Crown of Kedah|SMK]] | AMK = [[Exalted Order of the Crown of Kedah|AMK]] | SSDK = [[Order of Loyalty to the Royal House of Kedah|SSDK]] | DSDK = [[Order of Loyalty to the Royal House of Kedah|DSDK]] | SDK = [[Order of Loyalty to the Royal House of Kedah|SDK]] | PPK = [[Orders, decorations, and medals of the Malaysian states and federal territories#Kedah|PPK]] | PSB = [[Orders, decorations, and medals of the Malaysian states and federal territories#Kedah|PSB]] | BCK = [[List of post-nominal letters (Kedah)|BCK]] | PCK = [[List of post-nominal letters (Kedah)|PCK]] | BKM = [[Orders, decorations, and medals of the Malaysian states and federal territories#Kedah|BKM]] | PJK (Kedah) = [[Orders, decorations, and medals of the Malaysian states and federal territories#Kedah|PJK]] | DK (Kelantan) = [[Royal Family Order of Kelantan|DK (Kelantan)]] | SPMK (Kelantan) = [[List of post-nominal letters (Kelantan)|SPMK]] | DPMK (Kelantan) = [[List of post-nominal letters (Kelantan)|DPMK]] | PMK = [[List of post-nominal letters (Kelantan)|PMK]] | SJMK = [[List of post-nominal letters (Kelantan)|SJMK]] | DJMK = [[List of post-nominal letters (Kelantan)|DJMK]] | JMK = [[List of post-nominal letters (Kelantan)|JMK]] | SPKK = [[List of post-nominal letters (Kelantan)|SPKK]] | DPKK = [[List of post-nominal letters (Kelantan)|DPKK]] | PKK = [[List of post-nominal letters (Kelantan)|PKK]] | SPSK = [[List of post-nominal letters (Kelantan)|SPSK]] | DPSK = [[List of post-nominal letters (Kelantan)|DPSK]] | PSK = [[List of post-nominal letters (Kelantan)|PSK]] | BSK = [[List of post-nominal letters (Kelantan)|BSK]] | ASK = [[List of post-nominal letters (Kelantan)|ASK]] | SPJK = [[List of post-nominal letters (Kelantan)|SPJK]] | DPJK = [[List of post-nominal letters (Kelantan)|DPJK]] | PJK (Kelantan) = [[List of post-nominal letters (Kelantan)|PJK]] | BJK = [[List of post-nominal letters (Kelantan)|BJK]] | AJK = [[List of post-nominal letters (Kelantan)|AJK]] | PYGP = [[List of post-nominal letters (Kelantan)|PYGP]] | DKNS = [[Royal Family Order of Negeri Sembilan#Recipients|DKNS]] | DNS = [[List of post-nominal letters (Negeri Sembilan)|DNS]] | DTNS = [[List of post-nominal letters (Negeri Sembilan)|DTNS]] | DMNS = [[List of post-nominal letters (Negeri Sembilan)|DMNS]] | DKYR = [[List of post-nominal letters (Negeri Sembilan)|DKYR]] | SUNS = [[List of post-nominal letters (Negeri Sembilan)|SUNS]] | SPNS = [[List of post-nominal letters (Negeri Sembilan)|SPNS]] | SSNS = [[List of post-nominal letters (Negeri Sembilan)|SSNS]] | DPNS = [[List of post-nominal letters (Negeri Sembilan)|DPNS]] | DSNS = [[List of post-nominal letters (Negeri Sembilan)|DSNS]] | DNS = [[List of post-nominal letters (Negeri Sembilan)|DNS]] | ANS = [[List of post-nominal letters (Negeri Sembilan)|ANS]] | SSTM = [[List of post-nominal letters (Negeri Sembilan)|SSTM]] | DSTM = [[List of post-nominal letters (Negeri Sembilan)|DSTM]] | DTM = [[List of post-nominal letters (Negeri Sembilan)|DTM]] | STM = [[List of post-nominal letters (Negeri Sembilan)|STM]] | BTM = [[List of post-nominal letters (Negeri Sembilan)|BTM]] | DBNS = [[List of post-nominal letters (Negeri Sembilan)|DBNS]] | SPTJ = [[List of post-nominal letters (Negeri Sembilan)|SPTJ]] | DPTJ = [[List of post-nominal letters (Negeri Sembilan)|DPTJ]] | DPT = [[List of post-nominal letters (Negeri Sembilan)|DPT]] | PPT (Negeri Sembilan) = [[List of post-nominal letters (Negeri Sembilan)|PPT]] | DKP (Pahang) = [[List of post-nominal letters (Pahang)|DKP]] | DKI (Pahang) = [[Family Order of the Crown of Indra of Pahang|DK I (Pahang)]] | DKII (Pahang) = [[Family Order of the Crown of Indra of Pahang|DK II (Pahang)]] | DK I (Pahang) = [[Family Order of the Crown of Indra of Pahang|DK I (Pahang)]] | DK II (Pahang) = [[Family Order of the Crown of Indra of Pahang|DK II (Pahang)]] | SAAS = [[Orders, decorations, and medals of the Malaysian states and federal territories#Pahang|SAAS]] | SDSA = [[Grand Royal Order of Sultan Ahmad Shah of Pahang#Recipients|SDSA]] | SSAP = [[Order of Sultan Ahmad Shah of Pahang#Grand Knights (S.S.A.P.)|SSAP]] | DSAP = [[Order of Sultan Ahmad Shah of Pahang#Knight Companion (D.S.A.P.)|DSAP]] | SAP = [[Order of Sultan Ahmad Shah of Pahang|SAP]] | AAP = [[Order of Sultan Ahmad Shah of Pahang|AAP]] | SIMP = [[Order of the Crown of Pahang#Grand Knights (S.I.M.P.)|SIMP]] | DIMP = [[Order of the Crown of Pahang#Knight Companions (D.I.M.P.)|DIMP]] | SMP (Pahang) = [[Order of the Crown of Pahang|SMP]] | AMP (Pahang) = [[Order of the Crown of Pahang|AMP]] | DK (Perak) = [[List of post-nominal letters (Perak)|DK (Perak)]] | DKSA = [[List of post-nominal letters (Perak)|DKSA]] | SPSA = [[List of post-nominal letters (Perak)|SPSA]] | DKA I = [[Azlanii Royal Family Order|DKA I]] | DKA II = [[Azlanii Royal Family Order|DKA II]] | DSA = [[Azlanii Royal Family Order|DSA]] | SPSN = [[Perak Family Order of Sultan Nazrin Shah|SPSN]] | SPCM = [[List of post-nominal letters (Perak)|SPCM]] | DPCM = [[List of post-nominal letters (Perak)|DPCM]] | PCM = [[List of post-nominal letters (Perak)|PCM]] | ACM = [[List of post-nominal letters (Perak)|ACM]] | SPTS = [[Order of Taming Sari#Knight Grand Commander (SPTS)|SPTS]] | DPTS = [[Order of Taming Sari#Knight Commander (DPTS)|DPTS]] | PTS = [[Order of Taming Sari#PTS]] | HTS = [[Order of Taming Sari#HTS]] | KTS = [[Order of Taming Sari#KTS]] | ATS = [[Order of Taming Sari#ATS]] | SPMP (Perak) = [[Order of the Perak State Crown#Knight Grand Commander (SPMP)|SPMP]] | DPMP (Perak) = [[Order of the Perak State Crown#Knight Commander (DPMP)|DPMP]] | PMP (Perak) = [[Order of the Perak State Crown|PMP]] | AMP (Perak) = [[Order of the Perak State Crown|AMP]] | PJK (Perak) = [[List of post-nominal letters (Perak)|PJK]] | PPT (Perak) = [[List of post-nominal letters (Perak)|PPT]] | DKP (Perlis) = [[List of post-nominal letters (Perlis)|DKP]] | DK (Perlis) = [[Perlis Family Order of the Gallant Prince Syed Putra Jamalullail#Recipients|DK (Perlis)]] | DBSJ = [[List of post-nominal letters (Perlis)|DBSJ]] | SSSJ = [[List of post-nominal letters (Perlis)|SSSJ]] | DSSJ = [[List of post-nominal letters (Perlis)|DSSJ]] | DSPJ = [[List of post-nominal letters (Perlis)|DSPJ]] | SPSJ = [[List of post-nominal letters (Perlis)|SPSJ]] | DWSJ = [[List of post-nominal letters (Perlis)|DWSJ]] | DPSJ = [[List of post-nominal letters (Perlis)|DPSJ]] | SSP = [[List of post-nominal letters (Perlis)|SSP]] | SSPJ = [[List of post-nominal letters (Perlis)|SSPJ]] | DSPJ = [[List of post-nominal letters (Perlis)|DSPJ]] | DPPJ = [[List of post-nominal letters (Perlis)|DPPJ]] | SPMP (Perlis) = [[List of post-nominal letters (Perlis)|SPMP]] | DPMP (Perlis) = [[List of post-nominal letters (Perlis)|DPMP]] | SMP (Perlis) = [[List of post-nominal letters (Perlis)|SMP]] | AMP (Perlis) = [[List of post-nominal letters (Perlis)|AMP]] | PMP = [[List of post-nominal letters (Perlis)|PMP]] | DKI (Selangor) = [[Royal Family Order of Selangor#Recipients|DK I (Selangor)]] | DKII (Selangor) = [[Royal Family Order of Selangor#Recipients|DK II (Selangor)]] | DK I (Selangor) = [[Royal Family Order of Selangor#Recipients|DK I (Selangor)]] | DK II (Selangor) = [[Royal Family Order of Selangor#Recipients|DK II (Selangor)]] | SPMS = [[Order of the Crown of Selangor|SPMS]] | DPMS = [[Order of the Crown of Selangor|DPMS]] | SMS (Selangor) = [[Order of the Crown of Selangor|SMS]] | AMS = [[Order of the Crown of Selangor|AMS]] | SSIS = [[Order of Sultan Sharafuddin Idris Shah|SSIS]] | DSIS = [[Order of Sultan Sharafuddin Idris Shah|DSIS]] | SIS = [[Order of Sultan Sharafuddin Idris Shah|SIS]] | AIS = [[Order of Sultan Sharafuddin Idris Shah|AIS]] | SSSA = [[Order of Sultan Salahuddin Abdul Aziz Shah#Knight Grand Companion (S.S.S.A.)|SSSA]] | DSSA = [[Order of Sultan Salahuddin Abdul Aziz Shah#Knight Companion (D.S.S.A.)|DSSA]] | SSA = [[Order of Sultan Salahuddin Abdul Aziz Shah|SSA]] | ASA = [[Order of Sultan Salahuddin Abdul Aziz Shah|ASA]] | DKT = [[Supreme Royal Family Order of Terengganu|DKT]] | DKR = [[Royal Family Order of Terengganu#Recipients|DKR]] | DKI (Terengganu) = [[Family Order of Terengganu#Recipients|DK I (Terengganu)]] | DKII (Terengganu) = [[Family Order of Terengganu#Recipients|DK II (Terengganu)]] | DK I (Terengganu) = [[Family Order of Terengganu#Recipients|DK I (Terengganu)]] | DK II (Terengganu) = [[Family Order of Terengganu#Recipients|DK II (Terengganu)]] | SUMZ = [[Order of Sultan Mizan Zainal Abidin of Terengganu|SUMZ]] | SSMZ = [[Order of Sultan Mizan Zainal Abidin of Terengganu|SSMZ]] | DSMZ = [[Order of Sultan Mizan Zainal Abidin of Terengganu|DSMZ]] | SMZ = [[Order of Sultan Mizan Zainal Abidin of Terengganu|SMZ]] | AMZ = [[Order of Sultan Mizan Zainal Abidin of Terengganu|AMZ]] | SSMT = [[Order of Sultan Mahmud I of Terengganu|SSMT]] | DSMT = [[Order of Sultan Mahmud I of Terengganu|DSMT]] | ASM = [[Order of Sultan Mahmud I of Terengganu|ASM]] | SPMT = [[Order of the Crown of Terengganu|SPMT]] | DPMT = [[Order of the Crown of Terengganu|DPMT]] | SMT = [[Order of the Crown of Terengganu|SMT]] | AMT = [[Order of the Crown of Terengganu|AMT]] | DKMB = [[Royal Family Order of the Crown of Brunei|DKMB]] | DKI (Brunei) = [[Family Order of Laila Utama|DK I (Brunei)]] | DK I (Brunei) = [[Family Order of Laila Utama|DK I (Brunei)]] | DKII (Brunei) = [[Family Order of Seri Utama|DK II (Brunei)]] | DK II (Brunei) = [[Family Order of Seri Utama|DK II (Brunei)]] | DPKT = [[Order of Paduka Keberanian Laila Terbilang|DPKT]] | PSNB = [[Order of Setia Negara Brunei|PSNB]] | DSNB = [[Order of Setia Negara Brunei|DSNB]] | PSB = [[Order of Setia Negara Brunei|PSB]] | PSLJ = [[Order of Paduka Seri Laila Jasa|PSLJ]] | DSLJ = [[Order of Paduka Seri Laila Jasa|DSLJ]] | SPMB = [[Order of Seri Paduka Mahkota Brunei|SPMB]] | DPMB = [[Order of Seri Paduka Mahkota Brunei|DPMB]] | SMB = [[Order of Seri Paduka Mahkota Brunei|SMB]] | DUBC = [[Darjah Utama Bakti Cemerlang (Tentera)|DUBC]] | PJG = [[Pingat Jasa Gemilang (Tentera)|PJG]] | OLY = [[Competitor at the Olympic Games|OLY]] | JP = [[Justice of the peace|JP]] | MP = [[List of members of the Dewan Rakyat|MP]] | MLA (Johor) = [[Johor State Legislative Assembly|MLA]] | MLA (Kedah) = [[Kedah State Legislative Assembly|MLA]] | MLA (Kelantan) = [[Kelantan State Legislative Assembly|MLA]] | MLA (Malacca) = [[Malacca State Legislative Assembly|MLA]] | MLA (Negeri Sembilan) = [[Negeri Sembilan State Legislative Assembly|MLA]] | MLA (Pahang) = [[Pahang State Legislative Assembly|MLA]] | MLA (Penang) = [[Penang State Legislative Assembly|MLA]] | MLA (Perak) = [[Perak State Legislative Assembly|MLA]] | MLA (Perlis) = [[Perlis State Legislative Assembly|MLA]] | MLA (Sabah) = [[Sabah State Legislative Assembly|MLA]] | MLA (Sarawak) = [[Sarawak State Legislative Assembly|MLA]] | MLA (Selangor) = [[Selangor State Legislative Assembly|MLA]] | MLA (Terengganu) = [[Terengganu State Legislative Assembly|MLA]] }}<noinclude> {{documentation}} </noinclude> fiu4h0z6w9ukphmzz0afu7urfakoiw8 Templat:Small 10 1115 4635 2024-08-16T14:54:20Z Rombituon 59 Mencipta laman baru dengan kandungan '<span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude> {{Documentation}}<!--Categories and interwikis go in the /doc sub-page.--> </noinclude>' 4635 wikitext text/x-wiki <span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude> {{Documentation}}<!--Categories and interwikis go in the /doc sub-page.--> </noinclude> dvonxxvea06kvln677gbl2xk9rrnlog Templat:Strfind short 10 1116 4636 2024-08-16T14:55:10Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#Invoke:String|find|source={{{1|}}}|{{{2}}}}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>' 4636 wikitext text/x-wiki {{#Invoke:String|find|source={{{1|}}}|{{{2}}}}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> sng2qjm59mds7la9fh03t82f19ej3y4 Modul:ParameterCount 828 1117 4637 2024-08-16T14:56:37Z Rombituon 59 Mencipta laman baru dengan kandungan '-- This module produces a count of all the arguments passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a string is blank local function isBlank(s) return not s:find('%S') end -- Tests whether a string is a valid positional key, and if so, returns it. If -- the key is invalid, this returns nil. local function isPositionalKey(s) s = trim(s) if s:find('^[1...' 4637 Scribunto text/plain -- This module produces a count of all the arguments passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a string is blank local function isBlank(s) return not s:find('%S') end -- Tests whether a string is a valid positional key, and if so, returns it. If -- the key is invalid, this returns nil. local function isPositionalKey(s) s = trim(s) if s:find('^[1-9][0-9]*$') then return tonumber(s) end end -- Return the count of all arguments for which testFunc returns a truthy value. local function count(args, testFunc) local ret = 0 for key, val in pairs(args) do if testFunc(key, val) then ret = ret + 1 end end return ret end -- Check shared arguments and get the parent argument count. local function main(frame, testFunc) local blankifiedTestFunc if yesno(frame.args.checkblanks) ~= false then -- Extend the test function to check for blanks as well. blankifiedTestFunc = function (key, val) if not isBlank(val) then return testFunc(key, val) end end else blankifiedTestFunc = testFunc end return count(frame:getParent().args, blankifiedTestFunc) end return { -- Called with {{#invoke:ParameterCount|all}} -- All specified parameters are counted, even those not supported by the -- template. all = function (frame) return main(frame, function () return true end) end, -- Called with {{#invoke:ParameterCount|main}} -- Users can specify a list of parameters to check, and a list of Lua -- Ustring patterns to check each parameter against. main = function (frame) local args = frame.args local keys, patterns = {}, {} -- Get key list for i, key in ipairs(args) do local positionalKey = isPositionalKey(key) if positionalKey then keys[positionalKey] = true else keys[trim(key)] = true end end -- Get patterns do local function getPattern(i) local pattern = args['pattern' .. tostring(i)] if pattern and pattern ~= '' then return pattern end end local i = 1 local pattern = getPattern(i) while pattern do patterns[i] = pattern i = i + 1 pattern = getPattern(i) end end -- Construct the test function local testFunc = function (key, val) if keys[key] then return true end for i, pattern in ipairs(patterns) do if mw.ustring.find(tostring(key), pattern) then return true end end return false end return main(frame, testFunc) end } bo1vhgb6r7zni8qgcvzfnnphlmq92ml Modul:Wd/i18n 828 1118 4638 2024-08-16T14:57:37Z Rombituon 59 Mencipta laman baru dengan kandungan '-- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '$1'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '$1' must be defined as optional", ["no-function-specified"] = "You must specify a function...' 4638 Scribunto text/plain -- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '$1'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '$1' must be defined as optional", ["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message ["main-called-twice"] = 'The function "main" cannot be called twice', ["no-such-function"] = 'The function "$1" does not exist', -- equal to the standard module error message ["malformed-reference"] = "Error: Unable to display the reference properly. See [[Module:wd/doc#References|the documentation]] for details.[[Category:Module:Wd reference errors]]" }, ["info"] = { ["edit-on-wikidata"] = "Edit this on Wikidata" }, ["numeric"] = { ["decimal-mark"] = ".", ["delimiter"] = "," }, ["datetime"] = { ["prefixes"] = { ["decade-period"] = "" }, ["suffixes"] = { ["decade-period"] = "s", ["millennium"] = " millennium", ["century"] = " century", ["million-years"] = " million years", ["billion-years"] = " billion years", ["year"] = " year", ["years"] = " years" }, ["julian-calendar"] = "Julian calendar", -- linked page title ["julian"] = "Julian", ["BCE"] = "BCE", ["CE"] = "CE", ["common-era"] = "Common Era" -- linked page title }, ["coord"] = { ["latitude-north"] = "N", ["latitude-south"] = "S", ["longitude-east"] = "E", ["longitude-west"] = "W", ["degrees"] = "°", ["minutes"] = "'", ["seconds"] = '"', ["separator"] = ", " }, ["values"] = { ["unknown"] = "unknown", ["none"] = "none" }, ["cite"] = { ["version"] = "5", -- increment this each time the below parameters are changed to avoid conflict errors ["web"] = { -- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "website", [aliasesP.referenceURL] = "url", [aliasesP.publicationDate] = "date", [aliasesP.retrieved] = "access-date", [aliasesP.title] = "title", [aliasesP.archiveURL] = "archive-url", [aliasesP.archiveDate] = "archive-date", [aliasesP.language] = "language", [aliasesP.author] = "author", -- existence of author1, author2, author3, etc. is assumed [aliasesP.authorNameString] = "author", [aliasesP.publisher] = "publisher", [aliasesP.quote] = "quote", [aliasesP.pages] = "pages", -- extra option [aliasesP.publishedIn] = "website", [aliasesP.sectionVerseOrParagraph] = "at" }, ["q"] = { -- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "1", [aliasesP.pages] = "pages", [aliasesP.column] = "at", [aliasesP.chapter] = "chapter", [aliasesP.sectionVerseOrParagraph] = "section", ["external-id"] = "id", -- used for any type of database property ID [aliasesP.title] = "title", [aliasesP.publicationDate] = "date", [aliasesP.retrieved] = "access-date" } } } p.getOrdinalSuffix = function(num) if tostring(num):sub(-2,-2) == '1' then return "th" -- 10th, 11th, 12th, 13th, ... 19th end num = tostring(num):sub(-1) if num == '1' then return "st" elseif num == '2' then return "nd" elseif num == '3' then return "rd" else return "th" end end p.addDelimiters = function(n) local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$") if left and num and right then return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right else return n end end return p end return p t28rz4790z52gadkxdwisqlpv6mjteu Perbincangan pengguna:Umboh Tuhan 3 1119 4644 2024-08-18T06:55:41Z Umboh Tuhan 194 RK & RE 4644 wikitext text/x-wiki [[Fail:Rachmat kartolo and Rahayu Effendi's scene in Laki-Laki tak bernama's movie for Paradiso's Magazine Vol 50 1969.png|left|frameless]] [[Fail:Rachmat kartolo and Rahayu Effendi's scene in Laki-Laki tak bernama's movie for Paradiso's Magazine Vol 50 1969.png|right|frameless]] ct27e3su54ufwkhfrh44aogymar9jfc Pengguna:Umboh Tuhan 2 1120 4645 2024-08-18T06:55:45Z Umboh Tuhan 194 RK & RE 4645 wikitext text/x-wiki [[Fail:Rachmat kartolo and Rahayu Effendi's scene in Laki-Laki tak bernama's movie for Paradiso's Magazine Vol 50 1969.png|left|frameless]] [[Fail:Rachmat kartolo and Rahayu Effendi's scene in Laki-Laki tak bernama's movie for Paradiso's Magazine Vol 50 1969.png|right|frameless]] ct27e3su54ufwkhfrh44aogymar9jfc Templat:Islamic Culture 10 1121 4676 2024-08-19T15:48:27Z Rombituon 59 Melencong ke [[Templat:Islamic culture]] 4676 wikitext text/x-wiki #REDIRECT [[Template:Islamic culture]] d7uujsdcjn9hbsf9c3112vgok1u2k5b Templat:Islamic culture 10 1122 4677 2024-08-19T15:50:37Z Rombituon 59 Mencipta laman baru dengan kandungan '{{Sidebar | name = Islamic culture | bodyclass = hlist | topimage = | pretitle = Part of [[:Category:Islam|a series]] on | title = [[Islamic culture]] | headingstyle = background:#e6e6ff; | contentstyle = padding:0.2em 0.2em 0.55em; | heading1 = [[Islamic architecture|Architecture]] | content1 = * [[Architecture of Azerbaijan|Azerbaijani]] * [[Indo-Islamic architecture|Indo-Islamic]] * [[Mosque architecture in Indonesia|Indonesian]] * Moorish archit...' 4677 wikitext text/x-wiki {{Sidebar | name = Islamic culture | bodyclass = hlist | topimage = | pretitle = Part of [[:Category:Islam|a series]] on | title = [[Islamic culture]] | headingstyle = background:#e6e6ff; | contentstyle = padding:0.2em 0.2em 0.55em; | heading1 = [[Islamic architecture|Architecture]] | content1 = * [[Architecture of Azerbaijan|Azerbaijani]] * [[Indo-Islamic architecture|Indo-Islamic]] * [[Mosque architecture in Indonesia|Indonesian]] * [[Moorish architecture|Moorish]] * [[Ottoman architecture|Ottoman]] * [[Iranian architecture|Persian]] * [[Somali architecture|Somali]] * [[Sudano-Sahelian architecture|Sudano-Sahelian]] * [[Tatar mosque|Tatar]] * [[Swahili architecture|Swahili]] * [[Architecture of Yemen|Yemeni]] | heading2 = [[Islamic art|Art]] | content2 = * [[Arabian carpet]] * [[Azerbaijani rug|Azerbaijani carpet]] * [[Batik]] * [[Islamic calligraphy|Calligraphy]] * [[Damask]] * [[Islamic embroidery|Embroidery]] * [[Ikat]] * [[Iznik pottery]] * [[Khatam]] * [[Kilim]] * [[Islamic_art#Painting|Miniature]] * [[Oriental rug]] * [[Paan dan]] * [[Persian carpet]] * [[Soumak]] * [[Suzani (textile)|Suzani]] * [[Tapis (Indonesian weaving style)|Tapis]] * [[Turkmen rug]] * [[Anatolian rug|Turkish carpet]] * [[Zardozi]] | heading3 = [[Islamic clothing|Clothing]] | content3 = * [[Abaya]] * [[Agal (accessory)|Agal]] * [[Boubou (clothing)|Boubou]] * [[Burqa]] * [[Chador]] * [[Hijab]] * [[Headscarf]] * [[Jilbāb|Jilbab]] * [[Jellabiya]] * [[Kaftan]] * [[Kameez]] * [[Keffiyeh]] * [[Kupiah]] * [[Niqāb]] * [[Salwar]] * [[Songkok]] * [[Taqiyah (cap)|Taqiya]] * [[Thawb]] | heading4 = [[Islamic holidays|Holidays]] | content4 = * [[Arba'een]] * [[Eid al-Ghadir|al-Ghadir]] * [[Chaand Raat]] * [[Eid al-Fitr|al-Fitr]] * [[Eid al-Adha|al-Adha]] * [[Imamat Day]] * [[Islamic New Year|New Year]] * [[Laylat al-Qadr|al-Qadr]] * [[Mawlid]] * [[Ramadan]] * [[Laylat al Bara'at|Bara’at]] * [[Laylat al-Raghaib|Raghaib]] | heading5 = [[Islamic literature|Literature]] | content5 = * [[Arabic literature|Arabic]] * [[Azerbaijani literature|Azerbaijani]] * [[Bengali literature|Bengali]] * [[Crimean Tatar literature|Crimean Tatar]] * [[Gambian literature|Gambian]] * [[Hausa literature|Hausa]] * [[Indonesian literature|Indonesian]] ([[Javanese literature|Javanese]]) * [[Literature of Kashmir|Kashmiri]] * [[Kazakh literature|Kazakh]] * [[Kurdish literature|Kurdish]] * [[Kyrgyz literature|Kyrgyz]] * [[Malaysian literature|Malaysian]] ([[Malays (ethnic group)#Literature|Malay]]) * [[Malian literature|Malian]] * [[Nigerian literature|Nigerian]] * [[Pashto literature and poetry|Pashto]] * [[Persian literature|Persian]] * [[Punjabi literature|Punjabi]] * [[Sindhi literature|Sindhi]] * [[Somali literature|Somali]] * [[South Asian literature|South Asian]] * [[Tajik literature|Tajik]] * [[Tatar literature|Tatar]] * [[Turkish literature|Turkish]] * [[Turkmen literature|Turkmen]] * [[Urdu literature|Urdu]] * [[Uyghur literature|Uyghur]] * [[Uzbek literature|Uzbek]] | heading6 = [[Islamic music|Music]] | content6 = * [[Ashik]] * [[Daf]] * [[Dastgah]] * [[Gamelan]] * [[Gendang beleq]] * [[Ghazal]] * [[Haḍra]] * [[Hamd]] * [[Jarigan|Jari]] * [[Madih nabawi]] * [[Mappila songs|Mappilappattu]] * [[Arabic maqam|Maqam]] * [[Mugham|Mugam]] * [[Naʽat]] * [[Nasheed]] * [[Noha]] * [[Qawwali]] * [[Sufi music|Sufi]] * [[Talempong]] * [[Tambourine]] | heading7 = [[Islamic theatre|Theatre]] | content7 = * [[Bangsawan]] * [[Cem (Alevism)|Cem]] * [[Karagöz and Hacivat]] * [[Sama (Sufism)|Sama]] * [[Ta'zieh]] * [[Wayang]] | belowstyle = background:#e6e6ff;padding:0.3em 0.2em 0.5em; | below = * {{portal-inline|Islam|size=tiny}} }}<noinclude> [[Category:Islam sidebar templates|Culture]] [[Category:Arts and culture sidebar templates]] [[Category:Society and social science sidebar templates]] </noinclude> tpykblowmvrv7qfkbd92b2z7aivetel Templat:Sidebar 10 1123 4678 2024-08-19T15:51:06Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude>' 4678 wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> jzouzofoaugku1umcgwhk1sk23s7qrm Modul:Sidebar 828 1124 4679 2024-08-19T15:52:12Z Rombituon 59 Mencipta laman baru dengan kandungan 'require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTempl...' 4679 Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText('color: var(--color-base)') :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 6x3cinmciqbr9e2030fl1gw7wlxc8lp Modul:Sidebar/configuration 828 1125 4680 2024-08-19T15:54:13Z Rombituon 59 Mencipta laman baru dengan kandungan 'return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css...' 4680 Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } ppudujplp1136qu7hp1z0z4rq8ga0wl Modul:Sidebar/styles.css 828 1126 4681 2024-08-19T15:55:42Z Rombituon 59 Mencipta laman baru dengan kandungan '/* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: var(--background-color-neutral-subtle, #f8f9fa); border: 1px solid var(--border-color-base, #a2a9b1); padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; bord...' 4681 sanitized-css text/css /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: var(--background-color-neutral-subtle, #f8f9fa); border: 1px solid var(--border-color-base, #a2a9b1); padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } /* Fixes: T367463 */ body.skin--responsive .sidebar a > img { max-width: none !important; } /* Disable backgrounds via style attribute in night mode Eg.https://phabricator.wikimedia.org/F55243859 * https://en.wikipedia.org/w/index.php?title=Laissez-faire */ @media screen { html.skin-theme-clientpref-night .sidebar:not( .notheme ) .sidebar-list-title, html.skin-theme-clientpref-night .sidebar:not( .notheme ) .sidebar-title-with-pretitle { background: transparent !important; } html.skin-theme-clientpref-night .sidebar .sidebar-title-with-pretitle a { color: var( --color-progressive ) !important; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .sidebar:not( .notheme ) .sidebar-list-title, html.skin-theme-clientpref-os .sidebar:not( .notheme ) .sidebar-title-with-pretitle { background: transparent !important; } html.skin-theme-clientpref-os .sidebar .sidebar-title-with-pretitle a { color: var( --color-progressive ) !important; } } @media print { body.ns-0 .sidebar { display: none !important; } } 40d3rmisd4hs61e952og79g7gy3cshc Templat:Infobox cyclist 10 1127 4685 2024-08-19T16:11:11Z Rombituon 59 Mencipta laman baru dengan kandungan '{{Infobox | bodyclass = vcard | child = {{{embed|{{{child|}}}}}} | title = {{#ifeq:{{{embed|{{{child|}}}}}}|yes |'''Cycling career''' |{{#if:{{{honorific_prefix|}}} |<span class="honorific-prefix" style="font-size: 77%; font-weight: normal">{{{honorific_prefix|}}}</span><br />}}<!-- --><includeonly><span class="fn">{{If empty|{{{name|}}}|{{PAGENAMEBASE}}}}</span></includeonly><!-- -->{{#if:{{{honorific_suffix|}}}|<br /><span class="h...' 4685 wikitext text/x-wiki {{Infobox | bodyclass = vcard | child = {{{embed|{{{child|}}}}}} | title = {{#ifeq:{{{embed|{{{child|}}}}}}|yes |'''Cycling career''' |{{#if:{{{honorific_prefix|}}} |<span class="honorific-prefix" style="font-size: 77%; font-weight: normal">{{{honorific_prefix|}}}</span><br />}}<!-- --><includeonly><span class="fn">{{If empty|{{{name|}}}|{{PAGENAMEBASE}}}}</span></includeonly><!-- -->{{#if:{{{honorific_suffix|}}}|<br /><span class="honorific-suffix" style="font-size: 77%; font-weight: normal">{{{honorific_suffix|}}}</span>}} }} | titleclass = fn | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{#ifeq:{{{embed|{{{child|}}}}}}|yes||{{#invoke:Wikidata|claim|P18}}}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{caption|{{#ifeq:{{{embed|{{{child|}}}}}}|yes||{{#invoke:Wikidata |getImageLegend|FETCH_WIKIDATA}}}}}}} | headerstyle = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||background:#ADDFAD;}}color: #202122; | header1 = {{#if:{{{full_name|}}}{{{fullname|}}}{{{nickname|}}}{{{birth_date|}}}{{{birth_place|}}}{{{death_date|}}}{{{death_place|}}}{{{height|}}}{{{weight|}}}|Personal information}} | label2 = Full&nbsp;name | data2 = {{{full_name|{{{fullname|}}}}}} | label3 = Nickname | data3 = {{{nickname|}}} |class3 = nickname | label4 = Born | data4 = {{br separated entries|{{{birth_name|}}}|{{{birth_date|}}}|{{{birth_place|}}} }} | label5 = Died | data5 = {{br separated entries|{{{death_date|}}}|{{{death_place|}}} }} | label9 = Height | data9 = {{#if: {{{height|}}} | {{Infobox person/height|{{{height}}}}} }} | label10 = Weight | data10 = {{#if: {{{weight|}}} | {{Infobox person/weight|{{{weight}}}}} }} | header11 = {{#if: {{{currentteam|}}}{{{discipline|{{{disciplines|}}}}}}{{{role|}}}{{{ridertype|}}}| Team information}} | label12 = Current&nbsp;team | data12 = {{{currentteam|}}} |class12 = note | label13 = Discipline{{#if:{{{disciplines|}}}|s}} | data13 = {{{discipline|{{{disciplines|}}}}}} | label14 = Role | data14 = {{{role|}}} |class14 = role | label15 = Rider&nbsp;type | data15 = {{{ridertype|}}} | header16 = {{#if:{{{amateuryears1|}}}{{{amateurteam1|}}} |{{infobox|child=yes | decat = yes <!-- remove from template:infobox tracking categories --> | title = Amateur team{{#if:{{{amateuryears2|}}}{{{amateurteam2|}}}|s}} | labelstyle = white-space:nowrap; line-height:1.2em; | datastyle = white-space:nowrap; line-height:1.2em; | label1 = {{{amateuryears1|}}} | data1 = {{{amateurteam1|}}} | label2 = {{{amateuryears2|}}} | data2 = {{{amateurteam2|}}} | label3 = {{{amateuryears3|}}} | data3 = {{{amateurteam3|}}} | label4 = {{{amateuryears4|}}} | data4 = {{{amateurteam4|}}} | label5 = {{{amateuryears5|}}} | data5 = {{{amateurteam5|}}} | label6 = {{{amateuryears6|}}} | data6 = {{{amateurteam6|}}} | label7 = {{{amateuryears7|}}} | data7 = {{{amateurteam7|}}} | label8 = {{{amateuryears8|}}} | data8 = {{{amateurteam8|}}} | label9 = {{{amateuryears9|}}} | data9 = {{{amateurteam9|}}} | label10 = {{{amateuryears10|}}} | data10 = {{{amateurteam10|}}} | label11 = {{{amateuryears11|}}} | data11 = {{{amateurteam11|}}} | label12 = {{{amateuryears12|}}} | data12 = {{{amateurteam12|}}} | label13 = {{{amateuryears13|}}} | data13 = {{{amateurteam13|}}} | label14 = {{{amateuryears14|}}} | data14 = {{{amateurteam14|}}} | label15 = {{{amateuryears15|}}} | data15 = {{{amateurteam15|}}} }} }} | header18 = {{#if:{{{proyears1|}}}{{{proteam1|}}} |{{infobox|child=yes | decat = yes <!-- remove from template:infobox tracking categories --> | title = Professional team{{#if:{{{proyears2|}}}{{{proteam2|}}}|s}} | labelstyle = white-space:nowrap; line-height:1.2em; | datastyle = white-space:nowrap; line-height:1.2em; | label1 = {{{proyears1|}}} | data1 = {{{proteam1|}}} | label2 = {{{proyears2|}}} | data2 = {{{proteam2|}}} | label3 = {{{proyears3|}}} | data3 = {{{proteam3|}}} | label4 = {{{proyears4|}}} | data4 = {{{proteam4|}}} | label5 = {{{proyears5|}}} | data5 = {{{proteam5|}}} | label6 = {{{proyears6|}}} | data6 = {{{proteam6|}}} | label7 = {{{proyears7|}}} | data7 = {{{proteam7|}}} | label8 = {{{proyears8|}}} | data8 = {{{proteam8|}}} | label9 = {{{proyears9|}}} | data9 = {{{proteam9|}}} | label10 = {{{proyears10|}}} | data10 = {{{proteam10|}}} | label11 = {{{proyears11|}}} | data11 = {{{proteam11|}}} | label12 = {{{proyears12|}}} | data12 = {{{proteam12|}}} | label13 = {{{proyears13|}}} | data13 = {{{proteam13|}}} | label14 = {{{proyears14|}}} | data14 = {{{proteam14|}}} | label15 = {{{proyears15|}}} | data15 = {{{proteam15|}}} | label16 = {{{proyears16|}}} | data16 = {{{proteam16|}}} | label17 = {{{proyears17|}}} | data17 = {{{proteam17|}}} | label18 = {{{proyears18|}}} | data18 = {{{proteam18|}}} | label19 = {{{proyears19|}}} | data19 = {{{proteam19|}}} | label20 = {{{proyears20|}}} | data20 = {{{proteam20|}}} | label21 = {{{proyears21|}}} | data21 = {{{proteam21|}}} | label22 = {{{proyears22|}}} | data22 = {{{proteam22|}}} | label23 = {{{proyears23|}}} | data23 = {{{proteam23|}}} | label24 = {{{proyears24|}}} | data24 = {{{proteam24|}}} | label25 = {{{proyears25|}}} | data25 = {{{proteam25|}}} }} }} | header20 = {{#if:{{{manageyears1|}}}{{{manageteam1|}}} |{{infobox|child=yes | decat = yes <!-- remove from template:infobox tracking categories --> | title = Managerial team{{#if:{{{manageyears2|}}}{{{manageteam2|}}}|s}} | labelstyle = white-space:nowrap; line-height:1.2em; | datastyle = white-space:nowrap; line-height:1.2em; | label1 = {{{manageyears1|}}} | data1 = {{{manageteam1|}}} | label2 = {{{manageyears2|}}} | data2 = {{{manageteam2|}}} | label3 = {{{manageyears3|}}} | data3 = {{{manageteam3|}}} | label4 = {{{manageyears4|}}} | data4 = {{{manageteam4|}}} | label5 = {{{manageyears5|}}} | data5 = {{{manageteam5|}}} | label6 = {{{manageyears6|}}} | data6 = {{{manageteam6|}}} | label7 = {{{manageyears7|}}} | data7 = {{{manageteam7|}}} | label8 = {{{manageyears8|}}} | data8 = {{{manageteam8|}}} | label9 = {{{manageyears9|}}} | data9 = {{{manageteam9|}}} | label10 = {{{manageyears10|}}} | data10 = {{{manageteam10|}}} | label11 = {{{manageyears11|}}} | data11 = {{{manageteam11|}}} | label12 = {{{manageyears12|}}} | data12 = {{{manageteam12|}}} | label13 = {{{manageyears13|}}} | data13 = {{{manageteam13|}}} | label14 = {{{manageyears14|}}} | data14 = {{{manageteam14|}}} | label15 = {{{manageyears15|}}} | data15 = {{{manageteam15|}}} | label16 = {{{manageyears16|}}} | data16 = {{{manageteam16|}}} | label17 = {{{manageyears17|}}} | data17 = {{{manageteam17|}}} | label18 = {{{manageyears18|}}} | data18 = {{{manageteam18|}}} | label19 = {{{manageyears19|}}} | data19 = {{{manageteam19|}}} | label20 = {{{manageyears20|}}} | data20 = {{{manageteam20|}}} | label21 = {{{manageyears21|}}} | data21 = {{{manageteam21|}}} | label22 = {{{manageyears22|}}} | data22 = {{{manageteam22|}}} | label23 = {{{manageyears23|}}} | data23 = {{{manageteam23|}}} | label24 = {{{manageyears24|}}} | data24 = {{{manageteam24|}}} | label25 = {{{manageyears25|}}} | data25 = {{{manageteam25|}}} }} }} | header22 = {{#if:{{{majorwins|}}} |{{infobox|child=yes | decat = yes <!-- remove from template:infobox tracking categories --> | title = Major wins | datastyle = text-align:left; | data1 = {{{majorwins|}}} }} }} | header24 = {{Infobox medal templates | title = Medal record<!-- default is "Medal record" --> | medals = {{{medals|{{{medaltemplates|}}}}}} | expand = {{yesno|{{{medals-expand|{{{show-medals|}}}}}}}} }} }}{{Main other|{{#invoke:Infobox cyclist tracking|tracking}}}}{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using infobox cyclist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox cyclist]] with unknown parameter "_VALUE_"|ignoreblank=y | alt | amateurteam1 | amateurteam10 | amateurteam11 | amateurteam12 | amateurteam13 | amateurteam14 | amateurteam15 | amateurteam2 | amateurteam3 | amateurteam4 | amateurteam5 | amateurteam6 | amateurteam7 | amateurteam8 | amateurteam9 | amateuryears1 | amateuryears10 | amateuryears11 | amateuryears12 | amateuryears13 | amateuryears14 | amateuryears15 | amateuryears2 | amateuryears3 | amateuryears4 | amateuryears5 | amateuryears6 | amateuryears7 | amateuryears8 | amateuryears9 | birth_date | birth_name | birth_place | caption | child | currentteam | death_date | death_place | discipline | disciplines | embed | full_name | fullname | height | honorific_prefix | honorific_suffix | image | image_size | majorwins | manageteam1 | manageteam10 | manageteam11 | manageteam12 | manageteam13 | manageteam14 | manageteam15 | manageteam16 | manageteam17 | manageteam18 | manageteam19 | manageteam2 | manageteam20 | manageteam21 | manageteam22 | manageteam23 | manageteam24 | manageteam25 | manageteam3 | manageteam4 | manageteam5 | manageteam6 | manageteam7 | manageteam8 | manageteam9 | manageyears1 | manageyears10 | manageyears11 | manageyears12 | manageyears13 | manageyears14 | manageyears15 | manageyears16 | manageyears17 | manageyears18 | manageyears19 | manageyears2 | manageyears20 | manageyears21 | manageyears22 | manageyears23 | manageyears24 | manageyears25 | manageyears3 | manageyears4 | manageyears5 | manageyears6 | manageyears7 | manageyears8 | manageyears9 | medals | medals-expand | medaltemplates | name | nickname | proteam1 | proteam10 | proteam11 | proteam12 | proteam13 | proteam14 | proteam15 | proteam16 | proteam17 | proteam18 | proteam19 | proteam2 | proteam20 | proteam21 | proteam22 | proteam23 | proteam24 | proteam25 | proteam3 | proteam4 | proteam5 | proteam6 | proteam7 | proteam8 | proteam9 | proyears1 | proyears10 | proyears11 | proyears12 | proyears13 | proyears14 | proyears15 | proyears16 | proyears17 | proyears18 | proyears19 | proyears2 | proyears20 | proyears21 | proyears22 | proyears23 | proyears24 | proyears25 | proyears3 | proyears4 | proyears5 | proyears6 | proyears7 | proyears8 | proyears9 | ridername | ridertype | role | show-medals | weight}}<noinclude> {{documentation}} </noinclude> redxtpnmntrp5bdmj66rvpcqjkxjgki Templat:Infobox/mobileviewfix.css 10 1128 4687 2024-08-19T16:16:38Z Rombituon 59 Mencipta laman baru dengan kandungan '/* {{pp-template}} The mobile skin (Minerva) generally inject display: block property to tables to make them scrollable on your phone screen. This could give benefits for large contents, but may also caused some smaller tables shortened and shift to left, even if they are set width:100% property. This is happened in numerous infoboxes. */ body.skin-minerva .infobox table { display: table; } body.skin-minerva .infobox caption { display: table-caption; }' 4687 sanitized-css text/css /* {{pp-template}} The mobile skin (Minerva) generally inject display: block property to tables to make them scrollable on your phone screen. This could give benefits for large contents, but may also caused some smaller tables shortened and shift to left, even if they are set width:100% property. This is happened in numerous infoboxes. */ body.skin-minerva .infobox table { display: table; } body.skin-minerva .infobox caption { display: table-caption; } ezj541df0gm8311f9dvd0q9sigletku Templat:Infobox person/height 10 1129 4689 2024-08-19T16:18:53Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:person height|main}}<noinclude> {{Documentation}} </noinclude>' 4689 wikitext text/x-wiki {{#invoke:person height|main}}<noinclude> {{Documentation}} </noinclude> er0y8xmwd91jl83h0g23bm3e8psjplm Modul:Person height 828 1130 4692 2024-08-19T16:19:50Z Rombituon 59 Mencipta laman baru dengan kandungan '-- This module implements [[Template:Infobox person/height]] local p = {} local function splitsuffix(s) local suffix = '' if mw.ustring.match(s,'^(.-)(<sup.*)$') then local a = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%2') s = a suffix = b .. suffix end if mw.ustring.match(s,'^(.-)(%[%[[Cc]ategory:.*)$') then local a = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%1') local b = mw...' 4692 Scribunto text/plain -- This module implements [[Template:Infobox person/height]] local p = {} local function splitsuffix(s) local suffix = '' if mw.ustring.match(s,'^(.-)(<sup.*)$') then local a = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%2') s = a suffix = b .. suffix end if mw.ustring.match(s,'^(.-)(%[%[[Cc]ategory:.*)$') then local a = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%2') s = a suffix = b .. suffix end return s, suffix end local function clean(s) s = mw.ustring.gsub(s, '[Mm]etre', 'm') s = mw.ustring.gsub(s, '([^a])meter', '%1m') -- prevents "parameter" from being changed to "param" s = mw.ustring.gsub(s, '[Cc]enti', 'c') -- changes "centim" to "cm" s = mw.ustring.gsub(s, 'ms', 'm') s = mw.ustring.gsub(s, 'm[%.,]', 'm') s = mw.ustring.gsub(s, '[Ff]eet', 'ft') s = mw.ustring.gsub(s, 'foot', 'ft') s = mw.ustring.gsub(s, 'ft[%.,]', 'ft') s = mw.ustring.gsub(s, '[Ii]nches', 'in') s = mw.ustring.gsub(s, '[Ii]nch', 'in') s = mw.ustring.gsub(s, 'ins', 'in') s = mw.ustring.gsub(s, 'in[%.,]', 'in') s = mw.ustring.gsub(s, '%[%[[Mm]%]%]s', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Mm]|[Mm]%]%]', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Cc]m%]%]s', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]m|[Cc]m%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]entim|cm%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Ii]n|in%]%]', '[[inch|in]]') s = mw.ustring.gsub(s, '(%d)%s+[Cc][Mm]', '%1&nbsp;cm') s = mw.ustring.gsub(s, '(%d)%s+[Mm]', '%1&nbsp;m') s = mw.ustring.gsub(s, '(%d)%s+[Ff][Tt]', '%1&nbsp;ft') s = mw.ustring.gsub(s, '(%d)%s+[Ii][Nn]', '%1&nbsp;in') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Cc][Mm]', '%1cm') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Mm]', '%1m') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ff][Tt]', '%1ft') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ii][Nn]', '%1in') s = mw.ustring.gsub(s, '(%d)%s*[′\']%s*([%d]%d*)%s*[\"″]', '%1 ft %2 in') return s end local function isnumber(s) if s then s = mw.ustring.gsub(s, '%+%s*%d+%s*/%s*%d+%s*$', '') s = mw.ustring.gsub(s, '%s*1%s*/%s*2%s*$', '0.5') return tonumber(s) end return nil end local function trimspace(s) if s then s = mw.ustring.gsub(s, '^%s*(.-)%s*$', '%1') end return s end local function force_unit(s, t) s = mw.ustring.gsub(s, '&[Nn][Bb][Ss][Pp];', '★') if (t == 'cm') then s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)m', '%1%2.%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2.%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)m', '%1%2%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)m', '%1%20%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%20%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)m', '%100.%2cm') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100.%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+cm)', '%1') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+%[%[[Cc]entimet[re][re]|cm%]%])', '%1') else s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') end s = mw.ustring.gsub(s, '★', '&nbsp;') return s end local function get_convert_args(s, prefer, enforce, ri) local prefer_m = (prefer or '') == 'm' local force_m = (enforce or '') == 'm' local prefer_cm = (prefer or '') == 'cm' local force_cm = (enforce or '') == 'cm' ri = (ri or '') == 'cmin' and 'cmin' or '' unconverted = clean(s or '') -- basic unit cleaning s = mw.ustring.gsub(unconverted, '&[Nn][Bb][Ss][Pp];', ' ') local m = mw.ustring.find(s, 'm') local c = mw.ustring.find(s, 'cm') local f = mw.ustring.find(s, 'ft') local i = mw.ustring.find(s, 'in') if m == nil and f == nil and i == nil then return '', unconverted end local adj = nil if c ~= nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, c - 1) if isnumber(n) then if force_m then local prec = require("Module:Math")._precision(trimspace(n)) adj = (prec == 1) and 'ri3' or 'ri2' end if ri ~= '' then adj = force_m and 'ri2' or 'ri0' end return force_m and {n/100,'m','ftin',0,['abbr']='on', ['adj']=adj} or {n,'cm','ftin',0,['abbr']='on', ['adj']=adj}, mw.ustring.sub(s, c+2) end return '', unconverted end if m ~= nil and c == nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, m - 1) if ri ~= '' then adj = force_cm and 'ri0' or 'ri2' end if isnumber(n) then return force_cm and {n*100,'cm','ftin',0,['abbr']='on',['adj']=adj} or {n,'m','ftin',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, m+1) end return '', unconverted end if f ~= nil and i ~=nil and m == nil then local n1 = mw.ustring.sub(s, 1, f - 1) local n2 = mw.ustring.sub(s, f+2, i - 1) if isnumber(n1) and isnumber(n2) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n1,'ft',n2,'in', 'm',2,['abbr']='on',['adj']=adj} or {n1,'ft',n2,'in', 'cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, i+2) end return '', unconverted end if f ~= nil and i == nil and m == nil then local n = mw.ustring.sub(s, 1, f - 1) if isnumber(n) then if ri ~= '' then local n2 = 12*(n - math.floor(n)) adj = 'ri0' return (force_m or prefer_m) and {math.floor(n),'ft',n2, 'in','m',2,['abbr']='on',['adj']=adj} or {math.floor(n),'ft',n2,'in','cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, f+2) end return (force_m or prefer_m) and {n,'ft','m',2,['abbr']='on'} or {n,'ft','cm',0,['abbr']='on'}, mw.ustring.sub(s, f+2) end return '', unconverted end if i ~= nil and f == nil and m == nil then local n = mw.ustring.sub(s, 1, i - 1) if isnumber(n) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n,'in','m',2,['abbr']='on'} or {n,'in','cm',0,['abbr']='on'}, mw.ustring.sub(s, i+2) end return '', unconverted end if force_cm and c == nil then return '', force_unit(unconverted, 'cm') end if force_m and c ~= nil then return '', force_unit(unconverted, 'm') end return '', unconverted end function convert(frame, args) local str, suffix = splitsuffix(args[1] or '') local targs, str = get_convert_args(str, args['prefer'] or '', args['enforce'] or '', args['ri'] or '') str = str .. suffix if type(targs) == 'table' then return frame:expandTemplate{ title = 'convert', args = targs} .. str else return str end end function p.main(frame) return convert(frame, frame.args[1] and frame.args or frame:getParent().args) end return p rfrnvfqz2h188ehir2g8r1a9m5ep2sj Modul:Infobox cyclist tracking 828 1131 4703 2024-08-19T16:23:22Z Rombituon 59 Mencipta laman baru dengan kandungan 'local p = {} function p.tracking(frame) function isblank( val ) return (val == nil) or val:match('^[%s]*$') end local function isnotblank(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local cats = '' local args = frame:getParent().args local hasbr = 0 local hasli = 0 local hasul = 0 local hasnewline = 0 local toohighnumber = 0 local missingyears = {0, 0, 0} local missingteams = {0,...' 4703 Scribunto text/plain local p = {} function p.tracking(frame) function isblank( val ) return (val == nil) or val:match('^[%s]*$') end local function isnotblank(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local cats = '' local args = frame:getParent().args local hasbr = 0 local hasli = 0 local hasul = 0 local hasnewline = 0 local toohighnumber = 0 local missingyears = {0, 0, 0} local missingteams = {0, 0, 0} local hasyears = {0, 0, 0} local hasteams = {0, 0, 0} local prefixes = {'pro', 'amateur', 'manage'} local maxindices = {25, 15, 25} for k=1,3 do local prefix = prefixes[k] local maxindex = maxindices[k] if (isnotblank(args[prefix .. 'years']) ) then hasyears[k] = 1 end if (isnotblank(args[prefix .. 'years']) and isblank(args[prefix .. 'teams']) ) then missingteams[k] = 1 end if (isnotblank(args[prefix .. 'teams']) ) then hasteams[k] = 1 end if (isnotblank(args[prefix .. 'teams']) and isblank(args[prefix .. 'years']) ) then missingyears[k] = 1 end if (args[prefix .. 'years'] or ''):match('<[\t ]*[Bb]') then hasbr = 1 end if (args[prefix .. 'years'] or ''):match('<[\t ]*[Ll][Ii]') then hasli = 1 end if (args[prefix .. 'years'] or ''):match('<[\t ]*[Uu][Ll]') then hasul = 1 end if (args[prefix .. 'teams'] or ''):match('<[\t ]*[Bb]') then hasbr = 1 end if (args[prefix .. 'teams'] or ''):match('<[\t ]*[Ll][Ii]') then hasli = 1 end if (args[prefix .. 'teams'] or ''):match('<[\t ]*[Uu][Ll]') then hasul = 1 end if (args[prefix .. 'years'] or ''):match('[\r\n]') then hasnewline = 1 end if (args[prefix .. 'teams'] or ''):match('[\r\n]') then hasnewline = 1 end for i = 1,maxindex do if (isnotblank(args[prefix .. 'years'.. tostring(i)]) ) then hasyears[k] = 1 end if (isnotblank(args[prefix .. 'years'.. tostring(i)]) and isblank(args[prefix .. 'team'.. tostring(i)]) ) then missingteams[k] = 1 end if (isnotblank(args[prefix .. 'team'.. tostring(i)]) ) then hasteams[k] = 1 end if (isnotblank(args[prefix .. 'team'.. tostring(i)]) and isblank(args[prefix .. 'years'.. tostring(i)]) ) then missingyears[k] = 1 end if(args[prefix .. 'years' .. tostring(i)] or ''):match('<[\t ]*[Bb]') then hasbr = 1 end if(args[prefix .. 'years' .. tostring(i)] or ''):match('<[\t ]*[Ll][Ii]') then hasli = 1 end if(args[prefix .. 'years' .. tostring(i)] or ''):match('<[\t ]*[Uu][Ll]') then hasul = 1 end if(args[prefix .. 'team' .. tostring(i)] or ''):match('<[\t ]*[Bb]') then hasbr = 1 end if(args[prefix .. 'team' .. tostring(i)] or ''):match('<[\t ]*[Ll][Ii]') then hasli = 1 end if(args[prefix .. 'team' .. tostring(i)] or ''):match('<[\t ]*[Uu][Ll]') then hasul = 1 end if(args[prefix .. 'years' .. tostring(i)] or ''):match('[\r\n]') then hasnewline = 1 end if(args[prefix .. 'team' .. tostring(i)] or ''):match('[\r\n]') then hasnewline = 1 end end if (isnotblank(args[prefix .. 'team'.. tostring(maxindex+1)]) or isnotblank(args[prefix .. 'years'.. tostring(maxindex+1)]) ) then toohighnumber = 1 end end if (isnotblank(args['weight'])) then local w = frame:expandTemplate{ title = 'Infobox person/weight', args = {args['weight'] .. ' '} } w = mw.ustring.gsub(w, '[≈~]', ' ') w = mw.ustring.gsub(w, '<abbr[^<>]*>c.</abbr> ', '') w = mw.ustring.gsub(w, '&#8203;', '') w = mw.ustring.gsub(w, '–[%d][%d]*%.[%d]', '') w = mw.ustring.gsub(w, '–[%d][%d]*', '') w = mw.ustring.gsub(w, '[%d][%d]%.[%d]&nbsp;kg %([%d][%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%d]%.[%d]&nbsp;kg %([%d][%d]*&nbsp;lb; [%d][%.%d]*&nbsp;st%)', '') w = mw.ustring.gsub(w, '[%d][%d]%.[%d]&nbsp;kg %([%d][%d]*&nbsp;lb; [%d][%d]*&nbsp;st [%d][%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%d]%.[%d]&nbsp;kg %([%d][%.%d]*&nbsp;st; [%d][%.%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%.%d]*&nbsp;kg %([%d][%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;kg %([%d][%d]*&nbsp;lb; [%d][%.%d]*&nbsp;st%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;kg %([%d][%d]*&nbsp;lb; [%d][%d]*&nbsp;st [%d][%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;kg %([%d][%d]*&nbsp;st; [%d][%.%d]*&nbsp;lb%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;st [%d][%d]*&nbsp;lb %([%d][%d]*&nbsp;kg%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;lb %([%d][%d]*&nbsp;kg%)', '') w = mw.ustring.gsub(w, '[%d][%d]*&nbsp;lb %([%d][%d]*&nbsp;kg; [%d][%.%d]*&nbsp;st%)', '') w = mw.ustring.gsub(w, '[%d][%d]*[ ]*kg ', '') w = mw.ustring.gsub(w, '[%d][%d]*[ ]*lb ', '') w = mw.ustring.gsub(w, '%([1-2][%d][%d][%d]%)', '') w = mw.ustring.gsub(w, '%([1-2][%d][%d][%d]%-[%d][%d]%)', '') w = mw.text.unstrip(w) w = mw.ustring.gsub(w, '[<]', '.LT.') w = mw.ustring.gsub(w, '[>]', '.GT.') w = mw.ustring.gsub(w, '&', '&amp;') if(isnotblank(w)) then cats = cats .. '[[Category:Pages using infobox cyclist with atypical values for height or weight|W]]' -- cats = cats .. '<span class=error>Atypical value: weight = ' .. w .. '</span>' end end if (isnotblank(args['height'])) then local h = frame:expandTemplate{ title = 'Infobox person/height', args = {args['height'] .. ' '} } h = mw.ustring.gsub(h, '<templatestyles[^<>]*><%/templatestyles>', '') h = mw.ustring.gsub(h, '[≈~]', ' ') h = mw.ustring.gsub(h, '<abbr[^<>]*>c.</abbr> ', '') h = mw.ustring.gsub(h, '&#8203;', '') h = mw.ustring.gsub(h, '<span class="frac">([%d][%d]*)<span class="sr%-only">[^<>]*<%/span><span class="num">1<%/span>[^<>]*<span class="den">2<%/span><%/span>', '%1') h = mw.ustring.gsub(h, '<span class="frac"><span class="num">1<%/span>[^<>]*<span class="den">2<%/span><%/span>', '0') h = mw.ustring.gsub(h, '<span class="frac nowrap">([%d][%d]*)<span class="sr%-only">&nbsp;<%/span><sup>1<%/sup>&frasl;<sub>2<%/sub><%/span>', '%1') h = mw.ustring.gsub(h, '<span class="frac nowrap"><sup>1<%/sup>&frasl;<sub>2<%/sub><%/span>', '0') h = mw.ustring.gsub(h, '[1-2]%.[%d][%d]?&nbsp;m %([4-7]&nbsp;ft [%d][%d]*&nbsp;in%)', '') h = mw.ustring.gsub(h, '[1-2][%d][%d]&nbsp;cm %([4-7]&nbsp;ft [%d][%d]*&nbsp;in%)', '') h = mw.ustring.gsub(h, '[4-7]&nbsp;ft [%d][%d]*&nbsp;in %([1-2]%.[%d][%d]&nbsp;m%)', '') h = mw.ustring.gsub(h, '[4-7]&nbsp;ft [%d][%d]*&nbsp;in %([1-2][%d][%d]&nbsp;cm%)', '') h = mw.ustring.gsub(h, '[1-2]%.[%d][%d][ ]*m ', '') h = mw.ustring.gsub(h, '[1-2][%d][%d][ ]*cm ', '') h = mw.ustring.gsub(h, '[4-7] ft [%d][%d]* in ', '') h = mw.ustring.gsub(h, '%([1-2][%d][%d][%d]%)', '') h = mw.ustring.gsub(h, '%([1-2][%d][%d][%d]-[%d][%d]%)', '') h = mw.text.unstrip(h) h = mw.ustring.gsub(h, '[<]', '.LT.') h = mw.ustring.gsub(h, '[>]', '.GT.') h = mw.ustring.gsub(h, '&', '&amp;') if(isnotblank(h)) then cats = cats .. '[[Category:Pages using infobox cyclist with atypical values for height or weight|H]]' -- cats = cats .. '<span class=error style="display:none">Atypical value: height = ' .. h .. '</span>' end end if (hasli > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with multiple entries in single field|λ]]' end if (hasul > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with multiple entries in single field|μ]]' end if (hasbr > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with multiple entries in single field|β]]' end if (hasnewline > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with multiple entries in single field|ν]]' end for k=1,3 do if (missingyears[k] > 0 and hasyears[k] > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with unknown parameters|Υ]]' end if (missingteams[k] > 0 and hasteams[k] > 0) then cats = cats .. '[[Category:Pages using infobox cyclist with unknown parameters|Τ]]' end end return cats end return p e1sybzjz1cw8zg04bvytws3wcv42lxu Templat:MedalBronze 10 1132 4706 2024-08-19T16:24:21Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude>{{Medal|Bronze|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalBronze missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalBronze missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude>' 4706 wikitext text/x-wiki <noinclude>{| </noinclude>{{Medal|Bronze|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalBronze missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalBronze missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude> 5o906izddpv2lhxiomcsvsubmdx43wa Templat:Medal 10 1133 4710 2024-08-19T16:25:04Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude> {| </noinclude> |- {{#switch: {{{1}}} |Sport|Team|Country|Independent = ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#eeeeee;color:inherit; |Competition|Comp|Olympic|Olympics|WorldChampionships|EuropeanChampionships = ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit; |#default = {{!}} style="text-align:center;vertical-align:middle;color:inherit; }}{{#switch:...' 4710 wikitext text/x-wiki <noinclude> {| </noinclude> |- {{#switch: {{{1}}} |Sport|Team|Country|Independent = ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#eeeeee;color:inherit; |Competition|Comp|Olympic|Olympics|WorldChampionships|EuropeanChampionships = ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit; |#default = {{!}} style="text-align:center;vertical-align:middle;color:inherit; }}{{#switch: {{{1}}} | Gold | G = " {{!}} [[File:Gold medal icon (G initial).svg|16px|Gold medal – first place|link=]] | Silver | S = " {{!}} [[File:Silver medal icon (S initial).svg|16px|Silver medal – second place|link=]] | Bronze | B = " {{!}} [[File:Bronze medal icon (B initial).svg|16px|Bronze medal – third place|link=]] | Winner | W = background-color:gold" {{!}} '''Winner'''{{Main other|[[Category:Articles using Template:Medal with Winner]]}} | Runner-up | Runnerup | RU = background-color:silver" {{!}} '''Runner-up'''{{Main other|[[Category:Articles using Template:Medal with Runner-up]]}} | First | 1st = " {{!}} [[File:Gold medal icon.svg|16px|First place|link=]] | Second | 2nd = " {{!}} [[File:Silver medal icon.svg|16px|Second place|link=]] | Third | 3rd = " {{!}} [[File:Bronze medal icon.svg|16px|Third place|link=]] | Disqualified | DQ = background-color:pink" {{!}} '''Disqualified''' | TrueSpirit | PdC = background-color:white" {{!}} [[File:Olympic_rings.svg|30px]]{{!!}}style="background-color:white;color:inherit;" {{!}}'''[[Pierre de Coubertin medal]]''' | Olympics | Olympic = " {{!}} <span class="nowrap">[[Olympic Games]]</span> | WorldChampionships = " {{!}} <span class="nowrap">World Championships</span> | EuropeanChampionships = " {{!}} <span class="nowrap">European Championships</span> | Competition | Comp | Sport = " {{!}} <span class="nowrap">{{{2|}}}</span>{{Main other|{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}} | Team = " class="adr" {{!}} <span class="country-name">{{{2}}}</span>{{Main other|{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}} | Country = " class="adr" {{!}} Representing <span class="country-name">{{{2}}}</span>{{Main other|{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}} | Independent = " class="adr" {{!}} Competed as an <span class="country-name">{{{2}}}</span>{{Main other|{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}} | #default = " {{!}} &#32; {{Main other|[[Category:Articles using Template:Medal with unrecognised first positional argument]]}} }}{{#switch: {{{1}}} |Competition|Comp|Sport|Team|Olympic|Olympics|WorldChampionships|EuropeanChampionships|Country|Independent= |#default = {{!!}} style="text-align:center;vertical-align:middle;" {{!}} <span class="nowrap">{{{2}}}</span>{{Main other|{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}} }}{{#switch: {{{1}}} |Competition|Comp|Sport|Team|Olympic|Olympics|WorldChampionships|EuropeanChampionships|Country|Independent|TrueSpirit|PdC= |#default = {{!!}} style="text-align:center;vertical-align:middle;" {{!}} {{{3}}}{{Main other|{{#if:{{{3|}}}||{{#if:{{{3}}}|[[Category:Articles using Template:Medal missing an expected parameter]]}}}}}}}}<noinclude> |} {{documentation}} </noinclude> jbvre7u5a9gdop9z8ssh0ip7s4bakno Templat:!! 10 1134 4712 2024-08-19T16:25:45Z Rombituon 59 Mencipta laman baru dengan kandungan '||<noinclude> {{documentation}} </noinclude>' 4712 wikitext text/x-wiki ||<noinclude> {{documentation}} </noinclude> o9jjx0pl1nk3xv3maqyewo5ud79pa5g Templat:MedalCompetition 10 1135 4720 2024-08-19T16:28:48Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude> |- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit;" | {{#switch:{{{1|}}} |Olympics|Olympiad|olympiad|Olympic|Olympic Games|olympics|olympic|olympic games|Olympic games|Oly|oly|OG|og=[[Olympic Games]] |Commonwealth Games|commonwealth games|Commonwealth games|Commonwealth|commonwealth|Com|com=[[Commonwealth Games]] |X Games|x games|X games|x|X=[[X Games]] |Goodwill Games|Good...' 4720 wikitext text/x-wiki <noinclude>{| </noinclude> |- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit;" | {{#switch:{{{1|}}} |Olympics|Olympiad|olympiad|Olympic|Olympic Games|olympics|olympic|olympic games|Olympic games|Oly|oly|OG|og=[[Olympic Games]] |Commonwealth Games|commonwealth games|Commonwealth games|Commonwealth|commonwealth|Com|com=[[Commonwealth Games]] |X Games|x games|X games|x|X=[[X Games]] |Goodwill Games|Goodwill games|goodwill games|goodwill|Goodwill|Good|good=[[Goodwill Games]] |IAAF World Indoor Championships in Athletics|World Indoor Championships|WIC|wic|Indoor Championships|world indoor championships|indoor championships=[[IAAF World Indoor Championships in Athletics|World Indoor Championships]] |UEFA Champions League|European Cup|european cup|European cup|Champions League|Euro Cup|EuroCup|euro cup|eurocup|EC|ec|UEFA=[[UEFA Champions League|European Cup]] |Asian Games|Asiad|asiad|Asian games|asian games|AG|ag=[[Asian Games]] |National Games of the People's Republic of China|National Games of PRC|National Games of the PRC|National Games of China|All China Games|ACG|PRC|acg|prc|NGPRC|ngprc=[[National Games of the People's Republic of China|All China Games]] |Ski flying World Championships|Ski Flying World Championships|Ski-flying World Championships|Ski-Flying World Championships|SWC|swc|SFWC|sfwc=[[Ski flying World Championships]] |IAAF World Half Marathon Championships|World Half Marathon Championships|Half Marathon Championships|HMC|hmc|WHMC|whmc=[[IAAF World Half Marathon Championships|World Half Marathon Championships]] |IAAF World Road Running Championships|World Road Running Championships|Road Running Championships|RRC|rrc|WRRC|wrrc=[[IAAF World Road Running Championships|World Road Running Championships]] |IAAF World Championships in Athletics|World Championships in Athletics|Championships in Athletics|World Athletics Championships|WAC|wac=[[IAAF World Championships in Athletics|World Championships in Athletics]] |IAAF World Cross Country Championships|World Cross Country Championships|Cross Country Championships|CCC|ccc|WCCC|wccc=[[IAAF World Cross Country Championships|World Cross Country Championships]] |IAAF World Junior Championships in Athletics|World Junior Championships in Athletics|Junior Championships in Athletics|JCA|jca|WJCA|wjca|WJC|wjc=[[IAAF World Junior Championships in Athletics|World Junior Championships in Athletics]] |IAAF World Youth Championships in Athletics|World Youth Championships in Athletics|Youth Championships in Athletics|World Youth Championships|YCA|yca|WYCA|wyca|WYC|wyc=[[IAAF World Youth Championships in Athletics|World Youth Championships in Athletics]] |IAAF World Race Walking Cup|World Race Walking Cup|Race Walking Cup|RWC|rwc|WRWC|wrwc=[[IAAF World Race Walking Cup|World Race Walking Cup]] |IAAF World Cup in Athletics|World Cup in Athletics|WCA|wca|Athletics World Cup=[[IAAF World Cup in Athletics|World Cup in Athletics]] |IAAF Golden League|Golden League|golden league|GL|gl=[[IAAF Golden League|Golden League]] |IAAF World Athletics Final|World Athletics Final|Athletics Final|waf|af|WAF|AF=[[IAAF World Athletics Final|World Athletics Final]] |IAAF Grand Prix Final|Grand Prix Final|GPF|gpf=[[IAAF Grand Prix Final|Grand Prix Final]] |Paralympic Games|paralympic games|Paralympic games|Paralympics|paralympics|Paralympic|paralympic|PG|pg|PAR|par=[[Paralympic Games]] |#default={{{1}}} }}<noinclude> |} {{documentation}} </noinclude> phm19lyc1f0idgb5tdiyk3mgt0iwo90 Templat:MedalCount 10 1136 4723 2024-08-19T16:29:43Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{|</noinclude> |- | colspan="3" style="padding:0" | {| style="margin:0; width:100%;" {{#if:{{{type|}}}| ! colspan="4" style="color:inherit; background-color:#CCCCCC; text-align:center;" {{!}} {{{type}}} }} |- ! scope="col" style="color:inherit; background-color:#CCCCCC; text-align:center;" | {{#if:{{{event_label|}}}|{{{event_label}}}|Event}} ! scope="col" style="color:inherit; background-color:#FFD700; text-align:center;" | 1{{small|st}} ! s...' 4723 wikitext text/x-wiki <noinclude>{|</noinclude> |- | colspan="3" style="padding:0" | {| style="margin:0; width:100%;" {{#if:{{{type|}}}| ! colspan="4" style="color:inherit; background-color:#CCCCCC; text-align:center;" {{!}} {{{type}}} }} |- ! scope="col" style="color:inherit; background-color:#CCCCCC; text-align:center;" | {{#if:{{{event_label|}}}|{{{event_label}}}|Event}} ! scope="col" style="color:inherit; background-color:#FFD700; text-align:center;" | 1{{small|st}} ! scope="col" style="color:inherit; background-color:#C0C0C0; text-align:center;" | 2{{small|nd}} ! scope="col" style="color:inherit; background-color:#CC9966; text-align:center;" | 3{{small|rd}} |- {{#if:{{{1|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{1}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{2|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{3|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{4|}}}}} }} |- {{#if:{{{5|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{5}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{6|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{7|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{8|}}}}} }} |- {{#if:{{{9|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{9}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{10|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{11|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{12|}}}}} }} |- {{#if:{{{13|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{13}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{14|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{15|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{16|}}}}} }} |- {{#if:{{{17|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{17}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{18|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{19|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{20|}}}}} }} |- {{#if:{{{21|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{21}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{22|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{23|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{24|}}}}} }} |- {{#if:{{{25|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{25}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{26|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{27|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{28|}}}}} }} |- {{#if:{{{29|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{29}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{30|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{31|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{32|}}}}} }} |- {{#if:{{{33|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{33}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{34|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{35|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{36|}}}}} }} |- {{#if:{{{37|}}}| ! scope="row" style="font-weight:normal; text-align:left;" {{!}} {{#if:1|{{{37}}}}} {{!}} style="color:inherit; background-color:#FEEC80; text-align:center;" {{!}} {{#if:1|{{{38|}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; text-align:center;" {{!}} {{#if:1|{{{39|}}}}} {{!}} style="color:inherit; background-color:#FFCC99; text-align:center;" {{!}} {{#if:1|{{{40|}}}}} }} {{#ifeq:{{yesno|{{{total|}}}}}|yes| {{!}}- ! scope="row" style="text-align:left;" {{!}} {{#if:{{{total_label|}}}|{{{total_label|}}}|Total}} {{!}} style="color:inherit; background-color:#FEEC80; font-weight:bold; text-align:center;" {{!}} {{#expr:{{isnumeric|{{{2|0}}}}}+{{isnumeric|{{{6|0}}}}}+{{isnumeric|{{{10|0}}}}}+{{isnumeric|{{{14|0}}}}}+{{isnumeric|{{{18|0}}}}}+{{isnumeric|{{{22|0}}}}}+{{isnumeric|{{{26|0}}}}}+{{isnumeric|{{{30|0}}}}}+{{isnumeric|{{{34|0}}}}}+{{isnumeric|{{{38|0}}}}}}} {{!}} style="color:inherit; background-color:#E5E5E5; font-weight:bold; text-align:center;" {{!}} {{#expr:{{isnumeric|{{{3|0}}}}}+{{isnumeric|{{{7|0}}}}}+{{isnumeric|{{{11|0}}}}}+{{isnumeric|{{{15|0}}}}}+{{isnumeric|{{{19|0}}}}}+{{isnumeric|{{{23|0}}}}}+{{isnumeric|{{{27|0}}}}}+{{isnumeric|{{{31|0}}}}}+{{isnumeric|{{{35|0}}}}}+{{isnumeric|{{{39|0}}}}}}} {{!}} style="color:inherit; background-color:#FFCC99; font-weight:bold; text-align:center;" {{!}} {{#expr:{{isnumeric|{{{4|0}}}}}+{{isnumeric|{{{8|0}}}}}+{{isnumeric|{{{12|0}}}}}+{{isnumeric|{{{16|0}}}}}+{{isnumeric|{{{20|0}}}}}+{{isnumeric|{{{24|0}}}}}+{{isnumeric|{{{28|0}}}}}+{{isnumeric|{{{32|0}}}}}+{{isnumeric|{{{36|0}}}}}+{{isnumeric|{{{40|0}}}}}}} }} |}<noinclude> |} {{Documentation}} </noinclude> cr2gd7ke7jpfg6hbff4c125zvdcx94k Templat:MedalCountry 10 1137 4726 2024-08-19T16:30:41Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude>{{Medal|Country|{{trim|1={{{1}}}}}}}<noinclude> |} {{-}} {{tmbox|text=This template should be used for athletes who have competed for different countries. There are many examples from the break up of the USSR as well as athletes from the UK competing at the Commonwealth Games. Other athletes have switched nationality, for example [[Wilson Kipketer]] was Kenyan but competed for Denmark too.}} {{documentation|Template:Medal tem...' 4726 wikitext text/x-wiki <noinclude>{| </noinclude>{{Medal|Country|{{trim|1={{{1}}}}}}}<noinclude> |} {{-}} {{tmbox|text=This template should be used for athletes who have competed for different countries. There are many examples from the break up of the USSR as well as athletes from the UK competing at the Commonwealth Games. Other athletes have switched nationality, for example [[Wilson Kipketer]] was Kenyan but competed for Denmark too.}} {{documentation|Template:Medal templates documentation}} {{Sandbox other|| [[Category:Medal infobox templates]] }}</noinclude> 3kqus0t3bv1sqqwbpkty63w6euvf529 Templat:Trim 10 1138 4729 2024-08-19T16:31:42Z Rombituon 59 Mencipta laman baru dengan kandungan '<includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude>' 4729 wikitext text/x-wiki <includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 757g7pokoq514f9oi2nwaddkdp2ohtn Templat:Tmbox 10 1139 4730 2024-08-19T16:32:34Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>' 4730 wikitext text/x-wiki {{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> jcav8pdjkvcwg8gc4m0b4gox7yjnxku Modul:Message box/tmbox.css 828 1140 4731 2024-08-19T16:33:29Z Rombituon 59 Mencipta laman baru dengan kandungan '/* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tm...' 4731 sanitized-css text/css /* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tmbox-content { border: 2px solid #f28500; /* Orange */ } .tmbox-style { border: 2px solid #fc3; /* Yellow */ } .tmbox-move { border: 2px solid #9932cc; /* Purple */ } .tmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .tmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .tmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .tmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .tmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .tmbox { margin: 4px 10%; } .tmbox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } @media screen { html.skin-theme-clientpref-night .tmbox { background-color: #2e2505; /* Dark brown, same hue/saturation as light */ } html.skin-theme-clientpref-night .tmbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .tmbox { background-color: #2e2505; /* Dark brown, same hue/saturation as light */ } html.skin-theme-clientpref-os .tmbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } /** T367463 */ body.skin--responsive table.tmbox img { max-width: none !important; } rfgc7ll3u9xqbcynuop86eq5pxfhf7o Templat:MedalGold 10 1141 4732 2024-08-19T16:35:37Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude>{{Medal|Gold|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalGold missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalGold missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude>' 4732 wikitext text/x-wiki <noinclude>{| </noinclude>{{Medal|Gold|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalGold missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalGold missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude> 6yoydwj8wnhf7vgn9nxw9b92rr357u9 Templat:MedalSport 10 1142 4733 2024-08-19T16:36:32Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude> |- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#eeeeee;color:inherit;" | {{{1}}}{{Main other | {{#ifeq: {{#property:P21}} | male | {{#ifeq: {{str left|{{{1}}}|5}} | Women | [[Category:Articles about men with MedalSport template for women's sport]]}}}}{{#ifeq: {{#property:P21}} | female | {{#ifeq: {{str left|{{{1}}}|3}} | Men | Category:Articles about women with MedalSport template for men's...' 4733 wikitext text/x-wiki <noinclude>{| </noinclude> |- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#eeeeee;color:inherit;" | {{{1}}}{{Main other | {{#ifeq: {{#property:P21}} | male | {{#ifeq: {{str left|{{{1}}}|5}} | Women | [[Category:Articles about men with MedalSport template for women's sport]]}}}}{{#ifeq: {{#property:P21}} | female | {{#ifeq: {{str left|{{{1}}}|3}} | Men | [[Category:Articles about women with MedalSport template for men's sport]]}}}}}}<noinclude> |} {{documentation}} </noinclude> r6ayli0fzmwepppltns6pu4oflkp07u Templat:MedalSilver 10 1143 4734 2024-08-19T16:37:27Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude>{{Medal|Silver|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalSilver missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalSilver missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude>' 4734 wikitext text/x-wiki <noinclude>{| </noinclude>{{Medal|Silver|{{{1}}}|{{{2}}}}}{{Main other|{{#if:{{{1|}}}||{{#if:{{{1}}}|[[Category:Articles using Template:MedalSilver missing an expected parameter]]}}}}{{#if:{{{2|}}}||{{#if:{{{2}}}|[[Category:Articles using Template:MedalSilver missing an expected parameter]]}}}}}}<noinclude> |} {{documentation}} </noinclude> akmoy412y1gzh9tlbx5uck59hdmyfiw Templat:MedalOlympic 10 1144 4737 2024-08-19T16:38:21Z Rombituon 59 Melencong ke [[Templat:MedalOlympics]] 4737 wikitext text/x-wiki #REDIRECT [[Template:MedalOlympics]] [[Category:Medal infobox templates]] 1ebrwfim1baj55t2m91dbdiv2vc1d8v Templat:MedalOlympics 10 1145 4739 2024-08-19T16:38:44Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{| </noinclude>|- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit;" | [[Olympic Games]]<noinclude> |} {{documentation|Template:Medal templates documentation}} [[Category:Medal infobox templates]] </noinclude>' 4739 wikitext text/x-wiki <noinclude>{| </noinclude>|- ! colspan="3" style="text-align:center;vertical-align:middle;background-color:#cccccc;color:inherit;" | [[Olympic Games]]<noinclude> |} {{documentation|Template:Medal templates documentation}} [[Category:Medal infobox templates]] </noinclude> gimf32fk5lx5jc962dh0es83p0mkey7 Templat:Isnumeric 10 1146 4742 2024-08-19T16:39:57Z Rombituon 59 Mencipta laman baru dengan kandungan '{{safesubst<noinclude/>:#iferror:{{safesubst<noinclude/>:#expr:{{safesubst<noinclude/>:formatnum:{{{1|error}}}|R}}*0}}|{{safesubst<noinclude/>:#ifeq:{{{boolean|false}}}|true|0|}}|{{safesubst<noinclude/>:#ifeq:{{{boolean|false}}}|true|1|{{{1}}}}}}}<noinclude>{{documentation}}</noinclude>' 4742 wikitext text/x-wiki {{safesubst<noinclude/>:#iferror:{{safesubst<noinclude/>:#expr:{{safesubst<noinclude/>:formatnum:{{{1|error}}}|R}}*0}}|{{safesubst<noinclude/>:#ifeq:{{{boolean|false}}}|true|0|}}|{{safesubst<noinclude/>:#ifeq:{{{boolean|false}}}|true|1|{{{1}}}}}}}<noinclude>{{documentation}}</noinclude> sjoy502mkl7mcl9x9svmivtrs529iqi Templat:MAS 10 1147 4744 2024-08-19T16:40:56Z Rombituon 59 Melencong ke [[Templat:MYS]] 4744 wikitext text/x-wiki #REDIRECT[[Template:MYS]] {{Rcat shell|{{R from merge}}{{R from template shortcut}}}} 6yipzeg2mn403prnexkzt0hmo0uoro5 Templat:MYS 10 1148 4745 2024-08-19T16:41:21Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:flag||Malaysia|23px}}<noinclude> {{flag template documentation|Malaysia|MYS|MAS|MAS}} </noinclude>' 4745 wikitext text/x-wiki {{#invoke:flag||Malaysia|23px}}<noinclude> {{flag template documentation|Malaysia|MYS|MAS|MAS}} </noinclude> hl5b1zpqxc9wpa8fvhzsde5jr43h6ze Modul:Flag 828 1149 4746 2024-08-19T16:42:01Z Rombituon 59 Mencipta laman baru dengan kandungan 'local margs = require('Module:Arguments') local function _main(frame, name, mode) local categories = { ['Flag icon'] = '[[Category:Flag icons missing country data templates]]', ['Flag decoration'] = '[[Category:Flag decoration missing country data templates]]', } local yesno = require('Module:Yesno') --Get input arguments local args = margs.getArgs(frame, { frameOnly = ((frame.args.frameonly or '') ~= ''), valueFunc = function(key,v...' 4746 Scribunto text/plain local margs = require('Module:Arguments') local function _main(frame, name, mode) local categories = { ['Flag icon'] = '[[Category:Flag icons missing country data templates]]', ['Flag decoration'] = '[[Category:Flag decoration missing country data templates]]', } local yesno = require('Module:Yesno') --Get input arguments local args = margs.getArgs(frame, { frameOnly = ((frame.args.frameonly or '') ~= ''), valueFunc = function(key,value) if value then value = mw.text.trim(value) --Change empty string to nil for all args except 'image' and 'border' if key=="image" or key=="border" or value~="" then return value end end return nil end } ) local preftext, sufftext = "", "" if name == 'Flag+link' then args.pref = args[1] elseif name == 'Flag athlete' then args.preftext = args[1] args[2] = args.code or args[2] or "" args.variant = args.variant or args[3] elseif name == 'Flag medalist' then preftext = (args[1] or "") .. "<br/>" args[2] = args.code or args[2] or "" args.variant = args.variant or args[3] elseif name == 'Flag link' then args.suff = args[2] args[2] = args[1] or "" args.variant = args.variant or args[3] else sports = {fb = 'fb', ['fb-rt'] = 'fb', fbicon = 'fb', ru = 'ru'} if sports[name] then args.avar = sports[name] if name == 'fb' and yesno(args.align) == true then args.align='c' end elseif name == "Flag team" and (args.code or args[1]) then sufftext = '&nbsp;<span style="font-size:90%;">('..(args.code or args[1])..')</span>' end args.variant = args.variant or args[2] args[2] = args[1] or "" end args[1] = mode .. (args.opts or '') args.missingcategory = categories[name] args.noredlink = args.noredlink or 'notext' if args.placeholder and yesno(args.placeholder) ~= true then args[1] = args[1] .. 'o' end if mw.title.getCurrentTitle().namespace == 0 then local unknown = '[[Category:Pages using ' .. mw.ustring.lower(name) .. ' template with unknown parameters|_VALUE_' .. frame:getParent():getTitle() .. ']]' else local unknown = '' end check = '' if name == 'Flag icon' then local opts = { unknown=unknown, preview='Page using [[Template:' .. name .. ']] with unknown parameter "_VALUE_"', ignoreblank='y', '1','2','variant','image','size','sz','border','align','al','width', 'w','alt','ilink','noredlink','missingcategory','name','clink','link', 'pref','suff','plink','the','section','altvar','avar','age','nalign', 'nal','text','nodata','opts','placeholder','getParent','frameonly' } check = require('Module:Check for unknown parameters')._check(opts,args) end return preftext .. require('Module:Flagg').luaMain(frame,args) .. sufftext .. check end local p = { [''] = function (frame) return _main(frame, 'Flag', 'unc' ) end, decoration = function (frame) return _main(frame, 'Flag decoration', 'uxx' ) end, icon = function (frame) return _main(frame, 'Flag icon', 'cxxl' ) end, link = function (frame) return _main(frame, 'Flag link', 'unpe' ) end, ['+link'] = function (frame) return _main(frame, 'Flag+link', 'unpefo') end, country = function (frame) return _main(frame, 'Flag country', 'unce' ) end, team = function (frame) return _main(frame, 'Flag team', 'unce' ) end, athlete = function (frame) return _main(frame, 'Flag athlete', 'unape' ) end, medalist = function (frame) return _main(frame, 'Flag medalist', 'unce' ) end, fb = function (frame) return _main(frame, 'fb', 'unpe' ) end, ['fb-rt'] = function (frame) return _main(frame, 'fb-rt', 'unpre' ) end, fbicon = function (frame) return _main(frame, 'fbicon', 'pxxl' ) end, ru = function (frame) return _main(frame, 'ru', 'unpe' ) end, IOC = function (frame) return require('Module:Country_alias').flagIOC(frame:newChild{ title = 'Template:Flag IOC' }) end, IOC2 = function (frame) return require('Module:Country_alias').flagXYZ(frame:newChild{ title = 'Template:Flag IOC 2', args = {name = margs.getArgs(frame).name or '', type = 'name'} }) end, IOCathlete = function (frame) return require('Module:Country_alias').flagXYZ(frame:newChild{ title = 'Template:Flag IOC athlete', args = {type = 'athlete-O'} }) end, } p['deco'] = p.decoration p['IOC 2'] = p.IOC2 p['IOC athlete'] = p.IOCathlete return p eg3azx83sa1hgofkfx6dr0ryoejq11h Modul:Flagg 828 1150 4747 2024-08-19T16:43:35Z Rombituon 59 Mencipta laman baru dengan kandungan 'local titleSelf = mw.title.new(... or mw.getCurrentFrame():getTitle()) local titleCountryData = mw.title.new[[Module:CountryData]] if titleSelf.isSubpage then local sandbox = titleSelf.subpageText:match[[^sandbox]] if sandbox then titleCountryData = titleCountryData:subPageTitle(sandbox) end end local CountryData = require(tostring(titleCountryData)) local p = {} function p.main(frame) --Get input arguments local args = require('Module:Argumen...' 4747 Scribunto text/plain local titleSelf = mw.title.new(... or mw.getCurrentFrame():getTitle()) local titleCountryData = mw.title.new[[Module:CountryData]] if titleSelf.isSubpage then local sandbox = titleSelf.subpageText:match[[^sandbox]] if sandbox then titleCountryData = titleCountryData:subPageTitle(sandbox) end end local CountryData = require(tostring(titleCountryData)) local p = {} function p.main(frame) --Get input arguments local args = require('Module:Arguments').getArgs(frame,{valueFunc = function(key,value) if value then value = mw.text.trim(value) --Change empty string to nil for all args except 'image' and 'border' if key=="image" or key=="border" or value~="" then return value end end return nil end }) --Call main function return p.luaMain(frame,args) end function p.luaMain(frame,args) local function emp2nil(x) if x=="" then return nil else return x end end local function space2emp(x) if string.find(x,"^%s*$") then return "" else return x end end local function nopx(x) if x~=nil and (string.find(x,"^%d+$") or string.find(x,"^%d+px$")) then return string.gsub(x,"^(.*)px","%1") else return nil end end --Country & mode parameters local mode = string.lower(args[1] or "usc") local mi = string.sub(mode,1,1) local ms = string.sub(mode,2,2) local mn = string.sub(mode,3,3) local me = string.sub(mode,4,-1) local country = args[2] or "" local countryDataCountry = country if string.find(me, "i") then local titleIocCountryData = mw.title.new[[Module:Country alias/data]] local IocCountryData = require(tostring(titleIocCountryData)) local iocCountryAlias = IocCountryData.countryAliases[country] or country countryDataCountry = IocCountryData.countries[iocCountryAlias]["countrydata_name"] or IocCountryData.countries[iocCountryAlias]["name"] end local avar = args["avar"] or args["altvar"] local clink = args["clink"] or args["link"] --Get country data & altvar data local data, alink, amap, asuf if avar then local age = args["age"] or "" local aalias amap, aalias = require("Module:Flagg/Altvar data").alttable(age) avar = string.gsub(string.lower(avar or ""),"[ -]","") avar = aalias[avar] or avar if not amap[avar] then error("Unknown avar") end local apar = {altvar=amap[avar].altvar;mw=amap[avar].mw;age=amap[avar].age;variant=args["variant"] or args[3]} data = CountryData.getcachedtable(frame, countryDataCountry, apar) asuf = amap[avar].altlink alink = data["link alias-"..amap[avar].altvar] or (clink or data["shortname alias"] or data.alias or country).." "..asuf else data = (args["nodata"] and {}) or CountryData.getcachedtable(frame, countryDataCountry, {variant=args["variant"] or args[3]}) avar = "" amap = {[""]={altvar=""}} end --Name and link parameters clink = clink or data.alias or country local pref = args["pref"] local suff = args["suff"] or asuf local pref2 = args["pref2"] local suff2 = args["suff2"] if not pref and not suff then --Default prefix pref = "Flag of" end local yn_map = {[""]=0; ["0"]=0; ["no"]=0; ["n"]=0; ["1"]=1; ["yes"]=1; ["y"]=1} local fthe = (args["pthe"] and yn_map[args["pthe"]]~=0) or (args["the"] and yn_map[args["the"]]~=0) local nthe = (args["nthe"] and yn_map[args["nthe"]]~=0) or (args["the"] and yn_map[args["the"]]~=0) fthe = fthe and (pref and "t" or "T").."he " or "" nthe = nthe and (pref and "t" or "T").."he " or "" local flink = args["plink"] or args["flink"] or alink or clink=="" and "" or space2emp((pref or "").." ")..fthe..clink..space2emp(" "..(suff or "")) local flink2 if args["plink2"] or args["flink2"] or pref2 or suff2 then flink2 = args["plink2"] or args["flink2"] or clink=="" and "" or space2emp((pref2 or "").." ")..fthe..clink..space2emp(" "..(suff2 or "")) else flink2 = flink end local fsec = args["psection"] or args["section"] local fsec2 = args["psection2"] or args["section"] local csec = args["csection"] or args["section"] fsec = fsec and "#"..fsec or "" fsec2 = fsec2 and "#"..fsec2 or "" csec = csec and "#"..csec or "" if string.find(me,"f") then if mw.title.new( flink ).exists == false then if flink2 ~= flink and mw.title.new ( flink2 ).exists == true then flink = flink2 fsec = fsec2 else flink = clink end end end local name = args["name"] if not name then local cname = string.find(me,"e") and (data["name alias-"..amap[avar].altvar] or data["shortname alias"] or data.alias) or country if mn == "f" then name = cname=="" and "" or space2emp((pref or "").." ")..nthe..cname..space2emp(" "..(suff or "")) else name = cname end end --Image parameters local pimage = args["image"] local placeholder = "Flag placeholder.svg" local variant = args["variant"] or args[3] or "" local image_map = {[""]=placeholder; ["none"]=placeholder; ["blank"]=placeholder} if pimage then --Remove namespace pimage = string.gsub(pimage,"^[Ff][Ii][Ll][Ee]:","") pimage = string.gsub(pimage,"^[Ii][Mm][Aa][Gg][Ee]:","") end local iname = image_map[pimage] or pimage local size = args["size"] or args["sz"] local size_map = {xs="12x8px"; s="17x11px"; m="23x15px"; l="32x21px"; xl="46x30px"} if size==nil or string.find(size,"^%d*x?%d+px$") then --valid EIS size (..px, x..px or ..x..px) or unset elseif string.find(size,"^%d*x?%d+$") then --EIS size without "px" suffix size=size.."px" else --size from map, or invalid value size = size_map[size] or nil end local border = args["border"] if iname then size = size or "23x15px" if yn_map[border]==0 then border = "" else border = "|border" end else iname = data["flag alias-"..amap[avar].altvar.."-"..variant] or data["flag alias-"..variant] or data["flag alias-"..amap[avar].altvar] or data["flag alias"] or placeholder size = size or emp2nil(data.size) or "23x15px" if border then if yn_map[border]==0 then border = "" else border = "|border" end else local autoborder = data["border-"..variant] or data["border-"..amap[avar].altvar] or data.border if autoborder and autoborder~="border" then border = "" else border = "|border" end end end local am = "" if args["alt"] or string.find(me,"a") then am = args["alt"] or args["name"] or country am = am.."|"..am end --Build display name local text = args["text"] if not text then if mn=="x" then --no text text = "" elseif mn=="p" or mn=="f" or mn == "*" then --prefix/suffix link text = flink=="" and name or "[["..flink..fsec.."|"..name.."]]" -- By the principle of least surprise, there should be some -- indication that the link [[X of Country|Country]] does not -- go to [[Country]]. if mn == "*" and clink ~= flink then text = text:sub(1, -3) .. "\226\128\175*]]" end elseif mn=="l" then --display link target text = flink=="" and name or "[["..flink..fsec.."|"..(args["name"] or flink).."]]" elseif mn=="b" then --both prefix/suffix and normal country link local preflink = pref and (flink=="" and pref.." " or "[["..flink..fsec.."|"..pref.."]] ") or "" local sufflink = suff and (flink=="" and " "..suff or " [["..flink..fsec.."|"..suff.."]]") or "" local namelink = (name=="" and "" or nthe)..(clink=="" and name or "[["..clink..csec.."|"..name.."]]") text = preflink..namelink..sufflink elseif mn=="d" then --data template local title = mw.title.new("Template:Country data "..country) --check if redirect if title.isRedirect then text = "<span class=\"plainlinks\">["..title:fullUrl("redirect=no").." "..name.."]</span>" else text = "[["..title.fullText.."|"..name.."]]" end elseif mn=="u" then --unlinked text = name elseif mn=="a" then --abbr text = name==country and (clink==country and country or "<abbr title='"..clink.."'>"..country.."</abbr>") or ("<abbr title='"..name.."'>"..country.."</abbr>") else --country link (default) text = clink=="" and name or "[["..clink..csec.."|"..name.."]]" end if string.find(me,"p") then text = "("..text..")" end end if type(text) == 'function' then text = text(data) end --Define separator local separator = "&nbsp;" --non-breaking space (n) if ms=="x" then --no separator separator = "" elseif ms=="l" then --line break separator = "<br />" end --Add preftext, if used local preftext = args["preftext"] if (preftext or "") ~= "" then text = preftext..separator..text end --Build image local ilink = args["ilink"] if not ilink then if mi=="x" or (iname==placeholder and pimage~=placeholder) then --no image/invisible image iname = placeholder border = "" ilink = "|link=" am = "" elseif mi=="i" then --image page link ilink = "" elseif mi=="c" then --country link ilink = "|link="..clink..(clink=="" and "" or csec) elseif mi=="p" or mi=="f" then --prefix/suffix link ilink = "|link="..flink..(flink=="" and "" or fsec) elseif mi=="d" then --data template local title = mw.title.new("Template:Country data "..country) --check if redirect if title.isRedirect then ilink = "|link="..title:fullUrl("redirect=no") else ilink = "|link="..title.fullText end else --unlinked (default) ilink = "|link=" end end if am == "" and string.find(me,"l") then am = mw.ustring.sub(ilink,7,-1) end local image = "[[File:"..iname.."|"..size..border..ilink.."|alt="..am.."]]" if iname==placeholder then if require('Module:yesno')(args["noredlink"]) == false or args["noredlink"] == "notext" then if country ~= '' and data.alias == nil then iname = '' image = "[[:Template:Country data "..country.."]]" if args["noredlink"] == "notext" then text = '' end end end if (args["missingcategory"] or '') ~= '' then image = image..args["missingcategory"] end if string.find(me,"b") then text = '' end end --Combine image and name with separator local align_map = {left="left", l="left", center="center", centre="center", c="center", middle="center", m="center", right="right", r="right"} local align = align_map[args["align"] or args["al"]] local nalign = align_map[args["nalign"] or args["nal"]] local out if string.find(me,"r") then --image right of name if (ms=="x" and mi=="x") or (string.find(me,"o") and iname==placeholder and pimage~=placeholder) then --name only out = text elseif ms=="x" or ms=="n" or ms=="l" then --no separator, non-breaking space, or line break out = text.."<span class=\"flagicon\">"..separator..image.."</span>" elseif ms=="t" then --table cell out = "style=\"text-align:"..(nalign or "left").."\"|"..text.."||style=\"text-align:"..(align or "center").."\"|<span class=\"flagicon\">"..image.."</span>" else --fixed-width span box (default) local width = args["width"] or args["w"] or require("Module:Flaglist").luawidth(size) out = text.."&nbsp;<span class=\"flagicon\" style=\"display:inline-block;width:"..width.."px;text-align:"..(align or "right").."\">"..image.."</span>" end else --image left of name if (ms=="x" and mi=="x") or (string.find(me,"o") and iname==placeholder and pimage~=placeholder) then --name only out = text elseif ms=="x" or ms=="n" or ms=="l" then --no separator, non-breaking space, or line break out = "<span class=\"flagicon\">"..image..separator.."</span>"..text elseif ms=="t" then --table cell out = "style=\"text-align:"..(align or "center")..";\"|<span class=\"flagicon\">"..image.."</span>||style=\"text-align:"..(nalign or "left").."\"|"..text else --fixed-width span box (default) local width = nopx(args["width"] or args["w"]) or require("Module:Flaglist").luawidth(size) out = "<span class=\"flagicon\" style=\"display:inline-block;width:"..width.."px;text-align:"..(align or "left").."\">"..image.."</span>&nbsp;"..text end end if string.find(me,"w") then --avoid wrapping out = "<span class=\"nowrap\">"..out.."</span>" end -- align in table if me:find("t") then out = 'style="text-align:'..(align or 'left')..'"|'..out end --Tracking categories local cat = "" if pimage and not image_map[pimage] and country~="" and data["flag alias"] and not args.demo then cat = "[[Category:Pages using Flagg with specified image instead of data template image]]" end return out..cat end p[''] = p.main return p pspc8fkqsn46xmc10y4hoq6cvako9u4 Templat:Rcat shell 10 1151 4751 2024-08-19T16:44:47Z Rombituon 59 Melencong ke [[Templat:Redirect category shell]] 4751 wikitext text/x-wiki #REDIRECT [[Template:Redirect category shell]] {{Redirect category shell| {{R from high-use template}} {{R to redirect template}} {{R from template shortcut}} }} p2aqcolqolaorvl3bv21oc68tkj2wxw Templat:Redirect category shell 10 1152 4752 2024-08-19T16:45:27Z Rombituon 59 Mencipta laman baru dengan kandungan '__NONEWSECTIONLINK__{{Mbox | name = Redirect category shell | type = move | image = none | style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em; | textstyle = padding-top: 0.9em; padding-bottom: 0.9em; | text = '''This {{Talk other|talk page|page}} is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''{{#if:{{{h|}}}...' 4752 wikitext text/x-wiki __NONEWSECTIONLINK__{{Mbox | name = Redirect category shell | type = move | image = none | style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em; | textstyle = padding-top: 0.9em; padding-bottom: 0.9em; | text = '''This {{Talk other|talk page|page}} is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''{{#if:{{{h|}}} |:: ''{{{h}}}'' }}<!-- Automatically detect protected redirects: --><includeonly>{{#switch: {{PROTECTIONLEVEL:move}} |sysop|templateeditor|extendedconfirmed={{pp-move|small=yes|catonly=no}} }}{{#switch: {{PROTECTIONLEVEL:edit}} |sysop={{pp-protected|small=yes}}{{R fully-protected|embed=yes}} |templateeditor={{pp-protected|small=yes}}{{R template protected|embed=yes}} |extendedconfirmed={{pp-protected|small=yes}}{{R extended-protected|embed=yes}} |autoconfirmed={{pp-protected|small=yes}}{{R semi-protected|embed=yes}} | <!--Not protected, or only semi-move-protected--> }}</includeonly>{{#if: {{{1|}}}||<includeonly> * {{red|'''Important – Please Read! {{maroon|This template should {{em|not}} be applied without parameters by bot nor by any automated or semi-automated process. It should {{em|not}} be used without parameters {{em|unless you want to learn how to categorize redirects}}. For editors who want to learn how to categorize redirects, this template is a {{em|learning tool}}. {{em|Only}} those editors who intend to return to the redirect to learn which rcats to use should apply this template without parameters, or with an empty first parameter!}}'''}}</includeonly> * '''Manifold sort''': If help is needed to determine appropriate categories, then this redirect populates '''{{Cat|Miscellaneous redirects}}'''. Monitors of that category will check this redirect and add or remove [[Wikipedia:Categorizing redirects|rcats]] as needed.{{#ifeq: {{lc:{{{nocat|false}}}}} | false |{{{category|<includeonly>[[Category:Miscellaneous redirects]]</includeonly>}}}}} }} {{#if: {{{2|}}}|{{{2}}}|{{{1|}}}}}{{#if: {{{1|}}}{{{2|}}}||{{#ifeq: {{ROOTPAGENAME}}|Redirect category shell||[[Category:Redirect category shell without parameters]]}}}} ''<small>When appropriate, [[Wikipedia:Protection policy|protection levels]] are automatically sensed, described and categorized.</small>'' }}<noinclude> {{Documentation}} </noinclude> p21zwzpenmnu6tzdzfod021s26eybft Templat:Cat 10 1153 4753 2024-08-19T16:46:08Z Rombituon 59 Melencong ke [[Templat:Category link]] 4753 wikitext text/x-wiki #REDIRECT [[Template:Category link]] {{Redirect category shell| {{R from merge}} {{R from template shortcut}} }} pdnvarboglzpwmmx9vjjpz5xqrrl6vu Templat:Talk other 10 1154 4754 2024-08-19T16:46:37Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | other }} }} | talk = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} </noinclude>' 4754 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | other }} }} | talk = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} </noinclude> jp99kuih528b90wq2so1nbhkt480jzw Templat:R from merge 10 1155 4755 2024-08-19T16:47:53Z Rombituon 59 Mencipta laman baru dengan kandungan '<noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from merge |name=From a merge |from=a page that was merged into another page |info=This redirect was kept in order to preserve [[Special:PageHistory/{{FULLPAGENAMEE}}|'''the edit history of this page''']] after its content was merged into {{#if:{{{1|}}}|'''[[{{{1}}}]]'''|the content of the target page}}. Please ''do not'' remove the tag that generates this text (unles...' 4755 wikitext text/x-wiki <noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from merge |name=From a merge |from=a page that was merged into another page |info=This redirect was kept in order to preserve [[Special:PageHistory/{{FULLPAGENAMEE}}|'''the edit history of this page''']] after its content was merged into {{#if:{{{1|}}}|'''[[{{{1}}}]]'''|the content of the target page}}. Please ''do not'' remove the tag that generates this text (unless the need to recreate content on this page has been demonstrated) or delete this page. ** For redirects with substantive [[Help:page histories|page histories]] that ''did not result from page merges'' use {{tl|R with history}} instead. |all category=Redirects from merges }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> n5y7p9w41cjqouy7lq6e8e3cxrmav57 Templat:Redirect template 10 1156 4756 2024-08-19T16:48:53Z Rombituon 59 Mencipta laman baru dengan kandungan '{{#invoke:Redirect template|main}}<noinclude> {{Documentation}}</noinclude>' 4756 wikitext text/x-wiki {{#invoke:Redirect template|main}}<noinclude> {{Documentation}}</noinclude> 1cl28dcwjsrtge5hedu653jwub1cll3 Modul:Redirect template 828 1157 4757 2024-08-19T16:49:45Z Rombituon 59 Mencipta laman baru dengan kandungan 'require('strict') local p = {} -- key is beginning of arg name. value is table with namespace number and link -- alternatively, a function taking the namespace number and returning a validity -- can be used local namespaceCategories = { all = { function() return true end }, main = { 0, '[[wp:mainspace|main]]' }, help = { 12, '[[wp:help namespace|help]]' }, portal = { 100, '[[wp:portal|portal]]' }, talk = { function(n) return n > 0 and n%2 == 1 e...' 4757 Scribunto text/plain require('strict') local p = {} -- key is beginning of arg name. value is table with namespace number and link -- alternatively, a function taking the namespace number and returning a validity -- can be used local namespaceCategories = { all = { function() return true end }, main = { 0, '[[wp:mainspace|main]]' }, help = { 12, '[[wp:help namespace|help]]' }, portal = { 100, '[[wp:portal|portal]]' }, talk = { function(n) return n > 0 and n%2 == 1 end, '[[Help:Talk pages|talk]]' }, template = { 10, '[[wp:template namespace|template]]' }, wikipedia = { 4, '[[wp:project namespace|Wikipedia project]]' }, category = { 14, '[[wp:categorization|category]]' }, user = { 2, '[[wp:user pages|user]]' }, } -- remove whitespaces from beginning and end of args local function valueFunc(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil end end return val end local function getPrettyName(args) for k in pairs(namespaceCategories) do if args[k .. ' category'] then return string.format("'''[[:Category:%s|%s]]''': ", args[k .. ' category'], args.name) end end return string.format("'''%s''': ", args.name) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Redirect template', valueFunc = valueFunc}) local namespace = mw.title.getCurrentTitle().namespace --- XXX: this is a HORRIBLE HACK. kill it with fire as soon as https://bugzilla.wikimedia.org/show_bug.cgi?id=12974 is fixed local beCompatibleWithBug12974 = args.info and (args.info:find('^[:;#*]', 1) == 1 or args.info:find('{|', 1, true) == 1) and '\n' or ' ' local content = string.format('\n<div class="rcat %s">\n*%sThis is a redirect%s%s.%s%s\n</div>', args.id and ('rcat-' .. string.gsub(args.id, ' ', '_')) or '', args.name and getPrettyName(args) or '', args.from and (' from ' .. args.from) or '', args.to and (' to ' .. args.to) or '', args.info and beCompatibleWithBug12974 or '', args.info or '' ) for k,v in pairs(namespaceCategories) do if args[k .. ' category'] then if type(v[1]) == 'function' and v[1](namespace) or v[1] == namespace then if args.sortkey then content = content .. string.format('[[Category:%s|%s]]', args[k .. ' category'], args.sortkey) else content = content .. string.format('[[Category:%s]]', args[k .. ' category']) end elseif args['other category'] then if args.sortkey then content = content .. string.format('[[Category:%s|%s]]', args['other category'], args.sortkey) else content = content .. string.format('[[Category:%s]]', args['other category']) end else content = content .. frame:expandTemplate{title = 'Incorrect redirect template', args = {v[2]}} end end end if namespace == 0 then local yesno = require('Module:Yesno') if yesno(args.printworthy) == true then return content .. '[[Category:Printworthy redirects]]' elseif yesno(args.printworthy) == false then return content .. '[[Category:Unprintworthy redirects]]' end end return content end return p m1s0pucd2yrwmlwi34xyra3h6pdtls8 Modul:CountryData 828 1158 4758 2024-08-19T16:52:04Z Rombituon 59 Mencipta laman baru dengan kandungan 'local p = {} local mostUsed = mw.loadData('Module:CountryData/summary') local function getcontents(frame,country,params) return frame:expandTemplate({title="Country data "..country;args=params}) end function p.getcachedtable(frame, country, params) country = mostUsed.redirects[country] or country if params and next(params) then return p.gettable(frame, country, params) end -- Uses mw.loadData to cache data for the most-used templates if mostUse...' 4758 Scribunto text/plain local p = {} local mostUsed = mw.loadData('Module:CountryData/summary') local function getcontents(frame,country,params) return frame:expandTemplate({title="Country data "..country;args=params}) end function p.getcachedtable(frame, country, params) country = mostUsed.redirects[country] or country if params and next(params) then return p.gettable(frame, country, params) end -- Uses mw.loadData to cache data for the most-used templates if mostUsed.pages[country] then local cache = mw.loadData('Module:CountryData/cache' .. mostUsed.pages[country]) if cache.data[country] then return cache.data[country] end end -- if not in cache return p.gettable(frame, country, params) end function p.gettable(frame,country,params) --Returns the parameters of a country data template as a Lua table --If not a valid data template, return empty table local bool, s = pcall(getcontents,frame,country,params or {}) if bool and (string.find(s,"^%{%{ *%{%{%{1") or string.find(s,"^%{%{safesubst: *%{%{%{1")) then --Replace parameter delimiters with arbitrary control characters --to avoid clashes if param values contain equals/pipe signs s = string.gsub(s,"|([^|=]-)=","\1\1%1\2") s = string.gsub(s,"}}%s*$","\1") --Loop over string and add params to table local part = {} for par in string.gmatch(s,"\1[^\1\2]-\2[^\1\2]-\1") do local k = string.match(par,"\1%s*(.-)%s*\2") local v = string.match(par,"\2%s*(.-)%s*\1") if v and not (v=="" and string.find(k,"^flag alias")) then part[k] = v end end return part else return {} end end function p.getalias(frame) --Returns a single parameter value from a data template local part = p.gettable(frame,frame.args[1]) if frame.args.variant then return tostring(part[frame.args[2].."-"..frame.args.variant] or part[frame.args[2]] or frame.args.def) else return tostring(part[frame.args[2]] or frame.args.def) end end function p.gettemplate(frame) --For testing, recreates the country data from the created Lua table --Get data table local data = p.gettable(frame,frame.args[1]) --Concatenate fields into a template-like string local out = "{{ {{{1}}}" for k,v in pairs(data) do out = out.."\n| "..k.." = "..v end return out.."\n}}" end return p cceq9gf8ovsa0t1xy826rbloh46yv3o Modul:CountryData/summary 828 1159 4759 2024-08-19T16:53:11Z Rombituon 59 Mencipta laman baru dengan kandungan 'local p = {} p.pages = {Afghanistan='K', Albania='H', Algeria='F', Angola='K', Argentina='B', Armenia='G', Australia='A', Austria='B', Azerbaijan='F', Bahrain='K', Bangladesh='I', Belarus='D', Belgium='B', Bolivia='J', Bosnia_and_Herzegovina='F', Brazil='B', Bulgaria='D', Cameroon='I', Canada='A', Chile='D', China='B', Chinese_Taipei='H', Colombia='D', Costa_Rica='I', Croatia='D', Cuba='G', Cyprus='G', Czech_Republic='B', Czechoslovakia='H', Democratic...' 4759 Scribunto text/plain local p = {} p.pages = {Afghanistan='K', Albania='H', Algeria='F', Angola='K', Argentina='B', Armenia='G', Australia='A', Austria='B', Azerbaijan='F', Bahrain='K', Bangladesh='I', Belarus='D', Belgium='B', Bolivia='J', Bosnia_and_Herzegovina='F', Brazil='B', Bulgaria='D', Cameroon='I', Canada='A', Chile='D', China='B', Chinese_Taipei='H', Colombia='D', Costa_Rica='I', Croatia='D', Cuba='G', Cyprus='G', Czech_Republic='B', Czechoslovakia='H', Democratic_Republic_of_the_Congo='K', Denmark='C', Dominican_Republic='H', East_Germany='K', Ecuador='G', Egypt='E', El_Salvador='J', England='B', Estonia='E', Ethiopia='J', Fiji='K', Finland='C', France='A', Germany='A', Ghana='G', Great_Britain='C', Greece='D', Guatemala='J', Honduras='K', Hong_Kong='F', Hungary='C', Iceland='G', India='A', Indonesia='E', Iran='B', Iraq='J', Ireland='E', Israel='D', Italy='A', Ivory_Coast='I', Jamaica='G', Japan='A', Jordan='K', Kazakhstan='E', Kenya='H', Kuwait='K', Latvia='F', Lebanon='J', Lithuania='F', Luxembourg='G', Malaysia='E', Mali='K', Malta='I', Mexico='C', Moldova='I', Montenegro='H', Morocco='F', Myanmar='J', Nepal='I', Netherlands='A', New_Zealand='C', Nigeria='E', North_Korea='J', North_Macedonia='I', Northern_Ireland='J', Norway='C', Pakistan='F', Panama='I', Paraguay='G', Peru='E', Philippines='E', Poland='A', Portugal='C', Puerto_Rico='H', Qatar='I', Republic_of_Ireland='F', Romania='C', Russia='A', Saudi_Arabia='H', Scotland='D', Senegal='I', Serbia='D', Singapore='F', Slovakia='D', Slovenia='D', South_Africa='C', South_Korea='C', Soviet_Union='E', Spain='A', Sri_Lanka='H', Sweden='B', Switzerland='B', Syria='J', Taiwan='K', Tanzania='K', Thailand='D', Trinidad_and_Tobago='J', Tunisia='G', Turkey='B', Uganda='J', Ukraine='C', United_Arab_Emirates='H', United_Kingdom='B', United_States='A', Uruguay='F', Uzbekistan='H', Venezuela='E', Vietnam='G', Wales='E', West_Germany='G', Yugoslavia='H', Zimbabwe='I', ['Georgia_(country)']='F'} p.redirects = {AFG='Afghanistan', ALB='Albania', ALG='Algeria', AND='Andorra', ANG='Angola', ARG='Argentina', ARM='Armenia', ARU='Aruba', ATG='Antigua and Barbuda', AUS='Australia', AUT='Austria', AZE='Azerbaijan', BAH='Bahamas', BAN='Bangladesh', BAR='Barbados', BDI='Burundi', BEL='Belgium', BEN='Benin', BER='Bermuda', BFA='Burkina Faso', BHR='Bahrain', BIH='Bosnia and Herzegovina', BLR='Belarus', BOL='Bolivia', BOT='Botswana', BRA='Brazil', BRU='Brunei', BUL='Bulgaria', BWA='Botswana', CAM='Cambodia', CAN='Canada', CAY='Cayman Islands', CGO='Republic of the Congo', CHE='Switzerland', CHI='Chile', CHL='Chile', CHN='China', CIS='Commonwealth of Independent States', CIV='Ivory Coast', CMR='Cameroon', COD='Democratic Republic of the Congo', COK='Cook Islands', COL='Colombia', CPV='Cape Verde', CRC='Costa Rica', CRO='Croatia', CSA='Confederate States of America', CSK='Czechoslovakia', CUB='Cuba', CUR='Curaçao', CYP='Cyprus', CZE='Czech Republic', Congo='Republic of the Congo', DEN='Denmark', DEU='Germany', DNK='Denmark', DOM='Dominican Republic', DRC='Democratic Republic of the Congo', ECU='Ecuador', EGY='Egypt', ENG='England', ESA='El Salvador', ESP='Spain', EST='Estonia', ETH='Ethiopia', EU='European Union', FIJ='Fiji', FIN='Finland', FJI='Fiji', FRA='France', FRG='West Germany', FRO='Faroe Islands', GAB='Gabon', GAM='Gambia', GBR='Great Britain', GDR='East Germany', GEO='Georgia (country)', GER='Germany', GHA='Ghana', GIB='Gibraltar', GRC='Greece', GRE='Greece', GRN='Grenada', GUA='Guatemala', GUI='Guinea', GUM='Guam', GUY='Guyana', Georgia='Georgia (country)', HAI='Haiti', HKG='Hong Kong', HON='Honduras', HRV='Croatia', HUN='Hungary', IDN='Indonesia', INA='Indonesia', IND='India', IRE='Ireland', IRI='Iran', IRL='Republic of Ireland', IRN='Iran', IRQ='Iraq', ISL='Iceland', ISR='Israel', ITA='Italy', JAM='Jamaica', JOR='Jordan', JP='Japan', JPN='Japan', KAZ='Kazakhstan', KEN='Kenya', KGZ='Kyrgyzstan', KOR='South Korea', KOS='Kosovo', KSA='Saudi Arabia', KUW='Kuwait', LAO='Laos', LAT='Latvia', LBN='Lebanon', LBR='Liberia', LBY='Libya', LCA='Saint Lucia', LIB='Lebanon', LIE='Liechtenstein', LIT='Lithuania', LTU='Lithuania', LUX='Luxembourg', LVA='Latvia', MAC='Macau', MAD='Madagascar', MAR='Morocco', MAS='Malaysia', MCO='Monaco', MDA='Moldova', MDV='Maldives', MEX='Mexico', MGL='Mongolia', MKD='North Macedonia', MLI='Mali', MLT='Malta', MNE='Montenegro', MON='Monaco', MOZ='Mozambique', MRI='Mauritius', MYA='Myanmar', MYS='Malaysia', NAM='Namibia', NCA='Nicaragua', NCL='New Caledonia', NED='Netherlands', NEP='Nepal', NGA='Nigeria', NGR='Nigeria', NIC='Nicaragua', NIG='Niger', NIR='Northern Ireland', NLD='Netherlands', NOR='Norway', NZ='New Zealand', NZL='New Zealand', OMA='Oman', PAK='Pakistan', PAN='Panama', PAR='Paraguay', PER='Peru', PHI='Philippines', PHL='Philippines', PLE='Palestine', PNG='Papua New Guinea', POL='Poland', POR='Portugal', PRC='China', PRI='Puerto Rico', PRK='North Korea', PRT='Portugal', PUR='Puerto Rico', QAT='Qatar', ROC='Republic of China', ROM='Romania', ROU='Romania', RSA='South Africa', RUS='Russia', RWA='Rwanda', SAM='Samoa', SCG='Serbia and Montenegro', SCO='Scotland', SEN='Senegal', SER='Serbia', SGP='Singapore', SIN='Singapore', SKN='Saint Kitts and Nevis', SLE='Sierra Leone', SLO='Slovenia', SLV='El Salvador', SMR='San Marino', SPA='Spain', SRB='Serbia', SRI='Sri Lanka', SUD='Sudan', SUI='Switzerland', SUR='Suriname', SVK='Slovakia', SVN='Slovenia', SWE='Sweden', SWI='Switzerland', SYR='Syria', TAN='Tanzania', TCH='Czechoslovakia', THA='Thailand', TJK='Tajikistan', TKM='Turkmenistan', TOG='Togo', TON='Tonga', TPE='Chinese Taipei', TRI='Trinidad and Tobago', TTO='Trinidad and Tobago', TUN='Tunisia', TUR='Turkey', TWN='Taiwan', UAE='United Arab Emirates', UGA='Uganda', UK='United Kingdom', UKGBI='United Kingdom of Great Britain and Ireland', UKR='Ukraine', UN='United Nations', URS='Soviet Union', URU='Uruguay', US='United States', USA='United States', USSR='Soviet Union', UZB='Uzbekistan', VAN='Vanuatu', VEN='Venezuela', VIE='Vietnam', WAL='Wales', WIN='West Indies', Washington='Washington (state)', YEM='Yemen', YUG='Yugoslavia', ZAF='South Africa', ZAM='Zambia', ZIM='Zimbabwe', ['Côte d\'Ivoire']='Ivory Coast', ['DR Congo']='Democratic Republic of the Congo', ['New York']='New York (state)', ['People\'s Republic of China']='China', ['SFR Yugoslavia']='Yugoslavia', ['Timor-Leste']='East Timor', ['United States Virgin Islands']='U.S. Virgin Islands', ['United States of America']='United States'} return p 0ymib7yb210s3i6vqfqrmfh8nkkjhgw Templat:Country data Malaysia 10 1160 4760 2024-08-19T16:54:23Z Rombituon 59 Mencipta laman baru dengan kandungan '{{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Malaysia | flag alias = Flag of Malaysia.svg | flag alias-1895 = Flag of the Federated Malay States (1895 - 1946).svg | flag alias-1948 = Flag of Malaya.svg | flag alias-naval = Naval Ensign of Malaysia.svg | link alias-naval = Royal Malaysian Navy | flag alias-air force = Royal Malaysian Air Force Flag.svg | link alias-air force = Royal Malaysian Air Force | flag alias-civil = Civil Ensign o...' 4760 wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Malaysia | flag alias = Flag of Malaysia.svg | flag alias-1895 = Flag of the Federated Malay States (1895 - 1946).svg | flag alias-1948 = Flag of Malaya.svg | flag alias-naval = Naval Ensign of Malaysia.svg | link alias-naval = Royal Malaysian Navy | flag alias-air force = Royal Malaysian Air Force Flag.svg | link alias-air force = Royal Malaysian Air Force | flag alias-civil = Civil Ensign of Malaysia.svg | link alias-civil = Malaysia | flag alias-army = Flag of the Malaysian Army.svg | link alias-army = Malaysian Army | flag alias-navy = Naval Ensign of Malaysia.svg | link alias-navy = Royal Malaysian Navy | flag alias-military = Flag of the Malaysian Armed Forces.svg | link alias-military = Malaysian Armed Forces | flag alias-coast guard = Flag of the Malaysian Maritime Enforcement Agency.svg | link alias-coast guard = Malaysian Maritime Enforcement Agency | flag alias-23px = Flag of Malaysia 23px.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1895 | var2 = 1948 | var3 = civil | redir1 = MYS | redir2 = MAS | related1 = Malaya | related2 = Malayan Union | related3 = Kingdom of Sarawak | related4 = North Borneo </noinclude> }} o45aauqa32jar1swdp9ktukxpeapouh Templat:Country showdata 10 1161 4762 2024-08-19T16:55:09Z Rombituon 59 Mencipta laman baru dengan kandungan '<includeonly>__NOEDITSECTION__ {{documentation|content= {{#if:{{{hatnote|}}}|{{{hatnote}}}}} {{#ifeq:{{#invoke:High-use|num|x|demo={{ROOTPAGENAME}}}}|many||{{High-use|demo={{ROOTPAGENAME}}}}}} {{notice|image=Exclamationdiamond.svg|<code>Template:{{{demopagename|{{PAGENAME}}}}}</code> is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as <code>[[Template:flag|flag]]</code>, <code>Template:fla...' 4762 wikitext text/x-wiki <includeonly>__NOEDITSECTION__ {{documentation|content= {{#if:{{{hatnote|}}}|{{{hatnote}}}}} {{#ifeq:{{#invoke:High-use|num|x|demo={{ROOTPAGENAME}}}}|many||{{High-use|demo={{ROOTPAGENAME}}}}}} {{notice|image=Exclamationdiamond.svg|<code>Template:{{{demopagename|{{PAGENAME}}}}}</code> is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as <code>[[Template:flag|flag]]</code>, <code>[[Template:flag icon|flag icon]]</code>, and others.}} {{ombox|text=This template is within the scope of '''[[Wikipedia:WikiProject Flag Template|WikiProject Flag Template]]''', a collaborative effort to maintain flag templates on Wikipedia. A more thorough discussion of the flag template system, including parameters not described here, can be found on the project page.}} [[File:{{{flag alias|Flag of None.svg}}}|thumb|{{#if:{{{flag link|}}} | See also: [[{{{flag link}}}]] | {{#ifexist: Flag of {{{alias}}} | See also: [[Flag of {{{alias}}}]] | }} }}]] ===Standard parameters=== <table class="wikitable"> <tr><th>Parameter name</th><th>Value</th><th>Meaning</th> </tr><tr> <td><code>alias</code></td> <td>{{#if: {{{alias|}}} | <code>{{{alias}}}</code> | <span style="color:red">'''undefined!'''</span> }} <td>Main article name ([[{{{alias}}}]])</td> </tr> {{#if: {{{shortname alias|}}} | <tr> <td><code>shortname alias</code></td> <td><code>{{{shortname alias}}}</code></td> <td>''(optional)'' Display name to be used for the wikilink, if <code>alias</code> is a disambiguated article name, for example</td> </tr> }} <tr> <td><code>flag alias</code></td> <td>{{#if: {{{flag alias|}}} | <code>{{{flag alias}}}</code> | <span style="color:red">'''undefined!'''</span> }}</td> <td>Image name ([[:File:{{{flag alias}}}]], shown on right)</td> </tr></table> {{#if: {{{var1|{{{flag alias-naval|{{{flag alias-marines|{{{flag alias-military|{{{flag alias-coast guard|{{{flag alias-navy|{{{flag alias-air force|{{{flag alias-space force|{{{flag alias-army|}}}}}}}}}}}}}}}}}}}}}}}}}}} | ===Flag variants=== {{#if:{{{flag link|}}} | {{details|{{{flag link}}}}} | {{#ifexist: Flag of {{{alias}}} | {{details|Flag of {{{alias}}}}} | }} }} {{#ifeq:{{{variant|♦}}}|♦|{{red|Note: These variants cannot be used unless the line <code>{{!}} variant {{=}} {{(((}}variant{{!}}{{)))}}</code> is added to this template.}}}} <table class="wikitable"> <tr><th>Label</th><th>Flag image (40px)</th><th>Image name</th></tr> {{#if: {{{var1|}}} | <tr><td><code>{{{var1}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var1}}}}}}|40px|{{{border-{{{var1}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var1}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var2|}}} | <tr><td><code>{{{var2}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var2}}}}}}|40px|{{{border-{{{var2}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var2}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var3|}}} | <tr><td><code>{{{var3}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var3}}}}}}|40px|{{{border-{{{var3}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var3}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var4|}}} | <tr><td><code>{{{var4}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var4}}}}}}|40px|{{{border-{{{var4}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var4}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var5|}}} | <tr><td><code>{{{var5}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var5}}}}}}|40px|{{{border-{{{var5}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var5}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var6|}}} | <tr><td><code>{{{var6}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var6}}}}}}|40px|{{{border-{{{var6}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var6}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var7|}}} | <tr><td><code>{{{var7}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var7}}}}}}|40px|{{{border-{{{var7}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var7}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var8|}}} | <tr><td><code>{{{var8}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var8}}}}}}|40px|{{{border-{{{var8}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var8}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var9|}}} | <tr><td><code>{{{var9}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var9}}}}}}|40px|{{{border-{{{var9}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var9}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var10|}}} | <tr><td><code>{{{var10}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var10}}}}}}|40px|{{{border-{{{var10}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var10}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var11|}}} | <tr><td><code>{{{var11}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var11}}}}}}|40px|{{{border-{{{var11}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var11}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var12|}}} | <tr><td><code>{{{var12}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var12}}}}}}|40px|{{{border-{{{var12}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var12}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var13|}}} | <tr><td><code>{{{var13}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var13}}}}}}|40px|{{{border-{{{var13}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var13}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var14|}}} | <tr><td><code>{{{var14}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var14}}}}}}|40px|{{{border-{{{var14}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var14}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var15|}}} | <tr><td><code>{{{var15}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var15}}}}}}|40px|{{{border-{{{var15}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var15}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var16|}}} | <tr><td><code>{{{var16}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var16}}}}}}|40px|{{{border-{{{var16}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var16}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var17|}}} | <tr><td><code>{{{var17}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var17}}}}}}|40px|{{{border-{{{var17}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var17}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var18|}}} | <tr><td><code>{{{var18}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var18}}}}}}|40px|{{{border-{{{var18}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var18}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var19|}}} | <tr><td><code>{{{var19}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var19}}}}}}|40px|{{{border-{{{var19}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var19}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var20|}}} | <tr><td><code>{{{var20}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var20}}}}}}|40px|{{{border-{{{var20}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var20}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var21|}}} | <tr><td><code>{{{var21}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var21}}}}}}|40px|{{{border-{{{var21}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var21}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var22|}}} | <tr><td><code>{{{var22}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var22}}}}}}|40px|{{{border-{{{var22}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var22}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var23|}}} | <tr><td><code>{{{var23}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var23}}}}}}|40px|{{{border-{{{var23}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var23}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var24|}}} | <tr><td><code>{{{var24}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var24}}}}}}|40px|{{{border-{{{var24}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var24}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var25|}}} | <tr><td><code>{{{var25}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var25}}}}}}|40px|{{{border-{{{var25}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var25}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var26|}}} | <tr><td><code>{{{var26}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var26}}}}}}|40px|{{{border-{{{var26}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var26}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var27|}}} | <tr><td><code>{{{var27}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var27}}}}}}|40px|{{{border-{{{var27}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var27}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var28|}}} | <tr><td><code>{{{var28}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var28}}}}}}|40px|{{{border-{{{var28}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var28}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var29|}}} | <tr><td><code>{{{var29}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var29}}}}}}|40px|{{{border-{{{var29}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var29}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var30|}}} | <tr><td><code>{{{var30}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var30}}}}}}|40px|{{{border-{{{var30}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var30}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var31|}}} | <tr><td><code>{{{var31}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var31}}}}}}|40px|{{{border-{{{var31}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var31}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var32|}}} | <tr><td><code>{{{var32}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var32}}}}}}|40px|{{{border-{{{var32}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var32}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var33|}}} | <tr><td><code>{{{var33}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var33}}}}}}|40px|{{{border-{{{var33}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var33}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var34|}}} | <tr><td><code>{{{var34}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var34}}}}}}|40px|{{{border-{{{var34}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var34}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var35|}}} | <tr><td><code>{{{var35}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var35}}}}}}|40px|{{{border-{{{var35}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var35}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var36|}}} | <tr><td><code>{{{var36}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var36}}}}}}|40px|{{{border-{{{var36}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var36}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var37|}}} | <tr><td><code>{{{var37}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var37}}}}}}|40px|{{{border-{{{var37}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var37}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var38|}}} | <tr><td><code>{{{var38}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var38}}}}}}|40px|{{{border-{{{var38}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var38}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var39|}}} | <tr><td><code>{{{var39}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var39}}}}}}|40px|{{{border-{{{var39}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var39}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{var40|}}} | <tr><td><code>{{{var40}}}</code></td><td style="text-align:center;">[[File:{{{flag alias-{{{var40}}}}}}|40px|{{{border-{{{var40}}}|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-{{{var40}}}}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-naval|}}} | <tr><td><code>naval</code></td><td style="text-align:center;">[[File:{{{flag alias-naval}}}|40px|{{{border-naval|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-naval}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-marines|}}} | <tr><td><code>marines</code></td><td style="text-align:center;">[[File:{{{flag alias-marines}}}|40px|{{{border-marines|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-marines}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-military|}}} | <tr><td><code>military</code></td><td style="text-align:center;">[[File:{{{flag alias-military}}}|40px|{{{border-military|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-military}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-coast guard|}}} | <tr><td><code>coast guard</code></td><td style="text-align:center;">[[File:{{{flag alias-coast guard}}}|40px|{{{border-coast guard|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-coast guard}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-navy|}}} | <tr><td><code>navy</code></td><td style="text-align:center;">[[File:{{{flag alias-navy}}}|40px|{{{border-navy|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-navy}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-air force|}}} | <tr><td><code>air force</code></td><td style="text-align:center;">[[File:{{{flag alias-air force}}}|40px|{{{border-air force|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-air force}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-space force|}}} | <tr><td><code>space force</code></td><td style="text-align:center;">[[File:{{{flag alias-space force}}}|40px|{{{border-space force|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-space force}}}</code></td></tr> }}<!-- -->{{#if: {{{flag alias-army|}}} | <tr><td><code>army</code></td><td style="text-align:center;">[[File:{{{flag alias-army}}}|40px|{{{border-army|{{{border|border}}}}}}]]</td><td><code>{{{flag alias-army}}}</code></td></tr> }}<!-- --></table> }} {{#if: {{{redir1|}}} | ===Redirect aliases=== This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!-- --><table class="wikitable"><!-- --><tr><th>Alias name</th><th>{{tlx|flag|''alias''}} output</th><th>{{tlx|flag country|''alias''}} output</th></tr> {{#if: {{{redir1|}}} | <tr><td><code>{{{redir1}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir1}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir1}}}}}</td><td>{{flag country|{{{redir1}}}}}</td></tr> }}<!-- -->{{#if: {{{redir2|}}} | <tr><td><code>{{{redir2}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir2}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir2}}}}}</td><td>{{flag country|{{{redir2}}}}}</td></tr> }}<!-- -->{{#if: {{{redir3|}}} | <tr><td><code>{{{redir3}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir3}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir3}}}}}</td><td>{{flag country|{{{redir3}}}}}</td></tr> }}<!-- -->{{#if: {{{redir4|}}} | <tr><td><code>{{{redir4}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir4}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir4}}}}}</td><td>{{flag country|{{{redir4}}}}}</td></tr> }}<!-- -->{{#if: {{{redir5|}}} | <tr><td><code>{{{redir5}}}</code> (<span class="plainlinks">[{{fullurl:Template:Country data {{{redir5}}}|redirect=no}} view]</span>)</td><td>{{flag|{{{redir5}}}}}</td><td>{{flag country|{{{redir5}}}}}</td></tr> }}<!-- --></table> See [{{fullurl:Special:WhatLinksHere/{{FULLPAGENAMEE}}|hidelinks=1&hidetrans=1}} What links here] for a full list of redirects. }} ===Example usage=== * <code><nowiki>{{flag|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flag|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}<!-- -->{{#if: {{{shortname alias|}}} | * <code><nowiki>{{flag country|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{flag country|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }} {{#if: {{{var1|}}} | ====Using a flag variant==== * <code><nowiki>{{flag|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{flag|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|{{{var1}}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|{{{var1}}}}} }} {{#if: {{{redir1|}}} | ====Using a redirect alias==== * <code><nowiki>{{flag icon|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flag icon|{{{redir1}}}}} * <code><nowiki>{{flag country|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flag country|{{{redir1}}}}} * <code><nowiki>{{flag|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{flag|{{{redir1}}}}} }} {{#if: {{{flag alias-naval|}}}{{{link alias-naval|}}}{{{flag alias-air force|}}}{{{link alias-air force|}}}{{{flag alias-space force|}}}{{{link alias-space force|}}}{{{flag alias-army|}}}{{{link alias-army|}}}{{{flag alias-coast guard|}}}{{{link alias-coast guard|}}}{{{flag alias-military|}}}{{{link alias-military|}}}{{{flag alias-marines|}}}{{{link alias-marines|}}} | ===Military ensigns=== {{#if: {{{flag alias-naval|}}} | This template includes a naval flag variant that can be used with [[Template:Naval]]: * <code><nowiki>{{naval|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{naval|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|naval}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|naval}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|naval}} | {{#if: {{{link alias-naval|}}} | This nation's naval flag is the same as its national flag, so [[Template:Naval]] produces the following: * <code><nowiki>{{naval|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{naval|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-air force|}}} |{{break}} This template includes an air force ensign flag variant that can be used with [[Template:Air force]]: * <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|air force}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|air force}} | {{#if: {{{link alias-air force|}}} |{{break}} This nation's air force ensign is the same as its national flag, so [[Template:Air force]] produces the following: * <code><nowiki>{{air force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{air force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-space force|}}} |{{break}} This template includes a space force ensign flag variant that can be used with [[Template:Space force]]: * <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|space force}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|space force}} | {{#if: {{{link alias-space force|}}} |{{break}} This nation's space force flag is the same as its national flag, so [[Template:Space force]] produces the following: * <code><nowiki>{{space force|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{space force|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-marines|}}} |{{break}} This template includes a marine ensign flag variant that can be used with [[Template:Marines]]: * <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|marines}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|marines}} | {{#if: {{{link alias-marines|}}} |{{break}} This nation's marine ensign is the same as its national flag, so [[Template:Marines]] produces the following: * <code><nowiki>{{marines|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{marines|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-military|}}} |{{break}} This template includes a marine ensign flag variant that can be used with [[Template:Armed forces]]: * <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|military}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|military}} | {{#if: {{{link alias-military|}}} |{{break}} This nation's military ensign is the same as its national flag, so [[Template: Armed forces]] produces the following: * <code><nowiki>{{Armed forces|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{Armed forces|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-navy|}}} |{{break}} This template includes an ensign flag variant that can be used with [[Template:Navy]]: * <code><nowiki>{{navy|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{navy|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|navy}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|navy}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|navy}} | {{#if: {{{link alias-navy|}}} |{{break}} This nation's navy flag is the same as its national flag, so [[Template:Navy]] produces the following: * <code><nowiki>{{navy|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{navy|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-coast guard|}}} |{{break}} This template includes a coast guard ensign flag variant that can be used with [[Template:Coast guard]]: * <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|coast guard}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|coast guard}} | {{#if: {{{link alias-coast guard|}}} |{{break}} This nation's coast guard ensign is the same as its national flag, so [[Template:Coast guard]] produces the following: * <code><nowiki>{{coast guard|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{coast guard|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}}<!-- -->{{#if: {{{flag alias-army|}}} |{{break}} This template includes an army ensign flag variant that can be used with [[Template:Army]]: * <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} * <code><nowiki>{{flag icon|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>|army}}</nowiki></code> → {{flag icon|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}|army}} | {{#if: {{{link alias-army|}}} |{{break}} This nation's army ensign is the same as its national flag, so [[Template:Army]] produces the following: * <code><nowiki>{{army|</nowiki>{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}<nowiki>}}</nowiki></code> → {{army|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}} }}}} }} {{#if: {{{related1|}}} | ===Related templates=== Please see the following related <code>country_data</code> templates: * [[Template:Country data {{{related1}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related1}}}<!-- {{#if:{{{related1param|}}}|{{!}}{{{related1param}}}}} -->}}</span><!-- -->{{#if: {{{related2|}}} | * [[Template:Country data {{{related2}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related2}}}<!-- {{#if:{{{related2param|}}}|{{!}}{{{related2param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related3|}}} | * [[Template:Country data {{{related3}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related3}}}<!-- {{#if:{{{related3param|}}}|{{!}}{{{related3param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related4|}}} | * [[Template:Country data {{{related4}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related4}}}<!-- {{#if:{{{related4param|}}}|{{!}}{{{related4param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related5|}}} | * [[Template:Country data {{{related5}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related5}}}<!-- {{#if:{{{related5param|}}}|{{!}}{{{related5param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related6|}}} | * [[Template:Country data {{{related6}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related6}}}<!-- {{#if:{{{related6param|}}}|{{!}}{{{related6param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related7|}}} | * [[Template:Country data {{{related7}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related7}}}<!-- {{#if:{{{related7param|}}}|{{!}}{{{related7param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related8|}}} | * [[Template:Country data {{{related8}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related8}}}<!-- {{#if:{{{related8param|}}}|{{!}}{{{related8param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related9|}}} | * [[Template:Country data {{{related9}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related9}}}<!-- {{#if:{{{related9param|}}}|{{!}}{{{related9param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related10|}}} | * [[Template:Country data {{{related10}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related10}}}<!-- {{#if:{{{related10param|}}}|{{!}}{{{related10param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related11|}}} | * [[Template:Country data {{{related11}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related11}}}<!-- {{#if:{{{related11param|}}}|{{!}}{{{related11param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related12|}}} | * [[Template:Country data {{{related12}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related12}}}<!-- {{#if:{{{related12param|}}}|{{!}}{{{related12param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related13|}}} | * [[Template:Country data {{{related13}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related13}}}<!-- {{#if:{{{related13param|}}}|{{!}}{{{related13param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related14|}}} | * [[Template:Country data {{{related14}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related14}}}<!-- {{#if:{{{related14param|}}}|{{!}}{{{related14param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related15|}}} | * [[Template:Country data {{{related15}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related15}}}<!-- {{#if:{{{related15param|}}}|{{!}}{{{related15param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related16|}}} | * [[Template:Country data {{{related16}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related16}}}<!-- {{#if:{{{related16param|}}}|{{!}}{{{related16param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related17|}}} | * [[Template:Country data {{{related17}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related17}}}<!-- {{#if:{{{related17param|}}}|{{!}}{{{related17param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related18|}}} | * [[Template:Country data {{{related18}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related18}}}<!-- {{#if:{{{related18param|}}}|{{!}}{{{related18param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related19|}}} | * [[Template:Country data {{{related19}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related19}}}<!-- {{#if:{{{related19param|}}}|{{!}}{{{related19param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related20|}}} | * [[Template:Country data {{{related20}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related20}}}<!-- {{#if:{{{related20param|}}}|{{!}}{{{related20param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related21|}}} | * [[Template:Country data {{{related21}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related21}}}<!-- {{#if:{{{related21param|}}}|{{!}}{{{related21param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related22|}}} | * [[Template:Country data {{{related22}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related22}}}<!-- {{#if:{{{related22param|}}}|{{!}}{{{related22param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related23|}}} | * [[Template:Country data {{{related23}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related23}}}<!-- {{#if:{{{related23param|}}}|{{!}}{{{related23param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related24|}}} | * [[Template:Country data {{{related24}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related24}}}<!-- {{#if:{{{related24param|}}}|{{!}}{{{related24param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related25|}}} | * [[Template:Country data {{{related25}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related25}}}<!-- {{#if:{{{related25param|}}}|{{!}}{{{related25param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related26|}}} | * [[Template:Country data {{{related26}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related26}}}<!-- {{#if:{{{related26param|}}}|{{!}}{{{related26param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related27|}}} | * [[Template:Country data {{{related27}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related27}}}<!-- {{#if:{{{related27param|}}}|{{!}}{{{related27param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related28|}}} | * [[Template:Country data {{{related28}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related28}}}<!-- {{#if:{{{related28param|}}}|{{!}}{{{related28param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related29|}}} | * [[Template:Country data {{{related29}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related29}}}<!-- {{#if:{{{related29param|}}}|{{!}}{{{related29param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related30|}}} | * [[Template:Country data {{{related30}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related30}}}<!-- {{#if:{{{related30param|}}}|{{!}}{{{related30param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related31|}}} | * [[Template:Country data {{{related31}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related31}}}<!-- {{#if:{{{related31param|}}}|{{!}}{{{related31param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related32|}}} | * [[Template:Country data {{{related32}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related32}}}<!-- {{#if:{{{related32param|}}}|{{!}}{{{related32param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related33|}}} | * [[Template:Country data {{{related33}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related33}}}<!-- {{#if:{{{related33param|}}}|{{!}}{{{related33param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related34|}}} | * [[Template:Country data {{{related34}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related34}}}<!-- {{#if:{{{related34param|}}}|{{!}}{{{related34param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related35|}}} | * [[Template:Country data {{{related35}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related35}}}<!-- {{#if:{{{related35param|}}}|{{!}}{{{related35param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related36|}}} | * [[Template:Country data {{{related36}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related36}}}<!-- {{#if:{{{related36param|}}}|{{!}}{{{related36param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related37|}}} | * [[Template:Country data {{{related37}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related37}}}<!-- {{#if:{{{related37param|}}}|{{!}}{{{related37param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related38|}}} | * [[Template:Country data {{{related38}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related38}}}<!-- {{#if:{{{related38param|}}}|{{!}}{{{related38param}}}}} -->}}</span> }}<!-- -->{{#if: {{{related39|}}} | * [[Template:Country data {{{related39}}}]]<span style="position:absolute; left:33em;">{{flag|{{{related39}}}<!-- {{#if:{{{related39param|}}}|{{!}}{{{related39param}}}}} -->}}</span> }}<!-- -->}} {{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc | {{#if:{{Suppress categories|{{{{FULLPAGENAME}}/doc}}}}| ===Other information=== }} {{{{FULLPAGENAME}}/doc|alias={{{alias|}}}|cat={{{cat|}}}}} }}}} ===TemplateData=== {{TemplateData header}} <templatedata> { "description": "This template should not be used directly. It is used indirectly by flag templates such as Template:Flag and Template:Flag icon. See Category:Flag template system for a full list of flag templates and Wikipedia:WikiProject Flag Template for further documentation.", "params": {} } </templatedata> {{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!-- -->{{#ifeq:{{SUBPAGENAME}}|sandbox|<!-- -->[[Category:Country data template sandboxes|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]|<!-- -->{{#ifexist:{{FULLPAGENAME}}/doc|<!-- -->[[Category:Country data templates with documentation subpage|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]|<!-- -->[[Category:Uncategorized country data templates|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- -->}}<!-- -->{{#if:{{{size flag alias-{{{var1}}}|}}}{{{size flag alias-{{{var2}}}|}}}{{{size flag alias-{{{var3}}}|}}}{{{size flag alias-{{{var4}}}|}}}{{{size flag alias-{{{var5}}}|}}}{{{size flag alias-{{{var6}}}|}}}{{{size flag alias-{{{var7}}}|}}}{{{size flag alias-{{{var8}}}|}}}{{{size flag alias-{{{var9}}}|}}}{{{size flag alias-{{{var10}}}|}}}{{{size flag alias-{{{var11}}}|}}}{{{size flag alias-{{{var12}}}|}}}{{{size flag alias-{{{var13}}}|}}}{{{size flag alias-{{{var14}}}|}}}{{{size flag alias-{{{var15}}}|}}}{{{size flag alias-{{{var16}}}|}}}{{{size flag alias-{{{var17}}}|}}}{{{size flag alias-{{{var18}}}|}}}{{{size flag alias-{{{var19}}}|}}}{{{size flag alias-{{{var20}}}|}}}{{{size flag alias-{{{var21}}}|}}}{{{size flag alias-{{{var22}}}|}}}{{{size flag alias-{{{var23}}}|}}}{{{size flag alias-{{{var24}}}|}}}{{{size flag alias-{{{var25}}}|}}}{{{size flag alias-{{{var26}}}|}}}{{{size flag alias-{{{var27}}}|}}}{{{size flag alias-{{{var28}}}|}}}{{{size flag alias-{{{var29}}}|}}}{{{size flag alias-{{{var30}}}|}}}{{{size flag alias-{{{var31}}}|}}}{{{size flag alias-{{{var32}}}|}}}{{{size flag alias-{{{var33}}}|}}}{{{size flag alias-{{{var34}}}|}}}{{{size flag alias-{{{var35}}}|}}}{{{size flag alias-{{{var36}}}|}}}{{{size flag alias-{{{var37}}}|}}}{{{size flag alias-{{{var38}}}|}}}{{{size flag alias-{{{var39}}}|}}}{{{size flag alias-{{{var40}}}|}}}{{{size flag alias-naval|}}}{{{size flag alias-marines|}}}{{{size flag alias-military|}}}{{{size flag alias-coast guard|}}}{{{size flag alias-navy|}}}{{{size flag alias-air force|}}}{{{size flag alias-space force|}}}{{{size flag alias-army|}}}{{{size flag alias|}}}|[[Category:Country data templates with distinct default size|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- -->}}<!-- -->[[Category:All country data templates|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- -->{{#if:{{{shortname alias|}}}|<!-- -->[[Category:Country data templates with distinct shortname|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- -->}}<!-- -->{{#ifeq:{{{demopagename|{{PAGENAME}}}}}|Country data {{{alias}}}||<!-- -->{{#ifeq:{{{demopagename|{{PAGENAME}}}}}|Country data {{{shortname alias}}}||<!-- -->[[Category:Country data templates with distinct template name|{{{cat|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}}}}]]<!-- -->}}<!-- -->}}<!-- -->{{#if:{{{flag alias|}}}||<!-- -->[[Category:Country data templates without flag alias|{{#invoke:String|replace|{{{demopagename|{{PAGENAME}}}}}|^%w+ data |||false}}]]<!-- -->}}<!-- -->}}<!-- -->}} |link box=This is the documentation for '''Template:{{{demopagename|{{PAGENAME}}}}}'''. It is automatically generated by [[Template:Country showdata]].<br />Editors can experiment in this template's {{#ifeq:{{SUBPAGENAME}}|sandbox|'''sandbox''' ([{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1=Template:{{urlencode:{{BASEPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}}} diff])|{{#ifexist:{{FULLPAGENAME}}/sandbox|[[{{FULLPAGENAME}}/sandbox|sandbox]] ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} edit] {{!}} [{{fullurl:Special:ComparePages|page1={{urlencode:{{FULLPAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}/sandbox}} diff])|sandbox ([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/preload-sandbox}} create] {{!}} [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload=Template:Country_showdata/mirror&summary=Create+sandbox+version+of+{{urlencode:[[{{FULLPAGENAME}}]]}}}} mirror])}}}} and {{#ifexist:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|[[{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|testcases]] ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit}} edit])|testcases ([{{fullurl:{{#ifeq:{{SUBPAGENAME}}|sandbox|Template:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}/testcases|action=edit&preload=Template%3ADocumentation%2Fpreload-testcases}} create])}} pages.<br />Please {{purge|purge the cache}} after making any changes to this template.<!-- -->{{#ifeq:{{SUBPAGENAME}}|sandbox||{{#ifexist:{{FULLPAGENAME}}/doc|<!-- --><br />This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of [[WP:CAT|categories]] and documentation specific to this template.|<!-- -->{{#switch:{{PROTECTIONLEVEL:edit}}|sysop|templateeditor=<!-- --><br />This template is [[WP:PROTECT|{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|fully protected|template-protected}}]] and any [[WP:CAT|categories]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Country_showdata/preload}} /doc] subpage, which is not protected.|#default=<!-- --><br />Any [[WP:CAT|categories]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Country_showdata/preload}} /doc] subpage, which does not exist yet.<!-- -->}}<!-- -->}}}} }}</includeonly><noinclude> {{documentation}} </noinclude> g09kiptcsai433fpp28esegdp8gafxu