Wikipedia
gvwiki
https://gv.wikipedia.org/wiki/Ard-ghuillag
MediaWiki 1.47.0-wmf.24
first-letter
Meanyn
Er lheh
Resooney
Ymmydeyr
Resooney ymmydeyr
Wikipedia
Resooney Wikipedia
Coadan
Resooney coadan
MediaWiki
Resooney MediaWiki
Clowan
Resooney clowan
Cooney
Resooney cooney
Ronney
Resooney ronney
TimedText
TimedText talk
Module
Module talk
Event
Event talk
Yn Yeaman
0
1848
395019
358520
2026-10-23T01:04:12Z
MacTire02
219
++
395019
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght yn Yeaman
|ennym_foddey_cadjincliaghtagh= {{lang|ar|{{script/Arabic|ٱلْجُمْهُورِيَّةُ ٱلْيَمَنِيَّةُ}}}} {{small|([[Arabish]])}}<br />{{small|{{transliteration|engvar=gb|ar|al-Jumhūriyyah al-Yamaniyyah}}}}
|ennym_gienneydagh = yn Yeaman
|jalloo_brattagh = Flag of Yemen.svg
|jalloo_cleinney = Coat of arms of Yemen.svg
|jalloo_caslys = Yemen (orthographic projection).svg
|jarroo-raa = {{lang|ar|{{script/Arabic|ٱللَّهُ، ٱلْوَطَنُ، ٱلثَوْرَةُ، ٱلْوَحْدَةُ}}}}
|tessen-lettyraghey_jarroo-raa= {{transliteration|ar|Allāh, al-Waṭan, ath-Thawrah, al-Waḥdah}}
|çhyndaa_jarroo-raa = Allah, y Çheer Ghooie, Bun-chaghlaa, Unnaneaght
|çhengey_arrane_ashoonagh = Arabish
|arrane_ashoonagh = {{lang|ar|[[Arrane Ashoonagh yn Yeaman|{{script/Arabic|الجمهورية المتحدة}}]]}}
|tessen-lettyraghey_arrane_ashoonagh = {{transliteration|ar|al-Jumhūriyyah al-Muttaḥidah}}
|çhyndaa_arrane_ashoonagh = Pobblaght Unnaneysit
|coadan_arrane_ashoonagh = National Anthem of the Republic of Yemen.oga
|çhengey_arrane_ashoonagh = Arabish
|çhengaghyn_oikoil = [[Arabish Chadjinit Noa-emshiragh|Arabish]]<ref>{{cite web |title=Yemen's Constitution of 1991 with Amendments through 2015 |url=https://www.constituteproject.org/constitution/Yemen_2015.pdf?lang=en |website=Constitute Project |access-date=31 Luanistyn 2020 |archive-date=15 Averil 2021 |archive-url=https://web.archive.org/web/20210415035011/https://www.constituteproject.org/constitution/Yemen_2015.pdf?lang=en |url-status=live }}</ref>
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] [[steat unnaneagh|unnaneagh]] fo [[reiltys shallidagh]]
|blein_LTS_CCK = 2007
|LTS_CCK = $52.61 billoon
|LTS_CCK_yn_dooinney = $2,400
|sorçh_kiondeeaght = [[Shennaghys yn Yeaman|Bunneeaght]]
|taghyrt_bunneeaght1 = [[Co-unnaneyssey yn Yeaman|Co-unnaneyssey]]
|date_bunneeaght1 = 22 Boaldyn 1990
|taghyrt_bunneeaght2 = [[Bunraght yn Yeaman|Bunraght roie]]
|date_bunneeaght2 = 16 Boaldyn 1991
|traa_ynnydagh = [[Traa Chadjinit yn Arabaght|AST]]
|ashchur_utc = +03:00
|cctld = [[.ye]]
|coad_çhellvane = 967
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Yeaman'''. T'ee çhemmit liorish [[yn Araab Saudi]] da'n twoaie as liorish [[yn Omaan]] da'n shiar. She [[Sana'a]] yn [[preeu-valley]]. Ta ny smoo na 200 ellanyn ec y çheer, yn ellan [[Socotra]] ayns [[Yn Keayn Injinagh|y Cheayn Injinagh]] cummaltit.
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{Yn Commeeys Arabagh}}
{{gurneil eaghtyrys}}
{{DEFAULTSORT:Yeaman, Yn}}
{{bun}}
[[Ronney:Yn Yeaman| ]]
[[Ronney:Lieh-innys yn Arabaght]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey yn Chommeeys Arabagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Çheeraghyn sloo lhiasit]]
[[Ronney:Bunneeaghtyn 'syn Yeaman 'sy vlein 1990]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1990]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
idzyxyioh7wazlm1wfof3krczwawa7g
Yn Vutaan
0
1929
395017
359414
2026-10-23T00:48:56Z
MacTire02
219
++
395017
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Reeriaght y Vutaan
|ennym_foddey_cadjincliaghtagh= {{raise|0.1em|{{lang|dz|འབྲུག་རྒྱལ་ཁབ།}}}} {{small|([[Dzongkha]])}}<br />{{small|{{tessen-lettyraghey|dz|Druk gyal khab}}}}
|ennym_gienneydagh = y Vutaan
|jalloo_brattagh = Flag of Bhutan.svg
|jalloo_cleinney = Emblem_of_Bhutan.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Bhutan_(orthographic_projection).svg
|jarroo-raa = {{lang|dz|༄༅༎དཔལ་ལྡན་འབྲུག་པ་ཕྱོགས་ལས་རྣམ་རྒྱལ༎}}
|tessen-lettyraghey_jarroo-raa= {{tessen-lettyraghey|dz|Palden Drukpa Chokley Namgyal}}
|çhyndaa_jarroo-raa = Y Drukpa Gloyroil, y Varriaght Echey ayns Dagh Troa
|çhengey_jarroo-raa = Dzongkha
|arrane_ashoonagh = {{lang|dz|[[Druk Tsenden|འབྲུག་ཙན་དན]]}}
|tessen-lettyraghey_arrane_ashoonagh = {{transliteration|dz|Druk Tsenden}}
|çhyndaa_arrane_ashoonagh = Reeriaght y Dragane Taarnagh
|çhengey_arrane_ashoonagh = Dzongkha
|coadan_arrane_ashoonagh = National Anthem of Bhutan (Instrumental).wav
|çhengaghyn_oikoil = [[Dzongkha]]
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Monarkaght lieh-vunraghtoil]] pharlamaidagh unnaneagh
|blein_LTS_CCK = 2007
|LTS_CCK = $4.39 billoon
|LTS_CCK_yn_dooinney = $5,477
|sorçh_kiondeeaght = [[Shennaghys y Vutaan|Crooaght]]
|taghyrt_bunneeaght1 = [[Shennaghys y Vutaan#Çhaghlym ry-cheilley as castey ny ruegyssyn Tibetagh, 1616–51|Co-unnaneyssey]]
|date_bunneeaght1 = 1616–1634
|taghyrt_bunneeaght2 = [[Druk Desi|Earish Druk Desi]]
|date_bunneeaght2 = 1650–1905
|taghyrt_bunneeaght3 = [[Reeraghtys Wangchuck#Bun|Irreeaght reeraghtys Wangchuk]]
|date_bunneeaght3 = 17 Mee ny Nollick 1907
|taghyrt_bunneeaght4 = [[Mooinjerys eddyr yn Injey as y Vutaan#Conaant 1949|Conaant eddyr yn Injey as y Vutaan]]
|date_bunneeaght4 = 8 Luanistyn 1949
|taghyrt_bunneeaght5 = [[Bunraght y Vutaan|Reeriaght vunraghtoil]]
|date_bunneeaght5 = 18 Jerrey Souree 2008
|taghyrt_bunneeaght6 = [[Mooinjerys eddyr yn Injey as y Vutaan#Conaant 2007|Jerrey yn ard-çhiarnys Injinagh]]
|date_bunneeaght6 = 1 Jerrey Geuree 2011
|traa_ynnydagh = [[Traa yn Vutaan|BTT]]
|ashchur_utc = +06:00
|cctld = [[.bt]]
|coad_çhellvane = 975
}}
She çheer 'syn [[Yn Aishey|Aishey]] ee '''yn Vutaan''', ny '''yn Vootaan'''. T'ee soit eddyr [[yn Injey]] as [[Deynphobblaght y Çheen]]. She [[Thimphu]] yn preeu-valley as y chaayr smoo.
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{coord|27.417|90.435|region:BT|format=dms|display=title}}
{{DEFAULTSORT:Vutaan, Yn}}
{{bun}}
[[Ronney:Yn Vutaan| ]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Çheeraghyn-oltey Reagheydys yn Aishey Yiass cour Co-obbraghey Ardjynagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Çheeraghyn yn Aishey Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1907]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Buill Vuddhagh Hibetagh]]
[[Ronney:Steatyn Buddhagh]]
[[Ronney:Çheeraghyn sloo lhiasit hannah hene]]
lrgipoi9ppgrtxdpz7ceydhh3yg5k42
Yn Vietnam
0
2223
395012
358519
2026-10-22T22:34:44Z
MacTire02
219
++
395012
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Hoshiallagh y Vietnam
|ennym_foddey_cadjincliaghtagh= {{lang|vi|Cộng hòa Xã hội chủ nghĩa Việt{{nbsp}}Nam}} {{small|([[Vietnamish]])}}
|ennym_gienneydagh = y Vietnam
|jalloo_brattagh = Flag of Vietnam.svg
|jalloo_cleinney = Emblem of Vietnam.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Vietnam_(orthographic_projection).svg
|jarroo-raa = {{lang|vi|Độc lập – Tự do – Hạnh phúc}}
|çhyndaa_jarroo-raa = Neuchrogheydys – Seyrsnys – Maynrys
|çhengey_jarroo-raa = Vietnamish
|arrane_ashoonagh = {{lang|vi|[[Tiến quân ca]]}}
|çhyndaa_arrane_ashoonagh = Arrane ny Sidooryn Marçhal
|coadan_arrane_ashoonagh Quoc ca Viet Nam.ogg
|çhengey_arrane_ashoonagh = Vietnamish
|çhengaghyn_oikoil = [[Vietnamish]]
|çhengaghyn_ardjynagh =
|possanyn_kynneeagh =
|sorçh_reiltys = [[Steat cummynagh]] unnaneagh
|ushtey_sy_cheead = 1.3
|blein_LTS_CCK = 2006
|LTS_CCK = $221.397 billoon
|LTS_CCK_yn_dooinney = $2,587
|sorçh_kiondeeaght = [[Shennaghys y Vietnam|Crooaght]]
|note_kiondeeaght =
|taghyrt_bunneeaght = [[Văn Lang]]
|date_bunneeaght1 = 7oo eash RC
|taghyrt_bunneeaght2 = [[Âu Lạc]]
|date_bunneeaght2 = 3oo eash RC
|taghyrt_bunneeaght3 = [[Barriaght Han er Nanyue|Goit stiagh lesh ny Han]]
|date_bunneeaght3 = 111 RC
|taghyrt_bunneeaght4 = [[Reeraghtys Ngô|Neuchrogheydys veih'n Çheen]]
|date_bunneeaght4 = 939
|taghyrt_bunneeaght5 = [[Reeraghtys Lê|Aaghoaill neuchrogheydys]]
|date_bunneeaght5 = 1428
|taghyrt_bunneeaght6 = Co-unnaneyssey [[Reeraghtys Nguyễn|Nguyễn]]
|date_bunneeaght6 = 1802
|taghyrt_bunneeaght7 = [[Conaant Huế (1883)|Conaant coadanys]]
|date_bunneeaght7 = 25 Luanistyn 1883
|taghyrt_bunneeaght8 = [[Fogrey magh neuchrogheydys Phobblaght Gheynlagh y Vietnam|Fogrey magh y neuchrogheydys]]
|date_bunneeaght8 = 2 Mean Fouyir 1945
|taghyrt_bunneeaght9 = [[Co-whaiyl Geneva, 1954|Y rheynn Hwoaie–Yiass]]
|date_bunneeaght9 = 21 Jerrey Souree 1954
|taghyrt_bunneeaght10 = [[Tuittym Saigon|Jerrey Chaggey yn Vietnam]]
|date_bunneeaght10 = 30 Averil 1975
|taghyrt_bunneeaght11 = [[Çhionnal Ashoonagh y Vietnam#Veih 1976|Aa-unnaneyssey]]
|date_bunneeaght11 = 2 Jerrey Souree 1976
|taghyrt_bunneeaght12 = [[Bunraght y Vietnam|Bunraght roie]]
|date_bunneeaght12 = 16 Mean Souree 2025
|traa_ynnydagh = [[Traa Chadjinit y Vietnam|VST]]
|ashchur_utc = +07:00
|cctld = [[.vn]]
|coad_çhellvane = 84
}}
She [[çheer]] 'syn [[Yn Aishey|Aishey]] ee '''yn Vietnam'''.
==Imraaghyn==
{{reflist}}
{{yn Aishey}}
{{gurneil eaghtyrys}}
{{coord|16|N|108|E|display=title}}
{{DEFAULTSORT:Vietnam, Yn}}
{{bun}}
[[Ronney:Yn Vietnam| ]]
[[Ronney:Steatyn cummynagh]]
[[Ronney:Bunneeaghtyn 'sy Vietnam 'sy vlein 1976|*]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey ASEAN]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Steatyn un-phartee]]
[[Ronney:Pobblaghtyn]]
[[Ronney:Çheeraghyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1976]]
fbh93s96mted61w29kraq7hndp7qhch
395032
395012
2026-10-23T11:20:35Z
MacTire02
219
++
395032
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Hoshiallagh y Vietnam
|ennym_foddey_cadjincliaghtagh= {{lang|vi|Cộng hòa Xã hội chủ nghĩa Việt{{nbsp}}Nam|italics=no}} {{small|([[Vietnamish]])}}
|ennym_gienneydagh = y Vietnam
|jalloo_brattagh = Flag of Vietnam.svg
|jalloo_cleinney = Emblem of Vietnam.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Vietnam_(orthographic_projection).svg
|jarroo-raa = {{lang|vi|Độc lập – Tự do – Hạnh phúc}}
|çhyndaa_jarroo-raa = Neuchrogheydys – Seyrsnys – Maynrys
|çhengey_jarroo-raa = Vietnamish
|arrane_ashoonagh = {{lang|vi|[[Tiến quân ca]]}}
|çhyndaa_arrane_ashoonagh = Arrane ny Sidooryn Marçhal
|coadan_arrane_ashoonagh Quoc ca Viet Nam.ogg
|çhengey_arrane_ashoonagh = Vietnamish
|çhengaghyn_oikoil = [[Vietnamish]]
|çhengaghyn_ardjynagh =
|possanyn_kynneeagh =
|sorçh_reiltys = [[Steat cummynagh]] unnaneagh
|ushtey_sy_cheead = 1.3
|blein_LTS_CCK = 2006
|LTS_CCK = $221.397 billoon
|LTS_CCK_yn_dooinney = $2,587
|sorçh_kiondeeaght = [[Shennaghys y Vietnam|Crooaght]]
|note_kiondeeaght =
|taghyrt_bunneeaght = [[Văn Lang]]
|date_bunneeaght1 = 7oo eash RC
|taghyrt_bunneeaght2 = [[Âu Lạc]]
|date_bunneeaght2 = 3oo eash RC
|taghyrt_bunneeaght3 = [[Barriaght Han er Nanyue|Goit stiagh lesh ny Han]]
|date_bunneeaght3 = 111 RC
|taghyrt_bunneeaght4 = [[Reeraghtys Ngô|Neuchrogheydys veih'n Çheen]]
|date_bunneeaght4 = 939
|taghyrt_bunneeaght5 = [[Reeraghtys Lê|Aaghoaill neuchrogheydys]]
|date_bunneeaght5 = 1428
|taghyrt_bunneeaght6 = Co-unnaneyssey [[Reeraghtys Nguyễn|Nguyễn]]
|date_bunneeaght6 = 1802
|taghyrt_bunneeaght7 = [[Conaant Huế (1883)|Conaant coadanys]]
|date_bunneeaght7 = 25 Luanistyn 1883
|taghyrt_bunneeaght8 = [[Fogrey magh neuchrogheydys Phobblaght Gheynlagh y Vietnam|Fogrey magh y neuchrogheydys]]
|date_bunneeaght8 = 2 Mean Fouyir 1945
|taghyrt_bunneeaght9 = [[Co-whaiyl Geneva, 1954|Y rheynn Hwoaie–Yiass]]
|date_bunneeaght9 = 21 Jerrey Souree 1954
|taghyrt_bunneeaght10 = [[Tuittym Saigon|Jerrey Chaggey yn Vietnam]]
|date_bunneeaght10 = 30 Averil 1975
|taghyrt_bunneeaght11 = [[Çhionnal Ashoonagh y Vietnam#Veih 1976|Aa-unnaneyssey]]
|date_bunneeaght11 = 2 Jerrey Souree 1976
|taghyrt_bunneeaght12 = [[Bunraght y Vietnam|Bunraght roie]]
|date_bunneeaght12 = 16 Mean Souree 2025
|traa_ynnydagh = [[Traa Chadjinit y Vietnam|VST]]
|ashchur_utc = +07:00
|cctld = [[.vn]]
|coad_çhellvane = 84
}}
She [[çheer]] 'syn [[Yn Aishey|Aishey]] ee '''yn Vietnam'''.
==Imraaghyn==
{{reflist}}
{{yn Aishey}}
{{gurneil eaghtyrys}}
{{coord|16|N|108|E|display=title}}
{{DEFAULTSORT:Vietnam, Yn}}
{{bun}}
[[Ronney:Yn Vietnam| ]]
[[Ronney:Steatyn cummynagh]]
[[Ronney:Bunneeaghtyn 'sy Vietnam 'sy vlein 1976|*]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey ASEAN]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Steatyn un-phartee]]
[[Ronney:Pobblaghtyn]]
[[Ronney:Çheeraghyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1976]]
a1f0wf2yfovzm2sehr2m9g0gqt6kol0
Yn Vongoil
0
2273
395014
358366
2026-10-23T00:29:52Z
MacTire02
219
++
395014
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym_dooghyssagh = Y Vongoil
|ennym_foddey_cadjincliaghtagh= {{lang|mn|Монгол Улс}} {{small|([[Mongoilish]])}}<br />{{tessen-lettyraghey|mn|Mongol Uls}}<br/>{{MongolUnicode|lang=mn|ᠮᠤᠩᠭᠤᠯ<br />ᠤᠯᠤᠰ}} {{small|([[Script y Vongoilish]])}}<br/>{{tessen-lettyraghey|mn|moŋɣol ulus}}
|ennym_gienneydagh = y Vongoil
|jalloo_brattagh = Flag of Mongolia.svg
|jalloo_cleinney = State_emblem_of_Mongolia.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Mongolia (orthographic projection).svg
|jarroo-raa = none
|arrane_ashoonagh = {{lang|mn|[[Arrane Ashoonagh y Vongoil|Монгол Улсын Төрийн дуулал]]|italics=no}}
|tessen-lettyraghey_arrane_ashoonagh = {{tessen-lettyraghey|mn|Mongol ulsiin töriin duulal}}
|çhyndaa_arrane_ashoonagh = Arrane Ashoonagh y Vongoil
|coadan_arrane_ashoonagh =
|çhengaghyn_oikoil = [[Mongoilish]]
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] unnaneagh<ref name="IDEA">{{Cite web |last=Odonkhuu |first=Munkhsaikhan |author-link=<!-- Munkhsaikhan Odonkhuu --> |date=12 Toshiaght Arree 2016 |title=Mongolia: A Vain Constitutional Attempt to Consolidate Parliamentary Democracy |url=http://www.constitutionnet.org/news/mongolia-vain-constitutional-attempt-consolidate-parliamentary-democracy |url-status=live |archive-url=https://web.archive.org/web/20160225144740/http://www.constitutionnet.org/news/mongolia-vain-constitutional-attempt-consolidate-parliamentary-democracy |archive-date=25 Toshiaght Arree 2016 |access-date=21 Toshiaght Arree 2016 |website=ConstitutionNet |publisher=[[International Institute for Democracy and Electoral Assistance|International IDEA]]}}</ref>
|ushtey_sy_cheead = 0.6
|blein_LTS_CCK = 2007
|LTS_CCK = $8.448 billoon
|LTS_CCK_yn_dooinney = $2,900
|sorçh_kiondeeaght = [[Shennaghys y Vongoil|Crooaght]]
|note_kiondeeaght =
|taghyrt_bunneeaght1 = [[Yn Impiraght Vongoilagh]]
|date_bunneeaght1 = 1206
|taghyrt_bunneeaght2 = [[Reeraghtys Yuan]]
|date_bunneeaght2 = 1271
|taghyrt_bunneeaght3 = [[Yuan Hwoaie]]
|date_bunneeaght3 = 1368
|taghyrt_bunneeaght4 = Creaghney [[Yn Vongoil fo reill Qing|barriaght Qing]]
|date_bunneeaght4 = 1691
|taghyrt_bunneeaght5 = [[Bun-chaghlaa yn Vongoil, 1911|Fogrey-magh neuchrogheydys]] veih [[reeraghtys Qing]]
|date_bunneeaght5 = 29 Mee ny Nollick 1911
|taghyrt_bunneeaght6 = Bunneeaght [[Deynphobblaght y Vongoil|Gheynphobblaght y Vongoil]]
|date_bunneeaght6 = 26 Mee Houney 1924
|taghyrt_bunneeaght7 = [[Bunraght y Vongoil|Bunraght roie]]
|date_bunneeaght7 = 12 Toshiaght Arree 1992
|traa_ynnydagh =
|ashchur_utc = +07:00/+08:00<ref>{{Cite web |title=Mongolia Standard Time is GMT (UTC) +8, some areas of Mongolia use GMT (UTC) +7 |url=http://www.timetemperature.com/asia/mongolia_time_zone.shtml |url-status=live |archive-url=https://web.archive.org/web/20071013100212/http://timetemperature.com/asia/mongolia_time_zone.shtml |archive-date=13 Jerrey Fouyir 2007 |access-date=2007-09-30 |publisher=Time Temperature.com}}</ref>
|cctld = [[.mn]]
|coad_çhellvane = 976
}}
She çheer 'syn [[Yn Aishey|Aishey]] ee '''yn Vongoil'''.
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{DEFAULTSORT:Vongoil, Yn}}
{{bun}}
[[Ronney:Yn Vongoil| ]]
[[Ronney:Steatyn Mongoilagh]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn yn Aishey Hiar]]
[[Ronney:Çheeraghyn yn Aishey Hiar Hwoaie]]
[[Ronney:Steip yn Oaraishey]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Yn Aishey Sthie]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Pobblaghtyn]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1911]]
frrehzv6gesxl6efckonupwgd6btvlo
395016
395014
2026-10-23T00:38:32Z
MacTire02
219
+chengey yn arrane ashoonagh
395016
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym_dooghyssagh = Y Vongoil
|ennym_foddey_cadjincliaghtagh= {{lang|mn|Монгол Улс}} {{small|([[Mongoilish]])}}<br />{{tessen-lettyraghey|mn|Mongol Uls}}<br/>{{MongolUnicode|lang=mn|ᠮᠤᠩᠭᠤᠯ<br />ᠤᠯᠤᠰ}} {{small|([[Script y Vongoilish]])}}<br/>{{tessen-lettyraghey|mn|moŋɣol ulus}}
|ennym_gienneydagh = y Vongoil
|jalloo_brattagh = Flag of Mongolia.svg
|jalloo_cleinney = State_emblem_of_Mongolia.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Mongolia (orthographic projection).svg
|jarroo-raa = none
|arrane_ashoonagh = {{lang|mn|[[Arrane Ashoonagh y Vongoil|Монгол Улсын Төрийн дуулал]]|italics=no}}
|tessen-lettyraghey_arrane_ashoonagh = {{tessen-lettyraghey|mn|Mongol ulsiin töriin duulal}}
|çhyndaa_arrane_ashoonagh = Arrane Ashoonagh y Vongoil
|coadan_arrane_ashoonagh =
|çhengey_arrane_ashoonagh = Mongoilish
|çhengaghyn_oikoil = [[Mongoilish]]
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] unnaneagh<ref name="IDEA">{{Cite web |last=Odonkhuu |first=Munkhsaikhan |author-link=<!-- Munkhsaikhan Odonkhuu --> |date=12 Toshiaght Arree 2016 |title=Mongolia: A Vain Constitutional Attempt to Consolidate Parliamentary Democracy |url=http://www.constitutionnet.org/news/mongolia-vain-constitutional-attempt-consolidate-parliamentary-democracy |url-status=live |archive-url=https://web.archive.org/web/20160225144740/http://www.constitutionnet.org/news/mongolia-vain-constitutional-attempt-consolidate-parliamentary-democracy |archive-date=25 Toshiaght Arree 2016 |access-date=21 Toshiaght Arree 2016 |website=ConstitutionNet |publisher=[[International Institute for Democracy and Electoral Assistance|International IDEA]]}}</ref>
|ushtey_sy_cheead = 0.6
|blein_LTS_CCK = 2007
|LTS_CCK = $8.448 billoon
|LTS_CCK_yn_dooinney = $2,900
|sorçh_kiondeeaght = [[Shennaghys y Vongoil|Crooaght]]
|note_kiondeeaght =
|taghyrt_bunneeaght1 = [[Yn Impiraght Vongoilagh]]
|date_bunneeaght1 = 1206
|taghyrt_bunneeaght2 = [[Reeraghtys Yuan]]
|date_bunneeaght2 = 1271
|taghyrt_bunneeaght3 = [[Yuan Hwoaie]]
|date_bunneeaght3 = 1368
|taghyrt_bunneeaght4 = Creaghney [[Yn Vongoil fo reill Qing|barriaght Qing]]
|date_bunneeaght4 = 1691
|taghyrt_bunneeaght5 = [[Bun-chaghlaa yn Vongoil, 1911|Fogrey-magh neuchrogheydys]] veih [[reeraghtys Qing]]
|date_bunneeaght5 = 29 Mee ny Nollick 1911
|taghyrt_bunneeaght6 = Bunneeaght [[Deynphobblaght y Vongoil|Gheynphobblaght y Vongoil]]
|date_bunneeaght6 = 26 Mee Houney 1924
|taghyrt_bunneeaght7 = [[Bunraght y Vongoil|Bunraght roie]]
|date_bunneeaght7 = 12 Toshiaght Arree 1992
|traa_ynnydagh =
|ashchur_utc = +07:00/+08:00<ref>{{Cite web |title=Mongolia Standard Time is GMT (UTC) +8, some areas of Mongolia use GMT (UTC) +7 |url=http://www.timetemperature.com/asia/mongolia_time_zone.shtml |url-status=live |archive-url=https://web.archive.org/web/20071013100212/http://timetemperature.com/asia/mongolia_time_zone.shtml |archive-date=13 Jerrey Fouyir 2007 |access-date=2007-09-30 |publisher=Time Temperature.com}}</ref>
|cctld = [[.mn]]
|coad_çhellvane = 976
}}
She çheer 'syn [[Yn Aishey|Aishey]] ee '''yn Vongoil'''.
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{DEFAULTSORT:Vongoil, Yn}}
{{bun}}
[[Ronney:Yn Vongoil| ]]
[[Ronney:Steatyn Mongoilagh]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn yn Aishey Hiar]]
[[Ronney:Çheeraghyn yn Aishey Hiar Hwoaie]]
[[Ronney:Steip yn Oaraishey]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Yn Aishey Sthie]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Pobblaghtyn]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1911]]
i1orf7d8hl84iy7ielebatn6q9nwj8t
Yn Abcaash
0
2333
395020
393980
2026-10-23T01:09:49Z
MacTire02
219
++
395020
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght yn Abcaaish
|ennym_foddey_cadjincliaghtagh= {{small|{{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn oikoil)''}}
| ab = {{lang|ab|Аԥсны Аҳәынҭқарра}}<br />{{tessen-lettyraghey|ab|Aṕsny Aħəynţķarra}}
| ru = {{lang|ru|Республика Абхазия}}<br />{{tessen-lettyraghey|ru|Respublika Abkhaziya}}
}}}}
|ennym_gienneydagh = yn Abcaash
|jalloo_brattagh = Flag of the Republic of Abkhazia.svg
|jalloo_cleinney = Coat_of_arms_of_Abkhazia.svg
|jalloo_caslys = Abkhaziaorthographicprojection.svg
|fo-heidyl_caslys = Yn Abcaaish (eayney) çheusthie jeh'n Çhorshey (lheeah dorraghey)
|jarroo-raa = none
|arrane_ashoonagh = [[Aiaaira|Аиааира]]
|coadan_arrane_ashoonagh = National anthem of Abkhazia – Aiaaira (Аиааира) (orchestral vocal version).ogg
|tessen-lettyraghey_arrane_ashoonagh = Aiaaira
|çhengey_arrane_ashoonagh = Abcaashish
|çhyndaa_arrane_ashoonagh = Barriaght
|çhengaghyn_oikoil = {{hlist|[[Abcaashish]]|[[Rooshish]]<ref>{{Cite web |title=Useful information |url=https://mfaapsny.org/en/helpful-information/general_information/ |access-date=2024-11-29 |website=mfaapsny.org |language=en }}</ref>}}
|sorçh_çhengaghyn = Çhengaghyn loayrit
|çhengaghyn = {{hlist|[[Abcaashish]]|[[Rooshish]]|[[Shorshish]]|[[Mingrelish]]|[[Svanish]]|[[Armeanish]]}}
|preeu-valley = [[Aqwa]]
|latd=43 |latm=00 |lats=13|latNS=N |longd=41 |longm=1 |longs=9 |longEW=E
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Corys eaghtyraneagh|Pobblaght eaghtyraneagh]] [[Steat unnaneagh|unnaneagh]]
|sorçh_kiondeeaght = [[Shennaghys yn Abcaash|Crooaght]]
| taghyrt_bunneeaght1 = [[Hene-reiltys yn Abcaash]]
| date_bunneeaght1 = 20 Mayrnt 1919
| taghyrt_bunneeaght2 = [[Pobblaght Hoshiallagh Hoveidjagh yn Abcaash]]
| date_bunneeaght2 = 31 Mayrnt 1921
| taghyrt_bunneeaght3 = [[Pobblaght Hoveidjagh Hoshiallagh Hene-reiltagh yn Abcaash]]
| date_bunneeaght3 = 19 Toshiaght Arree 1931
| taghyrt_bunneeaght4 = Fogrey magh kionedeeaght yn Abcaash
| date_bunneeaght4 = 25 Luanistyn 1990
| taghyrt_bunneeaght5 = Fogrey magh neuchrogheydys yn Abcaash
| date_bunneeaght5 = 23 Jerrey Souree 1992
| taghyrt_bunneeaght6 = Slattys neuchrogheydys y steat
| date_bunneeaght6 = 12 Jerrey Fouyir 1999
|ashchur_utc = +03:00
|traa_ynnydagh = [[Traa Moscow|MSK]]
}}
Ta'n '''Abcaash''' ny '''Abkhazia''' ({{langx|ab|Аҧсны|Apsny}}, {{langx|ka|აფხაზეთი|Apkhazeti}} ny ''Abkhazeti'', {{langx|ru|Абхазия|Abhazia}}) ny pobblaght heyr ''de facto'' er coose hiar ny [[Yn Vooir Ghoo|Mooir Doo]]. Cha nel agh y [[Yn Roosh|Roosh]], y [[Yn Nickeraag|Nickeraag]], y [[Yn Veneswaaley|Veneswaaley]], as [[Yn Teer|Teer]], as ec ny pobblaghtyn seyrey ''de facto'' [[Ossetia Yiass]] as [[Transnistria]]. Ta'n chooid elley jeh'n chruinney sursmooinaghey dy vel ee ny pobblaght hene-reiragh jeh cooid ny [[Yn Çhorshey|Shorshey]].
==Imraaghyn==
{{reflist}}
==Kianglaghyn magh==
{{Sister project links}}
* [http://presidentofabkhazia.org Официальный сайт Президента Республики Абхазия] (ynnyd-eggey oikoil Eaghtyrane yn Abcaash) {{in lang|en|ru|ka}}
* [https://mfaapsny.org/ Shirveishaght Cooishyn Joarree Phobblaght yn Abcaash] (ynnyd-eggey oikoil) {{in lang|en|ru|ab}}
* [http://www.apsnypress.info State Jantys Fysseree Phobblaght yn Abcaash] {{in lang|ru}}
* [https://www.securitycouncilreport.org/un-documents/georgia/ Docamadyn yn AU son y Çhorshey]
{{Yn Oarpey}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|43|N|41|E|type:country|display=title}}
{{DEFAULTSORT:Abcaash}}
[[Ronney:Yn Abcaash| ]]
[[Ronney:Pobblaghtyn hene-reiltagh y Çhorshey]]
[[Ronney:Yn Choagaash]]
[[Ronney:Yn Choagaash Yiass]]
[[Ronney:Ardjyn shenndeeagh y Çhorshey]]
[[Ronney:Steatyn eear-Hoveidjagh]]
[[Ronney:Scarreydys 'sy Çhorshey]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Yn Aishey Heear]]
[[Ronney:Steatyn as lieh-enney oc]]
[[Ronney:Ardjyn cultooragh]]
[[Ronney:Ashoonaghys Abcaashagh]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1992]]
10fp5o7oz8mj6c21fh52x11k9t855o9
Ossetia Yiass
0
2413
395021
393977
2026-10-23T01:14:16Z
MacTire02
219
++
395021
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Ossetia Yiass–Steat Alania
|ennym_foddey_cadjincliaghtagh= {{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn oikoil)''}}
| os = {{lang|os|Республикӕ Хуссар Ирыстон – Паддзахад Алани}}<br/>{{tessen-lettyraghey|os|Respublikæ Khussar Iryston Paddzakhad Alani}}
| ru = {{lang|ru|Республика Южная Осетия – Государство Алания}}<br/>{{tessen-lettyraghey|ru|Respublika Yuzhnaya Osetiya Gosudarstvo Alaniya}}
}}
|ennym_gienneydagh = Ossetia Yiass
|jalloo_brattagh = Flag of South Ossetia.svg
|jalloo_cleinney = National Emblem of the Republic of South Ossetia.svg
|jalloo_caslys = South_Ossetia_(orthographic_projection).svg
|fo-heidyl_caslys = Ossetia Yiass (eayney) çheusthie jeh'n Çhorshey (lheeah dorraghey)
|arrane_ashoonagh = [[Anthym steat Ossetia Yiass|Республикӕ Хуссар Ирыстоны Паддзахадон гимн]]
|coadan_arrane_ashoonagh = Anthem of South Ossetia (vocal).ogg
|tessen-lettyraghey_arrane_ashoonagh = Respublikæ Xussar Irystony Paddzaxadon gimn
|çhyndaa_arrane_ashoonagh = Anthym Steat Phobblaght Ossetia Yiass
|çhengaghyn_oikoil = {{hlist|[[Ossetish]]|[[Rooshish]]<ref name="official_languages">{{cite journal |last = Wojtasiewicz |first = Wojciech |translator-last = Bieroń |translator-first = Tomasz |date = 2011-12-01 |title = Presidential Elections in South Ossetia – Plan B |journal = [[New Eastern Europe]] |url = http://www.neweasterneurope.eu/node/117 |archive-url = https://web.archive.org/web/20130509075727/http://www.neweasterneurope.eu/node/117 |archive-date = 2013-05-09 |url-status = dead |quote = The first round of voting was accompanied by a referendum in which the Ossetians were to decide whether Russian should become the second official language of South Ossetia. Nearly 85 per cent of the voters supported the referendum.}}</ref>}}
|preeu-valley = [[Tskhinvali]]
|latd=42 |latm=14 |latNS=N |longd=43 |longm=58 |longEW=E |latNSgael=Hwoaie |longEWgael=Hiar
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] unnaneagh
|sorçh_kiondeeaght = Seyrsnys
|note_kiondeeaght = veih'n [[Yn Çhorshey|Çhorshey]]
|taghyrt1_bunnit = [[Queiggey Hene-reiltagh Ossetia Yiass]]
|date1_bunnit = 20 Averil 1922
|taghyrt2_bunnit = [[Pobblaght Gheynlagh Hoveidjagh Ossetia Yiass]]
|date2_bunnit = 20 Mean Fouyir 1990
|taghyrt3_bunnit = Pobblaght Ossetia Yiass
|date3_bunnit = 21 Mee ny Nollick 1991
|argid = [[Roobyl Rooshagh]] (₽) (<code>[[RUB]]</code>)
|traa_ynnydagh = [[Traa Moscow|MSK]]
|ashchur_utc = +03:00
}}
[[Image: Ossetia05.png|thumb|250px|right]]
Ta '''Ossetia Yiass''' ({{langx|os|Хуссар Ирыстон|Xussar Iryston}}; {{langx|ru|Южная Осетия|Yuzhnaya Osetiya}}; {{langx|ka|სამხრეთი ოსეთი|Samxreti Oseti}}) ny h-ard ouryssagh ayns [[Sleityn y Choagaash]].
==Imraaghyn==
{{reflist}}
{{Yn Europey}}
{{gurneil eaghtyrys}}
{{Coord|42|21|N|44|6|E|type:country|display=title}}
[[Ronney:Ossetia Yiass| ]]
[[Ronney:Ossetia|*]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'syn Oarpey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'sy Çhorshey 'sy vlein 1991]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Steatyn eear-Hoveidjagh]]
[[Ronney:Irredentaghys Rooshagh]]
[[Ronney:Scarreydys 'sy Çhorshey]]
[[Ronney:Yn Choagaash Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1991]]
[[Ronney:Steatyn as lieh-enney oc]]
5169iwcogyi8nay3dpmj3en986ql7e3
395022
395021
2026-10-23T01:14:54Z
MacTire02
219
+clowan
395022
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Ossetia Yiass–Steat Alania
|ennym_foddey_cadjincliaghtagh= {{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn oikoil)''}}
| os = {{lang|os|Республикӕ Хуссар Ирыстон – Паддзахад Алани}}<br/>{{tessen-lettyraghey|os|Respublikæ Khussar Iryston Paddzakhad Alani}}
| ru = {{lang|ru|Республика Южная Осетия – Государство Алания}}<br/>{{tessen-lettyraghey|ru|Respublika Yuzhnaya Osetiya Gosudarstvo Alaniya}}
}}
|ennym_gienneydagh = Ossetia Yiass
|jalloo_brattagh = Flag of South Ossetia.svg
|jalloo_cleinney = National Emblem of the Republic of South Ossetia.svg
|jalloo_caslys = South_Ossetia_(orthographic_projection).svg
|fo-heidyl_caslys = Ossetia Yiass (eayney) çheusthie jeh'n Çhorshey (lheeah dorraghey)
|arrane_ashoonagh = [[Anthym steat Ossetia Yiass|Республикӕ Хуссар Ирыстоны Паддзахадон гимн]]
|coadan_arrane_ashoonagh = Anthem of South Ossetia (vocal).ogg
|tessen-lettyraghey_arrane_ashoonagh = Respublikæ Xussar Irystony Paddzaxadon gimn
|çhyndaa_arrane_ashoonagh = Anthym Steat Phobblaght Ossetia Yiass
|çhengaghyn_oikoil = {{hlist|[[Ossetish]]|[[Rooshish]]<ref name="official_languages">{{cite journal |last = Wojtasiewicz |first = Wojciech |translator-last = Bieroń |translator-first = Tomasz |date = 2011-12-01 |title = Presidential Elections in South Ossetia – Plan B |journal = [[New Eastern Europe]] |url = http://www.neweasterneurope.eu/node/117 |archive-url = https://web.archive.org/web/20130509075727/http://www.neweasterneurope.eu/node/117 |archive-date = 2013-05-09 |url-status = dead |quote = The first round of voting was accompanied by a referendum in which the Ossetians were to decide whether Russian should become the second official language of South Ossetia. Nearly 85 per cent of the voters supported the referendum.}}</ref>}}
|preeu-valley = [[Tskhinvali]]
|latd=42 |latm=14 |latNS=N |longd=43 |longm=58 |longEW=E |latNSgael=Hwoaie |longEWgael=Hiar
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] unnaneagh
|sorçh_kiondeeaght = Seyrsnys
|note_kiondeeaght = veih'n [[Yn Çhorshey|Çhorshey]]
|taghyrt1_bunnit = [[Queiggey Hene-reiltagh Ossetia Yiass]]
|date1_bunnit = 20 Averil 1922
|taghyrt2_bunnit = [[Pobblaght Gheynlagh Hoveidjagh Ossetia Yiass]]
|date2_bunnit = 20 Mean Fouyir 1990
|taghyrt3_bunnit = Pobblaght Ossetia Yiass
|date3_bunnit = 21 Mee ny Nollick 1991
|argid = [[Roobyl Rooshagh]] (₽) (<code>[[RUB]]</code>)
|traa_ynnydagh = [[Traa Moscow|MSK]]
|ashchur_utc = +03:00
}}
[[Image: Ossetia05.png|thumb|250px|right]]
Ta '''Ossetia Yiass''' ({{langx|os|Хуссар Ирыстон|Xussar Iryston}}; {{langx|ru|Южная Осетия|Yuzhnaya Osetiya}}; {{langx|ka|სამხრეთი ოსეთი|Samxreti Oseti}}) ny h-ard ouryssagh ayns [[Sleityn y Choagaash]].
==Imraaghyn==
{{reflist}}
{{Yn Europey}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|42|21|N|44|6|E|type:country|display=title}}
[[Ronney:Ossetia Yiass| ]]
[[Ronney:Ossetia|*]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'syn Oarpey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'sy Çhorshey 'sy vlein 1991]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Steatyn eear-Hoveidjagh]]
[[Ronney:Irredentaghys Rooshagh]]
[[Ronney:Scarreydys 'sy Çhorshey]]
[[Ronney:Yn Choagaash Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1991]]
[[Ronney:Steatyn as lieh-enney oc]]
boj9cdbfzdap0kpzq47j3cuh75qp9ds
395023
395022
2026-10-23T02:22:40Z
MacTire02
219
++
395023
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Ossetia Yiass–Steat Alania
|ennym_foddey_cadjincliaghtagh= {{small|{{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn oikoil)''}}
| os = {{lang|os|Республикӕ Хуссар Ирыстон – Паддзахад Алани}}<br/>{{tessen-lettyraghey|os|Respublikæ Khussar Iryston Paddzakhad Alani}}
| ru = {{lang|ru|Республика Южная Осетия – Государство Алания}}<br/>{{tessen-lettyraghey|ru|Respublika Yuzhnaya Osetiya Gosudarstvo Alaniya}}
}}
}}
|ennym_gienneydagh = Ossetia Yiass
|jalloo_brattagh = Flag of South Ossetia.svg
|jalloo_cleinney = National Emblem of the Republic of South Ossetia.svg
|jalloo_caslys = South_Ossetia_(orthographic_projection).svg
|fo-heidyl_caslys = Ossetia Yiass (eayney) çheusthie jeh'n Çhorshey (lheeah dorraghey)
|arrane_ashoonagh = [[Anthym steat Ossetia Yiass|Республикӕ Хуссар Ирыстоны Паддзахадон гимн]]
|coadan_arrane_ashoonagh = Anthem of South Ossetia (vocal).ogg
|tessen-lettyraghey_arrane_ashoonagh = Respublikæ Xussar Irystony Paddzaxadon gimn
|çhyndaa_arrane_ashoonagh = Anthym Steat Phobblaght Ossetia Yiass
|çhengaghyn_oikoil = {{hlist|[[Ossetish]]|[[Rooshish]]<ref name="official_languages">{{cite journal |last = Wojtasiewicz |first = Wojciech |translator-last = Bieroń |translator-first = Tomasz |date = 2011-12-01 |title = Presidential Elections in South Ossetia – Plan B |journal = [[New Eastern Europe]] |url = http://www.neweasterneurope.eu/node/117 |archive-url = https://web.archive.org/web/20130509075727/http://www.neweasterneurope.eu/node/117 |archive-date = 2013-05-09 |url-status = dead |quote = The first round of voting was accompanied by a referendum in which the Ossetians were to decide whether Russian should become the second official language of South Ossetia. Nearly 85 per cent of the voters supported the referendum.}}</ref>}}
|preeu-valley = [[Tskhinvali]]
|latd=42 |latm=14 |latNS=N |longd=43 |longm=58 |longEW=E |latNSgael=Hwoaie |longEWgael=Hiar
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght lieh-eaghtyraneagh]] unnaneagh
|sorçh_kiondeeaght = Seyrsnys
|note_kiondeeaght = veih'n [[Yn Çhorshey|Çhorshey]]
|taghyrt1_bunnit = [[Queiggey Hene-reiltagh Ossetia Yiass]]
|date1_bunnit = 20 Averil 1922
|taghyrt2_bunnit = [[Pobblaght Gheynlagh Hoveidjagh Ossetia Yiass]]
|date2_bunnit = 20 Mean Fouyir 1990
|taghyrt3_bunnit = Pobblaght Ossetia Yiass
|date3_bunnit = 21 Mee ny Nollick 1991
|argid = [[Roobyl Rooshagh]] (₽) (<code>[[RUB]]</code>)
|traa_ynnydagh = [[Traa Moscow|MSK]]
|ashchur_utc = +03:00
}}
[[Image: Ossetia05.png|thumb|250px|right]]
Ta '''Ossetia Yiass''' ({{langx|os|Хуссар Ирыстон|Xussar Iryston}}; {{langx|ru|Южная Осетия|Yuzhnaya Osetiya}}; {{langx|ka|სამხრეთი ოსეთი|Samxreti Oseti}}) ny h-ard ouryssagh ayns [[Sleityn y Choagaash]].
==Imraaghyn==
{{reflist}}
{{Yn Europey}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|42|21|N|44|6|E|type:country|display=title}}
[[Ronney:Ossetia Yiass| ]]
[[Ronney:Ossetia|*]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'syn Oarpey 'sy vlein 1991]]
[[Ronney:Bunneeaghtyn 'sy Çhorshey 'sy vlein 1991]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Çheeraghyn thallooinit]]
[[Ronney:Steatyn eear-Hoveidjagh]]
[[Ronney:Irredentaghys Rooshagh]]
[[Ronney:Scarreydys 'sy Çhorshey]]
[[Ronney:Yn Choagaash Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1991]]
[[Ronney:Steatyn as lieh-enney oc]]
fveauqt5e4sfh73tvz43wfdc2b3jdlg
Yn Teer
0
2980
394999
374093
2026-10-22T13:47:35Z
MacTire02
219
++
394999
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Arabagh y Teer
|ennym_foddey_cadjincliaghtagh= {{unbulleted list|{{lang|ar|{{script/Arabic|اَلْجُمْهُورِيَّةُ ٱلْعَرَبِيَّةُ ٱلْسُوْرِيَّة}}}} {{small|([[Arabish]])}}<br />{{small|{{transliteration|ar|al-Jumhūriyyah al-ʿArabiyyah as-Sūriyyah}}}}}}
|ennym_gienneydagh = y Teer
|jalloo_brattagh = Flag of Syria (2025-).svg
|jalloo_cleinney = Emblem of Syria (2025–present).svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Syria projection (2024–present).svg
|jarroo-raa =
|arrane_ashoonagh = {{lang|ar|[[Ḥumāt ad-Diyār|حُمَاةَ الدِّيَارِ]]}}
|tessen-lettyraghey_arrane_ashoonagh = Ḥumāt ad-Diyār
|çhyndaa_arrane_ashoonagh = Arreyderyn y Çheer Ghooie
|coadan_arrane_ashoonagh = National Anthem of Syria.ogg
|çhengey_arrane_ashoonagh = Arabish
|çhengaghyn_oikoil = [[Arabish Chadjinit Noa-emshiragh|Arabish]]<ref name="CIA">{{Citation |title=Syria |date=3 Mayrnt 2025 |work=The World Factbook |url=https://www.cia.gov/the-world-factbook/countries/syria/#people-and-society |archive-url=https://web.archive.org/web/20250306031157/https://www.cia.gov/the-world-factbook/countries/syria/#people-and-society |url-status=dead |archive-date=6 Mayrnt 2025 |access-date=6 Mayrnt 2025 |publisher=Central Intelligence Agency |language=en}}</ref><ref>{{Cite web | title=Constitutional Declaration of the Syrian Arab Republic | url=https://constitutionnet.org/sites/default/files/2025-03/2025.03.13%20-%20Constitutional%20declaration%20%28English%29.pdf | archive-url=https://web.archive.org/web/20250318030710/https://constitutionnet.org/sites/default/files/2025-03/2025.03.13%20-%20Constitutional%20declaration%20%28English%29.pdf | archive-date=18 Mayrnt 2025 | website=ConstitutionNet}}</ref>
|sorçh_çhengaghyn = [[Çhengey ashoonagh]] ennit
|çhengaghyn = [[Kurdish]]{{efn|Per [[:s:Translation:Decree No. 13 of 2026 (y Teer)|Earroo Sarey 13 2026]]<ref name="al-monitor2026-01-16">{{Cite web |title=Syria's Sharaa declares Kurdish a national language, recognizes Nowruz - AL-Monitor: The Middle East's leading independent news source since 2012 |url=https://www.al-monitor.com/originals/2026/01/syrias-sharaa-declares-kurdish-national-language-recognizes-nowruz |access-date=16 Jerrey Geuree 2026 |website=www.al-monitor.com}}</ref><ref>{{Cite web |date=16 Jerrey Geuree 2026 |title=President al-Sharaa issues decree that confirms Kurds as basic part of Syrian people |url=https://sana.sy/en/politics/2290787/ |access-date=16 Jerrey Geuree 2026 |website=Jantys Naight Arabagh y Teer}}</ref>}}
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght eaghtyraneagh]] unnaneagh fo [[Reiltys shallidagh y Teer|reiltys shallidagh]]
|ushtey_sy_cheead = 0.06
|blein_LTS_CCK = 2007
|LTS_CCK = $87.09 billoon
|LTS_CCK_yn_dooinney = $4,488
|LTS_ennymagh = $37.76 billoon
|sorçh_kiondeeaght = Bunneeaght
|note_kiondeeaght =
|taghyrt1_bunnit = [[Reeriaght Arabagh y Teer]]
|date1_bunnit = 8 Mayrnt 1920
|taghyrt2_bunnit = [[Steat y Teer]] fo [[Anneydaght Rangagh y Teer as y Livaan|anneydaght Rangagh]]
|date2_bunnit = 1 Nollick 1924
|taghyrt3_bunnit = [[Kied Phobblaght y Teer]]
|date3_bunnit = 14 Boaldyn 1930
|taghyrt4_bunnit = Jerrey'n anneydaght Rangagh
|date4_bunnit = 17 Averil 1946
|taghyrt5_bunnit = Ayrn jeh'n [[Pobblaght Arabagh Unnaneysit|Phobblaght Arabagh Unnaneysit]]
|date5_bunnit = 22 Toshiaght Arree 1958 – 28 Mean Fouyir 1961
|taghyrt6_bunnit = [[Eaght steat 'sy Teer, 1963|Toshiaght rish y reill Ba'athagh]]
|date6_bunnit = 8 Mayrnt 1963
|taghyrt7_bunnit = [[Tuittym Assad|Ceau-magh y reiltys Ba'athagh]] as bunneeaght y [[Reiltys shallidagh y Teer|reiltys shallidagh]]
|date7_bunnit = 8 Nollick 2024
|traa_ynnydagh = [[Traa Chadjinit yn Arabaght|AST]]
|ashchur_utc = +03:00
|traa_ynnydagh_TTLS =
|ashchur_utc_TTLS =
|cctld = [[.sy]]
|coad_çhellvane = 963
}}
She çheer ayns [[yn Aishey]] ee '''yn Teer'''. T'ee çhemmit liorish [[Yn Turkee|y Turkee]] da'n twoaie, [[yn Earack]] da'n shiar, [[Yn Jordaan|y Jordaan]] da'n jiass, as liorish [[Israel]] as [[Yn Livaan|y Livaan]] da'n shiar yiass. She yn [[Yn Damask|Damask]] y [[preeu-valley]].
==Noteyn==
{{notelist}}
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{Yn Commeeys Arabagh}}
{{Gurneil eaghtyrys}}
{{Coord|35|N|38|E|display=title}}
{{DEFAULTSORT:Teer, Yn}}
{{bun}}
[[Ronney:Yn Teer| ]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Ard hiar y Veanvooir]]
[[Ronney:Yn Levaant]]
[[Ronney:Pobblaghtyn Arabagh]]
[[Ronney:Çheeraghyn-oltey yn Chommeeys Arabagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1946]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1946]]
bjtcvy7xdxer5nod13iykv2e1o03mna
395000
394999
2026-10-22T13:47:56Z
MacTire02
219
gaelg
395000
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Pobblaght Arabagh y Teer
|ennym_foddey_cadjincliaghtagh= {{unbulleted list|{{lang|ar|{{script/Arabic|اَلْجُمْهُورِيَّةُ ٱلْعَرَبِيَّةُ ٱلْسُوْرِيَّة}}}} {{small|([[Arabish]])}}<br />{{small|{{transliteration|ar|al-Jumhūriyyah al-ʿArabiyyah as-Sūriyyah}}}}}}
|ennym_gienneydagh = y Teer
|jalloo_brattagh = Flag of Syria (2025-).svg
|jalloo_cleinney = Emblem of Syria (2025–present).svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Syria projection (2024–present).svg
|jarroo-raa =
|arrane_ashoonagh = {{lang|ar|[[Ḥumāt ad-Diyār|حُمَاةَ الدِّيَارِ]]}}
|tessen-lettyraghey_arrane_ashoonagh = Ḥumāt ad-Diyār
|çhyndaa_arrane_ashoonagh = Arreyderyn y Çheer Ghooie
|coadan_arrane_ashoonagh = National Anthem of Syria.ogg
|çhengey_arrane_ashoonagh = Arabish
|çhengaghyn_oikoil = [[Arabish Chadjinit Noa-emshiragh|Arabish]]<ref name="CIA">{{Citation |title=Syria |date=3 Mayrnt 2025 |work=The World Factbook |url=https://www.cia.gov/the-world-factbook/countries/syria/#people-and-society |archive-url=https://web.archive.org/web/20250306031157/https://www.cia.gov/the-world-factbook/countries/syria/#people-and-society |url-status=dead |archive-date=6 Mayrnt 2025 |access-date=6 Mayrnt 2025 |publisher=Central Intelligence Agency |language=en}}</ref><ref>{{Cite web | title=Constitutional Declaration of the Syrian Arab Republic | url=https://constitutionnet.org/sites/default/files/2025-03/2025.03.13%20-%20Constitutional%20declaration%20%28English%29.pdf | archive-url=https://web.archive.org/web/20250318030710/https://constitutionnet.org/sites/default/files/2025-03/2025.03.13%20-%20Constitutional%20declaration%20%28English%29.pdf | archive-date=18 Mayrnt 2025 | website=ConstitutionNet}}</ref>
|sorçh_çhengaghyn = [[Çhengey ashoonagh]] ennit
|çhengaghyn = [[Kurdish]]{{efn|Rere [[:s:Translation:Decree No. 13 of 2026 (y Teer)|Earroo Sarey 13 2026]]<ref name="al-monitor2026-01-16">{{Cite web |title=Syria's Sharaa declares Kurdish a national language, recognizes Nowruz - AL-Monitor: The Middle East's leading independent news source since 2012 |url=https://www.al-monitor.com/originals/2026/01/syrias-sharaa-declares-kurdish-national-language-recognizes-nowruz |access-date=16 Jerrey Geuree 2026 |website=www.al-monitor.com}}</ref><ref>{{Cite web |date=16 Jerrey Geuree 2026 |title=President al-Sharaa issues decree that confirms Kurds as basic part of Syrian people |url=https://sana.sy/en/politics/2290787/ |access-date=16 Jerrey Geuree 2026 |website=Jantys Naight Arabagh y Teer}}</ref>}}
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght eaghtyraneagh]] unnaneagh fo [[Reiltys shallidagh y Teer|reiltys shallidagh]]
|ushtey_sy_cheead = 0.06
|blein_LTS_CCK = 2007
|LTS_CCK = $87.09 billoon
|LTS_CCK_yn_dooinney = $4,488
|LTS_ennymagh = $37.76 billoon
|sorçh_kiondeeaght = Bunneeaght
|note_kiondeeaght =
|taghyrt1_bunnit = [[Reeriaght Arabagh y Teer]]
|date1_bunnit = 8 Mayrnt 1920
|taghyrt2_bunnit = [[Steat y Teer]] fo [[Anneydaght Rangagh y Teer as y Livaan|anneydaght Rangagh]]
|date2_bunnit = 1 Nollick 1924
|taghyrt3_bunnit = [[Kied Phobblaght y Teer]]
|date3_bunnit = 14 Boaldyn 1930
|taghyrt4_bunnit = Jerrey'n anneydaght Rangagh
|date4_bunnit = 17 Averil 1946
|taghyrt5_bunnit = Ayrn jeh'n [[Pobblaght Arabagh Unnaneysit|Phobblaght Arabagh Unnaneysit]]
|date5_bunnit = 22 Toshiaght Arree 1958 – 28 Mean Fouyir 1961
|taghyrt6_bunnit = [[Eaght steat 'sy Teer, 1963|Toshiaght rish y reill Ba'athagh]]
|date6_bunnit = 8 Mayrnt 1963
|taghyrt7_bunnit = [[Tuittym Assad|Ceau-magh y reiltys Ba'athagh]] as bunneeaght y [[Reiltys shallidagh y Teer|reiltys shallidagh]]
|date7_bunnit = 8 Nollick 2024
|traa_ynnydagh = [[Traa Chadjinit yn Arabaght|AST]]
|ashchur_utc = +03:00
|traa_ynnydagh_TTLS =
|ashchur_utc_TTLS =
|cctld = [[.sy]]
|coad_çhellvane = 963
}}
She çheer ayns [[yn Aishey]] ee '''yn Teer'''. T'ee çhemmit liorish [[Yn Turkee|y Turkee]] da'n twoaie, [[yn Earack]] da'n shiar, [[Yn Jordaan|y Jordaan]] da'n jiass, as liorish [[Israel]] as [[Yn Livaan|y Livaan]] da'n shiar yiass. She yn [[Yn Damask|Damask]] y [[preeu-valley]].
==Noteyn==
{{notelist}}
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{Yn Commeeys Arabagh}}
{{Gurneil eaghtyrys}}
{{Coord|35|N|38|E|display=title}}
{{DEFAULTSORT:Teer, Yn}}
{{bun}}
[[Ronney:Yn Teer| ]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Ard hiar y Veanvooir]]
[[Ronney:Yn Levaant]]
[[Ronney:Pobblaghtyn Arabagh]]
[[Ronney:Çheeraghyn-oltey yn Chommeeys Arabagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1946]]
[[Ronney:Çheeraghyn yn Aishey Heear]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1946]]
frkowbw3andpicldoxap7n5bjppk5hk
Yn Vangladesh
0
2993
395007
392074
2026-10-22T17:30:01Z
MacTire02
219
++; ny smoo ry-yannoo
395007
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Deynphobblaght y Vangladesh
|ennym_foddey_cadjincliaghtagh= {{ubl|{{lang|bn|গণপ্রজাতন্ত্রী বাংলাদেশ}} {{small|([[Bengaalish]])}}|{{small|{{transliteration|bn|Gôṇôprôjātôntrī Bāṅlādēś}}}}}}
|ennym_gienneydagh = y Vangladesh
|jalloo_brattagh = Flag of Bangladesh.svg
|jalloo_cleinney = Coat of arms of Bangladesh.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Bangladesh_(orthographic_projection).svg
|jarroo-raa = none
|arrane_ashoonagh = {{lang|bn|[[Amar Sonar Bangla|আমার সোনার বাংলা]]}}
|çhengey_arrane_ashoonagh = bengaalish
|tessen-lettyraghey_arrane_ashoonagh = {{transliteration|bn|Āmār Sōnār Bāṅlā}}
|çhyndaa_arrane_ashoonagh = My Vengaal Airhey
|coadan_arrane_ashoonagh = Amar Sonar Bangla instrumental by US Navy Band.oga
|çhengaghyn_oikoil = [[Bengaalish]]<ref name="bdlaws.minlaw.gov.bd">{{cite web |url=http://bdlaws.minlaw.gov.bd/act-details-367.html |title=The Constitution of the People's Republic of Bangladesh |website=[[Rheynn Leigh, Cairys, as Cooishyn Parlamaidagh]] |access-date=1 Toshiaght Arree 2017 |archive-date=10 Mee Houney 2019 |archive-url=https://web.archive.org/web/20191110101626/http://bdlaws.minlaw.gov.bd/act-details-367.html |url-status=live }}</ref><ref>{{cite web |url=http://bdlaws.minlaw.gov.bd/act-705.html |script-title=bn:বাংলা ভাষা প্রচলন আইন, ১৯৮৭ |author=<!--Not stated--> |website=bdlaws.minlaw.gov.bd |publisher=[[Ministry of Law, Justice and Parliamentary Affairs]] |trans-title=Slattys Cur-ayns-bree yn Vengaalish, 1987 |language=bn |access-date=7 Jerrey Geuree 2024 |archive-date=7 Jerrey Geuree 2024 |archive-url=https://web.archive.org/web/20240107175804/http://bdlaws.minlaw.gov.bd/act-705.html |url-status=live }}</ref>
|sorçh_reiltys = [[Pobblaght pharlamaidagh unnaneagh]]
|ushtey_sy_cheead = 7.0
|blein_LTS_CCK = 2007
|LTS_CCK = $206.6 billoon
|LTS_CCK_yn_dooinney = $1,300
|sorçh_kiondeeaght = [[Shennaghys ny Bangladesh|Seyrsnys]]
|note_kiondeeaght = veih'n [[Yn Phakistaan|Phakistaan]]
|taghyrt1_bunnit = Fogrit magh
|date1_bunnit = 26 Mayrnt 1971
|taghyrt2_bunnit = Laa yn Varriaght
|date2_bunnit = 16 Nollick 1971
|argid = [[Taka yn Vangladesh]]
|coad_argid = BDT
|traa_ynnydagh = BDT
|ashchur_utc = +6
|traa_ynnydagh_TTLS =
|ashchur_utc_TTLS =
|cctld = [[.bd]]
|coad_çhellvane = 880
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Vangladesh'''. T'ee çhemmit liorish [[yn Injey]] da'n sheear, y twoaie as y shiar, as liorish [[Myanmar]] da'n shiar yiass. She [[Dhaka]] yn [[preeu-valley]].
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|24|N|90|E|type:country_region:BD|display=title}}
{{DEFAULTSORT:Vangladesh, Yn}}
{{bun}}
[[Ronney:Yn Vangladesh| ]]
[[Ronney:Yn Vengaal]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Pobblaghtyn ayns Co-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey D-8]]
[[Ronney:Çheeraghyn-oltey Cho-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey Reagheydys yn Aishey Yiass cour Co-obbraghey Ardjynagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Çheeraghyn-oltey Vanc Lhiasaghey BRICS]]
[[Ronney:Çheeraghyn yn Aishey Yiass]]
[[Ronney:Eear-choloinyn as eear-choadanyssyn Goaldagh 'syn Aishey]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1971]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1971]]
[[Ronney:Çheeraghyn sloo lhiasit]]
[[Ronney:Ardjyn rheynnit]]
01p3r0f8tcfhy3ruvmmk6u8bwg69rsu
395008
395007
2026-10-22T19:26:48Z
MacTire02
219
++
395008
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Deynphobblaght y Vangladesh
|ennym_foddey_cadjincliaghtagh= {{ubl|{{lang|bn|গণপ্রজাতন্ত্রী বাংলাদেশ}} {{small|([[Bengaalish]])}}|{{small|{{transliteration|bn|Gôṇôprôjātôntrī Bāṅlādēś}}}}}}
|ennym_gienneydagh = y Vangladesh
|jalloo_brattagh = Flag of Bangladesh.svg
|jalloo_cleinney = Coat of arms of Bangladesh.svg
|sorçh_cowrey = Cowrey
|jalloo_caslys = Bangladesh_(orthographic_projection).svg
|jarroo-raa = none
|arrane_ashoonagh = {{lang|bn|[[Amar Sonar Bangla|আমার সোনার বাংলা]]}}
|çhengey_arrane_ashoonagh = bengaalish
|tessen-lettyraghey_arrane_ashoonagh = {{transliteration|bn|Āmār Sōnār Bāṅlā}}
|çhyndaa_arrane_ashoonagh = My Vengaal Airhey
|coadan_arrane_ashoonagh = Amar Sonar Bangla instrumental by US Navy Band.oga
|çhengaghyn_oikoil = [[Bengaalish]]<ref name="bdlaws.minlaw.gov.bd">{{cite web |url=http://bdlaws.minlaw.gov.bd/act-details-367.html |title=The Constitution of the People's Republic of Bangladesh |website=[[Rheynn Leigh, Cairys, as Cooishyn Parlamaidagh]] |access-date=1 Toshiaght Arree 2017 |archive-date=10 Mee Houney 2019 |archive-url=https://web.archive.org/web/20191110101626/http://bdlaws.minlaw.gov.bd/act-details-367.html |url-status=live }}</ref><ref>{{cite web |url=http://bdlaws.minlaw.gov.bd/act-705.html |script-title=bn:বাংলা ভাষা প্রচলন আইন, ১৯৮৭ |author=<!--Not stated--> |website=bdlaws.minlaw.gov.bd |publisher=[[Ministry of Law, Justice and Parliamentary Affairs]] |trans-title=Slattys Cur-ayns-bree yn Vengaalish, 1987 |language=bn |access-date=7 Jerrey Geuree 2024 |archive-date=7 Jerrey Geuree 2024 |archive-url=https://web.archive.org/web/20240107175804/http://bdlaws.minlaw.gov.bd/act-705.html |url-status=live }}</ref>
|sorçh_reiltys = [[Pobblaght pharlamaidagh unnaneagh]]
|ushtey_sy_cheead = 7.0
|blein_LTS_CCK = 2007
|LTS_CCK = $206.6 billoon
|LTS_CCK_yn_dooinney = $1,300
|note_kiondeeaght = veih'n [[Yn Phakistaan|Phakistaan]]
|sorçh_kiondeeaght = [[Neuchrogheydys y Vangladesh|Neuchrogheydys]]
|taghyrt_bunneeaght1 = [[Yn Vengaal Hiar|Y Vengaal Hiar]]
|date_bunneeaght1 = 15 Luanistyn 1947
|taghyrt_bunneeaght2 = [[Yn Phakistaan Hiar|Y Phakistaan Hiar]]
|date_bunneeaght2 = 29 Toshiaght Arree 1956
|taghyrt_bunneeaght3 = [[Fogrey-magh Neuchrogheydys y Vangladesh|Fogrey-magh y neuchrogheydys]]
|date_bunneeaght3 = 26 Mayrnt 1971
|taghyrt_bunneeaght4 = [[Reiltys Shallidagh y Vangladesh|Reiltys shallidagh]]
|date_bunneeaght4 = 10 Averil 1971
|taghyrt_bunneeaght5 = [[Greie Livrey-seose y Phakistaan|Barriaght]] 'sy [[Caggey Seyrsnys y Vangladesh|Chaggey Seyrsnys]]
|date_bunneeaght5 = 16 Mee ny Nollick 1971
|taghyrt_bunneeaght6 = [[Bunraght y Vangladesh|Bunraght roie]]
|date_bunneeaght6 = 16 Mee ny Nollick 1972
|traa_ynnydagh = [[Traa Chadjinit y Vangladesh|BDT]]
|ashchur_utc = +06:00
|cctld = [[.bd]]
|coad_çhellvane = 880
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Vangladesh'''. T'ee çhemmit liorish [[yn Injey]] da'n sheear, y twoaie as y shiar, as liorish [[Myanmar]] da'n shiar yiass. She [[Dhaka]] yn [[preeu-valley]].
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|24|N|90|E|type:country_region:BD|display=title}}
{{DEFAULTSORT:Vangladesh, Yn}}
{{bun}}
[[Ronney:Yn Vangladesh| ]]
[[Ronney:Yn Vengaal]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Pobblaghtyn ayns Co-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey D-8]]
[[Ronney:Çheeraghyn-oltey Cho-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey Reagheydys yn Aishey Yiass cour Co-obbraghey Ardjynagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Çheeraghyn-oltey Vanc Lhiasaghey BRICS]]
[[Ronney:Çheeraghyn yn Aishey Yiass]]
[[Ronney:Eear-choloinyn as eear-choadanyssyn Goaldagh 'syn Aishey]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1971]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1971]]
[[Ronney:Çheeraghyn sloo lhiasit]]
[[Ronney:Ardjyn rheynnit]]
7gdua6par8vvr5yriquh5r1h2t12l19
Yn Turkmenistaan
0
2995
395002
360881
2026-10-22T14:47:23Z
MacTire02
219
++
395002
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Y Turkmenistaan
|ennym_foddey_cadjincliaghtagh= {{lang|tk|Türkmenistan|italics=no}} {{small|([[Turkmenish]])}}
|ennym_gienneydagh = y Turkmenistaan
|jalloo_brattagh = Flag of Turkmenistan.svg
|jalloo_cleinney = Emblem of Turkmenistan.svg
|jalloo_caslys = Turkmenistan (orthographic projection).svg
|jarroo-raa = {{lang|tk|Türkmenistan Bitaraplygyň watanydyr}}
|çhyndaa_jarroo-raa = She moir y neaghtyraght ta'n Turkmenistaan
|çhengey_jarroo-raa = Turkmenish
|imraa_jarroo-raa = <ref>{{Cite web |date=28 Mee ny Nollick 2019 |title="Turkmenistan is the motherland of Neutrality" is the motto of 2020 | Chronicles of Turkmenistan |work=Chronicles of Turkmenistan |url=https://en.hronikatm.com/2019/12/turkmenistan-is-the-motherland-of-neutrality-is-the-motto-of-2020/ |url-status=live |archive-url=https://web.archive.org/web/20200608104205/https://en.hronikatm.com/2019/12/turkmenistan-is-the-motherland-of-neutrality-is-the-motto-of-2020/ |archive-date=8 Mean Souree 2020 |access-date=26 Boaldyn 2020 |publisher=En.hronikatm.com}}</ref><ref>{{Cite web |date=29 Mee ny Nollick 2019 |title=Turkmen parliament places Year 2020 under national motto "Turkmenistan – Homeland of Neutrality" – tpetroleum |url=https://turkmenpetroleum.com/en/2019/12/29/turkmen-parliament-places-year-2020-under-national-motto-turkmenistan-homeland-of-neutrality/ |url-status=dead |archive-url=https://web.archive.org/web/20200608104205/https://turkmenpetroleum.com/en/2019/12/29/turkmen-parliament-places-year-2020-under-national-motto-turkmenistan-homeland-of-neutrality/ |archive-date=8 Mean Souree 2020 |access-date=26 Boaldyn 2020 |publisher=Turkmenpetroleum.com}}</ref>
|arrane_ashoonagh = {{lang|tk|[[State Anthem of Turkmenistan|Türkmenistanyň Döwlet senasy]]|italics=no}}
|çhyndaa_arrane_ashoonagh= Anthym Steat y Turkmenistaan
|coadan_arrane_ashoonagh = National anthem of Turkmenistan, performed by the United States Navy Band.oga
|çhengey_arrane_ashoonagh= Turkmenish
|çhengaghyn_oikoil = [[Turkmenish]]<ref name="constitution">{{Cite web |title=Turkmenistan's Constitution of 2008 |url=https://www.constituteproject.org/constitution/Turkmenistan_2008.pdf?lang=en |url-status=live |archive-url=https://web.archive.org/web/20190515155819/https://www.constituteproject.org/constitution/Turkmenistan_2008.pdf?lang=en |archive-date=15 Boaldyn 2019 |access-date=17 Mee ny Nollick 2020}}</ref>
|balley_smoo = preeu-valley
|sorçh_reiltys = [[Pobblaght eaghtyraneagh]] unnaneagh fo [[jaghteyraght eiraghtagh]] [[ooilley-smaghtys|ooilley-smaghtagh]]<ref>{{cite journal |last1=Gore |first1=Hayden |title=Totalitarianism: The Case of Turkmenistan |journal=Human Rights & Human Welfare |date=2007 |issue=Human Rights in Russia and the Former Soviet Republics |pages=107–116 |access-date=29 Mean Souree 2021 |publisher=[[Josef Korbel School of International Studies]] |location=[[Denver]] |url=https://www.du.edu/korbel/hrhw/researchdigest/russia/totalitarianism.pdf |archive-url=https://web.archive.org/web/20200229235859/https://www.du.edu/korbel/hrhw/researchdigest/russia/totalitarianism.pdf |archive-date=29 Toshiaght Arree 2020 |url-status=dead}}</ref><ref>{{Cite web |last=Williamson |first=Hugh |date=24 Mayrnt 2022 |title=The internet is crucial |url=https://www.hrw.org/news/2022/03/24/internet-crucial |url-status=live |archive-url=https://web.archive.org/web/20220504060758/https://www.hrw.org/news/2022/03/24/internet-crucial |archive-date=4 Boaldyn 2022 |access-date=4 Boaldyn 2022 |website=[[Human Rights Watch]] |quote=Turkmenistan stands out as a totalitarian state. It gives absolutely no scope to dissident opinions and independent media. The regime censors the internet heavily.}}</ref><ref>{{cite book |last1=Horák |first1=Slavomír |last2=Šír |first2=Jan |title=Dismantling totalitarianism?: Turkmenistan under Berdimuhamedow |date=Mayrnt 2009 |publisher=[[Paul H. Nitze School of Advanced International Studies]] |location=[[Washington, D.C.]] |isbn=9789185937172 |url=https://www.files.ethz.ch/isn/106328/js09turkmenistanunder.pdf |access-date=4 Boaldyn 2022 |archive-date=16 Luanistyn 2022 |archive-url=https://web.archive.org/web/20220816214311/https://www.files.ethz.ch/isn/106328/js09turkmenistanunder.pdf |url-status=live}}</ref><ref>{{cite news |title=Turkmenistan: New president, old ideas |url=https://eurasianet.org/turkmenistan-new-president-old-ideas |access-date=4 Boaldyn 2022 |work=[[Eurasianet]] |date=15 Mayrnt 2022 |archive-date=15 Mayrnt 2022 |archive-url=https://web.archive.org/web/20220315220843/https://eurasianet.org/turkmenistan-new-president-old-ideas |url-status=live}}</ref><ref>{{cite web |title=Nations in Transit: Turkemistan |url=https://freedomhouse.org/country/turkmenistan/nations-transit/2016 |website=[[Freedom House]] |access-date=4 Boaldyn 2022 |date=2016 |archive-date=23 Boaldyn 2022 |archive-url=https://web.archive.org/web/20220523044206/https://freedomhouse.org/country/turkmenistan/nations-transit/2016 |url-status=live}}</ref><ref>{{cite web |last1=Stronski |first1=Paul |title=Turkmenistan at Twenty-Five: The High Price of Authoritarianism |url=https://carnegieendowment.org/files/Stronski_Turkmenistan.pdf |publisher=[[Carnegie Endowment for International Peace]] |access-date=4 Boaldyn 2022 |location=[[Washington, D.C.]] |date=30 Jerrey Geuree 2017 |archive-date=1 Jerrey Geuree 2022 |archive-url=https://web.archive.org/web/20220101103735/https://carnegieendowment.org/files/Stronski_Turkmenistan.pdf |url-status=live}}</ref>
|ushtey_sy_cheead = 4.9
|blein_LTS_CCK = 2006
|LTS_CCK = $45.11 billoon
|LTS_CCK_yn_dooinney = $8,900
|sorçh_kiondeeaght = [[Scryssey yn Unnaneys Soveidjagh|Neuchrogheydys]]
|note_kiondeeaght = veih'n [[Yn Unnaneys Soveidjagh|Unnaneys Soveidjagh]]
|taghyrt_bunneeaght1 = Fogrey magh y chionedeeaght
|date_bunneeaght1 = 22 Luanistyn 1990
|taghyrt_bunneeaght2 = Fogrey magh y neuchrogheydys
|date_bunneeaght2 = 27 Jerrey Fouyir 1991
|taghyrt_bunneeaght3 = Enney yn neuchrogheydys
|date_bunneeaght3 = 26 Mee ny Nollick 1991
|traa_ynnydagh = [[Traa yn Turkmenistaan|TMT]]
|ashchur_utc = +05:00
|cctld = [[.tm]]
|coad_çhellvane = 993
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Turkmenistaan'''. T'ee çhemmit liorish [[yn Chassaghstaan|y Chassaghstaan]] as [[yn Oosbeckistaan]] da'n twoaie, as rish [[yn Eeraan]] as [[yn Afghanistaan]] da'n jiass. She [[Ashgabat]] y [[preeu-valley]].
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|39|N|60|E|type:country|display=title}}
{{bun}}
{{DEFAULTSORT:Turkmenistaan, Yn}}
[[Ronney:Yn Turkmenistaan| ]]
[[Ronney:Çheeraghyn yn Aishey Veanagh]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Ard-chlaare yn Eeraan]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1991]]
[[Ronney:Steatyn ooilley-smaghtagh]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1991]]
[[Ronney:Olteynyn Reagheydys Eddyrashoonagh y Chultoor Turkagh]]
[[Ronney:Çheeraghyn-baght Reagheydys ny Steatyn Turkagh]]
[[Ronney:Çheeraghyn thallooinit]]
e541o53mduyi06yr6jdicce5hzr2lf4
Yn Valaysia
0
3018
395004
358374
2026-10-22T15:45:11Z
MacTire02
219
++;
395004
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Y Valaysia
|ennym_foddey_cadjincliaghtagh= {{lang|ms|Malaysia|italics=no}} {{small|([[Malayish]])}}
|ennym_gienneydagh = y Valaysia
|jalloo_brattagh = Flag of Malaysia.svg
|jalloo_cleinney = Coat_of_arms_of_Malaysia.svg
|jalloo_caslys = Malaysia_(orthographic_projection).svg
|jarroo-raa = {{lang|ms|[[She Troshid yn Unnaneaght|Bersekutu Bertambah Mutu]]}}
|çhengey_jarroo-raa = Malayish
|imraa_jarroo-raa = <ref>{{cite web |title=Malaysian Flag and Coat of Arms |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 |archive-date=22 Jerrey Fouyir 2013 |access-date=9 Mean Fouyir 2013 |publisher=Reiltys y Valaysia}}</ref>
|jarroo-raa2 = {{lang|ms-Arab|{{script/Nastaliq|برسکوتو برتمبه موتو}}}}
|çhengey_jarroo-raa2 = [[Script Jawi|Jawi]]
|çhyndaa_jarroo-raa = She Troshid yn Unnaneaght
|arrane_ashoonagh = {{lang|ms|[[Negaraku]]|italics=no}}
|çhyndaa_arrane_ashoonagh = My Heer
|coadan_arrane_ashoonagh = Negaraku instrumental.ogg
|çhengaghyn_oikoil = [[Malayish]]
|possanyn_kynneeagh = none
|craueeaght = {{ubl
|63.5% [[Yn Islam 'sy Valaysia|Yn Islam]] ([[craueeaght steat|oikoil]])<ref>{{cite web |title=The States, Religion and Law of the Federation |url=http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-url=https://web.archive.org/web/20170614105535/http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-date=14 Mean Souree 2017 |access-date=29 Jerrey Fouyir 2017 |work=Bunraght y Valaysia |publisher=Commishoon ny Pointeilyn Briwnyssagh}}</ref>
|18.7% [[Yn Buddhaghys 'sy Valaysia|Y Buddhaghys]]
|9.1% [[Yn Chreestiaght 'syn Aishey|Y Chreestiaght]]
|6.1% [[Yn Hindughys 'sy Valaysia|Y Hindughys]]
|0.9% elley
|1.8% gyn fys}}
| religion_ref = <ref>{{cite web |date=14 Toshiaght Arree 2020 |title=Distribution and Basic Demographic Characteristic Report 2020 |url=https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |url-status=live |archive-url=https://web.archive.org/web/20230822014403/https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |archive-date=22 Luanistyn 2023 |access-date=26 Mean Souree 2022 |publisher=Rheynn Staddyssaght, y Valaysia}}</ref><ref>[https://www.thearda.com/world-religion/national-profiles?u=139c World Religion Database ec yn ynnyd-eggey ARDA, feddynit er 2023-08-08]</ref>
|blein_craueeaght = 2020
|sorçh_reiltys = [[Monarkaght reihagh]] vunraghtoil [[corys parlamaidagh|pharlamaidagh]] chonastagh
|ushtey_sy_cheead = 0.3
|blein_LTS_CCK = 2007
|LTS_CCK = $357.9 billoon
|LTS_CCK_yn_dooinney = $14,400
|LTS_ennymagh = $186.5 billoon
|sorçh_kiondeeaght = Seyrsnys
|note_kiondeeaght =
|taghyrt1_bunnit = veih'n [[Reeriaght Unnaneysit]] ([[Yn Valay]] ynrican)
|date1_bunnit = 31 Luanistyn 1957
|taghyrt2_bunnit = Conastey (lesh [[Sabah]], [[Sarawak]] as [[Singapore]]{{efn|Hooar [[Singapore]] seyrsnys veih'n Valaysia er 9 Luanistyn 1965}}
|date2_bunnit = 16 Mean Fouyir 1963
|argid = [[Ringgit y Valaysia|Ringgit]]
|coad_argid = MYR
|traa_ynnydagh = [[Traa cadjinit y Valaysia|MST]]
|ashchur_utc = +8
|traa_ynnydagh_TTLS =
|ashchur_utc_TTLS =
|cctld = [[.my]]
|coad_çhellvane = 60
|fo-note1 =
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Valaysia'''. T'ee çhemmit liorish [[Yn Çheer Thai|y Çheer Thai]] da'n twoaie as liorish [[Brunei]] as [[yn Indoneesh]] er ellan [[Yn Vorneo|ny Borneo]]. She [[Kuala Lumpur]] y [[preeu-valley]].
==Noteyn==
{{notelist}}
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|2|N|112|E|type:country_region:MY|display=title}}
{{DEFAULTSORT:Valaysia, Yn}}
{{bun}}
[[Ronney:Yn Valaysia| ]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey ASEAN]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Monarkaghtyn ayns Co-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey D-8]]
[[Ronney:Monarkaghtyn conastagh]]
[[Ronney:Çheeraghyn-oltey Cho-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn y G15]]
[[Ronney:Çheeraghyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1963]]
[[Ronney:Laaraghyn y Nah Chaggey Dowanagh]]
[[Ronney:Bunneeaghtyn 'sy Valaysia 'sy vlein 1963|*]]
[[Ronney:CPTPP]]
269ilajf5xb3py83hvfzwnkzzvknpf0
395005
395004
2026-10-22T17:05:54Z
MacTire02
219
++
395005
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Y Valaysia
|ennym_foddey_cadjincliaghtagh= {{lang|ms|Malaysia|italics=no}} {{small|([[Malayish]])}}
|ennym_gienneydagh = y Valaysia
|jalloo_brattagh = Flag of Malaysia.svg
|jalloo_cleinney = Coat_of_arms_of_Malaysia.svg
|jalloo_caslys = Malaysia_(orthographic_projection).svg
|jarroo-raa = {{lang|ms|[[She Troshid yn Unnaneaght|Bersekutu Bertambah Mutu]]}}
|çhengey_jarroo-raa = Malayish
|imraa_jarroo-raa = <ref>{{cite web |title=Malaysian Flag and Coat of Arms |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 |archive-date=22 Jerrey Fouyir 2013 |access-date=9 Mean Fouyir 2013 |publisher=Reiltys y Valaysia}}</ref>
|jarroo-raa2 = {{lang|ms-Arab|{{script/Nastaliq|برسکوتو برتمبه موتو}}}}
|çhengey_jarroo-raa2 = [[Script Jawi|Jawi]]
|çhyndaa_jarroo-raa = She Troshid yn Unnaneaght
|arrane_ashoonagh = {{lang|ms|[[Negaraku]]|italics=no}}
|çhyndaa_arrane_ashoonagh = My Heer
|coadan_arrane_ashoonagh = Negaraku instrumental.ogg
|çhengey_arrane_ashoonagh = Malayish
|çhengaghyn_oikoil = [[Malayish]]
|possanyn_kynneeagh = none
|craueeaght = {{ubl
|63.5% [[Yn Islam 'sy Valaysia|Yn Islam]] ([[craueeaght steat|oikoil]])<ref>{{cite web |title=The States, Religion and Law of the Federation |url=http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-url=https://web.archive.org/web/20170614105535/http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-date=14 Mean Souree 2017 |access-date=29 Jerrey Fouyir 2017 |work=Bunraght y Valaysia |publisher=Commishoon ny Pointeilyn Briwnyssagh}}</ref>
|18.7% [[Yn Buddhaghys 'sy Valaysia|Y Buddhaghys]]
|9.1% [[Yn Chreestiaght 'syn Aishey|Y Chreestiaght]]
|6.1% [[Yn Hindughys 'sy Valaysia|Y Hindughys]]
|0.9% elley
|1.8% gyn fys}}
| religion_ref = <ref>{{cite web |date=14 Toshiaght Arree 2020 |title=Distribution and Basic Demographic Characteristic Report 2020 |url=https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |url-status=live |archive-url=https://web.archive.org/web/20230822014403/https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |archive-date=22 Luanistyn 2023 |access-date=26 Mean Souree 2022 |publisher=Rheynn Staddyssaght, y Valaysia}}</ref><ref>[https://www.thearda.com/world-religion/national-profiles?u=139c World Religion Database ec yn ynnyd-eggey ARDA, feddynit er 2023-08-08]</ref>
|blein_craueeaght = 2020
|sorçh_reiltys = [[Monarkaght reihagh]] vunraghtoil [[corys parlamaidagh|pharlamaidagh]] chonastagh
|ushtey_sy_cheead = 0.3
|blein_LTS_CCK = 2007
|LTS_CCK = $357.9 billoon
|LTS_CCK_yn_dooinney = $14,400
|LTS_ennymagh = $186.5 billoon
|sorçh_kiondeeaght = [[Laa yn Neuchrogheydys (y Valaysia)|Neuchrogheydys]]
|note_kiondeeaght = veih'n [[Yn Reeriaght Unnaneysit|Reeriaght Unnaneysit]]
|taghyrt_bunneeaght1 = [[Conastey yn Valay]]
|date_bunneeaght1 = 31 Luanistyn 1957<ref>{{cite book |author=Mackay, Derek |url=https://books.google.com/books?id=QM5LImNbYusC&pg=PA240 |title=Eastern Customs: The Customs Service in British Malaya and the Opium Trade |date=2005 |publisher=The Radcliffe Press |isbn=978-1-85043-844-1 |pages=240– |access-date=20 Mean Souree 2015 |archive-url=https://web.archive.org/web/20230119151920/https://books.google.com/books?id=QM5LImNbYusC&pg=PA240 |archive-date=19 Jerrey Geuree 2023 |url-status=live}}</ref>
|taghyrt_bunneeaght2 = [[Laa Hene-reiltys Sarawak|Hene-reiltys Sarawak]]
|date_bunneeaght2 = 22 Jerrey Souree 1963
|taghyrt_bunneeaght3 = [[Laa Hene-reiltys y Vorneo Hwoaie|Hene-reiltys y Vorneo Hwoaie]]
|date_bunneeaght3 = 31 Luanistyn 1963<ref>{{cite web |date=14 Boaldyn 2021 |title=31 Ogos 1963, Hari kemerdekaan Sabah yang rasmi |url=https://www.astroawani.com/perspektif/kenapa-kita-takut-dengan-sejarah-22258 |url-status=live |archive-url=https://web.archive.org/web/20210901062457/https://www.astroawani.com/perspektif/kenapa-kita-takut-dengan-sejarah-22258 |archive-date=1 Mean Fouyir 2021 |access-date=1 Mean Fouyir 2021 |publisher=AWANI}}</ref>
|taghyrt_bunneeaght4 = [[Fogrey-magh yn Valaysia]]
|date_bunneeaght4 = 16 Mean Fouyir 1963
|traa_ynnydagh = [[Traa Chadjinit y Valaysia|MST]]
|ashchur_utc = +08:00
|cctld = [[.my]]
|coad_çhellvane = 60
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Valaysia'''. T'ee çhemmit liorish [[Yn Çheer Thai|y Çheer Thai]] da'n twoaie as liorish [[Brunei]] as [[yn Indoneesh]] er ellan [[Yn Vorneo|ny Borneo]]. She [[Kuala Lumpur]] y [[preeu-valley]].
==Noteyn==
{{notelist}}
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|2|N|112|E|type:country_region:MY|display=title}}
{{DEFAULTSORT:Valaysia, Yn}}
{{bun}}
[[Ronney:Yn Valaysia| ]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey ASEAN]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Monarkaghtyn ayns Co-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey D-8]]
[[Ronney:Monarkaghtyn conastagh]]
[[Ronney:Çheeraghyn-oltey Cho-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn y G15]]
[[Ronney:Çheeraghyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1963]]
[[Ronney:Laaraghyn y Nah Chaggey Dowanagh]]
[[Ronney:Bunneeaghtyn 'sy Valaysia 'sy vlein 1963|*]]
[[Ronney:CPTPP]]
7zhgh6h704o3cvr4g4qd9rblf5d757n
395006
395005
2026-10-22T17:07:28Z
MacTire02
219
-noteyn er-yn-oyr nagh vel noteyn ayn
395006
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Y Valaysia
|ennym_foddey_cadjincliaghtagh= {{lang|ms|Malaysia|italics=no}} {{small|([[Malayish]])}}
|ennym_gienneydagh = y Valaysia
|jalloo_brattagh = Flag of Malaysia.svg
|jalloo_cleinney = Coat_of_arms_of_Malaysia.svg
|jalloo_caslys = Malaysia_(orthographic_projection).svg
|jarroo-raa = {{lang|ms|[[She Troshid yn Unnaneaght|Bersekutu Bertambah Mutu]]}}
|çhengey_jarroo-raa = Malayish
|imraa_jarroo-raa = <ref>{{cite web |title=Malaysian Flag and Coat of Arms |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 |archive-date=22 Jerrey Fouyir 2013 |access-date=9 Mean Fouyir 2013 |publisher=Reiltys y Valaysia}}</ref>
|jarroo-raa2 = {{lang|ms-Arab|{{script/Nastaliq|برسکوتو برتمبه موتو}}}}
|çhengey_jarroo-raa2 = [[Script Jawi|Jawi]]
|çhyndaa_jarroo-raa = She Troshid yn Unnaneaght
|arrane_ashoonagh = {{lang|ms|[[Negaraku]]|italics=no}}
|çhyndaa_arrane_ashoonagh = My Heer
|coadan_arrane_ashoonagh = Negaraku instrumental.ogg
|çhengey_arrane_ashoonagh = Malayish
|çhengaghyn_oikoil = [[Malayish]]
|possanyn_kynneeagh = none
|craueeaght = {{ubl
|63.5% [[Yn Islam 'sy Valaysia|Yn Islam]] ([[craueeaght steat|oikoil]])<ref>{{cite web |title=The States, Religion and Law of the Federation |url=http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-url=https://web.archive.org/web/20170614105535/http://www.jac.gov.my/images/stories/akta/federalconstitution.pdf |archive-date=14 Mean Souree 2017 |access-date=29 Jerrey Fouyir 2017 |work=Bunraght y Valaysia |publisher=Commishoon ny Pointeilyn Briwnyssagh}}</ref>
|18.7% [[Yn Buddhaghys 'sy Valaysia|Y Buddhaghys]]
|9.1% [[Yn Chreestiaght 'syn Aishey|Y Chreestiaght]]
|6.1% [[Yn Hindughys 'sy Valaysia|Y Hindughys]]
|0.9% elley
|1.8% gyn fys}}
| religion_ref = <ref>{{cite web |date=14 Toshiaght Arree 2020 |title=Distribution and Basic Demographic Characteristic Report 2020 |url=https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |url-status=live |archive-url=https://web.archive.org/web/20230822014403/https://www.dosm.gov.my/v1/index.php?r=column/cthemeByCat&cat=117&bul_id=akliVWdIa2g3Y2VubTVSMkxmYXp1UT09&menu_id=L0pheU43NWJwRWVSZklWdzQ4TlhUUT09 |archive-date=22 Luanistyn 2023 |access-date=26 Mean Souree 2022 |publisher=Rheynn Staddyssaght, y Valaysia}}</ref><ref>[https://www.thearda.com/world-religion/national-profiles?u=139c World Religion Database ec yn ynnyd-eggey ARDA, feddynit er 2023-08-08]</ref>
|blein_craueeaght = 2020
|sorçh_reiltys = [[Monarkaght reihagh]] vunraghtoil [[corys parlamaidagh|pharlamaidagh]] chonastagh
|ushtey_sy_cheead = 0.3
|blein_LTS_CCK = 2007
|LTS_CCK = $357.9 billoon
|LTS_CCK_yn_dooinney = $14,400
|LTS_ennymagh = $186.5 billoon
|sorçh_kiondeeaght = [[Laa yn Neuchrogheydys (y Valaysia)|Neuchrogheydys]]
|note_kiondeeaght = veih'n [[Yn Reeriaght Unnaneysit|Reeriaght Unnaneysit]]
|taghyrt_bunneeaght1 = [[Conastey yn Valay]]
|date_bunneeaght1 = 31 Luanistyn 1957<ref>{{cite book |author=Mackay, Derek |url=https://books.google.com/books?id=QM5LImNbYusC&pg=PA240 |title=Eastern Customs: The Customs Service in British Malaya and the Opium Trade |date=2005 |publisher=The Radcliffe Press |isbn=978-1-85043-844-1 |pages=240– |access-date=20 Mean Souree 2015 |archive-url=https://web.archive.org/web/20230119151920/https://books.google.com/books?id=QM5LImNbYusC&pg=PA240 |archive-date=19 Jerrey Geuree 2023 |url-status=live}}</ref>
|taghyrt_bunneeaght2 = [[Laa Hene-reiltys Sarawak|Hene-reiltys Sarawak]]
|date_bunneeaght2 = 22 Jerrey Souree 1963
|taghyrt_bunneeaght3 = [[Laa Hene-reiltys y Vorneo Hwoaie|Hene-reiltys y Vorneo Hwoaie]]
|date_bunneeaght3 = 31 Luanistyn 1963<ref>{{cite web |date=14 Boaldyn 2021 |title=31 Ogos 1963, Hari kemerdekaan Sabah yang rasmi |url=https://www.astroawani.com/perspektif/kenapa-kita-takut-dengan-sejarah-22258 |url-status=live |archive-url=https://web.archive.org/web/20210901062457/https://www.astroawani.com/perspektif/kenapa-kita-takut-dengan-sejarah-22258 |archive-date=1 Mean Fouyir 2021 |access-date=1 Mean Fouyir 2021 |publisher=AWANI}}</ref>
|taghyrt_bunneeaght4 = [[Fogrey-magh yn Valaysia]]
|date_bunneeaght4 = 16 Mean Fouyir 1963
|traa_ynnydagh = [[Traa Chadjinit y Valaysia|MST]]
|ashchur_utc = +08:00
|cctld = [[.my]]
|coad_çhellvane = 60
}}
She çheer 'syn [[yn Aishey|Aishey]] ee '''yn Valaysia'''. T'ee çhemmit liorish [[Yn Çheer Thai|y Çheer Thai]] da'n twoaie as liorish [[Brunei]] as [[yn Indoneesh]] er ellan [[Yn Vorneo|ny Borneo]]. She [[Kuala Lumpur]] y [[preeu-valley]].
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{gurneil eaghtyrys}}
{{Coord|2|N|112|E|type:country_region:MY|display=title}}
{{DEFAULTSORT:Valaysia, Yn}}
{{bun}}
[[Ronney:Yn Valaysia| ]]
[[Ronney:Çheeraghyn yn Aishey]]
[[Ronney:Çheeraghyn-oltey ASEAN]]
[[Ronney:Çheeraghyn-oltey Reagheydys y Cho-obbraghey Islamagh]]
[[Ronney:Çheeraghyn-oltey ny h-Ashoonyn Unnaneysit]]
[[Ronney:Monarkaghtyn ayns Co-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn-oltey D-8]]
[[Ronney:Monarkaghtyn conastagh]]
[[Ronney:Çheeraghyn-oltey Cho-unnaneys ny h-Ashoonyn]]
[[Ronney:Çheeraghyn y G15]]
[[Ronney:Çheeraghyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1963]]
[[Ronney:Laaraghyn y Nah Chaggey Dowanagh]]
[[Ronney:Bunneeaghtyn 'sy Valaysia 'sy vlein 1963|*]]
[[Ronney:CPTPP]]
0htkunav9mlufe790ydc4ws7pdry85o
Clowan:Yn Aarkeylann
10
3033
395031
358097
2026-10-23T03:35:22Z
MacTire02
219
++
395031
wikitext
text/x-wiki
{{Navbox
| name = Yn Aarkeylann
| state = {{{state|autocollapse}}}
| bodyclass = hlist
| title = [[Rolley çheeraghyn as croghaneyn 'syn Austrail|Çheeraghyn as croghaneyn yn Aarkeylann]]
| group1 = Çheeraghyn
| list1 =
{{Navbox|child
| groupstyle = font-weight:normal;
| group1 = Slane
| list1 =
* [[Yn Austrail]]
* [[Yn Chiribati|y Chiribati]]
* [[Fiji]]
* [[Ellanyn Holomon]]
* [[Naoero]]
* [[Palau]]
* [[Papooey Guinea Noa]]
* [[Samoa]]
* [[Yn Teelynn Noa|y Teelynn Noa]]
* [[Yn Tongey|y Tongey]]
* [[Tuvalu]]
* [[Vanuatu]]
* [[Ellanyn Varshyl]]
* [[Steatyn Conastit y Vynneeys|y Vynneeys]]
| group2 = Ayrnyn
| list2 =
* [[Yn Çhillee|Y Çhillee]]
** [[Ellan y Chaisht]]
** [[Ellanyn Juan Fernández]]
* [[Ecuador]]
** [[Ellanyn ny Gallopaag]]
* [[Yn Indoneesh]]
** [[Papooey (queiggey)|Papooey]]
** [[Papooey Heear (queiggey)|Papooey Heear]]
** [[Papooey Sleitoil]]
** [[Papooey Veanagh]]
** [[Papooey Heear Yiass]]
** [[Papooey Yiass]]
* [[Ny Steatyn Unnaneysit]]
** [[Hawaii]]
** [[Ellan Corralagh Palmyra]]
}}
<!---group2 omitted to main alternating list backgrounds--->
| group3 = {{longitem|[[Co-steat]]yn}}
| list3 =
* [[Ellanyn Cook]]
* [[Niue]]
| group4 = {{longitem|Croghaneyn as thallooyn}}
| list4 =
{{Navbox|child
| groupstyle = font-weight:normal;
| evenodd = swap
| group1 = [[Yn Austrail]]
| list1 =
* [[Ellanyn Ashmore as Cartier]]
* [[Ellanyn Cocos (Keeling) Islands]]
* [[Ellan y Nollick]]
* [[Ellan Norfolk]]
* [[Ellanyn y Vooir Chorralagh]]
| group2 = [[Yn Rank|Y Rank]]
| list2 =
* [[Yn Chaladoan Noa|y Chaladoan Noa]]
* [[Ellan Clipperton]]
* [[Yn Pholaneesh Rangagh|y Pholaneesh Rangagh]]
* [[Wallis as Futuna]]
| group3 = [[Yn Reeriaght Unnaneysit|Y Reeriaght Unnaneysit]]
| list3 =
* [[Ellanyn Pitcairn]]
| group4 = [[Ny Steatyn Unnaneysit]]
| list4 =
* [[Samoa Americaanagh]]
* [[Ellan Baker]]
* [[Guam]]
* [[Ellan Howland]]
* [[Ellan Jarvis]]
* [[Ellan Corralagh Johnston]]
* [[Sker Kingman]]
* [[Ellan Corralagh Midway]]
* [[Ellanyn Mariana Hwoaie]]
* [[Ellan Wake]]
| group5 = [[Yn Teelynn Noa|Y Teelynn Noa]]
| list5 =
* [[Tokelau]]
}}
| below =
* [[Thallooyn Harrish Mooir Goaldagh]]
* [[Yn Rank Harrish Mooir|Y Rank Harrish Mooir]]
** [[Co-chadjinys harrish mooir]]
** [[Çheer harrish mooir y Rank]]
* [[Rheaym y Teelynn Noa]]
** [[Staydys politickagh Ellanyn Cook as Niue]]
* [[Steatyn as thallooyn yn Austrail]]
** [[Thallooyn Austrailagh y Cheayn Injinagh]]
* [[Thallooyn ny Steatyn Unnaneysit]]
** [[Co-unnaneys (ard ellanyn ny Steatyn Unnaneysit)]]
** [[Ard ellanagh]]
** [[Ellanyn Beggey Foddey Ersooyl ny Steatyn Unnaneysit]]
}}<noinclude>
{{documentation}}
<!---Please add metadata to the <includeonly> section at the bottom of the /doc subpage-->
</noinclude>
dei1imb72wkgfgc50wuk0r49xkotfyc
Ellan y Nollick
0
14641
395028
366148
2026-10-23T03:06:27Z
MacTire02
219
++
395028
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Thalloo Ellan y Nollick
|ennym_foddey_cadjincliaghtagh= {{small|{{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn cadjin)''}}
| en = {{lang|en|Territory of Christmas Island|italics=no}}
| zh = {{lang|zh|聖誕島領地|italics=no}}
| ms = {{lang|ms|Wilayah Pulau Krismas|italics=no}}
}}
}}
|ennym_gienneydagh = Ellan y Nollick
|sorçh_croghane = [[Thallooyn Austrailagh y Cheayn Injinagh|Thalloo Austrailagh y Cheayn Injinagh]]<br />[[Steatyn as thallooyn yn Austrail|Thalloo Vooie yn Austrail]]
|jalloo_brattagh = Flag of Christmas Island.svg
|jalloo_cleinney = none
|jalloo_caslys = Australia_on_the_globe_(Christmas_Island_special)_(Southeast_Asia_centered).svg
|fo-heidyl_caslys = Soiaghey Ellan y Nollick (y kiarkyl jiarg) as soiaghey vooar-heer yn Austrail (y vooar-rheynn ayns jiarg)
|jarroo-raa = none
|arrane_ashoonagh = {{lang|en|[[Advance Australia Fair]]|italics=no}}
|çhengey_arrane_ashoonagh = Baarle
|çhyndaa_arrane_ashoonagh = Er Oaie, yn Austrail Aalin
|coadan_arrane_ashoonagh = U.S. Navy Band, Advance Australia Fair (instrumental).ogg
|çhengaghyn = {{hlist|[[Baarle]]|[[Malayish]]|[[Sheenish Chadjinit|Mandarin]]|[[Cantoanish]]|[[Hokkienish]]}}
|sorçh_çhengaghyn = Çhengaghyn cadjin
|çhengaghyn_oikoil = none
|preeu-valley = [[Flying Fish Cove]]
|latd=10|latm=25|latNS=S |longd=105|longm=41|longEW=E |latNSgael=Yiass |longEWgael=Hiar
|balley_smoo = preeu-valley
|sorçh_reiltys = Croghane fo [[reirey jeeragh]]
|taghyrt_bunneeaght1 = Goit lesh y [[Yn Reeriaght Unnaneysit|Reeriaght Unnaneysit]]
|date_bunneeaght1 = 6 Mean Souree 1888
|taghyrt_bunneeaght2 = Scughit veih Singapore dys yn Austrail
|date_bunneeaght2 = 1 Jerrey Fouyir 1958
|traa_ynnydagh = [[Traa Ellan y Nollick|CXT]]
|ashchur_utc = +07:00
|cctld = [[.cx]]
|coad_çhellvane = 61
}}
She thalloo [[yn Austrail]] 'sy [[Yn Keayn Injinagh|Cheayn Injinagh]] ee '''Thalloo Ellan y Nollick''' ({{langx|en|Territory of Christmas Island}}). T'ee ny soie 2,600 km heear hwoaie veih'n chaayr Austrailagh [[Perth]].
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{Yn Faarkeylann}}
{{Steatyn as thallooyn yn Austrail}}
{{bun}}
{{DEFAULTSORT:Nollick}}
[[Ronney:Ellan y Nollick| ]]
[[Ronney:Çheeraghyn ellanagh 'sy Cheayn Injinagh]]
[[Ronney:Ellanyn yn Austrail]]
[[Ronney:Ellanyn yn Aishey Hiar Yiass]]
[[Ronney:Ardjyn Ushagyn Scanshoil Hallooyn Mooie yn Austrail]]
[[Ronney:Reirey Goaldagh ayns Singapore]]
[[Ronney:Yn Valay Ghoaldagh car y Nah Chaggey Dowanagh|.]]
[[Ronney:Steatyn as thallooyn yn Austrail]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1957]]
[[Ronney:Bunneeaghtyn 'syn Austrail 'sy vlein 1957]]
[[Ronney:Ardjyn Ushagyn Scanshoil ayns ellanyn y Cheayn Injinagh]]
[[Ronney:Ardjyn Ushagyn Dooie]]
[[Ronney:Ellanyn pryssoonagh]]
jsr33r0w1l6hr1z149uf1bxr5nfxowl
Ellanyn Cocos (Keeling)
0
14935
395024
366150
2026-10-23T02:40:25Z
MacTire02
219
++
395024
wikitext
text/x-wiki
{{Kishtey fys çheer
|ennym = Thalloo Ellanyn Cocos (Keeling)
|ennym_foddey_cadjincliaghtagh= {{small|{{Name in various languages
| name = {{nobold|''(ayns ny çhengaghyn cadjin)''}}
| en = {{lang|en|Territory of Cocos (Keeling) Islands|italics=no}}
| coa = {{lang|coa|Pulu Kokos (Keeling)|italics=no}}
| ms = {{lang|ms|Wilayah Kepulauan Cocos (Keeling)|italics=no}}
}}
}}
|ennym_gienneydagh = Ellanyn Cocos (Keeling)
|sorçh_croghane = [[Thallooyn Austrailagh y Cheayn Injinagh|Thalloo Austrailagh y Cheayn Injinagh]]<br />[[Steatyn as thallooyn yn Austrail|Thalloo Vooie yn Austrail]]
|jalloo_brattagh = none
|jalloo_cleinney = none
|jalloo_caslys = Australia_on_the_globe_(Cocos_(Keeling)_Islands_special)_(Southeast_Asia_centered).svg
|fo-heidyl_caslys = Soiaghey Ellanyn Cocos (Keeling) (y kiarkyl jiarg) as soiaghey vooar-heer yn Austrail (y vooar-rheynn ayns jiarg)
|jarroo-raa = {{lang|coa|Maju Pulu Kita}}
|çhengey_jarroo-raa = Malayish Ellanyn Cocos
|çhyndaa_jarroo-raa = Er Oaie, yn Ellan Ain
|arrane_ashoonagh = {{lang|en|[[Advance Australia Fair]]|italics=no}}
|çhengey_arrane_ashoonagh = Baarle
|çhyndaa_arrane_ashoonagh = Er Oaie, yn Austrail Aalin
|coadan_arrane_ashoonagh = U.S. Navy Band, Advance Australia Fair (instrumental).ogg
|çhengaghyn_oikoil = none
|çhengaghyn = {{hlist|[[Malayish Ellanyn Cocos|Malayish]]|[[Baarle]]{{efn|Cha nel staydys ''[[de jure]]'' ec y Vaarle ayns Ellanyn Cocos (Keeling) as 'syn Austrail, agh she çhengey eddyr-insh ''[[de facto]]'' t'ee 'sy reiltys.}}}}
|preeu-valley = [[West Island, Cocos (Keeling) Islands|West Island]]
|balley_smoo = [[Bantam, Ellanyn Cocos (Keeling)|Bantam]]
|latd=12 |latm=11 |lats=13 |latNS=S |longd=96 |longm=49 |longs=42 |longEW=E
|balley_smoo = [[Bantam, Cocos (Keeling) Islands|Bantam]]
|sorçh_reiltys = Croghane fo [[reirey jeeragh]]
|taghyrt1_bunnit = Goit stiagh lesh y [[Yn Reeriaght Unnaneysit|Reeriaght Unnaneysit]]
|date1_bunnit = 1857
|taghyrt2_bunnit = Scughit veih [[Coloin Singapore|Singapore]] dys yn Austrail
|date2_bunnit = 23 Mee Houney 1955
|ashchur_utc = +06:30
|cctld = [[.cc]]
|coad_çhellvane = 61891
}}
She [[Steatyn as thallooyn yn Austrail|thalloo]] [[Yn Austrail|Austrailagh]] 'sy [[Yn Keayn Injinagh|Cheayn Injinagh]] '''Thalloo Ellanyn Cocos (Keeling)''' ({{langx|en|Territory of Cocos (Keeling) Islands}}) ny '''Ellanyn Cocos''' as '''Ellanyn Keeling'''. T'ad nyn soie çheu heear yiass veih [[Ellan ny Nollick]] mygeayrt lieh-vollagh eddyr yn Austrail as [[Sri Lanka]]. Ta'n thalloo jeant seose jeh daa [[atoll]] as shiaght [[ellan chorralagh|ellanyn corralagh]] as feed. Ta 600 deiney cummal er daa ellan chorralagh, [[West Island, Ellanyn Cocos (Keeling)|West Island]] ("Yn Ellan Heear") as [[Home Island, Ellanyn Cocos (Keeling)|Home Island]] ("Yn Ellan Thie").
==Noteyn==
{{notelist}}
==Imraaghyn==
{{reflist}}
{{Yn Aishey}}
{{Yn Faarkeylann}}
{{Steatyn as thallooyn ny h-Austrail}}
{{gurneil eaghtyrys}}
{{DEFAULTSORT:Cocos}}
{{bun}}
[[Ronney:Ellan Cocos (Keeling)| ]]
[[Ronney:Bunneeaghtyn 'syn Aishey 'sy vlein 1955]]
[[Ronney:Bunneeaghtyn 'syn Austrail 'sy vlein 1955]]
[[Ronney:Ellanree yn Austrail]]
[[Ronney:Ellanree 'sy Cheayn Injinagh]]
[[ROnney:Yn Valay Ghoaldagh car y Nah Chaggey Dowanagh|.]]
[[Ronney:Reirey Goaldagh ayns Singapore]]
[[Ronney:Çheeraghyn ellanagh 'sy Cheayn Injinagh]]
[[Ronney:Ellanyn yn Aishey Hiar Yiass]]
[[Ronney:Steatyn as thallooyn bunnit 'sy vlein 1955]]
[[Ronney:Steatyn as thallooyn yn Austrail]]
{{Coord|12|07|03|S|96|53|42|E|region:CC|display=title}}
0rnnsa8d8vajin6uggbemddq092nypd
Module:Wd/i18n
828
20742
395026
394976
2026-10-23T02:43:26Z
MacTire02
219
++
395026
Scribunto
text/plain
local p = {}
function p.init(aliasesP)
p = {
["version"] = "11", -- increment this each time the below parameters are changed to avoid reference conflict errors
["errors"] = {
["unknown-data-type"] = "Unknown or unsupported datatype '%s'.",
["missing-required-parameter"] = "No required parameters defined, needing at least one",
["extra-required-parameter"] = "Parameter '%s' 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 "%s" does not exist', -- equal to the standard module error message
["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist',
-- Parts of the error message signalling a malformed reference.
["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n",
["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]",
["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n",
["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.',
["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.'
},
["info"] = {
["edit-on-wikidata"] = "Reagh eh shoh er Wikidata"
},
["numeric"] = {
["decimal-mark"] = ".",
["delimiter"] = ","
},
["datetime"] = {
["prefixes"] = {
["decade-period"] = ""
},
["suffixes"] = {
["decade-period"] = "yn",
["millennium"] = " milley bleeaney",
["century"] = " eash",
["million-years"] = " millioonyn dy vleeantyn",
["billion-years"] = " biloonyn dy vleeantyn",
["year"] = " blein",
["years"] = " bleintyn"
},
["julian-calendar"] = "feaillere Yool", -- linked page title
["julian"] = "Joolagh",
["BCE"] = "REC",
["CE"] = "EC",
["common-era"] = "Eash Chadjin" -- linked page title
},
["coord"] = {
["latitude-north"] = "N",
["latitude-south"] = "S",
["longitude-east"] = "E",
["longitude-west"] = "W",
["degrees"] = "°",
["minutes"] = "'",
["seconds"] = '"',
["separator"] = ", "
},
["values"] = {
["unknown"] = "gyn fys",
["none"] = "leagh erbee"
},
["cite"] = {
["output-types"] = {"web", "q"}, -- In this order, the output types will be tried
["param-mapping"] = {
["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",
-- "work available at URL" (P953): the full text online. Used as the url when the
-- reference has no reference URL (P854); P854 wins when both are present
-- (see the prioritization of "url" below). Left unmapped, it caused the
-- "unknown-property-in-ref" error on the Cocos (Keeling) Islands population reference.
[aliasesP.fullWorkURL] = "url",
[aliasesP.publicationDate] = "date",
[aliasesP.lastUpdate] = "date",
[aliasesP.retrieved] = "access-date",
[aliasesP.title] = "title",
[aliasesP.subjectNamedAs] = "title",
[aliasesP.archiveURL] = "archive-url",
[aliasesP.archiveDate] = "archive-date",
[aliasesP.language] = "language",
[aliasesP.author] = "author",
[aliasesP.authorNameString] = "author",
[aliasesP.publisher] = "publisher",
[aliasesP.quote] = "quote",
[aliasesP.pages] = "pages", -- extra option
[aliasesP.publishedIn] = "website",
[aliasesP.sectionVerseOrParagraph] = "at",
-- "editor" (P98) -- on web sources Wikidata often records the organisation
-- that runs the site this way (e.g. Oanda Corporation on a currency page),
-- so it is shown as the publisher rather than as a "(ed.)". Left unmapped,
-- it made Module:Wd throw the "unknown-property-in-ref" error on the
-- Philippine peso references. If a reference has both a publisher (P123)
-- and an editor, the publisher is used (first value wins).
[aliasesP.editor] = "publisher",
-- "native label" (P1705) -- e.g. a source's own name in its native
-- language, as opposed to the translated/English "title" -- has no
-- confirmed equivalent parameter on gv.wiki's {{Cite web}} yet. Left
-- unmapped before this fix, it made Module:Wd throw the
-- "unknown-property-in-ref" error shown live on the Mali HDI
-- reference ("lipaid dooghyssagh (P1705) ... not assigned to any
-- parameter"). Mapped to "" (silently skipped, per this table's own
-- documented convention above) rather than guessed at a parameter
-- name -- flag to Ben if {{Cite web}} turns out to have a native-name/
-- script-title-equivalent slot, and this can point there instead.
[aliasesP.nativeLabel] = ""
},
["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.lastUpdate] = "date",
[aliasesP.retrieved] = "access-date",
-- "language of work or name" (P407) and "editor" (P98) have no confirmed
-- equivalent parameter on {{Cite Q}} either; mapped to "" (silently skipped)
-- so a reference carrying them no longer fails here once "web" has failed
-- for some other reason (the Philippine peso reference's second, {{Cite Q}}
-- failure on P407).
[aliasesP.language] = "",
[aliasesP.editor] = "",
-- "reference URL" (P854) has no confirmed equivalent parameter on
-- gv.wiki's {{Cite Q}} yet -- {{Cite Q}} cites a Wikidata item (via
-- "1") rather than a web page, so it may genuinely have no url slot.
-- Left unmapped before this fix, it made Module:Wd throw the same
-- "unknown-property-in-ref" error for any reference whose only
-- remaining property is a reference URL once "web" has already failed
-- (the Mali HDI reference's second, {{Cite Q}} failure in the same
-- screenshot). Mapped to "" (silently skipped) rather than guessed at
-- a parameter name -- flag to Ben if {{Cite Q}} turns out to support a
-- url override, and this can point there instead.
[aliasesP.referenceURL] = "",
-- "work available at URL" (P953), "archive URL" (P1065) and "archive date" (P2960)
-- have no confirmed {{Cite Q}} equivalents either; skipped silently so a reference
-- carrying them no longer errors here once "web" has failed for another reason
-- (the Cocos (Keeling) Islands reference's second failure, on P2960).
[aliasesP.fullWorkURL] = "",
[aliasesP.archiveURL] = "",
[aliasesP.archiveDate] = ""
}
},
["config"] = {
-- supported fields:
-- - template: name of the template used for output
-- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2)
-- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true)
-- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params)
-- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters;
-- properties not mentioned here have the lowest priority;
-- prioritization of properties handled through additionalProcessedProperties is unsupported;
-- no key of this table can be from numbered-params
-- Leaving out the "template" field causes the output type to be ignored.
["web"] = {
["template"] = "Cite web",
["numbered-params"] = {"author"},
["mandatory-params"] = {"url", "title"},
["prioritization"] = {
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate},
["title"] = {aliasesP.title, aliasesP.subjectNamedAs},
["url"] = {aliasesP.referenceURL, aliasesP.fullWorkURL}
}
},
["q"] = {
["template"] = "Cite Q",
["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited
["mandatory-params"] = {"1"},
["prioritization"] = {
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}
}
}
}
}
}
p.getOrdinalSuffix = function(num)
if tostring(num):sub(-2,-2) == '1' then
return "oo" -- 10oo, 11oo, 12oo, 13oo, ... 19oo
end
num = tostring(num):sub(-1)
if num == '1' then
return "d"
elseif num == '2' then
return "h"
elseif num == '3' then
return "oo"
else
return "oo"
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
oze3jlw3nllje5i2aahf6zdr6r2c9gm
395030
395026
2026-10-23T03:11:21Z
MacTire02
219
++
395030
Scribunto
text/plain
local p = {}
function p.init(aliasesP)
p = {
["version"] = "12", -- increment this each time the below parameters are changed to avoid reference conflict errors
["errors"] = {
["unknown-data-type"] = "Unknown or unsupported datatype '%s'.",
["missing-required-parameter"] = "No required parameters defined, needing at least one",
["extra-required-parameter"] = "Parameter '%s' 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 "%s" does not exist', -- equal to the standard module error message
["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist',
-- Parts of the error message signalling a malformed reference.
["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n",
["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]",
["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n",
["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.',
["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.'
},
["info"] = {
["edit-on-wikidata"] = "Reagh eh shoh er Wikidata"
},
["numeric"] = {
["decimal-mark"] = ".",
["delimiter"] = ","
},
["datetime"] = {
["prefixes"] = {
["decade-period"] = ""
},
["suffixes"] = {
["decade-period"] = "yn",
["millennium"] = " milley bleeaney",
["century"] = " eash",
["million-years"] = " millioonyn dy vleeantyn",
["billion-years"] = " biloonyn dy vleeantyn",
["year"] = " blein",
["years"] = " bleintyn"
},
["julian-calendar"] = "feaillere Yool", -- linked page title
["julian"] = "Joolagh",
["BCE"] = "REC",
["CE"] = "EC",
["common-era"] = "Eash Chadjin" -- linked page title
},
["coord"] = {
["latitude-north"] = "N",
["latitude-south"] = "S",
["longitude-east"] = "E",
["longitude-west"] = "W",
["degrees"] = "°",
["minutes"] = "'",
["seconds"] = '"',
["separator"] = ", "
},
["values"] = {
["unknown"] = "gyn fys",
["none"] = "leagh erbee"
},
["cite"] = {
["output-types"] = {"web", "q"}, -- In this order, the output types will be tried
["param-mapping"] = {
["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",
-- "work available at URL" (P953): the full text online. Used as the url when the
-- reference has no reference URL (P854); P854 wins when both are present
-- (see the prioritization of "url" below). Left unmapped, it caused the
-- "unknown-property-in-ref" error on the Cocos (Keeling) Islands population reference.
[aliasesP.fullWorkURL] = "url",
-- Database IDs (any property of datatype "external-id", e.g. P4093/P10112) are shown as
-- "<property label> <ID>" in {{Cite web}}'s id parameter. A reference with nothing but
-- such IDs falls back to plain text in Module:Wd itself.
["external-id"] = "id",
[aliasesP.publicationDate] = "date",
[aliasesP.lastUpdate] = "date",
[aliasesP.retrieved] = "access-date",
[aliasesP.title] = "title",
[aliasesP.subjectNamedAs] = "title",
[aliasesP.archiveURL] = "archive-url",
[aliasesP.archiveDate] = "archive-date",
[aliasesP.language] = "language",
[aliasesP.author] = "author",
[aliasesP.authorNameString] = "author",
[aliasesP.publisher] = "publisher",
[aliasesP.quote] = "quote",
[aliasesP.pages] = "pages", -- extra option
[aliasesP.publishedIn] = "website",
[aliasesP.sectionVerseOrParagraph] = "at",
-- "editor" (P98) -- on web sources Wikidata often records the organisation
-- that runs the site this way (e.g. Oanda Corporation on a currency page),
-- so it is shown as the publisher rather than as a "(ed.)". Left unmapped,
-- it made Module:Wd throw the "unknown-property-in-ref" error on the
-- Philippine peso references. If a reference has both a publisher (P123)
-- and an editor, the publisher is used (first value wins).
[aliasesP.editor] = "publisher",
-- "native label" (P1705) -- e.g. a source's own name in its native
-- language, as opposed to the translated/English "title" -- has no
-- confirmed equivalent parameter on gv.wiki's {{Cite web}} yet. Left
-- unmapped before this fix, it made Module:Wd throw the
-- "unknown-property-in-ref" error shown live on the Mali HDI
-- reference ("lipaid dooghyssagh (P1705) ... not assigned to any
-- parameter"). Mapped to "" (silently skipped, per this table's own
-- documented convention above) rather than guessed at a parameter
-- name -- flag to Ben if {{Cite web}} turns out to have a native-name/
-- script-title-equivalent slot, and this can point there instead.
[aliasesP.nativeLabel] = ""
},
["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.lastUpdate] = "date",
[aliasesP.retrieved] = "access-date",
-- "language of work or name" (P407) and "editor" (P98) have no confirmed
-- equivalent parameter on {{Cite Q}} either; mapped to "" (silently skipped)
-- so a reference carrying them no longer fails here once "web" has failed
-- for some other reason (the Philippine peso reference's second, {{Cite Q}}
-- failure on P407).
[aliasesP.language] = "",
[aliasesP.editor] = "",
-- "reference URL" (P854) has no confirmed equivalent parameter on
-- gv.wiki's {{Cite Q}} yet -- {{Cite Q}} cites a Wikidata item (via
-- "1") rather than a web page, so it may genuinely have no url slot.
-- Left unmapped before this fix, it made Module:Wd throw the same
-- "unknown-property-in-ref" error for any reference whose only
-- remaining property is a reference URL once "web" has already failed
-- (the Mali HDI reference's second, {{Cite Q}} failure in the same
-- screenshot). Mapped to "" (silently skipped) rather than guessed at
-- a parameter name -- flag to Ben if {{Cite Q}} turns out to support a
-- url override, and this can point there instead.
[aliasesP.referenceURL] = "",
-- "work available at URL" (P953), "archive URL" (P1065) and "archive date" (P2960)
-- have no confirmed {{Cite Q}} equivalents either; skipped silently so a reference
-- carrying them no longer errors here once "web" has failed for another reason
-- (the Cocos (Keeling) Islands reference's second failure, on P2960).
[aliasesP.publishedIn] = "",
[aliasesP.fullWorkURL] = "",
[aliasesP.archiveURL] = "",
[aliasesP.archiveDate] = ""
}
},
["config"] = {
-- supported fields:
-- - template: name of the template used for output
-- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2)
-- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true)
-- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params)
-- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters;
-- properties not mentioned here have the lowest priority;
-- prioritization of properties handled through additionalProcessedProperties is unsupported;
-- no key of this table can be from numbered-params
-- Leaving out the "template" field causes the output type to be ignored.
["web"] = {
["template"] = "Cite web",
["numbered-params"] = {"author"},
["mandatory-params"] = {"url", "title"},
["prioritization"] = {
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate},
["title"] = {aliasesP.title, aliasesP.subjectNamedAs},
["url"] = {aliasesP.referenceURL, aliasesP.fullWorkURL}
}
},
["q"] = {
["template"] = "Cite Q",
["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited
["mandatory-params"] = {"1"},
["prioritization"] = {
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}
}
}
}
}
}
p.getOrdinalSuffix = function(num)
if tostring(num):sub(-2,-2) == '1' then
return "oo" -- 10oo, 11oo, 12oo, 13oo, ... 19oo
end
num = tostring(num):sub(-1)
if num == '1' then
return "d"
elseif num == '2' then
return "h"
elseif num == '3' then
return "oo"
else
return "oo"
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
2b0d1utx8iec23txdcf8jasubqr1g48
Module:Wd
828
20744
395025
394975
2026-10-23T02:42:55Z
MacTire02
219
++
395025
Scribunto
text/plain
require("strict")
local p = {}
local module_arg = ...
local i18n
local i18nPath
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 = module_arg
end
if not i18n then
i18nPath = title .. "/i18n"
i18n = require(i18nPath).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",
globalSiteId = "globalSiteId"
}
local aliasesP = {
coord = "P625",
-----------------------
image = "P18",
author = "P50",
authorNameString = "P2093",
editor = "P98",
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",
fullWorkURL = "P953",
nativeLabel = "P1705",
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",
lastUpdate = "P5017"
}
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, ...)
local text = i18n["errors"][code]
if not text then
return "Missing i18n error key: " .. tostring(code)
end
if arg then text = mw.ustring.format(text, unpack(arg)) end
return text
end
local function throwError(errorMessage, ...)
error(errorText(errorMessage, unpack(arg)))
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 function isValueInTable(searchedItem, inputTable)
for _, item in pairs(inputTable) do
if item == searchedItem then
return true
end
end
return false
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.getLabel(id)
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 = " "
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 = "[[File: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 "[[File:" .. 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.."¶ms="..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 citeParamMapping = i18n['cite']['param-mapping']
local citeConfig = i18n['cite']['config']
local citeTypes = i18n['cite']['output-types']
-- will hold rendered properties of the reference which are not directly from statement.snaks,
-- Namely, is URL generated from an external ID.
local additionalProcessedProperties = {}
-- for each citation type, there will be an associative array that associates lists of rendered properties
-- to citation-template parameters
local candidateParams = {}
-- like above, but only associates one rendered property to each parameter; if the above variable
-- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1")
local citeParams = {}
local citeErrors = {}
local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved
local version = 12 -- increment this each time the below logic is changed to avoid conflict errors
if not statement.snaks then
return {}
end
-- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia)
if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then
return {}
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 "ISO 3166-1 numeric code" - not a citable field, just metadata about the source's location
if statement.snaks["P299"] then
statement.snaks["P299"] = nil
end
-- if "retrieved" (access-date) is the only remaining property, this reference has no
-- actual source information (no URL, no stated-in, no title) and cannot be meaningfully
-- cited; skip it silently rather than showing an error
do
local onlyRetrieved = true
local hasAny = false
for snakProperty in pairs(statement.snaks) do
hasAny = true
if snakProperty ~= aliasesP.retrieved then
onlyRetrieved = false
break
end
end
if hasAny and onlyRetrieved then
return {}
end
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 link from it and use the link in the reference
-- find the "Wikidata property" properties in the item from "stated in"
local 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
local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked
if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets.
-- the link is in wiki markup, so strip the square brackets and the display text
-- gsub also returns another, discarted value, therefore the result is assigned to tempLink first
tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1")
additionalProcessedProperties[aliasesP.referenceURL] = {tempLink}
statement.snaks[wikidataPropertyOfSource] = nil
break
end
end
end
end
-- initialize candidateParams and citeParams
for _, citeType in ipairs(citeTypes) do
candidateParams[citeType] = {}
citeParams[citeType] = {}
end
-- fill candidateParams
for _, citeType in ipairs(citeTypes) do
-- This will contain value--priority pairs for each param name.
local candidateValuesAndPriorities = {}
-- fill candidateValuesAndPriorities
for refProperty in pairs(statement.snaks) do
if citeErrors[citeType] then
break
end
repeat -- just a simple wrapper to emulate "continue"
-- set mappingKey and prefix
local mappingKey
local prefix = ""
if statement.snaks[refProperty][1].datatype == 'external-id' then
mappingKey = "external-id"
prefix = self.conf:getLabel(refProperty)
if prefix ~= "" then
prefix = prefix .. " "
end
else
mappingKey = refProperty
end
local paramName = citeParamMapping[citeType][mappingKey]
-- skip properties with empty parameter name
if paramName == "" then
break -- skip this property for this value of citeType
end
-- handle unknown properties in the reference
if not paramName then
referenceEmpty = false
local error_message = errorText("unknown-property-in-ref", refProperty)
assert(error_message) -- Should not be nil
citeErrors[citeType] = error_message
break
end
-- set processedProperty
local processedProperty
local raw = false -- if the value is wanted raw
if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then
raw = true
end
if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then
-- Multiple values may be given.
processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true
else
-- If multiple values are given, all but the first suitable one are discarted.
processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true
end
if #processedProperty == 0 then
break
end
referenceEmpty = false
-- add an empty entry to candidateValuesAndPriorities, if there isn't one already
if not candidateValuesAndPriorities[paramName] then
candidateValuesAndPriorities[paramName] = {}
end
-- find the priority of refProperty
local thisPropertyPriority = -1
local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName]
if thisParamPrioritization then
for i_priority, i_property in ipairs(thisParamPrioritization) do
if i_property == refProperty then
thisPropertyPriority = i_priority
end
end
end
for _, propertyValue in pairs(processedProperty) do
table.insert(
candidateValuesAndPriorities[paramName],
{prefix .. propertyValue, thisPropertyPriority}
)
end
until true
end
-- fill candidateParams[citeType]
if not citeErrors[citeType] then
local compareValuePriorities = function(pair1, pair2)
if pair1[2] == -1 and pair2[2] ~= -1 then
return false
end
if pair1[2] ~= -1 and pair2[2] == -1 then
return true
end
return pair1[2] < pair2[2]
end
-- fill candidateParams[citeType][paramName] for each used param
for paramName, _ in pairs(candidateValuesAndPriorities) do
table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities)
candidateParams[citeType][paramName] = {}
for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do
table.insert(candidateParams[citeType][paramName], valuePriorityPair[1])
end
end
end
end
-- handle additional properties
for refProperty in pairs(additionalProcessedProperties) do
for _, citeType in ipairs(citeTypes) do
repeat
-- skip if there already have been errors
if citeErrors[citeType] then
break
end
local paramName = citeParamMapping[citeType][refProperty]
-- handle unknown properties in the reference
if not paramName then
-- Skip this additional property, but do not cause an error.
break
end
if paramName == "" then
break
end
referenceEmpty = false
if not candidateParams[citeType][paramName] then
candidateParams[citeType][paramName] = {}
end
for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do
table.insert(candidateParams[citeType][paramName], propertyValue)
end
until true
end
end
-- fill citeParams
for _, citeType in ipairs(citeTypes) do
for paramName, paramValues in pairs(candidateParams[citeType]) do
if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then
citeParams[citeType][paramName] = paramValues[1]
else
-- There is more than one value for this parameter - the values will
-- go into separate numbered parameters (e.g. "author1", "author2")
for paramNum, paramValue in pairs(paramValues) do
citeParams[citeType][paramName .. paramNum] = paramValue
end
end
end
end
-- archive-only references: recover the original URL (and archive date) from the archive link
for _, citeType in ipairs(citeTypes) do
local urlParam = citeParamMapping[citeType][aliasesP.referenceURL]
local archiveUrlParam = citeParamMapping[citeType][aliasesP.archiveURL]
local archiveDateParam = citeParamMapping[citeType][aliasesP.archiveDate]
local cp = citeParams[citeType]
if urlParam and urlParam ~= "" and archiveUrlParam and archiveUrlParam ~= ""
and not cp[urlParam] and cp[archiveUrlParam] then
local archiveUrl = cp[archiveUrlParam]
local stamp, original = mw.ustring.match(archiveUrl, "^https?://web%.archive%.org/web/(%d+)[%a_]*/(https?://.+)$")
if not original then
stamp, original = mw.ustring.match(archiveUrl, "^https?://archive%.[a-z]+/(%d+)/(https?://.+)$")
end
cp[urlParam] = original or archiveUrl
if stamp and archiveDateParam and archiveDateParam ~= "" and not cp[archiveDateParam] and #stamp >= 8 then
cp[archiveDateParam] = stamp:sub(1,4) .. "-" .. stamp:sub(5,6) .. "-" .. stamp:sub(7,8)
end
end
end
-- fallback: use "stated in" (P248) as title if "title" (P1476) is missing;
-- if neither is present, fall back to the reference URL's domain name
for _, citeType in ipairs(citeTypes) do
local titleParam = citeParamMapping[citeType][aliasesP.title]
local urlParam = citeParamMapping[citeType][aliasesP.referenceURL]
if titleParam and not citeParams[citeType][titleParam] then
if statement.snaks[aliasesP.statedIn] then
local fallbackTitle = self:getReferenceDetail(
statement.snaks,
aliasesP.statedIn,
false,
false
)
if fallbackTitle and fallbackTitle ~= "" then
citeParams[citeType][titleParam] = fallbackTitle
end
end
-- still nothing? try the URL's domain as a last resort
if not citeParams[citeType][titleParam] and urlParam and citeParams[citeType][urlParam] then
local domain = mw.ustring.match(citeParams[citeType][urlParam], "^%a+://([^/]+)")
if domain then
citeParams[citeType][titleParam] = domain
end
end
end
end
-- handle missing mandatory parameters for the templates
for _, citeType in ipairs(citeTypes) do
for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do
if not citeParams[citeType][requiredCiteParam] then -- The required param is not present.
if citeErrors[citeType] then -- Do not override the previous error, if it exists.
break
end
local error_message = errorText("missing-mandatory-param", requiredCiteParam)
assert(error_message) -- Should not be nil
citeErrors[citeType] = error_message
end
end
end
local citeTypeToUse = nil
-- choose the output template
for _, citeType in ipairs(citeTypes) do
if not citeErrors[citeType] then
citeTypeToUse = citeType
break
end
end
-- set refContent
local refContent = ""
if citeTypeToUse then
local templateToUse = citeConfig[citeTypeToUse]["template"]
local paramsToUse = citeParams[citeTypeToUse]
if not templateToUse or templateToUse == "" then
throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse)
end
-- 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(paramsToUse) do
refContent = refContent .. "|" .. i .. "=" .. v
end
refContent = "{{" .. templateToUse .. refContent .. "}}"
else
xpcall(
function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end,
function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end
)
end
-- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error.
elseif not referenceEmpty then
refContent = errorText("malformed-reference-header")
for _, citeType in ipairs(citeTypes) do
refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType])
end
refContent = refContent .. errorText("malformed-reference-footer")
end
-- wrap refContent
local ref = {}
if refContent ~= "" then
ref = {refContent}
if not self.rawValue then
-- this should become a <ref> tag, so save the reference's hash for later
ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version)
end
return {ref}
else
return {}
end
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)
-- 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
local 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, globalSiteId)
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, globalSiteId) 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], false, args[p.args.globalSiteId])
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, args[p.args.globalSiteId])
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
apldrp4qwqouxppetqb8j6x5quwqfrt
395029
395025
2026-10-23T03:10:52Z
MacTire02
219
++
395029
Scribunto
text/plain
require("strict")
local p = {}
local module_arg = ...
local i18n
local i18nPath
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 = module_arg
end
if not i18n then
i18nPath = title .. "/i18n"
i18n = require(i18nPath).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",
globalSiteId = "globalSiteId"
}
local aliasesP = {
coord = "P625",
-----------------------
image = "P18",
author = "P50",
authorNameString = "P2093",
editor = "P98",
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",
fullWorkURL = "P953",
nativeLabel = "P1705",
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",
lastUpdate = "P5017"
}
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, ...)
local text = i18n["errors"][code]
if not text then
return "Missing i18n error key: " .. tostring(code)
end
if arg then text = mw.ustring.format(text, unpack(arg)) end
return text
end
local function throwError(errorMessage, ...)
error(errorText(errorMessage, unpack(arg)))
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 function isValueInTable(searchedItem, inputTable)
for _, item in pairs(inputTable) do
if item == searchedItem then
return true
end
end
return false
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.getLabel(id)
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 = " "
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 = "[[File: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 "[[File:" .. 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.."¶ms="..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 citeParamMapping = i18n['cite']['param-mapping']
local citeConfig = i18n['cite']['config']
local citeTypes = i18n['cite']['output-types']
-- will hold rendered properties of the reference which are not directly from statement.snaks,
-- Namely, is URL generated from an external ID.
local additionalProcessedProperties = {}
-- for each citation type, there will be an associative array that associates lists of rendered properties
-- to citation-template parameters
local candidateParams = {}
-- like above, but only associates one rendered property to each parameter; if the above variable
-- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1")
local citeParams = {}
local citeErrors = {}
local unknownPropertyFailed = {} -- citeType -> true when it failed on a property it has no mapping for
local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved
local version = 13 -- increment this each time the below logic is changed to avoid conflict errors
if not statement.snaks then
return {}
end
-- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia)
if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then
return {}
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 "ISO 3166-1 numeric code" - not a citable field, just metadata about the source's location
if statement.snaks["P299"] then
statement.snaks["P299"] = nil
end
-- if "retrieved" (access-date) is the only remaining property, this reference has no
-- actual source information (no URL, no stated-in, no title) and cannot be meaningfully
-- cited; skip it silently rather than showing an error
do
local onlyRetrieved = true
local hasAny = false
for snakProperty in pairs(statement.snaks) do
hasAny = true
if snakProperty ~= aliasesP.retrieved then
onlyRetrieved = false
break
end
end
if hasAny and onlyRetrieved then
return {}
end
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 link from it and use the link in the reference
-- find the "Wikidata property" properties in the item from "stated in"
local 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
local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked
if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets.
-- the link is in wiki markup, so strip the square brackets and the display text
-- gsub also returns another, discarted value, therefore the result is assigned to tempLink first
tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1")
additionalProcessedProperties[aliasesP.referenceURL] = {tempLink}
statement.snaks[wikidataPropertyOfSource] = nil
break
end
end
end
end
-- initialize candidateParams and citeParams
for _, citeType in ipairs(citeTypes) do
candidateParams[citeType] = {}
citeParams[citeType] = {}
end
-- fill candidateParams
for _, citeType in ipairs(citeTypes) do
-- This will contain value--priority pairs for each param name.
local candidateValuesAndPriorities = {}
-- fill candidateValuesAndPriorities
for refProperty in pairs(statement.snaks) do
if citeErrors[citeType] then
break
end
repeat -- just a simple wrapper to emulate "continue"
-- set mappingKey and prefix
local mappingKey
local prefix = ""
if statement.snaks[refProperty][1].datatype == 'external-id' then
mappingKey = "external-id"
prefix = self.conf:getLabel(refProperty)
if prefix ~= "" then
prefix = prefix .. " "
end
else
mappingKey = refProperty
end
local paramName = citeParamMapping[citeType][mappingKey]
-- skip properties with empty parameter name
if paramName == "" then
break -- skip this property for this value of citeType
end
-- handle unknown properties in the reference
if not paramName then
referenceEmpty = false
local error_message = errorText("unknown-property-in-ref", refProperty)
assert(error_message) -- Should not be nil
citeErrors[citeType] = error_message
unknownPropertyFailed[citeType] = true
break
end
-- set processedProperty
local processedProperty
local raw = false -- if the value is wanted raw
if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then
raw = true
end
if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then
-- Multiple values may be given.
processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true
else
-- If multiple values are given, all but the first suitable one are discarted.
processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true
end
if #processedProperty == 0 then
break
end
referenceEmpty = false
-- add an empty entry to candidateValuesAndPriorities, if there isn't one already
if not candidateValuesAndPriorities[paramName] then
candidateValuesAndPriorities[paramName] = {}
end
-- find the priority of refProperty
local thisPropertyPriority = -1
local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName]
if thisParamPrioritization then
for i_priority, i_property in ipairs(thisParamPrioritization) do
if i_property == refProperty then
thisPropertyPriority = i_priority
end
end
end
for _, propertyValue in pairs(processedProperty) do
table.insert(
candidateValuesAndPriorities[paramName],
{prefix .. propertyValue, thisPropertyPriority}
)
end
until true
end
-- fill candidateParams[citeType]
if not citeErrors[citeType] then
local compareValuePriorities = function(pair1, pair2)
if pair1[2] == -1 and pair2[2] ~= -1 then
return false
end
if pair1[2] ~= -1 and pair2[2] == -1 then
return true
end
return pair1[2] < pair2[2]
end
-- fill candidateParams[citeType][paramName] for each used param
for paramName, _ in pairs(candidateValuesAndPriorities) do
table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities)
candidateParams[citeType][paramName] = {}
for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do
table.insert(candidateParams[citeType][paramName], valuePriorityPair[1])
end
end
end
end
-- handle additional properties
for refProperty in pairs(additionalProcessedProperties) do
for _, citeType in ipairs(citeTypes) do
repeat
-- skip if there already have been errors
if citeErrors[citeType] then
break
end
local paramName = citeParamMapping[citeType][refProperty]
-- handle unknown properties in the reference
if not paramName then
-- Skip this additional property, but do not cause an error.
break
end
if paramName == "" then
break
end
referenceEmpty = false
if not candidateParams[citeType][paramName] then
candidateParams[citeType][paramName] = {}
end
for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do
table.insert(candidateParams[citeType][paramName], propertyValue)
end
until true
end
end
-- fill citeParams
for _, citeType in ipairs(citeTypes) do
for paramName, paramValues in pairs(candidateParams[citeType]) do
if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then
citeParams[citeType][paramName] = paramValues[1]
else
-- There is more than one value for this parameter - the values will
-- go into separate numbered parameters (e.g. "author1", "author2")
for paramNum, paramValue in pairs(paramValues) do
citeParams[citeType][paramName .. paramNum] = paramValue
end
end
end
end
-- archive-only references: recover the original URL (and archive date) from the archive link
for _, citeType in ipairs(citeTypes) do
local urlParam = citeParamMapping[citeType][aliasesP.referenceURL]
local archiveUrlParam = citeParamMapping[citeType][aliasesP.archiveURL]
local archiveDateParam = citeParamMapping[citeType][aliasesP.archiveDate]
local cp = citeParams[citeType]
if urlParam and urlParam ~= "" and archiveUrlParam and archiveUrlParam ~= ""
and not cp[urlParam] and cp[archiveUrlParam] then
local archiveUrl = cp[archiveUrlParam]
local stamp, original = mw.ustring.match(archiveUrl, "^https?://web%.archive%.org/web/(%d+)[%a_]*/(https?://.+)$")
if not original then
stamp, original = mw.ustring.match(archiveUrl, "^https?://archive%.[a-z]+/(%d+)/(https?://.+)$")
end
cp[urlParam] = original or archiveUrl
if stamp and archiveDateParam and archiveDateParam ~= "" and not cp[archiveDateParam] and #stamp >= 8 then
cp[archiveDateParam] = stamp:sub(1,4) .. "-" .. stamp:sub(5,6) .. "-" .. stamp:sub(7,8)
end
end
end
-- fallback: use "stated in" (P248) as title if "title" (P1476) is missing;
-- if neither is present, fall back to the reference URL's domain name
for _, citeType in ipairs(citeTypes) do
local titleParam = citeParamMapping[citeType][aliasesP.title]
local urlParam = citeParamMapping[citeType][aliasesP.referenceURL]
if titleParam and not citeParams[citeType][titleParam] then
if statement.snaks[aliasesP.statedIn] then
local fallbackTitle = self:getReferenceDetail(
statement.snaks,
aliasesP.statedIn,
false,
false
)
if fallbackTitle and fallbackTitle ~= "" then
citeParams[citeType][titleParam] = fallbackTitle
end
end
-- still nothing? try the URL's domain as a last resort
if not citeParams[citeType][titleParam] and urlParam and citeParams[citeType][urlParam] then
local domain = mw.ustring.match(citeParams[citeType][urlParam], "^%a+://([^/]+)")
if domain then
citeParams[citeType][titleParam] = domain
end
end
end
end
-- handle missing mandatory parameters for the templates
for _, citeType in ipairs(citeTypes) do
for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do
if not citeParams[citeType][requiredCiteParam] then -- The required param is not present.
if citeErrors[citeType] then -- Do not override the previous error, if it exists.
break
end
local error_message = errorText("missing-mandatory-param", requiredCiteParam)
assert(error_message) -- Should not be nil
citeErrors[citeType] = error_message
end
end
end
local citeTypeToUse = nil
-- choose the output template
for _, citeType in ipairs(citeTypes) do
if not citeErrors[citeType] then
citeTypeToUse = citeType
break
end
end
-- set refContent
local refContent = ""
if citeTypeToUse then
local templateToUse = citeConfig[citeTypeToUse]["template"]
local paramsToUse = citeParams[citeTypeToUse]
if not templateToUse or templateToUse == "" then
throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse)
end
-- 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(paramsToUse) do
refContent = refContent .. "|" .. i .. "=" .. v
end
refContent = "{{" .. templateToUse .. refContent .. "}}"
else
xpcall(
function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end,
function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end
)
end
-- A reference made only of database IDs (e.g. "Australian Statistical Geography 2016 ID SSC90001") has no url or
-- title for {{Cite web}} and no item for {{Cite Q}}, so show the IDs as plain text instead of an error.
elseif citeParams["web"] and not unknownPropertyFailed["web"]
and candidateParams["web"] and candidateParams["web"][citeParamMapping["web"]["external-id"] or ""]
and not citeParams["web"][citeParamMapping["web"][aliasesP.referenceURL] or ""] then
refContent = table.concat(candidateParams["web"][citeParamMapping["web"]["external-id"]], "; ")
-- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error.
elseif not referenceEmpty then
refContent = errorText("malformed-reference-header")
for _, citeType in ipairs(citeTypes) do
refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType])
end
refContent = refContent .. errorText("malformed-reference-footer")
end
-- wrap refContent
local ref = {}
if refContent ~= "" then
ref = {refContent}
if not self.rawValue then
-- this should become a <ref> tag, so save the reference's hash for later
ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version)
end
return {ref}
else
return {}
end
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)
-- 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
local 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, globalSiteId)
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, globalSiteId) 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], false, args[p.args.globalSiteId])
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, args[p.args.globalSiteId])
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
2a13wm9e9fwvqki0vkrxuem0qri44zk
Clowan:Christiaan Huygens
10
44434
394998
367918
2026-10-22T13:20:00Z
Ziv
21344
([[c:GR|GR]]) [[File:Christiaan Huygens-painting.jpeg]] → [[File:Caspar Netscher - Christiaan Huygens, the astronomer, 1671.jpg]] [[c:COM:FR#FR2|Criterion 2]] · Artist's name and exact description
394998
wikitext
text/x-wiki
{{Navbox
| name = Christiaan Huygens
| title = [[Christiaan Huygens]]
| state = {{{state|autocollapse}}}
| listclass = hlist
| image = [[Coadan:Caspar Netscher - Christiaan Huygens, the astronomer, 1671.jpg|90px]]
| group1 = [[:Ronney:Lioaryn lesh Christiaan Huygens|Obbraghyn soilshit]]
| list1 =
*''Theoremata de Quadratura Hyperboles, Ellipsis et Circuli'' (1651)
*''De Circuli Magnitudine Inventa'' (1654)
*''De Ratiociniis in Ludo Aleae'' (1657)
*''Systema Saturnium'' (1659)
*''[[Horologium Oscillatorium]]'' (1673)
*''[[Traghtys bentyn rish y Tollysh|Traité de la Lumiére]]'' (1692)
*''Cosmotheoros'' (1698)
| group2 = [[:Ronney:Feddynyssyn lesh Christiaan Huygens|Feddynyssyn as ynlaghtyn]]
| list2 =
*[[Leigh chrogheydane Huygens]]
*[[Lemniscaid Huygens]]
*[[Prinsabyl Huygens–Fresnel]]
*[[Tree-hoan shiaghtoil|Tree-hoan Huygens]]
*[[Çhoarym Huygens–Steiner]]
| group3 = [[Rolley reddyn enmyssit ass Christiaan Huygens|Moyllaghyn]]
| list3 =
*[[2801 Huygens]]
*''[[Cassini–Huygens]]''
**[[Huygens (saagh spoar)|Scrutag ''Huygens'']]
*[[Mons Huygens]]
*[[MS Christiaan Huygens|MS ''Christiaan Huygens'']]
*[[Huygens (slogh cruinn)]]
*[[Huygens-Fokker Foundation]]
*[[Baarney Huygens]]
*[[Fainey Veg Huygens]]
*[[Horologium (co-hollys rollageagh)]]
*[[:fr:Prix Descartes-Huygens|Prix Descartes-Huygens]]
| group4 = Sleih mooinjeragh
| list4 =
*[[:Ronney:Mooinjer Huygens|Mooinjer Huygens]]
*[[Galileo Galilei]]
*[[René Descartes]]
*[[Salomon Coster]]
*[[Antonie van Leeuwenhoek]]
*[[Baruch Spinoza]]
*[[Gottfried Wilhelm Leibniz]]
*[[Isaac Newton]]
*[[Robert Hooke]]
*[[Denis Papin]]
*[[Augustin-Jean Fresnel]]
*[[Thomas Young (oayllee)|Thomas Young]]
| belowclass = hlist
| below =
* {{icon|wikiquote}} [[wikiquote:Special:Search/Christiaan Huygens|'''Wikiquote''']]
* {{icon|wikisource}} [[wikisource:Special:Search/Author:Christiaan Huygens|'''Teksyn Wikisource''']]
}}<noinclude>
{{collapsible option}}
{{DEFAULTSORT:Huygens, Christiaan}}
[[Ronney:Kishtaghyn stiuree bentyn rish screeudeyryn Ollanagh]]
[[Ronney:Kishtaghyn stiuree bentyn rish oaylleeyn]]
[[Ronney:Christiaan Huygens|Ξ]]
</noinclude>
i5lwfe2x83kl7wbr0swcic64go675ya
Module:Kishtey fys çheer/balley
828
55830
395001
394741
2026-10-22T14:20:51Z
MacTire02
219
lettyryn mooarey
395001
Scribunto
text/plain
local p = {}
-- Safely get manual parameters from priority list
local function getManual(args, names)
for _, name in ipairs(names) do
local value = args[name]
if value and mw.text.trim(value) ~= "" then
return mw.text.trim(value)
end
end
return nil
end
local function isNone(value)
return value ~= nil and mw.text.trim(value):lower() == "none"
end
-- Splits a manual value into link target, display text and any trailing text,
-- e.g. "[[Laayoune]] (''de jure'')" -> "Laayoune", nil, " (''de jure'')".
local function splitManualLink(value)
if not value then return "", nil, nil end
local clean = mw.text.trim(value)
local inner, rest = clean:match("^%[%[(.-)%]%](.*)$")
if not inner then
inner, rest = clean:match("^(.-)%s+(%(''.*)$")
if inner then rest = " " .. rest else inner, rest = clean, "" end
end
rest = (rest ~= "") and rest or nil
local pipe = inner:find("|", 1, true)
if pipe then
local target = mw.text.trim(inner:sub(1, pipe - 1))
local display = mw.text.trim(inner:sub(pipe + 1))
if display == "" then display = nil end
return target, display, rest
end
return mw.text.trim(inner), nil, rest
end
-- Upper-cases the first letter of a displayed name ("y Damask" -> "Y Damask"); link targets are untouched.
local function ucfirst(text)
if not text or text == "" then return text end
return mw.ustring.upper(mw.ustring.sub(text, 1, 1)) .. mw.ustring.sub(text, 2)
end
-- Target half only.
local function normaliseCityName(value)
local target = splitManualLink(value)
return target
end
-- Link target, QID, and a display override when the gv label differs from the sitelink.
local function resolveCityItem(id)
local sitelink = mw.wikibase.sitelink(id)
sitelink = (sitelink and sitelink ~= "") and sitelink or nil
local label = mw.wikibase.getLabelByLang(id, "gv") or mw.wikibase.label(id)
label = (label and label ~= "") and label or nil
local target = sitelink or label
if not target then return nil end
local display = (label and label ~= target) and label or nil
return target, id, display
end
-- Wikidata references for a claim value (empty if none).
local wdOK, Wd = pcall(require, "Module:Wd")
local function getWdCitation(property, value)
if not wdOK or not Wd or not Wd._reference or not value then return nil end
local ok, result = pcall(Wd._reference, {"best", property, value})
if ok and result and result ~= "" then return result end
return nil
end
local function snakItemId(snak)
if not (snak and snak.snaktype == "value" and snak.datavalue
and snak.datavalue.type == "wikibase-entityid") then
return nil
end
local value = snak.datavalue.value
return value.id or ("Q" .. tostring(value["numeric-id"]))
end
local function getWikidataCity(property)
local entity = mw.wikibase.getEntityObject()
if not entity then return nil end
local statements = entity:getBestStatements(property)
if not statements or #statements == 0 then return nil end
local id = snakItemId(statements[1].mainsnak)
if not id then return nil end
return resolveCityItem(id)
end
-- P518 ("applies to part") values on a capital statement, in Manx.
local BRANCH_LABELS = {
Q105985 = "briwnyssagh",
Q35798 = "kiannoortagh",
Q11204 = "slattyssagh",
}
-- Every current P36 capital, each with its branch label. Statements with an end time are skipped. A capital
-- below the best rank (e.g. Bolivia: Sucre preferred, La Paz normal) is kept only if it has a P518 branch.
local function getWikidataCapitals()
local result = {}
local entity = mw.wikibase.getEntityObject()
if not entity then return result end
local statements = entity:getAllStatements("P36") or {}
local bestRank = "normal"
for _, statement in ipairs(statements) do
if statement.rank == "preferred" then bestRank = "preferred" end
end
for _, statement in ipairs(statements) do
local quals = statement.qualifiers or {}
local id = snakItemId(statement.mainsnak)
local keep = statement.rank ~= "deprecated" and (statement.rank == bestRank or quals.P518)
if id and keep and not quals.P582 then
local target, qid, display = resolveCityItem(id)
if target then
local branches = {}
for _, snak in ipairs(quals.P518 or {}) do
local label = BRANCH_LABELS[snakItemId(snak) or ""]
if label then table.insert(branches, label) end
end
table.insert(result, { name = target, wdQid = qid, wdDisplay = display, branch = table.concat(branches, ", ") })
end
end
end
return result
end
-- QID of a current P36 capital matching a typed city name, for coordinates when that city has no gv article.
local function findCapitalQid(name)
local entity = mw.wikibase.getEntityObject()
if not entity then return nil end
local want = name:lower()
for _, statement in ipairs(entity:getAllStatements("P36") or {}) do
local id = snakItemId(statement.mainsnak)
if id then
local target, qid, display = resolveCityItem(id)
if (target and target:lower() == want) or (display and display:lower() == want) then return qid end
end
end
return nil
end
-- {{coord}} from a QID's P625, always DMS.
local function getCoordinatesForQid(frame, qid)
if not qid then return nil end
local entity = mw.wikibase.getEntityObject(qid)
if not entity then return nil end
local statements = entity:getBestStatements("P625")
if not statements or #statements == 0 then return nil end
local mainsnak = statements[1].mainsnak
if not (mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue
and mainsnak.datavalue.type == "globecoordinate") then
return nil
end
local coord = mainsnak.datavalue.value
if not (coord.latitude and coord.longitude) then return nil end
return frame:expandTemplate{
title = "coord",
args = { coord.latitude, coord.longitude, "type:city", display = "inline", format = "dms" }
}
end
-- Coordinates for a manually typed name, via its gv sitelink only.
local function getCityCoordinates(frame, pageTitle)
if not pageTitle or pageTitle == "" then return nil end
local id = mw.wikibase.getEntityIdForTitle(pageTitle)
return getCoordinatesForQid(frame, id)
end
-- Manual coordinates from component params: "suppress", a {{coord}} expansion, or nil.
local function getManualCoordinates(frame, args, degParam, minParam, nsParam, lonDegParam, lonMinParam, ewParam)
-- Accepts one name or a list of alternate spellings.
local function names(p)
if type(p) == "table" then return p end
return { p }
end
local latd = getManual(args, names(degParam))
if not latd then return nil end
if isNone(latd) then return "suppress" end
local latm = getManual(args, names(minParam)) or ""
local latNS = getManual(args, names(nsParam)) or ""
local longd = getManual(args, names(lonDegParam)) or ""
local longm = getManual(args, names(lonMinParam)) or ""
local longEW = getManual(args, names(ewParam)) or ""
return frame:expandTemplate{
title = "coord",
args = { latd, latm, latNS, longd, longm, longEW, "type:city", display = "inline", format = "dms" }
}
end
-- Prevents coordinates from line-wrapping in the infobox's narrow column
-- ({{coord}}'s output has plain spaces the browser is free to break on).
local function coordSpan(coordText)
if not coordText or coordText == "" then return "" end
return '<br/><small style="white-space:nowrap;">' .. coordText .. '</small>'
end
-- Manual coordinates win, =none suppresses, else Wikidata (by QID if known, else gv title).
local function resolveEntryCoordinates(frame, args, coordSuffix, cleanName, wdQid)
-- Both underscore and hyphen spellings.
local function both(prefix)
return { prefix .. "_balley_smoo" .. coordSuffix, prefix .. "_balley-smoo" .. coordSuffix }
end
local manual = getManualCoordinates(frame, args,
both("latd"), both("latm"), both("latNS"),
both("longd"), both("longm"), both("longEW"))
if manual == "suppress" then return nil end
if manual then return manual end
if wdQid then return getCoordinatesForQid(frame, wdQid) end
return getCityCoordinates(frame, cleanName) or getCoordinatesForQid(frame, findCapitalQid(cleanName))
end
-- Maximum number of largest-city slots.
local MAX_LARGEST = 3
-- Border classes for a run of merged rows, matching reiltys.lua's own
-- convention for a header followed by bulleted sub-rows.
local function trClass(class)
return ' class="' .. class .. '"'
end
-- Collects largest-city entries; Wikidata fallback for slot 1 only.
local function collectLargestEntries(args)
local entries = {}
for i = 1, MAX_LARGEST do
local suffix = tostring(i)
-- Underscore and hyphen spellings accepted at every slot.
local nameNames = { "balley_smoo" .. suffix, "balley-smoo" .. suffix }
local qualNames = { "sorçh_balley_smoo" .. suffix, "sorçh_balley-smoo" .. suffix }
local noteNames = { "noteyn_balley_smoo" .. suffix, "noteyn_balley-smoo" .. suffix }
local coordSuffix = suffix
if i == 1 then
-- Bare form is a synonym for slot 1 (its coordinate params stay unsuffixed).
table.insert(nameNames, 1, "balley-smoo")
table.insert(nameNames, 1, "balley_smoo")
table.insert(qualNames, 1, "sorçh_balley-smoo")
table.insert(qualNames, 1, "sorçh_balley_smoo")
table.insert(noteNames, 1, "noteyn_balley-smoo")
table.insert(noteNames, 1, "noteyn_balley_smoo")
coordSuffix = ""
end
local nameRaw = getManual(args, nameNames)
if isNone(nameRaw) then
-- Explicit none: no Wikidata fallback.
elseif nameRaw then
table.insert(entries, {
name = nameRaw,
qualifier = getManual(args, qualNames),
note = getManual(args, noteNames),
coordSuffix = coordSuffix,
})
elseif i == 1 then
-- Deeper slots are manual-only.
local wd, wdQid, wdDisplay = getWikidataCity("P13574")
if wd then
table.insert(entries, { name = wd, qualifier = nil, note = getManual(args, noteNames), coordSuffix = "", wdQid = wdQid, wdDisplay = wdDisplay })
end
end
end
return entries
end
-- Maximum number of capital slots.
local MAX_CAPITALS = 5
-- Slot 1 uses the bare legacy names, slots 2+ a numeric suffix. The bare |sorçh_preeu-valley= is the row label,
-- so slot 1's qualifier is |sorçh_preeu-valley1=. Slot 1 = none suppresses the row. With no manual slot set,
-- every current P36 capital is used; if only slots 2+ are set, Wikidata's first capital fills slot 1.
-- With several capitals each gets its P518 branch label (a manual qualifier overrides it, none hides it).
local function collectCapitalEntries(args)
local entries = {}
local hasSlot1 = false
local wdCapitals
local function wdList()
wdCapitals = wdCapitals or getWikidataCapitals()
return wdCapitals
end
local function noteNamesFor(i)
local names = { "noteyn_preeu-valley" .. i }
if i == 1 then table.insert(names, 1, "noteyn_preeu-valley") end
return names
end
local function qualifierFor(i)
local qualifier = getManual(args, { "sorçh_preeu-valley" .. i })
if isNone(qualifier) then return nil, true end
return qualifier, false
end
for i = 1, MAX_CAPITALS do
local nameNames = { "preeu-valley" .. i }
if i == 1 then table.insert(nameNames, 1, "preeu-valley") end
local nameRaw = getManual(args, nameNames)
if isNone(nameRaw) then
if i == 1 then return {} end
elseif nameRaw then
if i == 1 then hasSlot1 = true end
local qualifier, noTag = qualifierFor(i)
table.insert(entries, {
name = nameRaw, qualifier = qualifier, noTag = noTag,
note = getManual(args, noteNamesFor(i)),
coordSuffix = (i == 1) and "" or tostring(i),
})
end
end
if #entries > 0 and not hasSlot1 then
local first = wdList()[1]
local wd, wdQid, wdDisplay
if first then
wd, wdQid, wdDisplay = first.name, first.wdQid, first.wdDisplay
else
wd, wdQid, wdDisplay = getWikidataCity("P36")
end
local duplicate = false
for _, e in ipairs(entries) do
if wd and normaliseCityName(e.name):lower() == wd:lower() then duplicate = true end
end
if wd and not duplicate then
local qualifier, noTag = qualifierFor(1)
table.insert(entries, 1, {
name = wd, wdQid = wdQid, wdDisplay = wdDisplay,
qualifier = qualifier, noTag = noTag,
note = getManual(args, noteNamesFor(1)),
coordSuffix = "",
})
end
end
if #entries == 0 then
local list = wdList()
if #list == 0 then
local wd, wdQid, wdDisplay = getWikidataCity("P36")
if wd then list = { { name = wd, wdQid = wdQid, wdDisplay = wdDisplay, branch = "" } } end
end
for i, cap in ipairs(list) do
if i > MAX_CAPITALS then break end
local qualifier, noTag = qualifierFor(i)
table.insert(entries, {
name = cap.name, wdQid = cap.wdQid, wdDisplay = cap.wdDisplay,
qualifier = qualifier, noTag = noTag,
note = getManual(args, noteNamesFor(i)),
coordSuffix = (i == 1) and "" or tostring(i),
})
end
end
-- Several capitals: an entry matching a Wikidata capital takes that capital's branch label.
if #entries > 1 then
for _, entry in ipairs(entries) do
if not entry.qualifier and not entry.noTag then
local want = normaliseCityName(entry.name):lower()
for _, cap in ipairs(wdList()) do
if cap.branch ~= "" and (cap.name:lower() == want or (cap.wdDisplay and cap.wdDisplay:lower() == want)) then
entry.qualifier = cap.branch
end
end
end
end
end
return entries
end
-- Manual params win (slot N uses suffix N), =none suppresses, else Wikidata via QID, else gv title.
local function resolveCapitalCoordinates(frame, args, entry, cleanName)
local function names(prefix)
if entry.coordSuffix == "" then return { prefix, prefix .. "1" } end
return { prefix .. entry.coordSuffix }
end
local manual = getManualCoordinates(frame, args,
names("latd"), names("latm"), names("latNS"),
names("longd"), names("longm"), names("longEW"))
if manual == "suppress" then return nil end
if manual then return manual end
if entry.wdQid then return getCoordinatesForQid(frame, entry.wdQid) end
return getCityCoordinates(frame, cleanName) or getCoordinatesForQid(frame, findCapitalQid(cleanName))
end
function p.main(frame, args)
-- Fallback verification to catch argument slots accurately if frame context shifts
if not args then
args = frame
frame = mw.getCurrentFrame()
end
local capitalEntries = collectCapitalEntries(args)
local administrative = getManual(args, {"ynnyd_reiragh"})
local adminNote = getManual(args, {"noteyn_ynnyd_reiragh"})
-- Bare latd etc. bind to the capital's slot 1, else the administrative centre.
local manualPrimaryCoords = getManualCoordinates(frame, args, "latd", "latm", "latNS", "longd", "longm", "longEW")
local hasCapital = #capitalEntries > 0
-- With one capital, a duplicate largest city is dropped and noted as "(as y balley smoo)";
-- with several, every largest city is listed in its own row, with coordinates.
local multiple = #capitalEntries > 1
local allEntries = collectLargestEntries(args)
local largestEntries = {}
local isSameAny = false
for _, entry in ipairs(allEntries) do
local cleanLower = mw.text.trim(entry.name):lower()
local isSentinel = (cleanLower == "preeu-valley" or cleanLower == "preeu_valley")
local largestLower = normaliseCityName(entry.name):lower()
local matchesCapital = false
for _, capEntry in ipairs(capitalEntries) do
if normaliseCityName(capEntry.name):lower() == largestLower then matchesCapital = true end
end
if multiple then
if not isSentinel then table.insert(largestEntries, entry) end
elseif isSentinel or matchesCapital then
isSameAny = true
else
table.insert(largestEntries, entry)
end
end
-- Rows are collected first, then classed by position: {th (nil = continuation row), rowspan, td}.
local pending = {}
-- With several capitals the label rowspans all rows.
if hasCapital then
local label = args["sorçh_preeu-valley"] or "Preeu-valley"
local displayLabel = '[[' .. label .. ']]'
if isSameAny then
displayLabel = '[[' .. label .. ']]<br/><small style="font-weight:normal;">(as y balley smoo)</small>'
end
for idx, entry in ipairs(capitalEntries) do
-- Manual display text is kept.
local cleanCapName, capManualDisplay, capTrailing = splitManualLink(entry.name)
local capDisplayName = ucfirst(entry.wdDisplay or capManualDisplay or cleanCapName)
local text = '[[' .. cleanCapName .. '|' .. capDisplayName .. ']]'
if capTrailing then text = text .. capTrailing end
if entry.qualifier and entry.qualifier ~= "" then
text = text .. ' (' .. entry.qualifier .. ')'
end
if entry.note and entry.note ~= "" then
text = text .. frame:expandTemplate{ title = "efn", args = { entry.note } }
end
if entry.wdQid then text = text .. (getWdCitation("P36", entry.wdQid) or "") end
-- Slot 1 uses the bare coordinate params; slots 2-3 use suffixed ones.
local capCoords
if entry.coordSuffix == "" and manualPrimaryCoords == "suppress" then
capCoords = nil
elseif entry.coordSuffix == "" and manualPrimaryCoords then
capCoords = manualPrimaryCoords
else
capCoords = resolveCapitalCoordinates(frame, args, entry, cleanCapName)
end
text = text .. coordSpan(capCoords)
if idx == 1 then
table.insert(pending, { th = displayLabel, rowspan = multiple and #capitalEntries or nil, td = text })
else
table.insert(pending, { th = nil, td = text })
end
end
end
-- Capital in exile: free wikitext, shown as its own row.
local exile = getManual(args, {"preeu-valley_ayns_eebyrtys"})
if exile and not isNone(exile) then
local exileLabel = args["sorçh_preeu-valley_ayns_eebyrtys"] or "Preeu-valley ayns eebyrtys"
local exileNote = getManual(args, {"noteyn_preeu-valley_ayns_eebyrtys"})
if exileNote then exile = exile .. frame:expandTemplate{ title = "efn", args = { exileNote } } end
table.insert(pending, { th = '[[' .. exileLabel .. ']]', wrap = true, td = exile })
end
-- 2. ADMINISTRATIVE CENTER
if administrative and mw.text.trim(administrative):lower() ~= "none" then
local label = args["sorçh_ynnyd_reiragh"] or "Ynnyd reiragh"
-- Manual display text is kept.
local cleanAdminName, adminManualDisplay, adminTrailing = splitManualLink(administrative)
local text = '[[' .. cleanAdminName .. '|' .. ucfirst(adminManualDisplay or cleanAdminName) .. ']]' .. (adminTrailing or '')
if adminNote and adminNote ~= "" then
text = text .. frame:expandTemplate{ title = "efn", args = { adminNote } }
end
-- Manual-override-only -- no Wikidata coordinate fetch for an
-- administrative centre (the old template never had one either).
if not hasCapital then
local adminCoords
if manualPrimaryCoords == "suppress" then
adminCoords = nil
elseif manualPrimaryCoords then
adminCoords = manualPrimaryCoords
end
text = text .. coordSpan(adminCoords)
end
table.insert(pending, { th = '[[' .. label .. ']]', td = text })
end
-- With several entries the first <th> rowspans them all.
if #largestEntries > 0 then
local total = #largestEntries
for idx, entry in ipairs(largestEntries) do
-- Wikidata and manual display overrides are never both set.
local cleanLargeName, largeManualDisplay, largeTrailing = splitManualLink(entry.name)
local largeDisplayName = ucfirst(entry.wdDisplay or largeManualDisplay or cleanLargeName)
local text = '[[' .. cleanLargeName .. '|' .. largeDisplayName .. ']]'
if largeTrailing then text = text .. largeTrailing end
if entry.qualifier and entry.qualifier ~= "" then
text = text .. ' (' .. entry.qualifier .. ')'
end
if entry.note and entry.note ~= "" then
text = text .. frame:expandTemplate{ title = "efn", args = { entry.note } }
end
if entry.wdQid then text = text .. (getWdCitation("P13574", entry.wdQid) or "") end
text = text .. coordSpan(resolveEntryCoordinates(frame, args, entry.coordSuffix, cleanLargeName, entry.wdQid))
if idx == 1 then
table.insert(pending, { th = "Balley smoo", rowspan = (total > 1) and total or nil, td = text })
else
table.insert(pending, { th = nil, td = text })
end
end
end
if #pending == 0 then return nil end
-- Lone row gets no class; otherwise top/middle/bottom merged classes.
local subRows = {}
local total = #pending
for idx, row in ipairs(pending) do
local class
if total == 1 then
class = ""
elseif idx == 1 then
class = "mergedtoprow"
elseif idx == total then
class = "mergedbottomrow"
else
class = "mergedrow"
end
local classAttr = (class ~= "") and trClass(class) or ""
if row.th then
local rowspanAttr = row.rowspan and (' rowspan="' .. row.rowspan .. '"') or ''
table.insert(subRows, '<tr' .. classAttr .. '><th' .. rowspanAttr .. ' style="vertical-align:top; ' .. (row.wrap and '' or 'white-space:nowrap; ') .. 'text-align:left; font-weight:bold; padding-left:0.4em; padding-right:0.4em;">' .. row.th .. '</th><td style="vertical-align:top; padding-left:0.4em; padding-right:0.4em;">' .. row.td .. '</td></tr>')
else
table.insert(subRows, '<tr' .. classAttr .. '><td style="vertical-align:top; padding-left:0.4em; padding-right:0.4em;">' .. row.td .. '</td></tr>')
end
end
return table.concat(subRows)
end
return p
bft8esqdflvfjclhbgpzghzuwzd8bal
Ronney:Artyn lesh teks ayns Tetunish
14
56298
394997
2026-10-22T12:56:12Z
MacTire02
219
ronney noa
394997
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Artyn lesh teks ayns Turkmenish
14
56299
395003
2026-10-22T15:02:21Z
MacTire02
219
ronney noa
395003
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Artyn lesh teks ayns Bengaalish
14
56300
395009
2026-10-22T19:27:47Z
MacTire02
219
ronney noa
395009
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Geillyn CS1 ayns Bengali (bn)
14
56301
395010
2026-10-22T19:28:27Z
MacTire02
219
ronney noa
395010
wikitext
text/x-wiki
{{CS1 language sources}}
r2upptk2cpczj7nm3zkocg7u05li8il
Ronney:CS1 gymmydey script Bengali (bn)
14
56302
395011
2026-10-22T19:29:10Z
MacTire02
219
ronney noa
395011
wikitext
text/x-wiki
{{CS1 language script}}
scq6ngkyvcw7vajjh70p7kgmz9xk253
Ronney:Artyn lesh teks ayns Vietnamish
14
56303
395013
2026-10-23T00:13:21Z
MacTire02
219
ronney noa
395013
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Artyn lesh teks ayns Mongoilish
14
56304
395015
2026-10-23T00:31:36Z
MacTire02
219
ronney noa
395015
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Artyn lesh teks ayns Dzongkha
14
56305
395018
2026-10-23T00:52:42Z
MacTire02
219
ronney noa
395018
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7
Ronney:Artyn lesh teks ayns Malayish Ellanyn Cocos
14
56306
395027
2026-10-23T02:51:30Z
MacTire02
219
ronney noa
395027
wikitext
text/x-wiki
{{Non-Manx-language text category}}
ftm4vo8zcojmgp8zf3wygcgvg0ztoi7