Wikipedia gvwiki https://gv.wikipedia.org/wiki/Ard-ghuillag MediaWiki 1.47.0-wmf.18 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 Jessie Andrews 0 22923 392806 388781 2026-09-06T00:49:10Z InternetArchiveBot 16702 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 392806 wikitext text/x-wiki {{WD Kishtey Fys Dooinney 2 |jalloo = Jessie Andrews 2014 (portrait cropped).jpg |fo-heidyl = Andrews 'sy vlein 2014 |enmyn_elley = Jessy Adrews, Jessi Andrews, Jessie Edwards, Jessie Allure |date_ruggyr = {{date ruggit as eash|1992|3|22|df=y}} |boayl_ruggyr = [[Miami]], [[Florida]], ny Steatyn Unnaneysit |ashoonaght = [[Americaanee|Americaanagh]] |yrjid = {{Yrjid|m=1.73}} |trimmid = {{trimmid|kg=63}} |towshan = 34B-25-36 }} She ben-aghteyr, kiaddeyder fassan, as craishteyder Americaanagh ee '''Jessie Andrews''' (ruggit er 22 Mayrnt 1992).{{r|Wally 2022}}<ref>{{cite web |title=Published Work |url=http://www.jessieandrewsofficial.com/published-work |website=Jesseandrewsofficial.com |archive-url=https://web.archive.org/web/20180124090012/http://www.jessieandrewsofficial.com/published-work |archive-date=24 Jerrey Geuree 2018 |url-status=dead}}</ref> Goaill toshiaght rish e coorse bea myr [[ben-aghteyr pornograafagh]], va [[Aundyr AVN da'n Ven-aghteyr Share]] bronnit urree kyndagh rish e cloie ayns ''[[Portrait of a Call Girl]]'' (2011). Er y gherrid, ren ee cloie ayns paartyn fillym as çhellveeish cadjin, goaill stiagh ''[[Hot Summer Nights (fillym)|Hot Summer Nights]]'' (2017) as ''[[Euphoria (straih hellveeish Americaanagh)|Euphoria]]'' (2022).{{r|Wally 2022}} 'Sy vlein 2012,ren Andrews shiaulley e linney cliejeenys hene ''Bagatiba'' (she ''bagātība'' y nfockle [[Latvish]] son "berçhid).<ref name="Miller 2012b">{{cite news |last1=Miller |first1=Dan |title=Jessie Andrews Launches Line of Jewelry |url=https://www.xbiz.com/news/150615/jessie-andrews-launches-line-of-jewelry |access-date=8 July 2025 |work=XBIZ |date=29 Mean Souree 2012 |language=Baarle}}</ref> T'ee er craishtey son ny colughtyn eaddee, [[American Apparel]],<ref>{{cite web | url = https://www.vice.com/shot-by-kern/los-angeles-part-2 | title = Los Angeles – Shot by Kern | year = 2012 | accessdate = 13 Jerrey Fouyir 2012 | work = Vice | archiveurl = https://archive.today/20130205120924/http://www.vice.com/shot-by-kern/los-angeles-part-2 | archivedate = 5 Toshiaght Arree 2013 }}</ref> [[RVCA]],<ref>{{cite web|url=http://www.empireave.com/daily-news/clothing/rvca-x-jessie-andrews/|title=RVCA X Jessie Andrews|last=Ethan Smith|date=25 Toshiaght Arree 2014|work=Empire Ave|accessdate=11 Mayrnt 2014|archiveurl=https://archive.today/20140311235630/http://www.empireave.com/daily-news/clothing/rvca-x-jessie-andrews/|archivedate=11 Mayrnt 2014}}</ref> as [[The Hundreds]] chammah's da'n taishbynys lesh y chiaddeyder fassan Kim Shui er son [[New York Fashion Week]].{{r|Wally 2022}} ==Coorse keirdey== [[Coadan:Bethany Benz Jessie Andrews Allie Haze AEE 2013.jpg|left|thumb|[[Bethany Benz]], Jessie Andrews, as [[Allie Haze]] ec yn [[AVN Adult Entertainment Expo]] ayns [[Las Vegas]], 2013]] ===Filmyn pornographic=== Va Andrews ruggit ayns [[Miami]], as ren ee obbraghey myr creckeyder da [[American Apparel]] tra v'ee foast 'sy scoill ard.<ref name="Wally 2022">{{Cite magazine |date=7 Toshiaght Arree 2022 |last=Wally |first=Maxine |title=Meet Jessie Andrews, the Latest Addition to ''Euphoria'' |url=https://www.wmagazine.com/culture/jessie-andrews-euphoria-interview |access-date=7 Jerrey Souree 2025 |magazine=W |language=Baarle}}</ref><ref name="Underwood 2012">{{cite magazine |last1=Underwood |first1=Lee |title=Jessie Andrews: Porn, Music, & Everything Else |url=http://www.thebpm.net/2012/11/jessie-andrews-porn-music-everything-else/ |magazine=[[BPM (earishlioar)|BPM]] |date=29 Mean Fouyir 2012 |archive-url=https://web.archive.org/web/20121201155543/http://www.thebpm.net/2012/11/jessie-andrews-porn-music-everything-else/ |archive-date=1 Mee ny Nollick 2012 |url-status=dead |type=co-akin}}</ref> As ee gobbraghey ayn, ren ben jeh ny caarjyn eck, ren obbraghey myr [[aghteyr brash|ben-aghteyr brash]] ayns fillym da sleih aasit, insh j'ee mychione "y leagh argid ren ee son taishbyney e keeaghyn," red ren greesaghey Andrews dy gholl er shirrey obbyr 'sy çhynskyl pornograafagh.<ref name="Kesa 2011">{{cite web |url=https://www.vice.com/en/article/interview-with-a-teenage-pornstar/ |title=Interview with a Teenage Pornstar |first=Ingrid |last=Kesa |work=Vice |date=25 Luanistyn 2011 |access-date=8 Jerrey Souree 2025}}</ref> Shiaghtin lurg e 18oo laa ruggyree, hoshee ee cloie ayns filmyn pornograafagh,<ref name="Purple 2013">{{cite magazine |author1=<!--anonymous author(s)--> |title=Jessie Andrews |url=https://purple.fr/magazine/ss-2013-issue-19/jessie-andrews/ |access-date=8 Jerrey Souree 2025 |magazine=[[Purple (earishlioar)|Purple]] |issue=19 |date=2013 |language=Baarle}}</ref> as ee rheynn e traa eddyr Miami as Los Angeles.{{r|Wally 2022}} Roish my row ee 21 vleeaney d'eash, v'ee er my cloie ayns ny smoo na 140 fillym da sleih aasit, y chooid smoo marish mraane elle.{{r|Purple 2013}} 'Sy vlein 2011, chloie Andrews 'sy fillym ''[[Portrait of a Call Girl]]'', raad chossyn ee aundyr da'n ven-aghteyr share veih'n earishlioar hraghtee ''[[Adult Video News]]''.{{r|Wally 2022}}<ref name="Miller 2012a">{{cite news |last1=Miller |first1=Dan |title='Portrait of a Call Girl,' Jessie Andrews Win Big at 2012 XBIZ Awards |url=https://www.xbiz.com/news/143085/portrait-of-a-call-girl-jessie-andrews-win-big-at-2012-xbiz-awards |access-date=8 Jerrey Souree 2025 |work=XBIZ |date=12 Jerrey Geuree 2012 |language=Baarle}}</ref> Y chied vlein elley, v'ee er ny taishbyney ayns feeshan kiaullee da'n arrane "[[Decisions (arrane)|Decisions]]" lesh yn eear-leggad eck, [[Borgore]], marish [[Miley Cyrus]] chammah.<ref>{{cite news |author1=<!--anonymous author(s)--> |title=Miley Cyrus Casts Porn Star, Jessie Andrews, In 'Decisions' Music Video |date=31 Jerrey Fouyir 2012 |url=https://www.huffpost.com/entry/miley-cyrus-casts-porn-star-jessie-andrews-decisions-music-video_n_2049030?ncid=edlinkusaolp00000003 |work=[[HuffPost]] |access-date=9 Jerrey Souree 2025}}</ref><ref>{{cite web |title='Decisions' – Borgore feat. Miley Cyrus (Official Music Video) |date=31 Jerrey Fouyir 2012 |via=YouTube |url=https://www.youtube.com/watch?v=jQd5OEl1W-Q |author=Borgore |access-date=9 Jerrey Souree 2025}}</ref> Ayns Jerrey Geuree 2014, va Andrews, [[Dana DeArmond]], [[Asa Akira]], as [[Chanel Preston]] er nyn daishbyney ayns art lesh ''[[Cosmopolitan (earishlioar)|Cosmopolitan]]'' va enmyssit "4 Porn Stars on How They Stay Fit".<ref name="Wischhover 2014">{{cite web |type=co-akin |last1=Wischhover |first1=Cheryl |title=4 Porn Stars on How They Stay Fit |url=https://www.cosmopolitan.com/entertainment/celebs/news/a5460/porn-stars-talk-fitness-and-body-image/ |website=Cosmopolitan |access-date=8 Jerrey Souree 2025 |date=30 Jerrey Geuree 2014}}</ref> Hayrn yn art breeaghys veih focklyn y ven-aghteyr [[Gabrielle Union]] ren ee er y chlaare chowag lesh [[Conan O'Brien]] as ee geiyrt lhiantyn coorseyn follanid ny rolteenyn pornograafagh ren ee çheet quail 'sy voayl lheiltys eck.<ref name="Adult Video News 2014">{{cite magazine |last=Warren |first=Peter |title=Cosmo Turns to Porn Stars for Fitness Tips |magazine=Adult Video News |date=Mayrnt 2014 |volume=30 |issue=3 |page=26 |issn=0883-7090 |url=https://avn.com/news/video/cosmo-turns-to-spiegler-girls-for-fitness-tips-135717}}</ref> Andrews has also written a sex advice column for ''[[Galore (magazine)|Galore]]'' magazine.<ref>{{Multiref2 | {{cite web |url=http://galoremag.com/jessie-andrewss-sex-tips-5-tips-to-making-a-girl-squirt/ |title=Jessie Andrews's Sex Tips: 5 Tips to Making a Girl Squirt |date=March 5, 2014 |work=Galore |archive-date=March 11, 2014 |archive-url=https://archive.today/20140311234227/http://galoremag.com/jessie-andrewss-sex-tips-5-tips-to-making-a-girl-squirt/ |url-status=dead}} | {{cite web |url=https://galoremag.com/jessie-andrewss-sex-tips-10-ways-to-make-a-girl-cum/ |title=Jessie Andrews' Sex Tips: 10 Ways to Make a Girl Cum |date=February 26, 2014 |work=Galore |archive-url=https://archive.today/20140311234200/https://galoremag.com/jessie-andrewss-sex-tips-10-ways-to-make-a-girl-cum/ |archive-date=March 11, 2014 |url-status=dead}} | {{cite web |url=http://galoremag.com/jessie-andrewss-sex-tips-10-tips-for-foreplay/ |title=Jessie Andrews's Sex Tips: 10 Tips for Foreplay |date=February 19, 2014 |work=Galore |archive-url=https://archive.today/20140311234210/http://galoremag.com/jessie-andrewss-sex-tips-10-tips-for-foreplay/ |archive-date=March 11, 2014 |url-status=dead}} }}</ref> ===Craishtey as kiaddey=== Haink Andrews dy ve coontit mastey kuse veg dy ven-aghteyryn pornograafagh ren brishey stiagh 'syn ard-stroo, as v'ee fogrit myr "[[it girl]]" lesh ''[[GQ]]'',<ref name="Clune 2016">{{cite news |last1=Clune |first1=Richard |title=Jessie Andrews Is Proving That Porn's No Longer A Dirty Word |url=https://www.gq.com.au/gq%2Bgirls/girl%2Bof%2Bthe%2Bweek/jessie%2Bandrews%2Bis%2Bproving%2Bthat%2Bporns%2Bno%2Blonger%2Ba%2Bdirty%2Bword%2C43057 |work=GQ Australia |date=20 Averil 2016 |archive-url=https://web.archive.org/web/20170509035912/https://www.gq.com.au/gq+girls/girl+of+the+week/jessie+andrews+is+proving+that+porns+no+longer+a+dirty+word,43057 |archive-date=9 Boaldyn 2017 |accessdate=2026-02-21 |archivedate=2017-05-09 |archiveurl=https://web.archive.org/web/20170509035912/https://www.gq.com.au/gq+girls/girl+of+the+week/jessie+andrews+is+proving+that+porns+no+longer+a+dirty+word,43057 }}</ref> as ''Hypebae''<ref>{{cite web |title=Jessie Andrews Is Today's Modern Woman |date=18 Boaldyn 2016 |url=https://hypebae.com/2016/5/jessie-andrews-interview |website=Hypebae |first=Zarah |last=Cheng |archive-date=6 Mee Houney 2017 |archive-url=https://web.archive.org/web/20171106185432/https://hypebae.com/2016/5/jessie-andrews-interview |url-status=dead}}</ref> roish my row ee er ny scrial as ee shappal ec shapp American Apparel son dy ve yn craishteyder liehlagh da'n chowrey. Ny s'anmey, ren ee caghlaa dys coorse craishtee rahoil,<ref>{{cite web |title=Transcending porn: The performers who become mainstream models and actors |url=https://www.independent.co.uk/news/people/lisa-ann-jessie-andrews-sunny-leone-and-colby-keller-former-porn-stars-who-broke-into-mainstream-acting-and-modelling-a6837461.html |archive-url=https://ghostarchive.org/archive/20220608/https://www.independent.co.uk/news/people/lisa-ann-jessie-andrews-sunny-leone-and-colby-keller-former-porn-stars-who-broke-into-mainstream-a6837461.html |access-date=9 Jerrey Souree 2025 |archive-date=8 Mean Souree 2022 |url-status=live |website=[[The Independent]] |first=Heather |last=Saul |date=11 Mayrnt 2016}}</ref> as ee er taishbyney er coodee ''[[LA Weekly]]'',<ref name="Swann 2013">{{cite news |last1=Swann |first1=Jennifer |title=Jessie Andrews: The Porn Star as a Brand |url=https://www.laweekly.com/jessie-andrews-the-porn-star-as-a-brand/ |access-date=9 July 2025 |work=LA Weekly |date=15 Boaldyn 2013}}</ref> ''[[Monster Children]]'',<ref>{{cite web |author1=<!--anonymous author(s)--> |title=Jessie Andrews Outtakes by Henrik Purienne |url=http://www.monsterchildren.com/24501/jessie-andrews-outtakes-by-henrik-purienne/ |website=Monster Children |date=29 Jerrey Fouyir 2014 |archive-date=11 Mayrnt 2017 |archive-url=https://web.archive.org/web/20170311083910/http://www.monsterchildren.com/24501/jessie-andrews-outtakes-by-henrik-purienne/ |url-status=dead}}</ref> as ''[[C-Heads]]''.<ref>{{cite web |title=Jessie Andrews Archives |url=https://www.c-heads.com/tag/jessie-andrews/ |website=C-Heads Magazine |access-date=9 Jerrey Souree 2025}}</ref> Ayns Jerrey Souree 2012, ghow Andrews toshiaght rish cliejeenys meein myr shalee persoonagh.<ref name="About">{{cite web |title=About |url=https://www.jessieandrewsofficial.com/about |website=Jessieandrewsofficial.com |access-date=9 Jerrey Souree 2025 |language=Baarle}}</ref> Ta cliejeenys veih'n linney ''Bagatiba'' eck er ny ve ceaut lesh [[Bella Hadid]],<ref name="Mikeski 2017">{{cite web |title=Try This Easy Off-Duty Outfit Formula All Summer Long |url=http://www.whowhatwear.com/what-was-she-wearing-bella-hadid-summer-denim-look |website=Who What Wear |first=Kristi |last=Mikeski |date=30 Mean Souree 2017 |archive-url=https://web.archive.org/web/20171028043253/http://www.whowhatwear.com/what-was-she-wearing-bella-hadid-summer-denim-look |archive-date=28 Jerrey Fouyir 2017 |url-status=dead}}</ref> [[Kendall Jenner]],<ref name="Madden 2014">{{cite news |last1=Madden |first1=Aemilia |title=Kendall Jenner's Best Style Moments |url=https://www.whowhatwear.com/kendall-jenner-style |access-date=9 Jerrey Souree 2025 |work=Who What Wear |date=16 Mean Souree 2014 |language=Baarle}}</ref> as da mooinjer Kardashian.<ref name="Cunningham 2017">{{cite news |last1=Cunningham |first1=Erin |title=Did Kourtney Kardashian Wear Her Bikini Like This On Purpose? |url=https://www.refinery29.com/en-us/2017/04/151404/kourtney-kardashian-underboob-bikini-vacation-photos |access-date=9 Jerrey Souree 2025 |work=Refinery29 |date=24 Averil 2017 |language=Baarle}}</ref> As y colught gaase, hooar eh ny smoo tastey veih ''[[Vogue (earishlioar)|Vogue]]''<ref name="Vogue 2017">{{cite news |author1=<!--anonymous author(s)--> |title=Yes, You Can Look Like Emily Ratajkowski on Vacation—Here's How |url=https://www.vogue.com/slideshow/emily-ratajkowski-instagram-bikinis-swimsuits-italy-vacation-celebrity-style-gallery |access-date=9 Jerrey Souree 2025 |work=Vogue |date=27 Mean Souree 2017}}</ref> as ''[[Refinery29]]''.<ref name="Coscarelli 2016">{{cite news |last1=Coscarelli |first1=Alyssa |title=Instagram's Latest Jewelry Trend Is One Of The Easiest To Pull Off |url=https://www.refinery29.com/en-us/2016/08/118624/layered-gold-jewelry-instagram-trend |access-date=9 Jerrey Souree 2025 |work=Refinery29 |date=2 Luanistyn 2016 |language=Baarle}}</ref> Haink e shapp er-linney dy ve coontit mastey ny shappyn smoo rahoil rere creckyn er [[Shopify]]. Ec y traa cheddin, ren Andrews launshey daa chowrey fassan elley: ''Basic Swim'', çhaglym dy chullee faarkee aashagh as ''Jeu Illimité'', linney eaddeeyn femeoil lesh breeaghys Paaryssagh. Ta Andrews stiurey dagh tree linneyveih'n chione-cherroo eck ayns Los Angeles — 1201 B Studios.<ref name="About"/> Roish my ren ee roshtyn 26 bleeaney d'eash, ren ''[[Coveteur]]''<ref name="Sutton 2019">{{cite web |title=How Jessie Andrews Went from Adult Film Star to Running 4 Successful Brands |url=http://coveteur.com/2018/04/18/jessie-andrews-talks-adult-film-fashion-brands/ |website=Coveteur |date=12 Luanistyn 2019 |first=Samantha |last=Sutton |archive-date= 20 Averil 2018 |archive-url=https://web.archive.org/web/20180420001552/http://coveteur.com/2018/04/18/jessie-andrews-talks-adult-film-fashion-brands/ |url-status=dead}}</ref> as ''[[Paper (earishlioar)|Paper]]''<ref name="Valentine 2017">{{cite news |last1=Valentine |first1=Claire |title=Jessie Andrews Is a Self-Made Woman |url=https://www.papermag.com/jessie-andrews-sustainable-fashion-jewelry1 |access-date=9 Jerrey Souree 2025 |work=Paper |date=31 Mee ny Nollick 2017 |language=Baarle}}</ref> co-akinyn marish Andrews bentyn rish yn obbyr eck 'sy çhynskyl fassan. 'Sy cho-akin marish ''Coveteur'', dooyrt ee dy row "fys [aym] nagh nee coorseyn-bea foddey-hannaghtyn ad y phornograafaght as y varkiaght jysk. Va mee shirrey seihll 'sy traa ry-heet dy hroggal dousyn hene, as myr shen hug mee joarey traa daue. Tra va mee smooinaghtyn dy row ooilley ny t'aym ceaut 'sy choorse-bea shen, va mee smooinaghtyn, 'OK, cre elley ta ry-heet dou?' She red so-lhieeney eh yn kiaddey, agh ta mee smooinaghtyn dy vel shellooderys dy chowrey hene as gynsaghey dagh tro dellal so-lhieeney dousyn."<ref name="Sutton 2019"/> ===Kiaull=== Ayns Sauin 2012, ren Andrews shiaulley aavestey jeh'n arrane "I Met You" liorish Anna Lunoe & Flume as v'eh skeaylt magh seyr son jeelaadey.<ref>{{cite web|author=MRTN|title=Anna Lunoe & Flume – I Met You (Jessie Andrews Remix)|url=http://www.stockholmbeatconnection.com/2012/11/26/anna-lunoe-flume-i-met-you-jessie-andrews-remix/|work=Stockholm Beat Connection|accessdate=30 Mee Houney 2012|date=26 Mee Houney 2012}}</ref> Ayns Nollick, ren ee skeaylley magh aavestey jeh'n arrane "[[Latch (arrane)|Latch]]" liorish [[Disclosure (bann)|Disclosure]] as Sam Smith.<ref>{{cite web|last=Underwood|first=Lee|title=A Perfect "Latch": Jessie Andrews Remixes Disclosure|url=http://www.thetugboat.com/2012/12/a-perfect-latch-jessie-andrews-remixes-diclosure/|work=The Tug Boat|accessdate=12 Mee ny Nollick 2012|date=11 Mee ny Nollick 2012|archive-date=2013-02-04|archive-url=https://archive.today/20130204065318/http://www.thetugboat.com/2012/12/a-perfect-latch-jessie-andrews-remixes-diclosure/|url-status=dead}}</ref> Ayns Jerrey Fouyir as Sauin 2013, hie Andrews er turrys 'sy Chanadey myr markiagh jysk. Ren ee cloie ayns Montréal, Thunder Bay, Victoria, Edmonton, Vancouver as Calgary.<ref>[http://www.songkick.com/artists/6562473-jessie-andrews Jessie Andrews Tour Dates 2014 — Jessie Andrews Concert Dates and Tickets]. Songkick. Feddynit er 12 Averil 2014.</ref> Hie Andrews er turrys 'syn Aishey raad ren ee cloie ayns FLY ayns Singapore,<ref>{{cite web|url=http://www.timeout.com/singapore/clubs/jessie-andrews-fly|title=Jessie Andrews: FLY|accessdate=28 Luanistyn 2016}}</ref> [[We the Fest]] ayns [[Jakarta]]<ref>{{cite web|url=http://www.svanapaper.com/firstphaselineups/|title=The First Phase Line-Ups of Jakarta's We The Fest 2014|accessdate=28 Luanistyn 2016}}</ref> as y feailley [[Sunny Side Up Festival]] ayns Potato Head, Bali.<ref>{{cite web|url=http://inthemix.junkee.com/behold-the-eclectic-first-line-up-for-balis-brand-new-festival/24626|title=Behold the eclectic first line-up for Bali's brand new festival|date=17 Jerrey Souree 2014|accessdate=28 Luanistyn 2016|archivedate=2017-10-28|archiveurl=https://web.archive.org/web/20171028043758/http://inthemix.junkee.com/behold-the-eclectic-first-line-up-for-balis-brand-new-festival/24626}}</ref> Ayns 2015 hie ee er turrys ayns America Hwoaie raad ren ee cloie 'sy Marquee New York City, Exchange L.A, [[LIV (club)|LIV]] Miami<ref>{{cite web|url=http://www.songkick.com/artists/6562473-jessie-andrews/gigography|title=Jessie Andrews Gigography, Tour History & Past Concerts – Songkick|accessdate=28 Luanistyn 2016}}</ref> as [[Ultra Music Festival]] ayns Miami.<ref>{{cite web|url=http://www.residentadvisor.net/dj/jessieandrews/dates|title=RA: Jessie Andrews tour dates|work=Resident Advisor|accessdate=28 Luanistyn 2016}}</ref> Ayns Sauin 2015 hie Andrews er turrys 'syn Austrail 'syn eailley smoo 'sy çheer, [[Stereosonic]], as ee cloie ayns Sydney, Melbourne, Perth, Adelaide as Brisbane chammah as ayns fo-chonsert ayns Sydney marish [[Diplo]].<ref>{{cite web|url=http://www.acclaimmag.com/lifestyle/interview-jessie-andrews/|title=Jessie Andrews will be touring Australia with Stereosonic 2015 [NSFW]|accessdate=28 Luanistyn 2016|archiveurl=https://web.archive.org/web/20171028044245/http://www.acclaimmag.com/lifestyle/interview-jessie-andrews/|archivedate=28 Jerrey Fouyir 2017}}</ref> Ayns 2016, ren Andrews skeaylley magh y singyl "Slowly" trooid OneLove Recordings.<ref>{{cite web|title=Jessie's "Slowly"|url=https://soundcloud.com/jessieslife/slowly|website=[[SoundCloud]]}}</ref> ====Singylyn==== {| class="wikitable plainrowheaders" style="text-align:center;" |- ! scope="col" style="width:22em;"| Enmys ! scope="col"| Blein ! scope="col"| Lipaid |- ! scope="row"| "I Never Knew"<ref>{{cite web|title=I Never Knew – Single|url=https://itunes.apple.com/us/album/i-never-knew-single/id687824645|work=[[iTunes Store]]|accessdate=4 Averil 2014}}</ref> | 2013 | Ultra Records<ref name="sp">{{cite web|title=Jessie Andrews's music|url=https://open.spotify.com/artist/5q3Bdvbj3wNIZ2QljkbtSs|website=[[Spotify]]}}</ref> |- ! scope="row"| "In Motion" EP | 2014 | ZIVS/Metropolis Records<ref name="sp"/> |- ! scope="row"| "You Won't Forget Tonight"<ref>{{cite web|title=You Won't Forget Tonight (feat. Comets We Fall) – Single|url=https://itunes.apple.com/us/album/you-wont-forget-tonight-feat./id836830633|work=iTunes Store|accessdate=4 Averil 2014}}</ref> | 2014 | Ultra Records<ref name="sp"/> |- ! scope="row"| "Usually Deep" EP | 2015 | ZIVS/Metropolis Records<ref name="sp"/> |- ! scope="row"| "GRIND"<ref>{{cite web|title=GRIND – Single|url=http://inthemix.junkee.com/were-premiering-the-new-single-from-jessie-andrews/133969|work=[[iTunes Store]]|accessdate=24 Mee ny Nollick 2015|archivedate=2015-11-23|archiveurl=https://web.archive.org/web/20151123015848/http://inthemix.junkee.com/were-premiering-the-new-single-from-jessie-andrews/133969}}</ref> | 2015 | OneLove Recordings |- ! scope="row"| "Slowly" | 2015 | OneLove Recordings<ref name="sp"/> |} ====EPyn Aavestit==== {| class="wikitable plainrowheaders" style="text-align:center;" |- ! scope="col"| Enmys ! scope="col"| Sonreeaghtyn ! scope="col"| Rolley arraneyn |- ! scope="row" | I Never Knew (Remixes) | * Skeaylt: 2013 * Lipaid: [[Ultra_Music|Ultra Records]] * Cummaghyn: Jeelaadey bun-earrooagh | * I Never Knew (Bais Haus Remix) * I Never Knew (Fei-Fei's Faded Remix) * I Never Knew (Jen Lasher Faded Remix) * I Never Knew (Prince Club Remix) * I Never Knew (TJANI Remix) |- ! scope="row" | I Never Knew (Remixes) | * Skeaylt: 2013 * Lipaid: [[Ultra_Music|Ultra Records]] * Cummaghyn: Jeelaadey bun-earrooagh | * I Never Knew (Bais Haus Remix) * I Never Knew (Fei-Fei's Faded Remix) * I Never Knew (Jen Lasher Faded Remix) * I Never Knew (Prince Club Remix) * I Never Knew (TJANI Remix) |- ! scope="row" | I Never Knew (Remixes) | * Skeaylt: 2014 * Lipaid: M:UK * Cummaghyn: Jeelaadey bun-earrooagh | * You Won't Forget Tonight ft. Comets Will Fall * You Won't Forget Tonight ft. Comets Will Fall (Document One Remix) * You Won't Forget Tonight ft. Comets Will Fall ([[Indian_Summer_(gienteyder recortys)|Indian Summer]] Remix) |} ===Scannaneaght ard-stroo=== Chossyn Andrews y paart toshee 'sy fillym ''[[Love Bomb (fillym 2025)|Love Bomb]]'' (2025) er [[Amazon Prime Video]] as, chammah's shen, t'ee er ny screeu, stiurey, as cloie ayns y chied fillym giare eck, ''[[Tell Me Something (fillym giare 2025)|Tell Me Something]]'' (2025).<ref>{{cite web |last=Andrews |first=Jessie |date=17 Averil 2025 |title=Behind the scenes of Jessie Andrews' new film 'Tell Me Something' |url=https://www.russh.com/behind-the-scenes-jessie-andrews-film-tell-me-something/ |website=Russh}}</ref> ==Bea phersoonagh== Ta Andrews jeh eiraght mestit. T'ee jeh sluight Sheenagh Sheenagh, Latvagh as Yernagh.<ref name="Kinsella 2015">{{cite web |last=Kinsella |first=Felicity |url=https://i-d.vice.com/en_gb/article/jessie-andrews-talks-body-ownership-and-objectification |title=Jessie Andrews Talks Body Ownership and Objectification |website=[[i-D]] |publisher=Vice Media |date=30 Mayrnt 2015 |archive-date=31 Jerrey Souree 2015 |archive-url=https://web.archive.org/web/20150731234538/https://i-d.vice.com/en_gb/article/jessie-andrews-talks-body-ownership-and-objectification |url-status=dead}}</ref> ==Aundyryn== {| class="infobox" style="width: 25em; text-align: left; font-size: 90%; vertical-align: middle;" |+ <span style="font-size: 9pt">'''Rolley accolaidyn bronnit er Jessie Andrews'''</span> |- | colspan=3 | {| class="collapsible collapsed" style="width:100%;" ! colspan="3" style="background:#d9e8ff; text-align:center;"| Aundyryn as enmyssaghtyn |- style="background:#d9e8ff; text-align:center; text-align:center;" || '''Aundyr''' | style="background:#cec; text-size:0.9em; width:50px;"| '''Cosnit''' | style="background:#fcd; text-size:0.9em; width:50px;"| '''Enmyssit''' |- | style="text-align:center;"| ;Aundyryn AVN |{{won|1}} |{{nom|11}} |- | style="text-align:center;"| ;Aundyryn XBIZ |{{won|3}} |{{nom|11}} |- | style="text-align:center;"| ;Aundyryn XRCO |{{won|2}} |{{nom|4}} |} |- style="background:#d9e8ff;" | style="text-align:center;" colspan="3"|'''Slane earroo ny cosnaghyn as ny h-enmyssaghtyn''' |- |{{won|'''Y clane'''}} |{{won|'''6'''}} |{{nom|'''26'''}} |- |} {| class="wikitable sortable" |- ! Blein ! Aundyr ! Ronney ! Obbyr |- | rowspan=5 | 2012 | rowspan=2 | [[Aundyr XBIZ]] | Rolteen Noa yn Vlein<ref name="Miller 2012">{{cite news |last1=Miller |first1=Dan |title=2012 XBIZ Award Winners Announced |url=https://www.xbiz.com/news/143012/2012-xbiz-award-winners-announced |access-date=9 Jerrey Souree 2025 |work=XBIZ |date=12 Jerrey Geuree 2012 |language=Baarle}}</ref> | {{n/a}} |- | Cloie yn Vlein<ref>{{cite web |url=http://xbizawards.xbiz.com/nominees.php |title=XBIZ Awards 2012 – Nominees |year=2011 |publisher=XBIZ |url-status=dead |archive-url=https://web.archive.org/web/20120131025101/http://xbizawards.xbiz.com/nominees.php |archive-date=31 Jerrey Geuree 2012}}</ref> | rowspan=3|''[[Portrait of a Call Girl]]'' |- | [[Aundyr AVN]] | [[Aundyr AVN da'n Ven-aghteyr Share|Y Ben-aghteyr Share]]<ref>{{cite web |url=http://avnawards.avn.com/2012_AVN_Awards_nominations.pdf |title=Avn Awards 2012 – Nominations |year=2011 |publisher=AVN Awards |url-status=dead |archive-url=https://web.archive.org/web/20130329124455/http://avnawards.avn.com/2012_AVN_Awards_nominations.pdf |archive-date=29 Mayrnt 2013}}</ref><ref>{{cite news |author1=<!--anonymous author(s)--> |title=AVN Announces the 2012 AVN Award Winners |url=https://avn.com/news/video/avn-announces-the-2012-avn-award-winners-125226 |access-date=9 Jerrey Souree 2025 |work=AVN |date=22 Jerrey Geuree 2012}}</ref> |- | rowspan=2 | [[Aundyr XRCO]] | Y Ben-aghteyr Share<ref>{{cite news |last1=Sanford |first1=John |title=XRCO Award Winners Announced |url=https://www.xbiz.com/news/147070/xrco-award-winners-announced |access-date=9 Jerrey Souree 2025 |work=XBIZ |date=12 Averil 2012 |language=Baarle}}</ref> |- | Rolteen Noa Share | {{n/a}} |- | 2016 | Aundyr XBIZ | Reayrtys Comyssey Share – Doodeeyn Ynrican<ref name="XBIZ 2016">[https://web.archive.org/web/20120103173201/http://www.xbizawards.com/winners.php XBIZ Award Winners], XBIZ, Jerrey Geuree 2016</ref> | ''[[Jessie Loves Girls]]'' |- |} ==Imraaghyn== {{rolleyimraaghyn}} ==Kianglaghyn magh== {{commonscat}} * {{official website|http://www.jessieandrewsofficial.com}} * {{Imdb name|3992720}} * {{IAFD ennym|gender=f|id=JessieAndrews}} * {{afdb name|id=57616|gender=female}} * {{Instagram}} * {{Twitter}} {{AVN Best Actress}} {{XBIZ Best Actress}} {{Penthouse Pets 2014}} {{Gurneil eaghtyrys}} {{DEFAULTSORT:Andrews, Jessie}} [[Ronney:Ruggyryn 'sy vlein 1992]] [[Ronney:Feallee vio]] [[Ronney:Aghteyryn bwoirrin Americaanagh y 21d eash]] [[Ronney:Kiaulleyderyn bwoirrin Americaanagh y 21d eash]] [[Ronney:Kiaddeyderyn Americaanagh y 21d eash]] [[Ronney:Aghteyryn pornograafagh bwoirrin Americaanagh]] [[Ronney:Aghteyryn pornograafagh bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Aghteyryn fillym bwoirrin Americaanagh]] [[Ronney:Aghteyryn çhellveeish bwoirrin Americaanagh]] [[Ronney:Aghteyryn bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Aghteyryn ass Florida]] [[Ronney:Aghteyryn ass California]] [[Ronney:Craishteyderyn an-ghraagh bwoirrin Americaanagh]] [[Ronney:Craishteyderyn an-ghraagh bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Craishteyderyn bwoirrin Americaanagh]] [[Ronney:Craishteyderyn bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Craishteyderyn ass Florida]] [[Ronney:Craishteyderyn ass California]] [[Ronney:Kiaddeyderyn cliejeenys Americaanagh]] [[Ronney:Kiaddeyderyn fassan bwoirrin Americaanagh]] [[Ronney:Kiaddeyderyn fassan ass California]] [[Ronney:Kiaddeyderyn fassan ass Florida]] [[Ronney:Markee jysk woirrin Americaanagh]] [[Ronney:Kiaulleyderyn bwoirrin Americaanagh]] [[Ronney:Kiaulleyderyn bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Kiaulleyderyn ass Florida]] [[Ronney:Kiaulleyderyn ass California]] [[Ronney:Ellyneyryn Ultra Records]] [[Ronney:Penthouse Pets]] [[Ronney:Cosneyderyn Aundyr AVN]] [[Ronney:Cosneyderyn Aundyr XMA]] [[Ronney:Cosneyderyn Aundyr XRCO]] [[Ronney:Feallee ass Miami]] [[Ronney:Americaanee jeh sluight Yernagh]] [[Ronney:Americaanee jeh sluight Latvagh]] [[Ronney:Americaanee jeh sluight Sheenagh]] qtrt1lzoudnnrf9obwawym3ktg18piy Stoya 0 24916 392808 388836 2026-09-06T01:49:55Z InternetArchiveBot 16702 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 392808 wikitext text/x-wiki {{WD Kishtey Fys Dooinney | jalloo = Stoya 2014.jpg | enmyn_elley = Stoya Doll | boayl_ruggyr = [[Wilmington, Carolina Hwoaie|Wilmington]], [[Carolina Hwoaie]], ny Steatyn Unnaneysit | ashoonaght = [[Americaanee|Americaanagh]] | towshan = 34D-25-34 | trimmid = {{trimmid|kg=57}} | yrjid = {{yrjid|m=1.70}} }} She [[aghteyr pornograafagh|ben-aghteyr pornograafagh]], craishteyder, as screeudeyr Americaanagh ee '''Stoya''' (ruggit er 15 Mean Souree 1986).<ref>{{Cite web |title=About Jessica Stoya – Hello, I'm Stoya |url=https://www.hellostoya.com/about/ |access-date=2024-10-10 |language=Baarle}}</ref> Ghow ee toshiaght rish e coorse-bea 'sy phornograafaght 'sy vlein 007 'sy reayn [[pornograafaght chaghlaaee]], as veih 2009 t'ee er ny obrraghey ayns meanyn neu-phornograafagh, goaill stiagh y straih fansee lesbeeagh ''[[Dagger Kiss]]'' veih'n vlein 2016. Veih 2019, t'ee er ny cho-screeu yn [[colloo keintys]] "How to Do It" da ''[[Slate (earishlioar)|Slate]]'' fo'n fo-linney '''Jessica Stoya'''.<ref>{{Cite web |url=https://slate.com/author/stoya |title=Jessica Stoya |website=[[Slate (earishlioar)|Slate]] |language=Baarle |access-date=2021-07-09}}</ref> ==Bea leah== Va Stoya ruggit ayns [[Wilmington, Carolina Hwoaie]]<ref name="Stosuy">{{cite web |url=http://www.thefanzine.com/articles/columns/209/an_interview_with_stoya/1 |title=An Interview with Stoya |first=Brandon |last=Stosuy |date=18 Jerrey Geuree 2008 |work=The Fanzine}}</ref> lesh ayr Albinagh as moir Herbagh.<ref>{{cite news |author=<!--ughtar(yn) neu-enmyssit--> |date=2012-09-03 |title=The Charlatan's conversation with adult film star Stoya |url=https://charlatan.ca/the-charlatans-conversation-with-adult-entertainment-star-stoya/ |access-date= |work=[[The Charlatan (earishlioar studeyr)|The Charlatan]] |publication-place=Ottawa |issn=0315-1859}}</ref> V'ee enmyssit Jessica lurg [[Jessica Savitch]].<ref name="Stoya 2014"/> Myr paitçhyey, v'ee geearree ve ny daunseyr, as ghow ee toshiaght rish lessoonyn daunse as ee tree bleeaney d'eash. Hooar ee e ynsagh 'sy thie as hooar ee e keim scoill ard roish my ren ee roshtyn shey bleeaney jeig d'eash.<ref name="Hess">{{Cite news |last=Hess |first=Amanda |author-link=Amanda Hess |date=24 Averil 2013 |title=Stoya, Pop Star of Porn |url=https://www.villagevoice.com/stoya-pop-star-of-porn/ |access-date= |work=[[The Village Voice]]}}</ref> Er-yn-oyr dy row yn ayr eck gobbraghey 'sy [[Çhaghnoaylleeaght-fysseree|ÇF]], va raad foshlit j'ee da'n lectraneaghys as da cullee ghammanyn as, lesh cooney yn raad shen, ren ee lhiasaghey yn graih eck da'n çhaghnoaylleeaght.<ref name="Technically Philly">{{cite web |first=Christopher |last=Wink |date=2009-05-27 |title=South Philly's Stoya: adult film it girl on DOS, social media and leaving Philadelphia |url=https://technical.ly/phillyfeatures/south-phillys-stoya-adult-film-it-girl-on-dos-social-media-and-leaving-philadelphia |access-date= |website=Technically Philly }}</ref> Erreish j'ee scughey da [[Philadelphia]], ren ee frastyl er claare houree ec [[UArts]]. Tra v'ee ayn, ren ee obbraghey myr scrudeyr, rheynneyder duillageenyn, as myr [[daunseyr go-go]]. Chloie ee ayns feeshanyn kiaullee eigsoylagh agh, er lhee, she feeshanyn kiaullee nagh beagh ry-chlashtyn ec y chooid smoo jeh sleih.<ref name="Stosuy" /> Ayns Boaldyn 2009, dooyrt Stoya dy row ee garraghey veih Philadelphia dys [[Los Angeles]] ayns fouyr y vlein shen.<ref name="Technically Philly"/> ==Coorse bea== ===Pornograafaght=== Hoshee Stoya shassoo da jallooyn da sleih aasit son carrey lhee,<ref name="Stoya 2014">{{cite news |author=Stoya |date=9 Mayrnt 2014 |title=Can We Learn About Privacy From Porn Stars? |url=https://www.nytimes.com/2014/03/09/opinion/sunday/can-we-learn-about-privacy-from-porn-stars.html |url-access=limited |newspaper=The New York Times |page=SR5 |issn=0362-4331 |id={{proquest|1505076429}} }}</ref> red chur ee rish craishtey as obbraghey da ynnydyn-eggey [[pornograafaght chaghlaaee|an-ghraagh caghlaaee]]. Reih ee yn [[ennym ardan]] eck as eh bunnit er aagherrid yn ennym neu-phoosee lesh y mwarree Herbagh<ref name="Hess"/><ref name="Stoya 2014" /> as chur ee eh fo cowrey keirdey 'sy vlein 2009.<ref name="Hess" /> Va Stoya taishbynit ayns daa obbyr DVD da Razordolls, as chloie ee [[paart cameo|paartyn cameo]] neu-chomyssagh and daa enmys lesh [[Vivid Entertainment|Vivid Alt]]<ref name="debut" /> roish my ren [[Digital Playground]] cur eam urree as treealtys cloie ayns [[Pornograafaght lesbeeagh|reayrtys lesbeeagh]] marish [[Sophia Santi]]. Cha daghyr yn obbyr shen agh, ayns Luanistyn 2007, ren ee çheet quail ynnydee veih Digital Playground chur feysht y chomyssey marish cloiederyn firryn j'ee. Lurg smooinaght howshit, choard Stoya rish.<ref name="Stosuy" /> Ayns Jerrey Fouyir 2007, ren Stoya fo-screeu lesh Digital Playground ayns coardailys tree bleeaney.<ref>{{cite web |type=fogrey naight |url=http://corp.digitalplayground.com/about.php?newsid=974&yr=&mon=&tab=news |title=Digital Playground Announces the exclusive signing of Stoya |date=18 Jerrey Fouyir 2007 |publisher=Digital Playground |archive-url=https://web.archive.org/web/20081215132536/http://corp.digitalplayground.com/about.php?newsid=974&yr=&mon=&tab=news |archive-date=15 Mee ny Nollick 2008 |df=mdy-all}}</ref> Ta Stoya coontit myr y chied doodee coardailys 'sy phornograafaght chaghlaaee rieau.<ref name="stroud">{{cite web |url=http://www.citypaper.net/articles/2008/11/13/meet-south-phillys-stoya |title=Meet South Philly's Stoya |first=Matt |last=Stroud |date=12 Mee Houney 2008 |work=Philadelphia City Paper |url-status=dead |archive-url=https://web.archive.org/web/20081216065954/http://www.citypaper.net/articles/2008/11/13/meet-south-phillys-stoya |archive-date=16 Mee ny Nollick 2008 }}</ref> She ''[[Stoya Video Nasty]]'' va'n chied reayrtys ren ee glackey daue (er n'yrjaghey er y chishtey DVD myr y chied ard-fillym raad t'ee cloie ayns comyssey hetracheintyssagh), agh she ''[[Jack's POV 9]]'' va'n chied fillym va skeayllit magh lesh y cholught.<ref name="Stosuy" /><ref name="debut">{{cite web |url=http://business.avn.com/articles/4635.html |title=DP's Stoya Makes Her Boy/Girl Debut in Jack's POV 9 |first=David |last=Sullivan |date=6 Mee ny Nollick 2007 |work=AVN |url-status=dead |archive-url=https://web.archive.org/web/20091204161355/http://business.avn.com/articles/4635.html |archive-date=4 Mee ny Nollick 2009 }}</ref> 'Sy vlein 2012, va Stoya enmyssit lesh [[CNBC]] myr nane jeh'n 12 ven-aghteyr pornograafagh smoo mianit.<ref>{{cite web | last=Morris | first=Chris | title=The Dirty Dozen 2012: Porn's Most Popular Stars | publisher=[[CNBC]] | date=18 Jerrey Geuree 2012 | url=https://www.cnbc.com/2012/01/18/The-Dirty-Dozen-2012:-Porns-Most-Popular-Stars.html }}</ref> Ga dy row Stoya fo coardailys liehlagh lesh Digital Playground,hooar y stiureyder [[John Stagliano]] veih [[Evil Angel (seyrlann)|Evil Angel]] "kied er lheh" 'sy vlein 2013 son ish dy cheau stiagh ayns fillym eiyrtyssagh y straih fillym da sleih aasit, ''[[Voracious (straih fillym)|Voracious]]''.<ref>{{cite web |url=http://www.xbiz.com/news/163837 |title=John Stagliano Discusses 'Voracious' Sequel |access-date=23 Mean Souree 2013 |first=Dan |last=Miller |date=11 Mean Souree 2013 |website=[[XBIZ]]}}</ref> 'Sy vlein 2014, daag ee Digital Playground as ren ee jeeraghey er e coorse bea myr stiureyder. Chur ee e argid hene rish, as stiur ee, e kied fillym ayns Toshiaght Arree 2014.<ref>{{cite web |url=https://www.cnbc.com/2014/01/17/the-economics-of-being-an-independent-porn-star.html |title=The economics of being an independent porn star |first=Chris |last=Morris |date=17 Jerrey Geuree 2014 |publisher=[[CNBC]] |access-date=28 Jerrey Geuree 2014}}</ref> Er 4 Mayrnt 2014, chroo Stoya as [[Kayden Kross]] yn ynnyd-eggey pornograafagh "eeck-rere-reayrtys" TRENCHCOATx. Cur liorish e paart myr shellooder yn ynnyd-eggey, ren Stoya cloie as stiurey shirtanse jeh ny filmyn ayn.<ref name="trenchcoat">{{cite web |url=https://www.vice.com/read/stoya-takes-a-bath-and-talks-about-her-new-pay-per-scene-website-456 |archive-url=https://web.archive.org/web/20150307112622/http://www.vice.com/read/stoya-takes-a-bath-and-talks-about-her-new-pay-per-scene-website-456 |archive-date=7 Mayrnt 2015 |title=Stoya Takes a Bath and Talks About Her New Pay-Per-Scene Porn Site |last1=Allouche |first1=Lucie |website=Vice |date=6 Mayrnt 2015}}</ref> 'Sy vlein 2018, ren Stoya shiaulley yn ynnyd-eggey zerospaces.com lesh e parteeas dellal, y fer aitt Mitcz Marzoni.<ref name="Garcia 2018">{{Cite web |last=Garcia |first=Laia |date=13 Mee Houney 2018 |title=How Stoya's progressive new online space is revolutionising porn |url=https://www.sleek-mag.com/article/stoya/ |access-date=2020-07-24 |website=Sleek-mag.com |language=Baarle}}</ref> ===Cloie ard-stroo=== [[Coadan:Stoya.jpg|thumb|Stoya ayns "The Kingpin of Pain" (2009)]] 'Sy vlein 2009, chloie Stoya 'sy chied halee fillym neu-anghraagh eck myr Kamikazi Shegun 5000 'sy fillym giare "The Kingpin of Pain" da'n feailley fillym [[48 Hour Film Project]].<ref>{{cite web |last=Krumm |first=Allison |date=15 Boaldyn 2009 |title=48 Hours of Philmmaking |url=http://phillyist.com/2009/05/15/48_hours_of_philmmaking.php |access-date=14 Mayrnt 2010 |website=Phillyist |archive-date=2 Mayrnt 2010 |archive-url=https://web.archive.org/web/20100302214144/http://phillyist.com/2009/05/15/48_hours_of_philmmaking.php |url-status=dead }}</ref> Chloie Stoya myr nane jeh ny preeu-aghteyryn 'sy straih fansee lesbeeagh ''[[Dagger Kiss]]'' 'sy vlein 2016.<ref>{{cite web |title=A lesbian 'Lord of the Rings' makes its debut on Valentine's Day |url=http://divinemagazine.net/a-lesbian-lord-of-the-rings-makes-its-debut-on-valentines-day/ |url-status=dead |archive-url=https://web.archive.org/web/20160307095720/http://divinemagazine.net/a-lesbian-lord-of-the-rings-makes-its-debut-on-valentines-day/ |archive-date=7 Mayrnt 2016 |website=Divinemagazine.net}}</ref> Ayns Toshiaght Arree 2018, chloie Stoya 'sy fillym [[far-skeealaght heanse]] Serbagh ''[[A.I. Rising]]'' (ta enmyssit ''Ederlezi Rising'' chammah) ayns paart yn [[Android (robot)|android]], Nimani, er mishoon spoar marish [[shiaulteyr rollageagh]] va cloiet lesh yn aghteyr Sloveanagh [[Sebastian Cavazza]]. Ta'n piyr jeu çheet dy ve kianglt dy romansagh ry-cheilley tra ta'n shiaulteyr rollageagh smooinaghtyn dy vel red dooinidagh çheusthie jeh'n chumraag android echey.<ref>{{cite news |last=Delia |first=John Sr. |date=11 Mayrnt 2019 |title='A.I. Rising' Android in Love |url=https://acedmagazine.com/a-i-rising-android-in-love/ |access-date=24 Jerrey Souree 2020 |work=Aced}}</ref> Ta Stoya er ny chloie ayns daa chloie ardan [[Off Broadway]] lesh [[Dean Haspiel]]: ''Harakiri Kane (Die! Die, Again!)'' (2017)<ref name="BWW-20170912">{{cite news |last=Cristi |first=A.A. |title=Fall Season Announced at The Brick! |url=https://www.broadwayworld.com/brooklyn/article/Fall-Season-Announced-at-The-Brick-20170912 |date=12 Mean Fouyir 2017 |work=[[BroadwayWorld]] |access-date=13 Boaldyn 2020}}</ref> as ''The Last Bar at the End of the World'' (2018).<ref name="BWW-20180415">{{cite news |title=The Last Bar at the End of the World at Urban Stages |url=https://www.broadwayworld.com/off-off-broadway/regional/The-Last-Bar-at-the-End-of-the-World--240204 |date=15 Averil 2018 |work=[[BroadwayWorld]] |access-date=26 Jerrey Geuree 2026}}</ref> ===Screeudeyrys=== Ta Stoya er ny screeu [[colloo coyrle keintys|collooyn coyrle keintys]] da ''[[Slate (earishlioar)|Slate]]'',<ref>{{Cite web |title=How to Do It |url=https://slate.com/human-interest/how-to-do-it |access-date=2020-07-08 |website=Slate |language=Baarle}}</ref> ''[[Vice (earishlioar)|Vice]]'',<ref name="Hess" /><ref name="Vice">{{cite web |url=https://www.vice.com/en/contributor/stoya/ |access-date=26 Jerrey Geuree 2026 |title=Stoya |website=Vice}}</ref> ''[[The Verge]]'',<ref>{{cite web |url=https://www.theverge.com/2015/7/18/8994541/stoya-sex-advice-column-7-18-15 |title=Please meet our new sex columnist, Stoya |author=Stoya |work=The Verge |date= 18 Jerrey Souree 2015 |access-date=3 Mee ny Nollick 2015}}</ref> as ''[[Refinery29]]''.<ref>{{cite web |url=https://www.refinery29.com/2014/01/61597/stoya-sex-advice |title=The Best Sex Advice, Courtesy Of Stoya |author=Stoya |date=31 Jerrey Geuree 2014 |website=Refinery29}}</ref> Da'n cholloo ayns ''Slate'', "How To Do It", t'ee gymmydey yn fo-linney Jessica Stoya.<ref>{{Cite web |url=https://slate.com/author/stoya |title=Jessica Stoya |website=Slate |language=Baarle |access-date=2021-07-09}}</ref> T'ee er ny hoilshaghey peeshyn ayns ''[[The New York Times]]'',<ref name="Stoya 2014" /><ref name="Stoya 2018a">{{cite news |author=Stoya |title=Can There Be Good Porn? |url=https://www.nytimes.com/2018/03/04/opinion/stoya-good-porn.html |date=4 Mayrnt 2018 |work=The New York Times |issn=1553-8095 |access-date=5 Mayrnt 2019 |url-access=limited}}</ref><ref name="Stoya 2018b">{{cite news |author=Stoya |title=What Is Porn? |url=https://www.nytimes.com/2018/03/16/opinion/porn.html |date= 16 Mayrnt 2018 |work=The New York Times |issn=1553-8095 |access-date=5 Mayrnt 2019 |url-access=limited}}</ref> ''[[New Statesman]]'',<ref>{{cite web |url=http://www.newstatesman.com/2015/05/what-porn-actors-don-t-talk-about |title=What porn actors don't talk about |author=Stoya |date=1 Mean Souree 2015 |work=The New Statesman |url-access=limited}}</ref> ''[[Esquire (earishlioar)|Esquire]]'',<ref>{{cite magazine |url=http://www.esquire.com/blogs/culture/masters-of-sex-stoya |title=10 Things Stoya Learned from ''Masters of Sex'' |author=Stoya |date=4 Mee Houney 2013 |magazine=Esquire}}</ref> as ''[[The Guardian]]'',<ref>{{Cite news |author=Stoya |url=https://www.theguardian.com/commentisfree/2012/nov/16/stoya-measureb-porn-condoms-la |title=Making porn actors wear condoms is not the best way to protect us |date= 16 Mee Houney 2012 |work=The Guardian |access-date=28 Jerrey Souree 2017 |issn=0261-3077}}</ref> chammah as art ayns ''[[Porn Studies]],'' jurnyl ard-scoillaragh baghtit lesh sleih cosoylagh.<ref>{{cite journal |author=Stoya |title=Feminism and the mainstream |journal=Porn Studies |issn=2326-8751 |volume=1 |issue=1–2 |pages=201–202 |doi=10.1080/23268743.2014.888256 |date=2014}}</ref> Hoilshee ee e chied lioar 'sy vlein 2018 &ndash; ta enmyssit ''Philosophy, Pussycats, and Porn'' &ndash; çhaglym dy hraaghtyn persoonagh as cremeydagh.<ref>{{Cite web |url=https://www.theguardian.com/books/2018/jun/28/stoya-philosophy-pussycats-porn-interview |title=Stoya: 'I thought female sexuality was an OK thing?' |last=Reith |first=James |date=28 Mean Souree 2018 |website=The Guardian |language=Baarle |access-date=21 Luanistyn 2018}}</ref><ref>{{Cite news |url=https://jezebel.com/stoya-is-over-talking-about-feminist-porn-1826771529 |title=Stoya Is 'Over' Talking About Feminist Porn |last=Clark-Flory |first=Tracy |work=Jezebel |access-date=22 Luanistyn 2018 |language=Baarle}}</ref> ==Bea phersoonagh== Ta Stoya er ny chur bwooise da scansh y [[moggyley sheshoil|voggyley sheshoil]] 'sy choorse bea eck;<ref name="Stosuy" /> v'ee feer vio er [[MySpace]], [[Twitter]], [[Tumblr]],<ref>{{cite web |title=Stoya |url=http://stoya.tumblr.com |archive-url=https://archive.today/20170826232748/http://stoya.tumblr.com/ |url-status=live |archive-date=26 Luanistyn 2017 |access-date=26 Jerrey Geuree 2026 |url-access=registration |via=Tumblr}}</ref> as forymyn eddyr-voggyl eigsoylagh. Ayns Mean Souree 2009, v'eh fogrit magh dy row ee sooraghey marish [[Marilyn Manson]],<ref name="Rifkind 2009">{{cite news |last1=Rifkind |first1=Hugo |title=A most bizarre encounter with Marilyn Manson |url=https://www.thetimes.com/travel/destinations/uk-travel/england/london-travel/a-most-bizarre-encounter-with-marilyn-manson-l3wxx28wlq9 |access-date=27 Luanistyn 2023 |work=[[The Times]] |issn=0140-0460 |date=5 Mean Souree 2009 |location=Lunnin |url-access=limited}}</ref> agh ny s'anmee ren ad scarrey veih my cheilley kyndagh rish skedjal turryssagh Manson.<ref>{{cite web |url=http://www.xcitement.com/interview/?page_id=1040 |title=Xcitement Interviews: Stoya |first=Cindi |last=Loftus |work=Xcitement.com |date=Averil 2011 |url-status=dead |archive-url=https://web.archive.org/web/20110926191814/http://www.xcitement.com/interview/?page_id=1040 |archive-date= 26 Mean Fouyir 2011 }}</ref> Ny s'anmee, va sooree eddyr ee as yn aghteyr pornograafagh [[James Deen]] feie shiartanse dy vleeantyn.<ref name="Deitz 2015">{{cite web |last1=Deitz |first1=Bibi |title=When Did James Deen And Stoya Date? |url=https://www.bustle.com/articles/127253-when-did-james-deen-and-stoya-date-heres-what-we-know-about-the-former-couple |website=Bustle |access-date=27 Luanistyn 2023 |date=4 Mee ny Nollick 2015}}</ref><ref>{{Cite web |title=Mee ny Nollick 2017 |url=http://graphicdescriptions.com/42-december17 |website=Graphicdescriptions.com |author=Stoya |url-status=dead |archive-url=https://web.archive.org/web/20160122091951/http://graphicdescriptions.com/42-december17 |archive-date=22 Jerrey Geuree 2016 }}</ref> 'Sy vlein 2015, ren Stoya fogrey magh noi'n phobble dy ren eh eginaghey urree,<ref>{{Multiref2 | {{cite news |last=Gibson |first=Caitlin |date=30 Mee Houney 2015 |title=James Deen, Porn's 'Feminist' Sweetheart, Accused of Sexual Assault |url=https://www.washingtonpost.com/news/arts-and-entertainment/wp/2015/11/30/james-deen-porns-feminist-sweetheart-accused-of-sexual-assault/ |work=The Washington Post |issn=2641-9599 |id={{proquest|1737944388}} |url-access=limited |ref=none}} | {{cite news |last=Carroll |first=Rory |date=30 Mee Houney 2015 |title=Porn Industry Groups Cut Ties to Star James Deen Amid Sexual Assault Claims |url=https://www.theguardian.com/us-news/2015/nov/30/james-deen-sexual-assault-accusations-stoya-porn-industry |work=The Guardian |access-date= 26 Jerrey Geuree 2026 |ref=none}} | {{cite news |last=Mack |first=David |date=28 Mee Houney 2015 |title=Porn Actor James Deen Accused Of Rape By Ex-Girlfriend Stoya |url=https://www.buzzfeednews.com/article/davidmack/porn-star-james-deen-accused-of-rape-by-ex-girlfriend |work=BuzzFeed News |access-date=26 Mee Houney 2026 |ref=none}} | {{cite news |author=<!--anonymous author(s)--> |date=2 Mee ny Nollick 2015 |title=Rape Allegations Against Porn Star James Deen Raise Consent Issues in Porn Industry |url=https://abcnews.go.com/Entertainment/rape-allegations-porn-star-james-deen-raise-consent/story?id=35531413 |publisher=ABC News |access-date=26 Jerrey Geuree 2026 |ref=none}} }}</ref> as screeu ee er Twitter: {{cquote |text=James Deen held me down and fucked me while I said no, stop, used my [[safeword]]. I just can't nod and smile when people bring him up anymore.<ref>[Ren James Deen freill mish sheese as ren eh dy my yibbag choud's dooyrt mee nagh row mee laccal eh, stadd, as ren mee ymmyd jeh'n [[fockle sauçhey|'ockle sauçhey]] aym. Cha nel mee jargal nish snoggal as mongey as sleih elley ginsh my-e-chione]<br/>{{Multiref2 | {{cite news |author=<!--anonymous author(s)--> |date=25 Jerrey Geuree 2016 |title=James Deen Just Won Some Porn Oscars, Despite Rape Allegations |url=https://i-d.co/article/james-deen-just-won-some-porn-oscars-despite-rape-allegations/ |work=i-D |access-date=26 Jerrey Geuree 2026 |ref=none}} | {{cite news |last=Nashrulla |first=Tasneem |date=1 Mee ny Nollick 2015 |title=Here Are The Women Who Have Accused James Deen Of Sexual Abuse And Assault |url=https://www.buzzfeednews.com/article/tasneemnashrulla/here-are-the-women-who-have-accused-james-deen-of-sexual-ass |work=BuzzFeed News |access-date= 26 Jerrey Geuree 2026 |ref=none}} | {{cite news |last=Carroll |first=Rory |date= 30 Mee Houney 2015 |title=Porn Industry Groups Cut Ties to Star James Deen Amid Sexual Assault Claims |url=https://www.theguardian.com/us-news/2015/nov/30/james-deen-sexual-assault-accusations-stoya-porn-industry |work=The Guardian |access-date= 26 Jerrey Geuree 2026 |ref=none}} | {{cite web |last=Visser |first=Nick |date= 29 Mee Houney 2015 |title=Porn Star Stoya's Rape Allegations Against James Deen Prompt Powerful Hashtag |work=HuffPost |url=https://www.huffpost.com/entry/stoya-james-deen-rape-allegations-prompt-powerful-hashtag_n_565b7656e4b08e945feb83cf |access-date = 26 Jerrey Geuree 2026 |ref=none}} }}</ref>}} Ren Deen jiooldey lhiassaghyn Stoya, as dooyrt eh dy nee lhiassaghyn "foalsey as caartagh" v'ad.<ref>{{Multiref2 | {{cite news |last=Gibson |first=Caitlin |date=8 Mee ny Nollick 2015 |title=James Deen Denies Rape Allegations{{nbsp}}{{emdash}} and Says He 'Never Claimed to Be a Feminist.' |url=https://www.washingtonpost.com/lifestyle/style/james-deen-denies-rape-allegations--and-says-he-never-claimed-to-be-a-feminist/2015/12/08/20ca9f24-9dbd-11e5-bce4-708fe33e3288_story.html |work=The Washington Post |issn=2641-9599 |id={{proquest|1746801659}} |url-access=limited |ref=none}} | {{cite news |author=<!--anonymous author(s)--> |date=3 Mee ny Nollick 2015 |title=Porn Star James Deen Denies Rape Allegations |url=https://www.bbc.com/news/newsbeat-34995932 |work=Newsbeat |publisher=BBC News |access-date=26 Jerrey Geuree 2026 |ref=none}} | {{cite web |last=Broder Van Dyke |first=Michelle |url=https://www.buzzfeednews.com/article/mbvd/porn-actor-james-deen-blasts-false-and-defamatory-rape-claim#.tfzq7Qaym |title=Porn Actor James Deen Blasts 'False And Defamatory' Rape Claims |work=BuzzFeed News |date= 30 Mee Houney 2015 |access-date= 26 Jerrey Geuree 2026 |ref=none}} }}</ref> Lurg y tweet lesh Stoya, hie hoght mraane elley noi'n phobble as lhiassaghyn soiaghey as egin oc noi Deen,<ref>{{Multiref2 | {{Cite news |url=https://www.theguardian.com/culture/2015/dec/04/how-stoya-took-on-james-deen-and-broke-the-porn-industrys-silence |title=How Stoya took on James Deen and broke the porn industry's silence |last=Grant |first=Melissa Gira |date=4 Mee ny Nollick 2015 |newspaper=The Guardian |access-date=26 Jerrey Geuree 2026 |language=Baarle |issn=0261-3077 |ref=none}} | {{cite news |last=Hanson |first=Hilary |date=4 Mee ny Nollick 2015 |title=What To Know About The Sexual Assault Allegations Against James Deen |url=https://www.huffpost.com/entry/james-deen-rape-explainer_n_566063f8e4b079b2818d68f4 |work=HuffPost |access-date=26 Jerrey Geuree 2026 |ref=none}} | {{cite news |last=Nashrulla |first=Tasneem |date=1 Mee ny Nollick 2015 |title=Here Are The Women Who Have Accused James Deen Of Sexual Abuse And Assault |url=https://www.buzzfeednews.com/article/tasneemnashrulla/here-are-the-women-who-have-accused-james-deen-of-sexual-ass |work=BuzzFeed News |access-date=26 Jerrey Geuree 2026 |ref=none}} }}</ref> choud's haink Stoya dy ve ny targaid jeh'n [[tranlaase er-linney]].<ref name="Lee 2016">{{cite journal |last1=Lee |first1=Jiz |last2=Sullivan |first2=Rebecca |date=2016 |title=Porn and Labour: The Labour of Porn Studies |journal=Porn Studies |volume=3 |issue=2 |pages=104–106 |doi=10.1080/23268743.2016.1184474 |doi-access=free}}</ref> Ren shiartanse dy heyrlannyn fillym da sleih aasit giarrey nyn gianglaghyn rish Deen,<ref name="Waugh">{{cite book |last1=Waugh |first1=Chris |date=2023 |chapter=Pornography |editor-last1=Ali |editor-first1=Parveen |editor-last2=Rogers |editor-first2=Michaela M. |title=Gender-Based Violence: A Comprehensive Guide |language=Baarle |publication-place=Cham |publisher=Springer |page=431 |isbn=978-3-031-05640-6 <!--|doi=10.1007/978-3-031-05640-6_31-->}}</ref> as ren yn ynnyd-eggey ''[[The Frisky]]'' cur jerrey rish y cholloo echey.<ref>{{Multiref2 | {{Cite news |url=https://www.theguardian.com/culture/2015/dec/04/how-stoya-took-on-james-deen-and-broke-the-porn-industrys-silence |title=How Stoya took on James Deen and broke the porn industry's silence |last=Grant |first=Melissa Gira |date= 4 Mee ny Nollick 2015 |newspaper=The Guardian |access-date= 26 Jerrey Geuree 2026 |language=Baarle |issn=0261-3077 |ref=none}} | {{cite news |last=Carroll |first=Rory |date=30 Mee Houney 2015 |title=Porn Industry Groups Cut Ties to Star James Deen Amid Sexual Assault Claims |url=https://www.theguardian.com/us-news/2015/nov/30/james-deen-sexual-assault-accusations-stoya-porn-industry |work=The Guardian |access-date=26 Jerrey Geuree 2026 |ref=none}} }}</ref> ==Cooid-chlouit reiht== * {{cite book |author=Stoya |date=2015 |chapter=Noooooooodie Girl |editor-last1=Lee |editor-first1=Jiz |editor1-link=Jiz Lee |title=Coming Out Like a Porn Star: Essays on Pornography, Protection, and Privacy |language=Baarle |location=Berkeley, Calif. |publisher=ThreeL Media |pages=284–286 |isbn=978-0-9905571-6-6 |chapter-url=https://archive.org/details/comingoutlikepor0000unse/page/284/mode/1up/mode/1up?view=theater |chapter-url-access=registration |via=the Internet Archive |ref=none}} * {{cite book |author=Stoya |author-mask=3 |title=Philosophy, Pussycats, & Porn |date=2018 |language=Baarle |location=La Vergne, Tenn. |publisher=Not A Cult |isbn=978-1-9456-4943-1 |ref=none}} ==Aundyryn as enmyssaghtyn== {| class="wikitable" |- ! Blein ! Sharmanys ! Eiyrtys ! Aundyr ! Obbyr |- |rowspan="1"|'''2008''' |[[Eroticline Award]] | {{Cosnit}} |Y Noanee Americaanagh Share<ref>{{cite web |author=<!--anonymous author(s)--> |url=https://avn.com/news/video/digital-playground-wins-four-awards-at-venus-berlin-97368 |title=Digital Playground Wins Four Awards at Venus Berlin |date=21 Jerrey Fouyir 2008 |work=AVN }}</ref><ref>{{cite web |last=Sullivan |first=David |date=22 Jerrey Fouyir 2008 |url=https://avn.com/news/video/exclusive-complete-2008-eline-award-winners-from-venus-berlin-97374 |title=Exclusive: Complete 2008 eLine Award Winners from Venus Berlin |website=AVN}}</ref> | &mdash; |- |rowspan="4"|'''2009''' |rowspan="2"|[[Aundyryn AVN]] | {{Cosnit}} |[[Aundyr AVN da'n Rolteen Noa Share|Y Rolteen Noa Share]]<ref name="AVN2009">{{cite magazine |url=https://avn.com/news/video/2009-avn-award-winners-announced-100611 |title=2009 AVN Award-Winners Announced |access-date=11 Jerrey Geuree 2009 |first=David |last=Sullivan |date=11 Jerrey Geuree 2009 |magazine=AVN }}</ref> |&mdash; |- | {{Cosnit}} |[[Aundyr AVN da'n Reayrtys Comyssey Possanagh Doodeeyn Ynrican Share|Reayrtys Comyssey Possanagh Doodeeyn Ynrican Share]]<ref name=AVN2009/> |''[[Cheerleaders (fillym 2008)|Cheerleaders]]'' |- |rowspan="1"|[[Aundyryn XMA|Aundyr XBIZ]] | {{Cosnit}} |[[Aundyr XMA da Rolteen Noa yn Vlein|Rolteen Noa yn Vlein]]<ref>{{cite web |url=https://avn.com/news/video/xbiz-announces-2009-award-winners-101661 |title=XBIZ Announces 2009 Award-Winners |first=Edward |last=Duncan |date=13 Toshiaght Arree 2009 |work=AVN}}</ref> |&mdash; |- |rowspan="1"|[[Aundyr XRCO]] | {{Cosnit}} | Rolteen Noa<ref>{{cite web |last=Miller |first=Dan |url=https://avn.com/news/video/2009-xrco-award-winners-announced-103377 |title=2009 XRCO Award Winners Announced |date=16 Averil 2009 |work=AVN}}</ref> |&mdash; |- |rowspan="7"|'''2012''' |rowspan="5"|[[Aundyryn AVN]] | {{Cosnit}} |[[Aundyr AVN da'n Reayrtys Comyssey smoo Cannooagh|Reayrtys Comyssey smoo Cannooagh]] (Aundyr Baanreydagh)<ref>{{cite web |url=http://business.avn.com/articles/video/AVN-Announces-the-2012-AVN-Award-Winners-461715.html |title=AVN Announces the 2012 AVN Award Winners |date=22 Jerrey Geuree 2012 |website=AVN |archive-url=https://archive.today/20160513174915/http://business.avn.com/articles/video/AVN-Announces-the-2012-AVN-Award-Winners-461715.html |archive-date=13 Boaldyn 2016 |url-status=dead}}</ref> | ''[[Babysitters 2]]'' |- |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey Guilley/Doodee Share|Reayrtys Comyssey Guilley/Doodee Share]]<ref name=IAFD>{{cite web|url=https://www.iafd.com/person.rme/id=b64d80c4-aac4-4616-b2b6-fc78726d4d91| work=IAFD| title=Stoya| accessdate=22 Toshiaght Arree 2026|lang=Baarle}}</ref> |''[[Top Guns (fillym pornograafagh)|Top Guns]]'' |- |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey Towlley Dooblagh Share|Reayrtys Comyssey Towlley Dooblagh Share]]<ref name=IAFD/> |''[[Bad Girls 5]]'' |- |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey Possanagh Share|Reayrtys Comyssey Possanagh Share]]<ref name=IAFD/> |''[[Top Guns (fillym pornograafagh)|Top Guns]]'' |- |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey Possanagh Share|Reayrtys Comyssey Possanagh Share]]<ref name=IAFD/> |''[[Babysitters 2]]'' |- |rowspan="2"|[[Aundyryn XMA|Aundyryn XBIZ]] |{{enmyssit}} |Ash-chloieder y Vlein |&mdash; |- |{{enmyssit}} |Cloie Co-hassooagh y Vlein: Bwoirrin<ref name=IAFD/> |''[[Fighters (fillym pornograafagh)|Fighters]]'' |- |rowspan="1"| '''2013''' |rowspan="1"|[[Aundyryn XMA|Aundyr XBIZ]] |{{enmyssit}} |Y Skeaylley Feeynaid<ref name=IAFD/> |''[[Bad Girls 7]]'' |- |rowspan="7"| '''2014''' |rowspan="3"|[[Aundyryn XMA|Aundyr XBIZ]] | {{Cosnit}} |[[Aundyr XBIZ da'n Reayrtys Comyssey Share - Ard-fillym|Reayrtys Comyssey Share - Ard-fillym]]<ref>{{cite web |url=http://www.xbiz.com/news/173901 |title=2014 XBIZ Award Winners Announced |access-date=25 Jerrey Geuree 2014 |first=Dan |last=Miller |date=24 Jerrey Geuree 2014 |website=[[XBIZ]]}}</ref> |''[[Code of Honor (fillym pornograafagh)|Code of Honor]]'' |- |{{enmyssit}} |Reayrtys Share - Ard-fillym<ref name=IAFD/> |''[[Bridesmaids (fillym pornograafagh 2013)|Bridesmaids]]'' |- |{{enmyssit}} |Rolteen Tessenagh y Vlein<ref name=IAFD/> |&mdash; |- |rowspan="4"|[[Aundyryn AVN]] | {{enmyssit}} |[[Aundyr XBIZ da'n Reayrtys Comyssey Thoanney Share|Reayrtys Comyssey Thoanney Share]]<ref name=IAFD/> |''[[Code of Honor (fillym pornograafagh)|Code of Honor]]'' |- | {{enmyssit}} |[[Aundyr XBIZ da'n Reayrtys Comyssey Possanagh Share|Reayrtys Comyssey Possanagh Share]]<ref name=IAFD/> |''[[Bridesmaids (fillym pornograafagh 2013)|Bridesmaids]]'' |- | {{enmyssit}} |[[Aundyr XBIZ da'n Ven-aghteyr Co-hassooagh Share|Y Ven-aghteyr Co-hassooagh Share]]<ref name=IAFD/> |''[[Code of Honor (fillym pornograafagh)|Code of Honor]]'' |- | {{enmyssit}} |Rolteen Ard-stroo yn Vlein<ref name=IAFD/> |&mdash; |- |rowspan="8"| '''2015''' |rowspan="5"| [[Aundyryn AVN]] |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey Doodee/Doodee Share|Reayrtys Comyssey Doodee/Doodee Share]]<ref name=IAFD/> |''[[Voracious: Season Two, Volume One]]'' |- |{{enmyssit}} |Y Reih Rolteen Bwoirrin (Aundyr Baanreydagh)<ref name=IAFD/> |&mdash; |- |{{enmyssit}} |Rolteen ny Meanyn Sheshoil (Aundyr Baanreydagh)<ref name=IAFD/> |&mdash; |- |{{enmyssit}} |Rolteen Ard-strooanagh y Vlein<ref name=IAFD/> |&mdash; |- |{{enmyssit}} |[[Aundyr AVN da'n Reayrtys Comyssey smoo Ro-ghaaney|Y Reayrtys Comyssey smoo Ro-ghaaney]]<ref name=IAFD/> |''[[Voracious: Season Two, Volume One]]'' |- |rowspan="3"|[[Aundyryn XMA|Aundyryn XBIZ]] |{{enmyssit}} |[[Aundyr XBIZ da'n Ven-aghteyr Share - Ard-fillym|Y Ben-aghteyr Share - Ard-fillym]]<ref name=IAFD/> |''[[Voracious: Season Two, Volume Four]]'' |- |{{enmyssit}} |[[Aundyr XBIZ da'n Reayrtys Share - Ard-fillym|Y Reayrtys Share - Ard-fillym]]<ref name=IAFD/> |''[[Voracious: Season Two, Volume Three]]'' |- |{{enmyssit}} |Rolteen Tessenagh y Vlein<ref name=IAFD/> |&mdash; |- |rowspan="6"| '''2016''' |rowspan="3"| [[Aundyryn AVN]] |{{enmyssit}} |[[Aundyr AVN da'n Ven-aghteyr Co-hassooagh Share|Y Ven-aghteyr Co-hassooagh Share]]<ref name=IAFD/> |''[[Screwing Wall Street: The Arrangement Finders IPO]]'' |- |{{enmyssit}} |Rolteen ny Meanyn Sheshoil (Aundyr Baanreydagh)<ref name=IAFD/> |&mdash; |- |{{enmyssit}} |Rolteen Ard-stroo yn Vlein<ref name=IAFD/> |&mdash; |- |rowspan="3"|[[Aundyryn XMA|Aundyryn XBIZ]] |{{enmyssit}} |[[Aundyr XBIZ da'n Reayrtys Share - Doodeeyn Ynrican|Y Reayrtys Share - Doodeeyn Ynrican]] |''[[Fluid 3]]'' |- |{{enmyssit}} |Rolteen Tessenagh y Vlein<ref name=IAFD/> |&mdash; |- |{{enmyssit}} |[[Aundyr XBIZ da Stiureyder y Vlein - Skeaylley Neu-ardfillym|Stiureyder y Vlein - Skeaylley Neu-ardfillym]]<ref name=IAFD/> |''[[Graphic Depictions]]'' |- |rowspan="1"| '''2018''' |rowspan="1"|[[FEST Beograd]]<ref>{{Cite web |title=48. Međunarodni filmski festival - FEST 2020 |url=https://www.fest.rs/ |access-date=2020-07-08 |website=Fest.rs |language=Serbish}}</ref> | {{Cosnit}} |Y Ven-aghteyr Share<ref>{{Cite web |last=Petković |first=Vladan |title=''Ederlezi Rising'' sweeps the Serbian awards at Belgrade Fest |url=https://cineuropa.org/en/newsdetail/349134/ |access-date=8 Luanistyn 2020 |website=Cineuropa |date=5 Mayrnt 2018 |language=Baarle}}</ref> |''[[A.I. Rising|Ederlezi Rising]]'' |- |rowspan="4"| '''2019''' |rowspan="1"|[[Aundyryn XMA|Aundyr XBIZ]] | {{Cosnit}} |Y Ven-aghteyr Share - Skeaylley Doodeeyn Ynrican<ref name="xbizwin2019">[https://web.archive.org/web/20120103173201/http://www.xbizawards.com/winners.php XBIZ Award Winners]. ''Xbizawards.com''. Jerrey Geuree 2019.</ref> |''[[Talk Derby to Me]]'' |- |rowspan="3"|[[Aundyryn AVN]] |{{enmyssit}} | [[Aundyr AVN da'n reayrtys Comyssey Doodee/Doodee Share|Y Reayrtys Comyssey Doodee/Doodee Share]]<ref name=IAFD/> |''[[Talk Derby To Me]]'' |- |{{enmyssit}} |[[Aundyr AVN da'n Ven-aghteyr Co-hassooagh Share|Y Ben-aghteyr Co-hassooagh Share]]<ref name=IAFD/> |''[[Talk Derby To Me]]'' |- |{{enmyssit}} |Ventyr Ard-stroo yn Vlein<ref name=IAFD/> |- |} ==Imraaghyn== {{reflist}} ==Kianglaghyn magh== {{commonscat}} * {{official website}} * {{IMDb name|2851882|Stoya}} * {{iafd name|id=Stoya|gender=female|name=Stoya}} * {{afdb name|45017|Stoya}} * [http://www.theskinny.co.uk/article/46362-from-barbie-doll-to-razordoll-the-sexual-shift-in-porn "From Barbie Doll to Razordoll: The Sexual Shift in Porn"] lesh Lauren Mayberry, ''[[The Skinny (earishlioar)|The Skinny]]'', 30 Jerrey Souree 2009. * {{cite interview |subject=Stoya |subject2=Zoe Lacchei |interviewer=Pornpope |title=Double Interview: Stoya and Zoe Lacchei |url=http://www.pornsaints.org/blog/double-interview-stoya-and-zoe-lacchei |work=Pornsaints |date=17 Toshiaght Arree 2010 |archive-url=https://web.archive.org/web/20151208174527/http://www.pornsaints.org/blog/double-interview-stoya-and-zoe-lacchei |archive-date=8 Mee ny Nollick 2015 |url-status=dead |df=mdy-all}} * [http://blog.adultdvdtalk.com/2009/02/stoya_starlet_of_the_year.html Co-akin Pod-scaalheaney ec Adult DVD Talk] * [https://www.youtube.com/watch?v=rkkFXZJhYtM Co-akin marish Stoya (05:12)] bentyn rish ''"[[A.I. Rising]]"''; [https://www.youtube.com/watch?v=PsVAUpbHWM8 (1:21)] {{Gurneil eaghtyrys}} [[Ronney:Ruggyryn 'sy vlein 1986]] [[Ronney:Feallee vio]] [[Ronney:Aghteyryn bwoirrin Americaanagh y 21d eash]] [[Ronney:Screeudeyryn bwoirrin Americaanagh y 21d eash]] [[Ronney:Aghteyryn bwoirrin Serbagh y 21d eash]] [[Ronney:Screeudeyryn bwoirrin Serbagh y 21d eash]] [[Ronney:Aghteyryn pornograafagh bwoirrin Americaanagh]] [[Ronney:Aghteyryn pornograafagh bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Aghteyryn bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Aghteyryn ardan bwoirrin Americaanagh]] [[Ronney:Aghteyryn ardan bwoirrin Serbagh]] [[Ronney:Aghteyryn çhellveeish bwoirrin Americaanagh]] [[Ronney:Aghteyryn çhellveeish bwoirrin Serbagh]] [[Ronney:Aghteyryn fillym bwoirrin Americaanagh]] [[Ronney:Aghteyryn fillym bwoirrin Serbagh]] [[Ronney:Aghteyryn ass Carolina Hwoaie]] [[Ronney:Craishteyderyn an-ghraagh bwoirrin Americaanagh]] [[Ronney:Craishteyderyn an-ghraagh bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Craishteyderyn ass Carolina Hwoaie]] [[Ronney:Screeudeyryn blog bwoirrin Americaanagh]] [[Ronney:Screeudeyryn neu-farskeealaght bwoirrin Americaanagh]] [[Ronney:Screeudeyryn bwoirrin daa-cheintyssagh Americaanagh]] [[Ronney:Colloonee woirrin Americaanagh]] [[Ronney:Colloonee cheintys Americaanagh]] [[Ronney:Screeudeyryn ass Carolina Hwoaie]] [[Ronney:Cosneyderyn Aundyr AVN]] [[Ronney:Cosneyderyn Aundyr XMA]] [[Ronney:Cosneyderyn Aundyr XRCO]] [[Ronney:Americaanee jeh sluight Albinagh]] [[Ronney:Americaanee jeh sluight Serbagh]] [[Ronney:Feallee ass Wilmington, Carolina Hwoaie]] [[Ronney:Eebyrtee Americaanagh 'sy Terb]] [[Ronney:Pornograafaght chaghlaaee]] 5g29ze9f6ekk9sv9tg0od0ywf6lu7cq Pereslavl-Zalesski 0 40362 392807 365002 2026-09-06T01:20:57Z InternetArchiveBot 16702 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 392807 wikitext text/x-wiki {{Kishtey fys boayl | ennym_gienneydagh = Pereslavl-Zalessky | ennym = Pereslavl-Zalessky | ennym_dooghyssagh = Переславль-Залесский | far-ennym = | sorçh_balley = Balley | jarroo-raa = | jalloo_bun_speyrey = Красная-площадь-шелапутин-2019-0450.jpg | mooadys_jalloo = 250px | fo-heidyl_jalloo = Pereslavl-Zalessky | jalloo_brattagh = Flag_of_Pereslavl-Zalessky_(Yaroslavl_oblast).png | mooadys_brattagh = 120px | jalloo_armys = Coat_of_Arms_of_Pereslavl-Zalessky_(Yaroslavl_oblast).png | mooadys_armys = 80px | jalloo_caslys-çheerey = Map of Russia - Yaroslavl Oblast (2008-03).svg | fo-heidyl_caslys-çheerey = Soiaghey Wheiggey Yaroslavl 'sy Roosh | mooadys_caslys-çheerey = 240px | caslys-çheerey_broo-freeney = Wheiggey Yaroslavl | fo-heidyl_caslys-çheerey_broo-freeney = Soiaghey Pereslavl-Zalesski ayns Queiggey Yaroslavl | soiaghey_lipaid_broo-freeney = left | fo-noteyn_coordnaidyn = | taishbyney_coordnaidyn = inline,title | ard_coordnaidyn = RU-YAR | latd = 56 | latm = 44 | latNS = N | longd = 38| longm = 51 | longEW = E | sorçh_aarheynn = [[Rolley çheeraghyn y theihill|Çheer]] | ennym_aarheynn = {{brattagh|Russia|Yn Roosh{{!}}Y Roosh}} | sorçh_aarheynn1 = [[Aarheynnyn conastagh y Roosh|Aarheynn&nbsp;chonastagh]] | ennym_aarheynn1 = {{brattagh|Yaroslavl_Oblast_(large)|Queiggey Yaroslavl}} | sorçh_aarheynn2 = | ennym_aarheynn2 = | sorçh_reiltys = | colught_reirey = | enmys_bunneeaght = Bunnit | date_bunneeaght = 1152 | enmys_bunneeaght1= | date_bunneeaght1 = | fo-noteyn_eaghtyr = | slane_eaghtyr_km2 = 23.01 | earroo_yn_phobble_er = | note_earroo_yn_phobble = | slane_earroo_yn_phobble = {{WD Earroo yn Phobble cour Kishtey Fys}} | glooaght_y_phobble_km2 = | glooaght_y_phobble_mi_ker = | cryss_hraa = [[Traa Moscow|MSK]] | ashchur_utc = +03:00 | sorçh_coad_postagh = Ayndagh postagh | coad_postagh = 152020–152040 | coad_ardjynagh = +7 48535 | ynnyd-eggey = {{URL|www.adminpz.ru}} }} She [[Sorçhyn dy vuill chummaltit 'sy Roosh|balley]] ayns [[Queiggey Yaroslavl]], y [[Yn Roosh|Roosh]], eh '''Pereslavl-Zalessky''' ({{lang-ru|Переславль-Залесский}}, {{IPA|pʲɪrʲɪˈslavlʲ zɐˈlʲeskʲɪj}}), va enmyssit '''Pereyaslavl-Zalessky''' hannah hene,<ref>{{cite book |last1=Felecan |first1=Oliviu |last2=Bugheșiu |first2=Alina |title=Names and Naming: Multicultural Aspects |date=19 Luanistyn 2021 |publisher=Springer Nature |isbn=978-3-030-73186-1 |page=411 |url=https://books.google.com/books?id=Krg-EAAAQBAJ |language=en}}</ref><ref>{{cite book |last1=Nossov |first1=Konstantin S. |title=Medieval Russian Fortresses AD 862–1480 |date=20 Mean Souree 2012 |publisher=Bloomsbury Publishing |isbn=978-1-84908-060-6 |page=57 |url=https://books.google.com/books?id=WVu1CwAAQBAJ |language=en}}</ref> ny '''Pereyaslavl''' dy h-aashagh. T'eh soit er yn ard-raad eddyr [[Moscow]] as [[Yaroslavl]] er y chladdagh hiar yiass jeh'n logh [[Logh Pleshcheyevo|Pleshcheyevo]] ec inver yn awin [[Awin Trubezh|Trubezh]]. Ta {{WD Earroo yn Phobble}} sleih cummal ayn. ==Çheer-oaylleeaght== Ta Pereslavl-Zalessky soit ayn jiass [[Queiggey Yaroslavl|Wheiggey Yaroslavl]], faggys da'n joarey rish [[Queiggey Moscow]], {{cvt|140|km|mi}} shiar hwoaie veih [[Moscow]], as {{cvt|123|km|mi}} sheear yiass veih [[Yaroslavl]]. ===Emshyraght=== S'mooarheeragh tash yn emshyraght ayns Pereslavl-Zalessky: s'foddey, feayr, as sniaghtagh ta ny geuraghyn, as s'giare, çheh, as fliaghagh ta ny souraghyn. Ta ny mean-çhiassidyn goll veih {{cvt|-12|C|F}} car y Jerrey Geuree dys {{cvt|+18|C|F}} car y Jerrey Souree. ==Galleree== <gallery> File:Ba-sovetskaa-10-2002-alexander.jpg|Straid Sovetskaya File:Pereslavl-Zalessky, Переславль-Залесский 3.jpg|Va [[Mannishter Noo Niglus (Pereslavl-Zalessky)|Mannishter Noo Niglus]] er ny hroggal 'sy 14oo eash File:Pereslavl SpasoPreobrazhenskyCathedral.JPG|Ard-çhiamble y Taualtagh (1152–1157) File:Никитский-монастырь-шелапутин-2010-1053.jpg|Feailley etlanys erskyn [[Mannishter Nikitsky]] </gallery> ==Feallee ard-ghooagh== [[Coadan:Александр Невский (2010.06.26) - panoramio.jpg|thumb|125px|Jlloo da Alexander Nevsky ayns Gorodets]] *[[Nicetas Stylites]], (??-1186) noo Rooshagh veih'n 12h eash ren bunnaghey [[Mannishter Nikitsky]] *[[Alexander Nevsky]], (1221–1263) prinse as noo<ref>{{Cite EB1911|wstitle= Alexander Nevsky, Saint |volume= 1 |last= Bain |first= Robert Nisbet |author-link= Robert Nisbet Bain| page = 556 |short=1 }}</ref> *[[Pavel Kolendas]], (1820-??) peinteyr co-chalyssyn Rooshagh *[[Dmitry Mirimanoff]] (1861–1945) maddaghteyr, chur rish [[Sheiltynys settyn#Sheiltynys settyn formoilit|sheiltynys settyn baghtoil]] *[[Dmitry Kardovsky]], (1866–1943) ellyneyr, daahder, as kiaddeyder ardan *[[Leonid Kurchevsky]], (1890–1937 ny 1939) kiaddeyder wappinyn Rooshagh/Soveidjag *[[Mikhail Koshkin]], (1898–1940) kiaddeyder tank [[T-34]] *[[Alexander Petrov (aghteyr)|Alexander Petrov]], (ruggit 1987) aghteyr ==Imraaghyn== {{Reflist}} ==Kianglaghyn magh== {{Commons category}} *{{Official website|https://www.adminpz.ru/ }} {{ru jalloo}} *[https://web.archive.org/web/20120426051759/http://www.tourismpereslavl.ru/routelist.html?lang=en Stiurag-sheean da Pereslavl-Zalessky tourismpereslavl.ru] {{en jalloo}} *[https://www.pereslavl-zalessky.com/posad_en.htm Stiurag da Pereslavl] {{en jalloo}} *[https://web.archive.org/web/20080411121939/http://www.cistour.com/cis/pdf/home/Sights_of_Golden_Ring_in_brief.pdf baatyn beggey Pheddyr Mooar] (PDF) {{en jalloo}} *[https://www.internationalsteam.co.uk/trains/russia11.htm Thie tashtee raad-yiarn Pereslavl-Zalessky (raad-yiarn keyl)] {{en jalloo}} *[https://web.archive.org/web/20241214095658/https://top10.travel/tag/zolotoe-kolco-rossii/ Stiurag da Fainey Airhey yn Roosh] {{ru jalloo}} *[https://web.archive.org/web/20241214095657/https://traland.ru/dostoprimechatelnosti-pereslavl-zalesskogo/ Stiurag da Pereslavl-Zalessky] {{ru jalloo}} {{Gurneil eaghtyrys}} [[Ronney:Pereslavl-Zalessky| ]] [[Ronney:Ard-valjyn as baljyn ayns Queiggey Yaroslavl]] [[Ronney:Pereslavsky Uyezd]] [[Ronney:Buill chummaltit bunnit 'sy vlein 1152]] [[Ronney:Bunneeaghtyn 'syn Oarpey 'sy vlein 1152]] [[ROnney:Bunneeaghtyn 'sy Roosh 'sy 12h eash]] [[ROnney:Fainey Airhey yn Roosh]] rznsb3mivf9w5ck41kzdllvqlh4i9uz Clowan:Kishtey fys çheer/noa 10 55826 392787 392781 2026-09-05T17:04:42Z MacTire02 219 +arraneyn/jarroo-raaghyn 392787 wikitext text/x-wiki <includeonly> {{Infobox | above = {{#invoke:Kishtey fys çheer|title}} | image = {{#invoke:Kishtey fys çheer|images}} | caption = {{#invoke:Kishtey fys çheer|captions}} | data1 = {{#invoke:Kishtey fys çheer|symbols}} }} </includeonly> n63euw6m9aymiviaslew20621s52az5 392798 392787 2026-09-05T20:36:27Z MacTire02 219 ++ 392798 wikitext text/x-wiki <includeonly> {{Infobox | above = {{#invoke:Kishtey fys çheer|title}} | image = {{#invoke:Kishtey fys çheer|images}} | caption = {{#invoke:Kishtey fys çheer|captions}} | data1 = {{#invoke:Kishtey fys çheer|symbols}} | data2 = {{#invoke:Kishtey fys çheer|map}} }} </includeonly> q920aw30sx862zehlz57mrkja61zu06 392805 392798 2026-09-05T20:56:15Z MacTire02 219 +parameadar 392805 wikitext text/x-wiki <includeonly> {{Infobox | above = {{#invoke:Kishtey fys çheer|title}} | image = {{#invoke:Kishtey fys çheer|images}} | caption = {{#invoke:Kishtey fys çheer|captions}} | data1 = {{#invoke:Kishtey fys çheer|symbols}} | data2 = {{#invoke:Kishtey fys çheer|map}} | data3 = {{#invoke:Kishtey fys çheer|cities}} }} </includeonly> ihtdl54f601yb0i4ne22dnhzxy7ebfp Module:Kishtey fys çheer 828 55827 392785 392784 2026-09-05T16:53:52Z MacTire02 219 jarroo-raa as anthym 392785 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Anthem ------------------------------------------------------------ local function getAnthem() local entity, statement = getWikidataItem("P85") if not entity then return nil, nil end local label = entity:getLabel() if not label or label == "" then return nil, nil end return label, getWikidataReference(statement) end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 88w21uhl76q4guzlfobin635sx6qccx 392786 392785 2026-09-05T17:00:55Z MacTire02 219 ++ 392786 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = manualNational, reference = getManual(args, { "arrane_ashoonagh_imraa" }) } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = manualRoyal, reference = getManual(args, { "arrane_reeoil_imraa" }) } end elseif #royal > 0 then result.royal = { text = royal[1].label, reference = royal[1].reference } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = manualOther, reference = getManual(args, { "arrane_imraa" }) } end elseif #other > 0 then result.other = { text = other[1].label, reference = other[1].reference } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "jarroo-raa_imraa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p mxa6bfu02qbk19fpnoqdmvn3dj6kp9v 392788 392786 2026-09-05T17:06:46Z MacTire02 219 ++ 392788 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = manualNational, reference = getManual(args, { "arrane_ashoonagh_imraa" }) } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = manualRoyal, reference = getManual(args, { "arrane_reeoil_imraa" }) } end elseif #royal > 0 then result.royal = { text = royal[1].label, reference = royal[1].reference } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = manualOther, reference = getManual(args, { "arrane_imraa" }) } end elseif #other > 0 then result.other = { text = other[1].label, reference = other[1].reference } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "jarroo-raa_imraa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = anthems.national.text if anthems.national.reference then text = text .. anthems.national.reference end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = anthems.other.text if anthems.other.reference then text = text .. anthems.other.reference end table.insert(rows, "'''[[Arrane]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = anthems.royal.text if anthems.royal.reference then text = text .. anthems.royal.reference end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 3tiqnuf7ysgvw4yroj5wqusjxcb7en3 392789 392788 2026-09-05T19:29:56Z MacTire02 219 ren mee caghlaa soiaghey yn ockle "imraa" dys toshiaght y pharameadar 392789 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = manualNational, reference = getManual(args, { "imraa_arrane_ashoonagh" }) } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = manualRoyal, reference = getManual(args, { "imraa_arrane_reeoil" }) } end elseif #royal > 0 then result.royal = { text = royal[1].label, reference = royal[1].reference } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = manualOther, reference = getManual(args, { "imraa_arrane" }) } end elseif #other > 0 then result.other = { text = other[1].label, reference = other[1].reference } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = anthems.national.text if anthems.national.reference then text = text .. anthems.national.reference end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = anthems.other.text if anthems.other.reference then text = text .. anthems.other.reference end table.insert(rows, "'''[[Arrane]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = anthems.royal.text if anthems.royal.reference then text = text .. anthems.royal.reference end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p lzjnfur4x6leq0qydmvjrbkowgv9jmb 392790 392789 2026-09-05T19:36:19Z MacTire02 219 cowraghyn aaraa lesh arraneyn 392790 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }) } end elseif #national > 0 then result.national = { text = '"' .. national[1].label .. '"', reference = national[1].reference } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }) } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }) } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = anthems.national.text if anthems.national.reference then text = text .. anthems.national.reference end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = anthems.other.text if anthems.other.reference then text = text .. anthems.other.reference end table.insert(rows, "'''[[Arrane]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = anthems.royal.text if anthems.royal.reference then text = text .. anthems.royal.reference end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p spmfu1c8u4z47fbvcwh07neo0qmyjak 392791 392790 2026-09-05T19:39:15Z MacTire02 219 +coadan arrane my vel fer ayn 392791 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }) } end elseif #national > 0 then result.national = { text = '"' .. national[1].label .. '"', reference = national[1].reference } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }) } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }) } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = anthems.national.text if anthems.national.reference then text = text .. anthems.national.reference end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = anthems.other.text if anthems.other.reference then text = text .. anthems.other.reference end table.insert(rows, "'''[[Arrane]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = anthems.royal.text if anthems.royal.reference then text = text .. anthems.royal.reference end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p k4hwvumga0dldmxarvazp9lz696mp7x 392792 392791 2026-09-05T19:53:43Z MacTire02 219 +cloieder coadan 392792 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = anthems.national.text if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. "<br/>[[Coadan:" .. anthems.national.audio .. "]]" end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = anthems.other.text if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. "<br/>[[Coadan:" .. anthems.other.audio .. "]]" end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = anthems.royal.text if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. "<br/>[[Coadan:" .. anthems.royal.audio .. "]]" end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p iy19chk9mfb712guvl7nzewufpbayop 392793 392792 2026-09-05T19:57:07Z MacTire02 219 ++ 392793 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '"' .. anthems.national.text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. "<br/>[[Coadan:" .. anthems.national.audio .. "]]" end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '"' .. anthems.other.text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. "<br/>[[Coadan:" .. anthems.other.audio .. "]]" end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '"' .. anthems.royal.text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. "<br/>[[Coadan:" .. anthems.royal.audio .. "]]" end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p nm5knudohvr205c2etmngv0umbdp8tr 392794 392793 2026-09-05T20:07:02Z MacTire02 219 ++ 392794 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. "<br/>[[Coadan:" .. anthems.national.audio .. "]]" end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. "<br/>[[Coadan:" .. anthems.other.audio .. "]]" end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. "<br/>[[Coadan:" .. anthems.royal.audio .. "]]" end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 95jmkjwm66bdrmiwpxx8hve407i7fb4 392795 392794 2026-09-05T20:13:04Z MacTire02 219 laaraghey yn coadan 392795 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p jck947y6q1dgsvon2ys5ykwiaml687c 392796 392795 2026-09-05T20:28:37Z MacTire02 219 caslys-cheerey 392796 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local locatorMap = getLocatorMapData(args) if locatorMap then local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end table.insert(rows, '<tr>' .. '<td colspan="3" style="text-align:center; padding:0.6em 0em;">' .. map .. '</td>' .. '</tr>' ) end local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 3tciodo3f48e2otp9bcxzaogg1vmulf 392797 392796 2026-09-05T20:34:17Z MacTire02 219 ++ 392797 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<tr>' .. '<td colspan="3" style="text-align:center; padding:0.6em 0em;">' .. map .. '</td>' .. '</tr>' end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p royheql8jn7j1ki5bmng6o004yebms2 392799 392797 2026-09-05T20:37:22Z MacTire02 219 creatlagh 392799 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p ohquy40xom7a1jr3j8silceea9yf50n 392800 392799 2026-09-05T20:45:29Z MacTire02 219 +preeu-valley 392800 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p f9amj4adf5fwh0mqs9eajreb3teqzuf 392801 392800 2026-09-05T20:47:23Z MacTire02 219 ynnyd_reiragh 392801 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 6njstyyhmllbayc6bz2uurvo6ml598y 392802 392801 2026-09-05T20:48:28Z MacTire02 219 +balley smoo 392802 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Largest city data ------------------------------------------------------------ local function getLargestCityData(args) local city = getManual(args, { "balley_smoo" }) if city and mw.ustring.lower(city) == "none" then return nil end if city then return { text = city } end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p mogjsdd2esikf1ef8ibya1ky5kq8i10 392803 392802 2026-09-05T20:51:10Z MacTire02 219 ++ 392803 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Largest city data ------------------------------------------------------------ local function getLargestCityData(args) local city = getManual(args, { "balley_smoo" }) if city and mw.ustring.lower(city) == "none" then return nil end if city then return { text = city } end return nil end ------------------------------------------------------------ -- Capital / administrative centre labels ------------------------------------------------------------ local function getCityLabels(args) return { capital = getManual(args, { "sorçh_preeu-valley" }), administrative = getManual(args, { "sorçh_ynnyd_reiragh" }) } end ------------------------------------------------------------ -- City / settlement data ------------------------------------------------------------ local function getCityData(args) local capital = getCapitalData(args) local administrative = getAdministrativeCentreData(args) local largest = getLargestCityData(args) local labels = getCityLabels(args) return { capital = capital, administrative = administrative, largest = largest, labels = labels } end ------------------------------------------------------------ -- Determine whether the capital is the largest city ------------------------------------------------------------ local function normaliseCityName(value) if not value then return "" end value = mw.text.trim(value) value = mw.ustring.gsub(value, "^%[%[", "") value = mw.ustring.gsub(value, "%]%]$", "") local pipe = mw.ustring.find(value, "|", 1, true) if pipe then value = mw.ustring.sub(value, 1, pipe - 1) end return mw.text.trim(value) end local function capitalIsLargest(capital, largest) if not capital or not largest then return false end local capitalText = normaliseCityName(capital.text) local largestText = normaliseCityName(largest.text) if capitalText == "" or largestText == "" then return false end return capitalText == largestText end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p 2ol9p5jhovpodbaolloit7y1towcma0 392804 392803 2026-09-05T20:54:13Z MacTire02 219 ++ 392804 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Largest city data ------------------------------------------------------------ local function getLargestCityData(args) local city = getManual(args, { "balley_smoo" }) if city and mw.ustring.lower(city) == "none" then return nil end if city then return { text = city } end return nil end ------------------------------------------------------------ -- Capital / administrative centre labels ------------------------------------------------------------ local function getCityLabels(args) return { capital = getManual(args, { "sorçh_preeu-valley" }), administrative = getManual(args, { "sorçh_ynnyd_reiragh" }) } end ------------------------------------------------------------ -- City / settlement data ------------------------------------------------------------ local function getCityData(args) local capital = getCapitalData(args) local administrative = getAdministrativeCentreData(args) local largest = getLargestCityData(args) local labels = getCityLabels(args) return { capital = capital, administrative = administrative, largest = largest, labels = labels } end ------------------------------------------------------------ -- Determine whether the capital is the largest city ------------------------------------------------------------ local function normaliseCityName(value) if not value then return "" end value = mw.text.trim(value) value = mw.ustring.gsub(value, "^%[%[", "") value = mw.ustring.gsub(value, "%]%]$", "") local pipe = mw.ustring.find(value, "|", 1, true) if pipe then value = mw.ustring.sub(value, 1, pipe - 1) end return mw.text.trim(value) end local function capitalIsLargest(capital, largest) if not capital or not largest then return false end local capitalText = normaliseCityName(capital.text) local largestText = normaliseCityName(largest.text) if capitalText == "" or largestText == "" then return false end return capitalText == largestText end ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ function p.cities(frame) local args = getArgs(frame) local cityData = getCityData(args) local capital = cityData.capital local administrative = cityData.administrative local largest = cityData.largest local labels = cityData.labels local rows = {} -------------------------------------------------------- -- Capital / administrative centre -------------------------------------------------------- if capital or administrative then local text local label ---------------------------------------------------- -- Capital supplied ---------------------------------------------------- if capital then label = labels.capital or "Preeu-valley" text = capital.text ------------------------------------------------ -- Capital is also the largest city ------------------------------------------------ if capitalIsLargest(capital, largest) then text = text .. '<br/><small>(as y balley smoo)</small>' end if capital.reference then text = text .. capital.reference end ---------------------------------------------------- -- No capital, administrative centre supplied ---------------------------------------------------- else label = labels.administrative or "Ynnyd reiragh" text = administrative.text end table.insert(rows, "'''" .. label .. ":&nbsp;'''" .. text ) ---------------------------------------------------- -- Add largest city when different from capital ---------------------------------------------------- if largest and not capitalIsLargest(capital, largest) then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end end -------------------------------------------------------- -- No capital or administrative centre -- but largest city exists -------------------------------------------------------- if not capital and not administrative and largest then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end -------------------------------------------------------- -- Nothing to display -------------------------------------------------------- if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p dt7hsmnfvw6vjwoq7cuk645pjcl6vj1 392809 392804 2026-09-06T11:31:34Z MacTire02 219 prowal red dy chiartaghey yn marranys 392809 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Largest city data ------------------------------------------------------------ local function getLargestCityData(args) local city = getManual(args, { "balley_smoo" }) if city and mw.ustring.lower(city) == "none" then return nil end if city then return { text = city } end return nil end ------------------------------------------------------------ -- Capital / administrative centre labels ------------------------------------------------------------ local function getCityLabels(args) return { capital = getManual(args, { "sorçh_preeu-valley" }), administrative = getManual(args, { "sorçh_ynnyd_reiragh" }) } end ------------------------------------------------------------ -- City / settlement data ------------------------------------------------------------ local function getCityData(args) local capital = getCapitalData(args) local administrative = getAdministrativeCentreData(args) local largest = getLargestCityData(args) local labels = getCityLabels(args) return { capital = capital, administrative = administrative, largest = largest, labels = labels } end ------------------------------------------------------------ -- Determine whether the capital is the largest city ------------------------------------------------------------ local function normaliseCityName(value) if not value then return "" end value = mw.text.trim(value) value = mw.ustring.gsub(value, "^%[%[", "") value = mw.ustring.gsub(value, "%]%]$", "") local pipe = mw.ustring.find(value, "|", 1, true) if pipe then value = mw.ustring.sub(value, 1, pipe - 1) end return mw.text.trim(value) end local function capitalIsLargest(capital, largest) if not capital or not largest then return false end local capitalText = normaliseCityName(capital.text) local largestText = normaliseCityName(largest.text) if capitalText == "" or largestText == "" then return false end return capitalText == largestText end ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ function p.cities(frame) local args = getArgs(frame) local cityData = getCityData(args) local capital = cityData.capital local administrative = cityData.administrative local largest = cityData.largest local labels = cityData.labels local rows = {} ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end -------------------------------------------------------- -- Capital / administrative centre -------------------------------------------------------- if capital or administrative then local text local label ---------------------------------------------------- -- Capital supplied ---------------------------------------------------- if capital then label = labels.capital or "Preeu-valley" text = capital.text ------------------------------------------------ -- Capital is also the largest city ------------------------------------------------ if capitalIsLargest(capital, largest) then text = text .. '<br/><small>(as y balley smoo)</small>' end if capital.reference then text = text .. capital.reference end ---------------------------------------------------- -- No capital, administrative centre supplied ---------------------------------------------------- else label = labels.administrative or "Ynnyd reiragh" text = administrative.text end table.insert(rows, "'''" .. label .. ":&nbsp;'''" .. text ) ---------------------------------------------------- -- Add largest city when different from capital ---------------------------------------------------- if largest and not capitalIsLargest(capital, largest) then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end end -------------------------------------------------------- -- No capital or administrative centre -- but largest city exists -------------------------------------------------------- if not capital and not administrative and largest then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end -------------------------------------------------------- -- Nothing to display -------------------------------------------------------- if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p ltgau1tssstj07rc784ecl4d7f1mi5k 392810 392809 2026-09-06T11:37:58Z MacTire02 219 ++ 392810 Scribunto text/plain local p = {} local enmynCheerey = require("Module:Enmyn çheerey") local langData = mw.loadData("Module:Lang/data") local langNameTable = langData.lang_name_table.lang local langOverrideTable = langData.override local function getArgs(frame) return frame:getParent().args end 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 getWikidataImage(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local value = mainsnak.datavalue.value if value and value ~= "" then return value end end end return nil end ------------------------------------------------------------ -- Wikidata item statement ------------------------------------------------------------ local function getWikidataItem(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 for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local linkedEntity = mw.wikibase.getEntity(id) if linkedEntity then return linkedEntity, statement end end end return nil end ------------------------------------------------------------ -- Wikidata reference URL ------------------------------------------------------------ local function getWikidataReference(statement) if not statement or not statement.references then return nil end for _, reference in ipairs(statement.references) do local snaks = reference.snaks if snaks and snaks["P854"] then for _, snak in ipairs(snaks["P854"]) do if snak and snak.snaktype == "value" and snak.datavalue and snak.datavalue.type == "string" then local url = snak.datavalue.value if url and url ~= "" then return "<ref>[" .. url .. " " .. url .. "]</ref>" end end end end end return nil end ------------------------------------------------------------ -- Wikidata locator map ------------------------------------------------------------ local function getWikidataLocatorMap() local entity = mw.wikibase.getEntityObject() if not entity then return nil end local statements = entity:getBestStatements("P242") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Locator map data ------------------------------------------------------------ local function getLocatorMapData(args) local map = getManual(args, { "jalloo_caslys-çheerey", "jalloo_caslys" }) if map and mw.ustring.lower(map) == "none" then return nil end if not map then map = getWikidataLocatorMap() end if not map then return nil end return { image = map, width = getManual(args, { "lheead_caslys-çheerey", "lheead_caslys" }) or "250px", caption = getManual(args, { "fo-heidyl_caslys-çheerey", "fo-heidyl_caslys" }) } end ------------------------------------------------------------ -- Locator map ------------------------------------------------------------ function p.map(frame) local args = getArgs(frame) local locatorMap = getLocatorMapData(args) if not locatorMap then return "" end local map = '[[Coadan:' .. locatorMap.image .. '|' .. locatorMap.width .. '|center]]' if locatorMap.caption then map = map .. '<div style="position:relative; top:0.3em;">' .. '<small>' .. locatorMap.caption .. '</small></div>' end return '<div style="text-align:center; padding:0.6em 0em;">' .. map .. '</div>' end ------------------------------------------------------------ -- Capital / administrative centre data ------------------------------------------------------------ local function getCapitalData(args) local capital = getManual(args, { "preeu-valley" }) if capital and mw.ustring.lower(capital) == "none" then return nil end if capital then return { text = capital } end local entity, statement = getWikidataItem("P36") if entity then local label = entity:getLabel() if label and label ~= "" then return { text = label, reference = getWikidataReference(statement) } end end return nil end ------------------------------------------------------------ -- Administrative centre data ------------------------------------------------------------ local function getAdministrativeCentreData(args) local centre = getManual(args, { "ynnyd_reiragh" }) if centre and mw.ustring.lower(centre) == "none" then return nil end if centre then return { text = centre } end return nil end ------------------------------------------------------------ -- Largest city data ------------------------------------------------------------ local function getLargestCityData(args) local city = getManual(args, { "balley_smoo" }) if city and mw.ustring.lower(city) == "none" then return nil end if city then return { text = city } end return nil end ------------------------------------------------------------ -- Capital / administrative centre labels ------------------------------------------------------------ local function getCityLabels(args) return { capital = getManual(args, { "sorçh_preeu-valley" }), administrative = getManual(args, { "sorçh_ynnyd_reiragh" }) } end ------------------------------------------------------------ -- City / settlement data ------------------------------------------------------------ local function getCityData(args) local capital = getCapitalData(args) local administrative = getAdministrativeCentreData(args) local largest = getLargestCityData(args) local labels = getCityLabels(args) return { capital = capital, administrative = administrative, largest = largest, labels = labels } end ------------------------------------------------------------ -- Determine whether the capital is the largest city ------------------------------------------------------------ local function normaliseCityName(value) if not value then return "" end value = mw.text.trim(value) value = mw.ustring.gsub(value, "^%[%[", "") value = mw.ustring.gsub(value, "%]%]$", "") local pipe = mw.ustring.find(value, "|", 1, true) if pipe then value = mw.ustring.sub(value, 1, pipe - 1) end return mw.text.trim(value) end local function capitalIsLargest(capital, largest) if not capital or not largest then return false end local capitalText = normaliseCityName(capital.text) local largestText = normaliseCityName(largest.text) if capitalText == "" or largestText == "" then return false end return capitalText == largestText end ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ ------------------------------------------------------------ -- Capital / largest city / administrative centre ------------------------------------------------------------ function p.cities(frame) local args = getArgs(frame) local cityData = getCityData(args) local capital = cityData.capital local administrative = cityData.administrative local largest = cityData.largest local labels = cityData.labels local rows = {} -------------------------------------------------------- -- Capital / administrative centre -------------------------------------------------------- if capital or administrative then local text local label ---------------------------------------------------- -- Capital supplied ---------------------------------------------------- if capital then label = labels.capital or "Preeu-valley" text = capital.text ------------------------------------------------ -- Capital is also the largest city ------------------------------------------------ if capitalIsLargest(capital, largest) then text = text .. '<br/><small>(as y balley smoo)</small>' end if capital.reference then text = text .. capital.reference end ---------------------------------------------------- -- No capital, administrative centre supplied ---------------------------------------------------- else label = labels.administrative or "Ynnyd reiragh" text = administrative.text end table.insert(rows, "'''" .. label .. ":&nbsp;'''" .. text ) ---------------------------------------------------- -- Add largest city when different from capital ---------------------------------------------------- if largest and not capitalIsLargest(capital, largest) then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end end -------------------------------------------------------- -- No capital or administrative centre -- but largest city exists -------------------------------------------------------- if not capital and not administrative and largest then table.insert(rows, "'''Balley smoo:&nbsp;'''" .. largest.text ) end -------------------------------------------------------- -- Nothing to display -------------------------------------------------------- if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Wikidata audio file ------------------------------------------------------------ local function getWikidataAudio(entity) if not entity then return nil end local statements = entity:getBestStatements("P51") if not statements or #statements == 0 then return nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "string" then local file = mainsnak.datavalue.value if file and file ~= "" then return file end end end return nil end ------------------------------------------------------------ -- Anthems ------------------------------------------------------------ local function getAnthems() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P85") if not statements or #statements == 0 then return {} end local anthems = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "wikibase-entityid" then local id = mainsnak.datavalue.value.id local anthemEntity = mw.wikibase.getEntity(id) if anthemEntity then local label = anthemEntity:getLabel() if label and label ~= "" then local role = nil -- P3831 = object of statement has role. -- This may identify the anthem as national, -- royal, regional, etc. if statement.qualifiers and statement.qualifiers["P3831"] then for _, qualifier in ipairs(statement.qualifiers["P3831"]) do if qualifier.datavalue and qualifier.datavalue.type == "wikibase-entityid" then local roleEntity = mw.wikibase.getEntity( qualifier.datavalue.value.id ) if roleEntity then role = roleEntity:getLabel() break end end end end table.insert(anthems, { label = label, role = role, reference = getWikidataReference(statement), audio = getWikidataAudio(anthemEntity) }) end end end end return anthems end ------------------------------------------------------------ -- Classify anthems ------------------------------------------------------------ local function classifyAnthems(anthems) local national = {} local royal = {} local other = {} for _, anthem in ipairs(anthems) do local role = anthem.role if role then role = mw.ustring.lower(role) end if role and mw.ustring.find(role, "royal") then table.insert(royal, anthem) elseif role and ( mw.ustring.find(role, "national") or mw.ustring.find(role, "state anthem") ) then table.insert(national, anthem) else table.insert(other, anthem) end end -- If Wikidata has supplied an anthem but has not given -- it a role, treat the first such anthem as the national -- anthem. P85 is normally used for the country's official -- anthem. if #national == 0 and #other > 0 then table.insert(national, other[1]) table.remove(other, 1) end return national, royal, other end ------------------------------------------------------------ -- Anthem data ------------------------------------------------------------ local function getAnthemData(args) local anthems = getAnthems() local national, royal, other = classifyAnthems(anthems) local result = {} -------------------------------------------------------- -- National anthem -------------------------------------------------------- local manualNational = getManual(args, { "arrane_ashoonagh" }) if manualNational then if mw.ustring.lower(manualNational) ~= "none" then result.national = { text = '"' .. manualNational .. '"', reference = getManual(args, { "imraa_arrane_ashoonagh" }), audio = nil } end elseif #national > 0 then result.national = { text = national[1].label, reference = national[1].reference, audio = national[1].audio } end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- local manualRoyal = getManual(args, { "arrane_reeoil" }) if manualRoyal then if mw.ustring.lower(manualRoyal) ~= "none" then result.royal = { text = '"' .. manualRoyal .. '"', reference = getManual(args, { "imraa_arrane_reeoil" }), audio = nil } end elseif #royal > 0 then result.royal = { text = '"' .. royal[1].label .. '"', reference = royal[1].reference, audio = royal[1].audio } end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- local manualOther = getManual(args, { "arrane" }) if manualOther then if mw.ustring.lower(manualOther) ~= "none" then result.other = { text = '"' .. manualOther .. '"', reference = getManual(args, { "imraa_arrane" }), audio = nil } end elseif #other > 0 then result.other = { text = '"' .. other[1].label .. '"', reference = other[1].reference, audio = other[1].audio } end return result end ------------------------------------------------------------ -- Motto ------------------------------------------------------------ local function getMotto() local entity = mw.wikibase.getEntityObject() if not entity then return nil, nil end local statements = entity:getBestStatements("P1451") if not statements or #statements == 0 then return nil, nil end for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" then return value.text, getWikidataReference(statement) end end end return nil, nil end ------------------------------------------------------------ -- Motto data ------------------------------------------------------------ local function getMottoData(args) local manual = getManual(args, { "jarroo-raa_ashoonagh", "jarroo-raa" }) if manual then if mw.ustring.lower(manual) == "none" then return nil end return { text = manual, reference = getManual(args, { "imraa_jarroo-raa" }) } end local text, reference = getMotto() if not text then return nil end return { text = text, reference = reference } end ------------------------------------------------------------ -- Motto and anthem output ------------------------------------------------------------ function p.symbols(frame) local args = getArgs(frame) local motto = getMottoData(args) local anthems = getAnthemData(args) local rows = {} -------------------------------------------------------- -- Motto -------------------------------------------------------- if motto then local text = motto.text if motto.reference then text = text .. motto.reference end table.insert(rows, "'''[[Jarroo-raa]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- National anthem -------------------------------------------------------- if anthems.national then local text = '[[' .. anthems.national.text .. ']]' text = '"' .. text .. '"' if anthems.national.reference then text = text .. anthems.national.reference end if anthems.national.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.national.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane ashoonagh]]:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Other anthem -------------------------------------------------------- if anthems.other then local text = '[[' .. anthems.other.text .. ']]' text = '""' .. text .. '"' if anthems.other.reference then text = text .. anthems.other.reference end if anthems.other.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.other.audio .. ']]</div>' end table.insert(rows, "'''Anthym:&nbsp;'''" .. text ) end -------------------------------------------------------- -- Royal anthem -------------------------------------------------------- if anthems.royal then local text = '[[' .. anthems.royal.text .. ']]' text = '""' .. text .. '"' if anthems.royal.reference then text = text .. anthems.royal.reference end if anthems.royal.audio then text = text .. '<br/><div style="text-align:center;">[[Coadan:' .. anthems.royal.audio .. ']]</div>' end table.insert(rows, "'''[[Arrane reeoil]]:&nbsp;'''" .. text ) end if #rows == 0 then return nil end return mw.text.listToText(rows, "<br/>", "<br/>") end ------------------------------------------------------------ -- Flag ------------------------------------------------------------ local function getFlag(args) -- Manual value takes precedence over Wikidata. local manual = getManual(args, { "jalloo_brattagh" }) if manual then if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P41 = flag image. return getWikidataImage("P41") end ------------------------------------------------------------ -- Coat of arms ------------------------------------------------------------ local function getArms(args) -- Manual value takes precedence over Wikidata. -- jalloo_armys is the preferred new parameter. -- jalloo_cleinney and jalloo_cowrey remain supported -- for compatibility with existing articles. local manual = getManual(args, { "jalloo_armys", "jalloo_cleinney", "jalloo_cowrey" }) if manual then -- Explicitly suppress Wikidata. if mw.ustring.lower(manual) == "none" then return false end return manual end -- Wikidata P94 = coat of arms image. return getWikidataImage("P94") end ------------------------------------------------------------ -- Country name ------------------------------------------------------------ local function getCountryName(args) return args.ennym_gienneydagh or args.kianglaghey_ennym or args.ennym or mw.title.getCurrentTitle().text end local function getGenitiveName(args) local name = getCountryName(args) return enmynCheerey.genitive(name) end ------------------------------------------------------------ -- Official name (Wikidata P1448) ------------------------------------------------------------ local function getOfficialNames() local entity = mw.wikibase.getEntityObject() if not entity then return {} end local statements = entity:getBestStatements("P1448") if not statements or #statements == 0 then return {} end local names = {} for _, statement in ipairs(statements) do local mainsnak = statement.mainsnak if mainsnak and mainsnak.snaktype == "value" and mainsnak.datavalue and mainsnak.datavalue.type == "monolingualtext" then local value = mainsnak.datavalue.value if value and value.text and value.text ~= "" and value.language and value.language ~= "" then table.insert(names, { text = value.text, lang = mw.ustring.lower(value.language) }) end end end return names end ------------------------------------------------------------ -- Language name ------------------------------------------------------------ local function getLanguageName(code) if not code or code == "" then return code end code = mw.ustring.lower(code) -- Manx Wikipedia language-name override. if langOverrideTable and langOverrideTable[code] then local name = langOverrideTable[code] if type(name) == "table" then return name[1] end return name end -- Standard language-name table. if langNameTable and langNameTable[code] then local name = langNameTable[code] if type(name) == "table" then return name[1] end return name end return code end ------------------------------------------------------------ -- Language label ------------------------------------------------------------ local function makeLanguageLabel(code) local languageName = getLanguageName(code) if not languageName or languageName == "" then return "" end -- The language name is deliberately NOT italicised. return mw.text.tag( "small", {}, "([[" .. languageName .. "|" .. languageName .. "]])" ) end ------------------------------------------------------------ -- Country title ------------------------------------------------------------ function p.title(frame) local args = getArgs(frame) local countryName = getCountryName(args) local officialNames = getOfficialNames() local manxName = nil local otherNames = {} -- Find the Manx official name first. for _, item in ipairs(officialNames) do if item.lang == "gv" then manxName = item.text break end end -- If Wikidata has no Manx P1448, use the short Manx country name. if not manxName then manxName = countryName end local output = {} -- Manx country name. -- Explicitly set the font and weight rather than inheriting -- the styling of the Infobox "above" field. table.insert( output, '<span style="font-family:inherit; font-weight:bold;">' .. manxName .. '</span>' ) -- Other official-language names. -- These must explicitly be normal weight. for _, item in ipairs(officialNames) do if item.lang ~= "gv" then local languageLabel = makeLanguageLabel(item.lang) local line = '<span style="font-weight:normal;">' .. item.text if languageLabel ~= "" then line = line .. " " .. languageLabel end line = line .. "</span>" table.insert(output, line) end end return table.concat(output, "<br>") end ------------------------------------------------------------ -- Images ------------------------------------------------------------ function p.images(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</td>' .. '<td style="width:42%%; text-align:center; vertical-align:middle;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</td>' .. '</tr></table>', flag, arms, args.lheead_cowrey or "85px" ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|125px|border|alt=Brattagh]]' .. '</div>', flag ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '[[Coadan:%s|%s|alt=Armys]]' .. '</div>', arms, args.lheead_cowrey or "85px" ) end ------------------------------------------------------------ -- Captions ------------------------------------------------------------ function p.captions(frame) local args = getArgs(frame) local flag = getFlag(args) local arms = getArms(args) -- No flag and no coat of arms. if not flag and not arms then return "" end local countryName = getCountryName(args) local genitiveName = getGenitiveName(args) local flagCaption = args["fo-heidyl_brattagh"] or "Brattagh" local armsCaption = args["sorçh_cowrey"] or "Armys" local armsArticle = args["art_sorçh_cowrey"] or "Armys" -- Both flag and coat of arms. if flag and arms then return string.format( '<table style="width:100%%; background:none; border:0;"><tr>' .. '<td style="width:58%%; text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</td>' .. '<td style="width:42%%; text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</td>' .. '</tr></table>', genitiveName, flagCaption, armsArticle, genitiveName, armsCaption ) end -- Flag only. if flag then return string.format( '<div style="text-align:center;">' .. '<small>[[Brattagh %s|%s]]</small>' .. '</div>', genitiveName, flagCaption ) end -- Coat of arms only. return string.format( '<div style="text-align:center;">' .. '<small>[[%s %s|%s]]</small>' .. '</div>', armsArticle, genitiveName, armsCaption ) end return p prfhotorwhy0ffm0ak1bjngnls9v0kg